[
  {
    "path": ".git-blame-ignore-revs",
    "content": "# git config blame.ignoreRevsFile .git-blame-ignore-revs\n961ce04d240560ea5d54b5d1ab40e6b5d76b4474\n"
  },
  {
    "path": ".git_archival.txt",
    "content": "node: $Format:%H$\nnode-date: $Format:%cI$\ndescribe-name: $Format:%(describe:tags=true,match=*[0-9]*)$\nref-names: $Format:%D$\n"
  },
  {
    "path": ".gitattributes",
    "content": "World\\ population.ipynb linguist-documentation\n.git_archival.txt  export-subst\n# SCM syntax highlighting & preventing 3-way merges\npixi.lock merge=binary linguist-language=TOML linguist-generated=true\n"
  },
  {
    "path": ".github/codecov.yml",
    "content": "codecov:\n  token: 8bdc5016-2a81-4a43-bdd5-7b3b9adc37e7\n  notify:\n    wait_for_ci: true\n\ncoverage:\n  status:\n    project:\n      source:\n        paths:\n          - \"src/jupytext/\"\n        target: 96%\n        threshold: 0.2%\n      tests:\n        paths:\n          - \"tests/\"\n        target: 100%\n      unit-tests:\n        threshold: 0.2%\n        flags:\n          - unit\n      functional-tests:\n        threshold: 0.2%\n        flags:\n          - functional\n      integration-tests:\n        threshold: 0.2%\n        flags:\n          - integration\n      external-tests:\n        threshold: 0.2%\n        flags:\n          - external\n    patch:\n      default:\n        target: 80%\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where the package manifests are located.\n# Please see the documentation for all configuration options:\n# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file\n\nversion: 2\nupdates:\n  # Let's not bother about bumping top level dependencies as they are mostly\n  # developmental packages like linters. We can bump them manually\n  # when we make changes to extension packages to be consistent with JupyterLab.\n  # Importantly, these packages will not and should not effect the working of the\n  # extension, so lets try to keep maintenance low by ignoring this.\n  # - package-ecosystem: \"npm\" # See documentation for possible values\n  #   directory: \"jupyterlab\" # Location of package manifests\n  #   schedule:\n  #     interval: \"weekly\"\n  #   groups:\n  #     top-level-dependencies:\n  #       patterns:\n  #         - \"*\"\n\n  - package-ecosystem: \"npm\" # See documentation for possible values\n    directory: \"jupyterlab/packages/jupyterlab-jupytext-extension\" # Location of package manifests\n    schedule:\n      interval: \"weekly\"\n    groups:\n      jupytext-extension-dependencies:\n        patterns:\n          - \"*\"\n\n  - package-ecosystem: \"npm\" # See documentation for possible values\n    directory: \"jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests\" # Location of package manifests\n    schedule:\n      interval: \"weekly\"\n    groups:\n      jupytext-extension-ui-tests-dependencies:\n        patterns:\n          - \"*\"\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\non:\n  workflow_dispatch:\n    inputs:\n      upload-build-artifacts:\n        type: boolean\n        required: false\n        default: false\n        description: Upload build artifacts\n  push:\n    paths-ignore:\n      - \"CHANGELOG.md\"\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n  schedule:\n    - cron: \"0 11 * * 4\"\n\npermissions:\n  # All nested workflows will inherit these permissions and so no need to declare\n  # in each step file\n  contents: read\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\njobs:\n  pre-commit:\n    uses: ./.github/workflows/step_pre-commit.yml\n\n  static-analysis:\n    needs: [ pre-commit ]\n    uses: ./.github/workflows/step_static-analysis.yml\n    permissions:\n      contents: read\n      security-events: write\n\n  test-pip:\n    needs: [ pre-commit ]\n    uses: ./.github/workflows/step_tests-pip.yml\n    with:\n      coverage: ${{ github.event_name != 'schedule' }}\n\n  coverage:\n    needs: [ test-pip ]\n    uses: ./.github/workflows/step_coverage.yml\n    if: github.event_name != 'schedule'\n\n  test-conda:\n    needs: [ pre-commit ]\n    uses: ./.github/workflows/step_tests-conda.yml\n    with:\n      coverage: ${{ github.event_name != 'schedule' }}\n\n  test-ui:\n    needs: [ test-pip ]\n    uses: ./.github/workflows/step_tests-ui.yml\n\n  build:\n    needs: [ test-pip, test-conda, test-ui ]\n    uses: ./.github/workflows/step_build.yml\n    with:\n      upload: ${{ inputs.upload-build-artifacts || false }}\n\n  pass:\n    name: Pass\n    needs: [ pre-commit, static-analysis, test-pip, coverage, test-conda, test-ui, build ]\n    runs-on: ubuntu-latest\n    steps:\n      - uses: re-actors/alls-green@release/v1\n        with:\n          jobs: ${{ toJSON(needs) }}\n          allowed-skips: coverage\n    if: always()\n"
  },
  {
    "path": ".github/workflows/comment-pr.yml",
    "content": "name: Comment PR\n\non:\n  pull_request_target:\n\npermissions:\n  pull-requests: write\n\njobs:\n  comment-pr:\n    runs-on: ubuntu-latest\n    name: Comment PR\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Comment PR\n        uses: thollander/actions-comment-pull-request@v2\n        with:\n          message: |\n            Thank you for making this pull request.\n\n            Did you know? You can try it on Binder: [![Binder:lab](https://img.shields.io/badge/binder-jupyterlab-0172B2.svg)](https://mybinder.org/v2/gh/${{ github.event.pull_request.head.repo.full_name }}/${{ github.event.pull_request.head.ref }}?urlpath=lab/tree/demo/get_started.ipynb) or [![Binder:notebook](https://img.shields.io/badge/binder-notebook-0172B2.svg)](https://mybinder.org/v2/gh/${{ github.event.pull_request.head.repo.full_name }}/${{ github.event.pull_request.head.ref }}?filepath=demo).\n\n            Also, the version of Jupytext developed in this PR can be installed with `pip`:\n            ```\n            HATCH_BUILD_HOOKS_ENABLE=true pip install git+${{ github.event.pull_request.head.repo.clone_url }}@${{ github.event.pull_request.head.ref }}\n            ```\n            (this requires `nodejs`, see more at [Developing Jupytext](https://jupytext.readthedocs.io/en/latest/developing.html))\n          comment_tag: binder_link\n"
  },
  {
    "path": ".github/workflows/publish.yml",
    "content": "name: Publish\non:\n  push:\n    tags:\n      - \"v[0-9]+.[0-9]+.[0-9]+*\"\n\npermissions:\n  contents: read\n\njobs:\n  build:\n    uses: ./.github/workflows/step_build.yml\n\n  publish:\n    needs: [ build ]\n    runs-on: ubuntu-latest\n\n    environment:\n      name: pypi\n      url: https://pypi.org/p/jupytext\n\n    permissions:\n      contents: read\n      id-token: write\n\n    steps:\n      - name: Checkout source\n        uses: actions/checkout@v3\n\n\n      - name: Install pixi\n        uses: prefix-dev/setup-pixi@v0.9.1\n        with:\n          pixi-version: v0.59.0\n          cache: true\n\n      - name: Build package\n        run: |\n          eval \"$(pixi shell-hook)\"\n          HATCH_BUILD_HOOKS_ENABLE=true hatch build\n\n      - name: Publish\n        uses: pypa/gh-action-pypi-publish@release/v1\n"
  },
  {
    "path": ".github/workflows/step_build.yml",
    "content": "name: build\nrun-name: Build package\n\non:\n  workflow_call:\n    inputs:\n      upload:\n        type: boolean\n        required: false\n        default: false\n        description: Upload build artifacts\n      ref:\n        type: string\n        description: Tag to build\n\npermissions:\n  contents: read\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout source\n        uses: actions/checkout@v4\n\n      - name: Install pixi\n        uses: prefix-dev/setup-pixi@v0.9.1\n        with:\n          pixi-version: v0.59.0\n          cache: true\n\n      - name: Build package\n        run: |\n          eval \"$(pixi shell-hook)\"\n          HATCH_BUILD_HOOKS_ENABLE=true hatch build\n\n      - name: Archive build artifacts\n        uses: actions/upload-artifact@v4\n        with:\n          name: dist\n          path: dist\n        if: ${{ inputs.upload }}\n"
  },
  {
    "path": ".github/workflows/step_coverage.yml",
    "content": "name: coverage\nrun-name: Check coverage\n\non:\n  workflow_call:\n\npermissions:\n  contents: read\n\njobs:\n  coverage:\n    name: >\n      ${{ matrix.coverage }}\n    runs-on: ubuntu-latest\n\n    strategy:\n      fail-fast: false\n      matrix:\n        coverage: [unit, functional, integration, external]\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Base Setup\n        uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1\n        with:\n          python_version: 3.x\n\n      - name: Install from source\n        run: python -m pip install -e '.[test-cov,test-${{ matrix.coverage }}]'\n\n      - name: Install a Jupyter Kernel\n        run: python -m ipykernel install --name python_kernel --user\n\n      - name: Run the tests\n        run: pytest tests/${{ matrix.coverage }} -n logical --cov --cov-report=xml\n\n      - name: Upload the coverage\n        uses: codecov/codecov-action@v5\n        with:\n          flags: ${{ matrix.coverage }}\n          fail_ci_if_error: true\n          verbose: true\n"
  },
  {
    "path": ".github/workflows/step_pre-commit.yml",
    "content": "name: pre-commit\nrun-name: Run pre-commit tests\n\non:\n  workflow_call:\n\npermissions:\n  contents: read\n\njobs:\n  pre-commit:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout source\n        uses: actions/checkout@v4\n\n      - name: Set up Python\n        uses: actions/setup-python@v5\n        with:\n          python-version: \"3.x\"\n\n      - name: Install pixi\n        uses: prefix-dev/setup-pixi@v0.9.1\n        with:\n          pixi-version: v0.55.0\n          cache: true\n\n      - uses: pre-commit/action@v3.0.0\n\n  lint-extension:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout source\n        uses: actions/checkout@v4\n\n      - name: Base Setup\n        uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1\n        with:\n          python_version: \"3.x\"\n\n      # Current repo organization will not permit to set up pre-commit config for\n      # TS lint related packages due to absence of package.json in the top level\n      # repo. So we run lint step separately here\n      - name: Lint the extension\n        run: |\n          # Install JupyterLab in an isolated env to get jlpm\n          pip install jupyterlab>=4\n\n          # Install lint deps and lint extension\n          cd jupyterlab/\n          jlpm\n          jlpm run lint:check\n"
  },
  {
    "path": ".github/workflows/step_static-analysis.yml",
    "content": "name: static-analysis\nrun-name: Run CodeQL analysis\n\non:\n  workflow_call:\n\npermissions:\n  contents: read\n  security-events: write\n\njobs:\n  codeql:\n    runs-on: ubuntu-latest\n    continue-on-error: true\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Initialize CodeQL\n        uses: github/codeql-action/init@v3\n        with:\n          languages: python, javascript\n\n      - name: Perform CodeQL Analysis\n        uses: github/codeql-action/analyze@v3\n"
  },
  {
    "path": ".github/workflows/step_tests-conda.yml",
    "content": "name: test-conda\nrun-name: Run Conda tests for different OS\n\non:\n  workflow_call:\n    inputs:\n      coverage:\n        type: boolean\n        description: Upload coverage to CodeCov\n        default: true\n\npermissions:\n  contents: read\n\njobs:\n  test-conda:\n    name: >\n      ${{ matrix.os }} (${{ matrix.dependency-mode }} dependencies)\n    strategy:\n      fail-fast: false\n      matrix:\n        os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]\n        dependency-mode: [ 'locked', 'latest' ]\n    runs-on: ${{ matrix.os }}\n    defaults:\n      run:\n        shell: bash -el {0}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Install pixi\n        uses: prefix-dev/setup-pixi@v0.9.1\n        with:\n          pixi-version: v0.59.0\n          cache: true\n\n      - name: Update pixi environment\n        if: matrix.dependency-mode == 'latest'\n        run: |\n          eval \"$(pixi shell-hook)\"\n          pixi update\n\n      - name: Run tests\n        run: |\n          eval \"$(pixi shell-hook)\"\n          # Install from source\n          HATCH_BUILD_HOOKS_ENABLE=true python -m pip install -e .\n\n          # Install a Jupyter Kernel\n          python -m ipykernel install --name jupytext-ci --user\n\n          # Test with pytest\n          pytest -n logical --cov --cov-report=xml\n\n          # Uninstall jupyter-fs as it overrides the original browser-test.js to\n          # check its own functionality (https://github.com/jpmorganchase/jupyter-fs/blob/main/jupyterfs/browser-test.js)\n          # So uninstall jupyter-fs before running browser check\n          pip uninstall jupyter-fs -y\n\n          # Check extension\n          jupyter labextension list\n          jupyter labextension list 2>&1 | grep -ie \"jupyterlab-jupytext.*OK\"\n\n          # Test lab extension\n          python -m jupyterlab.browser_check\n\n      - name: Upload coverage\n        uses: codecov/codecov-action@v5\n        with:\n          fail_ci_if_error: true\n          verbose: true\n        if: inputs.coverage\n"
  },
  {
    "path": ".github/workflows/step_tests-pip.yml",
    "content": "name: test-pip\nrun-name: Run main tests using Pip\n\non:\n  workflow_call:\n    inputs:\n      coverage:\n        type: boolean\n        description: Upload coverage to CodeCov\n        default: true\n\npermissions:\n  contents: read\n\njobs:\n  test-pip:\n    name: >\n      🐍 ${{ matrix.python-version }}\n      ${{ matrix.dependency_type && format('({0})', matrix.dependency_type) }}\n      ${{ matrix.quarto && '(Quarto)' }}\n      ${{ matrix.no_kernel && '(No kernel)' }}\n      ${{ matrix.markdown-it-py && format('(markdown-it-py {0})', matrix.markdown-it-py) }}\n      ${{ matrix.no_markdown-it-py && '(No markdown-it-py)'}}\n      ${{ matrix.jupyter_server && format('(Jupyter-server {0})', matrix.jupyter_server) }}\n    runs-on: ubuntu-latest\n\n    strategy:\n      fail-fast: false\n      matrix:\n        python-version: [ \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n        experimental: [false]\n        include:\n          # Test with jupyter-server=2.10 that does not have the 'require_hash' argument\n          - python-version: \"3.x\"\n            jupyter_server: \"2.10.0\"\n          # Test minimum markdown-it-py supported (otherwise the most recent version is used)\n          - python-version: \"3.x\"\n            markdown-it-py: \"~=2.0\"\n          - python-version: \"3.x\"\n            no_markdown-it-py: true\n          - python-version: \"3.x\"\n            no_kernel: true\n          - python-version: \"3.x\"\n            quarto: true\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Base Setup\n        uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1\n        with:\n          python_version: ${{ matrix.python-version }}\n          dependency_type: ${{ matrix.dependency_type }}\n\n      - name: Install from source\n        run: >\n          HATCH_BUILD_HOOKS_ENABLE=true python -m pip install\n          -e '.[test-cov,test-external]'\n          jupyterlab\n          ${{ format('markdown-it-py{0}', matrix.markdown-it-py) }}\n\n      - name: Install Jupyter Server\n        if: ${{ matrix.jupyter_server }}\n        run: python -m pip install 'jupyter_server~=${{ matrix.jupyter_server }}'\n\n      - name: List the versions of the Jupyter components\n        run: jupyter --version\n\n      - name: Install a Jupyter Kernel\n        if: ${{ !matrix.no_kernel }}\n        run: python -m ipykernel install --name python_kernel --user\n\n      - name: Uninstall markdown-it-py\n        # Markdown-it-py is a dependency of Jupytext,\n        # but Jupytext should still work if it is not installed\n        if: ${{ matrix.no_markdown-it-py }}\n        run: python -m pip uninstall markdown-it-py --yes\n\n      - name: Install Quarto\n        if: ${{ matrix.quarto }}\n        env:\n          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}\n        run: |\n          # download the latest release\n          gh release download --repo quarto-dev/quarto-cli --pattern 'quarto-*-linux-amd64.deb'\n          # install it\n          sudo apt install ./*.deb\n\n      - name: Test with pytest\n        continue-on-error: ${{ matrix.experimental }}\n        run: pytest -n logical --cov --cov-report=xml\n\n      - name: Test lab extension\n        run: |\n          # Uninstall jupyter-fs as it overrides the original browser-test.js to\n          # check its own functionality (https://github.com/jpmorganchase/jupyter-fs/blob/main/jupyterfs/browser-test.js)\n          # So uninstall jupyter-fs before running browser check\n          #\n          pip uninstall jupyter-fs -y\n\n          # Check extension\n          jupyter labextension list\n          jupyter labextension list 2>&1 | grep -ie \"jupyterlab-jupytext.*OK\"\n\n          python -m jupyterlab.browser_check\n\n      - name: Upload coverage\n        uses: codecov/codecov-action@v5\n        with:\n          fail_ci_if_error: true\n          verbose: true\n        if: inputs.coverage\n"
  },
  {
    "path": ".github/workflows/step_tests-ui.yml",
    "content": "name: test-ui\nrun-name: Run UI tests with Galata\n\non:\n  workflow_call:\n\npermissions:\n  contents: read\n\njobs:\n  test-ui:\n    continue-on-error: false\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Install pixi\n        uses: prefix-dev/setup-pixi@v0.9.1\n        with:\n          pixi-version: v0.59.0\n          cache: true\n\n      - name: Install from source\n        run: |\n          eval \"$(pixi shell-hook)\"\n          HATCH_BUILD_HOOKS_ENABLE=true python -m pip install -e '.[test-ui]'\n\n      - name: Uninstall jupyter-fs\n        run: |\n          eval \"$(pixi shell-hook)\"\n          # Uninstall jupyter-fs as it overrides the original browser-test.js to\n          # check its own functionality (https://github.com/jpmorganchase/jupyter-fs/blob/main/jupyterfs/browser-test.js)\n          pip uninstall jupyter-fs -y\n\n      - name: Install galata\n        working-directory: jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests\n        env:\n          PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1\n        run: |\n          eval \"$(pixi shell-hook)\"\n          jlpm install\n\n      - name: Install browser\n        working-directory: jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests\n        run: |\n          eval \"$(pixi shell-hook)\"\n          jlpm playwright install chromium\n\n      - name: Integration tests\n        working-directory: jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests\n        run: |\n          eval \"$(pixi shell-hook)\"\n          jlpm playwright test\n\n      - name: Upload UI Test artifacts\n        if: failure()\n        uses: actions/upload-artifact@v4\n        with:\n          name: ui-test-output\n          path: |\n            jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/test-results\n"
  },
  {
    "path": ".github/workflows/update-playwright-snapshots.yml",
    "content": "name: Update Playwright Snapshots\n\non:\n  issue_comment:\n    types: [created, edited]\n\npermissions:\n  contents: write\n  pull-requests: write\n\njobs:\n  update-snapshots:\n    if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update playwright snapshots') }}\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: React to the triggering comment\n        run: |\n          gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=+1'\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Checkout the branch from the PR that triggered the job\n        run: |\n          gh pr checkout ${{ github.event.issue.number }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Install jupytext\n        run: |\n          HATCH_BUILD_HOOKS_ENABLE=true python -m pip install -e '.[test-ui]' jupyterlab\n\n          # Uninstall jupyter-fs as it overrides the original browser-test.js to\n          # check its own functionality (https://github.com/jpmorganchase/jupyter-fs/blob/main/jupyterfs/browser-test.js)\n          pip uninstall jupyter-fs -y\n\n      - name: Update snapshots\n        uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@v1\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          # Test folder within your repository\n          test_folder: jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests\n\n          # Playwright knows how to start JupyterLab server\n          start_server_script: 'null'\n          npm_client: jlpm\n"
  },
  {
    "path": ".gitignore",
    "content": ".build\n.cache\n.eggs\n.tox\n\nbuild\n/dist\ndocs/_build\n\n# Will be created by postBuild\ndemo/get_started.ipynb\n\n# jetbrains ide stuff\n*.iml\n.idea/\n\n# vscode ide stuff\n*.code-workspace\n.history\n.vscode/*\n!.vscode/*.template\n\n# Notebooks\n*.pyc\n.ipynb_checkpoints\n.jupyter_ystore.db*\n\n# Test related files\n.coverage\n.pytest_cache\n*.coverage*\n*.xml\n.ruff_cache\n\n# Ignore node_modules and yarn cache\nnode_modules\n.yarn\n\n# Ignore jupyter-releaser related stuff\n.jupyter_releaser_checkout\n\n# pixi environments\n.pixi\n*.egg-info\n"
  },
  {
    "path": ".pre-commit-config.yaml",
    "content": "# Install the pre-commit hooks below with\n# 'pre-commit install'\n\n# Auto-update the version of the hooks with\n# 'pre-commit autoupdate'\n\n# Run the hooks on all files with\n# 'pre-commit run --all'\n\n# NB: In this config we exclude the example and tests notebooks\n# from the code hooks (black, flake8, etc) as we want to keep\n# the text representation of the test notebooks unchanged, plus\n# the (sync) contentsmanager.py which is generated from the async one.\nexclude: >\n    (?x)^(\n      demo/.*|\n      tests/data/notebooks/.*|\n      src/jupytext/sync_pairs.py|\n      src/jupytext/sync_contentsmanager.py|\n    )$\nrepos:\n\n  - repo: https://github.com/pre-commit/pre-commit-hooks\n    rev: v6.0.0\n    hooks:\n    - id: check-json\n    - id: check-yaml\n    - id: end-of-file-fixer\n    - id: trailing-whitespace\n\n  - repo: https://github.com/astral-sh/ruff-pre-commit\n    rev: v0.14.13\n    hooks:\n      - id: ruff-check\n        args: [\"--fix\", \"--show-fixes\"]\n      - id: ruff-format\n\n  - repo: https://github.com/asottile/pyupgrade\n    rev: v3.21.2\n    hooks:\n      - id: pyupgrade\n        args: [--py39-plus]\n\n  - repo: local\n    hooks:\n      - id: pixi-lock\n        name: Update pixi.lock file\n        entry: pixi install\n        language: system\n        pass_filenames: false\n        files: ^(pyproject\\.toml|pixi\\.toml|pixi\\.lock|src/jupytext/version\\.py)$\n"
  },
  {
    "path": ".pre-commit-hooks.yaml",
    "content": "- id: jupytext\n  name: jupytext\n  description: Runs jupytext on all notebooks and paired files.\n  language: python\n  entry: jupytext --pre-commit-mode\n  require_serial: true\n  # We have only added the most frequent text notebook types, but\n  # many more types are actually supported (r, matlab, js, bash, powershell, robot, ...)\n  # If you need support for one of these other extensions, please override this default value\n  types_or: [jupyter, markdown, python]\n"
  },
  {
    "path": ".readthedocs.yml",
    "content": "# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details\n\n# Required\nversion: 2\n\n# Build the documentation using Pixi\nbuild:\n  os: \"ubuntu-24.04\"\n  tools:\n    python: \"3.12\"\n  commands:\n    - asdf plugin add pixi\n    - asdf install pixi latest\n    - asdf global pixi latest\n    - pixi run -e docs sphinx-build -b html docs ${READTHEDOCS_OUTPUT:-docs/_build}/html\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "Jupytext ChangeLog\n==================\n\n1.19.1 (2026-01-25)\n-------------------\n\n**Changed**\n- Jupytext does not change the file icons anymore! Thanks to [Michał Krassowski](https://github.com/krassowski) for finally solving this long standing issue! ([#398](https://github.com/mwouts/jupytext/issues/398))\n- We have bumped lodash from 4.17.21 to 4.17.23 in JupyterLab extension ([#1483](https://github.com/mwouts/jupytext/pull/1483))\n- We require `marimo<=0.19.4` in tests following a change in the location of the `marimo` import ([#1485](https://github.com/mwouts/jupytext/issues/1485))\n\n\n1.19.0 (2026-01-18)\n-------------------\n\n**Changed**\n- The environment used to develop Jupytext is now maintained using Pixi ([#1459](https://github.com/mwouts/jupytext/pull/1459))\n\n**Fixed**\n- We have restored the support for `.qmd` documents in Jupyter ([#1435](https://github.com/mwouts/jupytext/issues/1435))\n- We have fixed warnings about the cell ids like either `Cell is missing an id field` or `Additional properties are not allowed ('id' was unexpected)` when converting to some formats, including Pandoc ([#1464](https://github.com/mwouts/jupytext/pull/1464))\n- We have updated the dependencies of the Jupytext extension for JupyterLab. Many thanks to [Mahendra Paipuri](https://github.com/mahendrapaipuri) for his PR ([#1477](https://github.com/mwouts/jupytext/pull/1477))!\n\n**Added**\n- We have added a new `py:marimo` format, which uses the `marimo` command line interface to convert notebooks to and from the Marimo format ([#1431](https://github.com/mwouts/jupytext/pull/1431))\n\n\n1.18.1 (2025-10-19)\n-------------------\n\n**Fixed**\n- Fixed test `test_check_source_is_newer_when_using_jupytext_sync` to work reliably on systems with low filesystem timestamp resolution ([#1460](https://github.com/mwouts/jupytext/issues/1460))\n\n**Changed**\n- We now use `pixi` to maintain the local Python environments used for developing and testing Jupytext.\n\n\n1.18.0 (2025-10-18)\n-------------------\n\n**Added**\n- The documentation has a chapter on the [Jupytext Sync](https://jupytext.readthedocs.io/en/latest/vs-code.html) extension for VS Code ([#1395](https://github.com/mwouts/jupytext/issues/1395))\n- We have added a new option `--check-source-is-newer` to the Jupytext CLI. Use this option if you want to make sure that the file passed as argument to Jupytext is the newest of all paired files, and/or newer than the destination file.\n- We have added a section on [Jupyter Collaboration](https://jupytext.readthedocs.io/en/latest/jupyter-collaboration.html) which also provides a very useful autoreload functionality ([#406](https://github.com/mwouts/jupytext/issues/406), [#1401](https://github.com/mwouts/jupytext/issues/1401))\n- Pairing groups allow you to define different pairing configurations for specific subsets of notebooks. The `formats` configuration option now supports a list of format dictionaries for first-match pairing. Use `[[formats]]` sections in your TOML configuration to define multiple format specifications, where the first matching format is used. This allows applying different pairing rules to notebooks in different locations, such as generating documentation markdown files only for tutorial notebooks ([#1383](https://github.com/mwouts/jupytext/issues/1383))\n- We have added more tests to document the complex pairing formats, which also work on Windows ([#1028](https://github.com/mwouts/jupytext/issues/1028))\n- Pairing into nested folders was fixed on Windows ([#1028](https://github.com/mwouts/jupytext/issues/1028))\n- Jupytext is now tested with Python 3.14 ([#1456](https://github.com/mwouts/jupytext/issues/1456))\n\n**Fixed**\n- The Jupytext CLI now detects if a file it has read or consulted has been modified while it was processing it. That can happen in the context of the [Jupytext Sync](https://marketplace.visualstudio.com/items?itemName=caenrigen.jupytext-sync) extension for VS Code ([#1411](https://github.com/mwouts/jupytext/issues/1411), [vscode-jupytext-sync-#12](https://github.com/caenrigen/vscode-jupytext-sync/issues/12)). When such a synchronous modification is detected, Jupytext now raises an error. Many thanks to [Anne Archibald](https://github.com/aarchiba) for reporting the issue and preparing an inspiring PR ([#1417](https://github.com/mwouts/jupytext/pull/1417)).\n- We don't import `notebook` when `jupyter_server` is available ([#1436](https://github.com/mwouts/jupytext/issues/1436))\n- Jupytext now supports more characters in the cell metadata keys, to improve compatibility with `jupyterlab-slideshow` ([#1441](https://github.com/mwouts/jupytext/issues/1441)). Thanks to [Nicolas Thierry](https://github.com/nthiery) for this fix.\n- The function `find_jupytext_configuration_file` now works with relative directories ([#1440](https://github.com/mwouts/jupytext/issues/1440)). This fix was contributed by [Thierry Parmentelat](https://github.com/parmentelat).\n- We have fixed a parsing error for R Markdown files ([#1429](https://github.com/mwouts/jupytext/issues/1429))\n- We have fixed a parsing error when the first cell of the notebook contains a YAML header that is not a dict ([#1444](https://github.com/mwouts/jupytext/issues/1444))\n\n**Changed**\n- We have updated the pre-commit hooks. The code is now formatted using `ruff format`, and updated for Python 3.9+ using https://github.com/asottile/pyupgrade ([#1423](https://github.com/mwouts/jupytext/issues/1423))\n\n\n1.17.3 (2025-08-28)\n-------------------\n\n**Added**\n- All the extensions supported by Jupytext now appear in the `--to` paragraph\nof `jupytext --help` ([#433](https://github.com/mwouts/jupytext/issues/433))\n- We have added a new function `get_formats_from_notebook_path` that returns the list of paired\nformats for a given notebook ([#1419](https://github.com/mwouts/jupytext/issues/1419))\n\n**Fixed**\n- We have fixed `jupytext --sync`, and the contents manager, to make sure that a simple `.py` file (not in the percent format) will not be treated as a paired file when the Jupytext configuration file has `formats=\"ipynb,py:percent\"` ([#1418](https://github.com/mwouts/jupytext/issues/1418))\n- A notebook can be moved in Jupyter even if that makes it unpaired ([#1414](https://github.com/mwouts/jupytext/issues/1414))\n- The test against `jupyter-fs` now installs its `fs` extra dependency ([#1398](https://github.com/mwouts/jupytext/issues/1398))\n- The `jupytext --sync` command now works correctly with symbolic links. Thanks to [mccullerlp](https://github.com/mccullerlp) for reporting ([#1407](https://github.com/mwouts/jupytext/issues/1407)) and addressing ([#1408](https://github.com/mwouts/jupytext/pull/1408)) the problem!\n- Jupytext will look for `quarto.cmd` on Windows. Thanks to [mccullerlp](https://github.com/mccullerlp) for documenting the issue ([#1406](https://github.com/mwouts/jupytext/issues/1406), [#1409](https://github.com/mwouts/jupytext/pull/1409)).\n- We have corrected the `jupytext --paired-paths` command: it will now take the Jupytext configuration file, if any, into account ([#1419](https://github.com/mwouts/jupytext/issues/1419))\n\n\n1.17.2 (2025-06-01)\n-------------------\n\n**Fixed**\n- The `--set-formats` argument takes precedence over pre-existing pairing information in the notebook ([#1386](https://github.com/mwouts/jupytext/issues/1386))\n\n**Changed**\n- We have removed Python 3.8 from the list of supported Python version, and from the CI, as it has reached its EOL\n\n**Added**\n- ROOT-flavored C++ notebooks can be paired to `.cpp` files - thanks to [Steven Gardiner](https://github.com/sjgardiner) for this contribution ([#1384](https://github.com/mwouts/jupytext/pull/1384))\n\n\n1.17.1 (2025-04-26)\n-------------------\n\n**Fixed**\n- Renaming files other than notebooks will not load their content ([#1376](https://github.com/mwouts/jupytext/issues/1376))\n\n\n1.17.0 (2025-04-05)\n-------------------\n\n**Added**\n- The MyST frontmatter found in MyST Markdown notebooks can be mapped to a YAML header at the top of the Jupyter notebook. This way MyST notebooks in either the `md:myst` or `ipynb` format can be used with MyST. Thanks to [Ian Carroll](https://github.com/itcarroll) for proposing and implementing this change ([#1314](https://github.com/mwouts/jupytext/issues/1314))\n- The context menu has a \"New Text Notebook\" entry. Thanks to [Mahendra Paipuri](https://github.com/mahendrapaipuri) for this PR ([#1365](https://github.com/mwouts/jupytext/pull/1365))!\n\n\n**Changed**\n- Jupytext's default contents manager is now derived from the asynchronous AsyncLargeFileManager. Thanks to [Darshan Poudel](https://github.com/Darshan808) for making this finally happen ([#1328](https://github.com/mwouts/jupytext/pull/1328))!\n- The [percent format](https://jupytext.readthedocs.io/en/latest/formats-scripts.html#the-percent-format) is now the default format for scripts. If you run `jupytext --to py notebook.ipynb` you now get a `py:percent` script (use `--to py:light` for the light format) [#1201](https://github.com/mwouts/jupytext/pull/1201)\n- The `rst2md` conversion now works with `sphinx-gallery>=0.8`. Thanks to [Thomas J. Fan](https://github.com/thomasjpfan) for fixing this! ([#1334](https://github.com/mwouts/jupytext/pull/1334))\n- We have updated the JupyterLab extension dependencies ([#1300](https://github.com/mwouts/jupytext/pull/1300), [#1355](https://github.com/mwouts/jupytext/pull/1355), [#1360](https://github.com/mwouts/jupytext/pull/1360)). Thanks to [Mahendra Paipuri](https://github.com/mahendrapaipuri) for these PRs!\n\n**Fixed**\n- We have added and fixed round trip tests on MyST Markdown notebooks ([#759](https://github.com/mwouts/jupytext/issues/759), [#789](https://github.com/mwouts/jupytext/issues/789), [#1267](https://github.com/mwouts/jupytext/issues/1267), [#1317](https://github.com/mwouts/jupytext/issues/1317))\n- The `--quiet` option now works with the `--pipe` mode of Jupytext CLI ([#1305](https://github.com/mwouts/jupytext/issues/1305))\n- Jupytext is now compatible with the cell toolbar extension - thanks to [Nicolas Brichet](https://github.com/brichet) for the fix! ([#1358](https://github.com/mwouts/jupytext/pull/1358))\n- The project description on PyPI now uses absolute links ([#1287](https://github.com/mwouts/jupytext/issues/1287))\n\n\n1.16.7 (2025-02-09)\n-------------------\n\n**Added**\n- Logtalk notebooks are now supported ([#1308](https://github.com/mwouts/jupytext/pull/1308)) - thanks to [Paulo Moura](https://github.com/pmoura) for this contribution\n\n**Fixed**\nWe have updated the dependencies of the JupyterLab extension to address [security issues](https://github.com/mwouts/jupytext/security/dependabot).\n\n\n1.16.6 (2024-12-16)\n-------------------\n\n**Fixed**\n- We fixed a \"File Changed\" warning when saving notebooks ([#1301](https://github.com/mwouts/jupytext/issues/1301))\n\n**Changed**\n- The original file name is easier to infer from the tmp file name in pre-commit hooks ([#1289](https://github.com/mwouts/jupytext/issues/1289)) - thanks to [Lunin Leonid](https://github.com/lrlunin) for making this change.\n\n\n1.16.5 (2024-12-15)\n-------------------\n\n**Fixed**\n- We have fixed a notebook corruption issue when using Jupytext with Jupyter-Collaboration ([#1124](https://github.com/mwouts/jupytext/issues/1124), [jupyter-collaboration 214](https://github.com/jupyterlab/jupyter-collaboration/issues/214)).\n- We have added the `require_hash` argument on the Jupytext contents manager. The hash of a paired file is the concatenation of the hash of the text file and the hash for the `.ipynb` file ([#1165](https://github.com/mwouts/jupytext/issues/1165))\n- The `rst2md` tests have been fixed by requiring `sphinx<8` ([#1266](https://github.com/mwouts/jupytext/issues/1266))\n- Some dependencies of the JupyterLab extensions were updated ([#1272](https://github.com/mwouts/jupytext/issues/1272), [#1273](https://github.com/mwouts/jupytext/issues/1273), [#1280](https://github.com/mwouts/jupytext/issues/1280), [#1285](https://github.com/mwouts/jupytext/issues/1285), [#1290](https://github.com/mwouts/jupytext/issues/1290))\n- The pre-commit hook is now compatible with log.showsignature=True ([#1281](https://github.com/mwouts/jupytext/issues/1281)). Thanks to [Justin Lecher](https://github.com/jlec) for this fix.\n\n**Added**\n- Jupytext is now tested with Python 3.13 ([#1242](https://github.com/mwouts/jupytext/issues/1242)). Thanks to [Jerry James](https://github.com/jamesjer) for the suggested fixes!\n- The extension of a notebook piped into stdin will be taken in the notebook metadata ([#1282](https://github.com/mwouts/jupytext/issues/1282))\n\n\n1.16.4 (2024-07-12)\n-------------------\n\n**Fixed**\n- We use `asyncio.iscoroutinefunction` to determine whether the current contents manager is sync or async ([#1260](https://github.com/mwouts/jupytext/issues/1260))\n\n\n1.16.3 (2024-07-09)\n-------------------\n\n**Fixed**\n- We use `inspect` to determine whether the current contents manager derives from `AsyncContentsManager` (which is not\nsupported by Jupytext at the moment). This fixes a compatibility issue with `jupyter-fs==1.0.0` ([#1239](https://github.com/mwouts/jupytext/issues/1239)). Thanks to [Mahendra Paipuri](https://github.com/mahendrapaipuri) for this PR!\n- We have fixed a typo when `build_jupytext_contents_manager_class` can't be imported ([#1162](https://github.com/mwouts/jupytext/issues/1162))\n- A Python 3.13 deprecation warning was fixed [#1241](https://github.com/mwouts/jupytext/pull/1241) - thanks to [Jerry James](https://github.com/jamesjer)\n- We have fixed a typo when `build_jupytext_contents_manager_class` can't be imported ([#1162](https://github.com/mwouts/jupytext/issues/1162))\n- Some dependencies of the JupyterLab extensions were updated ([#1243](https://github.com/mwouts/jupytext/issues/1243), [#1245](https://github.com/mwouts/jupytext/issues/1245))\n\n**Added**\n- Lua notebooks are now supported ([#1252](https://github.com/mwouts/jupytext/pull/1252)) - thanks to [erentar](https://github.com/erentar) for this contribution\n- Go notebooks are supported too ([#1244](https://github.com/mwouts/jupytext/issues/1244))! Many thanks to [Jan Pfeifer](https://github.com/janpfeifer), author of [GoNB](https://github.com/janpfeifer/gonb), and to [HaveF](https://github.com/HaveF) for their help on this topic.\n- Empty prefixes are now allowed in Jupytext format when specified as a dictionary ([#1144](https://github.com/mwouts/jupytext/issues/1144))\n\n**Changed**\n- We've had to deactivate the tests on the Quarto format in the CI as the Quarto round trip\nmight now add a Markdown cell to the notebook ([#1255](https://github.com/mwouts/jupytext/issues/1255))\n\n\n1.16.2 (2024-05-05)\n-------------------\n\n**Added**\n- Added support for Xonsh notebooks ([#1213](https://github.com/mwouts/jupytext/pull/1213)) - thanks to [Jeffrey Odongo](https://github.com/jsquaredosquared) for this contribution\n\n**Changed**\n- By default, the JupyterLab extension for Jupytext is not included in the build (set `HATCH_BUILD_HOOKS_ENABLE=true` to include it). This simplifies the installation of Jupytext in pre-commit hooks ([#1210](https://github.com/mwouts/jupytext/issues/1210))\n- Temporary text notebooks for the `--pipe` or `--check` commands are now created in the notebook directory ([#1206](https://github.com/mwouts/jupytext/issues/1206))\n- Jupytext uses the standard library `tomllib` in Python 3.11, or `tomli` in Python 3.10 or older, to match JupyterLab's dependencies ([#1195](https://github.com/mwouts/jupytext/issues/1195))\n- The dependencies of the JupyterLab extension were updated ([#1216](https://github.com/mwouts/jupytext/issues/1216), [#1218](https://github.com/mwouts/jupytext/issues/1218), [#1231](https://github.com/mwouts/jupytext/issues/1231))\n- `jupytext --sync` will not update the timestamp of text notebooks if their content is unchanged ([#1215](https://github.com/mwouts/jupytext/issues/1215))\n\n\n**Fixed**\n- Jupytext is now tested with `pandoc>=3.0`. Please note that switching to `pandoc>=3.0` will add cell ids to your `pandoc:md` notebooks ([#1006](https://github.com/mwouts/jupytext/issues/1006))\n\n\n1.16.1 (2024-01-13)\n-------------------\n\n**Changed**\n- The CI has been updated. Thanks to [Christian Le](https://github.com/LecrisUT) for taking care of this! ([#1190](https://github.com/mwouts/jupytext/issues/1190), [#1204](https://github.com/mwouts/jupytext/issues/1204))\n\n**Fixed**\n- Fixed an issue about unpairing notebooks from the Jupytext Menu ([#1197](https://github.com/mwouts/jupytext/issues/1197))\n- JupyterLab's dependency `follow-redirects` was updated from 1.15.3 to 1.15.4 ([#1203](https://github.com/mwouts/jupytext/issues/1203))\n\n\n1.16.0 (2023-12-03)\n-------------------\n\n**Added**\n- The Jupytext Menu is back! And text notebooks can be created directly from the launcher. This is an outstanding contribution by [Mahendra Paipuri](https://github.com/mahendrapaipuri) ([#1154](https://github.com/mwouts/jupytext/issues/1154), [#1163](https://github.com/mwouts/jupytext/issues/1163)). This requires JupyterLab 4.x or Jupyter Notebook 7.x.\n\n**Changed**\n- Jupytext is now configured with `pyproject.toml` and built with `hatch`. The layout has been reorganised to follow `src-layout` ([#1140](https://github.com/mwouts/jupytext/issues/1140)). This is another outstanding contribution by [Mahendra Paipuri](https://github.com/mahendrapaipuri).\n- The tests are now part of the `sdist`. They have been reorganized into unit/functional/integration/external ([#1167](https://github.com/mwouts/jupytext/issues/1167), [#1173](https://github.com/mwouts/jupytext/issues/1173)).\n- The legacy extension for Jupyter Notebook <=6 (the Jupytext Menu) has been removed.\n\n**Fixed**\n- The bibliography section in Rmd files does not become a code cell anymore ([#1161](https://github.com/mwouts/jupytext/issues/1161))\n- Commented code in `active-py` cells is not uncommented anymore ([#1131](https://github.com/mwouts/jupytext/issues/1131))\n- The test coverage has been restored ([#1167](https://github.com/mwouts/jupytext/issues/1167), [#1173](https://github.com/mwouts/jupytext/issues/1173))\n- We test Jupytext against the pre-release version of JupyterLab, and other dependencies ([#1168](https://github.com/mwouts/jupytext/issues/1168))\n\n\n1.15.2 (2023-09-16)\n-------------------\n\n**Added**\n- The JupyterLab extension is now compatible with the [JupyterLab RISE](https://github.com/jupyterlab-contrib/rise) extension. Many thanks to [Frédéric Collonval](https://github.com/fcollonval) for his PR ([#1126](https://github.com/mwouts/jupytext/pull/1126))!\n\n\n1.15.1 (2023-08-26)\n-------------------\n\n**Added**\n- We have added a new command line interface `jupytext-config` that you can use to set Jupytext as the default viewer for text notebooks in JupyterLab and Jupyter Notebook 7. Thanks to [Thierry Parmentelat](https://github.com/parmentelat) for this contribution! ([#1094](https://github.com/mwouts/jupytext/pull/1094))\n\n\n1.15.0 (2023-07-30)\n-------------------\n\n**Changed**\n- This version comes with a version of the JupyterLab extension that is compatible with JupyterLab 4.x. Many thanks to [Thierry Parmentelat](https://github.com/parmentelat) for his PRs! ([#1092](https://github.com/mwouts/jupytext/pull/1092), [#1109](https://github.com/mwouts/jupytext/pull/1109))\n- Pandoc 3.0 is now supported, thanks to [Raniere Silva](https://github.com/rgaiacs) for his PR ([#1099](https://github.com/mwouts/jupytext/pull/1099))\n- We have reorganized the documentation and the README.md ([#1031](https://github.com/mwouts/jupytext/issues/1031), [#1073](https://github.com/mwouts/jupytext/issues/1073))\n- Invalid `pyproject.toml` files will be ignored by Jupytext in Jupyter ([#1103](https://github.com/mwouts/jupytext/issues/1103))\n- We have updated the pre-commit tools\n\n\n1.14.7 (2023-06-29)\n-------------------\n\n**Changed**\n- We have updated the GitHub workflows - thanks to Matthew Feickert and to Cristian Le for their help on this subject ([#1037](https://github.com/mwouts/jupytext/issues/1037))\n- We have removed the upper bound on `markdown-it-py<3`. Now we test Jupytext with `markdown-it-py` in versions `2.x` and `3.x` on the CI ([#1075](https://github.com/mwouts/jupytext/issues/1075))\n\n**Fixed**\n- Notebooks with an empty YAML header work ([#1070](https://github.com/mwouts/jupytext/issues/1070))\n- Double quote strings in R Markdown options can contain single quotes ([#1079](https://github.com/mwouts/jupytext/issues/1079))\n- The necessary directories are created when paired notebooks are moved to a sub-folder ([#1059](https://github.com/mwouts/jupytext/issues/1059))\n- Commented quotes are recognized as such ([#1060](https://github.com/mwouts/jupytext/issues/1060))\n- Jupytext can use either `pkg_resources` or `packaging` to parse version numbers ([#1085](https://github.com/mwouts/jupytext/issues/1085))\n\n\n1.14.6 (2023-06-04)\n-------------------\n\n**Changed**\n- This version comes with a build requirement `jupyterlab>=3,<4`, as the Jupyterlab\nextension for Jupytext is not compatible with JupyterLab 4 yet ([#1054](https://github.com/mwouts/jupytext/issues/1054))\n- The JupyterLab extension was released to `npm` in version 1.3.9.\n\n\n1.14.5 (2023-02-25)\n-------------------\n\n**Added**\n- Added Stata as a supported language ([#1027](https://github.com/mwouts/jupytext/pull/1027)) - thanks to [Raffaele Mancuso](https://github.com/raffaem) for this contribution\n- Added SAS as a supported language ([#1047](https://github.com/mwouts/jupytext/pull/1047)) - thanks to [lawrencet149](https://github.com/lawrencet149) for this contribution\n- We have added a series of test to make sure that the main formats support cell tags ([#1024](https://github.com/mwouts/jupytext/issues/1024))\n\n**Fixed**\n- When a metadata key is not a valid identifier, a warning is emitted and the metadata is not saved to the text representation ([#1042](https://github.com/mwouts/jupytext/issues/1042))\n- The CI was fixed by [Matthew Feickert](https://github.com/matthewfeickert) ([#1035](https://github.com/mwouts/jupytext/pull/1035))\n- We now use `concurrency` to cancel previous runs on the same branch/PR ([#1037](https://github.com/mwouts/jupytext/issues/1037))\n- We use both `codecov.notify.after_n_builds` and `comment.after_n_builds` to get only the final codecov comment\n\n**Changed**\n- Empty tags are not exported to the text notebook anymore ([#960](https://github.com/mwouts/jupytext/issues/960))\n- We updated the `yarn.lock` file for the jupyter lab extension to address security vulnerabilities ([#1030](https://github.com/mwouts/jupytext/issues/1030), [#1036](https://github.com/mwouts/jupytext/issues/1036))\n- In the pre-commit tests we now use `main` for the main branch\n\n\n1.14.4 (2022-12-11)\n-------------------\n\n**Added**\n- Added Wolfram Language as a supported language ([#1014](https://github.com/mwouts/jupytext/issues/1014)) - thanks to [Etienne Dechamps](https://github.com/dechamps) for this contribution\n\n\n1.14.3 (2022-12-11)\n-------------------\n\n**Fixed**\n- When the default contents manager is _async_ (i.e. `jupyter_server>=2.0.0`), the Jupyter server extension for Jupytext derives a contents manager from `LargeFileManager` instead, as async contents managers are not supported by Jupytext at the moment ([#1020](https://github.com/mwouts/jupytext/issues/1020))\n- We have made adjustments on the CI as flake8 was moved to GitHub, and Python 3.6 is not available anymore on `ubuntu-latest`\n\n\n1.14.2 (2022-11-12)\n-------------------\n\n**Fixed**\n- The sample notebooks have been normalized with `nbformat.validator.normalize` ([#1002](https://github.com/mwouts/jupytext/issues/1002)).\n- The warnings in the test suite that we cannot fix are filtered using a new `pytest.ini` file\n- We updated the `yarn.lock` file for the jupyter lab extension to address security vulnerabilities ([#984](https://github.com/mwouts/jupytext/issues/984), [#1005](https://github.com/mwouts/jupytext/issues/1005), [#1011](https://github.com/mwouts/jupytext/issues/1011))\n\n**Changed**\n- The CI uses Python 3.9 rather than 3.7 when testing conda environments\n\n**Added**\n- Gnuplot is now supported ([#998](https://github.com/mwouts/jupytext/issues/998)) - thanks to [razimantv](https://github.com/razimantv) for this contribution\n- We now test Jupytext against Python 3.6 to 3.11 on the CI\n- We have added a test to document how to use the folder and prefix matching when pairing notebooks ([#974](https://github.com/mwouts/jupytext/issues/974))\n\n\n1.14.1 (2022-07-29)\n-------------------\n\n**Fixed**\n- The timestamp of a paired notebook is the timestamp of the most recent paired file. This fixes the warning \"File Changed\"\nafter reloading the notebook in Jupyter ([#978](https://github.com/mwouts/jupytext/issues/978)).\n\n\n1.14.0 (2022-07-03)\n-------------------\n\n**Changed**\n- The Jupytext configuration file has a new option `cm_config_log_level` that defaults to `info_if_changed`.\nWith that value, the contents manager will log a line regarding the configuration file used only when the\nconfig file is not the same as the one previously used ([#959](https://github.com/mwouts/jupytext/issues/959)) -\nmany thanks to R.C. Thomas for suggesting this and thoughtfully testing the patch.\n- Hidden configuration files like `.jupytext.toml` or `.jupytext.py` are now ignored by Jupytext's contents manager\nwhen `allow_hidden=False` (that option was introduced in `jupyter_server==2.0.0a1`) ([#964](https://github.com/mwouts/jupytext/issues/964)).\n- We have changed `jupytext --set-formats` to make it more similar to `jupytext --sync`. Now `--set-formats` will not\noverride existing paired files anymore ([#969](https://github.com/mwouts/jupytext/issues/969)).\n\n**Added**\n- We have added a test `test_pre_commit_hook_sync_with_no_config` that documents how to use the pre-commit hook without\na configuration file ([#967](https://github.com/mwouts/jupytext/issues/967))\n\n1.13.8 (2022-04-04)\n-------------------\n\n**Fixed**\n- Text-only notebooks are always trusted (as they don't include any output cells) ([#941](https://github.com/mwouts/jupytext/issues/941))\n- We made sure that our tests also work in absence of a Python kernel ([#906](https://github.com/mwouts/jupytext/issues/906))\n- The coverage of the `tests` folder has been restored at 100%\n- Bash commands like `!{cmd}` are now correctly escaped in the `py:percent` format ([#938](https://github.com/mwouts/jupytext/issues/938))\n\n**Added**\n- Added Tcl as a supported language ([#930](https://github.com/mwouts/jupytext/issues/930)) - thanks to [shishitao](https://github.com/shishitao) for this contribution\n- Added Maxima as a supported language ([#927](https://github.com/mwouts/jupytext/issues/927)) - thanks to [Alberto Lusiani](https://github.com/alusiani) for contributing a sample Maxima notebook.\n\n**Changed**\n- The Jupytext contents manager is derived from the `LargeFileManager` imported from `jupyter_server` rather than `notebook` ([#933](https://github.com/mwouts/jupytext/issues/933))\n- Allow for markdown-it-py v2 ([#924](https://github.com/mwouts/jupytext/issues/924))\n- We have updated the hooks used in the test pre-commits, to fix an issue on the CI ([#940](https://github.com/mwouts/jupytext/issues/940), [#942](https://github.com/mwouts/jupytext/issues/942))\n- We updated the `yarn.lock` file for the jupyter lab extension to address security vulnerabilities ([#904](https://github.com/mwouts/jupytext/issues/904), [#925](https://github.com/mwouts/jupytext/issues/925), [#935](https://github.com/mwouts/jupytext/issues/935), [#939](https://github.com/mwouts/jupytext/issues/939))\n\n\n1.13.7 (2022-02-09)\n-------------------\n\n**Fixed**\n- The Jupytext CLI only suggest `--update` when the target is an .ipynb file ([#905](https://github.com/mwouts/jupytext/issues/905)) - thanks to [st--](https://github.com/st--) for this contribution\n- We made sure that commands like `cat notebook.md | jupytext --execute` work ([#908](https://github.com/mwouts/jupytext/issues/908))\n\n**Added**\n- Added Haskell as supported language ([#909](https://github.com/mwouts/jupytext/issues/909)) - thanks to [codeweber](https://github.com/codeweber) for this contribution\n\n**Changed**\n- We have updated the pre-commit hooks and in particular we switched to the first stable version of `black==22.1.0`.\n- We require `pandoc==2.16.2` for testing. The representation for code cells changed from ` ``` {.python}` to ` ``` python` in that version of Pandoc ([#906](https://github.com/mwouts/jupytext/issues/906)). We don't use `pandoc>=2.17` in tests at the moment because of the introduction of cell ids that cannot be filtered.\n- Jupytext will not add anymore a UTF-8 encoding on Python scripts when the notebook contains non-ascii characters ([#907](https://github.com/mwouts/jupytext/issues/907))\n- We have added `pyupgrade` to the pre-commit hooks used for developing Jupytext ([#907](https://github.com/mwouts/jupytext/issues/907))\n\n\n1.13.6 (2022-01-11)\n-------------------\n\n**Fixed**\n- The `text_representation` metadata of text notebooks is filtered from `.ipynb` files both in `jupytext.write` and in the contents manager for Jupyter ([#900](https://github.com/mwouts/jupytext/issues/900))\n\n**Changed**\n- Jupytext will not issue a warning when a format suffix starting with '.', '-' or '_' is passed to the `--to` option ([#901](https://github.com/mwouts/jupytext/issues/901))\n\n\n1.13.5 (2021-12-27)\n-------------------\n\n**Fixed**\n- Jupytext will not open a text notebook that is not UTF-8 ([#896](https://github.com/mwouts/jupytext/issues/896))\n\n\n1.13.4 (2021-12-12)\n-------------------\n\n**Changed**\n- The test suite filters the warnings that don't belong to Jupytext ([#823](https://github.com/mwouts/jupytext/issues/823))\n\n**Fixed**\n- The parsing of notebooks that don't have a YAML header (like `docs/formats.md`) was improved.\n- The test suite works with `pytest-randomly` ([#838](https://github.com/mwouts/jupytext/issues/838))\n\n\n1.13.3 (2021-12-04)\n-------------------\n\n**Changed**\n- The \"Jupytext Notebook\" factory that lets the user configure the Notebook viewer as the default for text notebooks accepts more filetypes: \"myst\", \"r-markdown\" and \"quarto\" ([#803](https://github.com/mwouts/jupytext/issues/803))\n- Empty MyST Markdown files are valid notebooks ([#883](https://github.com/mwouts/jupytext/issues/883))\n- Jupytext also works with `markdown-it-py` v2.0 ([#885](https://github.com/mwouts/jupytext/issues/885))\n\n\n1.13.2 (2021-11-30)\n-------------------\n\n**Changed**\n- The extension for JupyterLab benefited from a series of improvements contributed by [Frédéric Collonval](https://github.com/fcollonval):\n  - A new \"Jupytext Notebook\" factory offers the option to open text notebooks directly with the notebook view ([#803](https://github.com/mwouts/jupytext/issues/803)). To use it, follow the instructions in the [documentation](https://github.com/mwouts/jupytext/blob/main/docs/index.md#Install).\n  - The ICommandPalette is optional, for compatibility with RISE within JupyterLab [RISE[#605](https://github.com/mwouts/jupytext/issues/605)](https://github.com/damianavila/RISE/pull/605)\n  - Added support for translation\n- Branch `master` was renamed to `main` (links in the documentation were updated)\n\n\n1.13.1 (2021-10-07)\n-------------------\n\n**Fixed**\n- The magic commands in `py:percent` scripts with no explicit format information remain commented over a round trip ([#848](https://github.com/mwouts/jupytext/issues/848))\n\n\n1.13.0 (2021-09-25)\n-------------------\n\n**Added**\n- The Jupytext CLI has a new `--diff` command to show the differences between two notebooks (and if you want to see the changes in a file being updated by Jupytext, use `--show-changes`) ([#799](https://github.com/mwouts/jupytext/issues/799))\n- Jupyter will show the diff between text and `ipynb` paired notebooks when it cannot open a paired notebook because the `ipynb` version is more recent. Also, if the inputs in the two files are identical then the notebook will open with no error ([#799](https://github.com/mwouts/jupytext/issues/799))\n- The `py:percent` format will use raw strings when encoding Markdown cells as string, if they contain backslash characters ([#836](https://github.com/mwouts/jupytext/issues/836))\n\n**Fixed**\n- We have upgraded the jupyterlab extension dependencies and especially `ansi-regex` to fix a security vulnerability ([#857](https://github.com/mwouts/jupytext/issues/857))\n\n**Changed**\n- The Jupytext configuration file is reloaded only when a notebook is opened, saved, or when a different folder is explored ([#797](https://github.com/mwouts/jupytext/issues/797))\n\n\n1.12.0 (2021-09-09)\n-------------------\n\n**Added**\n- Jupytext supports Quarto notebooks (with `.qmd` extension) ([#837](https://github.com/mwouts/jupytext/issues/837))\n- Jupytext can be configured through the `pyproject.toml` file. Thanks to Robin Brown for this contribution! ([#828](https://github.com/mwouts/jupytext/issues/828))\n- Jupytext now supports OCaml files with `.ml` extension. Thanks to Quentin Fortier for getting this started ([#832](https://github.com/mwouts/jupytext/issues/832))\n\n**Fixed**\n- Added more test to make sure that notebooks can be trusted. In practice, notebooks could not be trusted in JupyterLab<3.0.13 because of the absence of cell ids ([#826](https://github.com/mwouts/jupytext/issues/826))\n\n\n1.11.5 (2021-08-31)\n-------------------\n\n**Fixed**\n- Fixed typos revealed by `codespell` - thanks to @hectormz for this contribution ([#829](https://github.com/mwouts/jupytext/issues/829))\n- We updated the dependencies of the `jupyterlab-jupytext` extension to address several security issues ([#842](https://github.com/mwouts/jupytext/issues/842)) ([#843](https://github.com/mwouts/jupytext/issues/843))\n- The Jupytext dev environment (`requirements-dev.txt`) now uses `jupyterlab==3.0.17` rather than `3.0.0` because of another security issue ([#839](https://github.com/mwouts/jupytext/issues/839))\n\n\n1.11.4 (2021-07-14)\n-------------------\n\n**Changed**\n- The documentation illustrates how the `cell_markers` option (and the other ones) can be set directly in the `jupytext.toml` config file ([#809](https://github.com/mwouts/jupytext/issues/809)).\n- The dependency on `mdit-py-plugins` through `markdown-it-py[plugins]` was made explicit ([#814](https://github.com/mwouts/jupytext/issues/814))\n\n**Fixed**\n- System assigns of the form `var = !cmd` are commented out ([#816](https://github.com/mwouts/jupytext/issues/816))\n- Fixed an `InconsistentPath` issue with notebooks paired with scripts in a folder. The prefix in the Jupytext formats always use /, while paths might use either / or \\ ([#806](https://github.com/mwouts/jupytext/issues/806))\n- Tests that cannot succeed are skipped when either the Jupytext folder is not a git repository, when `sphinx-gallery` is too recent, or when `pandoc` is not up-to-date ([#814](https://github.com/mwouts/jupytext/issues/814))\n- Removed the mention of '--update' in 'jupytext --pipe' since outputs are preserved already\n\n\n1.11.3 (2021-06-10)\n-------------------\n\n**Changed**\n- Jupytext CLI has a new option `--use-source-timestamp` that sets the last modification time of the output file equal to that of the source file (this avoids having to change the timestamp of the source file) ([#784](https://github.com/mwouts/jupytext/issues/784))\n- In the pre-commit mode, Jupytext now uses the commit timestamp to determine which file in the pair is the most recent ([#780](https://github.com/mwouts/jupytext/issues/780))\n\n\n**Fixed**\n- Dependencies of the JupyterLab extension have been upgraded to fix a security vulnerability ([#798](https://github.com/mwouts/jupytext/pull/798))\n- The `--warn-only` option also applies to pipes. Use this if the pipe may fail, e.g. if you apply `black` on a possibly invalid script ([#781](https://github.com/mwouts/jupytext/issues/781))\n- Variables assigned from a magic command are commented out in `py` scripts ([#781](https://github.com/mwouts/jupytext/issues/781))\n- Fixed a round-trip issue on notebooks that have None/null in their metadata ([#792](https://github.com/mwouts/jupytext/issues/792))\n\n\n1.11.2 (2021-05-02)\n-------------------\n\n**Changed**\n- Jupytext's dependency markdown-it-py is now in v1 ([#769](https://github.com/mwouts/jupytext/issues/769))\n- The optional argument `fmt` in `jupytext.reads` now has the default value `None` - thanks to Yuvi Panda ([#763](https://github.com/mwouts/jupytext/issues/763))\n\n**Fixed**\n- All text files are opened with an explicit `utf-8` encoding ([#770](https://github.com/mwouts/jupytext/issues/770))\n- Previously `--pipe black` was not always putting two blank lines between functions. To fix that we load the internal Jupytext\n  cell metadata like `lines_to_next_cell` from the text file rather than ipynb ([#761](https://github.com/mwouts/jupytext/issues/761))\n- The timestamp of the source file is not updated any more when the destination file is not in the pair ([#765](https://github.com/mwouts/jupytext/issues/765), [#767](https://github.com/mwouts/jupytext/issues/767))\n\n**Added**\n- A new test documents when the `ipython3` pygment lexer appears in MyST Markdown files ([#759](https://github.com/mwouts/jupytext/issues/759))\n\n\n1.11.1 (2021-03-26)\n-------------------\n\n**Fixed**\n- Format options stored in the notebook itself are now taken into account (Fixes [#757](https://github.com/mwouts/jupytext/issues/757))\n\n\n1.11.0 (2021-03-18)\n-------------------\n\n**Fixed**\n- The `jupytext.toml` config file can now be used together with the `jupytext` pre-commit hook ([#752](https://github.com/mwouts/jupytext/issues/752))\n- The `notebook_extensions` option of the `jupytext.toml` file now works ([#746](https://github.com/mwouts/jupytext/issues/746))\n\n**Changed**\n- The options in `jupytext.toml` where renamed to match the `jupytext` metadata in the text notebooks. One should now use `formats` rather than `default_jupytext_formats` and `notebook_metadata_filter` rather than `default_notebook_metadata_filter` ([#753](https://github.com/mwouts/jupytext/issues/753))\n\n\n1.10.3 (2021-03-07)\n-------------------\n\n**Fixed**\n- We have updated `marked`, an indirect dependency of the `jupyterlab-jupytext` extension, to fix a moderate vulnerability ([#750](https://github.com/mwouts/jupytext/issues/750)).\n- We use non-random cell ids in the tests to avoid test failures due to duplicate cell ids ([#747](https://github.com/mwouts/jupytext/issues/747))\n\n\n1.10.2 (2021-02-17)\n-------------------\n\n**Fixed**\n- We have adjusted the `MANIFEST.in` file to exclude the `node_modules` but still include the JupyterLab extension that was missing in the `.tar.gz` (and conda) package in v1.10.1. Many thanks to Martin Renou for providing the fix at ([#741](https://github.com/mwouts/jupytext/issues/741))\n\n\n1.10.1 (2021-02-11)\n-------------------\n\n**Added**\n- The recursive glob pattern `**/*.ipynb` is now supported by Jupytext - Thanks to Banst for this contribution ([#731](https://github.com/mwouts/jupytext/issues/731))\n- Sage notebooks are supported. They can be converted to `.sage` and `.md` files and back. Thanks to Lars Franke for suggesting this! ([#727](https://github.com/mwouts/jupytext/issues/727))\n- Jupytext is also accessible with `python -m jupytext`. Thanks to Matthew Brett for his PR! ([#739](https://github.com/mwouts/jupytext/issues/739))\n\n**Changed**\n- We have tested Jupytext with the new cell ids introduced in `nbformat>=5.1.0`. Cell ids are preserved by the `--sync` and `--update` command. So we removed the constraint on the version of `nbformat` ([#735](https://github.com/mwouts/jupytext/issues/735)).\n\n**Fixed**\n- We filtered out the `node_modules` folder from the `.tar.gz` package for Jupytext ([#730](https://github.com/mwouts/jupytext/issues/730))\n\n\n1.10.0 (2021-02-04)\n-------------------\n\n**Added**\n- Jupytext has a pre-commit hook! Many thanks to John Paton and Aaron Gokaslan for making this happen ([#698](https://github.com/mwouts/jupytext/issues/698))\n- Jupytext CLI will not rewrite files that don't change ([#698](https://github.com/mwouts/jupytext/issues/698)).\n- If you want to see the diff for changed files, use the new `--diff` option ([#722](https://github.com/mwouts/jupytext/issues/722))\n- We have added `isort` and `autoflake8` to the `pre-commit` configuration file used for developing the Jupytext project ([#709](https://github.com/mwouts/jupytext/issues/709))\n- We made sure that `py:percent` scripts end with exactly one blank line ([#682](https://github.com/mwouts/jupytext/issues/682))\n- We checked that Jupytext works well with symbolic links to folders (not files!) ([#696](https://github.com/mwouts/jupytext/issues/696))\n\n**Changed**\n- Jupytext does not work properly with the new cell ids of the version 4.5 of `nbformat>=5.1.0` yet, so we added the requirement `nbformat<=5.0.8` ([#715](https://github.com/mwouts/jupytext/issues/715))\n- Jupytext will issue an informative error or warning on notebooks in a version of nbformat that is not known to be supported ([#681](https://github.com/mwouts/jupytext/issues/681), [#715](https://github.com/mwouts/jupytext/issues/715))\n\n**Fixed**\n- Code cells that contain triple backticks (or more) are now encapsulated with four backticks (or more) in the Markdown and MyST Markdown formats. The version number for the Markdown format was increased to 1.3, and the version number for the MyST Markdown format was increased to 0.13 ([#712](https://github.com/mwouts/jupytext/issues/712))\n- Indented magic commands are supported ([#694](https://github.com/mwouts/jupytext/issues/694))\n\n\n1.9.1 (2021-01-06)\n------------------\n\n**Fixed**\n- Include the lab extension that was missing in the conda package ([#703](https://github.com/mwouts/jupytext/pull/703)).\n\n\n1.9.0 (2021-01-05)\n------------------\n\n**Changed**\n- The Jupytext extension for JupyterLab is compatible with JupyterLab 3.0, thanks to Martin Renou's awesome contribution ([#683](https://github.com/mwouts/jupytext/pull/683)).\n\n\n1.8.2 (2021-01-04)\n------------------\n\n**Changed**\n- Jupytext 1.8.2 depends on `python>=3.6`. The last version of Jupytext explicitly tested with Python 2.7 and 3.5 was Jupytext 1.7.1 ([#697](https://github.com/mwouts/jupytext/issues/697)).\n\n\n1.8.1 (2021-01-03)\n------------------\n\n**Changed**\n- The dependency on `markdown-it-py` is conditional on `python>=3.6` ([#697](https://github.com/mwouts/jupytext/issues/697))\n\n\n1.8.0 (2020-12-22)\n------------------\n\n**Changed**\n- Removed support for Python 2.7 and 3.5, a preliminary step towards a JupyterLab 3.0-compatible extension ([#683](https://github.com/mwouts/jupytext/issues/683))\n- The MyST Markdown format uses `markdown-it-py~=0.6.0` ([#692](https://github.com/mwouts/jupytext/issues/692))\n\n\n1.7.1 (2020-11-16)\n------------------\n\n**Fixed**\n- Text notebooks have the same format and mimetype as ipynb notebooks. This fixes the _File Load Error - content.indexOf is not a function_ error on text notebooks ([#659](https://github.com/mwouts/jupytext/issues/659))\n\n\n1.7.0 (2020-11-14)\n------------------\n\n**Changed**\n- Jupytext's contents manager uses the parent CM's `get` and `save` methods to read and save text files, and explicitly calls `jupytext.reads` and `jupytext.writes` to do the conversion. We don't use `mock` nor internal parent methods any more. Thanks to Max Klein for helping making this work! ([#634](https://github.com/mwouts/jupytext/issues/634), [#635](https://github.com/mwouts/jupytext/issues/635))\n- Thanks to the above, Jupytext can work on top of contents manager that don't derive from `FileContentsManager`, and in particular it works with `jupyterfs` ([#618](https://github.com/mwouts/jupytext/issues/618))\n- The documentation was reorganized. `README.md` was simplified and now includes many links to the documentation.\n- The documentation now uses `myst_parser` rather than `recommonmark`. And we use `conda` on RTD ([#650](https://github.com/mwouts/jupytext/issues/650), [#652](https://github.com/mwouts/jupytext/issues/652))\n- The `readf` and `writef` functions were dropped (they had been deprecated in favor of `read` and `write` in June 2019, v1.2.0)\n- The description & dependencies of the JupyterLab extension were updated ([#654](https://github.com/mwouts/jupytext/issues/654))\n- The `--set-kernel -` command, on a Python notebook, gives an explicit error when no kernel is not found that matches the current Python executable.\n- All the GitHub workflow files were concatenated into a unique file, and we have added an `pypi-publish` step to automatically publish the package on PyPi when new releases are created.\n- The `CHANGELOG.md` file was moved under `docs` to better expose the history of changes.\n\n**Added**\n- Configuration errors are reported in the console and/or in Jupyter ([#613](https://github.com/mwouts/jupytext/issues/613))\n- Jupytext's Contents Manager internal errors are logged on the console, and trigger an HTTP Error 500 ([#638](https://github.com/mwouts/jupytext/issues/638))\n- The GitHub actions run on both push events and pull requests, and duplicate jobs are skipped ([#605](https://github.com/mwouts/jupytext/issues/605))\n- Jupytext has a `tox.ini` file, thanks to Chris Sewell ([#605](https://github.com/mwouts/jupytext/issues/605))\n- Jupytext is tested against Python 3.9\n- The `execution` cell metadata is now filtered by default ([#656](https://github.com/mwouts/jupytext/issues/656))\n\n**Fixed**\n- Optional dependency on `sphinx-gallery` frozen to version `~=0.7.0` ([#614](https://github.com/mwouts/jupytext/issues/614))\n- Codecov/patch reports should be OK now ([#639](https://github.com/mwouts/jupytext/issues/639))\n- Jupytext tests work on non-English locales ([#636](https://github.com/mwouts/jupytext/issues/636))\n- Cell metadata that are already present in text notebook can be filtered out using a config file ([#656](https://github.com/mwouts/jupytext/issues/656))\n- Optional cell attributes like attachments are preserved ([#671](https://github.com/mwouts/jupytext/issues/671))\n\n\n1.6.0 (2020-09-01)\n------------------\n\n**Added**\n- New option `hide_notebook_metadata` to encapsulate the notebook metadata in an HTML comment ([#527](https://github.com/mwouts/jupytext/issues/527))\n- New option `root_level_metadata_as_raw_cell`. Set it to `False` if you don't want to see root level metadata\nof R Markdown notebooks as a raw cell in Jupyter ([#415](https://github.com/mwouts/jupytext/issues/415))\n- New option `doxygen_equation_markers` to translate Markdown equations into Doxygen equations ([#517](https://github.com/mwouts/jupytext/issues/517))\n- New option `custom_cell_magics` to comment out cells starting with user-specific cell magics ([#513](https://github.com/mwouts/jupytext/issues/513))\n- Documented how to use `isort` on notebooks ([#553](https://github.com/mwouts/jupytext/issues/553))\n- `jupytext notebook.ipynb --to filename.py` will warn that `--to` is used in place of `--output`.\n- `jupytext --set-formats filename.py` will suggest to use `--sync` instead of `--set-formats` ([#544](https://github.com/mwouts/jupytext/issues/544))\n- Warn if 'Include Metadata' is off when saving text files in Jupyter ([#561](https://github.com/mwouts/jupytext/issues/561))\n- Test that notebooks paired through a configuration file are left unmodified ([#598](https://github.com/mwouts/jupytext/issues/598))\n- Test that metadata filters in the configuration files are taken into account when using `jupytext --to` ([#543](https://github.com/mwouts/jupytext/issues/543))\n- New argument `--run-path` to execute the notebooks at the desired location ([#595](https://github.com/mwouts/jupytext/issues/595))\n- Activated GitHub code scanning alerts\n\n**Changed**\n- Jupytext now depends on `markdown-it-py` (Python 3.6 and above) and always features the MyST-Markdown format,\nthanks to Chris Sewell ([#591](https://github.com/mwouts/jupytext/issues/591))\n- The `md:myst` and `md:pandoc` are always included in the Jupytext formats, and an informative runtime\nerror will occur if the required dependencies, resp. `markdown-it-py` and `pandoc`, are not installed. ([#556](https://github.com/mwouts/jupytext/issues/556))\n- The `# %%` cell marker has the same indentation as the first line in the cell ([#562](https://github.com/mwouts/jupytext/issues/562))\n- Jupytext is now installed from source on MyBinder to avoid cache issues ([#567](https://github.com/mwouts/jupytext/issues/567))\n- The tests that execute a notebook are now skipped on Windows to avoid timeout issues ([#489](https://github.com/mwouts/jupytext/issues/489))\n\n**Fixed**\n- Only scripts can have an encoding comment, not Markdown or R Markdown files ([#576](https://github.com/mwouts/jupytext/issues/576))\n- Spaces in `--pipe` commands are supported ([#562](https://github.com/mwouts/jupytext/issues/562))\n- Bash commands starting with special characters are now correctly detected, thanks to Aaron Gokaslan ([#587](https://github.com/mwouts/jupytext/issues/587))\n- MyST Markdown files are recognized as such even if MyST-Markdown is not available ([#556](https://github.com/mwouts/jupytext/issues/556))\n- Build JupyterLab with `dev-build=False` and `minimize=False` on mybinder to avoid build errors\n- Configured coverage targets in `codecov.yml`\n\n\n1.5.2 (2020-07-21)\n------------------\n\n**Changed**\n- The documentation uses the Alabaster theme\n\n**Fixed**\n- Preserve indentation when commenting out magic commands ([#437](https://github.com/mwouts/jupytext/issues/437))\n- Fixed MyBinder - `jupytext.py` is not a configuration file ([#559](https://github.com/mwouts/jupytext/issues/559), [#567](https://github.com/mwouts/jupytext/issues/567))\n\n\n1.5.1 (2020-07-05)\n------------------\n\n**Fixed**\n- Added `toml` as a dependency ([#552](https://github.com/mwouts/jupytext/issues/552)).\n- Filtered out `__pycache__` and `.pyc` files from the pip package.\n- Fixed coverage upload by adding `coverage` as a dependency to the conda CI workflow.\n- Fixed the conda CI / Python 2.7 job by explicitly installing `backports.functools_lru_cache` ([#554](https://github.com/mwouts/jupytext/issues/554)).\n\n\n1.5.0 (2020-06-07)\n------------------\n\n**Added**\n- Jupytext can use a local or global [configuration file](https://github.com/mwouts/jupytext/blob/main/docs/config.md) ([#508](https://github.com/mwouts/jupytext/issues/508))\n- Jupytext can pair notebooks in trees. Use e.g. `notebooks///ipynb,scripts///py:percent` if you want to replicate the tree of notebooks under `notebooks` in a folder named `scripts` ([#424](https://github.com/mwouts/jupytext/issues/424))\n- The extension for Jupyter Notebook has a _New Text Notebook_ menu that creates text-only notebooks ([#443](https://github.com/mwouts/jupytext/issues/443))\n- Groovy and Java are now supported, thanks to Przemek Wesołek ([#500](https://github.com/mwouts/jupytext/issues/500))\n- The Coconut language is also supported, thanks to Thurston Sexton ([#532](https://github.com/mwouts/jupytext/issues/532))\n- Resource files with `.resource` extension from the Robot Framework are supported, thanks to Hiski Valli ([#535](https://github.com/mwouts/jupytext/issues/535))\n- Jupytext is tested in `pip` and `conda` environments, on Linux, Mac OS and Windows, using Github actions ([#487](https://github.com/mwouts/jupytext/issues/487))\n- Jupytext uses pre-commit checks and automatic reformatting with `pre-commit`, `black` and `flake8` ([#483](https://github.com/mwouts/jupytext/issues/483))\n- Documentation improvements:\n  - Mention that the YAML header can be created with either `--set-kernel`, `--set-formats`, or both ([#485](https://github.com/mwouts/jupytext/issues/485))\n  - Mention that one should use double quotes, not single quotes, around `jupytext --check` commands like `\"pytest {}\"` on Windows ([#475](https://github.com/mwouts/jupytext/issues/475))\n  - Improved error message when a file is in a version that can't be read by Jupytext ([#531](https://github.com/mwouts/jupytext/issues/531))\n\n**Fixed**\n- Skip the `jupytext --execute` tests when the warning _Timeout waiting for IOPub output_ occurs, which is the case intermittently on Windows ([#489](https://github.com/mwouts/jupytext/issues/489))\n- Fixed wrong paired paths when syncing with the --pre-commit flag ([#506](https://github.com/mwouts/jupytext/issues/506))\n\n\n1.4.2 (2020-04-05)\n------------------\n\n**Added**\n- Added an example with custom notebook metadata ([#469](https://github.com/mwouts/jupytext/issues/469))\n- Added an example with custom cell tags ([#478](https://github.com/mwouts/jupytext/issues/478))\n\n**Changed**\n- The outputs from the `.ipynb` file are matched with the input cells from the text file with less strict rules. In this version, a search and replace on the text file will not remove the outputs any more ([#464](https://github.com/mwouts/jupytext/issues/464)).\n- Update parsing of myst notebooks to new (markdown-it based) parser (please upgrade to `myst-parser` to version `~0.8`) ([#473](https://github.com/mwouts/jupytext/issues/473))\n- Use `os.path.samefile` when searching for the kernel that corresponds to the current environment (`--set-kernel -`)\n\n**Fixed**\n- Fixed the CLI example for not commenting out magic commands: `--opt comment_magics=false`. In addition, most of the `jupytext` commands in `using-cli.md` are now tested! ([#465](https://github.com/mwouts/jupytext/issues/465))\n- `jupytext.read` and `jupytext.write` now give more meaningful errors when the format information is incorrect ([#462](https://github.com/mwouts/jupytext/issues/462))\n- Multiline comments starting or ending with quadruple quotes should not cause issues anymore ([#460](https://github.com/mwouts/jupytext/issues/460))\n- Fixed active cells in the py:percent format ([#477](https://github.com/mwouts/jupytext/issues/477))\n\n1.4.1 (2020-03-19)\n------------------\n\n**Added**\n- Script of script (SoS) notebooks are now supported. Thanks to Thomas Pernet-coudrier for contributing the sample notebook ([#453](https://github.com/mwouts/jupytext/issues/453)).\n- New MyST Markdown format (`md:myst`), developed by the [ExecutableBookProject](https://github.com/ExecutableBookProject) team. Read more about the MyST Markdown format in the [documentation](https://jupytext.readthedocs.io/en/latest/formats.html#myst-markdown). And many thanks to Chris Sewell for contributing the actual implementation! ([#447](https://github.com/mwouts/jupytext/issues/447) [#456](https://github.com/mwouts/jupytext/issues/456) [#458](https://github.com/mwouts/jupytext/issues/458))\n\n**Fixed**\n- When using `jupytext --pipe cmd`, the output of `cmd` should not appear in the terminal ([#432](https://github.com/mwouts/jupytext/issues/432))\n\n\n1.4.0 (2020-03-09)\n------------------\n\n**Changed**\n- The new jupyterlab extension (in version 1.2.0) is compatible with JupyterLab 2.0. Many thanks to Jean Helie! ([#449](https://github.com/mwouts/jupytext/issues/449))\n- It is not compatible with JupyterLab 1.x anymore. If you wish, you can install manually the previous version of the extension with `jupyter labextension install jupyterlab-jupytext@1.1.1`.\n\n**Fixed**\n- Display the output/errors of command executed with `jupytext --pipe` or `jupytext --check` ([#432](https://github.com/mwouts/jupytext/issues/432))\n\n1.3.5 (2020-03-08)\n------------------\n\n**Fixed**\n- Removed leading slash in notebook paths ([#444](https://github.com/mwouts/jupytext/issues/444))\n- Fixed `jupytext --set-formats` when using formats with prefix and/or suffix ([#450](https://github.com/mwouts/jupytext/issues/450))\n\n\n1.3.4 (2020-02-18)\n------------------\n\n**Added**\n- C# and F# Jupyter notebooks are now supported ([#427](https://github.com/mwouts/jupytext/issues/427), [#429](https://github.com/mwouts/jupytext/issues/429))\n\n**Fixed**\n- `jupytext --to script *.ipynb` now computes the script extension for each notebook ([#428](https://github.com/mwouts/jupytext/issues/428))\n- Fix shebang handling for languages with non-# comments, by Jonas Bushart ([#434](https://github.com/mwouts/jupytext/issues/434))\n- Indented bash commands are now commented out ([#437](https://github.com/mwouts/jupytext/issues/437))\n- The main formats are documented in `jupytext --help` ([#426](https://github.com/mwouts/jupytext/issues/426), [#433](https://github.com/mwouts/jupytext/issues/433))\n\n\n1.3.3 (2020-01-27)\n------------------\n\n**Added**\n- Jupytext has a logo! Many thanks to Kyle Kelley for contributing the actual logo ([#423](https://github.com/mwouts/jupytext/issues/423)), and to Chris Holdgraf for suggesting this ([#260](https://github.com/mwouts/jupytext/issues/260)).\n- Nested metadata filtering is now supported! You can use this to rid of `jupytext_version` if you wish ([#416](https://github.com/mwouts/jupytext/issues/416)).\n\n**Fixed**\n- Code cells in the Markdown format can contain triple backticks inside multiline strings ([#419](https://github.com/mwouts/jupytext/issues/419)).\n- Changes in the YAML header when running `jupytext --test` on text files are ignored ([#414](https://github.com/mwouts/jupytext/issues/414)).\n\n1.3.2 (2020-01-08)\n------------------\n\n**Fixed**\n- The `--pre-commit` mode now ignores non-notebook files in the index ([#338](https://github.com/mwouts/jupytext/issues/338)).\n- `nbformat_minor` is taken from the notebook with outputs When inputs and outputs are merged.\n\n1.3.1 (2019-12-26)\n------------------\n\n**Added**\n- New `nomarker` format in the Jupyter Notebook and JupyterLab extensions ([#397](https://github.com/mwouts/jupytext/issues/397))\n\n**Changed**\n- The `normarker` format replaces the one previously named `bare`.\n\n**Fixed**\n- Multiline strings are now accepted in the YAML header ([#404](https://github.com/mwouts/jupytext/issues/404)). Fix contributed by ZHUO Qiang ([#405](https://github.com/mwouts/jupytext/issues/405)).\n- Fixed the instructions on how to use multiline comments for all Markdown cells in the py:percent format, by ZHUO Qiang  ([#403](https://github.com/mwouts/jupytext/issues/403)).\n- Added `cd` to the list of magic commands.\n- Do not read paired files when `--set-formats` is being used (fixes [#399](https://github.com/mwouts/jupytext/issues/399)).\n\n1.3.0 (2019-11-23)\n------------------\n\nSee also [What's new in Jupytext 1.3?](https://gist.github.com/mwouts/724efe5e00654fc2145a4c916796e071)\n\n**Added**\n\n- Pairing a notebook to both `.md` and `.py` is now supported. Input cells are loaded from the most recent text representation ([#290](https://github.com/mwouts/jupytext/issues/290))\n- Both the Jupyter Notebook and the JupyterLab extension for Jupytext were updated ([#290](https://github.com/mwouts/jupytext/issues/290))\n- Raw cells are now encoded using HTML comments (`<!-- #raw -->` and `<!-- #endraw -->`) in Markdown files ([#321](https://github.com/mwouts/jupytext/issues/321))\n- Markdown cells can be delimited with any of `<!-- #region -->`,  `<!-- #markdown -->` or `<!-- #md -->` ([#344](https://github.com/mwouts/jupytext/issues/344))\n- Code blocks from Markdown files, when they don't have an explicit language, appear in Markdown cells in Jupyter ([#321](https://github.com/mwouts/jupytext/issues/321))\n- Code blocks with an explicit language and a `.noeval` attribute are inactive in Jupyter ([#347](https://github.com/mwouts/jupytext/issues/347))\n- Markdown and raw cells can be quoted with triple quotes in the `py:percent` format. And Markdown cells can start with just `# %% [md]` ([#305](https://github.com/mwouts/jupytext/issues/305))\n- The light format uses `# + [markdown]` rather than the previous `cell_type` metadata to identify markdown cells with metadata ([#356](https://github.com/mwouts/jupytext/issues/356))\n- Explicit Markdown cells in the light format `# + [markdown]` can use triple quotes ([#356](https://github.com/mwouts/jupytext/issues/356))\n- IPython magic help commands like `float?` are classified as magics, and thus commented in Python scripts ([#297](https://github.com/mwouts/jupytext/issues/297))\n- Cell metadata can be encoded as either `key=value` (the new default) or in JSON. An automatic option `cell_metadata_json` should help minimize the impact on existing files ([#344](https://github.com/mwouts/jupytext/issues/344))\n- R Markdown hidden inputs, outputs, or cells are now mapped to the corresponding Jupyter Book tags by default ([#337](https://github.com/mwouts/jupytext/issues/337))\n- The notebook metadata filter is automatically updated when extra keys are added to the YAML header ([#376](https://github.com/mwouts/jupytext/issues/376))\n- The Jupyter Notebook extension for Jupytext is compatible with Jupyter Notebook 6.0 ([#346](https://github.com/mwouts/jupytext/issues/346))\n- `jupytext notebook.py --to ipynb` updates the timestamp of `notebook.py` so that the paired notebook still works in Jupyter ([#335](https://github.com/mwouts/jupytext/issues/335), [#254](https://github.com/mwouts/jupytext/issues/254))\n- `jupytext --check pytest notebook.ipynb` can be used to run test functions in a notebook ([#286](https://github.com/mwouts/jupytext/issues/286))\n- `jupytext --check` and `jupytext --pipe` can run commands that only operate on files: when `{}` is found in the text of the command, `jupytext` saves the text representation of the notebook in a temp file, and replaces `{}` with the name of that file before executing the command. ([#286](https://github.com/mwouts/jupytext/issues/286))\n- Documented how to sync notebooks in a pre-commit hook ([#338](https://github.com/mwouts/jupytext/issues/338))\n- Added support for Rust/Evxcr, by Jonas Bushart ([#351](https://github.com/mwouts/jupytext/issues/351))\n- Added support for [Robot Framework](https://robots-from-jupyter.github.io/), by Asko Soukka ([#378](https://github.com/mwouts/jupytext/issues/378))\n- Added support for PowerShell ([#349](https://github.com/mwouts/jupytext/issues/349))\n\n**Changed**\n\n- Use `CHANGELOG.md` rather than `HISTORY.rst`\n\n**Fixed**\n\n- Commands like `cat = x` are not magic commands, so they are not commented any more ([#339](https://github.com/mwouts/jupytext/issues/339))\n- Fixed an inconsistent round trip (code cell with `\"cat\"` being converted to a markdown cell) in the `py:light` format ([#339](https://github.com/mwouts/jupytext/issues/339))\n- `jupytext --test textfile.ext` now really compares the text file to its round trip (rather than the corresponding notebook) ([#339](https://github.com/mwouts/jupytext/issues/339))\n- Markdown cells that contain code are now preserved in a round trip through the Markdown and R Markdown formats ([#361](https://github.com/mwouts/jupytext/issues/361))\n- Code cells with a `%%python3` cell magic are now preserved in a round trip through the Markdown format ([#365](https://github.com/mwouts/jupytext/issues/365))\n- `jupytext --execute` runs the notebook in its folder ([#382](https://github.com/mwouts/jupytext/issues/382))\n- Strings in the metadata of code cells are quoted in the Rmd representation. And we escape R code in chunk options with `#R_CODE#` ([#383](https://github.com/mwouts/jupytext/issues/383))\n\n1.2.4 (2019-09-19)\n------------------\n\n**Added**\n\n- The documentation includes a mention on how to set metadata filters at the command line ([#330](https://github.com/mwouts/jupytext/issues/330))\n- Jupytext will not catch any error when the flag `--warn-only` is not set ([#327](https://github.com/mwouts/jupytext/issues/327))\n\n**Fixed**\n\n- Now the flag `--warn-only` catches every possible error ([#263](https://github.com/mwouts/jupytext/issues/263))\n- `.md` and `.markdown` files are treated identically ([#325](https://github.com/mwouts/jupytext/issues/325))\n- Fixed `--set-kernel` when using pipes ([#326](https://github.com/mwouts/jupytext/issues/326))\n- Fixed utf-8 encoding on stdout on Python 2 ([#331](https://github.com/mwouts/jupytext/issues/331))\n\n\n1.2.3 (2019-09-02)\n------------------\n\n**Fixed**\n\n- Dependency on `setuptools` in `pandoc.py` made optional to fix the build of the conda package ([#310](https://github.com/mwouts/jupytext/issues/310), [#323](https://github.com/mwouts/jupytext/issues/323))\n\n\n1.2.2 (2019-09-01)\n------------------\n\n**Added**\n\n- Documentation includes a section on how to use Jupytext as a Python library ([#317](https://github.com/mwouts/jupytext/issues/317))\n- Mention of the server extension in the documentation ([#304](https://github.com/mwouts/jupytext/issues/304))\n- Text notebooks can be tested with `jupytext --execute notebook.md` ([#303](https://github.com/mwouts/jupytext/issues/303))\n- The default value of `as_version` in `jupytext.read` is `nbformat.NO_CONVERT`, as for `nbformat.read`\n- Jupytext tests are now included in sdist ([#310](https://github.com/mwouts/jupytext/issues/310))\n\n**Fixed**\n\n- Fixed the usability of the `fmt` argument in `jupytext.read` ([#312](https://github.com/mwouts/jupytext/issues/312))\n- Fixed the download notebook error when `c.notebook_extensions` has a custom value ([#318](https://github.com/mwouts/jupytext/issues/318))\n- String delimiters in commented text are now ignored ([#307](https://github.com/mwouts/jupytext/issues/307))\n\n\n1.2.1 (2019-07-20)\n------------------\n\n**Added**\n\n- Added documentation on how to use Jupytext with JupyterLab 0.35 ([#299](https://github.com/mwouts/jupytext/issues/299))\n- and on using Jupytext with the pre-commit package manager ([#292](https://github.com/mwouts/jupytext/issues/292))\n- The `read` and `write` functions are easier to use ([#292](https://github.com/mwouts/jupytext/issues/292))\n\n**Fixed**\n\n- Jupytext now ships the `jupyterlab-jupytext` extension in version 1.0.2. The version 1.0.1 erroneously introduces a `target_formats` metadata in the jupytext section, instead of `formats`, and works only after two clicks.\n\n\n1.2.0 (2019-07-18)\n------------------\n\n**Added**\n\n- New `--execute` option in Jupytext CLI ([#231](https://github.com/mwouts/jupytext/issues/231))\n- The `--set-formats` option in Jupytext CLI also triggers `--sync`, allowing shorter commands.\n- `jupytext`'s `read` and `write` functions can be used as drop-in replacements for `nbformat`'s ones ([#262](https://github.com/mwouts/jupytext/issues/262)).\n- `jupytext --sync` will now skip unpaired notebooks ([#281](https://github.com/mwouts/jupytext/issues/281)).\n- The JupyterLab extension was updated. It now works on text files ([#213](https://github.com/mwouts/jupytext/issues/213)) and has a new option to include\n(or not) the metadata in the text representation of the notebook.\n- Jupytext's contents manager class is derived dynamically from the default CM class for compatibility with\n`jupyter_server` ([#270](https://github.com/mwouts/jupytext/issues/270))\n- Removed dependency on `mock` and `testfixtures`, thanks to Jean-Sebastien Dieu ([#279](https://github.com/mwouts/jupytext/issues/279))\n- Added support for `.markdown` extension ([#288](https://github.com/mwouts/jupytext/issues/288))\n\n**Fixed**\n\n- The `jupyterlab-jupytext` extension shipped with the python package is in version 1.0.1, and is compatible only\nwith JupyterLab >= 1.0. If you use an earlier version of JupyterLab, please install the version 0.19 of the extension\nwith `jupyter labextension install jupyterlab-jupytext@0.19` ([#276](https://github.com/mwouts/jupytext/issues/276), [#278](https://github.com/mwouts/jupytext/issues/278))\n- Text files can be unpaired ([#289](https://github.com/mwouts/jupytext/issues/289))\n\n\n1.1.7 (2019-06-23)\n------------------\n\n**Added**\n\n- Added support for Scala notebook, by Tobias Frischholz ([#253](https://github.com/mwouts/jupytext/issues/253))\n- Added a getting started notebook for jupytext (and Binder), by Chris Holdgraf ([#257](https://github.com/mwouts/jupytext/issues/257))\n- The Markdown and R Markdown representations are now tested for all the languages\n- The Jupytext notebook extension also works when the notebook is a text file ([#213](https://github.com/mwouts/jupytext/issues/213))\n\n\n**Fixed**\n\n- The Jupytext Menu in Jupyter Notebook is now compatible with `jupyter_nbextensions_configurator` ([#178](https://github.com/mwouts/jupytext/issues/178))\n- Entries in the Jupytext menu are updated when the menu is hovered on ([#248](https://github.com/mwouts/jupytext/issues/248))\n- Fixed link to `.md` files in the documentation ([#255](https://github.com/mwouts/jupytext/issues/255))\n\n\n1.1.6 (2019-06-11)\n------------------\n\n**Added**\n\n- Jupytext now supports Javascript and Typescript, thanks to Hatem Hosny ([#250](https://github.com/mwouts/jupytext/issues/250))\n- Jupytext works with Python 3.8 as well\n\n**Fixed**\n\n- Fix global `auto` pairing ([#249](https://github.com/mwouts/jupytext/issues/249))\n\n\n1.1.5 (2019-06-06)\n------------------\n\n**Fixed**\n\n- Fixed implicit dependency on `jupyter_client` ([#245](https://github.com/mwouts/jupytext/issues/245))\n\n\n1.1.4 (2019-06-05)\n------------------\n\n**Added**\n\n- New argument `--set-kernel` in Jupytext command line ([#230](https://github.com/mwouts/jupytext/issues/230))\n- Jupytext now accepts `--to script` or `--to auto` ([#240](https://github.com/mwouts/jupytext/issues/240))\n- Jupytext now has a real Sphinx documentation on [readthedocs](https://jupytext.readthedocs.io/en/latest), thanks to Chris Holdgraf ([#237](https://github.com/mwouts/jupytext/issues/237))\n\n**Fixed**\n\n- Invalid notebooks may cause a warning, but not a fatal error ([#234](https://github.com/mwouts/jupytext/issues/234))\n- Jupyter server extension leaves the contents manager unchanged if it is a sub-class of Jupytext's CM ([#236](https://github.com/mwouts/jupytext/issues/236))\n- Fixed format inference when metadata is present but not format information ([#239](https://github.com/mwouts/jupytext/issues/239))\n- Preserve executable and encoding information in scripts with metadata ([#241](https://github.com/mwouts/jupytext/issues/241))\n\n1.1.3 (2019-05-22)\n------------------\n\n**Added**\n\n- Support for IDL notebooks and .pro scripts ([#232](https://github.com/mwouts/jupytext/issues/232))\n\n\n1.1.2 (2019-05-16)\n------------------\n\n**Added**\n\n- Jupytext's content manager has a new `notebook_extensions` option ([#224](https://github.com/mwouts/jupytext/issues/224), [#183](https://github.com/mwouts/jupytext/issues/183))\n- Cells can be made inactive in scripts with the `active-ipynb` cell tag ([#226](https://github.com/mwouts/jupytext/issues/226))\n\n**Fixed**\n\n- Directories ending in .jl (or .ipynb) are not notebooks ([#228](https://github.com/mwouts/jupytext/issues/228))\n- Empty notebooks have no language ([#227](https://github.com/mwouts/jupytext/issues/227))\n\n\n1.1.1 (2019-04-16)\n------------------\n\n**Added**\n\n- Jupytext server extension leaves the contents manager unchanged when it is already a subclass of TextFileContentsManager ([#218](https://github.com/mwouts/jupytext/issues/218))\n- The base class for TextFileContentsManager defaults to FileContentsManager when LargeFileManager is not available ([#217](https://github.com/mwouts/jupytext/issues/217))\n\n\n1.1.0 (2019-04-14)\n------------------\n\n**Added**\n\n- Markdown and R Markdown formats now support metadata ([#66](https://github.com/mwouts/jupytext/issues/66), [#111](https://github.com/mwouts/jupytext/issues/111), [#188](https://github.com/mwouts/jupytext/issues/188))\n- The `light` format for Scripts can use custom cell markers, e.g. Vim or VScode/PyCharm folding markers ([#199](https://github.com/mwouts/jupytext/issues/199))\n- Pandoc's Markdown format for Jupyter notebooks is available in Jupytext as `md:pandoc` ([#208](https://github.com/mwouts/jupytext/issues/208))\n\n**Fixed**\n\n- Jupytext's contents manager is now based on `LargeFileManager` to allow large file uploads ([#210](https://github.com/mwouts/jupytext/issues/210))\n- YAML header parsed with yaml.safe_load rather than yaml.load ([#215](https://github.com/mwouts/jupytext/issues/215))\n- IPython line magic can be split across lines ([#209](https://github.com/mwouts/jupytext/issues/209))\n- `jupytext --to py` rather than `--to python` in the README ([#216](https://github.com/mwouts/jupytext/issues/216))\n\n\n1.0.5 (2019-03-26)\n------------------\n\n**Fixed**\n\n- Fix the error 'notebook file has changed on disk' when saving large notebooks ([#207](https://github.com/mwouts/jupytext/issues/207))\n\n\n1.0.4 (2019-03-20)\n------------------\n\n**Added**\n\n- Wildcard are now supported on Windows ([#202](https://github.com/mwouts/jupytext/issues/202))\n- Trusted notebooks remain trusted when inputs cells are modified ([#203](https://github.com/mwouts/jupytext/issues/203))\n\n**Fixed**\n\n- Pre-commit mode adds the result of conversion to the commit ([#200](https://github.com/mwouts/jupytext/issues/200))\n\n\n1.0.3 (2019-03-13)\n------------------\n\n**Added**\n\n- Matlab and Octave notebooks and scripts are now supported ([#197](https://github.com/mwouts/jupytext/issues/197))\n\n**Fixed**\n\n- `notebook_metadata_filter = \"all\"` now works ([#196](https://github.com/mwouts/jupytext/issues/196))\n- Default pairing in subfolders fixed in JupyterLab ([#180](https://github.com/mwouts/jupytext/issues/180))\n\n\n1.0.2 (2019-02-27)\n------------------\n\n**Added**\n\n- Rename notebooks in pairs in the tree view ([#190](https://github.com/mwouts/jupytext/issues/190))\n- Associate `.scm` file extension with Scheme scripts ([#192](https://github.com/mwouts/jupytext/issues/192))\n- Added support for Clojure, by bzinberg ([#193](https://github.com/mwouts/jupytext/issues/193))\n\n**Fixed**\n\n- Allow spaces between `?` or `!` and python or bash command ([#189](https://github.com/mwouts/jupytext/issues/189))\n\n\n1.0.1 (2019-02-23)\n------------------\n\n**Fixed**\n\n- Exclude tests in package deployment ([#184](https://github.com/mwouts/jupytext/issues/184))\n- Jupytext's serverextension only runs selected init steps ([#185](https://github.com/mwouts/jupytext/issues/185))\n- Added an additional test for magic arguments ([#111](https://github.com/mwouts/jupytext/issues/111))\n\n1.0.0 (2019-02-19)\n------------------\n\n**Added**\n\n- Jupytext now includes a Jupyter Notebook extension and a JupyterLab extension ([#86](https://github.com/mwouts/jupytext/issues/86)).\n- Jupytext command line has more arguments: `--paired-paths` to list the paths for the paired representations of the notebook, and `--sync` to synchronise the content of all paired paths based on the most recent file ([#146](https://github.com/mwouts/jupytext/issues/146)). In addition, the `--from` argument is optional even when the notebook is read from stdin ([#148](https://github.com/mwouts/jupytext/issues/148)).\n- The pairing information, and more generally the notebook metadata can be edited with the CLL, see the `--set-formats` and the `--update-metadata` arguments ([#141](https://github.com/mwouts/jupytext/issues/141)).\n- Jupytext can `--pipe` the text representation of a notebook to external programs like `black` or `flake8` ([#154](https://github.com/mwouts/jupytext/issues/154), [#142](https://github.com/mwouts/jupytext/issues/142))\n- The Python representation of notebooks containing PEP8 cells is now expected to be PEP8 compliant ([#154](https://github.com/mwouts/jupytext/issues/154)).\n- Format specification allow prefix and suffix for path and file name ([#138](https://github.com/mwouts/jupytext/issues/138), [#142](https://github.com/mwouts/jupytext/issues/142)). Use `ipynb,prefix/suffix.py:percent` to pair the current notebook named `notebook.ipynb` to a script named `prefixnotebooksuffix.py`. Suffix and prefix can also be configured on the `ipynb` file, with the same syntax.\n- Introducing a new `hydrogen` format for scripts, which derives from `percent`. In that format Jupyter magic commands are not commented ([#59](https://github.com/mwouts/jupytext/issues/59), [#126](https://github.com/mwouts/jupytext/issues/126), [#132](https://github.com/mwouts/jupytext/issues/132)).\n- Introducing a new `bare` format for scripts, which derives from `light`. That format has no cell marker. Use a notebook metadata filter `{\"jupytext\": {\"notebook_metadata_filter\":\"-all\"}}` if you want no YAML header ([#152](https://github.com/mwouts/jupytext/issues/152)).\n- The default format for R script is now `light`, as for the other languages.\n- Added support for q/kdb+ notebooks ([#161](https://github.com/mwouts/jupytext/issues/161)).\n- Python scripts or Markdown documents that have no Jupyter metadata receive a metadata filter that ensures that metadata is not exported back to the text representation ([#124](https://github.com/mwouts/jupytext/issues/124)).\n- Metadata filters are represented as strings rather than dictionaries to make YAML headers shorter. Previous syntax from [#105](https://github.com/mwouts/jupytext/issues/105) is still supported. They were also renamed to `notebook_metadata_filter` and `cell_metadata_filter`.\n- Markdown and RMarkdown formats have a new option `split_at_heading` to split Markdown cells at heading ([#130](https://github.com/mwouts/jupytext/issues/130))\n\n**Fixed**\n\n- Main language of scripts is inferred from script extension. Fixes a round trip conversion issue for Python notebooks with a Javascript cell.\n- Non-Python scripts opened as notebooks in Jupyter are now correctly saved even when no matching kernel is found.\n- Jupyter magic commands like `ls` are commented in the light and R markdown format ([#149](https://github.com/mwouts/jupytext/issues/149)).\n- Cell starting with `%%html`, `%%latex` are now commented out in the `light`, `percent` and `Rmd` formats ([#179](https://github.com/mwouts/jupytext/issues/179)).\n\n0.8.6 (2018-11-29)\n------------------\n\n**Added**\n\n- The `language_info` section is not part of the default header any more. Language information is now taken from metadata `kernelspec.language`. ([#105](https://github.com/mwouts/jupytext/issues/105)).\n- When opening a paired notebook, the active file is now the file that was originally opened ([#118](https://github.com/mwouts/jupytext/issues/118)). When saving a notebook, timestamps of all the alternative representations are tested to ensure that Jupyter's autosave does not override manual modifications.\n- Jupyter magic commands are now commented per default in the `percent` format ([#126](https://github.com/mwouts/jupytext/issues/126), [#132](https://github.com/mwouts/jupytext/issues/132)). Version for the `percent` format increases from '1.1' to '1.2'. Set an option `comment_magics` to `false` either per notebook, or globally on Jupytext's contents manager, or on `jupytext`'s command line, if you prefer not to comment Jupyter magics.\n- Jupytext command line has a pre-commit mode ([#121](https://github.com/mwouts/jupytext/issues/121)).\n\n\n0.8.5 (2018-11-13)\n------------------\n\n**Added**\n\n- `bash` scripts as notebooks ([#127](https://github.com/mwouts/jupytext/issues/127))\n- R scripts with `.r` extension are supported ([#122](https://github.com/mwouts/jupytext/issues/122))\n- Jupytext selects the first kernel that matches the language ([#120](https://github.com/mwouts/jupytext/issues/120))\n\n0.8.4 (2018-10-29)\n------------------\n\n**Added**\n\n- Notebook metadata is filtered - only the most common metadata are stored in the text representation ([#105](https://github.com/mwouts/jupytext/issues/105))\n- New config option `freeze_metadata` on the content manager and on the command line interface (defaults to `False`). Use this option to avoid creating a YAML header or cell metadata if there was none initially. ([#110](https://github.com/mwouts/jupytext/issues/110))\n- Language magic arguments are preserved in R Markdown, and also supported in `light` and `percent` scripts ([#111](https://github.com/mwouts/jupytext/issues/111), [#114](https://github.com/mwouts/jupytext/issues/114), [#115](https://github.com/mwouts/jupytext/issues/115))\n- First markdown cell exported as a docstring when using the Sphinx format ([#107](https://github.com/mwouts/jupytext/issues/107))\n\n0.8.3 (2018-10-19)\n------------------\n\n**Added**\n\n- Frozen cells are supported in R Markdown, light and percent scripts ([#101](https://github.com/mwouts/jupytext/issues/101))\n- Inactive cells extended to percent scripts ([#108](https://github.com/mwouts/jupytext/issues/108))\n- `jupytext` gains a `--version` argument ([#103](https://github.com/mwouts/jupytext/issues/103))\n- \"ExecuteTime\" cell metadata is not included in the text representation anymore ([#106](https://github.com/mwouts/jupytext/issues/106))\n\n\n0.8.2 (2018-10-15)\n------------------\n\n**Added**\n\n- Round trip conversion testing with `jupytext --test` was improved ([#99](https://github.com/mwouts/jupytext/issues/99))\n- Round trip conversion tested on Jake Vanderplas' Python for Data Science Handbook.\n\n**Fixed**\n\n- Nested lists and dictionaries are now supported in notebook metadata\n- Final empty code cell supported in Sphinx representation\n\n0.8.1 (2018-10-11)\n------------------\n\n**Fixed**\n\n- Sphinx format tested on `World population` notebook ([#97](https://github.com/mwouts/jupytext/issues/97))\n- Mirror test made stronger on this occasion!\n- Markdown representation recognize Julia, Scheme and C++ code cells as such\n- Light representation of Scheme and C++ notebooks fixed ([#61](https://github.com/mwouts/jupytext/issues/61))\n\n0.8.0 (2018-10-10)\n------------------\n\n**Added**\n\n- All `jupytext` related metadata goes to a `jupytext` section ([#91](https://github.com/mwouts/jupytext/issues/91)). Please make sure your collaborators use the same version of Jupytext, as the new version can read previous metadata, but not the opposite.\n- Notebooks extensions can be prefixed with any prefix of at most three chars ([#87](https://github.com/mwouts/jupytext/issues/87)).\n- Export of the same notebook to multiple formats is now supported. To export to all python formats, plus `.ipynb` and `.md`, use `\"jupytext\": {\"formats\": \"ipynb,pct.py:percent,lgt.py:light,spx.py:sphinx,md\"},`.\n- README includes a short section on how to extend `light` and `percent` formats to more languages ([#61](https://github.com/mwouts/jupytext/issues/61)).\n- Jupytext's contents manager accepts the `auto` extension in `default_jupytext_formats` ([#93](https://github.com/mwouts/jupytext/issues/93)).\n- All Jupyter magics are escaped in `light` scripts and R markdown documents. Escape magics in other formats with a `comment_magics` metadata (true or false), or with the contents manager `comment_magics` global flag ([#94](https://github.com/mwouts/jupytext/issues/94)).\n\n**Fixed**\n\n- Trusting notebooks made functional again.\n- Command line `jupytext` returns a meaningful error when no argument is given.\n- Fixed global pairing configuration ([#95](https://github.com/mwouts/jupytext/issues/95)).\n\n0.7.2 (2018-10-01)\n------------------\n\n**Added**\n\n- `light` and `percent` formats made available for scheme and cpp notebooks. Adding more formats is straightforward - just add a new entry to _SCRIPT_EXTENSIONS in languages.py, a sample notebook and a mirror test ([#61](https://github.com/mwouts/jupytext/issues/61))\n- Format name is automatically appended to extension in `jupytext_formats` when notebook is loaded/saved.\n\n**Fixed**\n\n- Notebooks extensions can only be prefixed with `.nb` ([#87](https://github.com/mwouts/jupytext/issues/87))\n\n\n0.7.1 (2018-09-24)\n------------------\n\n**Fixed**\n\n- Markdown cells header in sphinx gallery format may have a space between first # and following.\n\n0.7.0 (2018-09-23)\n------------------\n\n**Added**\n\n- Header for cells in `percent` format is more robust: use `[markdown]` and `[raw]` to identify cell types. Cell type comes after the cell title. ([#59](https://github.com/mwouts/jupytext/issues/59))\n- Jupytext can read and write notebooks as Hydrogen/VScode/Spyder/PyCharm compatible scripts (cells starting with `# %%`) ([#59](https://github.com/mwouts/jupytext/issues/59))\n- Jupytext can read and write notebooks as Sphinx-gallery compatible scripts ([#80](https://github.com/mwouts/jupytext/issues/80))\n- Metadata are supported for all cell types in light python and percent formats ([#66](https://github.com/mwouts/jupytext/issues/66)). Due to this, light python format version is now 1.3. Light python notebooks in versions 1.1 and 1.2 are still readable.\n- Command line `jupytext` has a `from` argument, and now accepts notebook from the standard input.\n\n**Fixed**\n\n- Fix merging of input and output notebooks ([#83](https://github.com/mwouts/jupytext/issues/83))\n- Removed extra new line on stdout in command line `jupytext` ([#84](https://github.com/mwouts/jupytext/issues/84))\n\n0.6.5 (2018-09-13)\n------------------\n\n**Added**\n\n- Code lines that start with a quotation mark in Jupyter are commented in the corresponding Python and Julia scripts ([#73](https://github.com/mwouts/jupytext/issues/73))\n- Update pypy, add flake8 tests on Travis CI ([#74](https://github.com/mwouts/jupytext/issues/74))\n\n**Fixed**\n\n- Import notebook.transutils before notebook.services.contents.filemanager ([#75](https://github.com/mwouts/jupytext/issues/75))\n\n0.6.4 (2018-09-12)\n------------------\n\n**Added**\n\n- Jupytext will not load paired notebook when text representation is out of date ([#63](https://github.com/mwouts/jupytext/issues/63))\n- Package tested against Python 3.7 ([#68](https://github.com/mwouts/jupytext/issues/68))\n\n**Fixed**\n\n- Allow unicode characters in notebook path ([#70](https://github.com/mwouts/jupytext/issues/70))\n- Read README.md as unicode in `setup.py` ([#71](https://github.com/mwouts/jupytext/issues/71))\n\n0.6.3 (2018-09-07)\n------------------\n\n**Added**\n\n- Lighter cell markers for Python and Julia scripts ([#57](https://github.com/mwouts/jupytext/issues/57)). Corresponding file format version at 1.2. Scripts in previous version 1.1 can still be opened.\n- New screenshots for the README.\n\n**Fixed**\n\n- Command line conversion tool `jupytext` fixed on Python 2.7 ([#46](https://github.com/mwouts/jupytext/issues/46))\n\n0.6.2 (2018-09-05)\n------------------\n\n**Added**\n\n- Initial support for Jupyter notebooks as Julia scripts ([#56](https://github.com/mwouts/jupytext/issues/56))\n- Command line conversion tool `jupytext` has explicit `to` and `output` options ([#46](https://github.com/mwouts/jupytext/issues/46))\n- Round trip test with `jupytext --test` improved ([#54](https://github.com/mwouts/jupytext/issues/54))\n- Improved README ([#51](https://github.com/mwouts/jupytext/issues/51))\n\n\n**Fixed**\n\n- testfixtures now in requirements ([#55](https://github.com/mwouts/jupytext/issues/55))\n- Empty code cells are now preserved ([#53](https://github.com/mwouts/jupytext/issues/53))\n\n0.6.1 (2018-08-31)\n------------------\n\n**Added**\n\n- Package and conversion script renamed from `nbrmd` to `jupytext`.\n\n0.6.0 (2018-08-31)\n------------------\n\n**Added**\n\n- Cell parsing and exporting done in two specialized classes. This is way easier to read. Pylint score at 9.9 !\n- Python file format updated to 1.1: default end of cell for python scripts is one blank space. Two blank spaces are allowed as well. Now you can reformat code in Python IDE without breaking notebook cells ([#38](https://github.com/mwouts/jupytext/issues/38)).\n- Added support for plain markdown files ([#40](https://github.com/mwouts/jupytext/issues/40), [#44](https://github.com/mwouts/jupytext/issues/44)).\n- Demonstration notebooks more user friendly ([#45](https://github.com/mwouts/jupytext/issues/45)).\n- Command line tool simpler to use ([#46](https://github.com/mwouts/jupytext/issues/46)).\n- Start code patterns present in Jupyter cells are escaped.\n- Default `nbrmd_format` is empty (mwouts/nbsrc/[#5](https://github.com/mwouts/jupytext/issues/5)): no Jupyter notebook is created on disk when the user opens a Python or R file and saves it from Jupyter, unless the users asks for it by setting `nbrmd_format`.\n\n**Fixed**\n\n- Fixed message in the `nbsrc` script ([#43](https://github.com/mwouts/jupytext/issues/43))\n- Technical metadata don't appear any more in scripts unless required ([#42](https://github.com/mwouts/jupytext/issues/42))\n- Code cells that are fully commented remain code cells after round trip ([#41](https://github.com/mwouts/jupytext/issues/41))\n\n0.5.4 (2018-08-24)\n------------------\n\n**Added**\n\n- R to Rmd conversion compares well to knitr::spin ([#26](https://github.com/mwouts/jupytext/issues/26))\n- Increased coverage to 98%\n\n\n0.5.3 (2018-08-22)\n------------------\n\n**Fixed**\n\n- Read and write version to the same metadata ([#36](https://github.com/mwouts/jupytext/issues/36))\n\n\n0.5.2 (2018-08-22)\n------------------\n\n**Added**\n\n- Classical jupyter extensions (autoreload, rmagics) are also escaped ([#35](https://github.com/mwouts/jupytext/issues/35))\n- Explicit file format version, set at 1.0, to avoid overriding ipynb files by accident ([#36](https://github.com/mwouts/jupytext/issues/36))\n\n\n0.5.1 (2018-08-21)\n------------------\n\n**Fixed**\n\n- Source only notebooks can be trusted.\n\n0.5.0 (2018-08-21)\n------------------\n\n**Added**\n\n- Jupyter magic commands escaped when exported ([#29](https://github.com/mwouts/jupytext/issues/29))\n- 'endofcell' option for explicit (optional) end-of-cell marker ([#31](https://github.com/mwouts/jupytext/issues/31))\n- 'active' cell option now supported for .py and .R export ([#30](https://github.com/mwouts/jupytext/issues/30))\n- Raw cells now preserved when exported to .py or .R ([#32](https://github.com/mwouts/jupytext/issues/32))\n- Extensions can be prefixed, like `.nb.py`, (mwouts/nbsrc[#5](https://github.com/mwouts/jupytext/issues/5))\n- When a file with an extension not associated to 'ipynb' is opened and saved, no 'ipynb' file is created (mwouts/nbsrc[#5](https://github.com/mwouts/jupytext/issues/5))\n- Extensions can now be a sequence of groups. For instance, `nbrmd_formats=\"ipynb,nb.py;script.ipynb,py\"` will create an `ipynb` file when a `nb.py` is opened (and conversely), and a `script.ipynb` file when a `py` file is opened (mwouts/nbsrc[#5](https://github.com/mwouts/jupytext/issues/5))\n- `nbsrc` script was moved to the `nbrmd` package. The `nbsrc` package now only contains the documentation (mwouts/nbsrc[#3](https://github.com/mwouts/jupytext/issues/3))\n\n\n0.4.6 (2018-07-26)\n------------------\n\n- Ping pypi - previous version still not available\n\n\n0.4.5 (2018-07-26)\n------------------\n\n**Fixed**\n\n- Removed dependency of `setup.py` on `yaml`\n\n0.4.4 (2018-07-26)\n-------------------\n\n**Fixed**\n\n- Package republished with `python setup.py sdist bdist_wheel` to fix missing dependencies\n\n0.4.3 (2018-07-26)\n------------------\n\n**Added**\n\n- Multiline comments now supported [#25](https://github.com/mwouts/jupytext/issues/25)\n- Readme refactored, notebook demos available on binder [#23](https://github.com/mwouts/jupytext/issues/23)\n\n**Fixed**\n\n- ContentsManager can be imported even if `notebook.transutils` is not available, for compatibility with older python distributions.\n- Fixed missing cell metadata [#27](https://github.com/mwouts/jupytext/issues/27)\n- Documentation tells how to avoid creating `.ipynb` files [#16](https://github.com/mwouts/jupytext/issues/16)\n\n0.4.2 (2018-07-23)\n------------------\n\n**Added**\n\n- Added test for R notebooks\n- Added pylint badge, imports now in correct order\n- New `active` cell metadata that allows cell activation only for desired extensions (currently available for Rmd and ipynb extensions only)\n\n0.4.1 (2018-07-20)\n------------------\n\n**Fixed**\n\n- Indented python code will not start a new cell [#20](https://github.com/mwouts/jupytext/issues/20)\n- Fixed parsing of Rmd cell metadata [#21](https://github.com/mwouts/jupytext/issues/21)\n\n0.4.0 (2018-07-18)\n------------------\n\n**Added**\n\n- `.py` format for notebooks is lighter and pep8 compliant\n\n**Fixed**\n\n- Default nbrmd config not added to notebooks ([#17](https://github.com/mwouts/jupytext/issues/17))\n- `nbrmd_formats` becomes a configurable traits ([#16](https://github.com/mwouts/jupytext/issues/16))\n- Removed `nbrmd_sourceonly_format` metadata. Source notebook is current notebook when not `.ipynb`, otherwise the first notebook format in `nbrmd_formats` (not `.ipynb`) that is found on disk\n\n0.3.0 (2018-07-17)\n------------------\n\n**Added**\n\n- Introducing support for notebooks as python `.py` or R scripts `.R`\n\n0.2.6 (2018-07-13)\n------------------\n\n**Added**\n\n- Introduced `nbrmd_sourceonly_format` metadata\n- Inputs are loaded from `.Rmd` file when a matching `.ipynb` file is opened.\n\n**Fixed**\n\n- Trusted notebooks remain trusted ([#12](https://github.com/mwouts/jupytext/issues/12))\n\n0.2.5 (2018-07-11)\n------------------\n\n**Added**\n\n- Outputs of existing `.ipynb` versions are combined with matching inputs of R markdown version, as suggested by @grst ([#12](https://github.com/mwouts/jupytext/issues/12))\n\n**Fixed**\n\n- Support for unicode text in python 2.7 ([#11](https://github.com/mwouts/jupytext/issues/11))\n\n\n0.2.4 (2018-07-05)\n------------------\n\n**Added**\n\n- nbrmd will always open notebooks, even if header of code cells are not terminated. Merge conflicts can thus be solved in Jupyter directly.\n- New metadata 'main language' that preserves the notebook language.\n\n**Fixed**\n\n- dependencies included in `setup.py`\n- pre_save_hook work with non-empty `notebook_dir` ([#9](https://github.com/mwouts/jupytext/issues/9))\n\n0.2.3 (2018-06-28)\n------------------\n\n**Added**\n\n- Screenshots in README\n\n**Fixed**\n\n- RMarkdown exporter for nbconvert fixed on non-recent python\n- Tests compatible with other revisions of nbformat >= 4.0\n- Tests compatible with older pytest versions\n\n\n0.2.2 (2018-06-28)\n-------------------\n\n**Added**\n\n- RMarkdown exporter for nbconvert\n- Parsing of R options robust to parenthesis\n- Jupyter cell tags are preserved\n\n**Fixed**\n\n- requirements.txt now included in pypi packages\n\n0.2.1 (2018-06-24)\n------------------\n\n**Added**\n\n- Support for editing markdown files in Jupyter\n- New pre-save hook `update_selected_formats` that saves to formats in metadata 'nbrmd_formats'\n- Rmd cell options directly mapped to cell metadata\n\n**Fixed**\n\n- ContentManager compatible with Python 2.7\n\n0.2.0 (2018-06-21)\n------------------\n\n**Added**\n\n- The package provides a `RmdFileContentsManager` for direct edit of R markdown files in Jupyter\n- Notebook metadata and cell options are preserved\n\n\n0.1.1 (2018-06-19)\n------------------\n\n**Added**\n\n- `nbrmd` prints the result of conversion to stdout, unless flag `-i` is provided\n- Notebooks with R code chunks are supported\n\n0.1 (2018-06-18)\n----------------\n\n- Initial version with the `nbrmd` converter and Jupyter `pre_save_hook`\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018-2026 Marc Wouts\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "![](https://github.com/mwouts/jupytext/blob/17aea37c612f33a4e27eeee4b81966f1506920fd/docs/images/logo_large.png?raw=true)\n\n<!-- INDEX-START -->\n\n[![CI](https://github.com/mwouts/jupytext/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mwouts/jupytext/actions)\n[![Documentation Status](https://readthedocs.org/projects/jupytext/badge/?version=latest)](https://jupytext.readthedocs.io/en/latest/?badge=latest)\n[![codecov.io](https://codecov.io/github/mwouts/jupytext/coverage.svg?branch=main)](https://codecov.io/gh/mwouts/jupytext/branch/main)\n[![MIT License](https://img.shields.io/github/license/mwouts/jupytext)](https://github.com/mwouts/jupytext/blob/main/LICENSE)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![GitHub language count](https://img.shields.io/github/languages/count/mwouts/jupytext)](docs/languages.md)\n[![Conda Version](https://anaconda.org/conda-forge/jupytext/badges/version.svg)](https://anaconda.org/conda-forge/jupytext/)\n[![Pypi](https://img.shields.io/pypi/v/jupytext.svg)](https://pypi.python.org/pypi/jupytext)\n[![pyversions](https://img.shields.io/pypi/pyversions/jupytext.svg)](https://pypi.python.org/pypi/jupytext)\n[![Binder:lab](https://img.shields.io/badge/binder-jupyterlab-0172B2.svg)](https://mybinder.org/v2/gh/mwouts/jupytext/main?urlpath=lab/tree/demo/get_started.ipynb)\n[![Binder:notebook](https://img.shields.io/badge/binder-notebook-0172B2.svg)](https://mybinder.org/v2/gh/mwouts/jupytext/main?filepath=demo)\n[![launch - renku](https://renkulab.io/renku-badge.svg)](https://renkulab.io/projects/best-practices/jupytext/sessions/new?autostart=1)\n[![Jupyter Con 2020](https://img.shields.io/badge/YouTube-JupyterCon%202020-red.svg)](https://www.youtube.com/watch?v=SDYdeVfMh48)\n\n# Jupytext\n\nHave you always wished Jupyter notebooks were plain text documents? Wished you could edit them in your favorite IDE? And get clear and meaningful diffs when doing version control? Then, Jupytext may well be the tool you're looking for!\n\n## Text Notebooks\n\nA Python notebook encoded in the `py:percent` [format](docs/formats-scripts.md#the-percent-format) has a `.py` extension and looks like this:\n\n```\n# %% [markdown]\n# This is a markdown cell\n\n# %%\ndef f(x):\n  return 3*x+1\n```\n\nOnly the notebook inputs (and optionally, the metadata) are included. Text notebooks are well suited for version control. You can also edit or refactor them in an IDE - the `.py` notebook above is a regular Python file.\n\nWe recommend the `percent` format for notebooks that mostly contain code. The `percent` format is available for Julia, Python, R and many other [languages](docs/languages.md).\n\nIf your notebook is documentation-oriented, a [Markdown-based format](docs/formats-markdown.md) (text notebooks with a `.md` extension) might be more appropriate. Depending on what you plan to do with your notebook, you might prefer the Myst Markdown format, which interoperates very well with Jupyter Book, or Quarto Markdown, or even Pandoc Markdown.\n\n## Installation\n\nInstall Jupytext in the Python environment that you use for Jupyter. Use either\n\n    pip install jupytext\n\nor\n\n    conda install jupytext -c conda-forge\n\nThen, restart your JupyterLab server, and make sure Jupytext is activated in Jupyter:  `.py` and `.md` files have a Notebook icon, and you can open them as Notebooks with a right click in JupyterLab.\n\n![Notebook icon on text notebooks](https://github.com/mwouts/jupytext/blob/64b4be818508760116f91bf156342cb4cf724d93/docs/images/jupyterlab_right_click.png?raw=true)\n\n## Paired Notebooks\n\nText notebooks with a `.py` or `.md` extension are well suited for version control. They can be edited or authored conveniently in an IDE. You can open and run them as notebooks in JupyterLab with a right click. However, the notebook outputs are lost when the notebook is closed, as only the notebook inputs are saved in text notebooks.\n\nA convenient alternative to text notebooks are [paired notebooks](docs/paired-notebooks.md). These are a set of two files, say `.ipynb` and `.py`, that contain the same notebook, but in different formats.\n\nYou can edit the `.py` version of the paired notebook, and get the edits back in Jupyter by selecting _reload notebook from disk_. The outputs will be reloaded from the `.ipynb` file, if it exists. The `.ipynb` version will be updated or recreated the next time you save the notebook in Jupyter.\n\n💡 **Tip:** You can automate the notebook reloading by installing the [Jupyter Collaboration](docs/jupyter-collaboration.md) extension.\n\nTo pair a notebook in JupyterLab, use the command `Pair Notebook with percent Script` from the Command Palette:\n\n![](https://github.com/mwouts/jupytext/blob/64b4be818508760116f91bf156342cb4cf724d93/docs/images/pair_commands.png?raw=true)\n\nTo pair all the notebooks in a certain directory, create a [configuration file](docs/config.md) with this content:\n\n```\n# jupytext.toml at the root of your notebook directory\nformats = \"ipynb,py:percent\"\n```\n\n## Command line\n\nJupytext is also available at the [command line](docs/using-cli.md). You can\n\n- pair a notebook with `jupytext --set-formats ipynb,py:percent notebook.ipynb`\n- synchronize the paired files with `jupytext --sync notebook.py` (the inputs are loaded from the most recent paired file)\n- convert a notebook in one format to another with `jupytext --to ipynb notebook.py` (use `-o` if you want a specific output file)\n- pipe a notebook to a linter with e.g. `jupytext --pipe black notebook.ipynb`\n\n## Sample use cases\n\n### Notebooks under version control\n\nThis is a quick how-to:\n- Open your `.ipynb` notebook in Jupyter and [pair](docs/paired-notebooks.md) it to a `.py` notebook, using either the _pair_ command in JupyterLab, or a global [configuration file](docs/config.md)\n- Save the notebook - this creates a `.py` notebook\n- Add this `.py` notebook to version control\n\nYou might exclude `.ipynb` files from version control (unless you want to see the outputs versioned!). Jupytext will recreate the `.ipynb` files locally when the users open and save the `.py` notebooks.\n\n### Collaborating on notebooks with Git\n\nCollaborating on Jupyter notebooks through Git becomes as easy as collaborating on text files.\n\nAssume that you have your `.py` notebooks under version control (see above). Then,\n- Your collaborator pulls the `.py` notebook\n- They open it _as a notebook_ in Jupyter (right-click in JupyterLab)\n- At that stage the notebook has no outputs. They run the notebook and save it. Outputs are regenerated, and a local `.ipynb` file is created\n- They edit the notebook, and push the updated `notebook.py` file. The diff is nothing else than a standard diff on a Python script.\n- You pull the updated `notebook.py` script, and refresh your browser. The input cells are updated based on the new content of `notebook.py`. The outputs are reloaded from your local `.ipynb` file. Finally, the kernel variables are untouched, so you have the option to run only the modified cells to get the new outputs.\n\n### Editing or refactoring a notebook in an IDE\n\nOnce your notebook is [paired](docs/paired-notebooks.md) with a `.py` file, you can easily edit or refactor the `.py` representation of the notebook in an IDE.\n\nOnce you are done editing the `.py` notebook, you will just have to _reload_ the notebook in Jupyter to get the latest edits there.\n\nNote: It is simpler to close the `.ipynb` notebook in Jupyter when you edit the paired `.py` file. There is no obligation to do so; however, if you don't, you should be prepared to read carefully the pop-up messages. If Jupyter tries to save the notebook while the paired `.py` file has also been edited on disk since the last reload, a conflict will be detected and you will be asked to decide which version of the notebook (in memory or on disk) is the appropriate one. Alternatively, the [Jupyter Collaboration](docs/jupyter-collaboration.md) extension provides an autoreload feature which simplifies this.\n\n## More resources\n\nRead more about Jupytext in the [documentation](https://jupytext.readthedocs.io).\n\nIf you're new to Jupytext, you may want to start with the [FAQ](docs/faq.md) or with the [Tutorials](docs/tutorials.md).\n\nThere is also this short introduction to Jupytext: [![](https://img.shields.io/badge/YouTube-JupyterCon%202020-red.svg)](https://www.youtube.com/watch?v=SDYdeVfMh48).\n"
  },
  {
    "path": "binder/labconfig/default_setting_overrides.json",
    "content": "{\n  \"@jupyterlab/docmanager-extension:plugin\": {\n    \"defaultViewers\": {\n      \"markdown\": \"Jupytext Notebook\",\n      \"myst\": \"Jupytext Notebook\",\n      \"r-markdown\": \"Jupytext Notebook\",\n      \"quarto\": \"Jupytext Notebook\",\n      \"julia\": \"Jupytext Notebook\",\n      \"python\": \"Jupytext Notebook\",\n      \"r\": \"Jupytext Notebook\"\n    }\n  }\n}\n"
  },
  {
    "path": "binder/postBuild",
    "content": "# Stop everything if one command fails\nset -e\n\n# Install from sources\n# NB: If you want to use Jupytext on your binder, don't install it from source,\n# just add \"jupytext\" to your \"binder/requirements.txt\" instead.\nHATCH_BUILD_HOOKS_ENABLE=true pip install .\n\nmkdir -p ${HOME}/.jupyter/labconfig\ncp binder/labconfig/* ${HOME}/.jupyter/labconfig\n\n# Create the notebook for our jupytext demo\njupytext demo/get_started.md --to ipynb --update-metadata '{\"jupytext\":null}'\n\n# Remove the markdown representation\n# (the demo starts with just the ipynb file)\nrm demo/get_started.md\n\n# Trust our World Population notebook\njupyter trust demo/World\\ population.ipynb\n\n# Install the bash kernel\npython -m bash_kernel.install\n"
  },
  {
    "path": "binder/requirements.txt",
    "content": "jupyterlab>=4\nnotebook>=7\nplotly\nmatplotlib\nwordcloud\npandas\nwbdata\nbash_kernel\n"
  },
  {
    "path": "demo/Benchmarking Jupytext.py",
    "content": "# In this notebook, we benchmark the Jupytext formats for Jupyter notebooks against the base format\n# Open this script as a notebook in Jupyter to run it and see the plots\n\nimport time\nimport copy\nimport pandas as pd\nimport plotly.graph_objects as go\nfrom plotly.colors import DEFAULT_PLOTLY_COLORS\n\nimport nbformat\nimport jupytext\n\n# The notebook to be tested\nnotebook = jupytext.read('World population.ipynb')\n\n# Same notebook, with no outputs, for a fair comparison\nnotebook_no_outputs = copy.deepcopy(notebook)\nfor cell in notebook_no_outputs.cells:\n    cell.outputs = []\n    cell.execution_count = None\n\n# +\nJUPYTEXT_FORMATS = ['ipynb', 'md', 'py:light', 'py:percent', 'py:sphinx']\n\n# Let's see if we have pandoc here\ntry:\n    jupytext.writes(notebook, fmt='md:pandoc')\n    JUPYTEXT_FORMATS.append('md:pandoc')\nexcept jupytext.formats.JupytextFormatError as err:\n    print(str(err))\n\n\n# Let's see if we have myst-parser installed here\ntry:\n    jupytext.writes(notebook, fmt='myst')\n    JUPYTEXT_FORMATS.append('myst')\nexcept jupytext.formats.JupytextFormatError as err:\n    print(str(err))\n\n# -\n\n\ndef sample_perf(nb, n=30):\n    samples = pd.DataFrame(\n        pd.np.NaN,\n        index=pd.MultiIndex.from_product(\n            (range(n), ['nbformat'] + JUPYTEXT_FORMATS), names=['sample', 'implementation']),\n        columns=pd.Index(['size', 'read', 'write'], name='measure'))\n\n    for i, fmt in samples.index:\n        t0 = time.time()\n        if fmt == 'nbformat':\n            text = nbformat.writes(nb)\n        else:\n            text = jupytext.writes(nb, fmt)\n        t1 = time.time()\n        samples.loc[(i, fmt), 'write'] = t1 - t0\n        samples.loc[(i, fmt), 'size'] = len(text)\n        t0 = time.time()\n        if fmt == 'nbformat':\n            nbformat.reads(text, as_version=4)\n        else:\n            jupytext.reads(text, fmt)\n        t1 = time.time()\n        samples.loc[(i, fmt), 'read'] = t1 - t0\n    return samples\n\n\ndef performance_plot(perf, title):\n    formats = ['nbformat'] + JUPYTEXT_FORMATS\n    mean = perf.groupby('implementation').mean().loc[formats]\n    std = perf.groupby('implementation').std().loc[formats]\n    data = [go.Bar(x=mean.index,\n                   y=mean[col],\n                   error_y=dict(\n                       type='data',\n                       array=std[col],\n                       color=color,\n                       thickness=0.5\n                   ) if col != 'size' else dict(),\n                   name=col,\n                   yaxis={'read': 'y1', 'write': 'y2', 'size': 'y3'}[col])\n            for col, color in zip(mean.columns, DEFAULT_PLOTLY_COLORS)]\n    layout = go.Layout(title=title,\n                       xaxis=dict(title='Implementation', anchor='y3'),\n                       yaxis=dict(domain=[0.7, 1], title='Read (secs)'),\n                       yaxis2=dict(domain=[0.35, .65], title='Write (secs)'),\n                       yaxis3=dict(domain=[0, .3], title='Size')\n                       )\n    return go.Figure(data=data, layout=layout)\n\n\nperf_no_outputs = sample_perf(notebook_no_outputs, 30)\n\nperformance_plot(perf_no_outputs, 'Benchmarking Jupytext on the World Population notebook<br>(Outputs filtered)')\n\nperf = sample_perf(notebook, 30)\n\nperformance_plot(perf, 'Benchmarking Jupytext on the World Population notebook<br>(With outputs)')\n"
  },
  {
    "path": "demo/Jupytext's word cloud.py",
    "content": "# This is a notebook that I used to generate Jupytext's word cloud.\n# To open this script as a notebook in JupyterLab, right-click on this file, and select _Open with/Notebook_.\n\nfrom wordcloud import WordCloud\n\ntext = \"\"\"\nJupytext\nNotebook\nJupyterLab\nGit\nGitHub\nVersion control\nMarkdown\nR Markdown\nText\nScripts\nCode\nNotebook Template\nBinder\nVisual Studio Code\nPyCharm\nAtom\nSpyder\nHydrogen\nRStudio\nSphinx-Gallery\nDocumentation\nblack\npytest\nautopep8\nMetadata\nReproducible research\nR\nJulia\nPython\nBash\nPowershell\nScala\nScheme\nClojure\nMatlab\nOctave\nC++\nq/kdb+\nIDL\nTypeScript\nJavascript\nScala\nRust\nRobot Framework\n\"\"\"\n\nwordcloud = WordCloud(\n    random_state=1,\n    background_color='white',\n    width=1200, height=500\n).generate_from_frequencies({word: 1 for word in text.splitlines()})\n\nwordcloud.to_image()\n\nwordcloud.to_file('../docs/jupytext_word_cloud.png')\n"
  },
  {
    "path": "demo/Tests in a notebook.md",
    "content": "# Testing a Jupyter notebook with pytest\n\nIn this notebook we describe how to test a notebook with `jupytext`.\n\n## Writing assertions and tests in a notebook\n\nOur notebook defines a function that we wish to test. Our function is simply\n\n```python\ndef f(x, n=5):\n    return [x + i for i in range(n)] \n```\n\nWe can test the assertion in Jupyter with simply\n\n```python\nassert f(5) == [5,6,7,8,9]\n```\n\nSince the assertion above works, we don't get any message. It's more interesting to see what happens when an assertion fails. Remove one element of the list above and change the assertion to, say, \n\n    assert f(5) == [5,6,8,9]\n\nWhen we run the above in Jupyter, we get\n\n```stderr\n---------------------------------------------------------------------------\nAssertionError                            Traceback (most recent call last)\n<ipython-input-3-1383ac5d204f> in <module>\n----> 1 assert f(5) == [5,6,8,9]\n\nAssertionError: \n```\n\nNow if we run the notebook with `jupytext --check pytest 'Tests in a notebook.md'`, we get a more detailed description of the issue, thanks to `pytest`'s rewriting of assertions: \n```output\n[jupytext] Reading Tests in a notebook.md\n=========================== test session starts ===========================\nplatform win32 -- Python 3.7.5, pytest-5.2.2, py-1.8.0, pluggy-0.13.0\nrootdir: C:\\Users\\Marco\ncollected 0 items / 1 errors\n\n================================ ERRORS ===================================\n_________ ERROR collecting Tests in a notebook vhs_lscr.py ________________\nTests in a notebook vhs_lscr.py:19: in <module>\n    assert f(5) == [5,6,8,9]\nE   assert [5, 6, 7, 8, 9] == [5, 6, 8, 9]\nE    +  where [5, 6, 7, 8, 9] = <function f at 0x000002440A0D1798>(5)\n!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!\n=========================== 1 error in 0.09s ==============================\n```\n\nOnce all of our assertions pass, we can move them to a test function. In Jupyter the function is not evaluated - only when we run `jupytext --check pytest` on the notebook, the function is actually executed.\n\n```python\ndef test_f():\n    assert f(5) == [5,6,7,8,9]\n```\n\n## Going further\n\n- [nbval](https://github.com/computationalmodelling/nbval) is a plugin for `pytest` that allows you to make sure that Jupyter notebooks run properly, and that their new outputs match the current ones. Use it as `pytest --nbval notebook.ipynb`.\n- [ipytest](https://github.com/chmp/ipytest) defines a `%%run_pytest` cell magic that allows you to execute the tests in a cell directly in Jupyter.\n"
  },
  {
    "path": "demo/World population.Rmd",
    "content": "---\njupyter:\n  jupytext:\n    cell_markers: region,endregion\n    formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc\n    text_representation:\n      extension: .Rmd\n      format_name: rmarkdown\n      format_version: '1.1'\n      jupytext_version: 1.1.0\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n# A quick insight at world population\n\n## Collecting population data\n\nIn the below we retrieve population data from the\n[World Bank](http://www.worldbank.org/)\nusing the [wbdata](https://github.com/OliverSherouse/wbdata) python package\n\n```{python}\nimport pandas as pd\nimport wbdata as wb\n\npd.options.display.max_rows = 6\npd.options.display.max_columns = 20\n```\n\nCorresponding indicator is found using search method - or, directly,\nthe World Bank site.\n\n```{python}\nwb.search_indicators('Population, total')  # SP.POP.TOTL\n# wb.search_indicators('area')\n# => https://data.worldbank.org/indicator is easier to use\n```\n\nNow we download the population data\n\n```{python}\nindicators = {'SP.POP.TOTL': 'Population, total',\n              'AG.SRF.TOTL.K2': 'Surface area (sq. km)',\n              'AG.LND.TOTL.K2': 'Land area (sq. km)',\n              'AG.LND.ARBL.ZS': 'Arable land (% of land area)'}\ndata = wb.get_dataframe(indicators, convert_date=True).sort_index()\ndata\n```\n\nWorld is one of the countries\n\n```{python}\ndata.loc['World']\n```\n\nCan we classify over continents?\n\n```{python}\ndata.loc[(slice(None), '2017-01-01'), :]['Population, total'].dropna(\n).sort_values().tail(60).index.get_level_values('country')\n```\n\nExtract zones manually (in order of increasing population)\n\n```{python}\nzones = ['North America', 'Middle East & North Africa',\n         'Latin America & Caribbean', 'Europe & Central Asia',\n         'Sub-Saharan Africa', 'South Asia',\n         'East Asia & Pacific'][::-1]\n```\n\nAnd extract population information (and check total is right)\n\n```{python}\npopulation = data.loc[zones]['Population, total'].swaplevel().unstack()\npopulation = population[zones]\nassert all(data.loc['World']['Population, total'] == population.sum(axis=1))\n```\n\n## Stacked area plot with matplotlib\n\n```{python}\nimport matplotlib.pyplot as plt\n```\n\n```{python}\nplt.clf()\nplt.figure(figsize=(10, 5), dpi=100)\nplt.stackplot(population.index, population.values.T / 1e9)\nplt.legend(population.columns, loc='upper left')\nplt.ylabel('Population count (B)')\nplt.show()\n```\n\n## Stacked bar plot with plotly\n\n```{python}\nimport plotly.offline as offline\nimport plotly.graph_objs as go\n\noffline.init_notebook_mode()\n```\n\n```{python}\ndata = [go.Scatter(x=population.index, y=population[zone], name=zone, stackgroup='World')\n        for zone in zones]\nfig = go.Figure(data=data,\n                layout=go.Layout(title='World population'))\noffline.iplot(fig)\n```\n"
  },
  {
    "path": "demo/World population.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# A quick insight at world population\\n\",\n    \"\\n\",\n    \"## Collecting population data\\n\",\n    \"\\n\",\n    \"In the below we retrieve population data from the\\n\",\n    \"[World Bank](http://www.worldbank.org/)\\n\",\n    \"using the [wbdata](https://github.com/OliverSherouse/wbdata) python package\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import pandas as pd\\n\",\n    \"import wbdata as wb\\n\",\n    \"\\n\",\n    \"pd.options.display.max_rows = 6\\n\",\n    \"pd.options.display.max_columns = 20\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Corresponding indicator is found using search method - or, directly,\\n\",\n    \"the World Bank site.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"SP.POP.TOTL\\tPopulation, total\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"wb.search_indicators('Population, total')  # SP.POP.TOTL\\n\",\n    \"# wb.search_indicators('area')\\n\",\n    \"# => https://data.worldbank.org/indicator is easier to use\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now we download the population data\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>Population, total</th>\\n\",\n       \"      <th>Surface area (sq. km)</th>\\n\",\n       \"      <th>Land area (sq. km)</th>\\n\",\n       \"      <th>Arable land (% of land area)</th>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>country</th>\\n\",\n       \"      <th>date</th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th rowspan=\\\"3\\\" valign=\\\"top\\\">Afghanistan</th>\\n\",\n       \"      <th>1960-01-01</th>\\n\",\n       \"      <td>8996351.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1961-01-01</th>\\n\",\n       \"      <td>9166764.0</td>\\n\",\n       \"      <td>652860.0</td>\\n\",\n       \"      <td>652860.0</td>\\n\",\n       \"      <td>11.717673</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1962-01-01</th>\\n\",\n       \"      <td>9345868.0</td>\\n\",\n       \"      <td>652860.0</td>\\n\",\n       \"      <td>652860.0</td>\\n\",\n       \"      <td>11.794259</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>...</th>\\n\",\n       \"      <th>...</th>\\n\",\n       \"      <td>...</td>\\n\",\n       \"      <td>...</td>\\n\",\n       \"      <td>...</td>\\n\",\n       \"      <td>...</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th rowspan=\\\"3\\\" valign=\\\"top\\\">Zimbabwe</th>\\n\",\n       \"      <th>2015-01-01</th>\\n\",\n       \"      <td>15777451.0</td>\\n\",\n       \"      <td>390760.0</td>\\n\",\n       \"      <td>386850.0</td>\\n\",\n       \"      <td>10.339925</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2016-01-01</th>\\n\",\n       \"      <td>16150362.0</td>\\n\",\n       \"      <td>390760.0</td>\\n\",\n       \"      <td>386850.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2017-01-01</th>\\n\",\n       \"      <td>16529904.0</td>\\n\",\n       \"      <td>390760.0</td>\\n\",\n       \"      <td>386850.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"<p>15312 rows × 4 columns</p>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"                        Population, total  Surface area (sq. km)  \\\\\\n\",\n       \"country     date                                                   \\n\",\n       \"Afghanistan 1960-01-01          8996351.0                    NaN   \\n\",\n       \"            1961-01-01          9166764.0               652860.0   \\n\",\n       \"            1962-01-01          9345868.0               652860.0   \\n\",\n       \"...                                   ...                    ...   \\n\",\n       \"Zimbabwe    2015-01-01         15777451.0               390760.0   \\n\",\n       \"            2016-01-01         16150362.0               390760.0   \\n\",\n       \"            2017-01-01         16529904.0               390760.0   \\n\",\n       \"\\n\",\n       \"                        Land area (sq. km)  Arable land (% of land area)  \\n\",\n       \"country     date                                                          \\n\",\n       \"Afghanistan 1960-01-01                 NaN                           NaN  \\n\",\n       \"            1961-01-01            652860.0                     11.717673  \\n\",\n       \"            1962-01-01            652860.0                     11.794259  \\n\",\n       \"...                                    ...                           ...  \\n\",\n       \"Zimbabwe    2015-01-01            386850.0                     10.339925  \\n\",\n       \"            2016-01-01            386850.0                           NaN  \\n\",\n       \"            2017-01-01            386850.0                           NaN  \\n\",\n       \"\\n\",\n       \"[15312 rows x 4 columns]\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"indicators = {'SP.POP.TOTL': 'Population, total',\\n\",\n    \"              'AG.SRF.TOTL.K2': 'Surface area (sq. km)',\\n\",\n    \"              'AG.LND.TOTL.K2': 'Land area (sq. km)',\\n\",\n    \"              'AG.LND.ARBL.ZS': 'Arable land (% of land area)'}\\n\",\n    \"data = wb.get_dataframe(indicators, convert_date=True).sort_index()\\n\",\n    \"data\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"World is one of the countries\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>Population, total</th>\\n\",\n       \"      <th>Surface area (sq. km)</th>\\n\",\n       \"      <th>Land area (sq. km)</th>\\n\",\n       \"      <th>Arable land (% of land area)</th>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>date</th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1960-01-01</th>\\n\",\n       \"      <td>3.032160e+09</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1961-01-01</th>\\n\",\n       \"      <td>3.073369e+09</td>\\n\",\n       \"      <td>134043190.4</td>\\n\",\n       \"      <td>129721455.4</td>\\n\",\n       \"      <td>9.693086</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1962-01-01</th>\\n\",\n       \"      <td>3.126510e+09</td>\\n\",\n       \"      <td>134043190.4</td>\\n\",\n       \"      <td>129721435.4</td>\\n\",\n       \"      <td>9.726105</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>...</th>\\n\",\n       \"      <td>...</td>\\n\",\n       \"      <td>...</td>\\n\",\n       \"      <td>...</td>\\n\",\n       \"      <td>...</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2015-01-01</th>\\n\",\n       \"      <td>7.357559e+09</td>\\n\",\n       \"      <td>134325130.2</td>\\n\",\n       \"      <td>129732901.8</td>\\n\",\n       \"      <td>10.991288</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2016-01-01</th>\\n\",\n       \"      <td>7.444157e+09</td>\\n\",\n       \"      <td>134325130.2</td>\\n\",\n       \"      <td>129733172.7</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2017-01-01</th>\\n\",\n       \"      <td>7.530360e+09</td>\\n\",\n       \"      <td>134325130.2</td>\\n\",\n       \"      <td>129733172.7</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"<p>58 rows × 4 columns</p>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"            Population, total  Surface area (sq. km)  Land area (sq. km)  \\\\\\n\",\n       \"date                                                                       \\n\",\n       \"1960-01-01       3.032160e+09                    NaN                 NaN   \\n\",\n       \"1961-01-01       3.073369e+09            134043190.4         129721455.4   \\n\",\n       \"1962-01-01       3.126510e+09            134043190.4         129721435.4   \\n\",\n       \"...                       ...                    ...                 ...   \\n\",\n       \"2015-01-01       7.357559e+09            134325130.2         129732901.8   \\n\",\n       \"2016-01-01       7.444157e+09            134325130.2         129733172.7   \\n\",\n       \"2017-01-01       7.530360e+09            134325130.2         129733172.7   \\n\",\n       \"\\n\",\n       \"            Arable land (% of land area)  \\n\",\n       \"date                                      \\n\",\n       \"1960-01-01                           NaN  \\n\",\n       \"1961-01-01                      9.693086  \\n\",\n       \"1962-01-01                      9.726105  \\n\",\n       \"...                                  ...  \\n\",\n       \"2015-01-01                     10.991288  \\n\",\n       \"2016-01-01                           NaN  \\n\",\n       \"2017-01-01                           NaN  \\n\",\n       \"\\n\",\n       \"[58 rows x 4 columns]\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"data.loc['World']\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Can we classify over continents?\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"Index(['Iran, Islamic Rep.', 'Congo, Dem. Rep.', 'Germany', 'Vietnam',\\n\",\n       \"       'Egypt, Arab Rep.', 'Central Europe and the Baltics', 'Philippines',\\n\",\n       \"       'Ethiopia', 'Japan', 'Mexico', 'Russian Federation', 'Bangladesh',\\n\",\n       \"       'Nigeria', 'Pakistan', 'Brazil', 'Indonesia', 'United States',\\n\",\n       \"       'Euro area', 'North America',\\n\",\n       \"       'Middle East & North Africa (IDA & IBRD countries)',\\n\",\n       \"       'Middle East & North Africa (excluding high income)', 'Arab World',\\n\",\n       \"       'Europe & Central Asia (excluding high income)',\\n\",\n       \"       'Middle East & North Africa',\\n\",\n       \"       'Europe & Central Asia (IDA & IBRD countries)',\\n\",\n       \"       'Fragile and conflict affected situations', 'European Union',\\n\",\n       \"       'IDA blend', 'Latin America & Caribbean (excluding high income)',\\n\",\n       \"       'Latin America & the Caribbean (IDA & IBRD countries)',\\n\",\n       \"       'Latin America & Caribbean', 'Low income',\\n\",\n       \"       'Heavily indebted poor countries (HIPC)', 'Pre-demographic dividend',\\n\",\n       \"       'Europe & Central Asia', 'Least developed countries: UN classification',\\n\",\n       \"       'Sub-Saharan Africa (excluding high income)',\\n\",\n       \"       'Sub-Saharan Africa (IDA & IBRD countries)', 'Sub-Saharan Africa',\\n\",\n       \"       'IDA only', 'Post-demographic dividend', 'High income', 'OECD members',\\n\",\n       \"       'India', 'China', 'IDA total', 'South Asia (IDA & IBRD)', 'South Asia',\\n\",\n       \"       'East Asia & Pacific (IDA & IBRD countries)',\\n\",\n       \"       'East Asia & Pacific (excluding high income)',\\n\",\n       \"       'Late-demographic dividend', 'East Asia & Pacific',\\n\",\n       \"       'Upper middle income', 'Lower middle income',\\n\",\n       \"       'Early-demographic dividend', 'IBRD only', 'Middle income',\\n\",\n       \"       'Low & middle income', 'IDA & IBRD total', 'World'],\\n\",\n       \"      dtype='object', name='country')\"\n      ]\n     },\n     \"execution_count\": 5,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"data.loc[(slice(None), '2017-01-01'), :]['Population, total'].dropna(\\n\",\n    \").sort_values().tail(60).index.get_level_values('country')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Extract zones manually (in order of increasing population)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"zones = ['North America', 'Middle East & North Africa',\\n\",\n    \"         'Latin America & Caribbean', 'Europe & Central Asia',\\n\",\n    \"         'Sub-Saharan Africa', 'South Asia',\\n\",\n    \"         'East Asia & Pacific'][::-1]\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"And extract population information (and check total is right)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"population = data.loc[zones]['Population, total'].swaplevel().unstack()\\n\",\n    \"population = population[zones]\\n\",\n    \"assert all(data.loc['World']['Population, total'] == population.sum(axis=1))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Stacked area plot with matplotlib\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import matplotlib.pyplot as plt\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<Figure size 432x288 with 0 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"image/png\": \"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aerBUQreQY7tQfbcFJutBE9qMT4pRXlS9mvgqIiIiIj0HAUi+YFcb5hmcJiKf4CCk+bEJDlw4+y0YqzXoyxXwjwshyhnbbWiFhEREZEbR4GoT7m+KM3AIFVfmoInRdZKctRJsNuOsVkPs1KL8LgUIlPwQKHb1YqIiIiIXA0Folum40/QDAxS8aXJO2dB57ATZ7cVY7MRZrkS5lE5RD7vqBObiIiIiPS9rgYiY8zvBv434LcAI8AfdV33n3ezpl7jOn5cb5i2J0LTE6bmxCg4KU5MkkM3xk4rzno9zHIlwlI5QDHnaKioiIiIiMhz6vYKUQi4D/x94P/rci1f2kbwN9G5+2O0sehg08Y6/9yihU37mWtnHzYl10u+HeC07eek5eOk6eeo6SFT93LU8FGuqRGBiIiIiMhV6Wogcl33a8DXAIwx3SzlUvzN/O/g/10e73YZIiIiIiLynLq9QvRCjDE+wPfMpUi3ahERERERkZvvpu3H+nnOWgE8/djpbjkiIiIiInKT3bRA9AtA7JmPO90tR0REREREbrIbtWXOdd06UH/6+DacOxIRERERke65aStEIiIiIiIil6bbc4jCwOwzl6aMMT8KZF3X3epSWSIiIiIi0ie6vWXutwLffObxL57/+SvAH7/2akREREREpK90ew7RtwAdBBIRERERka7QGSIREREREelbCkQiIiIiItK3FIhERERERKRvKRCJiIiIiEjfUiASEREREZG+pUAkIiIiIiJ9S4FIRERERET6lgKRiIiIiIj0LQUiERERERHpWwpEIiIiIiLStxSIRERERESkbykQiYiIiIhI31IgEhERERGRvqVAJCIiIiIifUuBSERERERE+pYCkYiIiIiI9C0FIhERERER6VsKRCIiIiIi0rcUiEREREREpG8pEImIiIiISN9SIBIRERERkb6lQCQiIiIiIn1LgUhERERERPqWApGIiIiIiPQtBSIREREREelbCkQiIiIiItK3FIhERERERKRvKRCJiIiIiEjfUiASEREREZG+pUAkIiIiIiJ9S4FIRERERET6lgKRiIiIiIj0LQUiERERERHpWwpEIiIiIiLStxSIRERERESkbykQiYiIiIhI31IgEhERERGRvtUTgcgY8yeNMevGmJox5j1jzH/c7ZpEREREROT263ogMsb8V8BfA74K/GbgNeBrxpjx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\\n\",\n      \"text/plain\": [\n       \"<Figure size 1000x500 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"plt.clf()\\n\",\n    \"plt.figure(figsize=(10, 5), dpi=100)\\n\",\n    \"plt.stackplot(population.index, population.values.T / 1e9)\\n\",\n    \"plt.legend(population.columns, loc='upper left')\\n\",\n    \"plt.ylabel('Population count (B)')\\n\",\n    \"plt.show()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Stacked bar plot with plotly\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 10,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<script type=\\\"text/javascript\\\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script><script type=\\\"text/javascript\\\">if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \\\"STIX-Web\\\"}});}</script><script type='text/javascript'>if(!window._Plotly){define('plotly', function(require, exports, module) {/**\\n\",\n       \"* plotly.js v1.42.2\\n\",\n       \"* Copyright 2012-2018, Plotly, Inc.\\n\",\n       \"* All rights reserved.\\n\",\n       \"* Licensed under the MIT license\\n\",\n       \"*/\\n\",\n       \"!function(t){if(\\\"object\\\"==typeof exports&&\\\"undefined\\\"!=typeof module)module.exports=t();else if(\\\"function\\\"==typeof define&&define.amd)define([],t);else{(\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:this).Plotly=t()}}(function(){return function(){return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l=\\\"function\\\"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error(\\\"Cannot find module '\\\"+o+\\\"'\\\");throw c.code=\\\"MODULE_NOT_FOUND\\\",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){return i(e[o][1][t]||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var a=\\\"function\\\"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}}()({1:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../src/lib\\\"),i={\\\"X,X div\\\":\\\"direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;\\\",\\\"X input,X button\\\":\\\"font-family:'Open Sans', verdana, arial, sans-serif;\\\",\\\"X input:focus,X button:focus\\\":\\\"outline:none;\\\",\\\"X a\\\":\\\"text-decoration:none;\\\",\\\"X a:hover\\\":\\\"text-decoration:none;\\\",\\\"X .crisp\\\":\\\"shape-rendering:crispEdges;\\\",\\\"X .user-select-none\\\":\\\"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\\\",\\\"X svg\\\":\\\"overflow:hidden;\\\",\\\"X svg a\\\":\\\"fill:#447adb;\\\",\\\"X svg a:hover\\\":\\\"fill:#3c6dc5;\\\",\\\"X .main-svg\\\":\\\"position:absolute;top:0;left:0;pointer-events:none;\\\",\\\"X .main-svg .draglayer\\\":\\\"pointer-events:all;\\\",\\\"X .cursor-default\\\":\\\"cursor:default;\\\",\\\"X .cursor-pointer\\\":\\\"cursor:pointer;\\\",\\\"X .cursor-crosshair\\\":\\\"cursor:crosshair;\\\",\\\"X .cursor-move\\\":\\\"cursor:move;\\\",\\\"X .cursor-col-resize\\\":\\\"cursor:col-resize;\\\",\\\"X .cursor-row-resize\\\":\\\"cursor:row-resize;\\\",\\\"X .cursor-ns-resize\\\":\\\"cursor:ns-resize;\\\",\\\"X .cursor-ew-resize\\\":\\\"cursor:ew-resize;\\\",\\\"X .cursor-sw-resize\\\":\\\"cursor:sw-resize;\\\",\\\"X .cursor-s-resize\\\":\\\"cursor:s-resize;\\\",\\\"X .cursor-se-resize\\\":\\\"cursor:se-resize;\\\",\\\"X .cursor-w-resize\\\":\\\"cursor:w-resize;\\\",\\\"X .cursor-e-resize\\\":\\\"cursor:e-resize;\\\",\\\"X .cursor-nw-resize\\\":\\\"cursor:nw-resize;\\\",\\\"X .cursor-n-resize\\\":\\\"cursor:n-resize;\\\",\\\"X .cursor-ne-resize\\\":\\\"cursor:ne-resize;\\\",\\\"X .cursor-grab\\\":\\\"cursor:-webkit-grab;cursor:grab;\\\",\\\"X .modebar\\\":\\\"position:absolute;top:2px;right:2px;z-index:1001;\\\",\\\"X .modebar--hover\\\":\\\"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;\\\",\\\"X:hover .modebar--hover\\\":\\\"opacity:1;\\\",\\\"X .modebar-group\\\":\\\"float:left;display:inline-block;box-sizing:border-box;margin-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\\\",\\\"X .modebar-btn\\\":\\\"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;\\\",\\\"X .modebar-btn svg\\\":\\\"position:relative;top:2px;\\\",\\\"X .modebar.vertical\\\":\\\"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;\\\",\\\"X .modebar.vertical svg\\\":\\\"top:-1px;\\\",\\\"X .modebar.vertical .modebar-group\\\":\\\"display:block;float:none;margin-left:0px;margin-bottom:8px;\\\",\\\"X .modebar.vertical .modebar-group .modebar-btn\\\":\\\"display:block;text-align:center;\\\",\\\"X [data-title]:before,X [data-title]:after\\\":\\\"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;\\\",\\\"X [data-title]:hover:before,X [data-title]:hover:after\\\":\\\"display:block;opacity:1;\\\",\\\"X [data-title]:before\\\":\\\"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;\\\",\\\"X [data-title]:after\\\":\\\"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;\\\",\\\"X .vertical [data-title]:before,X .vertical [data-title]:after\\\":\\\"top:0%;right:200%;\\\",\\\"X .vertical [data-title]:before\\\":\\\"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;\\\",\\\"X .select-outline\\\":\\\"fill:none;stroke-width:1;shape-rendering:crispEdges;\\\",\\\"X .select-outline-1\\\":\\\"stroke:white;\\\",\\\"X .select-outline-2\\\":\\\"stroke:black;stroke-dasharray:2px 2px;\\\",Y:\\\"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;\\\",\\\"Y p\\\":\\\"margin:0;\\\",\\\"Y .notifier-note\\\":\\\"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;\\\",\\\"Y .notifier-close\\\":\\\"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;\\\",\\\"Y .notifier-close:hover\\\":\\\"color:#444;text-decoration:none;cursor:pointer;\\\"};for(var a in i){var o=a.replace(/^,/,\\\" ,\\\").replace(/X/g,\\\".js-plotly-plot .plotly\\\").replace(/Y/g,\\\".plotly-notifier\\\");n.addStyleRule(o,i[a])}},{\\\"../src/lib\\\":696}],2:[function(t,e,r){\\\"use strict\\\";e.exports={undo:{width:857.1,height:1e3,path:\\\"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},home:{width:928.6,height:1e3,path:\\\"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},\\\"camera-retro\\\":{width:1e3,height:1e3,path:\\\"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},zoombox:{width:1e3,height:1e3,path:\\\"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},pan:{width:1e3,height:1e3,path:\\\"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},zoom_plus:{width:875,height:1e3,path:\\\"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},zoom_minus:{width:875,height:1e3,path:\\\"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},autoscale:{width:1e3,height:1e3,path:\\\"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},tooltip_basic:{width:1500,height:1e3,path:\\\"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},tooltip_compare:{width:1125,height:1e3,path:\\\"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},plotlylogo:{width:1542,height:1e3,path:\\\"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},\\\"z-axis\\\":{width:1e3,height:1e3,path:\\\"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},\\\"3d_rotate\\\":{width:1e3,height:1e3,path:\\\"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},camera:{width:1e3,height:1e3,path:\\\"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},movie:{width:1e3,height:1e3,path:\\\"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},question:{width:857.1,height:1e3,path:\\\"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},disk:{width:857.1,height:1e3,path:\\\"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},lasso:{width:1031,height:1e3,path:\\\"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},selectbox:{width:1e3,height:1e3,path:\\\"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},spikeline:{width:1e3,height:1e3,path:\\\"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z\\\",transform:\\\"matrix(1.5 0 0 -1.5 0 850)\\\"},newplotlylogo:{name:\\\"newplotlylogo\\\",svg:\\\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'><defs><style>.cls-1 {fill: #119dff;} .cls-2 {fill: #25fefd;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id='symbol'><rect class='cls-1' width='132' height='132' rx='6' ry='6'/><circle class='cls-2' cx='78' cy='54' r='6'/><circle class='cls-2' cx='102' cy='30' r='6'/><circle class='cls-2' cx='78' cy='30' r='6'/><circle class='cls-2' cx='54' cy='30' r='6'/><circle class='cls-2' cx='30' cy='30' r='6'/><circle class='cls-2' cx='30' cy='54' r='6'/><path class='cls-3' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/><path class='cls-3' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/><path class='cls-3' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/><path class='cls-3' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/></g></svg>\\\"}}},{}],3:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/transforms/aggregate\\\")},{\\\"../src/transforms/aggregate\\\":1156}],4:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/bar\\\")},{\\\"../src/traces/bar\\\":844}],5:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/barpolar\\\")},{\\\"../src/traces/barpolar\\\":856}],6:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/box\\\")},{\\\"../src/traces/box\\\":866}],7:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/components/calendars\\\")},{\\\"../src/components/calendars\\\":568}],8:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/candlestick\\\")},{\\\"../src/traces/candlestick\\\":875}],9:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/carpet\\\")},{\\\"../src/traces/carpet\\\":894}],10:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/choropleth\\\")},{\\\"../src/traces/choropleth\\\":908}],11:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/cone\\\")},{\\\"../src/traces/cone\\\":916}],12:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/contour\\\")},{\\\"../src/traces/contour\\\":931}],13:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/contourcarpet\\\")},{\\\"../src/traces/contourcarpet\\\":942}],14:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/core\\\")},{\\\"../src/core\\\":675}],15:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/transforms/filter\\\")},{\\\"../src/transforms/filter\\\":1157}],16:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/transforms/groupby\\\")},{\\\"../src/transforms/groupby\\\":1158}],17:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/heatmap\\\")},{\\\"../src/traces/heatmap\\\":954}],18:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/heatmapgl\\\")},{\\\"../src/traces/heatmapgl\\\":964}],19:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/histogram\\\")},{\\\"../src/traces/histogram\\\":975}],20:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/histogram2d\\\")},{\\\"../src/traces/histogram2d\\\":982}],21:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/histogram2dcontour\\\")},{\\\"../src/traces/histogram2dcontour\\\":986}],22:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./core\\\");n.register([t(\\\"./bar\\\"),t(\\\"./box\\\"),t(\\\"./heatmap\\\"),t(\\\"./histogram\\\"),t(\\\"./histogram2d\\\"),t(\\\"./histogram2dcontour\\\"),t(\\\"./pie\\\"),t(\\\"./contour\\\"),t(\\\"./scatterternary\\\"),t(\\\"./violin\\\"),t(\\\"./scatter3d\\\"),t(\\\"./surface\\\"),t(\\\"./mesh3d\\\"),t(\\\"./cone\\\"),t(\\\"./streamtube\\\"),t(\\\"./scattergeo\\\"),t(\\\"./choropleth\\\"),t(\\\"./scattergl\\\"),t(\\\"./splom\\\"),t(\\\"./pointcloud\\\"),t(\\\"./heatmapgl\\\"),t(\\\"./parcoords\\\"),t(\\\"./parcats\\\"),t(\\\"./scattermapbox\\\"),t(\\\"./sankey\\\"),t(\\\"./table\\\"),t(\\\"./carpet\\\"),t(\\\"./scattercarpet\\\"),t(\\\"./contourcarpet\\\"),t(\\\"./ohlc\\\"),t(\\\"./candlestick\\\"),t(\\\"./scatterpolar\\\"),t(\\\"./scatterpolargl\\\"),t(\\\"./barpolar\\\")]),n.register([t(\\\"./aggregate\\\"),t(\\\"./filter\\\"),t(\\\"./groupby\\\"),t(\\\"./sort\\\")]),n.register([t(\\\"./calendars\\\")]),e.exports=n},{\\\"./aggregate\\\":3,\\\"./bar\\\":4,\\\"./barpolar\\\":5,\\\"./box\\\":6,\\\"./calendars\\\":7,\\\"./candlestick\\\":8,\\\"./carpet\\\":9,\\\"./choropleth\\\":10,\\\"./cone\\\":11,\\\"./contour\\\":12,\\\"./contourcarpet\\\":13,\\\"./core\\\":14,\\\"./filter\\\":15,\\\"./groupby\\\":16,\\\"./heatmap\\\":17,\\\"./heatmapgl\\\":18,\\\"./histogram\\\":19,\\\"./histogram2d\\\":20,\\\"./histogram2dcontour\\\":21,\\\"./mesh3d\\\":23,\\\"./ohlc\\\":24,\\\"./parcats\\\":25,\\\"./parcoords\\\":26,\\\"./pie\\\":27,\\\"./pointcloud\\\":28,\\\"./sankey\\\":29,\\\"./scatter3d\\\":30,\\\"./scattercarpet\\\":31,\\\"./scattergeo\\\":32,\\\"./scattergl\\\":33,\\\"./scattermapbox\\\":34,\\\"./scatterpolar\\\":35,\\\"./scatterpolargl\\\":36,\\\"./scatterternary\\\":37,\\\"./sort\\\":38,\\\"./splom\\\":39,\\\"./streamtube\\\":40,\\\"./surface\\\":41,\\\"./table\\\":42,\\\"./violin\\\":43}],23:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/mesh3d\\\")},{\\\"../src/traces/mesh3d\\\":991}],24:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/ohlc\\\")},{\\\"../src/traces/ohlc\\\":996}],25:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/parcats\\\")},{\\\"../src/traces/parcats\\\":1005}],26:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/parcoords\\\")},{\\\"../src/traces/parcoords\\\":1014}],27:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/pie\\\")},{\\\"../src/traces/pie\\\":1025}],28:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/pointcloud\\\")},{\\\"../src/traces/pointcloud\\\":1034}],29:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/sankey\\\")},{\\\"../src/traces/sankey\\\":1040}],30:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scatter3d\\\")},{\\\"../src/traces/scatter3d\\\":1076}],31:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scattercarpet\\\")},{\\\"../src/traces/scattercarpet\\\":1082}],32:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scattergeo\\\")},{\\\"../src/traces/scattergeo\\\":1089}],33:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scattergl\\\")},{\\\"../src/traces/scattergl\\\":1097}],34:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scattermapbox\\\")},{\\\"../src/traces/scattermapbox\\\":1103}],35:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scatterpolar\\\")},{\\\"../src/traces/scatterpolar\\\":1110}],36:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scatterpolargl\\\")},{\\\"../src/traces/scatterpolargl\\\":1114}],37:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scatterternary\\\")},{\\\"../src/traces/scatterternary\\\":1120}],38:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/transforms/sort\\\")},{\\\"../src/transforms/sort\\\":1160}],39:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/splom\\\")},{\\\"../src/traces/splom\\\":1125}],40:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/streamtube\\\")},{\\\"../src/traces/streamtube\\\":1130}],41:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/surface\\\")},{\\\"../src/traces/surface\\\":1135}],42:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/table\\\")},{\\\"../src/traces/table\\\":1143}],43:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/violin\\\")},{\\\"../src/traces/violin\\\":1151}],44:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){t=t||document.body,e=e||{};var r=[.01,1/0];\\\"distanceLimits\\\"in e&&(r[0]=e.distanceLimits[0],r[1]=e.distanceLimits[1]);\\\"zoomMin\\\"in e&&(r[0]=e.zoomMin);\\\"zoomMax\\\"in e&&(r[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||\\\"orbit\\\",distanceLimits:r}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,p=t.clientHeight,d={view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay;c.idle(e-r),c.flush(e-(100+2*r));var i=e-2*r;c.recalcMatrix(i);for(var a=!0,o=c.computedMatrix,s=0;s<16;++s)a=a&&u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===p;return h=t.clientWidth,p=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(d,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){return c.setMode(t),c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(r)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(\\\"contextmenu\\\",function(t){return t.preventDefault(),!1});var g=0,v=0,m={shift:!1,control:!1,alt:!1,meta:!1};function y(e,r,i,a){var o=1/t.clientHeight,s=o*(r-g),l=o*(i-v),u=d.flipX?1:-1,h=d.flipY?1:-1,p=Math.PI*d.rotateSpeed,y=n();if(1&e)a.shift?c.rotate(y,0,0,-s*p):c.rotate(y,u*p*s,-h*p*l,0);else if(2&e)c.pan(y,-d.translateSpeed*s*f,d.translateSpeed*l*f,0);else if(4&e){var x=d.zoomSpeed*l/window.innerHeight*(y-c.lastT())*50;c.pan(y,0,0,f*(Math.exp(x)-1))}g=r,v=i,m=a}return a(t,y),t.addEventListener(\\\"touchstart\\\",function(e){var r=s(e.changedTouches[0],t);y(0,r[0],r[1],m),y(1,r[0],r[1],m),e.preventDefault()},!!l&&{passive:!1}),t.addEventListener(\\\"touchmove\\\",function(e){var r=s(e.changedTouches[0],t);y(1,r[0],r[1],m),e.preventDefault()},!!l&&{passive:!1}),t.addEventListener(\\\"touchend\\\",function(e){s(e.changedTouches[0],t),y(0,g,v,m),e.preventDefault()},!!l&&{passive:!1}),o(t,function(t,e,r){var i=d.flipX?1:-1,a=d.flipY?1:-1,o=n();if(Math.abs(t)>Math.abs(e))c.rotate(o,0,0,-t*i*Math.PI*d.rotateSpeed/window.innerWidth);else{var s=d.zoomSpeed*a*e/window.innerHeight*(o-c.lastT())/100;c.pan(o,0,0,f*(Math.exp(s)-1))}},!0),d};var n=t(\\\"right-now\\\"),i=t(\\\"3d-view\\\"),a=t(\\\"mouse-change\\\"),o=t(\\\"mouse-wheel\\\"),s=t(\\\"mouse-event-offset\\\"),l=t(\\\"has-passive-events\\\")},{\\\"3d-view\\\":45,\\\"has-passive-events\\\":394,\\\"mouse-change\\\":418,\\\"mouse-event-offset\\\":419,\\\"mouse-wheel\\\":421,\\\"right-now\\\":480}],45:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||\\\"turntable\\\",u=n(),f=i(),h=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new o({turntable:u,orbit:f,matrix:h},c)};var n=t(\\\"turntable-camera-controller\\\"),i=t(\\\"orbit-camera-controller\\\"),a=t(\\\"matrix-camera-controller\\\");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode=\\\"turntable\\\",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[[\\\"flush\\\",1],[\\\"idle\\\",1],[\\\"lookAt\\\",4],[\\\"rotate\\\",4],[\\\"pan\\\",4],[\\\"translate\\\",4],[\\\"setMatrix\\\",2],[\\\"setDistanceLimits\\\",2],[\\\"setDistance\\\",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n<t[1];++n)r.push(\\\"a\\\"+n);var i=\\\"var cc=this._controllerList;for(var i=0;i<cc.length;++i){cc[i].\\\"+t[0]+\\\"(\\\"+r.join()+\\\")}\\\";s[e]=Function.apply(null,r.concat(i))}),s.recalcMatrix=function(t){this._active.recalcMatrix(t)},s.getDistance=function(t){return this._active.getDistance(t)},s.getDistanceLimits=function(t){return this._active.getDistanceLimits(t)},s.lastT=function(){return this._active.lastT()},s.setMode=function(t){if(t!==this._mode){var e=this._controllerNames.indexOf(t);if(!(e<0)){var r=this._active,n=this._controllerList[e],i=Math.max(r.lastT(),n.lastT());r.recalcMatrix(i),n.setMatrix(i,r.computedMatrix),this._active=n,this._mode=t,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode}},{\\\"matrix-camera-controller\\\":416,\\\"orbit-camera-controller\\\":439,\\\"turntable-camera-controller\\\":519}],46:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n){\\\"use strict\\\";t.sankey=function(){var t={},i=24,a=8,o=[1,1],s=[],l=[],c=2/3;function u(){function t(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function e(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}s.forEach(function(r){r.sourceLinks.sort(e),r.targetLinks.sort(t)}),s.forEach(function(t){var e=0,r=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=r,r+=t.dy})})}function f(t){return t.y+t.dy/2}function h(t){return t.value}return t.nodeWidth=function(e){return arguments.length?(i=+e,t):i},t.nodePadding=function(e){return arguments.length?(a=+e,t):a},t.nodes=function(e){return arguments.length?(s=e,t):s},t.links=function(e){return arguments.length?(l=e,t):l},t.size=function(e){return arguments.length?(o=e,t):o},t.layout=function(n){return s.forEach(function(t){t.sourceLinks=[],t.targetLinks=[]}),l.forEach(function(t,e){var r=t.source,n=t.target;\\\"number\\\"==typeof r&&(r=t.source=s[t.source]),\\\"number\\\"==typeof n&&(n=t.target=s[t.target]),t.originalIndex=e,r.sourceLinks.push(t),n.targetLinks.push(t)}),s.forEach(function(t){t.value=Math.max(e.sum(t.sourceLinks,h),e.sum(t.targetLinks,h))}),function(){for(var t,e,r=s,n=0;r.length;)t=[],r.forEach(function(e){e.x=n,e.dx=i,e.sourceLinks.forEach(function(e){t.indexOf(e.target)<0&&t.push(e.target)})}),r=t,++n;(function(t){s.forEach(function(e){e.sourceLinks.length||(e.x=t-1)})})(n),e=(o[0]-i)/(n-1),s.forEach(function(t){t.x*=e})}(),function(t){var n=r.nest().key(function(t){return t.x}).sortKeys(e.ascending).entries(s).map(function(t){return t.values});(function(){var t=e.max(n,function(t){return t.length}),r=c*o[1]/(t-1);a>r&&(a=r);var i=e.min(n,function(t){return(o[1]-(t.length-1)*a)/e.sum(t,h)});n.forEach(function(t){t.forEach(function(t,e){t.y=e,t.dy=t.value*i})}),l.forEach(function(t){t.dy=t.value*i})})(),d();for(var i=1;t>0;--t)p(i*=.99),d(),u(i),d();function u(t){function r(t){return f(t.source)*t.value}n.forEach(function(n){n.forEach(function(n){if(n.targetLinks.length){var i=e.sum(n.targetLinks,r)/e.sum(n.targetLinks,h);n.y+=(i-f(n))*t}})})}function p(t){function r(t){return f(t.target)*t.value}n.slice().reverse().forEach(function(n){n.forEach(function(n){if(n.sourceLinks.length){var i=e.sum(n.sourceLinks,r)/e.sum(n.sourceLinks,h);n.y+=(i-f(n))*t}})})}function d(){n.forEach(function(t){var e,r,n,i=0,s=t.length;for(t.sort(g),n=0;n<s;++n)e=t[n],(r=i-e.y)>0&&(e.y+=r),i=e.y+e.dy+a;if((r=i-a-o[1])>0)for(i=e.y-=r,n=s-2;n>=0;--n)e=t[n],(r=e.y+e.dy+a-i)>0&&(e.y-=r),i=e.y})}function g(t,e){return t.y-e.y}}(n),u(),t},t.relayout=function(){return u(),t},t.link=function(){var t=.5;function e(e){var r=e.source.x+e.source.dx,i=e.target.x,a=n.interpolateNumber(r,i),o=a(t),s=a(1-t),l=e.source.y+e.sy,c=l+e.dy,u=e.target.y+e.ty,f=u+e.dy;return\\\"M\\\"+r+\\\",\\\"+l+\\\"C\\\"+o+\\\",\\\"+l+\\\" \\\"+s+\\\",\\\"+u+\\\" \\\"+i+\\\",\\\"+u+\\\"L\\\"+i+\\\",\\\"+f+\\\"C\\\"+s+\\\",\\\"+f+\\\" \\\"+o+\\\",\\\"+c+\\\" \\\"+r+\\\",\\\"+c+\\\"Z\\\"}return e.curvature=function(r){return arguments.length?(t=+r,e):t},e},t},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})},\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?i(r,t(\\\"d3-array\\\"),t(\\\"d3-collection\\\"),t(\\\"d3-interpolate\\\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{\\\"d3-array\\\":140,\\\"d3-collection\\\":141,\\\"d3-interpolate\\\":145}],47:[function(t,e,r){\\\"use strict\\\";var n=\\\"undefined\\\"==typeof WeakMap?t(\\\"weak-map\\\"):WeakMap,i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=new n;e.exports=function(t){var e=o.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},{\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310,\\\"weak-map\\\":529}],48:[function(t,e,r){e.exports=function(t){var e=0,r=0,n=0,i=0;return t.map(function(t){var a=(t=t.slice())[0],o=a.toUpperCase();if(a!=o)switch(t[0]=o,a){case\\\"a\\\":t[6]+=n,t[7]+=i;break;case\\\"v\\\":t[1]+=i;break;case\\\"h\\\":t[1]+=n;break;default:for(var s=1;s<t.length;)t[s++]+=n,t[s++]+=i}switch(o){case\\\"Z\\\":n=e,i=r;break;case\\\"H\\\":n=t[1];break;case\\\"V\\\":i=t[1];break;case\\\"M\\\":n=e=t[1],i=r=t[2];break;default:n=t[t.length-2],i=t[t.length-1]}return t})}},{}],49:[function(t,e,r){var n=t(\\\"pad-left\\\");e.exports=function(t,e,r){e=\\\"number\\\"==typeof e?e:1,r=r||\\\": \\\";var i=t.split(/\\\\r?\\\\n/),a=String(i.length+e-1).length;return i.map(function(t,i){var o=i+e,s=String(o).length,l=n(o,a-s);return l+r+t}).join(\\\"\\\\n\\\")}},{\\\"pad-left\\\":440}],50:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[0];for(var r=t[0].length,n=[t[0]],a=[0],o=1;o<e;++o)if(n.push(t[o]),i(n,r)){if(a.push(o),a.length===r+1)return a}else n.pop();return a};var n=t(\\\"robust-orientation\\\");function i(t,e){for(var r=new Array(e+1),i=0;i<t.length;++i)r[i]=t[i];for(i=0;i<=t.length;++i){for(var a=t.length;a<=e;++a){for(var o=new Array(e),s=0;s<e;++s)o[s]=Math.pow(a+1-i,s);r[a]=o}if(n.apply(void 0,r))return!0}return!1}},{\\\"robust-orientation\\\":486}],51:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return n(e).filter(function(r){for(var n=new Array(r.length),a=0;a<r.length;++a)n[a]=e[r[a]];return i(n)*t<1})};var n=t(\\\"delaunay-triangulate\\\"),i=t(\\\"circumradius\\\")},{circumradius:102,\\\"delaunay-triangulate\\\":150}],52:[function(t,e,r){e.exports=function(t,e){return i(n(t,e))};var n=t(\\\"alpha-complex\\\"),i=t(\\\"simplicial-complex-boundary\\\")},{\\\"alpha-complex\\\":51,\\\"simplicial-complex-boundary\\\":493}],53:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){if(!t||null==t.length)throw Error(\\\"Argument should be an array\\\");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;n<e;n++){for(var i=-1/0,a=1/0,o=n,s=t.length;o<s;o+=e)t[o]>i&&(i=t[o]),t[o]<a&&(a=t[o]);r[n]=a,r[e+n]=i}return r}},{}],54:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"array-bounds\\\");e.exports=function(t,e,r){if(!t||null==t.length)throw Error(\\\"Argument should be an array\\\");null==e&&(e=1);null==r&&(r=n(t,e));for(var i=0;i<e;i++){var a=r[e+i],o=r[i],s=i,l=t.length;if(a===1/0&&o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:t[s]===o?0:.5;else if(a===1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:0;else if(o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===o?0:1;else{var c=a-o;for(s=i;s<l;s+=e)t[s]=0===c?.5:(t[s]-o)/c}}return t}},{\\\"array-bounds\\\":53}],55:[function(t,e,r){e.exports=function(t,e){var r=\\\"number\\\"==typeof t,n=\\\"number\\\"==typeof e;r&&!n?(e=t,t=0):r||n||(t=0,e=0);var i=(e|=0)-(t|=0);if(i<0)throw new Error(\\\"array length must be positive\\\");for(var a=new Array(i),o=0,s=t;o<i;o++,s++)a[o]=s;return a}},{}],56:[function(t,e,r){(function(r){\\\"use strict\\\";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return r.Buffer&&\\\"function\\\"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=t(\\\"util/\\\"),o=Object.prototype.hasOwnProperty,s=Array.prototype.slice,l=\\\"foo\\\"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function u(t){return!i(t)&&(\\\"function\\\"==typeof r.ArrayBuffer&&(\\\"function\\\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var f=e.exports=m,h=/\\\\s*function\\\\s+([^\\\\(\\\\s]*)\\\\s*/;function p(t){if(a.isFunction(t)){if(l)return t.name;var e=t.toString().match(h);return e&&e[1]}}function d(t,e){return\\\"string\\\"==typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(l||!a.isFunction(t))return a.inspect(t);var e=p(t);return\\\"[Function\\\"+(e?\\\": \\\"+e:\\\"\\\")+\\\"]\\\"}function v(t,e,r,n,i){throw new f.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function m(t,e){t||v(t,!0,e,\\\"==\\\",f.ok)}function y(t,e,r,o){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&\\\"object\\\"==typeof t||null!==e&&\\\"object\\\"==typeof e){if(u(t)&&u(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var l=(o=o||{actual:[],expected:[]}).actual.indexOf(t);return-1!==l&&l===o.expected.indexOf(e)||(o.actual.push(t),o.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=x(t),o=x(e);if(i&&!o||!i&&o)return!1;if(i)return t=s.call(t),e=s.call(e),y(t,e,r);var l,c,u=w(t),f=w(e);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),c=u.length-1;c>=0;c--)if(u[c]!==f[c])return!1;for(c=u.length-1;c>=0;c--)if(l=u[c],!y(t[l],e[l],r,n))return!1;return!0}(t,e,r,o))}return r?t===e:t==e}function x(t){return\\\"[object Arguments]\\\"==Object.prototype.toString.call(t)}function b(t,e){if(!t||!e)return!1;if(\\\"[object RegExp]\\\"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,r,n){var i;if(\\\"function\\\"!=typeof e)throw new TypeError('\\\"block\\\" argument must be a function');\\\"string\\\"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?\\\" (\\\"+r.name+\\\").\\\":\\\".\\\")+(n?\\\" \\\"+n:\\\".\\\"),t&&!i&&v(i,r,\\\"Missing expected exception\\\"+n);var o=\\\"string\\\"==typeof n,s=!t&&i&&!r;if((!t&&a.isError(i)&&o&&b(i,r)||s)&&v(i,r,\\\"Got unwanted exception\\\"+n),t&&i&&r&&!b(i,r)||!t&&i)throw i}f.AssertionError=function(t){var e;this.name=\\\"AssertionError\\\",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=d(g((e=this).actual),128)+\\\" \\\"+e.operator+\\\" \\\"+d(g(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,a=p(r),o=i.indexOf(\\\"\\\\n\\\"+a);if(o>=0){var s=i.indexOf(\\\"\\\\n\\\",o+1);i=i.substring(s+1)}this.stack=i}}},a.inherits(f.AssertionError,Error),f.fail=v,f.ok=m,f.equal=function(t,e,r){t!=e&&v(t,e,r,\\\"==\\\",f.equal)},f.notEqual=function(t,e,r){t==e&&v(t,e,r,\\\"!=\\\",f.notEqual)},f.deepEqual=function(t,e,r){y(t,e,!1)||v(t,e,r,\\\"deepEqual\\\",f.deepEqual)},f.deepStrictEqual=function(t,e,r){y(t,e,!0)||v(t,e,r,\\\"deepStrictEqual\\\",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){y(t,e,!1)&&v(t,e,r,\\\"notDeepEqual\\\",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&&v(e,r,n,\\\"notDeepStrictEqual\\\",t)},f.strictEqual=function(t,e,r){t!==e&&v(t,e,r,\\\"===\\\",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,\\\"!==\\\",f.notStrictEqual)},f.throws=function(t,e,r){_(!0,t,e,r)},f.doesNotThrow=function(t,e,r){_(!1,t,e,r)},f.ifError=function(t){if(t)throw t};var w=Object.keys||function(t){var e=[];for(var r in t)o.call(t,r)&&e.push(r);return e}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"util/\\\":59}],57:[function(t,e,r){\\\"function\\\"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],58:[function(t,e,r){e.exports=function(t){return t&&\\\"object\\\"==typeof t&&\\\"function\\\"==typeof t.copy&&\\\"function\\\"==typeof t.fill&&\\\"function\\\"==typeof t.readUInt8}},{}],59:[function(t,e,r){(function(e,n){var i=/%[sdj%]/g;r.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(s(arguments[r]));return e.join(\\\" \\\")}r=1;for(var n=arguments,a=n.length,o=String(t).replace(i,function(t){if(\\\"%%\\\"===t)return\\\"%\\\";if(r>=a)return t;switch(t){case\\\"%s\\\":return String(n[r++]);case\\\"%d\\\":return Number(n[r++]);case\\\"%j\\\":try{return JSON.stringify(n[r++])}catch(t){return\\\"[Circular]\\\"}default:return t}}),l=n[r];r<a;l=n[++r])g(l)||!b(l)?o+=\\\" \\\"+l:o+=\\\" \\\"+s(l);return o},r.deprecate=function(t,i){if(y(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}};var a,o={};function s(t,e){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?\\\"\\\\x1b[\\\"+s.colors[r][0]+\\\"m\\\"+t+\\\"\\\\x1b[\\\"+s.colors[r][1]+\\\"m\\\":t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return m(i)||(i=u(t,i,n)),i}var a=function(t,e){if(y(e))return t.stylize(\\\"undefined\\\",\\\"undefined\\\");if(m(e)){var r=\\\"'\\\"+JSON.stringify(e).replace(/^\\\"|\\\"$/g,\\\"\\\").replace(/'/g,\\\"\\\\\\\\'\\\").replace(/\\\\\\\\\\\"/g,'\\\"')+\\\"'\\\";return t.stylize(r,\\\"string\\\")}if(v(e))return t.stylize(\\\"\\\"+e,\\\"number\\\");if(d(e))return t.stylize(\\\"\\\"+e,\\\"boolean\\\");if(g(e))return t.stylize(\\\"null\\\",\\\"null\\\")}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),w(e)&&(o.indexOf(\\\"message\\\")>=0||o.indexOf(\\\"description\\\")>=0))return f(e);if(0===o.length){if(k(e)){var l=e.name?\\\": \\\"+e.name:\\\"\\\";return t.stylize(\\\"[Function\\\"+l+\\\"]\\\",\\\"special\\\")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),\\\"regexp\\\");if(_(e))return t.stylize(Date.prototype.toString.call(e),\\\"date\\\");if(w(e))return f(e)}var c,b=\\\"\\\",M=!1,A=[\\\"{\\\",\\\"}\\\"];(p(e)&&(M=!0,A=[\\\"[\\\",\\\"]\\\"]),k(e))&&(b=\\\" [Function\\\"+(e.name?\\\": \\\"+e.name:\\\"\\\")+\\\"]\\\");return x(e)&&(b=\\\" \\\"+RegExp.prototype.toString.call(e)),_(e)&&(b=\\\" \\\"+Date.prototype.toUTCString.call(e)),w(e)&&(b=\\\" \\\"+f(e)),0!==o.length||M&&0!=e.length?n<0?x(e)?t.stylize(RegExp.prototype.toString.call(e),\\\"regexp\\\"):t.stylize(\\\"[Object]\\\",\\\"special\\\"):(t.seen.push(e),c=M?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o<s;++o)S(e,String(o))?a.push(h(t,e,r,n,String(o),!0)):a.push(\\\"\\\");return i.forEach(function(i){i.match(/^\\\\d+$/)||a.push(h(t,e,r,n,i,!0))}),a}(t,e,n,s,o):o.map(function(r){return h(t,e,n,s,r,M)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf(\\\"\\\\n\\\")>=0&&0,t+e.replace(/\\\\u001b\\\\[\\\\d\\\\d?m/g,\\\"\\\").length+1},0)>60)return r[0]+(\\\"\\\"===e?\\\"\\\":e+\\\"\\\\n \\\")+\\\" \\\"+t.join(\\\",\\\\n  \\\")+\\\" \\\"+r[1];return r[0]+e+\\\" \\\"+t.join(\\\", \\\")+\\\" \\\"+r[1]}(c,b,A)):A[0]+b+A[1]}function f(t){return\\\"[\\\"+Error.prototype.toString.call(t)+\\\"]\\\"}function h(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize(\\\"[Getter/Setter]\\\",\\\"special\\\"):t.stylize(\\\"[Getter]\\\",\\\"special\\\"):l.set&&(s=t.stylize(\\\"[Setter]\\\",\\\"special\\\")),S(n,i)||(o=\\\"[\\\"+i+\\\"]\\\"),s||(t.seen.indexOf(l.value)<0?(s=g(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf(\\\"\\\\n\\\")>-1&&(s=a?s.split(\\\"\\\\n\\\").map(function(t){return\\\"  \\\"+t}).join(\\\"\\\\n\\\").substr(2):\\\"\\\\n\\\"+s.split(\\\"\\\\n\\\").map(function(t){return\\\"   \\\"+t}).join(\\\"\\\\n\\\")):s=t.stylize(\\\"[Circular]\\\",\\\"special\\\")),y(o)){if(a&&i.match(/^\\\\d+$/))return s;(o=JSON.stringify(\\\"\\\"+i)).match(/^\\\"([a-zA-Z_][a-zA-Z_0-9]*)\\\"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,\\\"name\\\")):(o=o.replace(/'/g,\\\"\\\\\\\\'\\\").replace(/\\\\\\\\\\\"/g,'\\\"').replace(/(^\\\"|\\\"$)/g,\\\"'\\\"),o=t.stylize(o,\\\"string\\\"))}return o+\\\": \\\"+s}function p(t){return Array.isArray(t)}function d(t){return\\\"boolean\\\"==typeof t}function g(t){return null===t}function v(t){return\\\"number\\\"==typeof t}function m(t){return\\\"string\\\"==typeof t}function y(t){return void 0===t}function x(t){return b(t)&&\\\"[object RegExp]\\\"===M(t)}function b(t){return\\\"object\\\"==typeof t&&null!==t}function _(t){return b(t)&&\\\"[object Date]\\\"===M(t)}function w(t){return b(t)&&(\\\"[object Error]\\\"===M(t)||t instanceof Error)}function k(t){return\\\"function\\\"==typeof t}function M(t){return Object.prototype.toString.call(t)}function A(t){return t<10?\\\"0\\\"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(a)&&(a=e.env.NODE_DEBUG||\\\"\\\"),t=t.toUpperCase(),!o[t])if(new RegExp(\\\"\\\\\\\\b\\\"+t+\\\"\\\\\\\\b\\\",\\\"i\\\").test(a)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error(\\\"%s %d: %s\\\",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.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]},s.styles={special:\\\"cyan\\\",number:\\\"yellow\\\",boolean:\\\"yellow\\\",undefined:\\\"grey\\\",null:\\\"bold\\\",string:\\\"green\\\",date:\\\"magenta\\\",regexp:\\\"red\\\"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=v,r.isString=m,r.isSymbol=function(t){return\\\"symbol\\\"==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=k,r.isPrimitive=function(t){return null===t||\\\"boolean\\\"==typeof t||\\\"number\\\"==typeof t||\\\"string\\\"==typeof t||\\\"symbol\\\"==typeof t||\\\"undefined\\\"==typeof t},r.isBuffer=t(\\\"./support/isBuffer\\\");var T=[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log(\\\"%s - %s\\\",(t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(\\\":\\\"),[t.getDate(),T[t.getMonth()],e].join(\\\" \\\")),r.format.apply(r,arguments))},r.inherits=t(\\\"inherits\\\"),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t(\\\"_process\\\"),\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"./support/isBuffer\\\":58,_process:465,inherits:57}],60:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],61:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o<r;++o){for(var s=new Array(r+1),l=0;l<=r;++l)s[l]=t[l][o];a[o]=s}a[r]=new Array(r+1);for(var o=0;o<=r;++o)a[r][o]=1;for(var c=new Array(r+1),o=0;o<r;++o)c[o]=e[o];c[r]=1;var u=n(a,c),f=i(u[r+1]);0===f&&(f=1);for(var h=new Array(r+1),o=0;o<=r;++o)h[o]=i(u[o])/f;return h};var n=t(\\\"robust-linear-solve\\\");function i(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return e}},{\\\"robust-linear-solve\\\":485}],62:[function(t,e,r){\\\"use strict\\\";r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){for(var e,r=c(t),n=r[0],o=r[1],s=new a(function(t,e,r){return 3*(e+r)/4-r}(0,n,o)),l=0,u=o>0?n-4:n,f=0;f<u;f+=4)e=i[t.charCodeAt(f)]<<18|i[t.charCodeAt(f+1)]<<12|i[t.charCodeAt(f+2)]<<6|i[t.charCodeAt(f+3)],s[l++]=e>>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===o&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,s[l++]=255&e);1===o&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;o<s;o+=16383)a.push(u(t,o,o+16383>s?s:o+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+\\\"==\\\")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+\\\"=\\\"));return a.join(\\\"\\\")};for(var n=[],i=[],a=\\\"undefined\\\"!=typeof Uint8Array?Uint8Array:Array,o=\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\",s=0,l=o.length;s<l;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error(\\\"Invalid string. Length must be a multiple of 4\\\");var r=t.indexOf(\\\"=\\\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,r){for(var i,a,o=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join(\\\"\\\")}i[\\\"-\\\".charCodeAt(0)]=62,i[\\\"_\\\".charCodeAt(0)]=63},{}],63:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/rationalize\\\");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{\\\"./lib/rationalize\\\":73}],64:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],65:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/rationalize\\\");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{\\\"./lib/rationalize\\\":73}],66:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-rat\\\"),i=t(\\\"./lib/is-bn\\\"),a=t(\\\"./lib/num-to-bn\\\"),o=t(\\\"./lib/str-to-bn\\\"),s=t(\\\"./lib/rationalize\\\"),l=t(\\\"./div\\\");e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c=0;var u,f;if(i(e))u=e.clone();else if(\\\"string\\\"==typeof e)u=o(e);else{if(0===e)return[a(0),a(1)];if(e===Math.floor(e))u=a(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),c-=256;u=a(e)}}if(n(r))u.mul(r[1]),f=r[0].clone();else if(i(r))f=r.clone();else if(\\\"string\\\"==typeof r)f=o(r);else if(r)if(r===Math.floor(r))f=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),c+=256;f=a(r)}else f=a(1);c>0?u=u.ushln(c):c<0&&(f=f.ushln(-c));return s(u,f)}},{\\\"./div\\\":65,\\\"./is-rat\\\":67,\\\"./lib/is-bn\\\":71,\\\"./lib/num-to-bn\\\":72,\\\"./lib/rationalize\\\":73,\\\"./lib/str-to-bn\\\":74}],67:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/is-bn\\\");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{\\\"./lib/is-bn\\\":71}],68:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"bn.js\\\");e.exports=function(t){return t.cmp(new n(0))}},{\\\"bn.js\\\":82}],69:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./bn-sign\\\");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a<e;a++){var o=r[a];i+=o*Math.pow(67108864,a)}return n(t)*i}},{\\\"./bn-sign\\\":68}],70:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"double-bits\\\"),i=t(\\\"bit-twiddle\\\").countTrailingZeros;e.exports=function(t){var e=i(n.lo(t));if(e<32)return e;var r=i(n.hi(t));if(r>20)return 52;return r+32}},{\\\"bit-twiddle\\\":80,\\\"double-bits\\\":152}],71:[function(t,e,r){\\\"use strict\\\";t(\\\"bn.js\\\");e.exports=function(t){return t&&\\\"object\\\"==typeof t&&Boolean(t.words)}},{\\\"bn.js\\\":82}],72:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"bn.js\\\"),i=t(\\\"double-bits\\\");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{\\\"bn.js\\\":82,\\\"double-bits\\\":152}],73:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./num-to-bn\\\"),i=t(\\\"./bn-sign\\\");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{\\\"./bn-sign\\\":68,\\\"./num-to-bn\\\":72}],74:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"bn.js\\\");e.exports=function(t){return new n(t)}},{\\\"bn.js\\\":82}],75:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/rationalize\\\");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{\\\"./lib/rationalize\\\":73}],76:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/bn-sign\\\");e.exports=function(t){return n(t[0])*n(t[1])}},{\\\"./lib/bn-sign\\\":68}],77:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/rationalize\\\");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{\\\"./lib/rationalize\\\":73}],78:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/bn-to-num\\\"),i=t(\\\"./lib/ctz\\\");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4,f=n(l.ushln(u).divRound(r));return c*(s+f*Math.pow(2,-u))}var h=r.bitLength()-l.bitLength()+53,f=n(l.ushln(h).divRound(r));return h<1023?c*f*Math.pow(2,-h):(f*=Math.pow(2,-1023),c*f*Math.pow(2,1023-h))}},{\\\"./lib/bn-to-num\\\":69,\\\"./lib/ctz\\\":70}],79:[function(t,e,r){\\\"use strict\\\";function n(t,e,r,n,i,a){var o=[\\\"function \\\",t,\\\"(a,l,h,\\\",n.join(\\\",\\\"),\\\"){\\\",a?\\\"\\\":\\\"var i=\\\",r?\\\"l-1\\\":\\\"h+1\\\",\\\";while(l<=h){var m=(l+h)>>>1,x=a\\\",i?\\\".get(m)\\\":\\\"[m]\\\"];return a?e.indexOf(\\\"c\\\")<0?o.push(\\\";if(x===y){return m}else if(x<=y){\\\"):o.push(\\\";var p=c(x,y);if(p===0){return m}else if(p<=0){\\\"):o.push(\\\";if(\\\",e,\\\"){i=m;\\\"),r?o.push(\\\"l=m+1}else{h=m-1}\\\"):o.push(\\\"h=m-1}else{l=m+1}\\\"),o.push(\\\"}\\\"),a?o.push(\\\"return -1};\\\"):o.push(\\\"return i};\\\"),o.join(\\\"\\\")}function i(t,e,r,i){return new Function([n(\\\"A\\\",\\\"x\\\"+t+\\\"y\\\",e,[\\\"y\\\"],!1,i),n(\\\"B\\\",\\\"x\\\"+t+\\\"y\\\",e,[\\\"y\\\"],!0,i),n(\\\"P\\\",\\\"c(x,y)\\\"+t+\\\"0\\\",e,[\\\"y\\\",\\\"c\\\"],!1,i),n(\\\"Q\\\",\\\"c(x,y)\\\"+t+\\\"0\\\",e,[\\\"y\\\",\\\"c\\\"],!0,i),\\\"function dispatchBsearch\\\",r,\\\"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch\\\",r].join(\\\"\\\"))()}e.exports={ge:i(\\\">=\\\",!1,\\\"GE\\\"),gt:i(\\\">\\\",!1,\\\"GT\\\"),lt:i(\\\"<\\\",!0,\\\"LT\\\"),le:i(\\\"<=\\\",!0,\\\"LE\\\"),eq:i(\\\"-\\\",!0,\\\"EQ\\\",!0)}},{}],80:[function(t,e,r){\\\"use strict\\\";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(i),r.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],81:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"clamp\\\");e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,f,h,p,d,g,v=null==e.cutoff?.25:e.cutoff,m=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error(\\\"For raw data width and height should be provided by options\\\");r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(f=(h=t).getContext(\\\"2d\\\"),r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(h=t.canvas,f=t,r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,g=c.length;d<g;d++)l[d]=c[d*u+y]/255;else if(1!==u)throw Error(\\\"Raw data can have only 1 value per pixel\\\");var x=Array(r*o),b=Array(r*o),_=Array(s),w=Array(s),k=Array(s+1),M=Array(s);for(d=0,g=r*o;d<g;d++){var A=l[d];x[d]=1===A?0:0===A?i:Math.pow(Math.max(0,.5-A),2),b[d]=1===A?i:0===A?0:Math.pow(Math.max(0,A-.5),2)}a(x,r,o,_,w,M,k),a(b,r,o,_,w,M,k);var T=window.Float32Array?new Float32Array(r*o):new Array(r*o);for(d=0,g=r*o;d<g;d++)T[d]=n(1-((x[d]-b[d])/m+v),0,1);return T};var i=1e20;function a(t,e,r,n,i,a,s){for(var l=0;l<e;l++){for(var c=0;c<r;c++)n[c]=t[c*e+l];for(o(n,i,a,s,r),c=0;c<r;c++)t[c*e+l]=i[c]}for(c=0;c<r;c++){for(l=0;l<e;l++)n[l]=t[c*e+l];for(o(n,i,a,s,e),l=0;l<e;l++)t[c*e+l]=Math.sqrt(i[l])}}function o(t,e,r,n,a){r[0]=0,n[0]=-i,n[1]=+i;for(var o=1,s=0;o<a;o++){for(var l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l<=n[s];)s--,l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);r[++s]=o,n[s]=l,n[s+1]=+i}for(o=0,s=0;o<a;o++){for(;n[s+1]<o;)s++;e[o]=(o-r[s])*(o-r[s])+t[r[s]]}}},{clamp:103}],82:[function(t,e,r){!function(e,r){\\\"use strict\\\";function n(t,e){if(!t)throw new Error(e||\\\"Assertion failed\\\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\\\"le\\\"!==e&&\\\"be\\\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\\\"be\\\"))}var o;\\\"object\\\"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{o=t(\\\"buffer\\\").Buffer}catch(t){}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a<i;a++){var o=t.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function l(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o<a;o++){var s=t.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&\\\"object\\\"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if(\\\"number\\\"==typeof t)return this._initNumber(t,e,r);if(\\\"object\\\"==typeof t)return this._initArray(t,e,r);\\\"hex\\\"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;\\\"-\\\"===(t=t.toString().replace(/\\\\s+/g,\\\"\\\"))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),\\\"-\\\"===t[0]&&(this.negative=1),this.strip(),\\\"le\\\"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\\\"le\\\"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n(\\\"number\\\"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if(\\\"be\\\"===r)for(i=t.length-1,a=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if(\\\"le\\\"===r)for(i=0,a=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=t.length-6,n=0;r>=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,u=r;u<s;u+=n)c=l(t,u,u+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var f=1;for(c=l(t,u,t.length,e),u=0;u<o;u++)f*=e;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&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},a.prototype.inspect=function(){return(this.red?\\\"<BN-R: \\\":\\\"<BN: \\\")+this.toString(16)+\\\">\\\"};var c=[\\\"\\\",\\\"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\\\"],u=[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],f=[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 h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var u=l>>>26,f=67108863&l,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=h;p++){var d=c-p|0;u+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\\\"hex\\\"===t){r=\\\"\\\";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],l=(16777215&(s<<i|a)).toString(16);r=0!==(a=s>>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r=\\\"0\\\"+r;return 0!==this.negative&&(r=\\\"-\\\"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=u[t],p=f[t];r=\\\"\\\";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r=\\\"0\\\"+r);r.length%e!=0;)r=\\\"0\\\"+r;return 0!==this.negative&&(r=\\\"-\\\"+r),r}n(!1,\\\"Base should be between 2 and 36\\\")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\\\"Number can only safely store up to 53 bits\\\"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(\\\"undefined\\\"!=typeof o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,\\\"byte array longer than desired length\\\"),n(a>0,\\\"Requested array length <= 0\\\"),this.strip();var o,s,l=\\\"le\\\"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n(\\\"number\\\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n(\\\"number\\\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a<n.length;a++)e=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<r.length;a++)e=(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o<n.length;o++)a=(e=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&e;for(;0!==a&&o<r.length;o++)a=(e=(0|r.words[o])+a)>>26,this.words[o]=67108863&e;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,a,o=t.words,s=e.words,l=r.words,c=0,u=0|o[0],f=8191&u,h=u>>>13,p=0|o[1],d=8191&p,g=p>>>13,v=0|o[2],m=8191&v,y=v>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],k=8191&w,M=w>>>13,A=0|o[5],T=8191&A,S=A>>>13,C=0|o[6],E=8191&C,L=C>>>13,z=0|o[7],O=8191&z,I=z>>>13,P=0|o[8],D=8191&P,R=P>>>13,B=0|o[9],F=8191&B,N=B>>>13,j=0|s[0],V=8191&j,U=j>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Y=8191&W,X=W>>>13,Z=0|s[3],$=8191&Z,J=Z>>>13,K=0|s[4],Q=8191&K,tt=K>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ft=8191&ut,ht=ut>>>13,pt=0|s[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(f,V))|0)+((8191&(i=(i=Math.imul(f,U))+Math.imul(h,V)|0))<<13)|0;c=((a=Math.imul(h,U))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(d,V),i=(i=Math.imul(d,U))+Math.imul(g,V)|0,a=Math.imul(g,U);var mt=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))<<13)|0;c=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,V),i=(i=Math.imul(m,U))+Math.imul(y,V)|0,a=Math.imul(y,U),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,G)|0;var yt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,V),i=(i=Math.imul(b,U))+Math.imul(_,V)|0,a=Math.imul(_,U),n=n+Math.imul(m,H)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,X)|0;var xt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,$)|0))<<13)|0;c=((a=a+Math.imul(h,J)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(k,V),i=(i=Math.imul(k,U))+Math.imul(M,V)|0,a=Math.imul(M,U),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,Y)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,J)|0;var bt=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(T,V),i=(i=Math.imul(T,U))+Math.imul(S,V)|0,a=Math.imul(S,U),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,G)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(E,V),i=(i=Math.imul(E,U))+Math.imul(L,V)|0,a=Math.imul(L,U),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var wt=(c+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;c=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,V),i=(i=Math.imul(O,U))+Math.imul(I,V)|0,a=Math.imul(I,U),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0;var kt=(c+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,lt)|0))<<13)|0;c=((a=a+Math.imul(h,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,V),i=(i=Math.imul(D,U))+Math.imul(R,V)|0,a=Math.imul(R,U),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(m,at)|0,i=(i=i+Math.imul(m,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ct)|0;var Mt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,V),i=(i=Math.imul(F,U))+Math.imul(N,V)|0,a=Math.imul(N,U),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(I,Y)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ft)|0,a=a+Math.imul(g,ht)|0;var At=(c+(n=n+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,dt)|0))<<13)|0;c=((a=a+Math.imul(h,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,G))+Math.imul(N,H)|0,a=Math.imul(N,G),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(m,ft)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,X))+Math.imul(N,Y)|0,a=Math.imul(N,X),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((a=a+Math.imul(y,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,J))+Math.imul(N,$)|0,a=Math.imul(N,J),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(M,ft)|0,a=a+Math.imul(M,ht)|0;var Ct=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(N,Q)|0,a=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Et=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(M,dt)|0))<<13)|0;c=((a=a+Math.imul(M,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(I,lt)|0,a=a+Math.imul(I,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(L,ft)|0,a=a+Math.imul(L,ht)|0;var Lt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(F,at),i=(i=Math.imul(F,ot))+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ct)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(I,ft)|0,a=a+Math.imul(I,ht)|0;var zt=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(L,dt)|0))<<13)|0;c=((a=a+Math.imul(L,gt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(F,lt),i=(i=Math.imul(F,ct))+Math.imul(N,lt)|0,a=Math.imul(N,ct),n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(R,ft)|0,a=a+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(I,dt)|0))<<13)|0;c=((a=a+Math.imul(I,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(F,ft),i=(i=Math.imul(F,ht))+Math.imul(N,ft)|0,a=Math.imul(N,ht);var It=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((a=a+Math.imul(R,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(c+(n=Math.imul(F,dt))|0)+((8191&(i=(i=Math.imul(F,gt))+Math.imul(N,dt)|0))<<13)|0;return c=((a=Math.imul(N,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=vt,l[1]=mt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=Mt,l[9]=At,l[10]=Tt,l[11]=St,l[12]=Ct,l[13]=Et,l[14]=Lt,l[15]=zt,l[16]=Ot,l[17]=It,l[18]=Pt,0!==c&&(l[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=h),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?h(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,l=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c<=l;c++){var u=a-c,f=(0|t.words[u])*(0|e.words[c]),h=67108863&f;s=67108863&(h=h+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o<a;o++)n[o]=e[t[o]],i[o]=r[t[o]]},g.prototype.transform=function(t,e,r,n,i,a){this.permute(a,t,e,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var f=l,h=c,p=0;p<o;p++){var d=r[u+p],g=n[u+p],v=r[u+p+o],m=n[u+p+o],y=f*v-h*m;m=f*m+h*v,v=y,r[u+p]=d+v,n[u+p]=g+m,r[u+p+o]=d-v,n[u+p+o]=g-m,p!==s&&(y=l*f-c*h,h=l*h+c*f,f=y)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var a=0,o=0;o<e;o++)a+=0|t[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,c,n),this.transform(o,a,s,l,n,i),this.transform(c,a,u,f,n,i);for(var p=0;p<n;p++){var d=s[p]*u[p]-l[p]*f[p];l[p]=s[p]*f[p]+l[p]*u[p],s[p]=d}return this.conjugate(s,l,n),this.transform(s,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),d(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){n(\\\"number\\\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,a=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(t){n(\\\"number\\\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e<this.length;e++){var s=this.words[e]&a,l=(0|this.words[e])-s<<r;this.words[e]=l|o,o=s>>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var i;n(\\\"number\\\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<<a,l=r;if(i-=o,i=Math.max(0,i),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-a|f>>>a,u=f&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n(\\\"number\\\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},a.prototype.imaskn=function(t){n(\\\"number\\\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\\\"imaskn works only with positive numbers\\\"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return n(\\\"number\\\"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n(\\\"number\\\"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var i,a,o=t.length+r;this._expand(o);var s=0;for(i=0;i<t.length;i++){a=(0|this.words[i+r])+s;var l=(0|t.words[i])*e;s=((a-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)s=(a=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(a=-(0|this.words[i])+s)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,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,l=n.length-i.length;if(\\\"mod\\\"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,l);0===u.negative&&(n=u,s&&(s.words[l]=1));for(var f=l-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),\\\"div\\\"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),\\\"mod\\\"!==e&&(i=s.div.neg()),\\\"div\\\"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),\\\"mod\\\"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),\\\"div\\\"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?\\\"div\\\"===e?{div:this.divn(t.words[0]),mod:null}:\\\"mod\\\"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,\\\"div\\\",!1).div},a.prototype.mod=function(t){return this.divmod(t,\\\"mod\\\",!1).mod},a.prototype.umod=function(t){return this.divmod(t,\\\"mod\\\",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n(\\\"number\\\"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,\\\"Number is too big\\\");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new w(t)},a.prototype.toRed=function(t){return n(!this.red,\\\"Already a number in reduction context\\\"),n(0===this.negative,\\\"red works only with positives\\\"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,\\\"fromRed works only with numbers in reduction context\\\"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,\\\"Already a number in reduction context\\\"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,\\\"redAdd works only with red numbers\\\"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,\\\"redIAdd works only with red numbers\\\"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,\\\"redSub works only with red numbers\\\"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,\\\"redISub works only with red numbers\\\"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,\\\"redShl works only with red numbers\\\"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,\\\"redMul works only with red numbers\\\"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,\\\"redMul works only with red numbers\\\"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,\\\"redSqr works only with red numbers\\\"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,\\\"redISqr works only with red numbers\\\"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,\\\"redSqrt works only with red numbers\\\"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,\\\"redInvm works only with red numbers\\\"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,\\\"redNeg works only with red numbers\\\"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,\\\"redPow(normalNum)\\\"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,\\\"k256\\\",\\\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\\\")}function x(){m.call(this,\\\"p224\\\",\\\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\\\")}function b(){m.call(this,\\\"p192\\\",\\\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\\\")}function _(){m.call(this,\\\"25519\\\",\\\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\\\")}function w(t){if(\\\"string\\\"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\\\"modulus must be greater than 1\\\"),this.m=t,this.prime=null}function k(t){w.call(this,t),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)}m.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(y,m),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(x,m),i(b,m),i(_,m),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(v[t])return v[t];var e;if(\\\"k256\\\"===t)e=new y;else if(\\\"p224\\\"===t)e=new x;else if(\\\"p192\\\"===t)e=new b;else{if(\\\"p25519\\\"!==t)throw new Error(\\\"Unknown prime \\\"+t);e=new _}return v[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,\\\"red works only with positives\\\"),n(t.red,\\\"red works only with red numbers\\\")},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\\\"red works only with positives\\\"),n(t.red&&t.red===e.red,\\\"red works only with red numbers\\\")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var g=p,v=0;0!==g.cmp(s);v++)g=g.redSqr();n(v<d);var m=this.pow(f,new a(1).iushln(d-v-1));h=h.redMul(m),f=m.redSqr(),p=p.redMul(f),d=v}return h},w.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},w.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,s=0,l=e.bitLength()%26;for(0===l&&(l=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,w),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),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)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(\\\"undefined\\\"==typeof e||e,this)},{buffer:91}],83:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e<i;++e)a+=t[e].length;var o=new Array(a),s=0;for(e=0;e<i;++e){var l=t[e],c=l.length;for(r=0;r<c;++r){var u=o[s++]=new Array(c-1),f=0;for(n=0;n<c;++n)n!==r&&(u[f++]=l[n]);if(1&r){var h=u[1];u[1]=u[0],u[0]=h}}}return o}},{}],84:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){switch(arguments.length){case 1:return n=[],c(i=t,i,u,!0),n;case 2:return\\\"function\\\"==typeof e?c(t,t,e,!0):function(t,e){return n=[],c(t,e,u,!1),n}(t,e);case 3:return c(t,e,r,!1);default:throw new Error(\\\"box-intersect: Invalid arguments\\\")}var i};var n,i=t(\\\"typedarray-pool\\\"),a=t(\\\"./lib/sweep\\\"),o=t(\\\"./lib/intersect\\\");function s(t,e){for(var r=0;r<t;++r)if(!(e[r]<=e[r+t]))return!0;return!1}function l(t,e,r,n){for(var i=0,a=0,o=0,l=t.length;o<l;++o){var c=t[o];if(!s(e,c)){for(var u=0;u<2*e;++u)r[i++]=c[u];n[a++]=o}}return a}function c(t,e,r,n){var s=t.length,c=e.length;if(!(s<=0||c<=0)){var u=t[0].length>>>1;if(!(u<=0)){var f,h=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(t,u,h,p))>0){if(1===u&&n)a.init(s),f=a.sweepComplete(u,r,0,s,h,p,0,s,h,p);else{var d=i.mallocDouble(2*u*c),g=i.mallocInt32(c);(c=l(e,u,d,g))>0&&(a.init(s+c),f=1===u?a.sweepBipartite(u,r,0,s,h,p,0,c,d,g):o(u,r,n,s,h,p,c,d,g),i.free(d),i.free(g))}i.free(h),i.free(p)}return f}}}function u(t,e){n.push([t,e])}},{\\\"./lib/intersect\\\":86,\\\"./lib/sweep\\\":90,\\\"typedarray-pool\\\":522}],85:[function(t,e,r){\\\"use strict\\\";var n=\\\"d\\\",i=\\\"ax\\\",a=\\\"vv\\\",o=\\\"fp\\\",s=\\\"es\\\",l=\\\"rs\\\",c=\\\"re\\\",u=\\\"rb\\\",f=\\\"ri\\\",h=\\\"rp\\\",p=\\\"bs\\\",d=\\\"be\\\",g=\\\"bb\\\",v=\\\"bi\\\",m=\\\"bp\\\",y=\\\"rv\\\",x=\\\"Q\\\",b=[n,i,a,l,c,u,f,p,d,g,v];function _(t){var e=\\\"bruteForce\\\"+(t?\\\"Full\\\":\\\"Partial\\\"),r=[],_=b.slice();t||_.splice(3,0,o);var w=[\\\"function \\\"+e+\\\"(\\\"+_.join()+\\\"){\\\"];function k(e,o){var _=function(t,e,r){var o=\\\"bruteForce\\\"+(t?\\\"Red\\\":\\\"Blue\\\")+(e?\\\"Flip\\\":\\\"\\\")+(r?\\\"Full\\\":\\\"\\\"),_=[\\\"function \\\",o,\\\"(\\\",b.join(),\\\"){\\\",\\\"var \\\",s,\\\"=2*\\\",n,\\\";\\\"],w=\\\"for(var i=\\\"+l+\\\",\\\"+h+\\\"=\\\"+s+\\\"*\\\"+l+\\\";i<\\\"+c+\\\";++i,\\\"+h+\\\"+=\\\"+s+\\\"){var x0=\\\"+u+\\\"[\\\"+i+\\\"+\\\"+h+\\\"],x1=\\\"+u+\\\"[\\\"+i+\\\"+\\\"+h+\\\"+\\\"+n+\\\"],xi=\\\"+f+\\\"[i];\\\",k=\\\"for(var j=\\\"+p+\\\",\\\"+m+\\\"=\\\"+s+\\\"*\\\"+p+\\\";j<\\\"+d+\\\";++j,\\\"+m+\\\"+=\\\"+s+\\\"){var y0=\\\"+g+\\\"[\\\"+i+\\\"+\\\"+m+\\\"],\\\"+(r?\\\"y1=\\\"+g+\\\"[\\\"+i+\\\"+\\\"+m+\\\"+\\\"+n+\\\"],\\\":\\\"\\\")+\\\"yi=\\\"+v+\\\"[j];\\\";return t?_.push(w,x,\\\":\\\",k):_.push(k,x,\\\":\\\",w),r?_.push(\\\"if(y1<x0||x1<y0)continue;\\\"):e?_.push(\\\"if(y0<=x0||x1<y0)continue;\\\"):_.push(\\\"if(y0<x0||x1<y0)continue;\\\"),_.push(\\\"for(var k=\\\"+i+\\\"+1;k<\\\"+n+\\\";++k){var r0=\\\"+u+\\\"[k+\\\"+h+\\\"],r1=\\\"+u+\\\"[k+\\\"+n+\\\"+\\\"+h+\\\"],b0=\\\"+g+\\\"[k+\\\"+m+\\\"],b1=\\\"+g+\\\"[k+\\\"+n+\\\"+\\\"+m+\\\"];if(r1<b0||b1<r0)continue \\\"+x+\\\";}var \\\"+y+\\\"=\\\"+a+\\\"(\\\"),e?_.push(\\\"yi,xi\\\"):_.push(\\\"xi,yi\\\"),_.push(\\\");if(\\\"+y+\\\"!==void 0)return \\\"+y+\\\";}}}\\\"),{name:o,code:_.join(\\\"\\\")}}(e,o,t);r.push(_.code),w.push(\\\"return \\\"+_.name+\\\"(\\\"+b.join()+\\\");\\\")}w.push(\\\"if(\\\"+c+\\\"-\\\"+l+\\\">\\\"+d+\\\"-\\\"+p+\\\"){\\\"),t?(k(!0,!1),w.push(\\\"}else{\\\"),k(!1,!1)):(w.push(\\\"if(\\\"+o+\\\"){\\\"),k(!0,!0),w.push(\\\"}else{\\\"),k(!0,!1),w.push(\\\"}}else{if(\\\"+o+\\\"){\\\"),k(!1,!0),w.push(\\\"}else{\\\"),k(!1,!1),w.push(\\\"}\\\")),w.push(\\\"}}return \\\"+e);var M=r.join(\\\"\\\")+w.join(\\\"\\\");return new Function(M)()}r.partial=_(!1),r.full=_(!0)},{}],86:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,a,u,S,C,E,L){!function(t,e){var r=8*i.log2(e+1)*(t+1)|0,a=i.nextPow2(b*r);w.length<a&&(n.free(w),w=n.mallocInt32(a));var o=i.nextPow2(_*r);k<o&&(n.free(k),k=n.mallocDouble(o))}(t,a+C);var z,O=0,I=2*t;M(O++,0,0,a,0,C,r?16:0,-1/0,1/0),r||M(O++,0,0,C,0,a,1,-1/0,1/0);for(;O>0;){var P=(O-=1)*b,D=w[P],R=w[P+1],B=w[P+2],F=w[P+3],N=w[P+4],j=w[P+5],V=O*_,U=k[V],q=k[V+1],H=1&j,G=!!(16&j),W=u,Y=S,X=E,Z=L;if(H&&(W=E,Y=L,X=u,Z=S),!(2&j&&(B=v(t,D,R,B,W,Y,q),R>=B)||4&j&&(R=m(t,D,R,B,W,Y,U))>=B)){var $=B-R,J=N-F;if(G){if(t*$*($+J)<p){if(void 0!==(z=l.scanComplete(t,D,e,R,B,W,Y,F,N,X,Z)))return z;continue}}else{if(t*Math.min($,J)<f){if(void 0!==(z=o(t,D,e,H,R,B,W,Y,F,N,X,Z)))return z;continue}if(t*$*J<h){if(void 0!==(z=l.scanBipartite(t,D,e,H,R,B,W,Y,F,N,X,Z)))return z;continue}}var K=d(t,D,R,B,W,Y,U,q);if(R<K)if(t*(K-R)<f){if(void 0!==(z=s(t,D+1,e,R,K,W,Y,F,N,X,Z)))return z}else if(D===t-2){if(void 0!==(z=H?l.sweepBipartite(t,e,F,N,X,Z,R,K,W,Y):l.sweepBipartite(t,e,R,K,W,Y,F,N,X,Z)))return z}else M(O++,D+1,R,K,F,N,H,-1/0,1/0),M(O++,D+1,F,N,R,K,1^H,-1/0,1/0);if(K<B){var Q=c(t,D,F,N,X,Z),tt=X[I*Q+D],et=g(t,D,Q,N,X,Z,tt);if(et<N&&M(O++,D,K,B,et,N,(4|H)+(G?16:0),tt,q),F<Q&&M(O++,D,K,B,F,Q,(2|H)+(G?16:0),U,tt),Q+1===et){if(void 0!==(z=G?T(t,D,e,K,B,W,Y,Q,X,Z[Q]):A(t,D,e,H,K,B,W,Y,Q,X,Z[Q])))return z}else if(Q<et){var rt;if(G){if(rt=y(t,D,K,B,W,Y,tt),K<rt){var nt=g(t,D,K,rt,W,Y,tt);if(D===t-2){if(K<nt&&void 0!==(z=l.sweepComplete(t,e,K,nt,W,Y,Q,et,X,Z)))return z;if(nt<rt&&void 0!==(z=l.sweepBipartite(t,e,nt,rt,W,Y,Q,et,X,Z)))return z}else K<nt&&M(O++,D+1,K,nt,Q,et,16,-1/0,1/0),nt<rt&&(M(O++,D+1,nt,rt,Q,et,0,-1/0,1/0),M(O++,D+1,Q,et,nt,rt,1,-1/0,1/0))}}else rt=H?x(t,D,K,B,W,Y,tt):y(t,D,K,B,W,Y,tt),K<rt&&(D===t-2?z=H?l.sweepBipartite(t,e,Q,et,X,Z,K,rt,W,Y):l.sweepBipartite(t,e,K,rt,W,Y,Q,et,X,Z):(M(O++,D+1,K,rt,Q,et,H,-1/0,1/0),M(O++,D+1,Q,et,K,rt,1^H,-1/0,1/0)))}}}}};var n=t(\\\"typedarray-pool\\\"),i=t(\\\"bit-twiddle\\\"),a=t(\\\"./brute\\\"),o=a.partial,s=a.full,l=t(\\\"./sweep\\\"),c=t(\\\"./median\\\"),u=t(\\\"./partition\\\"),f=128,h=1<<22,p=1<<22,d=u(\\\"!(lo>=p0)&&!(p1>=hi)\\\",[\\\"p0\\\",\\\"p1\\\"]),g=u(\\\"lo===p0\\\",[\\\"p0\\\"]),v=u(\\\"lo<p0\\\",[\\\"p0\\\"]),m=u(\\\"hi<=p0\\\",[\\\"p0\\\"]),y=u(\\\"lo<=p0&&p0<=hi\\\",[\\\"p0\\\"]),x=u(\\\"lo<p0&&p0<=hi\\\",[\\\"p0\\\"]),b=6,_=2,w=n.mallocInt32(1024),k=n.mallocDouble(1024);function M(t,e,r,n,i,a,o,s,l){var c=b*t;w[c]=e,w[c+1]=r,w[c+2]=n,w[c+3]=i,w[c+4]=a,w[c+5]=o;var u=_*t;k[u]=s,k[u+1]=l}function A(t,e,r,n,i,a,o,s,l,c,u){var f=2*t,h=l*f,p=c[h+e];t:for(var d=i,g=i*f;d<a;++d,g+=f){var v=o[g+e],m=o[g+e+t];if(!(p<v||m<p)&&(!n||p!==v)){for(var y,x=s[d],b=e+1;b<t;++b){v=o[g+b],m=o[g+b+t];var _=c[h+b],w=c[h+b+t];if(m<_||w<v)continue t}if(void 0!==(y=n?r(u,x):r(x,u)))return y}}}function T(t,e,r,n,i,a,o,s,l,c){var u=2*t,f=s*u,h=l[f+e];t:for(var p=n,d=n*u;p<i;++p,d+=u){var g=o[p];if(g!==c){var v=a[d+e],m=a[d+e+t];if(!(h<v||m<h)){for(var y=e+1;y<t;++y){v=a[d+y],m=a[d+y+t];var x=l[f+y],b=l[f+y+t];if(m<x||b<v)continue t}var _=r(g,c);if(void 0!==_)return _}}}}},{\\\"./brute\\\":85,\\\"./median\\\":87,\\\"./partition\\\":88,\\\"./sweep\\\":90,\\\"bit-twiddle\\\":80,\\\"typedarray-pool\\\":522}],87:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,o,s,l){if(o<=r+1)return r;var c=r,u=o,f=o+r>>>1,h=2*t,p=f,d=s[h*f+e];for(;c<u;){if(u-c<i){a(t,e,c,u,s,l),d=s[h*f+e];break}var g=u-c,v=Math.random()*g+c|0,m=s[h*v+e],y=Math.random()*g+c|0,x=s[h*y+e],b=Math.random()*g+c|0,_=s[h*b+e];m<=x?_>=x?(p=y,d=x):m>=_?(p=v,d=m):(p=b,d=_):x>=_?(p=y,d=x):_>=m?(p=v,d=m):(p=b,d=_);for(var w=h*(u-1),k=h*p,M=0;M<h;++M,++w,++k){var A=s[w];s[w]=s[k],s[k]=A}var T=l[u-1];l[u-1]=l[p],l[p]=T,p=n(t,e,c,u-1,s,l,d);for(var w=h*(u-1),k=h*p,M=0;M<h;++M,++w,++k){var A=s[w];s[w]=s[k],s[k]=A}var T=l[u-1];if(l[u-1]=l[p],l[p]=T,f<p){for(u=p-1;c<u&&s[h*(u-1)+e]===d;)u-=1;u+=1}else{if(!(p<f))break;for(c=p+1;c<u&&s[h*c+e]===d;)c+=1}}return n(t,e,r,f,s,l,s[h*f+e])};var n=t(\\\"./partition\\\")(\\\"lo<p0\\\",[\\\"p0\\\"]),i=8;function a(t,e,r,n,i,a){for(var o=2*t,s=o*(r+1)+e,l=r+1;l<n;++l,s+=o)for(var c=i[s],u=l,f=o*(l-1);u>r&&i[f+e]>c;--u,f-=o){for(var h=f,p=f+o,d=0;d<o;++d,++h,++p){var g=i[h];i[h]=i[p],i[p]=g}var v=a[u];a[u]=a[u-1],a[u-1]=v}}},{\\\"./partition\\\":88}],88:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=\\\"abcdef\\\".split(\\\"\\\").concat(e),i=[];t.indexOf(\\\"lo\\\")>=0&&i.push(\\\"lo=e[k+n]\\\");t.indexOf(\\\"hi\\\")>=0&&i.push(\\\"hi=e[k+o]\\\");return r.push(n.replace(\\\"_\\\",i.join()).replace(\\\"$\\\",t)),Function.apply(void 0,r)};var n=\\\"for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m\\\"},{}],89:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){e<=4*n?i(0,e-1,t):function t(e,r,f){var h=(r-e+1)/6|0,p=e+h,d=r-h,g=e+r>>1,v=g-h,m=g+h,y=p,x=v,b=g,_=m,w=d,k=e+1,M=r-1,A=0;c(y,x,f)&&(A=y,y=x,x=A);c(_,w,f)&&(A=_,_=w,w=A);c(y,b,f)&&(A=y,y=b,b=A);c(x,b,f)&&(A=x,x=b,b=A);c(y,_,f)&&(A=y,y=_,_=A);c(b,_,f)&&(A=b,b=_,_=A);c(x,w,f)&&(A=x,x=w,w=A);c(x,b,f)&&(A=x,x=b,b=A);c(_,w,f)&&(A=_,_=w,w=A);var T=f[2*x];var S=f[2*x+1];var C=f[2*_];var E=f[2*_+1];var L=2*y;var z=2*b;var O=2*w;var I=2*p;var P=2*g;var D=2*d;for(var R=0;R<2;++R){var B=f[L+R],F=f[z+R],N=f[O+R];f[I+R]=B,f[P+R]=F,f[D+R]=N}o(v,e,f);o(m,r,f);for(var j=k;j<=M;++j)if(u(j,T,S,f))j!==k&&a(j,k,f),++k;else if(!u(j,C,E,f))for(;;){if(u(M,C,E,f)){u(M,T,S,f)?(s(j,k,M,f),++k,--M):(a(j,M,f),--M);break}if(--M<j)break}l(e,k-1,T,S,f);l(r,M+1,C,E,f);k-2-e<=n?i(e,k-2,f):t(e,k-2,f);r-(M+2)<=n?i(M+2,r,f):t(M+2,r,f);M-k<=n?i(k,M,f):t(k,M,f)}(0,e-1,t)};var n=32;function i(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var c=r[l-2],u=r[l-1];if(c<a)break;if(c===a&&u<o)break;r[l]=c,r[l+1]=u,l-=2}r[l]=a,r[l+1]=o}}function a(t,e,r){e*=2;var n=r[t*=2],i=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=n,r[e+1]=i}function o(t,e,r){e*=2,r[t*=2]=r[e],r[t+1]=r[e+1]}function s(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}function l(t,e,r,n,i){e*=2,i[t*=2]=i[e],i[e]=r,i[t+1]=i[e+1],i[e+1]=n}function c(t,e,r){e*=2;var n=r[t*=2],i=r[e];return!(n<i)&&(n!==i||r[t+1]>r[e+1])}function u(t,e,r,n){var i=n[t*=2];return i<e||i===e&&n[t+1]<r}},{}],90:[function(t,e,r){\\\"use strict\\\";e.exports={init:function(t){var e=i.nextPow2(t);s.length<e&&(n.free(s),s=n.mallocInt32(e));l.length<e&&(n.free(l),l=n.mallocInt32(e));c.length<e&&(n.free(c),c=n.mallocInt32(e));u.length<e&&(n.free(u),u=n.mallocInt32(e));f.length<e&&(n.free(f),f=n.mallocInt32(e));h.length<e&&(n.free(h),h=n.mallocInt32(e));var r=8*e;p.length<r&&(n.free(p),p=n.mallocDouble(r))},sweepBipartite:function(t,e,r,n,i,f,h,v,m,y){for(var x=0,b=2*t,_=t-1,w=b-1,k=r;k<n;++k){var M=f[k],A=b*k;p[x++]=i[A+_],p[x++]=-(M+1),p[x++]=i[A+w],p[x++]=M}for(var k=h;k<v;++k){var M=y[k]+o,T=b*k;p[x++]=m[T+_],p[x++]=-M,p[x++]=m[T+w],p[x++]=M}var S=x>>>1;a(p,S);for(var C=0,E=0,k=0;k<S;++k){var L=0|p[2*k+1];if(L>=o)d(c,u,E--,L=L-o|0);else if(L>=0)d(s,l,C--,L);else if(L<=-o){L=-L-o|0;for(var z=0;z<C;++z){var O=e(s[z],L);if(void 0!==O)return O}g(c,u,E++,L)}else{L=-L-1|0;for(var z=0;z<E;++z){var O=e(L,c[z]);if(void 0!==O)return O}g(s,l,C++,L)}}},sweepComplete:function(t,e,r,n,i,o,v,m,y,x){for(var b=0,_=2*t,w=t-1,k=_-1,M=r;M<n;++M){var A=o[M]+1<<1,T=_*M;p[b++]=i[T+w],p[b++]=-A,p[b++]=i[T+k],p[b++]=A}for(var M=v;M<m;++M){var A=x[M]+1<<1,S=_*M;p[b++]=y[S+w],p[b++]=1|-A,p[b++]=y[S+k],p[b++]=1|A}var C=b>>>1;a(p,C);for(var E=0,L=0,z=0,M=0;M<C;++M){var O=0|p[2*M+1],I=1&O;if(M<C-1&&O>>1==p[2*M+3]>>1&&(I=2,M+=1),O<0){for(var P=-(O>>1)-1,D=0;D<z;++D){var R=e(f[D],P);if(void 0!==R)return R}if(0!==I)for(var D=0;D<E;++D){var R=e(s[D],P);if(void 0!==R)return R}if(1!==I)for(var D=0;D<L;++D){var R=e(c[D],P);if(void 0!==R)return R}0===I?g(s,l,E++,P):1===I?g(c,u,L++,P):2===I&&g(f,h,z++,P)}else{var P=(O>>1)-1;0===I?d(s,l,E--,P):1===I?d(c,u,L--,P):2===I&&d(f,h,z--,P)}}},scanBipartite:function(t,e,r,n,i,c,u,f,h,v,m,y){var x=0,b=2*t,_=e,w=e+t,k=1,M=1;n?M=o:k=o;for(var A=i;A<c;++A){var T=A+k,S=b*A;p[x++]=u[S+_],p[x++]=-T,p[x++]=u[S+w],p[x++]=T}for(var A=h;A<v;++A){var T=A+M,C=b*A;p[x++]=m[C+_],p[x++]=-T}var E=x>>>1;a(p,E);for(var L=0,A=0;A<E;++A){var z=0|p[2*A+1];if(z<0){var T=-z,O=!1;if(T>=o?(O=!n,T-=o):(O=!!n,T-=1),O)g(s,l,L++,T);else{var I=y[T],P=b*T,D=m[P+e+1],R=m[P+e+1+t];t:for(var B=0;B<L;++B){var F=s[B],N=b*F;if(!(R<u[N+e+1]||u[N+e+1+t]<D)){for(var j=e+2;j<t;++j)if(m[P+j+t]<u[N+j]||u[N+j+t]<m[P+j])continue t;var V,U=f[F];if(void 0!==(V=n?r(I,U):r(U,I)))return V}}}}else d(s,l,L--,z-k)}},scanComplete:function(t,e,r,n,i,l,c,u,f,h,d){for(var g=0,v=2*t,m=e,y=e+t,x=n;x<i;++x){var b=x+o,_=v*x;p[g++]=l[_+m],p[g++]=-b,p[g++]=l[_+y],p[g++]=b}for(var x=u;x<f;++x){var b=x+1,w=v*x;p[g++]=h[w+m],p[g++]=-b}var k=g>>>1;a(p,k);for(var M=0,x=0;x<k;++x){var A=0|p[2*x+1];if(A<0){var b=-A;if(b>=o)s[M++]=b-o;else{var T=d[b-=1],S=v*b,C=h[S+e+1],E=h[S+e+1+t];t:for(var L=0;L<M;++L){var z=s[L],O=c[z];if(O===T)break;var I=v*z;if(!(E<l[I+e+1]||l[I+e+1+t]<C)){for(var P=e+2;P<t;++P)if(h[S+P+t]<l[I+P]||l[I+P+t]<h[S+P])continue t;var D=r(O,T);if(void 0!==D)return D}}}}else{for(var b=A-o,L=M-1;L>=0;--L)if(s[L]===b){for(var P=L+1;P<M;++P)s[P-1]=s[P];break}--M}}}};var n=t(\\\"typedarray-pool\\\"),i=t(\\\"bit-twiddle\\\"),a=t(\\\"./sort\\\"),o=1<<28,s=n.mallocInt32(1024),l=n.mallocInt32(1024),c=n.mallocInt32(1024),u=n.mallocInt32(1024),f=n.mallocInt32(1024),h=n.mallocInt32(1024),p=n.mallocDouble(8192);function d(t,e,r,n){var i=e[n],a=t[r-1];t[i]=a,e[a]=i}function g(t,e,r,n){t[r]=n,e[n]=r}},{\\\"./sort\\\":89,\\\"bit-twiddle\\\":80,\\\"typedarray-pool\\\":522}],91:[function(t,e,r){},{}],92:[function(t,e,r){var n=Object.create||function(t){var e=function(){};return e.prototype=t,new e},i=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return r},a=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function o(){this._events&&Object.prototype.hasOwnProperty.call(this,\\\"_events\\\")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var s,l=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,\\\"x\\\",{value:0}),s=0===c.x}catch(t){s=!1}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function f(t,e,r,i){var a,o,s;if(\\\"function\\\"!=typeof r)throw new TypeError('\\\"listener\\\" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit(\\\"newListener\\\",e,r.listener?r.listener:r),o=t._events),s=o[e]):(o=t._events=n(null),t._eventsCount=0),s){if(\\\"function\\\"==typeof s?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),!s.warned&&(a=u(t))&&a>0&&s.length>a){s.warned=!0;var l=new Error(\\\"Possible EventEmitter memory leak detected. \\\"+s.length+' \\\"'+String(e)+'\\\" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name=\\\"MaxListenersExceededWarning\\\",l.emitter=t,l.type=e,l.count=s.length,\\\"object\\\"==typeof console&&console.warn&&console.warn(\\\"%s: %s\\\",l.name,l.message)}}else s=o[e]=r,++t._eventsCount;return t}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=a.call(h,n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(!n)return[];var i=n[e];return i?\\\"function\\\"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):v(i,i.length):[]}function g(t){var e=this._events;if(e){var r=e[t];if(\\\"function\\\"==typeof r)return 1;if(r)return r.length}return 0}function v(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}s?Object.defineProperty(o,\\\"defaultMaxListeners\\\",{enumerable:!0,get:function(){return l},set:function(t){if(\\\"number\\\"!=typeof t||t<0||t!=t)throw new TypeError('\\\"defaultMaxListeners\\\" must be a positive number');l=t}}):o.defaultMaxListeners=l,o.prototype.setMaxListeners=function(t){if(\\\"number\\\"!=typeof t||t<0||isNaN(t))throw new TypeError('\\\"n\\\" argument must be a positive number');return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){var e,r,n,i,a,o,s=\\\"error\\\"===t;if(o=this._events)s=s&&null==o.error;else if(!s)return!1;if(s){if(arguments.length>1&&(e=arguments[1]),e instanceof Error)throw e;var l=new Error('Unhandled \\\"error\\\" event. ('+e+\\\")\\\");throw l.context=e,l}if(!(r=o[t]))return!1;var c=\\\"function\\\"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,i=v(t,n),a=0;a<n;++a)i[a].call(r)}(r,c,this);break;case 2:!function(t,e,r,n){if(e)t.call(r,n);else for(var i=t.length,a=v(t,i),o=0;o<i;++o)a[o].call(r,n)}(r,c,this,arguments[1]);break;case 3:!function(t,e,r,n,i){if(e)t.call(r,n,i);else for(var a=t.length,o=v(t,a),s=0;s<a;++s)o[s].call(r,n,i)}(r,c,this,arguments[1],arguments[2]);break;case 4:!function(t,e,r,n,i,a){if(e)t.call(r,n,i,a);else for(var o=t.length,s=v(t,o),l=0;l<o;++l)s[l].call(r,n,i,a)}(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),a=1;a<n;a++)i[a-1]=arguments[a];!function(t,e,r,n){if(e)t.apply(r,n);else for(var i=t.length,a=v(t,i),o=0;o<i;++o)a[o].apply(r,n)}(r,c,this,i)}return!0},o.prototype.addListener=function(t,e){return f(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return f(this,t,e,!0)},o.prototype.once=function(t,e){if(\\\"function\\\"!=typeof e)throw new TypeError('\\\"listener\\\" argument must be a function');return this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){if(\\\"function\\\"!=typeof e)throw new TypeError('\\\"listener\\\" argument must be a function');return this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,i,a,o,s;if(\\\"function\\\"!=typeof e)throw new TypeError('\\\"listener\\\" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=n(null):(delete i[t],i.removeListener&&this.emit(\\\"removeListener\\\",t,r.listener||e));else if(\\\"function\\\"!=typeof r){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,a=o;break}if(a<0)return this;0===a?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n<i;r+=1,n+=1)t[r]=t[n];t.pop()}(r,a),1===r.length&&(i[t]=r[0]),i.removeListener&&this.emit(\\\"removeListener\\\",t,s||e)}return this},o.prototype.removeAllListeners=function(t){var e,r,a;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=n(null):delete r[t]),this;if(0===arguments.length){var o,s=i(r);for(a=0;a<s.length;++a)\\\"removeListener\\\"!==(o=s[a])&&this.removeAllListeners(o);return this.removeAllListeners(\\\"removeListener\\\"),this._events=n(null),this._eventsCount=0,this}if(\\\"function\\\"==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(a=e.length-1;a>=0;a--)this.removeListener(t,e[a]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return\\\"function\\\"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],93:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"base64-js\\\"),i=t(\\\"ieee754\\\");r.Buffer=s,r.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function o(t){if(t>a)throw new RangeError('The value \\\"'+t+'\\\" is invalid for option \\\"size\\\"');var e=new Uint8Array(t);return e.__proto__=s.prototype,e}function s(t,e,r){if(\\\"number\\\"==typeof t){if(\\\"string\\\"==typeof e)throw new TypeError('The \\\"string\\\" argument must be of type string. Received type number');return u(t)}return l(t,e,r)}function l(t,e,r){if(\\\"string\\\"==typeof t)return function(t,e){\\\"string\\\"==typeof e&&\\\"\\\"!==e||(e=\\\"utf8\\\");if(!s.isEncoding(e))throw new TypeError(\\\"Unknown encoding: \\\"+e);var r=0|p(t,e),n=o(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return f(t);if(null==t)throw TypeError(\\\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \\\"+typeof t);if(j(t,ArrayBuffer)||t&&j(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('\\\"offset\\\" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('\\\"length\\\" is outside of buffer bounds');var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=s.prototype,n}(t,e,r);if(\\\"number\\\"==typeof t)throw new TypeError('The \\\"value\\\" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);var i=function(t){if(s.isBuffer(t)){var e=0|h(t.length),r=o(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(void 0!==t.length)return\\\"number\\\"!=typeof t.length||V(t.length)?o(0):f(t);if(\\\"Buffer\\\"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if(\\\"undefined\\\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\\\"function\\\"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive](\\\"string\\\"),e,r);throw new TypeError(\\\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \\\"+typeof t)}function c(t){if(\\\"number\\\"!=typeof t)throw new TypeError('\\\"size\\\" argument must be of type number');if(t<0)throw new RangeError('The value \\\"'+t+'\\\" is invalid for option \\\"size\\\"')}function u(t){return c(t),o(t<0?0:0|h(t))}function f(t){for(var e=t.length<0?0:0|h(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t){if(t>=a)throw new RangeError(\\\"Attempt to allocate Buffer larger than maximum size: 0x\\\"+a.toString(16)+\\\" bytes\\\");return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if(\\\"string\\\"!=typeof t)throw new TypeError('The \\\"string\\\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case\\\"ascii\\\":case\\\"latin1\\\":case\\\"binary\\\":return r;case\\\"utf8\\\":case\\\"utf-8\\\":return B(t).length;case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return 2*r;case\\\"hex\\\":return r>>>1;case\\\"base64\\\":return F(t).length;default:if(i)return n?-1:B(t).length;e=(\\\"\\\"+e).toLowerCase(),i=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if(\\\"string\\\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if(\\\"string\\\"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if(\\\"number\\\"==typeof e)return e&=255,\\\"function\\\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError(\\\"val must be string, number or Buffer\\\")}function v(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&(\\\"ucs2\\\"===(n=String(n).toLowerCase())||\\\"ucs-2\\\"===n||\\\"utf16le\\\"===n||\\\"utf-16le\\\"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=r;a<s;a++)if(c(t,a)===c(e,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(r+l>s&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;h<l;h++)if(c(t,a+h)!==c(e,h)){f=!1;break}if(f)return a}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(V(s))return o;t[r+o]=s}return o}function y(t,e,r,n){return N(B(e,t.length-r),t,r,n)}function x(t,e,r,n){return N(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function b(t,e,r,n){return x(t,e,r,n)}function _(t,e,r,n){return N(F(e),t,r,n)}function w(t,e,r,n){return N(function(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function M(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a,o,s,l,c=t[i],u=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var r=\\\"\\\",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=A));return r}(n)}r.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||\\\"undefined\\\"==typeof console||\\\"function\\\"!=typeof console.error||console.error(\\\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\\\"),Object.defineProperty(s.prototype,\\\"parent\\\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,\\\"offset\\\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),\\\"undefined\\\"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(t,e,r){return l(t,e,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?o(t):void 0!==e?\\\"string\\\"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},s.allocUnsafe=function(t){return u(t)},s.allocUnsafeSlow=function(t){return u(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(j(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),j(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The \\\"buf1\\\", \\\"buf2\\\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case\\\"hex\\\":case\\\"utf8\\\":case\\\"utf-8\\\":case\\\"ascii\\\":case\\\"latin1\\\":case\\\"binary\\\":case\\\"base64\\\":case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('\\\"list\\\" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(j(a,Uint8Array)&&(a=s.from(a)),!s.isBuffer(a))throw new TypeError('\\\"list\\\" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError(\\\"Buffer size must be a multiple of 16-bits\\\");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError(\\\"Buffer size must be a multiple of 32-bits\\\");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError(\\\"Buffer size must be a multiple of 64-bits\\\");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?\\\"\\\":0===arguments.length?M(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return\\\"\\\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\\\"\\\";if((r>>>=0)<=(e>>>=0))return\\\"\\\";for(t||(t=\\\"utf8\\\");;)switch(t){case\\\"hex\\\":return C(this,e,r);case\\\"utf8\\\":case\\\"utf-8\\\":return M(this,e,r);case\\\"ascii\\\":return T(this,e,r);case\\\"latin1\\\":case\\\"binary\\\":return S(this,e,r);case\\\"base64\\\":return k(this,e,r);case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return E(this,e,r);default:if(n)throw new TypeError(\\\"Unknown encoding: \\\"+t);t=(t+\\\"\\\").toLowerCase(),n=!0}}.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError(\\\"Argument must be a Buffer\\\");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t=\\\"\\\",e=r.INSPECT_MAX_BYTES;return t=this.toString(\\\"hex\\\",0,e).replace(/(.{2})/g,\\\"$1 \\\").trim(),this.length>e&&(t+=\\\" ... \\\"),\\\"<Buffer \\\"+t+\\\">\\\"},s.prototype.compare=function(t,e,r,n,i){if(j(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The \\\"target\\\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError(\\\"out of range index\\\");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),l=Math.min(a,o),c=this.slice(n,i),u=t.slice(e,r),f=0;f<l;++f)if(c[f]!==u[f]){a=c[f],o=u[f];break}return a<o?-1:o<a?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n=\\\"utf8\\\",r=this.length,e=0;else if(void 0===r&&\\\"string\\\"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(\\\"Buffer.write(string, encoding, offset[, length]) is no longer supported\\\");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\\\"utf8\\\")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\\\"Attempt to write outside buffer bounds\\\");n||(n=\\\"utf8\\\");for(var a=!1;;)switch(n){case\\\"hex\\\":return m(this,t,e,r);case\\\"utf8\\\":case\\\"utf-8\\\":return y(this,t,e,r);case\\\"ascii\\\":return x(this,t,e,r);case\\\"latin1\\\":case\\\"binary\\\":return b(this,t,e,r);case\\\"base64\\\":return _(this,t,e,r);case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return w(this,t,e,r);default:if(a)throw new TypeError(\\\"Unknown encoding: \\\"+n);n=(\\\"\\\"+n).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:\\\"Buffer\\\",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(t,e,r){var n=\\\"\\\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function S(t,e,r){var n=\\\"\\\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i=\\\"\\\",a=e;a<r;++a)i+=R(t[a]);return i}function E(t,e,r){for(var n=t.slice(e,r),i=\\\"\\\",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError(\\\"offset is not uint\\\");if(t+e>r)throw new RangeError(\\\"Trying to access beyond buffer length\\\")}function z(t,e,r,n,i,a){if(!s.isBuffer(t))throw new TypeError('\\\"buffer\\\" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('\\\"value\\\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\\\"Index out of range\\\")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError(\\\"Index out of range\\\");if(r<0)throw new RangeError(\\\"Index out of range\\\")}function I(t,e,r,n,a){return e=+e,r>>>=0,a||O(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,a){return e=+e,r>>>=0,a||O(t,0,r,8),i.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError(\\\"argument should be a Buffer\\\");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError(\\\"targetStart out of bounds\\\");if(r<0||r>=this.length)throw new RangeError(\\\"Index out of range\\\");if(n<0)throw new RangeError(\\\"sourceEnd out of bounds\\\");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&\\\"function\\\"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var a=i-1;a>=0;--a)t[a+e]=this[a+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},s.prototype.fill=function(t,e,r,n){if(\\\"string\\\"==typeof t){if(\\\"string\\\"==typeof e?(n=e,e=0,r=this.length):\\\"string\\\"==typeof r&&(n=r,r=this.length),void 0!==n&&\\\"string\\\"!=typeof n)throw new TypeError(\\\"encoding must be a string\\\");if(\\\"string\\\"==typeof n&&!s.isEncoding(n))throw new TypeError(\\\"Unknown encoding: \\\"+n);if(1===t.length){var i=t.charCodeAt(0);(\\\"utf8\\\"===n&&i<128||\\\"latin1\\\"===n)&&(t=i)}}else\\\"number\\\"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError(\\\"Out of range index\\\");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\\\"number\\\"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var o=s.isBuffer(t)?t:s.from(t,n),l=o.length;if(0===l)throw new TypeError('The value \\\"'+t+'\\\" is invalid for argument \\\"value\\\"');for(a=0;a<r-e;++a)this[a+e]=o[a%l]}return this};var D=/[^+\\\\/0-9A-Za-z-_]/g;function R(t){return t<16?\\\"0\\\"+t.toString(16):t.toString(16)}function B(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\\\"Invalid code point\\\");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function F(t){return n.toByteArray(function(t){if((t=(t=t.split(\\\"=\\\")[0]).trim().replace(D,\\\"\\\")).length<2)return\\\"\\\";for(;t.length%4!=0;)t+=\\\"=\\\";return t}(t))}function N(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}},{\\\"base64-js\\\":62,ieee754:395}],94:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/monotone\\\"),i=t(\\\"./lib/triangulation\\\"),a=t(\\\"./lib/delaunay\\\"),o=t(\\\"./lib/filter\\\");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!c(r,\\\"delaunay\\\",!0),f=!!c(r,\\\"interior\\\",!0),h=!!c(r,\\\"exterior\\\",!0),p=!!c(r,\\\"infinity\\\",!1);if(!f&&!h||0===t.length)return[];var d=n(t,e);if(u||f!==h||p){for(var g=i(t.length,function(t){return t.map(s).sort(l)}(e)),v=0;v<d.length;++v){var m=d[v];g.addTriangle(m[0],m[1],m[2])}return u&&a(t,g),h?f?p?o(g,0,p):g.cells():o(g,1,p):o(g,-1)}return d}},{\\\"./lib/delaunay\\\":95,\\\"./lib/filter\\\":96,\\\"./lib/monotone\\\":97,\\\"./lib/triangulation\\\":98}],95:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"robust-in-sphere\\\")[4];t(\\\"binary-search-bounds\\\");function i(t,e,r,i,a,o){var s=e.opposite(i,a);if(!(s<0)){if(a<i){var l=i;i=a,a=l,l=o,o=s,s=l}e.isConstraint(i,a)||n(t[i],t[a],t[o],t[s])<0&&r.push(i,a)}}e.exports=function(t,e){for(var r=[],a=t.length,o=e.stars,s=0;s<a;++s)for(var l=o[s],c=1;c<l.length;c+=2){var u=l[c];if(!(u<s)&&!e.isConstraint(s,u)){for(var f=l[c-1],h=-1,p=1;p<l.length;p+=2)if(l[p-1]===u){h=l[p];break}h<0||n(t[s],t[u],t[f],t[h])<0&&r.push(s,u)}}for(;r.length>0;){for(var u=r.pop(),s=r.pop(),f=-1,h=-1,l=o[s],d=1;d<l.length;d+=2){var g=l[d-1],v=l[d];g===u?h=v:v===u&&(f=g)}f<0||h<0||(n(t[s],t[u],t[f],t[h])>=0||(e.flip(s,u),i(t,e,r,f,s,h),i(t,e,r,s,h,f),i(t,e,r,h,u,f),i(t,e,r,u,f,h)))}}},{\\\"binary-search-bounds\\\":99,\\\"robust-in-sphere\\\":484}],96:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"binary-search-bounds\\\");function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i<n;++i){var s=r[i],l=s[0],c=s[1],u=s[2];c<u?c<l&&(s[0]=c,s[1]=u,s[2]=l):u<l&&(s[0]=u,s[1]=l,s[2]=c)}r.sort(o);for(var f=new Array(n),i=0;i<f.length;++i)f[i]=0;var h=[],p=[],d=new Array(3*n),g=new Array(3*n),v=null;e&&(v=[]);for(var m=new a(r,d,g,f,h,p,v),i=0;i<n;++i)for(var s=r[i],y=0;y<3;++y){var l=s[y],c=s[(y+1)%3],x=d[3*i+y]=m.locate(c,l,t.opposite(c,l)),b=g[3*i+y]=t.isConstraint(l,c);x<0&&(b?p.push(i):(h.push(i),f[i]=1),e&&v.push([c,l,-1]))}return m}(t,r);if(0===e)return r?n.cells.concat(n.boundary):n.cells;var i=1,s=n.active,l=n.next,c=n.flags,u=n.cells,f=n.constraint,h=n.neighbor;for(;s.length>0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-i){c[p]=i;u[p];for(var d=0;d<3;++d){var g=h[3*p+d];g>=0&&0===c[g]&&(f[3*p+d]?l.push(g):(s.push(g),c[g]=i))}}}var v=l;l=s,s=v,l.length=0,i=-i}var m=function(t,e,r){for(var n=0,i=0;i<t.length;++i)e[i]===r&&(t[n++]=t[i]);return t.length=n,t}(u,c,e);if(r)return m.concat(n.boundary);return m},a.prototype.locate=(n=[0,0,0],function(t,e,r){var a=t,s=e,l=r;return e<r?e<t&&(a=e,s=r,l=t):r<t&&(a=r,s=t,l=e),a<0?-1:(n[0]=a,n[1]=s,n[2]=l,i.eq(this.cells,n,o))})},{\\\"binary-search-bounds\\\":99}],97:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"robust-orientation\\\")[3],a=0,o=1,s=2;function l(t,e,r,n,i){this.a=t,this.b=e,this.idx=r,this.lowerIds=n,this.upperIds=i}function c(t,e,r,n){this.a=t,this.b=e,this.type=r,this.idx=n}function u(t,e){var r=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return r||(t.type!==a&&(r=i(t.a,t.b,e.b))?r:t.idx-e.idx)}function f(t,e){return i(t.a,t.b,e)}function h(t,e,r,a,o){for(var s=n.lt(e,a,f),l=n.gt(e,a,f),c=s;c<l;++c){for(var u=e[c],h=u.lowerIds,p=h.length;p>1&&i(r[h[p-2]],r[h[p-1]],a)>0;)t.push([h[p-1],h[p-2],o]),p-=1;h.length=p,h.push(o);var d=u.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function p(t,e){var r;return(r=t.a[0]<e.a[0]?i(t.a,t.b,e.a):i(e.b,e.a,t.a))?r:(r=e.b[0]<t.b[0]?i(t.a,t.b,e.b):i(e.b,e.a,t.b))||t.idx-e.idx}function d(t,e,r){var i=n.le(t,r,p),a=t[i],o=a.upperIds,s=o[o.length-1];a.upperIds=[s],t.splice(i+1,0,new l(r.a,r.b,r.idx,[s],o))}function g(t,e,r){var i=r.a;r.a=r.b,r.b=i;var a=n.eq(t,r,p),o=t[a];t[a-1].upperIds=o.upperIds,t.splice(a,1)}e.exports=function(t,e){for(var r=t.length,n=e.length,i=[],f=0;f<r;++f)i.push(new c(t[f],null,a,f));for(var f=0;f<n;++f){var p=e[f],v=t[p[0]],m=t[p[1]];v[0]<m[0]?i.push(new c(v,m,s,f),new c(m,v,o,f)):v[0]>m[0]&&i.push(new c(m,v,s,f),new c(v,m,o,f))}i.sort(u);for(var y=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),x=[new l([y,1],[y,0],-1,[],[],[],[])],b=[],f=0,_=i.length;f<_;++f){var w=i[f],k=w.type;k===a?h(b,x,t,w.a,w.idx):k===s?d(x,t,w):g(x,t,w)}return b}},{\\\"binary-search-bounds\\\":99,\\\"robust-orientation\\\":486}],98:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\");function i(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=[];return new i(r,e)};var a=i.prototype;function o(t,e,r){for(var n=1,i=t.length;n<i;n+=2)if(t[n-1]===e&&t[n]===r)return t[n-1]=t[i-2],t[n]=t[i-1],void(t.length=i-2)}a.isConstraint=function(){var t=[0,0];function e(t,e){return t[0]-e[0]||t[1]-e[1]}return function(r,i){return t[0]=Math.min(r,i),t[1]=Math.max(r,i),n.eq(this.edges,t,e)>=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n<i;n+=2)if(r[n]===t)return r[n-1];return-1},a.flip=function(t,e){var r=this.opposite(t,e),n=this.opposite(e,t);this.removeTriangle(t,e,r),this.removeTriangle(e,t,n),this.addTriangle(t,n,r),this.addTriangle(e,r,n)},a.edges=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2)e.push([i[a],i[a+1]]);return e},a.cells=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2){var s=i[a],l=i[a+1];r<Math.min(s,l)&&e.push([r,s,l])}return e}},{\\\"binary-search-bounds\\\":99}],99:[function(t,e,r){\\\"use strict\\\";function n(t,e,r,n,i){var a=[\\\"function \\\",t,\\\"(a,l,h,\\\",n.join(\\\",\\\"),\\\"){\\\",i?\\\"\\\":\\\"var i=\\\",r?\\\"l-1\\\":\\\"h+1\\\",\\\";while(l<=h){var m=(l+h)>>>1,x=a[m]\\\"];return i?e.indexOf(\\\"c\\\")<0?a.push(\\\";if(x===y){return m}else if(x<=y){\\\"):a.push(\\\";var p=c(x,y);if(p===0){return m}else if(p<=0){\\\"):a.push(\\\";if(\\\",e,\\\"){i=m;\\\"),r?a.push(\\\"l=m+1}else{h=m-1}\\\"):a.push(\\\"h=m-1}else{l=m+1}\\\"),a.push(\\\"}\\\"),i?a.push(\\\"return -1};\\\"):a.push(\\\"return i};\\\"),a.join(\\\"\\\")}function i(t,e,r,i){return new Function([n(\\\"A\\\",\\\"x\\\"+t+\\\"y\\\",e,[\\\"y\\\"],i),n(\\\"P\\\",\\\"c(x,y)\\\"+t+\\\"0\\\",e,[\\\"y\\\",\\\"c\\\"],i),\\\"function dispatchBsearch\\\",r,\\\"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch\\\",r].join(\\\"\\\"))()}e.exports={ge:i(\\\">=\\\",!1,\\\"GE\\\"),gt:i(\\\">\\\",!1,\\\"GT\\\"),lt:i(\\\"<\\\",!0,\\\"LT\\\"),le:i(\\\"<=\\\",!0,\\\"LE\\\"),eq:i(\\\"-\\\",!0,\\\"EQ\\\",!0)}},{}],100:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=1,r=1;r<t.length;++r)for(var n=0;n<r;++n)if(t[r]<t[n])e=-e;else if(t[n]===t[r])return 0;return e}},{}],101:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"dup\\\"),i=t(\\\"robust-linear-solve\\\");function a(t,e){for(var r=0,n=t.length,i=0;i<n;++i)r+=t[i]*e[i];return r}function o(t){var e=t.length;if(0===e)return[];t[0].length;var r=n([t.length+1,t.length+1],1),o=n([t.length+1],1);r[e][e]=0;for(var s=0;s<e;++s){for(var l=0;l<=s;++l)r[l][s]=r[s][l]=2*a(t[s],t[l]);o[s]=a(t[s],t[s])}var c=i(r,o),u=0,f=c[e+1];for(s=0;s<f.length;++s)u+=f[s];var h=new Array(e);for(s=0;s<e;++s){f=c[s];var p=0;for(l=0;l<f.length;++l)p+=f[l];h[s]=p/u}return h}function s(t){if(0===t.length)return[];for(var e=t[0].length,r=n([e]),i=o(t),a=0;a<t.length;++a)for(var s=0;s<e;++s)r[s]+=t[a][s]*i[a];return r}s.barycenetric=o,e.exports=s},{dup:155,\\\"robust-linear-solve\\\":485}],102:[function(t,e,r){e.exports=function(t){for(var e=n(t),r=0,i=0;i<t.length;++i)for(var a=t[i],o=0;o<e.length;++o)r+=Math.pow(a[o]-e[o],2);return Math.sqrt(r/t.length)};var n=t(\\\"circumcenter\\\")},{circumcenter:101}],103:[function(t,e,r){e.exports=function(t,e,r){return e<r?t<e?e:t>r?r:t:t<r?r:t>e?e:t}},{}],104:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a<e.length;++a){var o=e[a];i[a]=[o[0],o[1],r[a]]}e=i}var s=function(t,e,r){var n=d(t,[],p(t));return m(e,n,r),!!n}(t,e,!!r);for(;y(t,e,!!r);)s=!0;if(r&&s){n.length=0,r.length=0;for(var a=0;a<e.length;++a){var o=e[a];n.push([o[0],o[1]]),r.push(o[2])}}return s};var n=t(\\\"union-find\\\"),i=t(\\\"box-intersect\\\"),a=t(\\\"robust-segment-intersect\\\"),o=t(\\\"big-rat\\\"),s=t(\\\"big-rat/cmp\\\"),l=t(\\\"big-rat/to-float\\\"),c=t(\\\"rat-vec\\\"),u=t(\\\"nextafter\\\"),f=t(\\\"./lib/rat-seg-intersect\\\");function h(t){var e=l(t);return[u(e,-1/0),u(e,1/0)]}function p(t){for(var e=new Array(t.length),r=0;r<t.length;++r){var n=t[r];e[r]=[u(n[0],-1/0),u(n[1],-1/0),u(n[0],1/0),u(n[1],1/0)]}return e}function d(t,e,r){for(var a=e.length,o=new n(a),s=[],l=0;l<e.length;++l){var c=e[l],f=h(c[0]),p=h(c[1]);s.push([u(f[0],-1/0),u(p[0],-1/0),u(f[1],1/0),u(p[1],1/0)])}i(s,function(t,e){o.link(t,e)});var d=!0,g=new Array(a);for(l=0;l<a;++l){(m=o.find(l))!==l&&(d=!1,t[m]=[Math.min(t[l][0],t[m][0]),Math.min(t[l][1],t[m][1])])}if(d)return null;var v=0;for(l=0;l<a;++l){var m;(m=o.find(l))===l?(g[l]=v,t[v++]=t[l]):g[l]=-1}t.length=v;for(l=0;l<a;++l)g[l]<0&&(g[l]=g[o.find(l)]);return g}function g(t,e){return t[0]-e[0]||t[1]-e[1]}function v(t,e){var r=t[0]-e[0]||t[1]-e[1];return r||(t[2]<e[2]?-1:t[2]>e[2]?1:0)}function m(t,e,r){if(0!==t.length){if(e)for(var n=0;n<t.length;++n){var i=e[(o=t[n])[0]],a=e[o[1]];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}else for(n=0;n<t.length;++n){var o;i=(o=t[n])[0],a=o[1];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}r?t.sort(v):t.sort(g);var s=1;for(n=1;n<t.length;++n){var l=t[n-1],c=t[n];(c[0]!==l[0]||c[1]!==l[1]||r&&c[2]!==l[2])&&(t[s++]=c)}t.length=s}}function y(t,e,r){var n=function(t,e){for(var r=new Array(e.length),n=0;n<e.length;++n){var i=e[n],a=t[i[0]],o=t[i[1]];r[n]=[u(Math.min(a[0],o[0]),-1/0),u(Math.min(a[1],o[1]),-1/0),u(Math.max(a[0],o[0]),1/0),u(Math.max(a[1],o[1]),1/0)]}return r}(t,e),h=function(t,e,r){var n=[];return i(r,function(r,i){var o=e[r],s=e[i];if(o[0]!==s[0]&&o[0]!==s[1]&&o[1]!==s[0]&&o[1]!==s[1]){var l=t[o[0]],c=t[o[1]],u=t[s[0]],f=t[s[1]];a(l,c,u,f)&&n.push([r,i])}}),n}(t,e,n),g=p(t),v=function(t,e,r,n){var o=[];return i(r,n,function(r,n){var i=e[r];if(i[0]!==n&&i[1]!==n){var s=t[n],l=t[i[0]],c=t[i[1]];a(l,c,s,s)&&o.push([r,n])}}),o}(t,e,n,g),y=d(t,function(t,e,r,n,i){var a,u,h=t.map(function(t){return[o(t[0]),o(t[1])]});for(a=0;a<r.length;++a){var p=r[a];u=p[0];var d=p[1],g=e[u],v=e[d],m=f(c(t[g[0]]),c(t[g[1]]),c(t[v[0]]),c(t[v[1]]));if(m){var y=t.length;t.push([l(m[0]),l(m[1])]),h.push(m),n.push([u,y],[d,y])}}for(n.sort(function(t,e){if(t[0]!==e[0])return t[0]-e[0];var r=h[t[1]],n=h[e[1]];return s(r[0],n[0])||s(r[1],n[1])}),a=n.length-1;a>=0;--a){var x=e[u=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],k=t[_];if((w[0]-k[0]||w[1]-k[1])<0){var M=b;b=_,_=M}x[0]=b;var A,T=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===u;){var S,C=(S=n[--a])[1];i?e.push([T,C,A]):e.push([T,C]),T=C}i?e.push([T,_,A]):e.push([T,_])}return h}(t,e,h,v,r));return m(e,y,r),!!y||(h.length>0||v.length>0)}},{\\\"./lib/rat-seg-intersect\\\":105,\\\"big-rat\\\":66,\\\"big-rat/cmp\\\":64,\\\"big-rat/to-float\\\":78,\\\"box-intersect\\\":84,nextafter:434,\\\"rat-vec\\\":469,\\\"robust-segment-intersect\\\":489,\\\"union-find\\\":523}],105:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var a=s(e,t),f=s(n,r),h=u(a,f);if(0===o(h))return null;var p=s(t,r),d=u(f,p),g=i(d,h),v=c(a,g);return l(t,v)};var n=t(\\\"big-rat/mul\\\"),i=t(\\\"big-rat/div\\\"),a=t(\\\"big-rat/sub\\\"),o=t(\\\"big-rat/sign\\\"),s=t(\\\"rat-vec/sub\\\"),l=t(\\\"rat-vec/add\\\"),c=t(\\\"rat-vec/muls\\\");function u(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},{\\\"big-rat/div\\\":65,\\\"big-rat/mul\\\":75,\\\"big-rat/sign\\\":76,\\\"big-rat/sub\\\":77,\\\"rat-vec/add\\\":468,\\\"rat-vec/muls\\\":470,\\\"rat-vec/sub\\\":471}],106:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"clamp\\\");function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((a=255&n(a,0,255))<<8)+(o=255&n(o,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:103}],107:[function(t,e,r){\\\"use strict\\\";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],108:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-rgba\\\"),i=t(\\\"clamp\\\"),a=t(\\\"dtype\\\");e.exports=function(t,e){\\\"float\\\"!==e&&e||(e=\\\"array\\\"),\\\"uint\\\"===e&&(e=\\\"uint8\\\"),\\\"uint_clamped\\\"===e&&(e=\\\"uint8_clamped\\\");var r=new(a(e))(4),o=\\\"uint8\\\"!==e&&\\\"uint8_clamped\\\"!==e;return t.length&&\\\"string\\\"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},{clamp:103,\\\"color-rgba\\\":110,dtype:154}],109:[function(t,e,r){(function(r){\\\"use strict\\\";var n=t(\\\"color-name\\\"),i=t(\\\"is-plain-obj\\\"),a=t(\\\"defined\\\");e.exports=function(t){var e,s,l=[],c=1;if(\\\"string\\\"==typeof t)if(n[t])l=n[t].slice(),s=\\\"rgb\\\";else if(\\\"transparent\\\"===t)c=0,s=\\\"rgb\\\",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1),f=u.length,h=f<=4;c=1,h?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===f&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===f&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s=\\\"rgb\\\"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\\\\s*\\\\(([^\\\\)]*)\\\\)/.exec(t)){var p=e[1],u=p.replace(/a$/,\\\"\\\");s=u;var f=\\\"cmyk\\\"===u?4:\\\"gray\\\"===u?1:3;l=e[2].trim().split(/\\\\s*,\\\\s*/).map(function(t,e){if(/%$/.test(t))return e===f?parseFloat(t)/100:\\\"rgb\\\"===u?255*parseFloat(t)/100:parseFloat(t);if(\\\"h\\\"===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),p===u&&l.push(1),c=void 0===l[f]?1:l[f],l=l.slice(0,f)}else t.length>10&&/[0-9](?:\\\\s|\\\\/)/.test(t)&&(l=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),s=t.match(/([a-z])/gi).join(\\\"\\\").toLowerCase());else if(isNaN(t))if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s=\\\"rgb\\\",l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s=\\\"hsl\\\",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s=\\\"rgb\\\",c=4===t.length?t[3]:1);else s=\\\"rgb\\\",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"color-name\\\":107,defined:149,\\\"is-plain-obj\\\":405}],110:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-parse\\\"),i=t(\\\"color-space/hsl\\\"),a=t(\\\"clamp\\\");e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),\\\"h\\\"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:103,\\\"color-parse\\\":109,\\\"color-space/hsl\\\":111}],111:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./rgb\\\");e.exports={name:\\\"hsl\\\",min:[0,0,0],max:[360,100,100],channel:[\\\"hue\\\",\\\"saturation\\\",\\\"lightness\\\"],alias:[\\\"HSL\\\"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[c]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+s)/2,[e,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},{\\\"./rgb\\\":112}],112:[function(t,e,r){\\\"use strict\\\";e.exports={name:\\\"rgb\\\",min:[0,0,0],max:[255,255,255],channel:[\\\"red\\\",\\\"green\\\",\\\"blue\\\"],alias:[\\\"RGB\\\"]}},{}],113:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],\\\"rainbow-soft\\\":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],\\\"freesurface-blue\\\":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],\\\"freesurface-red\\\":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],\\\"velocity-blue\\\":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],\\\"velocity-green\\\":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],114:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./colorScale\\\"),i=t(\\\"lerp\\\");function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r=\\\"#\\\",n=0;n<3;++n)r+=(\\\"00\\\"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return\\\"rgba(\\\"+t.join(\\\",\\\")+\\\")\\\"}e.exports=function(t){var e,r,l,c,u,f,h,p,d,g;t||(t={});p=(t.nshades||72)-1,h=t.format||\\\"hex\\\",(f=t.colormap)||(f=\\\"jet\\\");if(\\\"string\\\"==typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+\\\" not a supported colorscale\\\");u=n[f]}else{if(!Array.isArray(f))throw Error(\\\"unsupported colormap option\\\",f);u=f.slice()}if(u.length>p)throw new Error(f+\\\" map requires nshades to be at least size \\\"+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():\\\"number\\\"==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map(function(t){return Math.round(t.index*p)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var v=u.map(function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1?n:(n[3]=d[0]+(d[1]-d[0])*r,n)}),m=[];for(g=0;g<e.length-1;++g){c=e[g+1]-e[g],r=v[g],l=v[g+1];for(var y=0;y<c;y++){var x=y/c;m.push([Math.round(i(r[0],l[0],x)),Math.round(i(r[1],l[1],x)),Math.round(i(r[2],l[2],x)),i(r[3],l[3],x)])}}m.push(u[u.length-1].rgb.concat(d[1])),\\\"hex\\\"===h?m=m.map(o):\\\"rgbaString\\\"===h?m=m.map(s):\\\"float\\\"===h&&(m=m.map(a));return m}},{\\\"./colorScale\\\":113,lerp:408}],115:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,a){var o=n(e,r,a);if(0===o){var s=i(n(t,e,r)),c=i(n(t,e,a));if(s===c){if(0===s){var u=l(t,e,r),f=l(t,e,a);return u===f?0:u?1:-1}return 0}return 0===c?s>0?-1:l(t,e,a)?-1:1:0===s?c>0?1:l(t,e,r)?1:-1:i(c-s)}var h=n(t,e,r);if(h>0)return o>0&&n(t,e,a)>0?1:-1;if(h<0)return o>0||n(t,e,a)>0?1:-1;var p=n(t,e,a);return p>0?1:l(t,e,r)?1:-1};var n=t(\\\"robust-orientation\\\"),i=t(\\\"signum\\\"),a=t(\\\"two-sum\\\"),o=t(\\\"robust-product\\\"),s=t(\\\"robust-sum\\\");function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),c=a(r[1],-e[1]),u=s(o(n,l),o(i,c));return u[u.length-1]>=0}},{\\\"robust-orientation\\\":486,\\\"robust-product\\\":487,\\\"robust-sum\\\":491,signum:492,\\\"two-sum\\\":521}],116:[function(t,e,r){e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],f=t[1],h=t[2],p=t[3],d=e[0],g=e[1],v=e[2],m=e[3];return u+f+h+p-(d+g+v+m)||n(u,f,h,p)-n(d,g,v,m,d)||n(u+f,u+h,u+p,f+h,f+p,h+p)-n(d+g,d+v,d+m,g+v,g+m,v+m)||n(u+f+h,u+f+p,u+h+p,f+h+p)-n(d+g+v,d+g+m,d+v+m,g+v+m);default:for(var y=t.slice().sort(i),x=e.slice().sort(i),b=0;b<r;++b)if(a=y[b]-x[b])return a;return 0}};var n=Math.min;function i(t,e){return t-e}},{}],117:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"compare-cell\\\"),i=t(\\\"cell-orientation\\\");e.exports=function(t,e){return n(t,e)||i(t)-i(e)}},{\\\"cell-orientation\\\":100,\\\"compare-cell\\\":116}],118:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/ch1d\\\"),i=t(\\\"./lib/ch2d\\\"),a=t(\\\"./lib/chnd\\\");e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[[0]];var r=t[0].length;if(0===r)return[];if(1===r)return n(t);if(2===r)return i(t);return a(t,r)}},{\\\"./lib/ch1d\\\":119,\\\"./lib/ch2d\\\":120,\\\"./lib/chnd\\\":121}],119:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=0,r=0,n=1;n<t.length;++n)t[n][0]<t[e][0]&&(e=n),t[n][0]>t[r][0]&&(r=n);return e<r?[[e],[r]]:e>r?[[r],[e]]:[[e]]}},{}],120:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o<r;++o){var s=e[o];i[o]=[a,s],a=s}return i};var n=t(\\\"monotone-convex-hull-2d\\\")},{\\\"monotone-convex-hull-2d\\\":417}],121:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){try{return n(t,!0)}catch(s){var r=i(t);if(r.length<=e)return[];var a=function(t,e){for(var r=t.length,n=new Array(r),i=0;i<e.length;++i)n[i]=t[e[i]];for(var a=e.length,i=0;i<r;++i)e.indexOf(i)<0&&(n[a++]=t[i]);return n}(t,r),o=n(a,!0);return function(t,e){for(var r=t.length,n=e.length,i=0;i<r;++i)for(var a=t[i],o=0;o<a.length;++o){var s=a[o];if(s<n)a[o]=e[s];else{s-=n;for(var l=0;l<n;++l)s>=e[l]&&(s+=1);a[o]=s}}return t}(o,r)}};var n=t(\\\"incremental-convex-hull\\\"),i=t(\\\"affine-hull\\\")},{\\\"affine-hull\\\":50,\\\"incremental-convex-hull\\\":396}],122:[function(t,e,r){e.exports={AFG:\\\"afghan\\\",ALA:\\\"\\\\\\\\b\\\\\\\\wland\\\",ALB:\\\"albania\\\",DZA:\\\"algeria\\\",ASM:\\\"^(?=.*americ).*samoa\\\",AND:\\\"andorra\\\",AGO:\\\"angola\\\",AIA:\\\"anguill?a\\\",ATA:\\\"antarctica\\\",ATG:\\\"antigua\\\",ARG:\\\"argentin\\\",ARM:\\\"armenia\\\",ABW:\\\"^(?!.*bonaire).*\\\\\\\\baruba\\\",AUS:\\\"australia\\\",AUT:\\\"^(?!.*hungary).*austria|\\\\\\\\baustri.*\\\\\\\\bemp\\\",AZE:\\\"azerbaijan\\\",BHS:\\\"bahamas\\\",BHR:\\\"bahrain\\\",BGD:\\\"bangladesh|^(?=.*east).*paki?stan\\\",BRB:\\\"barbados\\\",BLR:\\\"belarus|byelo\\\",BEL:\\\"^(?!.*luxem).*belgium\\\",BLZ:\\\"belize|^(?=.*british).*honduras\\\",BEN:\\\"benin|dahome\\\",BMU:\\\"bermuda\\\",BTN:\\\"bhutan\\\",BOL:\\\"bolivia\\\",BES:\\\"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\\\\\\\bbes.?islands\\\",BIH:\\\"herzegovina|bosnia\\\",BWA:\\\"botswana|bechuana\\\",BVT:\\\"bouvet\\\",BRA:\\\"brazil\\\",IOT:\\\"british.?indian.?ocean\\\",BRN:\\\"brunei\\\",BGR:\\\"bulgaria\\\",BFA:\\\"burkina|\\\\\\\\bfaso|upper.?volta\\\",BDI:\\\"burundi\\\",CPV:\\\"verde\\\",KHM:\\\"cambodia|kampuchea|khmer\\\",CMR:\\\"cameroon\\\",CAN:\\\"canada\\\",CYM:\\\"cayman\\\",CAF:\\\"\\\\\\\\bcentral.african.republic\\\",TCD:\\\"\\\\\\\\bchad\\\",CHL:\\\"\\\\\\\\bchile\\\",CHN:\\\"^(?!.*\\\\\\\\bmac)(?!.*\\\\\\\\bhong)(?!.*\\\\\\\\btai)(?!.*\\\\\\\\brep).*china|^(?=.*peo)(?=.*rep).*china\\\",CXR:\\\"christmas\\\",CCK:\\\"\\\\\\\\bcocos|keeling\\\",COL:\\\"colombia\\\",COM:\\\"comoro\\\",COG:\\\"^(?!.*\\\\\\\\bdem)(?!.*\\\\\\\\bd[\\\\\\\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\\\\\\\bcongo\\\",COK:\\\"\\\\\\\\bcook\\\",CRI:\\\"costa.?rica\\\",CIV:\\\"ivoire|ivory\\\",HRV:\\\"croatia\\\",CUB:\\\"\\\\\\\\bcuba\\\",CUW:\\\"^(?!.*bonaire).*\\\\\\\\bcura(c|\\\\xe7)ao\\\",CYP:\\\"cyprus\\\",CSK:\\\"czechoslovakia\\\",CZE:\\\"^(?=.*rep).*czech|czechia|bohemia\\\",COD:\\\"\\\\\\\\bdem.*congo|congo.*\\\\\\\\bdem|congo.*\\\\\\\\bd[\\\\\\\\.]?r|\\\\\\\\bd[\\\\\\\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc\\\",DNK:\\\"denmark\\\",DJI:\\\"djibouti\\\",DMA:\\\"dominica(?!n)\\\",DOM:\\\"dominican.rep\\\",ECU:\\\"ecuador\\\",EGY:\\\"egypt\\\",SLV:\\\"el.?salvador\\\",GNQ:\\\"guine.*eq|eq.*guine|^(?=.*span).*guinea\\\",ERI:\\\"eritrea\\\",EST:\\\"estonia\\\",ETH:\\\"ethiopia|abyssinia\\\",FLK:\\\"falkland|malvinas\\\",FRO:\\\"faroe|faeroe\\\",FJI:\\\"fiji\\\",FIN:\\\"finland\\\",FRA:\\\"^(?!.*\\\\\\\\bdep)(?!.*martinique).*france|french.?republic|\\\\\\\\bgaul\\\",GUF:\\\"^(?=.*french).*guiana\\\",PYF:\\\"french.?polynesia|tahiti\\\",ATF:\\\"french.?southern\\\",GAB:\\\"gabon\\\",GMB:\\\"gambia\\\",GEO:\\\"^(?!.*south).*georgia\\\",DDR:\\\"german.?democratic.?republic|democratic.?republic.*germany|east.germany\\\",DEU:\\\"^(?!.*east).*germany|^(?=.*\\\\\\\\bfed.*\\\\\\\\brep).*german\\\",GHA:\\\"ghana|gold.?coast\\\",GIB:\\\"gibraltar\\\",GRC:\\\"greece|hellenic|hellas\\\",GRL:\\\"greenland\\\",GRD:\\\"grenada\\\",GLP:\\\"guadeloupe\\\",GUM:\\\"\\\\\\\\bguam\\\",GTM:\\\"guatemala\\\",GGY:\\\"guernsey\\\",GIN:\\\"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea\\\",GNB:\\\"bissau|^(?=.*portu).*guinea\\\",GUY:\\\"guyana|british.?guiana\\\",HTI:\\\"haiti\\\",HMD:\\\"heard.*mcdonald\\\",VAT:\\\"holy.?see|vatican|papal.?st\\\",HND:\\\"^(?!.*brit).*honduras\\\",HKG:\\\"hong.?kong\\\",HUN:\\\"^(?!.*austr).*hungary\\\",ISL:\\\"iceland\\\",IND:\\\"india(?!.*ocea)\\\",IDN:\\\"indonesia\\\",IRN:\\\"\\\\\\\\biran|persia\\\",IRQ:\\\"\\\\\\\\biraq|mesopotamia\\\",IRL:\\\"(^ireland)|(^republic.*ireland)\\\",IMN:\\\"^(?=.*isle).*\\\\\\\\bman\\\",ISR:\\\"israel\\\",ITA:\\\"italy\\\",JAM:\\\"jamaica\\\",JPN:\\\"japan\\\",JEY:\\\"jersey\\\",JOR:\\\"jordan\\\",KAZ:\\\"kazak\\\",KEN:\\\"kenya|british.?east.?africa|east.?africa.?prot\\\",KIR:\\\"kiribati\\\",PRK:\\\"^(?=.*democrat|people|north|d.*p.*.r).*\\\\\\\\bkorea|dprk|korea.*(d.*p.*r)\\\",KWT:\\\"kuwait\\\",KGZ:\\\"kyrgyz|kirghiz\\\",LAO:\\\"\\\\\\\\blaos?\\\\\\\\b\\\",LVA:\\\"latvia\\\",LBN:\\\"lebanon\\\",LSO:\\\"lesotho|basuto\\\",LBR:\\\"liberia\\\",LBY:\\\"libya\\\",LIE:\\\"liechtenstein\\\",LTU:\\\"lithuania\\\",LUX:\\\"^(?!.*belg).*luxem\\\",MAC:\\\"maca(o|u)\\\",MDG:\\\"madagascar|malagasy\\\",MWI:\\\"malawi|nyasa\\\",MYS:\\\"malaysia\\\",MDV:\\\"maldive\\\",MLI:\\\"\\\\\\\\bmali\\\\\\\\b\\\",MLT:\\\"\\\\\\\\bmalta\\\",MHL:\\\"marshall\\\",MTQ:\\\"martinique\\\",MRT:\\\"mauritania\\\",MUS:\\\"mauritius\\\",MYT:\\\"\\\\\\\\bmayotte\\\",MEX:\\\"\\\\\\\\bmexic\\\",FSM:\\\"fed.*micronesia|micronesia.*fed\\\",MCO:\\\"monaco\\\",MNG:\\\"mongolia\\\",MNE:\\\"^(?!.*serbia).*montenegro\\\",MSR:\\\"montserrat\\\",MAR:\\\"morocco|\\\\\\\\bmaroc\\\",MOZ:\\\"mozambique\\\",MMR:\\\"myanmar|burma\\\",NAM:\\\"namibia\\\",NRU:\\\"nauru\\\",NPL:\\\"nepal\\\",NLD:\\\"^(?!.*\\\\\\\\bant)(?!.*\\\\\\\\bcarib).*netherlands\\\",ANT:\\\"^(?=.*\\\\\\\\bant).*(nether|dutch)\\\",NCL:\\\"new.?caledonia\\\",NZL:\\\"new.?zealand\\\",NIC:\\\"nicaragua\\\",NER:\\\"\\\\\\\\bniger(?!ia)\\\",NGA:\\\"nigeria\\\",NIU:\\\"niue\\\",NFK:\\\"norfolk\\\",MNP:\\\"mariana\\\",NOR:\\\"norway\\\",OMN:\\\"\\\\\\\\boman|trucial\\\",PAK:\\\"^(?!.*east).*paki?stan\\\",PLW:\\\"palau\\\",PSE:\\\"palestin|\\\\\\\\bgaza|west.?bank\\\",PAN:\\\"panama\\\",PNG:\\\"papua|new.?guinea\\\",PRY:\\\"paraguay\\\",PER:\\\"peru\\\",PHL:\\\"philippines\\\",PCN:\\\"pitcairn\\\",POL:\\\"poland\\\",PRT:\\\"portugal\\\",PRI:\\\"puerto.?rico\\\",QAT:\\\"qatar\\\",KOR:\\\"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\\\\\\\bkorea(?!.*d.*p.*r)\\\",MDA:\\\"moldov|b(a|e)ssarabia\\\",REU:\\\"r(e|\\\\xe9)union\\\",ROU:\\\"r(o|u|ou)mania\\\",RUS:\\\"\\\\\\\\brussia|soviet.?union|u\\\\\\\\.?s\\\\\\\\.?s\\\\\\\\.?r|socialist.?republics\\\",RWA:\\\"rwanda\\\",BLM:\\\"barth(e|\\\\xe9)lemy\\\",SHN:\\\"helena\\\",KNA:\\\"kitts|\\\\\\\\bnevis\\\",LCA:\\\"\\\\\\\\blucia\\\",MAF:\\\"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)\\\",SPM:\\\"miquelon\\\",VCT:\\\"vincent\\\",WSM:\\\"^(?!.*amer).*samoa\\\",SMR:\\\"san.?marino\\\",STP:\\\"\\\\\\\\bs(a|\\\\xe3)o.?tom(e|\\\\xe9)\\\",SAU:\\\"\\\\\\\\bsa\\\\\\\\w*.?arabia\\\",SEN:\\\"senegal\\\",SRB:\\\"^(?!.*monte).*serbia\\\",SYC:\\\"seychell\\\",SLE:\\\"sierra\\\",SGP:\\\"singapore\\\",SXM:\\\"^(?!.*martin)(?!.*saba).*maarten\\\",SVK:\\\"^(?!.*cze).*slovak\\\",SVN:\\\"slovenia\\\",SLB:\\\"solomon\\\",SOM:\\\"somali\\\",ZAF:\\\"south.africa|s\\\\\\\\\\\\\\\\..?africa\\\",SGS:\\\"south.?georgia|sandwich\\\",SSD:\\\"\\\\\\\\bs\\\\\\\\w*.?sudan\\\",ESP:\\\"spain\\\",LKA:\\\"sri.?lanka|ceylon\\\",SDN:\\\"^(?!.*\\\\\\\\bs(?!u)).*sudan\\\",SUR:\\\"surinam|dutch.?guiana\\\",SJM:\\\"svalbard\\\",SWZ:\\\"swaziland\\\",SWE:\\\"sweden\\\",CHE:\\\"switz|swiss\\\",SYR:\\\"syria\\\",TWN:\\\"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china\\\",TJK:\\\"tajik\\\",THA:\\\"thailand|\\\\\\\\bsiam\\\",MKD:\\\"macedonia|fyrom\\\",TLS:\\\"^(?=.*leste).*timor|^(?=.*east).*timor\\\",TGO:\\\"togo\\\",TKL:\\\"tokelau\\\",TON:\\\"tonga\\\",TTO:\\\"trinidad|tobago\\\",TUN:\\\"tunisia\\\",TUR:\\\"turkey\\\",TKM:\\\"turkmen\\\",TCA:\\\"turks\\\",TUV:\\\"tuvalu\\\",UGA:\\\"uganda\\\",UKR:\\\"ukrain\\\",ARE:\\\"emirates|^u\\\\\\\\.?a\\\\\\\\.?e\\\\\\\\.?$|united.?arab.?em\\\",GBR:\\\"united.?kingdom|britain|^u\\\\\\\\.?k\\\\\\\\.?$\\\",TZA:\\\"tanzania\\\",USA:\\\"united.?states\\\\\\\\b(?!.*islands)|\\\\\\\\bu\\\\\\\\.?s\\\\\\\\.?a\\\\\\\\.?\\\\\\\\b|^\\\\\\\\s*u\\\\\\\\.?s\\\\\\\\.?\\\\\\\\b(?!.*islands)\\\",UMI:\\\"minor.?outlying.?is\\\",URY:\\\"uruguay\\\",UZB:\\\"uzbek\\\",VUT:\\\"vanuatu|new.?hebrides\\\",VEN:\\\"venezuela\\\",VNM:\\\"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam\\\",VGB:\\\"^(?=.*\\\\\\\\bu\\\\\\\\.?\\\\\\\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin\\\",VIR:\\\"^(?=.*\\\\\\\\bu\\\\\\\\.?\\\\\\\\s?s).*virgin|^(?=.*states).*virgin\\\",WLF:\\\"futuna|wallis\\\",ESH:\\\"western.sahara\\\",YEM:\\\"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\\\\\\\bp\\\\\\\\.?d\\\\\\\\.?r).*yemen\\\",YMD:\\\"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\\\\\\\bp\\\\\\\\.?d\\\\\\\\.?r).*yemen\\\",YUG:\\\"yugoslavia\\\",ZMB:\\\"zambia|northern.?rhodesia\\\",EAZ:\\\"zanzibar\\\",ZWE:\\\"zimbabwe|^(?!.*northern).*rhodesia\\\"}},{}],123:[function(t,e,r){e.exports=[\\\"xx-small\\\",\\\"x-small\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"x-large\\\",\\\"xx-large\\\",\\\"larger\\\",\\\"smaller\\\"]},{}],124:[function(t,e,r){e.exports=[\\\"normal\\\",\\\"condensed\\\",\\\"semi-condensed\\\",\\\"extra-condensed\\\",\\\"ultra-condensed\\\",\\\"expanded\\\",\\\"semi-expanded\\\",\\\"extra-expanded\\\",\\\"ultra-expanded\\\"]},{}],125:[function(t,e,r){e.exports=[\\\"normal\\\",\\\"italic\\\",\\\"oblique\\\"]},{}],126:[function(t,e,r){e.exports=[\\\"normal\\\",\\\"bold\\\",\\\"bolder\\\",\\\"lighter\\\",\\\"100\\\",\\\"200\\\",\\\"300\\\",\\\"400\\\",\\\"500\\\",\\\"600\\\",\\\"700\\\",\\\"800\\\",\\\"900\\\"]},{}],127:[function(t,e,r){\\\"use strict\\\";e.exports={parse:t(\\\"./parse\\\"),stringify:t(\\\"./stringify\\\")}},{\\\"./parse\\\":129,\\\"./stringify\\\":130}],128:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"css-font-size-keywords\\\");e.exports={isSize:function(t){return/^[\\\\d\\\\.]/.test(t)||-1!==t.indexOf(\\\"/\\\")||-1!==n.indexOf(t)}}},{\\\"css-font-size-keywords\\\":123}],129:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"unquote\\\"),i=t(\\\"css-global-keywords\\\"),a=t(\\\"css-system-font-keywords\\\"),o=t(\\\"css-font-weight-keywords\\\"),s=t(\\\"css-font-style-keywords\\\"),l=t(\\\"css-font-stretch-keywords\\\"),c=t(\\\"string-split-by\\\"),u=t(\\\"./lib/util\\\").isSize;e.exports=h;var f=h.cache={};function h(t){if(\\\"string\\\"!=typeof t)throw new Error(\\\"Font argument must be a string.\\\");if(f[t])return f[t];if(\\\"\\\"===t)throw new Error(\\\"Cannot parse an empty string.\\\");if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:\\\"normal\\\",variant:\\\"normal\\\",weight:\\\"normal\\\",stretch:\\\"normal\\\",lineHeight:\\\"normal\\\",size:\\\"1rem\\\",family:[\\\"serif\\\"]},h=c(t,/\\\\s+/);e=h.shift();){if(-1!==i.indexOf(e))return[\\\"style\\\",\\\"variant\\\",\\\"weight\\\",\\\"stretch\\\"].forEach(function(t){r[t]=e}),f[t]=r;if(-1===s.indexOf(e))if(\\\"normal\\\"!==e&&\\\"small-caps\\\"!==e)if(-1===l.indexOf(e)){if(-1===o.indexOf(e)){if(u(e)){var d=c(e,\\\"/\\\");if(r.size=d[0],null!=d[1]?r.lineHeight=p(d[1]):\\\"/\\\"===h[0]&&(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw new Error(\\\"Missing required font-family.\\\");return r.family=c(h.join(\\\" \\\"),/\\\\s*,\\\\s*/).map(n),f[t]=r}throw new Error(\\\"Unknown or unsupported font token: \\\"+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error(\\\"Missing required font-size.\\\")}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},{\\\"./lib/util\\\":128,\\\"css-font-stretch-keywords\\\":124,\\\"css-font-style-keywords\\\":125,\\\"css-font-weight-keywords\\\":126,\\\"css-global-keywords\\\":131,\\\"css-system-font-keywords\\\":132,\\\"string-split-by\\\":505,unquote:525}],130:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"pick-by-alias\\\"),i=t(\\\"./lib/util\\\").isSize,a=g(t(\\\"css-global-keywords\\\")),o=g(t(\\\"css-system-font-keywords\\\")),s=g(t(\\\"css-font-weight-keywords\\\")),l=g(t(\\\"css-font-style-keywords\\\")),c=g(t(\\\"css-font-stretch-keywords\\\")),u={normal:1,\\\"small-caps\\\":1},f={serif:1,\\\"sans-serif\\\":1,monospace:1,cursive:1,fantasy:1,\\\"system-ui\\\":1},h=\\\"1rem\\\",p=\\\"serif\\\";function d(t,e){if(t&&!e[t]&&!a[t])throw Error(\\\"Unknown keyword `\\\"+t+\\\"`\\\");return t}function g(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=1;return e}e.exports=function(t){if((t=n(t,{style:\\\"style fontstyle fontStyle font-style slope distinction\\\",variant:\\\"variant font-variant fontVariant fontvariant var capitalization\\\",weight:\\\"weight w font-weight fontWeight fontweight\\\",stretch:\\\"stretch font-stretch fontStretch fontstretch width\\\",size:\\\"size s font-size fontSize fontsize height em emSize\\\",lineHeight:\\\"lh line-height lineHeight lineheight leading\\\",family:\\\"font family fontFamily font-family fontfamily type typeface face\\\",system:\\\"system reserved default global\\\"})).system)return t.system&&d(t.system,o),t.system;if(d(t.style,l),d(t.variant,u),d(t.weight,s),d(t.stretch,c),null==t.size&&(t.size=h),\\\"number\\\"==typeof t.size&&(t.size+=\\\"px\\\"),!i)throw Error(\\\"Bad size value `\\\"+t.size+\\\"`\\\");t.family||(t.family=p),Array.isArray(t.family)&&(t.family.length||(t.family=[p]),t.family=t.family.map(function(t){return f[t]?t:'\\\"'+t+'\\\"'}).join(\\\", \\\"));var e=[];return e.push(t.style),t.variant!==t.style&&e.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&e.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&e.push(t.stretch),e.push(t.size+(null==t.lineHeight||\\\"normal\\\"===t.lineHeight||t.lineHeight+\\\"\\\"==\\\"1\\\"?\\\"\\\":\\\"/\\\"+t.lineHeight)),e.push(t.family),e.filter(Boolean).join(\\\" \\\")}},{\\\"./lib/util\\\":128,\\\"css-font-stretch-keywords\\\":124,\\\"css-font-style-keywords\\\":125,\\\"css-font-weight-keywords\\\":126,\\\"css-global-keywords\\\":131,\\\"css-system-font-keywords\\\":132,\\\"pick-by-alias\\\":448}],131:[function(t,e,r){e.exports=[\\\"inherit\\\",\\\"initial\\\",\\\"unset\\\"]},{}],132:[function(t,e,r){e.exports=[\\\"caption\\\",\\\"icon\\\",\\\"menu\\\",\\\"message-box\\\",\\\"small-caption\\\",\\\"status-bar\\\"]},{}],133:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var p=t.length-1;p>=0;--p)a[p]=c*t[p]+u*e[p]+f*r[p]+h*n[p];return a}return c*t+u*e+f*r+h*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u>=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],134:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/thunk.js\\\");function i(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName=\\\"\\\",this.pre=null,this.body=null,this.post=null,this.debug=!1}e.exports=function(t){var e=new i;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var a=0;a<r.length;++a){var o=r[a];if(\\\"array\\\"===o||\\\"object\\\"==typeof o&&o.blockIndices){if(e.argTypes[a]=\\\"array\\\",e.arrayArgs.push(a),e.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),e.shimArgs.push(\\\"array\\\"+a),a<e.pre.args.length&&e.pre.args[a].count>0)throw new Error(\\\"cwise: pre() block may not reference array args\\\");if(a<e.post.args.length&&e.post.args[a].count>0)throw new Error(\\\"cwise: post() block may not reference array args\\\")}else if(\\\"scalar\\\"===o)e.scalarArgs.push(a),e.shimArgs.push(\\\"scalar\\\"+a);else if(\\\"index\\\"===o){if(e.indexArgs.push(a),a<e.pre.args.length&&e.pre.args[a].count>0)throw new Error(\\\"cwise: pre() block may not reference array index\\\");if(a<e.body.args.length&&e.body.args[a].lvalue)throw new Error(\\\"cwise: body() block may not write to array index\\\");if(a<e.post.args.length&&e.post.args[a].count>0)throw new Error(\\\"cwise: post() block may not reference array index\\\")}else if(\\\"shape\\\"===o){if(e.shapeArgs.push(a),a<e.pre.args.length&&e.pre.args[a].lvalue)throw new Error(\\\"cwise: pre() block may not write to array shape\\\");if(a<e.body.args.length&&e.body.args[a].lvalue)throw new Error(\\\"cwise: body() block may not write to array shape\\\");if(a<e.post.args.length&&e.post.args[a].lvalue)throw new Error(\\\"cwise: post() block may not write to array shape\\\")}else{if(\\\"object\\\"!=typeof o||!o.offset)throw new Error(\\\"cwise: Unknown argument type \\\"+r[a]);e.argTypes[a]=\\\"offset\\\",e.offsetArgs.push({array:o.array,offset:o.offset}),e.offsetArgIndex.push(a)}}if(e.arrayArgs.length<=0)throw new Error(\\\"cwise: No array arguments specified\\\");if(e.pre.args.length>r.length)throw new Error(\\\"cwise: Too many arguments in pre() block\\\");if(e.body.args.length>r.length)throw new Error(\\\"cwise: Too many arguments in body() block\\\");if(e.post.args.length>r.length)throw new Error(\\\"cwise: Too many arguments in post() block\\\");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||\\\"cwise\\\",e.blockSize=t.blockSize||64,n(e)}},{\\\"./lib/thunk.js\\\":136}],135:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"uniq\\\");function i(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],c=[],u=0,f=0;for(n=0;n<a;++n)c.push([\\\"i\\\",n,\\\"=0\\\"].join(\\\"\\\"));for(i=0;i<o;++i)for(n=0;n<a;++n)f=u,u=t[n],0===n?c.push([\\\"d\\\",i,\\\"s\\\",n,\\\"=t\\\",i,\\\"p\\\",u].join(\\\"\\\")):c.push([\\\"d\\\",i,\\\"s\\\",n,\\\"=(t\\\",i,\\\"p\\\",u,\\\"-s\\\",f,\\\"*t\\\",i,\\\"p\\\",f,\\\")\\\"].join(\\\"\\\"));for(c.length>0&&l.push(\\\"var \\\"+c.join(\\\",\\\")),n=a-1;n>=0;--n)u=t[n],l.push([\\\"for(i\\\",n,\\\"=0;i\\\",n,\\\"<s\\\",u,\\\";++i\\\",n,\\\"){\\\"].join(\\\"\\\"));for(l.push(r),n=0;n<a;++n){for(f=u,u=t[n],i=0;i<o;++i)l.push([\\\"p\\\",i,\\\"+=d\\\",i,\\\"s\\\",n].join(\\\"\\\"));s&&(n>0&&l.push([\\\"index[\\\",f,\\\"]-=s\\\",f].join(\\\"\\\")),l.push([\\\"++index[\\\",u,\\\"]\\\"].join(\\\"\\\"))),l.push(\\\"}\\\")}return l.join(\\\"\\\\n\\\")}function a(t,e,r){for(var n=t.body,i=[],a=[],o=0;o<t.args.length;++o){var s=t.args[o];if(!(s.count<=0)){var l=new RegExp(s.name,\\\"g\\\"),c=\\\"\\\",u=e.arrayArgs.indexOf(o);switch(e.argTypes[o]){case\\\"offset\\\":var f=e.offsetArgIndex.indexOf(o);u=e.offsetArgs[f].array,c=\\\"+q\\\"+f;case\\\"array\\\":c=\\\"p\\\"+u+c;var h=\\\"l\\\"+o,p=\\\"a\\\"+u;if(0===e.arrayBlockIndices[u])1===s.count?\\\"generic\\\"===r[u]?s.lvalue?(i.push([\\\"var \\\",h,\\\"=\\\",p,\\\".get(\\\",c,\\\")\\\"].join(\\\"\\\")),n=n.replace(l,h),a.push([p,\\\".set(\\\",c,\\\",\\\",h,\\\")\\\"].join(\\\"\\\"))):n=n.replace(l,[p,\\\".get(\\\",c,\\\")\\\"].join(\\\"\\\")):n=n.replace(l,[p,\\\"[\\\",c,\\\"]\\\"].join(\\\"\\\")):\\\"generic\\\"===r[u]?(i.push([\\\"var \\\",h,\\\"=\\\",p,\\\".get(\\\",c,\\\")\\\"].join(\\\"\\\")),n=n.replace(l,h),s.lvalue&&a.push([p,\\\".set(\\\",c,\\\",\\\",h,\\\")\\\"].join(\\\"\\\"))):(i.push([\\\"var \\\",h,\\\"=\\\",p,\\\"[\\\",c,\\\"]\\\"].join(\\\"\\\")),n=n.replace(l,h),s.lvalue&&a.push([p,\\\"[\\\",c,\\\"]=\\\",h].join(\\\"\\\")));else{for(var d=[s.name],g=[c],v=0;v<Math.abs(e.arrayBlockIndices[u]);v++)d.push(\\\"\\\\\\\\s*\\\\\\\\[([^\\\\\\\\]]+)\\\\\\\\]\\\"),g.push(\\\"$\\\"+(v+1)+\\\"*t\\\"+u+\\\"b\\\"+v);if(l=new RegExp(d.join(\\\"\\\"),\\\"g\\\"),c=g.join(\\\"+\\\"),\\\"generic\\\"===r[u])throw new Error(\\\"cwise: Generic arrays not supported in combination with blocks!\\\");n=n.replace(l,[p,\\\"[\\\",c,\\\"]\\\"].join(\\\"\\\"))}break;case\\\"scalar\\\":n=n.replace(l,\\\"Y\\\"+e.scalarArgs.indexOf(o));break;case\\\"index\\\":n=n.replace(l,\\\"index\\\");break;case\\\"shape\\\":n=n.replace(l,\\\"shape\\\")}}}return[i.join(\\\"\\\\n\\\"),n,a.join(\\\"\\\\n\\\")].join(\\\"\\\\n\\\").trim()}e.exports=function(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,o=new Array(t.arrayArgs.length),s=new Array(t.arrayArgs.length),l=0;l<t.arrayArgs.length;++l)s[l]=e[2*l],o[l]=e[2*l+1];var c=[],u=[],f=[],h=[],p=[];for(l=0;l<t.arrayArgs.length;++l){t.arrayBlockIndices[l]<0?(f.push(0),h.push(r),c.push(r),u.push(r+t.arrayBlockIndices[l])):(f.push(t.arrayBlockIndices[l]),h.push(t.arrayBlockIndices[l]+r),c.push(0),u.push(t.arrayBlockIndices[l]));for(var d=[],g=0;g<o[l].length;g++)f[l]<=o[l][g]&&o[l][g]<h[l]&&d.push(o[l][g]-f[l]);p.push(d)}var v=[\\\"SS\\\"],m=[\\\"'use strict'\\\"],y=[];for(g=0;g<r;++g)y.push([\\\"s\\\",g,\\\"=SS[\\\",g,\\\"]\\\"].join(\\\"\\\"));for(l=0;l<t.arrayArgs.length;++l){for(v.push(\\\"a\\\"+l),v.push(\\\"t\\\"+l),v.push(\\\"p\\\"+l),g=0;g<r;++g)y.push([\\\"t\\\",l,\\\"p\\\",g,\\\"=t\\\",l,\\\"[\\\",f[l]+g,\\\"]\\\"].join(\\\"\\\"));for(g=0;g<Math.abs(t.arrayBlockIndices[l]);++g)y.push([\\\"t\\\",l,\\\"b\\\",g,\\\"=t\\\",l,\\\"[\\\",c[l]+g,\\\"]\\\"].join(\\\"\\\"))}for(l=0;l<t.scalarArgs.length;++l)v.push(\\\"Y\\\"+l);if(t.shapeArgs.length>0&&y.push(\\\"shape=SS.slice(0)\\\"),t.indexArgs.length>0){var x=new Array(r);for(l=0;l<r;++l)x[l]=\\\"0\\\";y.push([\\\"index=[\\\",x.join(\\\",\\\"),\\\"]\\\"].join(\\\"\\\"))}for(l=0;l<t.offsetArgs.length;++l){var b=t.offsetArgs[l],_=[];for(g=0;g<b.offset.length;++g)0!==b.offset[g]&&(1===b.offset[g]?_.push([\\\"t\\\",b.array,\\\"p\\\",g].join(\\\"\\\")):_.push([b.offset[g],\\\"*t\\\",b.array,\\\"p\\\",g].join(\\\"\\\")));0===_.length?y.push(\\\"q\\\"+l+\\\"=0\\\"):y.push([\\\"q\\\",l,\\\"=\\\",_.join(\\\"+\\\")].join(\\\"\\\"))}var w=n([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for((y=y.concat(w)).length>0&&m.push(\\\"var \\\"+y.join(\\\",\\\")),l=0;l<t.arrayArgs.length;++l)m.push(\\\"p\\\"+l+\\\"|=0\\\");t.pre.body.length>3&&m.push(a(t.pre,t,s));var k=a(t.body,t,s),M=function(t){for(var e=0,r=t[0].length;e<r;){for(var n=1;n<t.length;++n)if(t[n][e]!==t[0][e])return e;++e}return e}(p);M<r?m.push(function(t,e,r,n){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,c=[],u=0;u<o;++u)c.push([\\\"var offset\\\",u,\\\"=p\\\",u].join(\\\"\\\"));for(u=t;u<a;++u)c.push([\\\"for(var j\\\"+u+\\\"=SS[\\\",e[u],\\\"]|0;j\\\",u,\\\">0;){\\\"].join(\\\"\\\")),c.push([\\\"if(j\\\",u,\\\"<\\\",s,\\\"){\\\"].join(\\\"\\\")),c.push([\\\"s\\\",e[u],\\\"=j\\\",u].join(\\\"\\\")),c.push([\\\"j\\\",u,\\\"=0\\\"].join(\\\"\\\")),c.push([\\\"}else{s\\\",e[u],\\\"=\\\",s].join(\\\"\\\")),c.push([\\\"j\\\",u,\\\"-=\\\",s,\\\"}\\\"].join(\\\"\\\")),l&&c.push([\\\"index[\\\",e[u],\\\"]=j\\\",u].join(\\\"\\\"));for(u=0;u<o;++u){for(var f=[\\\"offset\\\"+u],h=t;h<a;++h)f.push([\\\"j\\\",h,\\\"*t\\\",u,\\\"p\\\",e[h]].join(\\\"\\\"));c.push([\\\"p\\\",u,\\\"=(\\\",f.join(\\\"+\\\"),\\\")\\\"].join(\\\"\\\"))}for(c.push(i(e,r,n)),u=t;u<a;++u)c.push(\\\"}\\\");return c.join(\\\"\\\\n\\\")}(M,p[0],t,k)):m.push(i(p[0],t,k)),t.post.body.length>3&&m.push(a(t.post,t,s)),t.debug&&console.log(\\\"-----Generated cwise routine for \\\",e,\\\":\\\\n\\\"+m.join(\\\"\\\\n\\\")+\\\"\\\\n----------\\\");var A=[t.funcName||\\\"unnamed\\\",\\\"_cwise_loop_\\\",o[0].join(\\\"s\\\"),\\\"m\\\",M,function(t){for(var e=new Array(t.length),r=!0,n=0;n<t.length;++n){var i=t[n],a=i.match(/\\\\d+/);a=a?a[0]:\\\"\\\",0===i.charAt(0)?e[n]=\\\"u\\\"+i.charAt(1)+a:e[n]=i.charAt(0)+a,n>0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join(\\\"\\\")}(s)].join(\\\"\\\");return new Function([\\\"function \\\",A,\\\"(\\\",v.join(\\\",\\\"),\\\"){\\\",m.join(\\\"\\\\n\\\"),\\\"} return \\\",A].join(\\\"\\\"))()}},{uniq:524}],136:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./compile.js\\\");e.exports=function(t){var e=[\\\"'use strict'\\\",\\\"var CACHED={}\\\"],r=[],i=t.funcName+\\\"_cwise_thunk\\\";e.push([\\\"return function \\\",i,\\\"(\\\",t.shimArgs.join(\\\",\\\"),\\\"){\\\"].join(\\\"\\\"));for(var a=[],o=[],s=[[\\\"array\\\",t.arrayArgs[0],\\\".shape.slice(\\\",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?\\\",\\\"+t.arrayBlockIndices[0]+\\\")\\\":\\\")\\\"].join(\\\"\\\")],l=[],c=[],u=0;u<t.arrayArgs.length;++u){var f=t.arrayArgs[u];r.push([\\\"t\\\",f,\\\"=array\\\",f,\\\".dtype,\\\",\\\"r\\\",f,\\\"=array\\\",f,\\\".order\\\"].join(\\\"\\\")),a.push(\\\"t\\\"+f),a.push(\\\"r\\\"+f),o.push(\\\"t\\\"+f),o.push(\\\"r\\\"+f+\\\".join()\\\"),s.push(\\\"array\\\"+f+\\\".data\\\"),s.push(\\\"array\\\"+f+\\\".stride\\\"),s.push(\\\"array\\\"+f+\\\".offset|0\\\"),u>0&&(l.push(\\\"array\\\"+t.arrayArgs[0]+\\\".shape.length===array\\\"+f+\\\".shape.length+\\\"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push(\\\"array\\\"+t.arrayArgs[0]+\\\".shape[shapeIndex+\\\"+Math.max(0,t.arrayBlockIndices[0])+\\\"]===array\\\"+f+\\\".shape[shapeIndex+\\\"+Math.max(0,t.arrayBlockIndices[u])+\\\"]\\\"))}for(t.arrayArgs.length>1&&(e.push(\\\"if (!(\\\"+l.join(\\\" && \\\")+\\\")) throw new Error('cwise: Arrays do not all have the same dimensionality!')\\\"),e.push(\\\"for(var shapeIndex=array\\\"+t.arrayArgs[0]+\\\".shape.length-\\\"+Math.abs(t.arrayBlockIndices[0])+\\\"; shapeIndex--\\\\x3e0;) {\\\"),e.push(\\\"if (!(\\\"+c.join(\\\" && \\\")+\\\")) throw new Error('cwise: Arrays do not all have the same shape!')\\\"),e.push(\\\"}\\\")),u=0;u<t.scalarArgs.length;++u)s.push(\\\"scalar\\\"+t.scalarArgs[u]);return r.push([\\\"type=[\\\",o.join(\\\",\\\"),\\\"].join()\\\"].join(\\\"\\\")),r.push(\\\"proc=CACHED[type]\\\"),e.push(\\\"var \\\"+r.join(\\\",\\\")),e.push([\\\"if(!proc){\\\",\\\"CACHED[type]=proc=compile([\\\",a.join(\\\",\\\"),\\\"])}\\\",\\\"return proc(\\\",s.join(\\\",\\\"),\\\")}\\\"].join(\\\"\\\")),t.debug&&console.log(\\\"-----Generated thunk:\\\\n\\\"+e.join(\\\"\\\\n\\\")+\\\"\\\\n----------\\\"),new Function(\\\"compile\\\",e.join(\\\"\\\\n\\\"))(n.bind(void 0,t))}},{\\\"./compile.js\\\":135}],137:[function(t,e,r){e.exports=t(\\\"cwise-compiler\\\")},{\\\"cwise-compiler\\\":134}],138:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/object/copy\\\"),a=t(\\\"es5-ext/object/normalize-options\\\"),o=t(\\\"es5-ext/object/valid-callable\\\"),s=t(\\\"es5-ext/object/map\\\"),l=t(\\\"es5-ext/object/valid-callable\\\"),c=t(\\\"es5-ext/object/valid-value\\\"),u=Function.prototype.bind,f=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,a=c(e)&&l(e.value);return delete(n=i(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?a:(e.value=u.call(a,r.resolveContext?r.resolveContext(this):this),f(this,t,e),this[t])},n},e.exports=function(t){var e=a(arguments[1]);return null!=e.resolveContext&&o(e.resolveContext),s(t,function(t,r){return n(r,t,e)})}},{\\\"es5-ext/object/copy\\\":174,\\\"es5-ext/object/map\\\":183,\\\"es5-ext/object/normalize-options\\\":184,\\\"es5-ext/object/valid-callable\\\":188,\\\"es5-ext/object/valid-value\\\":190}],139:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es5-ext/object/assign\\\"),i=t(\\\"es5-ext/object/normalize-options\\\"),a=t(\\\"es5-ext/object/is-callable\\\"),o=t(\\\"es5-ext/string/#/contains\\\");(e.exports=function(t,e){var r,a,s,l,c;return arguments.length<2||\\\"string\\\"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(r=s=!0,a=!1):(r=o.call(t,\\\"c\\\"),a=o.call(t,\\\"e\\\"),s=o.call(t,\\\"w\\\")),c={value:e,configurable:r,enumerable:a,writable:s},l?n(i(l),c):c}).gs=function(t,e,r){var s,l,c,u;return\\\"string\\\"!=typeof t?(c=r,r=e,e=t,t=null):c=arguments[3],null==e?e=void 0:a(e)?null==r?r=void 0:a(r)||(c=r,r=void 0):(c=e,e=r=void 0),null==t?(s=!0,l=!1):(s=o.call(t,\\\"c\\\"),l=o.call(t,\\\"e\\\")),u={get:e,set:r,configurable:s,enumerable:l},c?n(i(c),u):u}},{\\\"es5-ext/object/assign\\\":171,\\\"es5-ext/object/is-callable\\\":177,\\\"es5-ext/object/normalize-options\\\":184,\\\"es5-ext/string/#/contains\\\":191}],140:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";function e(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function r(t){var r;return 1===t.length&&(r=t,t=function(t,n){return e(r(t),n)}),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}var n=r(e),i=n.right,a=n.left;function o(t,e){return[t,e]}function s(t){return null===t?NaN:+t}function l(t,e){var r,n,i=t.length,a=0,o=-1,l=0,c=0;if(null==e)for(;++o<i;)isNaN(r=s(t[o]))||(c+=(n=r-l)*(r-(l+=n/++a)));else for(;++o<i;)isNaN(r=s(e(t[o],o,t)))||(c+=(n=r-l)*(r-(l+=n/++a)));if(a>1)return c/(a-1)}function c(t,e){var r=l(t,e);return r?Math.sqrt(r):r}function u(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(r=t[o])&&r>=r)for(n=i=r;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),i<r&&(i=r))}else for(;++o<a;)if(null!=(r=e(t[o],o,t))&&r>=r)for(n=i=r;++o<a;)null!=(r=e(t[o],o,t))&&(n>r&&(n=r),i<r&&(i=r));return[n,i]}var f=Array.prototype,h=f.slice,p=f.map;function d(t){return function(){return t}}function g(t){return t}function v(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n<i;)a[n]=t+n*r;return a}var m=Math.sqrt(50),y=Math.sqrt(10),x=Math.sqrt(2);function b(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return i>=0?(a>=m?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=m?10:a>=y?5:a>=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=m?i*=10:a>=y?i*=5:a>=x&&(i*=2),e<t?-i:i}function w(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function k(t,e,r){if(null==r&&(r=s),n=t.length){if((e=+e)<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}}function M(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&n>r&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&n>r&&(n=r);return n}function A(t){if(!(i=t.length))return[];for(var e=-1,r=M(t,T),n=new Array(r);++e<r;)for(var i,a=-1,o=n[e]=new Array(i);++a<i;)o[a]=t[a][e];return n}function T(t){return t.length}t.bisect=i,t.bisectRight=i,t.bisectLeft=a,t.ascending=e,t.bisector=r,t.cross=function(t,e,r){var n,i,a,s,l=t.length,c=e.length,u=new Array(l*c);for(null==r&&(r=o),n=a=0;n<l;++n)for(s=t[n],i=0;i<c;++i,++a)u[a]=r(s,e[i]);return u},t.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},t.deviation=c,t.extent=u,t.histogram=function(){var t=g,e=u,r=w;function n(n){var a,o,s=n.length,l=new Array(s);for(a=0;a<s;++a)l[a]=t(n[a],a,n);var c=e(l),u=c[0],f=c[1],h=r(l,u,f);Array.isArray(h)||(h=_(u,f,h),h=v(Math.ceil(u/h)*h,f,h));for(var p=h.length;h[0]<=u;)h.shift(),--p;for(;h[p-1]>f;)h.pop(),--p;var d,g=new Array(p+1);for(a=0;a<=p;++a)(d=g[a]=[]).x0=a>0?h[a-1]:u,d.x1=a<p?h[a]:f;for(a=0;a<s;++a)u<=(o=l[a])&&o<=f&&g[i(h,o,0,p)].push(n[a]);return g}return n.value=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:d(e),n):t},n.domain=function(t){return arguments.length?(e=\\\"function\\\"==typeof t?t:d([t[0],t[1]]),n):e},n.thresholds=function(t){return arguments.length?(r=\\\"function\\\"==typeof t?t:Array.isArray(t)?d(h.call(t)):d(t),n):r},n},t.thresholdFreedmanDiaconis=function(t,r,n){return t=p.call(t,s).sort(e),Math.ceil((n-r)/(2*(k(t,.75)-k(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,e,r){return Math.ceil((r-e)/(3.5*c(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=w,t.max=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&r>n&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&r>n&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a<n;)isNaN(r=s(t[a]))?--i:o+=r;else for(;++a<n;)isNaN(r=s(e(t[a],a,t)))?--i:o+=r;if(i)return o/i},t.median=function(t,r){var n,i=t.length,a=-1,o=[];if(null==r)for(;++a<i;)isNaN(n=s(t[a]))||o.push(n);else for(;++a<i;)isNaN(n=s(r(t[a],a,t)))||o.push(n);return k(o.sort(e),.5)},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=M,t.pairs=function(t,e){null==e&&(e=o);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return a},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.quantile=k,t.range=v,t.scan=function(t,r){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==r&&(r=e);++a<n;)(r(i=t[a],s)<0||0!==r(s,s))&&(s=i,o=a);return 0===r(s,s)?o:void 0}},t.shuffle=function(t,e,r){for(var n,i,a=(null==r?t.length:r)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.sum=function(t,e){var r,n=t.length,i=-1,a=0;if(null==e)for(;++i<n;)(r=+t[i])&&(a+=r);else for(;++i<n;)(r=+e(t[i],i,t))&&(a+=r);return a},t.ticks=function(t,e,r){var n,i,a,o,s=-1;if(r=+r,(t=+t)==(e=+e)&&r>0)return[t];if((n=e<t)&&(i=t,t=e,e=i),0===(o=b(t,e,r))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return n&&a.reverse(),a},t.tickIncrement=b,t.tickStep=_,t.transpose=A,t.variance=l,t.zip=function(){return A(arguments)},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],141:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";function e(){}function r(t,r){var n=new e;if(t instanceof e)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var i,a=-1,o=t.length;if(null==r)for(;++a<o;)n.set(a,t[a]);else for(;++a<o;)n.set(r(i=t[a],a,t),i)}else if(t)for(var s in t)n.set(s,t[s]);return n}e.prototype=r.prototype={constructor:e,has:function(t){return\\\"$\\\"+t in this},get:function(t){return this[\\\"$\\\"+t]},set:function(t,e){return this[\\\"$\\\"+t]=e,this},remove:function(t){var e=\\\"$\\\"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)\\\"$\\\"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)\\\"$\\\"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)\\\"$\\\"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)\\\"$\\\"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)\\\"$\\\"===e[0]&&++t;return t},empty:function(){for(var t in this)if(\\\"$\\\"===t[0])return!1;return!0},each:function(t){for(var e in this)\\\"$\\\"===e[0]&&t(this[e],e.slice(1),this)}};function n(){return{}}function i(t,e,r){t[e]=r}function a(){return r()}function o(t,e,r){t.set(e,r)}function s(){}var l=r.prototype;function c(t,e){var r=new s;if(t instanceof s)t.each(function(t){r.add(t)});else if(t){var n=-1,i=t.length;if(null==e)for(;++n<i;)r.add(t[n]);else for(;++n<i;)r.add(e(t[n],n,t))}return r}s.prototype=c.prototype={constructor:s,has:l.has,add:function(t){return this[\\\"$\\\"+(t+=\\\"\\\")]=t,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each};t.nest=function(){var t,e,s,l=[],c=[];function u(n,i,a,o){if(i>=l.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var s,c,f,h=-1,p=n.length,d=l[i++],g=r(),v=a();++h<p;)(f=g.get(s=d(c=n[h])+\\\"\\\"))?f.push(c):g.set(s,[c]);return g.each(function(t,e){o(v,e,u(t,i,a,o))}),v}return s={object:function(t){return u(t,0,n,i)},map:function(t){return u(t,0,a,o)},entries:function(t){return function t(r,n){if(++n>l.length)return r;var i,a=c[n-1];return null!=e&&n>=l.length?i=r.entries():(i=[],r.each(function(e,r){i.push({key:r,values:t(e,n)})})),null!=a?i.sort(function(t,e){return a(t.key,e.key)}):i}(u(t,0,a,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],142:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";function e(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var i=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",a=\\\"\\\\\\\\s*([+-]?\\\\\\\\d*\\\\\\\\.?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",o=\\\"\\\\\\\\s*([+-]?\\\\\\\\d*\\\\\\\\.?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,c=new RegExp(\\\"^rgb\\\\\\\\(\\\"+[i,i,i]+\\\"\\\\\\\\)$\\\"),u=new RegExp(\\\"^rgb\\\\\\\\(\\\"+[o,o,o]+\\\"\\\\\\\\)$\\\"),f=new RegExp(\\\"^rgba\\\\\\\\(\\\"+[i,i,i,a]+\\\"\\\\\\\\)$\\\"),h=new RegExp(\\\"^rgba\\\\\\\\(\\\"+[o,o,o,a]+\\\"\\\\\\\\)$\\\"),p=new RegExp(\\\"^hsl\\\\\\\\(\\\"+[a,o,o]+\\\"\\\\\\\\)$\\\"),d=new RegExp(\\\"^hsla\\\\\\\\(\\\"+[a,o,o,a]+\\\"\\\\\\\\)$\\\"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(t){var e;return t=(t+\\\"\\\").trim().toLowerCase(),(e=s.exec(t))?new _((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=l.exec(t))?m(parseInt(e[1],16)):(e=c.exec(t))?new _(e[1],e[2],e[3],1):(e=u.exec(t))?new _(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=f.exec(t))?y(e[1],e[2],e[3],e[4]):(e=h.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?k(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?k(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?m(g[t]):\\\"transparent\\\"===t?new _(NaN,NaN,NaN,0):null}function m(t){return new _(t>>16&255,t>>8&255,255&t,1)}function y(t,e,r,n){return n<=0&&(t=e=r=NaN),new _(t,e,r,n)}function x(t){return t instanceof n||(t=v(t)),t?new _((t=t.rgb()).r,t.g,t.b,t.opacity):new _}function b(t,e,r,n){return 1===arguments.length?x(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function w(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\\\"0\\\":\\\"\\\")+t.toString(16)}function k(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new A(t,e,r,n)}function M(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new A;if(t instanceof A)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),o=Math.max(e,r,i),s=NaN,l=o-a,c=(o+a)/2;return l?(s=e===o?(r-i)/l+6*(r<i):r===o?(i-e)/l+2:(e-r)/l+4,l/=c<.5?o+a:2-o-a,s*=60):l=c>0&&c<1?0:s,new A(s,l,c,t.opacity)}(t):new A(t,e,r,null==i?1:i)}function A(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function T(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(n,v,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+\\\"\\\"}}),e(_,b,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return\\\"#\\\"+w(this.r)+w(this.g)+w(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\\\"rgb(\\\":\\\"rgba(\\\")+Math.max(0,Math.min(255,Math.round(this.r)||0))+\\\", \\\"+Math.max(0,Math.min(255,Math.round(this.g)||0))+\\\", \\\"+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?\\\")\\\":\\\", \\\"+t+\\\")\\\")}})),e(A,M,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new _(T(t>=240?t-240:t+120,i,n),T(t,i,n),T(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var S=Math.PI/180,C=180/Math.PI,E=.96422,L=1,z=.82521,O=4/29,I=6/29,P=3*I*I,D=I*I*I;function R(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof G){if(isNaN(t.h))return new F(t.l,0,0,t.opacity);var e=t.h*S;return new F(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof _||(t=x(t));var r,n,i=U(t.r),a=U(t.g),o=U(t.b),s=N((.2225045*i+.7168786*a+.0606169*o)/L);return i===a&&a===o?r=n=s:(r=N((.4360747*i+.3850649*a+.1430804*o)/E),n=N((.0139322*i+.0971045*a+.7141733*o)/z)),new F(116*s-16,500*(r-s),200*(s-n),t.opacity)}function B(t,e,r,n){return 1===arguments.length?R(t):new F(t,e,r,null==n?1:n)}function F(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function N(t){return t>D?Math.pow(t,1/3):t/P+O}function j(t){return t>I?t*t*t:P*(t-O)}function V(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function U(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=R(t)),0===t.a&&0===t.b)return new G(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*C;return new G(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function H(t,e,r,n){return 1===arguments.length?q(t):new G(t,e,r,null==n?1:n)}function G(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}e(F,B,r(n,{brighter:function(t){return new F(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new F(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _(V(3.1338561*(e=E*j(e))-1.6168667*(t=L*j(t))-.4906146*(r=z*j(r))),V(-.9787684*e+1.9161415*t+.033454*r),V(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),e(G,H,r(n,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return R(this).rgb()}}));var W=-.14861,Y=1.78277,X=-.29227,Z=-.90649,$=1.97294,J=$*Z,K=$*Y,Q=Y*X-Z*W;function tt(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);t instanceof _||(t=x(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(Q*n+J*e-K*r)/(Q+J-K),a=n-i,o=($*(r-i)-X*a)/Z,s=Math.sqrt(o*o+a*a)/($*i*(1-i)),l=s?Math.atan2(o,a)*C-120:NaN;return new et(l<0?l+360:l,s,i,t.opacity)}(t):new et(t,e,r,null==n?1:n)}function et(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(et,tt,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*S,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new _(255*(e+r*(W*n+Y*i)),255*(e+r*(X*n+Z*i)),255*(e+r*($*n)),this.opacity)}})),t.color=v,t.rgb=b,t.hsl=M,t.lab=B,t.hcl=H,t.lch=function(t,e,r,n){return 1===arguments.length?q(t):new G(r,e,t,null==n?1:n)},t.gray=function(t,e){return new F(t,0,0,null==e?1:e)},t.cubehelix=tt,Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],143:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";var e={value:function(){}};function r(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+\\\"\\\")||t in i)throw new Error(\\\"illegal type: \\\"+t);i[t]=[]}return new n(i)}function n(t){this._=t}function i(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}function a(t,r,n){for(var i=0,a=t.length;i<a;++i)if(t[i].name===r){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:r,value:n}),t}n.prototype=r.prototype={constructor:n,on:function(t,e){var r,n,o=this._,s=(n=o,(t+\\\"\\\").trim().split(/^|\\\\s+/).map(function(t){var e=\\\"\\\",r=t.indexOf(\\\".\\\");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error(\\\"unknown type: \\\"+t);return{type:t,name:e}})),l=-1,c=s.length;if(!(arguments.length<2)){if(null!=e&&\\\"function\\\"!=typeof e)throw new Error(\\\"invalid callback: \\\"+e);for(;++l<c;)if(r=(t=s[l]).type)o[r]=a(o[r],t.name,e);else if(null==e)for(r in o)o[r]=a(o[r],t.name,null);return this}for(;++l<c;)if((r=(t=s[l]).type)&&(r=i(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new n(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error(\\\"unknown type: \\\"+t);for(a=0,r=(n=this._[t]).length;a<r;++a)n[a].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error(\\\"unknown type: \\\"+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}},t.dispatch=r,Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],144:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n,i){\\\"use strict\\\";var a=function(t){return function(){return t}},o=function(){return 1e-6*(Math.random()-.5)};function s(t){return t.x+t.vx}function l(t){return t.y+t.vy}function c(t){return t.index}function u(t,e){var r=t.get(e);if(!r)throw new Error(\\\"missing: \\\"+e);return r}function f(t){return t.x}function h(t){return t.y}var p=10,d=Math.PI*(3-Math.sqrt(5));t.forceCenter=function(t,e){var r;function n(){var n,i,a=r.length,o=0,s=0;for(n=0;n<a;++n)o+=(i=r[n]).x,s+=i.y;for(o=o/a-t,s=s/a-e,n=0;n<a;++n)(i=r[n]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),n.initialize=function(t){r=t},n.x=function(e){return arguments.length?(t=+e,n):t},n.y=function(t){return arguments.length?(e=+t,n):e},n},t.forceCollide=function(t){var r,n,i=1,c=1;function u(){for(var t,a,u,h,p,d,g,v=r.length,m=0;m<c;++m)for(a=e.quadtree(r,s,l).visitAfter(f),t=0;t<v;++t)u=r[t],d=n[u.index],g=d*d,h=u.x+u.vx,p=u.y+u.vy,a.visit(y);function y(t,e,r,n,a){var s=t.data,l=t.r,c=d+l;if(!s)return e>h+c||n<h-c||r>p+c||a<p-c;if(s.index>u.index){var f=h-s.x-s.vx,v=p-s.y-s.vy,m=f*f+v*v;m<c*c&&(0===f&&(m+=(f=o())*f),0===v&&(m+=(v=o())*v),m=(c-(m=Math.sqrt(m)))/m*i,u.vx+=(f*=m)*(c=(l*=l)/(g+l)),u.vy+=(v*=m)*c,s.vx-=f*(c=1-c),s.vy-=v*c)}}}function f(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e<a;++e)i=r[e],n[i.index]=+t(i,e,r)}}return\\\"function\\\"!=typeof t&&(t=a(null==t?1:+t)),u.initialize=function(t){r=t,h()},u.iterations=function(t){return arguments.length?(c=+t,u):c},u.strength=function(t){return arguments.length?(i=+t,u):i},u.radius=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:a(+e),h(),u):t},u},t.forceLink=function(t){var e,n,i,s,l,f=c,h=function(t){return 1/Math.min(s[t.source.index],s[t.target.index])},p=a(30),d=1;function g(r){for(var i=0,a=t.length;i<d;++i)for(var s,c,u,f,h,p,g,v=0;v<a;++v)c=(s=t[v]).source,f=(u=s.target).x+u.vx-c.x-c.vx||o(),h=u.y+u.vy-c.y-c.vy||o(),f*=p=((p=Math.sqrt(f*f+h*h))-n[v])/p*r*e[v],h*=p,u.vx-=f*(g=l[v]),u.vy-=h*g,c.vx+=f*(g=1-g),c.vy+=h*g}function v(){if(i){var a,o,c=i.length,h=t.length,p=r.map(i,f);for(a=0,s=new Array(c);a<h;++a)(o=t[a]).index=a,\\\"object\\\"!=typeof o.source&&(o.source=u(p,o.source)),\\\"object\\\"!=typeof o.target&&(o.target=u(p,o.target)),s[o.source.index]=(s[o.source.index]||0)+1,s[o.target.index]=(s[o.target.index]||0)+1;for(a=0,l=new Array(h);a<h;++a)o=t[a],l[a]=s[o.source.index]/(s[o.source.index]+s[o.target.index]);e=new Array(h),m(),n=new Array(h),y()}}function m(){if(i)for(var r=0,n=t.length;r<n;++r)e[r]=+h(t[r],r,t)}function y(){if(i)for(var e=0,r=t.length;e<r;++e)n[e]=+p(t[e],e,t)}return null==t&&(t=[]),g.initialize=function(t){i=t,v()},g.links=function(e){return arguments.length?(t=e,v(),g):t},g.id=function(t){return arguments.length?(f=t,g):f},g.iterations=function(t){return arguments.length?(d=+t,g):d},g.strength=function(t){return arguments.length?(h=\\\"function\\\"==typeof t?t:a(+t),m(),g):h},g.distance=function(t){return arguments.length?(p=\\\"function\\\"==typeof t?t:a(+t),y(),g):p},g},t.forceManyBody=function(){var t,r,n,i,s=a(-30),l=1,c=1/0,u=.81;function p(i){var a,o=t.length,s=e.quadtree(t,f,h).visitAfter(g);for(n=i,a=0;a<o;++a)r=t[a],s.visit(v)}function d(){if(t){var e,r,n=t.length;for(i=new Array(n),e=0;e<n;++e)r=t[e],i[r.index]=+s(r,e,t)}}function g(t){var e,r,n,a,o,s=0,l=0;if(t.length){for(n=a=o=0;o<4;++o)(e=t[o])&&(r=Math.abs(e.value))&&(s+=e.value,l+=r,n+=r*e.x,a+=r*e.y);t.x=n/l,t.y=a/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index]}while(e=e.next)}t.value=s}function v(t,e,a,s){if(!t.value)return!0;var f=t.x-r.x,h=t.y-r.y,p=s-e,d=f*f+h*h;if(p*p/u<d)return d<c&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d<l&&(d=Math.sqrt(l*d)),r.vx+=f*t.value*n/d,r.vy+=h*t.value*n/d),!0;if(!(t.length||d>=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d<l&&(d=Math.sqrt(l*d)));do{t.data!==r&&(p=i[t.data.index]*n/d,r.vx+=f*p,r.vy+=h*p)}while(t=t.next)}}return p.initialize=function(e){t=e,d()},p.strength=function(t){return arguments.length?(s=\\\"function\\\"==typeof t?t:a(+t),d(),p):s},p.distanceMin=function(t){return arguments.length?(l=t*t,p):Math.sqrt(l)},p.distanceMax=function(t){return arguments.length?(c=t*t,p):Math.sqrt(c)},p.theta=function(t){return arguments.length?(u=t*t,p):Math.sqrt(u)},p},t.forceRadial=function(t,e,r){var n,i,o,s=a(.1);function l(t){for(var a=0,s=n.length;a<s;++a){var l=n[a],c=l.x-e||1e-6,u=l.y-r||1e-6,f=Math.sqrt(c*c+u*u),h=(o[a]-f)*i[a]*t/f;l.vx+=c*h,l.vy+=u*h}}function c(){if(n){var e,r=n.length;for(i=new Array(r),o=new Array(r),e=0;e<r;++e)o[e]=+t(n[e],e,n),i[e]=isNaN(o[e])?0:+s(n[e],e,n)}}return\\\"function\\\"!=typeof t&&(t=a(+t)),null==e&&(e=0),null==r&&(r=0),l.initialize=function(t){n=t,c()},l.strength=function(t){return arguments.length?(s=\\\"function\\\"==typeof t?t:a(+t),c(),l):s},l.radius=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:a(+e),c(),l):t},l.x=function(t){return arguments.length?(e=+t,l):e},l.y=function(t){return arguments.length?(r=+t,l):r},l},t.forceSimulation=function(t){var e,a=1,o=.001,s=1-Math.pow(o,1/300),l=0,c=.6,u=r.map(),f=i.timer(g),h=n.dispatch(\\\"tick\\\",\\\"end\\\");function g(){v(),h.call(\\\"tick\\\",e),a<o&&(f.stop(),h.call(\\\"end\\\",e))}function v(){var e,r,n=t.length;for(a+=(l-a)*s,u.each(function(t){t(a)}),e=0;e<n;++e)null==(r=t[e]).fx?r.x+=r.vx*=c:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=c:(r.y=r.fy,r.vy=0)}function m(){for(var e,r=0,n=t.length;r<n;++r){if((e=t[r]).index=r,isNaN(e.x)||isNaN(e.y)){var i=p*Math.sqrt(r),a=r*d;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function y(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),m(),e={tick:v,restart:function(){return f.restart(g),e},stop:function(){return f.stop(),e},nodes:function(r){return arguments.length?(t=r,m(),u.each(y),e):t},alpha:function(t){return arguments.length?(a=+t,e):a},alphaMin:function(t){return arguments.length?(o=+t,e):o},alphaDecay:function(t){return arguments.length?(s=+t,e):+s},alphaTarget:function(t){return arguments.length?(l=+t,e):l},velocityDecay:function(t){return arguments.length?(c=1-t,e):1-c},force:function(t,r){return arguments.length>1?(null==r?u.remove(t):u.set(t,y(r)),e):u.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c<u;++c)(o=(i=e-(s=t[c]).x)*i+(a=r-s.y)*a)<n&&(l=s,n=o);return l},on:function(t,r){return arguments.length>1?(h.on(t,r),e):h.on(t)}}},t.forceX=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(n[a]-i.x)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a<o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return\\\"function\\\"!=typeof t&&(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=\\\"function\\\"==typeof t?t:a(+t),s(),o):i},o.x=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:a(+e),s(),o):t},o},t.forceY=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(n[a]-i.y)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a<o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return\\\"function\\\"!=typeof t&&(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=\\\"function\\\"==typeof t?t:a(+t),s(),o):i},o.y=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:a(+e),s(),o):t},o},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})},\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?i(r,t(\\\"d3-quadtree\\\"),t(\\\"d3-collection\\\"),t(\\\"d3-dispatch\\\"),t(\\\"d3-timer\\\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3)},{\\\"d3-collection\\\":141,\\\"d3-dispatch\\\":143,\\\"d3-quadtree\\\":146,\\\"d3-timer\\\":147}],145:[function(t,e,r){var n,i;n=this,i=function(t,e){\\\"use strict\\\";function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function n(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=i<e-1?t[i+2]:2*o-a;return r((n-i/e)*e,s,a,o,l)}}function i(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),a=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],l=t[(i+2)%e];return r((n-i/e)*e,a,o,s,l)}}function a(t){return function(){return t}}function o(t,e){return function(r){return t+r*e}}function s(t,e){var r=e-t;return r?o(t,r>180||r<-180?r-360*Math.round(r/360):r):a(isNaN(t)?e:t)}function l(t){return 1==(t=+t)?c:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):a(isNaN(e)?r:e)}}function c(t,e){var r=e-t;return r?o(t,r):a(isNaN(t)?e:t)}var u=function t(r){var n=l(r);function i(t,r){var i=n((t=e.rgb(t)).r,(r=e.rgb(r)).r),a=n(t.g,r.g),o=n(t.b,r.b),s=c(t.opacity,r.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=o(e),t.opacity=s(e),t+\\\"\\\"}}return i.gamma=t,i}(1);function f(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n<a;++n)i=e.rgb(r[n]),o[n]=i.r||0,s[n]=i.g||0,l[n]=i.b||0;return o=t(o),s=t(s),l=t(l),i.opacity=1,function(t){return i.r=o(t),i.g=s(t),i.b=l(t),i+\\\"\\\"}}}var h=f(n),p=f(i);function d(t,e){var r,n=e?e.length:0,i=t?Math.min(n,t.length):0,a=new Array(i),o=new Array(n);for(r=0;r<i;++r)a[r]=_(t[r],e[r]);for(;r<n;++r)o[r]=e[r];return function(t){for(r=0;r<i;++r)o[r]=a[r](t);return o}}function g(t,e){var r=new Date;return e-=t=+t,function(n){return r.setTime(t+e*n),r}}function v(t,e){return e-=t=+t,function(r){return t+e*r}}function m(t,e){var r,n={},i={};for(r in null!==t&&\\\"object\\\"==typeof t||(t={}),null!==e&&\\\"object\\\"==typeof e||(e={}),e)r in t?n[r]=_(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}var y=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,x=new RegExp(y.source,\\\"g\\\");function b(t,e){var r,n,i,a=y.lastIndex=x.lastIndex=0,o=-1,s=[],l=[];for(t+=\\\"\\\",e+=\\\"\\\";(r=y.exec(t))&&(n=x.exec(e));)(i=n.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:v(r,n)})),a=x.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+\\\"\\\"}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\\\"\\\")})}function _(t,r){var n,i=typeof r;return null==r||\\\"boolean\\\"===i?a(r):(\\\"number\\\"===i?v:\\\"string\\\"===i?(n=e.color(r))?(r=n,u):b:r instanceof e.color?u:r instanceof Date?g:Array.isArray(r)?d:\\\"function\\\"!=typeof r.valueOf&&\\\"function\\\"!=typeof r.toString||isNaN(r)?m:v)(t,r)}var w,k,M,A,T=180/Math.PI,S={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function C(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*T,skewX:Math.atan(l)*T,scaleX:o,scaleY:s}}function E(t,e,r,n){function i(t){return t.length?t.pop()+\\\" \\\":\\\"\\\"}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,n,i,a,o,s){if(t!==i||n!==a){var l=o.push(\\\"translate(\\\",null,e,null,r);s.push({i:l-4,x:v(t,i)},{i:l-2,x:v(n,a)})}else(i||a)&&o.push(\\\"translate(\\\"+i+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\\\"rotate(\\\",null,n)-2,x:v(t,e)})):e&&r.push(i(r)+\\\"rotate(\\\"+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+\\\"skewX(\\\",null,n)-2,x:v(t,e)}):e&&r.push(i(r)+\\\"skewX(\\\"+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+\\\"scale(\\\",null,\\\",\\\",null,\\\")\\\");o.push({i:s-4,x:v(t,r)},{i:s-2,x:v(e,n)})}else 1===r&&1===n||a.push(i(a)+\\\"scale(\\\"+r+\\\",\\\"+n+\\\")\\\")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r<n;)s[(e=l[r]).i]=e.x(t);return s.join(\\\"\\\")}}}var L=E(function(t){return\\\"none\\\"===t?S:(w||(w=document.createElement(\\\"DIV\\\"),k=document.documentElement,M=document.defaultView),w.style.transform=t,t=M.getComputedStyle(k.appendChild(w),null).getPropertyValue(\\\"transform\\\"),k.removeChild(w),C(+(t=t.slice(7,-1).split(\\\",\\\"))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},\\\"px, \\\",\\\"px)\\\",\\\"deg)\\\"),z=E(function(t){return null==t?S:(A||(A=document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\")),A.setAttribute(\\\"transform\\\",t),(t=A.transform.baseVal.consolidate())?C((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):S)},\\\", \\\",\\\")\\\",\\\")\\\"),O=Math.SQRT2,I=2,P=4,D=1e-12;function R(t){return((t=Math.exp(t))+1/t)/2}function B(t){return function(r,n){var i=t((r=e.hsl(r)).h,(n=e.hsl(n)).h),a=c(r.s,n.s),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(t){return r.h=i(t),r.s=a(t),r.l=o(t),r.opacity=s(t),r+\\\"\\\"}}}var F=B(s),N=B(c);function j(t){return function(r,n){var i=t((r=e.hcl(r)).h,(n=e.hcl(n)).h),a=c(r.c,n.c),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(t){return r.h=i(t),r.c=a(t),r.l=o(t),r.opacity=s(t),r+\\\"\\\"}}}var V=j(s),U=j(c);function q(t){return function r(n){function i(r,i){var a=t((r=e.cubehelix(r)).h,(i=e.cubehelix(i)).h),o=c(r.s,i.s),s=c(r.l,i.l),l=c(r.opacity,i.opacity);return function(t){return r.h=a(t),r.s=o(t),r.l=s(Math.pow(t,n)),r.opacity=l(t),r+\\\"\\\"}}return n=+n,i.gamma=r,i}(1)}var H=q(s),G=q(c);t.interpolate=_,t.interpolateArray=d,t.interpolateBasis=n,t.interpolateBasisClosed=i,t.interpolateDate=g,t.interpolateDiscrete=function(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}},t.interpolateHue=function(t,e){var r=s(+t,+e);return function(t){var e=r(t);return e-360*Math.floor(e/360)}},t.interpolateNumber=v,t.interpolateObject=m,t.interpolateRound=function(t,e){return e-=t=+t,function(r){return Math.round(t+e*r)}},t.interpolateString=b,t.interpolateTransformCss=L,t.interpolateTransformSvg=z,t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h<D)n=Math.log(c/o)/O,r=function(t){return[i+t*u,a+t*f,o*Math.exp(O*t*n)]};else{var p=Math.sqrt(h),d=(c*c-o*o+P*h)/(2*o*I*p),g=(c*c-o*o-P*h)/(2*c*I*p),v=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(g*g+1)-g);n=(m-v)/O,r=function(t){var e,r=t*n,s=R(v),l=o/(I*p)*(s*(e=O*r+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+l*u,a+l*f,o*s/R(O*r+v)]}}return r.duration=1e3*n,r},t.interpolateRgb=u,t.interpolateRgbBasis=h,t.interpolateRgbBasisClosed=p,t.interpolateHsl=F,t.interpolateHslLong=N,t.interpolateLab=function(t,r){var n=c((t=e.lab(t)).l,(r=e.lab(r)).l),i=c(t.a,r.a),a=c(t.b,r.b),o=c(t.opacity,r.opacity);return function(e){return t.l=n(e),t.a=i(e),t.b=a(e),t.opacity=o(e),t+\\\"\\\"}},t.interpolateHcl=V,t.interpolateHclLong=U,t.interpolateCubehelix=H,t.interpolateCubehelixLong=G,t.piecewise=function(t,e){for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(t){var e=Math.max(0,Math.min(n-1,Math.floor(t*=n)));return a[e](t-e)}},t.quantize=function(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t(n/(e-1));return r},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})},\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?i(r,t(\\\"d3-color\\\")):i(n.d3=n.d3||{},n.d3)},{\\\"d3-color\\\":142}],146:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,f,h,p=t._root,d={data:n},g=t._x0,v=t._y0,m=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=r>=(o=(v+y)/2))?v=o:y=o,i=p,!(p=p[f=u<<1|c]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&&r===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=r>=(o=(v+y)/2))?v=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}var r=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i};function n(t){return t[0]}function i(t){return t[1]}function a(t,e,r){var a=new o(null==e?n:e,null==r?i:r,NaN,NaN,NaN,NaN);return null==t?a:a.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var l=a.prototype=o.prototype;l.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},l.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},l.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(i=+this._x.call(null,r=t[n]))||isNaN(a=+this._y.call(null,r))||(s[n]=i,l[n]=a,i<c&&(c=i),i>f&&(f=i),a<u&&(u=a),a>h&&(h=a));for(f<c&&(c=this._x0,f=this._x1),h<u&&(u=this._y0,h=this._y1),this.cover(c,u).cover(f,h),n=0;n<o;++n)e(this,s[n],l[n],t[n]);return this},l.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{if(!(r>t||t>i||n>e||e>a))return this;var o,s,l=i-r,c=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),t>(i=r+l)||e>a);break;case 1:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),(r=i-l)>t||e>a);break;case 2:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),t>(i=r+l)||n>e);break;case 3:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),(r=i-l)>t||n>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},l.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},l.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(t,e,n){var i,a,o,s,l,c,u,f=this._x0,h=this._y0,p=this._x1,d=this._y1,g=[],v=this._root;for(v&&g.push(new r(v,f,h,p,d)),null==n?n=1/0:(f=t-n,h=e-n,p=t+n,d=e+n,n*=n);c=g.pop();)if(!(!(v=c.node)||(a=c.x0)>p||(o=c.y0)>d||(s=c.x1)<f||(l=c.y1)<h))if(v.length){var m=(a+s)/2,y=(o+l)/2;g.push(new r(v[3],m,y,s,l),new r(v[2],a,y,m,l),new r(v[1],m,o,s,y),new r(v[0],a,o,m,y)),(u=(e>=y)<<1|t>=m)&&(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_<n){var w=Math.sqrt(n=_);f=t-w,h=e-w,p=t+w,d=e+w,i=v.data}}return i},l.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,r,n,i,a,o,s,l,c,u,f,h,p=this._root,d=this._x0,g=this._y0,v=this._x1,m=this._y1;if(!p)return this;if(p.length)for(;;){if((c=a>=(s=(d+v)/2))?d=s:v=s,(u=o>=(l=(g+m)/2))?g=l:m=l,e=p,!(p=p[f=u<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this},l.root=function(){return this._root},l.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},l.visit=function(t){var e,n,i,a,o,s,l=[],c=this._root;for(c&&l.push(new r(c,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(c=e.node,i=e.x0,a=e.y0,o=e.x1,s=e.y1)&&c.length){var u=(i+o)/2,f=(a+s)/2;(n=c[3])&&l.push(new r(n,u,f,o,s)),(n=c[2])&&l.push(new r(n,i,f,u,s)),(n=c[1])&&l.push(new r(n,u,a,o,f)),(n=c[0])&&l.push(new r(n,i,a,u,f))}return this},l.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new r(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var a=e.node;if(a.length){var o,s=e.x0,l=e.y0,c=e.x1,u=e.y1,f=(s+c)/2,h=(l+u)/2;(o=a[0])&&n.push(new r(o,s,l,f,h)),(o=a[1])&&n.push(new r(o,f,l,c,h)),(o=a[2])&&n.push(new r(o,s,h,f,u)),(o=a[3])&&n.push(new r(o,f,h,c,u))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},l.x=function(t){return arguments.length?(this._x=t,this):this._x},l.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=a,Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],147:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";var e,r,n=0,i=0,a=0,o=1e3,s=0,l=0,c=0,u=\\\"object\\\"==typeof performance&&performance.now?performance:Date,f=\\\"object\\\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function h(){return l||(f(p),l=u.now()+c)}function p(){l=0}function d(){this._call=this._time=this._next=null}function g(t,e,r){var n=new d;return n.restart(t,e,r),n}function v(){h(),++n;for(var t,r=e;r;)(t=l-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function m(){l=(s=u.now())+c,n=i=0;try{v()}finally{n=0,function(){var t,n,i=e,a=1/0;for(;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:e=n);r=t,x(a)}(),l=0}}function y(){var t=u.now(),e=t-s;e>o&&(c-=e,s=t)}function x(t){n||(i&&(i=clearTimeout(i)),t-l>24?(t<1/0&&(i=setTimeout(m,t-u.now()-c)),a&&(a=clearInterval(a))):(a||(s=u.now(),a=setInterval(y,o)),n=1,f(m)))}d.prototype=g.prototype={constructor:d,restart:function(t,n,i){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"callback is not a function\\\");i=(null==i?h():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}};t.now=h,t.timer=g,t.timerFlush=v,t.timeout=function(t,e,r){var n=new d;return e=null==e?0:+e,n.restart(function(r){n.stop(),t(r+e)},e,r),n},t.interval=function(t,e,r){var n=new d,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?h():+r,n.restart(function a(o){o+=i,n.restart(a,i+=e,r),t(o)},e,r),n)},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],148:[function(t,e,r){!function(){var t={version:\\\"3.5.17\\\"},r=[].slice,n=function(t){return r.call(t)},i=this.document;function a(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement(\\\"DIV\\\").style.setProperty(\\\"opacity\\\",0,\\\"\\\")}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+\\\"\\\")},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+\\\"\\\")},u.setProperty=function(t,e,r){f.call(this,t,e+\\\"\\\",r)}}function h(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}t.ascending=h,t.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},t.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&r>n&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&r>n&&(r=n)}return r},t.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&n>r&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&n>r&&(r=n)}return r},t.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a<o;)if(null!=(n=t[a])&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else{for(;++a<o;)if(null!=(n=e.call(t,t[a],a))&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=e.call(t,t[a],a))&&(r>n&&(r=n),i<n&&(i=n))}return[r,i]},t.sum=function(t,e){var r,n=0,i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)d(r=+t[a])&&(n+=r);else for(;++a<i;)d(r=+e.call(t,t[a],a))&&(n+=r);return n},t.mean=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(1===arguments.length)for(;++a<i;)d(r=p(t[a]))?n+=r:--o;else for(;++a<i;)d(r=p(e.call(t,t[a],a)))?n+=r:--o;if(o)return n/o},t.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},t.median=function(e,r){var n,i=[],a=e.length,o=-1;if(1===arguments.length)for(;++o<a;)d(n=p(e[o]))&&i.push(n);else for(;++o<a;)d(n=p(r.call(e,e[o],o)))&&i.push(n);if(i.length)return t.quantile(i.sort(h),.5)},t.variance=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s<i;)d(r=p(t[s]))&&(o+=(n=r-a)*(r-(a+=n/++l)));else for(;++s<i;)d(r=p(e.call(t,t[s],s)))&&(o+=(n=r-a)*(r-(a+=n/++l)));if(l>1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var v=g(h);function m(t){return t.length}t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(t){return g(1===t.length?function(e,r){return h(t(e),r)}:t)},t.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e<r;)i[e]=[n,n=t[++e]];return i},t.transpose=function(e){if(!(a=e.length))return[];for(var r=-1,n=t.min(e,m),i=new Array(n);++r<n;)for(var a,o=-1,s=i[r]=new Array(a);++o<a;)s[o]=e[o][r];return i},t.zip=function(){return t.transpose(arguments)},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function b(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error(\\\"infinite range\\\");var n,i=[],a=function(t){var e=1;for(;t*e%1;)e*=10;return e}(y(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)<e;)i.push(n/a);return i},t.map=function(t,e){var r=new b;if(t instanceof b)t.forEach(function(t,e){r.set(t,e)});else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i<a;)r.set(i,t[i]);else for(;++i<a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r};var _=\\\"__proto__\\\",w=\\\"\\\\0\\\";function k(t){return(t+=\\\"\\\")===_||t[0]===w?w+t:t}function M(t){return(t+=\\\"\\\")[0]===w?t.slice(1):t}function A(t){return k(t)in this._}function T(t){return(t=k(t))in this._&&delete this._[t]}function S(){var t=[];for(var e in this._)t.push(M(e));return t}function C(){var t=0;for(var e in this._)++t;return t}function E(){for(var t in this._)return!1;return!0}function L(){this._=Object.create(null)}function z(t){return t}function O(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function I(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=P.length;r<n;++r){var i=P[r]+e;if(i in t)return i}}x(b,{has:A,get:function(t){return this._[k(t)]},set:function(t,e){return this._[k(t)]=e},remove:T,keys:S,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:M(e),value:this._[e]});return t},size:C,empty:E,forEach:function(t){for(var e in this._)t.call(this,M(e),this._[e])}}),t.nest=function(){var e,r,n={},i=[],a=[];function o(t,a,s){if(s>=i.length)return r?r.call(n,a):e?a.sort(e):a;for(var l,c,u,f,h=-1,p=a.length,d=i[s++],g=new b;++h<p;)(f=g.get(l=d(c=a[h])))?f.push(c):g.set(l,[c]);return t?(c=t(),u=function(e,r){c.set(e,o(t,r,s))}):(c={},u=function(e,r){c[e]=o(t,r,s)}),g.forEach(u),c}return n.map=function(t,e){return o(e,t,0)},n.entries=function(e){return function t(e,r){if(r>=i.length)return e;var n=[],o=a[r++];return e.forEach(function(e,i){n.push({key:e,values:t(i,r)})}),o?n.sort(function(t,e){return o(t.key,e.key)}):n}(o(t.map,e,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return a[i.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new L;if(t)for(var r=0,n=t.length;r<n;++r)e.add(t[r]);return e},x(L,{has:A,add:function(t){return this._[k(t+=\\\"\\\")]=!0,t},remove:T,values:S,size:C,empty:E,forEach:function(t){for(var e in this._)t.call(this,M(e))}}),t.behavior={},t.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n<i;)t[r=arguments[n]]=O(t,e,e[r]);return t};var P=[\\\"webkit\\\",\\\"ms\\\",\\\"moz\\\",\\\"Moz\\\",\\\"o\\\",\\\"O\\\"];function D(){}function R(){}function B(t){var e=[],r=new b;function n(){for(var r,n=e,i=-1,a=n.length;++i<a;)(r=n[i].on)&&r.apply(this,arguments);return t}return n.on=function(n,i){var a,o=r.get(n);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,a=e.indexOf(o)).concat(e.slice(a+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function F(){t.event.preventDefault()}function N(){for(var e,r=t.event;e=r.sourceEvent;)r=e;return r}function j(e){for(var r=new R,n=0,i=arguments.length;++n<i;)r[arguments[n]]=B(r);return r.of=function(n,i){return function(a){try{var o=a.sourceEvent=t.event;a.target=e,t.event=a,r[a.type].apply(n,i)}finally{t.event=o}}},r}t.dispatch=function(){for(var t=new R,e=-1,r=arguments.length;++e<r;)t[arguments[e]]=B(t);return t},R.prototype.on=function(t,e){var r=t.indexOf(\\\".\\\"),n=\\\"\\\";if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(V,\\\"\\\\\\\\$&\\\")};var V=/[\\\\\\\\\\\\^\\\\$\\\\*\\\\+\\\\?\\\\|\\\\[\\\\]\\\\(\\\\)\\\\.\\\\{\\\\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function q(t){return U(t,Y),t}var H=function(t,e){return e.querySelector(t)},G=function(t,e){return e.querySelectorAll(t)},W=function(t,e){var r=t.matches||t[I(t,\\\"matchesSelector\\\")];return(W=function(t,e){return r.call(t,e)})(t,e)};\\\"function\\\"==typeof Sizzle&&(H=function(t,e){return Sizzle(t,e)[0]||null},G=Sizzle,W=Sizzle.matchesSelector),t.selection=function(){return t.select(i.documentElement)};var Y=t.selection.prototype=[];function X(t){return\\\"function\\\"==typeof t?t:function(){return H(t,this)}}function Z(t){return\\\"function\\\"==typeof t?t:function(){return G(t,this)}}Y.select=function(t){var e,r,n,i,a=[];t=X(t);for(var o=-1,s=this.length;++o<s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,c=n.length;++l<c;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&&\\\"__data__\\\"in i&&(r.__data__=i.__data__)):e.push(null)}return q(a)},Y.selectAll=function(t){var e,r,i=[];t=Z(t);for(var a=-1,o=this.length;++a<o;)for(var s=this[a],l=-1,c=s.length;++l<c;)(r=s[l])&&(i.push(e=n(t.call(r,r.__data__,l,a))),e.parentNode=r);return q(i)};var $=\\\"http://www.w3.org/1999/xhtml\\\",J={svg:\\\"http://www.w3.org/2000/svg\\\",xhtml:$,xlink:\\\"http://www.w3.org/1999/xlink\\\",xml:\\\"http://www.w3.org/XML/1998/namespace\\\",xmlns:\\\"http://www.w3.org/2000/xmlns/\\\"};function K(e,r){return e=t.ns.qualify(e),null==r?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:\\\"function\\\"==typeof r?e.local?function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}:function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}:e.local?function(){this.setAttributeNS(e.space,e.local,r)}:function(){this.setAttribute(e,r)}}function Q(t){return t.trim().replace(/\\\\s+/g,\\\" \\\")}function tt(e){return new RegExp(\\\"(?:^|\\\\\\\\s+)\\\"+t.requote(e)+\\\"(?:\\\\\\\\s+|$)\\\",\\\"g\\\")}function et(t){return(t+\\\"\\\").trim().split(/^|\\\\s+/)}function rt(t,e){var r=(t=et(t).map(nt)).length;return\\\"function\\\"==typeof e?function(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}:function(){for(var n=-1;++n<r;)t[n](this,e)}}function nt(t){var e=tt(t);return function(r,n){if(i=r.classList)return n?i.add(t):i.remove(t);var i=r.getAttribute(\\\"class\\\")||\\\"\\\";n?(e.lastIndex=0,e.test(i)||r.setAttribute(\\\"class\\\",Q(i+\\\" \\\"+t))):r.setAttribute(\\\"class\\\",Q(i.replace(e,\\\" \\\")))}}function it(t,e,r){return null==e?function(){this.style.removeProperty(t)}:\\\"function\\\"==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function at(t,e){return null==e?function(){delete this[t]}:\\\"function\\\"==typeof e?function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}:function(){this[t]=e}}function ot(e){return\\\"function\\\"==typeof e?e:(e=t.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,r=this.namespaceURI;return r===$&&t.documentElement.namespaceURI===$?t.createElement(e):t.createElementNS(r,e)}}function st(){var t=this.parentNode;t&&t.removeChild(this)}function lt(t){return{__data__:t}}function ct(t){return function(){return W(this,t)}}function ut(t,e){for(var r=0,n=t.length;r<n;r++)for(var i,a=t[r],o=0,s=a.length;o<s;o++)(i=a[o])&&e(i,o,r);return t}function ft(t){return U(t,ht),t}t.ns={prefix:J,qualify:function(t){var e=t.indexOf(\\\":\\\"),r=t;return e>=0&&\\\"xmlns\\\"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),J.hasOwnProperty(r)?{space:J[r],local:t}:t}},Y.attr=function(e,r){if(arguments.length<2){if(\\\"string\\\"==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each(K(r,e[r]));return this}return this.each(K(e,r))},Y.classed=function(t,e){if(arguments.length<2){if(\\\"string\\\"==typeof t){var r=this.node(),n=(t=et(t)).length,i=-1;if(e=r.classList){for(;++i<n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute(\\\"class\\\");++i<n;)if(!tt(t[i]).test(e))return!1;return!0}for(e in t)this.each(rt(e,t[e]));return this}return this.each(rt(t,e))},Y.style=function(t,e,r){var n=arguments.length;if(n<3){if(\\\"string\\\"!=typeof t){for(r in n<2&&(e=\\\"\\\"),t)this.each(it(r,t[r],e));return this}if(n<2){var i=this.node();return o(i).getComputedStyle(i,null).getPropertyValue(t)}r=\\\"\\\"}return this.each(it(t,e,r))},Y.property=function(t,e){if(arguments.length<2){if(\\\"string\\\"==typeof t)return this.node()[t];for(e in t)this.each(at(e,t[e]));return this}return this.each(at(t,e))},Y.text=function(t){return arguments.length?this.each(\\\"function\\\"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?\\\"\\\":e}:null==t?function(){this.textContent=\\\"\\\"}:function(){this.textContent=t}):this.node().textContent},Y.html=function(t){return arguments.length?this.each(\\\"function\\\"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?\\\"\\\":e}:null==t?function(){this.innerHTML=\\\"\\\"}:function(){this.innerHTML=t}):this.node().innerHTML},Y.append=function(t){return t=ot(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Y.insert=function(t,e){return t=ot(t),e=X(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},Y.remove=function(){return this.each(st)},Y.data=function(t,e){var r,n,i=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++i<a;)(n=r[i])&&(t[i]=n.__data__);return t}function o(t,r){var n,i,a,o=t.length,u=r.length,f=Math.min(o,u),h=new Array(u),p=new Array(u),d=new Array(o);if(e){var g,v=new b,m=new Array(o);for(n=-1;++n<o;)(i=t[n])&&(v.has(g=e.call(i,i.__data__,n))?d[n]=i:v.set(g,i),m[n]=g);for(n=-1;++n<u;)(i=v.get(g=e.call(r,a=r[n],n)))?!0!==i&&(h[n]=i,i.__data__=a):p[n]=lt(a),v.set(g,!0);for(n=-1;++n<o;)n in m&&!0!==v.get(m[n])&&(d[n]=t[n])}else{for(n=-1;++n<f;)i=t[n],a=r[n],i?(i.__data__=a,h[n]=i):p[n]=lt(a);for(;n<u;++n)p[n]=lt(r[n]);for(;n<o;++n)d[n]=t[n]}p.update=h,p.parentNode=h.parentNode=d.parentNode=t.parentNode,s.push(p),l.push(h),c.push(d)}var s=ft([]),l=q([]),c=q([]);if(\\\"function\\\"==typeof t)for(;++i<a;)o(r=this[i],t.call(r,r.parentNode.__data__,i));else for(;++i<a;)o(r=this[i],t);return l.enter=function(){return s},l.exit=function(){return c},l},Y.datum=function(t){return arguments.length?this.property(\\\"__data__\\\",t):this.property(\\\"__data__\\\")},Y.filter=function(t){var e,r,n,i=[];\\\"function\\\"!=typeof t&&(t=ct(t));for(var a=0,o=this.length;a<o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s<l;s++)(n=r[s])&&t.call(n,n.__data__,s,a)&&e.push(n)}return q(i)},Y.order=function(){for(var t=-1,e=this.length;++t<e;)for(var r,n=this[t],i=n.length-1,a=n[i];--i>=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Y.sort=function(t){t=function(t){arguments.length||(t=h);return function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e<r;)this[e].sort(t);return this.order()},Y.each=function(t){return ut(this,function(e,r,n){t.call(e,e.__data__,r,n)})},Y.call=function(t){var e=n(arguments);return t.apply(e[0]=this,e),this},Y.empty=function(){return!this.node()},Y.node=function(){for(var t=0,e=this.length;t<e;t++)for(var r=this[t],n=0,i=r.length;n<i;n++){var a=r[n];if(a)return a}return null},Y.size=function(){var t=0;return ut(this,function(){++t}),t};var ht=[];function pt(e,r,i){var a=\\\"__on\\\"+e,o=e.indexOf(\\\".\\\"),s=gt;o>0&&(e=e.slice(0,o));var l=dt.get(e);function c(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}return l&&(e=l,s=vt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[a]=t,t.$=i),t._=r}:c:r?D:function(){var r,n=new RegExp(\\\"^__on([^.]+)\\\"+t.requote(e)+\\\"$\\\");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}t.selection.enter=ft,t.selection.enter.prototype=ht,ht.append=Y.append,ht.empty=Y.empty,ht.node=Y.node,ht.call=Y.call,ht.size=Y.size,ht.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s<l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var c=-1,u=i.length;++c<u;)(a=i[c])?(e.push(n[c]=r=t.call(i.parentNode,a.__data__,c,s)),r.__data__=a.__data__):e.push(null)}return q(o)},ht.insert=function(t,e){var r,n,i;return arguments.length<2&&(r=this,e=function(t,e,a){var o,s=r[a].update,l=s.length;for(a!=i&&(i=a,n=0),e>=n&&(n=e+1);!(o=s[n])&&++n<l;);return o}),Y.insert.call(this,t,e)},t.select=function(t){var e;return\\\"string\\\"==typeof t?(e=[H(t,i)]).parentNode=i.documentElement:(e=[t]).parentNode=a(t),q([e])},t.selectAll=function(t){var e;return\\\"string\\\"==typeof t?(e=n(G(t,i))).parentNode=i.documentElement:(e=n(t)).parentNode=null,q([e])},Y.on=function(t,e,r){var n=arguments.length;if(n<3){if(\\\"string\\\"!=typeof t){for(r in n<2&&(e=!1),t)this.each(pt(r,t[r],e));return this}if(n<2)return(n=this.node()[\\\"__on\\\"+t])&&n._;r=!1}return this.each(pt(t,e,r))};var dt=t.map({mouseenter:\\\"mouseover\\\",mouseleave:\\\"mouseout\\\"});function gt(e,r){return function(n){var i=t.event;t.event=n,r[0]=this.__data__;try{e.apply(this,r)}finally{t.event=i}}}function vt(t,e){var r=gt(t,e);return function(t){var e=t.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||r.call(this,t)}}i&&dt.forEach(function(t){\\\"on\\\"+t in i&&dt.remove(t)});var mt,yt=0;function xt(e){var r=\\\".dragsuppress-\\\"+ ++yt,n=\\\"click\\\"+r,i=t.select(o(e)).on(\\\"touchmove\\\"+r,F).on(\\\"dragstart\\\"+r,F).on(\\\"selectstart\\\"+r,F);if(null==mt&&(mt=!(\\\"onselectstart\\\"in e)&&I(e.style,\\\"userSelect\\\")),mt){var s=a(e).style,l=s[mt];s[mt]=\\\"none\\\"}return function(t){if(i.on(r,null),mt&&(s[mt]=l),t){var e=function(){i.on(n,null)};i.on(n,function(){F(),e()},!0),setTimeout(e,0)}}}t.mouse=function(t){return _t(t,N())};var bt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function _t(e,r){r.changedTouches&&(r=r.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();if(bt<0){var a=o(e);if(a.scrollX||a.scrollY){var s=(n=t.select(\\\"body\\\").append(\\\"svg\\\").style({position:\\\"absolute\\\",top:0,left:0,margin:0,padding:0,border:\\\"none\\\"},\\\"important\\\"))[0][0].getScreenCTM();bt=!(s.f||s.e),n.remove()}}return bt?(i.x=r.pageX,i.y=r.pageY):(i.x=r.clientX,i.y=r.clientY),[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}var l=e.getBoundingClientRect();return[r.clientX-l.left-e.clientLeft,r.clientY-l.top-e.clientTop]}function wt(){return t.event.changedTouches[0].identifier}t.touch=function(t,e,r){if(arguments.length<3&&(r=e,e=N().changedTouches),e)for(var n,i=0,a=e.length;i<a;++i)if((n=e[i]).identifier===r)return _t(t,n)},t.behavior.drag=function(){var e=j(a,\\\"drag\\\",\\\"dragstart\\\",\\\"dragend\\\"),r=null,n=s(D,t.mouse,o,\\\"mousemove\\\",\\\"mouseup\\\"),i=s(wt,t.touch,z,\\\"touchmove\\\",\\\"touchend\\\");function a(){this.on(\\\"mousedown.drag\\\",n).on(\\\"touchstart.drag\\\",i)}function s(n,i,a,o,s){return function(){var l,c=t.event.target.correspondingElement||t.event.target,u=this.parentNode,f=e.of(this,arguments),h=0,p=n(),d=\\\".drag\\\"+(null==p?\\\"\\\":\\\"-\\\"+p),g=t.select(a(c)).on(o+d,function(){var t,e,r=i(u,p);if(!r)return;t=r[0]-m[0],e=r[1]-m[1],h|=t|e,m=r,f({type:\\\"drag\\\",x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:e})}).on(s+d,function(){if(!i(u,p))return;g.on(o+d,null).on(s+d,null),v(h),f({type:\\\"dragend\\\"})}),v=xt(c),m=i(u,p);l=r?[(l=r.apply(this,arguments)).x-m[0],l.y-m[1]]:[0,0],f({type:\\\"dragstart\\\"})}}return a.origin=function(t){return arguments.length?(r=t,a):r},t.rebind(a,e,\\\"on\\\")},t.touches=function(t,e){return arguments.length<2&&(e=N().touches),e?n(e).map(function(e){var r=_t(t,e);return r.identifier=e.identifier,r}):[]};var kt=1e-6,Mt=kt*kt,At=Math.PI,Tt=2*At,St=Tt-kt,Ct=At/2,Et=At/180,Lt=180/At;function zt(t){return t>0?1:t<0?-1:0}function Ot(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function It(t){return t>1?0:t<-1?At:Math.acos(t)}function Pt(t){return t>1?Ct:t<-1?-Ct:Math.asin(t)}function Dt(t){return((t=Math.exp(t))+1/t)/2}function Rt(t){return(t=Math.sin(t/2))*t}var Bt=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h<Mt)n=Math.log(c/o)/Bt,r=function(t){return[i+t*u,a+t*f,o*Math.exp(Bt*t*n)]};else{var p=Math.sqrt(h),d=(c*c-o*o+4*h)/(2*o*2*p),g=(c*c-o*o-4*h)/(2*c*2*p),v=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(g*g+1)-g);n=(m-v)/Bt,r=function(t){var e,r=t*n,s=Dt(v),l=o/(2*p)*(s*(e=Bt*r+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+l*u,a+l*f,o*s/Dt(Bt*r+v)]}}return r.duration=1e3*n,r},t.behavior.zoom=function(){var e,r,n,a,s,l,c,u,f,h={x:0,y:0,k:1},p=[960,500],d=jt,g=250,v=0,m=\\\"mousedown.zoom\\\",y=\\\"mousemove.zoom\\\",x=\\\"mouseup.zoom\\\",b=\\\"touchstart.zoom\\\",_=j(w,\\\"zoomstart\\\",\\\"zoom\\\",\\\"zoomend\\\");function w(t){t.on(m,z).on(Nt+\\\".zoom\\\",I).on(\\\"dblclick.zoom\\\",P).on(b,O)}function k(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function M(t){h.k=Math.max(d[0],Math.min(d[1],t))}function A(t,e){e=function(t){return[t[0]*h.k+h.x,t[1]*h.k+h.y]}(e),h.x+=t[0]-e[0],h.y+=t[1]-e[1]}function T(e,n,i,a){e.__chart__={x:h.x,y:h.y,k:h.k},M(Math.pow(2,a)),A(r=n,i),e=t.select(e),g>0&&(e=e.transition().duration(g)),e.call(w.event)}function S(){c&&c.domain(l.range().map(function(t){return(t-h.x)/h.k}).map(l.invert)),f&&f.domain(u.range().map(function(t){return(t-h.y)/h.k}).map(u.invert))}function C(t){v++||t({type:\\\"zoomstart\\\"})}function E(t){S(),t({type:\\\"zoom\\\",scale:h.k,translate:[h.x,h.y]})}function L(t){--v||(t({type:\\\"zoomend\\\"}),r=null)}function z(){var e=this,r=_.of(e,arguments),n=0,i=t.select(o(e)).on(y,function(){n=1,A(t.mouse(e),a),E(r)}).on(x,function(){i.on(y,null).on(x,null),s(n),L(r)}),a=k(t.mouse(e)),s=xt(e);fs.call(e),C(r)}function O(){var e,r=this,n=_.of(r,arguments),i={},a=0,o=\\\".zoom-\\\"+t.event.changedTouches[0].identifier,l=\\\"touchmove\\\"+o,c=\\\"touchend\\\"+o,u=[],f=t.select(r),p=xt(r);function d(){var n=t.touches(r);return e=h.k,n.forEach(function(t){t.identifier in i&&(i[t.identifier]=k(t))}),n}function g(){var e=t.event.target;t.select(e).on(l,v).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,f=n.length;o<f;++o)i[n[o].identifier]=null;var p=d(),g=Date.now();if(1===p.length){if(g-s<500){var m=p[0];T(r,m,i[m.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),F()}s=g}else if(p.length>1){m=p[0];var x=p[1],b=m[0]-x[0],_=m[1]-x[1];a=b*b+_*_}}function v(){var o,l,c,u,f=t.touches(r);fs.call(r);for(var h=0,p=f.length;h<p;++h,u=null)if(c=f[h],u=i[c.identifier]){if(l)break;o=c,l=u}if(u){var d=(d=c[0]-o[0])*d+(d=c[1]-o[1])*d,g=a&&Math.sqrt(d/a);o=[(o[0]+c[0])/2,(o[1]+c[1])/2],l=[(l[0]+u[0])/2,(l[1]+u[1])/2],M(g*e)}s=null,A(o,l),E(n)}function y(){if(t.event.touches.length){for(var e=t.event.changedTouches,r=0,a=e.length;r<a;++r)delete i[e[r].identifier];for(var s in i)return void d()}t.selectAll(u).on(o,null),f.on(m,z).on(b,O),p(),L(n)}g(),C(n),f.on(m,null).on(b,g)}function I(){var i=_.of(this,arguments);a?clearTimeout(a):(fs.call(this),e=k(r=n||t.mouse(this)),C(i)),a=setTimeout(function(){a=null,L(i)},50),F(),M(Math.pow(2,.002*Ft())*h.k),A(r,e),E(i)}function P(){var e=t.mouse(this),r=Math.log(h.k)/Math.LN2;T(this,e,k(e),t.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1)}return Nt||(Nt=\\\"onwheel\\\"in i?(Ft=function(){return-t.event.deltaY*(t.event.deltaMode?120:1)},\\\"wheel\\\"):\\\"onmousewheel\\\"in i?(Ft=function(){return t.event.wheelDelta},\\\"mousewheel\\\"):(Ft=function(){return-t.event.detail},\\\"MozMousePixelScroll\\\")),w.event=function(e){e.each(function(){var e=_.of(this,arguments),n=h;ds?t.select(this).transition().each(\\\"start.zoom\\\",function(){h=this.__chart__||{x:0,y:0,k:1},C(e)}).tween(\\\"zoom:zoom\\\",function(){var i=p[0],a=p[1],o=r?r[0]:i/2,s=r?r[1]:a/2,l=t.interpolateZoom([(o-h.x)/h.k,(s-h.y)/h.k,i/h.k],[(o-n.x)/n.k,(s-n.y)/n.k,i/n.k]);return function(t){var r=l(t),n=i/r[2];this.__chart__=h={x:o-r[0]*n,y:s-r[1]*n,k:n},E(e)}}).each(\\\"interrupt.zoom\\\",function(){L(e)}).each(\\\"end.zoom\\\",function(){L(e)}):(this.__chart__=h,C(e),E(e),L(e))})},w.translate=function(t){return arguments.length?(h={x:+t[0],y:+t[1],k:h.k},S(),w):[h.x,h.y]},w.scale=function(t){return arguments.length?(h={x:h.x,y:h.y,k:null},M(+t),S(),w):h.k},w.scaleExtent=function(t){return arguments.length?(d=null==t?jt:[+t[0],+t[1]],w):d},w.center=function(t){return arguments.length?(n=t&&[+t[0],+t[1]],w):n},w.size=function(t){return arguments.length?(p=t&&[+t[0],+t[1]],w):p},w.duration=function(t){return arguments.length?(g=+t,w):g},w.x=function(t){return arguments.length?(c=t,l=t.copy(),h={x:0,y:0,k:1},w):c},w.y=function(t){return arguments.length?(f=t,u=t.copy(),h={x:0,y:0,k:1},w):f},t.rebind(w,_,\\\"on\\\")};var Ft,Nt,jt=[0,1/0];function Vt(){}function Ut(t,e,r){return this instanceof Ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof Ut?new Ut(t.h,t.s,t.l):ue(\\\"\\\"+t,fe,Ut):new Ut(t,e,r)}t.color=Vt,Vt.prototype.toString=function(){return this.rgb()+\\\"\\\"},t.hsl=Ut;var qt=Ut.prototype=new Vt;function Ht(t,e,r){var n,i;function a(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ae(a(t+120),a(t),a(t-120))}function Gt(e,r,n){return this instanceof Gt?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length<2?e instanceof Gt?new Gt(e.h,e.c,e.l):ee(e instanceof Xt?e.l:(e=he((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Gt(e,r,n)}qt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,this.l/t)},qt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,t*this.l)},qt.rgb=function(){return Ht(this.h,this.s,this.l)},t.hcl=Gt;var Wt=Gt.prototype=new Vt;function Yt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Xt(r,Math.cos(t*=Et)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof Gt?Yt(t.h,t.c,t.l):he((t=ae(t)).r,t.g,t.b):new Xt(t,e,r)}Wt.brighter=function(t){return new Gt(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Wt.darker=function(t){return new Gt(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Wt.rgb=function(){return Yt(this.h,this.c,this.l).rgb()},t.lab=Xt;var Zt=18,$t=.95047,Jt=1,Kt=1.08883,Qt=Xt.prototype=new Vt;function te(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ae(ie(3.2404542*(i=re(i)*$t)-1.5371385*(n=re(n)*Jt)-.4985314*(a=re(a)*Kt)),ie(-.969266*i+1.8760108*n+.041556*a),ie(.0556434*i-.2040259*n+1.0572252*a))}function ee(t,e,r){return t>0?new Gt(Math.atan2(r,e)*Lt,Math.sqrt(e*e+r*r),t):new Gt(NaN,NaN,t)}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ae(t,e,r){return this instanceof ae?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ae?new ae(t.r,t.g,t.b):ue(\\\"\\\"+t,ae,Ht):new ae(t,e,r)}function oe(t){return new ae(t>>16,t>>8&255,255&t)}function se(t){return oe(t)+\\\"\\\"}Qt.brighter=function(t){return new Xt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},Qt.darker=function(t){return new Xt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},Qt.rgb=function(){return te(this.l,this.a,this.b)},t.rgb=ae;var le=ae.prototype=new Vt;function ce(t){return t<16?\\\"0\\\"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\\\\((.*)\\\\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(\\\",\\\"),n[1]){case\\\"hsl\\\":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case\\\"rgb\\\":return e(de(i[0]),de(i[1]),de(i[2]))}return(a=ge.get(t))?e(a.r,a.g,a.b):(null==t||\\\"#\\\"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function fe(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e<r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=l>0&&l<1?0:n),new Ut(n,i,l)}function he(t,e,r){var n=ne((.4124564*(t=pe(t))+.3575761*(e=pe(e))+.1804375*(r=pe(r)))/$t),i=ne((.2126729*t+.7151522*e+.072175*r)/Jt);return Xt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/Kt)))}function pe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return\\\"%\\\"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e<i&&(e=i),r&&r<i&&(r=i),n&&n<i&&(n=i),new ae(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new ae(i,i,i)},le.darker=function(t){return new ae((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},le.hsl=function(){return fe(this.r,this.g,this.b)},le.toString=function(){return\\\"#\\\"+ce(this.r)+ce(this.g)+ce(this.b)};var ge=t.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function ve(t){return\\\"function\\\"==typeof t?t:function(){return t}}function me(t){return function(e,r,n){return 2===arguments.length&&\\\"function\\\"==typeof r&&(n=r,r=null),ye(e,r,t,n)}}function ye(e,r,i,a){var o={},s=t.dispatch(\\\"beforesend\\\",\\\"progress\\\",\\\"load\\\",\\\"error\\\"),l={},c=new XMLHttpRequest,u=null;function f(){var t,e=c.status;if(!e&&function(t){var e=t.responseType;return e&&\\\"text\\\"!==e?t.response:t.responseText}(c)||e>=200&&e<300||304===e){try{t=i.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return!this.XDomainRequest||\\\"withCredentials\\\"in c||!/^(http(s)?:)?\\\\/\\\\//.test(e)||(c=new XDomainRequest),\\\"onload\\\"in c?c.onload=c.onerror=f:c.onreadystatechange=function(){c.readyState>3&&f()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+\\\"\\\").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+\\\"\\\",o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+\\\"\\\",o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return i=t,o},[\\\"get\\\",\\\"post\\\"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}}),o.send=function(t,n,i){if(2===arguments.length&&\\\"function\\\"==typeof n&&(i=n,n=null),c.open(t,e,!0),null==r||\\\"accept\\\"in l||(l.accept=r+\\\",*/*\\\"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=i&&o.on(\\\"error\\\",i).on(\\\"load\\\",function(t){i(null,t)}),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,\\\"on\\\"),null==a?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(a))}ge.forEach(function(t,e){ge.set(t,oe(e))}),t.functor=ve,t.xhr=me(z),t.dsv=function(t,e){var r=new RegExp('[\\\"'+t+\\\"\\\\n]\\\"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=ye(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'\\\"'+t.replace(/\\\\\\\"/g,'\\\"\\\"')+'\\\"':t}return i.parse=function(t,e){var r;return i.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function(\\\"d\\\",\\\"return {\\\"+t.map(function(t,e){return JSON.stringify(t)+\\\": d[\\\"+e+\\\"]\\\"}).join(\\\",\\\")+\\\"}\\\");r=e?function(t,r){return e(i(t),r)}:i})},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,c=0,u=0;function f(){if(c>=l)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++<l;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return c=r+2,13===(s=t.charCodeAt(r+1))?(i=!0,10===t.charCodeAt(r+2)&&++c):10===s&&(i=!0),t.slice(e+1,r).replace(/\\\"\\\"/g,'\\\"')}for(;c<l;){var s,u=1;if(10===(s=t.charCodeAt(c++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(c)&&(++c,++u);else if(s!==n)continue;return t.slice(e,c-u)}return t.slice(e)}for(;(r=f())!==o;){for(var h=[];r!==a&&r!==o;)h.push(r),r=f();e&&null==(h=e(h,u++))||s.push(h)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var r=new L,n=[];return e.forEach(function(t){for(var e in t)r.has(e)||n.push(r.add(e))}),[n.map(l).join(t)].concat(e.map(function(e){return n.map(function(t){return l(e[t])}).join(t)})).join(\\\"\\\\n\\\")},i.formatRows=function(t){return t.map(s).join(\\\"\\\\n\\\")},i},t.csv=t.dsv(\\\",\\\",\\\"text/csv\\\"),t.tsv=t.dsv(\\\"\\\\t\\\",\\\"text/tab-separated-values\\\");var xe,be,_e,we,ke=this[I(this,\\\"requestAnimationFrame\\\")]||function(t){setTimeout(t,17)};function Me(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i={c:t,t:r+e,n:null};return be?be.n=i:xe=i,be=i,_e||(we=clearTimeout(we),_e=1,ke(Ae)),i}function Ae(){var t=Te(),e=Se()-t;e>24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Ae,e)),_e=0):(_e=1,ke(Ae))}function Te(){for(var t=Date.now(),e=xe;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Se(){for(var t,e=xe,r=1/0;e;)e.c?(e.t<r&&(r=e.t),e=(t=e).n):e=t?t.n=e.n:xe=e.n;return be=t,r}function Ce(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}t.timer=function(){Me.apply(this,arguments)},t.timer.flush=function(){Te(),Se()},t.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Ee=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"\\\\xb5\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"].map(function(t,e){var r=Math.pow(10,3*y(8-e));return{scale:e>8?function(t){return t/r}:function(t){return t*r},symbol:t}});t.formatPrefix=function(e,r){var n=0;return(e=+e)&&(e<0&&(e*=-1),r&&(e=t.round(e,Ce(e,r))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ee[8+n/3]};var Le=/(?:([^{])?([<>=^]))?([+\\\\- ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.-?\\\\d+)?([a-z%])?/i,ze=t.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(e,r){return(e=t.round(e,Ce(e,r))).toFixed(Math.max(0,Math.min(20,Ce(e*(1+1e-15),r))))}});function Oe(t){return t+\\\"\\\"}var Ie=t.time={},Pe=Date;function De(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}De.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Re.setUTCDate.apply(this._,arguments)},setDay:function(){Re.setUTCDay.apply(this._,arguments)},setFullYear:function(){Re.setUTCFullYear.apply(this._,arguments)},setHours:function(){Re.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Re.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Re.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Re.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Re.setUTCSeconds.apply(this._,arguments)},setTime:function(){Re.setTime.apply(this._,arguments)}};var Re=Date.prototype;function Be(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r<n-e?r:n}function i(r){return e(r=t(new Pe(r-1)),1),r}function a(t,r){return e(t=new Pe(+t),r),t}function o(t,n,a){var o=i(t),s=[];if(a>1)for(;o<n;)r(o)%a||s.push(new Date(+o)),e(o,1);else for(;o<n;)s.push(new Date(+o)),e(o,1);return s}t.floor=t,t.round=n,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=Fe(t);return s.floor=s,s.round=Fe(n),s.ceil=Fe(i),s.offset=Fe(a),s.range=function(t,e,r){try{Pe=De;var n=new De;return n._=t,o(n,e,r)}finally{Pe=Date}},t}function Fe(t){return function(e,r){try{Pe=De;var n=new De;return n._=e,t(n,r)._}finally{Pe=Date}}}Ie.year=Be(function(t){return(t=Ie.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Ie.years=Ie.year.range,Ie.years.utc=Ie.year.utc.range,Ie.day=Be(function(t){var e=new Pe(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),Ie.days=Ie.day.range,Ie.days.utc=Ie.day.utc.range,Ie.dayOfYear=function(t){var e=Ie.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},[\\\"sunday\\\",\\\"monday\\\",\\\"tuesday\\\",\\\"wednesday\\\",\\\"thursday\\\",\\\"friday\\\",\\\"saturday\\\"].forEach(function(t,e){e=7-e;var r=Ie[t]=Be(function(t){return(t=Ie.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=Ie.year(t).getDay();return Math.floor((Ie.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});Ie[t+\\\"s\\\"]=r.range,Ie[t+\\\"s\\\"].utc=r.utc.range,Ie[t+\\\"OfYear\\\"]=function(t){var r=Ie.year(t).getDay();return Math.floor((Ie.dayOfYear(t)+(r+e)%7)/7)}}),Ie.week=Ie.sunday,Ie.weeks=Ie.sunday.range,Ie.weeks.utc=Ie.sunday.utc.range,Ie.weekOfYear=Ie.sundayOfYear;var Ne={\\\"-\\\":\\\"\\\",_:\\\" \\\",0:\\\"0\\\"},je=/^\\\\s*\\\\d+/,Ve=/^%/;function Ue(t,e,r){var n=t<0?\\\"-\\\":\\\"\\\",i=(n?-t:t)+\\\"\\\",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function qe(e){return new RegExp(\\\"^(?:\\\"+e.map(t.requote).join(\\\"|\\\")+\\\")\\\",\\\"i\\\")}function He(t){for(var e=new b,r=-1,n=t.length;++r<n;)e.set(t[r].toLowerCase(),r);return e}function Ge(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function We(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r));return n?(t.U=+n[0],r+n[0].length):-1}function Ye(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r));return n?(t.W=+n[0],r+n[0].length):-1}function Xe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Ze(t,e,r){je.lastIndex=0;var n,i=je.exec(e.slice(r,r+2));return i?(t.y=(n=+i[0])+(n>68?1900:2e3),r+i[0].length):-1}function $e(t,e,r){return/^[+-]\\\\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Je(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Ke(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Qe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function tr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function er(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function rr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function nr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ir(t){var e=t.getTimezoneOffset(),r=e>0?\\\"-\\\":\\\"+\\\",n=y(e)/60|0,i=y(e)%60;return r+Ue(n,\\\"0\\\",2)+Ue(i,\\\"0\\\",2)}function ar(t,e,r){Ve.lastIndex=0;var n=Ve.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function or(t){for(var e=t.length,r=-1;++r<e;)t[r][0]=this(t[r][0]);return function(e){for(var r=0,n=t[r];!n[1](e);)n=t[++r];return n[0](e)}}t.locale=function(e){return{numberFormat:function(e){var r=e.decimal,n=e.thousands,i=e.grouping,a=e.currency,o=i&&n?function(t,e){for(var r=t.length,a=[],o=0,s=i[0],l=0;r>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(r-=s,r+s)),!((l+=s+1)>e));)s=i[o=(o+1)%i.length];return a.reverse().join(n)}:z;return function(e){var n=Le.exec(e),i=n[1]||\\\" \\\",s=n[2]||\\\">\\\",l=n[3]||\\\"-\\\",c=n[4]||\\\"\\\",u=n[5],f=+n[6],h=n[7],p=n[8],d=n[9],g=1,v=\\\"\\\",m=\\\"\\\",y=!1,x=!0;switch(p&&(p=+p.substring(1)),(u||\\\"0\\\"===i&&\\\"=\\\"===s)&&(u=i=\\\"0\\\",s=\\\"=\\\"),d){case\\\"n\\\":h=!0,d=\\\"g\\\";break;case\\\"%\\\":g=100,m=\\\"%\\\",d=\\\"f\\\";break;case\\\"p\\\":g=100,m=\\\"%\\\",d=\\\"r\\\";break;case\\\"b\\\":case\\\"o\\\":case\\\"x\\\":case\\\"X\\\":\\\"#\\\"===c&&(v=\\\"0\\\"+d.toLowerCase());case\\\"c\\\":x=!1;case\\\"d\\\":y=!0,p=0;break;case\\\"s\\\":g=-1,d=\\\"r\\\"}\\\"$\\\"===c&&(v=a[0],m=a[1]),\\\"r\\\"!=d||p||(d=\\\"g\\\"),null!=p&&(\\\"g\\\"==d?p=Math.max(1,Math.min(21,p)):\\\"e\\\"!=d&&\\\"f\\\"!=d||(p=Math.max(0,Math.min(20,p)))),d=ze.get(d)||Oe;var b=u&&h;return function(e){var n=m;if(y&&e%1)return\\\"\\\";var a=e<0||0===e&&1/e<0?(e=-e,\\\"-\\\"):\\\"-\\\"===l?\\\"\\\":l;if(g<0){var c=t.formatPrefix(e,p);e=c.scale(e),n=c.symbol+m}else e*=g;var _,w,k=(e=d(e,p)).lastIndexOf(\\\".\\\");if(k<0){var M=x?e.lastIndexOf(\\\"e\\\"):-1;M<0?(_=e,w=\\\"\\\"):(_=e.substring(0,M),w=e.substring(M))}else _=e.substring(0,k),w=r+e.substring(k+1);!u&&h&&(_=o(_,1/0));var A=v.length+_.length+w.length+(b?0:a.length),T=A<f?new Array(A=f-A+1).join(i):\\\"\\\";return b&&(_=o(T+_,T.length?f-w.length:1/0)),a+=v,e=_+w,(\\\"<\\\"===s?a+e+T:\\\">\\\"===s?T+a+e:\\\"^\\\"===s?T.substring(0,A>>=1)+a+e+T.substring(A):a+(b?e:T+e))+n}}}(e),timeFormat:function(e){var r=e.dateTime,n=e.date,i=e.time,a=e.periods,o=e.days,s=e.shortDays,l=e.months,c=e.shortMonths;function u(t){var e=t.length;function r(r){for(var n,i,a,o=[],s=-1,l=0;++s<e;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(i=Ne[n=t.charAt(++s)])&&(n=t.charAt(++s)),(a=_[n])&&(n=a(r,null==i?\\\"e\\\"===n?\\\" \\\":\\\"0\\\":i)),o.push(n),l=s+1);return o.push(t.slice(l,s)),o.join(\\\"\\\")}return r.parse=function(e){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(f(r,t,e,0)!=e.length)return null;\\\"p\\\"in r&&(r.H=r.H%12+12*r.p);var n=null!=r.Z&&Pe!==De,i=new(n?De:Pe);return\\\"j\\\"in r?i.setFullYear(r.y,0,r.j):\\\"W\\\"in r||\\\"U\\\"in r?(\\\"w\\\"in r||(r.w=\\\"W\\\"in r?1:0),i.setFullYear(r.y,0,1),i.setFullYear(r.y,0,\\\"W\\\"in r?(r.w+6)%7+7*r.W-(i.getDay()+5)%7:r.w+7*r.U-(i.getDay()+6)%7)):i.setFullYear(r.y,r.m,r.d),i.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),n?i._:i},r.toString=function(){return t},r}function f(t,e,r,n){for(var i,a,o,s=0,l=e.length,c=r.length;s<l;){if(n>=c)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=w[o in Ne?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}u.utc=function(t){var e=u(t);function r(t){try{var r=new(Pe=De);return r._=t,e(r)}finally{Pe=Date}}return r.parse=function(t){try{Pe=De;var r=e.parse(t);return r&&r._}finally{Pe=Date}},r.toString=e.toString,r},u.multi=u.utc.multi=or;var h=t.map(),p=qe(o),d=He(o),g=qe(s),v=He(s),m=qe(l),y=He(l),x=qe(c),b=He(c);a.forEach(function(t,e){h.set(t.toLowerCase(),e)});var _={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(r),d:function(t,e){return Ue(t.getDate(),e,2)},e:function(t,e){return Ue(t.getDate(),e,2)},H:function(t,e){return Ue(t.getHours(),e,2)},I:function(t,e){return Ue(t.getHours()%12||12,e,2)},j:function(t,e){return Ue(1+Ie.dayOfYear(t),e,3)},L:function(t,e){return Ue(t.getMilliseconds(),e,3)},m:function(t,e){return Ue(t.getMonth()+1,e,2)},M:function(t,e){return Ue(t.getMinutes(),e,2)},p:function(t){return a[+(t.getHours()>=12)]},S:function(t,e){return Ue(t.getSeconds(),e,2)},U:function(t,e){return Ue(Ie.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ue(Ie.mondayOfYear(t),e,2)},x:u(n),X:u(i),y:function(t,e){return Ue(t.getFullYear()%100,e,2)},Y:function(t,e){return Ue(t.getFullYear()%1e4,e,4)},Z:ir,\\\"%\\\":function(){return\\\"%\\\"}},w={a:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.w=v.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){m.lastIndex=0;var n=m.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return f(t,_.c.toString(),e,r)},d:Ke,e:Ke,H:tr,I:tr,j:Qe,L:nr,m:Je,M:er,p:function(t,e,r){var n=h.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:rr,U:We,w:Ge,W:Ye,x:function(t,e,r){return f(t,_.x.toString(),e,r)},X:function(t,e,r){return f(t,_.X.toString(),e,r)},y:Ze,Y:Xe,Z:$e,\\\"%\\\":ar};return u}(e)}};var sr=t.locale({decimal:\\\".\\\",thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"],dateTime:\\\"%a %b %e %X %Y\\\",date:\\\"%m/%d/%Y\\\",time:\\\"%H:%M:%S\\\",periods:[\\\"AM\\\",\\\"PM\\\"],days:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],shortDays:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],months:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],shortMonths:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"]});function lr(){}t.format=sr.numberFormat,t.geo={},lr.prototype={s:0,t:0,add:function(t){ur(t,this.t,cr),ur(cr.s,this.s,this),this.s?this.t+=cr.t:this.s=cr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cr=new lr;function ur(t,e,r){var n=r.s=t+e,i=n-t,a=n-i;r.t=t-a+(e-i)}function fr(t,e){t&&pr.hasOwnProperty(t.type)&&pr[t.type](t,e)}t.geo.stream=function(t,e){t&&hr.hasOwnProperty(t.type)?hr[t.type](t,e):fr(t,e)};var hr={Feature:function(t,e){fr(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n<i;)fr(r[n].geometry,e)}},pr={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){dr(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)dr(r[n],e,0)},Polygon:function(t,e){gr(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)gr(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n<i;)fr(r[n],e)}};function dr(t,e,r){var n,i=-1,a=t.length-r;for(e.lineStart();++i<a;)n=t[i],e.point(n[0],n[1],n[2]);e.lineEnd()}function gr(t,e){var r=-1,n=t.length;for(e.polygonStart();++r<n;)dr(t[r],e,1);e.polygonEnd()}t.geo.area=function(e){return vr=0,t.geo.stream(e,Er),vr};var vr,mr,yr,xr,br,_r,wr,kr,Mr,Ar,Tr,Sr,Cr=new lr,Er={sphere:function(){vr+=4*At},point:D,lineStart:D,lineEnd:D,polygonStart:function(){Cr.reset(),Er.lineStart=Lr},polygonEnd:function(){var t=2*Cr;vr+=t<0?4*At+t:t,Er.lineStart=Er.lineEnd=Er.point=D}};function Lr(){var t,e,r,n,i;function a(t,e){e=e*Et/2+At/4;var a=(t*=Et)-r,o=a>=0?1:-1,s=o*a,l=Math.cos(e),c=Math.sin(e),u=i*c,f=n*l+u*Math.cos(s),h=u*o*Math.sin(s);Cr.add(Math.atan2(h,f)),r=t,n=l,i=c}Er.point=function(o,s){Er.point=a,r=(t=o)*Et,n=Math.cos(s=(e=s)*Et/2+At/4),i=Math.sin(s)},Er.lineEnd=function(){a(t,e)}}function zr(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function Or(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ir(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Pr(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Dr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Rr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Br(t){return[Math.atan2(t[1],t[0]),Pt(t[2])]}function Fr(t,e){return y(t[0]-e[0])<kt&&y(t[1]-e[1])<kt}t.geo.bounds=function(){var e,r,n,i,a,o,s,l,c,u,f,h={point:p,lineStart:g,lineEnd:v,polygonStart:function(){h.point=m,h.lineStart=x,h.lineEnd=b,c=0,Er.polygonStart()},polygonEnd:function(){Er.polygonEnd(),h.point=p,h.lineStart=g,h.lineEnd=v,Cr<0?(e=-(n=180),r=-(i=90)):c>kt?i=90:c<-kt&&(r=-90),f[0]=e,f[1]=n}};function p(t,a){u.push(f=[e=t,n=t]),a<r&&(r=a),a>i&&(i=a)}function d(t,o){var s=zr([t*Et,o*Et]);if(l){var c=Ir(l,s),u=Ir([c[1],-c[0],0],c);Rr(u),u=Br(u);var f=t-a,h=f>0?1:-1,d=u[0]*Lt*h,g=y(f)>180;if(g^(h*a<d&&d<h*t))(v=u[1]*Lt)>i&&(i=v);else if(g^(h*a<(d=(d+360)%360-180)&&d<h*t)){var v;(v=-u[1]*Lt)<r&&(r=v)}else o<r&&(r=o),o>i&&(i=o);g?t<a?_(e,t)>_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t):n>=e?(t<e&&(e=t),t>n&&(n=t)):t>a?_(e,t)>_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t)}else p(t,o);l=s,a=t}function g(){h.point=d}function v(){f[0]=e,f[1]=n,h.point=p,l=null}function m(t,e){if(l){var r=t-a;c+=y(r)>180?r+(r>0?360:-360):r}else o=t,s=e;Er.point(t,e),d(t,e)}function x(){Er.lineStart()}function b(){m(o,s),Er.lineEnd(),y(c)>kt&&(e=-(n=180)),f[0]=e,f[1]=n,l=null}function _(t,e){return(e-=t)<0?e+360:e}function w(t,e){return t[0]-e[0]}function k(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}return function(a){if(i=n=-(e=r=1/0),u=[],t.geo.stream(a,h),c=u.length){u.sort(w);for(var o=1,s=[g=u[0]];o<c;++o)k((p=u[o])[0],g)||k(p[1],g)?(_(g[0],p[1])>_(g[0],g[1])&&(g[1]=p[1]),_(p[0],g[1])>_(g[0],g[1])&&(g[0]=p[0])):s.push(g=p);for(var l,c,p,d=-1/0,g=(o=0,s[c=s.length-1]);o<=c;g=p,++o)p=s[o],(l=_(g[1],p[0]))>d&&(d=l,e=p[0],n=g[1])}return u=f=null,e===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,r],[n,i]]}}(),t.geo.centroid=function(e){mr=yr=xr=br=_r=wr=kr=Mr=Ar=Tr=Sr=0,t.geo.stream(e,Nr);var r=Ar,n=Tr,i=Sr,a=r*r+n*n+i*i;return a<Mt&&(r=wr,n=kr,i=Mr,yr<kt&&(r=xr,n=br,i=_r),(a=r*r+n*n+i*i)<Mt)?[NaN,NaN]:[Math.atan2(n,r)*Lt,Pt(i/Math.sqrt(a))*Lt]};var Nr={sphere:D,point:jr,lineStart:Ur,lineEnd:qr,polygonStart:function(){Nr.lineStart=Hr},polygonEnd:function(){Nr.lineStart=Ur}};function jr(t,e){t*=Et;var r=Math.cos(e*=Et);Vr(r*Math.cos(t),r*Math.sin(t),Math.sin(e))}function Vr(t,e,r){xr+=(t-xr)/++mr,br+=(e-br)/mr,_r+=(r-_r)/mr}function Ur(){var t,e,r;function n(n,i){n*=Et;var a=Math.cos(i*=Et),o=a*Math.cos(n),s=a*Math.sin(n),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*l-r*s)*c+(c=r*o-t*l)*c+(c=t*s-e*o)*c),t*o+e*s+r*l);yr+=c,wr+=c*(t+(t=o)),kr+=c*(e+(e=s)),Mr+=c*(r+(r=l)),Vr(t,e,r)}Nr.point=function(i,a){i*=Et;var o=Math.cos(a*=Et);t=o*Math.cos(i),e=o*Math.sin(i),r=Math.sin(a),Nr.point=n,Vr(t,e,r)}}function qr(){Nr.point=jr}function Hr(){var t,e,r,n,i;function a(t,e){t*=Et;var a=Math.cos(e*=Et),o=a*Math.cos(t),s=a*Math.sin(t),l=Math.sin(e),c=n*l-i*s,u=i*o-r*l,f=r*s-n*o,h=Math.sqrt(c*c+u*u+f*f),p=r*o+n*s+i*l,d=h&&-It(p)/h,g=Math.atan2(h,p);Ar+=d*c,Tr+=d*u,Sr+=d*f,yr+=g,wr+=g*(r+(r=o)),kr+=g*(n+(n=s)),Mr+=g*(i+(i=l)),Vr(r,n,i)}Nr.point=function(o,s){t=o,e=s,Nr.point=a,o*=Et;var l=Math.cos(s*=Et);r=l*Math.cos(o),n=l*Math.sin(o),i=Math.sin(s),Vr(r,n,i)},Nr.lineEnd=function(){a(t,e),Nr.lineEnd=qr,Nr.point=jr}}function Gr(t,e){function r(r,n){return r=t(r,n),e(r[0],r[1])}return t.invert&&e.invert&&(r.invert=function(r,n){return(r=e.invert(r,n))&&t.invert(r[0],r[1])}),r}function Wr(){return!0}function Yr(t,e,r,n,i){var a=[],o=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,r=t[0],n=t[e];if(Fr(r,n)){i.lineStart();for(var s=0;s<e;++s)i.point((r=t[s])[0],r[1]);i.lineEnd()}else{var l=new Zr(r,t,null,!0),c=new Zr(r,null,l,!1);l.o=c,a.push(l),o.push(c),l=new Zr(n,t,null,!1),c=new Zr(n,null,l,!0),l.o=c,a.push(l),o.push(c)}}}),o.sort(e),Xr(a),Xr(o),a.length){for(var s=0,l=r,c=o.length;s<c;++s)o[s].e=l=!l;for(var u,f,h=a[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(s=0,c=u.length;s<c;++s)i.point((f=u[s])[0],f[1]);else n(p.x,p.n.x,1,i);p=p.n}else{if(d)for(s=(u=p.p.z).length-1;s>=0;--s)i.point((f=u[s])[0],f[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function Xr(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n<e;)i.n=r=t[n],r.p=i,i=r;i.n=r=t[0],r.p=i}}function Zr(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function $r(e,r,n,i){return function(a,o){var s,l=r(o),c=a.invert(i[0],i[1]),u={point:f,lineStart:p,lineEnd:d,polygonStart:function(){u.point=b,u.lineStart=_,u.lineEnd=w,s=[],g=[]},polygonEnd:function(){u.point=f,u.lineStart=p,u.lineEnd=d,s=t.merge(s);var e=function(t,e){var r=t[0],n=t[1],i=[Math.sin(r),-Math.cos(r),0],a=0,o=0;Cr.reset();for(var s=0,l=e.length;s<l;++s){var c=e[s],u=c.length;if(u)for(var f=c[0],h=f[0],p=f[1]/2+At/4,d=Math.sin(p),g=Math.cos(p),v=1;;){v===u&&(v=0);var m=(t=c[v])[0],y=t[1]/2+At/4,x=Math.sin(y),b=Math.cos(y),_=m-h,w=_>=0?1:-1,k=w*_,M=k>At,A=d*x;if(Cr.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),a+=M?_+w*Tt:_,M^h>=r^m>=r){var T=Ir(zr(f),zr(t));Rr(T);var S=Ir(i,T);Rr(S);var C=(M^_>=0?-1:1)*Pt(S[2]);(n>C||n===C&&(T[0]||T[1]))&&(o+=M^_>=0?1:-1)}if(!v++)break;h=m,d=x,g=b,f=t}}return(a<-kt||a<kt&&Cr<-kt)^1&o}(c,g);s.length?(x||(o.polygonStart(),x=!0),Yr(s,Qr,e,n,o)):e&&(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),s=g=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function f(t,r){var n=a(t,r);e(t=n[0],r=n[1])&&o.point(t,r)}function h(t,e){var r=a(t,e);l.point(r[0],r[1])}function p(){u.point=h,l.lineStart()}function d(){u.point=f,l.lineEnd()}var g,v,m=Kr(),y=r(m),x=!1;function b(t,e){v.push([t,e]);var r=a(t,e);y.point(r[0],r[1])}function _(){y.lineStart(),v=[]}function w(){b(v[0][0],v[0][1]),y.lineEnd();var t,e=y.clean(),r=m.buffer(),n=r.length;if(v.pop(),g.push(v),v=null,n)if(1&e){var i,a=-1;if((n=(t=r[0]).length-1)>0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a<n;)o.point((i=t[a])[0],i[1]);o.lineEnd()}}else n>1&&2&e&&r.push(r.pop().concat(r.shift())),s.push(r.filter(Jr))}return u}}function Jr(t){return t.length>1}function Kr(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:D,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Qr(t,e){return((t=t.x)[0]<0?t[1]-Ct-kt:Ct-t[1])-((e=e.x)[0]<0?e[1]-Ct-kt:Ct-e[1])}var tn=$r(Wr,function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?At:-At,l=y(a-r);y(l-At)<kt?(t.point(r,n=(n+o)/2>0?Ct:-Ct),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=At&&(y(r-i)<kt&&(r-=i*kt),y(a-s)<kt&&(a-=s*kt),n=function(t,e,r,n){var i,a,o=Math.sin(t-r);return y(o)>kt?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}(r,n,a,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=a,n=o),i=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var i;if(null==t)i=r*Ct,n.point(-At,i),n.point(0,i),n.point(At,i),n.point(At,0),n.point(At,-i),n.point(0,-i),n.point(-At,-i),n.point(-At,0),n.point(-At,i);else if(y(t[0]-e[0])>kt){var a=t[0]<e[0]?At:-At;i=r*a/2,n.point(-a,i),n.point(0,i),n.point(a,i)}else n.point(e[0],e[1])},[-At,-At/2]);function en(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,c=o.y,u=0,f=1,h=s.x-l,p=s.y-c;if(a=t-l,h||!(a>0)){if(a/=h,h<0){if(a<u)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>u&&(u=a)}if(a=r-l,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>u&&(u=a)}else if(h>0){if(a<u)return;a<f&&(f=a)}if(a=e-c,p||!(a>0)){if(a/=p,p<0){if(a<u)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>u&&(u=a)}if(a=n-c,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>u&&(u=a)}else if(p>0){if(a<u)return;a<f&&(f=a)}return u>0&&(i.a={x:l+u*h,y:c+u*p}),f<1&&(i.b={x:l+f*h,y:c+f*p}),i}}}}}}var rn=1e9;function nn(e,r,n,i){return function(l){var c,u,f,h,p,d,g,v,m,y,x,b=l,_=Kr(),w=en(e,r,n,i),k={point:T,lineStart:function(){k.point=S,u&&u.push(f=[]);y=!0,m=!1,g=v=NaN},lineEnd:function(){c&&(S(h,p),d&&m&&_.rejoin(),c.push(_.buffer()));k.point=T,m&&l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=t.merge(c);var r=function(t){for(var e=0,r=u.length,n=t[1],i=0;i<r;++i)for(var a,o=1,s=u[i],l=s.length,c=s[0];o<l;++o)a=s[o],c[1]<=n?a[1]>n&&Ot(c,a,t)>0&&++e:a[1]<=n&&Ot(c,a,t)<0&&--e,c=a;return 0!==e}([e,i]),n=x&&r,a=c.length;(n||a)&&(l.polygonStart(),n&&(l.lineStart(),M(null,null,1,l),l.lineEnd()),a&&Yr(c,o,r,M,l),l.polygonEnd()),c=u=f=null}};function M(t,o,l,c){var u=0,f=0;if(null==t||(u=a(t,l))!==(f=a(o,l))||s(t,o)<0^l>0)do{c.point(0===u||3===u?e:n,u>1?i:r)}while((u=(u+l+4)%4)!==f);else c.point(o[0],o[1])}function A(t,a){return e<=t&&t<=n&&r<=a&&a<=i}function T(t,e){A(t,e)&&l.point(t,e)}function S(t,e){var r=A(t=Math.max(-rn,Math.min(rn,t)),e=Math.max(-rn,Math.min(rn,e)));if(u&&f.push([t,e]),y)h=t,p=e,d=r,y=!1,r&&(l.lineStart(),l.point(t,e));else if(r&&m)l.point(t,e);else{var n={a:{x:g,y:v},b:{x:t,y:e}};w(n)?(m||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),x=!1):r&&(l.lineStart(),l.point(t,e),x=!1)}g=t,v=e,m=r}return k};function a(t,i){return y(t[0]-e)<kt?i>0?0:3:y(t[0]-n)<kt?i>0?2:1:y(t[1]-r)<kt?i>0?1:0:i>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var r=a(t,1),n=a(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}}function an(t){var e=0,r=At/3,n=En(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*At/180,r=t[1]*At/180):[e/At*180,r/At*180]},i}function on(t,e){var r=Math.sin(t),n=(r+Math.sin(e))/2,i=1+r*(2*n-r),a=Math.sqrt(i)/n;function o(t,e){var r=Math.sqrt(i-2*n*Math.sin(e))/n;return[r*Math.sin(t*=n),a-r*Math.cos(t)]}return o.invert=function(t,e){var r=a-e;return[Math.atan2(t,r)/n,Pt((i-(t*t+r*r)*n*n)/(2*n))]},o}t.geo.clipExtent=function(){var t,e,r,n,i,a,o={stream:function(t){return i&&(i.valid=!1),(i=a(t)).valid=!0,i},extent:function(s){return arguments.length?(a=nn(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(t.geo.conicEqualArea=function(){return an(on)}).raw=on,t.geo.albers=function(){return t.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},t.geo.albersUsa=function(){var e,r,n,i,a=t.geo.albers(),o=t.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=t.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};function c(t){var a=t[0],o=t[1];return e=null,r(a,o),e||(n(a,o),e)||i(a,o),e}return c.invert=function(t){var e=a.scale(),r=a.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},c.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(t){return arguments.length?(a.precision(t),o.precision(t),s.precision(t),c):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),o.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),u=+t[0],f=+t[1];return r=a.translate(t).clipExtent([[u-.455*e,f-.238*e],[u+.455*e,f+.238*e]]).stream(l).point,n=o.translate([u-.307*e,f+.201*e]).clipExtent([[u-.425*e+kt,f+.12*e+kt],[u-.214*e-kt,f+.234*e-kt]]).stream(l).point,i=s.translate([u-.205*e,f+.212*e]).clipExtent([[u-.214*e+kt,f+.166*e+kt],[u-.115*e-kt,f+.234*e-kt]]).stream(l).point,c},c.scale(1070)};var sn,ln,cn,un,fn,hn,pn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){ln=0,pn.lineStart=dn},polygonEnd:function(){pn.lineStart=pn.lineEnd=pn.point=D,sn+=y(ln/2)}};function dn(){var t,e,r,n;function i(t,e){ln+=n*t-r*e,r=t,n=e}pn.point=function(a,o){pn.point=i,t=r=a,e=n=o},pn.lineEnd=function(){i(t,e)}}var gn={point:function(t,e){t<cn&&(cn=t);t>fn&&(fn=t);e<un&&(un=e);e>hn&&(hn=e)},lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D};function vn(){var t=mn(4.5),e=[],r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=mn(e),r},result:function(){if(e.length){var t=e.join(\\\"\\\");return e=[],t}}};function n(r,n){e.push(\\\"M\\\",r,\\\",\\\",n,t)}function i(t,n){e.push(\\\"M\\\",t,\\\",\\\",n),r.point=a}function a(t,r){e.push(\\\"L\\\",t,\\\",\\\",r)}function o(){r.point=n}function s(){e.push(\\\"Z\\\")}return r}function mn(t){return\\\"m0,\\\"+t+\\\"a\\\"+t+\\\",\\\"+t+\\\" 0 1,1 0,\\\"+-2*t+\\\"a\\\"+t+\\\",\\\"+t+\\\" 0 1,1 0,\\\"+2*t+\\\"z\\\"}var yn,xn={point:bn,lineStart:_n,lineEnd:wn,polygonStart:function(){xn.lineStart=kn},polygonEnd:function(){xn.point=bn,xn.lineStart=_n,xn.lineEnd=wn}};function bn(t,e){xr+=t,br+=e,++_r}function _n(){var t,e;function r(r,n){var i=r-t,a=n-e,o=Math.sqrt(i*i+a*a);wr+=o*(t+r)/2,kr+=o*(e+n)/2,Mr+=o,bn(t=r,e=n)}xn.point=function(n,i){xn.point=r,bn(t=n,e=i)}}function wn(){xn.point=bn}function kn(){var t,e,r,n;function i(t,e){var i=t-r,a=e-n,o=Math.sqrt(i*i+a*a);wr+=o*(r+t)/2,kr+=o*(n+e)/2,Mr+=o,Ar+=(o=n*t-r*e)*(r+t),Tr+=o*(n+e),Sr+=3*o,bn(r=t,n=e)}xn.point=function(a,o){xn.point=i,bn(t=r=a,e=n=o)},xn.lineEnd=function(){i(t,e)}}function Mn(t){var e=4.5,r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=t,r},result:D};function n(r,n){t.moveTo(r+e,n),t.arc(r,n,e,0,Tt)}function i(e,n){t.moveTo(e,n),r.point=a}function a(e,r){t.lineTo(e,r)}function o(){r.point=n}function s(){t.closePath()}return r}function An(t){var e=.5,r=Math.cos(30*Et),n=16;function i(e){return(n?function(e){var r,i,o,s,l,c,u,f,h,p,d,g,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),v.lineStart=_},polygonEnd:function(){e.polygonEnd(),v.lineStart=y}};function m(r,n){r=t(r,n),e.point(r[0],r[1])}function y(){f=NaN,v.point=x,e.lineStart()}function x(r,i){var o=zr([r,i]),s=t(r,i);a(f,h,u,p,d,g,f=s[0],h=s[1],u=r,p=o[0],d=o[1],g=o[2],n,e),e.point(f,h)}function b(){v.point=m,e.lineEnd()}function _(){y(),v.point=w,v.lineEnd=k}function w(t,e){x(r=t,e),i=f,o=h,s=p,l=d,c=g,v.point=x}function k(){a(f,h,u,p,d,g,i,o,r,s,l,c,n,e),v.lineEnd=b,b()}return v}:function(e){return Sn(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function a(n,i,o,s,l,c,u,f,h,p,d,g,v,m){var x=u-n,b=f-i,_=x*x+b*b;if(_>4*e&&v--){var w=s+p,k=l+d,M=c+g,A=Math.sqrt(w*w+k*k+M*M),T=Math.asin(M/=A),S=y(y(M)-1)<kt||y(o-h)<kt?(o+h)/2:Math.atan2(k,w),C=t(S,T),E=C[0],L=C[1],z=E-n,O=L-i,I=b*z-x*O;(I*I/_>e||y((x*z+b*O)/_-.5)>.3||s*p+l*d+c*g<r)&&(a(n,i,o,s,l,c,E,L,S,w/=A,k/=A,M,v,m),m.point(E,L),a(E,L,S,w,k,M,u,f,h,p,d,g,v,m))}}return i.precision=function(t){return arguments.length?(n=(e=t*t)>0&&16,i):Math.sqrt(e)},i}function Tn(t){this.stream=t}function Sn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Cn(t){return En(function(){return t})()}function En(e){var r,n,i,a,o,s,l=An(function(t,e){return[(t=r(t,e))[0]*c+a,o-t[1]*c]}),c=150,u=480,f=250,h=0,p=0,d=0,g=0,v=0,m=tn,x=z,b=null,_=null;function w(t){return[(t=i(t[0]*Et,t[1]*Et))[0]*c+a,o-t[1]*c]}function k(t){return(t=i.invert((t[0]-a)/c,(o-t[1])/c))&&[t[0]*Lt,t[1]*Lt]}function M(){i=Gr(n=In(d,g,v),r);var t=r(h,p);return a=u-t[0]*c,o=f+t[1]*c,A()}function A(){return s&&(s.valid=!1,s=null),w}return w.stream=function(t){return s&&(s.valid=!1),(s=Ln(m(n,l(x(t))))).valid=!0,s},w.clipAngle=function(t){return arguments.length?(m=null==t?(b=t,tn):function(t){var e=Math.cos(t),r=e>0,n=y(e)>kt;return $r(i,function(t){var e,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var p,d=[f,h],g=i(f,h),v=r?g?0:o(f,h):g?o(f+(f<0?At:-At),h):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(p=a(e,d),(Fr(e,p)||Fr(d,p))&&(d[0]+=kt,d[1]+=kt,g=i(d[0],d[1]))),g!==l)u=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(n&&e&&r^g){var m;v&s||!(m=a(d,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||e&&Fr(e,d)||t.point(d[0],d[1]),e=d,l=g,s=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}},Bn(t,6*Et),r?[0,-t]:[-At,t-At]);function i(t,r){return Math.cos(t)*Math.cos(r)>e}function a(t,r,n){var i=[1,0,0],a=Ir(zr(t),zr(r)),o=Or(a,a),s=a[0],l=o-s*s;if(!l)return!n&&t;var c=e*o/l,u=-e*s/l,f=Ir(i,a),h=Dr(i,c);Pr(h,Dr(a,u));var p=f,d=Or(h,p),g=Or(p,p),v=d*d-g*(Or(h,h)-1);if(!(v<0)){var m=Math.sqrt(v),x=Dr(p,(-d-m)/g);if(Pr(x,h),x=Br(x),!n)return x;var b,_=t[0],w=r[0],k=t[1],M=r[1];w<_&&(b=_,_=w,w=b);var A=w-_,T=y(A-At)<kt;if(!T&&M<k&&(b=k,k=M,M=b),T||A<kt?T?k+M>0^x[1]<(y(x[0]-_)<kt?k:M):k<=x[1]&&x[1]<=M:A>At^(_<=x[0]&&x[0]<=w)){var S=Dr(p,(-d+m)/g);return Pr(S,h),[x,Br(S)]}}}function o(e,n){var i=r?t:At-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}}((b=+t)*Et),A()):b},w.clipExtent=function(t){return arguments.length?(_=t,x=t?nn(t[0][0],t[0][1],t[1][0],t[1][1]):z,A()):_},w.scale=function(t){return arguments.length?(c=+t,M()):c},w.translate=function(t){return arguments.length?(u=+t[0],f=+t[1],M()):[u,f]},w.center=function(t){return arguments.length?(h=t[0]%360*Et,p=t[1]%360*Et,M()):[h*Lt,p*Lt]},w.rotate=function(t){return arguments.length?(d=t[0]%360*Et,g=t[1]%360*Et,v=t.length>2?t[2]%360*Et:0,M()):[d*Lt,g*Lt,v*Lt]},t.rebind(w,l,\\\"precision\\\"),function(){return r=e.apply(this,arguments),w.invert=r.invert&&k,M()}}function Ln(t){return Sn(t,function(e,r){t.point(e*Et,r*Et)})}function zn(t,e){return[t,e]}function On(t,e){return[t>At?t-Tt:t<-At?t+Tt:t,e]}function In(t,e,r){return t?e||r?Gr(Dn(t),Rn(e,r)):Dn(t):e||r?Rn(e,r):On}function Pn(t){return function(e,r){return[(e+=t)>At?e-Tt:e<-At?e+Tt:e,r]}}function Dn(t){var e=Pn(t);return e.invert=Pn(-t),e}function Rn(t,e){var r=Math.cos(t),n=Math.sin(t),i=Math.cos(e),a=Math.sin(e);function o(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*r+s*n;return[Math.atan2(l*i-u*a,s*r-c*n),Pt(u*i+l*a)]}return o.invert=function(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*i-l*a;return[Math.atan2(l*i+c*a,s*r+u*n),Pt(u*r-s*n)]},o}function Bn(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Fn(r,i),a=Fn(r,a),(o>0?i<a:i>a)&&(i+=o*Tt)):(i=t+o*Tt,a=t-.5*l);for(var c,u=i;o>0?u>a:u<a;u-=l)s.point((c=Br([r,-n*Math.cos(u),-n*Math.sin(u)]))[0],c[1])}}function Fn(t,e){var r=zr(e);r[0]-=t,Rr(r);var n=It(-r[1]);return((-r[2]<0?-n:n)+2*Math.PI-kt)%(2*Math.PI)}function Nn(e,r,n){var i=t.range(e,r-kt,n).concat(r);return function(t){return i.map(function(e){return[t,e]})}}function jn(e,r,n){var i=t.range(e,r-kt,n).concat(r);return function(t){return i.map(function(e){return[e,t]})}}function Vn(t){return t.source}function Un(t){return t.target}t.geo.path=function(){var e,r,n,i,a,o=4.5;function s(e){return e&&(\\\"function\\\"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=n(i)),t.geo.stream(e,a)),i.result()}function l(){return a=null,s}return s.area=function(e){return sn=0,t.geo.stream(e,n(pn)),sn},s.centroid=function(e){return xr=br=_r=wr=kr=Mr=Ar=Tr=Sr=0,t.geo.stream(e,n(xn)),Sr?[Ar/Sr,Tr/Sr]:Mr?[wr/Mr,kr/Mr]:_r?[xr/_r,br/_r]:[NaN,NaN]},s.bounds=function(e){return fn=hn=-(cn=un=1/0),t.geo.stream(e,n(gn)),[[cn,un],[fn,hn]]},s.projection=function(t){return arguments.length?(n=(e=t)?t.stream||(r=t,i=An(function(t,e){return r([t*Lt,e*Lt])}),function(t){return Ln(i(t))}):z,l()):e;var r,i},s.context=function(t){return arguments.length?(i=null==(r=t)?new vn:new Mn(t),\\\"function\\\"!=typeof o&&i.pointRadius(o),l()):r},s.pointRadius=function(t){return arguments.length?(o=\\\"function\\\"==typeof t?t:(i.pointRadius(+t),+t),s):o},s.projection(t.geo.albersUsa()).context(null)},t.geo.transform=function(t){return{stream:function(e){var r=new Tn(e);for(var n in t)r[n]=t[n];return r}}},Tn.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},t.geo.projection=Cn,t.geo.projectionMutator=En,(t.geo.equirectangular=function(){return Cn(zn)}).raw=zn.invert=zn,t.geo.rotation=function(t){function e(e){return(e=t(e[0]*Et,e[1]*Et))[0]*=Lt,e[1]*=Lt,e}return t=In(t[0]%360*Et,t[1]*Et,t.length>2?t[2]*Et:0),e.invert=function(e){return(e=t.invert(e[0]*Et,e[1]*Et))[0]*=Lt,e[1]*=Lt,e},e},On.invert=zn,t.geo.circle=function(){var t,e,r=[0,0],n=6;function i(){var t=\\\"function\\\"==typeof r?r.apply(this,arguments):r,n=In(-t[0]*Et,-t[1]*Et,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Lt,t[1]*=Lt}}),{type:\\\"Polygon\\\",coordinates:[i]}}return i.origin=function(t){return arguments.length?(r=t,i):r},i.angle=function(r){return arguments.length?(e=Bn((t=+r)*Et,n*Et),i):t},i.precision=function(r){return arguments.length?(e=Bn(t*Et,(n=+r)*Et),i):n},i.angle(90)},t.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Et,i=t[1]*Et,a=e[1]*Et,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),c=Math.cos(i),u=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((r=f*o)*r+(r=c*u-l*f*s)*r),l*u+c*f*s)},t.geo.graticule=function(){var e,r,n,i,a,o,s,l,c,u,f,h,p=10,d=p,g=90,v=360,m=2.5;function x(){return{type:\\\"MultiLineString\\\",coordinates:b()}}function b(){return t.range(Math.ceil(i/g)*g,n,g).map(f).concat(t.range(Math.ceil(l/v)*v,s,v).map(h)).concat(t.range(Math.ceil(r/p)*p,e,p).filter(function(t){return y(t%g)>kt}).map(c)).concat(t.range(Math.ceil(o/d)*d,a,d).filter(function(t){return y(t%v)>kt}).map(u))}return x.lines=function(){return b().map(function(t){return{type:\\\"LineString\\\",coordinates:t}})},x.outline=function(){return{type:\\\"Polygon\\\",coordinates:[f(i).concat(h(s).slice(1),f(n).reverse().slice(1),h(l).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],i>n&&(t=i,i=n,n=t),l>s&&(t=l,l=s,s=t),x.precision(m)):[[i,l],[n,s]]},x.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),x.precision(m)):[[r,o],[e,a]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],x):[g,v]},x.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],x):[p,d]},x.precision=function(t){return arguments.length?(m=+t,c=Nn(o,a,90),u=jn(r,e,m),f=Nn(l,s,90),h=jn(i,n,m),x):m},x.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},t.geo.greatArc=function(){var e,r,n=Vn,i=Un;function a(){return{type:\\\"LineString\\\",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}return a.distance=function(){return t.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},a.source=function(t){return arguments.length?(n=t,e=\\\"function\\\"==typeof t?null:t,a):n},a.target=function(t){return arguments.length?(i=t,r=\\\"function\\\"==typeof t?null:t,a):i},a.precision=function(){return arguments.length?a:0},a},t.geo.interpolate=function(t,e){return r=t[0]*Et,n=t[1]*Et,i=e[0]*Et,a=e[1]*Et,o=Math.cos(n),s=Math.sin(n),l=Math.cos(a),c=Math.sin(a),u=o*Math.cos(r),f=o*Math.sin(r),h=l*Math.cos(i),p=l*Math.sin(i),d=2*Math.asin(Math.sqrt(Rt(a-n)+o*l*Rt(i-r))),g=1/Math.sin(d),(v=d?function(t){var e=Math.sin(t*=d)*g,r=Math.sin(d-t)*g,n=r*u+e*h,i=r*f+e*p,a=r*s+e*c;return[Math.atan2(i,n)*Lt,Math.atan2(a,Math.sqrt(n*n+i*i))*Lt]}:function(){return[r*Lt,n*Lt]}).distance=d,v;var r,n,i,a,o,s,l,c,u,f,h,p,d,g,v},t.geo.length=function(e){return yn=0,t.geo.stream(e,qn),yn};var qn={sphere:D,point:D,lineStart:function(){var t,e,r;function n(n,i){var a=Math.sin(i*=Et),o=Math.cos(i),s=y((n*=Et)-t),l=Math.cos(s);yn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*a-e*o*l)*s),e*a+r*o*l),t=n,e=a,r=o}qn.point=function(i,a){t=i*Et,e=Math.sin(a*=Et),r=Math.cos(a),qn.point=n},qn.lineEnd=function(){qn.point=qn.lineEnd=D}},lineEnd:D,polygonStart:D,polygonEnd:D};function Hn(t,e){function r(e,r){var n=Math.cos(e),i=Math.cos(r),a=t(n*i);return[a*i*Math.sin(e),a*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),i=e(n),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,n*o),Math.asin(n&&r*a/n)]},r}var Gn=Hn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(t.geo.azimuthalEqualArea=function(){return Cn(Gn)}).raw=Gn;var Wn=Hn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},z);function Yn(t,e){var r=Math.cos(t),n=function(t){return Math.tan(At/4+t/2)},i=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(n(e)/n(t)),a=r*Math.pow(n(t),i)/i;if(!i)return $n;function o(t,e){a>0?e<-Ct+kt&&(e=-Ct+kt):e>Ct-kt&&(e=Ct-kt);var r=a/Math.pow(n(e),i);return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}return o.invert=function(t,e){var r=a-e,n=zt(i)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/i,2*Math.atan(Math.pow(a/n,1/i))-Ct]},o}function Xn(t,e){var r=Math.cos(t),n=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),i=r/n+t;if(y(n)<kt)return zn;function a(t,e){var r=i-e;return[r*Math.sin(n*t),i-r*Math.cos(n*t)]}return a.invert=function(t,e){var r=i-e;return[Math.atan2(t,r)/n,i-zt(n)*Math.sqrt(t*t+r*r)]},a}(t.geo.azimuthalEquidistant=function(){return Cn(Wn)}).raw=Wn,(t.geo.conicConformal=function(){return an(Yn)}).raw=Yn,(t.geo.conicEquidistant=function(){return an(Xn)}).raw=Xn;var Zn=Hn(function(t){return 1/t},Math.atan);function $n(t,e){return[t,Math.log(Math.tan(At/4+e/2))]}function Jn(t){var e,r=Cn(t),n=r.scale,i=r.translate,a=r.clipExtent;return r.scale=function(){var t=n.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.translate=function(){var t=i.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.clipExtent=function(t){var o=a.apply(r,arguments);if(o===r){if(e=null==t){var s=At*n(),l=i();a([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else e&&(o=null);return o},r.clipExtent(null)}(t.geo.gnomonic=function(){return Cn(Zn)}).raw=Zn,$n.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Ct]},(t.geo.mercator=function(){return Jn($n)}).raw=$n;var Kn=Hn(function(){return 1},Math.asin);(t.geo.orthographic=function(){return Cn(Kn)}).raw=Kn;var Qn=Hn(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});function ti(t,e){return[Math.log(Math.tan(At/4+e/2)),-t]}function ei(t){return t[0]}function ri(t){return t[1]}function ni(t){for(var e=t.length,r=[0,1],n=2,i=2;i<e;i++){for(;n>1&&Ot(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function ii(t,e){return t[0]-e[0]||t[1]-e[1]}(t.geo.stereographic=function(){return Cn(Qn)}).raw=Qn,ti.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Ct]},(t.geo.transverseMercator=function(){var t=Jn(ti),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90])}).raw=ti,t.geom={},t.geom.hull=function(t){var e=ei,r=ri;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ve(e),a=ve(r),o=t.length,s=[],l=[];for(n=0;n<o;n++)s.push([+i.call(this,t[n],n),+a.call(this,t[n],n),n]);for(s.sort(ii),n=0;n<o;n++)l.push([s[n][0],-s[n][1]]);var c=ni(s),u=ni(l),f=u[0]===c[0],h=u[u.length-1]===c[c.length-1],p=[];for(n=c.length-1;n>=0;--n)p.push(t[s[c[n]][2]]);for(n=+f;n<u.length-h;++n)p.push(t[s[u[n]][2]]);return p}return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n},t.geom.polygon=function(t){return U(t,ai),t};var ai=t.geom.polygon.prototype=[];function oi(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function si(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],c=r[1],u=e[1]-l,f=n[1]-c,h=(s*(l-c)-f*(i-a))/(f*o-s*u);return[i+h*o,l+h*u]}function li(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}ai.area=function(){for(var t,e=-1,r=this.length,n=this[r-1],i=0;++e<r;)t=n,n=this[e],i+=t[1]*n[0]-t[0]*n[1];return.5*i},ai.centroid=function(t){var e,r,n=-1,i=this.length,a=0,o=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++n<i;)e=s,s=this[n],r=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*r,o+=(e[1]+s[1])*r;return[a*t,o*t]},ai.clip=function(t){for(var e,r,n,i,a,o,s=li(t),l=-1,c=this.length-li(this),u=this[c-1];++l<c;){for(e=t.slice(),t.length=0,i=this[l],a=e[(n=e.length-s)-1],r=-1;++r<n;)oi(o=e[r],u,i)?(oi(a,u,i)||t.push(si(a,o,u,i)),t.push(o)):oi(a,u,i)&&t.push(si(a,o,u,i)),a=o;s&&t.push(t[0]),u=i}return t};var ci,ui,fi,hi,pi,di=[],gi=[];function vi(){Pi(this),this.edge=this.site=this.circle=null}function mi(t){var e=di.pop()||new vi;return e.site=t,e}function yi(t){Si(t),fi.remove(t),di.push(t),Pi(t)}function xi(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];yi(t);for(var l=a;l.circle&&y(r-l.circle.x)<kt&&y(n-l.circle.cy)<kt;)a=l.P,s.unshift(l),yi(l),l=a;s.unshift(l),Si(l);for(var c=o;c.circle&&y(r-c.circle.x)<kt&&y(n-c.circle.cy)<kt;)o=c.N,s.push(c),yi(c),c=o;s.push(c),Si(c);var u,f=s.length;for(u=1;u<f;++u)c=s[u],l=s[u-1],zi(c.edge,l.site,c.site,i);l=s[0],(c=s[f-1]).edge=Li(l.site,c.site,null,i),Ti(l),Ti(c)}function bi(t){for(var e,r,n,i,a=t.x,o=t.y,s=fi._;s;)if((n=_i(s,o)-a)>kt)s=s.L;else{if(!((i=a-wi(s,o))>kt)){n>-kt?(e=s.P,r=s):i>-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=mi(t);if(fi.insert(e,l),e||r){if(e===r)return Si(e),r=mi(e.site),fi.insert(l,r),l.edge=r.edge=Li(e.site,l.site),Ti(e),void Ti(r);if(r){Si(e),Si(r);var c=e.site,u=c.x,f=c.y,h=t.x-u,p=t.y-f,d=r.site,g=d.x-u,v=d.y-f,m=2*(h*v-p*g),y=h*h+p*p,x=g*g+v*v,b={x:(v*y-p*x)/m+u,y:(h*x-g*y)/m+f};zi(r.edge,c,d,b),l.edge=Li(c,t,null,b),r.edge=Li(t,d,null,b),Ti(e),Ti(r)}else l.edge=Li(e.site,l.site)}}function _i(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,f=1/a-1/c,h=u/c;return f?(-h+Math.sqrt(h*h-2*f*(u*u/(-2*c)-l+c/2+i-a/2)))/f+n:(n+s)/2}function wi(t,e){var r=t.N;if(r)return _i(r,e);var n=t.site;return n.y===e?n.x:1/0}function ki(t){this.site=t,this.edges=[]}function Mi(t,e){return e.angle-t.angle}function Ai(){Pi(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ti(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,f=2*(l*(v=a.y-s)-c*u);if(!(f>=-Mt)){var h=l*l+c*c,p=u*u+v*v,d=(v*h-c*p)/f,g=(l*p-u*h)/f,v=g+s,m=gi.pop()||new Ai;m.arc=t,m.site=i,m.x=d+o,m.y=v+Math.sqrt(d*d+g*g),m.cy=v,t.circle=m;for(var y=null,x=pi._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}pi.insert(y,m),y||(hi=m)}}}}function Si(t){var e=t.circle;e&&(e.P||(hi=e.N),pi.remove(e),gi.push(e),Pi(e),t.circle=null)}function Ci(t,e){var r=t.b;if(r)return!0;var n,i,a=t.a,o=e[0][0],s=e[1][0],l=e[0][1],c=e[1][1],u=t.l,f=t.r,h=u.x,p=u.y,d=f.x,g=f.y,v=(h+d)/2,m=(p+g)/2;if(g===p){if(v<o||v>=s)return;if(h>d){if(a){if(a.y>=c)return}else a={x:v,y:l};r={x:v,y:c}}else{if(a){if(a.y<l)return}else a={x:v,y:c};r={x:v,y:l}}}else if(i=m-(n=(h-d)/(g-p))*v,n<-1||n>1)if(h>d){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y<l)return}else a={x:(c-i)/n,y:c};r={x:(l-i)/n,y:l}}else if(p<g){if(a){if(a.x>=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x<o)return}else a={x:s,y:n*s+i};r={x:o,y:n*o+i}}return t.a=a,t.b=r,!0}function Ei(t,e){this.l=t,this.r=e,this.a=this.b=null}function Li(t,e,r,n){var i=new Ei(t,e);return ci.push(i),r&&zi(i,t,e,r),n&&zi(i,e,t,n),ui[t.i].edges.push(new Oi(i,t,e)),ui[e.i].edges.push(new Oi(i,e,t)),i}function zi(t,e,r,n){t.a||t.b?t.l===r?t.b=n:t.a=n:(t.a=n,t.l=e,t.r=r)}function Oi(t,e,r){var n=t.a,i=t.b;this.edge=t,this.site=e,this.angle=r?Math.atan2(r.y-e.y,r.x-e.x):t.l===e?Math.atan2(i.x-n.x,n.y-i.y):Math.atan2(n.x-i.x,i.y-n.y)}function Ii(){this._=null}function Pi(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Di(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function Ri(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function Bi(t){for(;t.L;)t=t.L;return t}function Fi(t,e){var r,n,i,a=t.sort(Ni).pop();for(ci=[],ui=new Array(t.length),fi=new Ii,pi=new Ii;;)if(i=hi,a&&(!i||a.y<i.y||a.y===i.y&&a.x<i.x))a.x===r&&a.y===n||(ui[a.i]=new ki(a),bi(a),r=a.x,n=a.y),a=t.pop();else{if(!i)break;xi(i.arc)}e&&(function(t){for(var e,r=ci,n=en(t[0][0],t[0][1],t[1][0],t[1][1]),i=r.length;i--;)(!Ci(e=r[i],t)||!n(e)||y(e.a.x-e.b.x)<kt&&y(e.a.y-e.b.y)<kt)&&(e.a=e.b=null,r.splice(i,1))}(e),function(t){for(var e,r,n,i,a,o,s,l,c,u,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],g=ui,v=g.length;v--;)if((a=g[v])&&a.prepare())for(l=(s=a.edges).length,o=0;o<l;)n=(u=s[o].end()).x,i=u.y,e=(c=s[++o%l].start()).x,r=c.y,(y(n-e)>kt||y(i-r)>kt)&&(s.splice(o,0,new Oi((m=a.site,x=u,b=y(n-f)<kt&&d-i>kt?{x:f,y:y(e-f)<kt?r:d}:y(i-d)<kt&&h-n>kt?{x:y(r-d)<kt?e:h,y:d}:y(n-h)<kt&&i-p>kt?{x:h,y:y(e-h)<kt?r:p}:y(i-p)<kt&&n-f>kt?{x:y(r-p)<kt?e:f,y:p}:null,_=void 0,_=new Ei(m,null),_.a=x,_.b=b,ci.push(_),_),a.site,null)),++l);var m,x,b,_}(e));var o={cells:ui,edges:ci};return fi=pi=ci=ui=null,o}function Ni(t,e){return e.y-t.y||e.x-t.x}ki.prototype.prepare=function(){for(var t,e=this.edges,r=e.length;r--;)(t=e[r].edge).b&&t.a||e.splice(r,1);return e.sort(Mi),e.length},Oi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Ii.prototype={insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=Bi(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)r===(n=r.U).L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(Di(this,r),r=(t=r).U),r.C=!1,n.C=!0,Ri(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(Ri(this,r),r=(t=r).U),r.C=!1,n.C=!0,Di(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,a=t.L,o=t.R;if(r=a?o?Bi(o):a:o,i?i.L===t?i.L=r:i.R=r:this._=r,a&&o?(n=r.C,r.C=t.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=o,o.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&&(t.U=i),!n)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Di(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ri(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Di(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ri(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Di(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ri(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},t.geom.voronoi=function(t){var e=ei,r=ri,n=e,i=r,a=ji;if(t)return o(t);function o(t){var e=new Array(t.length),r=a[0][0],n=a[0][1],i=a[1][0],o=a[1][1];return Fi(s(t),a).cells.forEach(function(a,s){var l=a.edges,c=a.site;(e[s]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):c.x>=r&&c.x<=i&&c.y>=n&&c.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}})}return o.links=function(t){return Fi(s(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},o.triangles=function(t){var e=[];return Fi(s(t)).cells.forEach(function(r,n){for(var i,a,o,s,l=r.site,c=r.edges.sort(Mi),u=-1,f=c.length,h=c[f-1].edge,p=h.l===l?h.r:h.l;++u<f;)h,i=p,p=(h=c[u].edge).l===l?h.r:h.l,n<i.i&&n<p.i&&(o=i,s=p,((a=l).x-s.x)*(o.y-a.y)-(a.x-o.x)*(s.y-a.y)<0)&&e.push([t[n],t[i.i],t[p.i]])}),e},o.x=function(t){return arguments.length?(n=ve(e=t),o):e},o.y=function(t){return arguments.length?(i=ve(r=t),o):r},o.clipExtent=function(t){return arguments.length?(a=null==t?ji:t,o):a===ji?null:a},o.size=function(t){return arguments.length?o.clipExtent(t&&[[0,0],t]):a===ji?null:a&&a[1]},o};var ji=[[-1e6,-1e6],[1e6,1e6]];function Vi(t){return t.x}function Ui(t){return t.y}function qi(e,r){e=t.rgb(e),r=t.rgb(r);var n=e.r,i=e.g,a=e.b,o=r.r-n,s=r.g-i,l=r.b-a;return function(t){return\\\"#\\\"+ce(Math.round(n+o*t))+ce(Math.round(i+s*t))+ce(Math.round(a+l*t))}}function Hi(t,e){var r,n={},i={};for(r in t)r in e?n[r]=Zi(t[r],e[r]):i[r]=t[r];for(r in e)r in t||(i[r]=e[r]);return function(t){for(r in n)i[r]=n[r](t);return i}}function Gi(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Wi(t,e){var r,n,i,a=Yi.lastIndex=Xi.lastIndex=0,o=-1,s=[],l=[];for(t+=\\\"\\\",e+=\\\"\\\";(r=Yi.exec(t))&&(n=Xi.exec(e));)(i=n.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Gi(r,n)})),a=Xi.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?(e=l[0].x,function(t){return e(t)+\\\"\\\"}):function(){return e}:(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\\\"\\\")})}t.geom.delaunay=function(e){return t.geom.voronoi().triangles(e)},t.geom.quadtree=function(t,e,r,n,i){var a,o=ei,s=ri;if(a=arguments.length)return o=Vi,s=Ui,3===a&&(i=r,n=e,r=e=0),l(t);function l(t){var l,c,u,f,h,p,d,g,v,m=ve(o),x=ve(s);if(null!=e)p=e,d=r,g=n,v=i;else if(g=v=-(p=d=1/0),c=[],u=[],h=t.length,a)for(f=0;f<h;++f)(l=t[f]).x<p&&(p=l.x),l.y<d&&(d=l.y),l.x>g&&(g=l.x),l.y>v&&(v=l.y),c.push(l.x),u.push(l.y);else for(f=0;f<h;++f){var b=+m(l=t[f],f),_=+x(l,f);b<p&&(p=b),_<d&&(d=_),b>g&&(g=b),_>v&&(v=_),c.push(b),u.push(_)}var w=g-p,k=v-d;function M(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)<.01)A(t,e,r,n,i,a,o,s);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,i,a,o,s),A(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}function A(t,e,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r>=l,f=n>=c,h=f<<1|u;t.leaf=!1,u?i=l:o=l,f?a=c:s=c,M(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(T,t,+m(t,++f),+x(t,f),p,d,g,v)}}),e,r,n,i,a,o,s)}w>k?v=d+w:g=p+k;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(T,t,+m(t,++f),+x(t,f),p,d,g,v)}};if(T.visit=function(t){!function t(e,r,n,i,a,o){if(!e(r,n,i,a,o)){var s=.5*(n+a),l=.5*(i+o),c=r.nodes;c[0]&&t(e,c[0],n,i,s,l),c[1]&&t(e,c[1],s,i,a,l),c[2]&&t(e,c[2],n,l,s,o),c[3]&&t(e,c[3],s,l,a,o)}}(t,T,p,d,g,v)},T.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(c,u,f,h,p){if(!(u>a||f>o||h<n||p<i)){if(d=c.point){var d,g=e-c.x,v=r-c.y,m=g*g+v*v;if(m<l){var y=Math.sqrt(l=m);n=e-y,i=r-y,a=e+y,o=r+y,s=d}}for(var x=c.nodes,b=.5*(u+h),_=.5*(f+p),w=(r>=_)<<1|e>=b,k=w+4;w<k;++w)if(c=x[3&w])switch(3&w){case 0:t(c,u,f,b,_);break;case 1:t(c,b,f,h,_);break;case 2:t(c,u,_,b,p);break;case 3:t(c,b,_,h,p)}}}(t,n,i,a,o),s}(T,t[0],t[1],p,d,g,v)},f=-1,null==e){for(;++f<h;)M(T,t[f],c[f],u[f],p,d,g,v);--f}else t.forEach(T.add);return c=u=t=l=null,T}return l.x=function(t){return arguments.length?(o=t,l):o},l.y=function(t){return arguments.length?(s=t,l):s},l.extent=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),l):null==e?null:[[e,r],[n,i]]},l.size=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=r=0,n=+t[0],i=+t[1]),l):null==e?null:[n-e,i-r]},l},t.interpolateRgb=qi,t.interpolateObject=Hi,t.interpolateNumber=Gi,t.interpolateString=Wi;var Yi=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,Xi=new RegExp(Yi.source,\\\"g\\\");function Zi(e,r){for(var n,i=t.interpolators.length;--i>=0&&!(n=t.interpolators[i](e,r)););return n}function $i(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r<s;++r)n.push(Zi(t[r],e[r]));for(;r<a;++r)i[r]=t[r];for(;r<o;++r)i[r]=e[r];return function(t){for(r=0;r<s;++r)i[r]=n[r](t);return i}}t.interpolate=Zi,t.interpolators=[function(t,e){var r=typeof e;return(\\\"string\\\"===r?ge.has(e.toLowerCase())||/^(#|rgb\\\\(|hsl\\\\()/i.test(e)?qi:Wi:e instanceof Vt?qi:Array.isArray(e)?$i:\\\"object\\\"===r&&isNaN(e)?Hi:Gi)(t,e)}],t.interpolateArray=$i;var Ji=function(){return z},Ki=t.map({linear:Ji,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return ra},cubic:function(){return na},sin:function(){return aa},exp:function(){return oa},circle:function(){return sa},elastic:function(t,e){var r;arguments.length<2&&(e=.45);arguments.length?r=e/Tt*Math.asin(1/t):(t=1,r=e/4);return function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Tt/e)}},back:function(t){t||(t=1.70158);return function(e){return e*e*((t+1)*e-t)}},bounce:function(){return la}}),Qi=t.map({in:z,out:ta,\\\"in-out\\\":ea,\\\"out-in\\\":function(t){return ea(ta(t))}});function ta(t){return function(e){return 1-t(1-e)}}function ea(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function ra(t){return t*t}function na(t){return t*t*t}function ia(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function aa(t){return 1-Math.cos(t*Ct)}function oa(t){return Math.pow(2,10*(t-1))}function sa(t){return 1-Math.sqrt(1-t*t)}function la(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ca(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function ua(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=ha(i),s=fa(i,a),l=ha(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]<a[0]*i[1]&&(i[0]*=-1,i[1]*=-1,o*=-1,s*=-1),this.rotate=(o?Math.atan2(i[1],i[0]):Math.atan2(-a[0],a[1]))*Lt,this.translate=[t.e,t.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*Lt:0}function fa(t,e){return t[0]*e[0]+t[1]*e[1]}function ha(t){var e=Math.sqrt(fa(t,t));return e&&(t[0]/=e,t[1]/=e),e}t.ease=function(t){var e,n=t.indexOf(\\\"-\\\"),i=n>=0?t.slice(0,n):t,a=n>=0?t.slice(n+1):\\\"in\\\";return i=Ki.get(i)||Ji,a=Qi.get(a)||z,e=a(i.apply(null,r.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,i=e.c,a=e.l,o=r.h-n,s=r.c-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.c:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Yt(n+o*t,i+s*t,a+l*t)+\\\"\\\"}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,i=e.s,a=e.l,o=r.h-n,s=r.s-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.s:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Ht(n+o*t,i+s*t,a+l*t)+\\\"\\\"}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,i=e.a,a=e.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(t){return te(n+o*t,i+s*t,a+l*t)+\\\"\\\"}},t.interpolateRound=ca,t.transform=function(e){var r=i.createElementNS(t.ns.prefix.svg,\\\"g\\\");return(t.transform=function(t){if(null!=t){r.setAttribute(\\\"transform\\\",t);var e=r.transform.baseVal.consolidate()}return new ua(e?e.matrix:pa)})(e)},ua.prototype.toString=function(){return\\\"translate(\\\"+this.translate+\\\")rotate(\\\"+this.rotate+\\\")skewX(\\\"+this.skew+\\\")scale(\\\"+this.scale+\\\")\\\"};var pa={a:1,b:0,c:0,d:1,e:0,f:0};function da(t){return t.length?t.pop()+\\\",\\\":\\\"\\\"}function ga(e,r){var n=[],i=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(\\\"translate(\\\",null,\\\",\\\",null,\\\")\\\");n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else(e[0]||e[1])&&r.push(\\\"translate(\\\"+e+\\\")\\\")}(e.translate,r.translate,n,i),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(da(r)+\\\"rotate(\\\",null,\\\")\\\")-2,x:Gi(t,e)})):e&&r.push(da(r)+\\\"rotate(\\\"+e+\\\")\\\")}(e.rotate,r.rotate,n,i),function(t,e,r,n){t!==e?n.push({i:r.push(da(r)+\\\"skewX(\\\",null,\\\")\\\")-2,x:Gi(t,e)}):e&&r.push(da(r)+\\\"skewX(\\\"+e+\\\")\\\")}(e.skew,r.skew,n,i),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(da(r)+\\\"scale(\\\",null,\\\",\\\",null,\\\")\\\");n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(da(r)+\\\"scale(\\\"+e+\\\")\\\")}(e.scale,r.scale,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r<a;)n[(e=i[r]).i]=e.x(t);return n.join(\\\"\\\")}}function va(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}}function ma(t,e){return e=(e-=t=+t)||1/e,function(r){return Math.max(0,Math.min(1,(r-t)/e))}}function ya(t){for(var e=t.source,r=t.target,n=function(t,e){if(t===e)return t;var r=xa(t),n=xa(e),i=r.pop(),a=n.pop(),o=null;for(;i===a;)o=i,i=r.pop(),a=n.pop();return o}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i}function xa(t){for(var e=[],r=t.parent;null!=r;)e.push(t),t=r,r=r.parent;return e.push(t),e}function ba(t){t.fixed|=2}function _a(t){t.fixed&=-7}function wa(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ka(t){t.fixed&=-5}t.interpolateTransform=ga,t.layout={},t.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r<n;)e.push(ya(t[r]));return e}},t.layout.chord=function(){var e,r,n,i,a,o,s,l={},c=0;function u(){var l,u,h,p,d,g={},v=[],m=t.range(i),y=[];for(e=[],r=[],l=0,p=-1;++p<i;){for(u=0,d=-1;++d<i;)u+=n[p][d];v.push(u),y.push(t.range(i)),l+=u}for(a&&m.sort(function(t,e){return a(v[t],v[e])}),o&&y.forEach(function(t,e){t.sort(function(t,r){return o(n[e][t],n[e][r])})}),l=(Tt-c*i)/l,u=0,p=-1;++p<i;){for(h=u,d=-1;++d<i;){var x=m[p],b=y[x][d],_=n[x][b],w=u,k=u+=_*l;g[x+\\\"-\\\"+b]={index:x,subindex:b,startAngle:w,endAngle:k,value:_}}r[x]={index:x,startAngle:h,endAngle:u,value:v[x]},u+=c}for(p=-1;++p<i;)for(d=p-1;++d<i;){var M=g[p+\\\"-\\\"+d],A=g[d+\\\"-\\\"+p];(M.value||A.value)&&e.push(M.value<A.value?{source:A,target:M}:{source:M,target:A})}s&&f()}function f(){e.sort(function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}return l.matrix=function(t){return arguments.length?(i=(n=t)&&n.length,e=r=null,l):n},l.padding=function(t){return arguments.length?(c=t,e=r=null,l):c},l.sortGroups=function(t){return arguments.length?(a=t,e=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(o=t,e=null,l):o},l.sortChords=function(t){return arguments.length?(s=t,e&&f(),l):s},l.chords=function(){return e||u(),e},l.groups=function(){return r||u(),r},l},t.layout.force=function(){var e,r,n,i,a,o,s={},l=t.dispatch(\\\"start\\\",\\\"tick\\\",\\\"end\\\"),c=[1,1],u=.9,f=Ma,h=Aa,p=-30,d=Ta,g=.1,v=.64,m=[],y=[];function x(t){return function(e,r,n,i){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=i-r,l=a*a+o*o;if(s*s/v<l){if(l<d){var c=e.charge/l;t.px-=a*c,t.py-=o*c}return!0}if(e.point&&l&&l<d){c=e.pointCharge/l;t.px-=a*c,t.py-=o*c}}return!e.charge}}function b(e){e.px=t.event.x,e.py=t.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return e=null,l.end({type:\\\"end\\\",alpha:n=0}),!0;var r,s,f,h,d,v,b,_,w,k=m.length,M=y.length;for(s=0;s<M;++s)h=(f=y[s]).source,(v=(_=(d=f.target).x-h.x)*_+(w=d.y-h.y)*w)&&(_*=v=n*a[s]*((v=Math.sqrt(v))-i[s])/v,w*=v,d.x-=_*(b=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=w*b,h.x+=_*(b=1-b),h.y+=w*b);if((b=n*g)&&(_=c[0]/2,w=c[1]/2,s=-1,b))for(;++s<k;)(f=m[s]).x+=(_-f.x)*b,f.y+=(w-f.y)*b;if(p)for(!function t(e,r,n){var i=0,a=0;e.charge=0;if(!e.leaf)for(var o,s=e.nodes,l=s.length,c=-1;++c<l;)null!=(o=s[c])&&(t(o,r,n),e.charge+=o.charge,i+=o.charge*o.cx,a+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=r*n[e.point.index];e.charge+=e.pointCharge=u,i+=u*e.point.x,a+=u*e.point.y}e.cx=i/e.charge;e.cy=a/e.charge}(r=t.geom.quadtree(m),n,o),s=-1;++s<k;)(f=m[s]).fixed||r.visit(x(f));for(s=-1;++s<k;)(f=m[s]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*u,f.y-=(f.py-(f.py=f.y))*u);l.tick({type:\\\"tick\\\",alpha:n})},s.nodes=function(t){return arguments.length?(m=t,s):m},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(c=t,s):c},s.linkDistance=function(t){return arguments.length?(f=\\\"function\\\"==typeof t?t:+t,s):f},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(h=\\\"function\\\"==typeof t?t:+t,s):h},s.friction=function(t){return arguments.length?(u=+t,s):u},s.charge=function(t){return arguments.length?(p=\\\"function\\\"==typeof t?t:+t,s):p},s.chargeDistance=function(t){return arguments.length?(d=t*t,s):Math.sqrt(d)},s.gravity=function(t){return arguments.length?(g=+t,s):g},s.theta=function(t){return arguments.length?(v=t*t,s):Math.sqrt(v)},s.alpha=function(t){return arguments.length?(t=+t,n?t>0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:\\\"end\\\",alpha:n=0})):t>0&&(l.start({type:\\\"start\\\",alpha:n=t}),e=Me(s.tick)),s):n},s.start=function(){var t,e,r,n=m.length,l=y.length,u=c[0],d=c[1];for(t=0;t<n;++t)(r=m[t]).index=t,r.weight=0;for(t=0;t<l;++t)\\\"number\\\"==typeof(r=y[t]).source&&(r.source=m[r.source]),\\\"number\\\"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<n;++t)r=m[t],isNaN(r.x)&&(r.x=g(\\\"x\\\",u)),isNaN(r.y)&&(r.y=g(\\\"y\\\",d)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],\\\"function\\\"==typeof f)for(t=0;t<l;++t)i[t]=+f.call(this,y[t],t);else for(t=0;t<l;++t)i[t]=f;if(a=[],\\\"function\\\"==typeof h)for(t=0;t<l;++t)a[t]=+h.call(this,y[t],t);else for(t=0;t<l;++t)a[t]=h;if(o=[],\\\"function\\\"==typeof p)for(t=0;t<n;++t)o[t]=+p.call(this,m[t],t);else for(t=0;t<n;++t)o[t]=p;function g(r,i){if(!e){for(e=new Array(n),c=0;c<n;++c)e[c]=[];for(c=0;c<l;++c){var a=y[c];e[a.source.index].push(a.target),e[a.target.index].push(a.source)}}for(var o,s=e[t],c=-1,u=s.length;++c<u;)if(!isNaN(o=s[c][r]))return o;return Math.random()*i}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(r||(r=t.behavior.drag().origin(z).on(\\\"dragstart.force\\\",ba).on(\\\"drag.force\\\",b).on(\\\"dragend.force\\\",_a)),!arguments.length)return r;this.on(\\\"mouseover.force\\\",wa).on(\\\"mouseout.force\\\",ka).call(r)},t.rebind(s,l,\\\"on\\\")};var Ma=20,Aa=1,Ta=1/0;function Sa(e,r){return t.rebind(e,r,\\\"sort\\\",\\\"children\\\",\\\"value\\\"),e.nodes=e,e.links=Ia,e}function Ca(t,e){for(var r=[t];null!=(t=r.pop());)if(e(t),(i=t.children)&&(n=i.length))for(var n,i;--n>=0;)r.push(i[n])}function Ea(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o<i;)r.push(a[o]);for(;null!=(t=n.pop());)e(t)}function La(t){return t.children}function za(t){return t.value}function Oa(t,e){return e.value-t.value}function Ia(e){return t.merge(e.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}t.layout.hierarchy=function(){var t=Oa,e=La,r=za;function n(i){var a,o=[i],s=[];for(i.depth=0;null!=(a=o.pop());)if(s.push(a),(c=e.call(n,a,a.depth))&&(l=c.length)){for(var l,c,u;--l>=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return Ea(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ca(t,function(t){t.children&&(t.value=0)}),Ea(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var i=e.call(this,t,n);return function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++c<o;)t(s=a[c],r,l=s.value*n,i),r+=l}}(i[0],0,r[0],r[1]/function t(e){var r=e.children,n=0;if(r&&(i=r.length))for(var i,a=-1;++a<i;)n=Math.max(n,t(r[a]));return 1+n}(i[0])),i}return n.size=function(t){return arguments.length?(r=t,n):r},Sa(n,e)},t.layout.pie=function(){var e=Number,r=Pa,n=0,i=Tt,a=0;function o(s){var l,c=s.length,u=s.map(function(t,r){return+e.call(o,t,r)}),f=+(\\\"function\\\"==typeof n?n.apply(this,arguments):n),h=(\\\"function\\\"==typeof i?i.apply(this,arguments):i)-f,p=Math.min(Math.abs(h)/c,+(\\\"function\\\"==typeof a?a.apply(this,arguments):a)),d=p*(h<0?-1:1),g=t.sum(u),v=g?(h-c*d)/g:0,m=t.range(c),y=[];return null!=r&&m.sort(r===Pa?function(t,e){return u[e]-u[t]}:function(t,e){return r(s[t],s[e])}),m.forEach(function(t){y[t]={data:s[t],value:l=u[t],startAngle:f,endAngle:f+=l*v+d,padAngle:p}}),y}return o.value=function(t){return arguments.length?(e=t,o):e},o.sort=function(t){return arguments.length?(r=t,o):r},o.startAngle=function(t){return arguments.length?(n=t,o):n},o.endAngle=function(t){return arguments.length?(i=t,o):i},o.padAngle=function(t){return arguments.length?(a=t,o):a},o};var Pa={};function Da(t){return t.x}function Ra(t){return t.y}function Ba(t,e,r){t.y0=e,t.y=r}t.layout.stack=function(){var e=z,r=ja,n=Va,i=Ba,a=Da,o=Ra;function s(l,c){if(!(p=l.length))return l;var u=l.map(function(t,r){return e.call(s,t,r)}),f=u.map(function(t){return t.map(function(t,e){return[a.call(s,t,e),o.call(s,t,e)]})}),h=r.call(s,f,c);u=t.permute(u,h),f=t.permute(f,h);var p,d,g,v,m=n.call(s,f,c),y=u[0].length;for(g=0;g<y;++g)for(i.call(s,u[0][g],v=m[g],f[0][g][1]),d=1;d<p;++d)i.call(s,u[d][g],v+=f[d-1][g][1],f[d][g][1]);return l}return s.values=function(t){return arguments.length?(e=t,s):e},s.order=function(t){return arguments.length?(r=\\\"function\\\"==typeof t?t:Fa.get(t)||ja,s):r},s.offset=function(t){return arguments.length?(n=\\\"function\\\"==typeof t?t:Na.get(t)||Va,s):n},s.x=function(t){return arguments.length?(a=t,s):a},s.y=function(t){return arguments.length?(o=t,s):o},s.out=function(t){return arguments.length?(i=t,s):i},s};var Fa=t.map({\\\"inside-out\\\":function(e){var r,n,i=e.length,a=e.map(Ua),o=e.map(qa),s=t.range(i).sort(function(t,e){return a[t]-a[e]}),l=0,c=0,u=[],f=[];for(r=0;r<i;++r)n=s[r],l<c?(l+=o[n],u.push(n)):(c+=o[n],f.push(n));return f.reverse().concat(u)},reverse:function(e){return t.range(e.length).reverse()},default:ja}),Na=t.map({silhouette:function(t){var e,r,n,i=t.length,a=t[0].length,o=[],s=0,l=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];n>s&&(s=n),o.push(n)}for(r=0;r<a;++r)l[r]=(s-o[r])/2;return l},wiggle:function(t){var e,r,n,i,a,o,s,l,c,u=t.length,f=t[0],h=f.length,p=[];for(p[0]=l=c=0,r=1;r<h;++r){for(e=0,i=0;e<u;++e)i+=t[e][r][1];for(e=0,a=0,s=f[r][0]-f[r-1][0];e<u;++e){for(n=0,o=(t[e][r][1]-t[e][r-1][1])/(2*s);n<e;++n)o+=(t[n][r][1]-t[n][r-1][1])/s;a+=o*t[e][r][1]}p[r]=l-=i?a/i*s:0,l<c&&(c=l)}for(r=0;r<h;++r)p[r]-=c;return p},expand:function(t){var e,r,n,i=t.length,a=t[0].length,o=1/i,s=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];if(n)for(e=0;e<i;e++)t[e][r][1]/=n;else for(e=0;e<i;e++)t[e][r][1]=o}for(r=0;r<a;++r)s[r]=0;return s},zero:Va});function ja(e){return t.range(e.length)}function Va(t){for(var e=-1,r=t[0].length,n=[];++e<r;)n[e]=0;return n}function Ua(t){for(var e,r=1,n=0,i=t[0][1],a=t.length;r<a;++r)(e=t[r][1])>i&&(n=r,i=e);return n}function qa(t){return t.reduce(Ha,0)}function Ha(t,e){return t+e[1]}function Ga(t,e){return Wa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Wa(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Ya(e){return[t.min(e),t.max(e)]}function Xa(t,e){return t.value-e.value}function Za(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function $a(t,e){t._pack_next=e,e._pack_prev=t}function Ja(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ka(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,c=1/0,u=-1/0,f=1/0,h=-1/0;if(e.forEach(Qa),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(eo(r,n,i=e[2]),x(i),Za(r,i),r._pack_prev=i,Za(i,n),n=r._pack_next,a=3;a<l;a++){eo(r,n,i=e[a]);var p=0,d=1,g=1;for(o=n._pack_next;o!==n;o=o._pack_next,d++)if(Ja(o,i)){p=1;break}if(1==p)for(s=r._pack_prev;s!==o._pack_prev&&!Ja(s,i);s=s._pack_prev,g++);p?(d<g||d==g&&n.r<r.r?$a(r,n=o):$a(r=s,n),a--):(Za(r,i),n=i,x(i))}var v=(c+u)/2,m=(f+h)/2,y=0;for(a=0;a<l;a++)(i=e[a]).x-=v,i.y-=m,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,e.forEach(to)}function x(t){c=Math.min(t.x-t.r,c),u=Math.max(t.x+t.r,u),f=Math.min(t.y-t.r,f),h=Math.max(t.y+t.r,h)}}function Qa(t){t._pack_next=t._pack_prev=t}function to(t){delete t._pack_next,delete t._pack_prev}function eo(t,e,r){var n=t.r+r.r,i=e.x-t.x,a=e.y-t.y;if(n&&(i||a)){var o=e.r+r.r,s=i*i+a*a,l=.5+((n*=n)-(o*=o))/(2*s),c=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=t.x+l*i+c*a,r.y=t.y+l*a-c*i}else r.x=t.x+n,r.y=t.y}function ro(t,e){return t.parent==e.parent?1:2}function no(t){var e=t.children;return e.length?e[0]:t.t}function io(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function ao(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function oo(t,e,r){return t.a.parent===e.parent?t.a:r}function so(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function lo(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function co(t){var e=t[0],r=t[t.length-1];return e<r?[e,r]:[r,e]}function uo(t){return t.rangeExtent?t.rangeExtent():co(t.range())}function fo(t,e,r,n){var i=r(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(i(t))}}function ho(t,e){var r,n=0,i=t.length-1,a=t[n],o=t[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}function po(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:go}t.layout.histogram=function(){var e=!0,r=Number,n=Ya,i=Ga;function a(a,o){for(var s,l,c=[],u=a.map(r,this),f=n.call(this,u,o),h=i.call(this,f,u,o),p=(o=-1,u.length),d=h.length-1,g=e?1:1/p;++o<d;)(s=c[o]=[]).dx=h[o+1]-(s.x=h[o]),s.y=0;if(d>0)for(o=-1;++o<p;)(l=u[o])>=f[0]&&l<=f[1]&&((s=c[t.bisect(h,l,1,d)-1]).y+=g,s.push(a[o]));return c}return a.value=function(t){return arguments.length?(r=t,a):r},a.range=function(t){return arguments.length?(n=ve(t),a):n},a.bins=function(t){return arguments.length?(i=\\\"number\\\"==typeof t?function(e){return Wa(e,t)}:ve(t),a):i},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(Xa),n=0,i=[1,1];function a(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:\\\"function\\\"==typeof e?e:function(){return e};if(s.x=s.y=0,Ea(s,function(t){t.r=+u(t.value)}),Ea(s,Ka),n){var f=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;Ea(s,function(t){t.r+=f}),Ea(s,Ka),Ea(s,function(t){t.r-=f})}return function t(e,r,n,i){var a=e.children;e.x=r+=i*e.x;e.y=n+=i*e.y;e.r*=i;if(a)for(var o=-1,s=a.length;++o<s;)t(a[o],r,n,i)}(s,l/2,c/2,e?1:1/Math.max(2*s.r/l,2*s.r/c)),o}return a.size=function(t){return arguments.length?(i=t,a):i},a.radius=function(t){return arguments.length?(e=null==t||\\\"function\\\"==typeof t?t:+t,a):e},a.padding=function(t){return arguments.length?(n=+t,a):n},Sa(a,r)},t.layout.tree=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=null;function a(t,a){var c=e.call(this,t,a),u=c[0],f=function(t){var e,r={A:null,children:[t]},n=[r];for(;null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o<s;++o)n.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return r.children[0]}(u);if(Ea(f,o),f.parent.m=-f.z,Ca(f,s),i)Ca(u,l);else{var h=u,p=u,d=u;Ca(u,function(t){t.x<h.x&&(h=t),t.x>p.x&&(p=t),t.depth>d.depth&&(d=t)});var g=r(h,p)/2-h.x,v=n[0]/(p.x+r(p,h)/2+g),m=n[1]/(d.depth||1);Ca(u,function(t){t.x=(t.x+g)*v,t.y=t.depth*m})}return c}function o(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,i=t.children,a=i.length;for(;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+r(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+r(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,a=t,o=t,s=e,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=io(s),a=no(a),s&&a;)l=no(l),(o=io(o)).a=t,(i=s.z+f-a.z-c+r(s._,a._))>0&&(ao(oo(s,t,n),t,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!io(o)&&(o.t=s,o.m+=f-u),a&&!no(l)&&(l.t=a,l.m+=c-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t)?l:null,a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,a):i?n:null},Sa(a,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=!1;function a(a,o){var s,l=e.call(this,a,o),c=l[0],u=0;Ea(c,function(e){var n=e.children;n&&n.length?(e.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),e.y=function(e){return 1+t.max(e,function(t){return t.y})}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)});var f=function t(e){var r=e.children;return r&&r.length?t(r[0]):e}(c),h=function t(e){var r,n=e.children;return n&&(r=n.length)?t(n[r-1]):e}(c),p=f.x-r(f,h)/2,d=h.x+r(h,f)/2;return Ea(c,i?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t),a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null!=(n=t),a):i?n:null},Sa(a,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=so,s=!1,l=\\\"squarify\\\",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,a=t.length;++i<a;)n=(r=t[i]).value*(e<0?0:e),r.area=isNaN(n)||n<=0?0:n}function f(t){var e=t.children;if(e&&e.length){var r,n,i,a=o(t),s=[],c=e.slice(),h=1/0,g=\\\"slice\\\"===l?a.dx:\\\"dice\\\"===l?a.dy:\\\"slice-dice\\\"===l?1&t.depth?a.dy:a.dx:Math.min(a.dx,a.dy);for(u(c,a.dx*a.dy/t.value),s.area=0;(i=c.length)>0;)s.push(r=c[i-1]),s.area+=r.area,\\\"squarify\\\"!==l||(n=p(s,g))<=h?(c.pop(),h=n):(s.area-=s.pop().area,d(s,g,a,!1),g=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&&(d(s,g,a,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(u(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(h)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++o<s;)(r=t[o].area)&&(r<a&&(a=r),r>i&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*a*c)):1/0}function d(t,e,r,i){var a,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((i||u>r.dy)&&(u=r.dy);++o<s;)(a=t[o]).x=l,a.y=c,a.dy=u,l+=a.dx=Math.min(r.x+r.dx-l,u?n(a.area/u):0);a.z=!0,a.dx+=r.x+r.dx-l,r.y+=u,r.dy-=u}else{for((i||u>r.dx)&&(u=r.dx);++o<s;)(a=t[o]).x=l,a.y=c,a.dx=u,c+=a.dy=Math.min(r.y+r.dy-c,u?n(a.area/u):0);a.z=!1,a.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function g(t){var n=e||r(t),a=n[0];return a.x=a.y=0,a.value?(a.dx=i[0],a.dy=i[1]):a.dx=a.dy=0,e&&r.revalue(a),u([a],a.dx*a.dy/a.value),(e?h:f)(a),s&&(e=n),n}return g.size=function(t){return arguments.length?(i=t,g):i},g.padding=function(t){if(!arguments.length)return a;function e(e){return lo(e,t)}var r;return o=null==(a=t)?so:\\\"function\\\"==(r=typeof t)?function(e){var r=t.call(g,e,e.depth);return null==r?so(e):lo(e,\\\"number\\\"==typeof r?[r,r,r,r]:r)}:\\\"number\\\"===r?(t=[t,t,t,t],e):e,g},g.round=function(t){return arguments.length?(n=t?Math.round:Number,g):n!=Number},g.sticky=function(t){return arguments.length?(s=t,e=null,g):s},g.ratio=function(t){return arguments.length?(c=t,g):c},g.mode=function(t){return arguments.length?(l=t+\\\"\\\",g):l},Sa(g,r)},t.random={normal:function(t,e){var r=arguments.length;return r<2&&(e=1),r<1&&(t=0),function(){var r,n,i;do{i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!i||i>1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r<t;r++)e+=Math.random();return e}}},t.scale={};var go={floor:z,ceil:z};function vo(e,r,n,i){var a=[],o=[],s=0,l=Math.min(e.length,r.length)-1;for(e[l]<e[0]&&(e=e.slice().reverse(),r=r.slice().reverse());++s<=l;)a.push(n(e[s-1],e[s])),o.push(i(r[s-1],r[s]));return function(r){var n=t.bisect(e,r,1,l)-1;return o[n](a[n](r))}}function mo(e,r){return t.rebind(e,r,\\\"range\\\",\\\"rangeRound\\\",\\\"interpolate\\\",\\\"clamp\\\")}function yo(t,e){return ho(t,po(xo(t,e)[2])),ho(t,po(xo(t,e)[2])),t}function xo(t,e){null==e&&(e=10);var r=co(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function bo(e,r){return t.range.apply(t,xo(e,r))}function _o(e,r,n){var i=xo(e,r);if(n){var a=Le.exec(n);if(a.shift(),\\\"s\\\"===a[8]){var o=t.formatPrefix(Math.max(y(i[0]),y(i[1])));return a[7]||(a[7]=\\\".\\\"+ko(o.scale(i[2]))),a[8]=\\\"f\\\",n=t.format(a.join(\\\"\\\")),function(t){return n(o.scale(t))+o.symbol}}a[7]||(a[7]=\\\".\\\"+function(t,e){var r=ko(e[2]);return t in wo?Math.abs(r-ko(Math.max(y(e[0]),y(e[1]))))+ +(\\\"e\\\"!==t):r-2*(\\\"%\\\"===t)}(a[8],i)),n=a.join(\\\"\\\")}else n=\\\",.\\\"+ko(i[2])+\\\"f\\\";return t.format(n)}t.scale.linear=function(){return function t(e,r,n,i){var a,o;function s(){var t=Math.min(e.length,r.length)>2?vo:fo,s=i?ma:va;return a=t(e,r,s,n),o=t(r,e,s,Zi),l}function l(t){return a(t)}l.invert=function(t){return o(t)};l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};l.range=function(t){return arguments.length?(r=t,s()):r};l.rangeRound=function(t){return l.range(t).interpolate(ca)};l.clamp=function(t){return arguments.length?(i=t,s()):i};l.interpolate=function(t){return arguments.length?(n=t,s()):n};l.ticks=function(t){return bo(e,t)};l.tickFormat=function(t,r){return _o(e,t,r)};l.nice=function(t){return yo(e,t),s()};l.copy=function(){return t(e,r,n,i)};return s()}([0,1],[0,1],Zi,!1)};var wo={s:1,g:1,p:1,r:1,e:1};function ko(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}t.scale.log=function(){return function e(r,n,i,a){function o(t){return(i?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function s(t){return i?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return r(o(t))}l.invert=function(t){return s(r.invert(t))};l.domain=function(t){return arguments.length?(i=t[0]>=0,r.domain((a=t.map(Number)).map(o)),l):a};l.base=function(t){return arguments.length?(n=+t,r.domain(a.map(o)),l):n};l.nice=function(){var t=ho(a.map(o),i?Math:Ao);return r.domain(t),a=t.map(s),l};l.ticks=function(){var t=co(a),e=[],r=t[0],l=t[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),f=n%1?2:n;if(isFinite(u-c)){if(i){for(;c<u;c++)for(var h=1;h<f;h++)e.push(s(c)*h);e.push(s(c))}else for(e.push(s(c));c++<u;)for(var h=f-1;h>0;h--)e.push(s(c)*h);for(c=0;e[c]<r;c++);for(u=e.length;e[u-1]>l;u--);e=e.slice(c,u)}return e};l.tickFormat=function(e,r){if(!arguments.length)return Mo;arguments.length<2?r=Mo:\\\"function\\\"!=typeof r&&(r=t.format(r));var i=Math.max(1,n*e/l.ticks().length);return function(t){var e=t/s(Math.round(o(t)));return e*n<n-.5&&(e*=n),e<=i?r(t):\\\"\\\"}};l.copy=function(){return e(r.copy(),n,i,a)};return mo(l,r)}(t.scale.linear().domain([0,1]),10,!0,[1,10])};var Mo=t.format(\\\".0e\\\"),Ao={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function To(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}t.scale.pow=function(){return function t(e,r,n){var i=To(r),a=To(1/r);function o(t){return e(i(t))}o.invert=function(t){return a(e.invert(t))};o.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),o):n};o.ticks=function(t){return bo(n,t)};o.tickFormat=function(t,e){return _o(n,t,e)};o.nice=function(t){return o.domain(yo(n,t))};o.exponent=function(t){return arguments.length?(i=To(r=t),a=To(1/r),e.domain(n.map(i)),o):r};o.copy=function(){return t(e.copy(),r,n)};return mo(o,e)}(t.scale.linear(),1,[0,1])},t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return function e(r,n){var i,a,o;function s(t){return a[((i.get(t)||(\\\"range\\\"===n.t?i.set(t,r.push(t)):NaN))-1)%a.length]}function l(e,n){return t.range(r.length).map(function(t){return e+n*t})}s.domain=function(t){if(!arguments.length)return r;r=[],i=new b;for(var e,a=-1,o=t.length;++a<o;)i.has(e=t[a])||i.set(e,r.push(e));return s[n.t].apply(s,n.a)};s.range=function(t){return arguments.length?(a=t,o=0,n={t:\\\"range\\\",a:arguments},s):a};s.rangePoints=function(t,e){arguments.length<2&&(e=0);var i=t[0],c=t[1],u=r.length<2?(i=(i+c)/2,0):(c-i)/(r.length-1+e);return a=l(i+u*e/2,u),o=0,n={t:\\\"rangePoints\\\",a:arguments},s};s.rangeRoundPoints=function(t,e){arguments.length<2&&(e=0);var i=t[0],c=t[1],u=r.length<2?(i=c=Math.round((i+c)/2),0):(c-i)/(r.length-1+e)|0;return a=l(i+Math.round(u*e/2+(c-i-(r.length-1+e)*u)/2),u),o=0,n={t:\\\"rangeRoundPoints\\\",a:arguments},s};s.rangeBands=function(t,e,i){arguments.length<2&&(e=0),arguments.length<3&&(i=e);var c=t[1]<t[0],u=t[c-0],f=t[1-c],h=(f-u)/(r.length-e+2*i);return a=l(u+h*i,h),c&&a.reverse(),o=h*(1-e),n={t:\\\"rangeBands\\\",a:arguments},s};s.rangeRoundBands=function(t,e,i){arguments.length<2&&(e=0),arguments.length<3&&(i=e);var c=t[1]<t[0],u=t[c-0],f=t[1-c],h=Math.floor((f-u)/(r.length-e+2*i));return a=l(u+Math.round((f-u-(r.length-e)*h)/2),h),c&&a.reverse(),o=Math.round(h*(1-e)),n={t:\\\"rangeRoundBands\\\",a:arguments},s};s.rangeBand=function(){return o};s.rangeExtent=function(){return co(n.a[0])};s.copy=function(){return e(r,n)};return s.domain(r)}([],{t:\\\"range\\\",a:[[]]})},t.scale.category10=function(){return t.scale.ordinal().range(So)},t.scale.category20=function(){return t.scale.ordinal().range(Co)},t.scale.category20b=function(){return t.scale.ordinal().range(Eo)},t.scale.category20c=function(){return t.scale.ordinal().range(Lo)};var So=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(se),Co=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(se),Eo=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(se),Lo=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(se);function zo(){return 0}t.scale.quantile=function(){return function e(r,n){var i;function a(){var e=0,a=n.length;for(i=[];++e<a;)i[e-1]=t.quantile(r,e/a);return o}function o(e){if(!isNaN(e=+e))return n[t.bisect(i,e)]}o.domain=function(t){return arguments.length?(r=t.map(p).filter(d).sort(h),a()):r};o.range=function(t){return arguments.length?(n=t,a()):n};o.quantiles=function(){return i};o.invertExtent=function(t){return(t=n.indexOf(t))<0?[NaN,NaN]:[t>0?i[t-1]:r[0],t<i.length?i[t]:r[r.length-1]]};o.copy=function(){return e(r,n)};return a()}([],[])},t.scale.quantize=function(){return function t(e,r,n){var i,a;function o(t){return n[Math.max(0,Math.min(a,Math.floor(i*(t-e))))]}function s(){return i=n.length/(r-e),a=n.length-1,o}o.domain=function(t){return arguments.length?(e=+t[0],r=+t[t.length-1],s()):[e,r]};o.range=function(t){return arguments.length?(n=t,s()):n};o.invertExtent=function(t){return[t=(t=n.indexOf(t))<0?NaN:t/i+e,t+1/i]};o.copy=function(){return t(e,r,n)};return s()}(0,1,[0,1])},t.scale.threshold=function(){return function e(r,n){function i(e){if(e<=e)return n[t.bisect(r,e)]}i.domain=function(t){return arguments.length?(r=t,i):r};i.range=function(t){return arguments.length?(n=t,i):n};i.invertExtent=function(t){return t=n.indexOf(t),[r[t-1],r[t]]};i.copy=function(){return e(r,n)};return i}([.5],[0,1])},t.scale.identity=function(){return function t(e){function r(t){return+t}r.invert=r;r.domain=r.range=function(t){return arguments.length?(e=t.map(r),r):e};r.ticks=function(t){return bo(e,t)};r.tickFormat=function(t,r){return _o(e,t,r)};r.copy=function(){return t(e)};return r}([0,1])},t.svg={},t.svg.arc=function(){var t=Io,e=Po,r=zo,n=Oo,i=Do,a=Ro,o=Bo;function s(){var s=Math.max(0,+t.apply(this,arguments)),c=Math.max(0,+e.apply(this,arguments)),u=i.apply(this,arguments)-Ct,f=a.apply(this,arguments)-Ct,h=Math.abs(f-u),p=u>f?0:1;if(c<s&&(d=c,c=s,s=d),h>=St)return l(c,p)+(s?l(s,1-p):\\\"\\\")+\\\"Z\\\";var d,g,v,m,y,x,b,_,w,k,M,A,T=0,S=0,C=[];if((m=(+o.apply(this,arguments)||0)/2)&&(v=n===Oo?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=Pt(v/c*Math.sin(m))),s&&(T=Pt(v/s*Math.sin(m)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(f-S),_=c*Math.sin(f-S);var E=Math.abs(f-u-2*S)<=At?0:1;if(S&&Fo(y,x,b,_)===p^E){var L=(u+f)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-T),k=s*Math.sin(f-T),M=s*Math.cos(u+T),A=s*Math.sin(u+T);var z=Math.abs(u-f+2*T)<=At?0:1;if(T&&Fo(w,k,M,A)===1-p^z){var O=(u+f)/2;w=s*Math.cos(O),k=s*Math.sin(O),M=A=null}}else w=k=0;if(h>kt&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){g=s<c^p?0:1;var I=d,P=d;if(h<At){var D=null==M?[w,k]:null==b?[y,x]:si([y,x],[M,A],[b,_],[w,k]),R=y-D[0],B=x-D[1],F=b-D[0],N=_-D[1],j=1/Math.sin(Math.acos((R*F+B*N)/(Math.sqrt(R*R+B*B)*Math.sqrt(F*F+N*N)))/2),V=Math.sqrt(D[0]*D[0]+D[1]*D[1]);P=Math.min(d,(s-V)/(j-1)),I=Math.min(d,(c-V)/(j+1))}if(null!=b){var U=No(null==M?[w,k]:[M,A],[y,x],c,I,p),q=No([b,_],[w,k],c,I,p);d===I?C.push(\\\"M\\\",U[0],\\\"A\\\",I,\\\",\\\",I,\\\" 0 0,\\\",g,\\\" \\\",U[1],\\\"A\\\",c,\\\",\\\",c,\\\" 0 \\\",1-p^Fo(U[1][0],U[1][1],q[1][0],q[1][1]),\\\",\\\",p,\\\" \\\",q[1],\\\"A\\\",I,\\\",\\\",I,\\\" 0 0,\\\",g,\\\" \\\",q[0]):C.push(\\\"M\\\",U[0],\\\"A\\\",I,\\\",\\\",I,\\\" 0 1,\\\",g,\\\" \\\",q[0])}else C.push(\\\"M\\\",y,\\\",\\\",x);if(null!=M){var H=No([y,x],[M,A],s,-P,p),G=No([w,k],null==b?[y,x]:[b,_],s,-P,p);d===P?C.push(\\\"L\\\",G[0],\\\"A\\\",P,\\\",\\\",P,\\\" 0 0,\\\",g,\\\" \\\",G[1],\\\"A\\\",s,\\\",\\\",s,\\\" 0 \\\",p^Fo(G[1][0],G[1][1],H[1][0],H[1][1]),\\\",\\\",1-p,\\\" \\\",H[1],\\\"A\\\",P,\\\",\\\",P,\\\" 0 0,\\\",g,\\\" \\\",H[0]):C.push(\\\"L\\\",G[0],\\\"A\\\",P,\\\",\\\",P,\\\" 0 0,\\\",g,\\\" \\\",H[0])}else C.push(\\\"L\\\",w,\\\",\\\",k)}else C.push(\\\"M\\\",y,\\\",\\\",x),null!=b&&C.push(\\\"A\\\",c,\\\",\\\",c,\\\" 0 \\\",E,\\\",\\\",p,\\\" \\\",b,\\\",\\\",_),C.push(\\\"L\\\",w,\\\",\\\",k),null!=M&&C.push(\\\"A\\\",s,\\\",\\\",s,\\\" 0 \\\",z,\\\",\\\",1-p,\\\" \\\",M,\\\",\\\",A);return C.push(\\\"Z\\\"),C.join(\\\"\\\")}function l(t,e){return\\\"M0,\\\"+t+\\\"A\\\"+t+\\\",\\\"+t+\\\" 0 1,\\\"+e+\\\" 0,\\\"+-t+\\\"A\\\"+t+\\\",\\\"+t+\\\" 0 1,\\\"+e+\\\" 0,\\\"+t}return s.innerRadius=function(e){return arguments.length?(t=ve(e),s):t},s.outerRadius=function(t){return arguments.length?(e=ve(t),s):e},s.cornerRadius=function(t){return arguments.length?(r=ve(t),s):r},s.padRadius=function(t){return arguments.length?(n=t==Oo?Oo:ve(t),s):n},s.startAngle=function(t){return arguments.length?(i=ve(t),s):i},s.endAngle=function(t){return arguments.length?(a=ve(t),s):a},s.padAngle=function(t){return arguments.length?(o=ve(t),s):o},s.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,n=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Ct;return[Math.cos(n)*r,Math.sin(n)*r]},s};var Oo=\\\"auto\\\";function Io(t){return t.innerRadius}function Po(t){return t.outerRadius}function Do(t){return t.startAngle}function Ro(t){return t.endAngle}function Bo(t){return t&&t.padAngle}function Fo(t,e,r,n){return(t-r)*e-(e-n)*t>0?0:1}function No(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=t[0]+l,f=t[1]+c,h=e[0]+l,p=e[1]+c,d=(u+h)/2,g=(f+p)/2,v=h-u,m=p-f,y=v*v+m*m,x=r-n,b=u*p-h*f,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-v*_)/y,k=(-b*v-m*_)/y,M=(b*m+v*_)/y,A=(-b*v+m*_)/y,T=w-d,S=k-g,C=M-d,E=A-g;return T*T+S*S>C*C+E*E&&(w=M,k=A),[[w-l,k-c],[w*r/x,k*r/x]]}function jo(t){var e=ei,r=ri,n=Wr,i=Uo,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,f=a.length,h=ve(e),p=ve(r);function d(){l.push(\\\"M\\\",i(t(c),o))}for(;++u<f;)n.call(this,s=a[u],u)?c.push([+h.call(this,s,u),+p.call(this,s,u)]):c.length&&(d(),c=[]);return c.length&&d(),l.length?l.join(\\\"\\\"):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(r=t,s):r},s.defined=function(t){return arguments.length?(n=t,s):n},s.interpolate=function(t){return arguments.length?(a=\\\"function\\\"==typeof t?i=t:(i=Vo.get(t)||Uo).key,s):a},s.tension=function(t){return arguments.length?(o=t,s):o},s}t.svg.line=function(){return jo(z)};var Vo=t.map({linear:Uo,\\\"linear-closed\\\":qo,step:function(t){var e=0,r=t.length,n=t[0],i=[n[0],\\\",\\\",n[1]];for(;++e<r;)i.push(\\\"H\\\",(n[0]+(n=t[e])[0])/2,\\\"V\\\",n[1]);r>1&&i.push(\\\"H\\\",n[0]);return i.join(\\\"\\\")},\\\"step-before\\\":Ho,\\\"step-after\\\":Go,basis:Xo,\\\"basis-open\\\":function(t){if(t.length<4)return Uo(t);var e,r=[],n=-1,i=t.length,a=[0],o=[0];for(;++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);r.push(Zo(Ko,a)+\\\",\\\"+Zo(Ko,o)),--n;for(;++n<i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Qo(r,a,o);return r.join(\\\"\\\")},\\\"basis-closed\\\":function(t){var e,r,n=-1,i=t.length,a=i+4,o=[],s=[];for(;++n<4;)r=t[n%i],o.push(r[0]),s.push(r[1]);e=[Zo(Ko,o),\\\",\\\",Zo(Ko,s)],--n;for(;++n<a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Qo(e,o,s);return e.join(\\\"\\\")},bundle:function(t,e){var r=t.length-1;if(r)for(var n,i,a=t[0][0],o=t[0][1],s=t[r][0]-a,l=t[r][1]-o,c=-1;++c<=r;)n=t[c],i=c/r,n[0]=e*n[0]+(1-e)*(a+i*s),n[1]=e*n[1]+(1-e)*(o+i*l);return Xo(t)},cardinal:function(t,e){return t.length<3?Uo(t):t[0]+Wo(t,Yo(t,e))},\\\"cardinal-open\\\":function(t,e){return t.length<4?Uo(t):t[1]+Wo(t.slice(1,-1),Yo(t,e))},\\\"cardinal-closed\\\":function(t,e){return t.length<3?qo(t):t[0]+Wo((t.push(t[0]),t),Yo([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?Uo(t):t[0]+Wo(t,function(t){var e,r,n,i,a=[],o=function(t){var e=0,r=t.length-1,n=[],i=t[0],a=t[1],o=n[0]=ts(i,a);for(;++e<r;)n[e]=(o+(o=ts(i=a,a=t[e+1])))/2;return n[e]=o,n}(t),s=-1,l=t.length-1;for(;++s<l;)e=ts(t[s],t[s+1]),y(e)<kt?o[s]=o[s+1]=0:(r=o[s]/e,n=o[s+1]/e,(i=r*r+n*n)>9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));s=-1;for(;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Uo(t){return t.length>1?t.join(\\\"L\\\"):t+\\\"Z\\\"}function qo(t){return t.join(\\\"L\\\")+\\\"Z\\\"}function Ho(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\\\",\\\",n[1]];++e<r;)i.push(\\\"V\\\",(n=t[e])[1],\\\"H\\\",n[0]);return i.join(\\\"\\\")}function Go(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\\\",\\\",n[1]];++e<r;)i.push(\\\"H\\\",(n=t[e])[0],\\\"V\\\",n[1]);return i.join(\\\"\\\")}function Wo(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Uo(t);var r=t.length!=e.length,n=\\\"\\\",i=t[0],a=t[1],o=e[0],s=o,l=1;if(r&&(n+=\\\"Q\\\"+(a[0]-2*o[0]/3)+\\\",\\\"+(a[1]-2*o[1]/3)+\\\",\\\"+a[0]+\\\",\\\"+a[1],i=t[1],l=2),e.length>1){s=e[1],a=t[l],l++,n+=\\\"C\\\"+(i[0]+o[0])+\\\",\\\"+(i[1]+o[1])+\\\",\\\"+(a[0]-s[0])+\\\",\\\"+(a[1]-s[1])+\\\",\\\"+a[0]+\\\",\\\"+a[1];for(var c=2;c<e.length;c++,l++)a=t[l],s=e[c],n+=\\\"S\\\"+(a[0]-s[0])+\\\",\\\"+(a[1]-s[1])+\\\",\\\"+a[0]+\\\",\\\"+a[1]}if(r){var u=t[l];n+=\\\"Q\\\"+(a[0]+2*s[0]/3)+\\\",\\\"+(a[1]+2*s[1]/3)+\\\",\\\"+u[0]+\\\",\\\"+u[1]}return n}function Yo(t,e){for(var r,n=[],i=(1-e)/2,a=t[0],o=t[1],s=1,l=t.length;++s<l;)r=a,a=o,o=t[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function Xo(t){if(t.length<3)return Uo(t);var e=1,r=t.length,n=t[0],i=n[0],a=n[1],o=[i,i,i,(n=t[1])[0]],s=[a,a,a,n[1]],l=[i,\\\",\\\",a,\\\"L\\\",Zo(Ko,o),\\\",\\\",Zo(Ko,s)];for(t.push(t[r-1]);++e<=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Qo(l,o,s);return t.pop(),l.push(\\\"L\\\",n),l.join(\\\"\\\")}function Zo(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}Vo.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var $o=[0,2/3,1/3,0],Jo=[0,1/3,2/3,0],Ko=[0,1/6,2/3,1/6];function Qo(t,e,r){t.push(\\\"C\\\",Zo($o,e),\\\",\\\",Zo($o,r),\\\",\\\",Zo(Jo,e),\\\",\\\",Zo(Jo,r),\\\",\\\",Zo(Ko,e),\\\",\\\",Zo(Ko,r))}function ts(t,e){return(e[1]-t[1])/(e[0]-t[0])}function es(t){for(var e,r,n,i=-1,a=t.length;++i<a;)r=(e=t[i])[0],n=e[1]-Ct,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function rs(t){var e=ei,r=ei,n=0,i=ri,a=Wr,o=Uo,s=o.key,l=o,c=\\\"L\\\",u=.7;function f(s){var f,h,p,d=[],g=[],v=[],m=-1,y=s.length,x=ve(e),b=ve(n),_=e===r?function(){return h}:ve(r),w=n===i?function(){return p}:ve(i);function k(){d.push(\\\"M\\\",o(t(v),u),c,l(t(g.reverse()),u),\\\"Z\\\")}for(;++m<y;)a.call(this,f=s[m],m)?(g.push([h=+x.call(this,f,m),p=+b.call(this,f,m)]),v.push([+_.call(this,f,m),+w.call(this,f,m)])):g.length&&(k(),g=[],v=[]);return g.length&&k(),d.length?d.join(\\\"\\\"):null}return f.x=function(t){return arguments.length?(e=r=t,f):r},f.x0=function(t){return arguments.length?(e=t,f):e},f.x1=function(t){return arguments.length?(r=t,f):r},f.y=function(t){return arguments.length?(n=i=t,f):i},f.y0=function(t){return arguments.length?(n=t,f):n},f.y1=function(t){return arguments.length?(i=t,f):i},f.defined=function(t){return arguments.length?(a=t,f):a},f.interpolate=function(t){return arguments.length?(s=\\\"function\\\"==typeof t?o=t:(o=Vo.get(t)||Uo).key,l=o.reverse||o,c=o.closed?\\\"M\\\":\\\"L\\\",f):s},f.tension=function(t){return arguments.length?(u=t,f):u},f}function ns(t){return t.radius}function is(t){return[t.x,t.y]}function as(){return 64}function os(){return\\\"circle\\\"}function ss(t){var e=Math.sqrt(t/At);return\\\"M0,\\\"+e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,\\\"+-e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,\\\"+e+\\\"Z\\\"}t.svg.line.radial=function(){var t=jo(es);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Ho.reverse=Go,Go.reverse=Ho,t.svg.area=function(){return rs(z)},t.svg.area.radial=function(){var t=rs(es);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},t.svg.chord=function(){var t=Vn,e=Un,r=ns,n=Do,i=Ro;function a(r,n){var i,a,c=o(this,t,r,n),u=o(this,e,r,n);return\\\"M\\\"+c.p0+s(c.r,c.p1,c.a1-c.a0)+(a=u,(i=c).a0==a.a0&&i.a1==a.a1?l(c.r,c.p1,c.r,c.p0):l(c.r,c.p1,u.r,u.p0)+s(u.r,u.p1,u.a1-u.a0)+l(u.r,u.p1,c.r,c.p0))+\\\"Z\\\"}function o(t,e,a,o){var s=e.call(t,a,o),l=r.call(t,s,o),c=n.call(t,s,o)-Ct,u=i.call(t,s,o)-Ct;return{r:l,a0:c,a1:u,p0:[l*Math.cos(c),l*Math.sin(c)],p1:[l*Math.cos(u),l*Math.sin(u)]}}function s(t,e,r){return\\\"A\\\"+t+\\\",\\\"+t+\\\" 0 \\\"+ +(r>At)+\\\",1 \\\"+e}function l(t,e,r,n){return\\\"Q 0,0 \\\"+n}return a.radius=function(t){return arguments.length?(r=ve(t),a):r},a.source=function(e){return arguments.length?(t=ve(e),a):t},a.target=function(t){return arguments.length?(e=ve(t),a):e},a.startAngle=function(t){return arguments.length?(n=ve(t),a):n},a.endAngle=function(t){return arguments.length?(i=ve(t),a):i},a},t.svg.diagonal=function(){var t=Vn,e=Un,r=is;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return\\\"M\\\"+(l=l.map(r))[0]+\\\"C\\\"+l[1]+\\\" \\\"+l[2]+\\\" \\\"+l[3]}return n.source=function(e){return arguments.length?(t=ve(e),n):t},n.target=function(t){return arguments.length?(e=ve(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=is,n=e.projection;return e.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Ct;return[r*Math.cos(n),r*Math.sin(n)]}}(r=t)):r},e},t.svg.symbol=function(){var t=os,e=as;function r(r,n){return(ls.get(t.call(this,r,n))||ss)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ve(e),r):t},r.size=function(t){return arguments.length?(e=ve(t),r):e},r};var ls=t.map({circle:ss,cross:function(t){var e=Math.sqrt(t/5)/2;return\\\"M\\\"+-3*e+\\\",\\\"+-e+\\\"H\\\"+-e+\\\"V\\\"+-3*e+\\\"H\\\"+e+\\\"V\\\"+-e+\\\"H\\\"+3*e+\\\"V\\\"+e+\\\"H\\\"+e+\\\"V\\\"+3*e+\\\"H\\\"+-e+\\\"V\\\"+e+\\\"H\\\"+-3*e+\\\"Z\\\"},diamond:function(t){var e=Math.sqrt(t/(2*us)),r=e*us;return\\\"M0,\\\"+-e+\\\"L\\\"+r+\\\",0 0,\\\"+e+\\\" \\\"+-r+\\\",0Z\\\"},square:function(t){var e=Math.sqrt(t)/2;return\\\"M\\\"+-e+\\\",\\\"+-e+\\\"L\\\"+e+\\\",\\\"+-e+\\\" \\\"+e+\\\",\\\"+e+\\\" \\\"+-e+\\\",\\\"+e+\\\"Z\\\"},\\\"triangle-down\\\":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return\\\"M0,\\\"+r+\\\"L\\\"+e+\\\",\\\"+-r+\\\" \\\"+-e+\\\",\\\"+-r+\\\"Z\\\"},\\\"triangle-up\\\":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return\\\"M0,\\\"+-r+\\\"L\\\"+e+\\\",\\\"+r+\\\" \\\"+-e+\\\",\\\"+r+\\\"Z\\\"}});t.svg.symbolTypes=ls.keys();var cs=Math.sqrt(3),us=Math.tan(30*Et);Y.transition=function(t){for(var e,r,n=ds||++ms,i=bs(t),a=[],o=gs||{time:Date.now(),ease:ia,delay:0,duration:250},s=-1,l=this.length;++s<l;){a.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u<f;)(r=c[u])&&_s(r,u,i,n,o),e.push(r)}return ps(a,i,n)},Y.interrupt=function(t){return this.each(null==t?fs:hs(bs(t)))};var fs=hs(bs());function hs(t){return function(){var e,r,n;(e=this[t])&&(n=e[r=e.active])&&(n.timer.c=null,n.timer.t=NaN,--e.count?delete e[r]:delete this[t],e.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function ps(t,e,r){return U(t,vs),t.namespace=e,t.id=r,t}var ds,gs,vs=[],ms=0;function ys(t,e,r,n){var i=t.id,a=t.namespace;return ut(t,\\\"function\\\"==typeof r?function(t,o,s){t[a][i].tween.set(e,n(r.call(t,t.__data__,o,s)))}:(r=n(r),function(t){t[a][i].tween.set(e,r)}))}function xs(t){return null==t&&(t=\\\"\\\"),function(){this.textContent=t}}function bs(t){return null==t?\\\"__transition__\\\":\\\"__transition_\\\"+t+\\\"__\\\"}function _s(t,e,r,n,i){var a,o,s,l,c,u=t[r]||(t[r]={active:0,count:0}),f=u[n];function h(r){var i=u.active,h=u[i];for(var d in h&&(h.timer.c=null,h.timer.t=NaN,--u.count,delete u[i],h.event&&h.event.interrupt.call(t,t.__data__,h.index)),u)if(+d<n){var g=u[d];g.timer.c=null,g.timer.t=NaN,--u.count,delete u[d]}o.c=p,Me(function(){return o.c&&p(r||1)&&(o.c=null,o.t=NaN),1},0,a),u.active=n,f.event&&f.event.start.call(t,t.__data__,e),c=[],f.tween.forEach(function(r,n){(n=n.call(t,t.__data__,e))&&c.push(n)}),l=f.ease,s=f.duration}function p(i){for(var a=i/s,o=l(a),h=c.length;h>0;)c[--h].call(t,o);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}f||(a=i.time,o=Me(function(t){var e=f.delay;if(o.t=e+a,e<=t)return h(t-e);o.c=h},0,a),f=u[n]={tween:new b,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}vs.call=Y.call,vs.empty=Y.empty,vs.node=Y.node,vs.size=Y.size,t.transition=function(e,r){return e&&e.transition?ds?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=vs,vs.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=X(t);for(var s=-1,l=this.length;++s<l;){o.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u<f;)(n=c[u])&&(r=t.call(n,n.__data__,u,s))?(\\\"__data__\\\"in n&&(r.__data__=n.__data__),_s(r,u,a,i,n[a][i]),e.push(r)):e.push(null)}return ps(o,a,i)},vs.selectAll=function(t){var e,r,n,i,a,o=this.id,s=this.namespace,l=[];t=Z(t);for(var c=-1,u=this.length;++c<u;)for(var f=this[c],h=-1,p=f.length;++h<p;)if(n=f[h]){a=n[s][o],r=t.call(n,n.__data__,h,c),l.push(e=[]);for(var d=-1,g=r.length;++d<g;)(i=r[d])&&_s(i,d,s,o,a),e.push(i)}return ps(l,s,o)},vs.filter=function(t){var e,r,n=[];\\\"function\\\"!=typeof t&&(t=ct(t));for(var i=0,a=this.length;i<a;i++){n.push(e=[]);for(var o,s=0,l=(o=this[i]).length;s<l;s++)(r=o[s])&&t.call(r,r.__data__,s,i)&&e.push(r)}return ps(n,this.namespace,this.id)},vs.tween=function(t,e){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(t):ut(this,null==e?function(e){e[n][r].tween.remove(t)}:function(i){i[n][r].tween.set(t,e)})},vs.attr=function(e,r){if(arguments.length<2){for(r in e)this.attr(r,e[r]);return this}var n=\\\"transform\\\"==e?ga:Zi,i=t.ns.qualify(e);function a(){this.removeAttribute(i)}function o(){this.removeAttributeNS(i.space,i.local)}return ys(this,\\\"attr.\\\"+e,r,i.local?function(t){return null==t?o:(t+=\\\"\\\",function(){var e,r=this.getAttributeNS(i.space,i.local);return r!==t&&(e=n(r,t),function(t){this.setAttributeNS(i.space,i.local,e(t))})})}:function(t){return null==t?a:(t+=\\\"\\\",function(){var e,r=this.getAttribute(i);return r!==t&&(e=n(r,t),function(t){this.setAttribute(i,e(t))})})})},vs.attrTween=function(e,r){var n=t.ns.qualify(e);return this.tween(\\\"attr.\\\"+e,n.local?function(t,e){var i=r.call(this,t,e,this.getAttributeNS(n.space,n.local));return i&&function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,e){var i=r.call(this,t,e,this.getAttribute(n));return i&&function(t){this.setAttribute(n,i(t))}})},vs.style=function(t,e,r){var n=arguments.length;if(n<3){if(\\\"string\\\"!=typeof t){for(r in n<2&&(e=\\\"\\\"),t)this.style(r,t[r],e);return this}r=\\\"\\\"}function i(){this.style.removeProperty(t)}return ys(this,\\\"style.\\\"+t,e,function(e){return null==e?i:(e+=\\\"\\\",function(){var n,i=o(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(n=Zi(i,e),function(e){this.style.setProperty(t,n(e),r)})})})},vs.styleTween=function(t,e,r){return arguments.length<3&&(r=\\\"\\\"),this.tween(\\\"style.\\\"+t,function(n,i){var a=e.call(this,n,i,o(this).getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),r)}})},vs.text=function(t){return ys(this,\\\"text\\\",t,xs)},vs.remove=function(){var t=this.namespace;return this.each(\\\"end.transition\\\",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},vs.ease=function(e){var r=this.id,n=this.namespace;return arguments.length<1?this.node()[n][r].ease:(\\\"function\\\"!=typeof e&&(e=t.ease.apply(t,arguments)),ut(this,function(t){t[n][r].ease=e}))},vs.delay=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].delay:ut(this,\\\"function\\\"==typeof t?function(n,i,a){n[r][e].delay=+t.call(n,n.__data__,i,a)}:(t=+t,function(n){n[r][e].delay=t}))},vs.duration=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].duration:ut(this,\\\"function\\\"==typeof t?function(n,i,a){n[r][e].duration=Math.max(1,t.call(n,n.__data__,i,a))}:(t=Math.max(1,t),function(n){n[r][e].duration=t}))},vs.each=function(e,r){var n=this.id,i=this.namespace;if(arguments.length<2){var a=gs,o=ds;try{ds=n,ut(this,function(t,r,a){gs=t[i][n],e.call(t,t.__data__,r,a)})}finally{gs=a,ds=o}}else ut(this,function(a){var o=a[i][n];(o.event||(o.event=t.dispatch(\\\"start\\\",\\\"end\\\",\\\"interrupt\\\"))).on(e,r)});return this},vs.transition=function(){for(var t,e,r,n=this.id,i=++ms,a=this.namespace,o=[],s=0,l=this.length;s<l;s++){o.push(t=[]);for(var c,u=0,f=(c=this[s]).length;u<f;u++)(e=c[u])&&_s(e,u,a,i,{time:(r=e[a][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),t.push(e)}return ps(o,a,i)},t.svg.axis=function(){var e,r=t.scale.linear(),i=ws,a=6,o=6,s=3,l=[10],c=null;function u(n){n.each(function(){var n,u=t.select(this),f=this.__chart__||r,h=this.__chart__=r.copy(),p=null==c?h.ticks?h.ticks.apply(h,l):h.domain():c,d=null==e?h.tickFormat?h.tickFormat.apply(h,l):z:e,g=u.selectAll(\\\".tick\\\").data(p,h),v=g.enter().insert(\\\"g\\\",\\\".domain\\\").attr(\\\"class\\\",\\\"tick\\\").style(\\\"opacity\\\",kt),m=t.transition(g.exit()).style(\\\"opacity\\\",kt).remove(),y=t.transition(g.order()).style(\\\"opacity\\\",1),x=Math.max(a,0)+s,b=uo(h),_=u.selectAll(\\\".domain\\\").data([0]),w=(_.enter().append(\\\"path\\\").attr(\\\"class\\\",\\\"domain\\\"),t.transition(_));v.append(\\\"line\\\"),v.append(\\\"text\\\");var k,M,A,T,S=v.select(\\\"line\\\"),C=y.select(\\\"line\\\"),E=g.select(\\\"text\\\").text(d),L=v.select(\\\"text\\\"),O=y.select(\\\"text\\\"),I=\\\"top\\\"===i||\\\"left\\\"===i?-1:1;if(\\\"bottom\\\"===i||\\\"top\\\"===i?(n=Ms,k=\\\"x\\\",A=\\\"y\\\",M=\\\"x2\\\",T=\\\"y2\\\",E.attr(\\\"dy\\\",I<0?\\\"0em\\\":\\\".71em\\\").style(\\\"text-anchor\\\",\\\"middle\\\"),w.attr(\\\"d\\\",\\\"M\\\"+b[0]+\\\",\\\"+I*o+\\\"V0H\\\"+b[1]+\\\"V\\\"+I*o)):(n=As,k=\\\"y\\\",A=\\\"x\\\",M=\\\"y2\\\",T=\\\"x2\\\",E.attr(\\\"dy\\\",\\\".32em\\\").style(\\\"text-anchor\\\",I<0?\\\"end\\\":\\\"start\\\"),w.attr(\\\"d\\\",\\\"M\\\"+I*o+\\\",\\\"+b[0]+\\\"H0V\\\"+b[1]+\\\"H\\\"+I*o)),S.attr(T,I*a),L.attr(A,I*x),C.attr(M,0).attr(T,I*a),O.attr(k,0).attr(A,I*x),h.rangeBand){var P=h,D=P.rangeBand()/2;f=h=function(t){return P(t)+D}}else f.rangeBand?f=h:m.call(n,h,f);v.call(n,f,h),y.call(n,h,h)})}return u.scale=function(t){return arguments.length?(r=t,u):r},u.orient=function(t){return arguments.length?(i=t in ks?t+\\\"\\\":ws,u):i},u.ticks=function(){return arguments.length?(l=n(arguments),u):l},u.tickValues=function(t){return arguments.length?(c=t,u):c},u.tickFormat=function(t){return arguments.length?(e=t,u):e},u.tickSize=function(t){var e=arguments.length;return e?(a=+t,o=+arguments[e-1],u):a},u.innerTickSize=function(t){return arguments.length?(a=+t,u):a},u.outerTickSize=function(t){return arguments.length?(o=+t,u):o},u.tickPadding=function(t){return arguments.length?(s=+t,u):s},u.tickSubdivide=function(){return arguments.length&&u},u};var ws=\\\"bottom\\\",ks={top:1,right:1,bottom:1,left:1};function Ms(t,e,r){t.attr(\\\"transform\\\",function(t){var n=e(t);return\\\"translate(\\\"+(isFinite(n)?n:r(t))+\\\",0)\\\"})}function As(t,e,r){t.attr(\\\"transform\\\",function(t){var n=e(t);return\\\"translate(0,\\\"+(isFinite(n)?n:r(t))+\\\")\\\"})}t.svg.brush=function(){var e,r,n=j(h,\\\"brushstart\\\",\\\"brush\\\",\\\"brushend\\\"),i=null,a=null,s=[0,0],l=[0,0],c=!0,u=!0,f=Ss[0];function h(e){e.each(function(){var e=t.select(this).style(\\\"pointer-events\\\",\\\"all\\\").style(\\\"-webkit-tap-highlight-color\\\",\\\"rgba(0,0,0,0)\\\").on(\\\"mousedown.brush\\\",v).on(\\\"touchstart.brush\\\",v),r=e.selectAll(\\\".background\\\").data([0]);r.enter().append(\\\"rect\\\").attr(\\\"class\\\",\\\"background\\\").style(\\\"visibility\\\",\\\"hidden\\\").style(\\\"cursor\\\",\\\"crosshair\\\"),e.selectAll(\\\".extent\\\").data([0]).enter().append(\\\"rect\\\").attr(\\\"class\\\",\\\"extent\\\").style(\\\"cursor\\\",\\\"move\\\");var n=e.selectAll(\\\".resize\\\").data(f,z);n.exit().remove(),n.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"resize \\\"+t}).style(\\\"cursor\\\",function(t){return Ts[t]}).append(\\\"rect\\\").attr(\\\"x\\\",function(t){return/[ew]$/.test(t)?-3:null}).attr(\\\"y\\\",function(t){return/^[ns]/.test(t)?-3:null}).attr(\\\"width\\\",6).attr(\\\"height\\\",6).style(\\\"visibility\\\",\\\"hidden\\\"),n.style(\\\"display\\\",h.empty()?\\\"none\\\":null);var o,s=t.transition(e),l=t.transition(r);i&&(o=uo(i),l.attr(\\\"x\\\",o[0]).attr(\\\"width\\\",o[1]-o[0]),d(s)),a&&(o=uo(a),l.attr(\\\"y\\\",o[0]).attr(\\\"height\\\",o[1]-o[0]),g(s)),p(s)})}function p(t){t.selectAll(\\\".resize\\\").attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+s[+/e$/.test(t)]+\\\",\\\"+l[+/^s/.test(t)]+\\\")\\\"})}function d(t){t.select(\\\".extent\\\").attr(\\\"x\\\",s[0]),t.selectAll(\\\".extent,.n>rect,.s>rect\\\").attr(\\\"width\\\",s[1]-s[0])}function g(t){t.select(\\\".extent\\\").attr(\\\"y\\\",l[0]),t.selectAll(\\\".extent,.e>rect,.w>rect\\\").attr(\\\"height\\\",l[1]-l[0])}function v(){var f,v,m=this,y=t.select(t.event.target),x=n.of(m,arguments),b=t.select(m),_=y.datum(),w=!/^(n|s)$/.test(_)&&i,k=!/^(e|w)$/.test(_)&&a,M=y.classed(\\\"extent\\\"),A=xt(m),T=t.mouse(m),S=t.select(o(m)).on(\\\"keydown.brush\\\",function(){32==t.event.keyCode&&(M||(f=null,T[0]-=s[1],T[1]-=l[1],M=2),F())}).on(\\\"keyup.brush\\\",function(){32==t.event.keyCode&&2==M&&(T[0]+=s[1],T[1]+=l[1],M=0,F())});if(t.event.changedTouches?S.on(\\\"touchmove.brush\\\",L).on(\\\"touchend.brush\\\",O):S.on(\\\"mousemove.brush\\\",L).on(\\\"mouseup.brush\\\",O),b.interrupt().selectAll(\\\"*\\\").interrupt(),M)T[0]=s[0]-T[0],T[1]=l[0]-T[1];else if(_){var C=+/w$/.test(_),E=+/^n/.test(_);v=[s[1-C]-T[0],l[1-E]-T[1]],T[0]=s[C],T[1]=l[E]}else t.event.altKey&&(f=T.slice());function L(){var e=t.mouse(m),r=!1;v&&(e[0]+=v[0],e[1]+=v[1]),M||(t.event.altKey?(f||(f=[(s[0]+s[1])/2,(l[0]+l[1])/2]),T[0]=s[+(e[0]<f[0])],T[1]=l[+(e[1]<f[1])]):f=null),w&&z(e,i,0)&&(d(b),r=!0),k&&z(e,a,1)&&(g(b),r=!0),r&&(p(b),x({type:\\\"brush\\\",mode:M?\\\"move\\\":\\\"resize\\\"}))}function z(t,n,i){var a,o,h=uo(n),p=h[0],d=h[1],g=T[i],v=i?l:s,m=v[1]-v[0];if(M&&(p-=g,d-=m+g),a=(i?u:c)?Math.max(p,Math.min(d,t[i])):t[i],M?o=(a+=g)+m:(f&&(g=Math.max(p,Math.min(d,2*f[i]-a))),g<a?(o=a,a=g):o=g),v[0]!=a||v[1]!=o)return i?r=null:e=null,v[0]=a,v[1]=o,!0}function O(){L(),b.style(\\\"pointer-events\\\",\\\"all\\\").selectAll(\\\".resize\\\").style(\\\"display\\\",h.empty()?\\\"none\\\":null),t.select(\\\"body\\\").style(\\\"cursor\\\",null),S.on(\\\"mousemove.brush\\\",null).on(\\\"mouseup.brush\\\",null).on(\\\"touchmove.brush\\\",null).on(\\\"touchend.brush\\\",null).on(\\\"keydown.brush\\\",null).on(\\\"keyup.brush\\\",null),A(),x({type:\\\"brushend\\\"})}b.style(\\\"pointer-events\\\",\\\"none\\\").selectAll(\\\".resize\\\").style(\\\"display\\\",null),t.select(\\\"body\\\").style(\\\"cursor\\\",y.style(\\\"cursor\\\")),x({type:\\\"brushstart\\\"}),L()}return h.event=function(i){i.each(function(){var i=n.of(this,arguments),a={x:s,y:l,i:e,j:r},o=this.__chart__||a;this.__chart__=a,ds?t.select(this).transition().each(\\\"start.brush\\\",function(){e=o.i,r=o.j,s=o.x,l=o.y,i({type:\\\"brushstart\\\"})}).tween(\\\"brush:brush\\\",function(){var t=$i(s,a.x),n=$i(l,a.y);return e=r=null,function(e){s=a.x=t(e),l=a.y=n(e),i({type:\\\"brush\\\",mode:\\\"resize\\\"})}}).each(\\\"end.brush\\\",function(){e=a.i,r=a.j,i({type:\\\"brush\\\",mode:\\\"resize\\\"}),i({type:\\\"brushend\\\"})}):(i({type:\\\"brushstart\\\"}),i({type:\\\"brush\\\",mode:\\\"resize\\\"}),i({type:\\\"brushend\\\"}))})},h.x=function(t){return arguments.length?(f=Ss[!(i=t)<<1|!a],h):i},h.y=function(t){return arguments.length?(f=Ss[!i<<1|!(a=t)],h):a},h.clamp=function(t){return arguments.length?(i&&a?(c=!!t[0],u=!!t[1]):i?c=!!t:a&&(u=!!t),h):i&&a?[c,u]:i?c:a?u:null},h.extent=function(t){var n,o,c,u,f;return arguments.length?(i&&(n=t[0],o=t[1],a&&(n=n[0],o=o[0]),e=[n,o],i.invert&&(n=i(n),o=i(o)),o<n&&(f=n,n=o,o=f),n==s[0]&&o==s[1]||(s=[n,o])),a&&(c=t[0],u=t[1],i&&(c=c[1],u=u[1]),r=[c,u],a.invert&&(c=a(c),u=a(u)),u<c&&(f=c,c=u,u=f),c==l[0]&&u==l[1]||(l=[c,u])),h):(i&&(e?(n=e[0],o=e[1]):(n=s[0],o=s[1],i.invert&&(n=i.invert(n),o=i.invert(o)),o<n&&(f=n,n=o,o=f))),a&&(r?(c=r[0],u=r[1]):(c=l[0],u=l[1],a.invert&&(c=a.invert(c),u=a.invert(u)),u<c&&(f=c,c=u,u=f))),i&&a?[[n,c],[o,u]]:i?[n,o]:a&&[c,u])},h.clear=function(){return h.empty()||(s=[0,0],l=[0,0],e=r=null),h},h.empty=function(){return!!i&&s[0]==s[1]||!!a&&l[0]==l[1]},t.rebind(h,n,\\\"on\\\")};var Ts={n:\\\"ns-resize\\\",e:\\\"ew-resize\\\",s:\\\"ns-resize\\\",w:\\\"ew-resize\\\",nw:\\\"nwse-resize\\\",ne:\\\"nesw-resize\\\",se:\\\"nwse-resize\\\",sw:\\\"nesw-resize\\\"},Ss=[[\\\"n\\\",\\\"e\\\",\\\"s\\\",\\\"w\\\",\\\"nw\\\",\\\"ne\\\",\\\"se\\\",\\\"sw\\\"],[\\\"e\\\",\\\"w\\\"],[\\\"n\\\",\\\"s\\\"],[]],Cs=Ie.format=sr.timeFormat,Es=Cs.utc,Ls=Es(\\\"%Y-%m-%dT%H:%M:%S.%LZ\\\");function zs(t){return t.toISOString()}function Os(e,r,n){function i(t){return e(t)}function a(e,n){var i=(e[1]-e[0])/n,a=t.bisect(Ps,i);return a==Ps.length?[r.year,xo(e.map(function(t){return t/31536e6}),n)[2]]:a?r[i/Ps[a-1]<Ps[a]/i?a-1:a]:[Bs,xo(e,n)[2]]}return i.invert=function(t){return Is(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain().map(Is)},i.nice=function(t,e){var r=i.domain(),n=co(r),o=null==t?a(n,10):\\\"number\\\"==typeof t&&a(n,t);function s(r){return!isNaN(r)&&!t.range(r,Is(+r+1),e).length}return o&&(t=o[0],e=o[1]),i.domain(ho(r,e>1?{floor:function(e){for(;s(e=t.floor(e));)e=Is(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=Is(+e+1);return e}}:t))},i.ticks=function(t,e){var r=co(i.domain()),n=null==t?a(r,10):\\\"number\\\"==typeof t?a(r,t):!t.range&&[{range:t},e];return n&&(t=n[0],e=n[1]),t.range(r[0],Is(+r[1]+1),e<1?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Os(e.copy(),r,n)},mo(i,e)}function Is(t){return new Date(t)}Cs.iso=Date.prototype.toISOString&&+new Date(\\\"2000-01-01T00:00:00.000Z\\\")?zs:Ls,zs.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},zs.toString=Ls.toString,Ie.second=Be(function(t){return new Pe(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Ie.seconds=Ie.second.range,Ie.seconds.utc=Ie.second.utc.range,Ie.minute=Be(function(t){return new Pe(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Ie.minutes=Ie.minute.range,Ie.minutes.utc=Ie.minute.utc.range,Ie.hour=Be(function(t){var e=t.getTimezoneOffset()/60;return new Pe(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Ie.hours=Ie.hour.range,Ie.hours.utc=Ie.hour.utc.range,Ie.month=Be(function(t){return(t=Ie.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Ie.months=Ie.month.range,Ie.months.utc=Ie.month.utc.range;var Ps=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ds=[[Ie.second,1],[Ie.second,5],[Ie.second,15],[Ie.second,30],[Ie.minute,1],[Ie.minute,5],[Ie.minute,15],[Ie.minute,30],[Ie.hour,1],[Ie.hour,3],[Ie.hour,6],[Ie.hour,12],[Ie.day,1],[Ie.day,2],[Ie.week,1],[Ie.month,1],[Ie.month,3],[Ie.year,1]],Rs=Cs.multi([[\\\".%L\\\",function(t){return t.getMilliseconds()}],[\\\":%S\\\",function(t){return t.getSeconds()}],[\\\"%I:%M\\\",function(t){return t.getMinutes()}],[\\\"%I %p\\\",function(t){return t.getHours()}],[\\\"%a %d\\\",function(t){return t.getDay()&&1!=t.getDate()}],[\\\"%b %d\\\",function(t){return 1!=t.getDate()}],[\\\"%B\\\",function(t){return t.getMonth()}],[\\\"%Y\\\",Wr]]),Bs={range:function(e,r,n){return t.range(Math.ceil(e/n)*n,+r,n).map(Is)},floor:z,ceil:z};Ds.year=Ie.year,Ie.scale=function(){return Os(t.scale.linear(),Ds,Rs)};var Fs=Ds.map(function(t){return[t[0].utc,t[1]]}),Ns=Es.multi([[\\\".%L\\\",function(t){return t.getUTCMilliseconds()}],[\\\":%S\\\",function(t){return t.getUTCSeconds()}],[\\\"%I:%M\\\",function(t){return t.getUTCMinutes()}],[\\\"%I %p\\\",function(t){return t.getUTCHours()}],[\\\"%a %d\\\",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],[\\\"%b %d\\\",function(t){return 1!=t.getUTCDate()}],[\\\"%B\\\",function(t){return t.getUTCMonth()}],[\\\"%Y\\\",Wr]]);function js(t){return JSON.parse(t.responseText)}function Vs(t){var e=i.createRange();return e.selectNode(i.body),e.createContextualFragment(t.responseText)}Fs.year=Ie.year.utc,Ie.scale.utc=function(){return Os(t.scale.linear(),Fs,Ns)},t.text=me(function(t){return t.responseText}),t.json=function(t,e){return ye(t,\\\"application/json\\\",js,e)},t.html=function(t,e){return ye(t,\\\"text/html\\\",Vs,e)},t.xml=me(function(t){return t.responseXML}),\\\"object\\\"==typeof e&&e.exports?e.exports=t:this.d3=t}()},{}],149:[function(t,e,r){e.exports=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}},{}],150:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"incremental-convex-hull\\\"),i=t(\\\"uniq\\\");function a(t,e){this.point=t,this.index=e}function o(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a<i;++a){var o=n[a]-r[a];if(o)return o}return 0}e.exports=function(t,e){var r=t.length;if(0===r)return[];var s=t[0].length;if(s<1)return[];if(1===s)return function(t,e,r){if(1===t)return r?[[-1,0]]:[];var n=e.map(function(t,e){return[t[0],e]});n.sort(function(t,e){return t[0]-e[0]});for(var i=new Array(t-1),a=1;a<t;++a){var o=n[a-1],s=n[a];i[a-1]=[o[1],s[1]]}r&&i.push([-1,i[0][1]],[i[t-1][1],-1]);return i}(r,t,e);for(var l=new Array(r),c=1,u=0;u<r;++u){for(var f=t[u],h=new Array(s+1),p=0,d=0;d<s;++d){var g=f[d];h[d]=g,p+=g*g}h[s]=p,l[u]=new a(h,u),c=Math.max(p,c)}i(l,o),r=l.length;for(var v=new Array(r+s+1),m=new Array(r+s+1),y=(s+1)*(s+1)*c,x=new Array(s+1),u=0;u<=s;++u)x[u]=0;x[s]=y,v[0]=x.slice(),m[0]=-1;for(var u=0;u<=s;++u){var h=x.slice();h[u]=1,v[u+1]=h,m[u+1]=-1}for(var u=0;u<r;++u){var b=l[u];v[u+s+1]=b.point,m[u+s+1]=b.index}var _=n(v,!1);_=e?_.filter(function(t){for(var e=0,r=0;r<=s;++r){var n=m[t[r]];if(n<0&&++e>=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e<=s;++e){var r=m[t[e]];if(r<0)return!1;t[e]=r}return!0});if(1&s)for(var u=0;u<_.length;++u){var b=_[u],h=b[0];b[0]=b[1],b[1]=h}return _}},{\\\"incremental-convex-hull\\\":396,uniq:524}],151:[function(t,e,r){\\\"use strict\\\";e.exports=a;var n=(a.canvas=document.createElement(\\\"canvas\\\")).getContext(\\\"2d\\\"),i=o([32,126]);function a(t,e){Array.isArray(t)&&(t=t.join(\\\", \\\"));var r,a={},s=16,l=.05;e&&(2===e.length&&\\\"number\\\"==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&&(r=e.pairs),e.fontSize&&(s=e.fontSize),null!=e.threshold&&(l=e.threshold))),r||(r=i),n.font=s+\\\"px \\\"+t;for(var c=0;c<r.length;c++){var u=r[c],f=n.measureText(u[0]).width+n.measureText(u[1]).width,h=n.measureText(u).width;if(Math.abs(f-h)>s*l){var p=(h-f)/s;a[u]=1e3*p}}return a}function o(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i<t[1];i++){var a=n+String.fromCharCode(i);e.push(a)}return e}a.createPairs=o,a.ascii=i},{}],152:[function(t,e,r){(function(t){var r=!1;if(\\\"undefined\\\"!=typeof Float64Array){var n=new Float64Array(1),i=new Uint32Array(n.buffer);if(n[0]=1,r=!0,1072693248===i[1]){e.exports=function(t){return n[0]=t,[i[0],i[1]]},e.exports.pack=function(t,e){return i[0]=t,i[1]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[0]},e.exports.hi=function(t){return n[0]=t,i[1]}}else if(1072693248===i[0]){e.exports=function(t){return n[0]=t,[i[1],i[0]]},e.exports.pack=function(t,e){return i[1]=t,i[0]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[1]},e.exports.hi=function(t){return n[0]=t,i[0]}}else r=!1}if(!r){var a=new t(8);e.exports=function(t){return a.writeDoubleLE(t,0,!0),[a.readUInt32LE(0,!0),a.readUInt32LE(4,!0)]},e.exports.pack=function(t,e){return a.writeUInt32LE(t,0,!0),a.writeUInt32LE(e,4,!0),a.readDoubleLE(0,!0)},e.exports.lo=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(0,!0)},e.exports.hi=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t(\\\"buffer\\\").Buffer)},{buffer:93}],153:[function(t,e,r){var n=t(\\\"abs-svg-path\\\"),i=t(\\\"normalize-svg-path\\\"),a={M:\\\"moveTo\\\",C:\\\"bezierCurveTo\\\"};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)}),t.closePath()}},{\\\"abs-svg-path\\\":48,\\\"normalize-svg-path\\\":435}],154:[function(t,e,r){e.exports=function(t){switch(t){case\\\"int8\\\":return Int8Array;case\\\"int16\\\":return Int16Array;case\\\"int32\\\":return Int32Array;case\\\"uint8\\\":return Uint8Array;case\\\"uint16\\\":return Uint16Array;case\\\"uint32\\\":return Uint32Array;case\\\"float32\\\":return Float32Array;case\\\"float64\\\":return Float64Array;case\\\"array\\\":return Array;case\\\"uint8_clamped\\\":return Uint8ClampedArray}}},{}],155:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){switch(\\\"undefined\\\"==typeof e&&(e=0),typeof t){case\\\"number\\\":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n<t;++n)r[n]=e;return r}(0|t,e);break;case\\\"object\\\":if(\\\"number\\\"==typeof t.length)return function t(e,r,n){var i=0|e[n];if(i<=0)return[];var a,o=new Array(i);if(n===e.length-1)for(a=0;a<i;++a)o[a]=r;else for(a=0;a<i;++a)o[a]=t(e,r,n+1);return o}(t,e,0)}return[]}},{}],156:[function(t,e,r){\\\"use strict\\\";function n(t,e,r){r=r||2;var n,s,l,c,u,p,g,v=e&&e.length,m=v?e[0]*r:t.length,y=i(t,0,m,r,!0),x=[];if(!y)return x;if(v&&(y=function(t,e,r,n){var o,s,l,c,u,p=[];for(o=0,s=e.length;o<s;o++)l=e[o]*n,c=o<s-1?e[o+1]*n:t.length,(u=i(t,l,c,n,!1))===u.next&&(u.steiner=!0),p.push(d(u));for(p.sort(f),o=0;o<p.length;o++)h(p[o],r),r=a(r,r.next);return r}(t,e,y,r)),t.length>80*r){n=l=t[0],s=c=t[1];for(var b=r;b<m;b+=r)(u=t[b])<n&&(n=u),(p=t[b+1])<s&&(s=p),u>l&&(l=u),p>c&&(c=p);g=0!==(g=Math.max(l-n,c-s))?1/g:0}return o(y,x,r,n,s,g),x}function i(t,e,r,n,i){var a,o;if(i===A(t,e,r,n)>0)for(a=e;a<r;a+=n)o=w(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=w(a,t[a],t[a+1],o);return o&&y(o,o.next)&&(k(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,f,h){if(t){!h&&f&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<c&&(s++,n=n.nextZ);e++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,f);for(var d,g,v=t;t.prev!==t.next;)if(d=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(d.i/r),e.push(t.i/r),e.push(g.i/r),k(t),t=g.next,v=g.next;else if((t=g)===v){h?1===h?o(t=c(t,e,r),e,r,n,i,f,2):2===h&&u(t,e,r,n,i,f):o(a(t),e,r,n,i,f,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(m(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(g(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&m(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(m(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,c=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=p(s,l,e,r,n),h=p(c,u,e,r,n),d=t.prevZ,v=t.nextZ;d&&d.z>=f&&v&&v.z<=h;){if(d!==t.prev&&d!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,v!==t.prev&&v!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;d&&d.z>=f;){if(d!==t.prev&&d!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=h;){if(v!==t.prev&&v!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!y(i,a)&&x(i,n,n.next,a)&&b(i,a)&&b(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),k(n),k(n.next),n=t=a),n=n.next}while(n!==t);return n}function u(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=_(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,c=r,u=r.x,f=r.y,h=1/0;n=r.next;for(;n!==c;)i>=n.x&&n.x>=u&&i!==n.x&&g(a<f?i:o,a,u,f,a<f?o:i,a,n.x,n.y)&&((l=Math.abs(a-n.y)/(i-n.x))<h||l===h&&n.x>r.x)&&b(n,t)&&(r=n,h=l),n=n.next;return r}(t,e)){var r=_(e,t);a(r,r.next)}}function p(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function g(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&b(t,e)&&b(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function m(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,r,n){return!!(y(t,e)&&y(r,n)||y(t,n)&&y(r,e))||m(t,e,r)>0!=m(t,e,n)>0&&m(r,n,t)>0!=m(r,n,e)>0}function b(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function _(t,e){var r=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function w(t,e,r,n){var i=new M(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}e.exports=n,e.exports.default=n,n.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(A(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var c=e[s]*r,u=s<l-1?e[s+1]*r:t.length;o-=Math.abs(A(t,c,u,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],157:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=t.length;if(\\\"number\\\"!=typeof e){e=0;for(var i=0;i<r;++i){var a=t[i];e=Math.max(e,a[0],a[1])}e=1+(0|e)}e|=0;for(var o=new Array(e),i=0;i<e;++i)o[i]=[];for(var i=0;i<r;++i){var a=t[i];o[a[0]].push(a[1]),o[a[1]].push(a[0])}for(var s=0;s<e;++s)n(o[s],function(t,e){return t-e});return o};var n=t(\\\"uniq\\\")},{uniq:524}],158:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../object/valid-value\\\");e.exports=function(){return n(this).length=0,this}},{\\\"../../object/valid-value\\\":190}],159:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Array.from:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":160,\\\"./shim\\\":161}],160:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t,e,r=Array.from;return\\\"function\\\"==typeof r&&(e=r(t=[\\\"raz\\\",\\\"dwa\\\"]),Boolean(e&&e!==t&&\\\"dwa\\\"===e[1]))}},{}],161:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es6-symbol\\\").iterator,i=t(\\\"../../function/is-arguments\\\"),a=t(\\\"../../function/is-function\\\"),o=t(\\\"../../number/to-pos-integer\\\"),s=t(\\\"../../object/valid-callable\\\"),l=t(\\\"../../object/valid-value\\\"),c=t(\\\"../../object/is-value\\\"),u=t(\\\"../../string/is-string\\\"),f=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;e.exports=function(t){var e,r,g,v,m,y,x,b,_,w,k=arguments[1],M=arguments[2];if(t=Object(l(t)),c(k)&&s(k),this&&this!==Array&&a(this))e=this;else{if(!k){if(i(t))return 1!==(m=t.length)?Array.apply(null,t):((v=new Array(1))[0]=t[0],v);if(f(t)){for(v=new Array(m=t.length),r=0;r<m;++r)v[r]=t[r];return v}}v=[]}if(!f(t))if(void 0!==(_=t[n])){for(x=s(_).call(t),e&&(v=new e),b=x.next(),r=0;!b.done;)w=k?h.call(k,M,b.value,r):b.value,e?(p.value=w,d(v,r,p)):v[r]=w,b=x.next(),++r;m=r}else if(u(t)){for(m=t.length,e&&(v=new e),r=0,g=0;r<m;++r)w=t[r],r+1<m&&(y=w.charCodeAt(0))>=55296&&y<=56319&&(w+=t[++r]),w=k?h.call(k,M,w,g):w,e?(p.value=w,d(v,g,p)):v[g]=w,++g;m=g}if(void 0===m)for(m=o(t.length),e&&(v=new e(m)),r=0;r<m;++r)w=k?h.call(k,M,t[r],r):t[r],e?(p.value=w,d(v,r,p)):v[r]=w;return e&&(p.value=null,v.length=m),v}},{\\\"../../function/is-arguments\\\":162,\\\"../../function/is-function\\\":163,\\\"../../number/to-pos-integer\\\":169,\\\"../../object/is-value\\\":179,\\\"../../object/valid-callable\\\":188,\\\"../../object/valid-value\\\":190,\\\"../../string/is-string\\\":194,\\\"es6-symbol\\\":204}],162:[function(t,e,r){\\\"use strict\\\";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(t){return n.call(t)===i}},{}],163:[function(t,e,r){\\\"use strict\\\";var n=Object.prototype.toString,i=n.call(t(\\\"./noop\\\"));e.exports=function(t){return\\\"function\\\"==typeof t&&n.call(t)===i}},{\\\"./noop\\\":164}],164:[function(t,e,r){\\\"use strict\\\";e.exports=function(){}},{}],165:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Math.sign:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":166,\\\"./shim\\\":167}],166:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t=Math.sign;return\\\"function\\\"==typeof t&&(1===t(10)&&-1===t(-20))}},{}],167:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},{}],168:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../math/sign\\\"),i=Math.abs,a=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*a(i(t)):t}},{\\\"../math/sign\\\":165}],169:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./to-integer\\\"),i=Math.max;e.exports=function(t){return i(0,n(t))}},{\\\"./to-integer\\\":168}],170:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./valid-callable\\\"),i=t(\\\"./valid-value\\\"),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,c){var u,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),u=s(r),h&&u.sort(\\\"function\\\"==typeof h?a.call(h,r):void 0),\\\"function\\\"!=typeof t&&(t=u[t]),o.call(t,u,function(t,n){return l.call(r,t)?o.call(c,f,r[t],t,r,n):e})}}},{\\\"./valid-callable\\\":188,\\\"./valid-value\\\":190}],171:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Object.assign:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":172,\\\"./shim\\\":173}],172:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t,e=Object.assign;return\\\"function\\\"==typeof e&&(e(t={foo:\\\"raz\\\"},{bar:\\\"dwa\\\"},{trzy:\\\"trzy\\\"}),t.foo+t.bar+t.trzy===\\\"razdwatrzy\\\")}},{}],173:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../keys\\\"),i=t(\\\"../valid-value\\\"),a=Math.max;e.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o<l;++o)e=arguments[o],n(e).forEach(s);if(void 0!==r)throw r;return t}},{\\\"../keys\\\":180,\\\"../valid-value\\\":190}],174:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../array/from\\\"),i=t(\\\"./assign\\\"),a=t(\\\"./valid-value\\\");e.exports=function(t){var e=Object(a(t)),r=arguments[1],o=Object(arguments[2]);if(e!==t&&!r)return e;var s={};return r?n(r,function(e){(o.ensure||e in t)&&(s[e]=t[e])}):i(s,t),s}},{\\\"../array/from\\\":159,\\\"./assign\\\":171,\\\"./valid-value\\\":190}],175:[function(t,e,r){\\\"use strict\\\";var n,i,a,o,s=Object.create;t(\\\"./set-prototype-of/is-implemented\\\")()||(n=t(\\\"./set-prototype-of/shim\\\")),e.exports=n?1!==n.level?s:(i={},a={},o={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){a[t]=\\\"__proto__\\\"!==t?o:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(i,a),Object.defineProperty(n,\\\"nullPolyfill\\\",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},{\\\"./set-prototype-of/is-implemented\\\":186,\\\"./set-prototype-of/shim\\\":187}],176:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./_iterate\\\")(\\\"forEach\\\")},{\\\"./_iterate\\\":170}],177:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return\\\"function\\\"==typeof t}},{}],178:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-value\\\"),i={function:!0,object:!0};e.exports=function(t){return n(t)&&i[typeof t]||!1}},{\\\"./is-value\\\":179}],179:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../function/noop\\\")();e.exports=function(t){return t!==n&&null!==t}},{\\\"../function/noop\\\":164}],180:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Object.keys:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":181,\\\"./shim\\\":182}],181:[function(t,e,r){\\\"use strict\\\";e.exports=function(){try{return Object.keys(\\\"primitive\\\"),!0}catch(t){return!1}}},{}],182:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../is-value\\\"),i=Object.keys;e.exports=function(t){return i(n(t)?Object(t):t)}},{\\\"../is-value\\\":179}],183:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./valid-callable\\\"),i=t(\\\"./for-each\\\"),a=Function.prototype.call;e.exports=function(t,e){var r={},o=arguments[2];return n(e),i(t,function(t,n,i,s){r[n]=a.call(e,o,t,n,i,s)}),r}},{\\\"./for-each\\\":176,\\\"./valid-callable\\\":188}],184:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-value\\\"),i=Array.prototype.forEach,a=Object.create;e.exports=function(t){var e=a(null);return i.call(arguments,function(t){n(t)&&function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)}),e}},{\\\"./is-value\\\":179}],185:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Object.setPrototypeOf:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":186,\\\"./shim\\\":187}],186:[function(t,e,r){\\\"use strict\\\";var n=Object.create,i=Object.getPrototypeOf,a={};e.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||n;return\\\"function\\\"==typeof t&&i(t(e(null),a))===a}},{}],187:[function(t,e,r){\\\"use strict\\\";var n,i,a,o,s=t(\\\"../is-object\\\"),l=t(\\\"../valid-value\\\"),c=Object.prototype.isPrototypeOf,u=Object.defineProperty,f={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError(\\\"Prototype must be null or an object\\\")},e.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,\\\"__proto__\\\");if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}())?(2===i.level?i.set?(o=i.set,a=function(t,e){return o.call(n(t,e),e),t}):a=function(t,e){return n(t,e).__proto__=e,t}:a=function t(e,r){var i;return n(e,r),(i=c.call(t.nullPolyfill,e))&&delete t.nullPolyfill.__proto__,null===r&&(r=t.nullPolyfill),e.__proto__=r,i&&u(t.nullPolyfill,\\\"__proto__\\\",f),e},Object.defineProperty(a,\\\"level\\\",{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null,t(\\\"../create\\\")},{\\\"../create\\\":175,\\\"../is-object\\\":178,\\\"../valid-value\\\":190}],188:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){if(\\\"function\\\"!=typeof t)throw new TypeError(t+\\\" is not a function\\\");return t}},{}],189:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-object\\\");e.exports=function(t){if(!n(t))throw new TypeError(t+\\\" is not an Object\\\");return t}},{\\\"./is-object\\\":178}],190:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-value\\\");e.exports=function(t){if(!n(t))throw new TypeError(\\\"Cannot use null or undefined\\\");return t}},{\\\"./is-value\\\":179}],191:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?String.prototype.contains:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":192,\\\"./shim\\\":193}],192:[function(t,e,r){\\\"use strict\\\";var n=\\\"razdwatrzy\\\";e.exports=function(){return\\\"function\\\"==typeof n.contains&&(!0===n.contains(\\\"dwa\\\")&&!1===n.contains(\\\"foo\\\"))}},{}],193:[function(t,e,r){\\\"use strict\\\";var n=String.prototype.indexOf;e.exports=function(t){return n.call(this,t,arguments[1])>-1}},{}],194:[function(t,e,r){\\\"use strict\\\";var n=Object.prototype.toString,i=n.call(\\\"\\\");e.exports=function(t){return\\\"string\\\"==typeof t||t&&\\\"object\\\"==typeof t&&(t instanceof String||n.call(t)===i)||!1}},{}],195:[function(t,e,r){\\\"use strict\\\";var n=Object.create(null),i=Math.random;e.exports=function(){var t;do{t=i().toString(36).slice(2)}while(n[t]);return t}},{}],196:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/object/set-prototype-of\\\"),a=t(\\\"es5-ext/string/#/contains\\\"),o=t(\\\"d\\\"),s=t(\\\"es6-symbol\\\"),l=t(\\\"./\\\"),c=Object.defineProperty;n=e.exports=function(t,e){if(!(this instanceof n))throw new TypeError(\\\"Constructor requires 'new'\\\");l.call(this,t),e=e?a.call(e,\\\"key+value\\\")?\\\"key+value\\\":a.call(e,\\\"key\\\")?\\\"key\\\":\\\"value\\\":\\\"value\\\",c(this,\\\"__kind__\\\",o(\\\"\\\",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o(function(t){return\\\"value\\\"===this.__kind__?this.__list__[t]:\\\"key+value\\\"===this.__kind__?[t,this.__list__[t]]:t})}),c(n.prototype,s.toStringTag,o(\\\"c\\\",\\\"Array Iterator\\\"))},{\\\"./\\\":199,d:139,\\\"es5-ext/object/set-prototype-of\\\":185,\\\"es5-ext/string/#/contains\\\":191,\\\"es6-symbol\\\":204}],197:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es5-ext/function/is-arguments\\\"),i=t(\\\"es5-ext/object/valid-callable\\\"),a=t(\\\"es5-ext/string/is-string\\\"),o=t(\\\"./get\\\"),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(t,e){var r,u,f,h,p,d,g,v,m=arguments[2];if(s(t)||n(t)?r=\\\"array\\\":a(t)?r=\\\"string\\\":t=o(t),i(e),f=function(){h=!0},\\\"array\\\"!==r)if(\\\"string\\\"!==r)for(u=t.next();!u.done;){if(l.call(e,m,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p<d&&(g=t[p],p+1<d&&(v=g.charCodeAt(0))>=55296&&v<=56319&&(g+=t[++p]),l.call(e,m,g,f),!h);++p);else c.call(t,function(t){return l.call(e,m,t,f),h})}},{\\\"./get\\\":198,\\\"es5-ext/function/is-arguments\\\":162,\\\"es5-ext/object/valid-callable\\\":188,\\\"es5-ext/string/is-string\\\":194}],198:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es5-ext/function/is-arguments\\\"),i=t(\\\"es5-ext/string/is-string\\\"),a=t(\\\"./array\\\"),o=t(\\\"./string\\\"),s=t(\\\"./valid-iterable\\\"),l=t(\\\"es6-symbol\\\").iterator;e.exports=function(t){return\\\"function\\\"==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},{\\\"./array\\\":196,\\\"./string\\\":201,\\\"./valid-iterable\\\":202,\\\"es5-ext/function/is-arguments\\\":162,\\\"es5-ext/string/is-string\\\":194,\\\"es6-symbol\\\":204}],199:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/array/#/clear\\\"),a=t(\\\"es5-ext/object/assign\\\"),o=t(\\\"es5-ext/object/valid-callable\\\"),s=t(\\\"es5-ext/object/valid-value\\\"),l=t(\\\"d\\\"),c=t(\\\"d/auto-bind\\\"),u=t(\\\"es6-symbol\\\"),f=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError(\\\"Constructor requires 'new'\\\");h(this,{__list__:l(\\\"w\\\",s(t)),__context__:l(\\\"w\\\",e),__nextIndex__:l(\\\"w\\\",0)}),e&&(o(e.on),e.on(\\\"_add\\\",this._onAdd),e.on(\\\"_delete\\\",this._onDelete),e.on(\\\"_clear\\\",this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l(function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:l(function(){return this._createResult(this._next())}),_createResult:l(function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}}),_resolve:l(function(t){return this.__list__[t]}),_unBind:l(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off(\\\"_add\\\",this._onAdd),this.__context__.off(\\\"_delete\\\",this._onDelete),this.__context__.off(\\\"_clear\\\",this._onClear),this.__context__=null)}),toString:l(function(){return\\\"[object \\\"+(this[u.toStringTag]||\\\"Object\\\")+\\\"]\\\"})},c({_onAdd:l(function(t){t>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(e,r){e>=t&&(this.__redo__[r]=++e)},this),this.__redo__.push(t)):f(this,\\\"__redo__\\\",l(\\\"c\\\",[t])))}),_onDelete:l(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,r){e>t&&(this.__redo__[r]=--e)},this)))}),_onClear:l(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),f(n.prototype,u.iterator,l(function(){return this}))},{d:139,\\\"d/auto-bind\\\":138,\\\"es5-ext/array/#/clear\\\":158,\\\"es5-ext/object/assign\\\":171,\\\"es5-ext/object/valid-callable\\\":188,\\\"es5-ext/object/valid-value\\\":190,\\\"es6-symbol\\\":204}],200:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es5-ext/function/is-arguments\\\"),i=t(\\\"es5-ext/object/is-value\\\"),a=t(\\\"es5-ext/string/is-string\\\"),o=t(\\\"es6-symbol\\\").iterator,s=Array.isArray;e.exports=function(t){return!!i(t)&&(!!s(t)||(!!a(t)||(!!n(t)||\\\"function\\\"==typeof t[o])))}},{\\\"es5-ext/function/is-arguments\\\":162,\\\"es5-ext/object/is-value\\\":179,\\\"es5-ext/string/is-string\\\":194,\\\"es6-symbol\\\":204}],201:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/object/set-prototype-of\\\"),a=t(\\\"d\\\"),o=t(\\\"es6-symbol\\\"),s=t(\\\"./\\\"),l=Object.defineProperty;n=e.exports=function(t){if(!(this instanceof n))throw new TypeError(\\\"Constructor requires 'new'\\\");t=String(t),s.call(this,t),l(this,\\\"__length__\\\",a(\\\"\\\",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:a(function(t){var e,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(e=r.charCodeAt(0))>=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r})}),l(n.prototype,o.toStringTag,a(\\\"c\\\",\\\"String Iterator\\\"))},{\\\"./\\\":199,d:139,\\\"es5-ext/object/set-prototype-of\\\":185,\\\"es6-symbol\\\":204}],202:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-iterable\\\");e.exports=function(t){if(!n(t))throw new TypeError(t+\\\" is not iterable\\\");return t}},{\\\"./is-iterable\\\":200}],203:[function(t,e,r){(function(n,i){!function(t,n){\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?e.exports=n():t.ES6Promise=n()}(this,function(){\\\"use strict\\\";function e(t){return\\\"function\\\"==typeof t}var r=Array.isArray?Array.isArray:function(t){return\\\"[object Array]\\\"===Object.prototype.toString.call(t)},a=0,o=void 0,s=void 0,l=function(t,e){g[a]=t,g[a+1]=e,2===(a+=2)&&(s?s(v):_())};var c=\\\"undefined\\\"!=typeof window?window:void 0,u=c||{},f=u.MutationObserver||u.WebKitMutationObserver,h=\\\"undefined\\\"==typeof self&&\\\"undefined\\\"!=typeof n&&\\\"[object process]\\\"==={}.toString.call(n),p=\\\"undefined\\\"!=typeof Uint8ClampedArray&&\\\"undefined\\\"!=typeof importScripts&&\\\"undefined\\\"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(v,1)}}var g=new Array(1e3);function v(){for(var t=0;t<a;t+=2){(0,g[t])(g[t+1]),g[t]=void 0,g[t+1]=void 0}a=0}var m,y,x,b,_=void 0;function w(t,e){var r=arguments,n=this,i=new this.constructor(A);void 0===i[M]&&U(i);var a,o=n._state;return o?(a=r[o-1],l(function(){return j(o,i,a,n._result)})):R(n,i,t,e),i}function k(t){if(t&&\\\"object\\\"==typeof t&&t.constructor===this)return t;var e=new this(A);return O(e,t),e}h?_=function(){return n.nextTick(v)}:f?(y=0,x=new f(v),b=document.createTextNode(\\\"\\\"),x.observe(b,{characterData:!0}),_=function(){b.data=y=++y%2}):p?((m=new MessageChannel).port1.onmessage=v,_=function(){return m.port2.postMessage(0)}):_=void 0===c&&\\\"function\\\"==typeof t?function(){try{var e=t(\\\"vertx\\\");return o=e.runOnLoop||e.runOnContext,function(){o(v)}}catch(t){return d()}}():d();var M=Math.random().toString(36).substring(16);function A(){}var T=void 0,S=1,C=2,E=new F;function L(t){try{return t.then}catch(t){return E.error=t,E}}function z(t,r,n){r.constructor===t.constructor&&n===w&&r.constructor.resolve===k?function(t,e){e._state===S?P(t,e._result):e._state===C?D(t,e._result):R(e,void 0,function(e){return O(t,e)},function(e){return D(t,e)})}(t,r):n===E?D(t,E.error):void 0===n?P(t,r):e(n)?function(t,e,r){l(function(t){var n=!1,i=function(t,e,r,n){try{t.call(e,r,n)}catch(t){return t}}(r,e,function(r){n||(n=!0,e!==r?O(t,r):P(t,r))},function(e){n||(n=!0,D(t,e))},t._label);!n&&i&&(n=!0,D(t,i))},t)}(t,r,n):P(t,r)}function O(t,e){var r;t===e?D(t,new TypeError(\\\"You cannot resolve a promise with itself\\\")):\\\"function\\\"==typeof(r=e)||\\\"object\\\"==typeof r&&null!==r?z(t,e,L(e)):P(t,e)}function I(t){t._onerror&&t._onerror(t._result),B(t)}function P(t,e){t._state===T&&(t._result=e,t._state=S,0!==t._subscribers.length&&l(B,t))}function D(t,e){t._state===T&&(t._state=C,t._result=e,l(I,t))}function R(t,e,r,n){var i=t._subscribers,a=i.length;t._onerror=null,i[a]=e,i[a+S]=r,i[a+C]=n,0===a&&t._state&&l(B,t)}function B(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n=void 0,i=void 0,a=t._result,o=0;o<e.length;o+=3)n=e[o],i=e[o+r],n?j(r,n,i,a):i(a);t._subscribers.length=0}}function F(){this.error=null}var N=new F;function j(t,r,n,i){var a=e(n),o=void 0,s=void 0,l=void 0,c=void 0;if(a){if((o=function(t,e){try{return t(e)}catch(t){return N.error=t,N}}(n,i))===N?(c=!0,s=o.error,o=null):l=!0,r===o)return void D(r,new TypeError(\\\"A promises callback cannot return that same promise.\\\"))}else o=i,l=!0;r._state!==T||(a&&l?O(r,o):c?D(r,s):t===S?P(r,o):t===C&&D(r,o))}var V=0;function U(t){t[M]=V++,t._state=void 0,t._result=void 0,t._subscribers=[]}function q(t,e){this._instanceConstructor=t,this.promise=new t(A),this.promise[M]||U(this.promise),r(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?P(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&P(this.promise,this._result))):D(this.promise,new Error(\\\"Array Methods must be provided an Array\\\"))}function H(t){this[M]=V++,this._result=this._state=void 0,this._subscribers=[],A!==t&&(\\\"function\\\"!=typeof t&&function(){throw new TypeError(\\\"You must pass a resolver function as the first argument to the promise constructor\\\")}(),this instanceof H?function(t,e){try{e(function(e){O(t,e)},function(e){D(t,e)})}catch(e){D(t,e)}}(this,t):function(){throw new TypeError(\\\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\\\")}())}function G(){var t=void 0;if(\\\"undefined\\\"!=typeof i)t=i;else if(\\\"undefined\\\"!=typeof self)t=self;else try{t=Function(\\\"return this\\\")()}catch(t){throw new Error(\\\"polyfill failed because global object is unavailable in this environment\\\")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if(\\\"[object Promise]\\\"===r&&!e.cast)return}t.Promise=H}return q.prototype._enumerate=function(){for(var t=this.length,e=this._input,r=0;this._state===T&&r<t;r++)this._eachEntry(e[r],r)},q.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===k){var i=L(t);if(i===w&&t._state!==T)this._settledAt(t._state,e,t._result);else if(\\\"function\\\"!=typeof i)this._remaining--,this._result[e]=t;else if(r===H){var a=new r(A);z(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},q.prototype._settledAt=function(t,e,r){var n=this.promise;n._state===T&&(this._remaining--,t===C?D(n,r):this._result[e]=r),0===this._remaining&&P(n,this._result)},q.prototype._willSettleAt=function(t,e){var r=this;R(t,void 0,function(t){return r._settledAt(S,e,t)},function(t){return r._settledAt(C,e,t)})},H.all=function(t){return new q(this,t).promise},H.race=function(t){var e=this;return r(t)?new e(function(r,n){for(var i=t.length,a=0;a<i;a++)e.resolve(t[a]).then(r,n)}):new e(function(t,e){return e(new TypeError(\\\"You must pass an array to race.\\\"))})},H.resolve=k,H.reject=function(t){var e=new this(A);return D(e,t),e},H._setScheduler=function(t){s=t},H._setAsap=function(t){l=t},H._asap=l,H.prototype={constructor:H,then:w,catch:function(t){return this.then(null,t)}},G(),H.polyfill=G,H.Promise=H,H})}).call(this,t(\\\"_process\\\"),\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{_process:465}],204:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Symbol:t(\\\"./polyfill\\\")},{\\\"./is-implemented\\\":205,\\\"./polyfill\\\":207}],205:[function(t,e,r){\\\"use strict\\\";var n={object:!0,symbol:!0};e.exports=function(){var t;if(\\\"function\\\"!=typeof Symbol)return!1;t=Symbol(\\\"test symbol\\\");try{String(t)}catch(t){return!1}return!!n[typeof Symbol.iterator]&&(!!n[typeof Symbol.toPrimitive]&&!!n[typeof Symbol.toStringTag])}},{}],206:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return!!t&&(\\\"symbol\\\"==typeof t||!!t.constructor&&(\\\"Symbol\\\"===t.constructor.name&&\\\"Symbol\\\"===t[t.constructor.toStringTag]))}},{}],207:[function(t,e,r){\\\"use strict\\\";var n,i,a,o,s=t(\\\"d\\\"),l=t(\\\"./validate-symbol\\\"),c=Object.create,u=Object.defineProperties,f=Object.defineProperty,h=Object.prototype,p=c(null);if(\\\"function\\\"==typeof Symbol){n=Symbol;try{String(n()),o=!0}catch(t){}}var d,g=(d=c(null),function(t){for(var e,r,n=0;d[t+(n||\\\"\\\")];)++n;return d[t+=n||\\\"\\\"]=!0,f(h,e=\\\"@@\\\"+t,s.gs(null,function(t){r||(r=!0,f(this,e,s(t)),r=!1)})),e});a=function(t){if(this instanceof a)throw new TypeError(\\\"Symbol is not a constructor\\\");return i(t)},e.exports=i=function t(e){var r;if(this instanceof t)throw new TypeError(\\\"Symbol is not a constructor\\\");return o?n(e):(r=c(a.prototype),e=void 0===e?\\\"\\\":String(e),u(r,{__description__:s(\\\"\\\",e),__name__:s(\\\"\\\",g(e))}))},u(i,{for:s(function(t){return p[t]?p[t]:p[t]=i(String(t))}),keyFor:s(function(t){var e;for(e in l(t),p)if(p[e]===t)return e}),hasInstance:s(\\\"\\\",n&&n.hasInstance||i(\\\"hasInstance\\\")),isConcatSpreadable:s(\\\"\\\",n&&n.isConcatSpreadable||i(\\\"isConcatSpreadable\\\")),iterator:s(\\\"\\\",n&&n.iterator||i(\\\"iterator\\\")),match:s(\\\"\\\",n&&n.match||i(\\\"match\\\")),replace:s(\\\"\\\",n&&n.replace||i(\\\"replace\\\")),search:s(\\\"\\\",n&&n.search||i(\\\"search\\\")),species:s(\\\"\\\",n&&n.species||i(\\\"species\\\")),split:s(\\\"\\\",n&&n.split||i(\\\"split\\\")),toPrimitive:s(\\\"\\\",n&&n.toPrimitive||i(\\\"toPrimitive\\\")),toStringTag:s(\\\"\\\",n&&n.toStringTag||i(\\\"toStringTag\\\")),unscopables:s(\\\"\\\",n&&n.unscopables||i(\\\"unscopables\\\"))}),u(a.prototype,{constructor:s(i),toString:s(\\\"\\\",function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return\\\"Symbol (\\\"+l(this).__description__+\\\")\\\"}),valueOf:s(function(){return l(this)})}),f(i.prototype,i.toPrimitive,s(\\\"\\\",function(){var t=l(this);return\\\"symbol\\\"==typeof t?t:t.toString()})),f(i.prototype,i.toStringTag,s(\\\"c\\\",\\\"Symbol\\\")),f(a.prototype,i.toStringTag,s(\\\"c\\\",i.prototype[i.toStringTag])),f(a.prototype,i.toPrimitive,s(\\\"c\\\",i.prototype[i.toPrimitive]))},{\\\"./validate-symbol\\\":208,d:139}],208:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-symbol\\\");e.exports=function(t){if(!n(t))throw new TypeError(t+\\\" is not a symbol\\\");return t}},{\\\"./is-symbol\\\":206}],209:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?WeakMap:t(\\\"./polyfill\\\")},{\\\"./is-implemented\\\":210,\\\"./polyfill\\\":212}],210:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t,e;if(\\\"function\\\"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},\\\"one\\\"],[{},\\\"two\\\"],[{},\\\"three\\\"]])}catch(t){return!1}return\\\"[object WeakMap]\\\"===String(t)&&(\\\"function\\\"==typeof t.set&&(t.set({},1)===t&&(\\\"function\\\"==typeof t.delete&&(\\\"function\\\"==typeof t.has&&\\\"one\\\"===t.get(e)))))}},{}],211:[function(t,e,r){\\\"use strict\\\";e.exports=\\\"function\\\"==typeof WeakMap&&\\\"[object WeakMap]\\\"===Object.prototype.toString.call(new WeakMap)},{}],212:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/object/set-prototype-of\\\"),a=t(\\\"es5-ext/object/valid-object\\\"),o=t(\\\"es5-ext/object/valid-value\\\"),s=t(\\\"es5-ext/string/random-uniq\\\"),l=t(\\\"d\\\"),c=t(\\\"es6-iterator/get\\\"),u=t(\\\"es6-iterator/for-of\\\"),f=t(\\\"es6-symbol\\\").toStringTag,h=t(\\\"./is-native-implemented\\\"),p=Array.isArray,d=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError(\\\"Constructor requires 'new'\\\");return t=h&&i&&WeakMap!==n?i(new WeakMap,v(this)):this,null!=e&&(p(e)||(e=c(e))),d(t,\\\"__weakMapData__\\\",l(\\\"c\\\",\\\"$weakMap$\\\"+s())),e?(u(e,function(e){o(e),t.set(e[0],e[1])}),t):t},h&&(i&&i(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:l(n)})),Object.defineProperties(n.prototype,{delete:l(function(t){return!!g.call(a(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:l(function(t){if(g.call(a(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:l(function(t){return g.call(a(t),this.__weakMapData__)}),set:l(function(t,e){return d(a(t),this.__weakMapData__,l(\\\"c\\\",e)),this}),toString:l(function(){return\\\"[object WeakMap]\\\"})}),d(n.prototype,f,l(\\\"c\\\",\\\"WeakMap\\\"))},{\\\"./is-native-implemented\\\":211,d:139,\\\"es5-ext/object/set-prototype-of\\\":185,\\\"es5-ext/object/valid-object\\\":189,\\\"es5-ext/object/valid-value\\\":190,\\\"es5-ext/string/random-uniq\\\":195,\\\"es6-iterator/for-of\\\":197,\\\"es6-iterator/get\\\":198,\\\"es6-symbol\\\":204}],213:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}},{}],214:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"is-string-blank\\\");e.exports=function(t){var e=typeof t;if(\\\"string\\\"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if(\\\"number\\\"!==e)return!1;return t-t<1}},{\\\"is-string-blank\\\":406}],215:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){switch(arguments.length){case 0:return new o([0],[0],0);case 1:if(\\\"number\\\"==typeof t){var n=l(t);return new o(n,n,0)}return new o(t,l(t.length),0);case 2:if(\\\"number\\\"==typeof e){var n=l(t.length);return new o(t,n,+e)}r=0;case 3:if(t.length!==e.length)throw new Error(\\\"state and velocity lengths must match\\\");return new o(t,e,r)}};var n=t(\\\"cubic-hermite\\\"),i=t(\\\"binary-search-bounds\\\");function a(t,e,r){return Math.min(e,Math.max(t,r))}function o(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n<this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=t.slice().reverse(),this._velocity=e.slice().reverse(),this._time=[r],this._scratch=[t.slice(),t.slice(),t.slice(),t.slice(),t.slice()]}var s=o.prototype;function l(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=0;return e}s.flush=function(t){var e=i.gt(this._time,t)-1;e<=0||(this._time.splice(0,e),this._state.splice(0,e*this.dimension),this._velocity.splice(0,e*this.dimension))},s.curve=function(t){var e=this._time,r=e.length,o=i.le(e,t),s=this._scratch[0],l=this._state,c=this._velocity,u=this.dimension,f=this.bounds;if(o<0)for(var h=u-1,p=0;p<u;++p,--h)s[p]=l[h];else if(o>=r-1){h=l.length-1;var d=t-e[r-1];for(p=0;p<u;++p,--h)s[p]=l[h]+d*c[h]}else{h=u*(o+1)-1;var g=e[o],v=e[o+1]-g||1,m=this._scratch[1],y=this._scratch[2],x=this._scratch[3],b=this._scratch[4],_=!0;for(p=0;p<u;++p,--h)m[p]=l[h],x[p]=c[h]*v,y[p]=l[h+u],b[p]=c[h+u]*v,_=_&&m[p]===y[p]&&x[p]===b[p]&&0===x[p];if(_)for(p=0;p<u;++p)s[p]=m[p];else n(m,x,y,b,(t-g)/v,s)}var w=f[0],k=f[1];for(p=0;p<u;++p)s[p]=a(w[p],k[p],s[p]);return s},s.dcurve=function(t){var e=this._time,r=e.length,a=i.le(e,t),o=this._scratch[0],s=this._state,l=this._velocity,c=this.dimension;if(a>=r-1)for(var u=s.length-1,f=(e[r-1],0);f<c;++f,--u)o[f]=l[u];else{u=c*(a+1)-1;var h=e[a],p=e[a+1]-h||1,d=this._scratch[1],g=this._scratch[2],v=this._scratch[3],m=this._scratch[4],y=!0;for(f=0;f<c;++f,--u)d[f]=s[u],v[f]=l[u]*p,g[f]=s[u+c],m[f]=l[u+c]*p,y=y&&d[f]===g[f]&&v[f]===m[f]&&0===v[f];if(y)for(f=0;f<c;++f)o[f]=0;else{n.derivative(d,v,g,m,(t-h)/p,o);for(f=0;f<c;++f)o[f]/=p}}return o},s.lastT=function(){var t=this._time;return t[t.length-1]},s.stable=function(){for(var t=this._velocity,e=t.length,r=this.dimension-1;r>=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t<e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1];this._time.push(e,t);for(var u=0;u<2;++u)for(var f=0;f<r;++f)n.push(n[o++]),i.push(0);this._time.push(t);for(f=r;f>0;--f)n.push(a(l[f-1],c[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t<e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=t-e,l=this.bounds,c=l[0],u=l[1],f=s>1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var p=a(c[h-1],u[h-1],arguments[h]);n.push(p),i.push((p-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t<this.lastT()||arguments.length!==e+1)){var r=this._state,n=this._velocity,i=this.bounds,o=i[0],s=i[1];this._time.push(t);for(var l=e;l>0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,f=u>1e-6?1/u:0;this._time.push(t);for(var h=r;h>0;--h){var p=arguments[h];n.push(a(l[h-1],c[h-1],n[o++]+p)),i.push(p*f)}}},s.idle=function(t){var e=this.lastT();if(!(t<e)){var r=this.dimension,n=this._state,i=this._velocity,o=n.length-r,s=this.bounds,l=s[0],c=s[1],u=t-e;this._time.push(t);for(var f=r-1;f>=0;--f)n.push(a(l[f],c[f],n[o]+u*i[o])),i.push(0),o+=1}}},{\\\"binary-search-bounds\\\":79,\\\"cubic-hermite\\\":133}],216:[function(t,e,r){var n=t(\\\"dtype\\\");e.exports=function(t,e,r){if(!t)throw new TypeError(\\\"must specify data as first parameter\\\");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&\\\"number\\\"==typeof t[0][0]){var i,a,o,s,l=t[0].length,c=t.length*l;e&&\\\"string\\\"!=typeof e||(e=new(n(e||\\\"float32\\\"))(c+r));var u=e.length-r;if(c!==u)throw new Error(\\\"source length \\\"+c+\\\" (\\\"+l+\\\"x\\\"+t.length+\\\") does not match destination length \\\"+u);for(i=0,o=r;i<t.length;i++)for(a=0;a<l;a++)e[o++]=null===t[i][a]?NaN:t[i][a]}else if(e&&\\\"string\\\"!=typeof e)e.set(t,r);else{var f=n(e||\\\"float32\\\");if(Array.isArray(t)||\\\"array\\\"===e)for(e=new f(t.length+r),i=0,o=r,s=e.length;o<s;o++,i++)e[o]=null===t[i]?NaN:t[i];else 0===r?e=new f(t):(e=new f(t.length+r)).set(t,r)}return e}},{dtype:154}],217:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"css-font/stringify\\\"),i=[32,126];e.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement(\\\"canvas\\\"),a=t.font,o=\\\"number\\\"==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;a&&\\\"string\\\"!=typeof a&&(a=n(a));if(Array.isArray(s)){if(2===s.length&&\\\"number\\\"==typeof s[0]&&\\\"number\\\"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split(\\\"\\\");e=e.slice(),r.width=e[0],r.height=e[1];var f=r.getContext(\\\"2d\\\");f.fillStyle=\\\"#000\\\",f.fillRect(0,0,r.width,r.height),f.font=a,f.textAlign=\\\"center\\\",f.textBaseline=\\\"middle\\\",f.fillStyle=\\\"#fff\\\";for(var h=o[0]/2,p=o[1]/2,c=0;c<s.length;c++)f.fillText(s[c],h,p),(h+=o[0])>e[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{\\\"css-font/stringify\\\":130}],218:[function(t,e,r){\\\"use strict\\\";function n(t,e){e||(e={}),(\\\"string\\\"==typeof t||Array.isArray(t))&&(e.family=t);var r=Array.isArray(e.family)?e.family.join(\\\", \\\"):e.family;if(!r)throw Error(\\\"`family` must be defined\\\");var s=e.size||e.fontSize||e.em||48,l=e.weight||e.fontWeight||\\\"\\\",c=(t=[e.style||e.fontStyle||\\\"\\\",l,s].join(\\\" \\\")+\\\"px \\\"+r,e.origin||\\\"top\\\");if(n.cache[r]&&s<=n.cache[r].em)return i(n.cache[r],c);var u=e.canvas||n.canvas,f=u.getContext(\\\"2d\\\"),h={upper:void 0!==e.upper?e.upper:\\\"H\\\",lower:void 0!==e.lower?e.lower:\\\"x\\\",descent:void 0!==e.descent?e.descent:\\\"p\\\",ascent:void 0!==e.ascent?e.ascent:\\\"h\\\",tittle:void 0!==e.tittle?e.tittle:\\\"i\\\",overshoot:void 0!==e.overshoot?e.overshoot:\\\"O\\\"},p=Math.ceil(1.5*s);u.height=p,u.width=.5*p,f.font=t;var d={top:0};f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillStyle=\\\"black\\\",f.fillText(\\\"H\\\",0,0);var g=a(f.getImageData(0,0,p,p));f.clearRect(0,0,p,p),f.textBaseline=\\\"bottom\\\",f.fillText(\\\"H\\\",0,p);var v=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-v+g,f.clearRect(0,0,p,p),f.textBaseline=\\\"alphabetic\\\",f.fillText(\\\"H\\\",0,p);var m=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=m,f.clearRect(0,0,p,p),f.textBaseline=\\\"middle\\\",f.fillText(\\\"H\\\",0,.5*p);var y=a(f.getImageData(0,0,p,p));d.median=d.middle=p-y-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline=\\\"hanging\\\",f.fillText(\\\"H\\\",0,.5*p);var x=a(f.getImageData(0,0,p,p));d.hanging=p-x-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline=\\\"ideographic\\\",f.fillText(\\\"H\\\",0,p);var b=a(f.getImageData(0,0,p,p));if(d.ideographic=p-b-1+g,h.upper&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.upper,0,0),d.upper=a(f.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),h.lower&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.lower,0,0),d.lower=a(f.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),h.tittle&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.tittle,0,0),d.tittle=a(f.getImageData(0,0,p,p))),h.ascent&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.ascent,0,0),d.ascent=a(f.getImageData(0,0,p,p))),h.descent&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.descent,0,0),d.descent=o(f.getImageData(0,0,p,p))),h.overshoot){f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.overshoot,0,0);var _=o(f.getImageData(0,0,p,p));d.overshoot=_-m}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,i(d,c)}function i(t,e){var r={};for(var n in\\\"string\\\"==typeof e&&(e=t[e]),t)\\\"em\\\"!==n&&(r[n]=t[n]-e);return r}function a(t){for(var e=t.height,r=t.data,n=3;n<r.length;n+=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}function o(t){for(var e=t.height,r=t.data,n=r.length-1;n>0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(\\\"canvas\\\"),n.cache={}},{}],219:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return new c(t||d,null)};var n=0,i=1;function a(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function o(t){return new a(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new a(t,e.key,e.value,e.left,e.right,e._count)}function l(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function c(t,e){this._compare=t,this.root=e}var u=c.prototype;function f(t,e){this.tree=t,this._stack=e}Object.defineProperty(u,\\\"keys\\\",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(u,\\\"values\\\",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(u,\\\"length\\\",{get:function(){return this.root?this.root._count:0}}),u.insert=function(t,e){for(var r=this._compare,o=this.root,u=[],f=[];o;){var h=r(t,o.key);u.push(o),f.push(h),o=h<=0?o.left:o.right}u.push(new a(n,t,e,null,null,1));for(var p=u.length-2;p>=0;--p){o=u[p];f[p]<=0?u[p]=new a(o._color,o.key,o.value,u[p+1],o.right,o._count+1):u[p]=new a(o._color,o.key,o.value,o.left,u[p+1],o._count+1)}for(p=u.length-1;p>1;--p){var d=u[p-1];o=u[p];if(d._color===i||o._color===i)break;var g=u[p-2];if(g.left===d)if(d.left===o){if(!(v=g.right)||v._color!==n){if(g._color=n,g.left=d.right,d._color=i,d.right=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).left===g?m.left=d:m.right=d;break}d._color=i,g.right=s(i,v),g._color=n,p-=1}else{if(!(v=g.right)||v._color!==n){if(d.right=o.left,g._color=n,g.left=o.right,o._color=i,o.left=d,o.right=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).left===g?m.left=o:m.right=o;break}d._color=i,g.right=s(i,v),g._color=n,p-=1}else if(d.right===o){if(!(v=g.left)||v._color!==n){if(g._color=n,g.right=d.left,d._color=i,d.left=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).right===g?m.right=d:m.left=d;break}d._color=i,g.left=s(i,v),g._color=n,p-=1}else{var v;if(!(v=g.left)||v._color!==n){var m;if(d.left=o.right,g._color=n,g.right=o.left,o._color=i,o.right=d,o.left=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).right===g?m.right=o:m.left=o;break}d._color=i,g.left=s(i,v),g._color=n,p-=1}}return u[0]._color=i,new c(r,u[0])},u.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return function t(e,r){var n;if(r.left&&(n=t(e,r.left)))return n;return(n=e(r.key,r.value))||(r.right?t(e,r.right):void 0)}(t,this.root);case 2:return function t(e,r,n,i){if(r(e,i.key)<=0){var a;if(i.left&&(a=t(e,r,n,i.left)))return a;if(a=n(i.key,i.value))return a}if(i.right)return t(e,r,n,i.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return function t(e,r,n,i,a){var o,s=n(e,a.key),l=n(r,a.key);if(s<=0){if(a.left&&(o=t(e,r,n,i,a.left)))return o;if(l>0&&(o=i(a.key,a.value)))return o}if(l>0&&a.right)return t(e,r,n,i,a.right)}(e,r,this._compare,t,this.root)}},Object.defineProperty(u,\\\"begin\\\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new f(this,t)}}),Object.defineProperty(u,\\\"end\\\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new f(this,t)}}),u.at=function(t){if(t<0)return new f(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t<e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new f(this,r);if(t-=1,!e.right)break;if(t>=e.right._count)break;e=e.right}return new f(this,[])},u.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new f(this,n)},u.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new f(this,n)},u.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new f(this,n)},u.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new f(this,n)},u.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new f(this,n);r=i<=0?r.left:r.right}return new f(this,[])},u.remove=function(t){var e=this.find(t);return e?e.remove():this},u.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var h=f.prototype;function p(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return t<e?-1:t>e?1:0}Object.defineProperty(h,\\\"valid\\\",{get:function(){return this._stack.length>0}}),Object.defineProperty(h,\\\"node\\\",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new f(this.tree,this._stack.slice())},h.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new a(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=t.length-2;u>=0;--u){(r=t[u]).left===t[u+1]?e[u]=new a(r._color,r.key,r.value,e[u+1],r.right,r._count):e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count)}if((r=e[e.length-1]).left&&r.right){var f=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var h=e[f-1];e.push(new a(r._color,h.key,h.value,r.left,r.right,r._count)),e[f-1].key=r.key,e[f-1].value=r.value;for(u=e.length-2;u>=f;--u)r=e[u],e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count);e[f-1].left=e[f]}if((r=e[e.length-1])._color===n){var d=e[e.length-2];d.left===r?d.left=null:d.right===r&&(d.right=null),e.pop();for(u=0;u<e.length;++u)e[u]._count--;return new c(this.tree._compare,e[0])}if(r.left||r.right){r.left?p(r,r.left):r.right&&p(r,r.right),r._color=i;for(u=0;u<e.length-1;++u)e[u]._count--;return new c(this.tree._compare,e[0])}if(1===e.length)return new c(this.tree._compare,null);for(u=0;u<e.length;++u)e[u]._count--;var g=e[e.length-2];return function(t){for(var e,r,a,c,u=t.length-1;u>=0;--u){if(e=t[u],0===u)return void(e._color=i);if((r=t[u-1]).left===e){if((a=r.right).right&&a.right._color===n)return c=(a=r.right=o(a)).right=o(a.right),r.right=a.left,a.left=r,a.right=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u>1&&((f=t[u-2]).left===r?f.left=a:f.right=a),void(t[u-1]=a);if(a.left&&a.left._color===n)return c=(a=r.right=o(a)).left=o(a.left),r.right=c.left,a.left=c.right,c.left=r,c.right=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u>1&&((f=t[u-2]).left===r?f.left=c:f.right=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.right=s(n,a));r.right=s(n,a);continue}a=o(a),r.right=a.left,a.left=r,a._color=r._color,r._color=n,l(r),l(a),u>1&&((f=t[u-2]).left===r?f.left=a:f.right=a),t[u-1]=a,t[u]=r,u+1<t.length?t[u+1]=e:t.push(e),u+=2}else{if((a=r.left).left&&a.left._color===n)return c=(a=r.left=o(a)).left=o(a.left),r.left=a.right,a.right=r,a.left=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u>1&&((f=t[u-2]).right===r?f.right=a:f.left=a),void(t[u-1]=a);if(a.right&&a.right._color===n)return c=(a=r.left=o(a)).right=o(a.right),r.left=c.right,a.right=c.left,c.right=r,c.left=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u>1&&((f=t[u-2]).right===r?f.right=c:f.left=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.left=s(n,a));r.left=s(n,a);continue}var f;a=o(a),r.left=a.right,a.right=r,a._color=r._color,r._color=n,l(r),l(a),u>1&&((f=t[u-2]).right===r?f.right=a:f.left=a),t[u-1]=a,t[u]=r,u+1<t.length?t[u+1]=e:t.push(e),u+=2}}}(e),g.left===r?g.left=null:g.right=null,new c(this.tree._compare,e[0])},Object.defineProperty(h,\\\"key\\\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,\\\"value\\\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,\\\"index\\\",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),h.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,\\\"hasNext\\\",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),h.update=function(t){var e=this._stack;if(0===e.length)throw new Error(\\\"Can't update empty node!\\\");var r=new Array(e.length),n=e[e.length-1];r[r.length-1]=new a(n._color,n.key,t,n.left,n.right,n._count);for(var i=e.length-2;i>=0;--i)(n=e[i]).left===e[i+1]?r[i]=new a(n._color,n.key,n.value,r[i+1],n.right,n._count):r[i]=new a(n._color,n.key,n.value,n.left,r[i+1],n._count);return new c(this.tree._compare,r[0])},h.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,\\\"hasPrev\\\",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],220:[function(t,e,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],i=607/128,a=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t<0)return Number(\\\"0/0\\\");for(var e=a[0],r=a.length-1;r>0;--r)e+=a[r]/(t+r);var n=t+i+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(o(e));e-=1;for(var r=n[0],i=1;i<9;i++)r+=n[i]/(e+i);var a=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(a,e+.5)*Math.exp(-a)*r},e.exports.log=o},{}],221:[function(t,e,r){e.exports=function(t,e){if(\\\"string\\\"!=typeof t)throw new TypeError(\\\"must specify type string\\\");if(e=e||{},\\\"undefined\\\"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement(\\\"canvas\\\");\\\"number\\\"==typeof e.width&&(r.width=e.width);\\\"number\\\"==typeof e.height&&(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf(\\\"webgl\\\")&&a.push(\\\"experimental-\\\"+t);for(var o=0;o<a.length;o++)if(n=r.getContext(a[o],i))return n}catch(t){n=null}return n||null}},{}],222:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=new u(t);return r.update(e),r};var n=t(\\\"./lib/text.js\\\"),i=t(\\\"./lib/lines.js\\\"),a=t(\\\"./lib/background.js\\\"),o=t(\\\"./lib/cube.js\\\"),s=t(\\\"./lib/ticks.js\\\"),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=[\\\"sans-serif\\\",\\\"sans-serif\\\",\\\"sans-serif\\\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this._tickAlign=[\\\"auto\\\",\\\"auto\\\",\\\"auto\\\"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=[\\\"x\\\",\\\"y\\\",\\\"z\\\"],this.labelEnable=[!0,!0,!0],this.labelFont=\\\"sans-serif\\\",this.labelSize=[20,20,20],this._labelAngle=[0,0,0],this._labelAlign=[\\\"auto\\\",\\\"auto\\\",\\\"auto\\\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(t)}var f=u.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,a=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),c=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),u=!1,f=!1;if(\\\"bounds\\\"in t)for(var h=t.bounds,p=0;p<2;++p)for(var d=0;d<3;++d)h[p][d]!==this.bounds[p][d]&&(f=!0),this.bounds[p][d]=h[p][d];if(\\\"ticks\\\"in t){r=t.ticks,u=!0,this.autoTicks=!1;for(p=0;p<3;++p)this.tickSpacing[p]=0}else a(\\\"tickSpacing\\\")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&(\\\"ticks\\\"in t||\\\"tickSpacing\\\"in t||(this.autoTicks=!0),f=!0,u=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(p=0;p<3;++p)r[p].sort(function(t,e){return t.x-e.x});s.equal(r,this.ticks)?u=!1:this.ticks=r}o(\\\"tickEnable\\\"),l(\\\"tickFont\\\")&&(u=!0),a(\\\"tickSize\\\"),a(\\\"tickAngle\\\"),a(\\\"tickPad\\\"),c(\\\"tickColor\\\");var g=l(\\\"labels\\\");l(\\\"labelFont\\\")&&(g=!0),o(\\\"labelEnable\\\"),a(\\\"labelSize\\\"),a(\\\"labelPad\\\"),c(\\\"labelColor\\\"),o(\\\"lineEnable\\\"),o(\\\"lineMirror\\\"),a(\\\"lineWidth\\\"),c(\\\"lineColor\\\"),o(\\\"lineTickEnable\\\"),o(\\\"lineTickMirror\\\"),a(\\\"lineTickLength\\\"),a(\\\"lineTickWidth\\\"),c(\\\"lineTickColor\\\"),o(\\\"gridEnable\\\"),a(\\\"gridWidth\\\"),c(\\\"gridColor\\\"),o(\\\"zeroEnable\\\"),c(\\\"zeroLineColor\\\"),a(\\\"zeroLineWidth\\\"),o(\\\"backgroundEnable\\\"),c(\\\"backgroundColor\\\"),this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var p=[new h,new h,new h];function d(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],u=0;u<3;++u)if(e!==u){var f=a,h=s,p=o,d=l;c&1<<u&&(f=s,h=a,p=l,d=o),f[u]=r[0][u],h[u]=r[1][u],i[u]>0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var g=[0,0,0],v={model:l,view:l,projection:l};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var m=[0,0,0],y=[0,0,0],x=[0,0,0];f.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=o(r,n,i,a),u=s.cubeEdges,f=s.axis,h=n[12],b=n[13],_=n[14],w=n[15],k=this.pixelRatio*(i[3]*h+i[7]*b+i[11]*_+i[15]*w)/e.drawingBufferHeight,M=0;M<3;++M)this.lastCubeProps.cubeEdges[M]=u[M],this.lastCubeProps.axis[M]=f[M];var A=p;for(M=0;M<3;++M)d(p[M],M,this.bounds,u,f);e=this.gl;var T,S=g;for(M=0;M<3;++M)this.backgroundEnable[M]?S[M]=f[M]:S[M]=0;this._background.draw(r,n,i,a,S,this.backgroundColor),this._lines.bind(r,n,i,this);for(M=0;M<3;++M){var C=[0,0,0];f[M]>0?C[M]=a[1][M]:C[M]=a[0][M];for(var E=0;E<2;++E){var L=(M+1+E)%3,z=(M+1+(1^E))%3;this.gridEnable[L]&&this._lines.drawGrid(L,z,this.bounds,C,this.gridColor[L],this.gridWidth[L]*this.pixelRatio)}for(E=0;E<2;++E){L=(M+1+E)%3,z=(M+1+(1^E))%3;this.zeroEnable[z]&&Math.min(a[0][z],a[1][z])<=0&&Math.max(a[0][z],a[1][z])>=0&&this._lines.drawZero(L,z,this.bounds,C,this.zeroLineColor[z],this.zeroLineWidth[z]*this.pixelRatio)}}for(M=0;M<3;++M){this.lineEnable[M]&&this._lines.drawAxisLine(M,this.bounds,A[M].primalOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio),this.lineMirror[M]&&this._lines.drawAxisLine(M,this.bounds,A[M].mirrorOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio);var O=c(m,A[M].primalMinor),I=c(y,A[M].mirrorMinor),P=this.lineTickLength;for(E=0;E<3;++E){var D=k/r[5*E];O[E]*=P[E]*D,I[E]*=P[E]*D}this.lineTickEnable[M]&&this._lines.drawAxisTicks(M,A[M].primalOffset,O,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio),this.lineTickMirror[M]&&this._lines.drawAxisTicks(M,A[M].mirrorOffset,I,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio);var R,B;function F(t){(B=[0,0,0])[t]=1}function N(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];a>0&&l>0?F(n):a>0&&l<0?F(n):a<0&&l>0?F(n):a<0&&l<0?F(n):o>0&&s>0?F(i):o>0&&s<0?F(i):o<0&&s>0?F(i):o<0&&s<0&&F(i)}for(M=0;M<3;++M){var j=A[M].primalMinor,V=A[M].mirrorMinor,U=c(x,A[M].primalOffset);for(E=0;E<3;++E)this.lineTickEnable[M]&&(U[E]+=k*j[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);var q=[0,0,0];if(q[M]=1,this.tickEnable[M]){-3600===this.tickAngle[M]?(this.tickAngle[M]=0,this._tickAlign[M]=\\\"auto\\\"):this._tickAlign[M]=-1,R=1,\\\"auto\\\"===(T=[this._tickAlign[M],.5,R])[0]?T[0]=0:T[0]=parseInt(\\\"\\\"+T[0]),B=[0,0,0],N(M,j,V);for(E=0;E<3;++E)U[E]+=k*j[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(M,this.tickSize[M],this.tickAngle[M],U,this.tickColor[M],q,B,T)}if(this.labelEnable[M]){R=0,B=[0,0,0],this.labels[M].length>4&&(F(M),R=1),\\\"auto\\\"===(T=[this._labelAlign[M],.5,R])[0]?T[0]=0:T[0]=parseInt(\\\"\\\"+T[0]);for(E=0;E<3;++E)U[E]+=k*j[E]*this.labelPad[E]/r[5*E];U[M]+=.5*(a[0][M]+a[1][M]),this._text.drawLabel(M,this.labelSize[M],this._labelAngle[M],U,this.labelColor[M],[0,0,0],B,T)}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{\\\"./lib/background.js\\\":223,\\\"./lib/cube.js\\\":224,\\\"./lib/lines.js\\\":225,\\\"./lib/text.js\\\":227,\\\"./lib/ticks.js\\\":228}],223:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,f=[0,0,0],h=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=p,h[l]=p;for(var d=-1;d<=1;d+=2){f[c]=d;for(var g=-1;g<=1;g+=2)f[u]=g,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var v=c;c=u,u=v}var m=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:m,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:m,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,m,x,b)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"./shaders\\\").bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":226,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310}],224:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,a){i(s,e,t),i(s,r,s);for(var p=0,y=0;y<2;++y){u[2]=a[y][2];for(var x=0;x<2;++x){u[1]=a[x][1];for(var b=0;b<2;++b)u[0]=a[b][0],h(l[p],u,s),p+=1}}for(var _=-1,y=0;y<8;++y){for(var w=l[y][3],k=0;k<3;++k)c[y][k]=l[y][k]/w;w<0&&(_<0?_=y:c[y][2]<c[_][2]&&(_=y))}if(_<0){_=0;for(var M=0;M<3;++M){for(var A=(M+2)%3,T=(M+1)%3,S=-1,C=-1,E=0;E<2;++E){var L=E<<M,z=L+(E<<A)+(1-E<<T),O=L+(1-E<<A)+(E<<T);o(c[L],c[z],c[O],f)<0||(E?S=1:C=1)}if(S<0||C<0)C>S&&(_|=1<<M);else{for(var E=0;E<2;++E){var L=E<<M,z=L+(E<<A)+(1-E<<T),O=L+(1-E<<A)+(E<<T),I=d([l[L],l[z],l[O],l[L+(1<<A)+(1<<T)]]);E?S=I:C=I}C>S&&(_|=1<<M)}}}for(var P=7^_,D=-1,y=0;y<8;++y)y!==_&&y!==P&&(D<0?D=y:c[D][1]>c[y][1]&&(D=y));for(var R=-1,y=0;y<3;++y){var B=D^1<<y;if(B!==_&&B!==P){R<0&&(R=B);var T=c[B];T[0]<c[R][0]&&(R=B)}}for(var F=-1,y=0;y<3;++y){var B=D^1<<y;if(B!==_&&B!==P&&B!==R){F<0&&(F=B);var T=c[B];T[0]>c[F][0]&&(F=B)}}var N=g;N[0]=N[1]=N[2]=0,N[n.log2(R^D)]=D&R,N[n.log2(D^F)]=D&F;var j=7^F;j===_||j===P?(j=7^R,N[n.log2(F^j)]=j&F):N[n.log2(R^j)]=j&R;for(var V=v,U=_,M=0;M<3;++M)V[M]=U&1<<M?-1:1;return m};var n=t(\\\"bit-twiddle\\\"),i=t(\\\"gl-mat4/multiply\\\"),a=(t(\\\"gl-mat4/invert\\\"),t(\\\"split-polygon\\\")),o=t(\\\"robust-orientation\\\"),s=new Array(16),l=(new Array(16),new Array(8)),c=new Array(8),u=new Array(3),f=[0,0,0];function h(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}!function(){for(var t=0;t<8;++t)l[t]=[1,1,1,1],c[t]=[1,1,1]}();var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(t){for(var e=0;e<p.length;++e)if((t=a.positive(t,p[e])).length<3)return 0;var r=t[0],n=r[0]/r[3],i=r[1]/r[3],o=0;for(e=1;e+1<t.length;++e){var s=t[e],l=t[e+1],c=s[0]/s[3]-n,u=s[1]/s[3]-i,f=l[0]/l[3]-n,h=l[1]/l[3]-i;o+=Math.abs(c*h-u*f)}return o}var g=[1,1,1],v=[0,0,0],m={cubeEdges:g,axis:v}},{\\\"bit-twiddle\\\":80,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"robust-orientation\\\":486,\\\"split-polygon\\\":503}],225:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var o=[],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[0,0,0];o.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var f=0;f<3;++f){for(var h=o.length/3|0,d=0;d<r[f].length;++d){var g=+r[f][d].x;o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var v=o.length/3|0;s[f]=h,l[f]=v-h;for(var h=o.length/3|0,m=0;m<r[f].length;++m){var g=+r[f][m].x;o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var v=o.length/3|0;c[f]=h,u[f]=v-h}var y=n(t,new Float32Array(o)),x=i(t,[{buffer:y,type:t.FLOAT,size:3,stride:0,offset:0}]),b=a(t);return b.attributes.position.location=0,new p(t,y,x,b,l,s,u,c)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"./shaders\\\").line,o=[0,0,0],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[1,1];function f(t){return t[0]=t[1]=t[2]=0,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function p(t,e,r,n,i,a,o,s){this.gl=t,this.vertBuffer=e,this.vao=r,this.shader=n,this.tickCount=i,this.tickOffset=a,this.gridCount=o,this.gridOffset=s}var d=p.prototype;d.bind=function(t,e,r){this.shader.bind(),this.shader.uniforms.model=t,this.shader.uniforms.view=e,this.shader.uniforms.projection=r,u[0]=this.gl.drawingBufferWidth,u[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=u,this.vao.bind()},d.unbind=function(){this.vao.unbind()},d.drawAxisLine=function(t,e,r,n,i){var a=f(s);this.shader.uniforms.majorAxis=s,a[t]=e[1][t]-e[0][t],this.shader.uniforms.minorAxis=a;var o,u=h(c,r);u[t]+=e[0][t],this.shader.uniforms.offset=u,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=n,(o=f(l))[(t+2)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6),(o=f(l))[(t+1)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6)},d.drawAxisTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=f(o);a[t]=1,this.shader.uniforms.majorAxis=a,this.shader.uniforms.offset=e,this.shader.uniforms.minorAxis=r,this.shader.uniforms.color=n,this.shader.uniforms.lineWidth=i;var s=f(l);s[t]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}},d.drawGrid=function(t,e,r,n,i,a){if(this.gridCount[t]){var u=f(s);u[e]=r[1][e]-r[0][e],this.shader.uniforms.minorAxis=u;var p=h(c,n);p[e]+=r[0][e],this.shader.uniforms.offset=p;var d=f(o);d[t]=1,this.shader.uniforms.majorAxis=d;var g=f(l);g[t]=1,this.shader.uniforms.screenAxis=g,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,this.gridCount[t],this.gridOffset[t])}},d.drawZero=function(t,e,r,n,i,a){var o=f(s);this.shader.uniforms.majorAxis=o,o[t]=r[1][t]-r[0][t],this.shader.uniforms.minorAxis=o;var u=h(c,n);u[t]+=r[0][t],this.shader.uniforms.offset=u;var p=f(l);p[e]=1,this.shader.uniforms.screenAxis=p,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,6)},d.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":226,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310}],226:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"#define GLSLIFY 1\\\\nattribute vec3 position;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\\\\nuniform float lineWidth;\\\\nuniform vec2 screenShape;\\\\n\\\\nvec3 project(vec3 p) {\\\\n  vec4 pp = projection * view * model * vec4(p, 1.0);\\\\n  return pp.xyz / max(pp.w, 0.0001);\\\\n}\\\\n\\\\nvoid main() {\\\\n  vec3 major = position.x * majorAxis;\\\\n  vec3 minor = position.y * minorAxis;\\\\n\\\\n  vec3 vPosition = major + minor + offset;\\\\n  vec3 pPosition = project(vPosition);\\\\n  vec3 offset = project(vPosition + screenAxis * position.z);\\\\n\\\\n  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\\\\n\\\\n  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\\\\n}\\\\n\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\nuniform vec4 color;\\\\nvoid main() {\\\\n  gl_FragColor = color;\\\\n}\\\"]);r.line=function(t){return i(t,a,o,null,[{name:\\\"position\\\",type:\\\"vec3\\\"}])};var s=n([\\\"#define GLSLIFY 1\\\\nattribute vec3 position;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 offset, axis, alignDir, alignOpt;\\\\nuniform float scale, angle, pixelScale;\\\\nuniform vec2 resolution;\\\\n\\\\nvec3 project(vec3 p) {\\\\n  vec4 pp = projection * view * model * vec4(p, 1.0);\\\\n  return pp.xyz / max(pp.w, 0.0001);\\\\n}\\\\n\\\\nfloat computeViewAngle(vec3 a, vec3 b) {\\\\n  vec3 A = project(a);\\\\n  vec3 B = project(b);\\\\n\\\\n  return atan(\\\\n    (B.y - A.y) * resolution.y,\\\\n    (B.x - A.x) * resolution.x\\\\n  );\\\\n}\\\\n\\\\nconst float PI = 3.141592;\\\\nconst float TWO_PI = 2.0 * PI;\\\\nconst float HALF_PI = 0.5 * PI;\\\\nconst float ONE_AND_HALF_PI = 1.5 * PI;\\\\n\\\\nint option = int(floor(alignOpt.x + 0.001));\\\\nfloat hv_ratio =       alignOpt.y;\\\\nbool enableAlign =    (alignOpt.z != 0.0);\\\\n\\\\nfloat mod_angle(float a) {\\\\n  return mod(a, PI);\\\\n}\\\\n\\\\nfloat positive_angle(float a) {\\\\n  return mod_angle((a < 0.0) ?\\\\n    a + TWO_PI :\\\\n    a\\\\n  );\\\\n}\\\\n\\\\nfloat look_upwards(float a) {\\\\n  float b = positive_angle(a);\\\\n  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\\\\n    b - PI :\\\\n    b;\\\\n}\\\\n\\\\nfloat look_horizontal_or_vertical(float a, float ratio) {\\\\n  // ratio controls the ratio between being horizontal to (vertical + horizontal)\\\\n  // if ratio is set to 0.5 then it is 50%, 50%.\\\\n  // when using a higher ratio e.g. 0.75 the result would\\\\n  // likely be more horizontal than vertical.\\\\n\\\\n  float b = positive_angle(a);\\\\n\\\\n  return\\\\n    (b < (      ratio) * HALF_PI) ? 0.0 :\\\\n    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\\\\n    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\\\\n    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\\\\n                                    0.0;\\\\n}\\\\n\\\\nfloat roundTo(float a, float b) {\\\\n  return float(b * floor((a + 0.5 * b) / b));\\\\n}\\\\n\\\\nfloat look_round_n_directions(float a, int n) {\\\\n  float b = positive_angle(a);\\\\n  float div = TWO_PI / float(n);\\\\n  float c = roundTo(b, div);\\\\n  return look_upwards(c);\\\\n}\\\\n\\\\nfloat applyAlignOption(float rawAngle, float delta) {\\\\n  return\\\\n    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions\\\\n    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\\\\n    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis\\\\n    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\\\\n    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal\\\\n                    rawAngle;                // otherwise return back raw input angle\\\\n}\\\\n\\\\nbool isAxisTitle = (axis.x == 0.0) &&\\\\n                   (axis.y == 0.0) &&\\\\n                   (axis.z == 0.0);\\\\n\\\\nvoid main() {\\\\n  //Compute world offset\\\\n  float axisDistance = position.z;\\\\n  vec3 dataPosition = axisDistance * axis + offset;\\\\n\\\\n  float beta = angle; // i.e. user defined attributes for each tick\\\\n\\\\n  float axisAngle;\\\\n  float clipAngle;\\\\n  float flip;\\\\n\\\\n  if (enableAlign) {\\\\n    axisAngle = (isAxisTitle) ? HALF_PI :\\\\n                      computeViewAngle(dataPosition, dataPosition + axis);\\\\n    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\\\\n\\\\n    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\\\\n    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\\\\n\\\\n    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\\\\n                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\\\\n\\\\n    beta += applyAlignOption(clipAngle, flip * PI);\\\\n  }\\\\n\\\\n  //Compute plane offset\\\\n  vec2 planeCoord = position.xy * pixelScale;\\\\n\\\\n  mat2 planeXform = scale * mat2(\\\\n     cos(beta), sin(beta),\\\\n    -sin(beta), cos(beta)\\\\n  );\\\\n\\\\n  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\\\\n\\\\n  //Compute clip position\\\\n  vec3 clipPosition = project(dataPosition);\\\\n\\\\n  //Apply text offset in clip coordinates\\\\n  clipPosition += vec3(viewOffset, 0.0);\\\\n\\\\n  //Done\\\\n  gl_Position = vec4(clipPosition, 1.0);\\\\n}\\\"]),l=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\nuniform vec4 color;\\\\nvoid main() {\\\\n  gl_FragColor = color;\\\\n}\\\"]);r.text=function(t){return i(t,s,l,null,[{name:\\\"position\\\",type:\\\"vec3\\\"}])};var c=n([\\\"#define GLSLIFY 1\\\\nattribute vec3 position;\\\\nattribute vec3 normal;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 enable;\\\\nuniform vec3 bounds[2];\\\\n\\\\nvarying vec3 colorChannel;\\\\n\\\\nvoid main() {\\\\n\\\\n  vec3 signAxis = sign(bounds[1] - bounds[0]);\\\\n\\\\n  vec3 realNormal = signAxis * normal;\\\\n\\\\n  if(dot(realNormal, enable) > 0.0) {\\\\n    vec3 minRange = min(bounds[0], bounds[1]);\\\\n    vec3 maxRange = max(bounds[0], bounds[1]);\\\\n    vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\\\\n    gl_Position = projection * view * model * vec4(nPosition, 1.0);\\\\n  } else {\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  }\\\\n\\\\n  colorChannel = abs(realNormal);\\\\n}\\\"]),u=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform vec4 colors[3];\\\\n\\\\nvarying vec3 colorChannel;\\\\n\\\\nvoid main() {\\\\n  gl_FragColor = colorChannel.x * colors[0] +\\\\n                 colorChannel.y * colors[1] +\\\\n                 colorChannel.z * colors[2];\\\\n}\\\"]);r.bg=function(t){return i(t,c,u,null,[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"}])}},{\\\"gl-shader\\\":288,glslify:392}],227:[function(t,e,r){(function(r){\\\"use strict\\\";e.exports=function(t,e,r,a,s,l){var u=n(t),f=i(t,[{buffer:u,size:3}]),h=o(t);h.attributes.position.location=0;var p=new c(t,h,u,f);return p.update(e,r,a,s,l),p};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"vectorize-text\\\"),o=t(\\\"./shaders\\\").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,f=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){this.gl;var o=[];function s(t,e,r,n){var i=l[r];i||(i=l[r]={});var s=i[e];s||(s=i[e]=function(t,e){try{return a(t,e)}catch(t){return console.warn(\\\"error vectorizing text:\\\",t),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:\\\"center\\\",textBaseline:\\\"middle\\\"}));for(var c=(n||12)/12,u=s.positions,f=s.cells,h=0,p=f.length;h<p;++h)for(var d=f[h],g=2;g>=0;--g){var v=u[d[g]];o.push(c*v[0],-c*v[1],t)}}for(var c=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],p=0;p<3;++p){f[p]=o.length/3|0,s(.5*(t[0][p]+t[1][p]),e[p],r),h[p]=(o.length/3|0)-f[p],c[p]=o.length/3|0;for(var d=0;d<n[p].length;++d)n[p][d].text&&s(n[p][d].x,n[p][d].text,n[p][d].font||i,n[p][d].fontSize||12);u[p]=(o.length/3|0)-c[p]}this.buffer.update(o),this.tickOffset=c,this.tickCount=u,this.labelOffset=f,this.labelCount=h},u.drawTicks=function(t,e,r,n,i,a,o,s){this.tickCount[t]&&(this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t]))},u.drawLabel=function(t,e,r,n,i,a,o,s){this.labelCount[t]&&(this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.labelCount[t],this.labelOffset[t]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this,t(\\\"_process\\\"))},{\\\"./shaders\\\":226,_process:465,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310,\\\"vectorize-text\\\":527}],228:[function(t,e,r){\\\"use strict\\\";function n(t,e){var r=t+\\\"\\\",n=r.indexOf(\\\".\\\"),i=0;n>=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+\\\"\\\";if(s.indexOf(\\\"e\\\")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=\\\"\\\"+l;if(o<0&&(u=\\\"-\\\"+u),i){for(var f=\\\"\\\"+c;f.length<i;)f=\\\"0\\\"+f;return u+\\\".\\\"+f}return u}r.create=function(t,e){for(var r=[],i=0;i<3;++i){for(var a=[],o=(t[0][i],t[1][i],0);o*e[i]<=t[1][i];++o)a.push({x:o*e[i],text:n(e[i],o)});for(var o=-1;o*e[i]>=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;++n){var i=t[r][n],a=e[r][n];if(i.x!==a.x||i.text!==a.text||i.font!==a.font||i.fontColor!==a.fontColor||i.fontSize!==a.fontSize||i.dx!==a.dx||i.dy!==a.dy)return!1}}return!0}},{}],229:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,l,f){var h=e.model||c,p=e.view||c,m=e.projection||c,y=t.bounds,x=(f=f||a(h,p,m,y)).axis;f.edges;o(u,p,h),o(u,m,u);for(var b=g,_=0;_<3;++_)b[_].lo=1/0,b[_].hi=-1/0,b[_].pixelsPerDataUnit=1/0;var w=n(s(u,u));s(u,u);for(var k=0;k<3;++k){var M=(k+1)%3,A=(k+2)%3,T=v;t:for(var _=0;_<2;++_){var S=[];if(x[k]<0!=!!_){T[k]=y[_][k];for(var C=0;C<2;++C){T[M]=y[C^_][M];for(var E=0;E<2;++E)T[A]=y[E^C^_][A],S.push(T.slice())}for(var C=0;C<w.length;++C){if(0===S.length)continue t;S=i.positive(S,w[C])}for(var C=0;C<S.length;++C)for(var A=S[C],L=d(v,u,A,r,l),E=0;E<3;++E)b[E].lo=Math.min(b[E].lo,A[E]),b[E].hi=Math.max(b[E].hi,A[E]),E!==k&&(b[E].pixelsPerDataUnit=Math.min(b[E].pixelsPerDataUnit,Math.abs(L[E])))}}}return b};var n=t(\\\"extract-frustum-planes\\\"),i=t(\\\"split-polygon\\\"),a=t(\\\"./lib/cube.js\\\"),o=t(\\\"gl-mat4/multiply\\\"),s=t(\\\"gl-mat4/transpose\\\"),l=t(\\\"gl-vec4/transformMat4\\\"),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),u=new Float32Array(16);function f(t,e,r){this.lo=t,this.hi=e,this.pixelsPerDataUnit=r}var h=[0,0,0,1],p=[0,0,0,1];function d(t,e,r,n,i){for(var a=0;a<3;++a){for(var o=h,s=p,c=0;c<3;++c)s[c]=o[c]=r[c];s[3]=o[3]=1,s[a]+=1,l(s,s,e),s[3]<0&&(t[a]=1/0),o[a]-=1,l(o,o,e),o[3]<0&&(t[a]=1/0);var u=(o[0]/o[3]-s[0]/s[3])*n,f=(o[1]/o[3]-s[1]/s[3])*i;t[a]=.25*Math.sqrt(u*u+f*f)}return t}var g=[new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0)],v=[0,0,0]},{\\\"./lib/cube.js\\\":224,\\\"extract-frustum-planes\\\":213,\\\"gl-mat4/multiply\\\":256,\\\"gl-mat4/transpose\\\":264,\\\"gl-vec4/transformMat4\\\":381,\\\"split-polygon\\\":503}],230:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"typedarray-pool\\\"),i=t(\\\"ndarray-ops\\\"),a=t(\\\"ndarray\\\"),o=[\\\"uint8\\\",\\\"uint8_clamped\\\",\\\"uint16\\\",\\\"uint32\\\",\\\"int8\\\",\\\"int16\\\",\\\"int32\\\",\\\"float32\\\"];function s(t,e,r,n,i){this.gl=t,this.type=e,this.handle=r,this.length=n,this.usage=i}var l=s.prototype;function c(t,e,r,n,i,a){var o=i.length*i.BYTES_PER_ELEMENT;if(a<0)return t.bufferData(e,i,n),o;if(o+a>r)throw new Error(\\\"gl-buffer: If resizing buffer, must not specify offset\\\");return t.bufferSubData(e,a,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a<i;++a)r[a]=t[a];return r}l.bind=function(){this.gl.bindBuffer(this.type,this.handle)},l.unbind=function(){this.gl.bindBuffer(this.type,null)},l.dispose=function(){this.gl.deleteBuffer(this.handle)},l.update=function(t,e){if(\\\"number\\\"!=typeof e&&(e=-1),this.bind(),\\\"object\\\"==typeof t&&\\\"undefined\\\"!=typeof t.shape){var r=t.dtype;if(o.indexOf(r)<0&&(r=\\\"float32\\\"),this.type===this.gl.ELEMENT_ARRAY_BUFFER)r=gl.getExtension(\\\"OES_element_index_uint\\\")&&\\\"uint16\\\"!==r?\\\"uint32\\\":\\\"uint16\\\";if(r===t.dtype&&function(t,e){for(var r=1,n=e.length-1;n>=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,\\\"uint16\\\"):u(t,\\\"float32\\\"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?f:f.subarray(0,t.length),e),n.free(f)}else if(\\\"object\\\"==typeof t&&\\\"number\\\"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if(\\\"number\\\"!=typeof t&&void 0!==t)throw new Error(\\\"gl-buffer: Invalid data type\\\");if(e>=0)throw new Error(\\\"gl-buffer: Cannot specify offset when resizing buffer\\\");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error(\\\"gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER\\\");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error(\\\"gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW\\\");var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},{ndarray:433,\\\"ndarray-ops\\\":427,\\\"typedarray-pool\\\":522}],231:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-vec3\\\"),i=(t(\\\"gl-vec4\\\"),function(t,e){for(var r=0;r<t.length;r++)if(t[r]>=e)return r-1;return r}),a=n.create(),o=n.create(),s=function(t,e,r){return t<e?e:t>r?r:t},l=function(t,e,r,l){var c=t[0],u=t[1],f=t[2],h=r[0].length,p=r[1].length,d=r[2].length,g=i(r[0],c),v=i(r[1],u),m=i(r[2],f),y=g+1,x=v+1,b=m+1;if(l&&(g=s(g,0,h-1),y=s(y,0,h-1),v=s(v,0,p-1),x=s(x,0,p-1),m=s(m,0,d-1),b=s(b,0,d-1)),g<0||v<0||m<0||y>=h||x>=p||b>=d)return n.create();var _=(c-r[0][g])/(r[0][y]-r[0][g]),w=(u-r[1][v])/(r[1][x]-r[1][v]),k=(f-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var M=m*h*p,A=b*h*p,T=v*h,S=x*h,C=g,E=y,L=e[T+M+C],z=e[T+M+E],O=e[S+M+C],I=e[S+M+E],P=e[T+A+C],D=e[T+A+E],R=e[S+A+C],B=e[S+A+E],F=n.create();return n.lerp(F,L,z,_),n.lerp(a,O,I,_),n.lerp(F,F,a,w),n.lerp(a,P,D,_),n.lerp(o,R,B,_),n.lerp(a,a,o,w),n.lerp(F,F,a,k),F};e.exports=function(t,e){var r;r=t.positions?t.positions:function(t){for(var e=t[0],r=t[1],n=t[2],i=[],a=0;a<n.length;a++)for(var o=0;o<r.length;o++)for(var s=0;s<e.length;s++)i.push([n[a],r[o],e[s]]);return i}(t.meshgrid);var i=t.meshgrid,a=t.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vertexNormals:[],vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),o;for(var s=0,c=1/0,u=-1/0,f=1/0,h=-1/0,p=1/0,d=-1/0,g=null,v=null,m=[],y=1/0,x=0;x<r.length;x++){var b,_=r[x];c=Math.min(_[0],c),u=Math.max(_[0],u),f=Math.min(_[1],f),h=Math.max(_[1],h),p=Math.min(_[2],p),d=Math.max(_[2],d),b=i?l(_,a,i,!0):a[x],n.length(b)>s&&(s=n.length(b)),x&&(y=Math.min(y,2*n.distance(g,_)/(n.length(v)+n.length(b)))),g=_,v=b,m.push(b)}var w=[c,f,p],k=[u,h,d];e&&(e[0]=w,e[1]=k),0===s&&(s=1);var M=1/s;isFinite(y)&&!isNaN(y)||(y=1),o.vectorScale=y;var A=function(t,e,r){var i=n.create();return void 0!==t&&n.set(i,t,e,r),i}(0,1,0),T=t.coneSize||.5;t.absoluteConeSize&&(T=t.absoluteConeSize*M),o.coneScale=T;x=0;for(var S=0;x<r.length;x++)for(var C=(_=r[x])[0],E=_[1],L=_[2],z=m[x],O=n.length(z)*M,I=0;I<8;I++){o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vertexIntensity.push(O,O,O),o.vertexIntensity.push(O,O,O),o.vertexNormals.push(A,A,A),o.vertexNormals.push(A,A,A);var P=o.positions.length;o.cells.push([P-6,P-5,P-4],[P-3,P-2,P-1])}return o},e.exports.createConeMesh=t(\\\"./lib/conemesh\\\")},{\\\"./lib/conemesh\\\":233,\\\"gl-vec3\\\":329,\\\"gl-vec4\\\":365}],232:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"barycentric\\\"),i=t(\\\"polytope-closest-point/lib/closest_point_2d.js\\\");function a(t,e){for(var r=[0,0,0,0],n=0;n<4;++n)for(var i=0;i<4;++i)r[i]+=t[4*n+i]*e[n];return r}function o(t,e,r,n,i){for(var o=a(n,a(r,a(e,[t[0],t[1],t[2],1]))),s=0;s<3;++s)o[s]/=o[3];return[.5*i[0]*(1+o[0]),.5*i[1]*(1-o[1])]}e.exports=function(t,e,r,a,s,l){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),u=0;u<t.length;++u)c[u]=o(t[u],r,a,s,l);for(var f=0,h=1/0,u=0;u<c.length;++u){for(var p=0,d=0;d<2;++d)p+=Math.pow(c[u][d]-e[d],2);p<h&&(h=p,f=u)}for(var g=function(t,e){if(2===t.length){for(var r=0,a=0,o=0;o<2;++o)r+=Math.pow(e[o]-t[0][o],2),a+=Math.pow(e[o]-t[1][o],2);return r=Math.sqrt(r),a=Math.sqrt(a),r+a<1e-6?[1,0]:[a/(r+a),r/(a+r)]}if(3===t.length){var s=[0,0];return i(t[0],t[1],t[2],e,s),n(t,s)}return[]}(c,e),v=0,u=0;u<3;++u){if(g[u]<-.001||g[u]>1.0001)return null;v+=g[u]}if(Math.abs(v-1)>.001)return null;return[f,function(t,e){for(var r=[0,0,0],n=0;n<t.length;++n)for(var i=t[n],a=e[n],o=0;o<3;++o)r[o]+=a*i[o];return r}(t,g),g]}},{barycentric:61,\\\"polytope-closest-point/lib/closest_point_2d.js\\\":464}],233:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"gl-texture2d\\\"),s=t(\\\"normals\\\"),l=t(\\\"gl-mat4/multiply\\\"),c=t(\\\"gl-mat4/invert\\\"),u=t(\\\"ndarray\\\"),f=t(\\\"colormap\\\"),h=t(\\\"simplicial-complex-contour\\\"),p=t(\\\"typedarray-pool\\\"),d=t(\\\"./shaders\\\"),g=(t(\\\"./closest-point\\\"),d.meshShader),v=d.pickShader,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,v,y,x,b,_,w,k,M,A,T,S,C){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleVectors=c,this.triangleColors=f,this.triangleNormals=p,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=g,this.edgeColors=y,this.edgeUVs=x,this.edgeIds=v,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=_,this.pointColors=k,this.pointUVs=M,this.pointSizes=A,this.pointIds=w,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=C,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1]}var x=y.prototype;function b(t){var e=n(t,v.vertex,v.fragment,null,v.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity>=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var c=r[l],u=0;u<2;++u){var f=c[0];2===c.length&&(f=c[u]);for(var d=n[f][0],g=n[f][1],v=i[f],m=1-v,y=this.positions[d],x=this.positions[g],b=0;b<3;++b)o[s++]=v*y[b]+m*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},x.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\\\"contourEnable\\\"in t&&(this.contourEnable=t.contourEnable),\\\"contourColor\\\"in t&&(this.contourColor=t.contourColor),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"lightPosition\\\"in t&&(this.lightPosition=t.lightPosition),\\\"opacity\\\"in t&&(this.opacity=t.opacity),\\\"ambient\\\"in t&&(this.ambientLight=t.ambient),\\\"diffuse\\\"in t&&(this.diffuseLight=t.diffuse),\\\"specular\\\"in t&&(this.specularLight=t.specular),\\\"roughness\\\"in t&&(this.roughness=t.roughness),\\\"fresnel\\\"in t&&(this.fresnel=t.fresnel),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:\\\"rgba\\\"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var a=[],l=[],c=[],h=[],p=[],d=[],g=[],v=[],m=[],y=[],x=[],b=[],_=[],w=[],k=[];this.cells=r,this.positions=n;var M=t.vertexNormals,A=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,S=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!A&&(A=s.faceNormals(r,n,S)),A||M||(M=s.vertexNormals(r,n,T));var C=t.vertexColors,E=t.cellColors,L=t.meshColor||[1,1,1,1],z=t.vertexUVs,O=t.vertexIntensity,I=t.cellUVs,P=t.cellIntensity,D=1/0,R=-1/0;if(!z&&!I)if(O)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],R=+t.vertexIntensityBounds[1];else for(var B=0;B<O.length;++B){var F=O[B];D=Math.min(D,F),R=Math.max(R,F)}else if(P)for(B=0;B<P.length;++B){F=P[B];D=Math.min(D,F),R=Math.max(R,F)}else for(B=0;B<n.length;++B){F=n[B][2];D=Math.min(D,F),R=Math.max(R,F)}this.intensity=O||(P?function(t,e,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=0;var a=t.length;for(i=0;i<a;++i)for(var o=t[i],s=0;s<o.length;++s)n[o[s]]=r[i];return n}(r,n.length,P):function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n));var N=t.pointSizes,j=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(B=0;B<n.length;++B)for(var V=n[B],U=0;U<3;++U)!isNaN(V[U])&&isFinite(V[U])&&(this.bounds[0][U]=Math.min(this.bounds[0][U],V[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],V[U]));var q=0,H=0,G=0;t:for(B=0;B<r.length;++B){var W=r[B];switch(W.length){case 1:for(V=n[X=W[0]],U=0;U<3;++U)if(isNaN(V[U])||!isFinite(V[U]))continue t;x.push(V[0],V[1],V[2],V[3]),3===(Z=C?C[X]:E?E[B]:L).length?b.push(Z[0],Z[1],Z[2],1):b.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],_.push($[0],$[1]),N?w.push(N[X]):w.push(j),k.push(B),G+=1;break;case 2:for(U=0;U<2;++U){V=n[X=W[U]];for(var Y=0;Y<3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t}for(U=0;U<2;++U){V=n[X=W[U]];g.push(V[0],V[1],V[2]),3===(Z=C?C[X]:E?E[B]:L).length?v.push(Z[0],Z[1],Z[2],1):v.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],m.push($[0],$[1]),y.push(B)}H+=1;break;case 3:for(U=0;U<3;++U)for(V=n[X=W[U]],Y=0;Y<3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t;for(U=0;U<3;++U){var X;V=n[X=W[U]];a.push(V[0],V[1],V[2],V[3]);var Z,$,J,K=i[X];l.push(K[0],K[1],K[2]),3===(Z=C?C[X]:E?E[B]:L).length?c.push(Z[0],Z[1],Z[2],1):c.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],p.push($[0],$[1]),J=M?M[X]:A[B],h.push(J[0],J[1],J[2]),d.push(B)}q+=1}}this.pointCount=G,this.edgeCount=H,this.triangleCount=q,this.pointPositions.update(x),this.pointColors.update(b),this.pointUVs.update(_),this.pointSizes.update(w),this.pointIds.update(new Uint32Array(k)),this.edgePositions.update(g),this.edgeColors.update(v),this.edgeUVs.update(m),this.edgeIds.update(new Uint32Array(y)),this.trianglePositions.update(a),this.triangleVectors.update(l),this.triangleColors.update(c),this.triangleUVs.update(p),this.triangleNormals.update(h),this.triangleIds.update(new Uint32Array(d))}},x.drawTransparent=x.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o<3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o<3;++o){for(var p=u[12+o],d=0;d<3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount>0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:Math.floor(r[1]/48),position:n,dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),f=i(t),h=i(t),p=i(t),d=i(t),v=i(t),m=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:h,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:f,type:t.FLOAT,size:3}]),x=i(t),_=i(t),w=i(t),k=i(t),M=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),T=i(t),S=i(t),C=i(t),E=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:E,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:T,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:C,type:t.FLOAT,size:1}]),z=i(t),O=new y(t,l,r,null,null,s,null,null,c,f,v,h,p,d,m,x,k,_,w,M,A,E,T,S,C,L,z,a(t,[{buffer:z,type:t.FLOAT,size:3}]));return O.update(e),O}},{\\\"./closest-point\\\":232,\\\"./shaders\\\":234,colormap:114,\\\"gl-buffer\\\":230,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"gl-shader\\\":288,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,ndarray:433,normals:436,\\\"simplicial-complex-contour\\\":494,\\\"typedarray-pool\\\":522}],234:[function(t,e,r){var n=t(\\\"glslify\\\"),i=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat inverse(float m) {\\\\n  return 1.0 / m;\\\\n}\\\\n\\\\nmat2 inverse(mat2 m) {\\\\n  return mat2(m[1][1],-m[0][1],\\\\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\\\\n}\\\\n\\\\nmat3 inverse(mat3 m) {\\\\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\\\\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\\\\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\\\\n\\\\n  float b01 = a22 * a11 - a12 * a21;\\\\n  float b11 = -a22 * a10 + a12 * a20;\\\\n  float b21 = a21 * a10 - a11 * a20;\\\\n\\\\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\\\\n\\\\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\\\\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\\\\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\\\\n}\\\\n\\\\nmat4 inverse(mat4 m) {\\\\n  float\\\\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\\\\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\\\\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\\\\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\\\\n\\\\n      b00 = a00 * a11 - a01 * a10,\\\\n      b01 = a00 * a12 - a02 * a10,\\\\n      b02 = a00 * a13 - a03 * a10,\\\\n      b03 = a01 * a12 - a02 * a11,\\\\n      b04 = a01 * a13 - a03 * a11,\\\\n      b05 = a02 * a13 - a03 * a12,\\\\n      b06 = a20 * a31 - a21 * a30,\\\\n      b07 = a20 * a32 - a22 * a30,\\\\n      b08 = a20 * a33 - a23 * a30,\\\\n      b09 = a21 * a32 - a22 * a31,\\\\n      b10 = a21 * a33 - a23 * a31,\\\\n      b11 = a22 * a33 - a23 * a32,\\\\n\\\\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\\\\n\\\\n  return mat4(\\\\n      a11 * b11 - a12 * b10 + a13 * b09,\\\\n      a02 * b10 - a01 * b11 - a03 * b09,\\\\n      a31 * b05 - a32 * b04 + a33 * b03,\\\\n      a22 * b04 - a21 * b05 - a23 * b03,\\\\n      a12 * b08 - a10 * b11 - a13 * b07,\\\\n      a00 * b11 - a02 * b08 + a03 * b07,\\\\n      a32 * b02 - a30 * b05 - a33 * b01,\\\\n      a20 * b05 - a22 * b02 + a23 * b01,\\\\n      a10 * b10 - a11 * b08 + a13 * b06,\\\\n      a01 * b08 - a00 * b10 - a03 * b06,\\\\n      a30 * b04 - a31 * b02 + a33 * b00,\\\\n      a21 * b02 - a20 * b04 - a23 * b00,\\\\n      a11 * b07 - a10 * b09 - a12 * b06,\\\\n      a00 * b09 - a01 * b07 + a02 * b06,\\\\n      a31 * b01 - a30 * b03 - a32 * b00,\\\\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\\\\n}\\\\n\\\\nvec3 getOrthogonalVector(vec3 v) {\\\\n  // Return up-vector for only-z vector.\\\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\\\n  // Assign z = 0, x = -b, y = a:\\\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\\\n    return normalize(vec3(-v.y, v.x, 0.0));\\\\n  } else {\\\\n    return normalize(vec3(0.0, v.z, -v.y));\\\\n  }\\\\n}\\\\n\\\\n// Calculate the cone vertex and normal at the given index.\\\\n//\\\\n// The returned vertex is for a cone with its top at origin and height of 1.0,\\\\n// pointing in the direction of the vector attribute.\\\\n//\\\\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\\\\n// These vertices are used to make up the triangles of the cone by the following:\\\\n//   segment + 0 top vertex\\\\n//   segment + 1 perimeter vertex a+1\\\\n//   segment + 2 perimeter vertex a\\\\n//   segment + 3 center base vertex\\\\n//   segment + 4 perimeter vertex a\\\\n//   segment + 5 perimeter vertex a+1\\\\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\\\\n// To go from index to segment, floor(index / 6)\\\\n// To go from segment to angle, 2*pi * (segment/segmentCount)\\\\n// To go from index to segment index, index - (segment*6)\\\\n//\\\\nvec3 getConePosition(vec3 d, float index, float coneOffset, out vec3 normal) {\\\\n\\\\n  const float segmentCount = 8.0;\\\\n\\\\n  index = mod(index, segmentCount * 6.0);\\\\n\\\\n  float segment = floor(index/6.0);\\\\n  float segmentIndex = index - (segment*6.0);\\\\n\\\\n  normal = -normalize(d);\\\\n\\\\n  if (segmentIndex == 3.0) {\\\\n    return mix(vec3(0.0), -d, coneOffset);\\\\n  }\\\\n\\\\n  // angle = 2pi * ((segment + ((segmentIndex == 1.0 || segmentIndex == 5.0) ? 1.0 : 0.0)) / segmentCount)\\\\n  float nextAngle = float(segmentIndex == 1.0 || segmentIndex == 5.0);\\\\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\\\\n\\\\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\\\\n  vec3 v2 = v1 - d;\\\\n\\\\n  vec3 u = getOrthogonalVector(d);\\\\n  vec3 v = normalize(cross(u, d));\\\\n\\\\n  vec3 x = u * cos(angle) * length(d)*0.25;\\\\n  vec3 y = v * sin(angle) * length(d)*0.25;\\\\n  vec3 v3 = v2 + x + y;\\\\n  if (segmentIndex <= 2.0) {\\\\n    vec3 tx = u * sin(angle);\\\\n    vec3 ty = v * -cos(angle);\\\\n    vec3 tangent = tx + ty;\\\\n    normal = normalize(cross(v3 - v1, tangent));\\\\n  }\\\\n\\\\n  if (segmentIndex == 0.0) {\\\\n    return mix(d, vec3(0.0), coneOffset);\\\\n  }\\\\n  return v3;\\\\n}\\\\n\\\\nattribute vec3 vector;\\\\nattribute vec4 color, position;\\\\nattribute vec2 uv;\\\\nuniform float vectorScale;\\\\nuniform float coneScale;\\\\n\\\\nuniform float coneOffset;\\\\n\\\\nuniform mat4 model\\\\n           , view\\\\n           , projection;\\\\nuniform vec3 eyePosition\\\\n           , lightPosition;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data\\\\n           , f_position;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  // Scale the vector magnitude to stay constant with\\\\n  // model & view changes.\\\\n  vec3 normal;\\\\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\\\\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\\\n  normal = normalize(normal * inverse(mat3(model)));\\\\n\\\\n  // vec4 m_position  = model * vec4(conePosition, 1.0);\\\\n  vec4 t_position  = view * conePosition;\\\\n  gl_Position      = projection * t_position;\\\\n  f_color          = color; //vec4(position.w, color.r, 0, 0);\\\\n  f_normal         = normal;\\\\n  f_data           = conePosition.xyz;\\\\n  f_position       = position.xyz;\\\\n  f_eyeDirection   = eyePosition   - conePosition.xyz;\\\\n  f_lightDirection = lightPosition - conePosition.xyz;\\\\n  f_uv             = uv;\\\\n}\\\\n\\\"]),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat beckmannDistribution(float x, float roughness) {\\\\n  float NdotH = max(x, 0.0001);\\\\n  float cos2Alpha = NdotH * NdotH;\\\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\\\n  float roughness2 = roughness * roughness;\\\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\\\n  return exp(tan2Alpha / roughness2) / denom;\\\\n}\\\\n\\\\nfloat cookTorranceSpecular(\\\\n  vec3 lightDirection,\\\\n  vec3 viewDirection,\\\\n  vec3 surfaceNormal,\\\\n  float roughness,\\\\n  float fresnel) {\\\\n\\\\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\\\\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\\\\n\\\\n  //Half angle vector\\\\n  vec3 H = normalize(lightDirection + viewDirection);\\\\n\\\\n  //Geometric term\\\\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\\\\n  float VdotH = max(dot(viewDirection, H), 0.000001);\\\\n  float LdotH = max(dot(lightDirection, H), 0.000001);\\\\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\\\\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\\\\n  float G = min(1.0, min(G1, G2));\\\\n  \\\\n  //Distribution term\\\\n  float D = beckmannDistribution(NdotH, roughness);\\\\n\\\\n  //Fresnel term\\\\n  float F = pow(1.0 - VdotN, fresnel);\\\\n\\\\n  //Multiply terms and done\\\\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform float roughness\\\\n            , fresnel\\\\n            , kambient\\\\n            , kdiffuse\\\\n            , kspecular\\\\n            , opacity;\\\\nuniform sampler2D texture;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data\\\\n           , f_position;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  vec3 N = normalize(f_normal);\\\\n  vec3 L = normalize(f_lightDirection);\\\\n  vec3 V = normalize(f_eyeDirection);\\\\n\\\\n  if(!gl_FrontFacing) {\\\\n    N = -N;\\\\n  }\\\\n\\\\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\\\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\\\n\\\\n  vec4 surfaceColor =  texture2D(texture, f_uv);\\\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\\\n\\\\n  gl_FragColor = litColor * opacity;\\\\n}\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvec3 getOrthogonalVector(vec3 v) {\\\\n  // Return up-vector for only-z vector.\\\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\\\n  // Assign z = 0, x = -b, y = a:\\\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\\\n    return normalize(vec3(-v.y, v.x, 0.0));\\\\n  } else {\\\\n    return normalize(vec3(0.0, v.z, -v.y));\\\\n  }\\\\n}\\\\n\\\\n// Calculate the cone vertex and normal at the given index.\\\\n//\\\\n// The returned vertex is for a cone with its top at origin and height of 1.0,\\\\n// pointing in the direction of the vector attribute.\\\\n//\\\\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\\\\n// These vertices are used to make up the triangles of the cone by the following:\\\\n//   segment + 0 top vertex\\\\n//   segment + 1 perimeter vertex a+1\\\\n//   segment + 2 perimeter vertex a\\\\n//   segment + 3 center base vertex\\\\n//   segment + 4 perimeter vertex a\\\\n//   segment + 5 perimeter vertex a+1\\\\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\\\\n// To go from index to segment, floor(index / 6)\\\\n// To go from segment to angle, 2*pi * (segment/segmentCount)\\\\n// To go from index to segment index, index - (segment*6)\\\\n//\\\\nvec3 getConePosition(vec3 d, float index, float coneOffset, out vec3 normal) {\\\\n\\\\n  const float segmentCount = 8.0;\\\\n\\\\n  index = mod(index, segmentCount * 6.0);\\\\n\\\\n  float segment = floor(index/6.0);\\\\n  float segmentIndex = index - (segment*6.0);\\\\n\\\\n  normal = -normalize(d);\\\\n\\\\n  if (segmentIndex == 3.0) {\\\\n    return mix(vec3(0.0), -d, coneOffset);\\\\n  }\\\\n\\\\n  // angle = 2pi * ((segment + ((segmentIndex == 1.0 || segmentIndex == 5.0) ? 1.0 : 0.0)) / segmentCount)\\\\n  float nextAngle = float(segmentIndex == 1.0 || segmentIndex == 5.0);\\\\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\\\\n\\\\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\\\\n  vec3 v2 = v1 - d;\\\\n\\\\n  vec3 u = getOrthogonalVector(d);\\\\n  vec3 v = normalize(cross(u, d));\\\\n\\\\n  vec3 x = u * cos(angle) * length(d)*0.25;\\\\n  vec3 y = v * sin(angle) * length(d)*0.25;\\\\n  vec3 v3 = v2 + x + y;\\\\n  if (segmentIndex <= 2.0) {\\\\n    vec3 tx = u * sin(angle);\\\\n    vec3 ty = v * -cos(angle);\\\\n    vec3 tangent = tx + ty;\\\\n    normal = normalize(cross(v3 - v1, tangent));\\\\n  }\\\\n\\\\n  if (segmentIndex == 0.0) {\\\\n    return mix(d, vec3(0.0), coneOffset);\\\\n  }\\\\n  return v3;\\\\n}\\\\n\\\\nattribute vec3 vector;\\\\nattribute vec4 position;\\\\nattribute vec4 id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\n\\\\nuniform float vectorScale;\\\\nuniform float coneScale;\\\\nuniform float coneOffset;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  vec3 normal;\\\\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\\\\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\\\n  gl_Position = projection * view * conePosition;\\\\n  f_id        = id;\\\\n  f_position  = position.xyz;\\\\n}\\\\n\\\"]),s=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3  clipBounds[2];\\\\nuniform float pickId;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\\\n}\\\"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:\\\"position\\\",type:\\\"vec4\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"},{name:\\\"vector\\\",type:\\\"vec3\\\"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:\\\"position\\\",type:\\\"vec4\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"},{name:\\\"vector\\\",type:\\\"vec3\\\"}]}},{glslify:392}],235:[function(t,e,r){e.exports={0:\\\"NONE\\\",1:\\\"ONE\\\",2:\\\"LINE_LOOP\\\",3:\\\"LINE_STRIP\\\",4:\\\"TRIANGLES\\\",5:\\\"TRIANGLE_STRIP\\\",6:\\\"TRIANGLE_FAN\\\",256:\\\"DEPTH_BUFFER_BIT\\\",512:\\\"NEVER\\\",513:\\\"LESS\\\",514:\\\"EQUAL\\\",515:\\\"LEQUAL\\\",516:\\\"GREATER\\\",517:\\\"NOTEQUAL\\\",518:\\\"GEQUAL\\\",519:\\\"ALWAYS\\\",768:\\\"SRC_COLOR\\\",769:\\\"ONE_MINUS_SRC_COLOR\\\",770:\\\"SRC_ALPHA\\\",771:\\\"ONE_MINUS_SRC_ALPHA\\\",772:\\\"DST_ALPHA\\\",773:\\\"ONE_MINUS_DST_ALPHA\\\",774:\\\"DST_COLOR\\\",775:\\\"ONE_MINUS_DST_COLOR\\\",776:\\\"SRC_ALPHA_SATURATE\\\",1024:\\\"STENCIL_BUFFER_BIT\\\",1028:\\\"FRONT\\\",1029:\\\"BACK\\\",1032:\\\"FRONT_AND_BACK\\\",1280:\\\"INVALID_ENUM\\\",1281:\\\"INVALID_VALUE\\\",1282:\\\"INVALID_OPERATION\\\",1285:\\\"OUT_OF_MEMORY\\\",1286:\\\"INVALID_FRAMEBUFFER_OPERATION\\\",2304:\\\"CW\\\",2305:\\\"CCW\\\",2849:\\\"LINE_WIDTH\\\",2884:\\\"CULL_FACE\\\",2885:\\\"CULL_FACE_MODE\\\",2886:\\\"FRONT_FACE\\\",2928:\\\"DEPTH_RANGE\\\",2929:\\\"DEPTH_TEST\\\",2930:\\\"DEPTH_WRITEMASK\\\",2931:\\\"DEPTH_CLEAR_VALUE\\\",2932:\\\"DEPTH_FUNC\\\",2960:\\\"STENCIL_TEST\\\",2961:\\\"STENCIL_CLEAR_VALUE\\\",2962:\\\"STENCIL_FUNC\\\",2963:\\\"STENCIL_VALUE_MASK\\\",2964:\\\"STENCIL_FAIL\\\",2965:\\\"STENCIL_PASS_DEPTH_FAIL\\\",2966:\\\"STENCIL_PASS_DEPTH_PASS\\\",2967:\\\"STENCIL_REF\\\",2968:\\\"STENCIL_WRITEMASK\\\",2978:\\\"VIEWPORT\\\",3024:\\\"DITHER\\\",3042:\\\"BLEND\\\",3088:\\\"SCISSOR_BOX\\\",3089:\\\"SCISSOR_TEST\\\",3106:\\\"COLOR_CLEAR_VALUE\\\",3107:\\\"COLOR_WRITEMASK\\\",3317:\\\"UNPACK_ALIGNMENT\\\",3333:\\\"PACK_ALIGNMENT\\\",3379:\\\"MAX_TEXTURE_SIZE\\\",3386:\\\"MAX_VIEWPORT_DIMS\\\",3408:\\\"SUBPIXEL_BITS\\\",3410:\\\"RED_BITS\\\",3411:\\\"GREEN_BITS\\\",3412:\\\"BLUE_BITS\\\",3413:\\\"ALPHA_BITS\\\",3414:\\\"DEPTH_BITS\\\",3415:\\\"STENCIL_BITS\\\",3553:\\\"TEXTURE_2D\\\",4352:\\\"DONT_CARE\\\",4353:\\\"FASTEST\\\",4354:\\\"NICEST\\\",5120:\\\"BYTE\\\",5121:\\\"UNSIGNED_BYTE\\\",5122:\\\"SHORT\\\",5123:\\\"UNSIGNED_SHORT\\\",5124:\\\"INT\\\",5125:\\\"UNSIGNED_INT\\\",5126:\\\"FLOAT\\\",5386:\\\"INVERT\\\",5890:\\\"TEXTURE\\\",6401:\\\"STENCIL_INDEX\\\",6402:\\\"DEPTH_COMPONENT\\\",6406:\\\"ALPHA\\\",6407:\\\"RGB\\\",6408:\\\"RGBA\\\",6409:\\\"LUMINANCE\\\",6410:\\\"LUMINANCE_ALPHA\\\",7680:\\\"KEEP\\\",7681:\\\"REPLACE\\\",7682:\\\"INCR\\\",7683:\\\"DECR\\\",7936:\\\"VENDOR\\\",7937:\\\"RENDERER\\\",7938:\\\"VERSION\\\",9728:\\\"NEAREST\\\",9729:\\\"LINEAR\\\",9984:\\\"NEAREST_MIPMAP_NEAREST\\\",9985:\\\"LINEAR_MIPMAP_NEAREST\\\",9986:\\\"NEAREST_MIPMAP_LINEAR\\\",9987:\\\"LINEAR_MIPMAP_LINEAR\\\",10240:\\\"TEXTURE_MAG_FILTER\\\",10241:\\\"TEXTURE_MIN_FILTER\\\",10242:\\\"TEXTURE_WRAP_S\\\",10243:\\\"TEXTURE_WRAP_T\\\",10497:\\\"REPEAT\\\",10752:\\\"POLYGON_OFFSET_UNITS\\\",16384:\\\"COLOR_BUFFER_BIT\\\",32769:\\\"CONSTANT_COLOR\\\",32770:\\\"ONE_MINUS_CONSTANT_COLOR\\\",32771:\\\"CONSTANT_ALPHA\\\",32772:\\\"ONE_MINUS_CONSTANT_ALPHA\\\",32773:\\\"BLEND_COLOR\\\",32774:\\\"FUNC_ADD\\\",32777:\\\"BLEND_EQUATION_RGB\\\",32778:\\\"FUNC_SUBTRACT\\\",32779:\\\"FUNC_REVERSE_SUBTRACT\\\",32819:\\\"UNSIGNED_SHORT_4_4_4_4\\\",32820:\\\"UNSIGNED_SHORT_5_5_5_1\\\",32823:\\\"POLYGON_OFFSET_FILL\\\",32824:\\\"POLYGON_OFFSET_FACTOR\\\",32854:\\\"RGBA4\\\",32855:\\\"RGB5_A1\\\",32873:\\\"TEXTURE_BINDING_2D\\\",32926:\\\"SAMPLE_ALPHA_TO_COVERAGE\\\",32928:\\\"SAMPLE_COVERAGE\\\",32936:\\\"SAMPLE_BUFFERS\\\",32937:\\\"SAMPLES\\\",32938:\\\"SAMPLE_COVERAGE_VALUE\\\",32939:\\\"SAMPLE_COVERAGE_INVERT\\\",32968:\\\"BLEND_DST_RGB\\\",32969:\\\"BLEND_SRC_RGB\\\",32970:\\\"BLEND_DST_ALPHA\\\",32971:\\\"BLEND_SRC_ALPHA\\\",33071:\\\"CLAMP_TO_EDGE\\\",33170:\\\"GENERATE_MIPMAP_HINT\\\",33189:\\\"DEPTH_COMPONENT16\\\",33306:\\\"DEPTH_STENCIL_ATTACHMENT\\\",33635:\\\"UNSIGNED_SHORT_5_6_5\\\",33648:\\\"MIRRORED_REPEAT\\\",33901:\\\"ALIASED_POINT_SIZE_RANGE\\\",33902:\\\"ALIASED_LINE_WIDTH_RANGE\\\",33984:\\\"TEXTURE0\\\",33985:\\\"TEXTURE1\\\",33986:\\\"TEXTURE2\\\",33987:\\\"TEXTURE3\\\",33988:\\\"TEXTURE4\\\",33989:\\\"TEXTURE5\\\",33990:\\\"TEXTURE6\\\",33991:\\\"TEXTURE7\\\",33992:\\\"TEXTURE8\\\",33993:\\\"TEXTURE9\\\",33994:\\\"TEXTURE10\\\",33995:\\\"TEXTURE11\\\",33996:\\\"TEXTURE12\\\",33997:\\\"TEXTURE13\\\",33998:\\\"TEXTURE14\\\",33999:\\\"TEXTURE15\\\",34000:\\\"TEXTURE16\\\",34001:\\\"TEXTURE17\\\",34002:\\\"TEXTURE18\\\",34003:\\\"TEXTURE19\\\",34004:\\\"TEXTURE20\\\",34005:\\\"TEXTURE21\\\",34006:\\\"TEXTURE22\\\",34007:\\\"TEXTURE23\\\",34008:\\\"TEXTURE24\\\",34009:\\\"TEXTURE25\\\",34010:\\\"TEXTURE26\\\",34011:\\\"TEXTURE27\\\",34012:\\\"TEXTURE28\\\",34013:\\\"TEXTURE29\\\",34014:\\\"TEXTURE30\\\",34015:\\\"TEXTURE31\\\",34016:\\\"ACTIVE_TEXTURE\\\",34024:\\\"MAX_RENDERBUFFER_SIZE\\\",34041:\\\"DEPTH_STENCIL\\\",34055:\\\"INCR_WRAP\\\",34056:\\\"DECR_WRAP\\\",34067:\\\"TEXTURE_CUBE_MAP\\\",34068:\\\"TEXTURE_BINDING_CUBE_MAP\\\",34069:\\\"TEXTURE_CUBE_MAP_POSITIVE_X\\\",34070:\\\"TEXTURE_CUBE_MAP_NEGATIVE_X\\\",34071:\\\"TEXTURE_CUBE_MAP_POSITIVE_Y\\\",34072:\\\"TEXTURE_CUBE_MAP_NEGATIVE_Y\\\",34073:\\\"TEXTURE_CUBE_MAP_POSITIVE_Z\\\",34074:\\\"TEXTURE_CUBE_MAP_NEGATIVE_Z\\\",34076:\\\"MAX_CUBE_MAP_TEXTURE_SIZE\\\",34338:\\\"VERTEX_ATTRIB_ARRAY_ENABLED\\\",34339:\\\"VERTEX_ATTRIB_ARRAY_SIZE\\\",34340:\\\"VERTEX_ATTRIB_ARRAY_STRIDE\\\",34341:\\\"VERTEX_ATTRIB_ARRAY_TYPE\\\",34342:\\\"CURRENT_VERTEX_ATTRIB\\\",34373:\\\"VERTEX_ATTRIB_ARRAY_POINTER\\\",34466:\\\"NUM_COMPRESSED_TEXTURE_FORMATS\\\",34467:\\\"COMPRESSED_TEXTURE_FORMATS\\\",34660:\\\"BUFFER_SIZE\\\",34661:\\\"BUFFER_USAGE\\\",34816:\\\"STENCIL_BACK_FUNC\\\",34817:\\\"STENCIL_BACK_FAIL\\\",34818:\\\"STENCIL_BACK_PASS_DEPTH_FAIL\\\",34819:\\\"STENCIL_BACK_PASS_DEPTH_PASS\\\",34877:\\\"BLEND_EQUATION_ALPHA\\\",34921:\\\"MAX_VERTEX_ATTRIBS\\\",34922:\\\"VERTEX_ATTRIB_ARRAY_NORMALIZED\\\",34930:\\\"MAX_TEXTURE_IMAGE_UNITS\\\",34962:\\\"ARRAY_BUFFER\\\",34963:\\\"ELEMENT_ARRAY_BUFFER\\\",34964:\\\"ARRAY_BUFFER_BINDING\\\",34965:\\\"ELEMENT_ARRAY_BUFFER_BINDING\\\",34975:\\\"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\\\",35040:\\\"STREAM_DRAW\\\",35044:\\\"STATIC_DRAW\\\",35048:\\\"DYNAMIC_DRAW\\\",35632:\\\"FRAGMENT_SHADER\\\",35633:\\\"VERTEX_SHADER\\\",35660:\\\"MAX_VERTEX_TEXTURE_IMAGE_UNITS\\\",35661:\\\"MAX_COMBINED_TEXTURE_IMAGE_UNITS\\\",35663:\\\"SHADER_TYPE\\\",35664:\\\"FLOAT_VEC2\\\",35665:\\\"FLOAT_VEC3\\\",35666:\\\"FLOAT_VEC4\\\",35667:\\\"INT_VEC2\\\",35668:\\\"INT_VEC3\\\",35669:\\\"INT_VEC4\\\",35670:\\\"BOOL\\\",35671:\\\"BOOL_VEC2\\\",35672:\\\"BOOL_VEC3\\\",35673:\\\"BOOL_VEC4\\\",35674:\\\"FLOAT_MAT2\\\",35675:\\\"FLOAT_MAT3\\\",35676:\\\"FLOAT_MAT4\\\",35678:\\\"SAMPLER_2D\\\",35680:\\\"SAMPLER_CUBE\\\",35712:\\\"DELETE_STATUS\\\",35713:\\\"COMPILE_STATUS\\\",35714:\\\"LINK_STATUS\\\",35715:\\\"VALIDATE_STATUS\\\",35716:\\\"INFO_LOG_LENGTH\\\",35717:\\\"ATTACHED_SHADERS\\\",35718:\\\"ACTIVE_UNIFORMS\\\",35719:\\\"ACTIVE_UNIFORM_MAX_LENGTH\\\",35720:\\\"SHADER_SOURCE_LENGTH\\\",35721:\\\"ACTIVE_ATTRIBUTES\\\",35722:\\\"ACTIVE_ATTRIBUTE_MAX_LENGTH\\\",35724:\\\"SHADING_LANGUAGE_VERSION\\\",35725:\\\"CURRENT_PROGRAM\\\",36003:\\\"STENCIL_BACK_REF\\\",36004:\\\"STENCIL_BACK_VALUE_MASK\\\",36005:\\\"STENCIL_BACK_WRITEMASK\\\",36006:\\\"FRAMEBUFFER_BINDING\\\",36007:\\\"RENDERBUFFER_BINDING\\\",36048:\\\"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\\\",36049:\\\"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\\\",36050:\\\"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\\\",36051:\\\"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\\\",36053:\\\"FRAMEBUFFER_COMPLETE\\\",36054:\\\"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\\\",36055:\\\"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\\\",36057:\\\"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\\\",36061:\\\"FRAMEBUFFER_UNSUPPORTED\\\",36064:\\\"COLOR_ATTACHMENT0\\\",36096:\\\"DEPTH_ATTACHMENT\\\",36128:\\\"STENCIL_ATTACHMENT\\\",36160:\\\"FRAMEBUFFER\\\",36161:\\\"RENDERBUFFER\\\",36162:\\\"RENDERBUFFER_WIDTH\\\",36163:\\\"RENDERBUFFER_HEIGHT\\\",36164:\\\"RENDERBUFFER_INTERNAL_FORMAT\\\",36168:\\\"STENCIL_INDEX8\\\",36176:\\\"RENDERBUFFER_RED_SIZE\\\",36177:\\\"RENDERBUFFER_GREEN_SIZE\\\",36178:\\\"RENDERBUFFER_BLUE_SIZE\\\",36179:\\\"RENDERBUFFER_ALPHA_SIZE\\\",36180:\\\"RENDERBUFFER_DEPTH_SIZE\\\",36181:\\\"RENDERBUFFER_STENCIL_SIZE\\\",36194:\\\"RGB565\\\",36336:\\\"LOW_FLOAT\\\",36337:\\\"MEDIUM_FLOAT\\\",36338:\\\"HIGH_FLOAT\\\",36339:\\\"LOW_INT\\\",36340:\\\"MEDIUM_INT\\\",36341:\\\"HIGH_INT\\\",36346:\\\"SHADER_COMPILER\\\",36347:\\\"MAX_VERTEX_UNIFORM_VECTORS\\\",36348:\\\"MAX_VARYING_VECTORS\\\",36349:\\\"MAX_FRAGMENT_UNIFORM_VECTORS\\\",37440:\\\"UNPACK_FLIP_Y_WEBGL\\\",37441:\\\"UNPACK_PREMULTIPLY_ALPHA_WEBGL\\\",37442:\\\"CONTEXT_LOST_WEBGL\\\",37443:\\\"UNPACK_COLORSPACE_CONVERSION_WEBGL\\\",37444:\\\"BROWSER_DEFAULT_WEBGL\\\"}},{}],236:[function(t,e,r){var n=t(\\\"./1.0/numbers\\\");e.exports=function(t){return n[t]}},{\\\"./1.0/numbers\\\":235}],237:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"./shaders/index\\\"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return this.opacity>=1},l.isTransparent=function(){return this.opacity<1},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f<3;++f)e.lineWidth(this.lineWidth[f]),r.capSize=this.capSize[f]*u,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=u[n],a=0;a<i.length;++a){var o=i[a];t.push(e[0],e[1],e[2],r[0],r[1],r[2],r[3],o[0],o[1],o[2])}return i.length}l.update=function(t){\\\"lineWidth\\\"in(t=t||{})&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),\\\"capSize\\\"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),\\\"opacity\\\"in t&&(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var i=[],a=r.length,o=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var s=0;s<3;++s){this.lineOffset[s]=o;t:for(var l=0;l<a;++l){for(var u=r[l],h=0;h<3;++h)if(isNaN(u[h])||!isFinite(u[h]))continue t;var p=n[l],d=e[s];if(Array.isArray(d[0])&&(d=e[l]),3===d.length&&(d=[d[0],d[1],d[2],1]),!isNaN(p[0][s])&&!isNaN(p[1][s])){var g;if(p[0][s]<0)(g=u.slice())[s]+=p[0][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+f(i,g,d,s);if(p[1][s]>0)(g=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+f(i,g,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{\\\"./shaders/index\\\":238,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310}],238:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position, offset;\\\\nattribute vec4 color;\\\\nuniform mat4 model, view, projection;\\\\nuniform float capSize;\\\\nvarying vec4 fragColor;\\\\nvarying vec3 fragPosition;\\\\n\\\\nvoid main() {\\\\n  vec4 worldPosition  = model * vec4(position, 1.0);\\\\n  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\\\\n  gl_Position         = projection * view * worldPosition;\\\\n  fragColor           = color;\\\\n  fragPosition        = position;\\\\n}\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform float opacity;\\\\nvarying vec3 fragPosition;\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], fragPosition)) discard;\\\\n\\\\n  gl_FragColor = opacity * fragColor;\\\\n}\\\"]);e.exports=function(t){return i(t,a,o,null,[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"offset\\\",type:\\\"vec3\\\"}])}},{\\\"gl-shader\\\":288,glslify:392}],239:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-texture2d\\\");e.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension(\\\"WEBGL_draw_buffers\\\");!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a<n;++a)i[a]=t.COLOR_ATTACHMENT0+a;for(var a=n;a<r;++a)i[a]=t.NONE;l[n]=i}}(t,c);Array.isArray(e)&&(n=r,r=0|e[1],e=0|e[0]);if(\\\"number\\\"!=typeof e)throw new Error(\\\"gl-fbo: Missing shape parameter\\\");var u=t.getParameter(t.MAX_RENDERBUFFER_SIZE);if(e<0||e>u||r<0||r>u)throw new Error(\\\"gl-fbo: Parameters are too large for FBO\\\");var f=1;if(\\\"color\\\"in(n=n||{})){if((f=Math.max(0|n.color,0))<0)throw new Error(\\\"gl-fbo: Must specify a nonnegative number of colors\\\");if(f>1){if(!c)throw new Error(\\\"gl-fbo: Multiple draw buffer extension not supported\\\");if(f>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error(\\\"gl-fbo: Context does not support \\\"+f+\\\" draw buffers\\\")}}var h=t.UNSIGNED_BYTE,p=t.getExtension(\\\"OES_texture_float\\\");if(n.float&&f>0){if(!p)throw new Error(\\\"gl-fbo: Context does not support floating point textures\\\");h=t.FLOAT}else n.preferFloat&&f>0&&p&&(h=t.FLOAT);var g=!0;\\\"depth\\\"in n&&(g=!!n.depth);var v=!1;\\\"stencil\\\"in n&&(v=!!n.stencil);return new d(t,e,r,h,f,g,v,c)};var i,a,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case i:throw new Error(\\\"gl-fbo: Framebuffer unsupported\\\");case a:throw new Error(\\\"gl-fbo: Framebuffer incomplete attachment\\\");case o:throw new Error(\\\"gl-fbo: Framebuffer incomplete dimensions\\\");case s:throw new Error(\\\"gl-fbo: Framebuffer incomplete missing attachment\\\");default:throw new Error(\\\"gl-fbo: Framebuffer failed for unspecified reason\\\")}}function h(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d<i;++d)this.color[d]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=n,this._useDepth=a,this._useStencil=o;var g=this,v=[0|e,0|r];Object.defineProperties(v,{0:{get:function(){return g._shape[0]},set:function(t){return g.width=t}},1:{get:function(){return g._shape[1]},set:function(t){return g.height=t}}}),this._shapeVector=v,function(t){var e=c(t.gl),r=t.gl,n=t.handle=r.createFramebuffer(),i=t._shape[0],a=t._shape[1],o=t.color.length,s=t._ext,d=t._useStencil,g=t._useDepth,v=t._colorType;r.bindFramebuffer(r.FRAMEBUFFER,n);for(var m=0;m<o;++m)t.color[m]=h(r,i,a,v,r.RGBA,r.COLOR_ATTACHMENT0+m);0===o?(t._color_rb=p(r,i,a,r.RGBA4,r.COLOR_ATTACHMENT0),s&&s.drawBuffersWEBGL(l[0])):o>1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension(\\\"WEBGL_depth_texture\\\");y?d?t.depth=h(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&&(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&&d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),m=0;m<t.color.length;++m)t.color[m].dispose(),t.color[m]=null;t._color_rb&&(r.deleteRenderbuffer(t._color_rb),t._color_rb=null),u(r,e),f(x)}u(r,e)}(this)}var g=d.prototype;function v(t,e,r){if(t._destroyed)throw new Error(\\\"gl-fbo: Can't resize destroyed FBO\\\");if(t._shape[0]!==e||t._shape[1]!==r){var n=t.gl,i=n.getParameter(n.MAX_RENDERBUFFER_SIZE);if(e<0||e>i||r<0||r>i)throw new Error(\\\"gl-fbo: Can't resize FBO, invalid dimensions\\\");t._shape[0]=e,t._shape[1]=r;for(var a=c(n),o=0;o<t.color.length;++o)t.color[o].shape=t._shape;t._color_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,t._color_rb),n.renderbufferStorage(n.RENDERBUFFER,n.RGBA4,t._shape[0],t._shape[1])),t.depth&&(t.depth.shape=t._shape),t._depth_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,t._depth_rb),t._useDepth&&t._useStencil?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t._shape[0],t._shape[1]):t._useDepth?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t._shape[0],t._shape[1]):t._useStencil&&n.renderbufferStorage(n.RENDERBUFFER,n.STENCIL_INDEX,t._shape[0],t._shape[1])),n.bindFramebuffer(n.FRAMEBUFFER,t.handle);var s=n.checkFramebufferStatus(n.FRAMEBUFFER);s!==n.FRAMEBUFFER_COMPLETE&&(t.dispose(),u(n,a),f(s)),u(n,a)}}Object.defineProperties(g,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error(\\\"gl-fbo: Shape vector must be length 2\\\");var e=0|t[0],r=0|t[1];return v(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return v(this,t|=0,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,v(this,this._shape[0],t),t},enumerable:!1}}),g.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},g.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e<this.color.length;++e)this.color[e].dispose(),this.color[e]=null;this._color_rb&&(t.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{\\\"gl-texture2d\\\":305}],240:[function(t,e,r){var n=t(\\\"sprintf-js\\\").sprintf,i=t(\\\"gl-constants/lookup\\\"),a=t(\\\"glsl-shader-name\\\"),o=t(\\\"add-line-numbers\\\");e.exports=function(t,e,r){\\\"use strict\\\";var s=a(e)||\\\"of unknown name (see npm glsl-shader-name)\\\",l=\\\"unknown type\\\";void 0!==r&&(l=r===i.FRAGMENT_SHADER?\\\"fragment\\\":\\\"vertex\\\");for(var c=n(\\\"Error compiling %s shader %s:\\\\n\\\",l,s),u=n(\\\"%s%s\\\",c,t),f=t.split(\\\"\\\\n\\\"),h={},p=0;p<f.length;p++){var d=f[p];if(\\\"\\\"!==d&&\\\"\\\\0\\\"!==d){var g=parseInt(d.split(\\\":\\\")[2]);if(isNaN(g))throw new Error(n(\\\"Could not parse error: %s\\\",d));h[g]=d}}for(var v=o(e).split(\\\"\\\\n\\\"),p=0;p<v.length;p++)if(h[p+3]||h[p+2]||h[p+1]){var m=v[p];if(c+=m+\\\"\\\\n\\\",h[p+1]){var y=h[p+1];y=y.substr(y.split(\\\":\\\",3).join(\\\":\\\").length+1).trim(),c+=n(\\\"^^^ %s\\\\n\\\\n\\\",y)}}return{long:c.trim(),short:u.trim()}}},{\\\"add-line-numbers\\\":49,\\\"gl-constants/lookup\\\":236,\\\"glsl-shader-name\\\":384,\\\"sprintf-js\\\":504}],241:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=t.gl,n=o(r,l.vertex,l.fragment),i=o(r,l.pickVertex,l.pickFragment),a=s(r),u=s(r),f=s(r),h=s(r),p=new c(t,n,i,a,u,f,h);return p.update(e),t.addObject(p),p};var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"iota-array\\\"),a=t(\\\"typedarray-pool\\\"),o=t(\\\"gl-shader\\\"),s=t(\\\"gl-buffer\\\"),l=t(\\\"./lib/shaders\\\");function c(t,e,r,n,i,a,o){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.weightBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var u,f=c.prototype,h=[0,0,1,0,0,1,1,0,1,1,0,1];f.draw=(u=[1,0,0,0,1,0,0,0,1],function(){var t=this.plot,e=this.shader,r=this.bounds,n=this.numVertices;if(!(n<=0)){var i=t.gl,a=t.dataBox,o=r[2]-r[0],s=r[3]-r[1],l=a[2]-a[0],c=a[3]-a[1];u[0]=2*o/l,u[4]=2*s/c,u[6]=2*(r[0]-a[0])/l-1,u[7]=2*(r[1]-a[1])/c-1,e.bind();var f=e.uniforms;f.viewTransform=u,f.shape=this.shape;var h=e.attributes;this.positionBuffer.bind(),h.position.pointer(),this.weightBuffer.bind(),h.weight.pointer(i.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),h.color.pointer(i.UNSIGNED_BYTE,!0),i.drawArrays(i.TRIANGLES,0,n)}}),f.drawPick=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=this.plot,i=this.pickShader,a=this.bounds,o=this.numVertices;if(!(o<=0)){var s=n.gl,l=n.dataBox,c=a[2]-a[0],u=a[3]-a[1],f=l[2]-l[0],h=l[3]-l[1];t[0]=2*c/f,t[4]=2*u/h,t[6]=2*(a[0]-l[0])/f-1,t[7]=2*(a[1]-l[1])/h-1;for(var p=0;p<4;++p)e[p]=r>>8*p&255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=i.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r<n||r>=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},f.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=o;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,f=this.bounds,p=f[0]=r[0],d=f[1]=o[0],g=1/((f[2]=r[r.length-1])-p),v=1/((f[3]=o[o.length-1])-d),m=e[0],y=e[1];this.shape=[m,y];var x=(m-1)*(y-1)*(h.length>>>1);this.numVertices=x;for(var b=a.mallocUint8(4*x),_=a.mallocFloat32(2*x),w=a.mallocUint8(2*x),k=a.mallocUint32(x),M=0,A=0;A<y-1;++A)for(var T=v*(o[A]-d),S=v*(o[A+1]-d),C=0;C<m-1;++C)for(var E=g*(r[C]-p),L=g*(r[C+1]-p),z=0;z<h.length;z+=2){var O,I,P,D,R=h[z],B=h[z+1],F=s[(A+B)*m+(C+R)],N=n.le(l,F);if(N<0)O=c[0],I=c[1],P=c[2],D=c[3];else if(N===u-1)O=c[4*u-4],I=c[4*u-3],P=c[4*u-2],D=c[4*u-1];else{var j=(F-l[N])/(l[N+1]-l[N]),V=1-j,U=4*N,q=4*(N+1);O=V*c[U]+j*c[q],I=V*c[U+1]+j*c[q+1],P=V*c[U+2]+j*c[q+2],D=V*c[U+3]+j*c[q+3]}b[4*M]=255*O,b[4*M+1]=255*I,b[4*M+2]=255*P,b[4*M+3]=255*D,_[2*M]=.5*E+.5*L,_[2*M+1]=.5*T+.5*S,w[2*M]=R,w[2*M+1]=B,k[M]=A*m+C,M+=1}this.positionBuffer.update(_),this.weightBuffer.update(w),this.colorBuffer.update(b),this.idBuffer.update(k),a.free(_),a.free(b),a.free(w),a.free(k)},f.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},{\\\"./lib/shaders\\\":242,\\\"binary-search-bounds\\\":243,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288,\\\"iota-array\\\":399,\\\"typedarray-pool\\\":522}],242:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\");e.exports={fragment:n([\\\"precision lowp float;\\\\n#define GLSLIFY 1\\\\nvarying vec4 fragColor;\\\\nvoid main() {\\\\n  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\\\\n}\\\\n\\\"]),vertex:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position;\\\\nattribute vec4 color;\\\\nattribute vec2 weight;\\\\n\\\\nuniform vec2 shape;\\\\nuniform mat3 viewTransform;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\\\\n  fragColor = color;\\\\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\\\\n}\\\\n\\\"]),pickFragment:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragId;\\\\nvarying vec2 vWeight;\\\\n\\\\nuniform vec2 shape;\\\\nuniform vec4 pickOffset;\\\\n\\\\nvoid main() {\\\\n  vec2 d = step(.5, vWeight);\\\\n  vec4 id = fragId + pickOffset;\\\\n  id.x += d.x + d.y*shape.x;\\\\n\\\\n  id.y += floor(id.x / 256.0);\\\\n  id.x -= floor(id.x / 256.0) * 256.0;\\\\n\\\\n  id.z += floor(id.y / 256.0);\\\\n  id.y -= floor(id.y / 256.0) * 256.0;\\\\n\\\\n  id.w += floor(id.z / 256.0);\\\\n  id.z -= floor(id.z / 256.0) * 256.0;\\\\n\\\\n  gl_FragColor = id/255.;\\\\n}\\\\n\\\"]),pickVertex:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position;\\\\nattribute vec4 pickId;\\\\nattribute vec2 weight;\\\\n\\\\nuniform vec2 shape;\\\\nuniform mat3 viewTransform;\\\\n\\\\nvarying vec4 fragId;\\\\nvarying vec2 vWeight;\\\\n\\\\nvoid main() {\\\\n  vWeight = weight;\\\\n\\\\n  fragId = pickId;\\\\n\\\\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\\\\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\\\\n}\\\\n\\\"])}},{glslify:392}],243:[function(t,e,r){arguments[4][99][0].apply(r,arguments)},{dup:99}],244:[function(t,e,r){var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position, nextPosition;\\\\nattribute float arcLength, lineWidth;\\\\nattribute vec4 color;\\\\n\\\\nuniform vec2 screenShape;\\\\nuniform float pixelRatio;\\\\nuniform mat4 model, view, projection;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec3 worldPosition;\\\\nvarying float pixelArcLength;\\\\n\\\\nvec4 project(vec3 p) {\\\\n  return projection * view * model * vec4(p, 1.0);\\\\n}\\\\n\\\\nvoid main() {\\\\n  vec4 startPoint = project(position);\\\\n  vec4 endPoint   = project(nextPosition);\\\\n\\\\n  vec2 A = startPoint.xy / startPoint.w;\\\\n  vec2 B =   endPoint.xy /   endPoint.w;\\\\n\\\\n  float clipAngle = atan(\\\\n    (B.y - A.y) * screenShape.y,\\\\n    (B.x - A.x) * screenShape.x\\\\n  );\\\\n\\\\n  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(\\\\n    sin(clipAngle),\\\\n    -cos(clipAngle)\\\\n  ) / screenShape;\\\\n\\\\n  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);\\\\n\\\\n  worldPosition = position;\\\\n  pixelArcLength = arcLength;\\\\n  fragColor = color;\\\\n}\\\\n\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3      clipBounds[2];\\\\nuniform sampler2D dashTexture;\\\\nuniform float     dashScale;\\\\nuniform float     opacity;\\\\n\\\\nvarying vec3    worldPosition;\\\\nvarying float   pixelArcLength;\\\\nvarying vec4    fragColor;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\\\\n\\\\n  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\\\\n  if(dashWeight < 0.5) {\\\\n    discard;\\\\n  }\\\\n  gl_FragColor = fragColor * opacity;\\\\n}\\\\n\\\"]),s=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\n#define FLOAT_MAX  1.70141184e38\\\\n#define FLOAT_MIN  1.17549435e-38\\\\n\\\\nlowp vec4 encode_float_1540259130(highp float v) {\\\\n  highp float av = abs(v);\\\\n\\\\n  //Handle special cases\\\\n  if(av < FLOAT_MIN) {\\\\n    return vec4(0.0, 0.0, 0.0, 0.0);\\\\n  } else if(v > FLOAT_MAX) {\\\\n    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\\\\n  } else if(v < -FLOAT_MAX) {\\\\n    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\\\\n  }\\\\n\\\\n  highp vec4 c = vec4(0,0,0,0);\\\\n\\\\n  //Compute exponent and mantissa\\\\n  highp float e = floor(log2(av));\\\\n  highp float m = av * pow(2.0, -e) - 1.0;\\\\n  \\\\n  //Unpack mantissa\\\\n  c[1] = floor(128.0 * m);\\\\n  m -= c[1] / 128.0;\\\\n  c[2] = floor(32768.0 * m);\\\\n  m -= c[2] / 32768.0;\\\\n  c[3] = floor(8388608.0 * m);\\\\n  \\\\n  //Unpack exponent\\\\n  highp float ebias = e + 127.0;\\\\n  c[0] = floor(ebias / 2.0);\\\\n  ebias -= c[0] * 2.0;\\\\n  c[1] += floor(ebias) * 128.0; \\\\n\\\\n  //Unpack sign bit\\\\n  c[0] += 128.0 * step(0.0, -v);\\\\n\\\\n  //Scale back to range\\\\n  return c / 255.0;\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform float pickId;\\\\nuniform vec3 clipBounds[2];\\\\n\\\\nvarying vec3 worldPosition;\\\\nvarying float pixelArcLength;\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickId/255.0, encode_float_1540259130(pixelArcLength).xyz);\\\\n}\\\"]),l=[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"nextPosition\\\",type:\\\"vec3\\\"},{name:\\\"arcLength\\\",type:\\\"float\\\"},{name:\\\"lineWidth\\\",type:\\\"float\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"}];r.createShader=function(t){return i(t,a,o,null,l)},r.createPickShader=function(t){return i(t,a,s,null,l)}},{\\\"gl-shader\\\":288,glslify:392}],245:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=f(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),c=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),h=l(new Array(1024),[256,1,4]),p=0;p<1024;++p)h.data[p]=255;var d=a(e,h);d.wrap=e.REPEAT;var g=new v(e,r,o,s,c,d);return g.update(t),g};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"gl-texture2d\\\"),o=t(\\\"glsl-read-float\\\"),s=t(\\\"binary-search-bounds\\\"),l=t(\\\"ndarray\\\"),c=t(\\\"./lib/shaders\\\"),u=c.createShader,f=c.createPickShader,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function d(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}var m=v.prototype;m.isTransparent=function(){return this.opacity<1},m.isOpaque=function(){return this.opacity>=1},m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.drawTransparent=m.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||h,view:t.view||h,projection:t.projection||h,clipBounds:d(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||h,view:t.view||h,projection:t.projection||h,pickId:this.pickId,clipBounds:d(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;\\\"dashScale\\\"in t&&(this.dashScale=t.dashScale),\\\"opacity\\\"in t&&(this.opacity=+t.opacity);var i=[],a=[],o=[],c=0,u=0,f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=t.position||t.positions;if(h){var d=t.color||t.colors||[0,0,0,1],g=t.lineWidth||1,v=!1;t:for(e=1;e<h.length;++e){var m,y,x,b=h[e-1],_=h[e];for(a.push(c),o.push(b.slice()),r=0;r<3;++r){if(isNaN(b[r])||isNaN(_[r])||!isFinite(b[r])||!isFinite(_[r])){if(!n&&i.length>0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,v=!0}continue t}f[0][r]=Math.min(f[0][r],b[r],_[r]),f[1][r]=Math.max(f[1][r],b[r],_[r])}Array.isArray(d[0])?(m=d.length>e-1?d[e-1]:d.length>0?d[d.length-1]:[0,0,0,1],y=d.length>e?d[e]:d.length>0?d[d.length-1]:[0,0,0,1]):m=y=d,3===m.length&&(m=[m[0],m[1],m[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),x=Array.isArray(g)?g.length>e-1?g[e-1]:g.length>0?g[g.length-1]:[0,0,0,1]:g;var k=c;if(c+=p(b,_),v){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3]);u+=2,v=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],c,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],c,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),a.push(c),o.push(h[h.length-1].slice()),this.bounds=f,this.vertexCount=u,this.points=o,this.arcLength=a,\\\"dashes\\\"in t){var M=t.dashes.slice();for(M.unshift(0),e=1;e<M.length;++e)M[e]=M[e-1]+M[e];var A=l(new Array(1024),[256,1,4]);for(e=0;e<256;++e){for(r=0;r<4;++r)A.set(e,0,r,0);1&s.le(M,M[M.length-1]*e/255)?A.set(e,0,0,0):A.set(e,0,0,255)}this.texture.setPixels(A)}},m.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},m.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=o(t.value[0],t.value[1],t.value[2],0),r=s.le(this.arcLength,e);if(r<0)return null;if(r===this.arcLength.length-1)return new g(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),r);for(var n=this.points[r],i=this.points[Math.min(r+1,this.points.length-1)],a=(e-this.arcLength[r])/(this.arcLength[r+1]-this.arcLength[r]),l=1-a,c=[0,0,0],u=0;u<3;++u)c[u]=l*n[u]+a*i[u];var f=Math.min(a<.5?r:r+1,this.points.length-1);return new g(e,c,f,this.points[f])}},{\\\"./lib/shaders\\\":244,\\\"binary-search-bounds\\\":79,\\\"gl-buffer\\\":230,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,\\\"glsl-read-float\\\":383,ndarray:433}],246:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*a-i*n;return o?(o=1/o,t[0]=a*o,t[1]=-n*o,t[2]=-i*o,t[3]=r*o,t):null}},{}],247:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=u*o-s*c,h=-u*a+s*l,p=c*a-o*l,d=r*f+n*h+i*p;return d?(d=1/d,t[0]=f*d,t[1]=(-u*n+i*c)*d,t[2]=(s*n-i*o)*d,t[3]=h*d,t[4]=(u*r-i*l)*d,t[5]=(-s*r+i*a)*d,t[6]=p*d,t[7]=(-c*r+n*l)*d,t[8]=(o*r-n*a)*d,t):null}},{}],248:[function(t,e,r){e.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],249:[function(t,e,r){e.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],250:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],p=t[12],d=t[13],g=t[14],v=t[15];return(e*o-r*a)*(f*v-h*g)-(e*s-n*a)*(u*v-h*d)+(e*l-i*a)*(u*g-f*d)+(r*s-n*o)*(c*v-h*p)-(r*l-i*o)*(c*g-f*p)+(n*l-i*s)*(c*d-u*p)}},{}],251:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,c=r*o,u=n*o,f=n*s,h=i*o,p=i*s,d=i*l,g=a*o,v=a*s,m=a*l;return t[0]=1-f-d,t[1]=u+m,t[2]=h-v,t[3]=0,t[4]=u-m,t[5]=1-c-d,t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],252:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,c=a+a,u=n*s,f=n*l,h=n*c,p=i*l,d=i*c,g=a*c,v=o*s,m=o*l,y=o*c;return t[0]=1-(p+g),t[1]=f+y,t[2]=h-m,t[3]=0,t[4]=f-y,t[5]=1-(u+g),t[6]=d+v,t[7]=0,t[8]=h+m,t[9]=d-v,t[10]=1-(u+p),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},{}],253:[function(t,e,r){e.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],254:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],v=e[14],m=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,k=i*c-a*l,M=u*g-f*d,A=u*v-h*d,T=u*m-p*d,S=f*v-h*g,C=f*m-p*g,E=h*m-p*v,L=y*E-x*C+b*S+_*T-w*A+k*M;if(!L)return null;return L=1/L,t[0]=(s*E-l*C+c*S)*L,t[1]=(i*C-n*E-a*S)*L,t[2]=(g*k-v*w+m*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*T-o*E-c*A)*L,t[5]=(r*E-i*T+a*A)*L,t[6]=(v*b-d*k-m*x)*L,t[7]=(u*k-h*b+p*x)*L,t[8]=(o*C-s*T+c*M)*L,t[9]=(n*T-r*C-a*M)*L,t[10]=(d*w-g*b+m*y)*L,t[11]=(f*b-u*w-p*y)*L,t[12]=(s*A-o*S-l*M)*L,t[13]=(r*S-n*A+i*M)*L,t[14]=(g*x-d*_-v*y)*L,t[15]=(u*_-f*x+h*y)*L,t}},{}],255:[function(t,e,r){var n=t(\\\"./identity\\\");e.exports=function(t,e,r,i){var a,o,s,l,c,u,f,h,p,d,g=e[0],v=e[1],m=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],k=r[2];if(Math.abs(g-_)<1e-6&&Math.abs(v-w)<1e-6&&Math.abs(m-k)<1e-6)return n(t);f=g-_,h=v-w,p=m-k,d=1/Math.sqrt(f*f+h*h+p*p),a=x*(p*=d)-b*(h*=d),o=b*(f*=d)-y*p,s=y*h-x*f,(d=Math.sqrt(a*a+o*o+s*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0);l=h*s-p*o,c=p*a-f*s,u=f*o-h*a,(d=Math.sqrt(l*l+c*c+u*u))?(l*=d=1/d,c*=d,u*=d):(l=0,c=0,u=0);return t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=u,t[10]=p,t[11]=0,t[12]=-(a*g+o*v+s*m),t[13]=-(l*g+c*v+u*m),t[14]=-(f*g+h*v+p*m),t[15]=1,t}},{\\\"./identity\\\":253}],256:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*v,t[2]=x*a+b*c+_*p+w*m,t[3]=x*o+b*u+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*v,t[6]=x*a+b*c+_*p+w*m,t[7]=x*o+b*u+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*v,t[10]=x*a+b*c+_*p+w*m,t[11]=x*o+b*u+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*v,t[14]=x*a+b*c+_*p+w*m,t[15]=x*o+b*u+_*d+w*y,t}},{}],257:[function(t,e,r){e.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},{}],258:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c,u,f,h,p,d,g,v,m,y,x,b,_,w,k,M,A,T,S,C=n[0],E=n[1],L=n[2],z=Math.sqrt(C*C+E*E+L*L);if(Math.abs(z)<1e-6)return null;C*=z=1/z,E*=z,L*=z,i=Math.sin(r),a=Math.cos(r),o=1-a,s=e[0],l=e[1],c=e[2],u=e[3],f=e[4],h=e[5],p=e[6],d=e[7],g=e[8],v=e[9],m=e[10],y=e[11],x=C*C*o+a,b=E*C*o+L*i,_=L*C*o-E*i,w=C*E*o-L*i,k=E*E*o+a,M=L*E*o+C*i,A=C*L*o+E*i,T=E*L*o-C*i,S=L*L*o+a,t[0]=s*x+f*b+g*_,t[1]=l*x+h*b+v*_,t[2]=c*x+p*b+m*_,t[3]=u*x+d*b+y*_,t[4]=s*w+f*k+g*M,t[5]=l*w+h*k+v*M,t[6]=c*w+p*k+m*M,t[7]=u*w+d*k+y*M,t[8]=s*A+f*T+g*S,t[9]=l*A+h*T+v*S,t[10]=c*A+p*T+m*S,t[11]=u*A+d*T+y*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},{}],259:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},{}],260:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[8],u=e[9],f=e[10],h=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=a*i-c*n,t[1]=o*i-u*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+c*i,t[9]=o*n+u*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},{}],261:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},{}],262:[function(t,e,r){e.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],263:[function(t,e,r){e.exports=function(t,e,r){var n,i,a,o,s,l,c,u,f,h,p,d,g=r[0],v=r[1],m=r[2];e===t?(t[12]=e[0]*g+e[4]*v+e[8]*m+e[12],t[13]=e[1]*g+e[5]*v+e[9]*m+e[13],t[14]=e[2]*g+e[6]*v+e[10]*m+e[14],t[15]=e[3]*g+e[7]*v+e[11]*m+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*v+f*m+e[12],t[13]=i*g+l*v+h*m+e[13],t[14]=a*g+c*v+p*m+e[14],t[15]=o*g+u*v+d*m+e[15]);return t}},{}],264:[function(t,e,r){e.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},{}],265:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){switch(e.length){case 0:break;case 1:t[0]=1/e[0];break;case 4:n(t,e);break;case 9:i(t,e);break;case 16:a(t,e);break;default:throw new Error(\\\"currently supports matrices up to 4x4\\\")}return t};var n=t(\\\"gl-mat2/invert\\\"),i=t(\\\"gl-mat3/invert\\\"),a=t(\\\"gl-mat4/invert\\\")},{\\\"gl-mat2/invert\\\":246,\\\"gl-mat3/invert\\\":247,\\\"gl-mat4/invert\\\":254}],266:[function(t,e,r){arguments[4][232][0].apply(r,arguments)},{barycentric:61,dup:232,\\\"polytope-closest-point/lib/closest_point_2d.js\\\":464}],267:[function(t,e,r){var n=t(\\\"glslify\\\"),i=n([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position, normal;\\\\nattribute vec4 color;\\\\nattribute vec2 uv;\\\\n\\\\nuniform mat4 model\\\\n           , view\\\\n           , projection;\\\\nuniform vec3 eyePosition\\\\n           , lightPosition;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  vec4 m_position  = model * vec4(position, 1.0);\\\\n  vec4 t_position  = view * m_position;\\\\n  gl_Position      = projection * t_position;\\\\n  f_color          = color;\\\\n  f_normal         = normal;\\\\n  f_data           = position;\\\\n  f_eyeDirection   = eyePosition   - position;\\\\n  f_lightDirection = lightPosition - position;\\\\n  f_uv             = uv;\\\\n}\\\\n\\\"]),a=n([\\\"#extension GL_OES_standard_derivatives : enable\\\\n\\\\nprecision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat beckmannDistribution(float x, float roughness) {\\\\n  float NdotH = max(x, 0.0001);\\\\n  float cos2Alpha = NdotH * NdotH;\\\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\\\n  float roughness2 = roughness * roughness;\\\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\\\n  return exp(tan2Alpha / roughness2) / denom;\\\\n}\\\\n\\\\nfloat cookTorranceSpecular(\\\\n  vec3 lightDirection,\\\\n  vec3 viewDirection,\\\\n  vec3 surfaceNormal,\\\\n  float roughness,\\\\n  float fresnel) {\\\\n\\\\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\\\\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\\\\n\\\\n  //Half angle vector\\\\n  vec3 H = normalize(lightDirection + viewDirection);\\\\n\\\\n  //Geometric term\\\\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\\\\n  float VdotH = max(dot(viewDirection, H), 0.000001);\\\\n  float LdotH = max(dot(lightDirection, H), 0.000001);\\\\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\\\\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\\\\n  float G = min(1.0, min(G1, G2));\\\\n  \\\\n  //Distribution term\\\\n  float D = beckmannDistribution(NdotH, roughness);\\\\n\\\\n  //Fresnel term\\\\n  float F = pow(1.0 - VdotN, fresnel);\\\\n\\\\n  //Multiply terms and done\\\\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\\\\n}\\\\n\\\\nvec3 normals(vec3 pos) {\\\\n  vec3 fdx = dFdx(pos);\\\\n  vec3 fdy = dFdy(pos);\\\\n  return normalize(cross(fdx, fdy));\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform float roughness\\\\n            , fresnel\\\\n            , kambient\\\\n            , kdiffuse\\\\n            , kspecular\\\\n            , opacity;\\\\nuniform sampler2D texture;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\\\\n\\\\n  vec3 N = normalize(f_normal);\\\\n  vec3 L = normalize(f_lightDirection);\\\\n  vec3 V = normalize(f_eyeDirection);\\\\n\\\\n  vec3 normal = normals(f_data);\\\\n\\\\n  if (dot(N, normal) < 0.0) {\\\\n    N = -N;\\\\n  }\\\\n\\\\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\\\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\\\n\\\\n  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\\\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\\\n\\\\n  gl_FragColor = litColor * opacity;\\\\n}\\\\n\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 uv;\\\\n\\\\nuniform mat4 model, view, projection;\\\\n\\\\nvarying vec4 f_color;\\\\nvarying vec3 f_data;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  gl_Position = projection * view * model * vec4(position, 1.0);\\\\n  f_color = color;\\\\n  f_data  = position;\\\\n  f_uv    = uv;\\\\n}\\\"]),s=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform sampler2D texture;\\\\nuniform float opacity;\\\\n\\\\nvarying vec4 f_color;\\\\nvarying vec3 f_data;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\\\\n\\\\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\\\\n}\\\"]),l=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 uv;\\\\nattribute float pointSize;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 clipBounds[2];\\\\n\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    gl_Position = projection * view * model * vec4(position, 1.0);\\\\n  }\\\\n  gl_PointSize = pointSize;\\\\n  f_color = color;\\\\n  f_uv = uv;\\\\n}\\\"]),c=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform sampler2D texture;\\\\nuniform float opacity;\\\\n\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\\\\n  if(dot(pointR, pointR) > 0.25) {\\\\n    discard;\\\\n  }\\\\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\\\\n}\\\"]),u=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  gl_Position = projection * view * model * vec4(position, 1.0);\\\\n  f_id        = id;\\\\n  f_position  = position;\\\\n}\\\"]),f=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3  clipBounds[2];\\\\nuniform float pickId;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\\\n}\\\"]),h=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3  position;\\\\nattribute float pointSize;\\\\nattribute vec4  id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 clipBounds[2];\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    gl_Position  = projection * view * model * vec4(position, 1.0);\\\\n    gl_PointSize = pointSize;\\\\n  }\\\\n  f_id         = id;\\\\n  f_position   = position;\\\\n}\\\"]),p=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position;\\\\n\\\\nuniform mat4 model, view, projection;\\\\n\\\\nvoid main() {\\\\n  gl_Position = projection * view * model * vec4(position, 1.0);\\\\n}\\\"]),d=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform vec3 contourColor;\\\\n\\\\nvoid main() {\\\\n  gl_FragColor = vec4(contourColor,1);\\\\n}\\\\n\\\"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"},{name:\\\"pointSize\\\",type:\\\"float\\\"}]},r.pickShader={vertex:u,fragment:f,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"}]},r.pointPickShader={vertex:h,fragment:f,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"pointSize\\\",type:\\\"float\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"}]}},{glslify:392}],268:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"gl-texture2d\\\"),s=t(\\\"normals\\\"),l=t(\\\"gl-mat4/multiply\\\"),c=t(\\\"gl-mat4/invert\\\"),u=t(\\\"ndarray\\\"),f=t(\\\"colormap\\\"),h=t(\\\"simplicial-complex-contour\\\"),p=t(\\\"typedarray-pool\\\"),d=t(\\\"./lib/shaders\\\"),g=t(\\\"./lib/closest-point\\\"),v=d.meshShader,m=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,v,m,y,x,b,_,k,M,A,T,S){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=v,this.edgeUVs=m,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=M,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=T,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var M=k.prototype;function A(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function T(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function S(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function C(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}M.isOpaque=function(){return this.opacity>=1},M.isTransparent=function(){return this.opacity<1},M.pickSlots=1,M.setPickBase=function(t){this.pickId=t},M.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var c=r[l],u=0;u<2;++u){var f=c[0];2===c.length&&(f=c[u]);for(var d=n[f][0],g=n[f][1],v=i[f],m=1-v,y=this.positions[d],x=this.positions[g],b=0;b<3;++b)o[s++]=v*y[b]+m*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},M.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\\\"contourEnable\\\"in t&&(this.contourEnable=t.contourEnable),\\\"contourColor\\\"in t&&(this.contourColor=t.contourColor),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"lightPosition\\\"in t&&(this.lightPosition=t.lightPosition),\\\"opacity\\\"in t&&(this.opacity=t.opacity),\\\"ambient\\\"in t&&(this.ambientLight=t.ambient),\\\"diffuse\\\"in t&&(this.diffuseLight=t.diffuse),\\\"specular\\\"in t&&(this.specularLight=t.specular),\\\"roughness\\\"in t&&(this.roughness=t.roughness),\\\"fresnel\\\"in t&&(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:\\\"rgba\\\"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions;if(n&&r){var i=[],a=[],l=[],c=[],h=[],p=[],d=[],g=[],v=[],m=[],y=[],x=[],b=[],_=[];this.cells=r,this.positions=n;var w=t.vertexNormals,k=t.cellNormals,M=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,A=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!k&&(k=s.faceNormals(r,n,A)),k||w||(w=s.vertexNormals(r,n,M));var T=t.vertexColors,S=t.cellColors,C=t.meshColor||[1,1,1,1],E=t.vertexUVs,L=t.vertexIntensity,z=t.cellUVs,O=t.cellIntensity,I=1/0,P=-1/0;if(!E&&!z)if(L)if(t.vertexIntensityBounds)I=+t.vertexIntensityBounds[0],P=+t.vertexIntensityBounds[1];else for(var D=0;D<L.length;++D){var R=L[D];I=Math.min(I,R),P=Math.max(P,R)}else if(O)for(D=0;D<O.length;++D){R=O[D];I=Math.min(I,R),P=Math.max(P,R)}else for(D=0;D<n.length;++D){R=n[D][2];I=Math.min(I,R),P=Math.max(P,R)}this.intensity=L||(O?function(t,e,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=0;var a=t.length;for(i=0;i<a;++i)for(var o=t[i],s=0;s<o.length;++s)n[o[s]]=r[i];return n}(r,n.length,O):function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n));var B=t.pointSizes,F=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(D=0;D<n.length;++D)for(var N=n[D],j=0;j<3;++j)!isNaN(N[j])&&isFinite(N[j])&&(this.bounds[0][j]=Math.min(this.bounds[0][j],N[j]),this.bounds[1][j]=Math.max(this.bounds[1][j],N[j]));var V=0,U=0,q=0;t:for(D=0;D<r.length;++D){var H=r[D];switch(H.length){case 1:for(N=n[W=H[0]],j=0;j<3;++j)if(isNaN(N[j])||!isFinite(N[j]))continue t;m.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:C).length?y.push(Y[0],Y[1],Y[2],1):y.push(Y[0],Y[1],Y[2],Y[3]),X=E?E[W]:L?[(L[W]-I)/(P-I),0]:z?z[D]:O?[(O[D]-I)/(P-I),0]:[(N[2]-I)/(P-I),0],x.push(X[0],X[1]),B?b.push(B[W]):b.push(F),_.push(D),q+=1;break;case 2:for(j=0;j<2;++j){N=n[W=H[j]];for(var G=0;G<3;++G)if(isNaN(N[G])||!isFinite(N[G]))continue t}for(j=0;j<2;++j){N=n[W=H[j]];p.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:C).length?d.push(Y[0],Y[1],Y[2],1):d.push(Y[0],Y[1],Y[2],Y[3]),X=E?E[W]:L?[(L[W]-I)/(P-I),0]:z?z[D]:O?[(O[D]-I)/(P-I),0]:[(N[2]-I)/(P-I),0],g.push(X[0],X[1]),v.push(D)}U+=1;break;case 3:for(j=0;j<3;++j)for(N=n[W=H[j]],G=0;G<3;++G)if(isNaN(N[G])||!isFinite(N[G]))continue t;for(j=0;j<3;++j){var W,Y,X,Z;N=n[W=H[j]];i.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:C).length?a.push(Y[0],Y[1],Y[2],1):a.push(Y[0],Y[1],Y[2],Y[3]),X=E?E[W]:L?[(L[W]-I)/(P-I),0]:z?z[D]:O?[(O[D]-I)/(P-I),0]:[(N[2]-I)/(P-I),0],c.push(X[0],X[1]),Z=w?w[W]:k[D],l.push(Z[0],Z[1],Z[2]),h.push(D)}V+=1}}this.pointCount=q,this.edgeCount=U,this.triangleCount=V,this.pointPositions.update(m),this.pointColors.update(y),this.pointUVs.update(x),this.pointSizes.update(b),this.pointIds.update(new Uint32Array(_)),this.edgePositions.update(p),this.edgeColors.update(d),this.edgeUVs.update(g),this.edgeIds.update(new Uint32Array(v)),this.trianglePositions.update(i),this.triangleColors.update(a),this.triangleUVs.update(c),this.triangleNormals.update(l),this.triangleIds.update(new Uint32Array(h))}},M.drawTransparent=M.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o<3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o<3;++o){for(var p=u[12+o],d=0;d<3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount>0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},M.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},M.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;a<r.length;++a)i[a]=n[r[a]];var o=g(i,[t.coord[0],this._resolution[1]-t.coord[1]],this._model,this._view,this._projection,this._resolution);if(!o)return null;var s=o[2],l=0;for(a=0;a<r.length;++a)l+=s[a]*this.intensity[r[a]];return{position:o[1],index:r[o[0]],cell:r,cellId:e,intensity:l,dataCoordinate:this.positions[r[o[0]]]}},M.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},e.exports=function(t,e){if(1===arguments.length&&(t=(e=t).gl),!(t.getExtension(\\\"OES_standard_derivatives\\\")||t.getExtension(\\\"MOZ_OES_standard_derivatives\\\")||t.getExtension(\\\"WEBKIT_OES_standard_derivatives\\\")))throw new Error(\\\"derivatives not supported\\\");var r=function(t){var e=n(t,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}(t),s=function(t){var e=n(t,m.vertex,m.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}(t),l=A(t),c=T(t),f=S(t),h=C(t),p=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=t.LINEAR_MIPMAP_LINEAR,p.magFilter=t.LINEAR;var d=i(t),g=i(t),y=i(t),x=i(t),b=i(t),_=a(t,[{buffer:d,type:t.FLOAT,size:3},{buffer:b,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:g,type:t.FLOAT,size:4},{buffer:y,type:t.FLOAT,size:2},{buffer:x,type:t.FLOAT,size:3}]),w=i(t),M=i(t),E=i(t),L=i(t),z=a(t,[{buffer:w,type:t.FLOAT,size:3},{buffer:L,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:E,type:t.FLOAT,size:2}]),O=i(t),I=i(t),P=i(t),D=i(t),R=i(t),B=a(t,[{buffer:O,type:t.FLOAT,size:3},{buffer:R,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:I,type:t.FLOAT,size:4},{buffer:P,type:t.FLOAT,size:2},{buffer:D,type:t.FLOAT,size:1}]),F=i(t),N=new k(t,p,r,s,l,c,f,h,d,b,g,y,x,_,w,L,M,E,z,O,R,I,P,D,B,F,a(t,[{buffer:F,type:t.FLOAT,size:3}]));return N.update(e),N}},{\\\"./lib/closest-point\\\":266,\\\"./lib/shaders\\\":267,colormap:114,\\\"gl-buffer\\\":230,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"gl-shader\\\":288,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,ndarray:433,normals:436,\\\"simplicial-complex-contour\\\":494,\\\"typedarray-pool\\\":522}],269:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e,[0,0,0,1,1,0,1,1]),s=i(e,a.boxVert,a.lineFrag);return new o(t,r,s)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-shader\\\"),a=t(\\\"./shaders\\\");function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},c.drawBox=(s=[0,0],l=[0,0],function(t,e,r,n,i){var a=this.plot,o=this.shader,c=a.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,o.uniforms.lo=s,o.uniforms.hi=l,o.uniforms.color=i,c.drawArrays(c.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":272,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288}],270:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e),a=i(e,o.gridVert,o.gridFrag),l=i(e,o.tickVert,o.gridFrag);return new s(t,r,a,l)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-shader\\\"),a=t(\\\"binary-search-bounds\\\"),o=t(\\\"./shaders\\\");function s(t,e,r,n){this.plot=t,this.vbo=e,this.shader=r,this.tickShader=n,this.ticks=[[],[]]}function l(t,e){return t-e}var c,u,f,h,p,d=s.prototype;d.draw=(c=[0,0],u=[0,0],f=[0,0],function(){for(var t=this.plot,e=this.vbo,r=this.shader,n=this.ticks,i=t.gl,a=t._tickBounds,o=t.dataBox,s=t.viewBox,l=t.gridLineWidth,h=t.gridLineColor,p=t.gridLineEnable,d=t.pixelRatio,g=0;g<2;++g){var v=a[g],m=a[g+2]-v,y=.5*(o[g+2]+o[g]),x=o[g+2]-o[g];u[g]=2*m/x,c[g]=2*(v-y)/x}r.bind(),e.bind(),r.attributes.dataCoord.pointer(),r.uniforms.dataShift=c,r.uniforms.dataScale=u;var b=0;for(g=0;g<2;++g){f[0]=f[1]=0,f[g]=1,r.uniforms.dataAxis=f,r.uniforms.lineWidth=l[g]/(s[g+2]-s[g])*d,r.uniforms.color=h[g];var _=6*n[g].length;p[g]&&_&&i.drawArrays(i.TRIANGLES,b,_),b+=_}}),d.drawTickMarks=function(){var t=[0,0],e=[0,0],r=[1,0],n=[0,1],i=[0,0],o=[0,0];return function(){for(var s=this.plot,c=this.vbo,u=this.tickShader,f=this.ticks,h=s.gl,p=s._tickBounds,d=s.dataBox,g=s.viewBox,v=s.pixelRatio,m=s.screenBox,y=m[2]-m[0],x=m[3]-m[1],b=g[2]-g[0],_=g[3]-g[1],w=0;w<2;++w){var k=p[w],M=p[w+2]-k,A=.5*(d[w+2]+d[w]),T=d[w+2]-d[w];e[w]=2*M/T,t[w]=2*(k-A)/T}e[0]*=b/y,t[0]*=b/y,e[1]*=_/x,t[1]*=_/x,u.bind(),c.bind(),u.attributes.dataCoord.pointer();var S=u.uniforms;S.dataShift=t,S.dataScale=e;var C=s.tickMarkLength,E=s.tickMarkWidth,L=s.tickMarkColor,z=6*f[0].length,O=Math.min(a.ge(f[0],(d[0]-p[0])/(p[2]-p[0]),l),f[0].length),I=Math.min(a.gt(f[0],(d[2]-p[0])/(p[2]-p[0]),l),f[0].length),P=0+6*O,D=6*Math.max(0,I-O),R=Math.min(a.ge(f[1],(d[1]-p[1])/(p[3]-p[1]),l),f[1].length),B=Math.min(a.gt(f[1],(d[3]-p[1])/(p[3]-p[1]),l),f[1].length),F=z+6*R,N=6*Math.max(0,B-R);i[0]=2*(g[0]-C[1])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=C[1]*v/y,o[1]=E[1]*v/x,N&&(S.color=L[1],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,F,N)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[1]-C[0])/x-1,o[0]=E[0]*v/y,o[1]=C[0]*v/x,D&&(S.color=L[0],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,P,D)),i[0]=2*(g[2]+C[3])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=C[3]*v/y,o[1]=E[3]*v/x,N&&(S.color=L[3],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,F,N)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[3]+C[2])/x-1,o[0]=E[2]*v/y,o[1]=C[2]*v/x,D&&(S.color=L[2],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,P,D))}}(),d.update=(h=[1,1,-1,-1,1,-1],p=[1,-1,1,1,-1,-1],function(t){for(var e=t.ticks,r=t.bounds,n=new Float32Array(18*(e[0].length+e[1].length)),i=(this.plot.zeroLineEnable,0),a=[[],[]],o=0;o<2;++o)for(var s=a[o],l=e[o],c=r[o],u=r[o+2],f=0;f<l.length;++f){var d=(l[f].x-c)/(u-c);s.push(d);for(var g=0;g<6;++g)n[i++]=d,n[i++]=h[g],n[i++]=p[g]}this.ticks=a,this.vbo.update(n)}),d.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{\\\"./shaders\\\":272,\\\"binary-search-bounds\\\":274,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288}],271:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e,[-1,-1,-1,1,1,-1,1,1]),s=i(e,a.lineVert,a.lineFrag);return new o(t,r,s)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-shader\\\"),a=t(\\\"./shaders\\\");function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},c.drawLine=(s=[0,0],l=[0,0],function(t,e,r,n,i,a){var o=this.plot,c=this.shader,u=o.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,c.uniforms.start=s,c.uniforms.end=l,c.uniforms.width=i*o.pixelRatio,c.uniforms.color=a,u.drawArrays(u.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":272,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288}],272:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=n([\\\"precision lowp float;\\\\n#define GLSLIFY 1\\\\nuniform vec4 color;\\\\nvoid main() {\\\\n  gl_FragColor = vec4(color.xyz * color.w, color.w);\\\\n}\\\\n\\\"]);e.exports={lineVert:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 coord;\\\\n\\\\nuniform vec4 screenBox;\\\\nuniform vec2 start, end;\\\\nuniform float width;\\\\n\\\\nvec2 perp(vec2 v) {\\\\n  return vec2(v.y, -v.x);\\\\n}\\\\n\\\\nvec2 screen(vec2 v) {\\\\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\\\n}\\\\n\\\\nvoid main() {\\\\n  vec2 delta = normalize(perp(start - end));\\\\n  vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\\\\n  gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\\\\n}\\\\n\\\"]),lineFrag:i,textVert:n([\\\"#define GLSLIFY 1\\\\nattribute vec3 textCoordinate;\\\\n\\\\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\\\\nuniform float angle;\\\\n\\\\nvoid main() {\\\\n  float dataOffset  = textCoordinate.z;\\\\n  vec2 glyphOffset  = textCoordinate.xy;\\\\n  mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\\\\n  vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\\\\n    glyphMatrix * glyphOffset * textScale + screenOffset;\\\\n  gl_Position = vec4(screenCoordinate, 0, 1);\\\\n}\\\\n\\\"]),textFrag:i,gridVert:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 dataCoord;\\\\n\\\\nuniform vec2 dataAxis, dataShift, dataScale;\\\\nuniform float lineWidth;\\\\n\\\\nvoid main() {\\\\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\\\\n  pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\\\\n  gl_Position = vec4(pos, 0, 1);\\\\n}\\\\n\\\"]),gridFrag:i,boxVert:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 coord;\\\\n\\\\nuniform vec4 screenBox;\\\\nuniform vec2 lo, hi;\\\\n\\\\nvec2 screen(vec2 v) {\\\\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\\\n}\\\\n\\\\nvoid main() {\\\\n  gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\\\\n}\\\\n\\\"]),tickVert:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 dataCoord;\\\\n\\\\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\\\\n\\\\nvoid main() {\\\\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\\\\n  gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\\\\n}\\\\n\\\"])}},{glslify:392}],273:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e),a=i(e,s.textVert,s.textFrag);return new l(t,r,a)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-shader\\\"),a=t(\\\"text-cache\\\"),o=t(\\\"binary-search-bounds\\\"),s=t(\\\"./shaders\\\");function l(t,e,r){this.plot=t,this.vbo=e,this.shader=r,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var c,u,f,h,p,d,g=l.prototype;g.drawTicks=(c=[0,0],u=[0,0],f=[0,0],function(t){var e=this.plot,r=this.shader,n=this.tickX[t],i=this.tickOffset[t],a=e.gl,s=e.viewBox,l=e.dataBox,h=e.screenBox,p=e.pixelRatio,d=e.tickEnable,g=e.tickPad,v=e.tickColor,m=e.tickAngle,y=e.labelEnable,x=e.labelPad,b=e.labelColor,_=e.labelAngle,w=this.labelOffset[t],k=this.labelCount[t],M=o.lt(n,l[t]),A=o.le(n,l[t+2]);c[0]=c[1]=0,c[t]=1,u[t]=(s[2+t]+s[t])/(h[2+t]-h[t])-1;var T=2/h[2+(1^t)]-h[1^t];u[1^t]=T*s[1^t]-1,d[t]&&(u[1^t]-=T*p*g[t],M<A&&i[A]>i[M]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t],r.uniforms.angle=m[t],a.drawArrays(a.TRIANGLES,i[M],i[A]-i[M]))),y[t]&&k&&(u[1^t]-=T*p*x[t],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,k)),u[1^t]=T*s[2+(1^t)]-1,d[t+2]&&(u[1^t]+=T*p*g[t+2],M<A&&i[A]>i[M]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t+2],r.uniforms.angle=m[t+2],a.drawArrays(a.TRIANGLES,i[M],i[A]-i[M]))),y[t+2]&&k&&(u[1^t]+=T*p*x[t+2],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,k))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(h=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],f=a[o],g=a[o+2]-f,v=i[o],m=i[o+2]-v;p[o]=2*l/u*g/m,h[o]=2*(s-c)/u*g/m}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=h,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],f=[-1/0],h=l[o];for(e=0;e<h.length;++e){var p=h[e],d=p.x,g=p.text,v=p.font||\\\"sans-serif\\\";i=p.fontSize||12;for(var m=1/(c[o+2]-c[o]),y=c[o],x=g.split(\\\"\\\\n\\\"),b=0;b<x.length;b++)for(n=a(v,x[b]).data,r=0;r<n.length;r+=2)s.push(n[r]*i,-n[r+1]*i-b*i*1.2,(d-y)*m);u.push(Math.floor(s.length/3)),f.push(d)}this.tickOffset[o]=u,this.tickX[o]=f}for(o=0;o<2;++o){for(this.labelOffset[o]=Math.floor(s.length/3),n=a(t.labelFont[o],t.labels[o],{textAlign:\\\"center\\\"}).data,i=t.labelSize[o],e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.labelCount[o]=Math.floor(s.length/3)-this.labelOffset[o]}for(this.titleOffset=Math.floor(s.length/3),n=a(t.titleFont,t.title).data,i=t.titleSize,e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},g.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":272,\\\"binary-search-bounds\\\":274,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288,\\\"text-cache\\\":513}],274:[function(t,e,r){arguments[4][99][0].apply(r,arguments)},{dup:99}],275:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e,[e.drawingBufferWidth,e.drawingBufferHeight]),c=new l(e,r);return c.grid=i(c),c.text=a(c),c.line=o(c),c.box=s(c),c.update(t),c};var n=t(\\\"gl-select-static\\\"),i=t(\\\"./lib/grid\\\"),a=t(\\\"./lib/text\\\"),o=t(\\\"./lib/line\\\"),s=t(\\\"./lib/box\\\");function l(t,e){this.gl=t,this.pickBuffer=e,this.screenBox=[0,0,t.drawingBufferWidth,t.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var c=l.prototype;function u(t){for(var e=t.slice(),r=0;r<e.length;++r)e[r]=e[r].slice();return e}function f(t,e){return t.x-e.x}c.setDirty=function(){this.dirty=this.pickDirty=!0},c.setOverlayDirty=function(){this.dirty=!0},c.nextDepthValue=function(){return this._depthCounter++/65536},c.draw=function(){var t=this.gl,e=this.screenBox,r=this.viewBox,n=this.dataBox,i=this.pixelRatio,a=this.grid,o=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,t.bindFramebuffer(t.FRAMEBUFFER,null),t.enable(t.SCISSOR_TEST),t.disable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.depthMask(!1),t.enable(t.BLEND),t.blendEquation(t.FUNC_ADD,t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.borderColor){t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]);var c=this.borderColor;t.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}t.scissor(r[0],r[1],r[2]-r[0],r[3]-r[1]),t.viewport(r[0],r[1],r[2]-r[0],r[3]-r[1]);var u=this.backgroundColor;t.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),t.clear(t.COLOR_BUFFER_BIT),a.draw();var f=this.zeroLineEnable,h=this.zeroLineColor,p=this.zeroLineWidth;if(f[0]||f[1]){o.bind();for(var d=0;d<2;++d)if(f[d]&&n[d]<=0&&n[d+2]>=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],h[d]):o.drawLine(e[0],g,e[2],g,p[d],h[d])}}for(d=0;d<l.length;++d)l[d].draw();t.viewport(e[0],e[1],e[2]-e[0],e[3]-e[1]),t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.grid.drawTickMarks(),o.bind();var v=this.borderLineEnable,m=this.borderLineWidth,y=this.borderLineColor;for(v[1]&&o.drawLine(r[0],r[1]-.5*m[1]*i,r[0],r[3]+.5*m[3]*i,m[1],y[1]),v[0]&&o.drawLine(r[0]-.5*m[0]*i,r[1],r[2]+.5*m[2]*i,r[1],m[0],y[0]),v[3]&&o.drawLine(r[2],r[1]-.5*m[1]*i,r[2],r[3]+.5*m[3]*i,m[3],y[3]),v[2]&&o.drawLine(r[0]-.5*m[0]*i,r[3],r[2]+.5*m[2]*i,r[3],m[2],y[2]),s.bind(),d=0;d<2;++d)s.drawTicks(d);this.titleEnable&&s.drawTitle();var x=this.overlays;for(d=0;d<x.length;++d)x[d].draw();t.disable(t.SCISSOR_TEST),t.disable(t.BLEND),t.depthMask(!0)}},c.drawPick=function(){if(!this.static){var t=this.pickBuffer;this.gl;this._pickTimeout=null,t.begin();for(var e=1,r=this.objects,n=0;n<r.length;++n)e=r[n].drawPick(e);t.end()}},c.pick=function(t,e){if(!this.static){var r=this.pixelRatio,n=this.pickPixelRatio,i=this.viewBox,a=0|Math.round((t-i[0]/r)*n),o=0|Math.round((e-i[1]/r)*n),s=this.pickBuffer.query(a,o,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]<<8)+(s.value[1]<<16)+(s.value[2]<<24),c=this.objects,u=0;u<c.length;++u){var f=c[u].pick(a,o,l);if(f)return f}return null}},c.setScreenBox=function(t){var e=this.screenBox,r=this.pixelRatio;e[0]=0|Math.round(t[0]*r),e[1]=0|Math.round(t[1]*r),e[2]=0|Math.round(t[2]*r),e[3]=0|Math.round(t[3]*r),this.setDirty()},c.setDataBox=function(t){var e=this.dataBox;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3])&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this.setDirty())},c.setViewBox=function(t){var e=this.pixelRatio,r=this.viewBox;r[0]=0|Math.round(t[0]*e),r[1]=0|Math.round(t[1]*e),r[2]=0|Math.round(t[2]*e),r[3]=0|Math.round(t[3]*e);var n=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((t[2]-t[0])*n),0|Math.round((t[3]-t[1])*n)],this.setDirty()},c.update=function(t){t=t||{};var e=this.gl;this.pixelRatio=t.pixelRatio||1;var r=this.pixelRatio;this.pickPixelRatio=Math.max(r,1),this.setScreenBox(t.screenBox||[0,0,e.drawingBufferWidth/r,e.drawingBufferHeight/r]);this.screenBox;this.setViewBox(t.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/r,.125*(this.screenBox[3]-this.screenBox[1])/r,.875*(this.screenBox[2]-this.screenBox[0])/r,.875*(this.screenBox[3]-this.screenBox[1])/r]);var n=this.viewBox,i=(n[2]-n[0])/(n[3]-n[1]);this.setDataBox(t.dataBox||[-10,-10/i,10,10/i]),this.borderColor=!1!==t.borderColor&&(t.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(t.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(t.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(t.gridLineWidth||[1,1]).slice(),this.gridLineColor=u(t.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(t.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(t.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=u(t.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(t.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(t.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=u(t.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(t.titleCenter||[.5*(n[0]+n[2])/r,(n[3]+120)/r]).slice(),this.titleEnable=!(\\\"titleEnable\\\"in t&&!t.titleEnable),this.titleAngle=t.titleAngle||0,this.titleColor=(t.titleColor||[0,0,0,1]).slice(),this.labelPad=(t.labelPad||[15,15,15,15]).slice(),this.labelAngle=(t.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(t.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=u(t.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(t.tickPad||[15,15,15,15]).slice(),this.tickAngle=(t.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(t.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=u(t.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(t.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(t.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=u(t.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var a=t.ticks||[[],[]],o=this._tickBounds;o[0]=o[1]=1/0,o[2]=o[3]=-1/0;for(var s=0;s<2;++s){var l=a[s].slice(0);0!==l.length&&(l.sort(f),o[s]=Math.min(o[s],l[0].x),o[s+2]=Math.max(o[s+2],l[l.length-1].x))}this.grid.update({bounds:o,ticks:a}),this.text.update({bounds:o,ticks:a,labels:t.labels||[\\\"x\\\",\\\"y\\\"],labelSize:t.labelSize||[12,12],labelFont:t.labelFont||[\\\"sans-serif\\\",\\\"sans-serif\\\"],title:t.title||\\\"\\\",titleSize:t.titleSize||18,titleFont:t.titleFont||\\\"sans-serif\\\"}),this.static=!!t.static,this.setDirty()},c.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var t=this.objects.length-1;t>=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setDirty();break}},c.addOverlay=function(t){this.overlays.indexOf(t)<0&&(this.overlays.push(t),this.setOverlayDirty())},c.removeOverlay=function(t){for(var e=this.overlays,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setOverlayDirty();break}}},{\\\"./lib/box\\\":269,\\\"./lib/grid\\\":270,\\\"./lib/line\\\":271,\\\"./lib/text\\\":273,\\\"gl-select-static\\\":287}],276:[function(t,e,r){var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\nattribute vec2 position;\\\\nvarying vec2 uv;\\\\nvoid main() {\\\\n  uv = position;\\\\n  gl_Position = vec4(position, 0, 1);\\\\n}\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform sampler2D accumBuffer;\\\\nvarying vec2 uv;\\\\n\\\\nvoid main() {\\\\n  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\\\\n  gl_FragColor = min(vec4(1,1,1,1), accum);\\\\n}\\\"]);e.exports=function(t){return i(t,a,o,null,[{name:\\\"position\\\",type:\\\"vec2\\\"}])}},{\\\"gl-shader\\\":288,glslify:392}],277:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=!1,r=((t=t||{}).pixelRatio||parseFloat(window.devicePixelRatio),t.canvas);if(!r)if(r=document.createElement(\\\"canvas\\\"),t.container){var m=t.container;m.appendChild(r)}else document.body.appendChild(r);var y=t.gl;y||(y=function(t,e){var r=null;try{(r=t.getContext(\\\"webgl\\\",e))||(r=t.getContext(\\\"experimental-webgl\\\",e))}catch(t){return null}return r}(r,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p}));if(!y)throw new Error(\\\"webgl not supported\\\");var x=t.bounds||[[-10,-10,-10],[10,10,10]],b=new d,_=l(y,[y.drawingBufferWidth,y.drawingBufferHeight],{preferFloat:!p}),w=h(y),k=t.camera||{eye:[2,0,0],center:[0,0,0],up:[0,1,0],zoomMin:.1,zoomMax:100,mode:\\\"turntable\\\"},M=t.axes||{},A=i(y,M);A.enable=!M.disable;var T=t.spikes||{},S=o(y,T),C=[],E=[],L=[],z=[],O=!0,I=!0,P=new Array(16),D=new Array(16),R={view:null,projection:P,model:D},I=!0,B=[y.drawingBufferWidth,y.drawingBufferHeight],F={gl:y,contextLost:!1,pixelRatio:t.pixelRatio||parseFloat(window.devicePixelRatio),canvas:r,selection:b,camera:n(r,k),axes:A,axesPixels:null,spikes:S,bounds:x,objects:C,shape:B,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:v(t.autoResize),autoBounds:v(t.autoBounds),autoScale:!!t.autoScale,autoCenter:v(t.autoCenter),clipToBounds:v(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:R,oncontextloss:null,mouseListener:null},N=[y.drawingBufferWidth/F.pixelRatio|0,y.drawingBufferHeight/F.pixelRatio|0];function j(){if(!e&&F.autoResize){var t=r.parentNode,n=1,i=1;t&&t!==document.body?(n=t.clientWidth,i=t.clientHeight):(n=window.innerWidth,i=window.innerHeight);var a=0|Math.ceil(n*F.pixelRatio),o=0|Math.ceil(i*F.pixelRatio);if(a!==r.width||o!==r.height){r.width=a,r.height=o;var s=r.style;s.position=s.position||\\\"absolute\\\",s.left=\\\"0px\\\",s.top=\\\"0px\\\",s.width=n+\\\"px\\\",s.height=i+\\\"px\\\",O=!0}}}F.autoResize&&j();function V(){for(var t=C.length,e=z.length,r=0;r<e;++r)L[r]=0;t:for(var r=0;r<t;++r){var n=C[r],i=n.pickSlots;if(i){for(var a=0;a<e;++a)if(L[a]+i<255){E[r]=a,n.setPickBase(L[a]+1),L[a]+=i;continue t}var o=s(y,B);E[r]=e,z.push(o),L.push(i),n.setPickBase(1),e+=1}else E[r]=-1}for(;e>0&&0===L[e-1];)L.pop(),z.pop().dispose()}window.addEventListener(\\\"resize\\\",j),F.update=function(t){e||(t=t||{},O=!0,I=!0)},F.add=function(t){e||(t.axes=A,C.push(t),E.push(-1),O=!0,I=!0,V())},F.remove=function(t){if(!e){var r=C.indexOf(t);r<0||(C.splice(r,1),E.pop(),O=!0,I=!0,V())}},F.dispose=function(){if(!e&&(e=!0,window.removeEventListener(\\\"resize\\\",j),r.removeEventListener(\\\"webglcontextlost\\\",H),F.mouseListener.enabled=!1,!F.contextLost)){A.dispose(),S.dispose();for(var t=0;t<C.length;++t)C[t].dispose();_.dispose();for(var t=0;t<z.length;++t)z[t].dispose();w.dispose(),y=null,A=null,S=null,C=[]}};var U=!1,q=0;function H(){if(F.contextLost)return!0;y.isContextLost()&&(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&&F.oncontextloss())}F.mouseListener=u(r,function(t,r,n){if(!e){var i=z.length,a=C.length,o=b.object;b.distance=1/0,b.mouse[0]=r,b.mouse[1]=n,b.object=null,b.screen=null,b.dataCoordinate=b.dataPosition=null;var s=!1;if(t&&q)U=!0;else{U&&(I=!0),U=!1;for(var l=0;l<i;++l){var c=z[l].query(r,N[1]-n-1,F.pickRadius);if(c){if(c.distance>b.distance)continue;for(var u=0;u<a;++u){var f=C[u];if(E[u]===l){var h=f.pick(c);h&&(b.buttons=t,b.screen=c.coord,b.distance=c.distance,b.object=f,b.index=h.distance,b.dataPosition=h.position,b.dataCoordinate=h.dataCoordinate,b.data=h,s=!0)}}}}}o&&o!==b.object&&(o.highlight&&o.highlight(null),O=!0),b.object&&(b.object.highlight&&b.object.highlight(b.data),O=!0),(s=s||b.object!==o)&&F.onselect&&F.onselect(b),1&t&&!(1&q)&&F.onclick&&F.onclick(b),q=t}}),r.addEventListener(\\\"webglcontextlost\\\",H);var G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],W=[G[0].slice(),G[1].slice()];function Y(){if(!H()){j();var t=F.camera.tick();R.view=F.camera.matrix,O=O||t,I=I||t,A.pixelRatio=F.pixelRatio,S.pixelRatio=F.pixelRatio;var e=C.length,r=G[0],n=G[1];r[0]=r[1]=r[2]=1/0,n[0]=n[1]=n[2]=-1/0;for(var i=0;i<e;++i){var o=C[i];o.pixelRatio=F.pixelRatio,o.axes=F.axes,O=O||!!o.dirty,I=I||!!o.dirty;var s=o.bounds;if(s)for(var l=s[0],u=s[1],h=0;h<3;++h)r[h]=Math.min(r[h],l[h]),n[h]=Math.max(n[h],u[h])}var p=F.bounds;if(F.autoBounds)for(var h=0;h<3;++h){if(n[h]<r[h])r[h]=-1,n[h]=1;else{r[h]===n[h]&&(r[h]-=1,n[h]+=1);var d=.05*(n[h]-r[h]);r[h]=r[h]-d,n[h]=n[h]+d}p[0][h]=r[h],p[1][h]=n[h]}for(var v=!1,h=0;h<3;++h)v=v||W[0][h]!==p[0][h]||W[1][h]!==p[1][h],W[0][h]=p[0][h],W[1][h]=p[1][h];if(I=I||v,O=O||v){if(v){for(var m=[0,0,0],i=0;i<3;++i)m[i]=g((p[1][i]-p[0][i])/10);A.autoTicks?A.update({bounds:p,tickSpacing:m}):A.update({bounds:p})}var x=y.drawingBufferWidth,k=y.drawingBufferHeight;B[0]=x,B[1]=k,N[0]=0|Math.max(x/F.pixelRatio,1),N[1]=0|Math.max(k/F.pixelRatio,1),f(P,F.fovy,x/k,F.zNear,F.zFar);for(var i=0;i<16;++i)D[i]=0;D[15]=1;for(var M=0,i=0;i<3;++i)M=Math.max(M,p[1][i]-p[0][i]);for(var i=0;i<3;++i)F.autoScale?D[5*i]=F.aspect[i]/(p[1][i]-p[0][i]):D[5*i]=1/M,F.autoCenter&&(D[12+i]=.5*-D[5*i]*(p[0][i]+p[1][i]));for(var i=0;i<e;++i){var o=C[i];o.axesBounds=p,F.clipToBounds&&(o.clipBounds=p)}b.object&&(F.snapToData?S.position=b.dataCoordinate:S.position=b.dataPosition,S.bounds=p),I&&(I=!1,function(){if(H())return;y.colorMask(!0,!0,!0,!0),y.depthMask(!0),y.disable(y.BLEND),y.enable(y.DEPTH_TEST);for(var t=C.length,e=z.length,r=0;r<e;++r){var n=z[r];n.shape=N,n.begin();for(var i=0;i<t;++i)if(E[i]===r){var a=C[i];a.drawPick&&(a.pixelRatio=1,a.drawPick(R))}n.end()}}()),F.axesPixels=a(F.axes,R,x,k),F.onrender&&F.onrender(),y.bindFramebuffer(y.FRAMEBUFFER,null),y.viewport(0,0,x,k);var T=F.clearColor;y.clearColor(T[0],T[1],T[2],T[3]),y.clear(y.COLOR_BUFFER_BIT|y.DEPTH_BUFFER_BIT),y.depthMask(!0),y.colorMask(!0,!0,!0,!0),y.enable(y.DEPTH_TEST),y.depthFunc(y.LEQUAL),y.disable(y.BLEND),y.disable(y.CULL_FACE);var L=!1;A.enable&&(L=L||A.isTransparent(),A.draw(R)),S.axes=A,b.object&&S.draw(R),y.disable(y.CULL_FACE);for(var i=0;i<e;++i){var o=C[i];o.axes=A,o.pixelRatio=F.pixelRatio,o.isOpaque&&o.isOpaque()&&o.draw(R),o.isTransparent&&o.isTransparent()&&(L=!0)}if(L){_.shape=B,_.bind(),y.clear(y.DEPTH_BUFFER_BIT),y.colorMask(!1,!1,!1,!1),y.depthMask(!0),y.depthFunc(y.LESS),A.enable&&A.isTransparent()&&A.drawTransparent(R);for(var i=0;i<e;++i){var o=C[i];o.isOpaque&&o.isOpaque()&&o.draw(R)}y.enable(y.BLEND),y.blendEquation(y.FUNC_ADD),y.blendFunc(y.ONE,y.ONE_MINUS_SRC_ALPHA),y.colorMask(!0,!0,!0,!0),y.depthMask(!1),y.clearColor(0,0,0,0),y.clear(y.COLOR_BUFFER_BIT),A.isTransparent()&&A.drawTransparent(R);for(var i=0;i<e;++i){var o=C[i];o.isTransparent&&o.isTransparent()&&o.drawTransparent(R)}y.bindFramebuffer(y.FRAMEBUFFER,null),y.blendFunc(y.ONE,y.ONE_MINUS_SRC_ALPHA),y.disable(y.DEPTH_TEST),w.bind(),_.color[0].bind(0),w.uniforms.accumBuffer=0,c(y),y.disable(y.BLEND)}O=!1;for(var i=0;i<e;++i)C[i].dirty=!1}}}return function t(){e||F.contextLost||(Y(),requestAnimationFrame(t))}(),F.redraw=function(){e||(O=!0,Y())},F};var n=t(\\\"3d-view-controls\\\"),i=t(\\\"gl-axes3d\\\"),a=t(\\\"gl-axes3d/properties\\\"),o=t(\\\"gl-spikes3d\\\"),s=t(\\\"gl-select-static\\\"),l=t(\\\"gl-fbo\\\"),c=t(\\\"a-big-triangle\\\"),u=t(\\\"mouse-change\\\"),f=t(\\\"gl-mat4/perspective\\\"),h=t(\\\"./lib/shader\\\"),p=t(\\\"is-mobile\\\")({tablet:!0});function d(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function v(t){return\\\"boolean\\\"!=typeof t||t}},{\\\"./lib/shader\\\":276,\\\"3d-view-controls\\\":44,\\\"a-big-triangle\\\":47,\\\"gl-axes3d\\\":222,\\\"gl-axes3d/properties\\\":229,\\\"gl-fbo\\\":239,\\\"gl-mat4/perspective\\\":257,\\\"gl-select-static\\\":287,\\\"gl-spikes3d\\\":297,\\\"is-mobile\\\":403,\\\"mouse-change\\\":418}],278:[function(t,e,r){var n=t(\\\"glslify\\\");r.pointVertex=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position;\\\\n\\\\nuniform mat3 matrix;\\\\nuniform float pointSize;\\\\nuniform float pointCloud;\\\\n\\\\nhighp float rand(vec2 co) {\\\\n  highp float a = 12.9898;\\\\n  highp float b = 78.233;\\\\n  highp float c = 43758.5453;\\\\n  highp float d = dot(co.xy, vec2(a, b));\\\\n  highp float e = mod(d, 3.14);\\\\n  return fract(sin(e) * c);\\\\n}\\\\n\\\\nvoid main() {\\\\n  vec3 hgPosition = matrix * vec3(position, 1);\\\\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\\\\n    // if we don't jitter the point size a bit, overall point cloud\\\\n    // saturation 'jumps' on zooming, which is disturbing and confusing\\\\n  gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\\\\n  if(pointCloud != 0.0) { // pointCloud is truthy\\\\n    // get the same square surface as circle would be\\\\n    gl_PointSize *= 0.886;\\\\n  }\\\\n}\\\"]),r.pointFragment=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform vec4 color, borderColor;\\\\nuniform float centerFraction;\\\\nuniform float pointCloud;\\\\n\\\\nvoid main() {\\\\n  float radius;\\\\n  vec4 baseColor;\\\\n  if(pointCloud != 0.0) { // pointCloud is truthy\\\\n    if(centerFraction == 1.0) {\\\\n      gl_FragColor = color;\\\\n    } else {\\\\n      gl_FragColor = mix(borderColor, color, centerFraction);\\\\n    }\\\\n  } else {\\\\n    radius = length(2.0 * gl_PointCoord.xy - 1.0);\\\\n    if(radius > 1.0) {\\\\n      discard;\\\\n    }\\\\n    baseColor = mix(borderColor, color, step(radius, centerFraction));\\\\n    gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\\\\n  }\\\\n}\\\\n\\\"]),r.pickVertex=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position;\\\\nattribute vec4 pickId;\\\\n\\\\nuniform mat3 matrix;\\\\nuniform float pointSize;\\\\nuniform vec4 pickOffset;\\\\n\\\\nvarying vec4 fragId;\\\\n\\\\nvoid main() {\\\\n  vec3 hgPosition = matrix * vec3(position, 1);\\\\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\\\\n  gl_PointSize = pointSize;\\\\n\\\\n  vec4 id = pickId + pickOffset;\\\\n  id.y += floor(id.x / 256.0);\\\\n  id.x -= floor(id.x / 256.0) * 256.0;\\\\n\\\\n  id.z += floor(id.y / 256.0);\\\\n  id.y -= floor(id.y / 256.0) * 256.0;\\\\n\\\\n  id.w += floor(id.z / 256.0);\\\\n  id.z -= floor(id.z / 256.0) * 256.0;\\\\n\\\\n  fragId = id;\\\\n}\\\\n\\\"]),r.pickFragment=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragId;\\\\n\\\\nvoid main() {\\\\n  float radius = length(2.0 * gl_PointCoord.xy - 1.0);\\\\n  if(radius > 1.0) {\\\\n    discard;\\\\n  }\\\\n  gl_FragColor = fragId / 255.0;\\\\n}\\\\n\\\"])},{glslify:392}],279:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"typedarray-pool\\\"),o=t(\\\"./lib/shader\\\");function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,a=i(r),l=i(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),f=new s(t,a,l,c,u);return f.update(e),t.addObject(f),f};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r(\\\"sizeMin\\\",.5),this.sizeMax=r(\\\"sizeMax\\\",20),this.color=r(\\\"color\\\",[1,0,0,1]).slice(),this.areaRatio=r(\\\"areaRatio\\\",1),this.borderColor=r(\\\"borderColor\\\",[0,0,0,1]).slice(),this.blend=r(\\\"blend\\\",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),c=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e<n;e++)c[e]=e;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(c),i||a.free(l),o||a.free(c),this.pointCount=n,this.pickOffset=0},u.unifiedDraw=(l=[1,0,0,0,1,0,0,0,1],c=[0,0,0,0],function(t){var e=void 0!==t,r=e?this.pickShader:this.shader,n=this.plot.gl,i=this.plot.dataBox;if(0===this.pointCount)return t;var a=i[2]-i[0],o=i[3]-i[1],s=function(t,e){var r,n=0,i=t.length>>>1;for(r=0;r<i;r++){var a=t[2*r],o=t[2*r+1];a>=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var f=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return f&&!this.blend&&n.disable(n.BLEND),h&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),f&&!this.blend&&n.enable(n.BLEND),h&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r<n||r>=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{\\\"./lib/shader\\\":278,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288,\\\"typedarray-pool\\\":522}],280:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],f=e[2],h=e[3],p=r[0],d=r[1],g=r[2],v=r[3];(a=c*p+u*d+f*g+h*v)<0&&(a=-a,p=-p,d=-d,g=-g,v=-v);1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*f+l*g,t[3]=s*h+l*v,t}},{}],281:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t||0===t?t.toString():\\\"\\\"}},{}],282:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"vectorize-text\\\");e.exports=function(t,e){var r=i[e];r||(r=i[e]={});if(t in r)return r[t];for(var a=n(t,{textAlign:\\\"center\\\",textBaseline:\\\"middle\\\",lineHeight:1,font:e}),o=n(t,{triangles:!0,textAlign:\\\"center\\\",textBaseline:\\\"middle\\\",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;l<a.positions.length;++l)for(var c=a.positions[l],u=0;u<2;++u)s[0][u]=Math.min(s[0][u],c[u]),s[1][u]=Math.max(s[1][u],c[u]);return r[t]=[o,a,s]};var i={}},{\\\"vectorize-text\\\":527}],283:[function(t,e,r){var n=t(\\\"gl-shader\\\"),i=t(\\\"glslify\\\"),a=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 glyph;\\\\nattribute vec4 id;\\\\n\\\\nuniform vec4 highlightId;\\\\nuniform float highlightScale;\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 clipBounds[2];\\\\n\\\\nvarying vec4 interpColor;\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    float scale = 1.0;\\\\n    if(distance(highlightId, id) < 0.0001) {\\\\n      scale = highlightScale;\\\\n    }\\\\n\\\\n    vec4 worldPosition = model * vec4(position, 1);\\\\n    vec4 viewPosition = view * worldPosition;\\\\n    viewPosition = viewPosition / viewPosition.w;\\\\n    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\\\\n\\\\n    gl_Position = clipPosition;\\\\n    interpColor = color;\\\\n    pickId = id;\\\\n    dataCoordinate = position;\\\\n  }\\\\n}\\\"]),o=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 glyph;\\\\nattribute vec4 id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec2 screenSize;\\\\nuniform vec3 clipBounds[2];\\\\nuniform float highlightScale, pixelRatio;\\\\nuniform vec4 highlightId;\\\\n\\\\nvarying vec4 interpColor;\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    float scale = pixelRatio;\\\\n    if(distance(highlightId.bgr, id.bgr) < 0.001) {\\\\n      scale *= highlightScale;\\\\n    }\\\\n\\\\n    vec4 worldPosition = model * vec4(position, 1.0);\\\\n    vec4 viewPosition = view * worldPosition;\\\\n    vec4 clipPosition = projection * viewPosition;\\\\n    clipPosition /= clipPosition.w;\\\\n\\\\n    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\\\\n    interpColor = color;\\\\n    pickId = id;\\\\n    dataCoordinate = position;\\\\n  }\\\\n}\\\"]),s=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 glyph;\\\\nattribute vec4 id;\\\\n\\\\nuniform float highlightScale;\\\\nuniform vec4 highlightId;\\\\nuniform vec3 axes[2];\\\\nuniform mat4 model, view, projection;\\\\nuniform vec2 screenSize;\\\\nuniform vec3 clipBounds[2];\\\\nuniform float scale, pixelRatio;\\\\n\\\\nvarying vec4 interpColor;\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    float lscale = pixelRatio * scale;\\\\n    if(distance(highlightId, id) < 0.0001) {\\\\n      lscale *= highlightScale;\\\\n    }\\\\n\\\\n    vec4 clipCenter   = projection * view * model * vec4(position, 1);\\\\n    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\\\\n    vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\\\\n\\\\n    gl_Position = clipPosition;\\\\n    interpColor = color;\\\\n    pickId = id;\\\\n    dataCoordinate = dataPosition;\\\\n  }\\\\n}\\\\n\\\"]),l=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 fragClipBounds[2];\\\\nuniform float opacity;\\\\n\\\\nvarying vec4 interpColor;\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\\\\n\\\\n  gl_FragColor = interpColor * opacity;\\\\n}\\\\n\\\"]),c=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 fragClipBounds[2];\\\\nuniform float pickGroup;\\\\n\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickGroup, pickId.bgr);\\\\n}\\\"]),u=[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"glyph\\\",type:\\\"vec2\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"}],f={vertex:a,fragment:l,attributes:u},h={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},g={vertex:o,fragment:c,attributes:u},v={vertex:s,fragment:c,attributes:u};function m(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}r.createPerspective=function(t){return m(t,f)},r.createOrtho=function(t){return m(t,h)},r.createProject=function(t){return m(t,p)},r.createPickPerspective=function(t){return m(t,d)},r.createPickOrtho=function(t){return m(t,g)},r.createPickProject=function(t){return m(t,v)}},{\\\"gl-shader\\\":288,glslify:392}],284:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"is-string-blank\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"typedarray-pool\\\"),s=t(\\\"gl-mat4/multiply\\\"),l=t(\\\"./lib/shaders\\\"),c=t(\\\"./lib/glyphs\\\"),u=t(\\\"./lib/get-simple-string\\\"),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function p(t,e,r,n){return h(n,n),h(n,n),h(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function g(t,e,r,n,i,a,o,s,l,c,u,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=f,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),f=i(e),h=i(e),p=i(e),d=i(e),v=a(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),m=new g(e,r,n,o,f,h,p,d,v,s,c,u);return m.update(t),m};var v=g.prototype;v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.isTransparent=function(){if(this.opacity<1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]<1)return!0;return!1},v.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]>=1)return!0;return!1};var m=[0,0],y=[0,0,0],x=[0,0,0],b=[0,0,0,1],_=[0,0,0,1],w=f.slice(),k=[0,0,0],M=[[0,0,0],[0,0,0]];function A(t){return t[0]=t[1]=t[2]=0,t}function T(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function S(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function C(t,e,r,n,i){var a,o=e.axesProject,l=e.gl,c=t.uniforms,u=r.model||f,h=r.view||f,d=r.projection||f,g=e.axesBounds,v=function(t){for(var e=M,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);a=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],m[0]=2/l.drawingBufferWidth,m[1]=2/l.drawingBufferHeight,t.bind(),c.view=h,c.projection=d,c.screenSize=m,c.highlightId=e.highlightId,c.highlightScale=e.highlightScale,c.clipBounds=v,c.pickGroup=e.pickId/255,c.pixelRatio=e.pixelRatio;for(var C=0;C<3;++C)if(o[C]&&e.projectOpacity[C]<1===n){c.scale=e.projectScale[C],c.opacity=e.projectOpacity[C];for(var E=w,L=0;L<16;++L)E[L]=0;for(L=0;L<4;++L)E[5*L]=1;E[5*C]=0,a[C]<0?E[12+C]=g[0][C]:E[12+C]=g[1][C],s(E,u,E),c.model=E;var z=(C+1)%3,O=(C+2)%3,I=A(y),P=A(x);I[z]=1,P[O]=1;var D=p(0,0,0,T(b,I)),R=p(0,0,0,T(_,P));if(Math.abs(D[1])>Math.abs(R[1])){var B=D;D=R,R=B,B=I,I=P,P=B;var F=z;z=O,O=F}D[0]<0&&(I[z]=-1),R[1]>0&&(P[O]=-1);var N=0,j=0;for(L=0;L<4;++L)N+=Math.pow(u[4*z+L],2),j+=Math.pow(u[4*O+L],2);I[z]/=Math.sqrt(N),P[O]/=Math.sqrt(j),c.axes[0]=I,c.axes[1]=P,c.fragClipBounds[0]=S(k,v[0],C,-1e8),c.fragClipBounds[1]=S(k,v[1],C,1e8),e.vao.draw(l.TRIANGLES,e.vertexCount),e.lineWidth>0&&(l.lineWidth(e.lineWidth),e.vao.draw(l.LINES,e.lineVertexCount,e.vertexCount))}}var E=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function L(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity<1||a){t.bind();var s=t.uniforms;s.model=n.model||f,s.view=n.view||f,s.projection=n.projection||f,m[0]=2/o.drawingBufferWidth,m[1]=2/o.drawingBufferHeight,s.screenSize=m,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=E,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth>0&&(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}C(e,r,n,i),r.vao.unbind()}function z(t,e,r){var i;i=Array.isArray(t)?e<t.length?t[e]:void 0:t,i=u(i);var a=!0;n(i)&&(i=\\\"\\\\u25bc\\\",a=!1);var o=c(i,r);return{mesh:o[0],lines:o[1],bounds:o[2],visible:a}}v.draw=function(t){L(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},v.drawTransparent=function(t){L(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},v.drawPick=function(t){L(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},v.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},v.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(t){if(\\\"perspective\\\"in(t=t||{})&&(this.useOrtho=!t.perspective),\\\"orthographic\\\"in t&&(this.useOrtho=!!t.orthographic),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"project\\\"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if(\\\"projectScale\\\"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(\\\"projectOpacity\\\"in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}\\\"opacity\\\"in t&&(this.opacity=t.opacity),this.dirty=!0;var n=t.position,i=t.font||\\\"normal\\\",a=t.alignment||[0,0],s=[1/0,1/0,1/0],l=[-1/0,-1/0,-1/0],c=t.glyph,u=t.color,f=t.size,h=t.angle,p=t.lineColor,d=-1,g=0,v=0,m=0;if(n.length){m=n.length;t:for(var y=0;y<m;++y){for(var x=n[y],b=0;b<3;++b)if(isNaN(x[b])||!isFinite(x[b]))continue t;var _=(R=z(c,y,i)).mesh,w=R.lines,k=R.bounds;g+=3*_.cells.length,v+=2*w.edges.length}}var M=g+v,A=o.mallocFloat(3*M),T=o.mallocFloat(4*M),S=o.mallocFloat(2*M),C=o.mallocUint32(M);if(M>0){var E=0,L=g,O=[0,0,0,1],I=[0,0,0,1],P=Array.isArray(u)&&Array.isArray(u[0]),D=Array.isArray(p)&&Array.isArray(p[0]);t:for(y=0;y<m;++y){d+=1;for(x=n[y],b=0;b<3;++b){if(isNaN(x[b])||!isFinite(x[b]))continue t;l[b]=Math.max(l[b],x[b]),s[b]=Math.min(s[b],x[b])}_=(R=z(c,y,i)).mesh,w=R.lines,k=R.bounds;var R,B=R.visible;if(B)if(Array.isArray(u)){if(3===(F=P?y<u.length?u[y]:[0,0,0,0]:u).length){for(b=0;b<3;++b)O[b]=F[b];O[3]=1}else if(4===F.length)for(b=0;b<4;++b)O[b]=F[b]}else O[0]=O[1]=O[2]=0,O[3]=1;else O=[1,1,1,0];if(B)if(Array.isArray(p)){var F;if(3===(F=D?y<p.length?p[y]:[0,0,0,0]:p).length){for(b=0;b<3;++b)I[b]=F[b];I[b]=1}else if(4===F.length)for(b=0;b<4;++b)I[b]=F[b]}else I[0]=I[1]=I[2]=0,I[3]=1;else I=[1,1,1,0];var N=.5;B?Array.isArray(f)?N=y<f.length?+f[y]:12:f?N=+f:this.useOrtho&&(N=12):N=0;var j=0;Array.isArray(h)?j=y<h.length?+h[y]:0:h&&(j=+h);var V=Math.cos(j),U=Math.sin(j);for(x=n[y],b=0;b<3;++b)l[b]=Math.max(l[b],x[b]),s[b]=Math.min(s[b],x[b]);var q=[a[0],a[1]];for(b=0;b<2;++b)a[b]>0?q[b]*=1-k[0][b]:a[b]<0&&(q[b]*=1+k[1][b]);var H=_.cells||[],G=_.positions||[];for(b=0;b<H.length;++b)for(var W=H[b],Y=0;Y<3;++Y){for(var X=0;X<3;++X)A[3*E+X]=x[X];for(X=0;X<4;++X)T[4*E+X]=O[X];C[E]=d;var Z=G[W[Y]];S[2*E]=N*(V*Z[0]-U*Z[1]+q[0]),S[2*E+1]=N*(U*Z[0]+V*Z[1]+q[1]),E+=1}for(H=w.edges,G=w.positions,b=0;b<H.length;++b)for(W=H[b],Y=0;Y<2;++Y){for(X=0;X<3;++X)A[3*L+X]=x[X];for(X=0;X<4;++X)T[4*L+X]=I[X];C[L]=d;Z=G[W[Y]];S[2*L]=N*(V*Z[0]-U*Z[1]+q[0]),S[2*L+1]=N*(U*Z[0]+V*Z[1]+q[1]),L+=1}}}this.bounds=[s,l],this.points=n,this.pointCount=n.length,this.vertexCount=g,this.lineVertexCount=v,this.pointBuffer.update(A),this.colorBuffer.update(T),this.glyphBuffer.update(S),this.idBuffer.update(C),o.free(A),o.free(T),o.free(S),o.free(C)},v.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{\\\"./lib/get-simple-string\\\":281,\\\"./lib/glyphs\\\":282,\\\"./lib/shaders\\\":283,\\\"gl-buffer\\\":230,\\\"gl-mat4/multiply\\\":256,\\\"gl-vao\\\":310,\\\"is-string-blank\\\":406,\\\"typedarray-pool\\\":522}],285:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\");r.boxVertex=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 vertex;\\\\n\\\\nuniform vec2 cornerA, cornerB;\\\\n\\\\nvoid main() {\\\\n  gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\\\\n}\\\\n\\\"]),r.boxFragment=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform vec4 color;\\\\n\\\\nvoid main() {\\\\n  gl_FragColor = color;\\\\n}\\\\n\\\"])},{glslify:392}],286:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"./lib/shaders\\\");function o(t,e,r){this.plot=t,this.boxBuffer=e,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}e.exports=function(t,e){var r=t.gl,s=i(r,[0,0,0,1,1,0,1,1]),l=n(r,a.boxVertex,a.boxFragment),c=new o(t,s,l);return c.update(e),t.addOverlay(c),c};var s=o.prototype;s.draw=function(){if(this.enabled){var t=this.plot,e=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),a=this.borderColor,o=t.box,s=t.screenBox,l=t.dataBox,c=t.viewBox,u=t.pixelRatio,f=(e[0]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],h=(e[1]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1],p=(e[2]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],d=(e[3]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1];if(f=Math.max(f,c[0]),h=Math.max(h,c[1]),p=Math.min(p,c[2]),d=Math.min(d,c[3]),!(p<f||d<h)){o.bind();var g=s[2]-s[0],v=s[3]-s[1];if(this.outerFill&&(o.drawBox(0,0,g,h,i),o.drawBox(0,h,f,d,i),o.drawBox(0,d,g,v,i),o.drawBox(p,h,g,d,i)),this.innerFill&&o.drawBox(f,h,p,d,n),r>0){var m=r*u;o.drawBox(f-m,h-m,p+m,h+m,a),o.drawBox(f-m,d-m,p+m,d+m,a),o.drawBox(f-m,h-m,f+m,d+m,a),o.drawBox(p-m,h-m,p+m,d+m,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{\\\"./lib/shaders\\\":285,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288}],287:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=n(t,e),a=i.mallocUint8(e[0]*e[1]*4);return new c(t,r,a)};var n=t(\\\"gl-fbo\\\"),i=t(\\\"typedarray-pool\\\"),a=t(\\\"ndarray\\\"),o=t(\\\"bit-twiddle\\\").nextPow2,s=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"array\\\",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},\\\"scalar\\\",\\\"scalar\\\",\\\"index\\\"],pre:{body:\\\"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}\\\",args:[],thisVars:[\\\"this_closestD2\\\",\\\"this_closestX\\\",\\\"this_closestY\\\"],localVars:[]},body:{body:\\\"{if(_inline_16_arg0_<255||_inline_16_arg1_<255||_inline_16_arg2_<255||_inline_16_arg3_<255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_f<this_closestD2&&(this_closestD2=_inline_16_f,this_closestX=_inline_16_arg6_[0],this_closestY=_inline_16_arg6_[1])}}\\\",args:[{name:\\\"_inline_16_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg1_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg4_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg5_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg6_\\\",lvalue:!1,rvalue:!0,count:4}],thisVars:[\\\"this_closestD2\\\",\\\"this_closestX\\\",\\\"this_closestY\\\"],localVars:[\\\"_inline_16_a\\\",\\\"_inline_16_f\\\",\\\"_inline_16_l\\\"]},post:{body:\\\"{return[this_closestX,this_closestY,this_closestD2]}\\\",args:[],thisVars:[\\\"this_closestD2\\\",\\\"this_closestX\\\",\\\"this_closestY\\\"],localVars:[]},debug:!1,funcName:\\\"cwise\\\",blockSize:64});function l(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function c(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var u=c.prototype;Object.defineProperty(u,\\\"shape\\\",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;a<r*e*4;++a)n[a]=255}return t}}}),u.begin=function(){var t=this.gl;this.shape;t&&(this.fbo.bind(),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT))},u.end=function(){var t=this.gl;t&&(t.bindFramebuffer(t.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},u.query=function(t,e,r){if(!this.gl)return null;var n=this.fbo.shape.slice();t|=0,e|=0,\\\"number\\\"!=typeof r&&(r=1);var i=0|Math.min(Math.max(t-r,0),n[0]),o=0|Math.min(Math.max(t+r,0),n[0]),c=0|Math.min(Math.max(e-r,0),n[1]),u=0|Math.min(Math.max(e+r,0),n[1]);if(o<=i||u<=c)return null;var f=[o-i,u-c],h=a(this.buffer,[f[0],f[1],4],[4,4*n[0],1],4*(i+n[0]*c)),p=s(h.hi(f[0],f[1],1),r,r),d=p[0],g=p[1];return d<0||Math.pow(this.radius,2)<p[2]?null:new l(d+i|0,g+c|0,h.get(d,g,0),[h.get(d,g,1),h.get(d,g,2),h.get(d,g,3)],Math.sqrt(p[2]))},u.dispose=function(){this.gl&&(this.fbo.dispose(),i.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},{\\\"bit-twiddle\\\":80,\\\"cwise/lib/wrapper\\\":137,\\\"gl-fbo\\\":239,ndarray:433,\\\"typedarray-pool\\\":522}],288:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/create-uniforms\\\"),i=t(\\\"./lib/create-attributes\\\"),a=t(\\\"./lib/reflect\\\"),o=t(\\\"./lib/shader-cache\\\"),s=t(\\\"./lib/runtime-reflect\\\"),l=t(\\\"./lib/GLError\\\");function c(t){this.gl=t,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var u=c.prototype;function f(t,e){return t.name<e.name?-1:1}u.bind=function(){var t;this.program||this._relink();var e=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(e>r)for(t=r;t<e;t++)this.gl.enableVertexAttribArray(t);else if(r>e)for(t=e;t<r;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=e,this.gl.useProgram(this.program)},u.dispose=function(){for(var t=this.gl.lastAttribCount,e=0;e<t;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},u.update=function(t,e,r,c){if(!e||1===arguments.length){var u=t;t=u.vertex,e=u.fragment,r=u.uniforms,c=u.attributes}var h=this,p=h.gl,d=h._vref;h._vref=o.shader(p,p.VERTEX_SHADER,t),d&&d.dispose(),h.vertShader=h._vref.shader;var g=this._fref;if(h._fref=o.shader(p,p.FRAGMENT_SHADER,e),g&&g.dispose(),h.fragShader=h._fref.shader,!r||!c){var v=p.createProgram();if(p.attachShader(v,h.fragShader),p.attachShader(v,h.vertShader),p.linkProgram(v),!p.getProgramParameter(v,p.LINK_STATUS)){var m=p.getProgramInfoLog(v);throw new l(m,\\\"Error linking program:\\\"+m)}r=r||s.uniforms(p,v),c=c||s.attributes(p,v),p.deleteProgram(v)}(c=c.slice()).sort(f);var y,x=[],b=[],_=[];for(y=0;y<c.length;++y){var w=c[y];if(w.type.indexOf(\\\"mat\\\")>=0){for(var k=0|w.type.charAt(w.type.length-1),M=new Array(k),A=0;A<k;++A)M[A]=_.length,b.push(w.name+\\\"[\\\"+A+\\\"]\\\"),\\\"number\\\"==typeof w.location?_.push(w.location+A):Array.isArray(w.location)&&w.location.length===k&&\\\"number\\\"==typeof w.location[A]?_.push(0|w.location[A]):_.push(-1);x.push({name:w.name,type:w.type,locations:M})}else x.push({name:w.name,type:w.type,locations:[_.length]}),b.push(w.name),\\\"number\\\"==typeof w.location?_.push(0|w.location):_.push(-1)}var T=0;for(y=0;y<_.length;++y)if(_[y]<0){for(;_.indexOf(T)>=0;)T+=1;_[y]=T}var S=new Array(r.length);function C(){h.program=o.program(p,h._vref,h._fref,b,_);for(var t=0;t<r.length;++t)S[t]=p.getUniformLocation(h.program,r[t].name)}C(),h._relink=C,h.types={uniforms:a(r),attributes:a(c)},h.attributes=i(p,h,x,_),Object.defineProperty(h,\\\"uniforms\\\",n(p,h,r,S))},e.exports=function(t,e,r,n,i){var a=new c(t);return a.update(e,r,n,i),a}},{\\\"./lib/GLError\\\":289,\\\"./lib/create-attributes\\\":290,\\\"./lib/create-uniforms\\\":291,\\\"./lib/reflect\\\":292,\\\"./lib/runtime-reflect\\\":293,\\\"./lib/shader-cache\\\":294}],289:[function(t,e,r){function n(t,e,r){this.shortMessage=e||\\\"\\\",this.longMessage=r||\\\"\\\",this.rawError=t||\\\"\\\",this.message=\\\"gl-shader: \\\"+(e||t||\\\"\\\")+(r?\\\"\\\\n\\\"+r:\\\"\\\"),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name=\\\"GLError\\\",n.prototype.constructor=n,e.exports=n},{}],290:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,i){for(var a={},l=0,c=r.length;l<c;++l){var u=r[l],f=u.name,h=u.type,p=u.locations;switch(h){case\\\"bool\\\":case\\\"int\\\":case\\\"float\\\":o(t,e,p[0],i,1,a,f);break;default:if(h.indexOf(\\\"vec\\\")>=0){var d=h.charCodeAt(h.length-1)-48;if(d<2||d>4)throw new n(\\\"\\\",\\\"Invalid data type for attribute \\\"+f+\\\": \\\"+h);o(t,e,p[0],i,d,a,f)}else{if(!(h.indexOf(\\\"mat\\\")>=0))throw new n(\\\"\\\",\\\"Unknown data type for attribute \\\"+f+\\\": \\\"+h);var d=h.charCodeAt(h.length-1)-48;if(d<2||d>4)throw new n(\\\"\\\",\\\"Invalid data type for attribute \\\"+f+\\\": \\\"+h);s(t,e,p,i,d,a,f)}}}return a};var n=t(\\\"./GLError\\\");function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;function o(t,e,r,n,a,o,s){for(var l=[\\\"gl\\\",\\\"v\\\"],c=[],u=0;u<a;++u)l.push(\\\"x\\\"+u),c.push(\\\"x\\\"+u);l.push(\\\"if(x0.length===void 0){return gl.vertexAttrib\\\"+a+\\\"f(v,\\\"+c.join()+\\\")}else{return gl.vertexAttrib\\\"+a+\\\"fv(v,x0)}\\\");var f=Function.apply(null,l),h=new i(t,e,r,n,a,f);Object.defineProperty(o,s,{set:function(e){return t.disableVertexAttribArray(n[r]),f(t,n[r],e),e},get:function(){return h},enumerable:!0})}function s(t,e,r,n,i,a,s){for(var l=new Array(i),c=new Array(i),u=0;u<i;++u)o(t,e,r[u],n,i,l,u),c[u]=l[u];Object.defineProperty(l,\\\"location\\\",{set:function(t){if(Array.isArray(t))for(var e=0;e<i;++e)c[e].location=t[e];else for(e=0;e<i;++e)c[e].location=t+e;return t},get:function(){for(var t=new Array(i),e=0;e<i;++e)t[e]=n[r[e]];return t},enumerable:!0}),l.pointer=function(e,a,o,s){e=e||t.FLOAT,a=!!a,o=o||i*i,s=s||0;for(var l=0;l<i;++l){var c=n[r[l]];t.vertexAttribPointer(c,i,e,a,o,s+l*i),t.enableVertexAttribArray(c)}};var f=new Array(i),h=t[\\\"vertexAttrib\\\"+i+\\\"fv\\\"];Object.defineProperty(a,s,{set:function(e){for(var a=0;a<i;++a){var o=n[r[a]];if(t.disableVertexAttribArray(o),Array.isArray(e[0]))h.call(t,o,e[a]);else{for(var s=0;s<i;++s)f[s]=e[i*a+s];h.call(t,o,f)}}return e},get:function(){return l},enumerable:!0})}a.pointer=function(t,e,r,n){var i=this._gl,a=this._locations[this._index];i.vertexAttribPointer(a,this._dimension,t||i.FLOAT,!!e,r||0,n||0),i.enableVertexAttribArray(a)},a.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(a,\\\"location\\\",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{\\\"./GLError\\\":289}],291:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./reflect\\\"),i=t(\\\"./GLError\\\");function a(t){return new Function(\\\"y\\\",\\\"return function(){return y}\\\")(t)}function o(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}e.exports=function(t,e,r,s){function l(t,e,r){switch(r){case\\\"bool\\\":case\\\"int\\\":case\\\"sampler2D\\\":case\\\"samplerCube\\\":return\\\"gl.uniform1i(locations[\\\"+e+\\\"],obj\\\"+t+\\\")\\\";case\\\"float\\\":return\\\"gl.uniform1f(locations[\\\"+e+\\\"],obj\\\"+t+\\\")\\\";default:var n=r.indexOf(\\\"vec\\\");if(!(0<=n&&n<=1&&r.length===4+n)){if(0===r.indexOf(\\\"mat\\\")&&4===r.length){var a=r.charCodeAt(r.length-1)-48;if(a<2||a>4)throw new i(\\\"\\\",\\\"Invalid uniform dimension type for matrix \\\"+name+\\\": \\\"+r);return\\\"gl.uniformMatrix\\\"+a+\\\"fv(locations[\\\"+e+\\\"],false,obj\\\"+t+\\\")\\\"}throw new i(\\\"\\\",\\\"Unknown uniform data type for \\\"+name+\\\": \\\"+r)}var a=r.charCodeAt(r.length-1)-48;if(a<2||a>4)throw new i(\\\"\\\",\\\"Invalid data type\\\");switch(r.charAt(0)){case\\\"b\\\":case\\\"i\\\":return\\\"gl.uniform\\\"+a+\\\"iv(locations[\\\"+e+\\\"],obj\\\"+t+\\\")\\\";case\\\"v\\\":return\\\"gl.uniform\\\"+a+\\\"fv(locations[\\\"+e+\\\"],obj\\\"+t+\\\")\\\";default:throw new i(\\\"\\\",\\\"Unrecognized data type for vector \\\"+name+\\\": \\\"+r)}}}function c(e){for(var n=[\\\"return function updateProperty(obj){\\\"],i=function t(e,r){if(\\\"object\\\"!=typeof r)return[[e,r]];var n=[];for(var i in r){var a=r[i],o=e;parseInt(i)+\\\"\\\"===i?o+=\\\"[\\\"+i+\\\"]\\\":o+=\\\".\\\"+i,\\\"object\\\"==typeof a?n.push.apply(n,t(o,a)):n.push([o,a])}return n}(\\\"\\\",e),a=0;a<i.length;++a){var o=i[a],c=o[0],u=o[1];s[u]&&n.push(l(c,u,r[u].type))}n.push(\\\"return obj}\\\");var f=new Function(\\\"gl\\\",\\\"locations\\\",n.join(\\\"\\\\n\\\"));return f(t,s)}function u(n,l,u){if(\\\"object\\\"==typeof u){var h=f(u);Object.defineProperty(n,l,{get:a(h),set:c(u),enumerable:!0,configurable:!1})}else s[u]?Object.defineProperty(n,l,{get:(p=u,new Function(\\\"gl\\\",\\\"wrapper\\\",\\\"locations\\\",\\\"return function(){return gl.getUniform(wrapper.program,locations[\\\"+p+\\\"])}\\\")(t,e,s)),set:c(u),enumerable:!0,configurable:!1}):n[l]=function(t){switch(t){case\\\"bool\\\":return!1;case\\\"int\\\":case\\\"sampler2D\\\":case\\\"samplerCube\\\":case\\\"float\\\":return 0;default:var e=t.indexOf(\\\"vec\\\");if(0<=e&&e<=1&&t.length===4+e){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new i(\\\"\\\",\\\"Invalid data type\\\");return\\\"b\\\"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf(\\\"mat\\\")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new i(\\\"\\\",\\\"Invalid uniform dimension type for matrix \\\"+name+\\\": \\\"+t);return o(r*r,0)}throw new i(\\\"\\\",\\\"Unknown uniform data type for \\\"+name+\\\": \\\"+t)}}(r[u].type);var p}function f(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r<t.length;++r)u(e,r,t[r])}else for(var n in e={},t)u(e,n,t[n]);return e}var h=n(r,!0);return{get:a(f(h)),set:c(h),enumerable:!0,configurable:!0}}},{\\\"./GLError\\\":289,\\\"./reflect\\\":292}],292:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r={},n=0;n<t.length;++n)for(var i=t[n].name,a=i.split(\\\".\\\"),o=r,s=0;s<a.length;++s){var l=a[s].split(\\\"[\\\");if(l.length>1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c<l.length;++c){var u=parseInt(l[c]);c<l.length-1||s<a.length-1?(u in o||(c<l.length-1?o[u]=[]:o[u]={}),o=o[u]):o[u]=e?n:t[n].type}}else s<a.length-1?(l[0]in o||(o[l[0]]={}),o=o[l[0]]):o[l[0]]=e?n:t[n].type}return r}},{}],293:[function(t,e,r){\\\"use strict\\\";r.uniforms=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),n=[],i=0;i<r;++i){var o=t.getActiveUniform(e,i);if(o){var s=a(t,o.type);if(o.size>1)for(var l=0;l<o.size;++l)n.push({name:o.name.replace(\\\"[0]\\\",\\\"[\\\"+l+\\\"]\\\"),type:s});else n.push({name:o.name,type:s})}}return n},r.attributes=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),n=[],i=0;i<r;++i){var o=t.getActiveAttrib(e,i);o&&n.push({name:o.name,type:a(t,o.type)})}return n};var n={FLOAT:\\\"float\\\",FLOAT_VEC2:\\\"vec2\\\",FLOAT_VEC3:\\\"vec3\\\",FLOAT_VEC4:\\\"vec4\\\",INT:\\\"int\\\",INT_VEC2:\\\"ivec2\\\",INT_VEC3:\\\"ivec3\\\",INT_VEC4:\\\"ivec4\\\",BOOL:\\\"bool\\\",BOOL_VEC2:\\\"bvec2\\\",BOOL_VEC3:\\\"bvec3\\\",BOOL_VEC4:\\\"bvec4\\\",FLOAT_MAT2:\\\"mat2\\\",FLOAT_MAT3:\\\"mat3\\\",FLOAT_MAT4:\\\"mat4\\\",SAMPLER_2D:\\\"sampler2D\\\",SAMPLER_CUBE:\\\"samplerCube\\\"},i=null;function a(t,e){if(!i){var r=Object.keys(n);i={};for(var a=0;a<r.length;++a){var o=r[a];i[t[o]]=n[o]}}return i[e]}},{}],294:[function(t,e,r){\\\"use strict\\\";r.shader=function(t,e,r){return u(t).getShaderReference(e,r)},r.program=function(t,e,r,n,i){return u(t).getProgram(e,r,n,i)};var n=t(\\\"./GLError\\\"),i=t(\\\"gl-format-compiler-error\\\"),a=new(\\\"undefined\\\"==typeof WeakMap?t(\\\"weakmap-shim\\\"):WeakMap),o=0;function s(t,e,r,n,i,a,o){this.id=t,this.src=e,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function l(t){this.gl=t,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var t=this.cache,e=t.gl,r=this.programs,n=0,i=r.length;n<i;++n){var a=t.programs[r[n]];a&&(delete t.programs[n],e.deleteProgram(a))}e.deleteShader(this.shader),delete t.shaders[this.type===e.FRAGMENT_SHADER|0][this.src]}};var c=l.prototype;function u(t){var e=a.get(t);return e||(e=new l(t),a.set(t,e)),e}c.getShaderReference=function(t,e){var r=this.gl,a=this.shaders[t===r.FRAGMENT_SHADER|0],l=a[e];if(l&&r.isShader(l.shader))l.count+=1;else{var c=function(t,e,r){var a=t.createShader(e);if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(a);try{var s=i(o,r,e)}catch(t){throw console.warn(\\\"Failed to format compiler error: \\\"+t),new n(o,\\\"Error compiling shader:\\\\n\\\"+o)}throw new n(o,s.short,s.long)}return a}(r,t,e);l=a[e]=new s(o++,e,t,c,[],1,this)}return l},c.getProgram=function(t,e,r,i){var a=[t.id,e.id,r.join(\\\":\\\"),i.join(\\\":\\\")].join(\\\"@\\\"),o=this.programs[a];return o&&this.gl.isProgram(o)||(this.programs[a]=o=function(t,e,r,i,a){var o=t.createProgram();t.attachShader(o,e),t.attachShader(o,r);for(var s=0;s<i.length;++s)t.bindAttribLocation(o,a[s],i[s]);if(t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS)){var l=t.getProgramInfoLog(o);throw new n(l,\\\"Error linking program: \\\"+l)}return o}(this.gl,t.shader,e.shader,r,i),t.programs.push(a),e.programs.push(a)),o}},{\\\"./GLError\\\":289,\\\"gl-format-compiler-error\\\":240,\\\"weakmap-shim\\\":532}],295:[function(t,e,r){\\\"use strict\\\";function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}e.exports=function(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r};var i=n.prototype;i.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},i.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),c=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,c,s[0],c,e[0],r[0]),t[1]&&a.drawLine(l,c,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,c,s[2],c,e[2],r[2]),t[3]&&a.drawLine(l,c,l,s[3],e[3],r[3])}},i.dispose=function(){this.plot.removeOverlay(this)}},{}],296:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position, color;\\\\nattribute float weight;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 coordinates[3];\\\\nuniform vec4 colors[3];\\\\nuniform vec2 screenShape;\\\\nuniform float lineWidth;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  vec3 vertexPosition = mix(coordinates[0],\\\\n    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\\\\n\\\\n  vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\\\\n  vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\\\\n  vec2 delta = weight * clipOffset * screenShape;\\\\n  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\\\\n\\\\n  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\\\\n  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\\\\n}\\\\n\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  gl_FragColor = fragColor;\\\\n}\\\"]);e.exports=function(t){return i(t,a,o,null,[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec3\\\"},{name:\\\"weight\\\",type:\\\"float\\\"}])}},{\\\"gl-shader\\\":288,glslify:392}],297:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"./shaders/index\\\");e.exports=function(t,e){var r=[];function o(t,e,n,i,a,o){var s=[t,e,n,0,0,0,1];s[i+3]=1,s[i]=a,r.push.apply(r,s),s[6]=-1,r.push.apply(r,s),s[i]=o,r.push.apply(r,s),r.push.apply(r,s),s[6]=1,r.push.apply(r,s),s[i]=a,r.push.apply(r,s)}o(0,0,0,0,0,1),o(0,0,0,1,0,1),o(0,0,0,2,0,1),o(1,0,0,1,-1,1),o(1,0,0,2,-1,1),o(0,1,0,0,-1,1),o(0,1,0,2,-1,1),o(0,0,1,0,-1,1),o(0,0,1,1,-1,1);var l=n(t,r),c=i(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),u=a(t);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var f=new s(t,l,c,u);return f.update(e),f};var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var l=s.prototype,c=[0,0,0],u=[0,0,0],f=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(t){},l.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||o,s=t.view||o,l=t.projection||o;this.axes&&(i=this.axes.lastCubeProps.axis);for(var h=c,p=u,d=0;d<3;++d)i&&i[d]<0?(h[d]=this.bounds[0][d],p[d]=this.bounds[1][d]):(h[d]=this.bounds[1][d],p[d]=this.bounds[0][d]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=s,n.uniforms.projection=l,n.uniforms.coordinates=[this.position,h,p],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(d=0;d<3;++d)n.uniforms.lineWidth=this.lineWidth[d]*this.pixelRatio,this.enabled[d]&&(r.draw(e.TRIANGLES,6,6*d),this.drawSides[d]&&r.draw(e.TRIANGLES,12,18+12*d));r.unbind()},l.update=function(t){t&&(\\\"bounds\\\"in t&&(this.bounds=t.bounds),\\\"position\\\"in t&&(this.position=t.position),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"colors\\\"in t&&(this.colors=t.colors),\\\"enabled\\\"in t&&(this.enabled=t.enabled),\\\"drawSides\\\"in t&&(this.drawSides=t.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\\\"./shaders/index\\\":296,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310}],298:[function(t,e,r){arguments[4][232][0].apply(r,arguments)},{barycentric:61,dup:232,\\\"polytope-closest-point/lib/closest_point_2d.js\\\":464}],299:[function(t,e,r){var n=t(\\\"glslify\\\"),i=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat inverse(float m) {\\\\n  return 1.0 / m;\\\\n}\\\\n\\\\nmat2 inverse(mat2 m) {\\\\n  return mat2(m[1][1],-m[0][1],\\\\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\\\\n}\\\\n\\\\nmat3 inverse(mat3 m) {\\\\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\\\\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\\\\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\\\\n\\\\n  float b01 = a22 * a11 - a12 * a21;\\\\n  float b11 = -a22 * a10 + a12 * a20;\\\\n  float b21 = a21 * a10 - a11 * a20;\\\\n\\\\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\\\\n\\\\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\\\\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\\\\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\\\\n}\\\\n\\\\nmat4 inverse(mat4 m) {\\\\n  float\\\\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\\\\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\\\\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\\\\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\\\\n\\\\n      b00 = a00 * a11 - a01 * a10,\\\\n      b01 = a00 * a12 - a02 * a10,\\\\n      b02 = a00 * a13 - a03 * a10,\\\\n      b03 = a01 * a12 - a02 * a11,\\\\n      b04 = a01 * a13 - a03 * a11,\\\\n      b05 = a02 * a13 - a03 * a12,\\\\n      b06 = a20 * a31 - a21 * a30,\\\\n      b07 = a20 * a32 - a22 * a30,\\\\n      b08 = a20 * a33 - a23 * a30,\\\\n      b09 = a21 * a32 - a22 * a31,\\\\n      b10 = a21 * a33 - a23 * a31,\\\\n      b11 = a22 * a33 - a23 * a32,\\\\n\\\\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\\\\n\\\\n  return mat4(\\\\n      a11 * b11 - a12 * b10 + a13 * b09,\\\\n      a02 * b10 - a01 * b11 - a03 * b09,\\\\n      a31 * b05 - a32 * b04 + a33 * b03,\\\\n      a22 * b04 - a21 * b05 - a23 * b03,\\\\n      a12 * b08 - a10 * b11 - a13 * b07,\\\\n      a00 * b11 - a02 * b08 + a03 * b07,\\\\n      a32 * b02 - a30 * b05 - a33 * b01,\\\\n      a20 * b05 - a22 * b02 + a23 * b01,\\\\n      a10 * b10 - a11 * b08 + a13 * b06,\\\\n      a01 * b08 - a00 * b10 - a03 * b06,\\\\n      a30 * b04 - a31 * b02 + a33 * b00,\\\\n      a21 * b02 - a20 * b04 - a23 * b00,\\\\n      a11 * b07 - a10 * b09 - a12 * b06,\\\\n      a00 * b09 - a01 * b07 + a02 * b06,\\\\n      a31 * b01 - a30 * b03 - a32 * b00,\\\\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\\\\n}\\\\n\\\\nvec3 getOrthogonalVector(vec3 v) {\\\\n  // Return up-vector for only-z vector.\\\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\\\n  // Assign z = 0, x = -b, y = a:\\\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\\\n    return normalize(vec3(-v.y, v.x, 0.0));\\\\n  } else {\\\\n    return normalize(vec3(0.0, v.z, -v.y));\\\\n  }\\\\n}\\\\n\\\\n// Calculate the tube vertex and normal at the given index.\\\\n//\\\\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\\\\n//\\\\n// Each tube segment is made up of a ring of vertices.\\\\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\\\\n// The indexes of tube segments run from 0 to 8.\\\\n//\\\\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\\\\n  float segmentCount = 8.0;\\\\n\\\\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\\\\n\\\\n  vec3 u = getOrthogonalVector(d);\\\\n  vec3 v = normalize(cross(u, d));\\\\n\\\\n  vec3 x = u * cos(angle) * length(d);\\\\n  vec3 y = v * sin(angle) * length(d);\\\\n  vec3 v3 = x + y;\\\\n\\\\n  normal = normalize(v3);\\\\n\\\\n  return v3;\\\\n}\\\\n\\\\nattribute vec4 vector;\\\\nattribute vec4 color, position;\\\\nattribute vec2 uv;\\\\nuniform float tubeScale;\\\\n\\\\nuniform mat4 model\\\\n           , view\\\\n           , projection;\\\\nuniform vec3 eyePosition\\\\n           , lightPosition;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data\\\\n           , f_position;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  // Scale the vector magnitude to stay constant with\\\\n  // model & view changes.\\\\n  vec3 normal;\\\\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\\\\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\\\n  normal = normalize(normal * inverse(mat3(model)));\\\\n\\\\n  gl_Position      = projection * view * tubePosition;\\\\n  f_color          = color;\\\\n  f_normal         = normal;\\\\n  f_data           = tubePosition.xyz;\\\\n  f_position       = position.xyz;\\\\n  f_eyeDirection   = eyePosition   - tubePosition.xyz;\\\\n  f_lightDirection = lightPosition - tubePosition.xyz;\\\\n  f_uv             = uv;\\\\n}\\\\n\\\"]),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat beckmannDistribution(float x, float roughness) {\\\\n  float NdotH = max(x, 0.0001);\\\\n  float cos2Alpha = NdotH * NdotH;\\\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\\\n  float roughness2 = roughness * roughness;\\\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\\\n  return exp(tan2Alpha / roughness2) / denom;\\\\n}\\\\n\\\\nfloat cookTorranceSpecular(\\\\n  vec3 lightDirection,\\\\n  vec3 viewDirection,\\\\n  vec3 surfaceNormal,\\\\n  float roughness,\\\\n  float fresnel) {\\\\n\\\\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\\\\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\\\\n\\\\n  //Half angle vector\\\\n  vec3 H = normalize(lightDirection + viewDirection);\\\\n\\\\n  //Geometric term\\\\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\\\\n  float VdotH = max(dot(viewDirection, H), 0.000001);\\\\n  float LdotH = max(dot(lightDirection, H), 0.000001);\\\\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\\\\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\\\\n  float G = min(1.0, min(G1, G2));\\\\n  \\\\n  //Distribution term\\\\n  float D = beckmannDistribution(NdotH, roughness);\\\\n\\\\n  //Fresnel term\\\\n  float F = pow(1.0 - VdotN, fresnel);\\\\n\\\\n  //Multiply terms and done\\\\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform float roughness\\\\n            , fresnel\\\\n            , kambient\\\\n            , kdiffuse\\\\n            , kspecular\\\\n            , opacity;\\\\nuniform sampler2D texture;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data\\\\n           , f_position;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  vec3 N = normalize(f_normal);\\\\n  vec3 L = normalize(f_lightDirection);\\\\n  vec3 V = normalize(f_eyeDirection);\\\\n\\\\n  if(!gl_FrontFacing) {\\\\n    N = -N;\\\\n  }\\\\n\\\\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\\\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\\\n\\\\n  vec4 surfaceColor =  texture2D(texture, f_uv);\\\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\\\n\\\\n  gl_FragColor = litColor * opacity;\\\\n}\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvec3 getOrthogonalVector(vec3 v) {\\\\n  // Return up-vector for only-z vector.\\\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\\\n  // Assign z = 0, x = -b, y = a:\\\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\\\n    return normalize(vec3(-v.y, v.x, 0.0));\\\\n  } else {\\\\n    return normalize(vec3(0.0, v.z, -v.y));\\\\n  }\\\\n}\\\\n\\\\n// Calculate the tube vertex and normal at the given index.\\\\n//\\\\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\\\\n//\\\\n// Each tube segment is made up of a ring of vertices.\\\\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\\\\n// The indexes of tube segments run from 0 to 8.\\\\n//\\\\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\\\\n  float segmentCount = 8.0;\\\\n\\\\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\\\\n\\\\n  vec3 u = getOrthogonalVector(d);\\\\n  vec3 v = normalize(cross(u, d));\\\\n\\\\n  vec3 x = u * cos(angle) * length(d);\\\\n  vec3 y = v * sin(angle) * length(d);\\\\n  vec3 v3 = x + y;\\\\n\\\\n  normal = normalize(v3);\\\\n\\\\n  return v3;\\\\n}\\\\n\\\\nattribute vec4 vector;\\\\nattribute vec4 position;\\\\nattribute vec4 id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform float tubeScale;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  vec3 normal;\\\\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\\\\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\\\n\\\\n  gl_Position = projection * view * tubePosition;\\\\n  f_id        = id;\\\\n  f_position  = position.xyz;\\\\n}\\\\n\\\"]),s=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3  clipBounds[2];\\\\nuniform float pickId;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\\\n}\\\"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:\\\"position\\\",type:\\\"vec4\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"},{name:\\\"vector\\\",type:\\\"vec4\\\"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:\\\"position\\\",type:\\\"vec4\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"},{name:\\\"vector\\\",type:\\\"vec4\\\"}]}},{glslify:392}],300:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"gl-texture2d\\\"),s=t(\\\"normals\\\"),l=t(\\\"gl-mat4/multiply\\\"),c=t(\\\"gl-mat4/invert\\\"),u=t(\\\"ndarray\\\"),f=t(\\\"colormap\\\"),h=t(\\\"simplicial-complex-contour\\\"),p=t(\\\"typedarray-pool\\\"),d=t(\\\"./shaders\\\"),g=(t(\\\"./closest-point\\\"),d.meshShader),v=d.pickShader,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,v,y,x,b,_,w,k,M,A,T,S,C){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleVectors=c,this.triangleColors=f,this.triangleNormals=p,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=g,this.edgeColors=y,this.edgeUVs=x,this.edgeIds=v,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=_,this.pointColors=k,this.pointUVs=M,this.pointSizes=A,this.pointIds=w,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=C,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!1,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.tubeScale=1,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1]}var x=y.prototype;function b(t){var e=n(t,v.vertex,v.fragment,null,v.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity>=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var c=r[l],u=0;u<2;++u){var f=c[0];2===c.length&&(f=c[u]);for(var d=n[f][0],g=n[f][1],v=i[f],m=1-v,y=this.positions[d],x=this.positions[g],b=0;b<3;++b)o[s++]=v*y[b]+m*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},x.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\\\"contourEnable\\\"in t&&(this.contourEnable=t.contourEnable),\\\"contourColor\\\"in t&&(this.contourColor=t.contourColor),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"lightPosition\\\"in t&&(this.lightPosition=t.lightPosition),\\\"opacity\\\"in t&&(this.opacity=t.opacity),\\\"ambient\\\"in t&&(this.ambientLight=t.ambient),\\\"diffuse\\\"in t&&(this.diffuseLight=t.diffuse),\\\"specular\\\"in t&&(this.specularLight=t.specular),\\\"roughness\\\"in t&&(this.roughness=t.roughness),\\\"fresnel\\\"in t&&(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:\\\"rgba\\\"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale);var a=[],l=[],c=[],h=[],p=[],d=[],g=[],v=[],m=[],y=[],x=[],b=[],_=[],w=[],k=[];this.cells=r,this.positions=n,this.vectors=i;var M=t.vertexNormals,A=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,S=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!A&&(A=s.faceNormals(r,n,S)),A||M||(M=s.vertexNormals(r,n,T));var C=t.vertexColors,E=t.cellColors,L=t.meshColor||[1,1,1,1],z=t.vertexUVs,O=t.vertexIntensity,I=t.cellUVs,P=t.cellIntensity,D=1/0,R=-1/0;if(!z&&!I)if(O)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],R=+t.vertexIntensityBounds[1];else for(var B=0;B<O.length;++B){var F=O[B];D=Math.min(D,F),R=Math.max(R,F)}else if(P)for(B=0;B<P.length;++B){F=P[B];D=Math.min(D,F),R=Math.max(R,F)}else for(B=0;B<n.length;++B){F=n[B][2];D=Math.min(D,F),R=Math.max(R,F)}this.intensity=O||(P?function(t,e,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=0;var a=t.length;for(i=0;i<a;++i)for(var o=t[i],s=0;s<o.length;++s)n[o[s]]=r[i];return n}(r,n.length,P):function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n));var N=t.pointSizes,j=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(B=0;B<n.length;++B)for(var V=n[B],U=0;U<3;++U)!isNaN(V[U])&&isFinite(V[U])&&(this.bounds[0][U]=Math.min(this.bounds[0][U],V[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],V[U]));var q=0,H=0,G=0;t:for(B=0;B<r.length;++B){var W=r[B];switch(W.length){case 1:for(V=n[X=W[0]],U=0;U<3;++U)if(isNaN(V[U])||!isFinite(V[U]))continue t;x.push(V[0],V[1],V[2],V[3]),3===(Z=C?C[X]:E?E[B]:L).length?b.push(Z[0],Z[1],Z[2],1):b.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],_.push($[0],$[1]),N?w.push(N[X]):w.push(j),k.push(B),G+=1;break;case 2:for(U=0;U<2;++U){V=n[X=W[U]];for(var Y=0;Y<3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t}for(U=0;U<2;++U){V=n[X=W[U]];g.push(V[0],V[1],V[2]),3===(Z=C?C[X]:E?E[B]:L).length?v.push(Z[0],Z[1],Z[2],1):v.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],m.push($[0],$[1]),y.push(B)}H+=1;break;case 3:for(U=0;U<3;++U)for(V=n[X=W[U]],Y=0;Y<3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t;for(U=0;U<3;++U){var X;V=n[X=W[U]];a.push(V[0],V[1],V[2],V[3]);var Z,$,J,K=i[X];l.push(K[0],K[1],K[2],K[3]),3===(Z=C?C[X]:E?E[B]:L).length?c.push(Z[0],Z[1],Z[2],1):c.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],p.push($[0],$[1]),J=M?M[X]:A[B],h.push(J[0],J[1],J[2]),d.push(B)}q+=1}}this.pointCount=G,this.edgeCount=H,this.triangleCount=q,this.pointPositions.update(x),this.pointColors.update(b),this.pointUVs.update(_),this.pointSizes.update(w),this.pointIds.update(new Uint32Array(k)),this.edgePositions.update(g),this.edgeColors.update(v),this.edgeUVs.update(m),this.edgeIds.update(new Uint32Array(y)),this.trianglePositions.update(a),this.triangleVectors.update(l),this.triangleColors.update(c),this.triangleUVs.update(p),this.triangleNormals.update(h),this.triangleIds.update(new Uint32Array(d))}},x.drawTransparent=x.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o<3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o<3;++o){for(var p=u[12+o],d=0;d<3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount>0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:e,position:n,intensity:this.intensity[r[1]],velocity:this.vectors[r[1]].slice(0,3),divergence:this.vectors[r[1]][3],dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),f=i(t),h=i(t),p=i(t),d=i(t),v=i(t),m=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:h,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:f,type:t.FLOAT,size:4}]),x=i(t),_=i(t),w=i(t),k=i(t),M=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),T=i(t),S=i(t),C=i(t),E=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:E,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:T,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:C,type:t.FLOAT,size:1}]),z=i(t),O=new y(t,l,r,null,null,s,null,null,c,f,v,h,p,d,m,x,k,_,w,M,A,E,T,S,C,L,z,a(t,[{buffer:z,type:t.FLOAT,size:3}]));return O.update(e),O}},{\\\"./closest-point\\\":298,\\\"./shaders\\\":299,colormap:114,\\\"gl-buffer\\\":230,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"gl-shader\\\":288,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,ndarray:433,normals:436,\\\"simplicial-complex-contour\\\":494,\\\"typedarray-pool\\\":522}],301:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-vec3\\\"),i=t(\\\"gl-vec4\\\"),a=function(t,e,r,a){for(var o=0,s=0;s<t.length;s++)for(var l=t[s].velocities,c=0;c<l.length;c++){var u=n.length(l[c]);u>o&&(o=u)}var f=t.map(function(t){return function(t,e,r,a){var o,s,l,c=t.points,u=t.velocities,f=t.divergences;n.set(n.create(),0,1,0),n.create(),n.create();n.create();for(var h=[],p=[],d=[],g=[],v=[],m=[],y=0,x=0,b=i.create(),_=i.create(),w=0;w<c.length;w++){o=c[w],s=u[w],l=f[w],0===e&&(l=.05*r),x=n.length(s)/a,b=i.create(),n.copy(b,s),b[3]=l;for(var k=0;k<8;k++)v[k]=[o[0],o[1],o[2],k];if(g.length>0)for(k=0;k<8;k++){var M=(k+1)%8;h.push(g[k],v[k],v[M],v[M],g[M],g[k]),d.push(_,b,b,b,_,_),m.push(y,x,x,x,y,y),p.push([h.length-6,h.length-5,h.length-4],[h.length-3,h.length-2,h.length-1])}var A=g;g=v,v=A,A=_,_=b,b=A,A=y,y=x,x=A}return{positions:h,cells:p,vectors:d,vertexIntensity:m}}(t,r,a,o)}),h=[],p=[],d=[],g=[];for(s=0;s<f.length;s++){var v=f[s],m=h.length;h=h.concat(v.positions),d=d.concat(v.vectors),g=g.concat(v.vertexIntensity);for(c=0;c<v.cells.length;c++){var y=v.cells[c],x=[];p.push(x);for(var b=0;b<y.length;b++)x.push(y[b]+m)}}return{positions:h,cells:p,vectors:d,vertexIntensity:g,colormap:e}},o=function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var a=this.getVelocity(r);n.subtract(a,a,e),n.scale(a,a,1e4),n.add(r,t,[0,i,0]);var o=this.getVelocity(r);n.subtract(o,o,e),n.scale(o,o,1e4),n.add(r,t,[0,0,i]);var s=this.getVelocity(r);return n.subtract(s,s,e),n.scale(s,s,1e4),n.add(r,a,o),n.add(r,r,s),r},s=function(t){return h(t,this.vectors,this.meshgrid,this.clampBorders)},l=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(n===e)return r;if(n>e)return r-1}return r},c=n.create(),u=n.create(),f=function(t,e,r){return t<e?e:t>r?r:t},h=function(t,e,r,i){var a=t[0],o=t[1],s=t[2],h=r[0].length,p=r[1].length,d=r[2].length,g=l(r[0],a),v=l(r[1],o),m=l(r[2],s),y=g+1,x=v+1,b=m+1;if(r[0][g]===a&&(y=g),r[1][v]===o&&(x=v),r[2][m]===s&&(b=m),i&&(g=f(g,0,h-1),y=f(y,0,h-1),v=f(v,0,p-1),x=f(x,0,p-1),m=f(m,0,d-1),b=f(b,0,d-1)),g<0||v<0||m<0||y>=h||x>=p||b>=d)return n.create();var _=(a-r[0][g])/(r[0][y]-r[0][g]),w=(o-r[1][v])/(r[1][x]-r[1][v]),k=(s-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var M=m*h*p,A=b*h*p,T=v*h,S=x*h,C=g,E=y,L=e[T+M+C],z=e[T+M+E],O=e[S+M+C],I=e[S+M+E],P=e[T+A+C],D=e[T+A+E],R=e[S+A+C],B=e[S+A+E],F=n.create();return n.lerp(F,L,z,_),n.lerp(c,O,I,_),n.lerp(F,F,c,w),n.lerp(c,P,D,_),n.lerp(u,R,B,_),n.lerp(c,c,u,w),n.lerp(F,F,c,k),F},p=function(t){var e=1/0;t.sort(function(t,e){return t-e});for(var r=1;r<t.length;r++){var n=Math.abs(t[r]-t[r-1]);n<e&&(e=n)}return e};e.exports=function(t,e){var r=t.startingPositions,i=t.maxLength||1e3,l=t.tubeSize||1,c=t.absoluteTubeSize;t.getDivergence||(t.getDivergence=o),t.getVelocity||(t.getVelocity=s),void 0===t.clampBorders&&(t.clampBorders=!0);var u=[],f=e[0][0],h=e[0][1],d=e[0][2],g=e[1][0],v=e[1][1],m=e[1][2],y=function(t,e){var r=e[0],n=e[1],i=e[2];return r>=f&&r<=g&&n>=h&&n<=v&&i>=d&&i<=m},x=10*n.distance(e[0],e[1])/i,b=x*x,_=1,w=0;n.create();r.length>=2&&(_=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=0;s<t.length;s++){var l=t[s],c=l[0],u=l[1],f=l[2];i[c]||(e.push(c),i[c]=!0),a[u]||(r.push(u),a[u]=!0),o[f]||(n.push(f),o[f]=!0)}var h=p(e),d=p(r),g=p(n),v=Math.min(h,d,g);return isFinite(v)?v:1}(r));for(var k=0;k<r.length;k++){var M=n.create();n.copy(M,r[k]);var A=[M],T=[],S=t.getVelocity(M),C=M;T.push(S);var E=[],L=t.getDivergence(M,S);(P=n.length(L))>w&&!isNaN(P)&&isFinite(P)&&(w=P),E.push(P),u.push({points:A,velocities:T,divergences:E});for(var z=0;z<100*i&&A.length<i&&y(0,M);){z++;var O=n.clone(S),I=n.squaredLength(O);if(0===I)break;if(I>b&&n.scale(O,O,x/Math.sqrt(I)),n.add(O,O,M),S=t.getVelocity(O),n.squaredDistance(C,O)-b>-1e-4*b){A.push(O),C=O,T.push(S);L=t.getDivergence(O,S);(P=n.length(L))>w&&!isNaN(P)&&isFinite(P)&&(w=P),E.push(P)}M=O}}for(k=0;k<E.length;k++){var P=E[k];!isNaN(P)&&isFinite(P)||(E[k]=w)}var D=a(u,t.colormap,w,_);return c?D.tubeScale=c:(0===w&&(w=1),D.tubeScale=.5*l*_/w),D},e.exports.createTubeMesh=t(\\\"./lib/tubemesh\\\")},{\\\"./lib/tubemesh\\\":300,\\\"gl-vec3\\\":329,\\\"gl-vec4\\\":365}],302:[function(t,e,r){var n=t(\\\"gl-shader\\\"),i=t(\\\"glslify\\\"),a=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 uv;\\\\nattribute vec3 f;\\\\nattribute vec3 normal;\\\\n\\\\nuniform mat4 model, view, projection, inverseModel;\\\\nuniform vec3 lightPosition, eyePosition;\\\\nuniform sampler2D colormap;\\\\n\\\\nvarying float value, kill;\\\\nvarying vec3 worldCoordinate;\\\\nvarying vec2 planeCoordinate;\\\\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\\\\nvarying vec4 vColor;\\\\n\\\\nvoid main() {\\\\n  worldCoordinate = vec3(uv.zw, f.x);\\\\n  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\\\\n  vec4 clipPosition = projection * view * worldPosition;\\\\n  gl_Position = clipPosition;\\\\n  kill = f.y;\\\\n  value = f.z;\\\\n  planeCoordinate = uv.xy;\\\\n\\\\n  vColor = texture2D(colormap, vec2(value, value));\\\\n\\\\n  //Lighting geometry parameters\\\\n  vec4 cameraCoordinate = view * worldPosition;\\\\n  cameraCoordinate.xyz /= cameraCoordinate.w;\\\\n  lightDirection = lightPosition - cameraCoordinate.xyz;\\\\n  eyeDirection   = eyePosition - cameraCoordinate.xyz;\\\\n  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);\\\\n}\\\\n\\\"]),o=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat beckmannDistribution(float x, float roughness) {\\\\n  float NdotH = max(x, 0.0001);\\\\n  float cos2Alpha = NdotH * NdotH;\\\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\\\n  float roughness2 = roughness * roughness;\\\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\\\n  return exp(tan2Alpha / roughness2) / denom;\\\\n}\\\\n\\\\nfloat beckmannSpecular(\\\\n  vec3 lightDirection,\\\\n  vec3 viewDirection,\\\\n  vec3 surfaceNormal,\\\\n  float roughness) {\\\\n  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 lowerBound, upperBound;\\\\nuniform float contourTint;\\\\nuniform vec4 contourColor;\\\\nuniform sampler2D colormap;\\\\nuniform vec3 clipBounds[2];\\\\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\\\\nuniform float vertexColor;\\\\n\\\\nvarying float value, kill;\\\\nvarying vec3 worldCoordinate;\\\\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\\\\nvarying vec4 vColor;\\\\n\\\\nvoid main() {\\\\n  if ((kill > 0.0) ||\\\\n      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\\\\n\\\\n  vec3 N = normalize(surfaceNormal);\\\\n  vec3 V = normalize(eyeDirection);\\\\n  vec3 L = normalize(lightDirection);\\\\n\\\\n  if(gl_FrontFacing) {\\\\n    N = -N;\\\\n  }\\\\n\\\\n  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\\\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\\\n\\\\n  //decide how to interpolate color \\\\u2014 in vertex or in fragment\\\\n  vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\\\\n\\\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\\\n\\\\n  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\\\\n}\\\\n\\\"]),s=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 uv;\\\\nattribute float f;\\\\n\\\\nuniform mat3 permutation;\\\\nuniform mat4 model, view, projection;\\\\nuniform float height, zOffset;\\\\nuniform sampler2D colormap;\\\\n\\\\nvarying float value, kill;\\\\nvarying vec3 worldCoordinate;\\\\nvarying vec2 planeCoordinate;\\\\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\\\\nvarying vec4 vColor;\\\\n\\\\nvoid main() {\\\\n  vec3 dataCoordinate = permutation * vec3(uv.xy, height);\\\\n  vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\\\\n\\\\n  vec4 clipPosition = projection * view * worldPosition;\\\\n  clipPosition.z = clipPosition.z + zOffset;\\\\n\\\\n  gl_Position = clipPosition;\\\\n  value = f;\\\\n  kill = -1.0;\\\\n  worldCoordinate = dataCoordinate;\\\\n  planeCoordinate = uv.zw;\\\\n\\\\n  vColor = texture2D(colormap, vec2(value, value));\\\\n\\\\n  //Don't do lighting for contours\\\\n  surfaceNormal   = vec3(1,0,0);\\\\n  eyeDirection    = vec3(0,1,0);\\\\n  lightDirection  = vec3(0,0,1);\\\\n}\\\\n\\\"]),l=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec2 shape;\\\\nuniform vec3 clipBounds[2];\\\\nuniform float pickId;\\\\n\\\\nvarying float value, kill;\\\\nvarying vec3 worldCoordinate;\\\\nvarying vec2 planeCoordinate;\\\\nvarying vec3 surfaceNormal;\\\\n\\\\nvec2 splitFloat(float v) {\\\\n  float vh = 255.0 * v;\\\\n  float upper = floor(vh);\\\\n  float lower = fract(vh);\\\\n  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\\\\n}\\\\n\\\\nvoid main() {\\\\n  if ((kill > 0.0) ||\\\\n      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\\\\n\\\\n  vec2 ux = splitFloat(planeCoordinate.x / shape.x);\\\\n  vec2 uy = splitFloat(planeCoordinate.y / shape.y);\\\\n  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\\\\n}\\\\n\\\"]);r.createShader=function(t){var e=n(t,a,o,null,[{name:\\\"uv\\\",type:\\\"vec4\\\"},{name:\\\"f\\\",type:\\\"vec3\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,a,l,null,[{name:\\\"uv\\\",type:\\\"vec4\\\"},{name:\\\"f\\\",type:\\\"vec3\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:\\\"uv\\\",type:\\\"vec4\\\"},{name:\\\"f\\\",type:\\\"float\\\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:\\\"uv\\\",type:\\\"vec4\\\"},{name:\\\"f\\\",type:\\\"float\\\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{\\\"gl-shader\\\":288,glslify:392}],303:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=i(e),u=a(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,S,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var v=new C(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,g,s,l,f,h,p,d),m={levels:[[],[],[]]};for(var k in t)m[k]=t[k];return m.colormap=m.colormap||\\\"jet\\\",v.update(m),v};var n=t(\\\"bit-twiddle\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"gl-texture2d\\\"),s=t(\\\"typedarray-pool\\\"),l=t(\\\"colormap\\\"),c=t(\\\"ndarray-ops\\\"),u=t(\\\"ndarray-pack\\\"),f=t(\\\"ndarray\\\"),h=t(\\\"surface-nets\\\"),p=t(\\\"gl-mat4/multiply\\\"),d=t(\\\"gl-mat4/invert\\\"),g=t(\\\"binary-search-bounds\\\"),v=t(\\\"ndarray-gradient\\\"),m=t(\\\"./lib/shaders\\\"),y=m.createShader,x=m.createContourShader,b=m.createPickShader,_=m.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],M=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[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,0,0]];function T(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=A[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function C(t,e,r,n,i,a,o,l,c,u,h,p,d,g){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new T([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var E=C.prototype;E.isTransparent=function(){return this.opacity<1},E.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},E.pickSlots=1,E.setPickBase=function(t){this.pickId=t};var L=[0,0,0],z={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||L,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=z.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],p(l,t.model,l);var c=z.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=o,z.showContour=s,z}var I={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},P=k.slice(),D=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=I;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=D,n.vertexColor=this.vertexColor;var s=P;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(o=0;o<3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=O(n,this);if(u.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour&&!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(f.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]),o=0;o<this.contourLevels[i].length;++o)o===this.highlightLevel[i]?(f.uniforms.contourColor=this.highlightColor[i],f.uniforms.contourTint=this.highlightTint[i]):0!==o&&o-1!==this.highlightLevel[i]||(f.uniforms.contourColor=this.contourColor[i],f.uniforms.contourTint=this.contourTint[i]),this._contourCounts[i][o]&&(f.uniforms.height=this.contourLevels[i][o],h.draw(r.LINES,this._contourCounts[i][o],this._contourOffsets[i][o]));for(i=0;i<3;++i)for(f.uniforms.model=u.projections[i],f.uniforms.clipBounds=u.clipBounds[i],o=0;o<3;++o)if(this.contourProject[i][o]){f.uniforms.permutation=A[o],r.lineWidth(this.contourWidth[o]);for(var g=0;g<this.contourLevels[o].length;++g)g===this.highlightLevel[o]?(f.uniforms.contourColor=this.highlightColor[o],f.uniforms.contourTint=this.highlightTint[o]):0!==g&&g-1!==this.highlightLevel[o]||(f.uniforms.contourColor=this.contourColor[o],f.uniforms.contourTint=this.contourTint[o]),f.uniforms.height=this.contourLevels[o][g],h.draw(r.LINES,this._contourCounts[o][g],this._contourOffsets[o][g])}for(h.unbind(),(h=this._dynamicVAO).bind(),i=0;i<3;++i)if(0!==this._dynamicCounts[i])for(f.uniforms.model=n.model,f.uniforms.clipBounds=n.clipBounds,f.uniforms.permutation=A[i],r.lineWidth(this.dynamicWidth[i]),f.uniforms.contourColor=this.dynamicColor[i],f.uniforms.contourTint=this.dynamicTint[i],f.uniforms.height=this.dynamicLevel[i],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]),o=0;o<3;++o)this.contourProject[o][i]&&(f.uniforms.model=u.projections[o],f.uniforms.clipBounds=u.clipBounds[o],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]));h.unbind()}}E.draw=function(t){return R.call(this,t,!1)},E.drawTransparent=function(t){return R.call(this,t,!0)};var B={model:k,view:k,projection:k,inverseModel:k,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};function F(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))}function N(t,e){return Array.isArray(t)?[e(t[0]),e(t[1]),e(t[2])]:[e(t),e(t),e(t)]}function j(t){return Array.isArray(t)?3===t.length?[t[0],t[1],t[2],1]:[t[0],t[1],t[2],t[3]]:[0,0,0,1]}function V(t){if(Array.isArray(t)){if(Array.isArray(t))return[j(t[0]),j(t[1]),j(t[2])];var e=j(t);return[e.slice(),e.slice(),e.slice()]}}E.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=B;r.model=t.model||k,r.view=t.view||k,r.projection=t.projection||k,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=D;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var o=O(r,this);if(o.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=o.projections[n],this._pickShader.uniforms.clipBounds=o.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(o.showContour){var s=this._contourPickShader;s.bind(),s.uniforms=r;var l=this._contourVAO;for(l.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]),s.uniforms.permutation=A[a],n=0;n<this.contourLevels[a].length;++n)this._contourCounts[a][n]&&(s.uniforms.height=this.contourLevels[a][n],l.draw(e.LINES,this._contourCounts[a][n],this._contourOffsets[a][n]));for(n=0;n<3;++n)for(s.uniforms.model=o.projections[n],s.uniforms.clipBounds=o.clipBounds[n],a=0;a<3;++a)if(this.contourProject[n][a]){s.uniforms.permutation=A[a],e.lineWidth(this.contourWidth[a]);for(var c=0;c<this.contourLevels[a].length;++c)this._contourCounts[a][c]&&(s.uniforms.height=this.contourLevels[a][c],l.draw(e.LINES,this._contourCounts[a][c],this._contourOffsets[a][c]))}l.unbind()}},E.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=this._field[2].shape,r=this._pickResult,n=e[0]*(t.value[0]+(t.value[2]>>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var f=u?a:1-a,h=0;h<2;++h)for(var p=i+u,d=s+h,v=f*(h?l:1-l),m=0;m<3;++m)c[m]+=this._field[m].get(p,d)*v;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=g.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]<this.contourLevels[x].length-1){var b=this.contourLevels[x][y[x]],_=this.contourLevels[x][y[x]+1];Math.abs(b-c[x])>Math.abs(_-c[x])&&(y[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],m=0;m<3;++m)r.dataCoordinate[m]=this._field[m].get(r.index[0],r.index[1]);return r},E.update=function(t){t=t||{},this.dirty=!0,\\\"contourWidth\\\"in t&&(this.contourWidth=N(t.contourWidth,Number)),\\\"showContour\\\"in t&&(this.showContour=N(t.showContour,Boolean)),\\\"showSurface\\\"in t&&(this.showSurface=!!t.showSurface),\\\"contourTint\\\"in t&&(this.contourTint=N(t.contourTint,Boolean)),\\\"contourColor\\\"in t&&(this.contourColor=V(t.contourColor)),\\\"contourProject\\\"in t&&(this.contourProject=N(t.contourProject,function(t){return N(t,Boolean)})),\\\"surfaceProject\\\"in t&&(this.surfaceProject=t.surfaceProject),\\\"dynamicColor\\\"in t&&(this.dynamicColor=V(t.dynamicColor)),\\\"dynamicTint\\\"in t&&(this.dynamicTint=N(t.dynamicTint,Number)),\\\"dynamicWidth\\\"in t&&(this.dynamicWidth=N(t.dynamicWidth,Number)),\\\"opacity\\\"in t&&(this.opacity=t.opacity),\\\"colorBounds\\\"in t&&(this.colorBounds=t.colorBounds),\\\"vertexColor\\\"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),\\\"field\\\"in t||\\\"coords\\\"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),F(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var p=t.coords;if(!Array.isArray(p)||3!==p.length)throw new Error(\\\"gl-surface: invalid coordinates for x/y\\\");for(o=0;o<2;++o){var d=p[o];for(b=0;b<2;++b)if(d.shape[b]!==a[b])throw new Error(\\\"gl-surface: coords have incorrect shape\\\");F(this._field[o],d)}}else if(t.ticks){var g=t.ticks;if(!Array.isArray(g)||2!==g.length)throw new Error(\\\"gl-surface: invalid ticks\\\");for(o=0;o<2;++o){var m=g[o];if((Array.isArray(m)||m.length)&&(m=f(m)),m.shape[0]!==a[o])throw new Error(\\\"gl-surface: invalid tick length\\\");var y=f(m.data,a);y.stride[o]=m.stride[0],y.stride[1^o]=0,F(this._field[o],y)}}else{for(o=0;o<2;++o){var x=[0,0];x[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],x,0)}this._field[0].set(0,0,0);for(var b=0;b<a[0];++b)this._field[0].set(b+1,0,b);for(this._field[0].set(a[0]+1,0,a[0]-1),this._field[1].set(0,0,0),b=0;b<a[1];++b)this._field[1].set(0,b+1,b);this._field[1].set(0,a[1]+1,a[1]-1)}var _=this._field,w=f(s.mallocFloat(3*_[2].size*2),[3,a[0]+2,a[1]+2,2]);for(o=0;o<3;++o)v(w.pick(o),_[o],\\\"mirror\\\");var k=f(s.mallocFloat(3*_[2].size),[a[0]+2,a[1]+2,3]);for(o=0;o<a[0]+2;++o)for(b=0;b<a[1]+2;++b){var A=w.get(0,o,b,0),T=w.get(0,o,b,1),C=w.get(1,o,b,0),E=w.get(1,o,b,1),L=w.get(2,o,b,0),z=w.get(2,o,b,1),O=C*z-E*L,I=L*T-z*A,P=A*E-T*C,D=Math.sqrt(O*O+I*I+P*P);D<1e-8?(D=Math.max(Math.abs(O),Math.abs(I),Math.abs(P)))<1e-8?(P=1,I=O=0,D=1):D=1/D:D=1/Math.sqrt(D),k.set(o,b,0,O*D),k.set(o,b,1,I*D),k.set(o,b,2,P*D)}s.free(w.data);var R=[1/0,1/0,1/0],B=[-1/0,-1/0,-1/0],j=1/0,U=-1/0,q=(a[0]-1)*(a[1]-1)*6,H=s.mallocFloat(n.nextPow2(10*q)),G=0,W=0;for(o=0;o<a[0]-1;++o)t:for(b=0;b<a[1]-1;++b){for(var Y=0;Y<2;++Y)for(var X=0;X<2;++X)for(var Z=0;Z<3;++Z){var $=this._field[Z].get(1+o+Y,1+b+X);if(isNaN($)||!isFinite($))continue t}for(Z=0;Z<6;++Z){var J=o+M[Z][0],K=b+M[Z][1],Q=this._field[0].get(J+1,K+1),tt=this._field[1].get(J+1,K+1),et=$=this._field[2].get(J+1,K+1);O=k.get(J+1,K+1,0),I=k.get(J+1,K+1,1),P=k.get(J+1,K+1,2),t.intensity&&(et=t.intensity.get(J,K)),H[G++]=J,H[G++]=K,H[G++]=Q,H[G++]=tt,H[G++]=$,H[G++]=0,H[G++]=et,H[G++]=O,H[G++]=I,H[G++]=P,R[0]=Math.min(R[0],Q),R[1]=Math.min(R[1],tt),R[2]=Math.min(R[2],$),j=Math.min(j,et),B[0]=Math.max(B[0],Q),B[1]=Math.max(B[1],tt),B[2]=Math.max(B[2],$),U=Math.max(U,et),W+=1}}for(t.intensityBounds&&(j=+t.intensityBounds[0],U=+t.intensityBounds[1]),o=6;o<G;o+=10)H[o]=(H[o]-j)/(U-j);this._vertexCount=W,this._coordinateBuffer.update(H.subarray(0,G)),s.freeFloat(H),s.free(k.data),this.bounds=[R,B],this.intensity=t.intensity||this._field[2],this.intensityBounds[0]===j&&this.intensityBounds[1]===U||(r=!0),this.intensityBounds=[j,U]}if(\\\"levels\\\"in t){var rt=t.levels;for(rt=Array.isArray(rt[0])?rt.slice():[[],[],rt],o=0;o<3;++o)rt[o]=rt[o].slice(),rt.sort(function(t,e){return t-e});t:for(o=0;o<3;++o){if(rt[o].length!==this.contourLevels[o].length){r=!0;break}for(b=0;b<rt[o].length;++b)if(rt[o][b]!==this.contourLevels[o][b]){r=!0;break t}}this.contourLevels=rt}if(r){_=this._field,a=this.shape;for(var nt=[],it=0;it<3;++it){rt=this.contourLevels[it];var at=[],ot=[],st=[0,0,0];for(o=0;o<rt.length;++o){var lt=h(this._field[it],rt[o]);at.push(nt.length/5|0),W=0;t:for(b=0;b<lt.cells.length;++b){var ct=lt.cells[b];for(Z=0;Z<2;++Z){var ut=lt.positions[ct[Z]],ft=ut[0],ht=0|Math.floor(ft),pt=ft-ht,dt=ut[1],gt=0|Math.floor(dt),vt=dt-gt,mt=!1;e:for(var yt=0;yt<3;++yt){st[yt]=0;var xt=(it+yt+1)%3;for(Y=0;Y<2;++Y){var bt=Y?pt:1-pt;for(J=0|Math.min(Math.max(ht+Y,0),a[0]),X=0;X<2;++X){var _t=X?vt:1-vt;if(K=0|Math.min(Math.max(gt+X,0),a[1]),$=yt<2?this._field[xt].get(J,K):(this.intensity.get(J,K)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite($)||isNaN($)){mt=!0;break e}var wt=bt*_t;st[yt]+=wt*$}}}if(mt){if(Z>0){for(var kt=0;kt<5;++kt)nt.pop();W-=1}continue t}nt.push(st[0],st[1],ut[0],ut[1],st[2]),W+=1}}ot.push(W)}this._contourOffsets[it]=at,this._contourCounts[it]=ot}var Mt=s.mallocFloat(nt.length);for(o=0;o<nt.length;++o)Mt[o]=nt[o];this._contourBuffer.update(Mt),s.freeFloat(Mt)}t.colormap&&this._colorMap.setPixels(function(t){var e=u([l({colormap:t,nshades:S,format:\\\"rgba\\\"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return c.divseq(e,255),e}(t.colormap))},E.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t<3;++t)s.freeFloat(this._field[t].data)},E.highlight=function(t){if(!t)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(var e=0;e<3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;var r;if(r=this.snapToData?t.dataCoordinate:t.position,this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=s.mallocFloat(12*i[0]*i[1]),o=0;o<3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var l=(o+1)%3,c=(o+2)%3,u=this._field[o],f=this._field[l],p=this._field[c],d=(this.intensity,h(u,r[o])),g=d.cells,v=d.positions;for(this._dynamicOffsets[o]=n,e=0;e<g.length;++e)for(var m=g[e],y=0;y<2;++y){var x=v[m[y]],b=+x[0],_=0|b,w=0|Math.min(_+1,i[0]),k=b-_,M=1-k,A=+x[1],T=0|A,S=0|Math.min(T+1,i[1]),C=A-T,E=1-C,L=M*E,z=M*C,O=k*E,I=k*C,P=L*f.get(_,T)+z*f.get(_,S)+O*f.get(w,T)+I*f.get(w,S),D=L*p.get(_,T)+z*p.get(_,S)+O*p.get(w,T)+I*p.get(w,S);if(isNaN(P)||isNaN(D)){y&&(n-=1);break}a[2*n+0]=P,a[2*n+1]=D,n+=1}this._dynamicCounts[o]=n-this._dynamicOffsets[o]}else this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;this._dynamicBuffer.update(a.subarray(0,2*n)),s.freeFloat(a)}}},{\\\"./lib/shaders\\\":302,\\\"binary-search-bounds\\\":79,\\\"bit-twiddle\\\":80,colormap:114,\\\"gl-buffer\\\":230,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,ndarray:433,\\\"ndarray-gradient\\\":424,\\\"ndarray-ops\\\":427,\\\"ndarray-pack\\\":428,\\\"surface-nets\\\":508,\\\"typedarray-pool\\\":522}],304:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"css-font\\\"),i=t(\\\"pick-by-alias\\\"),a=t(\\\"regl\\\"),o=t(\\\"gl-util/context\\\"),s=t(\\\"es6-weak-map\\\"),l=t(\\\"color-normalize\\\"),c=t(\\\"font-atlas\\\"),u=t(\\\"typedarray-pool\\\"),f=t(\\\"parse-rect\\\"),h=t(\\\"is-plain-obj\\\"),p=t(\\\"parse-unit\\\"),d=t(\\\"to-px\\\"),g=t(\\\"detect-kerning\\\"),v=t(\\\"object-assign\\\"),m=t(\\\"font-measure\\\"),y=t(\\\"flatten-vertex-data\\\"),x=t(\\\"bit-twiddle\\\").nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement(\\\"div\\\"));w.style.font=\\\"italic small-caps bold condensed 16px/2 cursive\\\",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var k=function(t){!function(t){return\\\"function\\\"==typeof t&&t._gl&&t.prop&&t.texture&&t.buffer}(t)?this.gl=o(t):(t={regl:t},this.gl=t.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||a({gl:this.gl}),this.charBuffer=this.regl.buffer({type:\\\"uint8\\\",usage:\\\"stream\\\"}),this.sizeBuffer=this.regl.buffer({type:\\\"float\\\",usage:\\\"stream\\\"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(t)?t:{})};k.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:\\\"one minus dst alpha\\\",dstAlpha:\\\"one\\\"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop(\\\"count\\\"),offset:t.prop(\\\"offset\\\"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this(\\\"sizeBuffer\\\")},width:{offset:0,stride:8,buffer:t.this(\\\"sizeBuffer\\\")},char:t.this(\\\"charBuffer\\\"),position:t.this(\\\"position\\\")},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop(\\\"color\\\"),opacity:t.prop(\\\"opacity\\\"),viewport:t.this(\\\"viewportArray\\\"),scale:t.this(\\\"scale\\\"),align:t.prop(\\\"align\\\"),baseline:t.prop(\\\"baseline\\\"),translate:t.this(\\\"translate\\\"),positionOffset:t.prop(\\\"positionOffset\\\")},primitive:\\\"points\\\",viewport:t.this(\\\"viewport\\\"),vert:\\\"\\\\n\\\\t\\\\t\\\\tprecision highp float;\\\\n\\\\t\\\\t\\\\tattribute float width, charOffset, char;\\\\n\\\\t\\\\t\\\\tattribute vec2 position;\\\\n\\\\t\\\\t\\\\tuniform float fontSize, charStep, em, align, baseline;\\\\n\\\\t\\\\t\\\\tuniform vec4 viewport;\\\\n\\\\t\\\\t\\\\tuniform vec4 color;\\\\n\\\\t\\\\t\\\\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\\\\n\\\\t\\\\t\\\\tvarying vec2 charCoord, charId;\\\\n\\\\t\\\\t\\\\tvarying float charWidth;\\\\n\\\\t\\\\t\\\\tvarying vec4 fontColor;\\\\n\\\\t\\\\t\\\\tvoid main () {\\\\n\\\\t\\\\t\\\\t\\\\t\\\"+(k.normalViewport?\\\"\\\":\\\"vec2 positionOffset = vec2(positionOffset.x,- positionOffset.y);\\\")+\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t+ positionOffset))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t/ (viewport.zw * scale.xy);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tvec2 position = (position + translate) * scale;\\\\n\\\\t\\\\t\\\\t\\\\tposition += offset * scale;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\"+(k.normalViewport?\\\"position.y = 1. - position.y;\\\":\\\"\\\")+\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tcharCoord = position * viewport.zw + viewport.xy;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tgl_Position = vec4(position * 2. - 1., 0, 1);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tgl_PointSize = charStep;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tcharId.x = mod(char, atlasDim.x);\\\\n\\\\t\\\\t\\\\t\\\\tcharId.y = floor(char / atlasDim.x);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tcharWidth = width * em;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tfontColor = color / 255.;\\\\n\\\\t\\\\t\\\\t}\\\",frag:\\\"\\\\n\\\\t\\\\t\\\\tprecision highp float;\\\\n\\\\t\\\\t\\\\tuniform sampler2D atlas;\\\\n\\\\t\\\\t\\\\tuniform float fontSize, charStep, opacity;\\\\n\\\\t\\\\t\\\\tuniform vec2 atlasSize;\\\\n\\\\t\\\\t\\\\tuniform vec4 viewport;\\\\n\\\\t\\\\t\\\\tvarying vec4 fontColor;\\\\n\\\\t\\\\t\\\\tvarying vec2 charCoord, charId;\\\\n\\\\t\\\\t\\\\tvarying float charWidth;\\\\n\\\\n\\\\t\\\\t\\\\tfloat lightness(vec4 color) {\\\\n\\\\t\\\\t\\\\t\\\\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\t\\\\tvoid main () {\\\\n\\\\t\\\\t\\\\t\\\\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\\\\n\\\\t\\\\t\\\\t\\\\tfloat halfCharStep = floor(charStep * .5 + .5);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t// invert y and shift by 1px (FF especially needs that)\\\\n\\\\t\\\\t\\\\t\\\\tuv.y = charStep - uv.y;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t// ignore points outside of character bounding box\\\\n\\\\t\\\\t\\\\t\\\\tfloat halfCharWidth = ceil(charWidth * .5);\\\\n\\\\t\\\\t\\\\t\\\\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tuv += charId * charStep;\\\\n\\\\t\\\\t\\\\t\\\\tuv = uv / atlasSize;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tvec4 color = fontColor;\\\\n\\\\t\\\\t\\\\t\\\\tvec4 mask = texture2D(atlas, uv);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tfloat maskY = lightness(mask);\\\\n\\\\t\\\\t\\\\t\\\\t// float colorY = lightness(color);\\\\n\\\\t\\\\t\\\\t\\\\tcolor.a *= maskY;\\\\n\\\\t\\\\t\\\\t\\\\tcolor.a *= opacity;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t// color.a += .1;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t// antialiasing, see yiq color space y-channel formula\\\\n\\\\t\\\\t\\\\t\\\\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tgl_FragColor = color;\\\\n\\\\t\\\\t\\\\t}\\\"});return{regl:t,draw:e,atlas:{}}},k.prototype.update=function(t){var e=this;if(\\\"string\\\"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:\\\"position positions coord coords coordinates\\\",font:\\\"font fontFace fontface typeface cssFont css-font family fontFamily\\\",fontSize:\\\"fontSize fontsize size font-size\\\",text:\\\"text texts chars characters value values symbols\\\",align:\\\"align alignment textAlign textbaseline\\\",baseline:\\\"baseline textBaseline textbaseline\\\",direction:\\\"dir direction textDirection\\\",color:\\\"color colour fill fill-color fillColor textColor textcolor\\\",kerning:\\\"kerning kern\\\",range:\\\"range dataBox\\\",viewport:\\\"vp viewport viewBox viewbox viewPort\\\",opacity:\\\"opacity alpha transparency visible visibility opaque\\\",offset:\\\"offset positionOffset padding shift indent indentation\\\"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(t){return parseFloat(t)}):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=f(t.viewport),k.normalViewport&&(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&(\\\"number\\\"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+\\\"px sans-serif\\\");var r,a=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(t,r){if(\\\"string\\\"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+\\\"px \\\"+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&i==e.font[r].baseString||(a=!0,e.font[r]=k.fonts[i],e.font[r]))){var c=t.family.join(\\\", \\\"),u=[t.style];t.style!=t.variant&&u.push(t.variant),t.variant!=t.weight&&u.push(t.weight),_&&t.weight!=t.stretch&&u.push(t.stretch),e.font[r]={baseString:i,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:m(c,{origin:\\\"top\\\",fontSize:k.baseFontSize,fontStyle:u.join(\\\" \\\")})},k.fonts[i]=e.font[r]}}),(a||o)&&this.font.forEach(function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)}),\\\"string\\\"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),h=0;h<s.length;h++)s[h]=t.text;t.text=s}if(null!=t.text||a){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var b=1;b<t.text.length;b++)e.textOffsets[b]=e.textOffsets[b-1]+t.text[b-1].length,e.count+=t.text[b].length,e.counts.push(t.text[b].length);this.text=t.text.join(\\\"\\\")}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];r=[],this.font.forEach(function(t,n){k.atlasContext.font=t.baseString;for(var i=e.fontAtlas[n],a=0;a<e.text.length;a++){var o=e.text.charAt(a);if(null==i.ids[o]&&(i.ids[o]=i.chars.length,i.chars.push(o),r.push(o)),null==t.width[o]&&(t.width[o]=k.atlasContext.measureText(o).width/k.baseFontSize,e.kerning)){var s=[];for(var l in t.width)s.push(l+o,o+l);v(t.kerning,g(t.family,{pairs:s}))}}})}if(t.position)if(t.position.length>2){for(var w=!t.position[0].length,M=u.mallocFloat(2*this.count),A=0,T=0;A<this.counts.length;A++){var S=e.counts[A];if(w)for(var C=0;C<S;C++)M[T++]=t.position[2*A],M[T++]=t.position[2*A+1];else for(var E=0;E<S;E++)M[T++]=t.position[A][0],M[T++]=t.position[A][1]}this.position.call?this.position({type:\\\"float\\\",data:M}):this.position=this.regl.buffer({type:\\\"float\\\",data:M}),u.freeFloat(M)}else this.position.destroy&&this.position.destroy(),this.position={constant:t.position};if(t.text||a){var L=u.mallocUint8(this.count),z=u.mallocFloat(2*this.count);this.textWidth=[];for(var O=0,I=0;O<this.counts.length;O++){for(var P=e.counts[O],D=e.font[O]||e.font[0],R=e.fontAtlas[O]||e.fontAtlas[0],B=0;B<P;B++){var F=e.text.charAt(I),N=e.text.charAt(I-1);if(L[I]=R.ids[F],z[2*I]=D.width[F],B){var j=z[2*I-2],V=z[2*I],U=z[2*I-1]+.5*j+.5*V;if(e.kerning){var q=D.kerning[N+F];q&&(U+=.001*q)}z[2*I+1]=U}else z[2*I+1]=.5*z[2*I];I++}e.textWidth.push(z.length?.5*z[2*I-2]+z[2*I-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:L,type:\\\"uint8\\\",usage:\\\"stream\\\"}),this.sizeBuffer({data:z,type:\\\"float\\\",usage:\\\"stream\\\"}),u.freeUint8(L),u.freeFloat(z),r.length&&this.font.forEach(function(t,r){var n=e.fontAtlas[r],i=n.step,a=Math.floor(k.maxAtlasSize/i),o=Math.min(a,n.chars.length),s=Math.ceil(n.chars.length/o),l=x(o*i),u=x(s*i);n.width=l,n.height=u,n.rows=s,n.cols=o,n.em&&n.texture({data:c({canvas:k.atlasCanvas,font:n.fontString,chars:n.chars,shape:[l,u],step:[i,i]})})})}if(t.align&&(this.align=t.align,this.alignOffset=this.textWidth.map(function(t,r){var n=Array.isArray(e.align)?e.align.length>1?e.align[r]:e.align[0]:e.align;if(\\\"number\\\"==typeof n)return n;switch(n){case\\\"right\\\":case\\\"end\\\":return-t;case\\\"center\\\":case\\\"centre\\\":case\\\"middle\\\":return.5*-t}return 0})),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,i+=\\\"number\\\"==typeof t?t-n.baseline:-n[t],k.normalViewport||(i*=-1),i})),null!=t.color)if(t.color||(t.color=\\\"transparent\\\"),\\\"string\\\"!=typeof t.color&&isNaN(t.color)){var H;if(\\\"number\\\"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;H=u.mallocUint8(G);for(var W=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y<G;Y+=4)H.set(l(W(Y,Y+4),\\\"uint8\\\"),Y)}else{var X=t.color.length;H=u.mallocUint8(4*X);for(var Z=0;Z<X;Z++)H.set(l(t.color[Z]||0,\\\"uint8\\\"),4*Z)}this.color=H}else this.color=l(t.color,\\\"uint8\\\");if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity)if(this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var J=0;J<this.batch.length;J++)e.batch[J]={count:e.counts.length>1?e.counts[J]:e.counts[0],offset:e.textOffsets.length>1?e.textOffsets[J]:e.textOffsets[0],color:e.color?e.color.length<=4?e.color:e.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(e.opacity)?e.opacity[J]:e.opacity,baseline:null!=e.baselineOffset[J]?e.baselineOffset[J]:e.baselineOffset[0],align:e.align?null!=e.alignOffset[J]?e.alignOffset[J]:e.alignOffset[0]:0,atlas:e.fontAtlas[J]||e.fontAtlas[0],positionOffset:e.positionOffset.length>2?e.positionOffset.subarray(2*J,2*J+2):e.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text=\\\"\\\",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement(\\\"canvas\\\"),k.atlasContext=k.atlasCanvas.getContext(\\\"2d\\\",{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},{\\\"bit-twiddle\\\":80,\\\"color-normalize\\\":108,\\\"css-font\\\":127,\\\"detect-kerning\\\":151,\\\"es6-weak-map\\\":209,\\\"flatten-vertex-data\\\":216,\\\"font-atlas\\\":217,\\\"font-measure\\\":218,\\\"gl-util/context\\\":306,\\\"is-plain-obj\\\":405,\\\"object-assign\\\":437,\\\"parse-rect\\\":442,\\\"parse-unit\\\":444,\\\"pick-by-alias\\\":448,regl:478,\\\"to-px\\\":516,\\\"typedarray-pool\\\":522}],305:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"ndarray\\\"),i=t(\\\"ndarray-ops\\\"),a=t(\\\"typedarray-pool\\\");e.exports=function(t){if(arguments.length<=1)throw new Error(\\\"gl-texture2d: Missing arguments for texture2d constructor\\\");o||function(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t);if(\\\"number\\\"==typeof arguments[1])return v(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return v(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(\\\"object\\\"==typeof arguments[1]){var e=arguments[1],r=c(e)?e:e.raw;if(r)return function(t,e,r,n,i,a){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new h(t,o,r,n,i,a)}(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return function(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error(\\\"gl-texture2d: Invalid texture size\\\");var l=d(o,e.stride.slice()),c=0;\\\"float32\\\"===r?c=t.FLOAT:\\\"float64\\\"===r?(c=t.FLOAT,l=!1,r=\\\"float32\\\"):\\\"uint8\\\"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r=\\\"uint8\\\");var f,p,v=0;if(2===o.length)v=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error(\\\"gl-texture2d: Invalid shape for texture\\\");if(1===o[2])v=t.ALPHA;else if(2===o[2])v=t.LUMINANCE_ALPHA;else if(3===o[2])v=t.RGB;else{if(4!==o[2])throw new Error(\\\"gl-texture2d: Invalid shape for pixel coords\\\");v=t.RGBA}}c!==t.FLOAT||t.getExtension(\\\"OES_texture_float\\\")||(c=t.UNSIGNED_BYTE,l=!1);var m=e.size;if(l)f=0===e.offset&&e.data.length===m?e.data:e.data.subarray(e.offset,e.offset+m);else{var y=[o[2],o[2]*o[0],1];p=a.malloc(m,r);var x=n(p,o,y,0);\\\"float32\\\"!==r&&\\\"float64\\\"!==r||c!==t.UNSIGNED_BYTE?i.assign(x,e):u(x,e),f=p.subarray(0,m)}var b=g(t);t.texImage2D(t.TEXTURE_2D,0,v,o[0],o[1],0,v,c,f),l||a.free(p);return new h(t,b,o[0],o[1],v,c)}(t,e)}throw new Error(\\\"gl-texture2d: Invalid arguments for texture2d constructor\\\")};var o=null,s=null,l=null;function c(t){return\\\"undefined\\\"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||\\\"undefined\\\"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||\\\"undefined\\\"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||\\\"undefined\\\"!=typeof ImageData&&t instanceof ImageData}var u=function(t,e){i.muls(t,e,255)};function f(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error(\\\"gl-texture2d: Invalid texture size\\\");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function h(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var p=h.prototype;function d(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function v(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error(\\\"gl-texture2d: Invalid texture shape\\\");if(i===t.FLOAT&&!t.getExtension(\\\"OES_texture_float\\\"))throw new Error(\\\"gl-texture2d: Floating point textures not supported on this platform\\\");var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new h(t,o,e,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension(\\\"OES_texture_float_linear\\\")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error(\\\"gl-texture2d: Unknown filter mode \\\"+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension(\\\"OES_texture_float_linear\\\")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error(\\\"gl-texture2d: Unknown filter mode \\\"+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension(\\\"EXT_texture_filter_anisotropic\\\");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error(\\\"gl-texture2d: Unknown wrap mode \\\"+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error(\\\"gl-texture2d: Unknown wrap mode \\\"+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error(\\\"gl-texture2d: Must specify wrap mode for rows and columns\\\");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error(\\\"gl-texture2d: Unknown wrap mode \\\"+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error(\\\"gl-texture2d: Invalid texture shape\\\")}else t=[0|t,0|t];return f(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return f(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,f(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},p.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&&t.stride&&t.data))throw new Error(\\\"gl-texture2d: Unsupported data type\\\");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error(\\\"gl-texture2d: Texture dimensions are out of bounds\\\");!function(t,e,r,o,s,l,c,f){var h=f.dtype,p=f.shape.slice();if(p.length<2||p.length>3)throw new Error(\\\"gl-texture2d: Invalid ndarray, must be 2d or 3d\\\");var g=0,v=0,m=d(p,f.stride.slice());\\\"float32\\\"===h?g=t.FLOAT:\\\"float64\\\"===h?(g=t.FLOAT,m=!1,h=\\\"float32\\\"):\\\"uint8\\\"===h?g=t.UNSIGNED_BYTE:(g=t.UNSIGNED_BYTE,m=!1,h=\\\"uint8\\\");if(2===p.length)v=t.LUMINANCE,p=[p[0],p[1],1],f=n(f.data,p,[f.stride[0],f.stride[1],1],f.offset);else{if(3!==p.length)throw new Error(\\\"gl-texture2d: Invalid shape for texture\\\");if(1===p[2])v=t.ALPHA;else if(2===p[2])v=t.LUMINANCE_ALPHA;else if(3===p[2])v=t.RGB;else{if(4!==p[2])throw new Error(\\\"gl-texture2d: Invalid shape for pixel coords\\\");v=t.RGBA}p[2]}v!==t.LUMINANCE&&v!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(v=s);if(v!==s)throw new Error(\\\"gl-texture2d: Incompatible texture format for setPixels\\\");var y=f.size,x=c.indexOf(o)<0;x&&c.push(o);if(g===l&&m)0===f.offset&&f.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data.subarray(f.offset,f.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data.subarray(f.offset,f.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);g===t.FLOAT&&l===t.UNSIGNED_BYTE?u(_,f):i.assign(_,f),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:433,\\\"ndarray-ops\\\":427,\\\"typedarray-pool\\\":522}],306:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"pick-by-alias\\\");function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function a(t){return\\\"function\\\"==typeof t.getContext&&\\\"width\\\"in t&&\\\"height\\\"in t}e.exports=function(t){var e;if(t?\\\"string\\\"==typeof t&&(t={container:t}):t={},a(t)?t={container:t}:t=\\\"string\\\"==typeof(e=t).nodeName&&\\\"function\\\"==typeof e.appendChild&&\\\"function\\\"==typeof e.getBoundingClientRect?{container:t}:function(t){return\\\"function\\\"==typeof t.drawArrays||\\\"function\\\"==typeof t.drawElements}(t)?{gl:t}:n(t,{container:\\\"container target element el canvas holder parent parentNode wrapper use ref root node\\\",gl:\\\"gl context webgl glContext\\\",attrs:\\\"attributes attrs contextAttributes\\\",pixelRatio:\\\"pixelRatio pxRatio px ratio pxratio pixelratio\\\"},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(\\\"string\\\"==typeof t.container){var r=document.querySelector(t.container);if(!r)throw Error(\\\"Element \\\"+t.container+\\\" is not found\\\");t.container=r}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=document.createElement(\\\"canvas\\\"),t.container.appendChild(t.canvas),i(t))}else t.canvas||(t.container=document.body||document.documentElement,t.canvas=document.createElement(\\\"canvas\\\"),t.canvas.style.position=\\\"absolute\\\",t.canvas.style.top=0,t.canvas.style.left=0,t.container.appendChild(t.canvas),i(t));if(!t.gl)try{t.gl=t.canvas.getContext(\\\"webgl\\\",t.attrs)}catch(e){try{t.gl=t.canvas.getContext(\\\"experimental-webgl\\\",t.attrs)}catch(e){t.gl=t.canvas.getContext(\\\"webgl-experimental\\\",t.attrs)}}return t.gl}},{\\\"pick-by-alias\\\":448}],307:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error(\\\"gl-vao: Too many vertex attributes\\\");for(var i=0;i<r.length;++i){var a=r[i];if(a.buffer){var o=a.buffer,s=a.size||4,l=a.type||t.FLOAT,c=!!a.normalized,u=a.stride||0,f=a.offset||0;o.bind(),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,s,l,c,u,f)}else{if(\\\"number\\\"==typeof a)t.vertexAttrib1f(i,a);else if(1===a.length)t.vertexAttrib1f(i,a[0]);else if(2===a.length)t.vertexAttrib2f(i,a[0],a[1]);else if(3===a.length)t.vertexAttrib3f(i,a[0],a[1],a[2]);else{if(4!==a.length)throw new Error(\\\"gl-vao: Invalid vertex attribute\\\");t.vertexAttrib4f(i,a[0],a[1],a[2],a[3])}t.disableVertexAttribArray(i)}}for(;i<n;++i)t.disableVertexAttribArray(i)}else for(t.bindBuffer(t.ARRAY_BUFFER,null),i=0;i<n;++i)t.disableVertexAttribArray(i)}},{}],308:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./do-bind.js\\\");function i(t){this.gl=t,this._elements=null,this._attributes=null,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(){n(this.gl,this._elements,this._attributes)},i.prototype.update=function(t,e,r){this._elements=e,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},i.prototype.dispose=function(){},i.prototype.unbind=function(){},i.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._elements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t){return new i(t)}},{\\\"./do-bind.js\\\":307}],309:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./do-bind.js\\\");function i(t,e,r,n,i,a){this.location=t,this.dimension=e,this.a=r,this.b=n,this.c=i,this.d=a}function a(t,e,r){this.gl=t,this._ext=e,this.handle=r,this._attribs=[],this._useElements=!1,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(t){switch(this.dimension){case 1:t.vertexAttrib1f(this.location,this.a);break;case 2:t.vertexAttrib2f(this.location,this.a,this.b);break;case 3:t.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:t.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},a.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var t=0;t<this._attribs.length;++t)this._attribs[t].bind(this.gl)},a.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},a.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},a.prototype.update=function(t,e,r){if(this.bind(),n(this.gl,e,t),this.unbind(),this._attribs.length=0,t)for(var a=0;a<t.length;++a){var o=t[a];\\\"number\\\"==typeof o?this._attribs.push(new i(a,1,o)):Array.isArray(o)&&this._attribs.push(new i(a,o.length,o[0],o[1],o[2],o[3]))}this._useElements=!!e,this._elementsType=r||this.gl.UNSIGNED_SHORT},a.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._useElements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t,e){return new a(t,e,e.createVertexArrayOES())}},{\\\"./do-bind.js\\\":307}],310:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/vao-native.js\\\"),i=t(\\\"./lib/vao-emulated.js\\\");function a(t){this.bindVertexArrayOES=t.bindVertexArray.bind(t),this.createVertexArrayOES=t.createVertexArray.bind(t),this.deleteVertexArrayOES=t.deleteVertexArray.bind(t)}e.exports=function(t,e,r,o){var s,l=t.createVertexArray?new a(t):t.getExtension(\\\"OES_vertex_array_object\\\");return(s=l?n(t,l):i(t)).update(e,r,o),s}},{\\\"./lib/vao-emulated.js\\\":308,\\\"./lib/vao-native.js\\\":309}],311:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}},{}],312:[function(t,e,r){e.exports=function(t,e){var r=n(t[0],t[1],t[2]),o=n(e[0],e[1],e[2]);i(r,r),i(o,o);var s=a(r,o);return s>1?0:Math.acos(s)};var n=t(\\\"./fromValues\\\"),i=t(\\\"./normalize\\\"),a=t(\\\"./dot\\\")},{\\\"./dot\\\":322,\\\"./fromValues\\\":328,\\\"./normalize\\\":339}],313:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],314:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],315:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],316:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],317:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},{}],318:[function(t,e,r){e.exports=t(\\\"./distance\\\")},{\\\"./distance\\\":319}],319:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},{}],320:[function(t,e,r){e.exports=t(\\\"./divide\\\")},{\\\"./divide\\\":321}],321:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],322:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],323:[function(t,e,r){e.exports=1e-6},{}],324:[function(t,e,r){e.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=t(\\\"./epsilon\\\")},{\\\"./epsilon\\\":323}],325:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},{}],326:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],327:[function(t,e,r){e.exports=function(t,e,r,i,a,o){var s,l;e||(e=3);r||(r=0);l=i?Math.min(i*e+r,t.length):t.length;for(s=r;s<l;s+=e)n[0]=t[s],n[1]=t[s+1],n[2]=t[s+2],a(n,n,o),t[s]=n[0],t[s+1]=n[1],t[s+2]=n[2];return t};var n=t(\\\"./create\\\")()},{\\\"./create\\\":316}],328:[function(t,e,r){e.exports=function(t,e,r){var n=new Float32Array(3);return n[0]=t,n[1]=e,n[2]=r,n}},{}],329:[function(t,e,r){e.exports={EPSILON:t(\\\"./epsilon\\\"),create:t(\\\"./create\\\"),clone:t(\\\"./clone\\\"),angle:t(\\\"./angle\\\"),fromValues:t(\\\"./fromValues\\\"),copy:t(\\\"./copy\\\"),set:t(\\\"./set\\\"),equals:t(\\\"./equals\\\"),exactEquals:t(\\\"./exactEquals\\\"),add:t(\\\"./add\\\"),subtract:t(\\\"./subtract\\\"),sub:t(\\\"./sub\\\"),multiply:t(\\\"./multiply\\\"),mul:t(\\\"./mul\\\"),divide:t(\\\"./divide\\\"),div:t(\\\"./div\\\"),min:t(\\\"./min\\\"),max:t(\\\"./max\\\"),floor:t(\\\"./floor\\\"),ceil:t(\\\"./ceil\\\"),round:t(\\\"./round\\\"),scale:t(\\\"./scale\\\"),scaleAndAdd:t(\\\"./scaleAndAdd\\\"),distance:t(\\\"./distance\\\"),dist:t(\\\"./dist\\\"),squaredDistance:t(\\\"./squaredDistance\\\"),sqrDist:t(\\\"./sqrDist\\\"),length:t(\\\"./length\\\"),len:t(\\\"./len\\\"),squaredLength:t(\\\"./squaredLength\\\"),sqrLen:t(\\\"./sqrLen\\\"),negate:t(\\\"./negate\\\"),inverse:t(\\\"./inverse\\\"),normalize:t(\\\"./normalize\\\"),dot:t(\\\"./dot\\\"),cross:t(\\\"./cross\\\"),lerp:t(\\\"./lerp\\\"),random:t(\\\"./random\\\"),transformMat4:t(\\\"./transformMat4\\\"),transformMat3:t(\\\"./transformMat3\\\"),transformQuat:t(\\\"./transformQuat\\\"),rotateX:t(\\\"./rotateX\\\"),rotateY:t(\\\"./rotateY\\\"),rotateZ:t(\\\"./rotateZ\\\"),forEach:t(\\\"./forEach\\\")}},{\\\"./add\\\":311,\\\"./angle\\\":312,\\\"./ceil\\\":313,\\\"./clone\\\":314,\\\"./copy\\\":315,\\\"./create\\\":316,\\\"./cross\\\":317,\\\"./dist\\\":318,\\\"./distance\\\":319,\\\"./div\\\":320,\\\"./divide\\\":321,\\\"./dot\\\":322,\\\"./epsilon\\\":323,\\\"./equals\\\":324,\\\"./exactEquals\\\":325,\\\"./floor\\\":326,\\\"./forEach\\\":327,\\\"./fromValues\\\":328,\\\"./inverse\\\":330,\\\"./len\\\":331,\\\"./length\\\":332,\\\"./lerp\\\":333,\\\"./max\\\":334,\\\"./min\\\":335,\\\"./mul\\\":336,\\\"./multiply\\\":337,\\\"./negate\\\":338,\\\"./normalize\\\":339,\\\"./random\\\":340,\\\"./rotateX\\\":341,\\\"./rotateY\\\":342,\\\"./rotateZ\\\":343,\\\"./round\\\":344,\\\"./scale\\\":345,\\\"./scaleAndAdd\\\":346,\\\"./set\\\":347,\\\"./sqrDist\\\":348,\\\"./sqrLen\\\":349,\\\"./squaredDistance\\\":350,\\\"./squaredLength\\\":351,\\\"./sub\\\":352,\\\"./subtract\\\":353,\\\"./transformMat3\\\":354,\\\"./transformMat4\\\":355,\\\"./transformQuat\\\":356}],330:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},{}],331:[function(t,e,r){e.exports=t(\\\"./length\\\")},{\\\"./length\\\":332}],332:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}},{}],333:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t}},{}],334:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}},{}],335:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}},{}],336:[function(t,e,r){e.exports=t(\\\"./multiply\\\")},{\\\"./multiply\\\":337}],337:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}},{}],338:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},{}],339:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a);return t}},{}],340:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},{}],341:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+o*c-s*l,t[2]=a+o*l+s*c,t}},{}],342:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+o*c,t[1]=e[1],t[2]=a+s*c-o*l,t}},{}],343:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+o*c-s*l,t[1]=a+o*l+s*c,t[2]=e[2],t}},{}],344:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],345:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],346:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],347:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],348:[function(t,e,r){e.exports=t(\\\"./squaredDistance\\\")},{\\\"./squaredDistance\\\":350}],349:[function(t,e,r){e.exports=t(\\\"./squaredLength\\\")},{\\\"./squaredLength\\\":351}],350:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},{}],351:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],352:[function(t,e,r){e.exports=t(\\\"./subtract\\\")},{\\\"./subtract\\\":353}],353:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],354:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},{}],355:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},{}],356:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t}},{}],357:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],358:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],359:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],360:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],361:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},{}],362:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],363:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],364:[function(t,e,r){e.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},{}],365:[function(t,e,r){e.exports={create:t(\\\"./create\\\"),clone:t(\\\"./clone\\\"),fromValues:t(\\\"./fromValues\\\"),copy:t(\\\"./copy\\\"),set:t(\\\"./set\\\"),add:t(\\\"./add\\\"),subtract:t(\\\"./subtract\\\"),multiply:t(\\\"./multiply\\\"),divide:t(\\\"./divide\\\"),min:t(\\\"./min\\\"),max:t(\\\"./max\\\"),scale:t(\\\"./scale\\\"),scaleAndAdd:t(\\\"./scaleAndAdd\\\"),distance:t(\\\"./distance\\\"),squaredDistance:t(\\\"./squaredDistance\\\"),length:t(\\\"./length\\\"),squaredLength:t(\\\"./squaredLength\\\"),negate:t(\\\"./negate\\\"),inverse:t(\\\"./inverse\\\"),normalize:t(\\\"./normalize\\\"),dot:t(\\\"./dot\\\"),lerp:t(\\\"./lerp\\\"),random:t(\\\"./random\\\"),transformMat4:t(\\\"./transformMat4\\\"),transformQuat:t(\\\"./transformQuat\\\")}},{\\\"./add\\\":357,\\\"./clone\\\":358,\\\"./copy\\\":359,\\\"./create\\\":360,\\\"./distance\\\":361,\\\"./divide\\\":362,\\\"./dot\\\":363,\\\"./fromValues\\\":364,\\\"./inverse\\\":366,\\\"./length\\\":367,\\\"./lerp\\\":368,\\\"./max\\\":369,\\\"./min\\\":370,\\\"./multiply\\\":371,\\\"./negate\\\":372,\\\"./normalize\\\":373,\\\"./random\\\":374,\\\"./scale\\\":375,\\\"./scaleAndAdd\\\":376,\\\"./set\\\":377,\\\"./squaredDistance\\\":378,\\\"./squaredLength\\\":379,\\\"./subtract\\\":380,\\\"./transformMat4\\\":381,\\\"./transformQuat\\\":382}],366:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],367:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},{}],368:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],369:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],370:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],371:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],372:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],373:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o);return t}},{}],374:[function(t,e,r){var n=t(\\\"./normalize\\\"),i=t(\\\"./scale\\\");e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},{\\\"./normalize\\\":373,\\\"./scale\\\":375}],375:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],376:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],377:[function(t,e,r){e.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},{}],378:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},{}],379:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},{}],380:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],381:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},{}],382:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t[3]=e[3],t}},{}],383:[function(t,e,r){e.exports=function(t,e,r,a){return n[0]=a,n[1]=r,n[2]=e,n[3]=t,i[0]};var n=new Uint8Array(4),i=new Float32Array(n.buffer)},{}],384:[function(t,e,r){var n=t(\\\"glsl-tokenizer\\\"),i=t(\\\"atob-lite\\\");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r<e.length;r++){var a=e[r];if(\\\"preprocessor\\\"===a.type){var o=a.data.match(/\\\\#define\\\\s+SHADER_NAME(_B64)?\\\\s+(.+)$/);if(o&&o[2]){var s=o[1],l=o[2];return(s?i(l):l).trim()}}}}},{\\\"atob-lite\\\":60,\\\"glsl-tokenizer\\\":391}],385:[function(t,e,r){e.exports=function(t){var e,r,k,M=0,A=0,T=l,S=[],C=[],E=1,L=0,z=0,O=!1,I=!1,P=\\\"\\\",D=a,R=n;\\\"300 es\\\"===(t=t||{}).version&&(D=s,R=o);return function(t){return C=[],null!==t?function(t){var r;M=0,k=(P+=t).length;for(;e=P[M],M<k;){switch(r=M,T){case u:M=V();break;case f:case h:M=j();break;case p:M=U();break;case d:M=G();break;case _:M=H();break;case g:M=W();break;case c:M=Y();break;case x:M=N();break;case l:M=F()}if(r!==M)switch(P[r]){case\\\"\\\\n\\\":L=0,++E;break;default:++L}}return A+=M,P=P.slice(M),C}(t.replace?t.replace(/\\\\r\\\\n/g,\\\"\\\\n\\\"):t):function(t){S.length&&B(S.join(\\\"\\\"));return T=b,B(\\\"(eof)\\\"),C}()};function B(t){t.length&&C.push({type:w[T],data:t,position:z,line:E,column:L})}function F(){return S=S.length?[]:S,\\\"/\\\"===r&&\\\"*\\\"===e?(z=A+M-1,T=u,r=e,M+1):\\\"/\\\"===r&&\\\"/\\\"===e?(z=A+M-1,T=f,r=e,M+1):\\\"#\\\"===e?(T=h,z=A+M,M):/\\\\s/.test(e)?(T=x,z=A+M,M):(O=/\\\\d/.test(e),I=/[^\\\\w_]/.test(e),z=A+M,T=O?d:I?p:c,M)}function N(){return/[^\\\\s]/g.test(e)?(B(S.join(\\\"\\\")),T=l,M):(S.push(e),r=e,M+1)}function j(){return\\\"\\\\r\\\"!==e&&\\\"\\\\n\\\"!==e||\\\"\\\\\\\\\\\"===r?(S.push(e),r=e,M+1):(B(S.join(\\\"\\\")),T=l,M)}function V(){return\\\"/\\\"===e&&\\\"*\\\"===r?(S.push(e),B(S.join(\\\"\\\")),T=l,M+1):(S.push(e),r=e,M+1)}function U(){if(\\\".\\\"===r&&/\\\\d/.test(e))return T=g,M;if(\\\"/\\\"===r&&\\\"*\\\"===e)return T=u,M;if(\\\"/\\\"===r&&\\\"/\\\"===e)return T=f,M;if(\\\".\\\"===e&&S.length){for(;q(S););return T=g,M}if(\\\";\\\"===e||\\\")\\\"===e||\\\"(\\\"===e){if(S.length)for(;q(S););return B(e),T=l,M+1}var t=2===S.length&&\\\"=\\\"!==e;if(/[\\\\w_\\\\d\\\\s]/.test(e)||t){for(;q(S););return T=l,M}return S.push(e),r=e,M+1}function q(t){for(var e,r,n=0;;){if(e=i.indexOf(t.slice(0,t.length+n).join(\\\"\\\")),r=i[e],-1===e){if(n--+t.length>0)continue;r=t.slice(0,1).join(\\\"\\\")}return B(r),z+=r.length,(S=S.slice(r.length)).length}}function H(){return/[^a-fA-F0-9]/.test(e)?(B(S.join(\\\"\\\")),T=l,M):(S.push(e),r=e,M+1)}function G(){return\\\".\\\"===e?(S.push(e),T=g,r=e,M+1):/[eE]/.test(e)?(S.push(e),T=g,r=e,M+1):\\\"x\\\"===e&&1===S.length&&\\\"0\\\"===S[0]?(T=_,S.push(e),r=e,M+1):/[^\\\\d]/.test(e)?(B(S.join(\\\"\\\")),T=l,M):(S.push(e),r=e,M+1)}function W(){return\\\"f\\\"===e&&(S.push(e),r=e,M+=1),/[eE]/.test(e)?(S.push(e),r=e,M+1):\\\"-\\\"===e&&/[eE]/.test(r)?(S.push(e),r=e,M+1):/[^\\\\d]/.test(e)?(B(S.join(\\\"\\\")),T=l,M):(S.push(e),r=e,M+1)}function Y(){if(/[^\\\\d\\\\w_]/.test(e)){var t=S.join(\\\"\\\");return T=R.indexOf(t)>-1?y:D.indexOf(t)>-1?m:v,B(S.join(\\\"\\\")),T=l,M}return S.push(e),r=e,M+1}};var n=t(\\\"./lib/literals\\\"),i=t(\\\"./lib/operators\\\"),a=t(\\\"./lib/builtins\\\"),o=t(\\\"./lib/literals-300es\\\"),s=t(\\\"./lib/builtins-300es\\\"),l=999,c=9999,u=0,f=1,h=2,p=3,d=4,g=5,v=6,m=7,y=8,x=9,b=10,_=11,w=[\\\"block-comment\\\",\\\"line-comment\\\",\\\"preprocessor\\\",\\\"operator\\\",\\\"integer\\\",\\\"float\\\",\\\"ident\\\",\\\"builtin\\\",\\\"keyword\\\",\\\"whitespace\\\",\\\"eof\\\",\\\"integer\\\"]},{\\\"./lib/builtins\\\":387,\\\"./lib/builtins-300es\\\":386,\\\"./lib/literals\\\":389,\\\"./lib/literals-300es\\\":388,\\\"./lib/operators\\\":390}],386:[function(t,e,r){var n=t(\\\"./builtins\\\");n=n.slice().filter(function(t){return!/^(gl\\\\_|texture)/.test(t)}),e.exports=n.concat([\\\"gl_VertexID\\\",\\\"gl_InstanceID\\\",\\\"gl_Position\\\",\\\"gl_PointSize\\\",\\\"gl_FragCoord\\\",\\\"gl_FrontFacing\\\",\\\"gl_FragDepth\\\",\\\"gl_PointCoord\\\",\\\"gl_MaxVertexAttribs\\\",\\\"gl_MaxVertexUniformVectors\\\",\\\"gl_MaxVertexOutputVectors\\\",\\\"gl_MaxFragmentInputVectors\\\",\\\"gl_MaxVertexTextureImageUnits\\\",\\\"gl_MaxCombinedTextureImageUnits\\\",\\\"gl_MaxTextureImageUnits\\\",\\\"gl_MaxFragmentUniformVectors\\\",\\\"gl_MaxDrawBuffers\\\",\\\"gl_MinProgramTexelOffset\\\",\\\"gl_MaxProgramTexelOffset\\\",\\\"gl_DepthRangeParameters\\\",\\\"gl_DepthRange\\\",\\\"trunc\\\",\\\"round\\\",\\\"roundEven\\\",\\\"isnan\\\",\\\"isinf\\\",\\\"floatBitsToInt\\\",\\\"floatBitsToUint\\\",\\\"intBitsToFloat\\\",\\\"uintBitsToFloat\\\",\\\"packSnorm2x16\\\",\\\"unpackSnorm2x16\\\",\\\"packUnorm2x16\\\",\\\"unpackUnorm2x16\\\",\\\"packHalf2x16\\\",\\\"unpackHalf2x16\\\",\\\"outerProduct\\\",\\\"transpose\\\",\\\"determinant\\\",\\\"inverse\\\",\\\"texture\\\",\\\"textureSize\\\",\\\"textureProj\\\",\\\"textureLod\\\",\\\"textureOffset\\\",\\\"texelFetch\\\",\\\"texelFetchOffset\\\",\\\"textureProjOffset\\\",\\\"textureLodOffset\\\",\\\"textureProjLod\\\",\\\"textureProjLodOffset\\\",\\\"textureGrad\\\",\\\"textureGradOffset\\\",\\\"textureProjGrad\\\",\\\"textureProjGradOffset\\\"])},{\\\"./builtins\\\":387}],387:[function(t,e,r){e.exports=[\\\"abs\\\",\\\"acos\\\",\\\"all\\\",\\\"any\\\",\\\"asin\\\",\\\"atan\\\",\\\"ceil\\\",\\\"clamp\\\",\\\"cos\\\",\\\"cross\\\",\\\"dFdx\\\",\\\"dFdy\\\",\\\"degrees\\\",\\\"distance\\\",\\\"dot\\\",\\\"equal\\\",\\\"exp\\\",\\\"exp2\\\",\\\"faceforward\\\",\\\"floor\\\",\\\"fract\\\",\\\"gl_BackColor\\\",\\\"gl_BackLightModelProduct\\\",\\\"gl_BackLightProduct\\\",\\\"gl_BackMaterial\\\",\\\"gl_BackSecondaryColor\\\",\\\"gl_ClipPlane\\\",\\\"gl_ClipVertex\\\",\\\"gl_Color\\\",\\\"gl_DepthRange\\\",\\\"gl_DepthRangeParameters\\\",\\\"gl_EyePlaneQ\\\",\\\"gl_EyePlaneR\\\",\\\"gl_EyePlaneS\\\",\\\"gl_EyePlaneT\\\",\\\"gl_Fog\\\",\\\"gl_FogCoord\\\",\\\"gl_FogFragCoord\\\",\\\"gl_FogParameters\\\",\\\"gl_FragColor\\\",\\\"gl_FragCoord\\\",\\\"gl_FragData\\\",\\\"gl_FragDepth\\\",\\\"gl_FragDepthEXT\\\",\\\"gl_FrontColor\\\",\\\"gl_FrontFacing\\\",\\\"gl_FrontLightModelProduct\\\",\\\"gl_FrontLightProduct\\\",\\\"gl_FrontMaterial\\\",\\\"gl_FrontSecondaryColor\\\",\\\"gl_LightModel\\\",\\\"gl_LightModelParameters\\\",\\\"gl_LightModelProducts\\\",\\\"gl_LightProducts\\\",\\\"gl_LightSource\\\",\\\"gl_LightSourceParameters\\\",\\\"gl_MaterialParameters\\\",\\\"gl_MaxClipPlanes\\\",\\\"gl_MaxCombinedTextureImageUnits\\\",\\\"gl_MaxDrawBuffers\\\",\\\"gl_MaxFragmentUniformComponents\\\",\\\"gl_MaxLights\\\",\\\"gl_MaxTextureCoords\\\",\\\"gl_MaxTextureImageUnits\\\",\\\"gl_MaxTextureUnits\\\",\\\"gl_MaxVaryingFloats\\\",\\\"gl_MaxVertexAttribs\\\",\\\"gl_MaxVertexTextureImageUnits\\\",\\\"gl_MaxVertexUniformComponents\\\",\\\"gl_ModelViewMatrix\\\",\\\"gl_ModelViewMatrixInverse\\\",\\\"gl_ModelViewMatrixInverseTranspose\\\",\\\"gl_ModelViewMatrixTranspose\\\",\\\"gl_ModelViewProjectionMatrix\\\",\\\"gl_ModelViewProjectionMatrixInverse\\\",\\\"gl_ModelViewProjectionMatrixInverseTranspose\\\",\\\"gl_ModelViewProjectionMatrixTranspose\\\",\\\"gl_MultiTexCoord0\\\",\\\"gl_MultiTexCoord1\\\",\\\"gl_MultiTexCoord2\\\",\\\"gl_MultiTexCoord3\\\",\\\"gl_MultiTexCoord4\\\",\\\"gl_MultiTexCoord5\\\",\\\"gl_MultiTexCoord6\\\",\\\"gl_MultiTexCoord7\\\",\\\"gl_Normal\\\",\\\"gl_NormalMatrix\\\",\\\"gl_NormalScale\\\",\\\"gl_ObjectPlaneQ\\\",\\\"gl_ObjectPlaneR\\\",\\\"gl_ObjectPlaneS\\\",\\\"gl_ObjectPlaneT\\\",\\\"gl_Point\\\",\\\"gl_PointCoord\\\",\\\"gl_PointParameters\\\",\\\"gl_PointSize\\\",\\\"gl_Position\\\",\\\"gl_ProjectionMatrix\\\",\\\"gl_ProjectionMatrixInverse\\\",\\\"gl_ProjectionMatrixInverseTranspose\\\",\\\"gl_ProjectionMatrixTranspose\\\",\\\"gl_SecondaryColor\\\",\\\"gl_TexCoord\\\",\\\"gl_TextureEnvColor\\\",\\\"gl_TextureMatrix\\\",\\\"gl_TextureMatrixInverse\\\",\\\"gl_TextureMatrixInverseTranspose\\\",\\\"gl_TextureMatrixTranspose\\\",\\\"gl_Vertex\\\",\\\"greaterThan\\\",\\\"greaterThanEqual\\\",\\\"inversesqrt\\\",\\\"length\\\",\\\"lessThan\\\",\\\"lessThanEqual\\\",\\\"log\\\",\\\"log2\\\",\\\"matrixCompMult\\\",\\\"max\\\",\\\"min\\\",\\\"mix\\\",\\\"mod\\\",\\\"normalize\\\",\\\"not\\\",\\\"notEqual\\\",\\\"pow\\\",\\\"radians\\\",\\\"reflect\\\",\\\"refract\\\",\\\"sign\\\",\\\"sin\\\",\\\"smoothstep\\\",\\\"sqrt\\\",\\\"step\\\",\\\"tan\\\",\\\"texture2D\\\",\\\"texture2DLod\\\",\\\"texture2DProj\\\",\\\"texture2DProjLod\\\",\\\"textureCube\\\",\\\"textureCubeLod\\\",\\\"texture2DLodEXT\\\",\\\"texture2DProjLodEXT\\\",\\\"textureCubeLodEXT\\\",\\\"texture2DGradEXT\\\",\\\"texture2DProjGradEXT\\\",\\\"textureCubeGradEXT\\\"]},{}],388:[function(t,e,r){var n=t(\\\"./literals\\\");e.exports=n.slice().concat([\\\"layout\\\",\\\"centroid\\\",\\\"smooth\\\",\\\"case\\\",\\\"mat2x2\\\",\\\"mat2x3\\\",\\\"mat2x4\\\",\\\"mat3x2\\\",\\\"mat3x3\\\",\\\"mat3x4\\\",\\\"mat4x2\\\",\\\"mat4x3\\\",\\\"mat4x4\\\",\\\"uint\\\",\\\"uvec2\\\",\\\"uvec3\\\",\\\"uvec4\\\",\\\"samplerCubeShadow\\\",\\\"sampler2DArray\\\",\\\"sampler2DArrayShadow\\\",\\\"isampler2D\\\",\\\"isampler3D\\\",\\\"isamplerCube\\\",\\\"isampler2DArray\\\",\\\"usampler2D\\\",\\\"usampler3D\\\",\\\"usamplerCube\\\",\\\"usampler2DArray\\\",\\\"coherent\\\",\\\"restrict\\\",\\\"readonly\\\",\\\"writeonly\\\",\\\"resource\\\",\\\"atomic_uint\\\",\\\"noperspective\\\",\\\"patch\\\",\\\"sample\\\",\\\"subroutine\\\",\\\"common\\\",\\\"partition\\\",\\\"active\\\",\\\"filter\\\",\\\"image1D\\\",\\\"image2D\\\",\\\"image3D\\\",\\\"imageCube\\\",\\\"iimage1D\\\",\\\"iimage2D\\\",\\\"iimage3D\\\",\\\"iimageCube\\\",\\\"uimage1D\\\",\\\"uimage2D\\\",\\\"uimage3D\\\",\\\"uimageCube\\\",\\\"image1DArray\\\",\\\"image2DArray\\\",\\\"iimage1DArray\\\",\\\"iimage2DArray\\\",\\\"uimage1DArray\\\",\\\"uimage2DArray\\\",\\\"image1DShadow\\\",\\\"image2DShadow\\\",\\\"image1DArrayShadow\\\",\\\"image2DArrayShadow\\\",\\\"imageBuffer\\\",\\\"iimageBuffer\\\",\\\"uimageBuffer\\\",\\\"sampler1DArray\\\",\\\"sampler1DArrayShadow\\\",\\\"isampler1D\\\",\\\"isampler1DArray\\\",\\\"usampler1D\\\",\\\"usampler1DArray\\\",\\\"isampler2DRect\\\",\\\"usampler2DRect\\\",\\\"samplerBuffer\\\",\\\"isamplerBuffer\\\",\\\"usamplerBuffer\\\",\\\"sampler2DMS\\\",\\\"isampler2DMS\\\",\\\"usampler2DMS\\\",\\\"sampler2DMSArray\\\",\\\"isampler2DMSArray\\\",\\\"usampler2DMSArray\\\"])},{\\\"./literals\\\":389}],389:[function(t,e,r){e.exports=[\\\"precision\\\",\\\"highp\\\",\\\"mediump\\\",\\\"lowp\\\",\\\"attribute\\\",\\\"const\\\",\\\"uniform\\\",\\\"varying\\\",\\\"break\\\",\\\"continue\\\",\\\"do\\\",\\\"for\\\",\\\"while\\\",\\\"if\\\",\\\"else\\\",\\\"in\\\",\\\"out\\\",\\\"inout\\\",\\\"float\\\",\\\"int\\\",\\\"void\\\",\\\"bool\\\",\\\"true\\\",\\\"false\\\",\\\"discard\\\",\\\"return\\\",\\\"mat2\\\",\\\"mat3\\\",\\\"mat4\\\",\\\"vec2\\\",\\\"vec3\\\",\\\"vec4\\\",\\\"ivec2\\\",\\\"ivec3\\\",\\\"ivec4\\\",\\\"bvec2\\\",\\\"bvec3\\\",\\\"bvec4\\\",\\\"sampler1D\\\",\\\"sampler2D\\\",\\\"sampler3D\\\",\\\"samplerCube\\\",\\\"sampler1DShadow\\\",\\\"sampler2DShadow\\\",\\\"struct\\\",\\\"asm\\\",\\\"class\\\",\\\"union\\\",\\\"enum\\\",\\\"typedef\\\",\\\"template\\\",\\\"this\\\",\\\"packed\\\",\\\"goto\\\",\\\"switch\\\",\\\"default\\\",\\\"inline\\\",\\\"noinline\\\",\\\"volatile\\\",\\\"public\\\",\\\"static\\\",\\\"extern\\\",\\\"external\\\",\\\"interface\\\",\\\"long\\\",\\\"short\\\",\\\"double\\\",\\\"half\\\",\\\"fixed\\\",\\\"unsigned\\\",\\\"input\\\",\\\"output\\\",\\\"hvec2\\\",\\\"hvec3\\\",\\\"hvec4\\\",\\\"dvec2\\\",\\\"dvec3\\\",\\\"dvec4\\\",\\\"fvec2\\\",\\\"fvec3\\\",\\\"fvec4\\\",\\\"sampler2DRect\\\",\\\"sampler3DRect\\\",\\\"sampler2DRectShadow\\\",\\\"sizeof\\\",\\\"cast\\\",\\\"namespace\\\",\\\"using\\\"]},{}],390:[function(t,e,r){e.exports=[\\\"<<=\\\",\\\">>=\\\",\\\"++\\\",\\\"--\\\",\\\"<<\\\",\\\">>\\\",\\\"<=\\\",\\\">=\\\",\\\"==\\\",\\\"!=\\\",\\\"&&\\\",\\\"||\\\",\\\"+=\\\",\\\"-=\\\",\\\"*=\\\",\\\"/=\\\",\\\"%=\\\",\\\"&=\\\",\\\"^^\\\",\\\"^=\\\",\\\"|=\\\",\\\"(\\\",\\\")\\\",\\\"[\\\",\\\"]\\\",\\\".\\\",\\\"!\\\",\\\"~\\\",\\\"*\\\",\\\"/\\\",\\\"%\\\",\\\"+\\\",\\\"-\\\",\\\"<\\\",\\\">\\\",\\\"&\\\",\\\"^\\\",\\\"|\\\",\\\"?\\\",\\\":\\\",\\\"=\\\",\\\",\\\",\\\";\\\",\\\"{\\\",\\\"}\\\"]},{}],391:[function(t,e,r){var n=t(\\\"./index\\\");e.exports=function(t,e){var r=n(e),i=[];return i=(i=i.concat(r(t))).concat(r(null))}},{\\\"./index\\\":385}],392:[function(t,e,r){e.exports=function(t){\\\"string\\\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n<t.length-1;n++)r.push(t[n],e[n]||\\\"\\\");return r.push(t[n]),r.join(\\\"\\\")}},{}],393:[function(t,e,r){(function(r){\\\"use strict\\\";var n,i=t(\\\"is-browser\\\");n=\\\"function\\\"==typeof r.matchMedia?!r.matchMedia(\\\"(hover: none)\\\").matches:i,e.exports=n}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"is-browser\\\":400}],394:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"is-browser\\\");e.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},\\\"passive\\\",{get:function(){t=!0}});window.addEventListener(\\\"test\\\",null,e),window.removeEventListener(\\\"test\\\",null,e)}catch(e){t=!1}return t}()},{\\\"is-browser\\\":400}],395:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,c=l>>1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<<c)-1,f=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],396:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=t.length;if(0===r)throw new Error(\\\"Must have at least d+1 points\\\");var i=t[0].length;if(r<=i)throw new Error(\\\"Must input at least d+1 points\\\");var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error(\\\"Input not in general position\\\");for(var l=new Array(i+1),u=0;u<=i;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);for(var f=new a(l,new Array(i+1),!1),h=f.adjacent,p=new Array(i+2),u=0;u<=i;++u){for(var d=l.slice(),g=0;g<=i;++g)g===u&&(d[g]=-1);var v=d[0];d[0]=d[1],d[1]=v;var m=new a(d,new Array(i+1),!0);h[u]=m,p[u]=m}p[i+1]=f;for(var u=0;u<=i;++u)for(var d=h[u].vertices,y=h[u].adjacent,g=0;g<=i;++g){var x=d[g];if(x<0)y[g]=f;else for(var b=0;b<=i;++b)h[b].vertices.indexOf(x)<0&&(y[g]=h[b])}for(var _=new c(i,o,p),w=!!e,u=i+1;u<r;++u)_.insert(t[u],w);return _.boundary()};var n=t(\\\"robust-orientation\\\"),i=t(\\\"simplicial-complex\\\").compareCells;function a(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function o(t,e,r){this.vertices=t,this.cell=e,this.index=r}function s(t,e){return i(t.vertices,e.vertices)}a.prototype.flip=function(){var t=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=t;var e=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=e};var l=[];function c(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var i=0;i<=t;++i)this.tuple[i]=this.vertices[i];var a=l[t];a||(a=l[t]=function(t){for(var e=[\\\"function orient(){var tuple=this.tuple;return test(\\\"],r=0;r<=t;++r)r>0&&e.push(\\\",\\\"),e.push(\\\"tuple[\\\",r,\\\"]\\\");e.push(\\\")}return orient\\\");var i=new Function(\\\"test\\\",e.join(\\\"\\\")),a=n[t+1];return a||(a=n),i(a)}(t)),this.orient=a}var u=c.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,f=0;f<=r;++f){var h=u[f];i[f]=h<0?e:a[h]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var f=c[u];if(!(f.lastVisited>=r)){var h=a[u];a[u]=t;var p=this.orient();if(a[u]=h,p<0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];f.length>0;){var p=(e=f.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g<0))for(var v=0;v<=n;++v)if(v!==g){var m=d[v];if(m.boundary&&!(m.lastVisited>=r)){var y=m.vertices;if(m.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,m.boundary=!1,c.push(m),f.push(m),m.lastVisited=r;continue}m.lastVisited=-r}var _=m.adjacent,w=p.slice(),k=d.slice(),M=new a(w,k,!0);u.push(M);var A=_.indexOf(e);if(!(A<0)){_[A]=M,k[g]=m,w[v]=-1,k[v]=e,d[v]=M,M.flip();for(b=0;b<=n;++b){var T=w[b];if(!(T<0||T===r)){for(var S=new Array(n-1),C=0,E=0;E<=n;++E){var L=w[E];L<0||E===b||(S[C++]=L)}h.push(new o(S,M,b))}}}}}}h.sort(s);for(v=0;v+1<h.length;v+=2){var z=h[v],O=h[v+1],I=z.index,P=O.index;I<0||P<0||(z.cell.adjacent[z.index]=O.cell,O.cell.adjacent[O.index]=z.cell)}},u.insert=function(t,e){var r=this.vertices;r.push(t);var n=this.walk(t,e);if(n){for(var i=this.dimension,a=this.tuple,o=0;o<=i;++o){var s=n.vertices[o];a[o]=s<0?t:r[s]}var l=this.orient(a);l<0||(0!==l||(n=this.handleBoundaryDegeneracy(n,t)))&&this.addPeaks(t,n)}},u.boundary=function(){for(var t=this.dimension,e=[],r=this.simplices,n=r.length,i=0;i<n;++i){var a=r[i];if(a.boundary){for(var o=new Array(t),s=a.vertices,l=0,c=0,u=0;u<=t;++u)s[u]>=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},{\\\"robust-orientation\\\":486,\\\"simplicial-complex\\\":496}],397:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\"),i=0,a=1;function o(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new x(null);return new x(y(t))};var s=o.prototype;function l(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function c(t,e){var r=y(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function u(t,e){var r=t.intervals([]);r.push(e),c(t,r)}function f(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?i:(r.splice(n,1),c(t,r),a)}function h(t,e,r){for(var n=0;n<t.length&&t[n][0]<=e;++n){var i=r(t[n]);if(i)return i}}function p(t,e,r){for(var n=t.length-1;n>=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function d(t,e){for(var r=0;r<t.length;++r){var n=e(t[r]);if(n)return n}}function g(t,e){return t-e}function v(t,e){var r=t[0]-e[0];return r||t[1]-e[1]}function m(t,e){var r=t[1]-e[1];return r||t[0]-e[0]}function y(t){if(0===t.length)return null;for(var e=[],r=0;r<t.length;++r)e.push(t[r][0],t[r][1]);e.sort(g);var n=e[e.length>>1],i=[],a=[],s=[];for(r=0;r<t.length;++r){var l=t[r];l[1]<n?i.push(l):n<l[0]?a.push(l):s.push(l)}var c=s,u=s.slice();return c.sort(v),u.sort(m),new o(n,y(i),y(a),c,u)}function x(t){this.root=t}s.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},s.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(e+1)?u(this,t):this.left.insert(t):this.left=y([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?u(this,t):this.right.insert(t):this.right=y([t]);else{var r=n.ge(this.leftPoints,t,v),i=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(e-1)?f(this,t):2===(c=this.left.remove(t))?(this.left=null,this.count-=1,a):(c===a&&(this.count-=1),c):i;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?f(this,t):2===(c=this.right.remove(t))?(this.right=null,this.count-=1,a):(c===a&&(this.count-=1),c):i;if(1===this.count)return this.leftPoints[0]===t?2:i;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,c=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=c}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return a}for(s=n.ge(this.leftPoints,t,v);s<this.leftPoints.length&&this.leftPoints[s][0]===t[0];++s)if(this.leftPoints[s]===t){this.count-=1,this.leftPoints.splice(s,1);for(c=n.ge(this.rightPoints,t,m);c<this.rightPoints.length&&this.rightPoints[c][1]===t[1];++c)if(this.rightPoints[c]===t)return this.rightPoints.splice(c,1),a}return i},s.queryPoint=function(t,e){if(t<this.mid){if(this.left)if(r=this.left.queryPoint(t,e))return r;return h(this.leftPoints,t,e)}if(t>this.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return p(this.rightPoints,t,e)}return d(this.leftPoints,e)},s.queryInterval=function(t,e,r){var n;if(t<this.mid&&this.left&&(n=this.left.queryInterval(t,e,r)))return n;if(e>this.mid&&this.right&&(n=this.right.queryInterval(t,e,r)))return n;return e<this.mid?h(this.leftPoints,e,r):t>this.mid?p(this.rightPoints,t,r):d(this.leftPoints,r)};var b=x.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new o(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==i}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,\\\"count\\\",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,\\\"intervals\\\",{get:function(){return this.root?this.root.intervals([]):[]}})},{\\\"binary-search-bounds\\\":79}],398:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r<t.length;++r)e[t[r]]=r;return e}},{}],399:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=r;return e}},{}],400:[function(t,e,r){e.exports=!0},{}],401:[function(t,e,r){function n(t){return!!t.constructor&&\\\"function\\\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||function(t){return\\\"function\\\"==typeof t.readFloatLE&&\\\"function\\\"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],402:[function(t,e,r){\\\"use strict\\\";e.exports=\\\"undefined\\\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\\\//.test(navigator.appVersion))},{}],403:[function(t,e,r){\\\"use strict\\\";e.exports=a,e.exports.isMobile=a;var n=/(android|bb\\\\d+|meego).+mobile|avantgo|bada\\\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/(android|bb\\\\d+|meego).+mobile|avantgo|bada\\\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function a(t){t||(t={});var e=t.ua;return e||\\\"undefined\\\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\\\"string\\\"==typeof e.headers[\\\"user-agent\\\"]&&(e=e.headers[\\\"user-agent\\\"]),\\\"string\\\"==typeof e&&(t.tablet?i.test(e):n.test(e))}},{}],404:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=typeof t;return null!==t&&(\\\"object\\\"===e||\\\"function\\\"===e)}},{}],405:[function(t,e,r){\\\"use strict\\\";var n=Object.prototype.toString;e.exports=function(t){var e;return\\\"[object Object]\\\"===n.call(t)&&(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},{}],406:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e,r=t.length,n=0;n<r;n++)if(((e=t.charCodeAt(n))<9||e>13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},{}],407:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return\\\"string\\\"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\\\\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\\\\dz]$/i.test(t)&&t.length>4))}},{}],408:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],409:[function(t,e,r){(function(t){!function(t,n){\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?e.exports=n():t.mapboxgl=n()}(this,function(){\\\"use strict\\\";var e,r,n;function i(t,i){if(e)if(r){var a=\\\"var sharedChunk = {}; (\\\"+e+\\\")(sharedChunk); (\\\"+r+\\\")(sharedChunk);\\\",o={};e(o),(n=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:\\\"text/javascript\\\"}))}else r=i;else e=i}return i(0,function(e){var r=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof t?t:\\\"undefined\\\"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,\\\"default\\\")?t.default:t}function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a=o;function o(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}o.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},o.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},o.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},o.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&&(e=1e-6),i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=a/s}if((i=t)<(r=0))return r;if(i>(n=1))return n;for(;r<n;){if(a=this.sampleCurveX(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i},o.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var s=function(t,e,r){this.column=t,this.row=e,this.zoom=r};s.prototype.clone=function(){return new s(this.column,this.row,this.zoom)},s.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},s.prototype.sub=function(t){return this.clone()._sub(t)},s.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},s.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var l=c;function c(t,e){this.x=t,this.y=e}function u(t,e,r,n){var i=new a(t,e,r,n);return function(t){return i.solve(t)}}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(t){return t instanceof c?t:Array.isArray(t)?new c(t[0],t[1]):t};var f=u(.25,.1,.25,1);function h(t,e,r){return Math.min(r,Math.max(e,t))}function p(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}var d=1;function g(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function v(t,e){return-1!==t.indexOf(e,t.length-e.length)}function m(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function y(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function x(t){return Array.isArray(t)?t.map(x):\\\"object\\\"==typeof t&&t?m(t,x):t}var b={};function _(t){b[t]||(\\\"undefined\\\"!=typeof console&&console.warn(t),b[t]=!0)}function w(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function k(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r<n;i=r++)a=t[r],e+=((o=t[i]).x-a.x)*(a.y+o.y);return e}var M={Unknown:\\\"Unknown\\\",Style:\\\"Style\\\",Source:\\\"Source\\\",Tile:\\\"Tile\\\",Glyphs:\\\"Glyphs\\\",SpriteImage:\\\"SpriteImage\\\",SpriteJSON:\\\"SpriteJSON\\\",Image:\\\"Image\\\"};\\\"function\\\"==typeof Object.freeze&&Object.freeze(M);var A=function(t){function e(e,r,n){t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+\\\": \\\"+this.message+\\\" (\\\"+this.status+\\\"): \\\"+this.url},e}(Error);function T(t){var e=new self.XMLHttpRequest;for(var r in e.open(\\\"GET\\\",t.url,!0),t.headers)e.setRequestHeader(r,t.headers[r]);return e.withCredentials=\\\"include\\\"===t.credentials,e}var S=function(t,e){var r=T(t);return r.responseType=\\\"arraybuffer\\\",r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){var n=r.response;if(0===n.byteLength&&200===r.status)return e(new Error(\\\"http status 200 returned without content.\\\"));r.status>=200&&r.status<300&&r.response?e(null,{data:n,cacheControl:r.getResponseHeader(\\\"Cache-Control\\\"),expires:r.getResponseHeader(\\\"Expires\\\")}):e(new A(r.statusText,r.status,t.url))},r.send(),r};function C(t,e,r){r[t]=r[t]||[],r[t].push(e)}function E(t,e,r){if(r&&r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}var L=function(t,e){void 0===e&&(e={}),p(this,e),this.type=t},z=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,\\\"error\\\",p({error:e},r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(L),O=function(){};O.prototype.on=function(t,e){return this._listeners=this._listeners||{},C(t,e,this._listeners),this},O.prototype.off=function(t,e){return E(t,e,this._listeners),E(t,e,this._oneTimeListeners),this},O.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},C(t,e,this._oneTimeListeners),this},O.prototype.fire=function(t){\\\"string\\\"==typeof t&&(t=new L(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var r=0,n=this._listeners&&this._listeners[e]?this._listeners[e].slice():[];r<n.length;r+=1)n[r].call(this,t);for(var i=0,a=this._oneTimeListeners&&this._oneTimeListeners[e]?this._oneTimeListeners[e].slice():[];i<a.length;i+=1){var o=a[i];E(e,o,this._oneTimeListeners),o.call(this,t)}var s=this._eventedParent;s&&(p(t,\\\"function\\\"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),s.fire(t))}else v(e,\\\"error\\\")?console.error(t&&t.error||t||\\\"Empty error event\\\"):v(e,\\\"warning\\\")&&console.warn(t&&t.warning||t||\\\"Empty warning event\\\");return this},O.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},O.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var I={$version:8,$root:{version:{required:!0,type:\\\"enum\\\",values:[8]},name:{type:\\\"string\\\"},metadata:{type:\\\"*\\\"},center:{type:\\\"array\\\",value:\\\"number\\\"},zoom:{type:\\\"number\\\"},bearing:{type:\\\"number\\\",default:0,period:360,units:\\\"degrees\\\"},pitch:{type:\\\"number\\\",default:0,units:\\\"degrees\\\"},light:{type:\\\"light\\\"},sources:{required:!0,type:\\\"sources\\\"},sprite:{type:\\\"string\\\"},glyphs:{type:\\\"string\\\"},transition:{type:\\\"transition\\\"},layers:{required:!0,type:\\\"array\\\",value:\\\"layer\\\"}},sources:{\\\"*\\\":{type:\\\"source\\\"}},source:[\\\"source_vector\\\",\\\"source_raster\\\",\\\"source_raster_dem\\\",\\\"source_geojson\\\",\\\"source_video\\\",\\\"source_image\\\"],source_vector:{type:{required:!0,type:\\\"enum\\\",values:{vector:{}}},url:{type:\\\"string\\\"},tiles:{type:\\\"array\\\",value:\\\"string\\\"},bounds:{type:\\\"array\\\",value:\\\"number\\\",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:\\\"number\\\",default:0},maxzoom:{type:\\\"number\\\",default:22},attribution:{type:\\\"string\\\"},\\\"*\\\":{type:\\\"*\\\"}},source_raster:{type:{required:!0,type:\\\"enum\\\",values:{raster:{}}},url:{type:\\\"string\\\"},tiles:{type:\\\"array\\\",value:\\\"string\\\"},bounds:{type:\\\"array\\\",value:\\\"number\\\",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:\\\"number\\\",default:0},maxzoom:{type:\\\"number\\\",default:22},tileSize:{type:\\\"number\\\",default:512,units:\\\"pixels\\\"},scheme:{type:\\\"enum\\\",values:{xyz:{},tms:{}},default:\\\"xyz\\\"},attribution:{type:\\\"string\\\"},\\\"*\\\":{type:\\\"*\\\"}},source_raster_dem:{type:{required:!0,type:\\\"enum\\\",values:{\\\"raster-dem\\\":{}}},url:{type:\\\"string\\\"},tiles:{type:\\\"array\\\",value:\\\"string\\\"},bounds:{type:\\\"array\\\",value:\\\"number\\\",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:\\\"number\\\",default:0},maxzoom:{type:\\\"number\\\",default:22},tileSize:{type:\\\"number\\\",default:512,units:\\\"pixels\\\"},attribution:{type:\\\"string\\\"},encoding:{type:\\\"enum\\\",values:{terrarium:{},mapbox:{}},default:\\\"mapbox\\\"},\\\"*\\\":{type:\\\"*\\\"}},source_geojson:{type:{required:!0,type:\\\"enum\\\",values:{geojson:{}}},data:{type:\\\"*\\\"},maxzoom:{type:\\\"number\\\",default:18},buffer:{type:\\\"number\\\",default:128,maximum:512,minimum:0},tolerance:{type:\\\"number\\\",default:.375},cluster:{type:\\\"boolean\\\",default:!1},clusterRadius:{type:\\\"number\\\",default:50,minimum:0},clusterMaxZoom:{type:\\\"number\\\"},lineMetrics:{type:\\\"boolean\\\",default:!1}},source_video:{type:{required:!0,type:\\\"enum\\\",values:{video:{}}},urls:{required:!0,type:\\\"array\\\",value:\\\"string\\\"},coordinates:{required:!0,type:\\\"array\\\",length:4,value:{type:\\\"array\\\",length:2,value:\\\"number\\\"}}},source_image:{type:{required:!0,type:\\\"enum\\\",values:{image:{}}},url:{required:!0,type:\\\"string\\\"},coordinates:{required:!0,type:\\\"array\\\",length:4,value:{type:\\\"array\\\",length:2,value:\\\"number\\\"}}},layer:{id:{type:\\\"string\\\",required:!0},type:{type:\\\"enum\\\",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},\\\"fill-extrusion\\\":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:\\\"*\\\"},source:{type:\\\"string\\\"},\\\"source-layer\\\":{type:\\\"string\\\"},minzoom:{type:\\\"number\\\",minimum:0,maximum:24},maxzoom:{type:\\\"number\\\",minimum:0,maximum:24},filter:{type:\\\"filter\\\"},layout:{type:\\\"layout\\\"},paint:{type:\\\"paint\\\"}},layout:[\\\"layout_fill\\\",\\\"layout_line\\\",\\\"layout_circle\\\",\\\"layout_heatmap\\\",\\\"layout_fill-extrusion\\\",\\\"layout_symbol\\\",\\\"layout_raster\\\",\\\"layout_hillshade\\\",\\\"layout_background\\\"],layout_background:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_fill:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_circle:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_heatmap:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_line:{\\\"line-cap\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{butt:{},round:{},square:{}},default:\\\"butt\\\"},\\\"line-join\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{bevel:{},round:{},miter:{}},default:\\\"miter\\\"},\\\"line-miter-limit\\\":{type:\\\"number\\\",default:2,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[{\\\"line-join\\\":\\\"miter\\\"}]},\\\"line-round-limit\\\":{type:\\\"number\\\",default:1.05,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[{\\\"line-join\\\":\\\"round\\\"}]},visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_symbol:{\\\"symbol-placement\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{point:{},line:{}},default:\\\"point\\\"},\\\"symbol-spacing\\\":{type:\\\"number\\\",default:250,minimum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,units:\\\"pixels\\\",requires:[{\\\"symbol-placement\\\":\\\"line\\\"}]},\\\"symbol-avoid-edges\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1},\\\"icon-allow-overlap\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"icon-image\\\"]},\\\"icon-ignore-placement\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"icon-image\\\"]},\\\"icon-optional\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"icon-image\\\",\\\"text-field\\\"]},\\\"icon-rotation-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{},auto:{}},default:\\\"auto\\\",requires:[\\\"icon-image\\\"]},\\\"icon-size\\\":{type:\\\"number\\\",default:1,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,units:\\\"factor of the original icon size\\\",requires:[\\\"icon-image\\\"]},\\\"icon-text-fit\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{none:{},width:{},height:{},both:{}},default:\\\"none\\\",requires:[\\\"icon-image\\\",\\\"text-field\\\"]},\\\"icon-text-fit-padding\\\":{type:\\\"array\\\",value:\\\"number\\\",length:4,default:[0,0,0,0],units:\\\"pixels\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[\\\"icon-image\\\",\\\"text-field\\\",{\\\"icon-text-fit\\\":[\\\"both\\\",\\\"width\\\",\\\"height\\\"]}]},\\\"icon-image\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,tokens:!0},\\\"icon-rotate\\\":{type:\\\"number\\\",default:0,period:360,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,units:\\\"degrees\\\",requires:[\\\"icon-image\\\"]},\\\"icon-padding\\\":{type:\\\"number\\\",default:2,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,units:\\\"pixels\\\",requires:[\\\"icon-image\\\"]},\\\"icon-keep-upright\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"icon-image\\\",{\\\"icon-rotation-alignment\\\":\\\"map\\\"},{\\\"symbol-placement\\\":\\\"line\\\"}]},\\\"icon-offset\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"icon-image\\\"]},\\\"icon-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{center:{},left:{},right:{},top:{},bottom:{},\\\"top-left\\\":{},\\\"top-right\\\":{},\\\"bottom-left\\\":{},\\\"bottom-right\\\":{}},default:\\\"center\\\",requires:[\\\"icon-image\\\"]},\\\"icon-pitch-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{},auto:{}},default:\\\"auto\\\",requires:[\\\"icon-image\\\"]},\\\"text-pitch-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{},auto:{}},default:\\\"auto\\\",requires:[\\\"text-field\\\"]},\\\"text-rotation-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{},auto:{}},default:\\\"auto\\\",requires:[\\\"text-field\\\"]},\\\"text-field\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:\\\"\\\",tokens:!0},\\\"text-font\\\":{type:\\\"array\\\",value:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:[\\\"Open Sans Regular\\\",\\\"Arial Unicode MS Regular\\\"],requires:[\\\"text-field\\\"]},\\\"text-size\\\":{type:\\\"number\\\",default:16,minimum:0,units:\\\"pixels\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-max-width\\\":{type:\\\"number\\\",default:10,minimum:0,units:\\\"ems\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-line-height\\\":{type:\\\"number\\\",default:1.2,units:\\\"ems\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-letter-spacing\\\":{type:\\\"number\\\",default:0,units:\\\"ems\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-justify\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{left:{},center:{},right:{}},default:\\\"center\\\",requires:[\\\"text-field\\\"]},\\\"text-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{center:{},left:{},right:{},top:{},bottom:{},\\\"top-left\\\":{},\\\"top-right\\\":{},\\\"bottom-left\\\":{},\\\"bottom-right\\\":{}},default:\\\"center\\\",requires:[\\\"text-field\\\"]},\\\"text-max-angle\\\":{type:\\\"number\\\",default:45,units:\\\"degrees\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[\\\"text-field\\\",{\\\"symbol-placement\\\":\\\"line\\\"}]},\\\"text-rotate\\\":{type:\\\"number\\\",default:0,period:360,units:\\\"degrees\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-padding\\\":{type:\\\"number\\\",default:2,minimum:0,units:\\\"pixels\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-keep-upright\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!0,requires:[\\\"text-field\\\",{\\\"text-rotation-alignment\\\":\\\"map\\\"},{\\\"symbol-placement\\\":\\\"line\\\"}]},\\\"text-transform\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{none:{},uppercase:{},lowercase:{}},default:\\\"none\\\",requires:[\\\"text-field\\\"]},\\\"text-offset\\\":{type:\\\"array\\\",value:\\\"number\\\",units:\\\"ems\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,length:2,default:[0,0],requires:[\\\"text-field\\\"]},\\\"text-allow-overlap\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"text-field\\\"]},\\\"text-ignore-placement\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"text-field\\\"]},\\\"text-optional\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"text-field\\\",\\\"icon-image\\\"]},visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_raster:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_hillshade:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},filter:{type:\\\"array\\\",value:\\\"*\\\"},filter_operator:{type:\\\"enum\\\",values:{\\\"==\\\":{},\\\"!=\\\":{},\\\">\\\":{},\\\">=\\\":{},\\\"<\\\":{},\\\"<=\\\":{},in:{},\\\"!in\\\":{},all:{},any:{},none:{},has:{},\\\"!has\\\":{}}},geometry_type:{type:\\\"enum\\\",values:{Point:{},LineString:{},Polygon:{}}},function_stop:{type:\\\"array\\\",minimum:0,maximum:22,value:[\\\"number\\\",\\\"color\\\"],length:2},expression:{type:\\\"array\\\",value:\\\"*\\\",minimum:1},expression_name:{type:\\\"enum\\\",values:{let:{group:\\\"Variable binding\\\"},var:{group:\\\"Variable binding\\\"},literal:{group:\\\"Types\\\"},array:{group:\\\"Types\\\"},at:{group:\\\"Lookup\\\"},case:{group:\\\"Decision\\\"},match:{group:\\\"Decision\\\"},coalesce:{group:\\\"Decision\\\"},step:{group:\\\"Ramps, scales, curves\\\"},interpolate:{group:\\\"Ramps, scales, curves\\\"},ln2:{group:\\\"Math\\\"},pi:{group:\\\"Math\\\"},e:{group:\\\"Math\\\"},typeof:{group:\\\"Types\\\"},string:{group:\\\"Types\\\"},number:{group:\\\"Types\\\"},boolean:{group:\\\"Types\\\"},object:{group:\\\"Types\\\"},collator:{group:\\\"Types\\\"},\\\"to-string\\\":{group:\\\"Types\\\"},\\\"to-number\\\":{group:\\\"Types\\\"},\\\"to-boolean\\\":{group:\\\"Types\\\"},\\\"to-rgba\\\":{group:\\\"Color\\\"},\\\"to-color\\\":{group:\\\"Types\\\"},rgb:{group:\\\"Color\\\"},rgba:{group:\\\"Color\\\"},get:{group:\\\"Lookup\\\"},has:{group:\\\"Lookup\\\"},length:{group:\\\"Lookup\\\"},properties:{group:\\\"Feature data\\\"},\\\"geometry-type\\\":{group:\\\"Feature data\\\"},id:{group:\\\"Feature data\\\"},zoom:{group:\\\"Zoom\\\"},\\\"heatmap-density\\\":{group:\\\"Heatmap\\\"},\\\"line-progress\\\":{group:\\\"Heatmap\\\"},\\\"+\\\":{group:\\\"Math\\\"},\\\"*\\\":{group:\\\"Math\\\"},\\\"-\\\":{group:\\\"Math\\\"},\\\"/\\\":{group:\\\"Math\\\"},\\\"%\\\":{group:\\\"Math\\\"},\\\"^\\\":{group:\\\"Math\\\"},sqrt:{group:\\\"Math\\\"},log10:{group:\\\"Math\\\"},ln:{group:\\\"Math\\\"},log2:{group:\\\"Math\\\"},sin:{group:\\\"Math\\\"},cos:{group:\\\"Math\\\"},tan:{group:\\\"Math\\\"},asin:{group:\\\"Math\\\"},acos:{group:\\\"Math\\\"},atan:{group:\\\"Math\\\"},min:{group:\\\"Math\\\"},max:{group:\\\"Math\\\"},round:{group:\\\"Math\\\"},abs:{group:\\\"Math\\\"},ceil:{group:\\\"Math\\\"},floor:{group:\\\"Math\\\"},\\\"==\\\":{group:\\\"Decision\\\"},\\\"!=\\\":{group:\\\"Decision\\\"},\\\">\\\":{group:\\\"Decision\\\"},\\\"<\\\":{group:\\\"Decision\\\"},\\\">=\\\":{group:\\\"Decision\\\"},\\\"<=\\\":{group:\\\"Decision\\\"},all:{group:\\\"Decision\\\"},any:{group:\\\"Decision\\\"},\\\"!\\\":{group:\\\"Decision\\\"},\\\"is-supported-script\\\":{group:\\\"String\\\"},upcase:{group:\\\"String\\\"},downcase:{group:\\\"String\\\"},concat:{group:\\\"String\\\"},\\\"resolved-locale\\\":{group:\\\"String\\\"}}},light:{anchor:{type:\\\"enum\\\",default:\\\"viewport\\\",values:{map:{},viewport:{}},transition:!1,\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,function:\\\"piecewise-constant\\\"},position:{type:\\\"array\\\",default:[1.15,210,30],length:3,value:\\\"number\\\",transition:!0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1},color:{type:\\\"color\\\",default:\\\"#ffffff\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,transition:!0},intensity:{type:\\\"number\\\",default:.5,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,transition:!0}},paint:[\\\"paint_fill\\\",\\\"paint_line\\\",\\\"paint_circle\\\",\\\"paint_heatmap\\\",\\\"paint_fill-extrusion\\\",\\\"paint_symbol\\\",\\\"paint_raster\\\",\\\"paint_hillshade\\\",\\\"paint_background\\\"],paint_fill:{\\\"fill-antialias\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!0},\\\"fill-opacity\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:1,minimum:0,maximum:1,transition:!0},\\\"fill-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"fill-pattern\\\"}]},\\\"fill-outline-color\\\":{type:\\\"color\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"fill-pattern\\\"},{\\\"fill-antialias\\\":!0}]},\\\"fill-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"fill-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"fill-translate\\\"]},\\\"fill-pattern\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,transition:!0}},paint_line:{\\\"line-opacity\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:1,minimum:0,maximum:1,transition:!0},\\\"line-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"line-pattern\\\"}]},\\\"line-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"line-translate\\\"]},\\\"line-width\\\":{type:\\\"number\\\",default:1,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-gap-width\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-offset\\\":{type:\\\"number\\\",default:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-blur\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-dasharray\\\":{type:\\\"array\\\",value:\\\"number\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,minimum:0,transition:!0,units:\\\"line widths\\\",requires:[{\\\"!\\\":\\\"line-pattern\\\"}]},\\\"line-pattern\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"line-gradient\\\":{type:\\\"color\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!1,\\\"property-function\\\":!1,transition:!1,requires:[{\\\"!\\\":\\\"line-dasharray\\\"},{\\\"!\\\":\\\"line-pattern\\\"},{source:\\\"geojson\\\",has:{lineMetrics:!0}}]}},paint_circle:{\\\"circle-radius\\\":{type:\\\"number\\\",default:5,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"circle-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0},\\\"circle-blur\\\":{type:\\\"number\\\",default:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0},\\\"circle-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0},\\\"circle-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"circle-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"circle-translate\\\"]},\\\"circle-pitch-scale\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\"},\\\"circle-pitch-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"viewport\\\"},\\\"circle-stroke-width\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"circle-stroke-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0},\\\"circle-stroke-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0}},paint_heatmap:{\\\"heatmap-radius\\\":{type:\\\"number\\\",default:30,minimum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"heatmap-weight\\\":{type:\\\"number\\\",default:1,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!1},\\\"heatmap-intensity\\\":{type:\\\"number\\\",default:1,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,transition:!0},\\\"heatmap-color\\\":{type:\\\"color\\\",default:[\\\"interpolate\\\",[\\\"linear\\\"],[\\\"heatmap-density\\\"],0,\\\"rgba(0, 0, 255, 0)\\\",.1,\\\"royalblue\\\",.3,\\\"cyan\\\",.5,\\\"lime\\\",.7,\\\"yellow\\\",1,\\\"red\\\"],function:\\\"interpolated\\\",\\\"zoom-function\\\":!1,\\\"property-function\\\":!1,transition:!1},\\\"heatmap-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,transition:!0}},paint_symbol:{\\\"icon-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"icon-image\\\"]},\\\"icon-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"icon-image\\\"]},\\\"icon-halo-color\\\":{type:\\\"color\\\",default:\\\"rgba(0, 0, 0, 0)\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"icon-image\\\"]},\\\"icon-halo-width\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"icon-image\\\"]},\\\"icon-halo-blur\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"icon-image\\\"]},\\\"icon-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"icon-image\\\"]},\\\"icon-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"icon-image\\\",\\\"icon-translate\\\"]},\\\"text-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"text-field\\\"]},\\\"text-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"text-field\\\"]},\\\"text-halo-color\\\":{type:\\\"color\\\",default:\\\"rgba(0, 0, 0, 0)\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"text-field\\\"]},\\\"text-halo-width\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"text-field\\\"]},\\\"text-halo-blur\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"text-field\\\"]},\\\"text-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"text-field\\\"]},\\\"text-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"text-field\\\",\\\"text-translate\\\"]}},paint_raster:{\\\"raster-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"raster-hue-rotate\\\":{type:\\\"number\\\",default:0,period:360,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"degrees\\\"},\\\"raster-brightness-min\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,default:0,minimum:0,maximum:1,transition:!0},\\\"raster-brightness-max\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,default:1,minimum:0,maximum:1,transition:!0},\\\"raster-saturation\\\":{type:\\\"number\\\",default:0,minimum:-1,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"raster-contrast\\\":{type:\\\"number\\\",default:0,minimum:-1,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"raster-fade-duration\\\":{type:\\\"number\\\",default:300,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!1,units:\\\"milliseconds\\\"}},paint_hillshade:{\\\"hillshade-illumination-direction\\\":{type:\\\"number\\\",default:335,minimum:0,maximum:359,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!1},\\\"hillshade-illumination-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"viewport\\\"},\\\"hillshade-exaggeration\\\":{type:\\\"number\\\",default:.5,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"hillshade-shadow-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"hillshade-highlight-color\\\":{type:\\\"color\\\",default:\\\"#FFFFFF\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"hillshade-accent-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0}},paint_background:{\\\"background-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"background-pattern\\\"}]},\\\"background-pattern\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"background-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0}},transition:{duration:{type:\\\"number\\\",default:300,minimum:0,units:\\\"milliseconds\\\"},delay:{type:\\\"number\\\",default:0,minimum:0,units:\\\"milliseconds\\\"}},\\\"layout_fill-extrusion\\\":{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},function:{expression:{type:\\\"expression\\\"},stops:{type:\\\"array\\\",value:\\\"function_stop\\\"},base:{type:\\\"number\\\",default:1,minimum:0},property:{type:\\\"string\\\",default:\\\"$zoom\\\"},type:{type:\\\"enum\\\",values:{identity:{},exponential:{},interval:{},categorical:{}},default:\\\"exponential\\\"},colorSpace:{type:\\\"enum\\\",values:{rgb:{},lab:{},hcl:{}},default:\\\"rgb\\\"},default:{type:\\\"*\\\",required:!1}},\\\"paint_fill-extrusion\\\":{\\\"fill-extrusion-opacity\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,default:1,minimum:0,maximum:1,transition:!0},\\\"fill-extrusion-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"fill-extrusion-pattern\\\"}]},\\\"fill-extrusion-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"fill-extrusion-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"fill-extrusion-translate\\\"]},\\\"fill-extrusion-pattern\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"fill-extrusion-height\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:0,minimum:0,units:\\\"meters\\\",transition:!0},\\\"fill-extrusion-base\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:0,minimum:0,units:\\\"meters\\\",transition:!0,requires:[\\\"fill-extrusion-height\\\"]}}},P=function(t,e,r,n){this.message=(t?t+\\\": \\\":\\\"\\\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function D(t){var e=t.key,r=t.value;return r?[new P(e,r,\\\"constants have been deprecated as of v8\\\")]:[]}function R(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}function B(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function F(t){return Array.isArray(t)?t.map(F):B(t)}var N=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),j=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r<n.length;r+=1){var i=n[r],a=i[0],o=i[1];this.bindings[a]=o}};j.prototype.concat=function(t){return new j(this,t)},j.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+\\\" not found in scope.\\\")},j.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var V={kind:\\\"null\\\"},U={kind:\\\"number\\\"},q={kind:\\\"string\\\"},H={kind:\\\"boolean\\\"},G={kind:\\\"color\\\"},W={kind:\\\"object\\\"},Y={kind:\\\"value\\\"},X={kind:\\\"collator\\\"};function Z(t,e){return{kind:\\\"array\\\",itemType:t,N:e}}function $(t){if(\\\"array\\\"===t.kind){var e=$(t.itemType);return\\\"number\\\"==typeof t.N?\\\"array<\\\"+e+\\\", \\\"+t.N+\\\">\\\":\\\"value\\\"===t.itemType.kind?\\\"array\\\":\\\"array<\\\"+e+\\\">\\\"}return t.kind}var J=[V,U,q,H,G,W,Z(Y)];function K(t,e){if(\\\"error\\\"===e.kind)return null;if(\\\"array\\\"===t.kind){if(\\\"array\\\"===e.kind&&!K(t.itemType,e.itemType)&&(\\\"number\\\"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(\\\"value\\\"===t.kind)for(var r=0,n=J;r<n.length;r+=1)if(!K(n[r],e))return null}return\\\"Expected \\\"+$(t)+\\\" but found \\\"+$(e)+\\\" instead.\\\"}var Q=i(function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return\\\"%\\\"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return\\\"%\\\"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,\\\"\\\").toLowerCase();if(i in r)return r[i].slice();if(\\\"#\\\"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=i.indexOf(\\\"(\\\"),c=i.indexOf(\\\")\\\");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),f=i.substr(l+1,c-(l+1)).split(\\\",\\\"),h=1;switch(u){case\\\"rgba\\\":if(4!==f.length)return null;h=o(f.pop());case\\\"rgb\\\":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case\\\"hsla\\\":if(4!==f.length)return null;h=o(f.pop());case\\\"hsl\\\":if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,d=o(f[1]),g=o(f[2]),v=g<=.5?g*(d+1):g+d-g*d,m=2*g-v;return[n(255*s(m,v,p+1/3)),n(255*s(m,v,p)),n(255*s(m,v,p-1/3)),h];default:return null}}return null}}catch(t){}}).parseCSSColor,tt=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};tt.parse=function(t){if(t){if(t instanceof tt)return t;if(\\\"string\\\"==typeof t){var e=Q(t);if(e)return new tt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},tt.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return\\\"rgba(\\\"+Math.round(e)+\\\",\\\"+Math.round(r)+\\\",\\\"+Math.round(n)+\\\",\\\"+i+\\\")\\\"},tt.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},tt.black=new tt(0,0,0,1),tt.white=new tt(1,1,1,1),tt.transparent=new tt(0,0,0,0);var et=function(t,e,r){this.sensitivity=t?e?\\\"variant\\\":\\\"case\\\":e?\\\"accent\\\":\\\"base\\\",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:\\\"search\\\"})};et.prototype.compare=function(t,e){return this.collator.compare(t,e)},et.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var rt=function(t,e,r){this.type=X,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function nt(t,e,r,n){return\\\"number\\\"==typeof t&&t>=0&&t<=255&&\\\"number\\\"==typeof e&&e>=0&&e<=255&&\\\"number\\\"==typeof r&&r>=0&&r<=255?void 0===n||\\\"number\\\"==typeof n&&n>=0&&n<=1?null:\\\"Invalid rgba value [\\\"+[t,e,r,n].join(\\\", \\\")+\\\"]: 'a' must be between 0 and 1.\\\":\\\"Invalid rgba value [\\\"+(\\\"number\\\"==typeof n?[t,e,r,n]:[t,e,r]).join(\\\", \\\")+\\\"]: 'r', 'g', and 'b' must be between 0 and 255.\\\"}function it(t){if(null===t)return V;if(\\\"string\\\"==typeof t)return q;if(\\\"boolean\\\"==typeof t)return H;if(\\\"number\\\"==typeof t)return U;if(t instanceof tt)return G;if(t instanceof et)return X;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n<i.length;n+=1){var a=it(i[n]);if(e){if(e===a)continue;e=Y;break}e=a}return Z(e||Y,r)}return W}rt.parse=function(t,e){if(2!==t.length)return e.error(\\\"Expected one argument.\\\");var r=t[1];if(\\\"object\\\"!=typeof r||Array.isArray(r))return e.error(\\\"Collator options argument must be an object.\\\");var n=e.parse(void 0!==r[\\\"case-sensitive\\\"]&&r[\\\"case-sensitive\\\"],1,H);if(!n)return null;var i=e.parse(void 0!==r[\\\"diacritic-sensitive\\\"]&&r[\\\"diacritic-sensitive\\\"],1,H);if(!i)return null;var a=null;return r.locale&&!(a=e.parse(r.locale,1,q))?null:new rt(n,i,a)},rt.prototype.evaluate=function(t){return new et(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},rt.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},rt.prototype.possibleOutputs=function(){return[void 0]},rt.prototype.serialize=function(){var t={};return t[\\\"case-sensitive\\\"]=this.caseSensitive.serialize(),t[\\\"diacritic-sensitive\\\"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),[\\\"collator\\\",t]};var at=function(t,e){this.type=t,this.value=e};at.parse=function(t,e){if(2!==t.length)return e.error(\\\"'literal' expression requires exactly one argument, but found \\\"+(t.length-1)+\\\" instead.\\\");if(!function t(e){if(null===e)return!0;if(\\\"string\\\"==typeof e)return!0;if(\\\"boolean\\\"==typeof e)return!0;if(\\\"number\\\"==typeof e)return!0;if(e instanceof tt)return!0;if(e instanceof et)return!0;if(Array.isArray(e)){for(var r=0,n=e;r<n.length;r+=1)if(!t(n[r]))return!1;return!0}if(\\\"object\\\"==typeof e){for(var i in e)if(!t(e[i]))return!1;return!0}return!1}(t[1]))return e.error(\\\"invalid value\\\");var r=t[1],n=it(r),i=e.expectedType;return\\\"array\\\"!==n.kind||0!==n.N||!i||\\\"array\\\"!==i.kind||\\\"number\\\"==typeof i.N&&0!==i.N||(n=i),new at(n,r)},at.prototype.evaluate=function(){return this.value},at.prototype.eachChild=function(){},at.prototype.possibleOutputs=function(){return[this.value]},at.prototype.serialize=function(){return\\\"array\\\"===this.type.kind||\\\"object\\\"===this.type.kind?[\\\"literal\\\",this.value]:this.value instanceof tt?[\\\"rgba\\\"].concat(this.value.toArray()):this.value};var ot=function(t){this.name=\\\"ExpressionEvaluationError\\\",this.message=t};ot.prototype.toJSON=function(){return this.message};var st={string:q,number:U,boolean:H,object:W},lt=function(t,e){this.type=t,this.args=e};lt.parse=function(t,e){if(t.length<2)return e.error(\\\"Expected at least one argument.\\\");for(var r=t[0],n=st[r],i=[],a=1;a<t.length;a++){var o=e.parse(t[a],a,Y);if(!o)return null;i.push(o)}return new lt(n,i)},lt.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!K(this.type,it(r)))return r;if(e===this.args.length-1)throw new ot(\\\"Expected value to be of type \\\"+$(this.type)+\\\", but found \\\"+$(it(r))+\\\" instead.\\\")}return null},lt.prototype.eachChild=function(t){this.args.forEach(t)},lt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},lt.prototype.serialize=function(){return[this.type.kind].concat(this.args.map(function(t){return t.serialize()}))};var ct={string:q,number:U,boolean:H},ut=function(t,e){this.type=t,this.input=e};ut.parse=function(t,e){if(t.length<2||t.length>4)return e.error(\\\"Expected 1, 2, or 3 arguments, but found \\\"+(t.length-1)+\\\" instead.\\\");var r,n;if(t.length>2){var i=t[1];if(\\\"string\\\"!=typeof i||!(i in ct))return e.error('The item type argument of \\\"array\\\" must be one of string, number, boolean',1);r=ct[i]}else r=Y;if(t.length>3){if(\\\"number\\\"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2]))return e.error('The length argument to \\\"array\\\" must be a positive integer literal',2);n=t[2]}var a=Z(r,n),o=e.parse(t[t.length-1],t.length-1,Y);return o?new ut(a,o):null},ut.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(K(this.type,it(e)))throw new ot(\\\"Expected value to be of type \\\"+$(this.type)+\\\", but found \\\"+$(it(e))+\\\" instead.\\\");return e},ut.prototype.eachChild=function(t){t(this.input)},ut.prototype.possibleOutputs=function(){return this.input.possibleOutputs()},ut.prototype.serialize=function(){var t=[\\\"array\\\"],e=this.type.itemType;if(\\\"string\\\"===e.kind||\\\"number\\\"===e.kind||\\\"boolean\\\"===e.kind){t.push(e.kind);var r=this.type.N;\\\"number\\\"==typeof r&&t.push(r)}return t.push(this.input.serialize()),t};var ft={\\\"to-number\\\":U,\\\"to-color\\\":G},ht=function(t,e){this.type=t,this.args=e};ht.parse=function(t,e){if(t.length<2)return e.error(\\\"Expected at least one argument.\\\");for(var r=t[0],n=ft[r],i=[],a=1;a<t.length;a++){var o=e.parse(t[a],a,Y);if(!o)return null;i.push(o)}return new ht(n,i)},ht.prototype.evaluate=function(t){if(\\\"color\\\"===this.type.kind){for(var e,r,n=0,i=this.args;n<i.length;n+=1)if(r=null,\\\"string\\\"==typeof(e=i[n].evaluate(t))){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?\\\"Invalid rbga value \\\"+JSON.stringify(e)+\\\": expected an array containing either three or four numeric values.\\\":nt(e[0],e[1],e[2],e[3])))return new tt(e[0]/255,e[1]/255,e[2]/255,e[3]);throw new ot(r||\\\"Could not parse color from value '\\\"+(\\\"string\\\"==typeof e?e:JSON.stringify(e))+\\\"'\\\")}for(var o=null,s=0,l=this.args;s<l.length;s+=1)if(null!==(o=l[s].evaluate(t))){var c=Number(o);if(!isNaN(c))return c}throw new ot(\\\"Could not convert \\\"+JSON.stringify(o)+\\\" to number.\\\")},ht.prototype.eachChild=function(t){this.args.forEach(t)},ht.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},ht.prototype.serialize=function(){var t=[\\\"to-\\\"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var pt=[\\\"Unknown\\\",\\\"Point\\\",\\\"LineString\\\",\\\"Polygon\\\"],dt=function(){this._parseColorCache={}};dt.prototype.id=function(){return this.feature&&\\\"id\\\"in this.feature?this.feature.id:null},dt.prototype.geometryType=function(){return this.feature?\\\"number\\\"==typeof this.feature.type?pt[this.feature.type]:this.feature.type:null},dt.prototype.properties=function(){return this.feature&&this.feature.properties||{}},dt.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=tt.parse(t)),e};var gt=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};function vt(t){if(t instanceof gt){if(\\\"get\\\"===t.name&&1===t.args.length)return!1;if(\\\"has\\\"===t.name&&1===t.args.length)return!1;if(\\\"properties\\\"===t.name||\\\"geometry-type\\\"===t.name||\\\"id\\\"===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild(function(t){e&&!vt(t)&&(e=!1)}),e}function mt(t,e){if(t instanceof gt&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild(function(t){r&&!mt(t,e)&&(r=!1)}),r}gt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},gt.prototype.eachChild=function(t){this.args.forEach(t)},gt.prototype.possibleOutputs=function(){return[void 0]},gt.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},gt.parse=function(t,e){var r=t[0],n=gt.definitions[r];if(!n)return e.error('Unknown expression \\\"'+r+'\\\". If you wanted a literal array, use [\\\"literal\\\", [...]].',0);for(var i=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=a.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),s=[],l=1;l<t.length;l++){var c=t[l],u=void 0;if(1===o.length){var f=o[0][0];u=Array.isArray(f)?f[l-1]:f.type}var h=e.parse(c,1+s.length,u);if(!h)return null;s.push(h)}for(var p=null,d=0,g=o;d<g.length;d+=1){var v=g[d],m=v[0],y=v[1];if(p=new xt(e.registry,e.path,null,e.scope),Array.isArray(m)&&m.length!==s.length)p.error(\\\"Expected \\\"+m.length+\\\" arguments, but found \\\"+s.length+\\\" instead.\\\");else{for(var x=0;x<s.length;x++){var b=Array.isArray(m)?m[x]:m.type,_=s[x];p.concat(x+1).checkSubtype(b,_.type)}if(0===p.errors.length)return new gt(r,i,y,s)}}if(1===o.length)e.errors.push.apply(e.errors,p.errors);else{var w=(o.length?o:a).map(function(t){var e;return e=t[0],Array.isArray(e)?\\\"(\\\"+e.map($).join(\\\", \\\")+\\\")\\\":\\\"(\\\"+$(e.type)+\\\"...)\\\"}).join(\\\" | \\\"),k=s.map(function(t){return $(t.type)}).join(\\\", \\\");e.error(\\\"Expected arguments of type \\\"+w+\\\", but found (\\\"+k+\\\") instead.\\\")}return null},gt.register=function(t,e){for(var r in gt.definitions=e,e)t[r]=gt};var yt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};yt.parse=function(t,e){if(2!==t.length||\\\"string\\\"!=typeof t[1])return e.error(\\\"'var' expression requires exactly one string literal argument.\\\");var r=t[1];return e.scope.has(r)?new yt(r,e.scope.get(r)):e.error('Unknown variable \\\"'+r+'\\\". Make sure \\\"'+r+'\\\" has been bound in an enclosing \\\"let\\\" expression before using it.',1)},yt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},yt.prototype.eachChild=function(){},yt.prototype.possibleOutputs=function(){return[void 0]},yt.prototype.serialize=function(){return[\\\"var\\\",this.name]};var xt=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new j),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return\\\"[\\\"+t+\\\"]\\\"}).join(\\\"\\\"),this.scope=n,this.errors=i,this.expectedType=r};function bt(t,e){for(var r,n,i=0,a=t.length-1,o=0;i<=a;){if(r=t[o=Math.floor((i+a)/2)],n=t[o+1],e===r||e>r&&e<n)return o;if(r<e)i=o+1;else{if(!(r>e))throw new ot(\\\"Input is not a number.\\\");a=o-1}}return Math.max(o-1,0)}xt.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},xt.prototype._parse=function(t,e){if(null!==t&&\\\"string\\\"!=typeof t&&\\\"boolean\\\"!=typeof t&&\\\"number\\\"!=typeof t||(t=[\\\"literal\\\",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use [\\\"literal\\\", []].');var r=t[0];if(\\\"string\\\"!=typeof r)return this.error(\\\"Expression name must be a string, but found \\\"+typeof r+' instead. If you wanted a literal array, use [\\\"literal\\\", [...]].',0),null;var n=this.registry[r];if(n){var i=n.parse(t,this);if(!i)return null;if(this.expectedType){var a=this.expectedType,o=i.type;if(\\\"string\\\"!==a.kind&&\\\"number\\\"!==a.kind&&\\\"boolean\\\"!==a.kind&&\\\"object\\\"!==a.kind||\\\"value\\\"!==o.kind)if(\\\"array\\\"===a.kind&&\\\"value\\\"===o.kind)e.omitTypeAnnotations||(i=new ut(a,i));else if(\\\"color\\\"!==a.kind||\\\"value\\\"!==o.kind&&\\\"string\\\"!==o.kind){if(this.checkSubtype(this.expectedType,i.type))return null}else e.omitTypeAnnotations||(i=new ht(a,[i]));else e.omitTypeAnnotations||(i=new lt(a,[i]))}if(!(i instanceof at)&&function t(e){if(e instanceof yt)return t(e.boundExpression);if(e instanceof gt&&\\\"error\\\"===e.name)return!1;if(e instanceof rt)return!1;var r=e instanceof ht||e instanceof lt||e instanceof ut,n=!0;return e.eachChild(function(e){n=r?n&&t(e):n&&e instanceof at}),!!n&&(vt(e)&&mt(e,[\\\"zoom\\\",\\\"heatmap-density\\\",\\\"line-progress\\\",\\\"is-supported-script\\\"]))}(i)){var s=new dt;try{i=new at(i.type,i.evaluate(s))}catch(t){return this.error(t.message),null}}return i}return this.error('Unknown expression \\\"'+r+'\\\". If you wanted a literal array, use [\\\"literal\\\", [...]].',0)}return void 0===t?this.error(\\\"'undefined' value invalid. Use null instead.\\\"):\\\"object\\\"==typeof t?this.error('Bare objects invalid. Use [\\\"literal\\\", {...}] instead.'):this.error(\\\"Expected an array, but found \\\"+typeof t+\\\" instead.\\\")},xt.prototype.concat=function(t,e,r){var n=\\\"number\\\"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new xt(this.registry,n,e||null,i,this.errors)},xt.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=\\\"\\\"+this.key+e.map(function(t){return\\\"[\\\"+t+\\\"]\\\"}).join(\\\"\\\");this.errors.push(new N(n,t))},xt.prototype.checkSubtype=function(t,e){var r=K(t,e);return r&&this.error(r),r};var _t=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n<i.length;n+=1){var a=i[n],o=a[0],s=a[1];this.labels.push(o),this.outputs.push(s)}};function wt(t,e,r){return t*(1-r)+e*r}_t.parse=function(t,e){var r=t[1],n=t.slice(2);if(t.length-1<4)return e.error(\\\"Expected at least 4 arguments, but found only \\\"+(t.length-1)+\\\".\\\");if((t.length-1)%2!=0)return e.error(\\\"Expected an even number of arguments.\\\");if(!(r=e.parse(r,1,U)))return null;var i=[],a=null;e.expectedType&&\\\"value\\\"!==e.expectedType.kind&&(a=e.expectedType),n.unshift(-1/0);for(var o=0;o<n.length;o+=2){var s=n[o],l=n[o+1],c=o+1,u=o+2;if(\\\"number\\\"!=typeof s)return e.error('Input/output pairs for \\\"step\\\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(i.length&&i[i.length-1][0]>=s)return e.error('Input/output pairs for \\\"step\\\" expressions must be arranged with input values in strictly ascending order.',c);var f=e.parse(l,u,a);if(!f)return null;a=a||f.type,i.push([s,f])}return new _t(a,r,i)},_t.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[bt(e,n)].evaluate(t)},_t.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},_t.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},_t.prototype.serialize=function(){for(var t=[\\\"step\\\",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var kt=Object.freeze({number:wt,color:function(t,e,r){return new tt(wt(t.r,e.r,r),wt(t.g,e.g,r),wt(t.b,e.b,r),wt(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return wt(t,e[n],r)})}}),Mt=function(t,e,r,n){this.type=t,this.interpolation=e,this.input=r,this.labels=[],this.outputs=[];for(var i=0,a=n;i<a.length;i+=1){var o=a[i],s=o[0],l=o[1];this.labels.push(s),this.outputs.push(l)}};function At(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}Mt.interpolationFactor=function(t,e,r,n){var i=0;if(\\\"exponential\\\"===t.name)i=At(e,t.base,r,n);else if(\\\"linear\\\"===t.name)i=At(e,1,r,n);else if(\\\"cubic-bezier\\\"===t.name){var o=t.controlPoints;i=new a(o[0],o[1],o[2],o[3]).solve(At(e,1,r,n))}return i},Mt.parse=function(t,e){var r=t[1],n=t[2],i=t.slice(3);if(!Array.isArray(r)||0===r.length)return e.error(\\\"Expected an interpolation type expression.\\\",1);if(\\\"linear\\\"===r[0])r={name:\\\"linear\\\"};else if(\\\"exponential\\\"===r[0]){var a=r[1];if(\\\"number\\\"!=typeof a)return e.error(\\\"Exponential interpolation requires a numeric base.\\\",1,1);r={name:\\\"exponential\\\",base:a}}else{if(\\\"cubic-bezier\\\"!==r[0])return e.error(\\\"Unknown interpolation type \\\"+String(r[0]),1,0);var o=r.slice(1);if(4!==o.length||o.some(function(t){return\\\"number\\\"!=typeof t||t<0||t>1}))return e.error(\\\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\\\",1);r={name:\\\"cubic-bezier\\\",controlPoints:o}}if(t.length-1<4)return e.error(\\\"Expected at least 4 arguments, but found only \\\"+(t.length-1)+\\\".\\\");if((t.length-1)%2!=0)return e.error(\\\"Expected an even number of arguments.\\\");if(!(n=e.parse(n,2,U)))return null;var s=[],l=null;e.expectedType&&\\\"value\\\"!==e.expectedType.kind&&(l=e.expectedType);for(var c=0;c<i.length;c+=2){var u=i[c],f=i[c+1],h=c+3,p=c+4;if(\\\"number\\\"!=typeof u)return e.error('Input/output pairs for \\\"interpolate\\\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(s.length&&s[s.length-1][0]>=u)return e.error('Input/output pairs for \\\"interpolate\\\" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(f,p,l);if(!d)return null;l=l||d.type,s.push([u,d])}return\\\"number\\\"===l.kind||\\\"color\\\"===l.kind||\\\"array\\\"===l.kind&&\\\"number\\\"===l.itemType.kind&&\\\"number\\\"==typeof l.N?new Mt(l,r,n,s):e.error(\\\"Type \\\"+$(l)+\\\" is not interpolatable.\\\")},Mt.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var a=bt(e,n),o=e[a],s=e[a+1],l=Mt.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return kt[this.type.kind.toLowerCase()](c,u,l)},Mt.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},Mt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},Mt.prototype.serialize=function(){for(var t=[\\\"interpolate\\\",\\\"linear\\\"===this.interpolation.name?[\\\"linear\\\"]:\\\"exponential\\\"===this.interpolation.name?1===this.interpolation.base?[\\\"linear\\\"]:[\\\"exponential\\\",this.interpolation.base]:[\\\"cubic-bezier\\\"].concat(this.interpolation.controlPoints),this.input.serialize()],e=0;e<this.labels.length;e++)t.push(this.labels[e],this.outputs[e].serialize());return t};var Tt=function(t,e){this.type=t,this.args=e};Tt.parse=function(t,e){if(t.length<2)return e.error(\\\"Expectected at least one argument.\\\");var r=null,n=e.expectedType;n&&\\\"value\\\"!==n.kind&&(r=n);for(var i=[],a=0,o=t.slice(1);a<o.length;a+=1){var s=o[a],l=e.parse(s,1+i.length,r,void 0,{omitTypeAnnotations:!0});if(!l)return null;r=r||l.type,i.push(l)}var c=n&&i.some(function(t){return K(n,t.type)});return new Tt(c?Y:r,i)},Tt.prototype.evaluate=function(t){for(var e=null,r=0,n=this.args;r<n.length&&null===(e=n[r].evaluate(t));r+=1);return e},Tt.prototype.eachChild=function(t){this.args.forEach(t)},Tt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},Tt.prototype.serialize=function(){var t=[\\\"coalesce\\\"];return this.eachChild(function(e){t.push(e.serialize())}),t};var St=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};St.prototype.evaluate=function(t){return this.result.evaluate(t)},St.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},St.parse=function(t,e){if(t.length<4)return e.error(\\\"Expected at least 3 arguments, but found \\\"+(t.length-1)+\\\" instead.\\\");for(var r=[],n=1;n<t.length-1;n+=2){var i=t[n];if(\\\"string\\\"!=typeof i)return e.error(\\\"Expected string, but found \\\"+typeof i+\\\" instead.\\\",n);if(/[^a-zA-Z0-9_]/.test(i))return e.error(\\\"Variable names must contain only alphanumeric characters or '_'.\\\",n);var a=e.parse(t[n+1],n+1);if(!a)return null;r.push([i,a])}var o=e.parse(t[t.length-1],t.length-1,void 0,r);return o?new St(r,o):null},St.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},St.prototype.serialize=function(){for(var t=[\\\"let\\\"],e=0,r=this.bindings;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];t.push(i,a.serialize())}return t.push(this.result.serialize()),t};var Ct=function(t,e,r){this.type=t,this.index=e,this.input=r};Ct.parse=function(t,e){if(3!==t.length)return e.error(\\\"Expected 2 arguments, but found \\\"+(t.length-1)+\\\" instead.\\\");var r=e.parse(t[1],1,U),n=e.parse(t[2],2,Z(e.expectedType||Y));if(!r||!n)return null;var i=n.type;return new Ct(i.itemType,r,n)},Ct.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new ot(\\\"Array index out of bounds: \\\"+e+\\\" < 0.\\\");if(e>=r.length)throw new ot(\\\"Array index out of bounds: \\\"+e+\\\" > \\\"+(r.length-1)+\\\".\\\");if(e!==Math.floor(e))throw new ot(\\\"Array index must be an integer, but found \\\"+e+\\\" instead.\\\");return r[e]},Ct.prototype.eachChild=function(t){t(this.index),t(this.input)},Ct.prototype.possibleOutputs=function(){return[void 0]},Ct.prototype.serialize=function(){return[\\\"at\\\",this.index.serialize(),this.input.serialize()]};var Et=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};Et.parse=function(t,e){if(t.length<5)return e.error(\\\"Expected at least 4 arguments, but found only \\\"+(t.length-1)+\\\".\\\");if(t.length%2!=1)return e.error(\\\"Expected an even number of arguments.\\\");var r,n;e.expectedType&&\\\"value\\\"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},a=[],o=2;o<t.length-1;o+=2){var s=t[o],l=t[o+1];Array.isArray(s)||(s=[s]);var c=e.concat(o);if(0===s.length)return c.error(\\\"Expected at least one branch label.\\\");for(var u=0,f=s;u<f.length;u+=1){var h=f[u];if(\\\"number\\\"!=typeof h&&\\\"string\\\"!=typeof h)return c.error(\\\"Branch labels must be numbers or strings.\\\");if(\\\"number\\\"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return c.error(\\\"Branch labels must be integers no larger than \\\"+Number.MAX_SAFE_INTEGER+\\\".\\\");if(\\\"number\\\"==typeof h&&Math.floor(h)!==h)return c.error(\\\"Numeric branch labels must be integer values.\\\");if(r){if(c.checkSubtype(r,it(h)))return null}else r=it(h);if(void 0!==i[String(h)])return c.error(\\\"Branch labels must be unique.\\\");i[String(h)]=a.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=e.parse(t[1],1,r);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?new Et(r,n,d,i,a,g):null},Et.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Et.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Et.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Et.prototype.serialize=function(){for(var t=this,e=[\\\"match\\\",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i<a.length;i+=1){var o=a[i],s=n[t.cases[o]];void 0===s?(n[t.cases[o]]=r.length,r.push([t.cases[o],[o]])):r[s][1].push(o)}for(var l=function(e){return\\\"number\\\"===t.input.type.kind?Number(e):e},c=0,u=r;c<u.length;c+=1){var f=u[c],h=f[0],p=f[1];1===p.length?e.push(l(p[0])):e.push(p.map(l)),e.push(t.outputs[h].serialize())}return e.push(this.otherwise.serialize()),e};var Lt=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};function zt(t){return\\\"string\\\"===t.kind||\\\"number\\\"===t.kind||\\\"boolean\\\"===t.kind||\\\"null\\\"===t.kind}function Ot(t,e){return function(){function r(t,e,r){this.type=H,this.lhs=t,this.rhs=e,this.collator=r}return r.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error(\\\"Expected two or three arguments.\\\");var n=e.parse(t[1],1,Y);if(!n)return null;var i=e.parse(t[2],2,Y);if(!i)return null;if(!zt(n.type)&&!zt(i.type))return e.error(\\\"Expected at least one argument to be a string, number, boolean, or null, but found (\\\"+$(n.type)+\\\", \\\"+$(i.type)+\\\") instead.\\\");if(n.type.kind!==i.type.kind&&\\\"value\\\"!==n.type.kind&&\\\"value\\\"!==i.type.kind)return e.error(\\\"Cannot compare \\\"+$(n.type)+\\\" and \\\"+$(i.type)+\\\".\\\");var a=null;if(4===t.length){if(\\\"string\\\"!==n.type.kind&&\\\"string\\\"!==i.type.kind)return e.error(\\\"Cannot use collator to compare non-string types.\\\");if(!(a=e.parse(t[3],3,X)))return null}return new r(n,i,a)},r.prototype.evaluate=function(t){var r=this.collator?0===this.collator.evaluate(t).compare(this.lhs.evaluate(t),this.rhs.evaluate(t)):this.lhs.evaluate(t)===this.rhs.evaluate(t);return e?!r:r},r.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},r.prototype.possibleOutputs=function(){return[!0,!1]},r.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},r}()}Lt.parse=function(t,e){if(t.length<4)return e.error(\\\"Expected at least 3 arguments, but found only \\\"+(t.length-1)+\\\".\\\");if(t.length%2!=0)return e.error(\\\"Expected an odd number of arguments.\\\");var r;e.expectedType&&\\\"value\\\"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i<t.length-1;i+=2){var a=e.parse(t[i],i,H);if(!a)return null;var o=e.parse(t[i+1],i+1,r);if(!o)return null;n.push([a,o]),r=r||o.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Lt(r,n,s):null},Lt.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];if(i.evaluate(t))return a.evaluate(t)}return this.otherwise.evaluate(t)},Lt.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];t(i),t(a)}t(this.otherwise)},Lt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.branches.map(function(t){return t[0],t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Lt.prototype.serialize=function(){var t=[\\\"case\\\"];return this.eachChild(function(e){t.push(e.serialize())}),t};var It=Ot(\\\"==\\\",!1),Pt=Ot(\\\"!=\\\",!0),Dt=function(t){this.type=U,this.input=t};Dt.parse=function(t,e){if(2!==t.length)return e.error(\\\"Expected 1 argument, but found \\\"+(t.length-1)+\\\" instead.\\\");var r=e.parse(t[1],1);return r?\\\"array\\\"!==r.type.kind&&\\\"string\\\"!==r.type.kind&&\\\"value\\\"!==r.type.kind?e.error(\\\"Expected argument of type string or array, but found \\\"+$(r.type)+\\\" instead.\\\"):new Dt(r):null},Dt.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(\\\"string\\\"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ot(\\\"Expected value to be of type string or array, but found \\\"+$(it(e))+\\\" instead.\\\")},Dt.prototype.eachChild=function(t){t(this.input)},Dt.prototype.possibleOutputs=function(){return[void 0]},Dt.prototype.serialize=function(){var t=[\\\"length\\\"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Rt={\\\"==\\\":It,\\\"!=\\\":Pt,array:ut,at:Ct,boolean:lt,case:Lt,coalesce:Tt,collator:rt,interpolate:Mt,length:Dt,let:St,literal:at,match:Et,number:lt,object:lt,step:_t,string:lt,\\\"to-color\\\":ht,\\\"to-number\\\":ht,var:yt};function Bt(t,e){var r=e[0],n=e[1],i=e[2],a=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var o=a?a.evaluate(t):1,s=nt(r,n,i,o);if(s)throw new ot(s);return new tt(r/255*o,n/255*o,i/255*o,o)}function Ft(t,e){return t in e}function Nt(t,e){var r=e[t];return void 0===r?null:r}function jt(t,e){var r=e[0],n=e[1];return r.evaluate(t)<n.evaluate(t)}function Vt(t,e){var r=e[0],n=e[1];return r.evaluate(t)>n.evaluate(t)}function Ut(t,e){var r=e[0],n=e[1];return r.evaluate(t)<=n.evaluate(t)}function qt(t,e){var r=e[0],n=e[1];return r.evaluate(t)>=n.evaluate(t)}function Ht(t){return{type:t}}function Gt(t){return{result:\\\"success\\\",value:t}}function Wt(t){return{result:\\\"error\\\",value:t}}gt.register(Rt,{error:[{kind:\\\"error\\\"},[q],function(t,e){var r=e[0];throw new ot(r.evaluate(t))}],typeof:[q,[Y],function(t,e){return $(it(e[0].evaluate(t)))}],\\\"to-string\\\":[q,[Y],function(t,e){var r=e[0],n=typeof(r=r.evaluate(t));return null===r?\\\"\\\":\\\"string\\\"===n||\\\"number\\\"===n||\\\"boolean\\\"===n?String(r):r instanceof tt?r.toString():JSON.stringify(r)}],\\\"to-boolean\\\":[H,[Y],function(t,e){var r=e[0];return Boolean(r.evaluate(t))}],\\\"to-rgba\\\":[Z(U,4),[G],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[G,[U,U,U],Bt],rgba:[G,[U,U,U,U],Bt],has:{type:H,overloads:[[[q],function(t,e){return Ft(e[0].evaluate(t),t.properties())}],[[q,W],function(t,e){var r=e[0],n=e[1];return Ft(r.evaluate(t),n.evaluate(t))}]]},get:{type:Y,overloads:[[[q],function(t,e){return Nt(e[0].evaluate(t),t.properties())}],[[q,W],function(t,e){var r=e[0],n=e[1];return Nt(r.evaluate(t),n.evaluate(t))}]]},properties:[W,[],function(t){return t.properties()}],\\\"geometry-type\\\":[q,[],function(t){return t.geometryType()}],id:[Y,[],function(t){return t.id()}],zoom:[U,[],function(t){return t.globals.zoom}],\\\"heatmap-density\\\":[U,[],function(t){return t.globals.heatmapDensity||0}],\\\"line-progress\\\":[U,[],function(t){return t.globals.lineProgress||0}],\\\"+\\\":[U,Ht(U),function(t,e){for(var r=0,n=0,i=e;n<i.length;n+=1)r+=i[n].evaluate(t);return r}],\\\"*\\\":[U,Ht(U),function(t,e){for(var r=1,n=0,i=e;n<i.length;n+=1)r*=i[n].evaluate(t);return r}],\\\"-\\\":{type:U,overloads:[[[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[U],function(t,e){return-e[0].evaluate(t)}]]},\\\"/\\\":[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],\\\"%\\\":[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[U,[],function(){return Math.LN2}],pi:[U,[],function(){return Math.PI}],e:[U,[],function(){return Math.E}],\\\"^\\\":[U,[U,U],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[U,[U],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[U,[U],function(t,e){var r=e[0];return Math.log10(r.evaluate(t))}],ln:[U,[U],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[U,[U],function(t,e){var r=e[0];return Math.log2(r.evaluate(t))}],sin:[U,[U],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[U,[U],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[U,[U],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[U,[U],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[U,[U],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[U,[U],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[U,Ht(U),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[U,Ht(U),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[U,[U],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[U,[U],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[U,[U],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[U,[U],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],\\\"filter-==\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],\\\"filter-id-==\\\":[H,[Y],function(t,e){var r=e[0];return t.id()===r.value}],\\\"filter-type-==\\\":[H,[q],function(t,e){var r=e[0];return t.geometryType()===r.value}],\\\"filter-<\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<a}],\\\"filter-id-<\\\":[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<i}],\\\"filter->\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>a}],\\\"filter-id->\\\":[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\\\"filter-<=\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<=a}],\\\"filter-id-<=\\\":[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\\\"filter->=\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>=a}],\\\"filter-id->=\\\":[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\\\"filter-has\\\":[H,[Y],function(t,e){return e[0].value in t.properties()}],\\\"filter-has-id\\\":[H,[],function(t){return null!==t.id()}],\\\"filter-type-in\\\":[H,[Z(q)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\\\"filter-id-in\\\":[H,[Z(Y)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\\\"filter-in-small\\\":[H,[q,Z(Y)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\\\"filter-in-large\\\":[H,[q,Z(Y)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],\\\">\\\":{type:H,overloads:[[[U,U],Vt],[[q,q],Vt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))>0}]]},\\\"<\\\":{type:H,overloads:[[[U,U],jt],[[q,q],jt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))<0}]]},\\\">=\\\":{type:H,overloads:[[[U,U],qt],[[q,q],qt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))>=0}]]},\\\"<=\\\":{type:H,overloads:[[[U,U],Ut],[[q,q],Ut],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))<=0}]]},all:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Ht(H),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(!n[r].evaluate(t))return!1;return!0}]]},any:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Ht(H),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(n[r].evaluate(t))return!0;return!1}]]},\\\"!\\\":[H,[H],function(t,e){return!e[0].evaluate(t)}],\\\"is-supported-script\\\":[H,[q],function(t,e){var r=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[q,[q],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[q,[q],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[q,Ht(q),function(t,e){return e.map(function(e){return e.evaluate(t)}).join(\\\"\\\")}],\\\"resolved-locale\\\":[q,[X],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Yt=.95047,Xt=1,Zt=1.08883,$t=4/29,Jt=6/29,Kt=3*Jt*Jt,Qt=Jt*Jt*Jt,te=Math.PI/180,ee=180/Math.PI;function re(t){return t>Qt?Math.pow(t,1/3):t/Kt+$t}function ne(t){return t>Jt?t*t*t:Kt*(t-$t)}function ie(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ae(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function oe(t){var e=ae(t.r),r=ae(t.g),n=ae(t.b),i=re((.4124564*e+.3575761*r+.1804375*n)/Yt),a=re((.2126729*e+.7151522*r+.072175*n)/Xt);return{l:116*a-16,a:500*(i-a),b:200*(a-re((.0193339*e+.119192*r+.9503041*n)/Zt)),alpha:t.a}}function se(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=Xt*ne(e),r=Yt*ne(r),n=Zt*ne(n),new tt(ie(3.2404542*r-1.5371385*e-.4985314*n),ie(-.969266*r+1.8760108*e+.041556*n),ie(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var le={forward:oe,reverse:se,interpolate:function(t,e,r){return{l:wt(t.l,e.l,r),a:wt(t.a,e.a,r),b:wt(t.b,e.b,r),alpha:wt(t.alpha,e.alpha,r)}}},ce={forward:function(t){var e=oe(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*ee;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*te,r=t.c;return se({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:wt(t.c,e.c,r),l:wt(t.l,e.l,r),alpha:wt(t.alpha,e.alpha,r)}}},ue=Object.freeze({lab:le,hcl:ce});function fe(t){return t instanceof Number?\\\"number\\\":t instanceof String?\\\"string\\\":t instanceof Boolean?\\\"boolean\\\":Array.isArray(t)?\\\"array\\\":null===t?\\\"null\\\":typeof t}function he(t){return\\\"object\\\"==typeof t&&null!==t&&!Array.isArray(t)}function pe(t){return t}function de(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function ge(t,e,r,n,i){return de(typeof r===i?n[r]:void 0,t.default,e.default)}function ve(t,e,r){if(\\\"number\\\"!==fe(r))return de(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=xe(t.stops,r);return t.stops[i][1]}function me(t,e,r){var n=void 0!==t.base?t.base:1;if(\\\"number\\\"!==fe(r))return de(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var a=xe(t.stops,r),o=function(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1],c=kt[e.type]||pe;if(t.colorSpace&&\\\"rgb\\\"!==t.colorSpace){var u=ue[t.colorSpace];c=function(t,e){return u.reverse(u.interpolate(u.forward(t),u.forward(e),o))}}return\\\"function\\\"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return c(r,n,o)}}:c(s,l,o)}function ye(t,e,r){return\\\"color\\\"===e.type?r=tt.parse(r):fe(r)===e.type||\\\"enum\\\"===e.type&&e.values[r]||(r=void 0),de(r,t.default,e.default)}function xe(t,e){for(var r,n,i=0,a=t.length-1,o=0;i<=a;){if(r=t[o=Math.floor((i+a)/2)][0],n=t[o+1][0],e===r||e>r&&e<n)return o;r<e?i=o+1:r>e&&(a=o-1)}return Math.max(o-1,0)}var be=function(t,e){var r;this.expression=t,this._warningHistory={},this._defaultValue=\\\"color\\\"===(r=e).type&&he(r.default)?new tt(0,0,0,0):\\\"color\\\"===r.type?tt.parse(r.default)||null:void 0===r.default?null:r.default,\\\"enum\\\"===e.type&&(this._enumValues=e.values)};function _e(t){return Array.isArray(t)&&t.length>0&&\\\"string\\\"==typeof t[0]&&t[0]in Rt}function we(t,e){var r=new xt(Rt,[],function(t){var e={color:G,string:q,number:U,enum:q,boolean:H};return\\\"array\\\"===t.type?Z(e[t.value]||Y,t.length):e[t.type]||null}(e)),n=r.parse(t);return n?Gt(new be(n,e)):Wt(r.errors)}be.prototype.evaluateWithoutErrorHandling=function(t,e){return this._evaluator||(this._evaluator=new dt),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)},be.prototype.evaluate=function(t,e){this._evaluator||(this._evaluator=new dt),this._evaluator.globals=t,this._evaluator.feature=e;try{var r=this.expression.evaluate(this._evaluator);if(null==r)return this._defaultValue;if(this._enumValues&&!(r in this._enumValues))throw new ot(\\\"Expected value to be one of \\\"+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(\\\", \\\")+\\\", but found \\\"+JSON.stringify(r)+\\\" instead.\\\");return r}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\\\"undefined\\\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var ke=function(t,e){this.kind=t,this._styleExpression=e};ke.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},ke.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)};var Me=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,r instanceof Mt&&(this._interpolationType=r.interpolation)};function Ae(t,e){if(\\\"error\\\"===(t=we(t,e)).result)return t;var r=t.value.expression,n=vt(r);if(!n&&!e[\\\"property-function\\\"])return Wt([new N(\\\"\\\",\\\"property expressions not supported\\\")]);var i=mt(r,[\\\"zoom\\\"]);if(!i&&!1===e[\\\"zoom-function\\\"])return Wt([new N(\\\"\\\",\\\"zoom expressions not supported\\\")]);var a=function t(e){var r=null;if(e instanceof St)r=t(e.result);else if(e instanceof Tt)for(var n=0,i=e.args;n<i.length;n+=1){var a=i[n];if(r=t(a))break}else(e instanceof _t||e instanceof Mt)&&e.input instanceof gt&&\\\"zoom\\\"===e.input.name&&(r=e);return r instanceof N?r:(e.eachChild(function(e){var n=t(e);n instanceof N?r=n:!r&&n?r=new N(\\\"\\\",'\\\"zoom\\\" expression may only be used as input to a top-level \\\"step\\\" or \\\"interpolate\\\" expression.'):r&&n&&r!==n&&(r=new N(\\\"\\\",'Only one zoom-based \\\"step\\\" or \\\"interpolate\\\" subexpression may be used in an expression.'))}),r)}(r);return a||i?a instanceof N?Wt([a]):a instanceof Mt&&\\\"piecewise-constant\\\"===e.function?Wt([new N(\\\"\\\",'\\\"interpolate\\\" expressions cannot be used with this property')]):Gt(a?new Me(n?\\\"camera\\\":\\\"composite\\\",t.value,a):new ke(n?\\\"constant\\\":\\\"source\\\",t.value)):Wt([new N(\\\"\\\",'\\\"zoom\\\" expression may only be used as input to a top-level \\\"step\\\" or \\\"interpolate\\\" expression.')])}Me.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},Me.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)},Me.prototype.interpolationFactor=function(t,e,r){return this._interpolationType?Mt.interpolationFactor(this._interpolationType,t,e,r):0};var Te=function(t,e){this._parameters=t,this._specification=e,R(this,function t(e,r){var n,i,a,o=\\\"color\\\"===r.type,s=e.stops&&\\\"object\\\"==typeof e.stops[0][0],l=s||void 0!==e.property,c=s||!l,u=e.type||(\\\"interpolated\\\"===r.function?\\\"exponential\\\":\\\"interval\\\");if(o&&((e=R({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],tt.parse(t[1])]})),e.default?e.default=tt.parse(e.default):e.default=tt.parse(r.default)),e.colorSpace&&\\\"rgb\\\"!==e.colorSpace&&!ue[e.colorSpace])throw new Error(\\\"Unknown color space: \\\"+e.colorSpace);if(\\\"exponential\\\"===u)n=me;else if(\\\"interval\\\"===u)n=ve;else if(\\\"categorical\\\"===u){n=ge,i=Object.create(null);for(var f=0,h=e.stops;f<h.length;f+=1){var p=h[f];i[p[0]]=p[1]}a=typeof e.stops[0][0]}else{if(\\\"identity\\\"!==u)throw new Error('Unknown function type \\\"'+u+'\\\"');n=ye}if(s){for(var d={},g=[],v=0;v<e.stops.length;v++){var m=e.stops[v],y=m[0].zoom;void 0===d[y]&&(d[y]={zoom:y,type:e.type,property:e.property,default:e.default,stops:[]},g.push(y)),d[y].stops.push([m[0].value,m[1]])}for(var x=[],b=0,_=g;b<_.length;b+=1){var w=_[b];x.push([d[w].zoom,t(d[w],r)])}return{kind:\\\"composite\\\",interpolationFactor:Mt.interpolationFactor.bind(void 0,{name:\\\"linear\\\"}),zoomStops:x.map(function(t){return t[0]}),evaluate:function(t,n){var i=t.zoom;return me({stops:x,base:e.base},r,i).evaluate(i,n)}}}return c?{kind:\\\"camera\\\",interpolationFactor:\\\"exponential\\\"===u?Mt.interpolationFactor.bind(void 0,{name:\\\"exponential\\\",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var o=t.zoom;return n(e,r,o,i,a)}}:{kind:\\\"source\\\",evaluate:function(t,o){var s=o&&o.properties?o.properties[e.property]:void 0;return void 0===s?de(e.default,r.default):n(e,r,s,i,a)}}}(this._parameters,this._specification))};function Se(t,e){if(he(t))return new Te(t,e);if(_e(t)){var r=Ae(t,e);if(\\\"error\\\"===r.result)throw new Error(r.value.map(function(t){return t.key+\\\": \\\"+t.message}).join(\\\", \\\"));return r.value}var n=t;return\\\"string\\\"==typeof t&&\\\"color\\\"===e.type&&(n=tt.parse(t)),{kind:\\\"constant\\\",evaluate:function(){return n}}}function Ce(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},a=t.style,o=t.styleSpec,s=[],l=fe(r);if(\\\"object\\\"!==l)return[new P(e,r,\\\"object expected, \\\"+l+\\\" found\\\")];for(var c in r){var u=c.split(\\\".\\\")[0],f=n[u]||n[\\\"*\\\"],h=void 0;if(i[u])h=i[u];else if(n[u])h=Ke;else if(i[\\\"*\\\"])h=i[\\\"*\\\"];else{if(!n[\\\"*\\\"]){s.push(new P(e,r[c],'unknown property \\\"'+c+'\\\"'));continue}h=Ke}s=s.concat(h({key:(e?e+\\\".\\\":e)+c,value:r[c],valueSpec:f,style:a,styleSpec:o,object:r,objectKey:c},r))}for(var p in n)i[p]||n[p].required&&void 0===n[p].default&&void 0===r[p]&&s.push(new P(e,r,'missing required property \\\"'+p+'\\\"'));return s}function Ee(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,a=t.key,o=t.arrayElementValidator||Ke;if(\\\"array\\\"!==fe(e))return[new P(a,e,\\\"array expected, \\\"+fe(e)+\\\" found\\\")];if(r.length&&e.length!==r.length)return[new P(a,e,\\\"array length \\\"+r.length+\\\" expected, length \\\"+e.length+\\\" found\\\")];if(r[\\\"min-length\\\"]&&e.length<r[\\\"min-length\\\"])return[new P(a,e,\\\"array length at least \\\"+r[\\\"min-length\\\"]+\\\" expected, length \\\"+e.length+\\\" found\\\")];var s={type:r.value};i.$version<7&&(s.function=r.function),\\\"object\\\"===fe(r.value)&&(s=r.value);for(var l=[],c=0;c<e.length;c++)l=l.concat(o({array:e,arrayIndex:c,value:e[c],valueSpec:s,style:n,styleSpec:i,key:a+\\\"[\\\"+c+\\\"]\\\"}));return l}function Le(t){var e=t.key,r=t.value,n=t.valueSpec,i=fe(r);return\\\"number\\\"!==i?[new P(e,r,\\\"number expected, \\\"+i+\\\" found\\\")]:\\\"minimum\\\"in n&&r<n.minimum?[new P(e,r,r+\\\" is less than the minimum value \\\"+n.minimum)]:\\\"maximum\\\"in n&&r>n.maximum?[new P(e,r,r+\\\" is greater than the maximum value \\\"+n.maximum)]:[]}function ze(t){var e,r,n,i=t.valueSpec,a=B(t.value.type),o={},s=\\\"categorical\\\"!==a&&void 0===t.value.property,l=!s,c=\\\"array\\\"===fe(t.value.stops)&&\\\"array\\\"===fe(t.value.stops[0])&&\\\"object\\\"===fe(t.value.stops[0][0]),u=Ce({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if(\\\"identity\\\"===a)return[new P(t.key,t.value,'identity function may not have a \\\"stops\\\" property')];var e=[],r=t.value;return e=e.concat(Ee({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),\\\"array\\\"===fe(r)&&0===r.length&&e.push(new P(t.key,r,\\\"array must have at least one stop\\\")),e},default:function(t){return Ke({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\\\"identity\\\"===a&&s&&u.push(new P(t.key,t.value,'missing required property \\\"property\\\"')),\\\"identity\\\"===a||t.value.stops||u.push(new P(t.key,t.value,'missing required property \\\"stops\\\"')),\\\"exponential\\\"===a&&\\\"piecewise-constant\\\"===t.valueSpec.function&&u.push(new P(t.key,t.value,\\\"exponential functions not supported\\\")),t.styleSpec.$version>=8&&(l&&!t.valueSpec[\\\"property-function\\\"]?u.push(new P(t.key,t.value,\\\"property functions not supported\\\")):s&&!t.valueSpec[\\\"zoom-function\\\"]&&\\\"heatmap-color\\\"!==t.objectKey&&\\\"line-gradient\\\"!==t.objectKey&&u.push(new P(t.key,t.value,\\\"zoom functions not supported\\\"))),\\\"categorical\\\"!==a&&!c||void 0!==t.value.property||u.push(new P(t.key,t.value,'\\\"property\\\" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(\\\"array\\\"!==fe(a))return[new P(s,a,\\\"array expected, \\\"+fe(a)+\\\" found\\\")];if(2!==a.length)return[new P(s,a,\\\"array length 2 expected, length \\\"+a.length+\\\" found\\\")];if(c){if(\\\"object\\\"!==fe(a[0]))return[new P(s,a,\\\"object expected, \\\"+fe(a[0])+\\\" found\\\")];if(void 0===a[0].zoom)return[new P(s,a,\\\"object stop key must have zoom\\\")];if(void 0===a[0].value)return[new P(s,a,\\\"object stop key must have value\\\")];if(n&&n>B(a[0].zoom))return[new P(s,a[0].zoom,\\\"stop zoom values must appear in ascending order\\\")];B(a[0].zoom)!==n&&(n=B(a[0].zoom),r=void 0,o={}),e=e.concat(Ce({key:s+\\\"[0]\\\",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Le,value:h}}))}else e=e.concat(h({key:s+\\\"[0]\\\",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return e.concat(Ke({key:s+\\\"[1]\\\",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=fe(t.value),l=B(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new P(t.key,c,s+\\\" stop domain type must match previous stop domain type \\\"+e)]}else e=s;if(\\\"number\\\"!==s&&\\\"string\\\"!==s&&\\\"boolean\\\"!==s)return[new P(t.key,c,\\\"stop domain value must be a number, string, or boolean\\\")];if(\\\"number\\\"!==s&&\\\"categorical\\\"!==a){var u=\\\"number expected, \\\"+s+\\\" found\\\";return i[\\\"property-function\\\"]&&void 0===a&&(u+='\\\\nIf you intended to use a categorical function, specify `\\\"type\\\": \\\"categorical\\\"`.'),[new P(t.key,c,u)]}return\\\"categorical\\\"!==a||\\\"number\\\"!==s||isFinite(l)&&Math.floor(l)===l?\\\"categorical\\\"!==a&&\\\"number\\\"===s&&void 0!==r&&l<r?[new P(t.key,c,\\\"stop domain values must appear in ascending order\\\")]:(r=l,\\\"categorical\\\"===a&&l in o?[new P(t.key,c,\\\"stop domain values must be unique\\\")]:(o[l]=!0,[])):[new P(t.key,c,\\\"integer expected, found \\\"+l)]}}function Oe(t){var e=(\\\"property\\\"===t.expressionContext?Ae:we)(F(t.value),t.valueSpec);return\\\"error\\\"===e.result?e.value.map(function(e){return new P(\\\"\\\"+t.key+e.key,t.value,e.message)}):\\\"property\\\"===t.expressionContext&&\\\"text-font\\\"===t.propertyKey&&-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new P(t.key,t.value,'Invalid data expression for \\\"text-font\\\". Output values must be contained as literals within the expression.')]:[]}function Ie(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(B(r))&&i.push(new P(e,r,\\\"expected one of [\\\"+n.values.join(\\\", \\\")+\\\"], \\\"+JSON.stringify(r)+\\\" found\\\")):-1===Object.keys(n.values).indexOf(B(r))&&i.push(new P(e,r,\\\"expected one of [\\\"+Object.keys(n.values).join(\\\", \\\")+\\\"], \\\"+JSON.stringify(r)+\\\" found\\\")),i}function Pe(t){if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case\\\"has\\\":return t.length>=2&&\\\"$id\\\"!==t[1]&&\\\"$type\\\"!==t[1];case\\\"in\\\":case\\\"!in\\\":case\\\"!has\\\":case\\\"none\\\":return!1;case\\\"==\\\":case\\\"!=\\\":case\\\">\\\":case\\\">=\\\":case\\\"<\\\":case\\\"<=\\\":return 3===t.length&&(Array.isArray(t[1])||Array.isArray(t[2]));case\\\"any\\\":case\\\"all\\\":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!Pe(n)&&\\\"boolean\\\"!=typeof n)return!1}return!0;default:return!0}}Te.deserialize=function(t){return new Te(t._parameters,t._specification)},Te.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var De={type:\\\"boolean\\\",default:!1,function:!0,\\\"property-function\\\":!0,\\\"zoom-function\\\":!0};function Re(t){if(!t)return function(){return!0};Pe(t)||(t=Fe(t));var e=we(t,De);if(\\\"error\\\"===e.result)throw new Error(e.value.map(function(t){return t.key+\\\": \\\"+t.message}).join(\\\", \\\"));return function(t,r){return e.value.evaluate(t,r)}}function Be(t,e){return t<e?-1:t>e?1:0}function Fe(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\\\"any\\\"!==r:\\\"==\\\"===r?Ne(t[1],t[2],\\\"==\\\"):\\\"!=\\\"===r?Ue(Ne(t[1],t[2],\\\"==\\\")):\\\"<\\\"===r||\\\">\\\"===r||\\\"<=\\\"===r||\\\">=\\\"===r?Ne(t[1],t[2],r):\\\"any\\\"===r?(e=t.slice(1),[\\\"any\\\"].concat(e.map(Fe))):\\\"all\\\"===r?[\\\"all\\\"].concat(t.slice(1).map(Fe)):\\\"none\\\"===r?[\\\"all\\\"].concat(t.slice(1).map(Fe).map(Ue)):\\\"in\\\"===r?je(t[1],t.slice(2)):\\\"!in\\\"===r?Ue(je(t[1],t.slice(2))):\\\"has\\\"===r?Ve(t[1]):\\\"!has\\\"!==r||Ue(Ve(t[1]))}function Ne(t,e,r){switch(t){case\\\"$type\\\":return[\\\"filter-type-\\\"+r,e];case\\\"$id\\\":return[\\\"filter-id-\\\"+r,e];default:return[\\\"filter-\\\"+r,t,e]}}function je(t,e){if(0===e.length)return!1;switch(t){case\\\"$type\\\":return[\\\"filter-type-in\\\",[\\\"literal\\\",e]];case\\\"$id\\\":return[\\\"filter-id-in\\\",[\\\"literal\\\",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?[\\\"filter-in-large\\\",t,[\\\"literal\\\",e.sort(Be)]]:[\\\"filter-in-small\\\",t,[\\\"literal\\\",e]]}}function Ve(t){switch(t){case\\\"$type\\\":return!0;case\\\"$id\\\":return[\\\"filter-has-id\\\"];default:return[\\\"filter-has\\\",t]}}function Ue(t){return[\\\"!\\\",t]}function qe(t){return Pe(F(t.value))?Oe(R({},t,{expressionContext:\\\"filter\\\",valueSpec:{value:\\\"boolean\\\"}})):function t(e){var r=e.value,n=e.key;if(\\\"array\\\"!==fe(r))return[new P(n,r,\\\"array expected, \\\"+fe(r)+\\\" found\\\")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new P(n,r,\\\"filter array must have at least 1 element\\\")];switch(o=o.concat(Ie({key:n+\\\"[0]\\\",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),B(r[0])){case\\\"<\\\":case\\\"<=\\\":case\\\">\\\":case\\\">=\\\":r.length>=2&&\\\"$type\\\"===B(r[1])&&o.push(new P(n,r,'\\\"$type\\\" cannot be use with operator \\\"'+r[0]+'\\\"'));case\\\"==\\\":case\\\"!=\\\":3!==r.length&&o.push(new P(n,r,'filter array for operator \\\"'+r[0]+'\\\" must have 3 elements'));case\\\"in\\\":case\\\"!in\\\":r.length>=2&&\\\"string\\\"!==(i=fe(r[1]))&&o.push(new P(n+\\\"[1]\\\",r[1],\\\"string expected, \\\"+i+\\\" found\\\"));for(var s=2;s<r.length;s++)i=fe(r[s]),\\\"$type\\\"===B(r[1])?o=o.concat(Ie({key:n+\\\"[\\\"+s+\\\"]\\\",value:r[s],valueSpec:a.geometry_type,style:e.style,styleSpec:e.styleSpec})):\\\"string\\\"!==i&&\\\"number\\\"!==i&&\\\"boolean\\\"!==i&&o.push(new P(n+\\\"[\\\"+s+\\\"]\\\",r[s],\\\"string, number, or boolean expected, \\\"+i+\\\" found\\\"));break;case\\\"any\\\":case\\\"all\\\":case\\\"none\\\":for(var l=1;l<r.length;l++)o=o.concat(t({key:n+\\\"[\\\"+l+\\\"]\\\",value:r[l],style:e.style,styleSpec:e.styleSpec}));break;case\\\"has\\\":case\\\"!has\\\":i=fe(r[1]),2!==r.length?o.push(new P(n,r,'filter array for \\\"'+r[0]+'\\\" operator must have 2 elements')):\\\"string\\\"!==i&&o.push(new P(n+\\\"[1]\\\",r[1],\\\"string expected, \\\"+i+\\\" found\\\"))}return o}(t)}function He(t,e){var r=t.key,n=t.style,i=t.styleSpec,a=t.value,o=t.objectKey,s=i[e+\\\"_\\\"+t.layerType];if(!s)return[];var l=o.match(/^(.*)-transition$/);if(\\\"paint\\\"===e&&l&&s[l[1]]&&s[l[1]].transition)return Ke({key:r,value:a,valueSpec:i.transition,style:n,styleSpec:i});var c,u=t.valueSpec||s[o];if(!u)return[new P(r,a,'unknown property \\\"'+o+'\\\"')];if(\\\"string\\\"===fe(a)&&u[\\\"property-function\\\"]&&!u.tokens&&(c=/^{([^}]+)}$/.exec(a)))return[new P(r,a,'\\\"'+o+'\\\" does not support interpolation syntax\\\\nUse an identity property function instead: `{ \\\"type\\\": \\\"identity\\\", \\\"property\\\": '+JSON.stringify(c[1])+\\\" }`.\\\")];var f=[];return\\\"symbol\\\"===t.layerType&&(\\\"text-field\\\"===o&&n&&!n.glyphs&&f.push(new P(r,a,'use of \\\"text-field\\\" requires a style \\\"glyphs\\\" property')),\\\"text-font\\\"===o&&he(F(a))&&\\\"identity\\\"===B(a.type)&&f.push(new P(r,a,'\\\"text-font\\\" does not support identity functions'))),f.concat(Ke({key:t.key,value:a,valueSpec:u,style:n,styleSpec:i,expressionContext:\\\"property\\\",propertyKey:o}))}function Ge(t){return He(t,\\\"paint\\\")}function We(t){return He(t,\\\"layout\\\")}function Ye(t){var e=[],r=t.value,n=t.key,i=t.style,a=t.styleSpec;r.type||r.ref||e.push(new P(n,r,'either \\\"type\\\" or \\\"ref\\\" is required'));var o,s=B(r.type),l=B(r.ref);if(r.id)for(var c=B(r.id),u=0;u<t.arrayIndex;u++){var f=i.layers[u];B(f.id)===c&&e.push(new P(n,r.id,'duplicate layer id \\\"'+r.id+'\\\", previously used at line '+f.id.__line__))}if(\\\"ref\\\"in r)[\\\"type\\\",\\\"source\\\",\\\"source-layer\\\",\\\"filter\\\",\\\"layout\\\"].forEach(function(t){t in r&&e.push(new P(n,r[t],'\\\"'+t+'\\\" is prohibited for ref layers'))}),i.layers.forEach(function(t){B(t.id)===l&&(o=t)}),o?o.ref?e.push(new P(n,r.ref,\\\"ref cannot reference another ref layer\\\")):s=B(o.type):e.push(new P(n,r.ref,'ref layer \\\"'+l+'\\\" not found'));else if(\\\"background\\\"!==s)if(r.source){var h=i.sources&&i.sources[r.source],p=h&&B(h.type);h?\\\"vector\\\"===p&&\\\"raster\\\"===s?e.push(new P(n,r.source,'layer \\\"'+r.id+'\\\" requires a raster source')):\\\"raster\\\"===p&&\\\"raster\\\"!==s?e.push(new P(n,r.source,'layer \\\"'+r.id+'\\\" requires a vector source')):\\\"vector\\\"!==p||r[\\\"source-layer\\\"]?\\\"raster-dem\\\"===p&&\\\"hillshade\\\"!==s?e.push(new P(n,r.source,\\\"raster-dem source can only be used with layer type 'hillshade'.\\\")):\\\"line\\\"!==s||!r.paint||!r.paint[\\\"line-gradient\\\"]||\\\"geojson\\\"===p&&h.lineMetrics||e.push(new P(n,r,'layer \\\"'+r.id+'\\\" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new P(n,r,'layer \\\"'+r.id+'\\\" must specify a \\\"source-layer\\\"')):e.push(new P(n,r.source,'source \\\"'+r.source+'\\\" not found'))}else e.push(new P(n,r,'missing required property \\\"source\\\"'));return e=e.concat(Ce({key:n,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\\\"*\\\":function(){return[]},type:function(){return Ke({key:n+\\\".type\\\",value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:\\\"type\\\"})},filter:qe,layout:function(t){return Ce({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\\\"*\\\":function(t){return We(R({layerType:s},t))}}})},paint:function(t){return Ce({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\\\"*\\\":function(t){return Ge(R({layerType:s},t))}}})}}}))}function Xe(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new P(r,e,'\\\"type\\\" is required')];var a=B(e.type),o=[];switch(a){case\\\"vector\\\":case\\\"raster\\\":case\\\"raster-dem\\\":if(o=o.concat(Ce({key:r,value:e,valueSpec:n[\\\"source_\\\"+a.replace(\\\"-\\\",\\\"_\\\")],style:t.style,styleSpec:n})),\\\"url\\\"in e)for(var s in e)[\\\"type\\\",\\\"url\\\",\\\"tileSize\\\"].indexOf(s)<0&&o.push(new P(r+\\\".\\\"+s,e[s],'a source with a \\\"url\\\" property may not include a \\\"'+s+'\\\" property'));return o;case\\\"geojson\\\":return Ce({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n});case\\\"video\\\":return Ce({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case\\\"image\\\":return Ce({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case\\\"canvas\\\":return o.push(new P(r,null,\\\"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.\\\",\\\"source.canvas\\\")),o;default:return Ie({key:r+\\\".type\\\",value:e.type,valueSpec:{values:[\\\"vector\\\",\\\"raster\\\",\\\"raster-dem\\\",\\\"geojson\\\",\\\"video\\\",\\\"image\\\"]},style:i,styleSpec:n})}}function Ze(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,a=[],o=fe(e);if(void 0===e)return a;if(\\\"object\\\"!==o)return a.concat([new P(\\\"light\\\",e,\\\"object expected, \\\"+o+\\\" found\\\")]);for(var s in e){var l=s.match(/^(.*)-transition$/);a=l&&n[l[1]]&&n[l[1]].transition?a.concat(Ke({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?a.concat(Ke({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):a.concat([new P(s,e[s],'unknown property \\\"'+s+'\\\"')])}return a}function $e(t){var e=t.value,r=t.key,n=fe(e);return\\\"string\\\"!==n?[new P(r,e,\\\"string expected, \\\"+n+\\\" found\\\")]:[]}var Je={\\\"*\\\":function(){return[]},array:Ee,boolean:function(t){var e=t.value,r=t.key,n=fe(e);return\\\"boolean\\\"!==n?[new P(r,e,\\\"boolean expected, \\\"+n+\\\" found\\\")]:[]},number:Le,color:function(t){var e=t.key,r=t.value,n=fe(r);return\\\"string\\\"!==n?[new P(e,r,\\\"color expected, \\\"+n+\\\" found\\\")]:null===Q(r)?[new P(e,r,'color expected, \\\"'+r+'\\\" found')]:[]},constants:D,enum:Ie,filter:qe,function:ze,layer:Ye,object:Ce,source:Xe,light:Ze,string:$e};function Ke(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.function&&he(B(e))?ze(t):r.function&&_e(F(e))?Oe(t):r.type&&Je[r.type]?Je[r.type](t):Ce(R({},t,{valueSpec:r.type?n[r.type]:r}))}function Qe(t){var e=t.value,r=t.key,n=$e(t);return n.length?n:(-1===e.indexOf(\\\"{fontstack}\\\")&&n.push(new P(r,e,'\\\"glyphs\\\" url must include a \\\"{fontstack}\\\" token')),-1===e.indexOf(\\\"{range}\\\")&&n.push(new P(r,e,'\\\"glyphs\\\" url must include a \\\"{range}\\\" token')),n)}function tr(t,e){e=e||I;var r=[];return r=r.concat(Ke({key:\\\"\\\",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Qe,\\\"*\\\":function(){return[]}}})),t.constants&&(r=r.concat(D({key:\\\"constants\\\",value:t.constants,style:t,styleSpec:e}))),er(r)}function er(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function rr(t){return function(){return er(t.apply(this,arguments))}}tr.source=rr(Xe),tr.light=rr(Ze),tr.layer=rr(Ye),tr.filter=rr(qe),tr.paintProperty=rr(Ge),tr.layoutProperty=rr(We);var nr=tr,ir=tr.light,ar=tr.paintProperty,or=tr.layoutProperty;function sr(t,e){var r=!1;if(e&&e.length)for(var n=0,i=e;n<i.length;n+=1){var a=i[n];t.fire(new z(new Error(a.message))),r=!0}return r}var lr=ur,cr=3;function ur(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var a=0;a<this.d*this.d;a++){var o=i[cr+a],s=i[cr+a+1];n.push(o===s?null:i.subarray(o,s))}var l=i[cr+n.length],c=i[cr+n.length+1];this.keys=i.subarray(l,c),this.bboxes=i.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var u=0;u<this.d*this.d;u++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var f=r/e*t;this.min=-f,this.max=t+f}ur.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},ur.prototype._insertReadonly=function(){throw\\\"Cannot insert into a GridIndex created from an ArrayBuffer.\\\"},ur.prototype._insertCell=function(t,e,r,n,i,a){this.cells[i].push(a)},ur.prototype.query=function(t,e,r,n){var i=this.min,a=this.max;if(t<=i&&e<=i&&a<=r&&a<=n)return Array.prototype.slice.call(this.keys);var o=[];return this._forEachCell(t,e,r,n,this._queryCell,o,{}),o},ur.prototype._queryCell=function(t,e,r,n,i,a,o){var s=this.cells[i];if(null!==s)for(var l=this.keys,c=this.bboxes,u=0;u<s.length;u++){var f=s[u];if(void 0===o[f]){var h=4*f;t<=c[h+2]&&e<=c[h+3]&&r>=c[h+0]&&n>=c[h+1]?(o[f]=!0,a.push(l[f])):o[f]=!1}}},ur.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(r),u=this._convertToCellCoord(n),f=s;f<=c;f++)for(var h=l;h<=u;h++){var p=this.d*h+f;if(i.call(this,t,e,r,n,p,a,o))return}},ur.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ur.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=cr+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var a=e,o=0;o<t.length;o++){var s=t[o];i[cr+o]=a,i.set(s,a),a+=s.length}return i[cr+t.length]=a,i.set(this.keys,a),a+=this.keys.length,i[cr+t.length+1]=a,i.set(this.bboxes,a),a+=this.bboxes.length,i.buffer};var fr=self.ImageData,hr={};function pr(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,\\\"_classRegistryKey\\\",{value:t,writeable:!1}),hr[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var dr in pr(\\\"Object\\\",Object),lr.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),r},lr.deserialize=function(t){return new lr(t)},pr(\\\"Grid\\\",lr),pr(\\\"Color\\\",tt),pr(\\\"Error\\\",Error),pr(\\\"StylePropertyFunction\\\",Te),pr(\\\"StyleExpression\\\",be,{omit:[\\\"_evaluator\\\"]}),pr(\\\"ZoomDependentExpression\\\",Me),pr(\\\"ZoomConstantExpression\\\",ke),pr(\\\"CompoundExpression\\\",gt,{omit:[\\\"_evaluate\\\"]}),Rt)Rt[dr]._classRegistryKey||pr(\\\"Expression_\\\"+dr,Rt[dr]);function gr(t,e){if(null==t||\\\"boolean\\\"==typeof t||\\\"number\\\"==typeof t||\\\"string\\\"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof fr)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,a=t;i<a.length;i+=1){var o=a[i];n.push(gr(o,e))}return n}if(\\\"object\\\"==typeof t){var s=t.constructor,l=s._classRegistryKey;if(!l)throw new Error(\\\"can't serialize object of unregistered class\\\");var c={};if(s.serialize)c._serialized=s.serialize(t,e);else{for(var u in t)if(t.hasOwnProperty(u)&&!(hr[l].omit.indexOf(u)>=0)){var f=t[u];c[u]=hr[l].shallow.indexOf(u)>=0?f:gr(f,e)}t instanceof Error&&(c.message=t.message)}return{name:l,properties:c}}throw new Error(\\\"can't serialize object of type \\\"+typeof t)}function vr(t){if(null==t||\\\"boolean\\\"==typeof t||\\\"number\\\"==typeof t||\\\"string\\\"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof fr)return t;if(Array.isArray(t))return t.map(function(t){return vr(t)});if(\\\"object\\\"==typeof t){var e=t,r=e.name,n=e.properties;if(!r)throw new Error(\\\"can't deserialize object of anonymous class\\\");var i=hr[r].klass;if(!i)throw new Error(\\\"can't deserialize unregistered class \\\"+r);if(i.deserialize)return i.deserialize(n._serialized);for(var a=Object.create(i.prototype),o=0,s=Object.keys(n);o<s.length;o+=1){var l=s[o];a[l]=hr[r].shallow.indexOf(l)>=0?n[l]:vr(n[l])}return a}throw new Error(\\\"can't deserialize object of type \\\"+typeof t)}var mr=function(){this.first=!0};mr.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var yr={\\\"Latin-1 Supplement\\\":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},\\\"Arabic Supplement\\\":function(t){return t>=1872&&t<=1919},\\\"Arabic Extended-A\\\":function(t){return t>=2208&&t<=2303},\\\"Hangul Jamo\\\":function(t){return t>=4352&&t<=4607},\\\"Unified Canadian Aboriginal Syllabics\\\":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},\\\"Unified Canadian Aboriginal Syllabics Extended\\\":function(t){return t>=6320&&t<=6399},\\\"General Punctuation\\\":function(t){return t>=8192&&t<=8303},\\\"Letterlike Symbols\\\":function(t){return t>=8448&&t<=8527},\\\"Number Forms\\\":function(t){return t>=8528&&t<=8591},\\\"Miscellaneous Technical\\\":function(t){return t>=8960&&t<=9215},\\\"Control Pictures\\\":function(t){return t>=9216&&t<=9279},\\\"Optical Character Recognition\\\":function(t){return t>=9280&&t<=9311},\\\"Enclosed Alphanumerics\\\":function(t){return t>=9312&&t<=9471},\\\"Geometric Shapes\\\":function(t){return t>=9632&&t<=9727},\\\"Miscellaneous Symbols\\\":function(t){return t>=9728&&t<=9983},\\\"Miscellaneous Symbols and Arrows\\\":function(t){return t>=11008&&t<=11263},\\\"CJK Radicals Supplement\\\":function(t){return t>=11904&&t<=12031},\\\"Kangxi Radicals\\\":function(t){return t>=12032&&t<=12255},\\\"Ideographic Description Characters\\\":function(t){return t>=12272&&t<=12287},\\\"CJK Symbols and Punctuation\\\":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},\\\"Hangul Compatibility Jamo\\\":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},\\\"Bopomofo Extended\\\":function(t){return t>=12704&&t<=12735},\\\"CJK Strokes\\\":function(t){return t>=12736&&t<=12783},\\\"Katakana Phonetic Extensions\\\":function(t){return t>=12784&&t<=12799},\\\"Enclosed CJK Letters and Months\\\":function(t){return t>=12800&&t<=13055},\\\"CJK Compatibility\\\":function(t){return t>=13056&&t<=13311},\\\"CJK Unified Ideographs Extension A\\\":function(t){return t>=13312&&t<=19903},\\\"Yijing Hexagram Symbols\\\":function(t){return t>=19904&&t<=19967},\\\"CJK Unified Ideographs\\\":function(t){return t>=19968&&t<=40959},\\\"Yi Syllables\\\":function(t){return t>=40960&&t<=42127},\\\"Yi Radicals\\\":function(t){return t>=42128&&t<=42191},\\\"Hangul Jamo Extended-A\\\":function(t){return t>=43360&&t<=43391},\\\"Hangul Syllables\\\":function(t){return t>=44032&&t<=55215},\\\"Hangul Jamo Extended-B\\\":function(t){return t>=55216&&t<=55295},\\\"Private Use Area\\\":function(t){return t>=57344&&t<=63743},\\\"CJK Compatibility Ideographs\\\":function(t){return t>=63744&&t<=64255},\\\"Arabic Presentation Forms-A\\\":function(t){return t>=64336&&t<=65023},\\\"Vertical Forms\\\":function(t){return t>=65040&&t<=65055},\\\"CJK Compatibility Forms\\\":function(t){return t>=65072&&t<=65103},\\\"Small Form Variants\\\":function(t){return t>=65104&&t<=65135},\\\"Arabic Presentation Forms-B\\\":function(t){return t>=65136&&t<=65279},\\\"Halfwidth and Fullwidth Forms\\\":function(t){return t>=65280&&t<=65519}};function xr(t){for(var e=0,r=t;e<r.length;e+=1)if(_r(r[e].charCodeAt(0)))return!0;return!1}function br(t){return!(yr.Arabic(t)||yr[\\\"Arabic Supplement\\\"](t)||yr[\\\"Arabic Extended-A\\\"](t)||yr[\\\"Arabic Presentation Forms-A\\\"](t)||yr[\\\"Arabic Presentation Forms-B\\\"](t))}function _r(t){return!!(746===t||747===t||!(t<4352)&&(yr[\\\"Bopomofo Extended\\\"](t)||yr.Bopomofo(t)||yr[\\\"CJK Compatibility Forms\\\"](t)&&!(t>=65097&&t<=65103)||yr[\\\"CJK Compatibility Ideographs\\\"](t)||yr[\\\"CJK Compatibility\\\"](t)||yr[\\\"CJK Radicals Supplement\\\"](t)||yr[\\\"CJK Strokes\\\"](t)||!(!yr[\\\"CJK Symbols and Punctuation\\\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||yr[\\\"CJK Unified Ideographs Extension A\\\"](t)||yr[\\\"CJK Unified Ideographs\\\"](t)||yr[\\\"Enclosed CJK Letters and Months\\\"](t)||yr[\\\"Hangul Compatibility Jamo\\\"](t)||yr[\\\"Hangul Jamo Extended-A\\\"](t)||yr[\\\"Hangul Jamo Extended-B\\\"](t)||yr[\\\"Hangul Jamo\\\"](t)||yr[\\\"Hangul Syllables\\\"](t)||yr.Hiragana(t)||yr[\\\"Ideographic Description Characters\\\"](t)||yr.Kanbun(t)||yr[\\\"Kangxi Radicals\\\"](t)||yr[\\\"Katakana Phonetic Extensions\\\"](t)||yr.Katakana(t)&&12540!==t||!(!yr[\\\"Halfwidth and Fullwidth Forms\\\"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!yr[\\\"Small Form Variants\\\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||yr[\\\"Unified Canadian Aboriginal Syllabics\\\"](t)||yr[\\\"Unified Canadian Aboriginal Syllabics Extended\\\"](t)||yr[\\\"Vertical Forms\\\"](t)||yr[\\\"Yijing Hexagram Symbols\\\"](t)||yr[\\\"Yi Syllables\\\"](t)||yr[\\\"Yi Radicals\\\"](t)))}function wr(t){return!(_r(t)||function(t){return!!(yr[\\\"Latin-1 Supplement\\\"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||yr[\\\"General Punctuation\\\"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||yr[\\\"Letterlike Symbols\\\"](t)||yr[\\\"Number Forms\\\"](t)||yr[\\\"Miscellaneous Technical\\\"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||yr[\\\"Control Pictures\\\"](t)&&9251!==t||yr[\\\"Optical Character Recognition\\\"](t)||yr[\\\"Enclosed Alphanumerics\\\"](t)||yr[\\\"Geometric Shapes\\\"](t)||yr[\\\"Miscellaneous Symbols\\\"](t)&&!(t>=9754&&t<=9759)||yr[\\\"Miscellaneous Symbols and Arrows\\\"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||yr[\\\"CJK Symbols and Punctuation\\\"](t)||yr.Katakana(t)||yr[\\\"Private Use Area\\\"](t)||yr[\\\"CJK Compatibility Forms\\\"](t)||yr[\\\"Small Form Variants\\\"](t)||yr[\\\"Halfwidth and Fullwidth Forms\\\"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function kr(t,e){return!(!e&&(t>=1424&&t<=2303||yr[\\\"Arabic Presentation Forms-A\\\"](t)||yr[\\\"Arabic Presentation Forms-B\\\"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||yr.Khmer(t))}var Mr,Ar=!1,Tr=null,Sr=!1,Cr=new O,Er={applyArabicShaping:null,processBidirectionalText:null,isLoaded:function(){return Sr||null!=Er.applyArabicShaping}},Lr=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new mr,this.transition={})};Lr.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;r<n.length;r+=1)if(!kr(n[r].charCodeAt(0),e))return!1;return!0}(t,Er.isLoaded())},Lr.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)};var zr=function(t,e){this.property=t,this.value=e,this.expression=Se(void 0===e?t.specification.default:e,t.specification)};zr.prototype.isDataDriven=function(){return\\\"source\\\"===this.expression.kind||\\\"composite\\\"===this.expression.kind},zr.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Or=function(t){this.property=t,this.value=new zr(t,void 0)};Or.prototype.transitioned=function(t,e){return new Pr(this.property,this.value,e,p({},t.transition,this.transition),t.now)},Or.prototype.untransitioned=function(){return new Pr(this.property,this.value,null,{},0)};var Ir=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Ir.prototype.getValue=function(t){return x(this._values[t].value.value)},Ir.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Or(this._values[t].property)),this._values[t].value=new zr(this._values[t].property,null===e?void 0:x(e))},Ir.prototype.getTransition=function(t){return x(this._values[t].transition)},Ir.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Or(this._values[t].property)),this._values[t].transition=x(e)||void 0},Ir.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i);var a=this.getTransition(n);void 0!==a&&(t[n+\\\"-transition\\\"]=a)}return t},Ir.prototype.transitioned=function(t,e){for(var r=new Dr(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var a=i[n];r._values[a]=this._values[a].transitioned(t,e._values[a])}return r},Ir.prototype.untransitioned=function(){for(var t=new Dr(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e];t._values[n]=this._values[n].untransitioned()}return t};var Pr=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r)};Pr.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),n=this.prior;if(n){if(e>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e<this.begin)return n.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(t),r,function(t){if(i<=0)return 0;if(i>=1)return 1;var e=i*i,r=e*i;return 4*(i<.5?r:3*(i-e)+r-.75)}())}return r};var Dr=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Dr.prototype.possiblyEvaluate=function(t){for(var e=new Fr(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e},Dr.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Rr=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Rr.prototype.getValue=function(t){return x(this._values[t].value)},Rr.prototype.setValue=function(t,e){this._values[t]=new zr(this._values[t].property,null===e?void 0:x(e))},Rr.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i)}return t},Rr.prototype.possiblyEvaluate=function(t){for(var e=new Fr(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e};var Br=function(t,e,r){this.property=t,this.value=e,this.globals=r};Br.prototype.isConstant=function(){return\\\"constant\\\"===this.value.kind},Br.prototype.constantOr=function(t){return\\\"constant\\\"===this.value.kind?this.value.value:t},Br.prototype.evaluate=function(t){return this.property.evaluate(this.value,this.globals,t)};var Fr=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Fr.prototype.get=function(t){return this._values[t]};var Nr=function(t){this.specification=t};Nr.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Nr.prototype.interpolate=function(t,e,r){var n=kt[this.specification.type];return n?n(t,e,r):t};var jr=function(t){this.specification=t};jr.prototype.possiblyEvaluate=function(t,e){return\\\"constant\\\"===t.expression.kind||\\\"camera\\\"===t.expression.kind?new Br(this,{kind:\\\"constant\\\",value:t.expression.evaluate(e)},e):new Br(this,t.expression,e)},jr.prototype.interpolate=function(t,e,r){if(\\\"constant\\\"!==t.value.kind||\\\"constant\\\"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Br(this,{kind:\\\"constant\\\",value:void 0},t.globals);var n=kt[this.specification.type];return n?new Br(this,{kind:\\\"constant\\\",value:n(t.value.value,e.value.value,r)},t.globals):t},jr.prototype.evaluate=function(t,e,r){return\\\"constant\\\"===t.kind?t.value:t.evaluate(e,r)};var Vr=function(t){this.specification=t};Vr.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if(\\\"constant\\\"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Lr(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Lr(Math.floor(e.zoom),e)),t.expression.evaluate(new Lr(Math.floor(e.zoom+1),e)),e)}},Vr.prototype._calculate=function(t,e,r,n){var i=n.zoom,a=i-Math.floor(i),o=n.crossFadingFactor();return i>n.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:a+(1-a)*o}:{from:r,to:e,fromScale:.5,toScale:1,t:1-(1-o)*a}},Vr.prototype.interpolate=function(t){return t};var Ur=function(t){this.specification=t};Ur.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Ur.prototype.interpolate=function(){return!1};var qr=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],n=this.defaultPropertyValues[e]=new zr(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new Or(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};pr(\\\"DataDrivenProperty\\\",jr),pr(\\\"DataConstantProperty\\\",Nr),pr(\\\"CrossFadedProperty\\\",Vr),pr(\\\"ColorRampProperty\\\",Ur);var Hr=function(t){function e(e,r){for(var n in t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.visibility=\\\"visible\\\",\\\"background\\\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\\\"source-layer\\\"],this.filter=e.filter),this._featureFilter=function(){return!0},r.layout&&(this._unevaluatedLayout=new Rr(r.layout)),this._transitionablePaint=new Ir(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayoutProperty=function(t){return\\\"visibility\\\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(null!=e){var n=\\\"layers.\\\"+this.id+\\\".layout.\\\"+t;if(this._validate(or,n,t,e,r))return}\\\"visibility\\\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=\\\"none\\\"===e?e:\\\"visible\\\"},e.prototype.getPaintProperty=function(t){return v(t,\\\"-transition\\\")?this._transitionablePaint.getTransition(t.slice(0,-\\\"-transition\\\".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(null!=e){var n=\\\"layers.\\\"+this.id+\\\".paint.\\\"+t;if(this._validate(ar,n,t,e,r))return}v(t,\\\"-transition\\\")?this._transitionablePaint.setTransition(t.slice(0,-\\\"-transition\\\".length),e||void 0):this._transitionablePaint.setValue(t,e)},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||\\\"none\\\"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,\\\"source-layer\\\":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return\\\"none\\\"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility=\\\"none\\\"),y(t,function(t,e){return!(void 0===t||\\\"layout\\\"===e&&!Object.keys(t).length||\\\"paint\\\"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,n,i){return(!i||!1!==i.validate)&&sr(this,t.call(nr,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:I,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e}(O),Gr={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Wr=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Yr=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Xr(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map(function(t){var i,a=(i=t.type,Gr[i].BYTES_PER_ELEMENT),o=r=Zr(r,Math.max(e,a)),s=t.components||1;return n=Math.max(n,a),r+=a*s,{name:t.name,type:t.type,components:s,offset:o}}),size:Zr(r,Math.max(n,e)),alignment:e}}function Zr(t,e){return Math.ceil(t/e)*e}Yr.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Yr.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Yr.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Yr.prototype.clear=function(){this.length=0},Yr.prototype.resize=function(t){this.reserve(t),this.length=t},Yr.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Yr.prototype._refreshViews=function(){throw new Error(\\\"_refreshViews() must be implemented by each concrete StructArray layout\\\")};var $r=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.int16[n+0]=t,this.int16[n+1]=e,r},e}(Yr);$r.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout2i4\\\",$r);var Jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var a=4*i;return this.int16[a+0]=t,this.int16[a+1]=e,this.int16[a+2]=r,this.int16[a+3]=n,i},e}(Yr);Jr.prototype.bytesPerElement=8,pr(\\\"StructArrayLayout4i8\\\",Jr);var Kr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;this.resize(o+1);var s=6*o;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=a,o},e}(Yr);Kr.prototype.bytesPerElement=12,pr(\\\"StructArrayLayout2i4i12\\\",Kr);var Qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;this.resize(l+1);var c=6*l,u=12*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=r,this.int16[c+3]=n,this.uint8[u+8]=i,this.uint8[u+9]=a,this.uint8[u+10]=o,this.uint8[u+11]=s,l},e}(Yr);Qr.prototype.bytesPerElement=12,pr(\\\"StructArrayLayout4i4ub12\\\",Qr);var tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;this.resize(l+1);var c=8*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=r,this.int16[c+3]=n,this.uint16[c+4]=i,this.uint16[c+5]=a,this.uint16[c+6]=o,this.uint16[c+7]=s,l},e}(Yr);tn.prototype.bytesPerElement=16,pr(\\\"StructArrayLayout4i4ui16\\\",tn);var en=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.float32[i+0]=t,this.float32[i+1]=e,this.float32[i+2]=r,n},e}(Yr);en.prototype.bytesPerElement=12,pr(\\\"StructArrayLayout3f12\\\",en);var rn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.uint32[r+0]=t,e},e}(Yr);rn.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout1ul4\\\",rn);var nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u){var f=this.length;this.resize(f+1);var h=12*f,p=6*f;return this.int16[h+0]=t,this.int16[h+1]=e,this.int16[h+2]=r,this.int16[h+3]=n,this.int16[h+4]=i,this.int16[h+5]=a,this.uint32[p+3]=o,this.uint16[h+8]=s,this.uint16[h+9]=l,this.int16[h+10]=c,this.int16[h+11]=u,f},e}(Yr);nn.prototype.bytesPerElement=24,pr(\\\"StructArrayLayout6i1ul2ui2i24\\\",nn);var an=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;this.resize(o+1);var s=6*o;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=a,o},e}(Yr);an.prototype.bytesPerElement=12,pr(\\\"StructArrayLayout2i2i2i12\\\",an);var on=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=4*r;return this.uint8[n+0]=t,this.uint8[n+1]=e,r},e}(Yr);on.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout2ub4\\\",on);var sn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p){var d=this.length;this.resize(d+1);var g=20*d,v=10*d,m=40*d;return this.int16[g+0]=t,this.int16[g+1]=e,this.uint16[g+2]=r,this.uint16[g+3]=n,this.uint32[v+2]=i,this.uint32[v+3]=a,this.uint32[v+4]=o,this.uint16[g+10]=s,this.uint16[g+11]=l,this.uint16[g+12]=c,this.float32[v+7]=u,this.float32[v+8]=f,this.uint8[m+36]=h,this.uint8[m+37]=p,d},e}(Yr);sn.prototype.bytesPerElement=40,pr(\\\"StructArrayLayout2i2ui3ul3ui2f2ub40\\\",sn);var ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.float32[r+0]=t,e},e}(Yr);ln.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout1f4\\\",ln);var cn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.int16[i+0]=t,this.int16[i+1]=e,this.int16[i+2]=r,n},e}(Yr);cn.prototype.bytesPerElement=6,pr(\\\"StructArrayLayout3i6\\\",cn);var un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=2*n,a=4*n;return this.uint32[i+0]=t,this.uint16[a+2]=e,this.uint16[a+3]=r,n},e}(Yr);un.prototype.bytesPerElement=8,pr(\\\"StructArrayLayout1ul2ui8\\\",un);var fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.uint16[i+0]=t,this.uint16[i+1]=e,this.uint16[i+2]=r,n},e}(Yr);fn.prototype.bytesPerElement=6,pr(\\\"StructArrayLayout3ui6\\\",fn);var hn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.uint16[n+0]=t,this.uint16[n+1]=e,r},e}(Yr);hn.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout2ui4\\\",hn);var pn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.float32[n+0]=t,this.float32[n+1]=e,r},e}(Yr);pn.prototype.bytesPerElement=8,pr(\\\"StructArrayLayout2f8\\\",pn);var dn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var a=4*i;return this.float32[a+0]=t,this.float32[a+1]=e,this.float32[a+2]=r,this.float32[a+3]=n,i},e}(Yr);dn.prototype.bytesPerElement=16,pr(\\\"StructArrayLayout4f16\\\",dn);var gn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new l(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Wr);gn.prototype.size=24;var vn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new gn(this,t)},e}(nn);pr(\\\"CollisionBoxArray\\\",vn);var mn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,r),e}(Wr);mn.prototype.size=40;var yn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new mn(this,t)},e}(sn);pr(\\\"PlacedSymbolArray\\\",yn);var xn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(Wr);xn.prototype.size=4;var bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new xn(this,t)},e}(ln);pr(\\\"GlyphOffsetArray\\\",bn);var _n=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(Wr);_n.prototype.size=6;var wn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new _n(this,t)},e}(cn);pr(\\\"SymbolLineVertexArray\\\",wn);var kn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(Wr);kn.prototype.size=8;var Mn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new kn(this,t)},e}(un);pr(\\\"FeatureIndexArray\\\",Mn);var An=Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"}],4).members,Tn=function(t){void 0===t&&(t=[]),this.segments=t};Tn.prototype.prepareSegment=function(t,e,r){var n=this.segments[this.segments.length-1];return t>Tn.MAX_VERTEX_ARRAY_LENGTH&&_(\\\"Max vertices per segment is \\\"+Tn.MAX_VERTEX_ARRAY_LENGTH+\\\": bucket requested \\\"+t),(!n||n.vertexLength+t>Tn.MAX_VERTEX_ARRAY_LENGTH)&&(n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(n)),n},Tn.prototype.get=function(){return this.segments},Tn.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var n in r.vaos)r.vaos[n].destroy()}},Tn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,pr(\\\"SegmentVector\\\",Tn);var Sn=function(t,e){return 256*(t=h(Math.floor(t),0,255))+h(Math.floor(e),0,255)};function Cn(t){return[Sn(255*t.r,255*t.g),Sn(255*t.b,255*t.a)]}var En=function(t,e,r){this.value=t,this.name=e,this.type=r,this.statistics={max:-1/0}};En.prototype.defines=function(){return[\\\"#define HAS_UNIFORM_u_\\\"+this.name]},En.prototype.populatePaintArray=function(){},En.prototype.upload=function(){},En.prototype.destroy=function(){},En.prototype.setUniforms=function(t,e,r,n){var i=n.constantOr(this.value),a=t.gl;\\\"color\\\"===this.type?a.uniform4f(e.uniforms[\\\"u_\\\"+this.name],i.r,i.g,i.b,i.a):a.uniform1f(e.uniforms[\\\"u_\\\"+this.name],i)};var Ln=function(t,e,r){this.expression=t,this.name=e,this.type=r,this.statistics={max:-1/0};var n=\\\"color\\\"===r?pn:ln;this.paintVertexAttributes=[{name:\\\"a_\\\"+e,type:\\\"Float32\\\",components:\\\"color\\\"===r?2:1,offset:0}],this.paintVertexArray=new n};Ln.prototype.defines=function(){return[]},Ln.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Lr(0),e);if(\\\"color\\\"===this.type)for(var a=Cn(i),o=n;o<t;o++)r.emplaceBack(a[0],a[1]);else{for(var s=n;s<t;s++)r.emplaceBack(i);this.statistics.max=Math.max(this.statistics.max,i)}},Ln.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},Ln.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Ln.prototype.setUniforms=function(t,e){t.gl.uniform1f(e.uniforms[\\\"a_\\\"+this.name+\\\"_t\\\"],0)};var zn=function(t,e,r,n,i){this.expression=t,this.name=e,this.type=r,this.useIntegerZoom=n,this.zoom=i,this.statistics={max:-1/0};var a=\\\"color\\\"===r?dn:pn;this.paintVertexAttributes=[{name:\\\"a_\\\"+e,type:\\\"Float32\\\",components:\\\"color\\\"===r?4:2,offset:0}],this.paintVertexArray=new a};zn.prototype.defines=function(){return[]},zn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Lr(this.zoom),e),a=this.expression.evaluate(new Lr(this.zoom+1),e);if(\\\"color\\\"===this.type)for(var o=Cn(i),s=Cn(a),l=n;l<t;l++)r.emplaceBack(o[0],o[1],s[0],s[1]);else{for(var c=n;c<t;c++)r.emplaceBack(i,a);this.statistics.max=Math.max(this.statistics.max,i,a)}},zn.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},zn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},zn.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},zn.prototype.setUniforms=function(t,e,r){t.gl.uniform1f(e.uniforms[\\\"a_\\\"+this.name+\\\"_t\\\"],this.interpolationFactor(r.zoom))};var On=function(){this.binders={},this.cacheKey=\\\"\\\",this._buffers=[]};On.createDynamic=function(t,e,r){var n=new On,i=[];for(var a in t.paint._values)if(r(a)){var o=t.paint.get(a);if(o instanceof Br&&o.property.specification[\\\"property-function\\\"]){var s=Pn(a,t.type),l=o.property.specification.type,c=o.property.useIntegerZoom;\\\"constant\\\"===o.value.kind?(n.binders[a]=new En(o.value,s,l),i.push(\\\"/u_\\\"+s)):\\\"source\\\"===o.value.kind?(n.binders[a]=new Ln(o.value,s,l),i.push(\\\"/a_\\\"+s)):(n.binders[a]=new zn(o.value,s,l,c,e),i.push(\\\"/z_\\\"+s))}}return n.cacheKey=i.sort().join(\\\"\\\"),n},On.prototype.populatePaintArrays=function(t,e){for(var r in this.binders)this.binders[r].populatePaintArray(t,e)},On.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},On.prototype.setUniforms=function(t,e,r,n){for(var i in this.binders)this.binders[i].setUniforms(t,e,n,r.get(i))},On.prototype.getPaintVertexBuffers=function(){return this._buffers},On.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var r=[];for(var n in this.binders){var i=this.binders[n];(i instanceof Ln||i instanceof zn)&&i.paintVertexBuffer&&r.push(i.paintVertexBuffer)}this._buffers=r},On.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var In=function(t,e,r,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(var i=0,a=e;i<a.length;i+=1){var o=a[i];this.programConfigurations[o.id]=On.createDynamic(o,r,n),this.programConfigurations[o.id].layoutAttributes=t}};function Pn(t,e){return{\\\"text-opacity\\\":\\\"opacity\\\",\\\"icon-opacity\\\":\\\"opacity\\\",\\\"text-color\\\":\\\"fill_color\\\",\\\"icon-color\\\":\\\"fill_color\\\",\\\"text-halo-color\\\":\\\"halo_color\\\",\\\"icon-halo-color\\\":\\\"halo_color\\\",\\\"text-halo-blur\\\":\\\"halo_blur\\\",\\\"icon-halo-blur\\\":\\\"halo_blur\\\",\\\"text-halo-width\\\":\\\"halo_width\\\",\\\"icon-halo-width\\\":\\\"halo_width\\\",\\\"line-gap-width\\\":\\\"gapwidth\\\"}[t]||t.replace(e+\\\"-\\\",\\\"\\\").replace(/-/g,\\\"_\\\")}In.prototype.populatePaintArrays=function(t,e){for(var r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(t,e)},In.prototype.get=function(t){return this.programConfigurations[t]},In.prototype.upload=function(t){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t)},In.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},pr(\\\"ConstantBinder\\\",En),pr(\\\"SourceExpressionBinder\\\",Ln),pr(\\\"CompositeExpressionBinder\\\",zn),pr(\\\"ProgramConfiguration\\\",On,{omit:[\\\"_buffers\\\"]}),pr(\\\"ProgramConfigurationSet\\\",In);var Dn=8192,Rn=(16,{min:-1*Math.pow(2,15),max:Math.pow(2,15)-1});function Bn(t){for(var e=Dn/t.extent,r=t.loadGeometry(),n=0;n<r.length;n++)for(var i=r[n],a=0;a<i.length;a++){var o=i[a];o.x=Math.round(o.x*e),o.y=Math.round(o.y*e),(o.x<Rn.min||o.x>Rn.max||o.y<Rn.min||o.y>Rn.max)&&_(\\\"Geometry exceeds allowed extent, reduce your vector tile buffer size\\\")}return r}function Fn(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Nn=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new $r,this.indexArray=new fn,this.segments=new Tn,this.programConfigurations=new In(An,t.layers,t.zoom)};function jn(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(Zn(i,e))return!0;if(Wn(e,i,r))return!0}return!1}function Vn(t,e){if(1===t.length&&1===t[0].length)return Xn(e,t[0][0]);for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++)if(Xn(t,n[i]))return!0;for(var a=0;a<t.length;a++){for(var o=t[a],s=0;s<o.length;s++)if(Xn(e,o[s]))return!0;for(var l=0;l<e.length;l++)if(Hn(o,e[l]))return!0}return!1}function Un(t,e,r){for(var n=0;n<e.length;n++)for(var i=e[n],a=0;a<t.length;a++){var o=t[a];if(o.length>=3)for(var s=0;s<i.length;s++)if(Zn(o,i[s]))return!0;if(qn(o,i,r))return!0}return!1}function qn(t,e,r){if(t.length>1){if(Hn(t,e))return!0;for(var n=0;n<e.length;n++)if(Wn(e[n],t,r))return!0}for(var i=0;i<t.length;i++)if(Wn(t[i],e,r))return!0;return!1}function Hn(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var n=t[r],i=t[r+1],a=0;a<e.length-1;a++)if(Gn(n,i,e[a],e[a+1]))return!0;return!1}function Gn(t,e,r,n){return w(t,r,n)!==w(e,r,n)&&w(t,e,r)!==w(t,e,n)}function Wn(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(var i=1;i<e.length;i++)if(Yn(t,e[i-1],e[i])<n)return!0;return!1}function Yn(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function Xn(t,e){for(var r,n,i,a=!1,o=0;o<t.length;o++)for(var s=0,l=(r=t[o]).length-1;s<r.length;l=s++)n=r[s],i=r[l],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function Zn(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var a=t[n],o=t[i];a.y>e.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function $n(t,e,r){var n=e.paint.get(t).value;return\\\"constant\\\"===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].statistics.max}function Jn(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Kn(t,e,r,n,i){if(!e[0]&&!e[1])return t;var a=l.convert(e);\\\"viewport\\\"===r&&a._rotate(-n);for(var o=[],s=0;s<t.length;s++){for(var c=t[s],u=[],f=0;f<c.length;f++)u.push(c[f].sub(a._mult(i)));o.push(u)}return o}Nn.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},Nn.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Nn.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,An),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},Nn.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Nn.prototype.addFeature=function(t,e){for(var r=0,n=e;r<n.length;r+=1)for(var i=0,a=n[r];i<a.length;i+=1){var o=a[i],s=o.x,l=o.y;if(!(s<0||s>=Dn||l<0||l>=Dn)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),u=c.vertexLength;Fn(this.layoutVertexArray,s,l,-1,-1),Fn(this.layoutVertexArray,s,l,1,-1),Fn(this.layoutVertexArray,s,l,1,1),Fn(this.layoutVertexArray,s,l,-1,1),this.indexArray.emplaceBack(u,u+1,u+2),this.indexArray.emplaceBack(u,u+3,u+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(\\\"CircleBucket\\\",Nn,{omit:[\\\"layers\\\"]});var Qn={paint:new qr({\\\"circle-radius\\\":new jr(I.paint_circle[\\\"circle-radius\\\"]),\\\"circle-color\\\":new jr(I.paint_circle[\\\"circle-color\\\"]),\\\"circle-blur\\\":new jr(I.paint_circle[\\\"circle-blur\\\"]),\\\"circle-opacity\\\":new jr(I.paint_circle[\\\"circle-opacity\\\"]),\\\"circle-translate\\\":new Nr(I.paint_circle[\\\"circle-translate\\\"]),\\\"circle-translate-anchor\\\":new Nr(I.paint_circle[\\\"circle-translate-anchor\\\"]),\\\"circle-pitch-scale\\\":new Nr(I.paint_circle[\\\"circle-pitch-scale\\\"]),\\\"circle-pitch-alignment\\\":new Nr(I.paint_circle[\\\"circle-pitch-alignment\\\"]),\\\"circle-stroke-width\\\":new jr(I.paint_circle[\\\"circle-stroke-width\\\"]),\\\"circle-stroke-color\\\":new jr(I.paint_circle[\\\"circle-stroke-color\\\"]),\\\"circle-stroke-opacity\\\":new jr(I.paint_circle[\\\"circle-stroke-opacity\\\"])})},ti=i(function(t,e){var r;t.exports=((r=new Float32Array(3))[0]=0,r[1]=0,r[2]=0,function(){var t=new Float32Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=0}(),{vec3:{transformMat3:function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},vec4:{transformMat4:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},mat2:{create:function(){var t=new Float32Array(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},rotate:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+a*s,t[1]=i*l+o*s,t[2]=n*-s+a*l,t[3]=i*-s+o*l,t},scale:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1];return t[0]=n*s,t[1]=i*s,t[2]=a*l,t[3]=o*l,t}},mat3:{create:function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromRotation:function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},mat4:{create:function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},translate:function(t,e,r){var n,i,a,o,s,l,c,u,f,h,p,d,g=r[0],v=r[1],m=r[2];return e===t?(t[12]=e[0]*g+e[4]*v+e[8]*m+e[12],t[13]=e[1]*g+e[5]*v+e[9]*m+e[13],t[14]=e[2]*g+e[6]*v+e[10]*m+e[14],t[15]=e[3]*g+e[7]*v+e[11]*m+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*v+f*m+e[12],t[13]=i*g+l*v+h*m+e[13],t[14]=a*g+c*v+p*m+e[14],t[15]=o*g+u*v+d*m+e[15]),t},scale:function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},multiply:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*v,t[2]=x*a+b*c+_*p+w*m,t[3]=x*o+b*u+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*v,t[6]=x*a+b*c+_*p+w*m,t[7]=x*o+b*u+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*v,t[10]=x*a+b*c+_*p+w*m,t[11]=x*o+b*u+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*v,t[14]=x*a+b*c+_*p+w*m,t[15]=x*o+b*u+_*d+w*y,t},perspective:function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},rotateX:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t},rotateZ:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t},invert:function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],v=e[14],m=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,k=i*c-a*l,M=u*g-f*d,A=u*v-h*d,T=u*m-p*d,S=f*v-h*g,C=f*m-p*g,E=h*m-p*v,L=y*E-x*C+b*S+_*T-w*A+k*M;return L?(L=1/L,t[0]=(s*E-l*C+c*S)*L,t[1]=(i*C-n*E-a*S)*L,t[2]=(g*k-v*w+m*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*T-o*E-c*A)*L,t[5]=(r*E-i*T+a*A)*L,t[6]=(v*b-d*k-m*x)*L,t[7]=(u*k-h*b+p*x)*L,t[8]=(o*C-s*T+c*M)*L,t[9]=(n*T-r*C-a*M)*L,t[10]=(d*w-g*b+m*y)*L,t[11]=(f*b-u*w-p*y)*L,t[12]=(s*A-o*S-l*M)*L,t[13]=(r*S-n*A+i*M)*L,t[14]=(g*x-d*_-v*y)*L,t[15]=(u*_-f*x+h*y)*L,t):null},ortho:function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*c,t[15]=1,t}}})}),ei=(ti.vec3,ti.vec4),ri=(ti.mat2,ti.mat3,ti.mat4),ni=function(t){function e(e){t.call(this,e,Qn)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Nn(t)},e.prototype.queryRadius=function(t){var e=t;return $n(\\\"circle-radius\\\",this,e)+$n(\\\"circle-stroke-width\\\",this,e)+Jn(this.paint.get(\\\"circle-translate\\\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o){for(var s=Kn(t,this.paint.get(\\\"circle-translate\\\"),this.paint.get(\\\"circle-translate-anchor\\\"),i.angle,a),l=this.paint.get(\\\"circle-radius\\\").evaluate(e)+this.paint.get(\\\"circle-stroke-width\\\").evaluate(e),c=\\\"map\\\"===this.paint.get(\\\"circle-pitch-alignment\\\"),u=c?s:function(t,e,r){return s.map(function(t){return t.map(function(t){return ii(t,e,r)})})}(0,o,i),f=c?l*a:l,h=0,p=r;h<p.length;h+=1)for(var d=0,g=p[h];d<g.length;d+=1){var v=g[d],m=c?v:ii(v,o,i),y=f,x=ei.transformMat4([],[v.x,v.y,0,1],o);if(\\\"viewport\\\"===this.paint.get(\\\"circle-pitch-scale\\\")&&\\\"map\\\"===this.paint.get(\\\"circle-pitch-alignment\\\")?y*=x[3]/i.cameraToCenterDistance:\\\"map\\\"===this.paint.get(\\\"circle-pitch-scale\\\")&&\\\"viewport\\\"===this.paint.get(\\\"circle-pitch-alignment\\\")&&(y*=i.cameraToCenterDistance/x[3]),jn(u,m,y))return!0}return!1},e}(Hr);function ii(t,e,r){var n=ei.transformMat4([],[t.x,t.y,0,1],e);return new l((n[0]/n[3]+1)*r.width*.5,(n[1]/n[3]+1)*r.height*.5)}var ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Nn);function oi(t,e,r,n){var i=e.width,a=e.height;if(n){if(n.length!==i*a*r)throw new RangeError(\\\"mismatched image size\\\")}else n=new Uint8Array(i*a*r);return t.width=i,t.height=a,t.data=n,t}function si(t,e,r){var n=e.width,i=e.height;if(n!==t.width||i!==t.height){var a=oi({},{width:n,height:i},r);li(t,a,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=a.data}}function li(t,e,r,n,i,a){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError(\\\"out of range source coordinates for image copy\\\");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError(\\\"out of range destination coordinates for image copy\\\");for(var o=t.data,s=e.data,l=0;l<i.height;l++)for(var c=((r.y+l)*t.width+r.x)*a,u=((n.y+l)*e.width+n.x)*a,f=0;f<i.width*a;f++)s[u+f]=o[c+f];return e}pr(\\\"HeatmapBucket\\\",ai,{omit:[\\\"layers\\\"]});var ci=function(t,e){oi(this,t,1,e)};ci.prototype.resize=function(t){si(this,t,1)},ci.prototype.clone=function(){return new ci({width:this.width,height:this.height},new Uint8Array(this.data))},ci.copy=function(t,e,r,n,i){li(t,e,r,n,i,1)};var ui=function(t,e){oi(this,t,4,e)};ui.prototype.resize=function(t){si(this,t,4)},ui.prototype.clone=function(){return new ui({width:this.width,height:this.height},new Uint8Array(this.data))},ui.copy=function(t,e,r,n,i){li(t,e,r,n,i,4)},pr(\\\"AlphaImage\\\",ci),pr(\\\"RGBAImage\\\",ui);var fi={paint:new qr({\\\"heatmap-radius\\\":new jr(I.paint_heatmap[\\\"heatmap-radius\\\"]),\\\"heatmap-weight\\\":new jr(I.paint_heatmap[\\\"heatmap-weight\\\"]),\\\"heatmap-intensity\\\":new Nr(I.paint_heatmap[\\\"heatmap-intensity\\\"]),\\\"heatmap-color\\\":new Ur(I.paint_heatmap[\\\"heatmap-color\\\"]),\\\"heatmap-opacity\\\":new Nr(I.paint_heatmap[\\\"heatmap-opacity\\\"])})};function hi(t,e){for(var r=new Uint8Array(1024),n={},i=0,a=0;i<256;i++,a+=4){n[e]=i/255;var o=t.evaluate(n);r[a+0]=Math.floor(255*o.r/o.a),r[a+1]=Math.floor(255*o.g/o.a),r[a+2]=Math.floor(255*o.b/o.a),r[a+3]=Math.floor(255*o.a)}return new ui({width:256,height:1},r)}var pi=function(t){function e(e){t.call(this,e,fi),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ai(t)},e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),\\\"heatmap-color\\\"===e&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values[\\\"heatmap-color\\\"].value.expression;this.colorRamp=hi(t,\\\"heatmapDensity\\\"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\\\"heatmap-opacity\\\")&&\\\"none\\\"!==this.visibility},e}(Hr),di={paint:new qr({\\\"hillshade-illumination-direction\\\":new Nr(I.paint_hillshade[\\\"hillshade-illumination-direction\\\"]),\\\"hillshade-illumination-anchor\\\":new Nr(I.paint_hillshade[\\\"hillshade-illumination-anchor\\\"]),\\\"hillshade-exaggeration\\\":new Nr(I.paint_hillshade[\\\"hillshade-exaggeration\\\"]),\\\"hillshade-shadow-color\\\":new Nr(I.paint_hillshade[\\\"hillshade-shadow-color\\\"]),\\\"hillshade-highlight-color\\\":new Nr(I.paint_hillshade[\\\"hillshade-highlight-color\\\"]),\\\"hillshade-accent-color\\\":new Nr(I.paint_hillshade[\\\"hillshade-accent-color\\\"])})},gi=function(t){function e(e){t.call(this,e,di)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\\\"hillshade-exaggeration\\\")&&\\\"none\\\"!==this.visibility},e}(Hr),vi=Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"}],4).members,mi=xi,yi=xi;function xi(t,e,r){r=r||2;var n,i,a,o,s,l,c,u=e&&e.length,f=u?e[0]*r:t.length,h=bi(t,0,f,r,!0),p=[];if(!h)return p;if(u&&(h=function(t,e,r,n){var i,a,o,s=[];for(i=0,a=e.length;i<a;i++)(o=bi(t,e[i]*n,i<a-1?e[i+1]*n:t.length,n,!1))===o.next&&(o.steiner=!0),s.push(Li(o));for(s.sort(Si),i=0;i<s.length;i++)Ci(s[i],r),r=_i(r,r.next);return r}(t,e,h,r)),t.length>80*r){n=a=t[0],i=o=t[1];for(var d=r;d<f;d+=r)(s=t[d])<n&&(n=s),(l=t[d+1])<i&&(i=l),s>a&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return wi(h,p,r,n,i,c),p}function bi(t,e,r,n,i){var a,o;if(i===Vi(t,e,r,n)>0)for(a=e;a<r;a+=n)o=Fi(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=Fi(a,t[a],t[a+1],o);return o&&Pi(o,o.next)&&(Ni(o),o=o.next),o}function _i(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!Pi(n,n.next)&&0!==Ii(n.prev,n,n.next))n=n.next;else{if(Ni(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function wi(t,e,r,n,i,a,o){if(t){!o&&a&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=Ei(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<c&&(s++,n=n.nextZ);e++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,a);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,a?Mi(t,n,i,a):ki(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),Ni(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?wi(t=Ai(t,e,r),e,r,n,i,a,2):2===o&&Ti(t,e,r,n,i,a):wi(_i(t),e,r,n,i,a,1);break}}}function ki(t){var e=t.prev,r=t,n=t.next;if(Ii(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(zi(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Ii(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Mi(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Ii(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,c=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=Ei(s,l,e,r,n),h=Ei(c,u,e,r,n),p=t.prevZ,d=t.nextZ;p&&p.z>=f&&d&&d.z<=h;){if(p!==t.prev&&p!==t.next&&zi(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Ii(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&zi(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ii(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&zi(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Ii(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&zi(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ii(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ai(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!Pi(i,a)&&Di(i,n,n.next,a)&&Ri(i,a)&&Ri(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),Ni(n),Ni(n.next),n=t=a),n=n.next}while(n!==t);return n}function Ti(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Oi(o,s)){var l=Bi(o,s);return o=_i(o,o.next),l=_i(l,l.next),wi(o,e,r,n,i,a),void wi(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Si(t,e){return t.x-e.x}function Ci(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,c=r,u=r.x,f=r.y,h=1/0;for(n=r.next;n!==c;)i>=n.x&&n.x>=u&&i!==n.x&&zi(a<f?i:o,a,u,f,a<f?o:i,a,n.x,n.y)&&((l=Math.abs(a-n.y)/(i-n.x))<h||l===h&&n.x>r.x)&&Ri(n,t)&&(r=n,h=l),n=n.next;return r}(t,e)){var r=Bi(e,t);_i(r,r.next)}}function Ei(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Li(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function zi(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Oi(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Di(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&Ri(t,e)&&Ri(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function Ii(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Pi(t,e){return t.x===e.x&&t.y===e.y}function Di(t,e,r,n){return!!(Pi(t,e)&&Pi(r,n)||Pi(t,n)&&Pi(r,e))||Ii(t,e,r)>0!=Ii(t,e,n)>0&&Ii(r,n,t)>0!=Ii(r,n,e)>0}function Ri(t,e){return Ii(t.prev,t,t.next)<0?Ii(t,e,t.next)>=0&&Ii(t,t.prev,e)>=0:Ii(t,e,t.prev)<0||Ii(t,t.next,e)<0}function Bi(t,e){var r=new ji(t.i,t.x,t.y),n=new ji(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Fi(t,e,r,n){var i=new ji(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ni(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ji(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Vi(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}xi.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(Vi(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var c=e[s]*r,u=s<l-1?e[s+1]*r:t.length;o-=Math.abs(Vi(t,c,u,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},xi.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r},mi.default=yi;var Ui=Hi,qi=Hi;function Hi(t,e,r,n,i){!function t(e,r,n,i,a){for(;i>n;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);t(e,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}var f=e[r],h=n,p=i;for(Gi(e,n,r),a(e[i],f)>0&&Gi(e,n,i);h<p;){for(Gi(e,h,p),h++,p--;a(e[h],f)<0;)h++;for(;a(e[p],f)>0;)p--}0===a(e[n],f)?Gi(e,n,p):Gi(e,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}(t,e,r||0,n||t.length-1,i||Wi)}function Gi(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Wi(t,e){return t<e?-1:t>e?1:0}function Yi(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o<r;o++){var s=k(t[o]);0!==s&&(t[o].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(n&&a.push(n),n=[t[o]]):n.push(t[o]))}if(n&&a.push(n),e>1)for(var l=0;l<a.length;l++)a[l].length<=e||(Ui(a[l],e,1,a[l].length-1,Xi),a[l]=a[l].slice(0,e));return a}function Xi(t,e){return e.area-t.area}Ui.default=qi;var Zi=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new $r,this.indexArray=new fn,this.indexArray2=new hn,this.programConfigurations=new In(vi,t.layers,t.zoom),this.segments=new Tn,this.segments2=new Tn};Zi.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},Zi.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Zi.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,vi),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(t)},Zi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Zi.prototype.addFeature=function(t,e){for(var r=0,n=Yi(e,500);r<n.length;r+=1){for(var i=n[r],a=0,o=0,s=i;o<s.length;o+=1)a+=s[o].length;for(var l=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray),c=l.vertexLength,u=[],f=[],h=0,p=i;h<p.length;h+=1){var d=p[h];if(0!==d.length){d!==i[0]&&f.push(u.length/2);var g=this.segments2.prepareSegment(d.length,this.layoutVertexArray,this.indexArray2),v=g.vertexLength;this.layoutVertexArray.emplaceBack(d[0].x,d[0].y),this.indexArray2.emplaceBack(v+d.length-1,v),u.push(d[0].x),u.push(d[0].y);for(var m=1;m<d.length;m++)this.layoutVertexArray.emplaceBack(d[m].x,d[m].y),this.indexArray2.emplaceBack(v+m-1,v+m),u.push(d[m].x),u.push(d[m].y);g.vertexLength+=d.length,g.primitiveLength+=d.length}}for(var y=mi(u,f),x=0;x<y.length;x+=3)this.indexArray.emplaceBack(c+y[x],c+y[x+1],c+y[x+2]);l.vertexLength+=a,l.primitiveLength+=y.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(\\\"FillBucket\\\",Zi,{omit:[\\\"layers\\\"]});var $i={paint:new qr({\\\"fill-antialias\\\":new Nr(I.paint_fill[\\\"fill-antialias\\\"]),\\\"fill-opacity\\\":new jr(I.paint_fill[\\\"fill-opacity\\\"]),\\\"fill-color\\\":new jr(I.paint_fill[\\\"fill-color\\\"]),\\\"fill-outline-color\\\":new jr(I.paint_fill[\\\"fill-outline-color\\\"]),\\\"fill-translate\\\":new Nr(I.paint_fill[\\\"fill-translate\\\"]),\\\"fill-translate-anchor\\\":new Nr(I.paint_fill[\\\"fill-translate-anchor\\\"]),\\\"fill-pattern\\\":new Vr(I.paint_fill[\\\"fill-pattern\\\"])})},Ji=function(t){function e(e){t.call(this,e,$i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(t){this.paint=this._transitioningPaint.possiblyEvaluate(t);var e=this.paint._values[\\\"fill-outline-color\\\"];\\\"constant\\\"===e.value.kind&&void 0===e.value.value&&(this.paint._values[\\\"fill-outline-color\\\"]=this.paint._values[\\\"fill-color\\\"])},e.prototype.createBucket=function(t){return new Zi(t)},e.prototype.queryRadius=function(){return Jn(this.paint.get(\\\"fill-translate\\\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){return Vn(Kn(t,this.paint.get(\\\"fill-translate\\\"),this.paint.get(\\\"fill-translate-anchor\\\"),i.angle,a),r)},e}(Hr),Ki=Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_normal_ed\\\",components:4,type:\\\"Int16\\\"}],4).members,Qi=Math.pow(2,13);function ta(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Qi)+o,i*Qi*2,a*Qi*2,Math.round(s))}var ea=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Kr,this.indexArray=new fn,this.programConfigurations=new In(Ki,t.layers,t.zoom),this.segments=new Tn};function ra(t,e){return t.x===e.x&&(t.x<0||t.x>Dn)||t.y===e.y&&(t.y<0||t.y>Dn)}function na(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>Dn})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>Dn})}ea.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},ea.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ea.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ki),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},ea.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ea.prototype.addFeature=function(t,e){for(var r=0,n=Yi(e,500);r<n.length;r+=1){for(var i=n[r],a=0,o=0,s=i;o<s.length;o+=1)a+=s[o].length;for(var l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=0,u=i;c<u.length;c+=1){var f=u[c];if(0!==f.length&&!na(f))for(var h=0,p=0;p<f.length;p++){var d=f[p];if(p>=1){var g=f[p-1];if(!ra(d,g)){l.vertexLength+4>Tn.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var v=d.sub(g)._perp()._unit(),m=g.dist(d);h+m>32768&&(h=0),ta(this.layoutVertexArray,d.x,d.y,v.x,v.y,0,0,h),ta(this.layoutVertexArray,d.x,d.y,v.x,v.y,0,1,h),h+=m,ta(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,0,h),ta(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,1,h);var y=l.vertexLength;this.indexArray.emplaceBack(y,y+1,y+2),this.indexArray.emplaceBack(y+1,y+2,y+3),l.vertexLength+=4,l.primitiveLength+=2}}}}l.vertexLength+a>Tn.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray));for(var x=[],b=[],_=l.vertexLength,w=0,k=i;w<k.length;w+=1){var M=k[w];if(0!==M.length){M!==i[0]&&b.push(x.length/2);for(var A=0;A<M.length;A++){var T=M[A];ta(this.layoutVertexArray,T.x,T.y,0,0,1,1,0),x.push(T.x),x.push(T.y)}}}for(var S=mi(x,b),C=0;C<S.length;C+=3)this.indexArray.emplaceBack(_+S[C],_+S[C+1],_+S[C+2]);l.primitiveLength+=S.length/3,l.vertexLength+=a}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(\\\"FillExtrusionBucket\\\",ea,{omit:[\\\"layers\\\"]});var ia={paint:new qr({\\\"fill-extrusion-opacity\\\":new Nr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-opacity\\\"]),\\\"fill-extrusion-color\\\":new jr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-color\\\"]),\\\"fill-extrusion-translate\\\":new Nr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-translate\\\"]),\\\"fill-extrusion-translate-anchor\\\":new Nr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-translate-anchor\\\"]),\\\"fill-extrusion-pattern\\\":new Vr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-pattern\\\"]),\\\"fill-extrusion-height\\\":new jr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-height\\\"]),\\\"fill-extrusion-base\\\":new jr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-base\\\"])})},aa=function(t){function e(e){t.call(this,e,ia)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ea(t)},e.prototype.queryRadius=function(){return Jn(this.paint.get(\\\"fill-extrusion-translate\\\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){return Vn(Kn(t,this.paint.get(\\\"fill-extrusion-translate\\\"),this.paint.get(\\\"fill-extrusion-translate-anchor\\\"),i.angle,a),r)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\\\"fill-extrusion-opacity\\\")&&\\\"none\\\"!==this.visibility},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e}(Hr),oa=Xr([{name:\\\"a_pos_normal\\\",components:4,type:\\\"Int16\\\"},{name:\\\"a_data\\\",components:4,type:\\\"Uint8\\\"}],4).members,sa=la;function la(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(ca,this,e)}function ca(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function ua(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],n+=((r=t[o]).x-e.x)*(e.y+r.y);return n}la.types=[\\\"Unknown\\\",\\\"Point\\\",\\\"LineString\\\",\\\"Polygon\\\"],la.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,a=0,o=0,s=[];t.pos<r;){if(i<=0){var c=t.readVarint();n=7&c,i=c>>3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error(\\\"unknown command \\\"+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},la.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;t.pos<e;){if(n<=0){var u=t.readVarint();r=7&u,n=u>>3}if(n--,1===r||2===r)(i+=t.readSVarint())<o&&(o=i),i>s&&(s=i),(a+=t.readSVarint())<l&&(l=a),a>c&&(c=a);else if(7!==r)throw new Error(\\\"unknown command \\\"+r)}return[o,l,s,c]},la.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=la.types[this.type];function u(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+s)/a;t[e]=[360*(r.x+o)/a-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var f=[];for(n=0;n<l.length;n++)f[n]=l[n][0];u(l=f);break;case 2:for(n=0;n<l.length;n++)u(l[n]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],a=0;a<e;a++){var o=ua(t[a]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(r&&i.push(r),r=[t[a]]):r.push(t[a]))}return r&&i.push(r),i}(l),n=0;n<l.length;n++)for(i=0;i<l[n].length;i++)u(l[n][i])}1===l.length?l=l[0]:c=\\\"Multi\\\"+c;var h={type:\\\"Feature\\\",geometry:{type:c,coordinates:l},properties:this.properties};return\\\"id\\\"in this&&(h.id=this.id),h};var fa=ha;function ha(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(pa,this,e),this.length=this._features.length}function pa(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function da(t,e,r){if(3===t){var n=new fa(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}ha.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error(\\\"feature index out of bounds\\\");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new sa(this._pbf,e,this.extent,this._keys,this._values)};var ga={VectorTile:function(t,e){this.layers=t.readFields(da,{},e)},VectorTileFeature:sa,VectorTileLayer:fa},va=ga.VectorTileFeature.types,ma=63,ya=Math.cos(Math.PI/180*37.5),xa=.5,ba=Math.pow(2,14)/xa;function _a(t,e,r,n,i,a,o){t.emplaceBack(e.x,e.y,n?1:0,i?1:-1,Math.round(ma*r.x)+128,Math.round(ma*r.y)+128,1+(0===a?0:a<0?-1:1)|(o*xa&63)<<2,o*xa>>6)}var wa=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Qr,this.indexArray=new fn,this.programConfigurations=new In(oa,t.layers,t.zoom),this.segments=new Tn};function ka(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(ba-1)}wa.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},wa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},wa.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,oa),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},wa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},wa.prototype.addFeature=function(t,e){for(var r=this.layers[0].layout,n=r.get(\\\"line-join\\\").evaluate(t),i=r.get(\\\"line-cap\\\"),a=r.get(\\\"line-miter-limit\\\"),o=r.get(\\\"line-round-limit\\\"),s=0,l=e;s<l.length;s+=1){var c=l[s];this.addLine(c,t,n,i,a,o)}},wa.prototype.addLine=function(t,e,r,n,i,a){var o=null;e.properties&&e.properties.hasOwnProperty(\\\"mapbox_clip_start\\\")&&e.properties.hasOwnProperty(\\\"mapbox_clip_end\\\")&&(o={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var s=\\\"Polygon\\\"===va[e.type],l=t.length;l>=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c<l-1&&t[c].equals(t[c+1]);)c++;if(!(l<(s?3:2))){o&&(o.tileTotal=function(t,e,r){for(var n,i,a=0,o=c;o<r-1;o++)n=t[o],i=t[o+1],a+=n.dist(i);return a}(t,0,l)),\\\"bevel\\\"===r&&(i=1.05);var u=Dn/(512*this.overscaling)*15,f=t[c],h=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray);this.distance=0;var p,d,g,v=n,m=s?\\\"butt\\\":n,y=!0,x=void 0,b=void 0,_=void 0,w=void 0;this.e1=this.e2=this.e3=-1,s&&(p=t[l-2],w=f.sub(p)._unit()._perp());for(var k=c;k<l;k++)if(!(b=s&&k===l-1?t[c+1]:t[k+1])||!t[k].equals(b)){w&&(_=w),p&&(x=p),p=t[k],w=b?b.sub(p)._unit()._perp():_;var M=(_=_||w).add(w);0===M.x&&0===M.y||M._unit();var A=M.x*w.x+M.y*w.y,T=0!==A?1/A:1/0,S=A<ya&&x&&b;if(S&&k>c){var C=p.dist(x);if(C>2*u){var E=p.sub(p.sub(x)._mult(u/C)._round());this.distance+=E.dist(x),this.addCurrentVertex(E,this.distance,_.mult(1),0,0,!1,h,o),x=E}}var L=x&&b,z=L?r:b?v:m;if(L&&\\\"round\\\"===z&&(T<a?z=\\\"miter\\\":T<=2&&(z=\\\"fakeround\\\")),\\\"miter\\\"===z&&T>i&&(z=\\\"bevel\\\"),\\\"bevel\\\"===z&&(T>2&&(z=\\\"flipbevel\\\"),T<i&&(z=\\\"miter\\\")),x&&(this.distance+=p.dist(x)),\\\"miter\\\"===z)M._mult(T),this.addCurrentVertex(p,this.distance,M,0,0,!1,h,o);else if(\\\"flipbevel\\\"===z){if(T>100)M=w.clone().mult(-1);else{var O=_.x*w.y-_.y*w.x>0?-1:1,I=T*_.add(w).mag()/_.sub(w).mag();M._perp()._mult(I*O)}this.addCurrentVertex(p,this.distance,M,0,0,!1,h,o),this.addCurrentVertex(p,this.distance,M.mult(-1),0,0,!1,h,o)}else if(\\\"bevel\\\"===z||\\\"fakeround\\\"===z){var P=_.x*w.y-_.y*w.x>0,D=-Math.sqrt(T*T-1);if(P?(g=0,d=D):(d=0,g=D),y||this.addCurrentVertex(p,this.distance,_,d,g,!1,h,o),\\\"fakeround\\\"===z){for(var R=Math.floor(8*(.5-(A-.5))),B=void 0,F=0;F<R;F++)B=w.mult((F+1)/(R+1))._add(_)._unit(),this.addPieSliceVertex(p,this.distance,B,P,h,o);this.addPieSliceVertex(p,this.distance,M,P,h,o);for(var N=R-1;N>=0;N--)B=_.mult((N+1)/(R+1))._add(w)._unit(),this.addPieSliceVertex(p,this.distance,B,P,h,o)}b&&this.addCurrentVertex(p,this.distance,w,-d,-g,!1,h,o)}else\\\"butt\\\"===z?(y||this.addCurrentVertex(p,this.distance,_,0,0,!1,h,o),b&&this.addCurrentVertex(p,this.distance,w,0,0,!1,h,o)):\\\"square\\\"===z?(y||(this.addCurrentVertex(p,this.distance,_,1,1,!1,h,o),this.e1=this.e2=-1),b&&this.addCurrentVertex(p,this.distance,w,-1,-1,!1,h,o)):\\\"round\\\"===z&&(y||(this.addCurrentVertex(p,this.distance,_,0,0,!1,h,o),this.addCurrentVertex(p,this.distance,_,1,1,!0,h,o),this.e1=this.e2=-1),b&&(this.addCurrentVertex(p,this.distance,w,-1,-1,!0,h,o),this.addCurrentVertex(p,this.distance,w,0,0,!1,h,o)));if(S&&k<l-1){var j=p.dist(b);if(j>2*u){var V=p.add(b.sub(p)._mult(u/j)._round());this.distance+=V.dist(p),this.addCurrentVertex(V,this.distance,w.mult(1),0,0,!1,h,o),p=V}}y=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e)}},wa.prototype.addCurrentVertex=function(t,e,r,n,i,a,o,s){var l,c=this.layoutVertexArray,u=this.indexArray;s&&(e=ka(e,s)),l=r.clone(),n&&l._sub(r.perp()._mult(n)),_a(c,t,l,a,!1,n,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),i&&l._sub(r.perp()._mult(i)),_a(c,t,l,a,!0,-i,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>ba/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a,o))},wa.prototype.addPieSliceVertex=function(t,e,r,n,i,a){r=r.mult(n?-1:1);var o=this.layoutVertexArray,s=this.indexArray;a&&(e=ka(e,a)),_a(o,t,r,!1,n,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},pr(\\\"LineBucket\\\",wa,{omit:[\\\"layers\\\"]});var Ma=new qr({\\\"line-cap\\\":new Nr(I.layout_line[\\\"line-cap\\\"]),\\\"line-join\\\":new jr(I.layout_line[\\\"line-join\\\"]),\\\"line-miter-limit\\\":new Nr(I.layout_line[\\\"line-miter-limit\\\"]),\\\"line-round-limit\\\":new Nr(I.layout_line[\\\"line-round-limit\\\"])}),Aa={paint:new qr({\\\"line-opacity\\\":new jr(I.paint_line[\\\"line-opacity\\\"]),\\\"line-color\\\":new jr(I.paint_line[\\\"line-color\\\"]),\\\"line-translate\\\":new Nr(I.paint_line[\\\"line-translate\\\"]),\\\"line-translate-anchor\\\":new Nr(I.paint_line[\\\"line-translate-anchor\\\"]),\\\"line-width\\\":new jr(I.paint_line[\\\"line-width\\\"]),\\\"line-gap-width\\\":new jr(I.paint_line[\\\"line-gap-width\\\"]),\\\"line-offset\\\":new jr(I.paint_line[\\\"line-offset\\\"]),\\\"line-blur\\\":new jr(I.paint_line[\\\"line-blur\\\"]),\\\"line-dasharray\\\":new Vr(I.paint_line[\\\"line-dasharray\\\"]),\\\"line-pattern\\\":new Vr(I.paint_line[\\\"line-pattern\\\"]),\\\"line-gradient\\\":new Ur(I.paint_line[\\\"line-gradient\\\"])}),layout:Ma},Ta=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Lr(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n){return r=p({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n)},e}(jr))(Aa.paint.properties[\\\"line-width\\\"].specification);Ta.useIntegerZoom=!0;var Sa=function(t){function e(e){t.call(this,e,Aa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),\\\"line-gradient\\\"===e&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\\\"line-gradient\\\"].value.expression;this.gradient=hi(t,\\\"lineProgress\\\"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values[\\\"line-floorwidth\\\"]=Ta.possiblyEvaluate(this._transitioningPaint._values[\\\"line-width\\\"].value,e)},e.prototype.createBucket=function(t){return new wa(t)},e.prototype.queryRadius=function(t){var e=t,r=Ca($n(\\\"line-width\\\",this,e),$n(\\\"line-gap-width\\\",this,e)),n=$n(\\\"line-offset\\\",this,e);return r/2+Math.abs(n)+Jn(this.paint.get(\\\"line-translate\\\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){var o=Kn(t,this.paint.get(\\\"line-translate\\\"),this.paint.get(\\\"line-translate-anchor\\\"),i.angle,a),s=a/2*Ca(this.paint.get(\\\"line-width\\\").evaluate(e),this.paint.get(\\\"line-gap-width\\\").evaluate(e)),c=this.paint.get(\\\"line-offset\\\").evaluate(e);return c&&(r=function(t,e){for(var r=[],n=new l(0,0),i=0;i<t.length;i++){for(var a=t[i],o=[],s=0;s<a.length;s++){var c=a[s-1],u=a[s],f=a[s+1],h=0===s?n:u.sub(c)._unit()._perp(),p=s===a.length-1?n:f.sub(u)._unit()._perp(),d=h._add(p)._unit(),g=d.x*p.x+d.y*p.y;d._mult(1/g),o.push(d._mult(e)._add(u))}r.push(o)}return r}(r,c*a)),Un(o,r,s)},e}(Hr);function Ca(t,e){return e>0?e+2*t:t}var Ea=Xr([{name:\\\"a_pos_offset\\\",components:4,type:\\\"Int16\\\"},{name:\\\"a_data\\\",components:4,type:\\\"Uint16\\\"}]),La=Xr([{name:\\\"a_projected_pos\\\",components:3,type:\\\"Float32\\\"}],4),za=(Xr([{name:\\\"a_fade_opacity\\\",components:1,type:\\\"Uint32\\\"}],4),Xr([{name:\\\"a_placed\\\",components:2,type:\\\"Uint8\\\"}],4)),Oa=(Xr([{type:\\\"Int16\\\",name:\\\"anchorPointX\\\"},{type:\\\"Int16\\\",name:\\\"anchorPointY\\\"},{type:\\\"Int16\\\",name:\\\"x1\\\"},{type:\\\"Int16\\\",name:\\\"y1\\\"},{type:\\\"Int16\\\",name:\\\"x2\\\"},{type:\\\"Int16\\\",name:\\\"y2\\\"},{type:\\\"Uint32\\\",name:\\\"featureIndex\\\"},{type:\\\"Uint16\\\",name:\\\"sourceLayerIndex\\\"},{type:\\\"Uint16\\\",name:\\\"bucketIndex\\\"},{type:\\\"Int16\\\",name:\\\"radius\\\"},{type:\\\"Int16\\\",name:\\\"signedDistanceFromAnchor\\\"}]),Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_anchor_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_extrude\\\",components:2,type:\\\"Int16\\\"}],4)),Ia=Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_anchor_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_extrude\\\",components:2,type:\\\"Int16\\\"}],4);function Pa(t,e,r){var n=e.layout.get(\\\"text-transform\\\").evaluate(r);return\\\"uppercase\\\"===n?t=t.toLocaleUpperCase():\\\"lowercase\\\"===n&&(t=t.toLocaleLowerCase()),Er.applyArabicShaping&&(t=Er.applyArabicShaping(t)),t}Xr([{type:\\\"Int16\\\",name:\\\"anchorX\\\"},{type:\\\"Int16\\\",name:\\\"anchorY\\\"},{type:\\\"Uint16\\\",name:\\\"glyphStartIndex\\\"},{type:\\\"Uint16\\\",name:\\\"numGlyphs\\\"},{type:\\\"Uint32\\\",name:\\\"vertexStartIndex\\\"},{type:\\\"Uint32\\\",name:\\\"lineStartIndex\\\"},{type:\\\"Uint32\\\",name:\\\"lineLength\\\"},{type:\\\"Uint16\\\",name:\\\"segment\\\"},{type:\\\"Uint16\\\",name:\\\"lowerSize\\\"},{type:\\\"Uint16\\\",name:\\\"upperSize\\\"},{type:\\\"Float32\\\",name:\\\"lineOffsetX\\\"},{type:\\\"Float32\\\",name:\\\"lineOffsetY\\\"},{type:\\\"Uint8\\\",name:\\\"writingMode\\\"},{type:\\\"Uint8\\\",name:\\\"hidden\\\"}]),Xr([{type:\\\"Float32\\\",name:\\\"offsetX\\\"}]),Xr([{type:\\\"Int16\\\",name:\\\"x\\\"},{type:\\\"Int16\\\",name:\\\"y\\\"},{type:\\\"Int16\\\",name:\\\"tileUnitDistanceFromAnchor\\\"}]);var Da={\\\"!\\\":\\\"\\\\ufe15\\\",\\\"#\\\":\\\"\\\\uff03\\\",$:\\\"\\\\uff04\\\",\\\"%\\\":\\\"\\\\uff05\\\",\\\"&\\\":\\\"\\\\uff06\\\",\\\"(\\\":\\\"\\\\ufe35\\\",\\\")\\\":\\\"\\\\ufe36\\\",\\\"*\\\":\\\"\\\\uff0a\\\",\\\"+\\\":\\\"\\\\uff0b\\\",\\\",\\\":\\\"\\\\ufe10\\\",\\\"-\\\":\\\"\\\\ufe32\\\",\\\".\\\":\\\"\\\\u30fb\\\",\\\"/\\\":\\\"\\\\uff0f\\\",\\\":\\\":\\\"\\\\ufe13\\\",\\\";\\\":\\\"\\\\ufe14\\\",\\\"<\\\":\\\"\\\\ufe3f\\\",\\\"=\\\":\\\"\\\\uff1d\\\",\\\">\\\":\\\"\\\\ufe40\\\",\\\"?\\\":\\\"\\\\ufe16\\\",\\\"@\\\":\\\"\\\\uff20\\\",\\\"[\\\":\\\"\\\\ufe47\\\",\\\"\\\\\\\\\\\":\\\"\\\\uff3c\\\",\\\"]\\\":\\\"\\\\ufe48\\\",\\\"^\\\":\\\"\\\\uff3e\\\",_:\\\"\\\\ufe33\\\",\\\"`\\\":\\\"\\\\uff40\\\",\\\"{\\\":\\\"\\\\ufe37\\\",\\\"|\\\":\\\"\\\\u2015\\\",\\\"}\\\":\\\"\\\\ufe38\\\",\\\"~\\\":\\\"\\\\uff5e\\\",\\\"\\\\xa2\\\":\\\"\\\\uffe0\\\",\\\"\\\\xa3\\\":\\\"\\\\uffe1\\\",\\\"\\\\xa5\\\":\\\"\\\\uffe5\\\",\\\"\\\\xa6\\\":\\\"\\\\uffe4\\\",\\\"\\\\xac\\\":\\\"\\\\uffe2\\\",\\\"\\\\xaf\\\":\\\"\\\\uffe3\\\",\\\"\\\\u2013\\\":\\\"\\\\ufe32\\\",\\\"\\\\u2014\\\":\\\"\\\\ufe31\\\",\\\"\\\\u2018\\\":\\\"\\\\ufe43\\\",\\\"\\\\u2019\\\":\\\"\\\\ufe44\\\",\\\"\\\\u201c\\\":\\\"\\\\ufe41\\\",\\\"\\\\u201d\\\":\\\"\\\\ufe42\\\",\\\"\\\\u2026\\\":\\\"\\\\ufe19\\\",\\\"\\\\u2027\\\":\\\"\\\\u30fb\\\",\\\"\\\\u20a9\\\":\\\"\\\\uffe6\\\",\\\"\\\\u3001\\\":\\\"\\\\ufe11\\\",\\\"\\\\u3002\\\":\\\"\\\\ufe12\\\",\\\"\\\\u3008\\\":\\\"\\\\ufe3f\\\",\\\"\\\\u3009\\\":\\\"\\\\ufe40\\\",\\\"\\\\u300a\\\":\\\"\\\\ufe3d\\\",\\\"\\\\u300b\\\":\\\"\\\\ufe3e\\\",\\\"\\\\u300c\\\":\\\"\\\\ufe41\\\",\\\"\\\\u300d\\\":\\\"\\\\ufe42\\\",\\\"\\\\u300e\\\":\\\"\\\\ufe43\\\",\\\"\\\\u300f\\\":\\\"\\\\ufe44\\\",\\\"\\\\u3010\\\":\\\"\\\\ufe3b\\\",\\\"\\\\u3011\\\":\\\"\\\\ufe3c\\\",\\\"\\\\u3014\\\":\\\"\\\\ufe39\\\",\\\"\\\\u3015\\\":\\\"\\\\ufe3a\\\",\\\"\\\\u3016\\\":\\\"\\\\ufe17\\\",\\\"\\\\u3017\\\":\\\"\\\\ufe18\\\",\\\"\\\\uff01\\\":\\\"\\\\ufe15\\\",\\\"\\\\uff08\\\":\\\"\\\\ufe35\\\",\\\"\\\\uff09\\\":\\\"\\\\ufe36\\\",\\\"\\\\uff0c\\\":\\\"\\\\ufe10\\\",\\\"\\\\uff0d\\\":\\\"\\\\ufe32\\\",\\\"\\\\uff0e\\\":\\\"\\\\u30fb\\\",\\\"\\\\uff1a\\\":\\\"\\\\ufe13\\\",\\\"\\\\uff1b\\\":\\\"\\\\ufe14\\\",\\\"\\\\uff1c\\\":\\\"\\\\ufe3f\\\",\\\"\\\\uff1e\\\":\\\"\\\\ufe40\\\",\\\"\\\\uff1f\\\":\\\"\\\\ufe16\\\",\\\"\\\\uff3b\\\":\\\"\\\\ufe47\\\",\\\"\\\\uff3d\\\":\\\"\\\\ufe48\\\",\\\"\\\\uff3f\\\":\\\"\\\\ufe33\\\",\\\"\\\\uff5b\\\":\\\"\\\\ufe37\\\",\\\"\\\\uff5c\\\":\\\"\\\\u2015\\\",\\\"\\\\uff5d\\\":\\\"\\\\ufe38\\\",\\\"\\\\uff5f\\\":\\\"\\\\ufe35\\\",\\\"\\\\uff60\\\":\\\"\\\\ufe36\\\",\\\"\\\\uff61\\\":\\\"\\\\ufe12\\\",\\\"\\\\uff62\\\":\\\"\\\\ufe41\\\",\\\"\\\\uff63\\\":\\\"\\\\ufe42\\\"},Ra=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(l);function Ba(t,e){var r=e.expression;if(\\\"constant\\\"===r.kind)return{functionType:\\\"constant\\\",layoutSize:r.evaluate(new Lr(t+1))};if(\\\"source\\\"===r.kind)return{functionType:\\\"source\\\"};for(var n=r.zoomStops,i=0;i<n.length&&n[i]<=t;)i++;for(var a=i=Math.max(0,i-1);a<n.length&&n[a]<t+1;)a++;a=Math.min(n.length-1,a);var o={min:n[i],max:n[a]};return\\\"composite\\\"===r.kind?{functionType:\\\"composite\\\",zoomRange:o,propertyValue:e.value}:{functionType:\\\"camera\\\",layoutSize:r.evaluate(new Lr(t+1)),zoomRange:o,sizeRange:{min:r.evaluate(new Lr(o.min)),max:r.evaluate(new Lr(o.max))},propertyValue:e.value}}pr(\\\"Anchor\\\",Ra);var Fa=ga.VectorTileFeature.types,Na=[{name:\\\"a_fade_opacity\\\",components:1,type:\\\"Uint8\\\",offset:0}];function ja(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),a,o,s?s[0]:0,s?s[1]:0)}function Va(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}var Ua=function(t){this.layoutVertexArray=new tn,this.indexArray=new fn,this.programConfigurations=t,this.segments=new Tn,this.dynamicLayoutVertexArray=new en,this.opacityVertexArray=new rn,this.placedSymbolArray=new yn};Ua.prototype.upload=function(t,e){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ea.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.programConfigurations.upload(t),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,La.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Na,!0),this.opacityVertexBuffer.itemSize=1},Ua.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},pr(\\\"SymbolBuffers\\\",Ua);var qa=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Tn,this.collisionVertexArray=new on};qa.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,za.members,!0)},qa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},pr(\\\"CollisionBuffers\\\",qa);var Ha=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Ba(this.zoom,e[\\\"text-size\\\"]),this.iconSizeData=Ba(this.zoom,e[\\\"icon-size\\\"]);var r=this.layers[0].layout;this.sortFeaturesByY=r.get(\\\"text-allow-overlap\\\")||r.get(\\\"icon-allow-overlap\\\")||r.get(\\\"text-ignore-placement\\\")||r.get(\\\"icon-ignore-placement\\\")};Ha.prototype.createArrays=function(){this.text=new Ua(new In(Ea.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new Ua(new In(Ea.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new qa(an,Oa.members,hn),this.collisionCircle=new qa(an,Ia.members,fn),this.glyphOffsetArray=new bn,this.lineVertexArray=new wn},Ha.prototype.populate=function(t,e){var r=this.layers[0],n=r.layout,i=n.get(\\\"text-font\\\"),a=n.get(\\\"text-field\\\"),o=n.get(\\\"icon-image\\\"),s=(\\\"constant\\\"!==a.value.kind||a.value.value.length>0)&&(\\\"constant\\\"!==i.value.kind||i.value.value.length>0),l=\\\"constant\\\"!==o.value.kind||o.value.value&&o.value.value.length>0;if(this.features=[],s||l){for(var c=e.iconDependencies,u=e.glyphDependencies,f=new Lr(this.zoom),h=0,p=t;h<p.length;h+=1){var d=p[h],g=d.feature,v=d.index,m=d.sourceLayerIndex;if(r._featureFilter(f,g)){var y=void 0;s&&(y=Pa(y=r.getValueAndResolveTokens(\\\"text-field\\\",g),r,g));var x=void 0;if(l&&(x=r.getValueAndResolveTokens(\\\"icon-image\\\",g)),y||x){var b={text:y,icon:x,index:v,sourceLayerIndex:m,geometry:Bn(g),properties:g.properties,type:Fa[g.type]};if(void 0!==g.id&&(b.id=g.id),this.features.push(b),x&&(c[x]=!0),y)for(var _=i.evaluate(g).join(\\\",\\\"),w=u[_]=u[_]||{},k=\\\"map\\\"===n.get(\\\"text-rotation-alignment\\\")&&\\\"line\\\"===n.get(\\\"symbol-placement\\\"),M=xr(y),A=0;A<y.length;A++)if(w[y.charCodeAt(A)]=!0,k&&M){var T=Da[y.charAt(A)];T&&(w[T.charCodeAt(0)]=!0)}}}}\\\"line\\\"===n.get(\\\"symbol-placement\\\")&&(this.features=function(t){var e={},r={},n=[],i=0;function a(e){n.push(t[e]),i++}function o(t,e,i){var a=r[t];return delete r[t],r[e]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function s(t,r,i){var a=e[r];return delete e[r],e[t]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+\\\":\\\"+n.x+\\\":\\\"+n.y}for(var c=0;c<t.length;c++){var u=t[c],f=u.geometry,h=u.text;if(h){var p=l(h,f),d=l(h,f,!0);if(p in r&&d in e&&r[p]!==e[d]){var g=s(p,d,f),v=o(p,d,n[g].geometry);delete e[p],delete r[d],r[l(h,n[v].geometry,!0)]=v,n[g].geometry=null}else p in r?o(p,d,f):d in e?s(p,d,f):(a(c),e[p]=i-1,r[d]=i-1)}else a(c)}return n.filter(function(t){return t.geometry})}(this.features))}},Ha.prototype.isEmpty=function(){return 0===this.symbolInstances.length},Ha.prototype.upload=function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t)},Ha.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},Ha.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),a={},o=t.segment+1;o<e.length;o++)a[o]={x:e[o].x,y:e[o].y,tileUnitDistanceFromAnchor:n},o<e.length-1&&(n+=e[o+1].dist(e[o]));for(var s=t.segment||0;s>=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var l=0;l<e.length;l++){var c=a[l];this.lineVertexArray.emplaceBack(c.x,c.y,c.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},Ha.prototype.addSymbols=function(t,e,r,n,i,a,o,s,l,c){for(var u=t.indexArray,f=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,p=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),d=this.glyphOffsetArray.length,g=p.vertexLength,v=0,m=e;v<m.length;v+=1){var y=m[v],x=y.tl,b=y.tr,_=y.bl,w=y.br,k=y.tex,M=p.vertexLength,A=y.glyphOffset[1];ja(f,s.x,s.y,x.x,A+x.y,k.x,k.y,r),ja(f,s.x,s.y,b.x,A+b.y,k.x+k.w,k.y,r),ja(f,s.x,s.y,_.x,A+_.y,k.x,k.y+k.h,r),ja(f,s.x,s.y,w.x,A+w.y,k.x+k.w,k.y+k.h,r),Va(h,s,0),u.emplaceBack(M,M+1,M+2),u.emplaceBack(M+1,M+2,M+3),p.vertexLength+=4,p.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(y.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,g,l,c,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],o,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,a)},Ha.prototype._addCollisionDebugVertex=function(t,e,r,n,i){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,n.x,n.y,Math.round(i.x),Math.round(i.y))},Ha.prototype.addCollisionDebugVertices=function(t,e,r,n,i,a,o,s){var c=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),u=c.vertexLength,f=i.layoutVertexArray,h=i.collisionVertexArray;if(this._addCollisionDebugVertex(f,h,a,o.anchor,new l(t,e)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(r,e)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(r,n)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(t,n)),c.vertexLength+=4,s){var p=i.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),c.primitiveLength+=2}else{var d=i.indexArray;d.emplaceBack(u,u+1),d.emplaceBack(u+1,u+2),d.emplaceBack(u+2,u+3),d.emplaceBack(u+3,u),c.primitiveLength+=4}},Ha.prototype.generateCollisionDebugBuffers=function(){for(var t=0,e=this.symbolInstances;t<e.length;t+=1){var r=e[t];r.textCollisionFeature={boxStartIndex:r.textBoxStartIndex,boxEndIndex:r.textBoxEndIndex},r.iconCollisionFeature={boxStartIndex:r.iconBoxStartIndex,boxEndIndex:r.iconBoxEndIndex};for(var n=0;n<2;n++){var i=r[0===n?\\\"textCollisionFeature\\\":\\\"iconCollisionFeature\\\"];if(i)for(var a=i.boxStartIndex;a<i.boxEndIndex;a++){var o=this.collisionBoxArray.get(a),s=o.x1,l=o.y1,c=o.x2,u=o.y2,f=o.radius>0;this.addCollisionDebugVertices(s,l,c,u,f?this.collisionCircle:this.collisionBox,o.anchorPoint,r,f)}}}},Ha.prototype.deserializeCollisionBoxes=function(t,e,r,n,i){for(var a={},o=e;o<r;o++){var s=t.get(o);if(0===s.radius){a.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},a.textFeatureIndex=s.featureIndex;break}a.textCircles||(a.textCircles=[],a.textFeatureIndex=s.featureIndex),a.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var l=n;l<i;l++){var c=t.get(l);if(0===c.radius){a.iconBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},a.iconFeatureIndex=c.featureIndex;break}}return a},Ha.prototype.hasTextData=function(){return this.text.segments.get().length>0},Ha.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Ha.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Ha.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Ha.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var r=[],n=0;n<this.symbolInstances.length;n++)r.push(n);var i=Math.sin(t),a=Math.cos(t);r.sort(function(t,r){var n=e.symbolInstances[t],o=e.symbolInstances[r];return(i*n.anchor.x+a*n.anchor.y|0)-(i*o.anchor.x+a*o.anchor.y|0)||o.featureIndex-n.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var o=0,s=r;o<s.length;o+=1){var l=s[o],c=e.symbolInstances[l];e.featureSortOrder.push(c.featureIndex);for(var u=0,f=c.placedTextSymbolIndices;u<f.length;u+=1)for(var h=f[u],p=e.text.placedSymbolArray.get(h),d=p.vertexStartIndex+4*p.numGlyphs,g=p.vertexStartIndex;g<d;g+=4)e.text.indexArray.emplaceBack(g,g+1,g+2),e.text.indexArray.emplaceBack(g+1,g+2,g+3);var v=e.icon.placedSymbolArray.get(l);if(v.numGlyphs){var m=v.vertexStartIndex;e.icon.indexArray.emplaceBack(m,m+1,m+2),e.icon.indexArray.emplaceBack(m+1,m+2,m+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},pr(\\\"SymbolBucket\\\",Ha,{omit:[\\\"layers\\\",\\\"collisionBoxArray\\\",\\\"features\\\",\\\"compareText\\\"],shallow:[\\\"symbolInstances\\\"]}),Ha.MAX_GLYPHS=65535,Ha.addDynamicAttributes=Va;var Ga=new qr({\\\"symbol-placement\\\":new Nr(I.layout_symbol[\\\"symbol-placement\\\"]),\\\"symbol-spacing\\\":new Nr(I.layout_symbol[\\\"symbol-spacing\\\"]),\\\"symbol-avoid-edges\\\":new Nr(I.layout_symbol[\\\"symbol-avoid-edges\\\"]),\\\"icon-allow-overlap\\\":new Nr(I.layout_symbol[\\\"icon-allow-overlap\\\"]),\\\"icon-ignore-placement\\\":new Nr(I.layout_symbol[\\\"icon-ignore-placement\\\"]),\\\"icon-optional\\\":new Nr(I.layout_symbol[\\\"icon-optional\\\"]),\\\"icon-rotation-alignment\\\":new Nr(I.layout_symbol[\\\"icon-rotation-alignment\\\"]),\\\"icon-size\\\":new jr(I.layout_symbol[\\\"icon-size\\\"]),\\\"icon-text-fit\\\":new Nr(I.layout_symbol[\\\"icon-text-fit\\\"]),\\\"icon-text-fit-padding\\\":new Nr(I.layout_symbol[\\\"icon-text-fit-padding\\\"]),\\\"icon-image\\\":new jr(I.layout_symbol[\\\"icon-image\\\"]),\\\"icon-rotate\\\":new jr(I.layout_symbol[\\\"icon-rotate\\\"]),\\\"icon-padding\\\":new Nr(I.layout_symbol[\\\"icon-padding\\\"]),\\\"icon-keep-upright\\\":new Nr(I.layout_symbol[\\\"icon-keep-upright\\\"]),\\\"icon-offset\\\":new jr(I.layout_symbol[\\\"icon-offset\\\"]),\\\"icon-anchor\\\":new jr(I.layout_symbol[\\\"icon-anchor\\\"]),\\\"icon-pitch-alignment\\\":new Nr(I.layout_symbol[\\\"icon-pitch-alignment\\\"]),\\\"text-pitch-alignment\\\":new Nr(I.layout_symbol[\\\"text-pitch-alignment\\\"]),\\\"text-rotation-alignment\\\":new Nr(I.layout_symbol[\\\"text-rotation-alignment\\\"]),\\\"text-field\\\":new jr(I.layout_symbol[\\\"text-field\\\"]),\\\"text-font\\\":new jr(I.layout_symbol[\\\"text-font\\\"]),\\\"text-size\\\":new jr(I.layout_symbol[\\\"text-size\\\"]),\\\"text-max-width\\\":new jr(I.layout_symbol[\\\"text-max-width\\\"]),\\\"text-line-height\\\":new Nr(I.layout_symbol[\\\"text-line-height\\\"]),\\\"text-letter-spacing\\\":new jr(I.layout_symbol[\\\"text-letter-spacing\\\"]),\\\"text-justify\\\":new jr(I.layout_symbol[\\\"text-justify\\\"]),\\\"text-anchor\\\":new jr(I.layout_symbol[\\\"text-anchor\\\"]),\\\"text-max-angle\\\":new Nr(I.layout_symbol[\\\"text-max-angle\\\"]),\\\"text-rotate\\\":new jr(I.layout_symbol[\\\"text-rotate\\\"]),\\\"text-padding\\\":new Nr(I.layout_symbol[\\\"text-padding\\\"]),\\\"text-keep-upright\\\":new Nr(I.layout_symbol[\\\"text-keep-upright\\\"]),\\\"text-transform\\\":new jr(I.layout_symbol[\\\"text-transform\\\"]),\\\"text-offset\\\":new jr(I.layout_symbol[\\\"text-offset\\\"]),\\\"text-allow-overlap\\\":new Nr(I.layout_symbol[\\\"text-allow-overlap\\\"]),\\\"text-ignore-placement\\\":new Nr(I.layout_symbol[\\\"text-ignore-placement\\\"]),\\\"text-optional\\\":new Nr(I.layout_symbol[\\\"text-optional\\\"])}),Wa={paint:new qr({\\\"icon-opacity\\\":new jr(I.paint_symbol[\\\"icon-opacity\\\"]),\\\"icon-color\\\":new jr(I.paint_symbol[\\\"icon-color\\\"]),\\\"icon-halo-color\\\":new jr(I.paint_symbol[\\\"icon-halo-color\\\"]),\\\"icon-halo-width\\\":new jr(I.paint_symbol[\\\"icon-halo-width\\\"]),\\\"icon-halo-blur\\\":new jr(I.paint_symbol[\\\"icon-halo-blur\\\"]),\\\"icon-translate\\\":new Nr(I.paint_symbol[\\\"icon-translate\\\"]),\\\"icon-translate-anchor\\\":new Nr(I.paint_symbol[\\\"icon-translate-anchor\\\"]),\\\"text-opacity\\\":new jr(I.paint_symbol[\\\"text-opacity\\\"]),\\\"text-color\\\":new jr(I.paint_symbol[\\\"text-color\\\"]),\\\"text-halo-color\\\":new jr(I.paint_symbol[\\\"text-halo-color\\\"]),\\\"text-halo-width\\\":new jr(I.paint_symbol[\\\"text-halo-width\\\"]),\\\"text-halo-blur\\\":new jr(I.paint_symbol[\\\"text-halo-blur\\\"]),\\\"text-translate\\\":new Nr(I.paint_symbol[\\\"text-translate\\\"]),\\\"text-translate-anchor\\\":new Nr(I.paint_symbol[\\\"text-translate-anchor\\\"])}),layout:Ga},Ya=function(t){function e(e){t.call(this,e,Wa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),\\\"auto\\\"===this.layout.get(\\\"icon-rotation-alignment\\\")&&(\\\"line\\\"===this.layout.get(\\\"symbol-placement\\\")?this.layout._values[\\\"icon-rotation-alignment\\\"]=\\\"map\\\":this.layout._values[\\\"icon-rotation-alignment\\\"]=\\\"viewport\\\"),\\\"auto\\\"===this.layout.get(\\\"text-rotation-alignment\\\")&&(\\\"line\\\"===this.layout.get(\\\"symbol-placement\\\")?this.layout._values[\\\"text-rotation-alignment\\\"]=\\\"map\\\":this.layout._values[\\\"text-rotation-alignment\\\"]=\\\"viewport\\\"),\\\"auto\\\"===this.layout.get(\\\"text-pitch-alignment\\\")&&(this.layout._values[\\\"text-pitch-alignment\\\"]=this.layout.get(\\\"text-rotation-alignment\\\")),\\\"auto\\\"===this.layout.get(\\\"icon-pitch-alignment\\\")&&(this.layout._values[\\\"icon-pitch-alignment\\\"]=this.layout.get(\\\"icon-rotation-alignment\\\"))},e.prototype.getValueAndResolveTokens=function(t,e){var r,n=this.layout.get(t).evaluate(e),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||_e(i.value)?n:(r=e.properties,n.replace(/{([^{}]+)}/g,function(t,e){return e in r?String(r[e]):\\\"\\\"}))},e.prototype.createBucket=function(t){return new Ha(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Hr),Xa={paint:new qr({\\\"background-color\\\":new Nr(I.paint_background[\\\"background-color\\\"]),\\\"background-pattern\\\":new Vr(I.paint_background[\\\"background-pattern\\\"]),\\\"background-opacity\\\":new Nr(I.paint_background[\\\"background-opacity\\\"])})},Za=function(t){function e(e){t.call(this,e,Xa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Hr),$a={paint:new qr({\\\"raster-opacity\\\":new Nr(I.paint_raster[\\\"raster-opacity\\\"]),\\\"raster-hue-rotate\\\":new Nr(I.paint_raster[\\\"raster-hue-rotate\\\"]),\\\"raster-brightness-min\\\":new Nr(I.paint_raster[\\\"raster-brightness-min\\\"]),\\\"raster-brightness-max\\\":new Nr(I.paint_raster[\\\"raster-brightness-max\\\"]),\\\"raster-saturation\\\":new Nr(I.paint_raster[\\\"raster-saturation\\\"]),\\\"raster-contrast\\\":new Nr(I.paint_raster[\\\"raster-contrast\\\"]),\\\"raster-fade-duration\\\":new Nr(I.paint_raster[\\\"raster-fade-duration\\\"])})},Ja={circle:ni,heatmap:pi,hillshade:gi,fill:Ji,\\\"fill-extrusion\\\":aa,line:Sa,symbol:Ya,background:Za,raster:function(t){function e(e){t.call(this,e,$a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Hr)},Ka=i(function(t,e){t.exports=function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,n,i,a,o=[],s=0;s<t.length;s++)if(r=t[s].w||t[s].width,n=t[s].h||t[s].height,i=t[s].id,r&&n){if(!(a=this.packOne(r,n,i)))continue;e.inPlace&&(t[s].x=a.x,t[s].y=a.y,t[s].id=a.id),o.push(a)}return this.shrink(),o},t.prototype.packOne=function(t,r,n){var i,a,o,s,l,c,u,f,h={freebin:-1,shelf:-1,waste:1/0},p=0;if(\\\"string\\\"==typeof n||\\\"number\\\"==typeof n){if(i=this.getBin(n))return this.ref(i),i;\\\"number\\\"==typeof n&&(this.maxId=Math.max(n,this.maxId))}else n=++this.maxId;for(s=0;s<this.freebins.length;s++){if(r===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,r,n);r>i.maxh||t>i.maxw||r<=i.maxh&&t<=i.maxw&&(o=i.maxw*i.maxh-t*r)<h.waste&&(h.waste=o,h.freebin=s)}for(s=0;s<this.shelves.length;s++)if(p+=(a=this.shelves[s]).h,!(t>a.free)){if(r===a.h)return this.allocShelf(s,t,r,n);r>a.h||r<a.h&&(o=(a.h-r)*t)<h.waste&&(h.freebin=-1,h.waste=o,h.shelf=s)}return-1!==h.freebin?this.allocFreebin(h.freebin,t,r,n):-1!==h.shelf?this.allocShelf(h.shelf,t,r,n):r<=this.h-p&&t<=this.w?(a=new e(p,this.w,r),this.allocShelf(this.shelves.push(a)-1,t,r,n)):this.autoResize?(l=c=this.h,((u=f=this.w)<=l||t>u)&&(f=2*Math.max(t,u)),(l<u||r>l)&&(c=2*Math.max(r,l)),this.resize(f,c),this.packOne(t,r,n)):null},t.prototype.allocFreebin=function(t,e,r,n){var i=this.freebins.splice(t,1)[0];return i.id=n,i.w=e,i.h=r,i.refcount=0,this.bins[n]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,r,n){var i=this.shelves[t].alloc(e,r,n);return this.bins[n]=i,this.ref(i),i},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,r=0;r<this.shelves.length;r++){var n=this.shelves[r];e+=n.h,t=Math.max(n.w-n.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;r<this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e,r){if(t>this.free||e>this.h)return null;var n=this.x;return this.x+=t,this.free-=t,new function(t,e,r,n,i,a,o){this.id=t,this.x=e,this.y=r,this.w=n,this.h=i,this.maxw=a||n,this.maxh=o||i,this.refcount=0}(r,n,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}()}),Qa=function(t,e){var r=e.pixelRatio;this.paddedRect=t,this.pixelRatio=r},to={tl:{configurable:!0},br:{configurable:!0},displaySize:{configurable:!0}};to.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},to.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},to.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Qa.prototype,to);var eo=function(t){var e=new ui({width:0,height:0}),r={},n=new Ka(0,0,{autoResize:!0});for(var i in t){var a=t[i],o=n.packOne(a.data.width+2,a.data.height+2);e.resize({width:n.w,height:n.h}),ui.copy(a.data,e,{x:0,y:0},{x:o.x+1,y:o.y+1},a.data),r[i]=new Qa(o,a)}n.shrink(),e.resize({width:n.w,height:n.h}),this.image=e,this.positions=r};pr(\\\"ImagePosition\\\",Qa),pr(\\\"ImageAtlas\\\",eo);var ro=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,c=l>>1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},no=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<<c)-1,f=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},io=ao;function ao(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function oo(t){return t.type===ao.Bytes?t.readVarint()+t.pos:t.pos+1}function so(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function lo(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function co(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function uo(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function fo(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function ho(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function po(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function go(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function vo(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function mo(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function yo(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function xo(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function bo(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function _o(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}ao.Varint=0,ao.Fixed64=1,ao.Bytes=2,ao.Fixed32=5,ao.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=xo(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=_o(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=xo(this.buf,this.pos)+4294967296*xo(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=xo(this.buf,this.pos)+4294967296*_o(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=ro(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=ro(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return so(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return so(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return so(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return so(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return so(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return so(t,n,e);throw new Error(\\\"Expected varint not more than 10 bytes\\\")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n=\\\"\\\",i=e;i<r;){var a,o,s,l=t[i],c=null,u=l>239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(a=t[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=oo(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===ao.Varint)for(;this.buf[this.pos++]>127;);else if(e===ao.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ao.Fixed32)this.pos+=4;else{if(e!==ao.Fixed64)throw new Error(\\\"Unimplemented type: \\\"+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),bo(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),bo(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),bo(this.buf,-1&t,this.pos),bo(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),bo(this.buf,-1&t,this.pos),bo(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error(\\\"Given varint doesn't fit into 10 bytes\\\");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a<e.length;a++){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&lo(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),no(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),no(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&lo(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ao.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,co,e)},writePackedSVarint:function(t,e){this.writeMessage(t,uo,e)},writePackedBoolean:function(t,e){this.writeMessage(t,po,e)},writePackedFloat:function(t,e){this.writeMessage(t,fo,e)},writePackedDouble:function(t,e){this.writeMessage(t,ho,e)},writePackedFixed32:function(t,e){this.writeMessage(t,go,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,vo,e)},writePackedFixed64:function(t,e){this.writeMessage(t,mo,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,yo,e)},writeBytesField:function(t,e){this.writeTag(t,ao.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ao.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ao.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ao.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ao.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ao.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ao.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ao.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ao.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ao.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var wo=3;function ko(t,e,r){1===t&&r.readMessage(Mo,e)}function Mo(t,e,r){if(3===t){var n=r.readMessage(Ao,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;e.push({id:i,bitmap:new ci({width:o+2*wo,height:s+2*wo},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Ao(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var To=wo,So=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,g([\\\"receive\\\"],this),this.target.addEventListener(\\\"message\\\",this.receive,!1)};So.prototype.send=function(t,e,r,n){var i=r?this.mapId+\\\":\\\"+this.callbackID++:null;r&&(this.callbacks[i]=r);var a=[];this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(i),data:gr(e,a)},a)},So.prototype.receive=function(t){var e,r=this,n=t.data,i=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var a=function(t,e){var n=[];r.target.postMessage({sourceMapId:r.mapId,type:\\\"<response>\\\",id:String(i),error:t?gr(t):null,data:gr(e,n)},n)};if(\\\"<response>\\\"===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&&n.error?e(vr(n.error)):e&&e(null,vr(n.data));else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.sourceMapId,vr(n.data),a);else if(void 0!==n.id&&this.parent.getWorkerSource){var o=n.type.split(\\\".\\\");this.parent.getWorkerSource(n.sourceMapId,o[0],o[1])[o[2]](vr(n.data),a)}else this.parent[n.type](vr(n.data))}},So.prototype.remove=function(){this.target.removeEventListener(\\\"message\\\",this.receive,!1)};var Co=n(i(function(t,e){!function(t){function e(t,e,n){var i=r(256*t,256*(e=Math.pow(2,n)-e-1),n),a=r(256*(t+1),256*(e+1),n);return i[0]+\\\",\\\"+i[1]+\\\",\\\"+a[0]+\\\",\\\"+a[1]}function r(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}t.getURL=function(t,r,n,i,a,o){return o=o||{},t+\\\"?\\\"+[\\\"bbox=\\\"+e(n,i,a),\\\"format=\\\"+(o.format||\\\"image/png\\\"),\\\"service=\\\"+(o.service||\\\"WMS\\\"),\\\"version=\\\"+(o.version||\\\"1.1.1\\\"),\\\"request=\\\"+(o.request||\\\"GetMap\\\"),\\\"srs=\\\"+(o.srs||\\\"EPSG:3857\\\"),\\\"width=\\\"+(o.width||256),\\\"height=\\\"+(o.height||256),\\\"layers=\\\"+r].join(\\\"&\\\")},t.getTileBBox=e,t.getMercCoords=r,Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(e)})),Eo=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Oo(0,t,e,r)};Eo.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Eo.prototype.url=function(t,e){var r=Co.getTileBBox(this.x,this.y,this.z),n=function(t,e,r){for(var n,i=\\\"\\\",a=t;a>0;a--)i+=(e&(n=1<<a-1)?1:0)+(r&n?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(\\\"{prefix}\\\",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(\\\"{z}\\\",String(this.z)).replace(\\\"{x}\\\",String(this.x)).replace(\\\"{y}\\\",String(\\\"tms\\\"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace(\\\"{quadkey}\\\",n).replace(\\\"{bbox-epsg-3857}\\\",r)};var Lo=function(t,e){this.wrap=t,this.canonical=e,this.key=Oo(t,e.z,e.x,e.y)},zo=function(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Eo(r,+n,+i),this.key=Oo(e,t,n,i)};function Oo(t,e,r,n){(t*=2)<0&&(t=-1*t-1);var i=1<<e;return 32*(i*i*t+i*n+r)+e}zo.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},zo.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new zo(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new zo(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},zo.prototype.isChildOf=function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},zo.prototype.children=function(t){if(this.overscaledZ>=t)return[new zo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new zo(e,this.wrap,e,r,n),new zo(e,this.wrap,e,r+1,n),new zo(e,this.wrap,e,r,n+1),new zo(e,this.wrap,e,r+1,n+1)]},zo.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},zo.prototype.wrapped=function(){return new zo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},zo.prototype.unwrapTo=function(t){return new zo(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},zo.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},zo.prototype.toUnwrapped=function(){return new Lo(this.wrap,this.canonical)},zo.prototype.toString=function(){return this.overscaledZ+\\\"/\\\"+this.canonical.x+\\\"/\\\"+this.canonical.y},zo.prototype.toCoordinate=function(){return new s(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)},pr(\\\"CanonicalTileID\\\",Eo),pr(\\\"OverscaledTileID\\\",zo,{omit:[\\\"posMatrix\\\"]});var Io=function(t,e,r){if(t<=0)throw new RangeError(\\\"Level must have positive dimension\\\");this.dim=t,this.border=e,this.stride=this.dim+2*this.border,this.data=r||new Int32Array((this.dim+2*this.border)*(this.dim+2*this.border))};Io.prototype.set=function(t,e,r){this.data[this._idx(t,e)]=r+65536},Io.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},Io.prototype._idx=function(t,e){if(t<-this.border||t>=this.dim+this.border||e<-this.border||e>=this.dim+this.border)throw new RangeError(\\\"out of range source coordinates for DEM data\\\");return(e+this.border)*this.stride+(t+this.border)},pr(\\\"Level\\\",Io);var Po=function(t,e,r){this.uid=t,this.scale=e||1,this.level=r||new Io(256,512),this.loaded=!!r};Po.prototype.loadFromImage=function(t,e){if(t.height!==t.width)throw new RangeError(\\\"DEM tiles must be square\\\");if(e&&\\\"mapbox\\\"!==e&&\\\"terrarium\\\"!==e)return _('\\\"'+e+'\\\" is not a valid encoding type. Valid types include \\\"mapbox\\\" and \\\"terrarium\\\".');var r=this.level=new Io(t.width,t.width/2),n=t.data;this._unpackData(r,n,e||\\\"mapbox\\\");for(var i=0;i<r.dim;i++)r.set(-1,i,r.get(0,i)),r.set(r.dim,i,r.get(r.dim-1,i)),r.set(i,-1,r.get(i,0)),r.set(i,r.dim,r.get(i,r.dim-1));r.set(-1,-1,r.get(0,0)),r.set(r.dim,-1,r.get(r.dim-1,0)),r.set(-1,r.dim,r.get(0,r.dim-1)),r.set(r.dim,r.dim,r.get(r.dim-1,r.dim-1)),this.loaded=!0},Po.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Po.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Po.prototype._unpackData=function(t,e,r){for(var n={mapbox:this._unpackMapbox,terrarium:this._unpackTerrarium}[r],i=0;i<t.dim;i++)for(var a=0;a<t.dim;a++){var o=4*(i*t.dim+a);t.set(a,i,this.scale*n(e[o],e[o+1],e[o+2]))}},Po.prototype.getPixels=function(){return new ui({width:this.level.dim+2*this.level.border,height:this.level.dim+2*this.level.border},new Uint8Array(this.level.data.buffer))},Po.prototype.backfillBorder=function(t,e,r){var n=this.level,i=t.level;if(n.dim!==i.dim)throw new Error(\\\"level mismatch (dem dimension)\\\");var a=e*n.dim,o=e*n.dim+n.dim,s=r*n.dim,l=r*n.dim+n.dim;switch(e){case-1:a=o-1;break;case 1:o=a+1}switch(r){case-1:s=l-1;break;case 1:l=s+1}for(var c=h(a,-n.border,n.dim+n.border),u=h(o,-n.border,n.dim+n.border),f=h(s,-n.border,n.dim+n.border),p=h(l,-n.border,n.dim+n.border),d=-e*n.dim,g=-r*n.dim,v=f;v<p;v++)for(var m=c;m<u;m++)n.set(m,v,i.get(m+d,v+g))},pr(\\\"DEMData\\\",Po);var Do=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};Do.prototype.encode=function(t){return this._stringToNumber[t]},Do.prototype.decode=function(t){return this._numberToString[t]};var Ro=function(t,e,r,n){this.type=\\\"Feature\\\",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)},Bo={geometry:{configurable:!0}};Bo.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Bo.geometry.set=function(t){this._geometry=t},Ro.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)\\\"_geometry\\\"!==e&&\\\"_vectorTileFeature\\\"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Ro.prototype,Bo);var Fo=function(t,e,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new lr(Dn,16,0),this.featureIndexArray=r||new Mn};function No(t,e){return e-t}Fo.prototype.insert=function(t,e,r,n,i){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);for(var o=0;o<e.length;o++){for(var s=e[o],l=[1/0,1/0,-1/0,-1/0],c=0;c<s.length;c++){var u=s[c];l[0]=Math.min(l[0],u.x),l[1]=Math.min(l[1],u.y),l[2]=Math.max(l[2],u.x),l[3]=Math.max(l[3],u.y)}l[0]<Dn&&l[1]<Dn&&l[2]>=0&&l[3]>=0&&this.grid.insert(a,l[0],l[1],l[2],l[3])}},Fo.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ga.VectorTile(new io(this.rawTileData)).layers,this.sourceLayerCoder=new Do(this.vtLayers?Object.keys(this.vtLayers).sort():[\\\"_geojsonTileLayer\\\"])),this.vtLayers},Fo.prototype.query=function(t,e){var r=this;this.loadVTLayers();for(var n=t.params||{},i=Dn/t.tileSize/t.scale,a=Re(n.filter),o=t.queryGeometry,s=t.queryPadding*i,l=1/0,c=1/0,u=-1/0,f=-1/0,h=0;h<o.length;h++)for(var p=o[h],d=0;d<p.length;d++){var g=p[d];l=Math.min(l,g.x),c=Math.min(c,g.y),u=Math.max(u,g.x),f=Math.max(f,g.y)}var v=this.grid.query(l-s,c-s,u+s,f+s);v.sort(No);for(var m,y={},x=function(s){var l=v[s];if(l!==m){m=l;var c=r.featureIndexArray.get(l),u=null;r.loadMatchingFeature(y,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,a,n.layers,e,function(e,n){return u||(u=Bn(e)),n.queryIntersectsFeature(o,e,u,r.z,t.transform,i,t.posMatrix)})}},b=0;b<v.length;b++)x(b);return y},Fo.prototype.loadMatchingFeature=function(t,e,r,n,i,a,o,s){var l=this.bucketLayerIDs[e];if(!a||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(a,l)){var c=this.sourceLayerCoder.decode(r),u=this.vtLayers[c].feature(n);if(i(new Lr(this.tileID.overscaledZ),u))for(var f=0;f<l.length;f++){var h=l[f];if(!(a&&a.indexOf(h)<0)){var p=o[h];if(p&&(!s||s(u,p))){var d=new Ro(u,this.z,this.x,this.y);d.layer=p.serialize();var g=t[h];void 0===g&&(g=t[h]=[]),g.push({featureIndex:n,feature:d})}}}}},Fo.prototype.lookupSymbolFeatures=function(t,e,r,n,i,a){var o={};this.loadVTLayers();for(var s=Re(n),l=0,c=t;l<c.length;l+=1){var u=c[l];this.loadMatchingFeature(o,e,r,u,s,i,a)}return o},Fo.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var n=0,i=r[e];n<i.length;n+=1)if(t===i[n])return!0;return!1},pr(\\\"FeatureIndex\\\",Fo,{omit:[\\\"rawTileData\\\",\\\"sourceLayerCoder\\\"]});var jo={horizontal:1,vertical:2,horizontalOnly:3},Vo={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Uo={};function qo(t,e,r,n){var i=Math.pow(t-e,2);return n?t<e?i/2:2*i:i+Math.abs(r)*r}function Ho(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Go(t,e,r,n,i,a){for(var o=null,s=qo(e,r,i,a),l=0,c=n;l<c.length;l+=1){var u=c[l],f=qo(e-u.x,r,i,a)+u.badness;f<=s&&(o=u,s=f)}return{index:t,x:e,priorBreak:o,badness:s}}function Wo(t,e,r,n){if(!r)return[];if(!t)return[];for(var i,a=[],o=function(t,e,r,n){for(var i=0,a=0;a<t.length;a++){var o=n[t.charCodeAt(a)];o&&(i+=o.metrics.advance+e)}return i/Math.max(1,Math.ceil(i/r))}(t,e,r,n),s=0,l=0;l<t.length;l++){var c=t.charCodeAt(l),u=n[c];u&&!Vo[c]&&(s+=u.metrics.advance+e),l<t.length-1&&(Uo[c]||!((i=c)<11904)&&(yr[\\\"Bopomofo Extended\\\"](i)||yr.Bopomofo(i)||yr[\\\"CJK Compatibility Forms\\\"](i)||yr[\\\"CJK Compatibility Ideographs\\\"](i)||yr[\\\"CJK Compatibility\\\"](i)||yr[\\\"CJK Radicals Supplement\\\"](i)||yr[\\\"CJK Strokes\\\"](i)||yr[\\\"CJK Symbols and Punctuation\\\"](i)||yr[\\\"CJK Unified Ideographs Extension A\\\"](i)||yr[\\\"CJK Unified Ideographs\\\"](i)||yr[\\\"Enclosed CJK Letters and Months\\\"](i)||yr[\\\"Halfwidth and Fullwidth Forms\\\"](i)||yr.Hiragana(i)||yr[\\\"Ideographic Description Characters\\\"](i)||yr[\\\"Kangxi Radicals\\\"](i)||yr[\\\"Katakana Phonetic Extensions\\\"](i)||yr.Katakana(i)||yr[\\\"Vertical Forms\\\"](i)||yr[\\\"Yi Radicals\\\"](i)||yr[\\\"Yi Syllables\\\"](i)))&&a.push(Go(l+1,s,o,a,Ho(c,t.charCodeAt(l+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Go(t.length,s,o,a,0,!0))}function Yo(t){var e=.5,r=.5;switch(t){case\\\"right\\\":case\\\"top-right\\\":case\\\"bottom-right\\\":e=1;break;case\\\"left\\\":case\\\"top-left\\\":case\\\"bottom-left\\\":e=0}switch(t){case\\\"bottom\\\":case\\\"bottom-right\\\":case\\\"bottom-left\\\":r=1;break;case\\\"top\\\":case\\\"top-right\\\":case\\\"top-left\\\":r=0}return{horizontalAlign:e,verticalAlign:r}}function Xo(t,e,r,n,i){if(i){var a=e[t[n].glyph];if(a)for(var o=a.metrics.advance,s=(t[n].x+o)*i,l=r;l<=n;l++)t[l].x-=s}}Uo[10]=!0,Uo[32]=!0,Uo[38]=!0,Uo[40]=!0,Uo[41]=!0,Uo[43]=!0,Uo[45]=!0,Uo[47]=!0,Uo[173]=!0,Uo[183]=!0,Uo[8203]=!0,Uo[8208]=!0,Uo[8211]=!0,Uo[8231]=!0,e.commonjsGlobal=r,e.unwrapExports=n,e.createCommonjsModule=i,e.default=self,e.default$1=l,e.getJSON=function(t,e){var r=T(t);return r.setRequestHeader(\\\"Accept\\\",\\\"application/json\\\"),r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var n;try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n)}else 401===r.status&&t.url.match(/mapbox.com/)?e(new A(r.statusText+\\\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens\\\",r.status,t.url)):e(new A(r.statusText,r.status,t.url))},r.send(),r},e.getImage=function(t,e){return S(t,function(t,r){if(t)e(t);else if(r){var n=new self.Image,i=self.URL||self.webkitURL;n.onload=function(){e(null,n),i.revokeObjectURL(n.src)};var a=new self.Blob([new Uint8Array(r.data)],{type:\\\"image/png\\\"});n.cacheControl=r.cacheControl,n.expires=r.expires,n.src=r.data.byteLength?i.createObjectURL(a):\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\\\"}})},e.ResourceType=M,e.RGBAImage=ui,e.default$2=Ka,e.ImagePosition=Qa,e.getArrayBuffer=S,e.default$3=function(t){return new io(t).readFields(ko,[])},e.default$4=yr,e.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),a=null;t.forEach(function(t,o){e(t,function(t,e){t&&(a=t),i[o]=e,0==--n&&r(a,i)})})},e.AlphaImage=ci,e.default$5=I,e.endsWith=v,e.extend=p,e.sphericalToCartesian=function(t){var e=t[0],r=t[1],n=t[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(n),y:e*Math.sin(r)*Math.sin(n),z:e*Math.cos(n)}},e.Evented=O,e.validateStyle=nr,e.validateLight=ir,e.emitValidationErrors=sr,e.default$6=tt,e.number=wt,e.Properties=qr,e.Transitionable=Ir,e.Transitioning=Dr,e.PossiblyEvaluated=Fr,e.DataConstantProperty=Nr,e.warnOnce=_,e.uniqueId=function(){return d++},e.default$7=So,e.pick=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n];i in t&&(r[i]=t[i])}return r},e.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},e.clamp=h,e.Event=L,e.ErrorEvent=z,e.OverscaledTileID=zo,e.default$8=Dn,e.createLayout=Xr,e.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;a++)e=Math.min(e,t[a].column),r=Math.min(r,t[a].row),n=Math.max(n,t[a].column),i=Math.max(i,t[a].row);var o=n-e,l=i-r,c=Math.max(o,l),u=Math.max(0,Math.floor(-Math.log(c)/Math.LN2));return new s((e+n)/2,(r+i)/2,0).zoomTo(u)},e.CanonicalTileID=Eo,e.RasterBoundsArray=Jr,e.getVideo=function(t,e){var r,n,i=self.document.createElement(\\\"video\\\");i.onloadstart=function(){e(null,i)};for(var a=0;a<t.length;a++){var o=self.document.createElement(\\\"source\\\");r=t[a],n=void 0,(n=self.document.createElement(\\\"a\\\")).href=r,(n.protocol!==self.document.location.protocol||n.host!==self.document.location.host)&&(i.crossOrigin=\\\"Anonymous\\\"),o.src=t[a],i.appendChild(o)}return i},e.default$9=P,e.bindAll=g,e.default$10=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(!t(e[n],r[n]))return!1;return!0}if(\\\"object\\\"==typeof e&&null!==e&&null!==r){if(\\\"object\\\"!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var i in e)if(!t(e[i],r[i]))return!1;return!0}return e===r},e.parseCacheControl=function(t){var e={};if(t.replace(/(?:^|(?:\\\\s*\\\\,\\\\s*))([^\\\\x00-\\\\x20\\\\(\\\\)<>@\\\\,;\\\\:\\\\\\\\\\\"\\\\/\\\\[\\\\]\\\\?\\\\=\\\\{\\\\}\\\\x7F]+)(?:\\\\=(?:([^\\\\x00-\\\\x20\\\\(\\\\)<>@\\\\,;\\\\:\\\\\\\\\\\"\\\\/\\\\[\\\\]\\\\?\\\\=\\\\{\\\\}\\\\x7F]+)|(?:\\\\\\\"((?:[^\\\"\\\\\\\\]|\\\\\\\\.)*)\\\\\\\")))?/g,function(t,r,n,i){var a=n||i;return e[r]=!a||a.toLowerCase(),\\\"\\\"}),e[\\\"max-age\\\"]){var r=parseInt(e[\\\"max-age\\\"],10);isNaN(r)?delete e[\\\"max-age\\\"]:e[\\\"max-age\\\"]=r}return e},e.default$11=Fo,e.default$12=Ro,e.default$13=Re,e.default$14=Ha,e.CollisionBoxArray=vn,e.default$15=Tn,e.TriangleIndexArray=fn,e.default$16=Lr,e.default$17=s,e.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},e.default$18=[\\\"type\\\",\\\"source\\\",\\\"source-layer\\\",\\\"minzoom\\\",\\\"maxzoom\\\",\\\"filter\\\",\\\"layout\\\"],e.mat4=ri,e.vec4=ei,e.getSizeData=Ba,e.evaluateSizeForFeature=function(t,e,r){var n=e;return\\\"source\\\"===t.functionType?r.lowerSize/10:\\\"composite\\\"===t.functionType?wt(r.lowerSize/10,r.upperSize/10,n.uSizeT):n.uSize},e.evaluateSizeForZoom=function(t,e,r){if(\\\"constant\\\"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if(\\\"source\\\"===t.functionType)return{uSizeT:0,uSize:0};if(\\\"camera\\\"===t.functionType){var n=t.propertyValue,i=t.zoomRange,a=t.sizeRange,o=h(Se(n,r.specification).interpolationFactor(e,i.min,i.max),0,1);return{uSizeT:0,uSize:a.min+o*(a.max-a.min)}}var s=t.propertyValue,l=t.zoomRange;return{uSizeT:h(Se(s,r.specification).interpolationFactor(e,l.min,l.max),0,1),uSize:0}},e.addDynamicAttributes=Va,e.default$19=Wa,e.WritingMode=jo,e.multiPolygonIntersectsBufferedPoint=jn,e.multiPolygonIntersectsMultiPolygon=Vn,e.multiPolygonIntersectsBufferedMultiLine=Un,e.polygonIntersectsPolygon=function(t,e){for(var r=0;r<t.length;r++)if(Zn(e,t[r]))return!0;for(var n=0;n<e.length;n++)if(Zn(t,e[n]))return!0;return!!Hn(t,e)},e.distToSegmentSquared=Yn,e.default$20=ti,e.default$21=Hr,e.default$22=function(t){return new Ja[t.type](t)},e.clone=x,e.filterObject=y,e.mapObject=m,e.registerForPluginAvailability=function(t){return Tr?t({pluginURL:Tr,completionCallback:Mr}):Cr.once(\\\"pluginAvailable\\\",t),t},e.evented=Cr,e.default$23=mr,e.default$24=On,e.PosArray=$r,e.UnwrappedTileID=Lo,e.ease=f,e.bezier=u,e.setRTLTextPlugin=function(t,e){if(Ar)throw new Error(\\\"setRTLTextPlugin cannot be called multiple times.\\\");Ar=!0,Tr=t,Mr=function(t){t?(Ar=!1,Tr=null,e&&e(t)):Sr=!0},Cr.fire(new L(\\\"pluginAvailable\\\",{pluginURL:Tr,completionCallback:Mr}))},e.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},e.default$25=Ra,e.register=pr,e.GLYPH_PBF_BORDER=To,e.shapeText=function(t,e,r,n,i,a,o,s,l,c){var u=t.trim();c===jo.vertical&&(u=function(t){for(var e=\\\"\\\",r=0;r<t.length;r++){var n=t.charCodeAt(r+1)||null,i=t.charCodeAt(r-1)||null;n&&wr(n)&&!Da[t[r+1]]||i&&wr(i)&&!Da[t[r-1]]||!Da[t[r]]?e+=t[r]:e+=Da[t[r]]}return e}(u));var f=[],h={positionedGlyphs:f,text:u,top:s[1],bottom:s[1],left:s[0],right:s[0],writingMode:c},p=Er.processBidirectionalText;return function(t,e,r,n,i,a,o,s,l){for(var c=0,u=-17,f=0,h=t.positionedGlyphs,p=\\\"right\\\"===a?1:\\\"left\\\"===a?0:.5,d=0,g=r;d<g.length;d+=1){var v=g[d];if((v=v.trim()).length){for(var m=h.length,y=0;y<v.length;y++){var x=v.charCodeAt(y),b=e[x];b&&(_r(x)&&o!==jo.horizontal?(h.push({glyph:x,x:c,y:0,vertical:!0}),c+=l+s):(h.push({glyph:x,x:c,y:u,vertical:!1}),c+=b.metrics.advance+s))}if(h.length!==m){var _=c-s;f=Math.max(_,f),Xo(h,e,m,h.length-1,p)}c=0,u+=n}else u+=n}var w=Yo(i),k=w.horizontalAlign,M=w.verticalAlign;!function(t,e,r,n,i,a,o){for(var s=(e-r)*i,l=(-n*o+.5)*a,c=0;c<t.length;c++)t[c].x+=s,t[c].y+=l}(h,p,k,M,f,n,r.length);var A=r.length*n;t.top+=-M*A,t.bottom=t.top+A,t.left+=-k*f,t.right=t.left+f}(h,e,p?p(u,Wo(u,o,r,e)):function(t,e){for(var r=[],n=0,i=0,a=e;i<a.length;i+=1){var o=a[i];r.push(t.substring(n,o)),n=o}return n<t.length&&r.push(t.substring(n,t.length)),r}(u,Wo(u,o,r,e)),n,i,a,c,o,l),!!f.length&&h},e.shapeIcon=function(t,e,r){var n=Yo(r),i=n.horizontalAlign,a=n.verticalAlign,o=e[0],s=e[1],l=o-t.displaySize[0]*i,c=l+t.displaySize[0],u=s-t.displaySize[1]*a;return{image:t,top:u,bottom:u+t.displaySize[1],left:l,right:c}},e.allowsVerticalWritingMode=xr,e.allowsLetterSpacing=function(t){for(var e=0,r=t;e<r.length;e+=1)if(!br(r[e].charCodeAt(0)))return!1;return!0},e.default$26=Yi,e.default$27=Do,e.default$28=eo,e.default$29=ga,e.default$30=io,e.default$31=Po,e.__moduleExports=ga,e.default$32=l,e.__moduleExports$1=io,e.plugin=Er}),i(0,function(t){function e(t){var r=typeof t;if(\\\"number\\\"===r||\\\"boolean\\\"===r||\\\"string\\\"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var n=\\\"[\\\",i=0,a=t;i<a.length;i+=1)n+=e(a[i])+\\\",\\\";return n+\\\"]\\\"}for(var o=Object.keys(t).sort(),s=\\\"{\\\",l=0;l<o.length;l++)s+=JSON.stringify(o[l])+\\\":\\\"+e(t[o[l]])+\\\",\\\";return s+\\\"}\\\"}function r(r){for(var n=\\\"\\\",i=0,a=t.default$18;i<a.length;i+=1)n+=\\\"/\\\"+e(r[a[i]]);return n}var n=function(t){t&&this.replace(t)};function i(t,e,r,n,i){if(void 0===e.segment)return!0;for(var a=e,o=e.segment+1,s=0;s>-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],c=0;s<r/2;){var u=t[o-1],f=t[o],h=t[o+1];if(!h)return!1;var p=u.angleTo(f)-f.angleTo(h);for(p=Math.abs((p+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:p}),c+=p;s-l[0].distance>n;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}function a(e,r,n,a,o,s,l,c,u){var f=a?.6*s*l:0,h=Math.max(a?a.right-a.left:0,o?o.right-o.left:0),p=0===e[0].x||e[0].x===u||0===e[0].y||e[0].y===u;return r-h*l<r/4&&(r=h*l+r/4),function e(r,n,a,o,s,l,c,u,f){for(var h=l/2,p=0,d=0;d<r.length-1;d++)p+=r[d].dist(r[d+1]);for(var g=0,v=n-a,m=[],y=0;y<r.length-1;y++){for(var x=r[y],b=r[y+1],_=x.dist(b),w=b.angleTo(x);v+a<g+_;){var k=((v+=a)-g)/_,M=t.number(x.x,b.x,k),A=t.number(x.y,b.y,k);if(M>=0&&M<f&&A>=0&&A<f&&v-h>=0&&v+h<=p){var T=new t.default$25(M,A,w,y);T._round(),o&&!i(r,T,l,o,s)||m.push(T)}}g+=_}return u||m.length||c||(m=e(r,g/2,a,o,s,l,c,!0,f)),m}(e,p?r/2*c%r:(h/2+2*s)*l*c%r,r,f,n,h*l,p,!1,u)}n.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},n.prototype.update=function(e,n){for(var i=this,a=0,o=e;a<o.length;a+=1){var s=o[a];i._layerConfigs[s.id]=s;var l=i._layers[s.id]=t.default$22(s);l._featureFilter=t.default$13(l.filter)}for(var c=0,u=n;c<u.length;c+=1){var f=u[c];delete i._layerConfigs[f],delete i._layers[f]}this.familiesBySource={};for(var h=0,p=function(t){for(var e={},n=0;n<t.length;n++){var i=r(t[n]),a=e[i];a||(a=e[i]=[]),a.push(t[n])}var o=[];for(var s in e)o.push(e[s]);return o}(t.values(this._layerConfigs));h<p.length;h+=1){var d=p[h].map(function(t){return i._layers[t.id]}),g=d[0];if(\\\"none\\\"!==g.visibility){var v=g.source||\\\"\\\",m=i.familiesBySource[v];m||(m=i.familiesBySource[v]={});var y=g.sourceLayer||\\\"_geojsonTileLayer\\\",x=m[y];x||(x=m[y]=[]),x.push(d)}}};var o=function(){this.opacity=0,this.targetOpacity=0,this.time=0};o.prototype.clone=function(){var t=new o;return t.opacity=this.opacity,t.targetOpacity=this.targetOpacity,t.time=this.time,t},t.register(\\\"OpacityState\\\",o);var s=function(t,e,r,n,i,a,o,s,l,c,u){var f=o.top*s-l,h=o.bottom*s+l,p=o.left*s-l,d=o.right*s+l;if(this.boxStartIndex=t.length,c){var g=h-f,v=d-p;g>0&&(g=Math.max(10*s,g),this._addLineCollisionCircles(t,e,r,r.segment,v,g,n,i,a,u))}else t.emplaceBack(r.x,r.y,p,f,d,h,n,i,a,0,0);this.boxEndIndex=t.length};s.prototype._addLineCollisionCircles=function(t,e,r,n,i,a,o,s,l,c){var u=a/2,f=Math.floor(i/u),h=1+.4*Math.log(c)/Math.LN2,p=Math.floor(f*h/2),d=-a/2,g=r,v=n+1,m=d,y=-i/2,x=y-i/4;do{if(--v<0){if(m>y)return;v=0;break}m-=e[v].dist(g),g=e[v]}while(m>x);for(var b=e[v].dist(e[v+1]),_=-p;_<f+p;_++){var w=_*u,k=y+w;if(w<0&&(k+=w),w>i&&(k+=w-i),!(k<m)){for(;m+b<k;){if(m+=b,++v+1>=e.length)return;b=e[v].dist(e[v+1])}var M=k-m,A=e[v],T=e[v+1].sub(A)._unit()._mult(M)._add(A)._round(),S=Math.abs(k-d)<u?0:.8*(k-d);t.emplaceBack(T.x,T.y,-a/2,-a/2,a/2,a/2,o,s,l,a/2,S)}}};var l=u,c=u;function u(t,e){if(!(this instanceof u))return new u(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||f,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)}function f(t,e){return t<e?-1:t>e?1:0}function h(e,r,n){void 0===r&&(r=1),void 0===n&&(n=!1);for(var i=1/0,a=1/0,o=-1/0,s=-1/0,c=e[0],u=0;u<c.length;u++){var f=c[u];(!u||f.x<i)&&(i=f.x),(!u||f.y<a)&&(a=f.y),(!u||f.x>o)&&(o=f.x),(!u||f.y>s)&&(s=f.y)}var h=o-i,g=s-a,v=Math.min(h,g),m=v/2,y=new l(null,p);if(0===v)return new t.default$1(i,a);for(var x=i;x<o;x+=v)for(var b=a;b<s;b+=v)y.push(new d(x+m,b+m,m,e));for(var _=function(t){for(var e=0,r=0,n=0,i=t[0],a=0,o=i.length,s=o-1;a<o;s=a++){var l=i[a],c=i[s],u=l.x*c.y-c.x*l.y;r+=(l.x+c.x)*u,n+=(l.y+c.y)*u,e+=3*u}return new d(r/e,n/e,0,t)}(e),w=y.length;y.length;){var k=y.pop();(k.d>_.d||!_.d)&&(_=k,n&&console.log(\\\"found best %d after %d probes\\\",Math.round(1e4*k.d)/1e4,w)),k.max-_.d<=r||(m=k.h/2,y.push(new d(k.p.x-m,k.p.y-m,m,e)),y.push(new d(k.p.x+m,k.p.y-m,m,e)),y.push(new d(k.p.x-m,k.p.y+m,m,e)),y.push(new d(k.p.x+m,k.p.y+m,m,e)),w+=4)}return n&&(console.log(\\\"num probes: \\\"+w),console.log(\\\"best distance: \\\"+_.d)),_.p}function p(t,e){return e.max-t.max}function d(e,r,n,i){this.p=new t.default$1(e,r),this.h=n,this.d=function(e,r){for(var n=!1,i=1/0,a=0;a<r.length;a++)for(var o=r[a],s=0,l=o.length,c=l-1;s<l;c=s++){var u=o[s],f=o[c];u.y>e.y!=f.y>e.y&&e.x<(f.x-u.x)*(e.y-u.y)/(f.y-u.y)+u.x&&(n=!n),i=Math.min(i,t.distToSegmentSquared(e,u,f))}return(n?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}function g(e,r,n,i,a,o){e.createArrays(),e.symbolInstances=[];var s=512*e.overscaling;e.tilePixelRatio=t.default$8/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if(\\\"composite\\\"===e.textSizeData.functionType){var f=e.textSizeData.zoomRange,h=f.min,p=f.max;u.compositeTextSizes=[c[\\\"text-size\\\"].possiblyEvaluate(new t.default$16(h)),c[\\\"text-size\\\"].possiblyEvaluate(new t.default$16(p))]}if(\\\"composite\\\"===e.iconSizeData.functionType){var d=e.iconSizeData.zoomRange,g=d.min,m=d.max;u.compositeIconSizes=[c[\\\"icon-size\\\"].possiblyEvaluate(new t.default$16(g)),c[\\\"icon-size\\\"].possiblyEvaluate(new t.default$16(m))]}u.layoutTextSize=c[\\\"text-size\\\"].possiblyEvaluate(new t.default$16(e.zoom+1)),u.layoutIconSize=c[\\\"icon-size\\\"].possiblyEvaluate(new t.default$16(e.zoom+1)),u.textMaxSize=c[\\\"text-size\\\"].possiblyEvaluate(new t.default$16(18));for(var y=24*l.get(\\\"text-line-height\\\"),x=\\\"map\\\"===l.get(\\\"text-rotation-alignment\\\")&&\\\"line\\\"===l.get(\\\"symbol-placement\\\"),b=l.get(\\\"text-keep-upright\\\"),_=0,w=e.features;_<w.length;_+=1){var k=w[_],M=l.get(\\\"text-font\\\").evaluate(k).join(\\\",\\\"),A=r[M]||{},T=n[M]||{},S={},C=k.text;if(C){var E=l.get(\\\"text-offset\\\").evaluate(k).map(function(t){return 24*t}),L=24*l.get(\\\"text-letter-spacing\\\").evaluate(k),z=t.allowsLetterSpacing(C)?L:0,O=l.get(\\\"text-anchor\\\").evaluate(k),I=l.get(\\\"text-justify\\\").evaluate(k),P=\\\"line\\\"!==l.get(\\\"symbol-placement\\\")?24*l.get(\\\"text-max-width\\\").evaluate(k):0;S.horizontal=t.shapeText(C,A,P,y,O,I,z,E,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(C)&&x&&b&&(S.vertical=t.shapeText(C,A,P,y,O,I,z,E,24,t.WritingMode.vertical))}var D=void 0;if(k.icon){var R=i[k.icon];R&&(D=t.shapeIcon(a[k.icon],l.get(\\\"icon-offset\\\").evaluate(k),l.get(\\\"icon-anchor\\\").evaluate(k)),void 0===e.sdfIcons?e.sdfIcons=R.sdf:e.sdfIcons!==R.sdf&&t.warnOnce(\\\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\\\"),R.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==l.get(\\\"icon-rotate\\\").constantOr(1)&&(e.iconsNeedLinear=!0))}(S.horizontal||D)&&v(e,k,S,D,T,u)}o&&e.generateCollisionDebugBuffers()}function v(e,r,n,i,l,c){var u=c.layoutTextSize.evaluate(r),f=c.layoutIconSize.evaluate(r),p=c.textMaxSize.evaluate(r);void 0===p&&(p=u);var d=e.layers[0].layout,g=d.get(\\\"text-offset\\\").evaluate(r),v=d.get(\\\"icon-offset\\\").evaluate(r),x=u/24,b=e.tilePixelRatio*x,_=e.tilePixelRatio*p/24,w=e.tilePixelRatio*f,k=e.tilePixelRatio*d.get(\\\"symbol-spacing\\\"),M=d.get(\\\"text-padding\\\")*e.tilePixelRatio,A=d.get(\\\"icon-padding\\\")*e.tilePixelRatio,T=d.get(\\\"text-max-angle\\\")/180*Math.PI,S=\\\"map\\\"===d.get(\\\"text-rotation-alignment\\\")&&\\\"line\\\"===d.get(\\\"symbol-placement\\\"),C=\\\"map\\\"===d.get(\\\"icon-rotation-alignment\\\")&&\\\"line\\\"===d.get(\\\"symbol-placement\\\"),E=k/2,L=function(a,u){u.x<0||u.x>=t.default$8||u.y<0||u.y>=t.default$8||e.symbolInstances.push(function(e,r,n,i,a,l,c,u,f,h,p,d,g,v,y,x,b,_,w,k,M){var A,T,S=e.addToLineVertexArray(r,n),C=0,E=0,L=0,z=i.horizontal?i.horizontal.text:\\\"\\\",O=[];i.horizontal&&(A=new s(c,n,r,u,f,h,i.horizontal,p,d,g,e.overscaling),E+=m(e,r,i.horizontal,l,g,w,v,S,i.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,O,k,M),i.vertical&&(L+=m(e,r,i.vertical,l,g,w,v,S,t.WritingMode.vertical,O,k,M)));var I=A?A.boxStartIndex:e.collisionBoxArray.length,P=A?A.boxEndIndex:e.collisionBoxArray.length;if(a){var D=function(e,r,n,i,a,o){var s,l,c,u,f=r.image,h=n.layout,p=r.top-1/f.pixelRatio,d=r.left-1/f.pixelRatio,g=r.bottom+1/f.pixelRatio,v=r.right+1/f.pixelRatio;if(\\\"none\\\"!==h.get(\\\"icon-text-fit\\\")&&a){var m=v-d,y=g-p,x=h.get(\\\"text-size\\\").evaluate(o)/24,b=a.left*x,_=a.right*x,w=a.top*x,k=_-b,M=a.bottom*x-w,A=h.get(\\\"icon-text-fit-padding\\\")[0],T=h.get(\\\"icon-text-fit-padding\\\")[1],S=h.get(\\\"icon-text-fit-padding\\\")[2],C=h.get(\\\"icon-text-fit-padding\\\")[3],E=\\\"width\\\"===h.get(\\\"icon-text-fit\\\")?.5*(M-y):0,L=\\\"height\\\"===h.get(\\\"icon-text-fit\\\")?.5*(k-m):0,z=\\\"width\\\"===h.get(\\\"icon-text-fit\\\")||\\\"both\\\"===h.get(\\\"icon-text-fit\\\")?k:m,O=\\\"height\\\"===h.get(\\\"icon-text-fit\\\")||\\\"both\\\"===h.get(\\\"icon-text-fit\\\")?M:y;s=new t.default$1(b+L-C,w+E-A),l=new t.default$1(b+L+T+z,w+E-A),c=new t.default$1(b+L+T+z,w+E+S+O),u=new t.default$1(b+L-C,w+E+S+O)}else s=new t.default$1(d,p),l=new t.default$1(v,p),c=new t.default$1(v,g),u=new t.default$1(d,g);var I=n.layout.get(\\\"icon-rotate\\\").evaluate(o)*Math.PI/180;if(I){var P=Math.sin(I),D=Math.cos(I),R=[D,-P,P,D];s._matMult(R),l._matMult(R),u._matMult(R),c._matMult(R)}return[{tl:s,tr:l,bl:u,br:c,tex:f.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,a,l,0,i.horizontal,w);T=new s(c,n,r,u,f,h,a,y,x,!1,e.overscaling),C=4*D.length;var R=e.iconSizeData,B=null;\\\"source\\\"===R.functionType?B=[10*l.layout.get(\\\"icon-size\\\").evaluate(w)]:\\\"composite\\\"===R.functionType&&(B=[10*M.compositeIconSizes[0].evaluate(w),10*M.compositeIconSizes[1].evaluate(w)]),e.addSymbols(e.icon,D,B,_,b,w,!1,r,S.lineStartIndex,S.lineLength)}var F=T?T.boxStartIndex:e.collisionBoxArray.length,N=T?T.boxEndIndex:e.collisionBoxArray.length;return e.glyphOffsetArray.length>=t.default$14.MAX_GLYPHS&&t.warnOnce(\\\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\\\"),{key:z,textBoxStartIndex:I,textBoxEndIndex:P,iconBoxStartIndex:F,iconBoxEndIndex:N,textOffset:v,iconOffset:_,anchor:r,line:n,featureIndex:u,feature:w,numGlyphVertices:E,numVerticalGlyphVertices:L,numIconVertices:C,textOpacityState:new o,iconOpacityState:new o,isDuplicate:!1,placedTextSymbolIndices:O,crossTileID:0}}(e,u,a,n,i,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,b,M,S,g,w,A,C,v,r,l,c))};if(\\\"line\\\"===d.get(\\\"symbol-placement\\\"))for(var z=0,O=function(e,r,n,i,a){for(var o=[],s=0;s<e.length;s++)for(var l=e[s],c=void 0,u=0;u<l.length-1;u++){var f=l[u],h=l[u+1];f.x<0&&h.x<0||(f.x<0?f=new t.default$1(0,f.y+(h.y-f.y)*((0-f.x)/(h.x-f.x)))._round():h.x<0&&(h=new t.default$1(0,f.y+(h.y-f.y)*((0-f.x)/(h.x-f.x)))._round()),f.y<0&&h.y<0||(f.y<0?f=new t.default$1(f.x+(h.x-f.x)*((0-f.y)/(h.y-f.y)),0)._round():h.y<0&&(h=new t.default$1(f.x+(h.x-f.x)*((0-f.y)/(h.y-f.y)),0)._round()),f.x>=i&&h.x>=i||(f.x>=i?f=new t.default$1(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round():h.x>=i&&(h=new t.default$1(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new t.default$1(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new t.default$1(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round()),c&&f.equals(c[c.length-1])||(c=[f],o.push(c)),c.push(h)))))}return o}(r.geometry,0,0,t.default$8,t.default$8);z<O.length;z+=1)for(var I=O[z],P=0,D=a(I,k,T,n.vertical||n.horizontal,i,24,_,e.overscaling,t.default$8);P<D.length;P+=1){var R=D[P],B=n.horizontal;B&&y(e,B.text,E,R)||L(I,R)}else if(\\\"Polygon\\\"===r.type)for(var F=0,N=t.default$26(r.geometry,0);F<N.length;F+=1){var j=N[F],V=h(j,16);L(j[0],new t.default$25(V.x,V.y,0))}else if(\\\"LineString\\\"===r.type)for(var U=0,q=r.geometry;U<q.length;U+=1){var H=q[U];L(H,new t.default$25(H[0].x,H[0].y,0))}else if(\\\"Point\\\"===r.type)for(var G=0,W=r.geometry;G<W.length;G+=1)for(var Y=0,X=W[G];Y<X.length;Y+=1){var Z=X[Y];L([Z],new t.default$25(Z.x,Z.y,0))}}function m(e,r,n,i,a,o,s,l,c,u,f,h){var p=function(e,r,n,i,a,o){for(var s=n.layout.get(\\\"text-rotate\\\").evaluate(a)*Math.PI/180,l=n.layout.get(\\\"text-offset\\\").evaluate(a).map(function(t){return 24*t}),c=r.positionedGlyphs,u=[],f=0;f<c.length;f++){var h=c[f],p=o[h.glyph];if(p){var d=p.rect;if(d){var g=t.GLYPH_PBF_BORDER+1,v=p.metrics.advance/2,m=i?[h.x+v,h.y]:[0,0],y=i?[0,0]:[h.x+v+l[0],h.y+l[1]],x=p.metrics.left-g-v+y[0],b=-p.metrics.top-g+y[1],_=x+d.w,w=b+d.h,k=new t.default$1(x,b),M=new t.default$1(_,b),A=new t.default$1(x,w),T=new t.default$1(_,w);if(i&&h.vertical){var S=new t.default$1(-v,v),C=-Math.PI/2,E=new t.default$1(5,0);k._rotateAround(C,S)._add(E),M._rotateAround(C,S)._add(E),A._rotateAround(C,S)._add(E),T._rotateAround(C,S)._add(E)}if(s){var L=Math.sin(s),z=Math.cos(s),O=[z,-L,L,z];k._matMult(O),M._matMult(O),A._matMult(O),T._matMult(O)}u.push({tl:k,tr:M,bl:A,br:T,tex:d,writingMode:r.writingMode,glyphOffset:m})}}}return u}(0,n,i,a,o,f),d=e.textSizeData,g=null;return\\\"source\\\"===d.functionType?g=[10*i.layout.get(\\\"text-size\\\").evaluate(o)]:\\\"composite\\\"===d.functionType&&(g=[10*h.compositeTextSizes[0].evaluate(o),10*h.compositeTextSizes[1].evaluate(o)]),e.addSymbols(e.text,p,g,s,a,o,c,r,l.lineStartIndex,l.lineLength),u.push(e.text.placedSymbolArray.length-1),4*p.length}function y(t,e,r,n){var i=t.compareText;if(e in i){for(var a=i[e],o=a.length-1;o>=0;o--)if(n.dist(a[o])<r)return!0}else i[e]=[];return i[e].push(n),!1}u.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,a=e[i];if(r(n,a)>=0)break;e[t]=a,t=i}e[t]=n},_down:function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t<n;){var a=1+(t<<1),o=a+1,s=e[a];if(o<this.length&&r(e[o],s)<0&&(a=o,s=e[o]),r(s,i)>=0)break;e[t]=s,t=a}e[t]=i}},l.default=c;var x=function(e){var r=new t.AlphaImage({width:0,height:0}),n={},i=new t.default$2(0,0,{autoResize:!0});for(var a in e){var o=e[a],s=n[a]={};for(var l in o){var c=o[+l];if(c&&0!==c.bitmap.width&&0!==c.bitmap.height){var u=i.packOne(c.bitmap.width+2,c.bitmap.height+2);r.resize({width:i.w,height:i.h}),t.AlphaImage.copy(c.bitmap,r,{x:0,y:0},{x:u.x+1,y:u.y+1},c.bitmap),s[l]={rect:u,metrics:c.metrics}}}}i.shrink(),r.resize({width:i.w,height:i.h}),this.image=r,this.positions=n};t.register(\\\"GlyphAtlas\\\",x);var b=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming};function _(e,r){for(var n=new t.default$16(r),i=0,a=e;i<a.length;i+=1)a[i].recalculate(n)}b.prototype.parse=function(e,r,n,i){var a=this;this.status=\\\"parsing\\\",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var o=new t.default$27(Object.keys(e.layers).sort()),s=new t.default$11(this.tileID);s.bucketLayerIDs=[];var l,c,u,f={},h={featureIndex:s,iconDependencies:{},glyphDependencies:{}},p=r.familiesBySource[this.source];for(var d in p){var v=e.layers[d];if(v){1===v.version&&t.warnOnce('Vector tile source \\\"'+a.source+'\\\" layer \\\"'+d+'\\\" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var m=o.encode(d),y=[],b=0;b<v.length;b++){var w=v.feature(b);y.push({feature:w,index:b,sourceLayerIndex:m})}for(var k=0,M=p[d];k<M.length;k+=1){var A=M[k],T=A[0];T.minzoom&&a.zoom<Math.floor(T.minzoom)||T.maxzoom&&a.zoom>=T.maxzoom||\\\"none\\\"!==T.visibility&&(_(A,a.zoom),(f[T.id]=T.createBucket({index:s.bucketLayerIDs.length,layers:A,zoom:a.zoom,pixelRatio:a.pixelRatio,overscaling:a.overscaling,collisionBoxArray:a.collisionBoxArray,sourceLayerIndex:m})).populate(y,h),s.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var S=t.mapObject(h.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(S).length?n.send(\\\"getGlyphs\\\",{uid:this.uid,stacks:S},function(t,e){l||(l=t,c=e,E.call(a))}):c={};var C=Object.keys(h.iconDependencies);function E(){if(l)return i(l);if(c&&u){var e=new x(c),r=new t.default$28(u);for(var n in f){var a=f[n];a instanceof t.default$14&&(_(a.layers,this.zoom),g(a,c,e.positions,u,r.positions,this.showCollisionBoxes))}this.status=\\\"done\\\",i(null,{buckets:t.values(f).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,iconAtlasImage:r.image})}}C.length?n.send(\\\"getImages\\\",{icons:C},function(t,e){l||(l=t,u=e,E.call(a))}):u={},E.call(this)};var w=function(t){return!(!performance||!performance.getEntriesByName)&&performance.getEntriesByName(t)};function k(e,r){var n=t.getArrayBuffer(e.request,function(e,n){e?r(e):n&&r(null,{vectorTile:new t.default$29.VectorTile(new t.default$30(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires})});return function(){n.abort(),r()}}var M=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||k,this.loading={},this.loaded={}};M.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var a=this.loading[i]=new b(e);a.abort=this.loadVectorData(e,function(o,s){if(delete n.loading[i],o||!s)return r(o);var l=s.rawData,c={};s.expires&&(c.expires=s.expires),s.cacheControl&&(c.cacheControl=s.cacheControl);var u={};if(e.request&&e.request.collectResourceTiming){var f=w(e.request.url);f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))}),n.loaded=n.loaded||{},n.loaded[i]=a})},M.prototype.reloadTile=function(t,e){var r=this.loaded,n=t.uid,i=this;if(r&&r[n]){var a=r[n];a.showCollisionBoxes=t.showCollisionBoxes;var o=function(t,r){var n=a.reloadCallback;n&&(delete a.reloadCallback,a.parse(a.vectorTile,i.layerIndex,i.actor,n)),e(t,r)};\\\"parsing\\\"===a.status?a.reloadCallback=o:\\\"done\\\"===a.status&&a.parse(a.vectorTile,this.layerIndex,this.actor,o)}},M.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),e()},M.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var A=function(){this.loading={},this.loaded={}};A.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=new t.default$31(n);this.loading[n]=a,a.loadFromImage(e.rawImageData,i),delete this.loading[n],this.loaded=this.loaded||{},this.loaded[n]=a,r(null,a)},A.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var T={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function S(t){var e=0;if(t&&t.length>0){e+=Math.abs(C(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(C(t[r]))}return e}function C(t){var e,r,n,i,a,o,s=0,l=t.length;if(l>2){for(o=0;o<l;o++)o===l-2?(n=l-2,i=l-1,a=0):o===l-1?(n=l-1,i=0,a=1):(n=o,i=o+1,a=o+2),e=t[n],r=t[i],s+=(E(t[a][0])-E(e[0]))*Math.sin(E(r[1]));s=s*T.RADIUS*T.RADIUS/2}return s}function E(t){return t*Math.PI/180}var L={geometry:function t(e){var r,n=0;switch(e.type){case\\\"Polygon\\\":return S(e.coordinates);case\\\"MultiPolygon\\\":for(r=0;r<e.coordinates.length;r++)n+=S(e.coordinates[r]);return n;case\\\"Point\\\":case\\\"MultiPoint\\\":case\\\"LineString\\\":case\\\"MultiLineString\\\":return 0;case\\\"GeometryCollection\\\":for(r=0;r<e.geometries.length;r++)n+=t(e.geometries[r]);return n}},ring:C};function z(t,e){return function(r){return t(r,e)}}function O(t,e){e=!!e,t[0]=I(t[0],e);for(var r=1;r<t.length;r++)t[r]=I(t[r],!e);return t}function I(t,e){return function(t){return L.ring(t)>=0}(t)===e?t:t.reverse()}var P=t.default$29.VectorTileFeature.prototype.toGeoJSON,D=function(e){this._feature=e,this.extent=t.default$8,this.type=e.type,this.properties=e.tags,\\\"id\\\"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};D.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r<n.length;r+=1){var i=n[r];e.push([new t.default$1(i[0],i[1])])}return e}for(var a=[],o=0,s=this._feature.geometry;o<s.length;o+=1){for(var l=[],c=0,u=s[o];c<u.length;c+=1){var f=u[c];l.push(new t.default$1(f[0],f[1]))}a.push(l)}return a},D.prototype.toGeoJSON=function(t,e,r){return P.call(this,t,e,r)};var R=function(e){this.layers={_geojsonTileLayer:this},this.name=\\\"_geojsonTileLayer\\\",this.extent=t.default$8,this.length=e.length,this._features=e};R.prototype.feature=function(t){return new D(this._features[t])};var B=t.__moduleExports.VectorTileFeature,F=N;function N(t,e){this.options=e||{},this.features=t,this.length=t.length}function j(t,e){this.id=\\\"number\\\"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}N.prototype.feature=function(t){return new j(this.features[t],this.options.extent)},j.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var n=e[r],i=[],a=0;a<n.length;a++)i.push(new t.default$32(n[a][0],n[a][1]));this.geometry.push(i)}return this.geometry},j.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},j.prototype.toGeoJSON=B.prototype.toGeoJSON;var V=H,U=H,q=F;function H(e){var r=new t.__moduleExports$1;return function(t,e){for(var r in t.layers)e.writeMessage(3,G,t.layers[r])}(e,r),r.finish()}function G(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||\\\"\\\"),e.writeVarintField(5,t.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)n.feature=t.feature(r),e.writeMessage(2,W,n);var i=n.keys;for(r=0;r<i.length;r++)e.writeStringField(3,i[r]);var a=n.values;for(r=0;r<a.length;r++)e.writeMessage(4,J,a[r])}function W(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,Y,t),e.writeVarintField(3,r.type),e.writeMessage(4,$,r)}function Y(t,e){var r=t.feature,n=t.keys,i=t.values,a=t.keycache,o=t.valuecache;for(var s in r.properties){var l=a[s];void 0===l&&(n.push(s),l=n.length-1,a[s]=l),e.writeVarint(l);var c=r.properties[s],u=typeof c;\\\"string\\\"!==u&&\\\"boolean\\\"!==u&&\\\"number\\\"!==u&&(c=JSON.stringify(c));var f=u+\\\":\\\"+c,h=o[f];void 0===h&&(i.push(c),h=i.length-1,o[f]=h),e.writeVarint(h)}}function X(t,e){return(e<<3)+(7&t)}function Z(t){return t<<1^t>>31}function $(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s<o;s++){var l=r[s],c=1;1===n&&(c=l.length),e.writeVarint(X(1,c));for(var u=3===n?l.length-1:l.length,f=0;f<u;f++){1===f&&1!==n&&e.writeVarint(X(2,u-1));var h=l[f].x-i,p=l[f].y-a;e.writeVarint(Z(h)),e.writeVarint(Z(p)),i+=h,a+=p}3===n&&e.writeVarint(X(7,0))}}function J(t,e){var r=typeof t;\\\"string\\\"===r?e.writeStringField(1,t):\\\"boolean\\\"===r?e.writeBooleanField(7,t):\\\"number\\\"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}V.fromVectorTileJs=U,V.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var n in t)r[n]=new F(t[n].features,e),r[n].name=n,r[n].version=e.version,r[n].extent=e.extent;return H({layers:r})},V.GeoJSONWrapper=q;var K=function t(e,r,n,i,a,o){if(!(a-i<=n)){var s=Math.floor((i+a)/2);!function t(e,r,n,i,a,o){for(;a>i;){if(a-i>600){var s=a-i+1,l=n-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(e,r,n,Math.max(i,Math.floor(n-l*u/s+f)),Math.min(a,Math.floor(n+(s-l)*u/s+f)),o)}var h=r[2*n+o],p=i,d=a;for(Q(e,r,i,n),r[2*a+o]>h&&Q(e,r,i,a);p<d;){for(Q(e,r,p,d),p++,d--;r[2*p+o]<h;)p++;for(;r[2*d+o]>h;)d--}r[2*i+o]===h?Q(e,r,i,d):Q(e,r,++d,a),d<=n&&(i=d+1),n<=d&&(a=d-1)}}(e,r,s,i,a,o%2),t(e,r,n,i,s-1,o+1),t(e,r,n,s+1,a,o+1)}};function Q(t,e,r,n){tt(t,r,n),tt(e,2*r,2*n),tt(e,2*r+1,2*n+1)}function tt(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function et(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}var rt=function(t,e,r,n,i){return new nt(t,e,r,n,i)};function nt(t,e,r,n,i){e=e||it,r=r||at,i=i||Array,this.nodeSize=n||64,this.points=t,this.ids=new i(t.length),this.coords=new i(2*t.length);for(var a=0;a<t.length;a++)this.ids[a]=a,this.coords[2*a]=e(t[a]),this.coords[2*a+1]=r(t[a]);K(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function it(t){return t[0]}function at(t){return t[1]}nt.prototype={range:function(t,e,r,n){return function(t,e,r,n,i,a,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var f=c.pop(),h=c.pop(),p=c.pop();if(h-p<=o)for(var d=p;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[d]);else{var g=Math.floor((p+h)/2);s=e[2*g],l=e[2*g+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[g]);var v=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(v)),(0===f?i>=s:a>=l)&&(c.push(g+1),c.push(h),c.push(v))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},within:function(t,e,r){return function(t,e,r,n,i,a){for(var o=[0,t.length-1,0],s=[],l=i*i;o.length;){var c=o.pop(),u=o.pop(),f=o.pop();if(u-f<=a)for(var h=f;h<=u;h++)et(e[2*h],e[2*h+1],r,n)<=l&&s.push(t[h]);else{var p=Math.floor((f+u)/2),d=e[2*p],g=e[2*p+1];et(d,g,r,n)<=l&&s.push(t[p]);var v=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(v)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(v))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)}};function ot(t){this.options=pt(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function st(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function lt(t,e){var r=t.geometry.coordinates;return{x:ft(r[0]),y:ht(r[1]),zoom:1/0,id:e,parentId:-1}}function ct(t){return{type:\\\"Feature\\\",properties:ut(t),geometry:{type:\\\"Point\\\",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function ut(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\\\"k\\\":e>=1e3?Math.round(e/100)/10+\\\"k\\\":e;return pt(pt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function ft(t){return t/360+.5}function ht(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function pt(t,e){for(var r in e)t[r]=e[r];return t}function dt(t){return t.x}function gt(t){return t.y}function vt(t,e,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function mt(t,e,r,n){var i={id:t||null,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if(\\\"Point\\\"===r||\\\"MultiPoint\\\"===r||\\\"LineString\\\"===r)yt(t,e);else if(\\\"Polygon\\\"===r||\\\"MultiLineString\\\"===r)for(var n=0;n<e.length;n++)yt(t,e[n]);else if(\\\"MultiPolygon\\\"===r)for(n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)yt(t,e[n][i])}(i),i}function yt(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function xt(t,e,r){if(e.geometry){var n=e.geometry.coordinates,i=e.geometry.type,a=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),o=[];if(\\\"Point\\\"===i)bt(n,o);else if(\\\"MultiPoint\\\"===i)for(var s=0;s<n.length;s++)bt(n[s],o);else if(\\\"LineString\\\"===i)_t(n,o,a,!1);else if(\\\"MultiLineString\\\"===i)if(r.lineMetrics)for(s=0;s<n.length;s++)return o=[],_t(n[s],o,a,!1),void t.push(mt(e.id,\\\"LineString\\\",o,e.properties));else wt(n,o,a,!1);else if(\\\"Polygon\\\"===i)wt(n,o,a,!0);else{if(\\\"MultiPolygon\\\"!==i){if(\\\"GeometryCollection\\\"===i){for(s=0;s<e.geometry.geometries.length;s++)xt(t,{id:e.id,geometry:e.geometry.geometries[s],properties:e.properties},r);return}throw new Error(\\\"Input data is not a valid GeoJSON object.\\\")}for(s=0;s<n.length;s++){var l=[];wt(n[s],l,a,!0),o.push(l)}}t.push(mt(e.id,i,o,e.properties))}}function bt(t,e){e.push(kt(t[0])),e.push(Mt(t[1])),e.push(0)}function _t(t,e,r,n){for(var i,a,o=0,s=0;s<t.length;s++){var l=kt(t[s][0]),c=Mt(t[s][1]);e.push(l),e.push(c),e.push(0),s>0&&(o+=n?(i*c-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-a,2))),i=l,a=c}var u=e.length-3;e[2]=1,function t(e,r,n,i){for(var a,o=i,s=e[r],l=e[r+1],c=e[n],u=e[n+1],f=r+3;f<n;f+=3){var h=vt(e[f],e[f+1],s,l,c,u);h>o&&(a=f,o=h)}o>i&&(a-r>3&&t(e,r,a,i),e[a+2]=o,n-a>3&&t(e,a,n,i))}(e,0,u,r),e[u+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function wt(t,e,r,n){for(var i=0;i<t.length;i++){var a=[];_t(t[i],a,r,n),e.push(a)}}function kt(t){return t/360+.5}function Mt(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function At(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o<=n)return t;if(a>n||o<r)return null;for(var l=[],c=0;c<t.length;c++){var u=t[c],f=u.geometry,h=u.type,p=0===i?u.minX:u.minY,d=0===i?u.maxX:u.maxY;if(p>=r&&d<=n)l.push(u);else if(!(p>n||d<r)){var g=[];if(\\\"Point\\\"===h||\\\"MultiPoint\\\"===h)Tt(f,g,r,n,i);else if(\\\"LineString\\\"===h)St(f,g,r,n,i,!1,s.lineMetrics);else if(\\\"MultiLineString\\\"===h)Et(f,g,r,n,i,!1);else if(\\\"Polygon\\\"===h)Et(f,g,r,n,i,!0);else if(\\\"MultiPolygon\\\"===h)for(var v=0;v<f.length;v++){var m=[];Et(f[v],m,r,n,i,!0),m.length&&g.push(m)}if(g.length){if(s.lineMetrics&&\\\"LineString\\\"===h){for(v=0;v<g.length;v++)l.push(mt(u.id,h,g[v],u.tags));continue}\\\"LineString\\\"!==h&&\\\"MultiLineString\\\"!==h||(1===g.length?(h=\\\"LineString\\\",g=g[0]):h=\\\"MultiLineString\\\"),\\\"Point\\\"!==h&&\\\"MultiPoint\\\"!==h||(h=3===g.length?\\\"Point\\\":\\\"MultiPoint\\\"),l.push(mt(u.id,h,g,u.tags))}}}return l.length?l:null}function Tt(t,e,r,n,i){for(var a=0;a<t.length;a+=3){var o=t[a+i];o>=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function St(t,e,r,n,i,a,o){for(var s,l,c=Ct(t),u=0===i?zt:Ot,f=t.start,h=0;h<t.length-3;h+=3){var p=t[h],d=t[h+1],g=t[h+2],v=t[h+3],m=t[h+4],y=0===i?p:d,x=0===i?v:m,b=!1;o&&(s=Math.sqrt(Math.pow(p-v,2)+Math.pow(d-m,2))),y<r?x>=r&&(l=u(c,p,d,v,m,r),o&&(c.start=f+s*l)):y>n?x<=n&&(l=u(c,p,d,v,m,n),o&&(c.start=f+s*l)):Lt(c,p,d,g),x<r&&y>=r&&(l=u(c,p,d,v,m,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,v,m,n),b=!0),!a&&b&&(o&&(c.end=f+s*l),e.push(c),c=Ct(t)),o&&(f+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===i?p:d)>=r&&y<=n&&Lt(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&Lt(c,c[0],c[1],c[2]),c.length&&e.push(c)}function Ct(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Et(t,e,r,n,i,a){for(var o=0;o<t.length;o++)St(t[o],e,r,n,i,a,!1)}function Lt(t,e,r,n){t.push(e),t.push(r),t.push(n)}function zt(t,e,r,n,i,a){var o=(a-e)/(n-e);return t.push(a),t.push(r+(i-r)*o),t.push(1),o}function Ot(t,e,r,n,i,a){var o=(a-r)/(i-r);return t.push(e+(n-e)*o),t.push(a),t.push(1),o}function It(t,e){for(var r=[],n=0;n<t.length;n++){var i,a=t[n],o=a.type;if(\\\"Point\\\"===o||\\\"MultiPoint\\\"===o||\\\"LineString\\\"===o)i=Pt(a.geometry,e);else if(\\\"MultiLineString\\\"===o||\\\"Polygon\\\"===o){i=[];for(var s=0;s<a.geometry.length;s++)i.push(Pt(a.geometry[s],e))}else if(\\\"MultiPolygon\\\"===o)for(i=[],s=0;s<a.geometry.length;s++){for(var l=[],c=0;c<a.geometry[s].length;c++)l.push(Pt(a.geometry[s][c],e));i.push(l)}r.push(mt(a.id,o,i,a.tags))}return r}function Pt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var n=0;n<t.length;n+=3)r.push(t[n]+e,t[n+1],t[n+2]);return r}function Dt(t,e){if(t.transformed)return t;var r,n,i,a=1<<t.z,o=t.x,s=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(n=0;n<c.length;n+=2)l.geometry.push(Rt(c[n],c[n+1],e,a,o,s));else for(n=0;n<c.length;n++){var f=[];for(i=0;i<c[n].length;i+=2)f.push(Rt(c[n][i],c[n][i+1],e,a,o,s));l.geometry.push(f)}}return t.transformed=!0,t}function Rt(t,e,r,n,i,a){return[Math.round(r*(t*n-i)),Math.round(r*(e*n-a))]}function Bt(t,e,r,n,i){for(var a=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){o.numFeatures++,Ft(o,t[s],a,i);var l=t[s].minX,c=t[s].minY,u=t[s].maxX,f=t[s].maxY;l<o.minX&&(o.minX=l),c<o.minY&&(o.minY=c),u>o.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function Ft(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(\\\"Point\\\"===a||\\\"MultiPoint\\\"===a)for(var s=0;s<i.length;s+=3)o.push(i[s]),o.push(i[s+1]),t.numPoints++,t.numSimplified++;else if(\\\"LineString\\\"===a)Nt(o,i,t,r,!1,!1);else if(\\\"MultiLineString\\\"===a||\\\"Polygon\\\"===a)for(s=0;s<i.length;s++)Nt(o,i[s],t,r,\\\"Polygon\\\"===a,0===s);else if(\\\"MultiPolygon\\\"===a)for(var l=0;l<i.length;l++){var c=i[l];for(s=0;s<c.length;s++)Nt(o,c[s],t,r,!0,0===s)}if(o.length){var u=e.tags||null;if(\\\"LineString\\\"===a&&n.lineMetrics){for(var f in u={},e.tags)u[f]=e.tags[f];u.mapbox_clip_start=i.start/i.size,u.mapbox_clip_end=i.end/i.size}var h={geometry:o,type:\\\"Polygon\\\"===a||\\\"MultiPolygon\\\"===a?3:\\\"LineString\\\"===a||\\\"MultiLineString\\\"===a?2:1,tags:u};null!==e.id&&(h.id=e.id),t.features.push(h)}}function Nt(t,e,r,n,i,a){var o=n*n;if(n>0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===n||e[l+2]>o)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&&function(t,e){for(var r=0,n=0,i=t.length,a=i-2;n<i;a=n,n+=2)r+=(t[n]-t[a])*(t[n+1]+t[a+1]);if(r>0===e)for(n=0,i=t.length;n<i/2;n+=2){var o=t[n],s=t[n+1];t[n]=t[i-2-n],t[n+1]=t[i-1-n],t[i-2-n]=o,t[i-1-n]=s}}(s,a),t.push(s)}}function jt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&&console.time(\\\"preprocess data\\\"),e.maxZoom<0||e.maxZoom>24)throw new Error(\\\"maxZoom should be in the 0-24 range\\\");var n=function(t,e){var r=[];if(\\\"FeatureCollection\\\"===t.type)for(var n=0;n<t.features.length;n++)xt(r,t.features[n],e);else\\\"Feature\\\"===t.type?xt(r,t,e):xt(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd(\\\"preprocess data\\\"),console.log(\\\"index: maxZoom: %d, maxPoints: %d\\\",e.indexMaxZoom,e.indexMaxPoints),console.time(\\\"generate tiles\\\"),this.stats={},this.total=0),(n=function(t,e){var r=e.buffer/e.extent,n=t,i=At(t,1,-1-r,r,0,-1,2,e),a=At(t,1,1-r,2+r,0,-1,2,e);return(i||a)&&(n=At(t,1,-r,1+r,0,-1,2,e)||[],i&&(n=It(i,1).concat(n)),a&&(n=n.concat(It(a,-1)))),n}(n,e)).length&&this.splitTile(n,0,0,0),r&&(n.length&&console.log(\\\"features: %d, points: %d\\\",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(\\\"generate tiles\\\"),console.log(\\\"tiles generated:\\\",this.total,JSON.stringify(this.stats)))}function Vt(t,e,r){return 32*((1<<t)*r+e)+t}function Ut(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var n=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!n)return e(null,null);var i=new R(n.features),a=V(i);0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),e(null,{vectorTile:i,rawData:a.buffer})}ot.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time(\\\"total time\\\");var r=\\\"prepare \\\"+t.length+\\\" points\\\";e&&console.time(r),this.points=t;var n=t.map(lt);e&&console.timeEnd(r);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=rt(n,dt,gt,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&&console.log(\\\"z%d: %d clusters in %dms\\\",i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=rt(n,dt,gt,this.options.nodeSize,Float32Array),e&&console.timeEnd(\\\"total time\\\"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(ft(t[0]),ht(t[3]),ft(t[2]),ht(t[1])),i=[],a=0;a<n.length;a++){var o=r.points[n[a]];i.push(o.numPoints?ct(o):this.points[o.id])}return i},getChildren:function(t,e){for(var r=this.trees[e+1].points[t],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(r.x,r.y,n),a=[],o=0;o<i.length;o++){var s=this.trees[e+1].points[i[o]];s.parentId===t&&a.push(s.numPoints?ct(s):this.points[s.id])}return a},getLeaves:function(t,e,r,n){r=r||10,n=n||0;var i=[];return this._appendLeaves(i,t,e,r,n,0),i},getTile:function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),a=this.options.extent,o=this.options.radius/a,s=(r-o)/i,l=(r+1+o)/i,c={features:[]};return this._addTileFeatures(n.range((e-o)/i,s,(e+1+o)/i,l),n.points,e,r,i,c),0===e&&this._addTileFeatures(n.range(1-o/i,s,1,l),n.points,i,r,i,c),e===i-1&&this._addTileFeatures(n.range(0,s,o/i,l),n.points,-1,r,i,c),c.features.length?c:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var r=this.getChildren(t,e);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,n,i,a){for(var o=this.getChildren(e,r),s=0;s<o.length;s++){var l=o[s].properties;if(l.cluster?a+l.point_count<=i?a+=l.point_count:a=this._appendLeaves(t,l.cluster_id,r+1,n,i,a):a<i?a++:t.push(o[s]),t.length===n)break}return a},_addTileFeatures:function(t,e,r,n,i,a){for(var o=0;o<t.length;o++){var s=e[t[o]];a.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*i-r)),Math.round(this.options.extent*(s.y*i-n))]],tags:s.numPoints?ut(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i<t.length;i++){var a=t[i];if(!(a.zoom<=e)){a.zoom=e;var o=this.trees[e+1],s=o.within(a.x,a.y,n),l=a.numPoints||1,c=a.x*l,u=a.y*l,f=null;this.options.reduce&&(f=this.options.initial(),this._accumulate(f,a));for(var h=0;h<s.length;h++){var p=o.points[s[h]];if(e<p.zoom){var d=p.numPoints||1;p.zoom=e,c+=p.x*d,u+=p.y*d,l+=d,p.parentId=i,this.options.reduce&&this._accumulate(f,p)}}1===l?r.push(a):(a.parentId=i,r.push(st(c/l,u/l,l,i,f)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}},jt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,debug:0},jt.prototype.splitTile=function(t,e,r,n,i,a,o){for(var s=[t,e,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var u=1<<e,f=Vt(e,r,n),h=this.tiles[f];if(!h&&(c>1&&console.time(\\\"creation\\\"),h=this.tiles[f]=Bt(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),c)){c>1&&(console.log(\\\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\\\",e,r,n,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd(\\\"creation\\\"));var p=\\\"z\\\"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<<i-e;if(r!==Math.floor(a/d)||n!==Math.floor(o/d))continue}else if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){c>1&&console.time(\\\"clipping\\\");var g,v,m,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,M=1+_;g=v=m=y=null,x=At(t,u,r-_,r+k,0,h.minX,h.maxX,l),b=At(t,u,r+w,r+M,0,h.minX,h.maxX,l),t=null,x&&(g=At(x,u,n-_,n+k,1,h.minY,h.maxY,l),v=At(x,u,n+w,n+M,1,h.minY,h.maxY,l),x=null),b&&(m=At(b,u,n-_,n+k,1,h.minY,h.maxY,l),y=At(b,u,n+w,n+M,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd(\\\"clipping\\\"),s.push(g||[],e+1,2*r,2*n),s.push(v||[],e+1,2*r,2*n+1),s.push(m||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},jt.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug;if(t<0||t>24)return null;var o=1<<t,s=Vt(t,e=(e%o+o)%o,r);if(this.tiles[s])return Dt(this.tiles[s],i);a>1&&console.log(\\\"drilling down to z%d-%d-%d\\\",t,e,r);for(var l,c=t,u=e,f=r;!l&&c>0;)c--,u=Math.floor(u/2),f=Math.floor(f/2),l=this.tiles[Vt(c,u,f)];return l&&l.source?(a>1&&console.log(\\\"found parent tile z%d-%d-%d\\\",c,u,f),a>1&&console.time(\\\"drilling down\\\"),this.splitTile(l.source,c,u,f,t,e,r),a>1&&console.timeEnd(\\\"drilling down\\\"),this.tiles[s]?Dt(this.tiles[s],i):null):null};var qt=function(e){function r(t,r,n){e.call(this,t,r,Ut),n&&(this.loadGeoJSON=n)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&\\\"Idle\\\"!==this._state?this._state=\\\"NeedsLoadData\\\":(this._state=\\\"Coalescing\\\",this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var e=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams,this.loadGeoJSON(r,function(n,i){if(n||!i)return e(n);if(\\\"object\\\"!=typeof i)return e(new Error(\\\"Input data is not a valid GeoJSON object.\\\"));!function t(e,r){switch(e&&e.type||null){case\\\"FeatureCollection\\\":return e.features=e.features.map(z(t,r)),e;case\\\"Feature\\\":return e.geometry=t(e.geometry,r),e;case\\\"Polygon\\\":case\\\"MultiPolygon\\\":return function(t,e){return\\\"Polygon\\\"===t.type?t.coordinates=O(t.coordinates,e):\\\"MultiPolygon\\\"===t.type&&(t.coordinates=t.coordinates.map(z(O,e))),t}(e,r);default:return e}}(i,!0);try{t._geoJSONIndex=r.cluster?function(t){return new ot(t)}(r.superclusterOptions).load(i.features):new jt(i,r.geojsonVtOptions)}catch(n){return e(n)}t.loaded={};var a={};if(r.request&&r.request.collectResourceTiming){var o=w(r.request.url);o&&(a.resourceTiming={},a.resourceTiming[r.source]=JSON.parse(JSON.stringify(o)))}e(null,a)})}},r.prototype.coalesce=function(){\\\"Coalescing\\\"===this._state?this._state=\\\"Idle\\\":\\\"NeedsLoadData\\\"===this._state&&(this._state=\\\"Coalescing\\\",this._loadData())},r.prototype.reloadTile=function(t,r){var n=this.loaded,i=t.uid;return n&&n[i]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if(\\\"string\\\"!=typeof e.data)return r(new Error(\\\"Input data is not a valid GeoJSON object.\\\"));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error(\\\"Input data is not a valid GeoJSON object.\\\"))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r}(M),Ht=function(e){var r=this;this.self=e,this.actor=new t.default$7(e,this),this.layerIndexes={},this.workerSourceTypes={vector:M,geojson:qt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name \\\"'+t+'\\\" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error(\\\"RTL text plugin already registered.\\\");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText}};return Ht.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},Ht.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},Ht.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},Ht.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},Ht.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},Ht.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},Ht.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},Ht.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},Ht.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var n=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==n.removeSource?n.removeSource(e,r):r()}},Ht.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},Ht.prototype.loadRTLTextPlugin=function(e,r,n){try{t.plugin.isLoaded()||(this.self.importScripts(r),n(t.plugin.isLoaded()?null:new Error(\\\"RTL Text Plugin failed to import scripts from \\\"+r)))}catch(t){n(t.toString())}},Ht.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new n),e},Ht.prototype.getWorkerSource=function(t,e,r){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var i={send:function(e,r,i){n.actor.send(e,r,i,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](i,this.getLayerIndex(t))}return this.workerSources[t][e][r]},Ht.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new A),this.demWorkerSources[t][e]},\\\"undefined\\\"!=typeof WorkerGlobalScope&&\\\"undefined\\\"!=typeof self&&self instanceof WorkerGlobalScope&&new Ht(self),Ht}),i(0,function(t){var e=t.createCommonjsModule(function(t){function e(t){return!!(\\\"undefined\\\"!=typeof window&&\\\"undefined\\\"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&\\\"JSON\\\"in window&&\\\"parse\\\"in JSON&&\\\"stringify\\\"in JSON&&function(){if(!(\\\"Worker\\\"in window&&\\\"Blob\\\"in window&&\\\"URL\\\"in window))return!1;var t,e,r=new Blob([\\\"\\\"],{type:\\\"text/javascript\\\"}),n=URL.createObjectURL(r);try{e=new Worker(n),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(n),t}()&&\\\"Uint8ClampedArray\\\"in window&&function(t){return void 0===r[t]&&(r[t]=function(t){var r=document.createElement(\\\"canvas\\\"),n=Object.create(e.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext(\\\"webgl\\\",n)||r.probablySupportsContext(\\\"experimental-webgl\\\",n):r.supportsContext?r.supportsContext(\\\"webgl\\\",n)||r.supportsContext(\\\"experimental-webgl\\\",n):r.getContext(\\\"webgl\\\",n)||r.getContext(\\\"experimental-webgl\\\",n)}(t)),r[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),r=t.default.performance&&t.default.performance.now?t.default.performance.now.bind(t.default.performance):Date.now.bind(Date),n=t.default.requestAnimationFrame||t.default.mozRequestAnimationFrame||t.default.webkitRequestAnimationFrame||t.default.msRequestAnimationFrame,i=t.default.cancelAnimationFrame||t.default.mozCancelAnimationFrame||t.default.webkitCancelAnimationFrame||t.default.msCancelAnimationFrame,a={now:r,frame:function(t){return n(t)},cancelFrame:function(t){return i(t)},getImageData:function(e){var r=t.default.document.createElement(\\\"canvas\\\"),n=r.getContext(\\\"2d\\\");if(!n)throw new Error(\\\"failed to create canvas 2d context\\\");return r.width=e.width,r.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(0,0,e.width,e.height)},hardwareConcurrency:t.default.navigator.hardwareConcurrency||4,get devicePixelRatio(){return t.default.devicePixelRatio},supportsWebp:!1};if(t.default.document){var o=t.default.document.createElement(\\\"img\\\");o.onload=function(){a.supportsWebp=!0},o.src=\\\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\\\"}var s={create:function(e,r,n){var i=t.default.document.createElement(e);return r&&(i.className=r),n&&n.appendChild(i),i},createNS:function(e,r){return t.default.document.createElementNS(e,r)}},l=t.default.document?t.default.document.documentElement.style:null;function c(t){if(!l)return null;for(var e=0;e<t.length;e++)if(t[e]in l)return t[e];return t[0]}var u,f=c([\\\"userSelect\\\",\\\"MozUserSelect\\\",\\\"WebkitUserSelect\\\",\\\"msUserSelect\\\"]);s.disableDrag=function(){l&&f&&(u=l[f],l[f]=\\\"none\\\")},s.enableDrag=function(){l&&f&&(l[f]=u)};var h=c([\\\"transform\\\",\\\"WebkitTransform\\\"]);s.setTransform=function(t,e){t.style[h]=e};var p=!1;try{var d=Object.defineProperty({},\\\"passive\\\",{get:function(){p=!0}});t.default.addEventListener(\\\"test\\\",d,d),t.default.removeEventListener(\\\"test\\\",d,d)}catch(t){p=!1}s.addEventListener=function(t,e,r,n){void 0===n&&(n={}),\\\"passive\\\"in n&&p?t.addEventListener(e,r,n):t.addEventListener(e,r,n.capture)},s.removeEventListener=function(t,e,r,n){void 0===n&&(n={}),\\\"passive\\\"in n&&p?t.removeEventListener(e,r,n):t.removeEventListener(e,r,n.capture)};var g=function(e){e.preventDefault(),e.stopPropagation(),t.default.removeEventListener(\\\"click\\\",g,!0)};s.suppressClick=function(){t.default.addEventListener(\\\"click\\\",g,!0),t.default.setTimeout(function(){t.default.removeEventListener(\\\"click\\\",g,!0)},0)},s.mousePos=function(e,r){var n=e.getBoundingClientRect();return r=r.touches?r.touches[0]:r,new t.default$1(r.clientX-n.left-e.clientLeft,r.clientY-n.top-e.clientTop)},s.touchPos=function(e,r){for(var n=e.getBoundingClientRect(),i=[],a=\\\"touchend\\\"===r.type?r.changedTouches:r.touches,o=0;o<a.length;o++)i.push(new t.default$1(a[o].clientX-n.left-e.clientLeft,a[o].clientY-n.top-e.clientTop));return i},s.mouseButton=function(e){return void 0!==t.default.InstallTrigger&&2===e.button&&e.ctrlKey&&t.default.navigator.platform.toUpperCase().indexOf(\\\"MAC\\\")>=0?0:e.button},s.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var v={API_URL:\\\"https://api.mapbox.com\\\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null},m=\\\"See https://www.mapbox.com/api-documentation/#access-tokens\\\";function y(t,e){var r=A(v.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,\\\"/\\\"!==r.path&&(t.path=\\\"\\\"+r.path+t.path),!v.REQUIRE_ACCESS_TOKEN)return T(t);if(!(e=e||v.ACCESS_TOKEN))throw new Error(\\\"An API access token is required to use Mapbox GL. \\\"+m);if(\\\"s\\\"===e[0])throw new Error(\\\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \\\"+m);return t.params.push(\\\"access_token=\\\"+e),T(t)}function x(t){return 0===t.indexOf(\\\"mapbox:\\\")}var b=function(t,e){if(!x(t))return t;var r=A(t);return r.path=\\\"/v4/\\\"+r.authority+\\\".json\\\",r.params.push(\\\"secure\\\"),y(r,e)},_=function(t,e,r,n){var i=A(t);return x(t)?(i.path=\\\"/styles/v1\\\"+i.path+\\\"/sprite\\\"+e+r,y(i,n)):(i.path+=\\\"\\\"+e+r,T(i))},w=/(\\\\.(png|jpg)\\\\d*)(?=$)/,k=function(t,e,r){if(!e||!x(e))return t;var n=A(t),i=a.devicePixelRatio>=2||512===r?\\\"@2x\\\":\\\"\\\",o=a.supportsWebp?\\\".webp\\\":\\\"$1\\\";return n.path=n.path.replace(w,\\\"\\\"+i+o),function(t){for(var e=0;e<t.length;e++)0===t[e].indexOf(\\\"access_token=tk.\\\")&&(t[e]=\\\"access_token=\\\"+(v.ACCESS_TOKEN||\\\"\\\"))}(n.params),T(n)},M=/^(\\\\w+):\\\\/\\\\/([^\\\\/?]*)(\\\\/[^?]+)?\\\\??(.+)?/;function A(t){var e=t.match(M);if(!e)throw new Error(\\\"Unable to parse URL object\\\");return{protocol:e[1],authority:e[2],path:e[3]||\\\"/\\\",params:e[4]?e[4].split(\\\"&\\\"):[]}}function T(t){var e=t.params.length?\\\"?\\\"+t.params.join(\\\"&\\\"):\\\"\\\";return t.protocol+\\\"://\\\"+t.authority+t.path+e}var S=t.default.HTMLImageElement,C=t.default.HTMLCanvasElement,E=t.default.HTMLVideoElement,L=t.default.ImageData,z=function(t,e,r,n){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,n)};z.prototype.update=function(t,e){var r=t.width,n=t.height,i=!this.size||this.size[0]!==r||this.size[1]!==n,a=this.context,o=a.gl;this.useMipmap=Boolean(e&&e.useMipmap),o.bindTexture(o.TEXTURE_2D,this.texture),i?(this.size=[r,n],a.pixelStoreUnpack.set(1),this.format!==o.RGBA||e&&!1===e.premultiply||a.pixelStoreUnpackPremultiplyAlpha.set(!0),t instanceof S||t instanceof C||t instanceof E||t instanceof L?o.texImage2D(o.TEXTURE_2D,0,this.format,this.format,o.UNSIGNED_BYTE,t):o.texImage2D(o.TEXTURE_2D,0,this.format,r,n,0,this.format,o.UNSIGNED_BYTE,t.data)):t instanceof S||t instanceof C||t instanceof E||t instanceof L?o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,t):o.texSubImage2D(o.TEXTURE_2D,0,0,0,r,n,o.RGBA,o.UNSIGNED_BYTE,t.data),this.useMipmap&&this.isSizePowerOfTwo()&&o.generateMipmap(o.TEXTURE_2D)},z.prototype.bind=function(t,e,r){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),r!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=n.LINEAR),t!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)},z.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},z.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var O=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new t.default$2(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=new t.RGBAImage({width:64,height:64}),this.dirty=!0};O.prototype.isLoaded=function(){return this.loaded},O.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var n=r[e],i=n.ids,a=n.callback;this._notify(i,a)}this.requestors=[]}},O.prototype.getImage=function(t){return this.images[t]},O.prototype.addImage=function(t,e){this.images[t]=e},O.prototype.removeImage=function(t){delete this.images[t];var e=this.patterns[t];e&&(this.shelfPack.unref(e.bin),delete this.patterns[t])},O.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var n=0,i=t;n<i.length;n+=1){var a=i[n];this.images[a]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},O.prototype._notify=function(t,e){for(var r={},n=0,i=t;n<i.length;n+=1){var a=i[n],o=this.images[a];o&&(r[a]={data:o.data.clone(),pixelRatio:o.pixelRatio,sdf:o.sdf})}e(null,r)},O.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},O.prototype.getPattern=function(e){var r=this.patterns[e];if(r)return r.position;var n=this.getImage(e);if(!n)return null;var i=n.data.width+2,a=n.data.height+2,o=this.shelfPack.packOne(i,a);if(!o)return null;this.atlasImage.resize(this.getPixelSize());var s=n.data,l=this.atlasImage,c=o.x+1,u=o.y+1,f=s.width,h=s.height;t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u},{width:f,height:h}),t.RGBAImage.copy(s,l,{x:0,y:h-1},{x:c,y:u-1},{width:f,height:1}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u+h},{width:f,height:1}),t.RGBAImage.copy(s,l,{x:f-1,y:0},{x:c-1,y:u},{width:1,height:h}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c+f,y:u},{width:1,height:h}),this.dirty=!0;var p=new t.ImagePosition(o,n);return this.patterns[e]={bin:o,position:p},p},O.prototype.bind=function(t){var e=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new z(t,this.atlasImage,e.RGBA),this.atlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE)};var I=D,P=1e20;function D(t,e,r,n,i,a){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=i||\\\"sans-serif\\\",this.fontWeight=a||\\\"normal\\\",this.radius=r||8;var o=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement(\\\"canvas\\\"),this.canvas.width=this.canvas.height=o,this.ctx=this.canvas.getContext(\\\"2d\\\"),this.ctx.font=this.fontWeight+\\\" \\\"+this.fontSize+\\\"px \\\"+this.fontFamily,this.ctx.textBaseline=\\\"middle\\\",this.ctx.fillStyle=\\\"black\\\",this.gridOuter=new Float64Array(o*o),this.gridInner=new Float64Array(o*o),this.f=new Float64Array(o),this.d=new Float64Array(o),this.z=new Float64Array(o+1),this.v=new Int16Array(o),this.middle=Math.round(o/2*(navigator.userAgent.indexOf(\\\"Gecko/\\\")>=0?1.2:1))}function R(t,e,r,n,i,a,o){for(var s=0;s<e;s++){for(var l=0;l<r;l++)n[l]=t[l*e+s];for(B(n,i,a,o,r),l=0;l<r;l++)t[l*e+s]=i[l]}for(l=0;l<r;l++){for(s=0;s<e;s++)n[s]=t[l*e+s];for(B(n,i,a,o,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(i[s])}}function B(t,e,r,n,i){r[0]=0,n[0]=-P,n[1]=+P;for(var a=1,o=0;a<i;a++){for(var s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=n[o];)o--,s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);r[++o]=a,n[o]=s,n[o+1]=+P}for(a=0,o=0;a<i;a++){for(;n[o+1]<a;)o++;e[a]=(a-r[o])*(a-r[o])+t[r[o]]}}D.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var i=e.data[4*n+3]/255;this.gridOuter[n]=1===i?0:0===i?P:Math.pow(Math.max(0,.5-i),2),this.gridInner[n]=1===i?P:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(R(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),R(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var a=this.gridOuter[n]-this.gridInner[n];r[n]=Math.max(0,Math.min(255,Math.round(255-255*(a/this.radius+this.cutoff))))}return r};var F=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};F.prototype.setURL=function(t){this.url=t},F.prototype.getGlyphs=function(e,r){var n=this,i=[];for(var a in e)for(var o=0,s=e[a];o<s.length;o+=1){var l=s[o];i.push({stack:a,id:l})}t.asyncAll(i,function(t,e){var r=t.stack,i=t.id,a=n.entries[r];a||(a=n.entries[r]={glyphs:{},requests:{}});var o=a.glyphs[i];if(void 0===o)if(o=n._tinySDF(a,r,i))e(null,{stack:r,id:i,glyph:o});else{var s=Math.floor(i/256);if(256*s>65535)e(new Error(\\\"glyphs > 65535 not supported\\\"));else{var l=a.requests[s];l||(l=a.requests[s]=[],F.loadGlyphRange(r,s,n.url,n.requestTransform,function(t,e){if(e)for(var r in e)a.glyphs[+r]=e[+r];for(var n=0,i=l;n<i.length;n+=1)(0,i[n])(t,e);delete a.requests[s]})),l.push(function(t,n){t?e(t):n&&e(null,{stack:r,id:i,glyph:n[i]||null})})}}else e(null,{stack:r,id:i,glyph:o})},function(t,e){if(t)r(t);else if(e){for(var n={},i=0,a=e;i<a.length;i+=1){var o=a[i],s=o.stack,l=o.id,c=o.glyph;(n[s]||(n[s]={}))[l]=c&&{id:c.id,bitmap:c.bitmap.clone(),metrics:c.metrics}}r(null,n)}})},F.prototype._tinySDF=function(e,r,n){var i=this.localIdeographFontFamily;if(i&&(t.default$4[\\\"CJK Unified Ideographs\\\"](n)||t.default$4[\\\"Hangul Syllables\\\"](n))){var a=e.tinySDF;if(!a){var o=\\\"400\\\";/bold/i.test(r)?o=\\\"900\\\":/medium/i.test(r)?o=\\\"500\\\":/light/i.test(r)&&(o=\\\"200\\\"),a=e.tinySDF=new F.TinySDF(24,3,8,.25,i,o)}return{id:n,bitmap:new t.AlphaImage({width:30,height:30},a.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},F.loadGlyphRange=function(e,r,n,i,a){var o=256*r,s=o+255,l=i(function(t,e){if(!x(t))return t;var r=A(t);return r.path=\\\"/fonts/v1\\\"+r.path,y(r,e)}(n).replace(\\\"{fontstack}\\\",e).replace(\\\"{range}\\\",o+\\\"-\\\"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,function(e,r){if(e)a(e);else if(r){for(var n={},i=0,o=t.default$3(r.data);i<o.length;i+=1){var s=o[i];n[s.id]=s}a(null,n)}})},F.TinySDF=I;var N=function(){this.specification=t.default$5.light.position};N.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},N.prototype.interpolate=function(e,r,n){return{x:t.number(e.x,r.x,n),y:t.number(e.y,r.y,n),z:t.number(e.z,r.z,n)}};var j=new t.Properties({anchor:new t.DataConstantProperty(t.default$5.light.anchor),position:new N,color:new t.DataConstantProperty(t.default$5.light.color),intensity:new t.DataConstantProperty(t.default$5.light.intensity)}),V=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(j),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e){if(!this._validate(t.validateLight,e))for(var r in e){var n=e[r];t.endsWith(r,\\\"-transition\\\")?this._transitionable.setTransition(r.slice(0,-\\\"-transition\\\".length),n):this._transitionable.setValue(r,n)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r){return t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.default$5})))},r}(t.Evented),U=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};U.prototype.getDash=function(t,e){var r=t.join(\\\",\\\")+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},U.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.warnOnce(\\\"LineAtlas out of space\\\"),null;for(var a=0,o=0;o<e.length;o++)a+=e[o];for(var s=this.width/a,l=s/2,c=e.length%2==1,u=-n;u<=n;u++)for(var f=this.nextRow+n+u,h=this.width*f,p=c?-e[e.length-1]:0,d=e[0],g=1,v=0;v<this.width;v++){for(;d<v/s;)p=d,d+=e[g],c&&g===e.length-1&&(d+=e[0]),g++;var m=Math.abs(v-p*s),y=Math.abs(v-d*s),x=Math.min(m,y),b=g%2==1,_=void 0;if(r){var w=n?u/n*(l+1):0;if(b){var k=l-Math.abs(w);_=Math.sqrt(x*x+k*k)}else _=l-Math.sqrt(x*x+w*w)}else _=(b?1:-1)*x;this.data[3+4*(h+v)]=Math.max(0,Math.min(255,_+128))}var M={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:a};return this.nextRow+=i,this.dirty=!0,M},U.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var q=function e(r,n){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),a=0;a<i.length;a++){var o=i[a],s=new e.Actor(o,n,this.id);s.name=\\\"Worker \\\"+a,this.actors.push(s)}};function H(e,r,n){var i=function(e,r){if(e)return n(e);if(r){var i=t.pick(r,[\\\"tiles\\\",\\\"minzoom\\\",\\\"maxzoom\\\",\\\"attribution\\\",\\\"mapbox_logo\\\",\\\"bounds\\\"]);r.vector_layers&&(i.vectorLayers=r.vector_layers,i.vectorLayerIds=i.vectorLayers.map(function(t){return t.id})),n(null,i)}};e.url?t.getJSON(r(b(e.url),t.ResourceType.Source),i):a.frame(function(){return i(null,e)})}q.prototype.broadcast=function(e,r,n){n=n||function(){},t.asyncAll(this.actors,function(t,n){t.send(e,r,n)},n)},q.prototype.send=function(t,e,r,n){return(\\\"number\\\"!=typeof n||isNaN(n))&&(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,r),n},q.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},q.Actor=t.default$7;var G=function(t,e){if(isNaN(t)||isNaN(e))throw new Error(\\\"Invalid LngLat object: (\\\"+t+\\\", \\\"+e+\\\")\\\");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error(\\\"Invalid LngLat latitude value: must be between -90 and 90\\\")};G.prototype.wrap=function(){return new G(t.wrap(this.lng,-180,180),this.lat)},G.prototype.toArray=function(){return[this.lng,this.lat]},G.prototype.toString=function(){return\\\"LngLat(\\\"+this.lng+\\\", \\\"+this.lat+\\\")\\\"},G.prototype.toBounds=function(t){var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new W(new G(this.lng-r,this.lat-e),new G(this.lng+r,this.lat+e))},G.convert=function(t){if(t instanceof G)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new G(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\\\"object\\\"==typeof t&&null!==t)return new G(Number(t.lng),Number(t.lat));throw new Error(\\\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\\\")};var W=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};W.prototype.setNorthEast=function(t){return this._ne=t instanceof G?new G(t.lng,t.lat):G.convert(t),this},W.prototype.setSouthWest=function(t){return this._sw=t instanceof G?new G(t.lng,t.lat):G.convert(t),this},W.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof G)e=t,r=t;else{if(!(t instanceof W))return Array.isArray(t)?t.every(Array.isArray)?this.extend(W.convert(t)):this.extend(G.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new G(e.lng,e.lat),this._ne=new G(r.lng,r.lat)),this},W.prototype.getCenter=function(){return new G((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},W.prototype.getSouthWest=function(){return this._sw},W.prototype.getNorthEast=function(){return this._ne},W.prototype.getNorthWest=function(){return new G(this.getWest(),this.getNorth())},W.prototype.getSouthEast=function(){return new G(this.getEast(),this.getSouth())},W.prototype.getWest=function(){return this._sw.lng},W.prototype.getSouth=function(){return this._sw.lat},W.prototype.getEast=function(){return this._ne.lng},W.prototype.getNorth=function(){return this._ne.lat},W.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},W.prototype.toString=function(){return\\\"LngLatBounds(\\\"+this._sw.toString()+\\\", \\\"+this._ne.toString()+\\\")\\\"},W.prototype.isEmpty=function(){return!(this._sw&&this._ne)},W.convert=function(t){return!t||t instanceof W?t:new W(t)};var Y=function(t,e,r){this.bounds=W.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=r||24};Y.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},Y.prototype.contains=function(t){var e=Math.floor(this.lngX(this.bounds.getWest(),t.z)),r=Math.floor(this.latY(this.bounds.getNorth(),t.z)),n=Math.ceil(this.lngX(this.bounds.getEast(),t.z)),i=Math.ceil(this.latY(this.bounds.getSouth(),t.z));return t.x>=e&&t.x<n&&t.y>=r&&t.y<i},Y.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},Y.prototype.latY=function(e,r){var n=t.clamp(Math.sin(Math.PI/180*e),-.9999,.9999),i=Math.pow(2,r)/(2*Math.PI);return Math.pow(2,r-1)+.5*Math.log((1+n)/(1-n))*-i};var X=function(e){function r(r,n,i,a){if(e.call(this),this.id=r,this.dispatcher=i,this.type=\\\"vector\\\",this.minzoom=0,this.maxzoom=22,this.scheme=\\\"xyz\\\",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(n,[\\\"url\\\",\\\"scheme\\\",\\\"tileSize\\\"])),this._options=t.extend({type:\\\"vector\\\"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error(\\\"vector tile sources must have a tileSize of 512\\\");this.setEventedParent(a)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),H(this._options,this.map._transformRequest,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new Y(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"metadata\\\"})),e.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"content\\\"})))})},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var n=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url),i={request:this.map._transformRequest(n,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:a.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function o(t,n){return e.aborted?r(null):t?r(t):(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||\\\"expired\\\"===e.state?e.workerID=this.dispatcher.send(\\\"loadTile\\\",i,o.bind(this)):\\\"loading\\\"===e.state?e.reloadCallback=r:this.dispatcher.send(\\\"reloadTile\\\",i,o.bind(this),e.workerID)},r.prototype.abortTile=function(t){this.dispatcher.send(\\\"abortTile\\\",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\\\"removeTile\\\",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),Z=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.dispatcher=i,this.setEventedParent(a),this.type=\\\"raster\\\",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=\\\"xyz\\\",this.tileSize=512,this._loaded=!1,this._options=t.extend({},n),t.extend(this,t.pick(n,[\\\"url\\\",\\\"scheme\\\",\\\"tileSize\\\"]))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),H(this._options,this.map._transformRequest,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new Y(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"metadata\\\"})),e.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"content\\\"})))})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var n=this,i=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(t,i){if(delete e.request,e.aborted)e.state=\\\"unloaded\\\",r(null);else if(t)e.state=\\\"errored\\\",r(t);else if(i){n.map._refreshExpiredTiles&&e.setExpiryData(i),delete i.cacheControl,delete i.expires;var a=n.map.painter.context,o=a.gl;e.texture=n.map.painter.getTileTexture(i.width),e.texture?e.texture.update(i,{useMipmap:!0}):(e.texture=new z(a,i,o.RGBA,{useMipmap:!0}),e.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&o.texParameterf(o.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state=\\\"loaded\\\",r(null)}})},r.prototype.abortTile=function(t,e){t.request&&(t.request.abort(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),$=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),this.type=\\\"raster-dem\\\",this.maxzoom=22,this._options=t.extend({},n),this.encoding=n.encoding||\\\"mapbox\\\"}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:\\\"raster-dem\\\",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var n=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),function(t,n){if(delete e.request,e.aborted)e.state=\\\"unloaded\\\",r(null);else if(t)e.state=\\\"errored\\\",r(t);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var i=a.getImageData(n),o={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:i,encoding:this.encoding};e.workerID&&\\\"expired\\\"!==e.state||(e.workerID=this.dispatcher.send(\\\"loadDEMTile\\\",o,function(t,n){t&&(e.state=\\\"errored\\\",r(t)),n&&(e.dem=n,e.needsHillshadePrepare=!0,e.state=\\\"loaded\\\",r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1<n&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state=\\\"unloaded\\\",this.dispatcher.send(\\\"removeDEMTile\\\",{uid:t.uid,source:this.id},void 0,t.workerID)},r}(Z),J=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.type=\\\"geojson\\\",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=i,this.setEventedParent(a),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type);var o=t.default$8/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:t.default$8,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.default$8,radius:(n.clusterRadius||50)*o,log:!1}},n.workerOptions)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),this._updateWorkerData(function(r){if(r)e.fire(new t.ErrorEvent(r));else{var n={dataType:\\\"source\\\",sourceDataType:\\\"metadata\\\"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event(\\\"data\\\",n))}})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),this._updateWorkerData(function(e){if(e)return r.fire(new t.ErrorEvent(e));var n={dataType:\\\"source\\\",sourceDataType:\\\"content\\\"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event(\\\"data\\\",n))}),this},r.prototype._updateWorkerData=function(e){var r,n,i=this,a=t.extend({},this.workerOptions),o=this._data;\\\"string\\\"==typeof o?(a.request=this.map._transformRequest((r=o,(n=t.default.document.createElement(\\\"a\\\")).href=r,n.href),t.ResourceType.Source),a.request.collectResourceTiming=this._collectResourceTiming):a.data=JSON.stringify(o),this.workerID=this.dispatcher.send(this.type+\\\".\\\"+a.source+\\\".loadData\\\",a,function(t,r){i._removed||r&&r.abandoned||(i._loaded=!0,r&&r.resourceTiming&&r.resourceTiming[i.id]&&(i._resourceTiming=r.resourceTiming[i.id].slice(0)),i.dispatcher.send(i.type+\\\".\\\"+a.source+\\\".coalesce\\\",null,null,i.workerID),e(t))},this.workerID)},r.prototype.loadTile=function(t,e){var r=this,n=void 0===t.workerID?\\\"loadTile\\\":\\\"reloadTile\\\",i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(n,i,function(i,a){return t.unloadVectorData(),t.aborted?e(null):i?e(i):(t.loadVectorData(a,r.map.painter,\\\"reloadTile\\\"===n),e(null))},this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\\\"removeTile\\\",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send(\\\"removeSource\\\",{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),K=t.createLayout([{name:\\\"a_pos\\\",type:\\\"Int16\\\",components:2},{name:\\\"a_texture_pos\\\",type:\\\"Int16\\\",components:2}]),Q=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Q.prototype.bind=function(t,e,r,n,i,a,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c<n.length;c++)this.boundPaintVertexBuffers[c]!==n[c]&&(l=!0);var u=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||l||this.boundIndexBuffer!==i||this.boundVertexOffset!==a||this.boundDynamicVertexBuffer!==o||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||u?this.freshBind(e,r,n,i,a,o,s):(t.bindVertexArrayOES.set(this.vao),o&&o.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind())},Q.prototype.freshBind=function(t,e,r,n,i,a,o){var s,l=t.numAttributes,c=this.context,u=c.gl;if(c.extVertexArrayObject)this.vao&&this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=n,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=a,this.boundDynamicVertexBuffer2=o;else{s=c.currentNumAttributes||0;for(var f=l;f<s;f++)u.disableVertexAttribArray(f)}e.enableAttributes(u,t);for(var h=0,p=r;h<p.length;h+=1)p[h].enableAttributes(u,t);a&&a.enableAttributes(u,t),o&&o.enableAttributes(u,t),e.bind(),e.setVertexAttribPointers(u,t,i);for(var d=0,g=r;d<g.length;d+=1){var v=g[d];v.bind(),v.setVertexAttribPointers(u,t,i)}a&&(a.bind(),a.setVertexAttribPointers(u,t,i)),n&&n.bind(),o&&(o.bind(),o.setVertexAttribPointers(u,t,i)),c.currentNumAttributes=l},Q.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var tt=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type=\\\"image\\\",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(r,n){r?e.fire(new t.ErrorEvent(r)):n&&(e.image=a.getImageData(n),e._finishLoading())})},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"metadata\\\"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){this.coordinates=e;var r=this.map,n=e.map(function(t){return r.transform.locationCoordinate(G.convert(t)).zoomTo(0)}),i=this.centerCoord=t.getCoordinatesCenter(n);i.column=Math.floor(i.column),i.row=Math.floor(i.row),this.tileID=new t.CanonicalTileID(i.zoom,i.column,i.row),this.minzoom=this.maxzoom=i.zoom;var a=n.map(function(e){var r=e.zoomTo(i.zoom);return new t.default$1(Math.round((r.column-i.column)*t.default$8),Math.round((r.row-i.row)*t.default$8))});return this._boundsArray=new t.RasterBoundsArray,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,t.default$8,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,t.default$8),this._boundsArray.emplaceBack(a[2].x,a[2].y,t.default$8,t.default$8),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"content\\\"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,e=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture||(this.texture=new z(t,this.image,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];\\\"loaded\\\"!==n.state&&(n.state=\\\"loaded\\\",n.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state=\\\"errored\\\",e(null))},r.prototype.serialize=function(){return{type:\\\"image\\\",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),et=function(e){function r(t,r,n,i){e.call(this,t,r,n,i),this.roundZoom=!0,this.type=\\\"video\\\",this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this,r=this.options;this.urls=[];for(var n=0,i=r.urls;n<i.length;n+=1){var a=i[n];e.urls.push(e.map._transformRequest(a,t.ResourceType.Source).url)}t.getVideo(this.urls,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&&(e.video=n,e.video.loop=!0,e.video.addEventListener(\\\"playing\\\",function(){e.map._rerender()}),e.map&&e.video.play(),e._finishLoading())})},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,e=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture?this.video.paused||(this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,this.video)):(this.texture=new z(t,this.video,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];\\\"loaded\\\"!==n.state&&(n.state=\\\"loaded\\\",n.texture=this.texture)}}},r.prototype.serialize=function(){return{type:\\\"video\\\",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(tt),rt=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return\\\"number\\\"!=typeof t})})||this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'\\\"coordinates\\\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'missing required property \\\"coordinates\\\"'))),n.animate&&\\\"boolean\\\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'optional \\\"animate\\\" property must be a boolean value'))),n.canvas?\\\"string\\\"==typeof n.canvas||n.canvas instanceof t.default.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'\\\"canvas\\\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'missing required property \\\"canvas\\\"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.default.HTMLCanvasElement?this.options.canvas:t.default.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error(\\\"Canvas dimensions cannot be less than or equal to zero.\\\"))):(this.play=function(){this._playing=!0,this.map._rerender()},this.pause=function(){this._playing=!1},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture?t?this.texture.update(this.canvas):this._playing&&(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.canvas)):(this.texture=new z(e,this.canvas,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];\\\"loaded\\\"!==i.state&&(i.state=\\\"loaded\\\",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:\\\"canvas\\\",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}(tt),nt={vector:X,raster:Z,\\\"raster-dem\\\":$,geojson:J,video:et,image:tt,canvas:rt},it=function(e,r,n,i){var a=new nt[r.type](e,r,n,i);if(a.id!==e)throw new Error(\\\"Expected Source id to be \\\"+e+\\\" instead of \\\"+a.id);return t.bindAll([\\\"load\\\",\\\"abort\\\",\\\"unload\\\",\\\"serialize\\\",\\\"prepare\\\"],a),a};function at(t,e,r,n,i){var a=i.maxPitchScaleFactor(),o=t.tilesIn(r,a);o.sort(ot);for(var s=[],l=0,c=o;l<c.length;l+=1){var u=c[l];s.push({wrappedTileID:u.tileID.wrapped().key,queryResults:u.tile.queryRenderedFeatures(e,u.queryGeometry,u.scale,n,i,a,t.transform.calculatePosMatrix(u.tileID.toUnwrapped()))})}return function(t){for(var e={},r={},n=0,i=t;n<i.length;n+=1){var a=i[n],o=a.queryResults,s=a.wrappedTileID,l=r[s]=r[s]||{};for(var c in o)for(var u=o[c],f=l[c]=l[c]||{},h=e[c]=e[c]||[],p=0,d=u;p<d.length;p+=1){var g=d[p];f[g.featureIndex]||(f[g.featureIndex]=!0,h.push(g.feature))}}return e}(s)}function ot(t,e){var r=t.tileID,n=e.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}var st=function(e,r){this.tileID=e,this.uid=t.uniqueId(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.expiredRequestCount=0,this.state=\\\"loading\\\"};st.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<a.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},st.prototype.wasRequested=function(){return\\\"errored\\\"===this.state||\\\"loaded\\\"===this.state||\\\"reloading\\\"===this.state},st.prototype.loadVectorData=function(e,r,n){if(this.hasData()&&this.unloadVectorData(),this.state=\\\"loaded\\\",e){if(e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var n=0,i=t;n<i.length;n+=1){var a=i[n],o=a.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==o.length){a.layers=o;for(var s=0,l=o;s<l.length;s+=1)r[l[s].id]=a}}return r}(e.buckets,r.style),n)for(var i in this.buckets){var a=this.buckets[i];a instanceof t.default$14&&(a.justReloaded=!0)}for(var o in this.queryPadding=0,this.buckets){var s=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(s.layerIds[0]).queryRadius(s))}e.iconAtlasImage&&(this.iconAtlasImage=e.iconAtlasImage),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.CollisionBoxArray},st.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=\\\"unloaded\\\"},st.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state=\\\"unloaded\\\"},st.prototype.getBucket=function(t){return this.buckets[t.id]},st.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploaded||(r.upload(t),r.uploaded=!0)}var n=t.gl;this.iconAtlasImage&&(this.iconAtlasTexture=new z(t,this.iconAtlasImage,n.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new z(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)},st.prototype.queryRenderedFeatures=function(t,e,r,n,i,a,o){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:e,scale:r,tileSize:this.tileSize,posMatrix:o,transform:i,params:n,queryPadding:this.queryPadding*a},t):{}},st.prototype.querySourceFeatures=function(e,r){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var n=this.latestFeatureIndex.loadVTLayers(),i=r?r.sourceLayer:\\\"\\\",a=n._geojsonTileLayer||n[i];if(a)for(var o=t.default$13(r&&r.filter),s={z:this.tileID.overscaledZ,x:this.tileID.canonical.x,y:this.tileID.canonical.y},l=0;l<a.length;l++){var c=a.feature(l);if(o(new t.default$16(this.tileID.overscaledZ),c)){var u=new t.default$12(c,s.z,s.x,s.y);u.tile=s,e.push(u)}}}},st.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},st.prototype.setMask=function(e,r){if(!t.default$10(this.mask,e)&&(this.mask=e,this.clearMask(),!t.default$10(e,{0:!0}))){var n=new t.RasterBoundsArray,i=new t.TriangleIndexArray;this.segments=new t.default$15,this.segments.prepareSegment(0,n,i);for(var a=Object.keys(e),o=0;o<a.length;o++){var s=e[a[o]],l=t.default$8>>s.z,c=new t.default$1(s.x*l,s.y*l),u=new t.default$1(c.x+l,c.y+l),f=this.segments.prepareSegment(4,n,i);n.emplaceBack(c.x,c.y,c.x,c.y),n.emplaceBack(u.x,c.y,u.x,c.y),n.emplaceBack(c.x,u.y,c.x,u.y),n.emplaceBack(u.x,u.y,u.x,u.y);var h=f.vertexLength;i.emplaceBack(h,h+1,h+2),i.emplaceBack(h+1,h+2,h+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=r.createVertexBuffer(n,K.members),this.maskedIndexBuffer=r.createIndexBuffer(i)}},st.prototype.hasData=function(){return\\\"loaded\\\"===this.state||\\\"reloading\\\"===this.state||\\\"expired\\\"===this.state},st.prototype.setExpiryData=function(e){var r=this.expirationTime;if(e.cacheControl){var n=t.parseCacheControl(e.cacheControl);n[\\\"max-age\\\"]&&(this.expirationTime=Date.now()+1e3*n[\\\"max-age\\\"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var i=Date.now(),a=!1;if(this.expirationTime>i)a=!1;else if(r)if(this.expirationTime<r)a=!0;else{var o=this.expirationTime-r;o?this.expirationTime=i+Math.max(o,3e4):a=!0}else a=!0;a?(this.expiredRequestCount++,this.state=\\\"expired\\\"):this.expiredRequestCount=0}},st.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)};var lt=function(t,e){this.max=t,this.onRemove=e,this.reset()};lt.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var n=r[e];n.timeout&&clearTimeout(n.timeout),this.onRemove(n.value)}return this.data={},this.order=[],this},lt.prototype.add=function(t,e,r){var n=this,i=t.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);var a={value:e,timeout:void 0};if(void 0!==r&&(a.timeout=setTimeout(function(){n.remove(t,a)},r)),this.data[i].push(a),this.order.push(i),this.order.length>this.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},lt.prototype.has=function(t){return t.wrapped().key in this.data},lt.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},lt.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},lt.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},lt.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},lt.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var ct=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ct.prototype.unbindVAO=function(){this.context.extVertexArrayObject&&this.context.bindVertexArrayOES.set(null)},ct.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},ct.prototype.updateData=function(t){var e=this.context.gl;this.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},ct.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var ut={Int8:\\\"BYTE\\\",Uint8:\\\"UNSIGNED_BYTE\\\",Int16:\\\"SHORT\\\",Uint16:\\\"UNSIGNED_SHORT\\\",Int32:\\\"INT\\\",Uint32:\\\"UNSIGNED_INT\\\",Float32:\\\"FLOAT\\\"},ft=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ft.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},ft.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},ft.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var n=this.attributes[r],i=e.attributes[n.name];void 0!==i&&t.enableVertexAttribArray(i)}},ft.prototype.setVertexAttribPointers=function(t,e,r){for(var n=0;n<this.attributes.length;n++){var i=this.attributes[n],a=e.attributes[i.name];void 0!==a&&t.vertexAttribPointer(a,i.components,t[ut[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}},ft.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var ht=function(e){this.context=e,this.current=t.default$6.transparent};ht.prototype.get=function(){return this.current},ht.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t)};var pt=function(t){this.context=t,this.current=1};pt.prototype.get=function(){return this.current},pt.prototype.set=function(t){this.current!==t&&(this.context.gl.clearDepth(t),this.current=t)};var dt=function(t){this.context=t,this.current=0};dt.prototype.get=function(){return this.current},dt.prototype.set=function(t){this.current!==t&&(this.context.gl.clearStencil(t),this.current=t)};var gt=function(t){this.context=t,this.current=[!0,!0,!0,!0]};gt.prototype.get=function(){return this.current},gt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t)};var vt=function(t){this.context=t,this.current=!0};vt.prototype.get=function(){return this.current},vt.prototype.set=function(t){this.current!==t&&(this.context.gl.depthMask(t),this.current=t)};var mt=function(t){this.context=t,this.current=255};mt.prototype.get=function(){return this.current},mt.prototype.set=function(t){this.current!==t&&(this.context.gl.stencilMask(t),this.current=t)};var yt=function(t){this.context=t,this.current={func:t.gl.ALWAYS,ref:0,mask:255}};yt.prototype.get=function(){return this.current},yt.prototype.set=function(t){var e=this.current;t.func===e.func&&t.ref===e.ref&&t.mask===e.mask||(this.context.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t)};var xt=function(t){this.context=t;var e=this.context.gl;this.current=[e.KEEP,e.KEEP,e.KEEP]};xt.prototype.get=function(){return this.current},xt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]||(this.context.gl.stencilOp(t[0],t[1],t[2]),this.current=t)};var bt=function(t){this.context=t,this.current=!1};bt.prototype.get=function(){return this.current},bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t}};var _t=function(t){this.context=t,this.current=[0,1]};_t.prototype.get=function(){return this.current},_t.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.depthRange(t[0],t[1]),this.current=t)};var wt=function(t){this.context=t,this.current=!1};wt.prototype.get=function(){return this.current},wt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t}};var kt=function(t){this.context=t,this.current=t.gl.LESS};kt.prototype.get=function(){return this.current},kt.prototype.set=function(t){this.current!==t&&(this.context.gl.depthFunc(t),this.current=t)};var Mt=function(t){this.context=t,this.current=!1};Mt.prototype.get=function(){return this.current},Mt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t}};var At=function(t){this.context=t;var e=this.context.gl;this.current=[e.ONE,e.ZERO]};At.prototype.get=function(){return this.current},At.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.blendFunc(t[0],t[1]),this.current=t)};var Tt=function(e){this.context=e,this.current=t.default$6.transparent};Tt.prototype.get=function(){return this.current},Tt.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t)};var St=function(t){this.context=t,this.current=null};St.prototype.get=function(){return this.current},St.prototype.set=function(t){this.current!==t&&(this.context.gl.useProgram(t),this.current=t)};var Ct=function(t){this.context=t,this.current=1};Ct.prototype.get=function(){return this.current},Ct.prototype.set=function(e){var r=this.context.lineWidthRange,n=t.clamp(e,r[0],r[1]);this.current!==n&&(this.context.gl.lineWidth(n),this.current=e)};var Et=function(t){this.context=t,this.current=t.gl.TEXTURE0};Et.prototype.get=function(){return this.current},Et.prototype.set=function(t){this.current!==t&&(this.context.gl.activeTexture(t),this.current=t)};var Lt=function(t){this.context=t;var e=this.context.gl;this.current=[0,0,e.drawingBufferWidth,e.drawingBufferHeight]};Lt.prototype.get=function(){return this.current},Lt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t)};var zt=function(t){this.context=t,this.current=null};zt.prototype.get=function(){return this.current},zt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t}};var Ot=function(t){this.context=t,this.current=null};Ot.prototype.get=function(){return this.current},Ot.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t}};var It=function(t){this.context=t,this.current=null};It.prototype.get=function(){return this.current},It.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t}};var Pt=function(t){this.context=t,this.current=null};Pt.prototype.get=function(){return this.current},Pt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t}};var Dt=function(t){this.context=t,this.current=null};Dt.prototype.get=function(){return this.current},Dt.prototype.set=function(t){var e=this.context.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t};var Rt=function(t){this.context=t,this.current=null};Rt.prototype.get=function(){return this.current},Rt.prototype.set=function(t){this.current!==t&&this.context.extVertexArrayObject&&(this.context.extVertexArrayObject.bindVertexArrayOES(t),this.current=t)};var Bt=function(t){this.context=t,this.current=4};Bt.prototype.get=function(){return this.current},Bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t}};var Ft=function(t){this.context=t,this.current=!1};Ft.prototype.get=function(){return this.current},Ft.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t}};var Nt=function(t,e){this.context=t,this.current=null,this.parent=e};Nt.prototype.get=function(){return this.current};var jt=function(t){function e(e,r){t.call(this,e,r),this.dirty=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.dirty||this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e.prototype.setDirty=function(){this.dirty=!0},e}(Nt),Vt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t}},e}(Nt),Ut=function(t,e,r){this.context=t,this.width=e,this.height=r;var n=t.gl,i=this.framebuffer=n.createFramebuffer();this.colorAttachment=new jt(t,i),this.depthAttachment=new Vt(t,i)};Ut.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r),t.deleteFramebuffer(this.framebuffer)};var qt=function(t,e,r){this.func=t,this.mask=e,this.range=r};qt.ReadOnly=!1,qt.ReadWrite=!0,qt.disabled=new qt(519,qt.ReadOnly,[0,1]);var Ht=function(t,e,r,n,i,a){this.test=t,this.ref=e,this.mask=r,this.fail=n,this.depthFail=i,this.pass=a};Ht.disabled=new Ht({func:519,mask:0},0,0,7680,7680,7680);var Gt=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};Gt.disabled=new Gt(Gt.Replace=[1,0],t.default$6.transparent,[!1,!1,!1,!1]),Gt.unblended=new Gt(Gt.Replace,t.default$6.transparent,[!0,!0,!0,!0]),Gt.alphaBlended=new Gt([1,771],t.default$6.transparent,[!0,!0,!0,!0]);var Wt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension(\\\"OES_vertex_array_object\\\"),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE),this.clearColor=new ht(this),this.clearDepth=new pt(this),this.clearStencil=new dt(this),this.colorMask=new gt(this),this.depthMask=new vt(this),this.stencilMask=new mt(this),this.stencilFunc=new yt(this),this.stencilOp=new xt(this),this.stencilTest=new bt(this),this.depthRange=new _t(this),this.depthTest=new wt(this),this.depthFunc=new kt(this),this.blend=new Mt(this),this.blendFunc=new At(this),this.blendColor=new Tt(this),this.program=new St(this),this.lineWidth=new Ct(this),this.activeTexture=new Et(this),this.viewport=new Lt(this),this.bindFramebuffer=new zt(this),this.bindRenderbuffer=new Ot(this),this.bindTexture=new It(this),this.bindVertexBuffer=new Pt(this),this.bindElementBuffer=new Dt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Rt(this),this.pixelStoreUnpack=new Bt(this),this.pixelStoreUnpackPremultiplyAlpha=new Ft(this),this.extTextureFilterAnisotropic=t.getExtension(\\\"EXT_texture_filter_anisotropic\\\")||t.getExtension(\\\"MOZ_EXT_texture_filter_anisotropic\\\")||t.getExtension(\\\"WEBKIT_EXT_texture_filter_anisotropic\\\"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension(\\\"OES_texture_half_float\\\"),this.extTextureHalfFloat&&t.getExtension(\\\"OES_texture_half_float_linear\\\")};Wt.prototype.createIndexBuffer=function(t,e){return new ct(this,t,e)},Wt.prototype.createVertexBuffer=function(t,e,r){return new ft(this,t,e,r)},Wt.prototype.createRenderbuffer=function(t,e,r){var n=this.gl,i=n.createRenderbuffer();return this.bindRenderbuffer.set(i),n.renderbufferStorage(n.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),i},Wt.prototype.createFramebuffer=function(t,e){return new Ut(this,t,e)},Wt.prototype.clear=function(t){var e=t.color,r=t.depth,n=this.gl,i=0;e&&(i|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(i|=n.DEPTH_BUFFER_BIT,this.clearDepth.set(r),this.depthMask.set(!0)),n.clear(i)},Wt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Wt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Wt.prototype.setColorMode=function(e){t.default$10(e.blendFunction,Gt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)};var Yt=function(e){function r(t,r,n){var i=this;e.call(this),this.id=t,this.dispatcher=n,this.on(\\\"data\\\",function(t){\\\"source\\\"===t.dataType&&\\\"metadata\\\"===t.sourceDataType&&(i._sourceLoaded=!0),i._sourceLoaded&&!i._paused&&\\\"source\\\"===t.dataType&&\\\"content\\\"===t.sourceDataType&&(i.reload(),i.transform&&i.update(i.transform))}),this.on(\\\"error\\\",function(){i._sourceErrored=!0}),this._source=it(t,r,n,this),this._tiles={},this._cache=new lt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this),this._coveredTiles={}}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if(\\\"loaded\\\"!==e.state&&\\\"errored\\\"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._tiles)this._tiles[e].upload(t)},r.prototype.getIds=function(){var e=this;return Object.keys(this._tiles).map(Number).sort(function(r,n){var i=e._tiles[r].tileID,a=e._tiles[n].tileID,o=new t.default$1(i.canonical.x,i.canonical.y).rotate(e.transform.angle),s=new t.default$1(a.canonical.x,a.canonical.y).rotate(e.transform.angle);return i.overscaledZ-a.overscaledZ||s.y-o.y||s.x-o.x})},r.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0,{});return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)this._reloadTile(t,\\\"reloading\\\")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&(\\\"loading\\\"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,n,i){if(i)return e.state=\\\"errored\\\",void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform));e.timeAdded=a.now(),\\\"expired\\\"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),\\\"raster-dem\\\"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._source.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",tile:e,coord:e.tileID})),this.map&&(this.map.painter.tileExtentVAO.vao=null)},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var n=e[r];if(t.neighboringTiles&&t.neighboringTiles[n]){var i=this.getTileByID(n);a(t,i),a(i,t)}}function a(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,n=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),a=e.tileID.key;0===r&&0===n||Math.abs(n)>1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[a]&&(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._findLoadedChildren=function(t,e,r){var n=!1;for(var i in this._tiles){var a=this._tiles[i];if(!(r[i]||!a.hasData()||a.tileID.overscaledZ<=t.overscaledZ||a.tileID.overscaledZ>e)){var o=Math.pow(2,a.tileID.canonical.z-t.canonical.z);if(Math.floor(a.tileID.canonical.x/o)===t.canonical.x&&Math.floor(a.tileID.canonical.y/o)===t.canonical.y)for(r[i]=a.tileID,n=!0;a&&a.tileID.overscaledZ-1>t.overscaledZ;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);if(!s)break;(a=this._tiles[s.key])&&a.hasData()&&(delete r[i],r[s.key]=s)}}}return n},r.prototype.findLoadedParent=function(t,e,r){for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n);if(!i)return;var a=String(i.key),o=this._tiles[a];if(o&&o.hasData())return r[a]=i,o;if(this._cache.has(i))return r[a]=i,this._cache.get(i)}},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),n=\\\"number\\\"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter(function(t){return n._source.hasTile(t)}))):i=[];var o,s=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),l=Math.max(s-r.maxOverzooming,this._source.minzoom),c=Math.max(s+r.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(i,s),f={};if(Zt(this._source.type))for(var h=Object.keys(u),p=0;p<h.length;p++){var d=h[p],g=u[d],v=n._tiles[d];if(v&&(void 0===v.fadeEndTime||v.fadeEndTime>=a.now())){n._findLoadedChildren(g,c,u)&&(u[d]=g);var m=n.findLoadedParent(g,l,f);m&&n._addTile(m.tileID)}}for(o in f)u[o]||(n._coveredTiles[o]=!0);for(o in f)u[o]=f[o];for(var y=t.keysDifference(this._tiles,u),x=0;x<y.length;x++)n._removeTile(y[x])}},r.prototype._updateRetainedTiles=function(t,e){for(var n={},i={},a=Math.max(e-r.maxOverzooming,this._source.minzoom),o=Math.max(e+r.maxUnderzooming,this._source.minzoom),s=0;s<t.length;s++){var l=t[s],c=this._addTile(l),u=!1;if(c.hasData())n[l.key]=l;else{u=c.wasRequested(),n[l.key]=l;var f=!0;if(e+1>this._source.maxzoom){var h=l.children(this._source.maxzoom)[0],p=this.getTile(h);p&&p.hasData()?n[h.key]=h:f=!1}else{this._findLoadedChildren(l,o,n);for(var d=l.children(this._source.maxzoom),g=0;g<d.length;g++)if(!n[d[g].key]){f=!1;break}}if(!f)for(var v=l.overscaledZ-1;v>=a;--v){var m=l.scaledTo(v);if(i[m.key])break;if(i[m.key]=!0,!(c=this.getTile(m))&&u&&(c=this._addTile(m)),c&&(n[m.key]=m,u=c.wasRequested(),c.hasData()))break}}}return n},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e);var n=Boolean(r);return n||(r=new st(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event(\\\"dataloading\\\",{tile:r,coord:r.tileID,dataType:\\\"source\\\"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,\\\"expired\\\"),delete r._timers[t]},n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r){for(var n=[],i=this.getIds(),a=1/0,o=1/0,s=-1/0,l=-1/0,c=e[0].zoom,u=0;u<e.length;u++){var f=e[u];a=Math.min(a,f.column),o=Math.min(o,f.row),s=Math.max(s,f.column),l=Math.max(l,f.row)}for(var h=0;h<i.length;h++){var p=this._tiles[i[h]],d=p.tileID,g=Math.pow(2,this.transform.zoom-p.tileID.overscaledZ),v=r*p.queryPadding*t.default$8/p.tileSize/g,m=[Xt(d,new t.default$17(a,o,c)),Xt(d,new t.default$17(s,l,c))];if(m[0].x-v<t.default$8&&m[0].y-v<t.default$8&&m[1].x+v>=0&&m[1].y+v>=0){for(var y=[],x=0;x<e.length;x++)y.push(Xt(d,e[x]));n.push({tile:p,tileID:d,queryGeometry:[y],scale:g})}}return n},r.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(function(e){return t._tiles[e].tileID}),r=0,n=e;r<n.length;r+=1){var i=n[r];i.posMatrix=t.transform.calculatePosMatrix(i.toUnwrapped())}return e},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Zt(this._source.type))for(var t in this._tiles){var e=this._tiles[t];if(void 0!==e.fadeEndTime&&e.fadeEndTime>=a.now())return!0}return!1},r}(t.Evented);function Xt(e,r){var n=r.zoomTo(e.canonical.z);return new t.default$1((n.column-(e.canonical.x+e.wrap*Math.pow(2,e.canonical.z)))*t.default$8,(n.row-e.canonical.y)*t.default$8)}function Zt(t){return\\\"raster\\\"===t||\\\"image\\\"===t||\\\"video\\\"===t}function $t(){return new t.default.Worker(Cn.workerUrl)}Yt.maxOverzooming=10,Yt.maxUnderzooming=3;var Jt,Kt=function(){this.active={}};function Qt(e,r){var n={};for(var i in e)\\\"ref\\\"!==i&&(n[i]=e[i]);return t.default$18.forEach(function(t){t in r&&(n[t]=r[t])}),n}function te(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var n=0;n<t.length;n++)\\\"ref\\\"in t[n]&&(t[n]=Qt(t[n],e[t[n].ref]));return t}Kt.prototype.acquire=function(t){if(!this.workers){var e=Cn.workerCount;for(this.workers=[];this.workers.length<e;)this.workers.push(new $t)}return this.active[t]=!0,this.workers.slice()},Kt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)};var ee={setStyle:\\\"setStyle\\\",addLayer:\\\"addLayer\\\",removeLayer:\\\"removeLayer\\\",setPaintProperty:\\\"setPaintProperty\\\",setLayoutProperty:\\\"setLayoutProperty\\\",setFilter:\\\"setFilter\\\",addSource:\\\"addSource\\\",removeSource:\\\"removeSource\\\",setGeoJSONSourceData:\\\"setGeoJSONSourceData\\\",setLayerZoomRange:\\\"setLayerZoomRange\\\",setLayerProperty:\\\"setLayerProperty\\\",setCenter:\\\"setCenter\\\",setZoom:\\\"setZoom\\\",setBearing:\\\"setBearing\\\",setPitch:\\\"setPitch\\\",setSprite:\\\"setSprite\\\",setGlyphs:\\\"setGlyphs\\\",setTransition:\\\"setTransition\\\",setLight:\\\"setLight\\\"};function re(t,e,r){r.push({command:ee.addSource,args:[t,e[t]]})}function ne(t,e,r){e.push({command:ee.removeSource,args:[t]}),r[t]=!0}function ie(t,e,r,n){ne(t,r,n),re(t,e,r)}function ae(e,r,n){var i;for(i in e[n])if(e[n].hasOwnProperty(i)&&\\\"data\\\"!==i&&!t.default$10(e[n][i],r[n][i]))return!1;for(i in r[n])if(r[n].hasOwnProperty(i)&&\\\"data\\\"!==i&&!t.default$10(e[n][i],r[n][i]))return!1;return!0}function oe(e,r,n,i,a,o){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.default$10(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.default$10(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}))}function se(t){return t.id}function le(t,e){return t[e.id]=e,t}var ce=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var a=0;a<this.xCellCount*this.yCellCount;a++)n.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};ce.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},ce.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},ce.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},ce.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},ce.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},ce.prototype._query=function(t,e,r,n,i){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var a=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var o=0;o<this.boxKeys.length;o++)a.push({key:this.boxKeys[o],x1:this.bboxes[4*o],y1:this.bboxes[4*o+1],x2:this.bboxes[4*o+2],y2:this.bboxes[4*o+3]});for(var s=0;s<this.circleKeys.length;s++){var l=this.circles[3*s],c=this.circles[3*s+1],u=this.circles[3*s+2];a.push({key:this.circleKeys[s],x1:l-u,y1:c-u,x2:l+u,y2:c+u})}}else{var f={hitTest:i,seenUids:{box:{},circle:{}}};this._forEachCell(t,e,r,n,this._queryCell,a,f)}return i?a.length>0:a},ce.prototype._queryCircle=function(t,e,r,n){var i=t-r,a=t+r,o=e-r,s=e+r;if(a<0||i>this.width||s<0||o>this.height)return!n&&[];var l=[],c={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(i,o,a,s,this._queryCellCircle,l,c),n?l.length>0:l},ce.prototype.query=function(t,e,r,n){return this._query(t,e,r,n,!1)},ce.prototype.hitTest=function(t,e,r,n){return this._query(t,e,r,n,!0)},ce.prototype.hitTestCircle=function(t,e,r){return this._queryCircle(t,e,r,!0)},ce.prototype._queryCell=function(t,e,r,n,i,a,o){var s=o.seenUids,l=this.boxCells[i];if(null!==l)for(var c=this.bboxes,u=0,f=l;u<f.length;u+=1){var h=f[u];if(!s.box[h]){s.box[h]=!0;var p=4*h;if(t<=c[p+2]&&e<=c[p+3]&&r>=c[p+0]&&n>=c[p+1]){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[h],x1:c[p],y1:c[p+1],x2:c[p+2],y2:c[p+3]})}}}var d=this.circleCells[i];if(null!==d)for(var g=this.circles,v=0,m=d;v<m.length;v+=1){var y=m[v];if(!s.circle[y]){s.circle[y]=!0;var x=3*y;if(this._circleAndRectCollide(g[x],g[x+1],g[x+2],t,e,r,n)){if(o.hitTest)return a.push(!0),!0;var b=g[x],_=g[x+1],w=g[x+2];a.push({key:this.circleKeys[y],x1:b-w,y1:_-w,x2:b+w,y2:_+w})}}}},ce.prototype._queryCellCircle=function(t,e,r,n,i,a,o){var s=o.circle,l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f<h.length;f+=1){var p=h[f];if(!l.box[p]){l.box[p]=!0;var d=4*p;if(this._circleAndRectCollide(s.x,s.y,s.radius,u[d+0],u[d+1],u[d+2],u[d+3]))return a.push(!0),!0}}var g=this.circleCells[i];if(null!==g)for(var v=this.circles,m=0,y=g;m<y.length;m+=1){var x=y[m];if(!l.circle[x]){l.circle[x]=!0;var b=3*x;if(this._circlesCollide(v[b],v[b+1],v[b+2],s.x,s.y,s.radius))return a.push(!0),!0}}},ce.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToXCellCoord(t),l=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),u=this._convertToYCellCoord(n),f=s;f<=c;f++)for(var h=l;h<=u;h++){var p=this.xCellCount*h+f;if(i.call(this,t,e,r,n,p,a,o))return}},ce.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},ce.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},ce.prototype._circlesCollide=function(t,e,r,n,i,a){var o=n-t,s=i-e,l=r+a;return l*l>o*o+s*s},ce.prototype._circleAndRectCollide=function(t,e,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var c=(o-i)/2,u=Math.abs(e-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var f=l-s,h=u-c;return f*f+h*h<=r*r};var ue=t.default$19.layout;function fe(e,r,n,i,a){var o=t.mat4.identity(new Float32Array(16));return r?(t.mat4.identity(o),t.mat4.scale(o,o,[1/a,1/a,1]),n||t.mat4.rotateZ(o,o,i.angle)):(t.mat4.scale(o,o,[i.width/2,-i.height/2,1]),t.mat4.translate(o,o,[1,-1,0]),t.mat4.multiply(o,o,e)),o}function he(e,r,n,i,a){var o=t.mat4.identity(new Float32Array(16));return r?(t.mat4.multiply(o,o,e),t.mat4.scale(o,o,[a,a,1]),n||t.mat4.rotateZ(o,o,-i.angle)):(t.mat4.scale(o,o,[1,-1,1]),t.mat4.translate(o,o,[-1,-1,0]),t.mat4.scale(o,o,[2/i.width,2/i.height,1])),o}function pe(e,r){var n=[e.x,e.y,0,1];ke(n,n,r);var i=n[3];return{point:new t.default$1(n[0]/i,n[1]/i),signedDistanceFromCamera:i}}function de(t,e){var r=t[0]/t[3],n=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ge(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom,ue.properties[i?\\\"text-size\\\":\\\"icon-size\\\"]),f=[256/n.width*2+1,256/n.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,v=!1,m=0;m<d.length;m++){var y=d.get(m);if(y.hidden||y.writingMode===t.WritingMode.vertical&&!v)we(y.numGlyphs,h);else{v=!1;var x=[y.anchorX,y.anchorY,0,1];if(t.vec4.transformMat4(x,x,r),de(x,f)){var b=.5+x[3]/n.transform.cameraToCenterDistance*.5,_=t.evaluateSizeForFeature(c,u,y),w=s?_*b:_/b,k=new t.default$1(y.anchorX,y.anchorY),M=pe(k,a).point,A={},T=ye(y,w,!1,l,r,a,o,e.glyphOffsetArray,p,h,M,k,A,g);v=T.useVertical,(T.notEnoughRoom||v||T.needsFlipping&&ye(y,w,!0,l,r,a,o,e.glyphOffsetArray,p,h,M,k,A,g).notEnoughRoom)&&we(y.numGlyphs,h)}else we(y.numGlyphs,h)}}i?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function ve(t,e,r,n,i,a,o,s,l,c,u,f){var h=s.glyphStartIndex+s.numGlyphs,p=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,g=e.getoffsetX(s.glyphStartIndex),v=e.getoffsetX(h-1),m=be(t*g,r,n,i,a,o,s.segment,p,d,l,c,u,f);if(!m)return null;var y=be(t*v,r,n,i,a,o,s.segment,p,d,l,c,u,f);return y?{first:m,last:y}:null}function me(e,r,n,i){return e===t.WritingMode.horizontal&&Math.abs(n.y-r.y)>Math.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.y<n.y:r.x>n.x)?{needsFlipping:!0}:null}function ye(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,v=r/24,m=e.lineOffsetX*r,y=e.lineOffsetY*r;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ve(v,l,m,y,n,f,h,e,c,o,p,!1);if(!w)return{notEnoughRoom:!0};var k=pe(w.first.point,s).point,M=pe(w.last.point,s).point;if(i&&!n){var A=me(e.writingMode,k,M,d);if(A)return A}g=[w.first];for(var T=e.glyphStartIndex+1;T<x-1;T++)g.push(be(v*l.getoffsetX(T),m,y,n,f,h,e.segment,b,_,c,o,p,!1));g.push(w.last)}else{if(i&&!n){var S=pe(h,a).point,C=e.lineStartIndex+e.segment+1,E=new t.default$1(c.getx(C),c.gety(C)),L=pe(E,a),z=L.signedDistanceFromCamera>0?L.point:xe(h,E,S,1,a),O=me(e.writingMode,S,z,d);if(O)return O}var I=be(v*l.getoffsetX(e.glyphStartIndex),m,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p,!1);if(!I)return{notEnoughRoom:!0};g=[I]}for(var P=0,D=g;P<D.length;P+=1){var R=D[P];t.addDynamicAttributes(u,R.point,R.angle)}return{}}function xe(t,e,r,n,i){var a=pe(t.add(t.sub(e)._unit()),i).point,o=r.sub(a);return r.add(o._mult(n/o.mag()))}function be(e,r,n,i,a,o,s,l,c,u,f,h,p){var d=i?e-r:e+r,g=d>0?1:-1,v=0;i&&(g*=-1,v=Math.PI),g<0&&(v+=Math.PI);for(var m=g>0?l+s:l+s+1,y=m,x=a,b=a,_=0,w=0,k=Math.abs(d);_+w<=k;){if((m+=g)<l||m>=c)return null;if(b=x,void 0===(x=h[m])){var M=new t.default$1(u.getx(m),u.gety(m)),A=pe(M,f);if(A.signedDistanceFromCamera>0)x=h[m]=A.point;else{var T=m-g;x=xe(0===_?o:new t.default$1(u.getx(T),u.gety(T)),M,b,k-_+1,f)}}_+=w,w=b.dist(x)}var S=(k-_)/w,C=x.sub(b),E=C.mult(S)._add(b);return E._add(C._unit()._perp()._mult(n*g)),{point:E,angle:v+Math.atan2(x.y-b.y,x.x-b.x),tileDistance:p?{prevTileDistance:m-g===y?0:u.gettileUnitDistanceFromAnchor(m-g),lastSegmentViewportDistance:k-_}:null}}var _e=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function we(t,e){for(var r=0;r<t;r++){var n=e.length;e.resize(n+4),e.float32.set(_e,3*n)}}function ke(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t[3]=r[3]*n+r[7]*i+r[15],t}t.default$20.mat4;var Me=function(t,e,r){void 0===e&&(e=new ce(t.width+200,t.height+200,25)),void 0===r&&(r=new ce(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100};function Ae(t,e,r){t[e+4]=r?1:0}function Te(e,r,n){return r*(t.default$8/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}Me.prototype.placeCollisionBox=function(t,e,r,n){var i=this.projectAndGetPerspectiveRatio(n,t.anchorPointX,t.anchorPointY),a=r*i.perspectiveRatio,o=t.x1*a+i.point.x,s=t.y1*a+i.point.y,l=t.x2*a+i.point.x,c=t.y2*a+i.point.y;return!e&&this.grid.hitTest(o,s,l,c)?{box:[],offscreen:!1}:{box:[o,s,l,c],offscreen:this.isOffscreen(o,s,l,c)}},Me.prototype.approximateTileDistance=function(t,e,r,n,i){var a=i?1:n/this.pitchfactor,o=t.lastSegmentViewportDistance*r;return t.prevTileDistance+o+(a-1)*o*Math.abs(Math.sin(e))},Me.prototype.placeCollisionCircles=function(e,r,n,i,a,o,s,l,c,u,f,h,p){var d=[],g=this.projectAnchor(u,o.anchorX,o.anchorY),v=c/24,m=o.lineOffsetX*c,y=o.lineOffsetY*c,x=new t.default$1(o.anchorX,o.anchorY),b=ve(v,l,m,y,!1,pe(x,f).point,x,o,s,f,{},!0),_=!1,w=!0,k=g.perspectiveRatio*i,M=1/(i*n),A=0,T=0;b&&(A=this.approximateTileDistance(b.first.tileDistance,b.first.angle,M,g.cameraDistance,p),T=this.approximateTileDistance(b.last.tileDistance,b.last.angle,M,g.cameraDistance,p));for(var S=0;S<e.length;S+=5){var C=e[S],E=e[S+1],L=e[S+2],z=e[S+3];if(!b||z<-A||z>T)Ae(e,S,!1);else{var O=this.projectPoint(u,C,E),I=L*k;if(d.length>0){var P=O.x-d[d.length-4],D=O.y-d[d.length-3];if(I*I*2>P*P+D*D&&S+8<e.length){var R=e[S+8];if(R>-A&&R<T){Ae(e,S,!1);continue}}}var B=S/5;if(d.push(O.x,O.y,I,B),Ae(e,S,!0),w=w&&this.isOffscreen(O.x-I,O.y-I,O.x+I,O.y+I),!r&&this.grid.hitTestCircle(O.x,O.y,I)){if(!h)return{circles:[],offscreen:!1};_=!0}}}return{circles:_?[]:d,offscreen:w}},Me.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],n=1/0,i=1/0,a=-1/0,o=-1/0,s=0,l=e;s<l.length;s+=1){var c=l[s],u=new t.default$1(c.x+100,c.y+100);n=Math.min(n,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),o=Math.max(o,u.y),r.push(u)}for(var f={},h={},p=0,d=this.grid.query(n,i,a,o).concat(this.ignoredGrid.query(n,i,a,o));p<d.length;p+=1){var g=d[p],v=g.key;if(void 0===f[v.bucketInstanceId]&&(f[v.bucketInstanceId]={}),!f[v.bucketInstanceId][v.featureIndex]){var m=[new t.default$1(g.x1,g.y1),new t.default$1(g.x2,g.y1),new t.default$1(g.x2,g.y2),new t.default$1(g.x1,g.y2)];t.polygonIntersectsPolygon(r,m)&&(f[v.bucketInstanceId][v.featureIndex]=!0,void 0===h[v.bucketInstanceId]&&(h[v.bucketInstanceId]=[]),h[v.bucketInstanceId].push(v.featureIndex))}}return h},Me.prototype.insertCollisionBox=function(t,e,r,n){var i={bucketInstanceId:r,featureIndex:n};(e?this.ignoredGrid:this.grid).insert(i,t[0],t[1],t[2],t[3])},Me.prototype.insertCollisionCircles=function(t,e,r,n){for(var i=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:n},o=0;o<t.length;o+=4)i.insertCircle(a,t[o],t[o+1],t[o+2])},Me.prototype.projectAnchor=function(t,e,r){var n=[e,r,0,1];return ke(n,n,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}},Me.prototype.projectPoint=function(e,r,n){var i=[r,n,0,1];return ke(i,i,e),new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100)},Me.prototype.projectAndGetPerspectiveRatio=function(e,r,n){var i=[r,n,0,1];return ke(i,i,e),{point:new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},Me.prototype.isOffscreen=function(t,e,r,n){return r<100||t>=this.screenRightBoundary||n<100||e>this.screenBottomBoundary};var Se=t.default$19.layout,Ce=function(t,e,r,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&&r?1:0,this.placed=r};Ce.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var Ee=function(t,e,r,n,i){this.text=new Ce(t?t.text:null,e,r,i),this.icon=new Ce(t?t.icon:null,e,n,i)};Ee.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Le=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},ze=function(t,e){this.transform=t.clone(),this.collisionIndex=new Me(this.transform),this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=e,this.retainedQueryData={}};function Oe(t,e,r){t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0)}ze.prototype.placeLayerTile=function(e,r,n,i){var a=r.getBucket(e),o=r.latestFeatureIndex;if(a&&o&&e.id===a.layerIds[0]){var s=r.collisionBoxArray,l=a.layers[0].layout,c=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),u=r.tileSize/t.default$8,f=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h=fe(f,\\\"map\\\"===l.get(\\\"text-pitch-alignment\\\"),\\\"map\\\"===l.get(\\\"text-rotation-alignment\\\"),this.transform,Te(r,1,this.transform.zoom)),p=fe(f,\\\"map\\\"===l.get(\\\"icon-pitch-alignment\\\"),\\\"map\\\"===l.get(\\\"icon-rotation-alignment\\\"),this.transform,Te(r,1,this.transform.zoom));this.retainedQueryData[a.bucketInstanceId]=new function(t,e,r,n,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i}(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,r.tileID),this.placeLayerBucket(a,f,h,p,c,u,n,i,s)}},ze.prototype.placeLayerBucket=function(e,r,n,i,a,o,s,l,c){for(var u=e.layers[0].layout,f=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,Se.properties[\\\"text-size\\\"]),h=!e.hasTextData()||u.get(\\\"text-optional\\\"),p=!e.hasIconData()||u.get(\\\"icon-optional\\\"),d=0,g=e.symbolInstances;d<g.length;d+=1){var v=g[d];if(!l[v.crossTileID]){var m=void 0!==v.feature.text,y=void 0!==v.feature.icon,x=!0,b=null,_=null,w=null,k=0,M=0;v.collisionArrays||(v.collisionArrays=e.deserializeCollisionBoxes(c,v.textBoxStartIndex,v.textBoxEndIndex,v.iconBoxStartIndex,v.iconBoxEndIndex)),v.collisionArrays.textFeatureIndex&&(k=v.collisionArrays.textFeatureIndex),v.collisionArrays.textBox&&(m=(b=this.collisionIndex.placeCollisionBox(v.collisionArrays.textBox,u.get(\\\"text-allow-overlap\\\"),o,r)).box.length>0,x=x&&b.offscreen);var A=v.collisionArrays.textCircles;if(A){var T=e.text.placedSymbolArray.get(v.placedTextSymbolIndices[0]),S=t.evaluateSizeForFeature(e.textSizeData,f,T);_=this.collisionIndex.placeCollisionCircles(A,u.get(\\\"text-allow-overlap\\\"),a,o,v.key,T,e.lineVertexArray,e.glyphOffsetArray,S,r,n,s,\\\"map\\\"===u.get(\\\"text-pitch-alignment\\\")),m=u.get(\\\"text-allow-overlap\\\")||_.circles.length>0,x=x&&_.offscreen}v.collisionArrays.iconFeatureIndex&&(M=v.collisionArrays.iconFeatureIndex),v.collisionArrays.iconBox&&(y=(w=this.collisionIndex.placeCollisionBox(v.collisionArrays.iconBox,u.get(\\\"icon-allow-overlap\\\"),o,r)).box.length>0,x=x&&w.offscreen),h||p?p?h||(y=y&&m):m=y&&m:y=m=y&&m,m&&b&&this.collisionIndex.insertCollisionBox(b.box,u.get(\\\"text-ignore-placement\\\"),e.bucketInstanceId,k),y&&w&&this.collisionIndex.insertCollisionBox(w.box,u.get(\\\"icon-ignore-placement\\\"),e.bucketInstanceId,M),m&&_&&this.collisionIndex.insertCollisionCircles(_.circles,u.get(\\\"text-ignore-placement\\\"),e.bucketInstanceId,k),this.placements[v.crossTileID]=new Le(m,y,x||e.justReloaded),l[v.crossTileID]=!0}}e.justReloaded=!1},ze.prototype.commit=function(t,e){this.commitTime=e;var r=!1,n=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,i=t?t.opacities:{};for(var a in this.placements){var o=this.placements[a],s=i[a];s?(this.opacities[a]=new Ee(s,n,o.text,o.icon),r=r||o.text!==s.text.placed||o.icon!==s.icon.placed):(this.opacities[a]=new Ee(null,n,o.text,o.icon,o.skipFade),r=r||o.text||o.icon)}for(var l in i){var c=i[l];if(!this.opacities[l]){var u=new Ee(c,n,!1,!1);u.isHidden()||(this.opacities[l]=u,r=r||c.text.placed||c.icon.placed)}}r?this.lastPlacementChangeTime=e:\\\"number\\\"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},ze.prototype.updateLayerOpacities=function(t,e){for(var r={},n=0,i=e;n<i.length;n+=1){var a=i[n],o=a.getBucket(t);o&&a.latestFeatureIndex&&t.id===o.layerIds[0]&&this.updateBucketOpacities(o,r,a.collisionBoxArray)}},ze.prototype.updateBucketOpacities=function(t,e,r){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();for(var n=t.layers[0].layout,i=new Ee(null,0,!1,!1,!0),a=new Ee(null,0,n.get(\\\"text-allow-overlap\\\"),n.get(\\\"icon-allow-overlap\\\"),!0),o=0;o<t.symbolInstances.length;o++){var s=t.symbolInstances[o],l=e[s.crossTileID],c=this.opacities[s.crossTileID];l?c=i:c||(c=a,this.opacities[s.crossTileID]=c),e[s.crossTileID]=!0;var u=s.numGlyphVertices>0||s.numVerticalGlyphVertices>0,f=s.numIconVertices>0;if(u){for(var h=je(c.text),p=(s.numGlyphVertices+s.numVerticalGlyphVertices)/4,d=0;d<p;d++)t.text.opacityVertexArray.emplaceBack(h);for(var g=0,v=s.placedTextSymbolIndices;g<v.length;g+=1){var m=v[g];t.text.placedSymbolArray.get(m).hidden=c.text.isHidden()}}if(f){for(var y=je(c.icon),x=0;x<s.numIconVertices/4;x++)t.icon.opacityVertexArray.emplaceBack(y);t.icon.placedSymbolArray.get(o).hidden=c.icon.isHidden()}s.collisionArrays||(s.collisionArrays=t.deserializeCollisionBoxes(r,s.textBoxStartIndex,s.textBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex));var b=s.collisionArrays;if(b){b.textBox&&t.hasCollisionBoxData()&&Oe(t.collisionBox.collisionVertexArray,c.text.placed,!1),b.iconBox&&t.hasCollisionBoxData()&&Oe(t.collisionBox.collisionVertexArray,c.icon.placed,!1);var _=b.textCircles;if(_&&t.hasCollisionCircleData())for(var w=0;w<_.length;w+=5){var k=l||0===_[w+4];Oe(t.collisionCircle.collisionVertexArray,c.text.placed,k)}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},ze.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},ze.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},ze.prototype.stillRecent=function(t){return\\\"undefined\\\"!==this.commitTime&&this.commitTime+this.fadeDuration>t},ze.prototype.setStale=function(){this.stale=!0};var Ie=Math.pow(2,25),Pe=Math.pow(2,24),De=Math.pow(2,17),Re=Math.pow(2,16),Be=Math.pow(2,9),Fe=Math.pow(2,8),Ne=Math.pow(2,1);function je(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Ie+e*Pe+r*De+e*Re+r*Be+e*Fe+r*Ne+e}var Ve=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Ve.prototype.continuePlacement=function(t,e,r,n,i){for(;this._currentTileIndex<t.length;){var a=t[this._currentTileIndex];if(e.placeLayerTile(n,a,r,this._seenCrossTileIDs),this._currentTileIndex++,i())return!0}};var Ue=function(t,e,r,n,i){this.placement=new ze(t,i),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=n,this._done=!1};Ue.prototype.isDone=function(){return this._done},Ue.prototype.continuePlacement=function(t,e,r){for(var n=this,i=a.now(),o=function(){var t=a.now()-i;return!n._forceFullPlacement&&t>2};this._currentPlacementIndex>=0;){var s=e[t[n._currentPlacementIndex]],l=n.placement.collisionIndex.transform.zoom;if(\\\"symbol\\\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(n._inProgressLayer||(n._inProgressLayer=new Ve),n._inProgressLayer.continuePlacement(r[s.source],n.placement,n._showCollisionBoxes,s,o))return;delete n._inProgressLayer}n._currentPlacementIndex--}this._done=!0},Ue.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var qe=512/t.default$8/2,He=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0,i=e;n<i.length;n+=1){var a=i[n],o=a.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:a.crossTileID,coord:this.getScaledCoordinates(a,t)})}};He.prototype.getScaledCoordinates=function(e,r){var n=r.canonical.z-this.tileID.canonical.z,i=qe/Math.pow(2,n),a=e.anchor;return{x:Math.floor((r.canonical.x*t.default$8+a.x)*i),y:Math.floor((r.canonical.y*t.default$8+a.y)*i)}},He.prototype.findMatches=function(t,e,r){for(var n=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=0,a=t;i<a.length;i+=1){var o=a[i];if(!o.crossTileID){var s=this.indexedSymbolInstances[o.key];if(s)for(var l=this.getScaledCoordinates(o,e),c=0,u=s;c<u.length;c+=1){var f=u[c];if(Math.abs(f.coord.x-l.x)<=n&&Math.abs(f.coord.y-l.y)<=n&&!r[f.crossTileID]){r[f.crossTileID]=!0,o.crossTileID=f.crossTileID;break}}}}};var Ge=function(){this.maxCrossTileID=0};Ge.prototype.generate=function(){return++this.maxCrossTileID};var We=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};We.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var n=this.indexes[r],i={};for(var a in n){var o=n[a];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+e),i[o.tileID.key]=o}this.indexes[r]=i}this.lng=t},We.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var n=0,i=e.symbolInstances;n<i.length;n+=1)i[n].crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var a=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var s=this.indexes[o];if(Number(o)>t.overscaledZ)for(var l in s){var c=s[l];c.tileID.isChildOf(t)&&c.findMatches(e.symbolInstances,t,a)}else{var u=s[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,a)}}for(var f=0,h=e.symbolInstances;f<h.length;f+=1){var p=h[f];p.crossTileID||(p.crossTileID=r.generate(),a[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new He(t,e.symbolInstances,e.bucketInstanceId),!0},We.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var n=0,i=e.indexedSymbolInstances[r];n<i.length;n+=1){var a=i[n];delete this.usedCrossTileIDs[t][a.crossTileID]}},We.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var n=this.indexes[r];for(var i in n)t[n[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,n[i]),delete n[i],e=!0)}return e};var Ye=function(){this.layerIndexes={},this.crossTileIDs=new Ge,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Ye.prototype.addLayer=function(t,e,r){var n=this.layerIndexes[t.id];void 0===n&&(n=this.layerIndexes[t.id]=new We);var i=!1,a={};n.handleWrapJump(r);for(var o=0,s=e;o<s.length;o+=1){var l=s[o],c=l.getBucket(t);c&&t.id===c.layerIds[0]&&(c.bucketInstanceId||(c.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(l.tileID,c,this.crossTileIDs)&&(i=!0),a[c.bucketInstanceId]=!0)}return n.removeStaleBuckets(a)&&(i=!0),i},Ye.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Xe=function(e,r){return t.emitValidationErrors(e,r&&r.filter(function(t){return\\\"source.canvas\\\"!==t.identifier}))},Ze=t.pick(ee,[\\\"addLayer\\\",\\\"removeLayer\\\",\\\"setPaintProperty\\\",\\\"setLayoutProperty\\\",\\\"setFilter\\\",\\\"addSource\\\",\\\"removeSource\\\",\\\"setLayerZoomRange\\\",\\\"setLight\\\",\\\"setTransition\\\",\\\"setGeoJSONSourceData\\\"]),$e=t.pick(ee,[\\\"setCenter\\\",\\\"setZoom\\\",\\\"setBearing\\\",\\\"setPitch\\\"]),Je=function(e){function r(n,i){var a=this;void 0===i&&(i={}),e.call(this),this.map=n,this.dispatcher=new q((Jt||(Jt=new Kt),Jt),this),this.imageManager=new O,this.glyphManager=new F(n._transformRequest,i.localIdeographFontFamily),this.lineAtlas=new U(256,512),this.crossTileSymbolIndex=new Ye,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.default$23,this._loaded=!1,this._resetUpdates();var o=this;this._rtlTextPluginCallback=r.registerForPluginAvailability(function(t){for(var e in o.dispatcher.broadcast(\\\"loadRTLTextPlugin\\\",t.pluginURL,t.completionCallback),o.sourceCaches)o.sourceCaches[e].reload()}),this.on(\\\"data\\\",function(t){if(\\\"source\\\"===t.dataType&&\\\"metadata\\\"===t.sourceDataType){var e=a.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var n in a._layers){var i=a._layers[n];i.source===r.id&&a._validateLayer(i)}}}})}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"style\\\"}));var i=\\\"boolean\\\"==typeof r.validate?r.validate:!x(e);e=function(t,e){if(!x(t))return t;var r=A(t);return r.path=\\\"/styles/v1\\\"+r.path,y(r,e)}(e,r.accessToken);var a=this.map._transformRequest(e,t.ResourceType.Style);t.getJSON(a,function(e,r){e?n.fire(new t.ErrorEvent(e)):r&&n._load(r,i)})},r.prototype.loadJSON=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"style\\\"})),a.frame(function(){n._load(e,!1!==r.validate)})},r.prototype._load=function(e,r){var n=this;if(!r||!Xe(this,t.validateStyle(e))){for(var i in this._loaded=!0,this.stylesheet=e,e.sources)n.addSource(i,e.sources[i],{validate:!1});e.sprite?function(e,r,n){var i,o,s,l=a.devicePixelRatio>1?\\\"@2x\\\":\\\"\\\";function c(){if(s)n(s);else if(i&&o){var e=a.getImageData(o),r={};for(var l in i){var c=i[l],u=c.width,f=c.height,h=c.x,p=c.y,d=c.sdf,g=c.pixelRatio,v=new t.RGBAImage({width:u,height:f});t.RGBAImage.copy(e,v,{x:h,y:p},{x:0,y:0},{width:u,height:f}),r[l]={data:v,pixelRatio:g,sdf:d}}n(null,r)}}t.getJSON(r(_(e,l,\\\".json\\\"),t.ResourceType.SpriteJSON),function(t,e){s||(s=t,i=e,c())}),t.getImage(r(_(e,l,\\\".png\\\"),t.ResourceType.SpriteImage),function(t,e){s||(s=t,o=e,c())})}(e.sprite,this.map._transformRequest,function(e,r){if(e)n.fire(new t.ErrorEvent(e));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=te(this.stylesheet.layers);this._order=o.map(function(t){return t.id}),this._layers={};for(var s=0,l=o;s<l.length;s+=1){var c=l[s];(c=t.default$22(c)).setEventedParent(n,{layer:{id:c.id}}),n._layers[c.id]=c}this.dispatcher.broadcast(\\\"setLayers\\\",this._serializeLayers(this._order)),this.light=new V(this.stylesheet.light),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"})),this.fire(new t.Event(\\\"style.load\\\"))}},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();(\\\"geojson\\\"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer \\\"'+n+'\\\" does not exist on source \\\"'+i.id+'\\\" as specified by style layer \\\"'+e.id+'\\\"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\\\"Style is not done loading\\\")},r.prototype.update=function(e){if(this._loaded){if(this._changed){var r=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var i in(r.length||n.length)&&this._updateWorkerLayers(r,n),this._updatedSources){var a=this._updatedSources[i];\\\"reload\\\"===a?this._reloadSource(i):\\\"clear\\\"===a&&this._clearSource(i)}for(var o in this._updatedPaintProps)this._layers[o].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates(),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"}))}for(var s in this.sourceCaches)this.sourceCaches[s].used=!1;for(var l=0,c=this._order;l<c.length;l+=1){var u=c[l],f=this._layers[u];f.recalculate(e),!f.isHidden(e.zoom)&&f.source&&(this.sourceCaches[f.source].used=!0)}this.light.recalculate(e),this.z=e.zoom}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast(\\\"updateLayers\\\",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Xe(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=te(e.layers);var n=function(e,r){if(!e)return[{command:ee.setStyle,args:[r]}];var n=[];try{if(!t.default$10(e.version,r.version))return[{command:ee.setStyle,args:[r]}];t.default$10(e.center,r.center)||n.push({command:ee.setCenter,args:[r.center]}),t.default$10(e.zoom,r.zoom)||n.push({command:ee.setZoom,args:[r.zoom]}),t.default$10(e.bearing,r.bearing)||n.push({command:ee.setBearing,args:[r.bearing]}),t.default$10(e.pitch,r.pitch)||n.push({command:ee.setPitch,args:[r.pitch]}),t.default$10(e.sprite,r.sprite)||n.push({command:ee.setSprite,args:[r.sprite]}),t.default$10(e.glyphs,r.glyphs)||n.push({command:ee.setGlyphs,args:[r.glyphs]}),t.default$10(e.transition,r.transition)||n.push({command:ee.setTransition,args:[r.transition]}),t.default$10(e.light,r.light)||n.push({command:ee.setLight,args:[r.light]});var i={},a=[];!function(e,r,n,i){var a;for(a in r=r||{},e=e||{})e.hasOwnProperty(a)&&(r.hasOwnProperty(a)||ne(a,n,i));for(a in r)r.hasOwnProperty(a)&&(e.hasOwnProperty(a)?t.default$10(e[a],r[a])||(\\\"geojson\\\"===e[a].type&&\\\"geojson\\\"===r[a].type&&ae(e,r,a)?n.push({command:ee.setGeoJSONSourceData,args:[a,r[a].data]}):ie(a,r,n,i)):re(a,r,n))}(e.sources,r.sources,a,i);var o=[];e.layers&&e.layers.forEach(function(t){i[t.source]?n.push({command:ee.removeLayer,args:[t.id]}):o.push(t)}),n=n.concat(a),function(e,r,n){r=r||[];var i,a,o,s,l,c,u,f=(e=e||[]).map(se),h=r.map(se),p=e.reduce(le,{}),d=r.reduce(le,{}),g=f.slice(),v=Object.create(null);for(i=0,a=0;i<f.length;i++)o=f[i],d.hasOwnProperty(o)?a++:(n.push({command:ee.removeLayer,args:[o]}),g.splice(g.indexOf(o,a),1));for(i=0,a=0;i<h.length;i++)o=h[h.length-1-i],g[g.length-1-i]!==o&&(p.hasOwnProperty(o)?(n.push({command:ee.removeLayer,args:[o]}),g.splice(g.lastIndexOf(o,g.length-a),1)):a++,c=g[g.length-i],n.push({command:ee.addLayer,args:[d[o],c]}),g.splice(g.length-i,0,o),v[o]=!0);for(i=0;i<h.length;i++)if(s=p[o=h[i]],l=d[o],!v[o]&&!t.default$10(s,l))if(t.default$10(s.source,l.source)&&t.default$10(s[\\\"source-layer\\\"],l[\\\"source-layer\\\"])&&t.default$10(s.type,l.type)){for(u in oe(s.layout,l.layout,n,o,null,ee.setLayoutProperty),oe(s.paint,l.paint,n,o,null,ee.setPaintProperty),t.default$10(s.filter,l.filter)||n.push({command:ee.setFilter,args:[o,l.filter]}),t.default$10(s.minzoom,l.minzoom)&&t.default$10(s.maxzoom,l.maxzoom)||n.push({command:ee.setLayerZoomRange,args:[o,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(u)&&\\\"layout\\\"!==u&&\\\"paint\\\"!==u&&\\\"filter\\\"!==u&&\\\"metadata\\\"!==u&&\\\"minzoom\\\"!==u&&\\\"maxzoom\\\"!==u&&(0===u.indexOf(\\\"paint.\\\")?oe(s[u],l[u],n,o,u.slice(6),ee.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ee.setLayerProperty,args:[o,u,l[u]]}));for(u in l)l.hasOwnProperty(u)&&!s.hasOwnProperty(u)&&\\\"layout\\\"!==u&&\\\"paint\\\"!==u&&\\\"filter\\\"!==u&&\\\"metadata\\\"!==u&&\\\"minzoom\\\"!==u&&\\\"maxzoom\\\"!==u&&(0===u.indexOf(\\\"paint.\\\")?oe(s[u],l[u],n,o,u.slice(6),ee.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ee.setLayerProperty,args:[o,u,l[u]]}))}else n.push({command:ee.removeLayer,args:[o]}),c=g[g.lastIndexOf(o)+1],n.push({command:ee.addLayer,args:[l,c]})}(o,r.layers,n)}catch(t){console.warn(\\\"Unable to compute style diff:\\\",t),n=[{command:ee.setStyle,args:[r]}]}return n}(this.serialize(),e).filter(function(t){return!(t.command in $e)});if(0===n.length)return!1;var i=n.filter(function(t){return!(t.command in Ze)});if(i.length>0)throw new Error(\\\"Unimplemented: \\\"+i.map(function(t){return t.command}).join(\\\", \\\")+\\\".\\\");return n.forEach(function(t){\\\"setTransition\\\"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error(\\\"An image with this name already exists.\\\")));this.imageManager.addImage(e,r),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"}))},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error(\\\"No image with this name exists.\\\")));this.imageManager.removeImage(e),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"}))},r.prototype.addSource=function(e,r,n){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(\\\"There is already a source with this ID\\\");if(!r.type)throw new Error(\\\"The type property must be defined, but the only the following properties were given: \\\"+Object.keys(r).join(\\\", \\\")+\\\".\\\");if(!([\\\"vector\\\",\\\"raster\\\",\\\"geojson\\\",\\\"video\\\",\\\"image\\\"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,\\\"sources.\\\"+e,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[e]=new Yt(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}}),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(\\\"There is no source with this ID\\\");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source \\\"'+e+'\\\" cannot be removed while layer \\\"'+r+'\\\" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event(\\\"data\\\",{sourceDataType:\\\"metadata\\\",dataType:\\\"source\\\",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id \\\"'+i+'\\\" already exists on this map')));else if(\\\"object\\\"==typeof e.source&&(this.addSource(i,e.source),e=t.clone(e),e=t.extend(e,{source:i})),!this._validate(t.validateStyle.layer,\\\"layers.\\\"+i,e,{arrayIndex:-1},n)){var a=t.default$22(e);this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}});var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.ErrorEvent(new Error('Layer with id \\\"'+r+'\\\" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]=\\\"clear\\\":(this._updatedSources[a.source]=\\\"reload\\\",this.sourceCaches[a.source].pause())}this._updateLayer(a)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id \\\"'+r+'\\\" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be moved.\\\")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]}else this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be removed.\\\")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot have zoom extent.\\\")))},r.prototype.setFilter=function(e,r){this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.default$10(n.filter,r))return null==r?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,\\\"layers.\\\"+n.id+\\\".filter\\\",r)||(n.filter=t.clone(r),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be filtered.\\\")))},r.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?t.default$10(i.getLayoutProperty(r),n)||(i.setLayoutProperty(r,n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be styled.\\\")))},r.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},r.prototype.setPaintProperty=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.default$10(i.getPaintProperty(r),n)){var a=i._transitionablePaint._values[r].value.isDataDriven();i.setPaintProperty(r,n),(i._transitionablePaint._values[r].value.isDataDriven()||a)&&this._updateLayer(i),this._changed=!0,this._updatedPaintProps[e]=!0}}else this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be styled.\\\")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){var e=this;return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(t){return void 0!==t})},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]=\\\"reload\\\",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenRenderedFeatures=function(t){for(var e=[],r=this._order.length-1;r>=0;r--)for(var n=this._order[r],i=0,a=t;i<a.length;i+=1){var o=a[i][n];if(o)for(var s=0,l=o;s<l.length;s+=1){var c=l[s];e.push(c)}}return e},r.prototype.queryRenderedFeatures=function(e,r,n){r&&r.filter&&this._validate(t.validateStyle.filter,\\\"queryRenderedFeatures.filter\\\",r.filter);var i={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error(\\\"parameters.layers must be an Array.\\\"))),[];for(var a=0,o=r.layers;a<o.length;a+=1){var s=o[a],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+s+\\\"' does not exist in the map's style and cannot be queried for features.\\\"))),[];i[l.source]=!0}}var c=[];for(var u in this.sourceCaches)r.layers&&!i[u]||c.push(at(this.sourceCaches[u],this._layers,e.worldCoordinate,r,n));return this.placement&&c.push(function(t,e,r,n,i){for(var a={},o=n.queryRenderedSymbols(e),s=[],l=0,c=Object.keys(o).map(Number);l<c.length;l+=1){var u=c[l];s.push(i[u])}s.sort(ot);for(var f=function(){var e=p[h],n=e.featureIndex.lookupSymbolFeatures(o[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,r.filter,r.layers,t);for(var i in n){var s=a[i]=a[i]||[],l=n[i];l.sort(function(t,r){var n=e.featureSortOrder;if(n){var i=n.indexOf(t.featureIndex);return n.indexOf(r.featureIndex)-i}return r.featureIndex-t.featureIndex});for(var c=0,u=l;c<u.length;c+=1){var f=u[c];s.push(f.feature)}}},h=0,p=s;h<p.length;h+=1)f();return a}(this._layers,e.viewport,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenRenderedFeatures(c)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,\\\"querySourceFeatures.filter\\\",r.filter);var n=this.sourceCaches[e];return n?function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],i={},a=0;a<r.length;a++){var o=r[a],s=o.tileID.canonical.key;i[s]||(i[s]=!0,o.querySourceFeatures(n,e))}return n}(n,r):[]},r.prototype.addSourceType=function(t,e,n){return r.getSourceType(t)?n(new Error('A source type called \\\"'+t+'\\\" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast(\\\"loadWorkerSource\\\",{name:t,url:e.workerSourceURL},n):n(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e){this._checkLoaded();var r=this.light.getLight(),n=!1;for(var i in e)if(!t.default$10(e[i],r[i])){n=!0;break}if(n){var o={now:a.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e),this.light.updateTransitions(o)}},r.prototype._validate=function(e,r,n,i,a){return(!a||!1!==a.validate)&&Xe(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:n,styleSpec:t.default$5},i)))},r.prototype._remove=function(){for(var e in t.evented.off(\\\"pluginAvailable\\\",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(t,e,r){for(var n=!1,i=!1,o={},s=0,l=this._order;s<l.length;s+=1){var c=l[s],u=this._layers[c];if(\\\"symbol\\\"===u.type){if(!o[u.source]){var f=this.sourceCaches[u.source];o[u.source]=f.getRenderableIds().map(function(t){return f.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var h=this.crossTileSymbolIndex.addLayer(u,o[u.source],t.center.lng);n=n||h}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var p=this._layerOrderChanged;if((p||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(a.now()))&&(this.pauseablePlacement=new Ue(t,this._order,p,e,r),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(this.placement,a.now()),i=!0),n&&this.pauseablePlacement.placement.setStale()),i||n)for(var d=0,g=this._order;d<g.length;d+=1){var v=g[d],m=this._layers[v];\\\"symbol\\\"===m.type&&this.placement.updateLayerOpacities(m,o[m.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.now())},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r}(t.Evented);Je.getSourceType=function(t){return nt[t]},Je.setSourceType=function(t,e){nt[t]=e},Je.registerForPluginAvailability=t.registerForPluginAvailability;var Ke=t.createLayout([{name:\\\"a_pos\\\",type:\\\"Int16\\\",components:2}]),Qe={prelude:{fragmentSource:\\\"#ifdef GL_ES\\\\nprecision mediump float;\\\\n#else\\\\n\\\\n#if !defined(lowp)\\\\n#define lowp\\\\n#endif\\\\n\\\\n#if !defined(mediump)\\\\n#define mediump\\\\n#endif\\\\n\\\\n#if !defined(highp)\\\\n#define highp\\\\n#endif\\\\n\\\\n#endif\\\\n\\\",vertexSource:\\\"#ifdef GL_ES\\\\nprecision highp float;\\\\n#else\\\\n\\\\n#if !defined(lowp)\\\\n#define lowp\\\\n#endif\\\\n\\\\n#if !defined(mediump)\\\\n#define mediump\\\\n#endif\\\\n\\\\n#if !defined(highp)\\\\n#define highp\\\\n#endif\\\\n\\\\n#endif\\\\n\\\\n// Unpack a pair of values that have been packed into a single float.\\\\n// The packed values are assumed to be 8-bit unsigned integers, and are\\\\n// packed like so:\\\\n// packedValue = floor(input[0]) * 256 + input[1],\\\\nvec2 unpack_float(const float packedValue) {\\\\n    int packedIntValue = int(packedValue);\\\\n    int v0 = packedIntValue / 256;\\\\n    return vec2(v0, packedIntValue - v0 * 256);\\\\n}\\\\n\\\\nvec2 unpack_opacity(const float packedOpacity) {\\\\n    int intOpacity = int(packedOpacity) / 2;\\\\n    return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\\\\n}\\\\n\\\\n// To minimize the number of attributes needed, we encode a 4-component\\\\n// color into a pair of floats (i.e. a vec2) as follows:\\\\n// [ floor(color.r * 255) * 256 + color.g * 255,\\\\n//   floor(color.b * 255) * 256 + color.g * 255 ]\\\\nvec4 decode_color(const vec2 encodedColor) {\\\\n    return vec4(\\\\n        unpack_float(encodedColor[0]) / 255.0,\\\\n        unpack_float(encodedColor[1]) / 255.0\\\\n    );\\\\n}\\\\n\\\\n// Unpack a pair of paint values and interpolate between them.\\\\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\\\\n    return mix(packedValue[0], packedValue[1], t);\\\\n}\\\\n\\\\n// Unpack a pair of paint values and interpolate between them.\\\\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\\\\n    vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\\\\n    vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\\\\n    return mix(minColor, maxColor, t);\\\\n}\\\\n\\\\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\\\\n// vec2 offset = mod(pixel_coord, size)\\\\n//\\\\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\\\\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\\\\n//\\\\n// The pixel_coord is passed in as two 16 bit values:\\\\n// pixel_coord_upper = floor(pixel_coord / 2^16)\\\\n// pixel_coord_lower = mod(pixel_coord, 2^16)\\\\n//\\\\n// The offset is calculated in a series of steps that should preserve this precision:\\\\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\\\\n    const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\\\\n\\\\n    vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\\\\n    return (tile_units_to_pixels * pos + offset) / pattern_size;\\\\n}\\\\n\\\"},background:{fragmentSource:\\\"uniform vec4 u_color;\\\\nuniform float u_opacity;\\\\n\\\\nvoid main() {\\\\n    gl_FragColor = u_color * u_opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n}\\\\n\\\"},backgroundPattern:{fragmentSource:\\\"uniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_mix;\\\\nuniform float u_opacity;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\n\\\\nvoid main() {\\\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\\\\n    vec4 color1 = texture2D(u_image, pos);\\\\n\\\\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\\\\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\\\n    vec4 color2 = texture2D(u_image, pos2);\\\\n\\\\n    gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pixel_coord_upper;\\\\nuniform vec2 u_pixel_coord_lower;\\\\nuniform float u_scale_a;\\\\nuniform float u_scale_b;\\\\nuniform float u_tile_units_to_pixels;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n\\\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\\\n}\\\\n\\\"},circle:{fragmentSource:\\\"#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define mediump float radius\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define highp vec4 stroke_color\\\\n#pragma mapbox: define mediump float stroke_width\\\\n#pragma mapbox: define lowp float stroke_opacity\\\\n\\\\nvarying vec3 v_data;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize mediump float radius\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize highp vec4 stroke_color\\\\n    #pragma mapbox: initialize mediump float stroke_width\\\\n    #pragma mapbox: initialize lowp float stroke_opacity\\\\n\\\\n    vec2 extrude = v_data.xy;\\\\n    float extrude_length = length(extrude);\\\\n\\\\n    lowp float antialiasblur = v_data.z;\\\\n    float antialiased_blur = -max(blur, antialiasblur);\\\\n\\\\n    float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\\\\n\\\\n    float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\\\\n        antialiased_blur,\\\\n        0.0,\\\\n        extrude_length - radius / (radius + stroke_width)\\\\n    );\\\\n\\\\n    gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform bool u_scale_with_map;\\\\nuniform bool u_pitch_with_map;\\\\nuniform vec2 u_extrude_scale;\\\\nuniform highp float u_camera_to_center_distance;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define mediump float radius\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define highp vec4 stroke_color\\\\n#pragma mapbox: define mediump float stroke_width\\\\n#pragma mapbox: define lowp float stroke_opacity\\\\n\\\\nvarying vec3 v_data;\\\\n\\\\nvoid main(void) {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize mediump float radius\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize highp vec4 stroke_color\\\\n    #pragma mapbox: initialize mediump float stroke_width\\\\n    #pragma mapbox: initialize lowp float stroke_opacity\\\\n\\\\n    // unencode the extrusion vector that we snuck into the a_pos vector\\\\n    vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\\\n\\\\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\\\n    // in extrusion data\\\\n    vec2 circle_center = floor(a_pos * 0.5);\\\\n    if (u_pitch_with_map) {\\\\n        vec2 corner_position = circle_center;\\\\n        if (u_scale_with_map) {\\\\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\\\\n        } else {\\\\n            // Pitching the circle with the map effectively scales it with the map\\\\n            // To counteract the effect for pitch-scale: viewport, we rescale the\\\\n            // whole circle based on the pitch scaling effect at its central point\\\\n            vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\\\\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\\\\n        }\\\\n\\\\n        gl_Position = u_matrix * vec4(corner_position, 0, 1);\\\\n    } else {\\\\n        gl_Position = u_matrix * vec4(circle_center, 0, 1);\\\\n\\\\n        if (u_scale_with_map) {\\\\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\\\\n        } else {\\\\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\\\\n        }\\\\n    }\\\\n\\\\n    // This is a minimum blur distance that serves as a faux-antialiasing for\\\\n    // the circle. since blur is a ratio of the circle's size and the intent is\\\\n    // to keep the blur at roughly 1px, the two are inversely related.\\\\n    lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\\\\n\\\\n    v_data = vec3(extrude.x, extrude.y, antialiasblur);\\\\n}\\\\n\\\"},clippingMask:{fragmentSource:\\\"void main() {\\\\n    gl_FragColor = vec4(1.0);\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n}\\\\n\\\"},heatmap:{fragmentSource:\\\"#pragma mapbox: define highp float weight\\\\n\\\\nuniform highp float u_intensity;\\\\nvarying vec2 v_extrude;\\\\n\\\\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\\\\n#define GAUSS_COEF 0.3989422804014327\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp float weight\\\\n\\\\n    // Kernel density estimation with a Gaussian kernel of size 5x5\\\\n    float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\\\\n    float val = weight * u_intensity * GAUSS_COEF * exp(d);\\\\n\\\\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"#pragma mapbox: define highp float weight\\\\n#pragma mapbox: define mediump float radius\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform float u_extrude_scale;\\\\nuniform float u_opacity;\\\\nuniform float u_intensity;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\nvarying vec2 v_extrude;\\\\n\\\\n// Effective \\\\\\\"0\\\\\\\" in the kernel density texture to adjust the kernel size to;\\\\n// this empirically chosen number minimizes artifacts on overlapping kernels\\\\n// for typical heatmap cases (assuming clustered source)\\\\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\\\\n\\\\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\\\\n#define GAUSS_COEF 0.3989422804014327\\\\n\\\\nvoid main(void) {\\\\n    #pragma mapbox: initialize highp float weight\\\\n    #pragma mapbox: initialize mediump float radius\\\\n\\\\n    // unencode the extrusion vector that we snuck into the a_pos vector\\\\n    vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\\\n\\\\n    // This 'extrude' comes in ranging from [-1, -1], to [1, 1].  We'll use\\\\n    // it to produce the vertices of a square mesh framing the point feature\\\\n    // we're adding to the kernel density texture.  We'll also pass it as\\\\n    // a varying, so that the fragment shader can determine the distance of\\\\n    // each fragment from the point feature.\\\\n    // Before we do so, we need to scale it up sufficiently so that the\\\\n    // kernel falls effectively to zero at the edge of the mesh.\\\\n    // That is, we want to know S such that\\\\n    // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\\\\n    // Which solves to:\\\\n    // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\\\\n    float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\\\\n\\\\n    // Pass the varying in units of radius\\\\n    v_extrude = S * unscaled_extrude;\\\\n\\\\n    // Scale by radius and the zoom-based scale factor to produce actual\\\\n    // mesh position\\\\n    vec2 extrude = v_extrude * radius * u_extrude_scale;\\\\n\\\\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\\\n    // in extrusion data\\\\n    vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\\\\n\\\\n    gl_Position = u_matrix * pos;\\\\n}\\\\n\\\"},heatmapTexture:{fragmentSource:\\\"uniform sampler2D u_image;\\\\nuniform sampler2D u_color_ramp;\\\\nuniform float u_opacity;\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    float t = texture2D(u_image, v_pos).r;\\\\n    vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\\\\n    gl_FragColor = color * u_opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(0.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_world;\\\\nattribute vec2 a_pos;\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\\\\n\\\\n    v_pos.x = a_pos.x;\\\\n    v_pos.y = 1.0 - a_pos.y;\\\\n}\\\\n\\\"},collisionBox:{fragmentSource:\\\"\\\\nvarying float v_placed;\\\\nvarying float v_notUsed;\\\\n\\\\nvoid main() {\\\\n\\\\n    float alpha = 0.5;\\\\n\\\\n    // Red = collision, hide label\\\\n    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\\\n\\\\n    // Blue = no collision, label is showing\\\\n    if (v_placed > 0.5) {\\\\n        gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\\\\n    }\\\\n\\\\n    if (v_notUsed > 0.5) {\\\\n        // This box not used, fade it out\\\\n        gl_FragColor *= .1;\\\\n    }\\\\n}\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\nattribute vec2 a_anchor_pos;\\\\nattribute vec2 a_extrude;\\\\nattribute vec2 a_placed;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform vec2 u_extrude_scale;\\\\nuniform float u_camera_to_center_distance;\\\\n\\\\nvarying float v_placed;\\\\nvarying float v_notUsed;\\\\n\\\\nvoid main() {\\\\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\\\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\\\n    highp float collision_perspective_ratio = clamp(\\\\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\\\\n        0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\\\\n        4.0);\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\\\\n    gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\\\\n\\\\n    v_placed = a_placed.x;\\\\n    v_notUsed = a_placed.y;\\\\n}\\\\n\\\"},collisionCircle:{fragmentSource:\\\"uniform float u_overscale_factor;\\\\n\\\\nvarying float v_placed;\\\\nvarying float v_notUsed;\\\\nvarying float v_radius;\\\\nvarying vec2 v_extrude;\\\\nvarying vec2 v_extrude_scale;\\\\n\\\\nvoid main() {\\\\n    float alpha = 0.5;\\\\n\\\\n    // Red = collision, hide label\\\\n    vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\\\n\\\\n    // Blue = no collision, label is showing\\\\n    if (v_placed > 0.5) {\\\\n        color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\\\\n    }\\\\n\\\\n    if (v_notUsed > 0.5) {\\\\n        // This box not used, fade it out\\\\n        color *= .2;\\\\n    }\\\\n\\\\n    float extrude_scale_length = length(v_extrude_scale);\\\\n    float extrude_length = length(v_extrude) * extrude_scale_length;\\\\n    float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\\\\n    float radius = v_radius * extrude_scale_length;\\\\n\\\\n    float distance_to_edge = abs(extrude_length - radius);\\\\n    float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\\\\n\\\\n    gl_FragColor = opacity_t * color;\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\nattribute vec2 a_anchor_pos;\\\\nattribute vec2 a_extrude;\\\\nattribute vec2 a_placed;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform vec2 u_extrude_scale;\\\\nuniform float u_camera_to_center_distance;\\\\n\\\\nvarying float v_placed;\\\\nvarying float v_notUsed;\\\\nvarying float v_radius;\\\\n\\\\nvarying vec2 v_extrude;\\\\nvarying vec2 v_extrude_scale;\\\\n\\\\nvoid main() {\\\\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\\\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\\\n    highp float collision_perspective_ratio = clamp(\\\\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\\\\n        0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\\\\n        4.0);\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\\\\n\\\\n    highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\\\\n    gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\\\\n\\\\n    v_placed = a_placed.x;\\\\n    v_notUsed = a_placed.y;\\\\n    v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\\\\n\\\\n    v_extrude = a_extrude * padding_factor;\\\\n    v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\\\\n}\\\\n\\\"},debug:{fragmentSource:\\\"uniform highp vec4 u_color;\\\\n\\\\nvoid main() {\\\\n    gl_FragColor = u_color;\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n}\\\\n\\\"},fill:{fragmentSource:\\\"#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_FragColor = color * opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n}\\\\n\\\"},fillOutline:{fragmentSource:\\\"#pragma mapbox: define highp vec4 outline_color\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 outline_color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    float dist = length(v_pos - gl_FragCoord.xy);\\\\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\\\\n    gl_FragColor = outline_color * (alpha * opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform vec2 u_world;\\\\n\\\\nvarying vec2 v_pos;\\\\n\\\\n#pragma mapbox: define highp vec4 outline_color\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 outline_color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\\\n}\\\\n\\\"},fillOutlinePattern:{fragmentSource:\\\"uniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_mix;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\nvarying vec2 v_pos;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\\\\n    vec4 color1 = texture2D(u_image, pos);\\\\n\\\\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\\\\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\\\n    vec4 color2 = texture2D(u_image, pos2);\\\\n\\\\n    // find distance to outline for alpha interpolation\\\\n\\\\n    float dist = length(v_pos - gl_FragCoord.xy);\\\\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\\\\n\\\\n\\\\n    gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_world;\\\\nuniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pixel_coord_upper;\\\\nuniform vec2 u_pixel_coord_lower;\\\\nuniform float u_scale_a;\\\\nuniform float u_scale_b;\\\\nuniform float u_tile_units_to_pixels;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\nvarying vec2 v_pos;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n\\\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\\\n\\\\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\\\n}\\\\n\\\"},fillPattern:{fragmentSource:\\\"uniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_mix;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\\\\n    vec4 color1 = texture2D(u_image, pos);\\\\n\\\\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\\\\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\\\n    vec4 color2 = texture2D(u_image, pos2);\\\\n\\\\n    gl_FragColor = mix(color1, color2, u_mix) * opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pixel_coord_upper;\\\\nuniform vec2 u_pixel_coord_lower;\\\\nuniform float u_scale_a;\\\\nuniform float u_scale_b;\\\\nuniform float u_tile_units_to_pixels;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n\\\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\\\n}\\\\n\\\"},fillExtrusion:{fragmentSource:\\\"varying vec4 v_color;\\\\n#pragma mapbox: define lowp float base\\\\n#pragma mapbox: define lowp float height\\\\n#pragma mapbox: define highp vec4 color\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float base\\\\n    #pragma mapbox: initialize lowp float height\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n\\\\n    gl_FragColor = v_color;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec3 u_lightcolor;\\\\nuniform lowp vec3 u_lightpos;\\\\nuniform lowp float u_lightintensity;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec4 a_normal_ed;\\\\n\\\\nvarying vec4 v_color;\\\\n\\\\n#pragma mapbox: define lowp float base\\\\n#pragma mapbox: define lowp float height\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float base\\\\n    #pragma mapbox: initialize lowp float height\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n\\\\n    vec3 normal = a_normal_ed.xyz;\\\\n\\\\n    base = max(0.0, base);\\\\n    height = max(0.0, height);\\\\n\\\\n    float t = mod(normal.x, 2.0);\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\\\\n\\\\n    // Relative luminance (how dark/bright is the surface color?)\\\\n    float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\\\\n\\\\n    v_color = vec4(0.0, 0.0, 0.0, 1.0);\\\\n\\\\n    // Add slight ambient lighting so no extrusions are totally black\\\\n    vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\\\\n    color += ambientlight;\\\\n\\\\n    // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\\\\n    float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\\\\n\\\\n    // Adjust directional so that\\\\n    // the range of values for highlight/shading is narrower\\\\n    // with lower light intensity\\\\n    // and with lighter/brighter surface colors\\\\n    directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\\\\n\\\\n    // Add gradient along z axis of side surfaces\\\\n    if (normal.y != 0.0) {\\\\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\\\n    }\\\\n\\\\n    // Assign final color based on surface + ambient light color, diffuse light directional, and light color\\\\n    // with lower bounds adjusted to hue of light\\\\n    // so that shading is tinted with the complementary (opposite) color to the light color\\\\n    v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\\\\n    v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\\\\n    v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\\\\n}\\\\n\\\"},fillExtrusionPattern:{fragmentSource:\\\"uniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_mix;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\nvarying vec4 v_lighting;\\\\n\\\\n#pragma mapbox: define lowp float base\\\\n#pragma mapbox: define lowp float height\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float base\\\\n    #pragma mapbox: initialize lowp float height\\\\n\\\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\\\\n    vec4 color1 = texture2D(u_image, pos);\\\\n\\\\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\\\\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\\\n    vec4 color2 = texture2D(u_image, pos2);\\\\n\\\\n    vec4 mixedColor = mix(color1, color2, u_mix);\\\\n\\\\n    gl_FragColor = mixedColor * v_lighting;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pixel_coord_upper;\\\\nuniform vec2 u_pixel_coord_lower;\\\\nuniform float u_scale_a;\\\\nuniform float u_scale_b;\\\\nuniform float u_tile_units_to_pixels;\\\\nuniform float u_height_factor;\\\\n\\\\nuniform vec3 u_lightcolor;\\\\nuniform lowp vec3 u_lightpos;\\\\nuniform lowp float u_lightintensity;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec4 a_normal_ed;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\nvarying vec4 v_lighting;\\\\nvarying float v_directional;\\\\n\\\\n#pragma mapbox: define lowp float base\\\\n#pragma mapbox: define lowp float height\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float base\\\\n    #pragma mapbox: initialize lowp float height\\\\n\\\\n    vec3 normal = a_normal_ed.xyz;\\\\n    float edgedistance = a_normal_ed.w;\\\\n\\\\n    base = max(0.0, base);\\\\n    height = max(0.0, height);\\\\n\\\\n    float t = mod(normal.x, 2.0);\\\\n    float z = t > 0.0 ? height : base;\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, z, 1);\\\\n\\\\n    vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\\\\n        ? a_pos // extrusion top\\\\n        : vec2(edgedistance, z * u_height_factor); // extrusion side\\\\n\\\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\\\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\\\\n\\\\n    v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\\\\n    float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\\\\n    directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\\\\n\\\\n    if (normal.y != 0.0) {\\\\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\\\n    }\\\\n\\\\n    v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\\\\n}\\\\n\\\"},extrusionTexture:{fragmentSource:\\\"uniform sampler2D u_image;\\\\nuniform float u_opacity;\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(0.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_world;\\\\nattribute vec2 a_pos;\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\\\\n\\\\n    v_pos.x = a_pos.x;\\\\n    v_pos.y = 1.0 - a_pos.y;\\\\n}\\\\n\\\"},hillshadePrepare:{fragmentSource:\\\"#ifdef GL_ES\\\\nprecision highp float;\\\\n#endif\\\\n\\\\nuniform sampler2D u_image;\\\\nvarying vec2 v_pos;\\\\nuniform vec2 u_dimension;\\\\nuniform float u_zoom;\\\\nuniform float u_maxzoom;\\\\n\\\\nfloat getElevation(vec2 coord, float bias) {\\\\n    // Convert encoded elevation value to meters\\\\n    vec4 data = texture2D(u_image, coord) * 255.0;\\\\n    return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;\\\\n}\\\\n\\\\nvoid main() {\\\\n    vec2 epsilon = 1.0 / u_dimension;\\\\n\\\\n    // queried pixels:\\\\n    // +-----------+\\\\n    // |   |   |   |\\\\n    // | a | b | c |\\\\n    // |   |   |   |\\\\n    // +-----------+\\\\n    // |   |   |   |\\\\n    // | d | e | f |\\\\n    // |   |   |   |\\\\n    // +-----------+\\\\n    // |   |   |   |\\\\n    // | g | h | i |\\\\n    // |   |   |   |\\\\n    // +-----------+\\\\n\\\\n    float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\\\\n    float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\\\\n    float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\\\\n    float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\\\\n    float e = getElevation(v_pos, 0.0);\\\\n    float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\\\\n    float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\\\\n    float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\\\\n    float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\\\\n\\\\n    // here we divide the x and y slopes by 8 * pixel size\\\\n    // where pixel size (aka meters/pixel) is:\\\\n    // circumference of the world / (pixels per tile * number of tiles)\\\\n    // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\\\\n    // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\\\\n    // we want to vertically exaggerate the hillshading though, because otherwise\\\\n    // it is barely noticeable at low zooms. to do this, we multiply this by some\\\\n    // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\\\\n    // Here we use a=0.3 which works out to the expression below. see \\\\n    // nickidlugash's awesome breakdown for more info\\\\n    // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\\\\n    float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\\\\n\\\\n    vec2 deriv = vec2(\\\\n        (c + f + f + i) - (a + d + d + g),\\\\n        (g + h + h + i) - (a + b + b + c)\\\\n    ) /  pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\\\\n\\\\n    gl_FragColor = clamp(vec4(\\\\n        deriv.x / 2.0 + 0.5,\\\\n        deriv.y / 2.0 + 0.5,\\\\n        1.0,\\\\n        1.0), 0.0, 1.0);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec2 a_texture_pos;\\\\n\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n    v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;\\\\n}\\\\n\\\"},hillshade:{fragmentSource:\\\"uniform sampler2D u_image;\\\\nvarying vec2 v_pos;\\\\n\\\\nuniform vec2 u_latrange;\\\\nuniform vec2 u_light;\\\\nuniform vec4 u_shadow;\\\\nuniform vec4 u_highlight;\\\\nuniform vec4 u_accent;\\\\n\\\\n#define PI 3.141592653589793\\\\n\\\\nvoid main() {\\\\n    vec4 pixel = texture2D(u_image, v_pos);\\\\n\\\\n    vec2 deriv = ((pixel.rg * 2.0) - 1.0);\\\\n\\\\n    // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\\\\n    // to account for mercator projection distortion. see #4807 for details\\\\n    float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\\\\n    // We also multiply the slope by an arbitrary z-factor of 1.25\\\\n    float slope = atan(1.25 * length(deriv) / scaleFactor);\\\\n    float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\\\\n\\\\n    float intensity = u_light.x;\\\\n    // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\\\\n    // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\\\\n    // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\\\\n    float azimuth = u_light.y + PI;\\\\n\\\\n    // We scale the slope exponentially based on intensity, using a calculation similar to\\\\n    // the exponential interpolation function in the style spec:\\\\n    // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\\\\n    // so that higher intensity values create more opaque hillshading.\\\\n    float base = 1.875 - intensity * 1.75;\\\\n    float maxValue = 0.5 * PI;\\\\n    float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\\\\n\\\\n    // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\\\\n    // so that the accent color's rate of change eases in while the shade color's eases out.\\\\n    float accent = cos(scaledSlope);\\\\n    // We multiply both the accent and shade color by a clamped intensity value\\\\n    // so that intensities >= 0.5 do not additionally affect the color values\\\\n    // while intensity values < 0.5 make the overall color more transparent.\\\\n    vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\\\\n    float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\\\\n    vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\\\\n    gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec2 a_texture_pos;\\\\n\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n    v_pos = a_texture_pos / 8192.0;\\\\n}\\\\n\\\"},line:{fragmentSource:\\\"#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvarying vec2 v_width2;\\\\nvarying vec2 v_normal;\\\\nvarying float v_gamma_scale;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    // Calculate the distance of the pixel from the line in pixels.\\\\n    float dist = length(v_normal) * v_width2.s;\\\\n\\\\n    // Calculate the antialiasing fade factor. This is either when fading in\\\\n    // the line in case of an offset line (v_width2.t) or when fading out\\\\n    // (v_width2.s)\\\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\\\n\\\\n    gl_FragColor = color * (alpha * opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"\\\\n\\\\n// the distance over which the line edge fades out.\\\\n// Retina devices need a smaller distance to avoid aliasing.\\\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\\\n\\\\n// floor(127 / 2) == 63.0\\\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\\\n// there are also \\\\\\\"special\\\\\\\" normals that have a bigger length (of up to 126 in\\\\n// this case).\\\\n// #define scale 63.0\\\\n#define scale 0.015873016\\\\n\\\\nattribute vec4 a_pos_normal;\\\\nattribute vec4 a_data;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mediump float u_ratio;\\\\nuniform vec2 u_gl_units_to_pixels;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying float v_gamma_scale;\\\\nvarying highp float v_linesofar;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define mediump float gapwidth\\\\n#pragma mapbox: define lowp float offset\\\\n#pragma mapbox: define mediump float width\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize mediump float gapwidth\\\\n    #pragma mapbox: initialize lowp float offset\\\\n    #pragma mapbox: initialize mediump float width\\\\n\\\\n    vec2 a_extrude = a_data.xy - 128.0;\\\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\\\n\\\\n    v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0;\\\\n\\\\n    vec2 pos = a_pos_normal.xy;\\\\n\\\\n    // x is 1 if it's a round cap, 0 otherwise\\\\n    // y is 1 if the normal points up, and -1 if it points down\\\\n    mediump vec2 normal = a_pos_normal.zw;\\\\n    v_normal = normal;\\\\n\\\\n    // these transformations used to be applied in the JS and native code bases.\\\\n    // moved them into the shader for clarity and simplicity.\\\\n    gapwidth = gapwidth / 2.0;\\\\n    float halfwidth = width / 2.0;\\\\n    offset = -1.0 * offset;\\\\n\\\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\\\n\\\\n    // Scale the extrusion vector down to a normal and then up by the line width\\\\n    // of this vertex.\\\\n    mediump vec2 dist = outset * a_extrude * scale;\\\\n\\\\n    // Calculate the offset when drawing a line that is to the side of the actual line.\\\\n    // We do this by creating a vector that points towards the extrude, but rotate\\\\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\\\\n    // extrude vector points in another direction.\\\\n    mediump float u = 0.5 * a_direction;\\\\n    mediump float t = 1.0 - abs(u);\\\\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\\\n\\\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\\\n\\\\n    // calculate how much the perspective view squishes or stretches the extrude\\\\n    float extrude_length_without_perspective = length(dist);\\\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\\\n\\\\n    v_width2 = vec2(outset, inset);\\\\n}\\\\n\\\"},lineGradient:{fragmentSource:\\\"\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_width2;\\\\nvarying vec2 v_normal;\\\\nvarying float v_gamma_scale;\\\\nvarying highp float v_lineprogress;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    // Calculate the distance of the pixel from the line in pixels.\\\\n    float dist = length(v_normal) * v_width2.s;\\\\n\\\\n    // Calculate the antialiasing fade factor. This is either when fading in\\\\n    // the line in case of an offset line (v_width2.t) or when fading out\\\\n    // (v_width2.s)\\\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\\\n\\\\n    // For gradient lines, v_lineprogress is the ratio along the entire line,\\\\n    // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\\\\n    vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\\\\n\\\\n    gl_FragColor = color * (alpha * opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"\\\\n// the attribute conveying progress along a line is scaled to [0, 2^15)\\\\n#define MAX_LINE_DISTANCE 32767.0\\\\n\\\\n// the distance over which the line edge fades out.\\\\n// Retina devices need a smaller distance to avoid aliasing.\\\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\\\n\\\\n// floor(127 / 2) == 63.0\\\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\\\n// there are also \\\\\\\"special\\\\\\\" normals that have a bigger length (of up to 126 in\\\\n// this case).\\\\n// #define scale 63.0\\\\n#define scale 0.015873016\\\\n\\\\nattribute vec4 a_pos_normal;\\\\nattribute vec4 a_data;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mediump float u_ratio;\\\\nuniform vec2 u_gl_units_to_pixels;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying float v_gamma_scale;\\\\nvarying highp float v_lineprogress;\\\\n\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define mediump float gapwidth\\\\n#pragma mapbox: define lowp float offset\\\\n#pragma mapbox: define mediump float width\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize mediump float gapwidth\\\\n    #pragma mapbox: initialize lowp float offset\\\\n    #pragma mapbox: initialize mediump float width\\\\n\\\\n    vec2 a_extrude = a_data.xy - 128.0;\\\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\\\n\\\\n    v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\\\\n\\\\n    vec2 pos = a_pos_normal.xy;\\\\n\\\\n    // x is 1 if it's a round cap, 0 otherwise\\\\n    // y is 1 if the normal points up, and -1 if it points down\\\\n    mediump vec2 normal = a_pos_normal.zw;\\\\n    v_normal = normal;\\\\n\\\\n    // these transformations used to be applied in the JS and native code bases.\\\\n    // moved them into the shader for clarity and simplicity.\\\\n    gapwidth = gapwidth / 2.0;\\\\n    float halfwidth = width / 2.0;\\\\n    offset = -1.0 * offset;\\\\n\\\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\\\n\\\\n    // Scale the extrusion vector down to a normal and then up by the line width\\\\n    // of this vertex.\\\\n    mediump vec2 dist = outset * a_extrude * scale;\\\\n\\\\n    // Calculate the offset when drawing a line that is to the side of the actual line.\\\\n    // We do this by creating a vector that points towards the extrude, but rotate\\\\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\\\\n    // extrude vector points in another direction.\\\\n    mediump float u = 0.5 * a_direction;\\\\n    mediump float t = 1.0 - abs(u);\\\\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\\\n\\\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\\\n\\\\n    // calculate how much the perspective view squishes or stretches the extrude\\\\n    float extrude_length_without_perspective = length(dist);\\\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\\\n\\\\n    v_width2 = vec2(outset, inset);\\\\n}\\\\n\\\"},linePattern:{fragmentSource:\\\"uniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_fade;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying float v_linesofar;\\\\nvarying float v_gamma_scale;\\\\n\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    // Calculate the distance of the pixel from the line in pixels.\\\\n    float dist = length(v_normal) * v_width2.s;\\\\n\\\\n    // Calculate the antialiasing fade factor. This is either when fading in\\\\n    // the line in case of an offset line (v_width2.t) or when fading out\\\\n    // (v_width2.s)\\\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\\\n\\\\n    float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\\\\n    float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\\\\n\\\\n    // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\\\\n    // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\\\\n    // to ensure we don't sample outside the designated symbol on the sprite sheet.\\\\n    // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\\\\n    // the texture coordinate\\\\n    float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_a.y + 2.0) / 2.0) / u_pattern_size_a.y);\\\\n    float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_b.y + 2.0) / 2.0) / u_pattern_size_b.y);\\\\n    vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\\\\n    vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\\\\n\\\\n    vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\\\\n\\\\n    gl_FragColor = color * alpha * opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"// floor(127 / 2) == 63.0\\\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\\\n// there are also \\\\\\\"special\\\\\\\" normals that have a bigger length (of up to 126 in\\\\n// this case).\\\\n// #define scale 63.0\\\\n#define scale 0.015873016\\\\n\\\\n// We scale the distance before adding it to the buffers so that we can store\\\\n// long distances for long segments. Use this value to unscale the distance.\\\\n#define LINE_DISTANCE_SCALE 2.0\\\\n\\\\n// the distance over which the line edge fades out.\\\\n// Retina devices need a smaller distance to avoid aliasing.\\\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\\\n\\\\nattribute vec4 a_pos_normal;\\\\nattribute vec4 a_data;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mediump float u_ratio;\\\\nuniform vec2 u_gl_units_to_pixels;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying float v_linesofar;\\\\nvarying float v_gamma_scale;\\\\n\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define lowp float offset\\\\n#pragma mapbox: define mediump float gapwidth\\\\n#pragma mapbox: define mediump float width\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize lowp float offset\\\\n    #pragma mapbox: initialize mediump float gapwidth\\\\n    #pragma mapbox: initialize mediump float width\\\\n\\\\n    vec2 a_extrude = a_data.xy - 128.0;\\\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\\\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\\\n\\\\n    vec2 pos = a_pos_normal.xy;\\\\n\\\\n    // x is 1 if it's a round cap, 0 otherwise\\\\n    // y is 1 if the normal points up, and -1 if it points down\\\\n    mediump vec2 normal = a_pos_normal.zw;\\\\n    v_normal = normal;\\\\n\\\\n    // these transformations used to be applied in the JS and native code bases.\\\\n    // moved them into the shader for clarity and simplicity.\\\\n    gapwidth = gapwidth / 2.0;\\\\n    float halfwidth = width / 2.0;\\\\n    offset = -1.0 * offset;\\\\n\\\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\\\n\\\\n    // Scale the extrusion vector down to a normal and then up by the line width\\\\n    // of this vertex.\\\\n    mediump vec2 dist = outset * a_extrude * scale;\\\\n\\\\n    // Calculate the offset when drawing a line that is to the side of the actual line.\\\\n    // We do this by creating a vector that points towards the extrude, but rotate\\\\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\\\\n    // extrude vector points in another direction.\\\\n    mediump float u = 0.5 * a_direction;\\\\n    mediump float t = 1.0 - abs(u);\\\\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\\\n\\\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\\\n\\\\n    // calculate how much the perspective view squishes or stretches the extrude\\\\n    float extrude_length_without_perspective = length(dist);\\\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\\\n\\\\n    v_linesofar = a_linesofar;\\\\n    v_width2 = vec2(outset, inset);\\\\n}\\\\n\\\"},lineSDF:{fragmentSource:\\\"\\\\nuniform sampler2D u_image;\\\\nuniform float u_sdfgamma;\\\\nuniform float u_mix;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying vec2 v_tex_a;\\\\nvarying vec2 v_tex_b;\\\\nvarying float v_gamma_scale;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define mediump float width\\\\n#pragma mapbox: define lowp float floorwidth\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize mediump float width\\\\n    #pragma mapbox: initialize lowp float floorwidth\\\\n\\\\n    // Calculate the distance of the pixel from the line in pixels.\\\\n    float dist = length(v_normal) * v_width2.s;\\\\n\\\\n    // Calculate the antialiasing fade factor. This is either when fading in\\\\n    // the line in case of an offset line (v_width2.t) or when fading out\\\\n    // (v_width2.s)\\\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\\\n\\\\n    float sdfdist_a = texture2D(u_image, v_tex_a).a;\\\\n    float sdfdist_b = texture2D(u_image, v_tex_b).a;\\\\n    float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\\\\n    alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\\\\n\\\\n    gl_FragColor = color * (alpha * opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"// floor(127 / 2) == 63.0\\\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\\\n// there are also \\\\\\\"special\\\\\\\" normals that have a bigger length (of up to 126 in\\\\n// this case).\\\\n// #define scale 63.0\\\\n#define scale 0.015873016\\\\n\\\\n// We scale the distance before adding it to the buffers so that we can store\\\\n// long distances for long segments. Use this value to unscale the distance.\\\\n#define LINE_DISTANCE_SCALE 2.0\\\\n\\\\n// the distance over which the line edge fades out.\\\\n// Retina devices need a smaller distance to avoid aliasing.\\\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\\\n\\\\nattribute vec4 a_pos_normal;\\\\nattribute vec4 a_data;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mediump float u_ratio;\\\\nuniform vec2 u_patternscale_a;\\\\nuniform float u_tex_y_a;\\\\nuniform vec2 u_patternscale_b;\\\\nuniform float u_tex_y_b;\\\\nuniform vec2 u_gl_units_to_pixels;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying vec2 v_tex_a;\\\\nvarying vec2 v_tex_b;\\\\nvarying float v_gamma_scale;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define mediump float gapwidth\\\\n#pragma mapbox: define lowp float offset\\\\n#pragma mapbox: define mediump float width\\\\n#pragma mapbox: define lowp float floorwidth\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize mediump float gapwidth\\\\n    #pragma mapbox: initialize lowp float offset\\\\n    #pragma mapbox: initialize mediump float width\\\\n    #pragma mapbox: initialize lowp float floorwidth\\\\n\\\\n    vec2 a_extrude = a_data.xy - 128.0;\\\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\\\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\\\n\\\\n    vec2 pos = a_pos_normal.xy;\\\\n\\\\n    // x is 1 if it's a round cap, 0 otherwise\\\\n    // y is 1 if the normal points up, and -1 if it points down\\\\n    mediump vec2 normal = a_pos_normal.zw;\\\\n    v_normal = normal;\\\\n\\\\n    // these transformations used to be applied in the JS and native code bases.\\\\n    // moved them into the shader for clarity and simplicity.\\\\n    gapwidth = gapwidth / 2.0;\\\\n    float halfwidth = width / 2.0;\\\\n    offset = -1.0 * offset;\\\\n\\\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\\\n\\\\n    // Scale the extrusion vector down to a normal and then up by the line width\\\\n    // of this vertex.\\\\n    mediump vec2 dist =outset * a_extrude * scale;\\\\n\\\\n    // Calculate the offset when drawing a line that is to the side of the actual line.\\\\n    // We do this by creating a vector that points towards the extrude, but rotate\\\\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\\\\n    // extrude vector points in another direction.\\\\n    mediump float u = 0.5 * a_direction;\\\\n    mediump float t = 1.0 - abs(u);\\\\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\\\n\\\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\\\n\\\\n    // calculate how much the perspective view squishes or stretches the extrude\\\\n    float extrude_length_without_perspective = length(dist);\\\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\\\n\\\\n    v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\\\\n    v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\\\\n\\\\n    v_width2 = vec2(outset, inset);\\\\n}\\\\n\\\"},raster:{fragmentSource:\\\"uniform float u_fade_t;\\\\nuniform float u_opacity;\\\\nuniform sampler2D u_image0;\\\\nuniform sampler2D u_image1;\\\\nvarying vec2 v_pos0;\\\\nvarying vec2 v_pos1;\\\\n\\\\nuniform float u_brightness_low;\\\\nuniform float u_brightness_high;\\\\n\\\\nuniform float u_saturation_factor;\\\\nuniform float u_contrast_factor;\\\\nuniform vec3 u_spin_weights;\\\\n\\\\nvoid main() {\\\\n\\\\n    // read and cross-fade colors from the main and parent tiles\\\\n    vec4 color0 = texture2D(u_image0, v_pos0);\\\\n    vec4 color1 = texture2D(u_image1, v_pos1);\\\\n    if (color0.a > 0.0) {\\\\n        color0.rgb = color0.rgb / color0.a;\\\\n    }\\\\n    if (color1.a > 0.0) {\\\\n        color1.rgb = color1.rgb / color1.a;\\\\n    }\\\\n    vec4 color = mix(color0, color1, u_fade_t);\\\\n    color.a *= u_opacity;\\\\n    vec3 rgb = color.rgb;\\\\n\\\\n    // spin\\\\n    rgb = vec3(\\\\n        dot(rgb, u_spin_weights.xyz),\\\\n        dot(rgb, u_spin_weights.zxy),\\\\n        dot(rgb, u_spin_weights.yzx));\\\\n\\\\n    // saturation\\\\n    float average = (color.r + color.g + color.b) / 3.0;\\\\n    rgb += (average - rgb) * u_saturation_factor;\\\\n\\\\n    // contrast\\\\n    rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\\\\n\\\\n    // brightness\\\\n    vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\\\\n    vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\\\\n\\\\n    gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_tl_parent;\\\\nuniform float u_scale_parent;\\\\nuniform float u_buffer_scale;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec2 a_texture_pos;\\\\n\\\\nvarying vec2 v_pos0;\\\\nvarying vec2 v_pos1;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n    // We are using Int16 for texture position coordinates to give us enough precision for\\\\n    // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\\\\n    // as an arbitrarily high number to preserve adequate precision when rendering.\\\\n    // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\\\\n    // so math for modifying either is consistent.\\\\n    v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\\\\n    v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\\\\n}\\\\n\\\"},symbolIcon:{fragmentSource:\\\"uniform sampler2D u_texture;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvarying vec2 v_tex;\\\\nvarying float v_fade_opacity;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    lowp float alpha = opacity * v_fade_opacity;\\\\n    gl_FragColor = texture2D(u_texture, v_tex) * alpha;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"const float PI = 3.141592653589793;\\\\n\\\\nattribute vec4 a_pos_offset;\\\\nattribute vec4 a_data;\\\\nattribute vec3 a_projected_pos;\\\\nattribute float a_fade_opacity;\\\\n\\\\nuniform bool u_is_size_zoom_constant;\\\\nuniform bool u_is_size_feature_constant;\\\\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\\\\nuniform highp float u_size; // used when size is both zoom and feature constant\\\\nuniform highp float u_camera_to_center_distance;\\\\nuniform highp float u_pitch;\\\\nuniform bool u_rotate_symbol;\\\\nuniform highp float u_aspect_ratio;\\\\nuniform float u_fade_change;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mat4 u_label_plane_matrix;\\\\nuniform mat4 u_gl_coord_matrix;\\\\n\\\\nuniform bool u_is_text;\\\\nuniform bool u_pitch_with_map;\\\\n\\\\nuniform vec2 u_texsize;\\\\n\\\\nvarying vec2 v_tex;\\\\nvarying float v_fade_opacity;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    vec2 a_pos = a_pos_offset.xy;\\\\n    vec2 a_offset = a_pos_offset.zw;\\\\n\\\\n    vec2 a_tex = a_data.xy;\\\\n    vec2 a_size = a_data.zw;\\\\n\\\\n    highp float segment_angle = -a_projected_pos[2];\\\\n\\\\n    float size;\\\\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\\\\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\\\\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\\\\n        size = a_size[0] / 10.0;\\\\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\\\\n        size = u_size;\\\\n    } else {\\\\n        size = u_size;\\\\n    }\\\\n\\\\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\\\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\\\n    // See comments in symbol_sdf.vertex\\\\n    highp float distance_ratio = u_pitch_with_map ?\\\\n        camera_to_anchor_distance / u_camera_to_center_distance :\\\\n        u_camera_to_center_distance / camera_to_anchor_distance;\\\\n    highp float perspective_ratio = clamp(\\\\n            0.5 + 0.5 * distance_ratio,\\\\n            0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\\\\n            4.0);\\\\n\\\\n    size *= perspective_ratio;\\\\n\\\\n    float fontScale = u_is_text ? size / 24.0 : size;\\\\n\\\\n    highp float symbol_rotation = 0.0;\\\\n    if (u_rotate_symbol) {\\\\n        // See comments in symbol_sdf.vertex\\\\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\\\\n\\\\n        vec2 a = projectedPoint.xy / projectedPoint.w;\\\\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\\\\n\\\\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\\\\n    }\\\\n\\\\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\\\\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\\\\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\\\\n\\\\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\\\\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\\\\n\\\\n    v_tex = a_tex / u_texsize;\\\\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\\\\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\\\\n    v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\\\\n}\\\\n\\\"},symbolSDF:{fragmentSource:\\\"#define SDF_PX 8.0\\\\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\\\\n\\\\nuniform bool u_is_halo;\\\\n#pragma mapbox: define highp vec4 fill_color\\\\n#pragma mapbox: define highp vec4 halo_color\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define lowp float halo_width\\\\n#pragma mapbox: define lowp float halo_blur\\\\n\\\\nuniform sampler2D u_texture;\\\\nuniform highp float u_gamma_scale;\\\\nuniform bool u_is_text;\\\\n\\\\nvarying vec2 v_data0;\\\\nvarying vec3 v_data1;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 fill_color\\\\n    #pragma mapbox: initialize highp vec4 halo_color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize lowp float halo_width\\\\n    #pragma mapbox: initialize lowp float halo_blur\\\\n\\\\n    vec2 tex = v_data0.xy;\\\\n    float gamma_scale = v_data1.x;\\\\n    float size = v_data1.y;\\\\n    float fade_opacity = v_data1[2];\\\\n\\\\n    float fontScale = u_is_text ? size / 24.0 : size;\\\\n\\\\n    lowp vec4 color = fill_color;\\\\n    highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\\\\n    lowp float buff = (256.0 - 64.0) / 256.0;\\\\n    if (u_is_halo) {\\\\n        color = halo_color;\\\\n        gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\\\\n        buff = (6.0 - halo_width / fontScale) / SDF_PX;\\\\n    }\\\\n\\\\n    lowp float dist = texture2D(u_texture, tex).a;\\\\n    highp float gamma_scaled = gamma * gamma_scale;\\\\n    highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\\\\n\\\\n    gl_FragColor = color * (alpha * opacity * fade_opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"const float PI = 3.141592653589793;\\\\n\\\\nattribute vec4 a_pos_offset;\\\\nattribute vec4 a_data;\\\\nattribute vec3 a_projected_pos;\\\\nattribute float a_fade_opacity;\\\\n\\\\n// contents of a_size vary based on the type of property value\\\\n// used for {text,icon}-size.\\\\n// For constants, a_size is disabled.\\\\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\\\\n// For composite functions:\\\\n// [ text-size(lowerZoomStop, feature),\\\\n//   text-size(upperZoomStop, feature) ]\\\\nuniform bool u_is_size_zoom_constant;\\\\nuniform bool u_is_size_feature_constant;\\\\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\\\\nuniform highp float u_size; // used when size is both zoom and feature constant\\\\n\\\\n#pragma mapbox: define highp vec4 fill_color\\\\n#pragma mapbox: define highp vec4 halo_color\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define lowp float halo_width\\\\n#pragma mapbox: define lowp float halo_blur\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mat4 u_label_plane_matrix;\\\\nuniform mat4 u_gl_coord_matrix;\\\\n\\\\nuniform bool u_is_text;\\\\nuniform bool u_pitch_with_map;\\\\nuniform highp float u_pitch;\\\\nuniform bool u_rotate_symbol;\\\\nuniform highp float u_aspect_ratio;\\\\nuniform highp float u_camera_to_center_distance;\\\\nuniform float u_fade_change;\\\\n\\\\nuniform vec2 u_texsize;\\\\n\\\\nvarying vec2 v_data0;\\\\nvarying vec3 v_data1;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 fill_color\\\\n    #pragma mapbox: initialize highp vec4 halo_color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize lowp float halo_width\\\\n    #pragma mapbox: initialize lowp float halo_blur\\\\n\\\\n    vec2 a_pos = a_pos_offset.xy;\\\\n    vec2 a_offset = a_pos_offset.zw;\\\\n\\\\n    vec2 a_tex = a_data.xy;\\\\n    vec2 a_size = a_data.zw;\\\\n\\\\n    highp float segment_angle = -a_projected_pos[2];\\\\n    float size;\\\\n\\\\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\\\\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\\\\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\\\\n        size = a_size[0] / 10.0;\\\\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\\\\n        size = u_size;\\\\n    } else {\\\\n        size = u_size;\\\\n    }\\\\n\\\\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\\\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\\\n    // If the label is pitched with the map, layout is done in pitched space,\\\\n    // which makes labels in the distance smaller relative to viewport space.\\\\n    // We counteract part of that effect by multiplying by the perspective ratio.\\\\n    // If the label isn't pitched with the map, we do layout in viewport space,\\\\n    // which makes labels in the distance larger relative to the features around\\\\n    // them. We counteract part of that effect by dividing by the perspective ratio.\\\\n    highp float distance_ratio = u_pitch_with_map ?\\\\n        camera_to_anchor_distance / u_camera_to_center_distance :\\\\n        u_camera_to_center_distance / camera_to_anchor_distance;\\\\n    highp float perspective_ratio = clamp(\\\\n        0.5 + 0.5 * distance_ratio,\\\\n        0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\\\\n        4.0);\\\\n\\\\n    size *= perspective_ratio;\\\\n\\\\n    float fontScale = u_is_text ? size / 24.0 : size;\\\\n\\\\n    highp float symbol_rotation = 0.0;\\\\n    if (u_rotate_symbol) {\\\\n        // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\\\\n        // To figure out that angle in projected space, we draw a short horizontal line in tile\\\\n        // space, project it, and measure its angle in projected space.\\\\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\\\\n\\\\n        vec2 a = projectedPoint.xy / projectedPoint.w;\\\\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\\\\n\\\\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\\\\n    }\\\\n\\\\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\\\\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\\\\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\\\\n\\\\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\\\\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\\\\n    float gamma_scale = gl_Position.w;\\\\n\\\\n    vec2 tex = a_tex / u_texsize;\\\\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\\\\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\\\\n    float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\\\\n\\\\n    v_data0 = vec2(tex.x, tex.y);\\\\n    v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\\\\n}\\\\n\\\"}},tr=/#pragma mapbox: ([\\\\w]+) ([\\\\w]+) ([\\\\w]+) ([\\\\w]+)/g,er=function(t){var e=Qe[t],r={};e.fragmentSource=e.fragmentSource.replace(tr,function(t,e,n,i,a){return r[a]=!0,\\\"define\\\"===e?\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\nvarying \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\";\\\\n#else\\\\nuniform \\\"+n+\\\" \\\"+i+\\\" u_\\\"+a+\\\";\\\\n#endif\\\\n\\\":\\\"\\\\n#ifdef HAS_UNIFORM_u_\\\"+a+\\\"\\\\n    \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\" = u_\\\"+a+\\\";\\\\n#endif\\\\n\\\"}),e.vertexSource=e.vertexSource.replace(tr,function(t,e,n,i,a){var o=\\\"float\\\"===i?\\\"vec2\\\":\\\"vec4\\\";return r[a]?\\\"define\\\"===e?\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\nuniform lowp float a_\\\"+a+\\\"_t;\\\\nattribute \\\"+n+\\\" \\\"+o+\\\" a_\\\"+a+\\\";\\\\nvarying \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\";\\\\n#else\\\\nuniform \\\"+n+\\\" \\\"+i+\\\" u_\\\"+a+\\\";\\\\n#endif\\\\n\\\":\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\n    \\\"+a+\\\" = unpack_mix_\\\"+o+\\\"(a_\\\"+a+\\\", a_\\\"+a+\\\"_t);\\\\n#else\\\\n    \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\" = u_\\\"+a+\\\";\\\\n#endif\\\\n\\\":\\\"define\\\"===e?\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\nuniform lowp float a_\\\"+a+\\\"_t;\\\\nattribute \\\"+n+\\\" \\\"+o+\\\" a_\\\"+a+\\\";\\\\n#else\\\\nuniform \\\"+n+\\\" \\\"+i+\\\" u_\\\"+a+\\\";\\\\n#endif\\\\n\\\":\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\n    \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\" = unpack_mix_\\\"+o+\\\"(a_\\\"+a+\\\", a_\\\"+a+\\\"_t);\\\\n#else\\\\n    \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\" = u_\\\"+a+\\\";\\\\n#endif\\\\n\\\"})};for(var rr in Qe)er(rr);var nr=Qe,ir=function(t,e,r,n){var i=t.gl;this.program=i.createProgram();var o=r.defines().concat(\\\"#define DEVICE_PIXEL_RATIO \\\"+a.devicePixelRatio.toFixed(1));n&&o.push(\\\"#define OVERDRAW_INSPECTOR;\\\");var s=o.concat(nr.prelude.fragmentSource,e.fragmentSource).join(\\\"\\\\n\\\"),l=o.concat(nr.prelude.vertexSource,e.vertexSource).join(\\\"\\\\n\\\"),c=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(c,s),i.compileShader(c),i.attachShader(this.program,c);var u=i.createShader(i.VERTEX_SHADER);i.shaderSource(u,l),i.compileShader(u),i.attachShader(this.program,u);for(var f=r.layoutAttributes||[],h=0;h<f.length;h++)i.bindAttribLocation(this.program,h,f[h].name);i.linkProgram(this.program),this.numAttributes=i.getProgramParameter(this.program,i.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var p=0;p<this.numAttributes;p++){var d=i.getActiveAttrib(this.program,p);d&&(this.attributes[d.name]=i.getAttribLocation(this.program,d.name))}for(var g=i.getProgramParameter(this.program,i.ACTIVE_UNIFORMS),v=0;v<g;v++){var m=i.getActiveUniform(this.program,v);m&&(this.uniforms[m.name]=i.getUniformLocation(this.program,m.name))}};function ar(e,r,n,i,a){for(var o=0;o<n.length;o++){var s=n[o];if(i.isLessThan(s.tileID))break;if(r.key===s.tileID.key)return;if(s.tileID.isChildOf(r)){for(var l=r.children(1/0),c=0;c<l.length;c++)ar(e,l[c],n.slice(o),i,a);return}}var u=r.overscaledZ-e.overscaledZ,f=new t.CanonicalTileID(u,r.canonical.x-(e.canonical.x<<u),r.canonical.y-(e.canonical.y<<u));a[f.key]=a[f.key]||f}function or(t,e,r,n,i){var a=t.context,o=a.gl,s=i?t.useProgram(\\\"collisionCircle\\\"):t.useProgram(\\\"collisionBox\\\");a.setDepthMode(qt.disabled),a.setStencilMode(Ht.disabled),a.setColorMode(t.colorModeForRenderPass());for(var l=0;l<n.length;l++){var c=n[l],u=e.getTile(c),f=u.getBucket(r);if(f){var h=i?f.collisionCircle:f.collisionBox;if(h){o.uniformMatrix4fv(s.uniforms.u_matrix,!1,c.posMatrix),i||a.lineWidth.set(1),o.uniform1f(s.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance);var p=Te(u,1,t.transform.zoom),d=Math.pow(2,t.transform.zoom-u.tileID.overscaledZ);o.uniform1f(s.uniforms.u_pixels_to_tile_units,p),o.uniform2f(s.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits[0]/(p*d),t.transform.pixelsToGLUnits[1]/(p*d)),o.uniform1f(s.uniforms.u_overscale_factor,u.tileID.overscaleFactor()),s.draw(a,i?o.TRIANGLES:o.LINES,r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,h.collisionVertexBuffer,null)}}}}ir.prototype.draw=function(t,e,r,n,i,a,o,s,l){for(var c,u=t.gl,f=(c={},c[u.LINES]=2,c[u.TRIANGLES]=3,c)[e],h=0,p=a.get();h<p.length;h+=1){var d=p[h],g=d.vaos||(d.vaos={});(g[r]||(g[r]=new Q)).bind(t,this,n,o?o.getPaintVertexBuffers():[],i,d.vertexOffset,s,l),u.drawElements(e,d.primitiveLength*f,u.UNSIGNED_SHORT,d.primitiveOffset*f*2)}};var sr=t.mat4.identity(new Float32Array(16)),lr=t.default$19.layout;function cr(t,e,r,n,i,a,o,s,l,c){var u,f=t.context,h=f.gl,p=t.transform,d=\\\"map\\\"===s,g=\\\"map\\\"===l,v=d&&\\\"line\\\"===r.layout.get(\\\"symbol-placement\\\"),m=d&&!g&&!v,y=g;f.setDepthMode(y?t.depthModeForSublayer(0,qt.ReadOnly):qt.disabled);for(var x=0,b=n;x<b.length;x+=1){var _=b[x],w=e.getTile(_),k=w.getBucket(r);if(k){var M=i?k.text:k.icon;if(M&&M.segments.get().length){var A=M.programConfigurations.get(r.id),T=i||k.sdfIcons,S=i?k.textSizeData:k.iconSizeData;if(u||(u=t.useProgram(T?\\\"symbolSDF\\\":\\\"symbolIcon\\\",A),A.setUniforms(t.context,u,r.paint,{zoom:t.transform.zoom}),ur(u,t,r,i,m,g,S)),f.activeTexture.set(h.TEXTURE0),h.uniform1i(u.uniforms.u_texture,0),i)w.glyphAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),h.uniform2fv(u.uniforms.u_texsize,w.glyphAtlasTexture.size);else{var C=1!==r.layout.get(\\\"icon-size\\\").constantOr(0)||k.iconsNeedLinear,E=g||0!==p.pitch;w.iconAtlasTexture.bind(T||t.options.rotating||t.options.zooming||C||E?h.LINEAR:h.NEAREST,h.CLAMP_TO_EDGE),h.uniform2fv(u.uniforms.u_texsize,w.iconAtlasTexture.size)}h.uniformMatrix4fv(u.uniforms.u_matrix,!1,t.translatePosMatrix(_.posMatrix,w,a,o));var L=Te(w,1,t.transform.zoom),z=fe(_.posMatrix,g,d,t.transform,L),O=he(_.posMatrix,g,d,t.transform,L);h.uniformMatrix4fv(u.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(O,w,a,o,!0)),v?(h.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,sr),ge(k,_.posMatrix,t,i,z,O,g,c)):h.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,z),h.uniform1f(u.uniforms.u_fade_change,t.options.fadeDuration?t.symbolFadeChange:1),fr(u,A,t,r,w,M,i,T,g)}}}}function ur(e,r,n,i,a,o,s){var l=r.context.gl,c=r.transform;l.uniform1i(e.uniforms.u_pitch_with_map,o?1:0),l.uniform1f(e.uniforms.u_is_text,i?1:0),l.uniform1f(e.uniforms.u_pitch,c.pitch/360*2*Math.PI);var u=\\\"constant\\\"===s.functionType||\\\"source\\\"===s.functionType,f=\\\"constant\\\"===s.functionType||\\\"camera\\\"===s.functionType;l.uniform1i(e.uniforms.u_is_size_zoom_constant,u?1:0),l.uniform1i(e.uniforms.u_is_size_feature_constant,f?1:0),l.uniform1f(e.uniforms.u_camera_to_center_distance,c.cameraToCenterDistance);var h=t.evaluateSizeForZoom(s,c.zoom,lr.properties[i?\\\"text-size\\\":\\\"icon-size\\\"]);void 0!==h.uSizeT&&l.uniform1f(e.uniforms.u_size_t,h.uSizeT),void 0!==h.uSize&&l.uniform1f(e.uniforms.u_size,h.uSize),l.uniform1f(e.uniforms.u_aspect_ratio,c.width/c.height),l.uniform1i(e.uniforms.u_rotate_symbol,a?1:0)}function fr(t,e,r,n,i,a,o,s,l){var c=r.context,u=c.gl,f=r.transform;if(s){var h=0!==n.paint.get(o?\\\"text-halo-width\\\":\\\"icon-halo-width\\\").constantOr(1),p=l?Math.cos(f._pitch)*f.cameraToCenterDistance:1;u.uniform1f(t.uniforms.u_gamma_scale,p),h&&(u.uniform1f(t.uniforms.u_is_halo,1),hr(a,n,c,t)),u.uniform1f(t.uniforms.u_is_halo,0)}hr(a,n,c,t)}function hr(t,e,r,n){n.draw(r,r.gl.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function pr(t,e,r,n,i,o,s,l,c){var u,f,h,p,d=e.context,g=d.gl,v=i.paint.get(\\\"line-dasharray\\\"),m=i.paint.get(\\\"line-pattern\\\");if(l||c){var y=1/Te(r,1,e.transform.tileZoom);if(v){u=e.lineAtlas.getDash(v.from,\\\"round\\\"===i.layout.get(\\\"line-cap\\\")),f=e.lineAtlas.getDash(v.to,\\\"round\\\"===i.layout.get(\\\"line-cap\\\"));var x=u.width*v.fromScale,b=f.width*v.toScale;g.uniform2f(t.uniforms.u_patternscale_a,y/x,-u.height/2),g.uniform2f(t.uniforms.u_patternscale_b,y/b,-f.height/2),g.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(x,b)*a.devicePixelRatio)/2)}else if(m){if(h=e.imageManager.getPattern(m.from),p=e.imageManager.getPattern(m.to),!h||!p)return;g.uniform2f(t.uniforms.u_pattern_size_a,h.displaySize[0]*m.fromScale/y,h.displaySize[1]),g.uniform2f(t.uniforms.u_pattern_size_b,p.displaySize[0]*m.toScale/y,p.displaySize[1]);var _=e.imageManager.getPixelSize(),w=_.width,k=_.height;g.uniform2fv(t.uniforms.u_texsize,[w,k])}g.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1])}l&&(v?(g.uniform1i(t.uniforms.u_image,0),d.activeTexture.set(g.TEXTURE0),e.lineAtlas.bind(d),g.uniform1f(t.uniforms.u_tex_y_a,u.y),g.uniform1f(t.uniforms.u_tex_y_b,f.y),g.uniform1f(t.uniforms.u_mix,v.t)):m&&(g.uniform1i(t.uniforms.u_image,0),d.activeTexture.set(g.TEXTURE0),e.imageManager.bind(d),g.uniform2fv(t.uniforms.u_pattern_tl_a,h.tl),g.uniform2fv(t.uniforms.u_pattern_br_a,h.br),g.uniform2fv(t.uniforms.u_pattern_tl_b,p.tl),g.uniform2fv(t.uniforms.u_pattern_br_b,p.br),g.uniform1f(t.uniforms.u_fade,m.t))),d.setStencilMode(e.stencilModeForClipping(o));var M=e.translatePosMatrix(o.posMatrix,r,i.paint.get(\\\"line-translate\\\"),i.paint.get(\\\"line-translate-anchor\\\"));if(g.uniformMatrix4fv(t.uniforms.u_matrix,!1,M),g.uniform1f(t.uniforms.u_ratio,1/Te(r,1,e.transform.zoom)),i.paint.get(\\\"line-gradient\\\")){d.activeTexture.set(g.TEXTURE0);var A=i.gradientTexture;if(!i.gradient)return;A||(A=i.gradientTexture=new z(d,i.gradient,g.RGBA)),A.bind(g.LINEAR,g.CLAMP_TO_EDGE),g.uniform1i(t.uniforms.u_image,0)}t.draw(d,g.TRIANGLES,i.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,s)}var dr=function(t,e){if(!t)return!1;var r=e.imageManager.getPattern(t.from),n=e.imageManager.getPattern(t.to);return!r||!n},gr=function(t,e,r){var n=e.context,i=n.gl,a=e.imageManager.getPattern(t.from),o=e.imageManager.getPattern(t.to);i.uniform1i(r.uniforms.u_image,0),i.uniform2fv(r.uniforms.u_pattern_tl_a,a.tl),i.uniform2fv(r.uniforms.u_pattern_br_a,a.br),i.uniform2fv(r.uniforms.u_pattern_tl_b,o.tl),i.uniform2fv(r.uniforms.u_pattern_br_b,o.br);var s=e.imageManager.getPixelSize(),l=s.width,c=s.height;i.uniform2fv(r.uniforms.u_texsize,[l,c]),i.uniform1f(r.uniforms.u_mix,t.t),i.uniform2fv(r.uniforms.u_pattern_size_a,a.displaySize),i.uniform2fv(r.uniforms.u_pattern_size_b,o.displaySize),i.uniform1f(r.uniforms.u_scale_a,t.fromScale),i.uniform1f(r.uniforms.u_scale_b,t.toScale),n.activeTexture.set(i.TEXTURE0),e.imageManager.bind(e.context)},vr=function(t,e,r){var n=e.context.gl;n.uniform1f(r.uniforms.u_tile_units_to_pixels,1/Te(t,1,e.transform.tileZoom));var i=Math.pow(2,t.tileID.overscaledZ),a=t.tileSize*Math.pow(2,e.transform.tileZoom)/i,o=a*(t.tileID.canonical.x+t.tileID.wrap*i),s=a*t.tileID.canonical.y;n.uniform2f(r.uniforms.u_pixel_coord_upper,o>>16,s>>16),n.uniform2f(r.uniforms.u_pixel_coord_lower,65535&o,65535&s)};function mr(t,e,r,n,i){if(!dr(r.paint.get(\\\"fill-pattern\\\"),t))for(var a=!0,o=0,s=n;o<s.length;o+=1){var l=s[o],c=e.getTile(l),u=c.getBucket(r);u&&(t.context.setStencilMode(t.stencilModeForClipping(l)),i(t,e,r,c,l,u,a),a=!1)}}function yr(t,e,r,n,i,a,o){var s=t.context.gl,l=a.programConfigurations.get(r.id);br(\\\"fill\\\",r.paint.get(\\\"fill-pattern\\\"),t,l,r,n,i,o).draw(t.context,s.TRIANGLES,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,l)}function xr(t,e,r,n,i,a,o){var s=t.context.gl,l=a.programConfigurations.get(r.id),c=br(\\\"fillOutline\\\",r.getPaintProperty(\\\"fill-outline-color\\\")?null:r.paint.get(\\\"fill-pattern\\\"),t,l,r,n,i,o);s.uniform2f(c.uniforms.u_world,s.drawingBufferWidth,s.drawingBufferHeight),c.draw(t.context,s.LINES,r.id,a.layoutVertexBuffer,a.indexBuffer2,a.segments2,l)}function br(t,e,r,n,i,a,o,s){var l,c=r.context.program.get();return e?(l=r.useProgram(t+\\\"Pattern\\\",n),(s||l.program!==c)&&(n.setUniforms(r.context,l,i.paint,{zoom:r.transform.zoom}),gr(e,r,l)),vr(a,r,l)):(l=r.useProgram(t,n),(s||l.program!==c)&&n.setUniforms(r.context,l,i.paint,{zoom:r.transform.zoom})),r.context.gl.uniformMatrix4fv(l.uniforms.u_matrix,!1,r.translatePosMatrix(o.posMatrix,a,i.paint.get(\\\"fill-translate\\\"),i.paint.get(\\\"fill-translate-anchor\\\"))),l}var _r=t.default$20.mat3,wr=t.default$20.mat4,kr=t.default$20.vec3;function Mr(t,e,r,n,i,a,o){var s=t.context,l=s.gl,c=r.paint.get(\\\"fill-extrusion-pattern\\\"),u=t.context.program.get(),f=a.programConfigurations.get(r.id),h=t.useProgram(c?\\\"fillExtrusionPattern\\\":\\\"fillExtrusion\\\",f);if((o||h.program!==u)&&f.setUniforms(s,h,r.paint,{zoom:t.transform.zoom}),c){if(dr(c,t))return;gr(c,t,h),vr(n,t,h),l.uniform1f(h.uniforms.u_height_factor,-Math.pow(2,i.overscaledZ)/n.tileSize/8)}t.context.gl.uniformMatrix4fv(h.uniforms.u_matrix,!1,t.translatePosMatrix(i.posMatrix,n,r.paint.get(\\\"fill-extrusion-translate\\\"),r.paint.get(\\\"fill-extrusion-translate-anchor\\\"))),function(t,e){var r=e.context.gl,n=e.style.light,i=n.properties.get(\\\"position\\\"),a=[i.x,i.y,i.z],o=_r.create();\\\"viewport\\\"===n.properties.get(\\\"anchor\\\")&&_r.fromRotation(o,-e.transform.angle),kr.transformMat3(a,a,o);var s=n.properties.get(\\\"color\\\");r.uniform3fv(t.uniforms.u_lightpos,a),r.uniform1f(t.uniforms.u_lightintensity,n.properties.get(\\\"intensity\\\")),r.uniform3f(t.uniforms.u_lightcolor,s.r,s.g,s.b)}(h,t),h.draw(s,l.TRIANGLES,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,f)}function Ar(e,r,n){var i=e.context,a=i.gl,o=r.fbo;if(o){var s=e.useProgram(\\\"hillshade\\\"),l=e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),!0);!function(t,e,r){var n=r.paint.get(\\\"hillshade-illumination-direction\\\")*(Math.PI/180);\\\"viewport\\\"===r.paint.get(\\\"hillshade-illumination-anchor\\\")&&(n-=e.transform.angle),e.context.gl.uniform2f(t.uniforms.u_light,r.paint.get(\\\"hillshade-exaggeration\\\"),n)}(s,e,n);var c=function(e,r){var n=r.toCoordinate(),i=new t.default$17(n.column,n.row+1,n.zoom);return[e.transform.coordinateLocation(n).lat,e.transform.coordinateLocation(i).lat]}(e,r.tileID);i.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,o.colorAttachment.get()),a.uniformMatrix4fv(s.uniforms.u_matrix,!1,l),a.uniform2fv(s.uniforms.u_latrange,c),a.uniform1i(s.uniforms.u_image,0);var u=n.paint.get(\\\"hillshade-shadow-color\\\");a.uniform4f(s.uniforms.u_shadow,u.r,u.g,u.b,u.a);var f=n.paint.get(\\\"hillshade-highlight-color\\\");a.uniform4f(s.uniforms.u_highlight,f.r,f.g,f.b,f.a);var h=n.paint.get(\\\"hillshade-accent-color\\\");if(a.uniform4f(s.uniforms.u_accent,h.r,h.g,h.b,h.a),r.maskedBoundsBuffer&&r.maskedIndexBuffer&&r.segments)s.draw(i,a.TRIANGLES,n.id,r.maskedBoundsBuffer,r.maskedIndexBuffer,r.segments);else{var p=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,s,p,[]),a.drawArrays(a.TRIANGLE_STRIP,0,p.length)}}}function Tr(e,r,n){var i=e.context,a=i.gl;if(r.dem&&r.dem.level){var o=r.dem.level.dim,s=r.dem.getPixels();if(i.activeTexture.set(a.TEXTURE1),i.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(r.tileSize),r.demTexture){var l=r.demTexture;l.update(s,{premultiply:!1}),l.bind(a.NEAREST,a.CLAMP_TO_EDGE)}else r.demTexture=new z(i,s,a.RGBA,{premultiply:!1}),r.demTexture.bind(a.NEAREST,a.CLAMP_TO_EDGE);i.activeTexture.set(a.TEXTURE0);var c=r.fbo;if(!c){var u=new z(i,{width:o,height:o,data:null},a.RGBA);u.bind(a.LINEAR,a.CLAMP_TO_EDGE),(c=r.fbo=i.createFramebuffer(o,o)).colorAttachment.set(u.texture)}i.bindFramebuffer.set(c.framebuffer),i.viewport.set([0,0,o,o]);var f=t.mat4.create();t.mat4.ortho(f,0,t.default$8,-t.default$8,0,0,1),t.mat4.translate(f,f,[0,-t.default$8,0]);var h=e.useProgram(\\\"hillshadePrepare\\\");a.uniformMatrix4fv(h.uniforms.u_matrix,!1,f),a.uniform1f(h.uniforms.u_zoom,r.tileID.overscaledZ),a.uniform2fv(h.uniforms.u_dimension,[2*o,2*o]),a.uniform1i(h.uniforms.u_image,1),a.uniform1f(h.uniforms.u_maxzoom,n);var p=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,h,p,[]),a.drawArrays(a.TRIANGLE_STRIP,0,p.length),r.needsHillshadePrepare=!1}}function Sr(e,r,n,i,o){var s=i.paint.get(\\\"raster-fade-duration\\\");if(s>0){var l=a.now(),c=(l-e.timeAdded)/s,u=r?(l-r.timeAdded)/s:-1,f=n.getSource(),h=o.coveringZoomLevel({tileSize:f.tileSize,roundZoom:f.roundZoom}),p=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),d=p&&e.refreshedUponExpiration?1:t.clamp(p?c:1-u,0,1);return e.refreshedUponExpiration&&c>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}function Cr(e,r,n){var i=e.context,o=i.gl;i.lineWidth.set(1*a.devicePixelRatio);var s=n.posMatrix,l=e.useProgram(\\\"debug\\\");i.setDepthMode(qt.disabled),i.setStencilMode(Ht.disabled),i.setColorMode(e.colorModeForRenderPass()),o.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),o.uniform4f(l.uniforms.u_color,1,0,0,1),e.debugVAO.bind(i,l,e.debugBuffer,[]),o.drawArrays(o.LINE_STRIP,0,e.debugBuffer.length);for(var c=function(t,e,r,n){n=n||1;var i,a,o,s,l,c,u,f,h=[];for(i=0,a=t.length;i<a;i++)if(l=Er[t[i]]){for(f=null,o=0,s=l[1].length;o<s;o+=2)-1===l[1][o]&&-1===l[1][o+1]?f=null:(c=e+l[1][o]*n,u=200-l[1][o+1]*n,f&&h.push(f.x,f.y,c,u),f={x:c,y:u});e+=l[0]*n}return h}(n.toString(),50,0,5),u=new t.PosArray,f=0;f<c.length;f+=2)u.emplaceBack(c[f],c[f+1]);var h=i.createVertexBuffer(u,Ke.members);(new Q).bind(i,l,h,[]),o.uniform4f(l.uniforms.u_color,1,1,1,1);for(var p=r.getTile(n).tileSize,d=t.default$8/(Math.pow(2,e.transform.zoom-n.overscaledZ)*p),g=[[-1,-1],[-1,1],[1,-1],[1,1]],v=0;v<g.length;v++){var m=g[v];o.uniformMatrix4fv(l.uniforms.u_matrix,!1,t.mat4.translate([],s,[d*m[0],d*m[1],0])),o.drawArrays(o.LINES,0,h.length)}o.uniform4f(l.uniforms.u_color,0,0,0,1),o.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),o.drawArrays(o.LINES,0,h.length)}var Er={\\\" \\\":[16,[]],\\\"!\\\":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'\\\"':[16,[4,21,4,14,-1,-1,12,21,12,14]],\\\"#\\\":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],\\\"%\\\":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],\\\"&\\\":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],\\\"'\\\":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],\\\"(\\\":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],\\\")\\\":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],\\\"*\\\":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],\\\"+\\\":[26,[13,18,13,0,-1,-1,4,9,22,9]],\\\",\\\":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],\\\"-\\\":[26,[4,9,22,9]],\\\".\\\":[10,[5,2,4,1,5,0,6,1,5,2]],\\\"/\\\":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],\\\":\\\":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],\\\";\\\":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],\\\"<\\\":[24,[20,18,4,9,20,0]],\\\"=\\\":[26,[4,12,22,12,-1,-1,4,6,22,6]],\\\">\\\":[24,[4,18,20,9,4,0]],\\\"?\\\":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],\\\"@\\\":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],\\\"[\\\":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],\\\"\\\\\\\\\\\":[14,[0,21,14,-3]],\\\"]\\\":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],\\\"^\\\":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],\\\"`\\\":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],\\\"{\\\":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],\\\"|\\\":[8,[4,25,4,-7]],\\\"}\\\":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],\\\"~\\\":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},Lr={symbol:function(t,e,r,n){if(\\\"translucent\\\"===t.renderPass){var i=t.context;i.setStencilMode(Ht.disabled),i.setColorMode(t.colorModeForRenderPass()),0!==r.paint.get(\\\"icon-opacity\\\").constantOr(1)&&cr(t,e,r,n,!1,r.paint.get(\\\"icon-translate\\\"),r.paint.get(\\\"icon-translate-anchor\\\"),r.layout.get(\\\"icon-rotation-alignment\\\"),r.layout.get(\\\"icon-pitch-alignment\\\"),r.layout.get(\\\"icon-keep-upright\\\")),0!==r.paint.get(\\\"text-opacity\\\").constantOr(1)&&cr(t,e,r,n,!0,r.paint.get(\\\"text-translate\\\"),r.paint.get(\\\"text-translate-anchor\\\"),r.layout.get(\\\"text-rotation-alignment\\\"),r.layout.get(\\\"text-pitch-alignment\\\"),r.layout.get(\\\"text-keep-upright\\\")),e.map.showCollisionBoxes&&function(t,e,r,n){or(t,e,r,n,!1),or(t,e,r,n,!0)}(t,e,r,n)}},circle:function(t,e,r,n){if(\\\"translucent\\\"===t.renderPass){var i=r.paint.get(\\\"circle-opacity\\\"),a=r.paint.get(\\\"circle-stroke-width\\\"),o=r.paint.get(\\\"circle-stroke-opacity\\\");if(0!==i.constantOr(1)||0!==a.constantOr(1)&&0!==o.constantOr(1)){var s=t.context,l=s.gl;s.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),s.setStencilMode(Ht.disabled),s.setColorMode(t.colorModeForRenderPass());for(var c=!0,u=0;u<n.length;u++){var f=n[u],h=e.getTile(f),p=h.getBucket(r);if(p){var d=t.context.program.get(),g=p.programConfigurations.get(r.id),v=t.useProgram(\\\"circle\\\",g);if((c||v.program!==d)&&(g.setUniforms(s,v,r.paint,{zoom:t.transform.zoom}),c=!1),l.uniform1f(v.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),l.uniform1i(v.uniforms.u_scale_with_map,\\\"map\\\"===r.paint.get(\\\"circle-pitch-scale\\\")?1:0),\\\"map\\\"===r.paint.get(\\\"circle-pitch-alignment\\\")){l.uniform1i(v.uniforms.u_pitch_with_map,1);var m=Te(h,1,t.transform.zoom);l.uniform2f(v.uniforms.u_extrude_scale,m,m)}else l.uniform1i(v.uniforms.u_pitch_with_map,0),l.uniform2fv(v.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);l.uniformMatrix4fv(v.uniforms.u_matrix,!1,t.translatePosMatrix(f.posMatrix,h,r.paint.get(\\\"circle-translate\\\"),r.paint.get(\\\"circle-translate-anchor\\\"))),v.draw(s,l.TRIANGLES,r.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,g)}}}}},heatmap:function(e,r,n,i){if(0!==n.paint.get(\\\"heatmap-opacity\\\"))if(\\\"offscreen\\\"===e.renderPass){var a=e.context,o=a.gl;a.setDepthMode(e.depthModeForSublayer(0,qt.ReadOnly)),a.setStencilMode(Ht.disabled),function(t,e,r){var n=t.gl;t.activeTexture.set(n.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=r.heatmapFbo;if(i)n.bindTexture(n.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var a=n.createTexture();n.bindTexture(n.TEXTURE_2D,a),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),i=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,r,n,i){var a=e.gl;a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r.width/4,r.height/4,0,a.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:a.UNSIGNED_BYTE,null),i.colorAttachment.set(n),e.extTextureHalfFloat&&a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,i.colorAttachment.setDirty(),t(e,r,n,i))}(t,e,a,i)}}(a,e,n),a.clear({color:t.default$6.transparent}),a.setColorMode(new Gt([o.ONE,o.ONE],t.default$6.transparent,[!0,!0,!0,!0]));for(var s=!0,l=0;l<i.length;l++){var c=i[l];if(!r.hasRenderableParent(c)){var u=r.getTile(c),f=u.getBucket(n);if(f){var h=e.context.program.get(),p=f.programConfigurations.get(n.id),d=e.useProgram(\\\"heatmap\\\",p),g=e.transform.zoom;(s||d.program!==h)&&(p.setUniforms(e.context,d,n.paint,{zoom:g}),s=!1),o.uniform1f(d.uniforms.u_extrude_scale,Te(u,1,g)),o.uniform1f(d.uniforms.u_intensity,n.paint.get(\\\"heatmap-intensity\\\")),o.uniformMatrix4fv(d.uniforms.u_matrix,!1,c.posMatrix),d.draw(a,o.TRIANGLES,n.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,p)}}}a.viewport.set([0,0,e.width,e.height])}else\\\"translucent\\\"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var n=e.context,i=n.gl,a=r.heatmapFbo;if(a){n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,a.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1);var o=r.colorRampTexture;o||(o=r.colorRampTexture=new z(n,r.colorRamp,i.RGBA)),o.bind(i.LINEAR,i.CLAMP_TO_EDGE),n.setDepthMode(qt.disabled);var s=e.useProgram(\\\"heatmapTexture\\\"),l=r.paint.get(\\\"heatmap-opacity\\\");i.uniform1f(s.uniforms.u_opacity,l),i.uniform1i(s.uniforms.u_image,0),i.uniform1i(s.uniforms.u_color_ramp,1);var c=t.mat4.create();t.mat4.ortho(c,0,e.width,e.height,0,0,1),i.uniformMatrix4fv(s.uniforms.u_matrix,!1,c),i.uniform2f(s.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),e.viewportVAO.bind(e.context,s,e.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,n))},line:function(t,e,r,n){if(\\\"translucent\\\"===t.renderPass&&0!==r.paint.get(\\\"line-opacity\\\").constantOr(1)){var i=t.context;i.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),i.setColorMode(t.colorModeForRenderPass());for(var a,o=r.paint.get(\\\"line-dasharray\\\")?\\\"lineSDF\\\":r.paint.get(\\\"line-pattern\\\")?\\\"linePattern\\\":r.paint.get(\\\"line-gradient\\\")?\\\"lineGradient\\\":\\\"line\\\",s=!0,l=0,c=n;l<c.length;l+=1){var u=c[l],f=e.getTile(u),h=f.getBucket(r);if(h){var p=h.programConfigurations.get(r.id),d=t.context.program.get(),g=t.useProgram(o,p),v=s||g.program!==d,m=a!==f.tileID.overscaledZ;v&&p.setUniforms(t.context,g,r.paint,{zoom:t.transform.zoom}),pr(g,t,f,h,r,u,p,v,m),a=f.tileID.overscaledZ,s=!1}}}},fill:function(e,r,n,i){var a=n.paint.get(\\\"fill-color\\\"),o=n.paint.get(\\\"fill-opacity\\\");if(0!==o.constantOr(1)){var s=e.context;s.setColorMode(e.colorModeForRenderPass());var l=n.paint.get(\\\"fill-pattern\\\")||1!==a.constantOr(t.default$6.transparent).a||1!==o.constantOr(0)?\\\"translucent\\\":\\\"opaque\\\";e.renderPass===l&&(s.setDepthMode(e.depthModeForSublayer(1,\\\"opaque\\\"===e.renderPass?qt.ReadWrite:qt.ReadOnly)),mr(e,r,n,i,yr)),\\\"translucent\\\"===e.renderPass&&n.paint.get(\\\"fill-antialias\\\")&&(s.lineWidth.set(2),s.setDepthMode(e.depthModeForSublayer(n.getPaintProperty(\\\"fill-outline-color\\\")?2:0,qt.ReadOnly)),mr(e,r,n,i,xr))}},\\\"fill-extrusion\\\":function(e,r,n,i){if(0!==n.paint.get(\\\"fill-extrusion-opacity\\\"))if(\\\"offscreen\\\"===e.renderPass){!function(e,r){var n=e.context,i=n.gl,a=r.viewportFrame;if(e.depthRboNeedsClear&&e.setupOffscreenDepthRenderbuffer(),!a){var o=new z(n,{width:e.width,height:e.height,data:null},i.RGBA);o.bind(i.LINEAR,i.CLAMP_TO_EDGE),(a=r.viewportFrame=n.createFramebuffer(e.width,e.height)).colorAttachment.set(o.texture)}n.bindFramebuffer.set(a.framebuffer),a.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&&(n.clear({depth:1}),e.depthRboNeedsClear=!1),n.clear({color:t.default$6.transparent}),n.setStencilMode(Ht.disabled),n.setDepthMode(new qt(i.LEQUAL,qt.ReadWrite,[0,1])),n.setColorMode(e.colorModeForRenderPass())}(e,n);for(var a=!0,o=0,s=i;o<s.length;o+=1){var l=s[o],c=r.getTile(l),u=c.getBucket(n);u&&(Mr(e,0,n,c,l,u,a),a=!1)}}else\\\"translucent\\\"===e.renderPass&&function(t,e){var r=e.viewportFrame;if(r){var n=t.context,i=n.gl,a=t.useProgram(\\\"extrusionTexture\\\");n.setStencilMode(Ht.disabled),n.setDepthMode(qt.disabled),n.setColorMode(t.colorModeForRenderPass()),n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,r.colorAttachment.get()),i.uniform1f(a.uniforms.u_opacity,e.paint.get(\\\"fill-extrusion-opacity\\\")),i.uniform1i(a.uniforms.u_image,0);var o=wr.create();wr.ortho(o,0,t.width,t.height,0,0,1),i.uniformMatrix4fv(a.uniforms.u_matrix,!1,o),i.uniform2f(a.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),t.viewportVAO.bind(n,a,t.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,n)},hillshade:function(t,e,r,n){if(\\\"offscreen\\\"===t.renderPass||\\\"translucent\\\"===t.renderPass){var i=t.context,a=e.getSource().maxzoom;i.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),i.setStencilMode(Ht.disabled),i.setColorMode(t.colorModeForRenderPass());for(var o=0,s=n;o<s.length;o+=1){var l=s[o],c=e.getTile(l);c.needsHillshadePrepare&&\\\"offscreen\\\"===t.renderPass?Tr(t,c,a):\\\"translucent\\\"===t.renderPass&&Ar(t,c,r)}i.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,n){if(\\\"translucent\\\"===t.renderPass&&0!==r.paint.get(\\\"raster-opacity\\\")){var i,a,o=t.context,s=o.gl,l=e.getSource(),c=t.useProgram(\\\"raster\\\");o.setStencilMode(Ht.disabled),o.setColorMode(t.colorModeForRenderPass()),s.uniform1f(c.uniforms.u_brightness_low,r.paint.get(\\\"raster-brightness-min\\\")),s.uniform1f(c.uniforms.u_brightness_high,r.paint.get(\\\"raster-brightness-max\\\")),s.uniform1f(c.uniforms.u_saturation_factor,(i=r.paint.get(\\\"raster-saturation\\\"))>0?1-1/(1.001-i):-i),s.uniform1f(c.uniforms.u_contrast_factor,(a=r.paint.get(\\\"raster-contrast\\\"))>0?1/(1-a):1+a),s.uniform3fv(c.uniforms.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(r.paint.get(\\\"raster-hue-rotate\\\"))),s.uniform1f(c.uniforms.u_buffer_scale,1),s.uniform1i(c.uniforms.u_image0,0),s.uniform1i(c.uniforms.u_image1,1);for(var u=n.length&&n[0].overscaledZ,f=0,h=n;f<h.length;f+=1){var p=h[f];o.setDepthMode(t.depthModeForSublayer(p.overscaledZ-u,1===r.paint.get(\\\"raster-opacity\\\")?qt.ReadWrite:qt.ReadOnly,s.LESS));var d=e.getTile(p),g=t.transform.calculatePosMatrix(p.toUnwrapped(),!0);d.registerFadeDuration(r.paint.get(\\\"raster-fade-duration\\\")),s.uniformMatrix4fv(c.uniforms.u_matrix,!1,g);var v=e.findLoadedParent(p,0,{}),m=Sr(d,v,e,r,t.transform),y=void 0,x=void 0;if(o.activeTexture.set(s.TEXTURE0),d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),o.activeTexture.set(s.TEXTURE1),v?(v.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),y=Math.pow(2,v.tileID.overscaledZ-d.tileID.overscaledZ),x=[d.tileID.canonical.x*y%1,d.tileID.canonical.y*y%1]):d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),s.uniform2fv(c.uniforms.u_tl_parent,x||[0,0]),s.uniform1f(c.uniforms.u_scale_parent,y||1),s.uniform1f(c.uniforms.u_fade_t,m.mix),s.uniform1f(c.uniforms.u_opacity,m.opacity*r.paint.get(\\\"raster-opacity\\\")),l instanceof tt){var b=l.boundsBuffer;l.boundsVAO.bind(o,c,b,[]),s.drawArrays(s.TRIANGLE_STRIP,0,b.length)}else if(d.maskedBoundsBuffer&&d.maskedIndexBuffer&&d.segments)c.draw(o,s.TRIANGLES,r.id,d.maskedBoundsBuffer,d.maskedIndexBuffer,d.segments);else{var _=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(o,c,_,[]),s.drawArrays(s.TRIANGLE_STRIP,0,_.length)}}}},background:function(t,e,r){var n=r.paint.get(\\\"background-color\\\"),i=r.paint.get(\\\"background-opacity\\\");if(0!==i){var a=t.context,o=a.gl,s=t.transform,l=s.tileSize,c=r.paint.get(\\\"background-pattern\\\"),u=c||1!==n.a||1!==i?\\\"translucent\\\":\\\"opaque\\\";if(t.renderPass===u){var f;if(a.setStencilMode(Ht.disabled),a.setDepthMode(t.depthModeForSublayer(0,\\\"opaque\\\"===u?qt.ReadWrite:qt.ReadOnly)),a.setColorMode(t.colorModeForRenderPass()),c){if(dr(c,t))return;f=t.useProgram(\\\"backgroundPattern\\\"),gr(c,t,f),t.tileExtentPatternVAO.bind(a,f,t.tileExtentBuffer,[])}else f=t.useProgram(\\\"background\\\"),o.uniform4fv(f.uniforms.u_color,[n.r,n.g,n.b,n.a]),t.tileExtentVAO.bind(a,f,t.tileExtentBuffer,[]);o.uniform1f(f.uniforms.u_opacity,i);for(var h=0,p=s.coveringTiles({tileSize:l});h<p.length;h+=1){var d=p[h];c&&vr({tileID:d,tileSize:l},t,f),o.uniformMatrix4fv(f.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(d.toUnwrapped())),o.drawArrays(o.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}}},debug:function(t,e,r){for(var n=0;n<r.length;n++)Cr(t,e,r[n])}},zr=function(e,r){this.context=new Wt(e),this.transform=r,this._tileTextures={},this.setup(),this.numSublayers=Yt.maxUnderzooming+Yt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.default$24,this.crossTileSymbolIndex=new Ye};function Or(t,e){if(t.row>e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function Ir(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,c=e.dx/e.dy,u=t.dx>0,f=e.dx<0,h=a;h<o;h++){var p=l*Math.max(0,Math.min(t.dy,h+u-t.y0))+t.x0,d=c*Math.max(0,Math.min(e.dy,h+f-e.y0))+e.x0;i(Math.floor(d),Math.ceil(p),h)}}function Pr(t,e,r,n,i,a){var o,s=Or(t,e),l=Or(e,r),c=Or(r,t);s.dy>l.dy&&(o=s,s=l,l=o),s.dy>c.dy&&(o=s,s=c,c=o),l.dy>c.dy&&(o=l,l=c,c=o),s.dy&&Ir(c,s,n,i,a),l.dy&&Ir(c,l,n,i,a)}zr.prototype.resize=function(t,e){var r=this.context.gl;if(this.width=t*a.devicePixelRatio,this.height=e*a.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,i=this.style._order;n<i.length;n+=1){var o=i[n];this.style._layers[o].resize()}this.depthRbo&&(r.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},zr.prototype.setup=function(){var e=this.context,r=new t.PosArray;r.emplaceBack(0,0),r.emplaceBack(t.default$8,0),r.emplaceBack(0,t.default$8),r.emplaceBack(t.default$8,t.default$8),this.tileExtentBuffer=e.createVertexBuffer(r,Ke.members),this.tileExtentVAO=new Q,this.tileExtentPatternVAO=new Q;var n=new t.PosArray;n.emplaceBack(0,0),n.emplaceBack(t.default$8,0),n.emplaceBack(t.default$8,t.default$8),n.emplaceBack(0,t.default$8),n.emplaceBack(0,0),this.debugBuffer=e.createVertexBuffer(n,Ke.members),this.debugVAO=new Q;var i=new t.RasterBoundsArray;i.emplaceBack(0,0,0,0),i.emplaceBack(t.default$8,0,t.default$8,0),i.emplaceBack(0,t.default$8,0,t.default$8),i.emplaceBack(t.default$8,t.default$8,t.default$8,t.default$8),this.rasterBoundsBuffer=e.createVertexBuffer(i,K.members),this.rasterBoundsVAO=new Q;var a=new t.PosArray;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,Ke.members),this.viewportVAO=new Q},zr.prototype.clearStencil=function(){var e=this.context,r=e.gl;e.setColorMode(Gt.disabled),e.setDepthMode(qt.disabled),e.setStencilMode(new Ht({func:r.ALWAYS,mask:0},0,255,r.ZERO,r.ZERO,r.ZERO));var n=t.mat4.create();t.mat4.ortho(n,0,this.width,this.height,0,0,1),t.mat4.scale(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]);var i=this.useProgram(\\\"clippingMask\\\");r.uniformMatrix4fv(i.uniforms.u_matrix,!1,n),this.viewportVAO.bind(e,i,this.viewportBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,4)},zr.prototype._renderTileClippingMasks=function(t){var e=this.context,r=e.gl;e.setColorMode(Gt.disabled),e.setDepthMode(qt.disabled);var n=1;this._tileClippingMaskIDs={};for(var i=0,a=t;i<a.length;i+=1){var o=a[i],s=this._tileClippingMaskIDs[o.key]=n++;e.setStencilMode(new Ht({func:r.ALWAYS,mask:0},s,255,r.KEEP,r.KEEP,r.REPLACE));var l=this.useProgram(\\\"clippingMask\\\");r.uniformMatrix4fv(l.uniforms.u_matrix,!1,o.posMatrix),this.tileExtentVAO.bind(this.context,l,this.tileExtentBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}},zr.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Ht({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},zr.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Gt([e.CONSTANT_COLOR,e.ONE],new t.default$6(1/8,1/8,1/8,0),[!0,!0,!0,!0]):\\\"opaque\\\"===this.renderPass?Gt.unblended:Gt.alphaBlended},zr.prototype.depthModeForSublayer=function(t,e,r){var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,i=n-1+this.depthRange;return new qt(r||this.context.gl.LEQUAL,e,[i,n])},zr.prototype.render=function(e,r){var n=this;for(var i in this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(a.now()),e.sourceCaches){var o=n.style.sourceCaches[i];o.used&&o.prepare(n.context)}var s=this.style._order,l=t.filterObject(this.style.sourceCaches,function(t){return\\\"raster\\\"===t.getSource().type||\\\"raster-dem\\\"===t.getSource().type}),c=function(e){var r=l[e];!function(e,r){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),i=0;i<n.length;i++){var a={},o=n[i],s=n.slice(i+1);ar(o.tileID.wrapped(),o.tileID,s,new t.OverscaledTileID(0,o.tileID.wrap+1,0,0,0),a),o.setMask(a,r)}}(r.getVisibleCoordinates().map(function(t){return r.getTile(t)}),n.context)};for(var u in l)c(u);this.renderPass=\\\"offscreen\\\";var f,h=[];this.depthRboNeedsClear=!0;for(var p=0;p<s.length;p++){var d=n.style._layers[s[p]];d.hasOffscreenPass()&&!d.isHidden(n.transform.zoom)&&(d.source!==(f&&f.id)&&(h=[],(f=n.style.sourceCaches[d.source])&&(h=f.getVisibleCoordinates()).reverse()),h.length&&n.renderLayer(n,f,d,h))}this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.default$6.black:t.default$6.transparent,depth:1}),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass=\\\"opaque\\\";var g,v=[];for(this.currentLayer=s.length-1,this.currentLayer;this.currentLayer>=0;this.currentLayer--){var m=n.style._layers[s[n.currentLayer]];m.source!==(g&&g.id)&&(v=[],(g=n.style.sourceCaches[m.source])&&(n.clearStencil(),v=g.getVisibleCoordinates(),g.getSource().isTileClipped&&n._renderTileClippingMasks(v))),n.renderLayer(n,g,m,v)}this.renderPass=\\\"translucent\\\";var y,x=[];for(this.currentLayer=0,this.currentLayer;this.currentLayer<s.length;this.currentLayer++){var b=n.style._layers[s[n.currentLayer]];b.source!==(y&&y.id)&&(x=[],(y=n.style.sourceCaches[b.source])&&(n.clearStencil(),x=y.getVisibleCoordinates(),y.getSource().isTileClipped&&n._renderTileClippingMasks(x)),x.reverse()),n.renderLayer(n,y,b,x)}if(this.options.showTileBoundaries){var _=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];_&&Lr.debug(this,_,_.getVisibleCoordinates())}},zr.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},zr.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||(\\\"background\\\"===r.type||n.length)&&(this.id=r.id,Lr[r.type](t,e,r,n))},zr.prototype.translatePosMatrix=function(e,r,n,i,a){if(!n[0]&&!n[1])return e;var o=a?\\\"map\\\"===i?this.transform.angle:0:\\\"viewport\\\"===i?-this.transform.angle:0;if(o){var s=Math.sin(o),l=Math.cos(o);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l]}var c=[a?n[0]:Te(r,n[0],this.transform.zoom),a?n[1]:Te(r,n[1],this.transform.zoom),0],u=new Float32Array(16);return t.mat4.translate(u,e,c),u},zr.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},zr.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},zr.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var r=\\\"\\\"+t+(e.cacheKey||\\\"\\\")+(this._showOverdrawInspector?\\\"/overdraw\\\":\\\"\\\");return this.cache[r]||(this.cache[r]=new ir(this.context,nr[t],e,this._showOverdrawInspector)),this.cache[r]},zr.prototype.useProgram=function(t,e){var r=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.context.program.set(r.program),r};var Dr=t.default$20.vec4,Rr=t.default$20.mat4,Br=t.default$20.mat2,Fr=function(t,e,r){this.tileSize=512,this._renderWorldCopies=void 0===r||r,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new G(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},Nr={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},x:{configurable:!0},y:{configurable:!0},point:{configurable:!0}};Fr.prototype.clone=function(){var t=new Fr(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},Nr.minZoom.get=function(){return this._minZoom},Nr.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Nr.maxZoom.get=function(){return this._maxZoom},Nr.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Nr.renderWorldCopies.get=function(){return this._renderWorldCopies},Nr.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Nr.worldSize.get=function(){return this.tileSize*this.scale},Nr.centerPoint.get=function(){return this.size._div(2)},Nr.size.get=function(){return new t.default$1(this.width,this.height)},Nr.bearing.get=function(){return-this.angle/Math.PI*180},Nr.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=Br.create(),Br.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Nr.pitch.get=function(){return this._pitch/Math.PI*180},Nr.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Nr.fov.get=function(){return this._fov/Math.PI*180},Nr.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Nr.zoom.get=function(){return this._zoom},Nr.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Nr.center.get=function(){return this._center},Nr.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Fr.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Fr.prototype.getVisibleUnwrappedCoordinates=function(e){var r=this.pointCoordinate(new t.default$1(0,0),0),n=this.pointCoordinate(new t.default$1(this.width,0),0),i=Math.floor(r.column),a=Math.floor(n.column),o=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var s=i;s<=a;s++)0!==s&&o.push(new t.UnwrappedTileID(s,e));return o},Fr.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var i=this.pointCoordinate(this.centerPoint,r),a=new t.default$1(i.column-.5,i.row-.5);return function(e,r,n,i){void 0===i&&(i=!0);var a=1<<e,o={};function s(r,s,l){var c,u,f,h;if(l>=0&&l<=a)for(c=r;c<s;c++)u=Math.floor(c/a),f=(c%a+a)%a,0!==u&&!0!==i||(h=new t.OverscaledTileID(n,u,e,f,l),o[h.key]=h)}return Pr(r[0],r[1],r[2],0,a,s),Pr(r[2],r[3],r[0],0,a,s),Object.keys(o).map(function(t){return o[t]})}(r,[this.pointCoordinate(new t.default$1(0,0),r),this.pointCoordinate(new t.default$1(this.width,0),r),this.pointCoordinate(new t.default$1(this.width,this.height),r),this.pointCoordinate(new t.default$1(0,this.height),r)],e.reparseOverscaled?n:r,this._renderWorldCopies).sort(function(t,e){return a.dist(t.canonical)-a.dist(e.canonical)})},Fr.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Nr.unmodified.get=function(){return this._unmodified},Fr.prototype.zoomScale=function(t){return Math.pow(2,t)},Fr.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Fr.prototype.project=function(e){return new t.default$1(this.lngX(e.lng),this.latY(e.lat))},Fr.prototype.unproject=function(t){return new G(this.xLng(t.x),this.yLat(t.y))},Nr.x.get=function(){return this.lngX(this.center.lng)},Nr.y.get=function(){return this.latY(this.center.lat)},Nr.point.get=function(){return new t.default$1(this.x,this.y)},Fr.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Fr.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},Fr.prototype.xLng=function(t){return 360*t/this.worldSize-180},Fr.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},Fr.prototype.setLocationAtPoint=function(t,e){var r=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(r)),this._renderWorldCopies&&(this.center=this.center.wrap())},Fr.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Fr.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Fr.prototype.locationCoordinate=function(e){return new t.default$17(this.lngX(e.lng)/this.tileSize,this.latY(e.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Fr.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new G(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},Fr.prototype.pointCoordinate=function(e,r){void 0===r&&(r=this.tileZoom);var n=[e.x,e.y,0,1],i=[e.x,e.y,1,1];Dr.transformMat4(n,n,this.pixelMatrixInverse),Dr.transformMat4(i,i,this.pixelMatrixInverse);var a=n[3],o=i[3],s=n[0]/a,l=i[0]/o,c=n[1]/a,u=i[1]/o,f=n[2]/a,h=i[2]/o,p=f===h?0:(0-f)/(h-f);return new t.default$17(t.number(s,l,p)/this.tileSize,t.number(c,u,p)/this.tileSize,this.zoom)._zoomTo(r)},Fr.prototype.coordinatePoint=function(e){var r=e.zoomTo(this.zoom),n=[r.column*this.tileSize,r.row*this.tileSize,0,1];return Dr.transformMat4(n,n,this.pixelMatrix),new t.default$1(n[0]/n[3],n[1]/n[3])},Fr.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=e.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*e.wrap,l=Rr.identity(new Float64Array(16));return Rr.translate(l,l,[s*o,a.y*o,0]),Rr.scale(l,l,[o/t.default$8,o/t.default$8,1]),Rr.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},Fr.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,n,i,a=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var f=this.latRange;a=this.latY(f[1]),e=(o=this.latY(f[0]))-a<c.y?c.y/(o-a):0}if(this.lngRange){var h=this.lngRange;s=this.lngX(h[0]),r=(l=this.lngX(h[1]))-s<c.x?c.x/(l-s):0}var p=Math.max(r||0,e||0);if(p)return this.center=this.unproject(new t.default$1(r?(l+s)/2:this.x,e?(o+a)/2:this.y)),this.zoom+=this.scaleZoom(p),this._unmodified=u,void(this._constraining=!1);if(this.latRange){var d=this.y,g=c.y/2;d-g<a&&(i=a+g),d+g>o&&(i=o-g)}if(this.lngRange){var v=this.x,m=c.x/2;v-m<s&&(n=s+m),v+m>l&&(n=l-m)}void 0===n&&void 0===i||(this.center=this.unproject(new t.default$1(void 0!==n?n:this.x,void 0!==i?i:this.y))),this._unmodified=u,this._constraining=!1}},Fr.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,e=Math.PI/2+this._pitch,r=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),n=this.x,i=this.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance),o=new Float64Array(16);Rr.perspective(o,this._fov,this.width/this.height,1,a),Rr.scale(o,o,[1,-1,1]),Rr.translate(o,o,[0,0,-this.cameraToCenterDistance]),Rr.rotateX(o,o,this._pitch),Rr.rotateZ(o,o,this.angle),Rr.translate(o,o,[-n,-i,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));Rr.scale(o,o,[1,1,s,1]),this.projMatrix=o;var l=this.width%2/2,c=this.height%2/2,u=Math.cos(this.angle),f=Math.sin(this.angle),h=n-Math.round(n)+u*l+f*c,p=i-Math.round(i)+u*c+f*l,d=new Float64Array(o);if(Rr.translate(d,d,[h>.5?h-1:h,p>.5?p-1:p,0]),this.alignedProjMatrix=d,o=Rr.create(),Rr.scale(o,o,[this.width/2,-this.height/2,1]),Rr.translate(o,o,[1,-1,0]),this.pixelMatrix=Rr.multiply(new Float64Array(16),o,this.projMatrix),!(o=Rr.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\\\"failed to invert matrix\\\");this.pixelMatrixInverse=o,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Fr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.default$1(0,0)).zoomTo(this.zoom),r=[e.column*this.tileSize,e.row*this.tileSize,0,1];return Dr.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},Object.defineProperties(Fr.prototype,Nr);var jr=function(){var e,r,n,i;t.bindAll([\\\"_onHashChange\\\",\\\"_updateHash\\\"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),300,r=!1,n=0,i=function(){n=0,r&&(e(),n=setTimeout(i,300),r=!1)},function(){return r=!0,n||i(),n})};jr.prototype.addTo=function(e){return this._map=e,t.default.addEventListener(\\\"hashchange\\\",this._onHashChange,!1),this._map.on(\\\"moveend\\\",this._updateHash),this},jr.prototype.remove=function(){return t.default.removeEventListener(\\\"hashchange\\\",this._onHashChange,!1),this._map.off(\\\"moveend\\\",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},jr.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,n),a=Math.round(e.lng*i)/i,o=Math.round(e.lat*i)/i,s=this._map.getBearing(),l=this._map.getPitch(),c=\\\"\\\";return c+=t?\\\"#/\\\"+a+\\\"/\\\"+o+\\\"/\\\"+r:\\\"#\\\"+r+\\\"/\\\"+o+\\\"/\\\"+a,(s||l)&&(c+=\\\"/\\\"+Math.round(10*s)/10),l&&(c+=\\\"/\\\"+Math.round(l)),c},jr.prototype._onHashChange=function(){var e=t.default.location.hash.replace(\\\"#\\\",\\\"\\\").split(\\\"/\\\");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},jr.prototype._updateHashUnthrottled=function(){var e=this.getHashString();t.default.history.replaceState(t.default.history.state,\\\"\\\",e)};var Vr=function(e){function r(r,n,i,a){void 0===a&&(a={});var o=s.mousePos(n.getCanvasContainer(),i),l=n.unproject(o);e.call(this,r,t.extend({point:o,lngLat:l,originalEvent:i},a)),this._defaultPrevented=!1,this.target=n}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var n={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),Ur=function(e){function r(r,n,i){var a=s.touchPos(n.getCanvasContainer(),i),o=a.map(function(t){return n.unproject(t)}),l=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new t.default$1(0,0)),c=n.unproject(l);e.call(this,r,{points:a,point:l,lngLats:o,lngLat:c,originalEvent:i}),this._defaultPrevented=!1}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var n={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),qr=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),Hr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll([\\\"_onWheel\\\",\\\"_onTimeout\\\",\\\"_onScrollFrame\\\",\\\"_onScrollFinished\\\"],this)};Hr.prototype.isEnabled=function(){return!!this._enabled},Hr.prototype.isActive=function(){return!!this._active},Hr.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\\\"center\\\"===t.around)},Hr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Hr.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.default.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=a.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%4.000244140625==0?this._type=\\\"wheel\\\":0!==r&&Math.abs(r)<4?this._type=\\\"trackpad\\\":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)<200?\\\"trackpad\\\":\\\"wheel\\\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}},Hr.prototype._onTimeout=function(t){this._type=\\\"wheel\\\",this._delta-=this._lastValue,this.isActive()||this._start(t)},Hr.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._map.fire(new t.Event(\\\"movestart\\\",{originalEvent:e})),this._map.fire(new t.Event(\\\"zoomstart\\\",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var r=s.mousePos(this._el,e);this._around=G.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},Hr.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n=\\\"wheel\\\"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var o=\\\"number\\\"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*i))),\\\"wheel\\\"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var s=!1;if(\\\"wheel\\\"===this._type){var l=Math.min((a.now()-this._lastWheelEventTime)/200,1),c=this._easing(l);r.zoom=t.number(this._startZoom,this._targetZoom,c),l<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):s=!0}else r.zoom=this._targetZoom,s=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event(\\\"move\\\",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event(\\\"zoom\\\",{originalEvent:this._lastWheelEvent})),s&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._map.fire(new t.Event(\\\"zoomend\\\",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event(\\\"moveend\\\",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},Hr.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(a.now()-n.start)/n.duration,o=n.easing(i+.01)-n.easing(i),s=.27/Math.sqrt(o*o+1e-4)*.01,l=Math.sqrt(.0729-s*s);r=t.bezier(s,l,.25,1)}return this._prevEase={start:a.now(),duration:e,easing:r},r};var Gr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),t.bindAll([\\\"_onMouseMove\\\",\\\"_onMouseUp\\\",\\\"_onKeyDown\\\"],this)};Gr.prototype.isEnabled=function(){return!!this._enabled},Gr.prototype.isActive=function(){return!!this._active},Gr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Gr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Gr.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.default.document.addEventListener(\\\"mousemove\\\",this._onMouseMove,!1),t.default.document.addEventListener(\\\"keydown\\\",this._onKeyDown,!1),t.default.document.addEventListener(\\\"mouseup\\\",this._onMouseUp,!1),s.disableDrag(),this._startPos=s.mousePos(this._el,e),this._active=!0)},Gr.prototype._onMouseMove=function(t){var e=this._startPos,r=s.mousePos(this._el,t);this._box||(this._box=s.create(\\\"div\\\",\\\"mapboxgl-boxzoom\\\",this._container),this._container.classList.add(\\\"mapboxgl-crosshair\\\"),this._fireEvent(\\\"boxzoomstart\\\",t));var n=Math.min(e.x,r.x),i=Math.max(e.x,r.x),a=Math.min(e.y,r.y),o=Math.max(e.y,r.y);s.setTransform(this._box,\\\"translate(\\\"+n+\\\"px,\\\"+a+\\\"px)\\\"),this._box.style.width=i-n+\\\"px\\\",this._box.style.height=o-a+\\\"px\\\"},Gr.prototype._onMouseUp=function(e){if(0===e.button){var r=this._startPos,n=s.mousePos(this._el,e),i=(new W).extend(this._map.unproject(r)).extend(this._map.unproject(n));this._finish(),s.suppressClick(),r.x===n.x&&r.y===n.y?this._fireEvent(\\\"boxzoomcancel\\\",e):this._map.fitBounds(i,{linear:!0}).fire(new t.Event(\\\"boxzoomend\\\",{originalEvent:e,boxZoomBounds:i}))}},Gr.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent(\\\"boxzoomcancel\\\",t))},Gr.prototype._finish=function(){this._active=!1,t.default.document.removeEventListener(\\\"mousemove\\\",this._onMouseMove,!1),t.default.document.removeEventListener(\\\"keydown\\\",this._onKeyDown,!1),t.default.document.removeEventListener(\\\"mouseup\\\",this._onMouseUp,!1),this._container.classList.remove(\\\"mapboxgl-crosshair\\\"),this._box&&(s.remove(this._box),this._box=null),s.enableDrag()},Gr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var Wr=t.bezier(0,0,.25,1),Yr=function(e,r){this._map=e,this._el=r.element||e.getCanvasContainer(),this._state=\\\"disabled\\\",this._button=r.button||\\\"right\\\",this._bearingSnap=r.bearingSnap||0,this._pitchWithRotate=!1!==r.pitchWithRotate,t.bindAll([\\\"_onMouseMove\\\",\\\"_onMouseUp\\\",\\\"_onBlur\\\",\\\"_onDragFrame\\\"],this)};Yr.prototype.isEnabled=function(){return\\\"disabled\\\"!==this._state},Yr.prototype.isActive=function(){return\\\"active\\\"===this._state},Yr.prototype.enable=function(){this.isEnabled()||(this._state=\\\"enabled\\\")},Yr.prototype.disable=function(){if(this.isEnabled())switch(this._state){case\\\"active\\\":this._state=\\\"disabled\\\",this._unbind(),this._deactivate(),this._fireEvent(\\\"rotateend\\\"),this._pitchWithRotate&&this._fireEvent(\\\"pitchend\\\"),this._fireEvent(\\\"moveend\\\");break;case\\\"pending\\\":this._state=\\\"disabled\\\",this._unbind();break;default:this._state=\\\"disabled\\\"}},Yr.prototype.onMouseDown=function(e){if(\\\"enabled\\\"===this._state){if(\\\"right\\\"===this._button){if(this._eventButton=s.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==s.mouseButton(e))return;this._eventButton=0}s.disableDrag(),t.default.document.addEventListener(\\\"mousemove\\\",this._onMouseMove,{capture:!0}),t.default.document.addEventListener(\\\"mouseup\\\",this._onMouseUp),t.default.addEventListener(\\\"blur\\\",this._onBlur),this._state=\\\"pending\\\",this._inertia=[[a.now(),this._map.getBearing()]],this._previousPos=s.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},Yr.prototype._onMouseMove=function(t){this._lastMoveEvent=t,this._pos=s.mousePos(this._el,t),\\\"pending\\\"===this._state&&(this._state=\\\"active\\\",this._fireEvent(\\\"rotatestart\\\",t),this._fireEvent(\\\"movestart\\\",t),this._pitchWithRotate&&this._fireEvent(\\\"pitchstart\\\",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},Yr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform,r=this._previousPos,n=this._pos,i=.8*(r.x-n.x),o=-.5*(r.y-n.y),s=e.bearing-i,l=e.pitch-o,c=this._inertia,u=c[c.length-1];this._drainInertiaBuffer(),c.push([a.now(),this._map._normalizeBearing(s,u[1])]),e.bearing=s,this._pitchWithRotate&&(this._fireEvent(\\\"pitch\\\",t),e.pitch=l),this._fireEvent(\\\"rotate\\\",t),this._fireEvent(\\\"move\\\",t),delete this._lastMoveEvent,this._previousPos=this._pos}},Yr.prototype._onMouseUp=function(t){if(s.mouseButton(t)===this._eventButton)switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",s.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Yr.prototype._onBlur=function(t){switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",this._unbind(),this._deactivate(),this._fireEvent(\\\"rotateend\\\",t),this._pitchWithRotate&&this._fireEvent(\\\"pitchend\\\",t),this._fireEvent(\\\"moveend\\\",t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Yr.prototype._unbind=function(){t.default.document.removeEventListener(\\\"mousemove\\\",this._onMouseMove,{capture:!0}),t.default.document.removeEventListener(\\\"mouseup\\\",this._onMouseUp),t.default.removeEventListener(\\\"blur\\\",this._onBlur),s.enableDrag()},Yr.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos},Yr.prototype._inertialRotate=function(t){var e=this;this._fireEvent(\\\"rotateend\\\",t),this._drainInertiaBuffer();var r=this._map,n=r.getBearing(),i=this._inertia,a=function(){Math.abs(n)<e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent(\\\"moveend\\\",t),e._pitchWithRotate&&e._fireEvent(\\\"pitchend\\\",t)};if(i.length<2)a();else{var o=i[0],s=i[i.length-1],l=i[i.length-2],c=r._normalizeBearing(n,l[1]),u=s[1]-o[1],f=u<0?-1:1,h=(s[0]-o[0])/1e3;if(0!==u&&0!==h){var p=Math.abs(u*(.25/h));p>180&&(p=180);var d=p/180;c+=f*p*(d/2),Math.abs(r._normalizeBearing(c,0))<this._bearingSnap&&(c=r._normalizeBearing(0,c)),r.rotateTo(c,{duration:1e3*d,easing:Wr,noMoveStart:!0},{originalEvent:t})}else a()}},Yr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Yr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length>0&&e-t[0][0]>160;)t.shift()};var Xr=t.bezier(0,0,.3,1),Zr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._state=\\\"disabled\\\",t.bindAll([\\\"_onMove\\\",\\\"_onMouseUp\\\",\\\"_onTouchEnd\\\",\\\"_onBlur\\\",\\\"_onDragFrame\\\"],this)};Zr.prototype.isEnabled=function(){return\\\"disabled\\\"!==this._state},Zr.prototype.isActive=function(){return\\\"active\\\"===this._state},Zr.prototype.enable=function(){this.isEnabled()||(this._el.classList.add(\\\"mapboxgl-touch-drag-pan\\\"),this._state=\\\"enabled\\\")},Zr.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove(\\\"mapboxgl-touch-drag-pan\\\"),this._state){case\\\"active\\\":this._state=\\\"disabled\\\",this._unbind(),this._deactivate(),this._fireEvent(\\\"dragend\\\"),this._fireEvent(\\\"moveend\\\");break;case\\\"pending\\\":this._state=\\\"disabled\\\",this._unbind();break;default:this._state=\\\"disabled\\\"}},Zr.prototype.onMouseDown=function(e){\\\"enabled\\\"===this._state&&(e.ctrlKey||0!==s.mouseButton(e)||(s.addEventListener(t.default.document,\\\"mousemove\\\",this._onMove,{capture:!0}),s.addEventListener(t.default.document,\\\"mouseup\\\",this._onMouseUp),this._start(e)))},Zr.prototype.onTouchStart=function(e){\\\"enabled\\\"===this._state&&(e.touches.length>1||(s.addEventListener(t.default.document,\\\"touchmove\\\",this._onMove,{capture:!0,passive:!1}),s.addEventListener(t.default.document,\\\"touchend\\\",this._onTouchEnd),this._start(e)))},Zr.prototype._start=function(e){t.default.addEventListener(\\\"blur\\\",this._onBlur),this._state=\\\"pending\\\",this._previousPos=s.mousePos(this._el,e),this._inertia=[[a.now(),this._previousPos]]},Zr.prototype._onMove=function(t){this._lastMoveEvent=t,t.preventDefault(),this._pos=s.mousePos(this._el,t),this._drainInertiaBuffer(),this._inertia.push([a.now(),this._pos]),\\\"pending\\\"===this._state&&(this._state=\\\"active\\\",this._fireEvent(\\\"dragstart\\\",t),this._fireEvent(\\\"movestart\\\",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},Zr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._previousPos),this._pos),this._fireEvent(\\\"drag\\\",t),this._fireEvent(\\\"move\\\",t),this._previousPos=this._pos,delete this._lastMoveEvent}},Zr.prototype._onMouseUp=function(t){if(0===s.mouseButton(t))switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",s.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Zr.prototype._onTouchEnd=function(t){switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",this._unbind(),this._deactivate(),this._inertialPan(t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Zr.prototype._onBlur=function(t){switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",this._unbind(),this._deactivate(),this._fireEvent(\\\"dragend\\\",t),this._fireEvent(\\\"moveend\\\",t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Zr.prototype._unbind=function(){s.removeEventListener(t.default.document,\\\"touchmove\\\",this._onMove,{capture:!0,passive:!1}),s.removeEventListener(t.default.document,\\\"touchend\\\",this._onTouchEnd),s.removeEventListener(t.default.document,\\\"mousemove\\\",this._onMove,{capture:!0}),s.removeEventListener(t.default.document,\\\"mouseup\\\",this._onMouseUp),s.removeEventListener(t.default,\\\"blur\\\",this._onBlur)},Zr.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos,delete this._pos},Zr.prototype._inertialPan=function(t){this._fireEvent(\\\"dragend\\\",t),this._drainInertiaBuffer();var e=this._inertia;if(e.length<2)this._fireEvent(\\\"moveend\\\",t);else{var r=e[e.length-1],n=e[0],i=r[1].sub(n[1]),a=(r[0]-n[0])/1e3;if(0===a||r[1].equals(n[1]))this._fireEvent(\\\"moveend\\\",t);else{var o=i.mult(.3/a),s=o.mag();s>1400&&(s=1400,o._unit()._mult(s));var l=s/750,c=o.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:Xr,noMoveStart:!0},{originalEvent:t})}}},Zr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Zr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length>0&&e-t[0][0]>160;)t.shift()};var $r=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([\\\"_onKeyDown\\\"],this)};function Jr(t){return t*(2-t)}$r.prototype.isEnabled=function(){return!!this._enabled},$r.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\\\"keydown\\\",this._onKeyDown,!1),this._enabled=!0)},$r.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\\\"keydown\\\",this._onKeyDown),this._enabled=!1)},$r.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,i=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(a=1,t.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:Jr,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-i,100*-a],center:o.getCenter()};o.easeTo(l,{originalEvent:t})}};var Kr=function(e){this._map=e,t.bindAll([\\\"_onDblClick\\\",\\\"_onZoomEnd\\\"],this)};Kr.prototype.isEnabled=function(){return!!this._enabled},Kr.prototype.isActive=function(){return!!this._active},Kr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Kr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Kr.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null},300)))},Kr.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},Kr.prototype._zoom=function(t){this._active=!0,this._map.on(\\\"zoomend\\\",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},Kr.prototype._onZoomEnd=function(){this._active=!1,this._map.off(\\\"zoomend\\\",this._onZoomEnd)};var Qr=t.bezier(0,0,.15,1),tn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([\\\"_onMove\\\",\\\"_onEnd\\\",\\\"_onTouchFrame\\\"],this)};tn.prototype.isEnabled=function(){return!!this._enabled},tn.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add(\\\"mapboxgl-touch-zoom-rotate\\\"),this._enabled=!0,this._aroundCenter=!!t&&\\\"center\\\"===t.around)},tn.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove(\\\"mapboxgl-touch-zoom-rotate\\\"),this._enabled=!1)},tn.prototype.disableRotation=function(){this._rotationDisabled=!0},tn.prototype.enableRotation=function(){this._rotationDisabled=!1},tn.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var r=s.mousePos(this._el,e.touches[0]),n=s.mousePos(this._el,e.touches[1]);this._startVec=r.sub(n),this._gestureIntent=void 0,this._inertia=[],s.addEventListener(t.default.document,\\\"touchmove\\\",this._onMove,{passive:!1}),s.addEventListener(t.default.document,\\\"touchend\\\",this._onEnd)}},tn.prototype._getTouchEventData=function(t){var e=s.mousePos(this._el,t.touches[0]),r=s.mousePos(this._el,t.touches[1]),n=e.sub(r);return{vec:n,center:e.add(r).div(2),scale:n.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI}},tn.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),n=r.vec,i=r.scale,a=r.bearing;if(!this._gestureIntent){var o=Math.abs(1-i)>.15;Math.abs(a)>10?this._gestureIntent=\\\"rotate\\\":o&&(this._gestureIntent=\\\"zoom\\\"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+\\\"start\\\",{originalEvent:e})),this._map.fire(new t.Event(\\\"movestart\\\",{originalEvent:e})),this._startVec=n)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},tn.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),i=n.center,o=n.bearing,s=n.scale,l=r.pointLocation(i),c=r.locationPoint(l);\\\"rotate\\\"===e&&(r.bearing=this._startBearing+o),r.zoom=r.scaleZoom(this._startScale*s),r.setLocationAtPoint(l,c),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event(\\\"move\\\",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([a.now(),s,i])}},tn.prototype._onEnd=function(e){s.removeEventListener(t.default.document,\\\"touchmove\\\",this._onMove,{passive:!1}),s.removeEventListener(t.default.document,\\\"touchend\\\",this._onEnd);var r=this._gestureIntent,n=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,r){this._map.fire(new t.Event(r+\\\"end\\\",{originalEvent:e})),this._drainInertiaBuffer();var i=this._inertia,a=this._map;if(i.length<2)a.snapToNorth({},{originalEvent:e});else{var o=i[i.length-1],l=i[0],c=a.transform.scaleZoom(n*o[1]),u=a.transform.scaleZoom(n*l[1]),f=c-u,h=(o[0]-l[0])/1e3,p=o[2];if(0!==h&&c!==u){var d=.15*f/h;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var g=1e3*Math.abs(d/(12*.15)),v=c+d*g/2e3;v<0&&(v=0),a.easeTo({zoom:v,duration:g,easing:Qr,around:this._aroundCenter?a.getCenter():a.unproject(p),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},tn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length>2&&e-t[0][0]>160;)t.shift()};var en={scrollZoom:Hr,boxZoom:Gr,dragRotate:Yr,dragPan:Zr,keyboard:$r,doubleClickZoom:Kr,touchZoomRotate:tn},rn=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll([\\\"_renderFrameCallback\\\"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return this.transform.center},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.default$1.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.fitBounds=function(e,r,n){if(\\\"number\\\"==typeof(r=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},r)).padding){var i=r.padding;r.padding={top:i,bottom:i,right:i,left:i}}if(!t.default$10(Object.keys(r.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),[\\\"bottom\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\"]))return t.warnOnce(\\\"options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'\\\"),this;e=W.convert(e);var a=[(r.padding.left-r.padding.right)/2,(r.padding.top-r.padding.bottom)/2],o=Math.min(r.padding.right,r.padding.left),s=Math.min(r.padding.top,r.padding.bottom);r.offset=[r.offset[0]+a[0],r.offset[1]+a[1]];var l=t.default$1.convert(r.offset),c=this.transform,u=c.project(e.getNorthWest()),f=c.project(e.getSouthEast()),h=f.sub(u),p=(c.width-2*o-2*Math.abs(l.x))/h.x,d=(c.height-2*s-2*Math.abs(l.y))/h.y;return d<0||p<0?(t.warnOnce(\\\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\\\"),this):(r.center=c.unproject(u.add(f).div(2)),r.zoom=Math.min(c.scaleZoom(c.scale*Math.min(p,d)),r.maxZoom),r.bearing=0,r.linear?this.easeTo(r,n):this.flyTo(r,n))},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,i=!1,a=!1,o=!1;return\\\"zoom\\\"in e&&n.zoom!==+e.zoom&&(i=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=G.convert(e.center)),\\\"bearing\\\"in e&&n.bearing!==+e.bearing&&(a=!0,n.bearing=+e.bearing),\\\"pitch\\\"in e&&n.pitch!==+e.pitch&&(o=!0,n.pitch=+e.pitch),this.fire(new t.Event(\\\"movestart\\\",r)).fire(new t.Event(\\\"move\\\",r)),i&&this.fire(new t.Event(\\\"zoomstart\\\",r)).fire(new t.Event(\\\"zoom\\\",r)).fire(new t.Event(\\\"zoomend\\\",r)),a&&this.fire(new t.Event(\\\"rotatestart\\\",r)).fire(new t.Event(\\\"rotate\\\",r)).fire(new t.Event(\\\"rotateend\\\",r)),o&&this.fire(new t.Event(\\\"pitchstart\\\",r)).fire(new t.Event(\\\"pitch\\\",r)).fire(new t.Event(\\\"pitchend\\\",r)),this.fire(new t.Event(\\\"moveend\\\",r))},r.prototype.easeTo=function(e,r){var n=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=\\\"zoom\\\"in e?+e.zoom:a,c=\\\"bearing\\\"in e?this._normalizeBearing(e.bearing,o):o,u=\\\"pitch\\\"in e?+e.pitch:s,f=i.centerPoint.add(t.default$1.convert(e.offset)),h=i.pointLocation(f),p=G.convert(e.center||h);this._normalizeCenter(p);var d,g,v=i.project(h),m=i.project(p).sub(v),y=i.zoomScale(l-a);return e.around&&(d=G.convert(e.around),g=i.locationPoint(d)),this._zooming=l!==a,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&&(i.zoom=t.number(a,l,e)),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,u,e)),d)i.setLocationAtPoint(d,g);else{var h=i.zoomScale(i.zoom-a),p=l>a?Math.min(2,y):Math.max(.5,y),x=Math.pow(p,1-e),b=i.unproject(v.add(m.mult(e*x)).mult(h));i.setLocationAtPoint(i.renderWorldCopies?b.wrap():b,f)}n._fireMoveEvents(r)},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(r)},e.delayEndEvents):n._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event(\\\"movestart\\\",e)),this._zooming&&this.fire(new t.Event(\\\"zoomstart\\\",e)),this._rotating&&this.fire(new t.Event(\\\"rotatestart\\\",e)),this._pitching&&this.fire(new t.Event(\\\"pitchstart\\\",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event(\\\"move\\\",e)),this._zooming&&this.fire(new t.Event(\\\"zoom\\\",e)),this._rotating&&this.fire(new t.Event(\\\"rotate\\\",e)),this._pitching&&this.fire(new t.Event(\\\"pitch\\\",e))},r.prototype._afterEase=function(e){var r=this._zooming,n=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event(\\\"zoomend\\\",e)),n&&this.fire(new t.Event(\\\"rotateend\\\",e)),i&&this.fire(new t.Event(\\\"pitchend\\\",e)),this.fire(new t.Event(\\\"moveend\\\",e))},r.prototype.flyTo=function(e,r){var n=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=\\\"zoom\\\"in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):a,c=\\\"bearing\\\"in e?this._normalizeBearing(e.bearing,o):o,u=\\\"pitch\\\"in e?+e.pitch:s,f=i.zoomScale(l-a),h=i.centerPoint.add(t.default$1.convert(e.offset)),p=i.pointLocation(h),d=G.convert(e.center||p);this._normalizeCenter(d);var g=i.project(p),v=i.project(d).sub(g),m=e.curve,y=Math.max(i.width,i.height),x=y/f,b=v.mag();if(\\\"minZoom\\\"in e){var _=t.clamp(Math.min(e.minZoom,a,l),i.minZoom,i.maxZoom),w=y/i.zoomScale(_-a);m=Math.sqrt(w/b*2)}var k=m*m;function M(t){var e=(x*x-y*y+(t?-1:1)*k*k*b*b)/(2*(t?x:y)*k*b);return Math.log(Math.sqrt(e*e+1)-e)}function A(t){return(Math.exp(t)-Math.exp(-t))/2}function T(t){return(Math.exp(t)+Math.exp(-t))/2}var S=M(0),C=function(t){return T(S)/T(S+m*t)},E=function(t){return y*((T(S)*(A(e=S+m*t)/T(e))-A(S))/k)/b;var e},L=(M(1)-S)/m;if(Math.abs(b)<1e-6||!isFinite(L)){if(Math.abs(y-x)<1e-6)return this.easeTo(e,r);var z=x<y?-1:1;L=Math.abs(Math.log(x/y))/m,E=function(){return 0},C=function(t){return Math.exp(z*m*t)}}if(\\\"duration\\\"in e)e.duration=+e.duration;else{var O=\\\"screenSpeed\\\"in e?+e.screenSpeed/m:+e.speed;e.duration=1e3*L/O}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,!1),this._ease(function(e){var l=e*L,f=1/C(l);i.zoom=a+i.scaleZoom(f),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,u,e));var p=i.unproject(g.add(v.mult(E(l))).mult(f));i.setLocationAtPoint(i.renderWorldCopies?p.wrap():p,h),n._fireMoveEvents(r)},function(){return n._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(t,e,r){!1===r.animate||0===r.duration?(t(1),e()):(this._easeStart=a.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((a.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)<n&&(e-=360),Math.abs(e+360-r)<n&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),nn=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\\\"_updateEditLink\\\",\\\"_updateData\\\",\\\"_updateCompact\\\"],this)};nn.prototype.getDefaultPosition=function(){return\\\"bottom-right\\\"},nn.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl mapboxgl-ctrl-attrib\\\"),e&&this._container.classList.add(\\\"mapboxgl-compact\\\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\\\"sourcedata\\\",this._updateData),this._map.on(\\\"moveend\\\",this._updateEditLink),void 0===e&&(this._map.on(\\\"resize\\\",this._updateCompact),this._updateCompact()),this._container},nn.prototype.onRemove=function(){s.remove(this._container),this._map.off(\\\"sourcedata\\\",this._updateData),this._map.off(\\\"moveend\\\",this._updateEditLink),this._map.off(\\\"resize\\\",this._updateCompact),this._map=void 0},nn.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(\\\".mapbox-improve-map\\\"));var e=[{key:\\\"owner\\\",value:this.styleOwner},{key:\\\"id\\\",value:this.styleId},{key:\\\"access_token\\\",value:v.ACCESS_TOKEN}];if(t){var r=e.reduce(function(t,r,n){return r.value&&(t+=r.key+\\\"=\\\"+r.value+(n<e.length-1?\\\"&\\\":\\\"\\\")),t},\\\"?\\\");t.href=\\\"https://www.mapbox.com/feedback/\\\"+r+(this._map._hash?this._map._hash.getHashString(!0):\\\"\\\")}},nn.prototype._updateData=function(t){t&&\\\"metadata\\\"===t.sourceDataType&&(this._updateAttributions(),this._updateEditLink())},nn.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var n in r){var i=r[n].getSource();i.attribution&&t.indexOf(i.attribution)<0&&t.push(i.attribution)}t.sort(function(t,e){return t.length-e.length}),(t=t.filter(function(e,r){for(var n=r+1;n<t.length;n++)if(t[n].indexOf(e)>=0)return!1;return!0})).length?(this._container.innerHTML=t.join(\\\" | \\\"),this._container.classList.remove(\\\"mapboxgl-attrib-empty\\\")):this._container.classList.add(\\\"mapboxgl-attrib-empty\\\"),this._editLink=null}},nn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\\\"mapboxgl-compact\\\"):this._container.classList.remove(\\\"mapboxgl-compact\\\")};var an=function(){t.bindAll([\\\"_updateLogo\\\"],this)};an.prototype.onAdd=function(t){this._map=t,this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl\\\");var e=s.create(\\\"a\\\",\\\"mapboxgl-ctrl-logo\\\");return e.target=\\\"_blank\\\",e.href=\\\"https://www.mapbox.com/\\\",e.setAttribute(\\\"aria-label\\\",\\\"Mapbox logo\\\"),this._container.appendChild(e),this._container.style.display=\\\"none\\\",this._map.on(\\\"sourcedata\\\",this._updateLogo),this._updateLogo(),this._container},an.prototype.onRemove=function(){s.remove(this._container),this._map.off(\\\"sourcedata\\\",this._updateLogo)},an.prototype.getDefaultPosition=function(){return\\\"bottom-left\\\"},an.prototype._updateLogo=function(t){t&&\\\"metadata\\\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\\\"block\\\":\\\"none\\\")},an.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}};var on=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};on.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},on.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;r<n.length;r+=1){var i=n[r];if(i.id===t)return void(i.cancelled=!0)}},on.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,r=t;e<r.length;e+=1){var n=r[e];if(!n.cancelled&&(n.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},on.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var sn=t.default.HTMLImageElement,ln=t.default.HTMLElement,cn={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300},un=function(r){function n(e){if(null!=(e=t.extend({},cn,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error(\\\"maxZoom must be greater than minZoom\\\");var n=new Fr(e.minZoom,e.maxZoom,e.renderWorldCopies);r.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new on;var i=e.transformRequest;if(this._transformRequest=i?function(t,e){return i(t,e)||{url:t}}:function(t){return{url:t}},\\\"string\\\"==typeof e.container){var a=t.default.document.getElementById(e.container);if(!a)throw new Error(\\\"Container '\\\"+e.container+\\\"' not found.\\\");this._container=a}else{if(!(e.container instanceof ln))throw new Error(\\\"Invalid type: 'container' must be a String or HTMLElement.\\\");this._container=e.container}e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\\\"_onWindowOnline\\\",\\\"_onWindowResize\\\",\\\"_contextLost\\\",\\\"_contextRestored\\\",\\\"_update\\\",\\\"_render\\\",\\\"_onData\\\",\\\"_onDataLoading\\\"],this),this._setupContainer(),this._setupPainter(),this.on(\\\"move\\\",this._update.bind(this,!1)),this.on(\\\"zoom\\\",this._update.bind(this,!0)),void 0!==t.default&&(t.default.addEventListener(\\\"online\\\",this._onWindowOnline,!1),t.default.addEventListener(\\\"resize\\\",this._onWindowResize,!1)),function(t,e){var r=t.getCanvasContainer(),n=null,i=!1;for(var a in en)t[a]=new en[a](t,e),e.interactive&&e[a]&&t[a].enable(e[a]);s.addEventListener(r,\\\"mouseout\\\",function(e){t.fire(new Vr(\\\"mouseout\\\",t,e))}),s.addEventListener(r,\\\"mousedown\\\",function(r){i=!0;var n=new Vr(\\\"mousedown\\\",t,r);t.fire(n),n.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(r),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(r),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(r))}),s.addEventListener(r,\\\"mouseup\\\",function(e){var r=t.dragRotate.isActive();n&&!r&&t.fire(new Vr(\\\"contextmenu\\\",t,n)),n=null,i=!1,t.fire(new Vr(\\\"mouseup\\\",t,e))}),s.addEventListener(r,\\\"mousemove\\\",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var n=e.toElement||e.target;n&&n!==r;)n=n.parentNode;n===r&&t.fire(new Vr(\\\"mousemove\\\",t,e))}}),s.addEventListener(r,\\\"mouseover\\\",function(e){for(var n=e.toElement||e.target;n&&n!==r;)n=n.parentNode;n===r&&t.fire(new Vr(\\\"mouseover\\\",t,e))}),s.addEventListener(r,\\\"touchstart\\\",function(r){var n=new Ur(\\\"touchstart\\\",t,r);t.fire(n),n.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(n))},{passive:!1}),s.addEventListener(r,\\\"touchmove\\\",function(e){t.fire(new Ur(\\\"touchmove\\\",t,e))},{passive:!1}),s.addEventListener(r,\\\"touchend\\\",function(e){t.fire(new Ur(\\\"touchend\\\",t,e))}),s.addEventListener(r,\\\"touchcancel\\\",function(e){t.fire(new Ur(\\\"touchcancel\\\",t,e))}),s.addEventListener(r,\\\"click\\\",function(e){t.fire(new Vr(\\\"click\\\",t,e))}),s.addEventListener(r,\\\"dblclick\\\",function(e){var r=new Vr(\\\"dblclick\\\",t,e);t.fire(r),r.defaultPrevented||t.doubleClickZoom.onDblClick(r)}),s.addEventListener(r,\\\"contextmenu\\\",function(e){var r=t.dragRotate.isActive();i||r?i&&(n=e):t.fire(new Vr(\\\"contextmenu\\\",t,e)),e.preventDefault()}),s.addEventListener(r,\\\"wheel\\\",function(e){var r=new qr(\\\"wheel\\\",t,e);t.fire(r),r.defaultPrevented||t.scrollZoom.onWheel(e)},{passive:!1})}(this,e),this._hash=e.hash&&(new jr).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this.resize(),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new nn),this.addControl(new an,e.logoPosition),this.on(\\\"style.load\\\",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on(\\\"data\\\",this._onData),this.on(\\\"dataloading\\\",this._onDataLoading)}r&&(n.__proto__=r),n.prototype=Object.create(r&&r.prototype),n.prototype.constructor=n;var i={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return n.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e=\\\"top-right\\\");var r=t.onAdd(this),n=this._controlPositions[e];return-1!==e.indexOf(\\\"bottom\\\")?n.insertBefore(r,n.firstChild):n.appendChild(r),this},n.prototype.removeControl=function(t){return t.onRemove(this),this},n.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];return this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i),this.fire(new t.Event(\\\"movestart\\\",e)).fire(new t.Event(\\\"move\\\",e)).fire(new t.Event(\\\"resize\\\",e)).fire(new t.Event(\\\"moveend\\\",e))},n.prototype.getBounds=function(){var e=new W(this.transform.pointLocation(new t.default$1(0,this.transform.height)),this.transform.pointLocation(new t.default$1(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(e.extend(this.transform.pointLocation(new t.default$1(this.transform.size.x,0))),e.extend(this.transform.pointLocation(new t.default$1(0,this.transform.size.y)))),e},n.prototype.getMaxBounds=function(){return this.transform.latRange&&2===this.transform.latRange.length&&this.transform.lngRange&&2===this.transform.lngRange.length?new W([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},n.prototype.setMaxBounds=function(t){if(t){var e=W.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null==t&&(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},n.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error(\\\"minZoom must be between 0 and the current maxZoom, inclusive\\\")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error(\\\"maxZoom must be greater than the current minZoom\\\")},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update(),this},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.project=function(t){return this.transform.locationPoint(G.convert(t))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.default$1.convert(e))},n.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},n.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isActive()},n.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},n.prototype.on=function(t,e,n){var i,a=this;if(void 0===n)return r.prototype.on.call(this,t,e);var o=function(){if(\\\"mouseenter\\\"===t||\\\"mouseover\\\"===t){var r=!1;return{layer:e,listener:n,delegates:{mousemove:function(i){var o=a.getLayer(e)?a.queryRenderedFeatures(i.point,{layers:[e]}):[];o.length?r||(r=!0,n.call(a,new Vr(t,a,i.originalEvent,{features:o}))):r=!1},mouseout:function(){r=!1}}}}if(\\\"mouseleave\\\"===t||\\\"mouseout\\\"===t){var o=!1;return{layer:e,listener:n,delegates:{mousemove:function(r){(a.getLayer(e)?a.queryRenderedFeatures(r.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,n.call(a,new Vr(t,a,r.originalEvent)))},mouseout:function(e){o&&(o=!1,n.call(a,new Vr(t,a,e.originalEvent)))}}}}return{layer:e,listener:n,delegates:(i={},i[t]=function(t){var r=a.getLayer(e)?a.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&&(t.features=r,n.call(a,t),delete t.features)},i)}}();for(var s in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(o),o.delegates)a.on(s,o.delegates[s]);return this},n.prototype.off=function(t,e,n){if(void 0===n)return r.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var i=this._delegatedListeners[t],a=0;a<i.length;a++){var o=i[a];if(o.layer===e&&o.listener===n){for(var s in o.delegates)this.off(s,o.delegates[s]);return i.splice(a,1),this}}return this},n.prototype.queryRenderedFeatures=function(e,r){var n;return 2===arguments.length?(e=arguments[0],r=arguments[1]):1===arguments.length&&((n=arguments[0])instanceof t.default$1||Array.isArray(n))?(e=arguments[0],r={}):1===arguments.length?(e=void 0,r=arguments[0]):(e=void 0,r={}),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(e),r,this.transform):[]},n.prototype._makeQueryGeometry=function(e){var r,n=this;if(void 0===e&&(e=[t.default$1.convert([0,0]),t.default$1.convert([this.transform.width,this.transform.height])]),e instanceof t.default$1||\\\"number\\\"==typeof e[0])r=[t.default$1.convert(e)];else{var i=[t.default$1.convert(e[0]),t.default$1.convert(e[1])];r=[i[0],new t.default$1(i[1].x,i[0].y),i[1],new t.default$1(i[0].x,i[1].y),i[0]]}return{viewport:r,worldCoordinate:r.map(function(t){return n.transform.pointCoordinate(t)})}},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,r){if((!r||!1!==r.diff&&!r.localIdeographFontFamily)&&this.style&&e&&\\\"object\\\"==typeof e)try{return this.style.setState(e)&&this._update(!0),this}catch(e){t.warnOnce(\\\"Unable to perform style diff: \\\"+(e.message||e.error||e)+\\\".  Rebuilding the style from scratch.\\\")}return this.style&&(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new Je(this,r||{}),this.style.setEventedParent(this,{style:this.style}),\\\"string\\\"==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce(\\\"There is no style added to the map.\\\")},n.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},n.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error(\\\"There is no source with ID '\\\"+e+\\\"'\\\")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var n in r){var i=r[n];if(\\\"loaded\\\"!==i.state&&\\\"errored\\\"!==i.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,r,n){void 0===n&&(n={});var i=n.pixelRatio;void 0===i&&(i=1);var o=n.sdf;if(void 0===o&&(o=!1),r instanceof sn){var s=a.getImageData(r),l=s.width,c=s.height,u=s.data;this.style.addImage(e,{data:new t.RGBAImage({width:l,height:c},u),pixelRatio:i,sdf:o})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error(\\\"Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\\\")));var f=r.width,h=r.height,p=r.data;this.style.addImage(e,{data:new t.RGBAImage({width:f,height:h},p.slice(0)),pixelRatio:i,sdf:o})}},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error(\\\"Missing required image id\\\"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,r){t.getImage(this._transformRequest(e,t.ResourceType.Image),r)},n.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},n.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,r){return this.style.setPaintProperty(t,e,r),this._update(!0),this},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},n.prototype._setupContainer=function(){var t=this._container;t.classList.add(\\\"mapboxgl-map\\\"),(this._missingCSSContainer=s.create(\\\"div\\\",\\\"mapboxgl-missing-css\\\",t)).innerHTML=\\\"Missing Mapbox GL JS CSS\\\";var e=this._canvasContainer=s.create(\\\"div\\\",\\\"mapboxgl-canvas-container\\\",t);this._interactive&&e.classList.add(\\\"mapboxgl-interactive\\\"),this._canvas=s.create(\\\"canvas\\\",\\\"mapboxgl-canvas\\\",e),this._canvas.style.position=\\\"absolute\\\",this._canvas.addEventListener(\\\"webglcontextlost\\\",this._contextLost,!1),this._canvas.addEventListener(\\\"webglcontextrestored\\\",this._contextRestored,!1),this._canvas.setAttribute(\\\"tabindex\\\",\\\"0\\\"),this._canvas.setAttribute(\\\"aria-label\\\",\\\"Map\\\");var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var n=this._controlContainer=s.create(\\\"div\\\",\\\"mapboxgl-control-container\\\",t),i=this._controlPositions={};[\\\"top-left\\\",\\\"top-right\\\",\\\"bottom-left\\\",\\\"bottom-right\\\"].forEach(function(t){i[t]=s.create(\\\"div\\\",\\\"mapboxgl-ctrl-\\\"+t,n)})},n.prototype._resizeCanvas=function(e,r){var n=t.default.devicePixelRatio||1;this._canvas.width=n*e,this._canvas.height=n*r,this._canvas.style.width=e+\\\"px\\\",this._canvas.style.height=r+\\\"px\\\"},n.prototype._setupPainter=function(){var r=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},e.webGLContextAttributes),n=this._canvas.getContext(\\\"webgl\\\",r)||this._canvas.getContext(\\\"experimental-webgl\\\",r);n?this.painter=new zr(n,this.transform):this.fire(new t.ErrorEvent(new Error(\\\"Failed to initialize WebGL\\\")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frameId&&(a.cancelFrame(this._frameId),this._frameId=null),this.fire(new t.Event(\\\"webglcontextlost\\\",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event(\\\"webglcontextrestored\\\",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},n.prototype._update=function(t){this.style&&(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender())},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(){this._renderTaskQueue.run();var e=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var r=this.transform.zoom,n=a.now();this.style.zoomHistory.update(r,n);var i=new t.default$16(r,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=i.crossFadingFactor();1===o&&o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(i)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),fadeDuration:this._fadeDuration}),this.fire(new t.Event(\\\"render\\\")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event(\\\"load\\\"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty)&&this._rerender(),this},n.prototype.remove=function(){this._hash&&this._hash.remove(),a.cancelFrame(this._frameId),this._renderTaskQueue.clear(),this._frameId=null,this.setStyle(null),void 0!==t.default&&(t.default.removeEventListener(\\\"resize\\\",this._onWindowResize,!1),t.default.removeEventListener(\\\"online\\\",this._onWindowOnline,!1));var e=this.painter.context.gl.getExtension(\\\"WEBGL_lose_context\\\");e&&e.loseContext(),fn(this._canvasContainer),fn(this._controlContainer),fn(this._missingCSSContainer),this._container.classList.remove(\\\"mapboxgl-map\\\"),this.fire(new t.Event(\\\"remove\\\"))},n.prototype._rerender=function(){var t=this;this.style&&!this._frameId&&(this._frameId=a.frame(function(){t._frameId=null,t._render()}))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},i.showTileBoundaries.get=function(){return!!this._showTileBoundaries},i.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},i.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},i.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},i.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},i.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},i.repaint.get=function(){return!!this._repaint},i.repaint.set=function(t){this._repaint=t,this._update()},i.vertices.get=function(){return!!this._vertices},i.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._onData=function(e){this._update(\\\"style\\\"===e.dataType),this.fire(new t.Event(e.dataType+\\\"data\\\",e))},n.prototype._onDataLoading=function(e){this.fire(new t.Event(e.dataType+\\\"dataloading\\\",e))},Object.defineProperties(n.prototype,i),n}(rn);function fn(t){t.parentNode&&t.parentNode.removeChild(t)}var hn={showCompass:!0,showZoom:!0},pn=function(e){var r=this;this.options=t.extend({},hn,e),this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl mapboxgl-ctrl-group\\\"),this._container.addEventListener(\\\"contextmenu\\\",function(t){return t.preventDefault()}),this.options.showZoom&&(this._zoomInButton=this._createButton(\\\"mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in\\\",\\\"Zoom In\\\",function(){return r._map.zoomIn()}),this._zoomOutButton=this._createButton(\\\"mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out\\\",\\\"Zoom Out\\\",function(){return r._map.zoomOut()})),this.options.showCompass&&(t.bindAll([\\\"_rotateCompassArrow\\\"],this),this._compass=this._createButton(\\\"mapboxgl-ctrl-icon mapboxgl-ctrl-compass\\\",\\\"Reset North\\\",function(){return r._map.resetNorth()}),this._compassArrow=s.create(\\\"span\\\",\\\"mapboxgl-ctrl-compass-arrow\\\",this._compass))};function dn(t,e,r){if(t=new G(t.lng,t.lat),e){var n=new G(t.lng-360,t.lat),i=new G(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(e);r.locationPoint(n).distSqr(e)<a?t=n:r.locationPoint(i).distSqr(e)<a&&(t=i)}for(;Math.abs(t.lng-r.center.lng)>180;){var o=r.locationPoint(t);if(o.x>=0&&o.y>=0&&o.x<=r.width&&o.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}pn.prototype._rotateCompassArrow=function(){var t=\\\"rotate(\\\"+this._map.transform.angle*(180/Math.PI)+\\\"deg)\\\";this._compassArrow.style.transform=t},pn.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&&(this._map.on(\\\"rotate\\\",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Yr(t,{button:\\\"left\\\",element:this._compass}),this._handler.enable()),this._container},pn.prototype.onRemove=function(){s.remove(this._container),this.options.showCompass&&(this._map.off(\\\"rotate\\\",this._rotateCompassArrow),this._handler.disable(),delete this._handler),delete this._map},pn.prototype._createButton=function(t,e,r){var n=s.create(\\\"button\\\",t,this._container);return n.type=\\\"button\\\",n.setAttribute(\\\"aria-label\\\",e),n.addEventListener(\\\"click\\\",r),n};var gn={center:\\\"translate(-50%,-50%)\\\",top:\\\"translate(-50%,0)\\\",\\\"top-left\\\":\\\"translate(0,0)\\\",\\\"top-right\\\":\\\"translate(-100%,0)\\\",bottom:\\\"translate(-50%,-100%)\\\",\\\"bottom-left\\\":\\\"translate(0,-100%)\\\",\\\"bottom-right\\\":\\\"translate(-100%,-100%)\\\",left:\\\"translate(0,-50%)\\\",right:\\\"translate(-100%,-50%)\\\"};function vn(t,e,r){var n=t.classList;for(var i in gn)n.remove(\\\"mapboxgl-\\\"+r+\\\"-anchor-\\\"+i);n.add(\\\"mapboxgl-\\\"+r+\\\"-anchor-\\\"+e)}var mn=function(e){if((arguments[0]instanceof t.default.HTMLElement||2===arguments.length)&&(e=t.extend({element:e},arguments[1])),t.bindAll([\\\"_update\\\",\\\"_onMapClick\\\"],this),this._anchor=e&&e.anchor||\\\"center\\\",this._color=e&&e.color||\\\"#3FB1CE\\\",e&&e.element)this._element=e.element,this._offset=t.default$1.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=s.create(\\\"div\\\");var r=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"svg\\\");r.setAttributeNS(null,\\\"height\\\",\\\"41px\\\"),r.setAttributeNS(null,\\\"width\\\",\\\"27px\\\"),r.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 27 41\\\");var n=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");n.setAttributeNS(null,\\\"stroke\\\",\\\"none\\\"),n.setAttributeNS(null,\\\"stroke-width\\\",\\\"1\\\"),n.setAttributeNS(null,\\\"fill\\\",\\\"none\\\"),n.setAttributeNS(null,\\\"fill-rule\\\",\\\"evenodd\\\");var i=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");i.setAttributeNS(null,\\\"fill-rule\\\",\\\"nonzero\\\");var a=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");a.setAttributeNS(null,\\\"transform\\\",\\\"translate(3.0, 29.0)\\\"),a.setAttributeNS(null,\\\"fill\\\",\\\"#000000\\\");for(var o=0,l=[{rx:\\\"10.5\\\",ry:\\\"5.25002273\\\"},{rx:\\\"10.5\\\",ry:\\\"5.25002273\\\"},{rx:\\\"9.5\\\",ry:\\\"4.77275007\\\"},{rx:\\\"8.5\\\",ry:\\\"4.29549936\\\"},{rx:\\\"7.5\\\",ry:\\\"3.81822308\\\"},{rx:\\\"6.5\\\",ry:\\\"3.34094679\\\"},{rx:\\\"5.5\\\",ry:\\\"2.86367051\\\"},{rx:\\\"4.5\\\",ry:\\\"2.38636864\\\"}];o<l.length;o+=1){var c=l[o],u=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"ellipse\\\");u.setAttributeNS(null,\\\"opacity\\\",\\\"0.04\\\"),u.setAttributeNS(null,\\\"cx\\\",\\\"10.5\\\"),u.setAttributeNS(null,\\\"cy\\\",\\\"5.80029008\\\"),u.setAttributeNS(null,\\\"rx\\\",c.rx),u.setAttributeNS(null,\\\"ry\\\",c.ry),a.appendChild(u)}var f=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");f.setAttributeNS(null,\\\"fill\\\",this._color);var h=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"path\\\");h.setAttributeNS(null,\\\"d\\\",\\\"M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z\\\"),f.appendChild(h);var p=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");p.setAttributeNS(null,\\\"opacity\\\",\\\"0.25\\\"),p.setAttributeNS(null,\\\"fill\\\",\\\"#000000\\\");var d=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"path\\\");d.setAttributeNS(null,\\\"d\\\",\\\"M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z\\\"),p.appendChild(d);var g=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");g.setAttributeNS(null,\\\"transform\\\",\\\"translate(6.0, 7.0)\\\"),g.setAttributeNS(null,\\\"fill\\\",\\\"#FFFFFF\\\");var v=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");v.setAttributeNS(null,\\\"transform\\\",\\\"translate(8.0, 8.0)\\\");var m=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"circle\\\");m.setAttributeNS(null,\\\"fill\\\",\\\"#000000\\\"),m.setAttributeNS(null,\\\"opacity\\\",\\\"0.25\\\"),m.setAttributeNS(null,\\\"cx\\\",\\\"5.5\\\"),m.setAttributeNS(null,\\\"cy\\\",\\\"5.5\\\"),m.setAttributeNS(null,\\\"r\\\",\\\"5.4999962\\\");var y=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"circle\\\");y.setAttributeNS(null,\\\"fill\\\",\\\"#FFFFFF\\\"),y.setAttributeNS(null,\\\"cx\\\",\\\"5.5\\\"),y.setAttributeNS(null,\\\"cy\\\",\\\"5.5\\\"),y.setAttributeNS(null,\\\"r\\\",\\\"5.4999962\\\"),v.appendChild(m),v.appendChild(y),i.appendChild(a),i.appendChild(f),i.appendChild(p),i.appendChild(g),i.appendChild(v),r.appendChild(i),this._element.appendChild(r),this._offset=t.default$1.convert(e&&e.offset||[0,-14])}this._element.classList.add(\\\"mapboxgl-marker\\\"),this._popup=null};mn.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(\\\"move\\\",this._update),t.on(\\\"moveend\\\",this._update),this._update(),this._map.on(\\\"click\\\",this._onMapClick),this},mn.prototype.remove=function(){return this._map&&(this._map.off(\\\"click\\\",this._onMapClick),this._map.off(\\\"move\\\",this._update),this._map.off(\\\"moveend\\\",this._update),delete this._map),s.remove(this._element),this._popup&&this._popup.remove(),this},mn.prototype.getLngLat=function(){return this._lngLat},mn.prototype.setLngLat=function(t){return this._lngLat=G.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},mn.prototype.getElement=function(){return this._element},mn.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null),t){if(!(\\\"offset\\\"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],\\\"top-left\\\":[0,0],\\\"top-right\\\":[0,0],bottom:[0,-38.1],\\\"bottom-left\\\":[e,-1*(24.6+e)],\\\"bottom-right\\\":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat)}return this},mn.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},mn.prototype.getPopup=function(){return this._popup},mn.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},mn.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=dn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&\\\"moveend\\\"!==t.type||(this._pos=this._pos.round()),s.setTransform(this._element,gn[this._anchor]+\\\" translate(\\\"+this._pos.x+\\\"px, \\\"+this._pos.y+\\\"px)\\\"),vn(this._element,this._anchor,\\\"marker\\\"))},mn.prototype.getOffset=function(){return this._offset},mn.prototype.setOffset=function(e){return this._offset=t.default$1.convert(e),this._update(),this};var yn,xn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},bn=function(e){function r(r){e.call(this),this.options=t.extend({},xn,r),t.bindAll([\\\"_onSuccess\\\",\\\"_onError\\\",\\\"_finish\\\",\\\"_setupUI\\\",\\\"_updateCamera\\\",\\\"_updateMarker\\\"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(e){var r;return this._map=e,this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl mapboxgl-ctrl-group\\\"),r=this._setupUI,void 0!==yn?r(yn):void 0!==t.default.navigator.permissions?t.default.navigator.permissions.query({name:\\\"geolocation\\\"}).then(function(t){yn=\\\"denied\\\"!==t.state,r(yn)}):(yn=!!t.default.navigator.geolocation,r(yn)),this._container},r.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),s.remove(this._container),this._map=void 0},r.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case\\\"WAITING_ACTIVE\\\":case\\\"ACTIVE_LOCK\\\":case\\\"ACTIVE_ERROR\\\":this._watchState=\\\"ACTIVE_LOCK\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active-error\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active\\\");break;case\\\"BACKGROUND\\\":case\\\"BACKGROUND_ERROR\\\":this._watchState=\\\"BACKGROUND\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background-error\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background\\\")}this.options.showUserLocation&&\\\"OFF\\\"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&\\\"ACTIVE_LOCK\\\"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove(\\\"mapboxgl-user-location-dot-stale\\\"),this.fire(new t.Event(\\\"geolocate\\\",e)),this._finish()},r.prototype._updateCamera=function(t){var e=new G(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy;this._map.fitBounds(e.toBounds(r),this.options.fitBoundsOptions,{geolocateSource:!0})},r.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},r.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState=\\\"OFF\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active-error\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background-error\\\"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case\\\"WAITING_ACTIVE\\\":this._watchState=\\\"ACTIVE_ERROR\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active-error\\\");break;case\\\"ACTIVE_LOCK\\\":this._watchState=\\\"ACTIVE_ERROR\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active-error\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\");break;case\\\"BACKGROUND\\\":this._watchState=\\\"BACKGROUND_ERROR\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background-error\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\")}\\\"OFF\\\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\\\"mapboxgl-user-location-dot-stale\\\"),this.fire(new t.Event(\\\"error\\\",e)),this._finish()},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(e){var r=this;!1!==e&&(this._container.addEventListener(\\\"contextmenu\\\",function(t){return t.preventDefault()}),this._geolocateButton=s.create(\\\"button\\\",\\\"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate\\\",this._container),this._geolocateButton.type=\\\"button\\\",this._geolocateButton.setAttribute(\\\"aria-label\\\",\\\"Geolocate\\\"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\\\"aria-pressed\\\",\\\"false\\\"),this._watchState=\\\"OFF\\\"),this.options.showUserLocation&&(this._dotElement=s.create(\\\"div\\\",\\\"mapboxgl-user-location-dot\\\"),this._userLocationDotMarker=new mn(this._dotElement),this.options.trackUserLocation&&(this._watchState=\\\"OFF\\\")),this._geolocateButton.addEventListener(\\\"click\\\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\\\"movestart\\\",function(e){e.geolocateSource||\\\"ACTIVE_LOCK\\\"!==r._watchState||(r._watchState=\\\"BACKGROUND\\\",r._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background\\\"),r._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),r.fire(new t.Event(\\\"trackuserlocationend\\\")))}))},r.prototype.trigger=function(){if(!this._setup)return t.warnOnce(\\\"Geolocate control triggered before added to a map\\\"),!1;if(this.options.trackUserLocation){switch(this._watchState){case\\\"OFF\\\":this._watchState=\\\"WAITING_ACTIVE\\\",this.fire(new t.Event(\\\"trackuserlocationstart\\\"));break;case\\\"WAITING_ACTIVE\\\":case\\\"ACTIVE_LOCK\\\":case\\\"ACTIVE_ERROR\\\":case\\\"BACKGROUND_ERROR\\\":this._watchState=\\\"OFF\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active-error\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background-error\\\"),this.fire(new t.Event(\\\"trackuserlocationend\\\"));break;case\\\"BACKGROUND\\\":this._watchState=\\\"ACTIVE_LOCK\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background\\\"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event(\\\"trackuserlocationstart\\\"))}switch(this._watchState){case\\\"WAITING_ACTIVE\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active\\\");break;case\\\"ACTIVE_LOCK\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active\\\");break;case\\\"ACTIVE_ERROR\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active-error\\\");break;case\\\"BACKGROUND\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background\\\");break;case\\\"BACKGROUND_ERROR\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background-error\\\")}\\\"OFF\\\"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.setAttribute(\\\"aria-pressed\\\",\\\"true\\\"),this._geolocationWatchID=t.default.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.default.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.setAttribute(\\\"aria-pressed\\\",\\\"false\\\"),this.options.showUserLocation&&this._updateMarker(null)},r}(t.Evented),_n={maxWidth:100,unit:\\\"metric\\\"},wn=function(e){this.options=t.extend({},_n,e),t.bindAll([\\\"_onMove\\\",\\\"setUnit\\\"],this)};function kn(t,e,r){var n,i,a,o,s,l,c=r&&r.maxWidth||100,u=t._container.clientHeight/2,f=(n=t.unproject([0,u]),i=t.unproject([c,u]),a=Math.PI/180,o=n.lat*a,s=i.lat*a,l=Math.sin(o)*Math.sin(s)+Math.cos(o)*Math.cos(s)*Math.cos((i.lng-n.lng)*a),6371e3*Math.acos(Math.min(l,1)));if(r&&\\\"imperial\\\"===r.unit){var h=3.2808*f;h>5280?Mn(e,c,h/5280,\\\"mi\\\"):Mn(e,c,h,\\\"ft\\\")}else r&&\\\"nautical\\\"===r.unit?Mn(e,c,f/1852,\\\"nm\\\"):Mn(e,c,f,\\\"m\\\")}function Mn(t,e,r,n){var i,a,o,s=(i=r,(a=Math.pow(10,(\\\"\\\"+Math.floor(i)).length-1))*(o=(o=i/a)>=10?10:o>=5?5:o>=3?3:o>=2?2:1)),l=s/r;\\\"m\\\"===n&&s>=1e3&&(s/=1e3,n=\\\"km\\\"),t.style.width=e*l+\\\"px\\\",t.innerHTML=s+n}wn.prototype.getDefaultPosition=function(){return\\\"bottom-left\\\"},wn.prototype._onMove=function(){kn(this._map,this._container,this.options)},wn.prototype.onAdd=function(t){return this._map=t,this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl mapboxgl-ctrl-scale\\\",t.getContainer()),this._map.on(\\\"move\\\",this._onMove),this._onMove(),this._container},wn.prototype.onRemove=function(){s.remove(this._container),this._map.off(\\\"move\\\",this._onMove),this._map=void 0},wn.prototype.setUnit=function(t){this.options.unit=t,kn(this._map,this._container,this.options)};var An=function(){this._fullscreen=!1,t.bindAll([\\\"_onClickFullscreen\\\",\\\"_changeIcon\\\"],this),\\\"onfullscreenchange\\\"in t.default.document?this._fullscreenchange=\\\"fullscreenchange\\\":\\\"onmozfullscreenchange\\\"in t.default.document?this._fullscreenchange=\\\"mozfullscreenchange\\\":\\\"onwebkitfullscreenchange\\\"in t.default.document?this._fullscreenchange=\\\"webkitfullscreenchange\\\":\\\"onmsfullscreenchange\\\"in t.default.document&&(this._fullscreenchange=\\\"MSFullscreenChange\\\"),this._className=\\\"mapboxgl-ctrl\\\"};An.prototype.onAdd=function(e){return this._map=e,this._mapContainer=this._map.getContainer(),this._container=s.create(\\\"div\\\",this._className+\\\" mapboxgl-ctrl-group\\\"),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display=\\\"none\\\",t.warnOnce(\\\"This device does not support fullscreen mode.\\\")),this._container},An.prototype.onRemove=function(){s.remove(this._container),this._map=null,t.default.document.removeEventListener(this._fullscreenchange,this._changeIcon)},An.prototype._checkFullscreenSupport=function(){return!!(t.default.document.fullscreenEnabled||t.default.document.mozFullScreenEnabled||t.default.document.msFullscreenEnabled||t.default.document.webkitFullscreenEnabled)},An.prototype._setupUI=function(){var e=this._fullscreenButton=s.create(\\\"button\\\",this._className+\\\"-icon \\\"+this._className+\\\"-fullscreen\\\",this._container);e.setAttribute(\\\"aria-label\\\",\\\"Toggle fullscreen\\\"),e.type=\\\"button\\\",this._fullscreenButton.addEventListener(\\\"click\\\",this._onClickFullscreen),t.default.document.addEventListener(this._fullscreenchange,this._changeIcon)},An.prototype._isFullscreen=function(){return this._fullscreen},An.prototype._changeIcon=function(){(t.default.document.fullscreenElement||t.default.document.mozFullScreenElement||t.default.document.webkitFullscreenElement||t.default.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+\\\"-shrink\\\"),this._fullscreenButton.classList.toggle(this._className+\\\"-fullscreen\\\"))},An.prototype._onClickFullscreen=function(){this._isFullscreen()?t.default.document.exitFullscreen?t.default.document.exitFullscreen():t.default.document.mozCancelFullScreen?t.default.document.mozCancelFullScreen():t.default.document.msExitFullscreen?t.default.document.msExitFullscreen():t.default.document.webkitCancelFullScreen&&t.default.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()};var Tn={closeButton:!0,closeOnClick:!0},Sn=function(e){function r(r){e.call(this),this.options=t.extend(Object.create(Tn),r),t.bindAll([\\\"_update\\\",\\\"_onClickClose\\\"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addTo=function(e){return this._map=e,this._map.on(\\\"move\\\",this._update),this.options.closeOnClick&&this._map.on(\\\"click\\\",this._onClickClose),this._update(),this.fire(new t.Event(\\\"open\\\")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&s.remove(this._content),this._container&&(s.remove(this._container),delete this._container),this._map&&(this._map.off(\\\"move\\\",this._update),this._map.off(\\\"click\\\",this._onClickClose),delete this._map),this.fire(new t.Event(\\\"close\\\")),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=G.convert(t),this._pos=null,this._update(),this},r.prototype.setText=function(e){return this.setDOMContent(t.default.document.createTextNode(e))},r.prototype.setHTML=function(e){var r,n=t.default.document.createDocumentFragment(),i=t.default.document.createElement(\\\"body\\\");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},r.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},r.prototype._createContent=function(){this._content&&s.remove(this._content),this._content=s.create(\\\"div\\\",\\\"mapboxgl-popup-content\\\",this._container),this.options.closeButton&&(this._closeButton=s.create(\\\"button\\\",\\\"mapboxgl-popup-close-button\\\",this._content),this._closeButton.type=\\\"button\\\",this._closeButton.setAttribute(\\\"aria-label\\\",\\\"Close popup\\\"),this._closeButton.innerHTML=\\\"&#215;\\\",this._closeButton.addEventListener(\\\"click\\\",this._onClickClose))},r.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=s.create(\\\"div\\\",\\\"mapboxgl-popup\\\",this._map.getContainer()),this._tip=s.create(\\\"div\\\",\\\"mapboxgl-popup-tip\\\",this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&&(this._lngLat=dn(this._lngLat,this._pos,this._map.transform));var e=this._pos=this._map.project(this._lngLat),r=this.options.anchor,n=function e(r){if(r){if(\\\"number\\\"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.default$1(0,0),top:new t.default$1(0,r),\\\"top-left\\\":new t.default$1(n,n),\\\"top-right\\\":new t.default$1(-n,n),bottom:new t.default$1(0,-r),\\\"bottom-left\\\":new t.default$1(n,-n),\\\"bottom-right\\\":new t.default$1(-n,-n),left:new t.default$1(r,0),right:new t.default$1(-r,0)}}if(r instanceof t.default$1||Array.isArray(r)){var i=t.default$1.convert(r);return{center:i,top:i,\\\"top-left\\\":i,\\\"top-right\\\":i,bottom:i,\\\"bottom-left\\\":i,\\\"bottom-right\\\":i,left:i,right:i}}return{center:t.default$1.convert(r.center||[0,0]),top:t.default$1.convert(r.top||[0,0]),\\\"top-left\\\":t.default$1.convert(r[\\\"top-left\\\"]||[0,0]),\\\"top-right\\\":t.default$1.convert(r[\\\"top-right\\\"]||[0,0]),bottom:t.default$1.convert(r.bottom||[0,0]),\\\"bottom-left\\\":t.default$1.convert(r[\\\"bottom-left\\\"]||[0,0]),\\\"bottom-right\\\":t.default$1.convert(r[\\\"bottom-right\\\"]||[0,0]),left:t.default$1.convert(r.left||[0,0]),right:t.default$1.convert(r.right||[0,0])}}return e(new t.default$1(0,0))}(this.options.offset);if(!r){var i,a=this._container.offsetWidth,o=this._container.offsetHeight;i=e.y+n.bottom.y<o?[\\\"top\\\"]:e.y>this._map.transform.height-o?[\\\"bottom\\\"]:[],e.x<a/2?i.push(\\\"left\\\"):e.x>this._map.transform.width-a/2&&i.push(\\\"right\\\"),r=0===i.length?\\\"bottom\\\":i.join(\\\"-\\\")}var l=e.add(n[r]).round();s.setTransform(this._container,gn[r]+\\\" translate(\\\"+l.x+\\\"px,\\\"+l.y+\\\"px)\\\"),vn(this._container,r,\\\"popup\\\")}},r.prototype._onClickClose=function(){this.remove()},r}(t.Evented),Cn={version:\\\"0.45.0\\\",supported:e,workerCount:Math.max(Math.floor(a.hardwareConcurrency/2),1),setRTLTextPlugin:t.setRTLTextPlugin,Map:un,NavigationControl:pn,GeolocateControl:bn,AttributionControl:nn,ScaleControl:wn,FullscreenControl:An,Popup:Sn,Marker:mn,Style:Je,LngLat:G,LngLatBounds:W,Point:t.default$1,Evented:t.Evented,config:v,get accessToken(){return v.ACCESS_TOKEN},set accessToken(t){v.ACCESS_TOKEN=t},workerUrl:\\\"\\\"};return Cn}),n})}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{}],410:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=1<<t+1,r=new Array(e),n=0;n<e;++n)r[n]=a(t,n);return r};var n=t(\\\"convex-hull\\\");function i(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=0,i===e&&(n[i]+=.5),i===r&&(n[i]+=.5);return n}function a(t,e){if(0===e||e===(1<<t+1)-1)return[];for(var r=[],a=[],o=0;o<=t;++o)if(e&1<<o){r.push(i(t,o-1,o-1)),a.push(null);for(var s=0;s<=t;++s)~e&1<<s&&(r.push(i(t,o-1,s-1)),a.push([o,s]))}var l=n(r),c=[];t:for(o=0;o<l.length;++o){var u=l[o],f=[];for(s=0;s<u.length;++s){if(!a[u[s]])continue t;f.push(a[u[s]].slice())}c.push(f)}return c}},{\\\"convex-hull\\\":118}],411:[function(t,e,r){var n=t(\\\"./normalize\\\"),i=t(\\\"gl-mat4/create\\\"),a=t(\\\"gl-mat4/clone\\\"),o=t(\\\"gl-mat4/determinant\\\"),s=t(\\\"gl-mat4/invert\\\"),l=t(\\\"gl-mat4/transpose\\\"),c={length:t(\\\"gl-vec3/length\\\"),normalize:t(\\\"gl-vec3/normalize\\\"),dot:t(\\\"gl-vec3/dot\\\"),cross:t(\\\"gl-vec3/cross\\\")},u=i(),f=i(),h=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];function g(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}e.exports=function(t,e,r,i,v,m){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),v||(v=[0,0,0,1]),m||(m=[0,0,0,1]),!n(u,t))return!1;if(a(f,u),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(o(f)<1e-8))return!1;var y,x,b,_,w,k,M,A=u[3],T=u[7],S=u[11],C=u[12],E=u[13],L=u[14],z=u[15];if(0!==A||0!==T||0!==S){if(h[0]=A,h[1]=T,h[2]=S,h[3]=z,!s(f,f))return!1;l(f,f),y=v,b=f,_=(x=h)[0],w=x[1],k=x[2],M=x[3],y[0]=b[0]*_+b[4]*w+b[8]*k+b[12]*M,y[1]=b[1]*_+b[5]*w+b[9]*k+b[13]*M,y[2]=b[2]*_+b[6]*w+b[10]*k+b[14]*M,y[3]=b[3]*_+b[7]*w+b[11]*k+b[15]*M}else v[0]=v[1]=v[2]=0,v[3]=1;if(e[0]=C,e[1]=E,e[2]=L,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,u),r[0]=c.length(p[0]),c.normalize(p[0],p[0]),i[0]=c.dot(p[0],p[1]),g(p[1],p[1],p[0],1,-i[0]),r[1]=c.length(p[1]),c.normalize(p[1],p[1]),i[0]/=r[1],i[1]=c.dot(p[0],p[2]),g(p[2],p[2],p[0],1,-i[1]),i[2]=c.dot(p[1],p[2]),g(p[2],p[2],p[1],1,-i[2]),r[2]=c.length(p[2]),c.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],c.cross(d,p[1],p[2]),c.dot(p[0],d)<0)for(var O=0;O<3;O++)r[O]*=-1,p[O][0]*=-1,p[O][1]*=-1,p[O][2]*=-1;return m[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),m[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),m[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),m[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(m[0]=-m[0]),p[0][2]>p[2][0]&&(m[1]=-m[1]),p[1][0]>p[0][1]&&(m[2]=-m[2]),!0}},{\\\"./normalize\\\":412,\\\"gl-mat4/clone\\\":248,\\\"gl-mat4/create\\\":249,\\\"gl-mat4/determinant\\\":250,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/transpose\\\":264,\\\"gl-vec3/cross\\\":317,\\\"gl-vec3/dot\\\":322,\\\"gl-vec3/length\\\":332,\\\"gl-vec3/normalize\\\":339}],412:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],413:[function(t,e,r){var n=t(\\\"gl-vec3/lerp\\\"),i=t(\\\"mat4-recompose\\\"),a=t(\\\"mat4-decompose\\\"),o=t(\\\"gl-mat4/determinant\\\"),s=t(\\\"quat-slerp\\\"),l=f(),c=f(),u=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!h||!p||(n(u.translate,l.translate,c.translate,f),n(u.skew,l.skew,c.skew,f),n(u.scale,l.scale,c.scale,f),n(u.perspective,l.perspective,c.perspective,f),s(u.quaternion,l.quaternion,c.quaternion,f),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{\\\"gl-mat4/determinant\\\":250,\\\"gl-vec3/lerp\\\":333,\\\"mat4-decompose\\\":411,\\\"mat4-recompose\\\":414,\\\"quat-slerp\\\":466}],414:[function(t,e,r){var n={identity:t(\\\"gl-mat4/identity\\\"),translate:t(\\\"gl-mat4/translate\\\"),multiply:t(\\\"gl-mat4/multiply\\\"),create:t(\\\"gl-mat4/create\\\"),scale:t(\\\"gl-mat4/scale\\\"),fromRotationTranslation:t(\\\"gl-mat4/fromRotationTranslation\\\")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{\\\"gl-mat4/create\\\":249,\\\"gl-mat4/fromRotationTranslation\\\":252,\\\"gl-mat4/identity\\\":253,\\\"gl-mat4/multiply\\\":256,\\\"gl-mat4/scale\\\":262,\\\"gl-mat4/translate\\\":263}],415:[function(t,e,r){\\\"use strict\\\";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],416:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"mat4-interpolate\\\"),a=t(\\\"gl-mat4/invert\\\"),o=t(\\\"gl-mat4/rotateX\\\"),s=t(\\\"gl-mat4/rotateY\\\"),l=t(\\\"gl-mat4/rotateZ\\\"),c=t(\\\"gl-mat4/lookAt\\\"),u=t(\\\"gl-mat4/translate\\\"),f=(t(\\\"gl-mat4/scale\\\"),t(\\\"gl-vec3/normalize\\\")),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)h[c]=s[l++];var d=this.nextMatrix;for(c=0;c<16;++c)d[c]=s[l++],p=p&&h[c]===d[c];if(u<1e-6||p)for(c=0;c<16;++c)o[c]=h[c];else i(o,h,d,(t-e[r])/u)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],f(g,g);var v=this.computedInverse;a(v,o);var m=this.computedEye,y=v[15];m[0]=v[12]/y,m[1]=v[13]/y,m[2]=v[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=m[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t<this.lastT())){for(var e=this._components,r=e.length-16,n=0;n<16;++n)e.push(e[r++]);this._time.push(t)}},d.flush=function(t){var e=n.gt(this._time,t)-2;e<0||(this._time.splice(0,e),this._components.splice(0,16*e))},d.lastT=function(){return this._time[this._time.length-1]},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||h,n=n||this.computedUp,this.setMatrix(t,c(this.computedMatrix,e,r,n));for(var i=0,a=0;a<3;++a)i+=Math.pow(r[a]-e[a],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},d.rotate=function(t,e,r,n){this.recalcMatrix(t);var i=this.computedInverse;e&&s(i,i,e),r&&o(i,i,r),n&&l(i,i,n),this.setMatrix(t,a(this.computedMatrix,i))};var g=[0,0,0];d.pan=function(t,e,r,n){g[0]=-(e||0),g[1]=-(r||0),g[2]=-(n||0),this.recalcMatrix(t);var i=this.computedInverse;u(i,i,g),this.setMatrix(t,a(i,i))},d.translate=function(t,e,r,n){g[0]=e||0,g[1]=r||0,g[2]=n||0,this.recalcMatrix(t);var i=this.computedMatrix;u(i,i,g),this.setMatrix(t,i)},d.setMatrix=function(t,e){if(!(t<this.lastT())){this._time.push(t);for(var r=0;r<16;++r)this._components.push(e[r])}},d.setDistance=function(t,e){this.computedRadius[0]=e},d.setDistanceLimits=function(t,e){var r=this._limits;r[0]=t,r[1]=e},d.getDistanceLimits=function(t){var e=this._limits;return t?(t[0]=e[0],t[1]=e[1],t):e}},{\\\"binary-search-bounds\\\":79,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/lookAt\\\":255,\\\"gl-mat4/rotateX\\\":259,\\\"gl-mat4/rotateY\\\":260,\\\"gl-mat4/rotateZ\\\":261,\\\"gl-mat4/scale\\\":262,\\\"gl-mat4/translate\\\":263,\\\"gl-vec3/normalize\\\":339,\\\"mat4-interpolate\\\":413}],417:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.length;if(e<3){for(var r=new Array(e),i=0;i<e;++i)r[i]=i;return 2===e&&t[0][0]===t[1][0]&&t[0][1]===t[1][1]?[0]:r}for(var a=new Array(e),i=0;i<e;++i)a[i]=i;a.sort(function(e,r){var n=t[e][0]-t[r][0];return n||t[e][1]-t[r][1]});for(var o=[a[0],a[1]],s=[a[0],a[1]],i=2;i<e;++i){for(var l=a[i],c=t[l],u=o.length;u>1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),f=0,i=0,h=o.length;i<h;++i)r[f++]=o[i];for(var p=s.length-2;p>0;--p)r[f++]=s[p];return r};var n=t(\\\"robust-orientation\\\")[3]},{\\\"robust-orientation\\\":486}],418:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return\\\"altKey\\\"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),\\\"shiftKey\\\"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),\\\"ctrlKey\\\"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),\\\"metaKey\\\"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),u=n.y(s);\\\"buttons\\\"in s&&(t=0|s.buttons),(t!==r||c!==i||u!==a||l(s))&&(r=0|t,i=c||0,a=u||0,e&&e(r,i,a,o))}function u(t){c(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function g(t){c(r&~n.buttons(t),t)}function v(){s||(s=!0,t.addEventListener(\\\"mousemove\\\",p),t.addEventListener(\\\"mousedown\\\",d),t.addEventListener(\\\"mouseup\\\",g),t.addEventListener(\\\"mouseleave\\\",u),t.addEventListener(\\\"mouseenter\\\",u),t.addEventListener(\\\"mouseout\\\",u),t.addEventListener(\\\"mouseover\\\",u),t.addEventListener(\\\"blur\\\",f),t.addEventListener(\\\"keyup\\\",h),t.addEventListener(\\\"keydown\\\",h),t.addEventListener(\\\"keypress\\\",h),t!==window&&(window.addEventListener(\\\"blur\\\",f),window.addEventListener(\\\"keyup\\\",h),window.addEventListener(\\\"keydown\\\",h),window.addEventListener(\\\"keypress\\\",h)))}v();var m={element:t};return Object.defineProperties(m,{enabled:{get:function(){return s},set:function(e){e?v():s&&(s=!1,t.removeEventListener(\\\"mousemove\\\",p),t.removeEventListener(\\\"mousedown\\\",d),t.removeEventListener(\\\"mouseup\\\",g),t.removeEventListener(\\\"mouseleave\\\",u),t.removeEventListener(\\\"mouseenter\\\",u),t.removeEventListener(\\\"mouseout\\\",u),t.removeEventListener(\\\"mouseover\\\",u),t.removeEventListener(\\\"blur\\\",f),t.removeEventListener(\\\"keyup\\\",h),t.removeEventListener(\\\"keydown\\\",h),t.removeEventListener(\\\"keypress\\\",h),t!==window&&(window.removeEventListener(\\\"blur\\\",f),window.removeEventListener(\\\"keyup\\\",h),window.removeEventListener(\\\"keydown\\\",h),window.removeEventListener(\\\"keypress\\\",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),m};var n=t(\\\"mouse-event\\\")},{\\\"mouse-event\\\":420}],419:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,a=t.clientY||0,o=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=i-o.left,r[1]=a-o.top,r}},{}],420:[function(t,e,r){\\\"use strict\\\";function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if(\\\"object\\\"==typeof t){if(\\\"buttons\\\"in t)return t.buttons;if(\\\"which\\\"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<<e-1}else if(\\\"button\\\"in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e>=0)return 1<<e}}return 0},r.element=n,r.x=function(t){if(\\\"object\\\"==typeof t){if(\\\"offsetX\\\"in t)return t.offsetX;var e=n(t).getBoundingClientRect();return t.clientX-e.left}return 0},r.y=function(t){if(\\\"object\\\"==typeof t){if(\\\"offsetY\\\"in t)return t.offsetY;var e=n(t).getBoundingClientRect();return t.clientY-e.top}return 0}},{}],421:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"to-px\\\");e.exports=function(t,e,r){\\\"function\\\"==typeof t&&(r=!!e,e=t,t=window);var i=n(\\\"ex\\\",t),a=function(t){r&&t.preventDefault();var n=t.deltaX||0,a=t.deltaY||0,o=t.deltaZ||0,s=t.deltaMode,l=1;switch(s){case 1:l=i;break;case 2:l=window.innerHeight}if(a*=l,o*=l,(n*=l)||a||o)return e(n,a,o,t)};return t.addEventListener(\\\"wheel\\\",a),a}},{\\\"to-px\\\":516}],422:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"typedarray-pool\\\");function i(t){return\\\"a\\\"+t}function a(t){return\\\"d\\\"+t}function o(t,e){return\\\"c\\\"+t+\\\"_\\\"+e}function s(t){return\\\"s\\\"+t}function l(t,e){return\\\"t\\\"+t+\\\"_\\\"+e}function c(t){return\\\"o\\\"+t}function u(t){return\\\"x\\\"+t}function f(t){return\\\"p\\\"+t}function h(t,e){return\\\"d\\\"+t+\\\"_\\\"+e}function p(t){return\\\"i\\\"+t}function d(t,e){return\\\"u\\\"+t+\\\"_\\\"+e}function g(t){return\\\"b\\\"+t}function v(t){return\\\"y\\\"+t}function m(t){return\\\"e\\\"+t}function y(t){return\\\"v\\\"+t}e.exports=function(t){function e(t){throw new Error(\\\"ndarray-extract-contour: \\\"+t)}\\\"object\\\"!=typeof t&&e(\\\"Must specify arguments\\\");var r=t.order;Array.isArray(r)||e(\\\"Must specify order\\\");var T=t.arrayArguments||1;T<1&&e(\\\"Must have at least one array argument\\\");var S=t.scalarArguments||0;S<0&&e(\\\"Scalar arg count must be > 0\\\");\\\"function\\\"!=typeof t.vertex&&e(\\\"Must specify vertex creation function\\\");\\\"function\\\"!=typeof t.cell&&e(\\\"Must specify cell creation function\\\");\\\"function\\\"!=typeof t.phase&&e(\\\"Must specify phase function\\\");for(var C=t.getters||[],E=new Array(T),L=0;L<T;++L)C.indexOf(L)>=0?E[L]=!0:E[L]=!1;return function(t,e,r,T,S,C){var E=C.length,L=S.length;if(L<2)throw new Error(\\\"ndarray-extract-contour: Dimension must be at least 2\\\");for(var z=\\\"extractContour\\\"+S.join(\\\"_\\\"),O=[],I=[],P=[],D=0;D<E;++D)P.push(i(D));for(var D=0;D<T;++D)P.push(u(D));for(var D=0;D<L;++D)I.push(s(D)+\\\"=\\\"+i(0)+\\\".shape[\\\"+D+\\\"]|0\\\");for(var D=0;D<E;++D){I.push(a(D)+\\\"=\\\"+i(D)+\\\".data\\\",c(D)+\\\"=\\\"+i(D)+\\\".offset|0\\\");for(var R=0;R<L;++R)I.push(l(D,R)+\\\"=\\\"+i(D)+\\\".stride[\\\"+R+\\\"]|0\\\")}for(var D=0;D<E;++D){I.push(f(D)+\\\"=\\\"+c(D)),I.push(o(D,0));for(var R=1;R<1<<L;++R){for(var B=[],F=0;F<L;++F)R&1<<F&&B.push(\\\"-\\\"+l(D,F));I.push(h(D,R)+\\\"=(\\\"+B.join(\\\"\\\")+\\\")|0\\\"),I.push(o(D,R)+\\\"=0\\\")}}for(var D=0;D<E;++D)for(var R=0;R<L;++R){var N=[l(D,S[R])];R>0&&N.push(l(D,S[R-1])+\\\"*\\\"+s(S[R-1])),I.push(d(D,S[R])+\\\"=(\\\"+N.join(\\\"-\\\")+\\\")|0\\\")}for(var D=0;D<L;++D)I.push(p(D)+\\\"=0\\\");I.push(_+\\\"=0\\\");for(var j=[\\\"2\\\"],D=L-2;D>=0;--D)j.push(s(S[D]));I.push(w+\\\"=(\\\"+j.join(\\\"*\\\")+\\\")|0\\\",b+\\\"=mallocUint32(\\\"+w+\\\")\\\",x+\\\"=mallocUint32(\\\"+w+\\\")\\\",k+\\\"=0\\\"),I.push(g(0)+\\\"=0\\\");for(var R=1;R<1<<L;++R){for(var V=[],U=[],F=0;F<L;++F)R&1<<F&&(0===U.length?V.push(\\\"1\\\"):V.unshift(U.join(\\\"*\\\"))),U.push(s(S[F]));var q=\\\"\\\";V[0].indexOf(s(S[L-2]))<0&&(q=\\\"-\\\");var H=A(L,R,S);I.push(m(H)+\\\"=(-\\\"+V.join(\\\"-\\\")+\\\")|0\\\",v(H)+\\\"=(\\\"+q+V.join(\\\"-\\\")+\\\")|0\\\",g(H)+\\\"=0\\\")}function G(t,e){O.push(\\\"for(\\\",p(S[t]),\\\"=\\\",e,\\\";\\\",p(S[t]),\\\"<\\\",s(S[t]),\\\";\\\",\\\"++\\\",p(S[t]),\\\"){\\\")}function W(t){for(var e=0;e<E;++e)O.push(f(e),\\\"+=\\\",d(e,S[t]),\\\";\\\");O.push(\\\"}\\\")}function Y(){for(var t=1;t<1<<L;++t)O.push(M,\\\"=\\\",m(t),\\\";\\\",m(t),\\\"=\\\",v(t),\\\";\\\",v(t),\\\"=\\\",M,\\\";\\\")}I.push(y(0)+\\\"=0\\\",M+\\\"=0\\\"),function t(e,r){if(e<0)return void function(t){for(var e=0;e<E;++e)C[e]?O.push(o(e,0),\\\"=\\\",a(e),\\\".get(\\\",f(e),\\\");\\\"):O.push(o(e,0),\\\"=\\\",a(e),\\\"[\\\",f(e),\\\"];\\\");for(var r=[],e=0;e<E;++e)r.push(o(e,0));for(var e=0;e<T;++e)r.push(u(e));O.push(g(0),\\\"=\\\",b,\\\"[\\\",k,\\\"]=phase(\\\",r.join(),\\\");\\\");for(var n=1;n<1<<L;++n)O.push(g(n),\\\"=\\\",b,\\\"[\\\",k,\\\"+\\\",m(n),\\\"];\\\");for(var i=[],n=1;n<1<<L;++n)i.push(\\\"(\\\"+g(0)+\\\"!==\\\"+g(n)+\\\")\\\");O.push(\\\"if(\\\",i.join(\\\"||\\\"),\\\"){\\\");for(var s=[],e=0;e<L;++e)s.push(p(e));for(var e=0;e<E;++e){s.push(o(e,0));for(var n=1;n<1<<L;++n)C[e]?O.push(o(e,n),\\\"=\\\",a(e),\\\".get(\\\",f(e),\\\"+\\\",h(e,n),\\\");\\\"):O.push(o(e,n),\\\"=\\\",a(e),\\\"[\\\",f(e),\\\"+\\\",h(e,n),\\\"];\\\"),s.push(o(e,n))}for(var e=0;e<1<<L;++e)s.push(g(e));for(var e=0;e<T;++e)s.push(u(e));O.push(\\\"vertex(\\\",s.join(),\\\");\\\",y(0),\\\"=\\\",x,\\\"[\\\",k,\\\"]=\\\",_,\\\"++;\\\");for(var l=(1<<L)-1,c=g(l),n=0;n<L;++n)if(0==(t&~(1<<n))){for(var d=l^1<<n,v=g(d),w=[],M=d;M>0;M=M-1&d)w.push(x+\\\"[\\\"+k+\\\"+\\\"+m(M)+\\\"]\\\");w.push(y(0));for(var M=0;M<E;++M)1&n?w.push(o(M,l),o(M,d)):w.push(o(M,d),o(M,l));1&n?w.push(c,v):w.push(v,c);for(var M=0;M<T;++M)w.push(u(M));O.push(\\\"if(\\\",c,\\\"!==\\\",v,\\\"){\\\",\\\"face(\\\",w.join(),\\\")}\\\")}O.push(\\\"}\\\",k,\\\"+=1;\\\")}(r);!function(t){for(var e=t-1;e>=0;--e)G(e,0);for(var r=[],e=0;e<E;++e)C[e]?r.push(a(e)+\\\".get(\\\"+f(e)+\\\")\\\"):r.push(a(e)+\\\"[\\\"+f(e)+\\\"]\\\");for(var e=0;e<T;++e)r.push(u(e));O.push(b,\\\"[\\\",k,\\\"++]=phase(\\\",r.join(),\\\");\\\");for(var e=0;e<t;++e)W(e);for(var n=0;n<E;++n)O.push(f(n),\\\"+=\\\",d(n,S[t]),\\\";\\\")}(e);O.push(\\\"if(\\\",s(S[e]),\\\">0){\\\",p(S[e]),\\\"=1;\\\");t(e-1,r|1<<S[e]);for(var n=0;n<E;++n)O.push(f(n),\\\"+=\\\",d(n,S[e]),\\\";\\\");e===L-1&&(O.push(k,\\\"=0;\\\"),Y());G(e,2);t(e-1,r);e===L-1&&(O.push(\\\"if(\\\",p(S[L-1]),\\\"&1){\\\",k,\\\"=0;}\\\"),Y());W(e);O.push(\\\"}\\\")}(L-1,0),O.push(\\\"freeUint32(\\\",x,\\\");freeUint32(\\\",b,\\\");\\\");var X=[\\\"'use strict';\\\",\\\"function \\\",z,\\\"(\\\",P.join(),\\\"){\\\",\\\"var \\\",I.join(),\\\";\\\",O.join(\\\"\\\"),\\\"}\\\",\\\"return \\\",z].join(\\\"\\\");return new Function(\\\"vertex\\\",\\\"face\\\",\\\"phase\\\",\\\"mallocUint32\\\",\\\"freeUint32\\\",X)(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,S,r,E)};var x=\\\"V\\\",b=\\\"P\\\",_=\\\"N\\\",w=\\\"Q\\\",k=\\\"X\\\",M=\\\"T\\\";function A(t,e,r){for(var n=0,i=0;i<t;++i)e&1<<i&&(n|=1<<r[i]);return n}},{\\\"typedarray-pool\\\":522}],423:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\"],pre:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},body:{body:\\\"{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_1_arg2_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"cwise\\\",blockSize:64});e.exports=function(t,e){return n(t,e),t}},{\\\"cwise/lib/wrapper\\\":137}],424:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error(\\\"ndarray-gradient: invalid boundary conditions\\\")}else r=n(e.dimension,\\\"string\\\"==typeof r?r:\\\"clamp\\\");if(t.dimension!==e.dimension+1)throw new Error(\\\"ndarray-gradient: output dimension must be +1 input dimension\\\");if(t.shape[e.dimension]!==e.dimension)throw new Error(\\\"ndarray-gradient: output shape must match input shape\\\");for(var i=0;i<e.dimension;++i)if(t.shape[i]!==e.shape[i])throw new Error(\\\"ndarray-gradient: shape mismatch\\\");if(0===e.size)return t;if(e.dimension<=0)return t.set(0),t;return function(t){var e=t.join();if(m=o[e])return m;var r=t.length,n=[\\\"function gradient(dst,src){var s=src.shape.slice();\\\"];function i(e){for(var i=r-e.length,a=[],o=[],s=[],l=0;l<r;++l)e.indexOf(l+1)>=0?s.push(\\\"0\\\"):e.indexOf(-(l+1))>=0?s.push(\\\"s[\\\"+l+\\\"]-1\\\"):(s.push(\\\"-1\\\"),a.push(\\\"1\\\"),o.push(\\\"s[\\\"+l+\\\"]-2\\\"));var c=\\\".lo(\\\"+a.join()+\\\").hi(\\\"+o.join()+\\\")\\\";if(0===a.length&&(c=\\\"\\\"),i>0){n.push(\\\"if(1\\\");for(var l=0;l<r;++l)e.indexOf(l+1)>=0||e.indexOf(-(l+1))>=0||n.push(\\\"&&s[\\\",l,\\\"]>2\\\");n.push(\\\"){grad\\\",i,\\\"(src.pick(\\\",s.join(),\\\")\\\",c);for(var l=0;l<r;++l)e.indexOf(l+1)>=0||e.indexOf(-(l+1))>=0||n.push(\\\",dst.pick(\\\",s.join(),\\\",\\\",l,\\\")\\\",c);n.push(\\\");\\\")}for(var l=0;l<e.length;++l){var u=Math.abs(e[l])-1,f=\\\"dst.pick(\\\"+s.join()+\\\",\\\"+u+\\\")\\\"+c;switch(t[u]){case\\\"clamp\\\":var h=s.slice(),p=s.slice();e[l]<0?h[u]=\\\"s[\\\"+u+\\\"]-2\\\":p[u]=\\\"1\\\",0===i?n.push(\\\"if(s[\\\",u,\\\"]>1){dst.set(\\\",s.join(),\\\",\\\",u,\\\",0.5*(src.get(\\\",h.join(),\\\")-src.get(\\\",p.join(),\\\")))}else{dst.set(\\\",s.join(),\\\",\\\",u,\\\",0)};\\\"):n.push(\\\"if(s[\\\",u,\\\"]>1){diff(\\\",f,\\\",src.pick(\\\",h.join(),\\\")\\\",c,\\\",src.pick(\\\",p.join(),\\\")\\\",c,\\\");}else{zero(\\\",f,\\\");};\\\");break;case\\\"mirror\\\":0===i?n.push(\\\"dst.set(\\\",s.join(),\\\",\\\",u,\\\",0);\\\"):n.push(\\\"zero(\\\",f,\\\");\\\");break;case\\\"wrap\\\":var d=s.slice(),g=s.slice();e[l]<0?(d[u]=\\\"s[\\\"+u+\\\"]-2\\\",g[u]=\\\"0\\\"):(d[u]=\\\"s[\\\"+u+\\\"]-1\\\",g[u]=\\\"1\\\"),0===i?n.push(\\\"if(s[\\\",u,\\\"]>2){dst.set(\\\",s.join(),\\\",\\\",u,\\\",0.5*(src.get(\\\",d.join(),\\\")-src.get(\\\",g.join(),\\\")))}else{dst.set(\\\",s.join(),\\\",\\\",u,\\\",0)};\\\"):n.push(\\\"if(s[\\\",u,\\\"]>2){diff(\\\",f,\\\",src.pick(\\\",d.join(),\\\")\\\",c,\\\",src.pick(\\\",g.join(),\\\")\\\",c,\\\");}else{zero(\\\",f,\\\");};\\\");break;default:throw new Error(\\\"ndarray-gradient: Invalid boundary condition\\\")}}i>0&&n.push(\\\"};\\\")}for(var s=0;s<1<<r;++s){for(var f=[],h=0;h<r;++h)s&1<<h&&f.push(h+1);for(var p=0;p<1<<f.length;++p){for(var d=f.slice(),h=0;h<f.length;++h)p&1<<h&&(d[h]=-d[h]);i(d)}}n.push(\\\"return dst;};return gradient\\\");for(var g=[\\\"diff\\\",\\\"zero\\\"],v=[l,c],s=1;s<=r;++s)g.push(\\\"grad\\\"+s),v.push(u(s));g.push(n.join(\\\"\\\"));var m=Function.apply(void 0,g).apply(void 0,v);return a[e]=m,m}(r)(t,e)};var n=t(\\\"dup\\\"),i=t(\\\"cwise-compiler\\\"),a={},o={},s={body:\\\"\\\",args:[],thisVars:[],localVars:[]},l=i({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],pre:s,post:s,body:{args:[{name:\\\"out\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"left\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"right\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"out=0.5*(left-right)\\\",thisVars:[],localVars:[]},funcName:\\\"cdiff\\\"}),c=i({args:[\\\"array\\\"],pre:s,post:s,body:{args:[{name:\\\"out\\\",lvalue:!0,rvalue:!1,count:1}],body:\\\"out=0\\\",thisVars:[],localVars:[]},funcName:\\\"zero\\\"});function u(t){if(t in a)return a[t];for(var e=[],r=0;r<t;++r)e.push(\\\"out\\\",r,\\\"s=0.5*(inp\\\",r,\\\"l-inp\\\",r,\\\"r);\\\");var o=[\\\"array\\\"],l=[\\\"junk\\\"];for(r=0;r<t;++r){o.push(\\\"array\\\"),l.push(\\\"out\\\"+r+\\\"s\\\");var c=n(t);c[r]=-1,o.push({array:0,offset:c.slice()}),c[r]=1,o.push({array:0,offset:c.slice()}),l.push(\\\"inp\\\"+r+\\\"l\\\",\\\"inp\\\"+r+\\\"r\\\")}return a[t]=i({args:o,pre:s,post:s,body:{body:e.join(\\\"\\\"),args:l.map(function(t){return{name:t,lvalue:0===t.indexOf(\\\"out\\\"),rvalue:0===t.indexOf(\\\"inp\\\"),count:\\\"junk\\\"!==t|0}}),thisVars:[],localVars:[]},funcName:\\\"fdTemplate\\\"+t})}},{\\\"cwise-compiler\\\":134,dup:155}],425:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"ndarray-warp\\\"),i=t(\\\"gl-matrix-invert\\\");e.exports=function(t,e,r){var a=e.dimension,o=i([],r);return n(t,e,function(t,e){for(var r=0;r<a;++r){t[r]=o[(a+1)*a+r];for(var n=0;n<a;++n)t[r]+=o[(a+1)*n+r]*e[n]}var i=o[(a+1)*(a+1)-1];for(n=0;n<a;++n)i+=o[(a+1)*n+a]*e[n];var s=1/i;for(r=0;r<a;++r)t[r]*=s;return t}),t}},{\\\"gl-matrix-invert\\\":265,\\\"ndarray-warp\\\":432}],426:[function(t,e,r){\\\"use strict\\\";function n(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r<t.shape[0],a=0<=r+1&&r+1<t.shape[0];return(1-n)*(i?+t.get(r):0)+n*(a?+t.get(r+1):0)}function i(t,e,r){var n=Math.floor(e),i=e-n,a=0<=n&&n<t.shape[0],o=0<=n+1&&n+1<t.shape[0],s=Math.floor(r),l=r-s,c=0<=s&&s<t.shape[1],u=0<=s+1&&s+1<t.shape[1],f=a&&c?t.get(n,s):0,h=a&&u?t.get(n,s+1):0;return(1-l)*((1-i)*f+i*(o&&c?t.get(n+1,s):0))+l*((1-i)*h+i*(o&&u?t.get(n+1,s+1):0))}function a(t,e,r,n){var i=Math.floor(e),a=e-i,o=0<=i&&i<t.shape[0],s=0<=i+1&&i+1<t.shape[0],l=Math.floor(r),c=r-l,u=0<=l&&l<t.shape[1],f=0<=l+1&&l+1<t.shape[1],h=Math.floor(n),p=n-h,d=0<=h&&h<t.shape[2],g=0<=h+1&&h+1<t.shape[2],v=o&&u&&d?t.get(i,l,h):0,m=o&&f&&d?t.get(i,l+1,h):0,y=s&&u&&d?t.get(i+1,l,h):0,x=s&&f&&d?t.get(i+1,l+1,h):0,b=o&&u&&g?t.get(i,l,h+1):0,_=o&&f&&g?t.get(i,l+1,h+1):0;return(1-p)*((1-c)*((1-a)*v+a*y)+c*((1-a)*m+a*x))+p*((1-c)*((1-a)*b+a*(s&&u&&g?t.get(i+1,l,h+1):0))+c*((1-a)*_+a*(s&&f&&g?t.get(i+1,l+1,h+1):0)))}e.exports=function(t,e,r,o){switch(t.shape.length){case 0:return 0;case 1:return n(t,e);case 2:return i(t,e,r);case 3:return a(t,e,r,o);default:return function(t){var e,r,n=0|t.shape.length,i=new Array(n),a=new Array(n),o=new Array(n),s=new Array(n);for(e=0;e<n;++e)r=+arguments[e+1],i[e]=Math.floor(r),a[e]=r-i[e],o[e]=0<=i[e]&&i[e]<t.shape[e],s[e]=0<=i[e]+1&&i[e]+1<t.shape[e];var l,c,u,f=0;t:for(e=0;e<1<<n;++e){for(c=1,u=t.offset,l=0;l<n;++l)if(e&1<<l){if(!s[l])continue t;c*=a[l],u+=t.stride[l]*(i[l]+1)}else{if(!o[l])continue t;c*=1-a[l],u+=t.stride[l]*i[l]}f+=c*t.data[u]}return f}.apply(void 0,arguments)}},e.exports.d1=n,e.exports.d2=i,e.exports.d3=a},{}],427:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"cwise-compiler\\\"),i={body:\\\"\\\",args:[],thisVars:[],localVars:[]};function a(t){if(!t)return i;for(var e=0;e<t.args.length;++e){var r=t.args[e];t.args[e]=0===e?{name:r,lvalue:!0,rvalue:!!t.rvalue,count:t.count||1}:{name:r,lvalue:!1,rvalue:!0,count:1}}return t.thisVars||(t.thisVars=[]),t.localVars||(t.localVars=[]),t}function o(t){for(var e=[],r=0;r<t.args.length;++r)e.push(\\\"a\\\"+r);return new Function(\\\"P\\\",[\\\"return function \\\",t.funcName,\\\"_ndarrayops(\\\",e.join(\\\",\\\"),\\\") {P(\\\",e.join(\\\",\\\"),\\\");return a0}\\\"].join(\\\"\\\"))(function(t){return n({args:t.args,pre:a(t.pre),body:a(t.body),post:a(t.proc),funcName:t.funcName})}(t))}var s={add:\\\"+\\\",sub:\\\"-\\\",mul:\\\"*\\\",div:\\\"/\\\",mod:\\\"%\\\",band:\\\"&\\\",bor:\\\"|\\\",bxor:\\\"^\\\",lshift:\\\"<<\\\",rshift:\\\">>\\\",rrshift:\\\">>>\\\"};!function(){for(var t in s){var e=s[t];r[t]=o({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=b\\\"+e+\\\"c\\\"},funcName:t}),r[t+\\\"eq\\\"]=o({args:[\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a\\\"+e+\\\"=b\\\"},rvalue:!0,funcName:t+\\\"eq\\\"}),r[t+\\\"s\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"b\\\",\\\"s\\\"],body:\\\"a=b\\\"+e+\\\"s\\\"},funcName:t+\\\"s\\\"}),r[t+\\\"seq\\\"]=o({args:[\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"s\\\"],body:\\\"a\\\"+e+\\\"=s\\\"},rvalue:!0,funcName:t+\\\"seq\\\"})}}();var l={not:\\\"!\\\",bnot:\\\"~\\\",neg:\\\"-\\\",recip:\\\"1.0/\\\"};!function(){for(var t in l){var e=l[t];r[t]=o({args:[\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=\\\"+e+\\\"b\\\"},funcName:t}),r[t+\\\"eq\\\"]=o({args:[\\\"array\\\"],body:{args:[\\\"a\\\"],body:\\\"a=\\\"+e+\\\"a\\\"},rvalue:!0,count:2,funcName:t+\\\"eq\\\"})}}();var c={and:\\\"&&\\\",or:\\\"||\\\",eq:\\\"===\\\",neq:\\\"!==\\\",lt:\\\"<\\\",gt:\\\">\\\",leq:\\\"<=\\\",geq:\\\">=\\\"};!function(){for(var t in c){var e=c[t];r[t]=o({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=b\\\"+e+\\\"c\\\"},funcName:t}),r[t+\\\"s\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"b\\\",\\\"s\\\"],body:\\\"a=b\\\"+e+\\\"s\\\"},funcName:t+\\\"s\\\"}),r[t+\\\"eq\\\"]=o({args:[\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=a\\\"+e+\\\"b\\\"},rvalue:!0,count:2,funcName:t+\\\"eq\\\"}),r[t+\\\"seq\\\"]=o({args:[\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"s\\\"],body:\\\"a=a\\\"+e+\\\"s\\\"},rvalue:!0,count:2,funcName:t+\\\"seq\\\"})}}();var u=[\\\"abs\\\",\\\"acos\\\",\\\"asin\\\",\\\"atan\\\",\\\"ceil\\\",\\\"cos\\\",\\\"exp\\\",\\\"floor\\\",\\\"log\\\",\\\"round\\\",\\\"sin\\\",\\\"sqrt\\\",\\\"tan\\\"];!function(){for(var t=0;t<u.length;++t){var e=u[t];r[e]=o({args:[\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(b)\\\",thisVars:[\\\"this_f\\\"]},funcName:e}),r[e+\\\"eq\\\"]=o({args:[\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\"],body:\\\"a=this_f(a)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"eq\\\"})}}();var f=[\\\"max\\\",\\\"min\\\",\\\"atan2\\\",\\\"pow\\\"];!function(){for(var t=0;t<f.length;++t){var e=f[t];r[e]=o({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=this_f(b,c)\\\",thisVars:[\\\"this_f\\\"]},funcName:e}),r[e+\\\"s\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"scalar\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=this_f(b,c)\\\",thisVars:[\\\"this_f\\\"]},funcName:e+\\\"s\\\"}),r[e+\\\"eq\\\"]=o({args:[\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(a,b)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"eq\\\"}),r[e+\\\"seq\\\"]=o({args:[\\\"array\\\",\\\"scalar\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(a,b)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"seq\\\"})}}();var h=[\\\"atan2\\\",\\\"pow\\\"];!function(){for(var t=0;t<h.length;++t){var e=h[t];r[e+\\\"op\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=this_f(c,b)\\\",thisVars:[\\\"this_f\\\"]},funcName:e+\\\"op\\\"}),r[e+\\\"ops\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"scalar\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=this_f(c,b)\\\",thisVars:[\\\"this_f\\\"]},funcName:e+\\\"ops\\\"}),r[e+\\\"opeq\\\"]=o({args:[\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(b,a)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"opeq\\\"}),r[e+\\\"opseq\\\"]=o({args:[\\\"array\\\",\\\"scalar\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(b,a)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"opseq\\\"})}}(),r.any=n({args:[\\\"array\\\"],pre:i,body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"if(a){return true}\\\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\\\"return false\\\"},funcName:\\\"any\\\"}),r.all=n({args:[\\\"array\\\"],pre:i,body:{args:[{name:\\\"x\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"if(!x){return false}\\\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\\\"return true\\\"},funcName:\\\"all\\\"}),r.sum=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"this_s+=a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"sum\\\"}),r.prod=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=1\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"this_s*=a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"prod\\\"}),r.norm2squared=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:2}],body:\\\"this_s+=a*a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"norm2squared\\\"}),r.norm2=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:2}],body:\\\"this_s+=a*a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return Math.sqrt(this_s)\\\"},funcName:\\\"norm2\\\"}),r.norminf=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:4}],body:\\\"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"norminf\\\"}),r.norm1=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:3}],body:\\\"this_s+=a<0?-a:a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"norm1\\\"}),r.sup=n({args:[\\\"array\\\"],pre:{body:\\\"this_h=-Infinity\\\",args:[],thisVars:[\\\"this_h\\\"],localVars:[]},body:{body:\\\"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:2}],thisVars:[\\\"this_h\\\"],localVars:[]},post:{body:\\\"return this_h\\\",args:[],thisVars:[\\\"this_h\\\"],localVars:[]}}),r.inf=n({args:[\\\"array\\\"],pre:{body:\\\"this_h=Infinity\\\",args:[],thisVars:[\\\"this_h\\\"],localVars:[]},body:{body:\\\"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:2}],thisVars:[\\\"this_h\\\"],localVars:[]},post:{body:\\\"return this_h\\\",args:[],thisVars:[\\\"this_h\\\"],localVars:[]}}),r.argmin=n({args:[\\\"index\\\",\\\"array\\\",\\\"shape\\\"],pre:{body:\\\"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}\\\",args:[{name:\\\"_inline_0_arg0_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_0_arg1_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_0_arg2_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_i\\\",\\\"this_v\\\"],localVars:[]},body:{body:\\\"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:2},{name:\\\"_inline_1_arg1_\\\",lvalue:!1,rvalue:!0,count:2}],thisVars:[\\\"this_i\\\",\\\"this_v\\\"],localVars:[\\\"_inline_1_k\\\"]},post:{body:\\\"{return this_i}\\\",args:[],thisVars:[\\\"this_i\\\"],localVars:[]}}),r.argmax=n({args:[\\\"index\\\",\\\"array\\\",\\\"shape\\\"],pre:{body:\\\"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}\\\",args:[{name:\\\"_inline_0_arg0_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_0_arg1_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_0_arg2_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_i\\\",\\\"this_v\\\"],localVars:[]},body:{body:\\\"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:2},{name:\\\"_inline_1_arg1_\\\",lvalue:!1,rvalue:!0,count:2}],thisVars:[\\\"this_i\\\",\\\"this_v\\\"],localVars:[\\\"_inline_1_k\\\"]},post:{body:\\\"{return this_i}\\\",args:[],thisVars:[\\\"this_i\\\"],localVars:[]}}),r.random=o({args:[\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.random\\\",thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\"],body:\\\"a=this_f()\\\",thisVars:[\\\"this_f\\\"]},funcName:\\\"random\\\"}),r.assign=o({args:[\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=b\\\"},funcName:\\\"assign\\\"}),r.assigns=o({args:[\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=b\\\"},funcName:\\\"assigns\\\"}),r.equals=n({args:[\\\"array\\\",\\\"array\\\"],pre:i,body:{args:[{name:\\\"x\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"y\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"if(x!==y){return false}\\\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\\\"return true\\\"},funcName:\\\"equals\\\"})},{\\\"cwise-compiler\\\":134}],428:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"ndarray\\\"),i=t(\\\"./doConvert.js\\\");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{\\\"./doConvert.js\\\":429,ndarray:433}],429:[function(t,e,r){e.exports=t(\\\"cwise-compiler\\\")({args:[\\\"array\\\",\\\"scalar\\\",\\\"index\\\"],pre:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},body:{body:\\\"{\\\\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\\\\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\\\\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\\\\n}\\\\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\\\\n}\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_1_arg1_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg2_\\\",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:[\\\"_inline_1_i\\\",\\\"_inline_1_v\\\"]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},funcName:\\\"convert\\\",blockSize:64})},{\\\"cwise-compiler\\\":134}],430:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"typedarray-pool\\\"),i=32;function a(t){switch(t){case\\\"uint8\\\":return[n.mallocUint8,n.freeUint8];case\\\"uint16\\\":return[n.mallocUint16,n.freeUint16];case\\\"uint32\\\":return[n.mallocUint32,n.freeUint32];case\\\"int8\\\":return[n.mallocInt8,n.freeInt8];case\\\"int16\\\":return[n.mallocInt16,n.freeInt16];case\\\"int32\\\":return[n.mallocInt32,n.freeInt32];case\\\"float32\\\":return[n.mallocFloat,n.freeFloat];case\\\"float64\\\":return[n.mallocDouble,n.freeDouble];default:return null}}function o(t){for(var e=[],r=0;r<t;++r)e.push(\\\"s\\\"+r);for(r=0;r<t;++r)e.push(\\\"n\\\"+r);for(r=1;r<t;++r)e.push(\\\"d\\\"+r);for(r=1;r<t;++r)e.push(\\\"e\\\"+r);for(r=1;r<t;++r)e.push(\\\"f\\\"+r);return e}e.exports=function(t,e){var r=[\\\"'use strict'\\\"],n=[\\\"ndarraySortWrapper\\\",t.join(\\\"d\\\"),e].join(\\\"\\\");r.push([\\\"function \\\",n,\\\"(\\\",[\\\"array\\\"].join(\\\",\\\"),\\\"){\\\"].join(\\\"\\\"));for(var s=[\\\"data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride\\\"],l=0;l<t.length;++l)s.push([\\\"s\\\",l,\\\"=stride[\\\",l,\\\"]|0,n\\\",l,\\\"=shape[\\\",l,\\\"]|0\\\"].join(\\\"\\\"));var c=new Array(t.length),u=[];for(l=0;l<t.length;++l)0!==(p=t[l])&&(0===u.length?c[p]=\\\"1\\\":c[p]=u.join(\\\"*\\\"),u.push(\\\"n\\\"+p));var f=-1,h=-1;for(l=0;l<t.length;++l){var p,d=t[l];0!==d&&(f>0?s.push([\\\"d\\\",d,\\\"=s\\\",d,\\\"-d\\\",f,\\\"*n\\\",f].join(\\\"\\\")):s.push([\\\"d\\\",d,\\\"=s\\\",d].join(\\\"\\\")),f=d),0!=(p=t.length-1-l)&&(h>0?s.push([\\\"e\\\",p,\\\"=s\\\",p,\\\"-e\\\",h,\\\"*n\\\",h,\\\",f\\\",p,\\\"=\\\",c[p],\\\"-f\\\",h,\\\"*n\\\",h].join(\\\"\\\")):s.push([\\\"e\\\",p,\\\"=s\\\",p,\\\",f\\\",p,\\\"=\\\",c[p]].join(\\\"\\\")),h=p)}r.push(\\\"var \\\"+s.join(\\\",\\\"));var g=[\\\"0\\\",\\\"n0-1\\\",\\\"data\\\",\\\"offset\\\"].concat(o(t.length));r.push([\\\"if(n0<=\\\",i,\\\"){\\\",\\\"insertionSort(\\\",g.join(\\\",\\\"),\\\")}else{\\\",\\\"quickSort(\\\",g.join(\\\",\\\"),\\\")}\\\"].join(\\\"\\\")),r.push(\\\"}return \\\"+n);var v=new Function(\\\"insertionSort\\\",\\\"quickSort\\\",r.join(\\\"\\\\n\\\")),m=function(t,e){var r=[\\\"'use strict'\\\"],n=[\\\"ndarrayInsertionSort\\\",t.join(\\\"d\\\"),e].join(\\\"\\\"),i=[\\\"left\\\",\\\"right\\\",\\\"data\\\",\\\"offset\\\"].concat(o(t.length)),s=a(e),l=[\\\"i,j,cptr,ptr=left*s0+offset\\\"];if(t.length>1){for(var c=[],u=1;u<t.length;++u)l.push(\\\"i\\\"+u),c.push(\\\"n\\\"+u);s?l.push(\\\"scratch=malloc(\\\"+c.join(\\\"*\\\")+\\\")\\\"):l.push(\\\"scratch=new Array(\\\"+c.join(\\\"*\\\")+\\\")\\\"),l.push(\\\"dptr\\\",\\\"sptr\\\",\\\"a\\\",\\\"b\\\")}else l.push(\\\"scratch\\\");function f(t){return\\\"generic\\\"===e?[\\\"data.get(\\\",t,\\\")\\\"].join(\\\"\\\"):[\\\"data[\\\",t,\\\"]\\\"].join(\\\"\\\")}function h(t,r){return\\\"generic\\\"===e?[\\\"data.set(\\\",t,\\\",\\\",r,\\\")\\\"].join(\\\"\\\"):[\\\"data[\\\",t,\\\"]=\\\",r].join(\\\"\\\")}if(r.push([\\\"function \\\",n,\\\"(\\\",i.join(\\\",\\\"),\\\"){var \\\",l.join(\\\",\\\")].join(\\\"\\\"),\\\"for(i=left+1;i<=right;++i){\\\",\\\"j=i;ptr+=s0\\\",\\\"cptr=ptr\\\"),t.length>1){for(r.push(\\\"dptr=0;sptr=ptr\\\"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push([\\\"for(i\\\",p,\\\"=0;i\\\",p,\\\"<n\\\",p,\\\";++i\\\",p,\\\"){\\\"].join(\\\"\\\"));for(r.push(\\\"scratch[dptr++]=\\\",f(\\\"sptr\\\")),u=0;u<t.length;++u)0!==(p=t[u])&&r.push(\\\"sptr+=d\\\"+p,\\\"}\\\");for(r.push(\\\"__g:while(j--\\\\x3eleft){\\\",\\\"dptr=0\\\",\\\"sptr=cptr-s0\\\"),u=1;u<t.length;++u)1===u&&r.push(\\\"__l:\\\"),r.push([\\\"for(i\\\",u,\\\"=0;i\\\",u,\\\"<n\\\",u,\\\";++i\\\",u,\\\"){\\\"].join(\\\"\\\"));for(r.push([\\\"a=\\\",f(\\\"sptr\\\"),\\\"\\\\nb=scratch[dptr]\\\\nif(a<b){break __g}\\\\nif(a>b){break __l}\\\"].join(\\\"\\\")),u=t.length-1;u>=1;--u)r.push(\\\"sptr+=e\\\"+u,\\\"dptr+=f\\\"+u,\\\"}\\\");for(r.push(\\\"dptr=cptr;sptr=cptr-s0\\\"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push([\\\"for(i\\\",p,\\\"=0;i\\\",p,\\\"<n\\\",p,\\\";++i\\\",p,\\\"){\\\"].join(\\\"\\\"));for(r.push(h(\\\"dptr\\\",f(\\\"sptr\\\"))),u=0;u<t.length;++u)0!==(p=t[u])&&r.push([\\\"dptr+=d\\\",p,\\\";sptr+=d\\\",p].join(\\\"\\\"),\\\"}\\\");for(r.push(\\\"cptr-=s0\\\\n}\\\"),r.push(\\\"dptr=cptr;sptr=0\\\"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push([\\\"for(i\\\",p,\\\"=0;i\\\",p,\\\"<n\\\",p,\\\";++i\\\",p,\\\"){\\\"].join(\\\"\\\"));for(r.push(h(\\\"dptr\\\",\\\"scratch[sptr++]\\\")),u=0;u<t.length;++u){var p;0!==(p=t[u])&&r.push(\\\"dptr+=d\\\"+p,\\\"}\\\")}}else r.push(\\\"scratch=\\\"+f(\\\"ptr\\\"),\\\"while((j--\\\\x3eleft)&&(\\\"+f(\\\"cptr-s0\\\")+\\\">scratch)){\\\",h(\\\"cptr\\\",f(\\\"cptr-s0\\\")),\\\"cptr-=s0\\\",\\\"}\\\",h(\\\"cptr\\\",\\\"scratch\\\"));return r.push(\\\"}\\\"),t.length>1&&s&&r.push(\\\"free(scratch)\\\"),r.push(\\\"} return \\\"+n),s?new Function(\\\"malloc\\\",\\\"free\\\",r.join(\\\"\\\\n\\\"))(s[0],s[1]):new Function(r.join(\\\"\\\\n\\\"))()}(t,e),y=function(t,e,r){var n=[\\\"'use strict'\\\"],s=[\\\"ndarrayQuickSort\\\",t.join(\\\"d\\\"),e].join(\\\"\\\"),l=[\\\"left\\\",\\\"right\\\",\\\"data\\\",\\\"offset\\\"].concat(o(t.length)),c=a(e),u=0;n.push([\\\"function \\\",s,\\\"(\\\",l.join(\\\",\\\"),\\\"){\\\"].join(\\\"\\\"));var f=[\\\"sixth=((right-left+1)/6)|0\\\",\\\"index1=left+sixth\\\",\\\"index5=right-sixth\\\",\\\"index3=(left+right)>>1\\\",\\\"index2=index3-sixth\\\",\\\"index4=index3+sixth\\\",\\\"el1=index1\\\",\\\"el2=index2\\\",\\\"el3=index3\\\",\\\"el4=index4\\\",\\\"el5=index5\\\",\\\"less=left+1\\\",\\\"great=right-1\\\",\\\"pivots_are_equal=true\\\",\\\"tmp\\\",\\\"tmp0\\\",\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"k\\\",\\\"ptr0\\\",\\\"ptr1\\\",\\\"ptr2\\\",\\\"comp_pivot1=0\\\",\\\"comp_pivot2=0\\\",\\\"comp=0\\\"];if(t.length>1){for(var h=[],p=1;p<t.length;++p)h.push(\\\"n\\\"+p),f.push(\\\"i\\\"+p);for(p=0;p<8;++p)f.push(\\\"b_ptr\\\"+p);f.push(\\\"ptr3\\\",\\\"ptr4\\\",\\\"ptr5\\\",\\\"ptr6\\\",\\\"ptr7\\\",\\\"pivot_ptr\\\",\\\"ptr_shift\\\",\\\"elementSize=\\\"+h.join(\\\"*\\\")),c?f.push(\\\"pivot1=malloc(elementSize)\\\",\\\"pivot2=malloc(elementSize)\\\"):f.push(\\\"pivot1=new Array(elementSize),pivot2=new Array(elementSize)\\\")}else f.push(\\\"pivot1\\\",\\\"pivot2\\\");function d(t){return[\\\"(offset+\\\",t,\\\"*s0)\\\"].join(\\\"\\\")}function g(t){return\\\"generic\\\"===e?[\\\"data.get(\\\",t,\\\")\\\"].join(\\\"\\\"):[\\\"data[\\\",t,\\\"]\\\"].join(\\\"\\\")}function v(t,r){return\\\"generic\\\"===e?[\\\"data.set(\\\",t,\\\",\\\",r,\\\")\\\"].join(\\\"\\\"):[\\\"data[\\\",t,\\\"]=\\\",r].join(\\\"\\\")}function m(e,r,i){if(1===e.length)n.push(\\\"ptr0=\\\"+d(e[0]));else for(var a=0;a<e.length;++a)n.push([\\\"b_ptr\\\",a,\\\"=s0*\\\",e[a]].join(\\\"\\\"));for(r&&n.push(\\\"pivot_ptr=0\\\"),n.push(\\\"ptr_shift=offset\\\"),a=t.length-1;a>=0;--a)0!==(o=t[a])&&n.push([\\\"for(i\\\",o,\\\"=0;i\\\",o,\\\"<n\\\",o,\\\";++i\\\",o,\\\"){\\\"].join(\\\"\\\"));if(e.length>1)for(a=0;a<e.length;++a)n.push([\\\"ptr\\\",a,\\\"=b_ptr\\\",a,\\\"+ptr_shift\\\"].join(\\\"\\\"));for(n.push(i),r&&n.push(\\\"++pivot_ptr\\\"),a=0;a<t.length;++a){var o;0!==(o=t[a])&&(e.length>1?n.push(\\\"ptr_shift+=d\\\"+o):n.push(\\\"ptr0+=d\\\"+o),n.push(\\\"}\\\"))}}function y(e,r,i,a){if(1===r.length)n.push(\\\"ptr0=\\\"+d(r[0]));else{for(var o=0;o<r.length;++o)n.push([\\\"b_ptr\\\",o,\\\"=s0*\\\",r[o]].join(\\\"\\\"));n.push(\\\"ptr_shift=offset\\\")}for(i&&n.push(\\\"pivot_ptr=0\\\"),e&&n.push(e+\\\":\\\"),o=1;o<t.length;++o)n.push([\\\"for(i\\\",o,\\\"=0;i\\\",o,\\\"<n\\\",o,\\\";++i\\\",o,\\\"){\\\"].join(\\\"\\\"));if(r.length>1)for(o=0;o<r.length;++o)n.push([\\\"ptr\\\",o,\\\"=b_ptr\\\",o,\\\"+ptr_shift\\\"].join(\\\"\\\"));for(n.push(a),o=t.length-1;o>=1;--o)i&&n.push(\\\"pivot_ptr+=f\\\"+o),r.length>1?n.push(\\\"ptr_shift+=e\\\"+o):n.push(\\\"ptr0+=e\\\"+o),n.push(\\\"}\\\")}function x(){t.length>1&&c&&n.push(\\\"free(pivot1)\\\",\\\"free(pivot2)\\\")}function b(e,r){var i=\\\"el\\\"+e,a=\\\"el\\\"+r;if(t.length>1){var o=\\\"__l\\\"+ ++u;y(o,[i,a],!1,[\\\"comp=\\\",g(\\\"ptr0\\\"),\\\"-\\\",g(\\\"ptr1\\\"),\\\"\\\\n\\\",\\\"if(comp>0){tmp0=\\\",i,\\\";\\\",i,\\\"=\\\",a,\\\";\\\",a,\\\"=tmp0;break \\\",o,\\\"}\\\\n\\\",\\\"if(comp<0){break \\\",o,\\\"}\\\"].join(\\\"\\\"))}else n.push([\\\"if(\\\",g(d(i)),\\\">\\\",g(d(a)),\\\"){tmp0=\\\",i,\\\";\\\",i,\\\"=\\\",a,\\\";\\\",a,\\\"=tmp0}\\\"].join(\\\"\\\"))}function _(e,r){t.length>1?m([e,r],!1,v(\\\"ptr0\\\",g(\\\"ptr1\\\"))):n.push(v(d(e),g(d(r))))}function w(e,r,i){if(t.length>1){var a=\\\"__l\\\"+ ++u;y(a,[r],!0,[e,\\\"=\\\",g(\\\"ptr0\\\"),\\\"-pivot\\\",i,\\\"[pivot_ptr]\\\\n\\\",\\\"if(\\\",e,\\\"!==0){break \\\",a,\\\"}\\\"].join(\\\"\\\"))}else n.push([e,\\\"=\\\",g(d(r)),\\\"-pivot\\\",i].join(\\\"\\\"))}function k(e,r){t.length>1?m([e,r],!1,[\\\"tmp=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",\\\"tmp\\\")].join(\\\"\\\")):n.push([\\\"ptr0=\\\",d(e),\\\"\\\\n\\\",\\\"ptr1=\\\",d(r),\\\"\\\\n\\\",\\\"tmp=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",\\\"tmp\\\")].join(\\\"\\\"))}function M(e,r,i){t.length>1?(m([e,r,i],!1,[\\\"tmp=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",g(\\\"ptr2\\\")),\\\"\\\\n\\\",v(\\\"ptr2\\\",\\\"tmp\\\")].join(\\\"\\\")),n.push(\\\"++\\\"+r,\\\"--\\\"+i)):n.push([\\\"ptr0=\\\",d(e),\\\"\\\\n\\\",\\\"ptr1=\\\",d(r),\\\"\\\\n\\\",\\\"ptr2=\\\",d(i),\\\"\\\\n\\\",\\\"++\\\",r,\\\"\\\\n\\\",\\\"--\\\",i,\\\"\\\\n\\\",\\\"tmp=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",g(\\\"ptr2\\\")),\\\"\\\\n\\\",v(\\\"ptr2\\\",\\\"tmp\\\")].join(\\\"\\\"))}function A(t,e){k(t,e),n.push(\\\"--\\\"+e)}function T(e,r,i){t.length>1?m([e,r],!0,[v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",[\\\"pivot\\\",i,\\\"[pivot_ptr]\\\"].join(\\\"\\\"))].join(\\\"\\\")):n.push(v(d(e),g(d(r))),v(d(r),\\\"pivot\\\"+i))}function S(e,r){n.push([\\\"if((\\\",r,\\\"-\\\",e,\\\")<=\\\",i,\\\"){\\\\n\\\",\\\"insertionSort(\\\",e,\\\",\\\",r,\\\",data,offset,\\\",o(t.length).join(\\\",\\\"),\\\")\\\\n\\\",\\\"}else{\\\\n\\\",s,\\\"(\\\",e,\\\",\\\",r,\\\",data,offset,\\\",o(t.length).join(\\\",\\\"),\\\")\\\\n\\\",\\\"}\\\"].join(\\\"\\\"))}function C(e,r,i){t.length>1?(n.push([\\\"__l\\\",++u,\\\":while(true){\\\"].join(\\\"\\\")),m([e],!0,[\\\"if(\\\",g(\\\"ptr0\\\"),\\\"!==pivot\\\",r,\\\"[pivot_ptr]){break __l\\\",u,\\\"}\\\"].join(\\\"\\\")),n.push(i,\\\"}\\\")):n.push([\\\"while(\\\",g(d(e)),\\\"===pivot\\\",r,\\\"){\\\",i,\\\"}\\\"].join(\\\"\\\"))}return n.push(\\\"var \\\"+f.join(\\\",\\\")),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),t.length>1?m([\\\"el1\\\",\\\"el2\\\",\\\"el3\\\",\\\"el4\\\",\\\"el5\\\",\\\"index1\\\",\\\"index3\\\",\\\"index5\\\"],!0,[\\\"pivot1[pivot_ptr]=\\\",g(\\\"ptr1\\\"),\\\"\\\\n\\\",\\\"pivot2[pivot_ptr]=\\\",g(\\\"ptr3\\\"),\\\"\\\\n\\\",\\\"pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\\\\n\\\",\\\"x=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",\\\"y=\\\",g(\\\"ptr2\\\"),\\\"\\\\n\\\",\\\"z=\\\",g(\\\"ptr4\\\"),\\\"\\\\n\\\",v(\\\"ptr5\\\",\\\"x\\\"),\\\"\\\\n\\\",v(\\\"ptr6\\\",\\\"y\\\"),\\\"\\\\n\\\",v(\\\"ptr7\\\",\\\"z\\\")].join(\\\"\\\")):n.push([\\\"pivot1=\\\",g(d(\\\"el2\\\")),\\\"\\\\n\\\",\\\"pivot2=\\\",g(d(\\\"el4\\\")),\\\"\\\\n\\\",\\\"pivots_are_equal=pivot1===pivot2\\\\n\\\",\\\"x=\\\",g(d(\\\"el1\\\")),\\\"\\\\n\\\",\\\"y=\\\",g(d(\\\"el3\\\")),\\\"\\\\n\\\",\\\"z=\\\",g(d(\\\"el5\\\")),\\\"\\\\n\\\",v(d(\\\"index1\\\"),\\\"x\\\"),\\\"\\\\n\\\",v(d(\\\"index3\\\"),\\\"y\\\"),\\\"\\\\n\\\",v(d(\\\"index5\\\"),\\\"z\\\")].join(\\\"\\\")),_(\\\"index2\\\",\\\"left\\\"),_(\\\"index4\\\",\\\"right\\\"),n.push(\\\"if(pivots_are_equal){\\\"),n.push(\\\"for(k=less;k<=great;++k){\\\"),w(\\\"comp\\\",\\\"k\\\",1),n.push(\\\"if(comp===0){continue}\\\"),n.push(\\\"if(comp<0){\\\"),n.push(\\\"if(k!==less){\\\"),k(\\\"k\\\",\\\"less\\\"),n.push(\\\"}\\\"),n.push(\\\"++less\\\"),n.push(\\\"}else{\\\"),n.push(\\\"while(true){\\\"),w(\\\"comp\\\",\\\"great\\\",1),n.push(\\\"if(comp>0){\\\"),n.push(\\\"great--\\\"),n.push(\\\"}else if(comp<0){\\\"),M(\\\"k\\\",\\\"less\\\",\\\"great\\\"),n.push(\\\"break\\\"),n.push(\\\"}else{\\\"),A(\\\"k\\\",\\\"great\\\"),n.push(\\\"break\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}else{\\\"),n.push(\\\"for(k=less;k<=great;++k){\\\"),w(\\\"comp_pivot1\\\",\\\"k\\\",1),n.push(\\\"if(comp_pivot1<0){\\\"),n.push(\\\"if(k!==less){\\\"),k(\\\"k\\\",\\\"less\\\"),n.push(\\\"}\\\"),n.push(\\\"++less\\\"),n.push(\\\"}else{\\\"),w(\\\"comp_pivot2\\\",\\\"k\\\",2),n.push(\\\"if(comp_pivot2>0){\\\"),n.push(\\\"while(true){\\\"),w(\\\"comp\\\",\\\"great\\\",2),n.push(\\\"if(comp>0){\\\"),n.push(\\\"if(--great<k){break}\\\"),n.push(\\\"continue\\\"),n.push(\\\"}else{\\\"),w(\\\"comp\\\",\\\"great\\\",1),n.push(\\\"if(comp<0){\\\"),M(\\\"k\\\",\\\"less\\\",\\\"great\\\"),n.push(\\\"}else{\\\"),A(\\\"k\\\",\\\"great\\\"),n.push(\\\"}\\\"),n.push(\\\"break\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),T(\\\"left\\\",\\\"(less-1)\\\",1),T(\\\"right\\\",\\\"(great+1)\\\",2),S(\\\"left\\\",\\\"(less-2)\\\"),S(\\\"(great+2)\\\",\\\"right\\\"),n.push(\\\"if(pivots_are_equal){\\\"),x(),n.push(\\\"return\\\"),n.push(\\\"}\\\"),n.push(\\\"if(less<index1&&great>index5){\\\"),C(\\\"less\\\",1,\\\"++less\\\"),C(\\\"great\\\",2,\\\"--great\\\"),n.push(\\\"for(k=less;k<=great;++k){\\\"),w(\\\"comp_pivot1\\\",\\\"k\\\",1),n.push(\\\"if(comp_pivot1===0){\\\"),n.push(\\\"if(k!==less){\\\"),k(\\\"k\\\",\\\"less\\\"),n.push(\\\"}\\\"),n.push(\\\"++less\\\"),n.push(\\\"}else{\\\"),w(\\\"comp_pivot2\\\",\\\"k\\\",2),n.push(\\\"if(comp_pivot2===0){\\\"),n.push(\\\"while(true){\\\"),w(\\\"comp\\\",\\\"great\\\",2),n.push(\\\"if(comp===0){\\\"),n.push(\\\"if(--great<k){break}\\\"),n.push(\\\"continue\\\"),n.push(\\\"}else{\\\"),w(\\\"comp\\\",\\\"great\\\",1),n.push(\\\"if(comp<0){\\\"),M(\\\"k\\\",\\\"less\\\",\\\"great\\\"),n.push(\\\"}else{\\\"),A(\\\"k\\\",\\\"great\\\"),n.push(\\\"}\\\"),n.push(\\\"break\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),x(),S(\\\"less\\\",\\\"great\\\"),n.push(\\\"}return \\\"+s),t.length>1&&c?new Function(\\\"insertionSort\\\",\\\"malloc\\\",\\\"free\\\",n.join(\\\"\\\\n\\\"))(r,c[0],c[1]):new Function(\\\"insertionSort\\\",n.join(\\\"\\\\n\\\"))(r)}(t,e,m);return v(m,y)}},{\\\"typedarray-pool\\\":522}],431:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/compile_sort.js\\\"),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(\\\":\\\"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{\\\"./lib/compile_sort.js\\\":430}],432:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"ndarray-linear-interpolate\\\"),i=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\",\\\"scalar\\\",\\\"scalar\\\"],pre:{body:\\\"{this_warped=new Array(_inline_3_arg4_)}\\\",args:[{name:\\\"_inline_3_arg0_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_3_arg1_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_3_arg2_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_3_arg3_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_3_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_warped\\\"],localVars:[]},body:{body:\\\"{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}\\\",args:[{name:\\\"_inline_4_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_4_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_4_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_4_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_4_arg4_\\\",lvalue:!1,rvalue:!1,count:0}],thisVars:[\\\"this_warped\\\"],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"warpND\\\",blockSize:64}),a=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\",\\\"scalar\\\",\\\"scalar\\\"],pre:{body:\\\"{this_warped=[0]}\\\",args:[],thisVars:[\\\"this_warped\\\"],localVars:[]},body:{body:\\\"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}\\\",args:[{name:\\\"_inline_7_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_7_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_7_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_7_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_7_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_warped\\\"],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"warp1D\\\",blockSize:64}),o=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\",\\\"scalar\\\",\\\"scalar\\\"],pre:{body:\\\"{this_warped=[0,0]}\\\",args:[],thisVars:[\\\"this_warped\\\"],localVars:[]},body:{body:\\\"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}\\\",args:[{name:\\\"_inline_10_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_10_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_10_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_10_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_10_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_warped\\\"],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"warp2D\\\",blockSize:64}),s=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\",\\\"scalar\\\",\\\"scalar\\\"],pre:{body:\\\"{this_warped=[0,0,0]}\\\",args:[],thisVars:[\\\"this_warped\\\"],localVars:[]},body:{body:\\\"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}\\\",args:[{name:\\\"_inline_13_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_13_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_13_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_13_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_13_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_warped\\\"],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"warp3D\\\",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{\\\"cwise/lib/wrapper\\\":137,\\\"ndarray-linear-interpolate\\\":426}],433:[function(t,e,r){var n=t(\\\"iota-array\\\"),i=t(\\\"is-buffer\\\"),a=\\\"undefined\\\"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,r=new Array(e.length);for(t=0;t<r.length;++t)r[t]=[Math.abs(e[t]),t];r.sort(o);var n=new Array(r.length);for(t=0;t<n.length;++t)n[t]=r[t][1];return n}function l(t,e){var r=[\\\"View\\\",e,\\\"d\\\",t].join(\\\"\\\");e<0&&(r=\\\"View_Nil\\\"+t);var i=\\\"generic\\\"===t;if(-1===e){var a=\\\"function \\\"+r+\\\"(a){this.data=a;};var proto=\\\"+r+\\\".prototype;proto.dtype='\\\"+t+\\\"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new \\\"+r+\\\"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_\\\"+r+\\\"(a){return new \\\"+r+\\\"(a);}\\\";return new Function(a)()}if(0===e){a=\\\"function \\\"+r+\\\"(a,d) {this.data = a;this.offset = d};var proto=\\\"+r+\\\".prototype;proto.dtype='\\\"+t+\\\"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function \\\"+r+\\\"_copy() {return new \\\"+r+\\\"(this.data,this.offset)};proto.pick=function \\\"+r+\\\"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function \\\"+r+\\\"_get(){return \\\"+(i?\\\"this.data.get(this.offset)\\\":\\\"this.data[this.offset]\\\")+\\\"};proto.set=function \\\"+r+\\\"_set(v){return \\\"+(i?\\\"this.data.set(this.offset,v)\\\":\\\"this.data[this.offset]=v\\\")+\\\"};return function construct_\\\"+r+\\\"(a,b,c,d){return new \\\"+r+\\\"(a,d)}\\\";return new Function(\\\"TrivialArray\\\",a)(c[t][0])}a=[\\\"'use strict'\\\"];var o=n(e),l=o.map(function(t){return\\\"i\\\"+t}),u=\\\"this.offset+\\\"+o.map(function(t){return\\\"this.stride[\\\"+t+\\\"]*i\\\"+t}).join(\\\"+\\\"),f=o.map(function(t){return\\\"b\\\"+t}).join(\\\",\\\"),h=o.map(function(t){return\\\"c\\\"+t}).join(\\\",\\\");a.push(\\\"function \\\"+r+\\\"(a,\\\"+f+\\\",\\\"+h+\\\",d){this.data=a\\\",\\\"this.shape=[\\\"+f+\\\"]\\\",\\\"this.stride=[\\\"+h+\\\"]\\\",\\\"this.offset=d|0}\\\",\\\"var proto=\\\"+r+\\\".prototype\\\",\\\"proto.dtype='\\\"+t+\\\"'\\\",\\\"proto.dimension=\\\"+e),a.push(\\\"Object.defineProperty(proto,'size',{get:function \\\"+r+\\\"_size(){return \\\"+o.map(function(t){return\\\"this.shape[\\\"+t+\\\"]\\\"}).join(\\\"*\\\"),\\\"}})\\\"),1===e?a.push(\\\"proto.order=[0]\\\"):(a.push(\\\"Object.defineProperty(proto,'order',{get:\\\"),e<4?(a.push(\\\"function \\\"+r+\\\"_order(){\\\"),2===e?a.push(\\\"return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})\\\"):3===e&&a.push(\\\"var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})\\\")):a.push(\\\"ORDER})\\\")),a.push(\\\"proto.set=function \\\"+r+\\\"_set(\\\"+l.join(\\\",\\\")+\\\",v){\\\"),i?a.push(\\\"return this.data.set(\\\"+u+\\\",v)}\\\"):a.push(\\\"return this.data[\\\"+u+\\\"]=v}\\\"),a.push(\\\"proto.get=function \\\"+r+\\\"_get(\\\"+l.join(\\\",\\\")+\\\"){\\\"),i?a.push(\\\"return this.data.get(\\\"+u+\\\")}\\\"):a.push(\\\"return this.data[\\\"+u+\\\"]}\\\"),a.push(\\\"proto.index=function \\\"+r+\\\"_index(\\\",l.join(),\\\"){return \\\"+u+\\\"}\\\"),a.push(\\\"proto.hi=function \\\"+r+\\\"_hi(\\\"+l.join(\\\",\\\")+\\\"){return new \\\"+r+\\\"(this.data,\\\"+o.map(function(t){return[\\\"(typeof i\\\",t,\\\"!=='number'||i\\\",t,\\\"<0)?this.shape[\\\",t,\\\"]:i\\\",t,\\\"|0\\\"].join(\\\"\\\")}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"this.stride[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",this.offset)}\\\");var p=o.map(function(t){return\\\"a\\\"+t+\\\"=this.shape[\\\"+t+\\\"]\\\"}),d=o.map(function(t){return\\\"c\\\"+t+\\\"=this.stride[\\\"+t+\\\"]\\\"});a.push(\\\"proto.lo=function \\\"+r+\\\"_lo(\\\"+l.join(\\\",\\\")+\\\"){var b=this.offset,d=0,\\\"+p.join(\\\",\\\")+\\\",\\\"+d.join(\\\",\\\"));for(var g=0;g<e;++g)a.push(\\\"if(typeof i\\\"+g+\\\"==='number'&&i\\\"+g+\\\">=0){d=i\\\"+g+\\\"|0;b+=c\\\"+g+\\\"*d;a\\\"+g+\\\"-=d}\\\");a.push(\\\"return new \\\"+r+\\\"(this.data,\\\"+o.map(function(t){return\\\"a\\\"+t}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"c\\\"+t}).join(\\\",\\\")+\\\",b)}\\\"),a.push(\\\"proto.step=function \\\"+r+\\\"_step(\\\"+l.join(\\\",\\\")+\\\"){var \\\"+o.map(function(t){return\\\"a\\\"+t+\\\"=this.shape[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"b\\\"+t+\\\"=this.stride[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",c=this.offset,d=0,ceil=Math.ceil\\\");for(g=0;g<e;++g)a.push(\\\"if(typeof i\\\"+g+\\\"==='number'){d=i\\\"+g+\\\"|0;if(d<0){c+=b\\\"+g+\\\"*(a\\\"+g+\\\"-1);a\\\"+g+\\\"=ceil(-a\\\"+g+\\\"/d)}else{a\\\"+g+\\\"=ceil(a\\\"+g+\\\"/d)}b\\\"+g+\\\"*=d}\\\");a.push(\\\"return new \\\"+r+\\\"(this.data,\\\"+o.map(function(t){return\\\"a\\\"+t}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"b\\\"+t}).join(\\\",\\\")+\\\",c)}\\\");var v=new Array(e),m=new Array(e);for(g=0;g<e;++g)v[g]=\\\"a[i\\\"+g+\\\"]\\\",m[g]=\\\"b[i\\\"+g+\\\"]\\\";a.push(\\\"proto.transpose=function \\\"+r+\\\"_transpose(\\\"+l+\\\"){\\\"+l.map(function(t,e){return t+\\\"=(\\\"+t+\\\"===undefined?\\\"+e+\\\":\\\"+t+\\\"|0)\\\"}).join(\\\";\\\"),\\\"var a=this.shape,b=this.stride;return new \\\"+r+\\\"(this.data,\\\"+v.join(\\\",\\\")+\\\",\\\"+m.join(\\\",\\\")+\\\",this.offset)}\\\"),a.push(\\\"proto.pick=function \\\"+r+\\\"_pick(\\\"+l+\\\"){var a=[],b=[],c=this.offset\\\");for(g=0;g<e;++g)a.push(\\\"if(typeof i\\\"+g+\\\"==='number'&&i\\\"+g+\\\">=0){c=(c+this.stride[\\\"+g+\\\"]*i\\\"+g+\\\")|0}else{a.push(this.shape[\\\"+g+\\\"]);b.push(this.stride[\\\"+g+\\\"])}\\\");return a.push(\\\"var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}\\\"),a.push(\\\"return function construct_\\\"+r+\\\"(data,shape,stride,offset){return new \\\"+r+\\\"(data,\\\"+o.map(function(t){return\\\"shape[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"stride[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",offset)}\\\"),new Function(\\\"CTOR_LIST\\\",\\\"ORDER\\\",a.join(\\\"\\\\n\\\"))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);\\\"number\\\"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===n)for(n=0,s=0;s<o;++s)r[s]<0&&(n-=(e[s]-1)*r[s]);for(var f=function(t){if(i(t))return\\\"buffer\\\";if(a)switch(Object.prototype.toString.call(t)){case\\\"[object Float64Array]\\\":return\\\"float64\\\";case\\\"[object Float32Array]\\\":return\\\"float32\\\";case\\\"[object Int8Array]\\\":return\\\"int8\\\";case\\\"[object Int16Array]\\\":return\\\"int16\\\";case\\\"[object Int32Array]\\\":return\\\"int32\\\";case\\\"[object Uint8Array]\\\":return\\\"uint8\\\";case\\\"[object Uint16Array]\\\":return\\\"uint16\\\";case\\\"[object Uint32Array]\\\":return\\\"uint32\\\";case\\\"[object Uint8ClampedArray]\\\":return\\\"uint8_clamped\\\"}return Array.isArray(t)?\\\"array\\\":\\\"generic\\\"}(t),h=c[f];h.length<=o+1;)h.push(l(f,h.length-1));return(0,h[o+1])(t,e,r,n)}},{\\\"iota-array\\\":399,\\\"is-buffer\\\":401}],434:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"double-bits\\\"),i=Math.pow(2,-1074),a=-1>>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),o=n.lo(t);e>t==t>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1;return n.pack(o,r)}},{\\\"double-bits\\\":152}],435:[function(t,e,r){var n=Math.PI,i=c(120);function a(t,e,r,n){return[\\\"C\\\",t,e,r,n,r,n]}function o(t,e,r,n,i,a){return[\\\"C\\\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function s(t,e,r,a,o,c,u,f,h,p){if(p)k=p[0],M=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(f=(d=l(f,h,-o)).x))/2,v=(e-(h=d.y))/2,m=g*g/(r*r)+v*v/(a*a);m>1&&(r*=m=Math.sqrt(m),a*=m);var y=r*r,x=a*a,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*v*v-x*g*g)/(y*v*v+x*g*g)));b==1/0&&(b=1);var _=b*r*v/a+(t+f)/2,w=b*-a*g/r+(e+h)/2,k=Math.asin(((e-w)/a).toFixed(9)),M=Math.asin(((h-w)/a).toFixed(9));(k=t<_?n-k:k)<0&&(k=2*n+k),(M=f<_?n-M:M)<0&&(M=2*n+M),u&&k>M&&(k-=2*n),!u&&M>k&&(M-=2*n)}if(Math.abs(M-k)>i){var A=M,T=f,S=h;M=k+i*(u&&M>k?1:-1);var C=s(f=_+r*Math.cos(M),h=w+a*Math.sin(M),r,a,o,0,u,T,S,[M,A,_,w])}var E=Math.tan((M-k)/4),L=4/3*r*E,z=4/3*a*E,O=[2*t-(t+L*Math.sin(k)),2*e-(e-z*Math.cos(k)),f+L*Math.sin(M),h-z*Math.cos(M),f,h];if(p)return O;C&&(O=O.concat(C));for(var I=0;I<O.length;){var P=l(O[I],O[I+1],o);O[I++]=P.x,O[I++]=P.y}return O}function l(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function c(t){return t*(n/180)}e.exports=function(t){for(var e,r=[],n=0,i=0,l=0,u=0,f=null,h=null,p=0,d=0,g=0,v=t.length;g<v;g++){var m=t[g],y=m[0];switch(y){case\\\"M\\\":l=m[1],u=m[2];break;case\\\"A\\\":(m=s(p,d,m[1],m[2],c(m[3]),m[4],m[5],m[6],m[7])).unshift(\\\"C\\\"),m.length>7&&(r.push(m.splice(0,7)),m.unshift(\\\"C\\\"));break;case\\\"S\\\":var x=p,b=d;\\\"C\\\"!=e&&\\\"S\\\"!=e||(x+=x-n,b+=b-i),m=[\\\"C\\\",x,b,m[1],m[2],m[3],m[4]];break;case\\\"T\\\":\\\"Q\\\"==e||\\\"T\\\"==e?(f=2*p-f,h=2*d-h):(f=p,h=d),m=o(p,d,f,h,m[1],m[2]);break;case\\\"Q\\\":f=m[1],h=m[2],m=o(p,d,m[1],m[2],m[3],m[4]);break;case\\\"L\\\":m=a(p,d,m[1],m[2]);break;case\\\"H\\\":m=a(p,d,m[1],d);break;case\\\"V\\\":m=a(p,d,p,m[1]);break;case\\\"Z\\\":m=a(p,d,l,u)}e=y,p=m[m.length-2],d=m[m.length-1],m.length>4?(n=m[m.length-4],i=m[m.length-3]):(n=p,i=d),r.push(m)}return r}},{}],436:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o<n;++o)i[o]=[0,0,0];for(o=0;o<t.length;++o)for(var s=t[o],l=0,c=s[s.length-1],u=s[0],f=0;f<s.length;++f){l=c,c=u,u=s[(f+1)%s.length];for(var h=e[l],p=e[c],d=e[u],g=new Array(3),v=0,m=new Array(3),y=0,x=0;x<3;++x)g[x]=h[x]-p[x],v+=g[x]*g[x],m[x]=d[x]-p[x],y+=m[x]*m[x];if(v*y>a){var b=i[c],_=1/Math.sqrt(v*y);for(x=0;x<3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(m[w]*g[k]-m[k]*g[w])}}}for(o=0;o<n;++o){b=i[o];var M=0;for(x=0;x<3;++x)M+=b[x]*b[x];if(M>a)for(_=1/Math.sqrt(M),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o<n;++o){for(var s=t[o],l=new Array(3),c=0;c<3;++c)l[c]=e[s[c]];var u=new Array(3),f=new Array(3);for(c=0;c<3;++c)u[c]=l[1][c]-l[0][c],f[c]=l[2][c]-l[0][c];var h=new Array(3),p=0;for(c=0;c<3;++c){var d=(c+1)%3,g=(c+2)%3;h[c]=u[d]*f[g]-u[g]*f[d],p+=h[c]*h[c]}p=p>a?1/Math.sqrt(p):0;for(c=0;c<3;++c)h[c]*=p;i[o]=h}return i}},{}],437:[function(t,e,r){\\\"use strict\\\";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String(\\\"abc\\\");if(t[5]=\\\"de\\\",\\\"5\\\"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e[\\\"_\\\"+String.fromCharCode(r)]=r;if(\\\"0123456789\\\"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(\\\"\\\"))return!1;var n={};return\\\"abcdefghijklmnopqrst\\\".split(\\\"\\\").forEach(function(t){n[t]=t}),\\\"abcdefghijklmnopqrst\\\"===Object.keys(Object.assign({},n)).join(\\\"\\\")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,s=function(t){if(null==t)throw new TypeError(\\\"Object.assign cannot be called with null or undefined\\\");return Object(t)}(t),l=1;l<arguments.length;l++){for(var c in r=Object(arguments[l]))i.call(r,c)&&(s[c]=r[c]);if(n){o=n(r);for(var u=0;u<o.length;u++)a.call(r,o[u])&&(s[o[u]]=r[o[u]])}}return s}},{}],438:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i,a,o,s,l,c){var u=e+a+c;if(f>0){var f=Math.sqrt(u+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,c),f=Math.sqrt(2*h-u+1);e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},{}],439:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));i.setDistanceLimits(t.zoomMin,t.zoomMax),(\\\"eye\\\"in t||\\\"up\\\"in t)&&i.lookAt(0,t.eye,t.center,t.up);return i};var n=t(\\\"filtered-vector\\\"),i=t(\\\"gl-mat4/lookAt\\\"),a=t(\\\"gl-mat4/fromQuat\\\"),o=t(\\\"gl-mat4/invert\\\"),s=t(\\\"./lib/quatFromFrame\\\");function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=c(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,f=0;f<3;++f)c+=r[l+4*f]*i[f];r[12+l]=-c}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=l(u-=a*p,f-=o*p,h-=s*p);u/=d,f/=d,h/=d;var g=i[2],v=i[6],m=i[10],y=g*a+v*o+m*s,x=g*u+v*f+m*h,b=l(g-=y*a+x*u,v-=y*o+x*f,m-=y*s+x*h);g/=b,v/=b,m/=b;var _=u*e+a*r,w=f*e+o*r,k=h*e+s*r;this.center.move(t,_,w,k);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+n),this.radius.set(t,Math.log(M))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],f=i[5],h=i[9],p=i[2],d=i[6],g=i[10],v=e*a+r*u,m=e*o+r*f,y=e*s+r*h,x=-(d*y-g*m),b=-(g*v-p*y),_=-(p*m-d*v),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=c(x,b,_,w);k>1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var M=this.computedRotation,A=M[0],T=M[1],S=M[2],C=M[3],E=A*w+C*x+T*_-S*b,L=T*w+C*b+S*x-A*_,z=S*w+C*_+A*b-T*x,O=C*w-A*x-T*b-S*_;if(n){x=p,b=d,_=g;var I=Math.sin(n)/l(x,b,_);x*=I,b*=I,_*=I,O=O*(w=Math.cos(e))-(E=E*w+O*x+L*_-z*b)*x-(L=L*w+O*b+z*x-E*_)*b-(z=z*w+O*_+E*b-L*x)*_}var P=c(E,L,z,O);P>1e-6?(E/=P,L/=P,z/=P,O/=P):(E=L=z=0,O=1),this.rotation.set(t,E,L,z,O)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,c-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{\\\"./lib/quatFromFrame\\\":438,\\\"filtered-vector\\\":215,\\\"gl-mat4/fromQuat\\\":251,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/lookAt\\\":255}],440:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"repeat-string\\\");e.exports=function(t,e,r){return n(r=\\\"undefined\\\"!=typeof r?r+\\\"\\\":\\\" \\\",e)+t}},{\\\"repeat-string\\\":479}],441:[function(t,e,r){\\\"use strict\\\";function n(t,e){if(\\\"string\\\"!=typeof t)return[t];var r=[t];\\\"string\\\"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:[\\\"{}\\\",\\\"[]\\\",\\\"()\\\"],i=e.escape||\\\"___\\\",a=!!e.flat;n.forEach(function(t){var e=new RegExp([\\\"\\\\\\\\\\\",t[0],\\\"[^\\\\\\\\\\\",t[0],\\\"\\\\\\\\\\\",t[1],\\\"]*\\\\\\\\\\\",t[1]].join(\\\"\\\")),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s}r.forEach(function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++>1e4)throw Error(\\\"References have circular dependency. Please, check them.\\\");r[n]=t}),n=n.reverse(),r=r.map(function(e){return n.forEach(function(r){e=e.replace(new RegExp(\\\"(\\\\\\\\\\\"+i+r+\\\"(?![0-9]))\\\",\\\"g\\\"),t[0]+\\\"$1\\\"+t[1])}),e})});var o=new RegExp(\\\"\\\\\\\\\\\"+i+\\\"([0-9]+)\\\");return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error(\\\"Circular references in parenthesis\\\");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function i(t,e){if(e&&e.flat){var r,n=e&&e.escape||\\\"___\\\",i=t[0];if(!i)return\\\"\\\";for(var a=new RegExp(\\\"\\\\\\\\\\\"+n+\\\"([0-9]+)\\\"),o=0;i!=r;){if(o++>1e4)throw Error(\\\"Circular references in \\\"+t);r=i,i=i.replace(a,s)}return i}return t.reduce(function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,\\\"\\\")),e+r},\\\"\\\");function s(e,r){if(null==t[r])throw Error(\\\"Reference \\\"+r+\\\"is undefined\\\");return t[r]}}function a(t,e){return Array.isArray(t)?i(t,e):n(t,e)}a.parse=n,a.stringify=i,e.exports=a},{}],442:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"pick-by-alias\\\");e.exports=function(t){var e;arguments.length>1&&(t=arguments);\\\"string\\\"==typeof t?t=t.split(/\\\\s/).map(parseFloat):\\\"number\\\"==typeof t&&(t=[t]);t.length&&\\\"number\\\"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(t=n(t,{left:\\\"x l left Left\\\",top:\\\"y t top Top\\\",width:\\\"w width W Width\\\",height:\\\"h height W Width\\\",bottom:\\\"b bottom Bottom\\\",right:\\\"r right Right\\\"}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{\\\"pick-by-alias\\\":448}],443:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),\\\"m\\\"==o&&i.length>2&&(e.push([r].concat(i.splice(0,2))),o=\\\"l\\\",r=\\\"m\\\"==r?\\\"l\\\":\\\"L\\\");;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length<n[o])throw new Error(\\\"malformed path data\\\");e.push([r].concat(i.splice(0,n[o])))}}),e};var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=/([astvzqmhlc])([^astvzqmhlc]*)/gi;var a=/-?[0-9]*\\\\.?[0-9]+(?:e[-+]?\\\\d+)?/gi},{}],444:[function(t,e,r){e.exports=function(t,e){e||(e=[0,\\\"\\\"]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\\\\d.\\\\-\\\\+]*\\\\s*(.*)/)[1]||\\\"\\\",e}},{}],445:[function(t,e,r){(function(t){(function(){var r,n,i,a,o,s;\\\"undefined\\\"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:\\\"undefined\\\"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(r()-o)/1e6},n=t.hrtime,a=(r=function(){var t;return 1e9*(t=n())[0]+t[1]})(),s=1e9*t.uptime(),o=a-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,t(\\\"_process\\\"))},{_process:465}],446:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.length;if(e<n){for(var r=1,a=0;a<e;++a)for(var o=0;o<a;++o)if(t[a]<t[o])r=-r;else if(t[a]===t[o])return 0;return r}for(var s=i.mallocUint8(e),a=0;a<e;++a)s[a]=0;for(var r=1,a=0;a<e;++a)if(!s[a]){var l=1;s[a]=1;for(var o=t[a];o!==a;o=t[o]){if(s[o])return i.freeUint8(s),0;l+=1,s[o]=1}1&l||(r=-r)}return i.freeUint8(s),r};var n=32,i=t(\\\"typedarray-pool\\\")},{\\\"typedarray-pool\\\":522}],447:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"typedarray-pool\\\"),i=t(\\\"invert-permutation\\\");r.rank=function(t){var e=t.length;switch(e){case 0:case 1:return 0;case 2:return t[1]}var r,a,o,s=n.mallocUint32(e),l=n.mallocUint32(e),c=0;for(i(t,l),o=0;o<e;++o)s[o]=t[o];for(o=e-1;o>0;--o)a=l[o],r=s[o],s[o]=s[a],s[a]=r,l[o]=l[r],l[r]=a,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}var n,i,a,o=1;for((r=r||new Array(t))[0]=0,a=1;a<t;++a)r[a]=a,o=o*a|0;for(a=t-1;a>0;--a)e=e-(n=e/o|0)*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}},{\\\"invert-permutation\\\":398,\\\"typedarray-pool\\\":522}],448:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n,a,o={};if(\\\"string\\\"==typeof e&&(e=i(e)),Array.isArray(e)){var s={};for(a=0;a<e.length;a++)s[e[a]]=!0;e=s}for(n in e)e[n]=i(e[n]);var l={};for(n in e){var c=e[n];if(Array.isArray(c))for(a=0;a<c.length;a++){var u=c[a];if(r&&(l[u]=!0),u in t){if(o[n]=t[u],r)for(var f=a;f<c.length;f++)l[c[f]]=!0;break}}else n in t&&(e[n]&&(o[n]=t[n]),r&&(l[n]=!0))}if(r)for(n in t)l[n]||(o[n]=t[n]);return o};var n={};function i(t){return n[t]?n[t]:(\\\"string\\\"==typeof t&&(t=n[t]=t.split(/\\\\s*,\\\\s*|\\\\s+/)),t)}},{}],449:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r=0|e.length,i=t.length,a=[new Array(r),new Array(r)],o=0;o<r;++o)a[0][o]=[],a[1][o]=[];for(var o=0;o<i;++o){var s=t[o];a[0][s[0]].push(s),a[1][s[1]].push(s)}for(var l=[],o=0;o<r;++o)a[0][o].length+a[1][o].length===0&&l.push([o]);function c(t,e){var r=a[e][t[e]];r.splice(r.indexOf(t),1)}function u(t,r,i){for(var o,s,l,u=0;u<2;++u)if(a[u][r].length>0){o=a[u][r][0],l=u;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=a[f][r],p=0;p<h.length;++p){var d=h[p],g=d[1^f],v=n(e[t],e[r],e[s],e[g]);v>0&&(o=d,s=g,l=f)}return i?s:(o&&c(o,l),s)}function f(t,r){var i=a[r][t][0],o=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=t,h=o[1],p=u(l,f,!0);if(n(e[l],e[f],e[h],e[p])<0)break;o.push(t),s=u(l,f)}return o}function h(t,e){return e[1]===e[e.length-1]}for(var o=0;o<r;++o)for(var p=0;p<2;++p){for(var d=[];a[p][o].length>0;){a[0][o].length;var g=f(o,p);h(d,g)?d.push.apply(d,g):(d.length>0&&l.push(d),d=g)}d.length>0&&l.push(d)}return l};var n=t(\\\"compare-angle\\\")},{\\\"compare-angle\\\":115}],450:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s<e.length;++s){var l=r[s].length;a[s]=l,i[s]=!0,l<=1&&o.push(s)}for(;o.length>0;){var c=o.pop();i[c]=!1;for(var u=r[c],s=0;s<u.length;++s){var f=u[s];0==--a[f]&&o.push(f)}}for(var h=new Array(e.length),p=[],s=0;s<e.length;++s)if(i[s]){var c=p.length;h[s]=c,p.push(e[s])}else h[s]=-1;for(var d=[],s=0;s<t.length;++s){var g=t[s];i[g[0]]&&i[g[1]]&&d.push([h[g[0]],h[g[1]]])}return[d,p]};var n=t(\\\"edges-to-adjacency-list\\\")},{\\\"edges-to-adjacency-list\\\":157}],451:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=c(t,e);t=r[0];for(var f=(e=r[1]).length,h=(t.length,n(t,e.length)),p=0;p<f;++p)if(h[p].length%2==1)throw new Error(\\\"planar-graph-to-polyline: graph must be manifold\\\");var d=i(t,e);for(var g=(d=d.filter(function(t){for(var r=t.length,n=[0],i=0;i<r;++i){var a=e[t[i]],l=e[t[(i+1)%r]],c=o(-a[0],a[1]),u=o(-a[0],l[1]),f=o(l[0],a[1]),h=o(l[0],l[1]);n=s(n,s(s(c,u),s(f,h)))}return n[n.length-1]>0})).length,v=new Array(g),m=new Array(g),p=0;p<g;++p){v[p]=p;var y=new Array(g),x=d[p].map(function(t){return e[t]}),b=a([x]),_=0;t:for(var w=0;w<g;++w)if(y[w]=0,p!==w){for(var k=d[w],M=k.length,A=0;A<M;++A){var T=b(e[k[A]]);if(0!==T){T<0&&(y[w]=1,_+=1);continue t}}y[w]=1,_+=1}m[p]=[_,p,y]}m.sort(function(t,e){return e[0]-t[0]});for(var p=0;p<g;++p)for(var y=m[p],S=y[1],C=y[2],w=0;w<g;++w)C[w]&&(v[w]=S);for(var E=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=[];return e}(g),p=0;p<g;++p)E[p].push(v[p]),E[v[p]].push(p);for(var L={},z=u(f,!1),p=0;p<g;++p)for(var k=d[p],M=k.length,w=0;w<M;++w){var O=k[w],I=k[(w+1)%M],P=Math.min(O,I)+\\\":\\\"+Math.max(O,I);if(P in L){var D=L[P];E[D].push(p),E[p].push(D),z[O]=z[I]=!0}else L[P]=p}function R(t){for(var e=t.length,r=0;r<e;++r)if(!z[t[r]])return!1;return!0}for(var B=[],F=u(g,-1),p=0;p<g;++p)v[p]!==p||R(d[p])?F[p]=-1:(B.push(p),F[p]=0);var r=[];for(;B.length>0;){var N=B.pop(),j=E[N];l(j,function(t,e){return t-e});var V,U=j.length,q=F[N];if(0===q){var k=d[N];V=[k]}for(var p=0;p<U;++p){var H=j[p];if(!(F[H]>=0)&&(F[H]=1^q,B.push(H),0===q)){var k=d[H];R(k)||(k.reverse(),V.push(k))}}0===q&&r.push(V)}return r};var n=t(\\\"edges-to-adjacency-list\\\"),i=t(\\\"planar-dual\\\"),a=t(\\\"point-in-big-polygon\\\"),o=t(\\\"two-product\\\"),s=t(\\\"robust-sum\\\"),l=t(\\\"uniq\\\"),c=t(\\\"./lib/trim-leaves\\\");function u(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}},{\\\"./lib/trim-leaves\\\":450,\\\"edges-to-adjacency-list\\\":157,\\\"planar-dual\\\":449,\\\"point-in-big-polygon\\\":455,\\\"robust-sum\\\":491,\\\"two-product\\\":520,uniq:524}],452:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./quad\\\")},{\\\"./quad\\\":454}],453:[function(t,e,r){arguments[4][99][0].apply(r,arguments)},{dup:99}],454:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"clamp\\\"),a=t(\\\"parse-rect\\\"),o=t(\\\"array-bounds\\\"),s=t(\\\"pick-by-alias\\\"),l=t(\\\"defined\\\"),c=t(\\\"flatten-vertex-data\\\"),u=t(\\\"is-obj\\\"),f=t(\\\"dtype\\\"),h=t(\\\"math-log2\\\");function p(t,e){for(var r=e[0],n=e[1],a=1/(e[2]-r),o=1/(e[3]-n),s=new Array(t.length),l=0,c=t.length/2;l<c;l++)s[2*l]=i((t[2*l]-r)*a,0,1),s[2*l+1]=i((t[2*l+1]-n)*o,0,1);return s}e.exports=function(t,e){e||(e={}),t=c(t,\\\"float64\\\"),e=s(e,{bounds:\\\"range bounds dataBox databox\\\",maxDepth:\\\"depth maxDepth maxdepth level maxLevel maxlevel levels\\\",dtype:\\\"type dtype format out dst output destination\\\"});var r=l(e.maxDepth,255),i=l(e.bounds,o(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;var d,g=p(t,i),v=t.length>>>1;e.dtype||(e.dtype=\\\"array\\\"),\\\"string\\\"==typeof e.dtype?d=new(f(e.dtype))(v):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=v));for(var m=0;m<v;++m)d[m]=m;var y=[],x=[],b=[],_=[];!function t(e,n,i,a,o,s){if(!a.length)return null;var l=y[o]||(y[o]=[]);var c=b[o]||(b[o]=[]);var u=x[o]||(x[o]=[]);var f=l.length;o++;if(o>r){for(var h=0;h<a.length;h++)l.push(a[h]),c.push(s),u.push(null,null,null,null);return f}l.push(a[0]);c.push(s);if(a.length<=1)return u.push(null,null,null,null),f;var p=.5*i;var d=e+p,v=n+p;var m=[],_=[],w=[],k=[];for(var M=1,A=a.length;M<A;M++){var T=a[M],S=g[2*T],C=g[2*T+1];S<d?C<v?m.push(T):_.push(T):C<v?w.push(T):k.push(T)}s<<=2;u.push(t(e,n,p,m,o,s),t(e,v,p,_,o,s+1),t(d,n,p,w,o,s+2),t(d,v,p,k,o,s+3));return f}(0,0,1,d,0,1);for(var w=0,k=0;k<y.length;k++){var M=y[k];if(d.set)d.set(M,w);else for(var A=0,T=M.length;A<T;A++)d[A+w]=M[A];var S=w+y[k].length;_[k]=[w,S],w=S}return d.range=function(){var e,r=[],o=arguments.length;for(;o--;)r[o]=arguments[o];if(u(r[r.length-1])){var c=r.pop();r.length||null==c.x&&null==c.l&&null==c.left||(r=[c],e={}),e=s(c,{level:\\\"level maxLevel\\\",d:\\\"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize\\\",lod:\\\"lod details ranges offsets\\\"})}else e={};r.length||(r=i);var f=a.apply(void 0,r),d=[Math.min(f.x,f.x+f.width),Math.min(f.y,f.y+f.height),Math.max(f.x,f.x+f.width),Math.max(f.y,f.y+f.height)],g=d[0],v=d[1],m=d[2],w=d[3],k=p([g,v,m,w],i),M=k[0],A=k[1],T=k[2],S=k[3],E=l(e.level,y.length);if(null!=e.d){var L;\\\"number\\\"==typeof e.d?L=[e.d,e.d]:e.d.length&&(L=e.d),E=Math.min(Math.max(Math.ceil(-h(Math.abs(L[0])/(i[2]-i[0]))),Math.ceil(-h(Math.abs(L[1])/(i[3]-i[1])))),E)}if(E=Math.min(E,y.length),e.lod)return function(t,e,r,i,a){for(var o=[],s=0;s<a;s++){var l=b[s],c=_[s][0],u=C(t,e,s),f=C(r,i,s),h=n.ge(l,u),p=n.gt(l,f,h,l.length-1);o[s]=[h+c,p+c]}return o}(M,A,T,S,E);var z=[];return function e(r,n,i,a,o,s){if(null!==o&&null!==s){var l=r+i,c=n+i;if(!(M>l||A>c||T<r||S<n||a>=E||o===s)){var u=y[a];void 0===s&&(s=u.length);for(var f=o;f<s;f++){var h=u[f],p=t[2*h],d=t[2*h+1];p>=g&&p<=m&&d>=v&&d<=w&&z.push(h)}var b=x[a],_=b[4*o+0],k=b[4*o+1],C=b[4*o+2],L=b[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(b,o+1),I=.5*i,P=a+1;e(r,n,I,P,_,k||C||L||O),e(r,n+I,I,P,k,C||L||O),e(r+I,n,I,P,C,L||O),e(r+I,n+I,I,P,L,O)}}}(0,0,1,0,0,1),z},d;function C(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s<r;s++)n<<=2,n+=t<i?e<a?0:1:e<a?2:3,o*=.5,i+=t<i?-o:o,a+=e<a?-o:o;return n}}},{\\\"array-bounds\\\":53,\\\"binary-search-bounds\\\":453,clamp:103,defined:149,dtype:154,\\\"flatten-vertex-data\\\":216,\\\"is-obj\\\":404,\\\"math-log2\\\":415,\\\"parse-rect\\\":442,\\\"pick-by-alias\\\":448}],455:[function(t,e,r){e.exports=function(t){for(var e=t.length,r=[],a=[],s=0;s<e;++s)for(var u=t[s],f=u.length,h=f-1,p=0;p<f;h=p++){var d=u[h],g=u[p];d[0]===g[0]?a.push([d,g]):r.push([d,g])}if(0===r.length)return 0===a.length?c:(v=l(a),function(t){return v(t[0],t[1])?0:1});var v;var m=i(r),y=function(t,e){return function(r){var i=o.le(e,r[0]);if(i<0)return 1;var a=t[i];if(!a){if(!(i>0&&e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]<l[1][0])if(c<0)a=a.left;else{if(!(c>0))return 0;s=-1,a=a.right}else if(c>0)a=a.left;else{if(!(c<0))return 0;s=1,a=a.right}}return s}}(m.slabs,m.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=t(\\\"robust-orientation\\\")[3],i=t(\\\"slab-decomposition\\\"),a=t(\\\"interval-tree-1d\\\"),o=t(\\\"binary-search-bounds\\\");function s(){return!0}function l(t){for(var e={},r=0;r<t.length;++r){var n=t[r],i=n[0][0],o=n[0][1],l=n[1][1],c=[Math.min(o,l),Math.max(o,l)];i in e?e[i].push(c):e[i]=[c]}var u={},f=Object.keys(e);for(r=0;r<f.length;++r){var h=e[f[r]];u[f[r]]=a(h)}return function(t){return function(e,r){var n=t[e];return!!n&&!!n.queryPoint(r,s)}}(u)}function c(t){return 1}},{\\\"binary-search-bounds\\\":79,\\\"interval-tree-1d\\\":397,\\\"robust-orientation\\\":486,\\\"slab-decomposition\\\":502}],456:[function(t,e,r){var n,i=t(\\\"./lib/build-log\\\"),a=t(\\\"./lib/epsilon\\\"),o=t(\\\"./lib/intersecter\\\"),s=t(\\\"./lib/segment-chainer\\\"),l=t(\\\"./lib/segment-selector\\\"),c=t(\\\"./lib/geojson\\\"),u=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(t){return!0===t?u=i():!1===t&&(u=!1),!1!==u&&u.list},epsilon:function(t){return f.epsilon(t)},segments:function(t){var e=o(!0,f,u);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,f,u).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,u),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,u),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,u),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,u),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,u),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,f,u),inverted:t.inverted}},polygonFromGeoJSON:function(t){return c.toPolygon(n,t)},polygonToGeoJSON:function(t){return c.fromPolygon(n,f,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},\\\"object\\\"==typeof window&&(window.PolyBool=n),e.exports=n},{\\\"./lib/build-log\\\":457,\\\"./lib/epsilon\\\":458,\\\"./lib/geojson\\\":459,\\\"./lib/intersecter\\\":460,\\\"./lib/segment-chainer\\\":462,\\\"./lib/segment-selector\\\":463}],457:[function(t,e,r){e.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n(\\\"check\\\",{seg1:t,seg2:e})},segmentChop:function(t,e){return n(\\\"div_seg\\\",{seg:t,pt:e}),n(\\\"chop\\\",{seg:t,pt:e})},statusRemove:function(t){return n(\\\"pop_seg\\\",{seg:t})},segmentUpdate:function(t){return n(\\\"seg_update\\\",{seg:t})},segmentNew:function(t,e){return n(\\\"new_seg\\\",{seg:t,primary:e})},segmentRemove:function(t){return n(\\\"rem_seg\\\",{seg:t})},tempStatus:function(t,e,r){return n(\\\"temp_status\\\",{seg:t,above:e,below:r})},rewind:function(t){return n(\\\"rewind\\\",{seg:t})},status:function(t,e,r){return n(\\\"status\\\",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n(\\\"vert\\\",{x:e}))},log:function(t){return\\\"string\\\"!=typeof t&&(t=JSON.stringify(t,!1,\\\"  \\\")),n(\\\"log\\\",{txt:t})},reset:function(){return n(\\\"reset\\\")},selected:function(t){return n(\\\"selected\\\",{segs:t})},chainStart:function(t){return n(\\\"chain_start\\\",{seg:t})},chainRemoveHead:function(t,e){return n(\\\"chain_rem_head\\\",{index:t,pt:e})},chainRemoveTail:function(t,e){return n(\\\"chain_rem_tail\\\",{index:t,pt:e})},chainNew:function(t,e){return n(\\\"chain_new\\\",{pt1:t,pt2:e})},chainMatch:function(t){return n(\\\"chain_match\\\",{index:t})},chainClose:function(t){return n(\\\"chain_close\\\",{index:t})},chainAddHead:function(t,e){return n(\\\"chain_add_head\\\",{index:t,pt:e})},chainAddTail:function(t,e){return n(\\\"chain_add_tail\\\",{index:t,pt:e})},chainConnect:function(t,e){return n(\\\"chain_con\\\",{index1:t,index2:e})},chainReverse:function(t){return n(\\\"chain_rev\\\",{index:t})},chainJoin:function(t,e){return n(\\\"chain_join\\\",{index1:t,index2:e})},done:function(){return n(\\\"done\\\")}}}},{}],458:[function(t,e,r){e.exports=function(t){\\\"number\\\"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return\\\"number\\\"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l<t||l-(a*a+s*s)>-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])<t},pointsSameY:function(e,r){return Math.abs(e[1]-r[1])<t},pointsSame:function(t,r){return e.pointsSameX(t,r)&&e.pointsSameY(t,r)},pointsCompare:function(t,r){return e.pointsSameX(t,r)?e.pointsSameY(t,r)?0:t[1]<r[1]?-1:1:t[0]<r[0]?-1:1},pointsCollinear:function(e,r,n){var i=e[0]-r[0],a=e[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(i*s-o*a)<t},linesIntersect:function(e,r,n,i){var a=r[0]-e[0],o=r[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],c=a*l-o*s;if(Math.abs(c)<t)return!1;var u=e[0]-n[0],f=e[1]-n[1],h=(s*f-l*u)/c,p=(a*f-o*u)/c,d={alongA:0,alongB:0,pt:[e[0]+h*a,e[1]+h*o]};return d.alongA=h<=-t?-2:h<t?-1:h-1<=-t?0:h-1<t?1:2,d.alongB=p<=-t?-2:p<t?-1:p-1<=-t?0:p-1<t?1:2,d},pointInsideRegion:function(e,r){for(var n=e[0],i=e[1],a=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l<r.length;l++){var c=r[l][0],u=r[l][1];u-i>t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],459:[function(t,e,r){var n={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i<e.length;i++)n=t.selectDifference(t.combine(n,r(e[i])));return n}if(\\\"Polygon\\\"===e.type)return t.polygon(r(e.coordinates));if(\\\"MultiPolygon\\\"===e.type){for(var n=t.segments({inverted:!1,regions:[]}),i=0;i<e.coordinates.length;i++)n=t.selectUnion(t.combine(n,r(e.coordinates[i])));return t.polygon(n)}throw new Error(\\\"PolyBool: Cannot convert GeoJSON object to PolyBool polygon\\\")},fromPolygon:function(t,e,r){function n(t,r){return e.pointInsideRegion([.5*(t[0][0]+t[1][0]),.5*(t[0][1]+t[1][1])],r)}function i(t){return{region:t,children:[]}}r=t.polygon(t.segments(r));var a=i(null);function o(t,e){for(var r=0;r<t.children.length;r++){if(n(e,(s=t.children[r]).region))return void o(s,e)}var a=i(e);for(r=0;r<t.children.length;r++){var s;n((s=t.children[r]).region,e)&&(a.children.push(s),t.children.splice(r,1),r--)}t.children.push(a)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(a,l)}function c(t,e){for(var r=0,n=t[t.length-1][0],i=t[t.length-1][1],a=[],o=0;o<t.length;o++){var s=t[o][0],l=t[o][1];a.push([s,l]),r+=l*n-s*i,n=s,i=l}return r<0!==e&&a.reverse(),a.push([a[0][0],a[0][1]]),a}var u=[];function f(t){var e=[c(t.region,!1)];u.push(e);for(var r=0;r<t.children.length;r++)e.push(h(t.children[r]))}function h(t){for(var e=0;e<t.children.length;e++)f(t.children[e]);return c(t.region,!0)}for(s=0;s<a.children.length;s++)f(a.children[s]);return u.length<=0?{type:\\\"Polygon\\\",coordinates:[]}:1==u.length?{type:\\\"Polygon\\\",coordinates:u[0]}:{type:\\\"MultiPolygon\\\",coordinates:u}}};e.exports=n},{}],460:[function(t,e,r){var n=t(\\\"./linked-list\\\");e.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var a=n.create();function o(t,r){a.insertBefore(t,function(n){return function(t,r,n,i,a,o){var s=e.pointsCompare(r,a);return 0!==s?s:e.pointsSame(n,o)?0:t!==i?t?1:-1:e.pointAboveOrOnLine(n,i?a:o,i?o:a)?1:-1}(t.isStart,t.pt,r,n.isStart,n.pt,n.other.pt)<0})}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return o(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,o(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,o(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,o){var s=n.create();function c(t){return s.findTransition(function(r){var n,i,a,o,s,l;return n=t,i=r.ev,a=n.seg.start,o=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(a,s,l)?e.pointsCollinear(o,s,l)?1:e.pointAboveOrOnLine(o,s,l)?1:-1:e.pointAboveOrOnLine(a,s,l)?1:-1)>0})}function u(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,c=a.start,u=a.end;r&&r.checkIntersection(i,a);var f=e.linesIntersect(o,s,c,u);if(!1===f){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var h=e.pointsSame(o,c),p=e.pointsSame(s,u);if(h&&p)return n;var d=!h&&e.pointBetween(o,c,u),g=!p&&e.pointBetween(s,c,u);if(h)return g?l(n,s):l(t,u),n;d&&(p||(g?l(n,s):l(t,u)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(t,c):0===f.alongB?l(t,f.pt):1===f.alongB&&l(t,u)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var f=[];!a.isEmpty();){var h=a.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var p=c(h),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function v(){if(d){var t=u(h,d);if(t)return t}return!!g&&u(h,g)}r&&r.tempStatus(h.seg,!!d&&d.seg,!!g&&g.seg);var m,y,x=v();if(x)t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=h.seg.myFill,r&&r.segmentUpdate(x.seg),h.other.remove(),h.remove();if(a.getHead()!==h){r&&r.rewind(h.seg);continue}t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=g?g.seg.myFill.above:i,h.seg.myFill.above=y?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&&(m=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:m,below:m}),r&&r.status(h.seg,!!d&&d.seg,!!g&&g.seg),h.other.status=p.insert(n.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error(\\\"PolyBool: Zero-length segment detected; your epsilon is probably too small or too large\\\");if(s.exists(b.prev)&&s.exists(b.next)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}f.push(h.seg)}a.getHead().remove()}return r&&r.done(),f}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l<t.length;l++){n=o,o=t[l];var c=e.pointsCompare(n,o);0!==c&&s((i=c<0?n:o,a=c<0?o:n,{id:r?r.segmentId():-1,start:i,end:a,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(t){return c(t,!1)}}:{calculate:function(t,e,r,n){return t.forEach(function(t){s(i(t.start,t.end,t),!0)}),r.forEach(function(t){s(i(t.start,t.end,t),!1)}),c(e,n)}}}},{\\\"./linked-list\\\":461}],461:[function(t,e,r){e.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},{}],462:[function(t,e,r){e.exports=function(t,e,r){var n=[],i=[];return t.forEach(function(t){var a=t.start,o=t.end;if(e.pointsSame(a,o))console.warn(\\\"PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large\\\");else{r&&r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u<n.length;u++){var f=(v=n[u])[0],h=(v[1],v[v.length-1]);if(v[v.length-2],e.pointsSame(f,a)){if(M(u,!0,!0))break}else if(e.pointsSame(f,o)){if(M(u,!0,!1))break}else if(e.pointsSame(h,a)){if(M(u,!1,!0))break}else if(e.pointsSame(h,o)&&M(u,!1,!1))break}if(c===s)return n.push([a,o]),void(r&&r.chainNew(a,o));if(c===l){r&&r.chainMatch(s.index);var p=s.index,d=s.matches_pt1?o:a,g=s.matches_head,v=n[p],m=g?v[0]:v[v.length-1],y=g?v[1]:v[v.length-2],x=g?v[v.length-1]:v[0],b=g?v[v.length-2]:v[1];return e.pointsCollinear(y,m,d)&&(g?(r&&r.chainRemoveHead(s.index,d),v.shift()):(r&&r.chainRemoveTail(s.index,d),v.pop()),m=y),e.pointsSame(x,d)?(n.splice(p,1),e.pointsCollinear(b,x,m)&&(g?(r&&r.chainRemoveTail(s.index,m),v.pop()):(r&&r.chainRemoveHead(s.index,m),v.shift())),r&&r.chainClose(s.index),void i.push(v)):void(g?(r&&r.chainAddHead(s.index,d),v.unshift(d)):(r&&r.chainAddTail(s.index,d),v.push(d)))}var _=s.index,w=l.index;r&&r.chainConnect(_,w);var k=n[_].length<n[w].length;s.matches_head?l.matches_head?k?(A(_),T(_,w)):(A(w),T(w,_)):T(w,_):l.matches_head?T(_,w):k?(A(_),T(w,_)):(A(w),T(_,w))}function M(t,e,r){return c.index=t,c.matches_head=e,c.matches_pt1=r,c===s?(c=l,!1):(c=null,!0)}function A(t){r&&r.chainReverse(t),n[t].reverse()}function T(t,i){var a=n[t],o=n[i],s=a[a.length-1],l=a[a.length-2],c=o[0],u=o[1];e.pointsCollinear(l,s,c)&&(r&&r.chainRemoveTail(t,s),a.pop(),s=l),e.pointsCollinear(s,c,u)&&(r&&r.chainRemoveHead(i,c),o.shift()),r&&r.chainJoin(t,i),n[t]=a.concat(o),n.splice(i,1)}}),i}},{}],463:[function(t,e,r){function n(t,e,r){var n=[];return t.forEach(function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})}),r&&r.selected(n),n}var i={union:function(t,e){return n(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],e)},intersect:function(t,e){return n(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],e)},difference:function(t,e){return n(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],e)},differenceRev:function(t,e){return n(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],e)},xor:function(t,e){return n(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],e)}};e.exports=i},{}],464:[function(t,e,r){\\\"use strict\\\";var n=new Float64Array(4),i=new Float64Array(4),a=new Float64Array(4);e.exports=function(t,e,r,o,s){n.length<o.length&&(n=new Float64Array(o.length),i=new Float64Array(o.length),a=new Float64Array(o.length));for(var l=0;l<o.length;++l)n[l]=t[l]-o[l],i[l]=e[l]-t[l],a[l]=r[l]-t[l];var c=0,u=0,f=0,h=0,p=0,d=0;for(l=0;l<o.length;++l){var g=i[l],v=a[l],m=n[l];c+=g*g,u+=g*v,f+=v*v,h+=m*g,p+=m*v,d+=m*m}var y,x,b,_,w,k=Math.abs(c*f-u*u),M=u*p-f*h,A=u*h-c*p;if(M+A<=k)if(M<0)A<0&&h<0?(A=0,-h>=c?(M=1,y=c+2*h+d):y=h*(M=-h/c)+d):(M=0,p>=0?(A=0,y=d):-p>=f?(A=1,y=f+2*p+d):y=p*(A=-p/f)+d);else if(A<0)A=0,h>=0?(M=0,y=d):-h>=c?(M=1,y=c+2*h+d):y=h*(M=-h/c)+d;else{var T=1/k;y=(M*=T)*(c*M+u*(A*=T)+2*h)+A*(u*M+f*A+2*p)+d}else M<0?(b=f+p)>(x=u+h)?(_=b-x)>=(w=c-2*u+f)?(M=1,A=0,y=c+2*h+d):y=(M=_/w)*(c*M+u*(A=1-M)+2*h)+A*(u*M+f*A+2*p)+d:(M=0,b<=0?(A=1,y=f+2*p+d):p>=0?(A=0,y=d):y=p*(A=-p/f)+d):A<0?(b=c+h)>(x=u+p)?(_=b-x)>=(w=c-2*u+f)?(A=1,M=0,y=f+2*p+d):y=(M=1-(A=_/w))*(c*M+u*A+2*h)+A*(u*M+f*A+2*p)+d:(A=0,b<=0?(M=1,y=c+2*h+d):h>=0?(M=0,y=d):y=h*(M=-h/c)+d):(_=f+p-u-h)<=0?(M=0,A=1,y=f+2*p+d):_>=(w=c-2*u+f)?(M=1,A=0,y=c+2*h+d):y=(M=_/w)*(c*M+u*(A=1-M)+2*h)+A*(u*M+f*A+2*p)+d;var S=1-M-A;for(l=0;l<o.length;++l)s[l]=S*t[l]+M*e[l]+A*r[l];return y<0?0:y}},{}],465:[function(t,e,r){var n,i,a=e.exports={};function o(){throw new Error(\\\"setTimeout has not been defined\\\")}function s(){throw new Error(\\\"clearTimeout has not been defined\\\")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n=\\\"function\\\"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i=\\\"function\\\"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var c,u=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!f){var t=l(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function v(){}a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new g(t,e)),1!==u.length||f||l(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title=\\\"browser\\\",a.browser=!0,a.env={},a.argv=[],a.version=\\\"\\\",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(t){return[]},a.binding=function(t){throw new Error(\\\"process.binding is not supported\\\")},a.cwd=function(){return\\\"/\\\"},a.chdir=function(t){throw new Error(\\\"process.chdir is not supported\\\")},a.umask=function(){return 0}},{}],466:[function(t,e,r){e.exports=t(\\\"gl-quat/slerp\\\")},{\\\"gl-quat/slerp\\\":280}],467:[function(t,e,r){(function(r){for(var n=t(\\\"performance-now\\\"),i=\\\"undefined\\\"==typeof window?r:window,a=[\\\"moz\\\",\\\"webkit\\\"],o=\\\"AnimationFrame\\\",s=i[\\\"request\\\"+o],l=i[\\\"cancel\\\"+o]||i[\\\"cancelRequest\\\"+o],c=0;!s&&c<a.length;c++)s=i[a[c]+\\\"Request\\\"+o],l=i[a[c]+\\\"Cancel\\\"+o]||i[a[c]+\\\"CancelRequest\\\"+o];if(!s||!l){var u=0,f=0,h=[];s=function(t){if(0===h.length){var e=n(),r=Math.max(0,1e3/60-(e-u));u=r+e,setTimeout(function(){var t=h.slice(0);h.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(u)}catch(t){setTimeout(function(){throw t},0)}},Math.round(r))}return h.push({handle:++f,callback:t,cancelled:!1}),f},l=function(t){for(var e=0;e<h.length;e++)h[e].handle===t&&(h[e].cancelled=!0)}}e.exports=function(t){return s.call(i,t)},e.exports.cancel=function(){l.apply(i,arguments)},e.exports.polyfill=function(t){t||(t=i),t.requestAnimationFrame=s,t.cancelAnimationFrame=l}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"performance-now\\\":445}],468:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"big-rat/add\\\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\\\"big-rat/add\\\":63}],469:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=new Array(t.length),r=0;r<t.length;++r)e[r]=n(t[r]);return e};var n=t(\\\"big-rat\\\")},{\\\"big-rat\\\":66}],470:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"big-rat\\\"),i=t(\\\"big-rat/mul\\\");e.exports=function(t,e){for(var r=n(e),a=t.length,o=new Array(a),s=0;s<a;++s)o[s]=i(t[s],r);return o}},{\\\"big-rat\\\":66,\\\"big-rat/mul\\\":75}],471:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"big-rat/sub\\\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\\\"big-rat/sub\\\":77}],472:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"compare-cell\\\"),i=t(\\\"compare-oriented-cell\\\"),a=t(\\\"cell-orientation\\\");e.exports=function(t){t.sort(i);for(var e=t.length,r=0,o=0;o<e;++o){var s=t[o],l=a(s);if(0!==l){if(r>0){var c=t[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{\\\"cell-orientation\\\":100,\\\"compare-cell\\\":116,\\\"compare-oriented-cell\\\":117}],473:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"array-bounds\\\"),i=t(\\\"color-normalize\\\"),a=t(\\\"update-diff\\\"),o=t(\\\"pick-by-alias\\\"),s=t(\\\"object-assign\\\"),l=t(\\\"flatten-vertex-data\\\"),c=t(\\\"to-float32\\\"),u=c.float32,f=c.fract32;e.exports=function(t,e){\\\"function\\\"==typeof t?(e||(e={}),e.regl=t):e=t;e.length&&(e.positions=e);if(!(t=e.regl).hasExtension(\\\"ANGLE_instanced_arrays\\\"))throw Error(\\\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\\\");var r,c,p,d,g,v,m=t._gl,y={color:\\\"black\\\",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:\\\"dynamic\\\",type:\\\"uint8\\\",data:new Uint8Array(0)}),c=t.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array(0)}),p=t.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array(0)}),g=t.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array(0)}),v=t.buffer({usage:\\\"static\\\",type:\\\"float\\\",data:h}),k(e),r=t({vert:\\\"\\\\n\\\\t\\\\tprecision highp float;\\\\n\\\\n\\\\t\\\\tattribute vec2 position, positionFract;\\\\n\\\\t\\\\tattribute vec4 error;\\\\n\\\\t\\\\tattribute vec4 color;\\\\n\\\\n\\\\t\\\\tattribute vec2 direction, lineOffset, capOffset;\\\\n\\\\n\\\\t\\\\tuniform vec4 viewport;\\\\n\\\\t\\\\tuniform float lineWidth, capSize;\\\\n\\\\t\\\\tuniform vec2 scale, scaleFract, translate, translateFract;\\\\n\\\\n\\\\t\\\\tvarying vec4 fragColor;\\\\n\\\\n\\\\t\\\\tvoid main() {\\\\n\\\\t\\\\t\\\\tfragColor = color / 255.;\\\\n\\\\n\\\\t\\\\t\\\\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\\\\n\\\\n\\\\t\\\\t\\\\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\\\\n\\\\n\\\\t\\\\t\\\\tvec2 position = position + dxy;\\\\n\\\\n\\\\t\\\\t\\\\tvec2 pos = (position + translate) * scale\\\\n\\\\t\\\\t\\\\t\\\\t+ (positionFract + translateFract) * scale\\\\n\\\\t\\\\t\\\\t\\\\t+ (position + translate) * scaleFract\\\\n\\\\t\\\\t\\\\t\\\\t+ (positionFract + translateFract) * scaleFract;\\\\n\\\\n\\\\t\\\\t\\\\tpos += pixelOffset / viewport.zw;\\\\n\\\\n\\\\t\\\\t\\\\tgl_Position = vec4(pos * 2. - 1., 0, 1);\\\\n\\\\t\\\\t}\\\\n\\\\t\\\\t\\\",frag:\\\"\\\\n\\\\t\\\\tprecision mediump float;\\\\n\\\\n\\\\t\\\\tvarying vec4 fragColor;\\\\n\\\\n\\\\t\\\\tuniform float opacity;\\\\n\\\\n\\\\t\\\\tvoid main() {\\\\n\\\\t\\\\t\\\\tgl_FragColor = fragColor;\\\\n\\\\t\\\\t\\\\tgl_FragColor.a *= opacity;\\\\n\\\\t\\\\t}\\\\n\\\\t\\\\t\\\",uniforms:{range:t.prop(\\\"range\\\"),lineWidth:t.prop(\\\"lineWidth\\\"),capSize:t.prop(\\\"capSize\\\"),opacity:t.prop(\\\"opacity\\\"),scale:t.prop(\\\"scale\\\"),translate:t.prop(\\\"translate\\\"),scaleFract:t.prop(\\\"scaleFract\\\"),translateFract:t.prop(\\\"translateFract\\\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:v,stride:24,offset:0},lineOffset:{buffer:v,stride:24,offset:8},capOffset:{buffer:v,stride:24,offset:16}},primitive:\\\"triangles\\\",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\\\"add\\\",alpha:\\\"add\\\"},func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:\\\"one minus dst alpha\\\",dstAlpha:\\\"one\\\"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop(\\\"viewport\\\")},viewport:t.prop(\\\"viewport\\\"),stencil:!1,instances:t.prop(\\\"count\\\"),count:h.length}),s(b,{update:k,draw:_,destroy:M,regl:t,gl:m,canvas:m.canvas,groups:x}),b;function b(t){t?k(t):null===t&&M(),_()}function _(e){if(\\\"number\\\"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),x.forEach(function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)})}function w(t){\\\"number\\\"==typeof t&&(t=x[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?\\\"number\\\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map(function(t,c){var u=x[c];return t?(\\\"function\\\"==typeof t?t={after:t}:\\\"number\\\"==typeof t[0]&&(t={positions:t}),t=o(t,{color:\\\"color colors fill\\\",capSize:\\\"capSize cap capsize cap-size\\\",lineWidth:\\\"lineWidth line-width width line thickness\\\",opacity:\\\"opacity alpha\\\",range:\\\"range dataBox\\\",viewport:\\\"viewport viewBox\\\",errors:\\\"errors error\\\",positions:\\\"positions position data points\\\"}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,\\\"float64\\\"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t=\\\"transparent\\\"),!Array.isArray(t)||\\\"number\\\"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a<r;a++)t[a]=n}if(t.length<r)throw Error(\\\"Not enough colors\\\");for(var o=new Uint8Array(4*r),s=0;s<r;s++){var l=i(t[s],\\\"uint8\\\");o.set(l,4*s)}return o},range:function(t,e,r){var n=e.bounds;return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=f(e.scale),e.translateFract=f(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:m.drawingBufferWidth,height:m.drawingBufferHeight},e}}]),u):u}),e||r){var h=x.reduce(function(t,e,r){return t+(e?e.count:0)},0),v=new Float64Array(2*h),_=new Uint8Array(4*h),w=new Float32Array(4*h);x.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset,a=t.color,o=t.errors;n&&(_.set(a,4*i),w.set(o,4*i),v.set(r,2*i))}}),c(u(v)),p(f(v)),d(_),g(w)}}}function M(){c.destroy(),p.destroy(),d.destroy(),g.destroy(),v.destroy()}};var h=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]},{\\\"array-bounds\\\":53,\\\"color-normalize\\\":108,\\\"flatten-vertex-data\\\":216,\\\"object-assign\\\":437,\\\"pick-by-alias\\\":448,\\\"to-float32\\\":515,\\\"update-diff\\\":526}],474:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-normalize\\\"),i=t(\\\"array-bounds\\\"),a=t(\\\"object-assign\\\"),o=t(\\\"glslify\\\"),s=t(\\\"pick-by-alias\\\"),l=t(\\\"flatten-vertex-data\\\"),c=t(\\\"earcut\\\"),u=t(\\\"array-normalize\\\"),f=t(\\\"to-float32\\\"),h=f.float32,p=f.fract32,d=t(\\\"es6-weak-map\\\"),g=t(\\\"parse-rect\\\");function v(t,e){if(!(this instanceof v))return new v(t,e);if(\\\"function\\\"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension(\\\"ANGLE_instanced_arrays\\\"))throw Error(\\\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\\\");this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=v.shaders.has(t)?v.shaders.get(t):v.shaders.set(t,v.createShaders(t)).get(t),this.update(e)}e.exports=v,v.dashMult=2,v.maxPatternLength=256,v.precisionThreshold=3e6,v.maxPoints=1e4,v.maxLines=2048,v.shaders=new d,v.createShaders=function(t){var e,r=t.buffer({usage:\\\"static\\\",type:\\\"float\\\",data:[0,1,0,0,1,1,1,0]}),n={primitive:\\\"triangle strip\\\",instances:t.prop(\\\"count\\\"),count:4,offset:0,uniforms:{miterMode:function(t,e){return\\\"round\\\"===e.join?2:1},miterLimit:t.prop(\\\"miterLimit\\\"),scale:t.prop(\\\"scale\\\"),scaleFract:t.prop(\\\"scaleFract\\\"),translateFract:t.prop(\\\"translateFract\\\"),translate:t.prop(\\\"translate\\\"),thickness:t.prop(\\\"thickness\\\"),dashPattern:t.prop(\\\"dashTexture\\\"),opacity:t.prop(\\\"opacity\\\"),pixelRatio:t.context(\\\"pixelRatio\\\"),id:t.prop(\\\"id\\\"),dashSize:t.prop(\\\"dashLength\\\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop(\\\"depth\\\")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\\\"add\\\",alpha:\\\"add\\\"},func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:\\\"one minus dst alpha\\\",dstAlpha:\\\"one\\\"}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop(\\\"viewport\\\")},viewport:t.prop(\\\"viewport\\\")},i=t(a({vert:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\\\\nattribute vec4 color;\\\\nattribute float lineEnd, lineTop;\\\\n\\\\nuniform vec2 scale, scaleFract, translate, translateFract;\\\\nuniform float thickness, pixelRatio, id, depth;\\\\nuniform vec4 viewport;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec2 tangent;\\\\n\\\\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\\\\n\\\\t// the order is important\\\\n\\\\treturn position * scale + translate\\\\n       + positionFract * scale + translateFract\\\\n       + position * scaleFract\\\\n       + positionFract * scaleFract;\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\tfloat lineStart = 1. - lineEnd;\\\\n\\\\tfloat lineOffset = lineTop * 2. - 1.;\\\\n\\\\n\\\\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\\\\n\\\\ttangent = normalize(diff * scale * viewport.zw);\\\\n\\\\tvec2 normal = vec2(-tangent.y, tangent.x);\\\\n\\\\n\\\\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\\\\n\\\\t\\\\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\\\\n\\\\n\\\\t\\\\t+ thickness * normal * .5 * lineOffset / viewport.zw;\\\\n\\\\n\\\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\\\n\\\\n\\\\tfragColor = color / 255.;\\\\n}\\\\n\\\"]),frag:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform sampler2D dashPattern;\\\\n\\\\nuniform float dashSize, pixelRatio, thickness, opacity, id;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec2 tangent;\\\\n\\\\nvoid main() {\\\\n\\\\tfloat alpha = 1.;\\\\n\\\\n\\\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\\\\n\\\\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\\\\n\\\\n\\\\tgl_FragColor = fragColor;\\\\n\\\\tgl_FragColor.a *= alpha * opacity * dash;\\\\n}\\\\n\\\"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop(\\\"positionFractBuffer\\\"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop(\\\"positionFractBuffer\\\"),stride:8,offset:16,divisor:1},color:{buffer:t.prop(\\\"colorBuffer\\\"),stride:4,offset:0,divisor:1}}},n));try{e=t(a({cull:{enable:!0,face:\\\"back\\\"},vert:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\\\\nattribute vec4 aColor, bColor;\\\\nattribute float lineEnd, lineTop;\\\\n\\\\nuniform vec2 scale, translate;\\\\nuniform float thickness, pixelRatio, id, depth;\\\\nuniform vec4 viewport;\\\\nuniform float miterLimit, miterMode;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec4 startCutoff, endCutoff;\\\\nvarying vec2 tangent;\\\\nvarying vec2 startCoord, endCoord;\\\\nvarying float enableStartMiter, enableEndMiter;\\\\n\\\\nconst float REVERSE_THRESHOLD = -.875;\\\\nconst float MIN_DIFF = 1e-6;\\\\n\\\\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\\\\n// TODO: precalculate dot products, normalize things beforehead etc.\\\\n// TODO: refactor to rectangular algorithm\\\\n\\\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\\\n\\\\tvec2 diff = b - a;\\\\n\\\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\\\n\\\\treturn dot(p - a, perp);\\\\n}\\\\n\\\\nbool isNaN( float val ){\\\\n  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\\\\n\\\\n  vec2 adjustedScale;\\\\n  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\\\\n  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\\\\n\\\\n  vec2 scaleRatio = adjustedScale * viewport.zw;\\\\n\\\\tvec2 normalWidth = thickness / scaleRatio;\\\\n\\\\n\\\\tfloat lineStart = 1. - lineEnd;\\\\n\\\\tfloat lineBot = 1. - lineTop;\\\\n\\\\n\\\\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\\\\n\\\\n\\\\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\\\\n\\\\n\\\\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\\\\n\\\\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\\\\n\\\\n\\\\tvec2 prevDiff = aCoord - prevCoord;\\\\n\\\\tvec2 currDiff = bCoord - aCoord;\\\\n\\\\tvec2 nextDiff = nextCoord - bCoord;\\\\n\\\\n\\\\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\\\\n\\\\tvec2 currTangent = normalize(currDiff * scaleRatio);\\\\n\\\\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\\\\n\\\\n\\\\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\\\\n\\\\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\\\\n\\\\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\\\\n\\\\n\\\\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\\\\n\\\\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\\\\n\\\\n\\\\t// collapsed/unidirectional segment cases\\\\n\\\\t// FIXME: there should be more elegant solution\\\\n\\\\tvec2 prevTanDiff = abs(prevTangent - currTangent);\\\\n\\\\tvec2 nextTanDiff = abs(nextTangent - currTangent);\\\\n\\\\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\\\\n\\\\t\\\\tstartJoinDirection = currNormal;\\\\n\\\\t}\\\\n\\\\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\\\\n\\\\t\\\\tendJoinDirection = currNormal;\\\\n\\\\t}\\\\n\\\\tif (aCoord == bCoord) {\\\\n\\\\t\\\\tendJoinDirection = startJoinDirection;\\\\n\\\\t\\\\tcurrNormal = prevNormal;\\\\n\\\\t\\\\tcurrTangent = prevTangent;\\\\n\\\\t}\\\\n\\\\n\\\\ttangent = currTangent;\\\\n\\\\n\\\\t//calculate join shifts relative to normals\\\\n\\\\tfloat startJoinShift = dot(currNormal, startJoinDirection);\\\\n\\\\tfloat endJoinShift = dot(currNormal, endJoinDirection);\\\\n\\\\n\\\\tfloat startMiterRatio = abs(1. / startJoinShift);\\\\n\\\\tfloat endMiterRatio = abs(1. / endJoinShift);\\\\n\\\\n\\\\tvec2 startJoin = startJoinDirection * startMiterRatio;\\\\n\\\\tvec2 endJoin = endJoinDirection * endMiterRatio;\\\\n\\\\n\\\\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\\\\n\\\\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\\\\n\\\\tstartBotJoin = -startTopJoin;\\\\n\\\\n\\\\tendTopJoin = sign(endJoinShift) * endJoin * .5;\\\\n\\\\tendBotJoin = -endTopJoin;\\\\n\\\\n\\\\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\\\\n\\\\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\\\\n\\\\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\\\\n\\\\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\\\\n\\\\n\\\\t//miter anti-clipping\\\\n\\\\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\\\\n\\\\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\\\\n\\\\n\\\\t//prevent close to reverse direction switch\\\\n\\\\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);\\\\n\\\\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);\\\\n\\\\n\\\\tif (prevReverse) {\\\\n\\\\t\\\\t//make join rectangular\\\\n\\\\t\\\\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\\\\n\\\\t\\\\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\\\\n\\\\t\\\\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\\\n\\\\t\\\\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\\\n\\\\t}\\\\n\\\\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\\\\n\\\\t\\\\t//handle miter clipping\\\\n\\\\t\\\\tbTopCoord -= normalWidth * endTopJoin;\\\\n\\\\t\\\\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\\\\n\\\\t}\\\\n\\\\n\\\\tif (nextReverse) {\\\\n\\\\t\\\\t//make join rectangular\\\\n\\\\t\\\\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\\\\n\\\\t\\\\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\\\\n\\\\t\\\\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\\\n\\\\t\\\\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\\\n\\\\t}\\\\n\\\\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\\\\n\\\\t\\\\t//handle miter clipping\\\\n\\\\t\\\\taBotCoord -= normalWidth * startBotJoin;\\\\n\\\\t\\\\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\\\\n\\\\t}\\\\n\\\\n\\\\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\\\\n\\\\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\\\\n\\\\n\\\\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\\\\n\\\\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\\\\n\\\\n\\\\t//position is normalized 0..1 coord on the screen\\\\n\\\\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\\\\n\\\\n\\\\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\\\\n\\\\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\\\\n\\\\n\\\\tgl_Position = vec4(position  * 2.0 - 1.0, depth, 1);\\\\n\\\\n\\\\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\\\\n\\\\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\\\\n\\\\n\\\\t//bevel miter cutoffs\\\\n\\\\tif (miterMode == 1.) {\\\\n\\\\t\\\\tif (enableStartMiter == 1.) {\\\\n\\\\t\\\\t\\\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\\\\n\\\\t\\\\t\\\\tstartCutoff = vec4(aCoord, aCoord);\\\\n\\\\t\\\\t\\\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\\\n\\\\t\\\\t\\\\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\\\n\\\\t\\\\t\\\\tstartCutoff += viewport.xyxy;\\\\n\\\\t\\\\t\\\\tstartCutoff += startMiterWidth.xyxy;\\\\n\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\tif (enableEndMiter == 1.) {\\\\n\\\\t\\\\t\\\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\\\\n\\\\t\\\\t\\\\tendCutoff = vec4(bCoord, bCoord);\\\\n\\\\t\\\\t\\\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\\\\n\\\\t\\\\t\\\\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\\\n\\\\t\\\\t\\\\tendCutoff += viewport.xyxy;\\\\n\\\\t\\\\t\\\\tendCutoff += endMiterWidth.xyxy;\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n\\\\n\\\\t//round miter cutoffs\\\\n\\\\telse if (miterMode == 2.) {\\\\n\\\\t\\\\tif (enableStartMiter == 1.) {\\\\n\\\\t\\\\t\\\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\\\\n\\\\t\\\\t\\\\tstartCutoff = vec4(aCoord, aCoord);\\\\n\\\\t\\\\t\\\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\\\n\\\\t\\\\t\\\\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\\\n\\\\t\\\\t\\\\tstartCutoff += viewport.xyxy;\\\\n\\\\t\\\\t\\\\tstartCutoff += startMiterWidth.xyxy;\\\\n\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\tif (enableEndMiter == 1.) {\\\\n\\\\t\\\\t\\\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\\\\n\\\\t\\\\t\\\\tendCutoff = vec4(bCoord, bCoord);\\\\n\\\\t\\\\t\\\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\\\\n\\\\t\\\\t\\\\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\\\n\\\\t\\\\t\\\\tendCutoff += viewport.xyxy;\\\\n\\\\t\\\\t\\\\tendCutoff += endMiterWidth.xyxy;\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n}\\\\n\\\"]),frag:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform sampler2D dashPattern;\\\\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec2 tangent;\\\\nvarying vec4 startCutoff, endCutoff;\\\\nvarying vec2 startCoord, endCoord;\\\\nvarying float enableStartMiter, enableEndMiter;\\\\n\\\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\\\n\\\\tvec2 diff = b - a;\\\\n\\\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\\\n\\\\treturn dot(p - a, perp);\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\tfloat alpha = 1., distToStart, distToEnd;\\\\n\\\\tfloat cutoff = thickness * .5;\\\\n\\\\n\\\\t//bevel miter\\\\n\\\\tif (miterMode == 1.) {\\\\n\\\\t\\\\tif (enableStartMiter == 1.) {\\\\n\\\\t\\\\t\\\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\\\n\\\\t\\\\t\\\\tif (distToStart < -1.) {\\\\n\\\\t\\\\t\\\\t\\\\tdiscard;\\\\n\\\\t\\\\t\\\\t\\\\treturn;\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t\\\\talpha *= min(max(distToStart + 1., 0.), 1.);\\\\n\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\tif (enableEndMiter == 1.) {\\\\n\\\\t\\\\t\\\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\\\n\\\\t\\\\t\\\\tif (distToEnd < -1.) {\\\\n\\\\t\\\\t\\\\t\\\\tdiscard;\\\\n\\\\t\\\\t\\\\t\\\\treturn;\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t\\\\talpha *= min(max(distToEnd + 1., 0.), 1.);\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n\\\\n\\\\t// round miter\\\\n\\\\telse if (miterMode == 2.) {\\\\n\\\\t\\\\tif (enableStartMiter == 1.) {\\\\n\\\\t\\\\t\\\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\\\n\\\\t\\\\t\\\\tif (distToStart < 0.) {\\\\n\\\\t\\\\t\\\\t\\\\tfloat radius = length(gl_FragCoord.xy - startCoord);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tif(radius > cutoff + .5) {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdiscard;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treturn;\\\\n\\\\t\\\\t\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\t\\\\t\\\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\tif (enableEndMiter == 1.) {\\\\n\\\\t\\\\t\\\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\\\n\\\\t\\\\t\\\\tif (distToEnd < 0.) {\\\\n\\\\t\\\\t\\\\t\\\\tfloat radius = length(gl_FragCoord.xy - endCoord);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tif(radius > cutoff + .5) {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdiscard;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treturn;\\\\n\\\\t\\\\t\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\t\\\\t\\\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n\\\\n\\\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\\\\n\\\\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\\\\n\\\\n\\\\tgl_FragColor = fragColor;\\\\n\\\\tgl_FragColor.a *= alpha * opacity * dash;\\\\n}\\\\n\\\"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop(\\\"colorBuffer\\\"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop(\\\"colorBuffer\\\"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:\\\"triangle\\\",elements:function(t,e){return e.triangles},offset:0,vert:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position, positionFract;\\\\n\\\\nuniform vec4 color;\\\\nuniform vec2 scale, scaleFract, translate, translateFract;\\\\nuniform float pixelRatio, id;\\\\nuniform vec4 viewport;\\\\nuniform float opacity;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nconst float MAX_LINES = 256.;\\\\n\\\\nvoid main() {\\\\n\\\\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\\\\n\\\\n\\\\tvec2 position = position * scale + translate\\\\n       + positionFract * scale + translateFract\\\\n       + position * scaleFract\\\\n       + positionFract * scaleFract;\\\\n\\\\n\\\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\\\n\\\\n\\\\tfragColor = color / 255.;\\\\n\\\\tfragColor.a *= opacity;\\\\n}\\\\n\\\"]),frag:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n\\\\tgl_FragColor = fragColor;\\\\n}\\\\n\\\"]),uniforms:{scale:t.prop(\\\"scale\\\"),color:t.prop(\\\"fill\\\"),scaleFract:t.prop(\\\"scaleFract\\\"),translateFract:t.prop(\\\"translateFract\\\"),translate:t.prop(\\\"translate\\\"),opacity:t.prop(\\\"opacity\\\"),pixelRatio:t.context(\\\"pixelRatio\\\"),id:t.prop(\\\"id\\\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:8},positionFract:{buffer:t.prop(\\\"positionFractBuffer\\\"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},v.defaults={dashes:null,join:\\\"miter\\\",miterLimit:1,thickness:10,cap:\\\"square\\\",color:\\\"black\\\",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},v.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},v.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach(function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);\\\"number\\\"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>v.precisionThreshold||e.scale[1]*e.viewport.height>v.precisionThreshold?t.shaders.rect(e):\\\"rect\\\"===e.join||!e.join&&(e.thickness<=2||e.count>=v.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))}),this},v.prototype.update=function(t){var e=this;if(t){null!=t.length?\\\"number\\\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach(function(t,f){var d=e.passes[f];if(void 0!==t)if(null!==t){if(\\\"number\\\"==typeof t[0]&&(t={positions:t}),t=s(t,{positions:\\\"positions points data coords\\\",thickness:\\\"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth\\\",join:\\\"lineJoin linejoin join type mode\\\",miterLimit:\\\"miterlimit miterLimit\\\",dashes:\\\"dash dashes dasharray dash-array dashArray\\\",color:\\\"color colour stroke colors colours stroke-color strokeColor\\\",fill:\\\"fill fill-color fillColor\\\",opacity:\\\"alpha opacity\\\",overlay:\\\"overlay crease overlap intersect\\\",close:\\\"closed close closed-path closePath\\\",range:\\\"range dataBox\\\",viewport:\\\"viewport viewBox\\\",hole:\\\"holes hole hollow\\\"}),d||(e.passes[f]=d={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:\\\"linear\\\",min:\\\"linear\\\"}),colorBuffer:r.buffer({usage:\\\"dynamic\\\",type:\\\"uint8\\\",data:new Uint8Array}),positionBuffer:r.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array})},t=a({},v.defaults,t)),null!=t.thickness&&(d.thickness=parseFloat(t.thickness)),null!=t.opacity&&(d.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(d.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(d.overlay=!!t.overlay,f<v.maxLines&&(d.depth=2*(v.maxLines-1-f%v.maxLines)/v.maxLines-1)),null!=t.join&&(d.join=t.join),null!=t.hole&&(d.hole=t.hole),null!=t.fill&&(d.fill=t.fill?n(t.fill,\\\"uint8\\\"):null),null!=t.viewport&&(d.viewport=g(t.viewport)),d.viewport||(d.viewport=g([o.drawingBufferWidth,o.drawingBufferHeight])),null!=t.close&&(d.close=t.close),null===t.positions&&(t.positions=[]),t.positions){var m,y;if(t.positions.x&&t.positions.y){var x=t.positions.x,b=t.positions.y;y=d.count=Math.max(x.length,b.length),m=new Float64Array(2*y);for(var _=0;_<y;_++)m[2*_]=x[_],m[2*_+1]=b[_]}else m=l(t.positions,\\\"float64\\\"),y=d.count=Math.floor(m.length/2);var w=d.bounds=i(m,2);if(d.fill){for(var k=[],M={},A=0,T=0,S=0,C=d.count;T<C;T++){var E=m[2*T],L=m[2*T+1];isNaN(E)||isNaN(L)||null==E||null==L?(E=m[2*A],L=m[2*A+1],M[T]=A):A=T,k[S++]=E,k[S++]=L}for(var z=c(k,d.hole||[]),O=0,I=z.length;O<I;O++)null!=M[z[O]]&&(z[O]=M[z[O]]);d.triangles=z}var P=new Float64Array(m);u(P,2,w);var D=new Float64Array(2*y+6);d.close?m[0]===m[2*y-2]&&m[1]===m[2*y-1]?(D[0]=P[2*y-4],D[1]=P[2*y-3]):(D[0]=P[2*y-2],D[1]=P[2*y-1]):(D[0]=P[0],D[1]=P[1]),D.set(P,2),d.close?m[0]===m[2*y-2]&&m[1]===m[2*y-1]?(D[2*y+2]=P[2],D[2*y+3]=P[3],d.count-=1):(D[2*y+2]=P[0],D[2*y+3]=P[1],D[2*y+4]=P[2],D[2*y+5]=P[3]):(D[2*y+2]=P[2*y-2],D[2*y+3]=P[2*y-1],D[2*y+4]=P[2*y-2],D[2*y+5]=P[2*y-1]),d.positionBuffer(h(D)),d.positionFractBuffer(p(D))}if(t.range?d.range=t.range:d.range||(d.range=d.bounds),(t.range||t.positions)&&d.count){var R=d.bounds,B=R[2]-R[0],F=R[3]-R[1],N=d.range[2]-d.range[0],j=d.range[3]-d.range[1];d.scale=[B/N,F/j],d.translate=[-d.range[0]/N+R[0]/N||0,-d.range[1]/j+R[1]/j||0],d.scaleFract=p(d.scale),d.translateFract=p(d.translate)}if(t.dashes){var V,U=0;if(!t.dashes||t.dashes.length<2)U=1,V=new Uint8Array([255,255,255,255,255,255,255,255]);else{U=0;for(var q=0;q<t.dashes.length;++q)U+=t.dashes[q];V=new Uint8Array(U*v.dashMult);for(var H=0,G=255,W=0;W<2;W++)for(var Y=0;Y<t.dashes.length;++Y){for(var X=0,Z=t.dashes[Y]*v.dashMult*.5;X<Z;++X)V[H++]=G;G^=255}}d.dashLength=U,d.dashTexture({channels:1,data:V,width:V.length,height:1,mag:\\\"linear\\\",min:\\\"linear\\\"},0,0)}if(t.color){var $=d.count,J=t.color;J||(J=\\\"transparent\\\");var K=new Uint8Array(4*$+4);if(Array.isArray(J)&&\\\"number\\\"!=typeof J[0]){for(var Q=0;Q<$;Q++){var tt=n(J[Q],\\\"uint8\\\");K.set(tt,4*Q)}K.set(n(J[0],\\\"uint8\\\"),4*$)}else for(var et=n(J,\\\"uint8\\\"),rt=0;rt<$+1;rt++)K.set(et,4*rt);d.colorBuffer({usage:\\\"dynamic\\\",type:\\\"uint8\\\",data:K})}}else e.passes[f]=null}),t.length<this.passes.length){for(var f=t.length;f<this.passes.length;f++){var d=e.passes[f];d&&(d.colorBuffer.destroy(),d.positionBuffer.destroy(),d.dashTexture.destroy())}this.passes.length=t.length}for(var m=[],y=0;y<this.passes.length;y++)null!==e.passes[y]&&m.push(e.passes[y]);return this.passes=m,this}},v.prototype.destroy=function(){return this.passes.forEach(function(t){t.colorBuffer.destroy(),t.positionBuffer.destroy(),t.dashTexture.destroy()}),this.passes.length=0,this}},{\\\"array-bounds\\\":53,\\\"array-normalize\\\":54,\\\"color-normalize\\\":108,earcut:156,\\\"es6-weak-map\\\":209,\\\"flatten-vertex-data\\\":216,glslify:392,\\\"object-assign\\\":437,\\\"parse-rect\\\":442,\\\"pick-by-alias\\\":448,\\\"to-float32\\\":515}],475:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scatter\\\"),i=t(\\\"object-assign\\\");e.exports=function(t,e){var r=new n(t,e),a=r.render.bind(r);return i(a,{render:a,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),a}},{\\\"./scatter\\\":476,\\\"object-assign\\\":437}],476:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-normalize\\\"),i=t(\\\"array-bounds\\\"),a=t(\\\"color-id\\\"),o=t(\\\"point-cluster\\\"),s=t(\\\"object-assign\\\"),l=t(\\\"glslify\\\"),c=t(\\\"pick-by-alias\\\"),u=t(\\\"update-diff\\\"),f=t(\\\"flatten-vertex-data\\\"),h=t(\\\"is-iexplorer\\\"),p=t(\\\"to-float32\\\"),d=t(\\\"parse-rect\\\");function g(t,e){var r=this;if(!(this instanceof g))return new g(t,e);\\\"function\\\"==typeof t?(e||(e={}),e.regl=t):(e=t,t=null),e&&e.length&&(e.positions=e);var n,i=(t=e.regl)._gl,a=[];this.tooManyColors=h,n=t.texture({data:new Uint8Array(1020),width:255,height:1,type:\\\"uint8\\\",format:\\\"rgba\\\",wrapS:\\\"clamp\\\",wrapT:\\\"clamp\\\",mag:\\\"nearest\\\",min:\\\"nearest\\\"}),s(this,{regl:t,gl:i,groups:[],markerCache:[null],markerTextures:[null],palette:a,paletteIds:{},paletteTexture:n,maxColors:255,maxSize:100,canvas:i.canvas}),this.update(e);var o={uniforms:{pixelRatio:t.context(\\\"pixelRatio\\\"),palette:n,paletteSize:function(t,e){return[r.tooManyColors?0:255,n.height]},scale:t.prop(\\\"scale\\\"),scaleFract:t.prop(\\\"scaleFract\\\"),translate:t.prop(\\\"translate\\\"),translateFract:t.prop(\\\"translateFract\\\"),opacity:t.prop(\\\"opacity\\\"),marker:t.prop(\\\"markerTexture\\\")},attributes:{x:function(t,e){return e.xAttr||{buffer:e.positionBuffer,stride:8,offset:0}},y:function(t,e){return e.yAttr||{buffer:e.positionBuffer,stride:8,offset:4}},xFract:function(t,e){return e.xAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:0}},yFract:function(t,e){return e.yAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:4}},size:function(t,e){return e.size.length?{buffer:e.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*e.size/r.maxSize)]}},borderSize:function(t,e){return e.borderSize.length?{buffer:e.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*e.borderSize/r.maxSize)]}},colorId:function(t,e){return e.color.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(4*e.color,4*e.color+4):[e.color]}},borderColorId:function(t,e){return e.borderColor.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(4*e.borderColor,4*e.borderColor+4):[e.borderColor]}},isActive:function(t,e){return!0===e.activation?{constant:[1]}:e.activation?e.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:\\\"one minus dst alpha\\\",dstAlpha:\\\"one\\\"}},scissor:{enable:!0,box:t.prop(\\\"viewport\\\")},viewport:t.prop(\\\"viewport\\\"),stencil:{enable:!1},depth:{enable:!1},elements:t.prop(\\\"elements\\\"),count:t.prop(\\\"count\\\"),offset:t.prop(\\\"offset\\\"),primitive:\\\"points\\\"},c=s({},o);c.frag=l([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor, fragBorderColor;\\\\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\\\\n\\\\nuniform sampler2D marker;\\\\nuniform float pixelRatio, opacity;\\\\n\\\\nfloat smoothStep(float x, float y) {\\\\n  return 1.0 / (1.0 + exp(50.0*(x - y)));\\\\n}\\\\n\\\\nvoid main() {\\\\n  float dist = texture2D(marker, gl_PointCoord).r, delta = fragWidth;\\\\n\\\\n  // max-distance alpha\\\\n  if (dist < 0.003) discard;\\\\n\\\\n  // null-border case\\\\n  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\\\\n    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\\\\n    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);\\\\n  }\\\\n  else {\\\\n    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\\\\n    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\\\\n\\\\n    vec4 color = fragBorderColor;\\\\n    color.a *= borderColorAmt;\\\\n    color = mix(color, fragColor, colorAmt);\\\\n    color.a *= opacity;\\\\n\\\\n    gl_FragColor = color;\\\\n  }\\\\n\\\\n}\\\\n\\\"]),c.vert=l([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute float x, y, xFract, yFract;\\\\nattribute float size, borderSize;\\\\nattribute vec4 colorId, borderColorId;\\\\nattribute float isActive;\\\\n\\\\nuniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\\\\nuniform float pixelRatio;\\\\nuniform sampler2D palette;\\\\n\\\\nconst float maxSize = 100.;\\\\nconst float borderLevel = .5;\\\\n\\\\nvarying vec4 fragColor, fragBorderColor;\\\\nvarying float fragPointSize, fragBorderRadius,\\\\n    fragWidth, fragBorderColorLevel, fragColorLevel;\\\\n\\\\nvec2 paletteCoord(float id) {\\\\n  return vec2(\\\\n    (mod(id, paletteSize.x) + .5) / paletteSize.x,\\\\n    (floor(id / paletteSize.x) + .5) / paletteSize.y\\\\n  );\\\\n}\\\\nvec2 paletteCoord(vec2 id) {\\\\n  return vec2(\\\\n    (id.x + .5) / paletteSize.x,\\\\n    (id.y + .5) / paletteSize.y\\\\n  );\\\\n}\\\\nvec4 getColor(vec4 id) {\\\\n  // zero-palette means we deal with direct buffer\\\\n  if (paletteSize.x == 0.) return id / 255.;\\\\n  return texture2D(palette, paletteCoord(id.xy));\\\\n}\\\\n\\\\nvoid main() {\\\\n  if (isActive == 0.) return;\\\\n\\\\n  vec2 position = vec2(x, y);\\\\n  vec2 positionFract = vec2(xFract, yFract);\\\\n\\\\n  vec4 color = getColor(colorId);\\\\n  vec4 borderColor = getColor(borderColorId);\\\\n\\\\n  float size = size * maxSize / 255.;\\\\n  float borderSize = borderSize * maxSize / 255.;\\\\n\\\\n  gl_PointSize = 2. * size * pixelRatio;\\\\n  fragPointSize = size * pixelRatio;\\\\n\\\\n  vec2 pos = (position + translate) * scale\\\\n      + (positionFract + translateFract) * scale\\\\n      + (position + translate) * scaleFract\\\\n      + (positionFract + translateFract) * scaleFract;\\\\n\\\\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\\\\n\\\\n  fragColor = color;\\\\n  fragBorderColor = borderColor;\\\\n  fragWidth = 1. / gl_PointSize;\\\\n\\\\n  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\\\\n  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\\\\n}\\\\n\\\"]),this.drawMarker=t(c);var u=s({},o);u.frag=l([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor, fragBorderColor;\\\\n\\\\nuniform float opacity;\\\\nvarying float fragBorderRadius, fragWidth;\\\\n\\\\nfloat smoothStep(float edge0, float edge1, float x) {\\\\n\\\\tfloat t;\\\\n\\\\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\\\\n\\\\treturn t * t * (3.0 - 2.0 * t);\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\tfloat radius, alpha = 1.0, delta = fragWidth;\\\\n\\\\n\\\\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\\\\n\\\\n\\\\tif (radius > 1.0 + delta) {\\\\n\\\\t\\\\tdiscard;\\\\n\\\\t}\\\\n\\\\n\\\\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\\\\n\\\\n\\\\tfloat borderRadius = fragBorderRadius;\\\\n\\\\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\\\\n\\\\tvec4 color = mix(fragColor, fragBorderColor, ratio);\\\\n\\\\tcolor.a *= alpha * opacity;\\\\n\\\\tgl_FragColor = color;\\\\n}\\\\n\\\"]),u.vert=l([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute float x, y, xFract, yFract;\\\\nattribute float size, borderSize;\\\\nattribute vec4 colorId, borderColorId;\\\\nattribute float isActive;\\\\n\\\\nuniform vec2 scale, scaleFract, translate, translateFract;\\\\nuniform float pixelRatio;\\\\nuniform sampler2D palette;\\\\nuniform vec2 paletteSize;\\\\n\\\\nconst float maxSize = 100.;\\\\n\\\\nvarying vec4 fragColor, fragBorderColor;\\\\nvarying float fragBorderRadius, fragWidth;\\\\n\\\\nvec2 paletteCoord(float id) {\\\\n  return vec2(\\\\n    (mod(id, paletteSize.x) + .5) / paletteSize.x,\\\\n    (floor(id / paletteSize.x) + .5) / paletteSize.y\\\\n  );\\\\n}\\\\nvec2 paletteCoord(vec2 id) {\\\\n  return vec2(\\\\n    (id.x + .5) / paletteSize.x,\\\\n    (id.y + .5) / paletteSize.y\\\\n  );\\\\n}\\\\n\\\\nvec4 getColor(vec4 id) {\\\\n  // zero-palette means we deal with direct buffer\\\\n  if (paletteSize.x == 0.) return id / 255.;\\\\n  return texture2D(palette, paletteCoord(id.xy));\\\\n}\\\\n\\\\nvoid main() {\\\\n  // ignore inactive points\\\\n  if (isActive == 0.) return;\\\\n\\\\n  vec2 position = vec2(x, y);\\\\n  vec2 positionFract = vec2(xFract, yFract);\\\\n\\\\n  vec4 color = getColor(colorId);\\\\n  vec4 borderColor = getColor(borderColorId);\\\\n\\\\n  float size = size * maxSize / 255.;\\\\n  float borderSize = borderSize * maxSize / 255.;\\\\n\\\\n  gl_PointSize = (size + borderSize) * pixelRatio;\\\\n\\\\n  vec2 pos = (position + translate) * scale\\\\n      + (positionFract + translateFract) * scale\\\\n      + (position + translate) * scaleFract\\\\n      + (positionFract + translateFract) * scaleFract;\\\\n\\\\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\\\\n\\\\n  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\\\\n  fragColor = color;\\\\n  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\\\\n  fragWidth = 1. / gl_PointSize;\\\\n}\\\\n\\\"]),h&&(u.frag=u.frag.replace(\\\"smoothstep\\\",\\\"smoothStep\\\"),c.frag=c.frag.replace(\\\"smoothstep\\\",\\\"smoothStep\\\")),this.drawCircle=t(u)}e.exports=g,g.defaults={color:\\\"black\\\",borderColor:\\\"transparent\\\",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},g.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];return e.length&&(t=this).update.apply(t,e),this.draw(),this},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=this.groups;if(1===e.length&&Array.isArray(e[0])&&(null===e[0][0]||Array.isArray(e[0][0]))&&(e=e[0]),this.regl._refresh(),e.length)for(var i=0;i<e.length;i++)t.drawItem(i,e[i]);else n.forEach(function(e,r){t.drawItem(r)});return this},g.prototype.drawItem=function(t,e){var r=this.groups,n=r[t];if(\\\"number\\\"==typeof e&&(t=e,n=r[e],e=null),n&&n.count&&n.opacity){n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,e));for(var i=[],a=1;a<n.activation.length;a++)n.activation[a]&&(!0===n.activation[a]||n.activation[a].data.length)&&i.push.apply(i,this.getMarkerDrawOptions(a,n,e));i.length&&this.drawMarker(i)}},g.prototype.getMarkerDrawOptions=function(t,e,r){var n=e.range,i=e.tree,a=e.viewport,o=e.activation,l=e.selectionBuffer,c=e.count;this.regl;if(!i)return r?[s({},e,{markerTexture:this.markerTextures[t],activation:o[t],count:r.length,elements:r,offset:0})]:[s({},e,{markerTexture:this.markerTextures[t],activation:o[t],offset:0})];var u=[],f=i.range(n,{lod:!0,px:[(n[2]-n[0])/a.width,(n[3]-n[1])/a.height]});if(r){for(var h=o[t].data,p=new Uint8Array(c),d=0;d<r.length;d++){var g=r[d];p[g]=h?h[g]:1}l.subdata(p)}for(var v=f.length;v--;){var m=f[v],y=m[0],x=m[1];u.push(s({},e,{markerTexture:this.markerTextures[t],activation:r?l:o[t],offset:y,count:x-y}))}return u},g.prototype.update=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){1===e.length&&Array.isArray(e[0])&&(e=e[0]);var n=this.groups,a=this.gl,l=this.regl,h=this.maxSize,v=this.maxColors,m=this.palette;this.groups=n=e.map(function(e,r){var y=n[r];if(void 0===e)return y;null===e?e={positions:null}:\\\"function\\\"==typeof e?e={ondraw:e}:\\\"number\\\"==typeof e[0]&&(e={positions:e}),null===(e=c(e,{positions:\\\"positions data points\\\",snap:\\\"snap cluster lod tree\\\",size:\\\"sizes size radius\\\",borderSize:\\\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\\\",color:\\\"colors color fill fill-color fillColor\\\",borderColor:\\\"borderColors borderColor stroke stroke-color strokeColor\\\",marker:\\\"markers marker shape\\\",range:\\\"range dataBox databox\\\",viewport:\\\"viewport viewPort viewBox viewbox\\\",opacity:\\\"opacity alpha transparency\\\",bounds:\\\"bound bounds boundaries limits\\\"})).positions&&(e.positions=[]),y||(n[r]=y={id:r,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"stream\\\",type:\\\"uint8\\\"}),sizeBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"dynamic\\\",type:\\\"uint8\\\"}),colorBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"dynamic\\\",type:\\\"uint8\\\"}),positionBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"dynamic\\\",type:\\\"float\\\"}),positionFractBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"dynamic\\\",type:\\\"float\\\"})},e=s({},g.defaults,e)),!e.positions||\\\"marker\\\"in e||(e.marker=y.marker,delete y.marker),!e.marker||\\\"positions\\\"in e||(e.positions=y.positions,delete y.positions);var x=0,b=0;if(u(y,e,[{snap:!0,size:function(t,e){return null==t&&(t=g.defaults.size),x+=t&&t.length?1:0,t},borderSize:function(t,e){return null==t&&(t=g.defaults.borderSize),x+=t&&t.length?1:0,t},opacity:parseFloat,color:function(e,r){return null==e&&(e=g.defaults.color),e=t.updateColor(e),b++,e},borderColor:function(e,r){return null==e&&(e=g.defaults.borderColor),e=t.updateColor(e),b++,e},bounds:function(t,e,r){return\\\"range\\\"in r||(r.range=null),t},positions:function(t,e,r){var n=e.snap,a=e.positionBuffer,s=e.positionFractBuffer,c=e.selectionBuffer;if(t.x||t.y)return t.x.length?e.xAttr={buffer:l.buffer(t.x),offset:0,stride:4,count:t.x.length}:e.xAttr={buffer:t.x.buffer,offset:4*t.x.offset||0,stride:4*(t.x.stride||1),count:t.x.count},t.y.length?e.yAttr={buffer:l.buffer(t.y),offset:0,stride:4,count:t.y.length}:e.yAttr={buffer:t.y.buffer,offset:4*t.y.offset||0,stride:4*(t.y.stride||1),count:t.y.count},e.count=Math.max(e.xAttr.count,e.yAttr.count),t;t=f(t,\\\"float64\\\");var u=e.count=Math.floor(t.length/2),h=e.bounds=u?i(t,2):null;if(r.range||e.range||(delete e.range,r.range=h),r.marker||e.marker||(delete e.marker,r.marker=null),n&&(!0===n||u>n)?e.tree=o(t,{bounds:h}):n&&n.length&&(e.tree=n),e.tree){var d={primitive:\\\"points\\\",usage:\\\"static\\\",data:e.tree,type:\\\"uint32\\\"};e.elements?e.elements(d):e.elements=l.elements(d)}return a({data:p.float(t),usage:\\\"dynamic\\\"}),s({data:p.fract(t),usage:\\\"dynamic\\\"}),c({data:new Uint8Array(u),type:\\\"uint8\\\",usage:\\\"stream\\\"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach(function(t){return t&&t.destroy&&t.destroy()}),i.length=0,e&&\\\"number\\\"!=typeof e[0]){for(var a=[],o=0,s=Math.min(e.length,r.count);o<s;o++){var c=t.addMarker(e[o]);a[c]||(a[c]=new Uint8Array(r.count)),a[c][o]=1}for(var u=0;u<a.length;u++)if(a[u]){var f={data:a[u],type:\\\"uint8\\\",usage:\\\"static\\\"};i[u]?i[u](f):i[u]=l.buffer(f),i[u].data=a[u]}}else{i[t.addMarker(e)]=!0}return e},range:function(t,e,r){var n=e.bounds;if(n)return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=p.fract(e.scale),e.translateFract=p.fract(e.translate),t},viewport:function(t){return d(t||[a.drawingBufferWidth,a.drawingBufferHeight])}}]),x){var _=y.count,w=y.size,k=y.borderSize,M=y.sizeBuffer,A=new Uint8Array(2*_);if(w.length||k.length)for(var T=0;T<_;T++)A[2*T]=Math.round(255*(null==w[T]?w:w[T])/h),A[2*T+1]=Math.round(255*(null==k[T]?k:k[T])/h);M({data:A,usage:\\\"dynamic\\\"})}if(b){var S,C=y.count,E=y.color,L=y.borderColor,z=y.colorBuffer;if(t.tooManyColors){if(E.length||L.length){S=new Uint8Array(8*C);for(var O=0;O<C;O++){var I=E[O];S[8*O]=m[4*I],S[8*O+1]=m[4*I+1],S[8*O+2]=m[4*I+2],S[8*O+3]=m[4*I+3];var P=L[O];S[8*O+4]=m[4*P],S[8*O+5]=m[4*P+1],S[8*O+6]=m[4*P+2],S[8*O+7]=m[4*P+3]}}}else if(E.length||L.length){S=new Uint8Array(4*C+2);for(var D=0;D<C;D++)null!=E[D]&&(S[4*D]=E[D]%v,S[4*D+1]=Math.floor(E[D]/v)),null!=L[D]&&(S[4*D+2]=L[D]%v,S[4*D+3]=Math.floor(L[D]/v))}z({data:S||new Uint8Array(0),type:\\\"uint8\\\",usage:\\\"dynamic\\\"})}return y})}},g.prototype.addMarker=function(t){var e,r=this.markerTextures,n=this.regl,i=this.markerCache,a=null==t?0:i.indexOf(t);if(a>=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o<s;o++)e[o]=255*t[o]}var l=Math.floor(Math.sqrt(e.length));return a=r.length,i.push(t),r.push(n.texture({channels:1,data:e,radius:l,mag:\\\"linear\\\",min:\\\"linear\\\"})),a},g.prototype.updateColor=function(t){var e=this.paletteIds,r=this.palette,i=this.maxColors;Array.isArray(t)||(t=[t]);var o=[];if(\\\"number\\\"==typeof t[0]){var s=[];if(Array.isArray(t))for(var l=0;l<t.length;l+=4)s.push(t.slice(l,l+4));else for(var c=0;c<t.length;c+=4)s.push(t.subarray(c,c+4));t=s}for(var u=0;u<t.length;u++){var f=t[u];f=n(f,\\\"uint8\\\");var h=a(f,!1);if(null==e[h]){var p=r.length;e[h]=Math.floor(p/4),r[p]=f[0],r[p+1]=f[1],r[p+2]=f[2],r[p+3]=f[3]}o[u]=e[h]}return!this.tooManyColors&&r.length>i*i*4&&(this.tooManyColors=!0),this.updatePalette(r),1===o.length?o[0]:o},g.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i<n*e;i++)t.push(0,0,0,0);r.height<n&&r.resize(e,n),r.subimage({width:Math.min(.25*t.length,e),height:n,data:t},0,0)}},g.prototype.destroy=function(){return this.groups.forEach(function(t){t.sizeBuffer.destroy(),t.positionBuffer.destroy(),t.positionFractBuffer.destroy(),t.colorBuffer.destroy(),t.activation.forEach(function(t){return t&&t.destroy&&t.destroy()}),t.selectionBuffer.destroy(),t.elements&&t.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(t){return t&&t.destroy&&t.destroy()}),this}},{\\\"array-bounds\\\":53,\\\"color-id\\\":106,\\\"color-normalize\\\":108,\\\"flatten-vertex-data\\\":216,glslify:392,\\\"is-iexplorer\\\":402,\\\"object-assign\\\":437,\\\"parse-rect\\\":442,\\\"pick-by-alias\\\":448,\\\"point-cluster\\\":452,\\\"to-float32\\\":515,\\\"update-diff\\\":526}],477:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"regl-scatter2d/scatter\\\"),i=t(\\\"pick-by-alias\\\"),a=t(\\\"array-bounds\\\"),o=t(\\\"raf\\\"),s=t(\\\"array-range\\\"),l=t(\\\"parse-rect\\\"),c=t(\\\"flatten-vertex-data\\\");function u(t,e){if(!(this instanceof u))return new u(t,e);this.traces=[],this.passes={},this.regl=t,this.scatter=n(t),this.canvas=this.scatter.canvas}function f(t,e,r){return(null!=t.id?t.id:t)<<16|(255&e)<<8|255&r}function h(t,e,r){var n,i,a,o,s=t[e],l=t[r];return s.length>2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x+s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y+l.height),[a,n,o,i]}function p(t){if(\\\"number\\\"==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}e.exports=u,u.prototype.render=function(){for(var t,e=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(t=this).update.apply(t,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o(function(){e.draw(),e.dirty=!0,e.planned=null})):(this.draw(),this.dirty=!0,o(function(){e.dirty=!1})),this)},u.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;n<e.length;n++)this.updateItem(n,e[n]);this.traces=this.traces.filter(Boolean);for(var i=[],a=0,o=0;o<this.traces.length;o++){for(var s=this.traces[o],l=this.traces[o].passes,c=0;c<l.length;c++)i.push(this.passes[l[c]]);s.passOffset=a,a+=s.passes.length}return(t=this.scatter).update.apply(t,i),this}},u.prototype.updateItem=function(t,e){var r=this.regl;if(null===e)return this.traces[t]=null,this;if(!e)return this;var n,o=i(e,{data:\\\"data items columns rows values dimensions samples x\\\",snap:\\\"snap cluster\\\",size:\\\"sizes size radius\\\",color:\\\"colors color fill fill-color fillColor\\\",opacity:\\\"opacity alpha transparency opaque\\\",borderSize:\\\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\\\",borderColor:\\\"borderColors borderColor bordercolor stroke stroke-color strokeColor\\\",marker:\\\"markers marker shape\\\",range:\\\"range ranges databox dataBox\\\",viewport:\\\"viewport viewBox viewbox\\\",domain:\\\"domain domains area areas\\\",padding:\\\"pad padding paddings pads margin margins\\\",transpose:\\\"transpose transposed\\\",diagonal:\\\"diagonal diag showDiagonal\\\",upper:\\\"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf\\\",lower:\\\"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower\\\"}),s=this.traces[t]||(this.traces[t]={id:t,buffer:r.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array}),color:\\\"black\\\",marker:null,size:12,borderColor:\\\"transparent\\\",borderSize:1,viewport:l([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(null!=o.color&&(s.color=o.color),null!=o.size&&(s.size=o.size),null!=o.marker&&(s.marker=o.marker),null!=o.borderColor&&(s.borderColor=o.borderColor),null!=o.borderSize&&(s.borderSize=o.borderSize),null!=o.opacity&&(s.opacity=o.opacity),o.viewport&&(s.viewport=l(o.viewport)),null!=o.diagonal&&(s.diagonal=o.diagonal),null!=o.upper&&(s.upper=o.upper),null!=o.lower&&(s.lower=o.lower),o.data){s.buffer(c(o.data)),s.columns=o.data.length,s.count=o.data[0].length,s.bounds=[];for(var u=0;u<s.columns;u++)s.bounds[u]=a(o.data[u],1)}o.range&&(s.range=o.range,n=s.range&&\\\"number\\\"!=typeof s.range[0]),o.domain&&(s.domain=o.domain);var d=!1;null!=o.padding&&(Array.isArray(o.padding)&&o.padding.length===s.columns&&\\\"number\\\"==typeof o.padding[o.padding.length-1]?(s.padding=o.padding.map(p),d=!0):s.padding=p(o.padding));var g=s.columns,v=s.count,m=s.viewport.width,y=s.viewport.height,x=s.viewport.x,b=s.viewport.y,_=m/g,w=y/g;s.passes=[];for(var k=0;k<g;k++)for(var M=0;M<g;M++)if((s.diagonal||M!==k)&&(s.upper||!(k>M))&&(s.lower||!(k<M))){var A=f(s.id,k,M),T=this.passes[A]||(this.passes[A]={});if(o.data&&(o.transpose?T.positions={x:{buffer:s.buffer,offset:M,count:v,stride:g},y:{buffer:s.buffer,offset:k,count:v,stride:g}}:T.positions={x:{buffer:s.buffer,offset:M*v,count:v},y:{buffer:s.buffer,offset:k*v,count:v}},T.bounds=h(s.bounds,k,M)),o.domain||o.viewport||o.data){var S=d?h(s.padding,k,M):s.padding;if(s.domain){var C=h(s.domain,k,M),E=C[0],L=C[1],z=C[2],O=C[3];T.viewport=[x+E*m+S[0],b+L*y+S[1],x+z*m-S[2],b+O*y-S[3]]}else T.viewport=[x+M*_+_*S[0],b+k*w+w*S[1],x+(M+1)*_-_*S[2],b+(k+1)*w-w*S[3]]}o.color&&(T.color=s.color),o.size&&(T.size=s.size),o.marker&&(T.marker=s.marker),o.borderSize&&(T.borderSize=s.borderSize),o.borderColor&&(T.borderColor=s.borderColor),o.opacity&&(T.opacity=s.opacity),o.range&&(T.range=n?h(s.range,k,M):s.range||T.bounds),s.passes.push(A)}return this},u.prototype.draw=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=[],i=0;i<e.length;i++)if(\\\"number\\\"==typeof e[i]){var a=this.traces[e[i]],o=a.passes,l=a.passOffset;n.push.apply(n,s(l,l+o.length))}else if(e[i].length){var c=e[i],u=this.traces[i],f=u.passes,h=u.passOffset;f=f.map(function(t,e){n[h+e]=c})}(t=this.scatter).draw.apply(t,n)}else this.scatter.draw();return this},u.prototype.destroy=function(){return this.traces.forEach(function(t){t.buffer&&t.buffer.destroy&&t.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}},{\\\"array-bounds\\\":53,\\\"array-range\\\":55,\\\"flatten-vertex-data\\\":216,\\\"parse-rect\\\":442,\\\"pick-by-alias\\\":448,raf:467,\\\"regl-scatter2d/scatter\\\":476}],478:[function(t,e,r){var n,i;n=this,i=function(){function t(t,e){this.id=V++,this.type=t,this.data=e}function e(t){return\\\"[\\\"+function t(e){if(0===e.length)return[];var r=e.charAt(0),n=e.charAt(e.length-1);if(1<e.length&&r===n&&('\\\"'===r||\\\"'\\\"===r))return['\\\"'+e.substr(1,e.length-2).replace(/\\\\\\\\/g,\\\"\\\\\\\\\\\\\\\\\\\").replace(/\\\"/g,'\\\\\\\\\\\"')+'\\\"'];if(r=/\\\\[(false|true|null|\\\\d+|'[^']*'|\\\"[^\\\"]*\\\")\\\\]/.exec(e))return t(e.substr(0,r.index)).concat(t(r[1])).concat(t(e.substr(r.index+r[0].length)));if(1===(r=e.split(\\\".\\\")).length)return['\\\"'+e.replace(/\\\\\\\\/g,\\\"\\\\\\\\\\\\\\\\\\\").replace(/\\\"/g,'\\\\\\\\\\\"')+'\\\"'];for(e=[],n=0;n<r.length;++n)e=e.concat(t(r[n]));return e}(t).join(\\\"][\\\")+\\\"]\\\"}function r(t){return\\\"string\\\"==typeof t?t.split():t}function n(t){return\\\"string\\\"==typeof t?document.querySelector(t):t}function i(t){var e,i,a,o,s=t||{};t={};var l=[],c=[],u=\\\"undefined\\\"==typeof window?1:window.devicePixelRatio,f=!1,h=function(t){},p=function(){};if(\\\"string\\\"==typeof s?e=document.querySelector(s):\\\"object\\\"==typeof s&&(\\\"string\\\"==typeof s.nodeName&&\\\"function\\\"==typeof s.appendChild&&\\\"function\\\"==typeof s.getBoundingClientRect?e=s:\\\"function\\\"==typeof s.drawArrays||\\\"function\\\"==typeof s.drawElements?a=(o=s).canvas:(\\\"gl\\\"in s?o=s.gl:\\\"canvas\\\"in s?a=n(s.canvas):\\\"container\\\"in s&&(i=n(s.container)),\\\"attributes\\\"in s&&(t=s.attributes),\\\"extensions\\\"in s&&(l=r(s.extensions)),\\\"optionalExtensions\\\"in s&&(c=r(s.optionalExtensions)),\\\"onDone\\\"in s&&(h=s.onDone),\\\"profile\\\"in s&&(f=!!s.profile),\\\"pixelRatio\\\"in s&&(u=+s.pixelRatio))),e&&(\\\"canvas\\\"===e.nodeName.toLowerCase()?a=e:i=e),!o){if(!a){if(!(e=function(t,e,r){function n(){var e=window.innerWidth,n=window.innerHeight;t!==document.body&&(e=(n=t.getBoundingClientRect()).right-n.left,n=n.bottom-n.top),i.width=r*e,i.height=r*n,j(i.style,{width:e+\\\"px\\\",height:n+\\\"px\\\"})}var i=document.createElement(\\\"canvas\\\");return j(i.style,{border:0,margin:0,padding:0,top:0,left:0}),t.appendChild(i),t===document.body&&(i.style.position=\\\"absolute\\\",j(t.style,{margin:0,padding:0})),window.addEventListener(\\\"resize\\\",n,!1),n(),{canvas:i,onDestroy:function(){window.removeEventListener(\\\"resize\\\",n),t.removeChild(i)}}}(i||document.body,0,u)))return null;a=e.canvas,p=e.onDestroy}o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r(\\\"webgl\\\")||r(\\\"experimental-webgl\\\")||r(\\\"webgl-experimental\\\")}(a,t)}return o?{gl:o,canvas:a,container:i,extensions:l,optionalExtensions:c,pixelRatio:u,profile:f,onDone:h,onDestroy:p}:(p(),h(\\\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\\\"),null)}function a(t,e){for(var r=Array(t),n=0;n<t;++n)r[n]=e(n);return r}function o(t){var e,r;return e=(65535<t)<<4,e|=r=(255<(t>>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function s(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[o(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[o(t.byteLength)>>2].push(t)}var r=a(8,function(){return[]});return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function l(t){return!!t&&\\\"object\\\"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&\\\"number\\\"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||Y(t.data))}function c(t,e,r,n,i,a){for(var o=0;o<e;++o)for(var s=t[o],l=0;l<r;++l)for(var c=s[l],u=0;u<n;++u)i[a++]=c[u]}function u(t){return 0|$[Object.prototype.toString.call(t)]}function f(t,e){for(var r=0;r<e.length;++r)t[r]=e[r]}function h(t,e,r,n,i,a,o){for(var s=0,l=0;l<r;++l)for(var c=0;c<n;++c)t[s++]=e[i*l+a*c+o]}function p(t,e,r,n){function i(e){this.id=c++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&&(this.stats={size:0})}function a(e,r,n){e.byteLength=r.byteLength,t.bufferData(e.type,r,n)}function o(t,e,r,n,i,o){if(t.usage=r,Array.isArray(e)){if(t.dtype=n||5126,0<e.length)if(Array.isArray(e[0])){i=tt(e);for(var s=n=1;s<i.length;++s)n*=i[s];t.dimension=n,a(t,e=Q(e,i,t.dtype),r),o?t.persistentData=e:G.freeType(e)}else\\\"number\\\"==typeof e[0]?(t.dimension=i,f(i=G.allocType(t.dtype,e.length),e),a(t,i,r),o?t.persistentData=i:G.freeType(i)):Y(e[0])&&(t.dimension=e[0].length,t.dtype=n||u(e[0])||5126,a(t,e=Q(e,[e.length,e[0].length],t.dtype),r),o?t.persistentData=e:G.freeType(e))}else if(Y(e))t.dtype=n||u(e),t.dimension=i,a(t,e,r),o&&(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(l(e)){i=e.shape;var c=e.stride,p=(s=e.offset,0),d=0,g=0,v=0;1===i.length?(p=i[0],d=1,g=c[0],v=0):2===i.length&&(p=i[0],d=i[1],g=c[0],v=c[1]),t.dtype=n||u(e.data)||5126,t.dimension=d,h(i=G.allocType(t.dtype,p*d),e.data,p,d,g,v,s),a(t,i,r),o?t.persistentData=i:G.freeType(i)}}function s(r){e.bufferCount--;for(var i=0;i<n.state.length;++i){var a=n.state[i];a.buffer===r&&(t.disableVertexAttribArray(i),a.buffer=null)}t.deleteBuffer(r.buffer),r.buffer=null,delete p[r.id]}var c=0,p={};i.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},i.prototype.destroy=function(){s(this)};var d=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(p).forEach(function(e){t+=p[e].stats.size}),t}),{create:function(n,a,c,d){function g(e){var n=35044,i=null,a=0,s=0,c=1;return Array.isArray(e)||Y(e)||l(e)?i=e:\\\"number\\\"==typeof e?a=0|e:e&&(\\\"data\\\"in e&&(i=e.data),\\\"usage\\\"in e&&(n=K[e.usage]),\\\"type\\\"in e&&(s=J[e.type]),\\\"dimension\\\"in e&&(c=0|e.dimension),\\\"length\\\"in e&&(a=0|e.length)),v.bind(),i?o(v,i,n,s,c,d):(a&&t.bufferData(v.type,a,n),v.dtype=s||5121,v.usage=n,v.dimension=c,v.byteLength=a),r.profile&&(v.stats.size=v.byteLength*et[v.dtype]),g}e.bufferCount++;var v=new i(a);return p[v.id]=v,c||g(n),g._reglType=\\\"buffer\\\",g._buffer=v,g.subdata=function(e,r){var n,i=0|(r||0);if(v.bind(),Y(e))t.bufferSubData(v.type,i,e);else if(Array.isArray(e)){if(0<e.length)if(\\\"number\\\"==typeof e[0]){var a=G.allocType(v.dtype,e.length);f(a,e),t.bufferSubData(v.type,i,a),G.freeType(a)}else(Array.isArray(e[0])||Y(e[0]))&&(n=tt(e),a=Q(e,n,v.dtype),t.bufferSubData(v.type,i,a),G.freeType(a))}else if(l(e)){n=e.shape;var o=e.stride,s=a=0,c=0,p=0;1===n.length?(a=n[0],s=1,c=o[0],p=0):2===n.length&&(a=n[0],s=n[1],c=o[0],p=o[1]),n=Array.isArray(e.data)?v.dtype:u(e.data),h(n=G.allocType(n,a*s),e.data,a,s,c,p,e.offset),t.bufferSubData(v.type,i,n),G.freeType(n)}return g},r.profile&&(g.stats=v.stats),g.destroy=function(){s(v)},g},createStream:function(t,e){var r=d.pop();return r||(r=new i(t)),r.bind(),o(r,e,35040,0,1,!1),r},destroyStream:function(t){d.push(t)},clear:function(){X(p).forEach(s),d.forEach(s)},getBuffer:function(t){return t&&t._buffer instanceof i?t._buffer:null},restore:function(){X(p).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})},_initBuffer:o}}function d(t,e,r,n){function i(t){this.id=c++,s[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function a(n,i,a,o,s,c,u){if(n.buffer.bind(),i){var f=u;u||Y(i)&&(!l(i)||Y(i.data))||(f=e.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,f,3)}else t.bufferData(34963,c,a),n.buffer.dtype=f||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=c;if(f=u,!u){switch(n.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}n.buffer.dtype=f}n.type=f,0>(i=s)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=o,0>o&&(i=4,1===(o=n.buffer.dimension)&&(i=0),2===o&&(i=1),3===o&&(i=4)),n.primType=i}function o(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},c=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if(\\\"number\\\"==typeof t)c(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,h=0;Array.isArray(t)||Y(t)||l(t)?e=t:(\\\"data\\\"in t&&(e=t.data),\\\"usage\\\"in t&&(r=K[t.usage]),\\\"primitive\\\"in t&&(n=rt[t.primitive]),\\\"count\\\"in t&&(i=0|t.count),\\\"type\\\"in t&&(h=u[t.type]),\\\"length\\\"in t?o=0|t.length:(o=i,5123===h||5122===h?o*=2:5125!==h&&5124!==h||(o*=4))),a(f,e,r,n,i,o,h)}else c(),f.primType=4,f.vertCount=0,f.type=5121;return s}var c=r.create(null,34963,!0),f=new i(c._buffer);return n.elementsCount++,s(t),s._reglType=\\\"elements\\\",s._elements=f,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return\\\"function\\\"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){X(s).forEach(o)}}}function g(t){for(var e=G.allocType(5123,t.length),r=0;r<t.length;++r)if(isNaN(t[r]))e[r]=65535;else if(1/0===t[r])e[r]=31744;else if(-1/0===t[r])e[r]=64512;else{nt[0]=t[r];var n=(a=it[0])>>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;e[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15<i?n+31744:n+(i+15<<10)+a}return e}function v(t){return Array.isArray(t)||Y(t)}function m(t){return\\\"[object \\\"+t+\\\"]\\\"}function y(t){return Array.isArray(t)&&(0===t.length||\\\"number\\\"==typeof t[0])}function x(t){return!(!Array.isArray(t)||0===t.length||!v(t[0]))}function b(t){return Object.prototype.toString.call(t)}function _(t){if(!t)return!1;var e=b(t);return 0<=pt.indexOf(e)||(y(t)||x(t)||l(t))}function w(t,e){36193===t.type?(t.data=g(e),G.freeType(e)):t.data=e}function k(t,e,r,n,i,a){if(t=\\\"undefined\\\"!=typeof gt[t]?gt[t]:st[t]*dt[e],a&&(t*=6),i){for(n=0;1<=r;)n+=t*r*r,r/=2;return n}return t*r*n}function M(t,e,r,n,i,a,o){function s(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function c(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,e){if(\\\"object\\\"==typeof e&&e){\\\"premultiplyAlpha\\\"in e&&(t.premultiplyAlpha=e.premultiplyAlpha),\\\"flipY\\\"in e&&(t.flipY=e.flipY),\\\"alignment\\\"in e&&(t.unpackAlignment=e.alignment),\\\"colorSpace\\\"in e&&(t.colorSpace=q[e.colorSpace]),\\\"type\\\"in e&&(t.type=H[e.type]);var r=t.width,n=t.height,i=t.channels,a=!1;\\\"shape\\\"in e?(r=e.shape[0],n=e.shape[1],3===e.shape.length&&(i=e.shape[2],a=!0)):(\\\"radius\\\"in e&&(r=n=e.radius),\\\"width\\\"in e&&(r=e.width),\\\"height\\\"in e&&(n=e.height),\\\"channels\\\"in e&&(i=e.channels,a=!0)),t.width=0|r,t.height=0|n,t.channels=0|i,r=!1,\\\"format\\\"in e&&(r=e.format,n=t.internalformat=W[r],t.format=pt[n],r in H&&!(\\\"type\\\"in e)&&(t.type=H[r]),r in J&&(t.compressed=!0),r=!0),!a&&r?t.channels=st[t.format]:a&&!r&&t.channels!==ot[t.format]&&(t.format=t.internalformat=ot[t.channels])}}function f(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function p(t,e){var r=null;if(_(e)?r=e:e&&(u(t,e),\\\"x\\\"in e&&(t.xOffset=0|e.x),\\\"y\\\"in e&&(t.yOffset=0|e.y),_(e.data)&&(r=e.data)),e.copy){var n=i.viewportWidth,a=i.viewportHeight;t.width=t.width||n-t.xOffset,t.height=t.height||a-t.yOffset,t.needsCopy=!0}else if(r){if(Y(r))t.channels=t.channels||4,t.data=r,\\\"type\\\"in e||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(r)]);else if(y(r)){switch(t.channels=t.channels||4,a=(n=r).length,t.type){case 5121:case 5123:case 5125:case 5126:(a=G.allocType(t.type,a)).set(n),t.data=a;break;case 36193:t.data=g(n)}t.alignment=1,t.needsFree=!0}else if(l(r)){n=r.data,Array.isArray(n)||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(n)]);a=r.shape;var o,s,c,f,h=r.stride;3===a.length?(c=a[2],f=h[2]):f=c=1,o=a[0],s=a[1],a=h[0],h=h[1],t.alignment=1,t.width=o,t.height=s,t.channels=c,t.format=t.internalformat=ot[c],t.needsFree=!0,o=f,r=r.offset,c=t.width,f=t.height,s=t.channels;for(var p=G.allocType(36193===t.type?5126:t.type,c*f*s),d=0,m=0;m<f;++m)for(var k=0;k<c;++k)for(var M=0;M<s;++M)p[d++]=n[a*k+h*m+o*M+r];w(t,p)}else if(b(r)===lt||b(r)===ct)b(r)===lt?t.element=r:t.element=r.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(b(r)===ut)t.element=r,t.width=r.width,t.height=r.height,t.channels=4;else if(b(r)===ft)t.element=r,t.width=r.naturalWidth,t.height=r.naturalHeight,t.channels=4;else if(b(r)===ht)t.element=r,t.width=r.videoWidth,t.height=r.videoHeight,t.channels=4;else if(x(r)){for(n=t.width||r[0].length,a=t.height||r.length,h=t.channels,h=v(r[0][0])?h||r[0][0].length:h||1,o=Z.shape(r),c=1,f=0;f<o.length;++f)c*=o[f];c=G.allocType(36193===t.type?5126:t.type,c),Z.flatten(r,o,\\\"\\\",c),w(t,c),t.alignment=1,t.width=n,t.height=a,t.channels=h,t.format=t.internalformat=ot[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function d(e,r,i,a,o){var s=e.element,l=e.data,c=e.internalformat,u=e.format,h=e.type,p=e.width,d=e.height;f(e),s?t.texSubImage2D(r,o,i,a,u,h,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,c,p,d,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,p,d)):t.texSubImage2D(r,o,i,a,p,d,u,h,l)}function m(){return dt.pop()||new h}function M(t){t.needsFree&&G.freeType(t.data),h.call(t),dt.push(t)}function A(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function T(t,e,r){var n=t.images[0]=m();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function S(t,e){var r=null;if(_(e))c(r=t.images[0]=m(),t),p(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i<n.length;++i)c(r=t.images[i]=m(),t),r.width>>=i,r.height>>=i,p(r,n[i]),t.mipmask|=1<<i;else c(r=t.images[0]=m(),t),p(r,e),t.mipmask=1;c(t,t.images[0])}function C(e,r){for(var i=e.images,a=0;a<i.length&&i[a];++a){var o=i[a],s=r,l=a,c=o.element,u=o.data,h=o.internalformat,p=o.format,d=o.type,g=o.width,v=o.height,m=o.channels;f(o),c?t.texImage2D(s,l,p,p,d,c):o.compressed?t.compressedTexImage2D(s,l,h,g,v,0,u):o.needsCopy?(n(),t.copyTexImage2D(s,l,p,o.xOffset,o.yOffset,g,v,0)):((o=!u)&&(u=G.zero.allocType(d,g*v*m)),t.texImage2D(s,l,p,g,v,0,p,d,u),o&&u&&G.zero.freeType(u))}}function E(){var t=gt.pop()||new A;s.call(t);for(var e=t.mipmask=0;16>e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;r<e.length;++r)e[r]&&M(e[r]),e[r]=null;gt.push(t)}function z(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function O(t,e){\\\"min\\\"in e&&(t.minFilter=U[e.min],0<=at.indexOf(t.minFilter)&&!(\\\"faces\\\"in e)&&(t.genMipmaps=!0)),\\\"mag\\\"in e&&(t.magFilter=V[e.mag]);var r=t.wrapS,n=t.wrapT;if(\\\"wrap\\\"in e){var i=e.wrap;\\\"string\\\"==typeof i?r=n=N[i]:Array.isArray(i)&&(r=N[i[0]],n=N[i[1]])}else\\\"wrapS\\\"in e&&(r=N[e.wrapS]),\\\"wrapT\\\"in e&&(n=N[e.wrapT]);if(t.wrapS=r,t.wrapT=n,\\\"anisotropic\\\"in e&&(t.anisotropic=e.anisotropic),\\\"mipmap\\\"in e){switch(r=!1,typeof e.mipmap){case\\\"string\\\":t.mipmapHint=F[e.mipmap],r=t.genMipmaps=!0;break;case\\\"boolean\\\":r=t.genMipmaps=e.mipmap;break;case\\\"object\\\":t.genMipmaps=!1,r=!0}!r||\\\"min\\\"in e||(t.minFilter=9984)}}function I(r,n){t.texParameteri(n,10241,r.minFilter),t.texParameteri(n,10240,r.magFilter),t.texParameteri(n,10242,r.wrapS),t.texParameteri(n,10243,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,r.anisotropic),r.genMipmaps&&(t.hint(33170,r.mipmapHint),t.generateMipmap(n))}function P(e){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=vt++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new z,o.profile&&(this.stats={size:0})}function D(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function R(){var e=xt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function B(e){var r=e.texture,n=e.unit,i=e.target;0<=n&&(t.activeTexture(33984+n),t.bindTexture(i,null),xt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete mt[e.id],a.textureCount--}var F={\\\"don't care\\\":4352,\\\"dont care\\\":4352,nice:4354,fast:4353},N={repeat:10497,clamp:33071,mirror:33648},V={nearest:9728,linear:9729},U=j({mipmap:9987,\\\"nearest mipmap nearest\\\":9984,\\\"linear mipmap nearest\\\":9985,\\\"nearest mipmap linear\\\":9986,\\\"linear mipmap linear\\\":9987},V),q={none:0,browser:37444},H={uint8:5121,rgba4:32819,rgb565:33635,\\\"rgb5 a1\\\":32820},W={alpha:6406,luminance:6409,\\\"luminance alpha\\\":6410,rgb:6407,rgba:6408,rgba4:32854,\\\"rgb5 a1\\\":32855,rgb565:36194},J={};e.ext_srgb&&(W.srgb=35904,W.srgba=35906),e.oes_texture_float&&(H.float32=H.float=5126),e.oes_texture_half_float&&(H.float16=H[\\\"half float\\\"]=36193),e.webgl_depth_texture&&(j(W,{depth:6402,\\\"depth stencil\\\":34041}),j(H,{uint16:5123,uint32:5125,\\\"depth stencil\\\":34042})),e.webgl_compressed_texture_s3tc&&j(J,{\\\"rgb s3tc dxt1\\\":33776,\\\"rgba s3tc dxt1\\\":33777,\\\"rgba s3tc dxt3\\\":33778,\\\"rgba s3tc dxt5\\\":33779}),e.webgl_compressed_texture_atc&&j(J,{\\\"rgb atc\\\":35986,\\\"rgba atc explicit alpha\\\":35987,\\\"rgba atc interpolated alpha\\\":34798}),e.webgl_compressed_texture_pvrtc&&j(J,{\\\"rgb pvrtc 4bppv1\\\":35840,\\\"rgb pvrtc 2bppv1\\\":35841,\\\"rgba pvrtc 4bppv1\\\":35842,\\\"rgba pvrtc 2bppv1\\\":35843}),e.webgl_compressed_texture_etc1&&(J[\\\"rgb etc1\\\"]=36196);var K=Array.prototype.slice.call(t.getParameter(34467));Object.keys(J).forEach(function(t){var e=J[t];0<=K.indexOf(e)&&(W[t]=e)});var Q=Object.keys(W);r.textureFormats=Q;var tt=[];Object.keys(W).forEach(function(t){tt[W[t]]=t});var et=[];Object.keys(H).forEach(function(t){et[H[t]]=t});var rt=[];Object.keys(V).forEach(function(t){rt[V[t]]=t});var nt=[];Object.keys(U).forEach(function(t){nt[U[t]]=t});var it=[];Object.keys(N).forEach(function(t){it[N[t]]=t});var pt=Q.reduce(function(t,e){var r=W[e];return 6409===r||6406===r||6409===r||6410===r||6402===r||34041===r?t[r]=r:32855===r||0<=e.indexOf(\\\"rgba\\\")?t[r]=6408:t[r]=6407,t},{}),dt=[],gt=[],vt=0,mt={},yt=r.maxTextureUnits,xt=Array(yt).map(function(){return null});return j(P.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0>e){for(var r=0;r<yt;++r){var n=xt[r];if(n){if(0<n.bindCount)continue;n.unit=-1}xt[r]=this,e=r;break}o.profile&&a.maxTextureUnits<e+1&&(a.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&B(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(mt).forEach(function(e){t+=mt[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;z.call(r);var a=E();return\\\"number\\\"==typeof t?T(a,0|t,\\\"number\\\"==typeof e?0|e:0|t):t?(O(r,t),S(a,t)):T(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,c(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,D(i),C(a,3553),I(r,3553),R(),L(a),o.profile&&(i.stats.size=k(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=tt[i.internalformat],n.type=et[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new P(3553);return mt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=m();return c(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,D(i),d(o,3553,e,r,a),R(),M(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,D(i);for(var l,c=i.channels,u=i.type,f=0;i.mipmask>>f;++f){var h=a>>f,p=s>>f;if(!h||!p)break;l=G.zero.allocType(u,h*p*c),t.texImage2D(3553,f,i.format,h,p,0,i.format,i.type,l),l&&G.zero.freeType(l)}return R(),o.profile&&(i.stats.size=k(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType=\\\"texture2d\\\",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,l){function f(t,e,r,n,i,a){var s,l=h.texInfo;for(z.call(l),s=0;6>s;++s)g[s]=E();if(\\\"number\\\"!=typeof t&&t){if(\\\"object\\\"==typeof t)if(e)S(g[0],t),S(g[1],e),S(g[2],r),S(g[3],n),S(g[4],i),S(g[5],a);else if(O(l,t),u(h,t),\\\"faces\\\"in t)for(t=t.faces,s=0;6>s;++s)c(g[s],h),S(g[s],t[s]);else for(s=0;6>s;++s)S(g[s],t)}else for(t=0|t||1,s=0;6>s;++s)T(g[s],t,t);for(c(h,g[0]),h.mipmask=l.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,h.internalformat=g[0].internalformat,f.width=g[0].width,f.height=g[0].height,D(h),s=0;6>s;++s)C(g[s],34069+s);for(I(l,34067),R(),o.profile&&(h.stats.size=k(h.internalformat,h.type,f.width,f.height,l.genMipmaps,!0)),f.format=tt[h.internalformat],f.type=et[h.type],f.mag=rt[l.magFilter],f.min=nt[l.minFilter],f.wrapS=it[l.wrapS],f.wrapT=it[l.wrapT],s=0;6>s;++s)L(g[s]);return f}var h=new P(34067);mt[h.id]=h,a.cubeCount++;var g=Array(6);return f(e,r,n,i,s,l),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=m();return c(a,h),a.width=0,a.height=0,p(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,D(h),d(a,34069+t,r,n,i),R(),M(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,D(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return R(),o.profile&&(h.stats.size=k(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType=\\\"textureCube\\\",f._texture=h,o.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;e<yt;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),xt[e]=null;X(mt).forEach(B),a.cubeCount=0,a.textureCount=0},getTexture:function(t){return null},restore:function(){X(mt).forEach(function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var r=0;32>r;++r)if(0!=(e.mipmask&1<<r))if(3553===e.target)t.texImage2D(3553,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);I(e.texInfo,e.target)})}}}function A(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,i=t;return\\\"object\\\"==typeof t&&(i=t.data,\\\"target\\\"in t&&(e=0|t.target)),\\\"texture2d\\\"===(t=i._reglType)?r=i:\\\"textureCube\\\"===t?r=i:\\\"renderbuffer\\\"===t&&(n=i,e=36161),new o(e,r,n)}function f(t,e,r,a,s){return r?((t=n.create2D({width:t,height:e,format:a,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=i.create({width:t,height:e,format:a}))._renderbuffer.refCount=0,new o(36161,null,t))}function h(t){return t&&(t.texture||t.renderbuffer)}function p(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r))}function d(){this.id=k++,M[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function v(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete M[e.id]}function m(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;n<i.length;++n)c(36064+n,i[n]);for(n=i.length;n<r.maxColorAttachments;++n)t.framebufferTexture2D(36160,36064+n,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),c(36096,e.depthAttachment),c(36128,e.stencilAttachment),c(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.bindFramebuffer(36160,x.next?x.next.framebuffer:null),x.cur=x.next,t.getError()}function y(t,e){function r(t,e){var i,a=0,o=0,s=!0,c=!0;i=null;var p=!0,d=\\\"rgba\\\",v=\\\"uint8\\\",y=1,x=null,w=null,k=null,M=!1;\\\"number\\\"==typeof t?(a=0|t,o=0|e||a):t?(\\\"shape\\\"in t?(a=(o=t.shape)[0],o=o[1]):(\\\"radius\\\"in t&&(a=o=t.radius),\\\"width\\\"in t&&(a=t.width),\\\"height\\\"in t&&(o=t.height)),(\\\"color\\\"in t||\\\"colors\\\"in t)&&(i=t.color||t.colors,Array.isArray(i)),i||(\\\"colorCount\\\"in t&&(y=0|t.colorCount),\\\"colorTexture\\\"in t&&(p=!!t.colorTexture,d=\\\"rgba4\\\"),\\\"colorType\\\"in t&&(v=t.colorType,!p)&&(\\\"half float\\\"===v||\\\"float16\\\"===v?d=\\\"rgba16f\\\":\\\"float\\\"!==v&&\\\"float32\\\"!==v||(d=\\\"rgba32f\\\")),\\\"colorFormat\\\"in t&&(d=t.colorFormat,0<=b.indexOf(d)?p=!0:0<=_.indexOf(d)&&(p=!1))),(\\\"depthTexture\\\"in t||\\\"depthStencilTexture\\\"in t)&&(M=!(!t.depthTexture&&!t.depthStencilTexture)),\\\"depth\\\"in t&&(\\\"boolean\\\"==typeof t.depth?s=t.depth:(x=t.depth,c=!1)),\\\"stencil\\\"in t&&(\\\"boolean\\\"==typeof t.stencil?c=t.stencil:(w=t.stencil,s=!1)),\\\"depthStencil\\\"in t&&(\\\"boolean\\\"==typeof t.depthStencil?s=c=t.depthStencil:(k=t.depthStencil,c=s=!1))):a=o=1;var A=null,T=null,S=null,C=null;if(Array.isArray(i))A=i.map(u);else if(i)A=[u(i)];else for(A=Array(y),i=0;i<y;++i)A[i]=f(a,o,p,d,v);for(a=a||A[0].width,o=o||A[0].height,x?T=u(x):s&&!c&&(T=f(a,o,M,\\\"depth\\\",\\\"uint32\\\")),w?S=u(w):c&&!s&&(S=f(a,o,!1,\\\"stencil\\\",\\\"uint8\\\")),k?C=u(k):!x&&!w&&c&&s&&(C=f(a,o,M,\\\"depth stencil\\\",\\\"depth stencil\\\")),s=null,i=0;i<A.length;++i)l(A[i]),A[i]&&A[i].texture&&(c=yt[A[i].texture._texture.format]*xt[A[i].texture._texture.type],null===s&&(s=c));return l(T),l(S),l(C),g(n),n.width=a,n.height=o,n.colorAttachments=A,n.depthAttachment=T,n.stencilAttachment=S,n.depthStencilAttachment=C,r.color=A.map(h),r.depth=h(T),r.stencil=h(S),r.depthStencil=h(C),r.width=n.width,r.height=n.height,m(n),r}var n=new d;return a.framebufferCount++,r(t,e),j(r,{resize:function(t,e){var i=0|t,a=0|e||i;if(i===n.width&&a===n.height)return r;for(var o=n.colorAttachments,s=0;s<o.length;++s)p(o[s],i,a);return p(n.depthAttachment,i,a),p(n.stencilAttachment,i,a),p(n.depthStencilAttachment,i,a),n.width=r.width=i,n.height=r.height=a,m(n),r},_reglType:\\\"framebuffer\\\",_framebuffer:n,destroy:function(){v(n),g(n)},use:function(t){x.setFBO({framebuffer:r},t)}})}var x={cur:null,next:null,dirty:!1,setFBO:null},b=[\\\"rgba\\\"],_=[\\\"rgba4\\\",\\\"rgb565\\\",\\\"rgb5 a1\\\"];e.ext_srgb&&_.push(\\\"srgba\\\"),e.ext_color_buffer_half_float&&_.push(\\\"rgba16f\\\",\\\"rgb16f\\\"),e.webgl_color_buffer_float&&_.push(\\\"rgba32f\\\");var w=[\\\"uint8\\\"];e.oes_texture_half_float&&w.push(\\\"half float\\\",\\\"float16\\\"),e.oes_texture_float&&w.push(\\\"float\\\",\\\"float32\\\");var k=0,M={};return j(x,{getFramebuffer:function(t){return\\\"function\\\"==typeof t&&\\\"framebuffer\\\"===t._reglType&&(t=t._framebuffer)instanceof d?t:null},create:y,createCube:function(t){function e(t){var i,a={color:null},o=0,s=null;i=\\\"rgba\\\";var l=\\\"uint8\\\",c=1;if(\\\"number\\\"==typeof t?o=0|t:t?(\\\"shape\\\"in t?o=t.shape[0]:(\\\"radius\\\"in t&&(o=0|t.radius),\\\"width\\\"in t?o=0|t.width:\\\"height\\\"in t&&(o=0|t.height)),(\\\"color\\\"in t||\\\"colors\\\"in t)&&(s=t.color||t.colors,Array.isArray(s)),s||(\\\"colorCount\\\"in t&&(c=0|t.colorCount),\\\"colorType\\\"in t&&(l=t.colorType),\\\"colorFormat\\\"in t&&(i=t.colorFormat)),\\\"depth\\\"in t&&(a.depth=t.depth),\\\"stencil\\\"in t&&(a.stencil=t.stencil),\\\"depthStencil\\\"in t&&(a.depthStencil=t.depthStencil)):o=1,s)if(Array.isArray(s))for(t=[],i=0;i<s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(c),s={radius:o,format:i,type:l},i=0;i<c;++i)t[i]=n.createCube(s);for(a.color=Array(t.length),i=0;i<t.length;++i)c=t[i],o=o||c.width,a.color[i]={target:34069,data:t[i]};for(i=0;6>i;++i){for(c=0;c<t.length;++c)a.color[c].target=34069+i;0<i&&(a.depth=r[0].depth,a.stencil=r[0].stencil,a.depthStencil=r[0].depthStencil),r[i]?r[i](a):r[i]=y(a)}return j(e,{width:o,height:o,color:t})}var r=Array(6);return e(t),j(e,{faces:r,resize:function(t){var n=0|t;if(n===e.width)return e;var i=e.color;for(t=0;t<i.length;++t)i[t].resize(n);for(t=0;6>t;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:\\\"framebufferCube\\\",destroy:function(){r.forEach(function(t){t.destroy()})}})},clear:function(){X(M).forEach(v)},restore:function(){X(M).forEach(function(e){e.framebuffer=t.createFramebuffer(),m(e)})}})}function T(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function S(t,e,r,n){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;r<t.length;++r)if(t[r].id===e.id)return void(t[r].location=e.location);t.push(e)}function o(r,n,i){if(!(o=(i=35632===r?c:u)[n])){var a=e.str(n),o=t.createShader(r);t.shaderSource(o,a),t.compileShader(o),i[n]=o}return o}function s(t,e){this.id=p++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],n.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function l(r,s){var l,c;l=o(35632,r.fragId),c=o(35633,r.vertId);var u=r.program=t.createProgram();t.attachShader(u,l),t.attachShader(u,c),t.linkProgram(u);var f=t.getProgramParameter(u,35718);n.profile&&(r.stats.uniformsCount=f);var h=r.uniforms;for(l=0;l<f;++l)if(c=t.getActiveUniform(u,l))if(1<c.size)for(var p=0;p<c.size;++p){var d=c.name.replace(\\\"[0]\\\",\\\"[\\\"+p+\\\"]\\\");a(h,new i(d,e.id(d),t.getUniformLocation(u,d),c))}else a(h,new i(c.name,e.id(c.name),t.getUniformLocation(u,c.name),c));for(f=t.getProgramParameter(u,35721),n.profile&&(r.stats.attributesCount=f),h=r.attributes,l=0;l<f;++l)(c=t.getActiveAttrib(u,l))&&a(h,new i(c.name,e.id(c.name),t.getAttribLocation(u,c.name),c))}var c={},u={},f={},h=[],p=0;return n.profile&&(r.getMaxUniformsCount=function(){var t=0;return h.forEach(function(e){e.stats.uniformsCount>t&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);X(c).forEach(e),c={},X(u).forEach(e),u={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,f={},r.shaderCount=0},program:function(t,e,n){var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a),i[t]=a,h.push(a)),a},restore:function(){c={},u={};for(var t=0;t<h.length;++t)l(h[t])},shader:o,frag:-1,vert:-1}}function C(t,e,r,n,i,a,o){function s(i){var a;a=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var o=0,s=0,l=n.framebufferWidth,c=n.framebufferHeight,u=null;return Y(i)?u=i:i&&(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),c=0|(i.height||n.framebufferHeight-s),u=i.data||null),r(),i=l*c*4,u||(5121===a?u=new Uint8Array(i):5126===a&&(u=u||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(o,s,l,c,6408,a,u),u}return function(t){return t&&\\\"framebuffer\\\"in t?function(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=s(t)}),r}(t):s(t)}}function E(t){return Array.prototype.slice.call(t)}function L(t){return E(t).join(\\\"\\\")}function z(){function t(){var t=[],e=[];return j(function(){t.push.apply(t,E(arguments))},{def:function(){var n=\\\"v\\\"+r++;return e.push(n),0<arguments.length&&(t.push(n,\\\"=\\\"),t.push.apply(t,E(arguments)),t.push(\\\";\\\")),n},toString:function(){return L([0<e.length?\\\"var \\\"+e+\\\";\\\":\\\"\\\",L(t)])}})}function e(){function e(t,e){n(t,e,\\\"=\\\",r.def(t,e),\\\";\\\")}var r=t(),n=t(),i=r.toString,a=n.toString;return j(function(){r.apply(r,E(arguments))},{def:r.def,entry:r,exit:n,save:e,set:function(t,n,i){e(t,n),r(t,n,\\\"=\\\",i,\\\";\\\")},toString:function(){return i()+a()}})}var r=0,n=[],i=[],a=t(),o={};return{global:a,link:function(t){for(var e=0;e<i.length;++e)if(i[e]===t)return n[e];return e=\\\"g\\\"+r++,n.push(e),i.push(t),e},block:t,proc:function(t,r){function n(){var t=\\\"a\\\"+i.length;return i.push(t),t}var i=[];r=r||0;for(var a=0;a<r;++a)n();var s=(a=e()).toString;return o[t]=j(a,{arg:n,toString:function(){return L([\\\"function(\\\",i.join(),\\\"){\\\",s(),\\\"}\\\"])}})},scope:e,cond:function(){var t=L(arguments),r=e(),n=e(),i=r.toString,a=n.toString;return j(r,{then:function(){return r.apply(r,E(arguments)),this},else:function(){return n.apply(n,E(arguments)),this},toString:function(){var e=a();return e&&(e=\\\"else{\\\"+e+\\\"}\\\"),L([\\\"if(\\\",t,\\\"){\\\",i(),\\\"}\\\",e])}})},compile:function(){var t=['\\\"use strict\\\";',a,\\\"return {\\\"];Object.keys(o).forEach(function(e){t.push('\\\"',e,'\\\":',o[e].toString(),\\\",\\\")}),t.push(\\\"}\\\");var e=L(t).replace(/;/g,\\\";\\\\n\\\").replace(/}/g,\\\"}\\\\n\\\").replace(/{/g,\\\"{\\\\n\\\");return Function.apply(null,n.concat(e)).apply(null,i)}}}function O(t){return Array.isArray(t)||Y(t)||l(t)}function I(t){return t.sort(function(t,e){return\\\"viewport\\\"===t?-1:\\\"viewport\\\"===e?1:t<e?-1:1})}function P(t,e,r,n){this.thisDep=t,this.contextDep=e,this.propDep=r,this.append=n}function D(t){return t&&!(t.thisDep||t.contextDep||t.propDep)}function R(t){return new P(!1,!1,!1,t)}function B(t,e){var r=t.type;return 0===r?new P(!0,1<=(r=t.data.length),2<=r,e):4===r?new P((r=t.data).thisDep,r.contextDep,r.propDep,e):new P(3===r,2===r,1===r,e)}function F(t,e,r,n,i,o,s,l,c,u,f,h,p,d,g){function m(t){return t.replace(\\\".\\\",\\\"_\\\")}function y(t,e,r){var n=m(t);nt.push(t),et[n]=tt[n]=!!r,it[n]=e}function x(t,e,r){var n=m(t);nt.push(t),Array.isArray(r)?(tt[n]=r.slice(),et[n]=r.slice()):tt[n]=et[n]=r,at[n]=e}function b(){var t=z(),r=t.link,n=t.global;t.id=lt++,t.batchId=\\\"0\\\";var i=r(ot),a=t.shared={props:\\\"a0\\\"};Object.keys(ot).forEach(function(t){a[t]=n.def(i,\\\".\\\",t)});var o=t.next={},s=t.current={};Object.keys(at).forEach(function(t){Array.isArray(tt[t])&&(o[t]=n.def(a.next,\\\".\\\",t),s[t]=n.def(a.current,\\\".\\\",t))});var l=t.constants={};Object.keys(st).forEach(function(t){l[t]=n.def(JSON.stringify(st[t]))}),t.invoke=function(e,n){switch(n.type){case 0:var i=[\\\"this\\\",a.context,a.props,t.batchId];return e.def(r(n.data),\\\".call(\\\",i.slice(0,Math.max(n.data.length+1,4)),\\\")\\\");case 1:return e.def(a.props,n.data);case 2:return e.def(a.context,n.data);case 3:return e.def(\\\"this\\\",n.data);case 4:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){if((t=e.id(t))in c)return c[t];var n=u.scope[t];return n||(n=u.scope[t]=new Z),c[t]=r(n)},t}function _(t,e){var r=t.static,n=t.dynamic;if(\\\"framebuffer\\\"in r){var i=r.framebuffer;return i?(i=l.getFramebuffer(i),R(function(t,e){var r=t.link(i),n=t.shared;return e.set(n.framebuffer,\\\".next\\\",r),n=n.context,e.set(n,\\\".framebufferWidth\\\",r+\\\".width\\\"),e.set(n,\\\".framebufferHeight\\\",r+\\\".height\\\"),r})):R(function(t,e){var r=t.shared;return e.set(r.framebuffer,\\\".next\\\",\\\"null\\\"),r=r.context,e.set(r,\\\".framebufferWidth\\\",r+\\\".drawingBufferWidth\\\"),e.set(r,\\\".framebufferHeight\\\",r+\\\".drawingBufferHeight\\\"),\\\"null\\\"})}if(\\\"framebuffer\\\"in n){var a=n.framebuffer;return B(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer;r=e.def(i,\\\".getFramebuffer(\\\",r,\\\")\\\");return e.set(i,\\\".next\\\",r),n=n.context,e.set(n,\\\".framebufferWidth\\\",r+\\\"?\\\"+r+\\\".width:\\\"+n+\\\".drawingBufferWidth\\\"),e.set(n,\\\".framebufferHeight\\\",r+\\\"?\\\"+r+\\\".height:\\\"+n+\\\".drawingBufferHeight\\\"),r})}return null}function w(t){function r(t){if(t in n){var r=e.id(n[t]);return(t=R(function(){return r})).id=r,t}if(t in i){var a=i[t];return B(a,function(t,e){var r=t.invoke(e,a);return e.def(t.shared.strings,\\\".id(\\\",r,\\\")\\\")})}return null}var n=t.static,i=t.dynamic,a=r(\\\"frag\\\"),o=r(\\\"vert\\\"),s=null;return D(a)&&D(o)?(s=f.program(o.id,a.id),t=R(function(t,e){return t.link(s)})):t=new P(a&&a.thisDep||o&&o.thisDep,a&&a.contextDep||o&&o.contextDep,a&&a.propDep||o&&o.propDep,function(t,e){var r,n,i=t.shared.shader;return r=a?a.append(t,e):e.def(i,\\\".\\\",\\\"frag\\\"),n=o?o.append(t,e):e.def(i,\\\".\\\",\\\"vert\\\"),e.def(i+\\\".program(\\\"+n+\\\",\\\"+r+\\\")\\\")}),{frag:a,vert:o,progVar:t,program:s}}function k(t,e){function r(t,e){if(t in n){var r=0|n[t];return R(function(t,n){return e&&(t.OFFSET=r),r})}if(t in i){var o=i[t];return B(o,function(t,r){var n=t.invoke(r,o);return e&&(t.OFFSET=n),n})}return e&&a?R(function(t,e){return t.OFFSET=\\\"0\\\",0}):null}var n=t.static,i=t.dynamic,a=function(){if(\\\"elements\\\"in n){var t=n.elements;O(t)?t=o.getElements(o.create(t,!0)):t&&(t=o.getElements(t));var e=R(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n}return e.ELEMENTS=null});return e.value=t,e}if(\\\"elements\\\"in i){var r=i.elements;return B(r,function(t,e){var n=(i=t.shared).isBufferArgs,i=i.elements,a=t.invoke(e,r),o=e.def(\\\"null\\\");n=e.def(n,\\\"(\\\",a,\\\")\\\"),a=t.cond(n).then(o,\\\"=\\\",i,\\\".createStream(\\\",a,\\\");\\\").else(o,\\\"=\\\",i,\\\".getElements(\\\",a,\\\");\\\");return e.entry(a),e.exit(t.cond(n).then(i,\\\".destroyStream(\\\",o,\\\");\\\")),t.ELEMENTS=o})}return null}(),s=r(\\\"offset\\\",!0);return{elements:a,primitive:function(){if(\\\"primitive\\\"in n){var t=n.primitive;return R(function(e,r){return rt[t]})}if(\\\"primitive\\\"in i){var e=i.primitive;return B(e,function(t,r){var n=t.constants.primTypes,i=t.invoke(r,e);return r.def(n,\\\"[\\\",i,\\\"]\\\")})}return a?D(a)?a.value?R(function(t,e){return e.def(t.ELEMENTS,\\\".primType\\\")}):R(function(){return 4}):new P(a.thisDep,a.contextDep,a.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,\\\"?\\\",r,\\\".primType:\\\",4)}):null}(),count:function(){if(\\\"count\\\"in n){var t=0|n.count;return R(function(){return t})}if(\\\"count\\\"in i){var e=i.count;return B(e,function(t,r){return t.invoke(r,e)})}return a?D(a)?a?s?new P(s.thisDep,s.contextDep,s.propDep,function(t,e){return e.def(t.ELEMENTS,\\\".vertCount-\\\",t.OFFSET)}):R(function(t,e){return e.def(t.ELEMENTS,\\\".vertCount\\\")}):R(function(){return-1}):new P(a.thisDep||s.thisDep,a.contextDep||s.contextDep,a.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,\\\"?\\\",r,\\\".vertCount-\\\",t.OFFSET,\\\":-1\\\"):e.def(r,\\\"?\\\",r,\\\".vertCount:-1\\\")}):null}(),instances:r(\\\"instances\\\",!1),offset:s}}function M(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var r=n[t],a=e.id(t),s=new Z;if(O(r))s.state=1,s.buffer=i.getBuffer(i.create(r,34962,!1,!0)),s.type=0;else if(c=i.getBuffer(r))s.state=1,s.buffer=c,s.type=0;else if(\\\"constant\\\"in r){var l=r.constant;s.buffer=\\\"null\\\",s.state=2,\\\"number\\\"==typeof l?s.x=l:bt.forEach(function(t,e){e<l.length&&(s[t]=l[e])})}else{var c=O(r.buffer)?i.getBuffer(i.create(r.buffer,34962,!1,!0)):i.getBuffer(r.buffer),u=0|r.offset,f=0|r.stride,h=0|r.size,p=!!r.normalized,d=0;\\\"type\\\"in r&&(d=J[r.type]),r=0|r.divisor,s.buffer=c,s.state=1,s.size=h,s.normalized=p,s.type=d||c.dtype,s.offset=u,s.stride=f,s.divisor=r}o[t]=R(function(t,e){var r=t.attribCache;if(a in r)return r[a];var n={isStream:!1};return Object.keys(s).forEach(function(t){n[t]=s[t]}),s.buffer&&(n.buffer=t.link(s.buffer),n.type=n.type||n.buffer+\\\".dtype\\\"),r[a]=n})}),Object.keys(a).forEach(function(t){var e=a[t];o[t]=B(e,function(t,r){function n(t){r(l[t],\\\"=\\\",i,\\\".\\\",t,\\\"|0;\\\")}var i=t.invoke(r,e),a=t.shared,o=a.isBufferArgs,s=a.buffer,l={isStream:r.def(!1)},c=new Z;c.state=1,Object.keys(c).forEach(function(t){l[t]=r.def(\\\"\\\"+c[t])});var u=l.buffer,f=l.type;return r(\\\"if(\\\",o,\\\"(\\\",i,\\\")){\\\",l.isStream,\\\"=true;\\\",u,\\\"=\\\",s,\\\".createStream(\\\",34962,\\\",\\\",i,\\\");\\\",f,\\\"=\\\",u,\\\".dtype;\\\",\\\"}else{\\\",u,\\\"=\\\",s,\\\".getBuffer(\\\",i,\\\");\\\",\\\"if(\\\",u,\\\"){\\\",f,\\\"=\\\",u,\\\".dtype;\\\",'}else if(\\\"constant\\\" in ',i,\\\"){\\\",l.state,\\\"=\\\",2,\\\";\\\",\\\"if(typeof \\\"+i+'.constant === \\\"number\\\"){',l[bt[0]],\\\"=\\\",i,\\\".constant;\\\",bt.slice(1).map(function(t){return l[t]}).join(\\\"=\\\"),\\\"=0;\\\",\\\"}else{\\\",bt.map(function(t,e){return l[t]+\\\"=\\\"+i+\\\".constant.length>\\\"+e+\\\"?\\\"+i+\\\".constant[\\\"+e+\\\"]:0;\\\"}).join(\\\"\\\"),\\\"}}else{\\\",\\\"if(\\\",o,\\\"(\\\",i,\\\".buffer)){\\\",u,\\\"=\\\",s,\\\".createStream(\\\",34962,\\\",\\\",i,\\\".buffer);\\\",\\\"}else{\\\",u,\\\"=\\\",s,\\\".getBuffer(\\\",i,\\\".buffer);\\\",\\\"}\\\",f,'=\\\"type\\\" in ',i,\\\"?\\\",a.glTypes,\\\"[\\\",i,\\\".type]:\\\",u,\\\".dtype;\\\",l.normalized,\\\"=!!\\\",i,\\\".normalized;\\\"),n(\\\"size\\\"),n(\\\"offset\\\"),n(\\\"stride\\\"),n(\\\"divisor\\\"),r(\\\"}}\\\"),r.exit(\\\"if(\\\",l.isStream,\\\"){\\\",s,\\\".destroyStream(\\\",u,\\\");\\\",\\\"}\\\"),l})}),o}function A(t,e,r,n,i){var o=_(t),s=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return\\\"width\\\"in r?n=0|r.width:t=!1,\\\"height\\\"in r?o=0|r.height:t=!1,new P(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var i=t.shared.context,a=n;\\\"width\\\"in r||(a=e.def(i,\\\".\\\",\\\"framebufferWidth\\\",\\\"-\\\",s));var c=o;return\\\"height\\\"in r||(c=e.def(i,\\\".\\\",\\\"framebufferHeight\\\",\\\"-\\\",l)),[s,l,a,c]})}if(t in a){var c=a[t];return t=B(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,i=e.def(r,\\\".x|0\\\"),a=e.def(r,\\\".y|0\\\");return[i,a,e.def('\\\"width\\\" in ',r,\\\"?\\\",r,\\\".width|0:\\\",\\\"(\\\",n,\\\".\\\",\\\"framebufferWidth\\\",\\\"-\\\",i,\\\")\\\"),r=e.def('\\\"height\\\" in ',r,\\\"?\\\",r,\\\".height|0:\\\",\\\"(\\\",n,\\\".\\\",\\\"framebufferHeight\\\",\\\"-\\\",a,\\\")\\\")]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new P(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,\\\".\\\",\\\"framebufferWidth\\\"),e.def(r,\\\".\\\",\\\"framebufferHeight\\\")]}):null}var i=t.static,a=t.dynamic;if(t=n(\\\"viewport\\\")){var o=t;t=new P(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,\\\".viewportWidth\\\",r[2]),e.set(n,\\\".viewportHeight\\\",r[3]),r})}return{viewport:t,scissor_box:n(\\\"scissor.box\\\")}}(t,o),l=k(t),c=function(t,e){var r=t.static,n=t.dynamic,i={};return nt.forEach(function(t){function e(e,a){if(t in r){var s=e(r[t]);i[o]=R(function(){return s})}else if(t in n){var l=n[t];i[o]=B(l,function(t,e){return a(t,e,t.invoke(e,l))})}}var o=m(t);switch(t){case\\\"cull.enable\\\":case\\\"blend.enable\\\":case\\\"dither\\\":case\\\"stencil.enable\\\":case\\\"depth.enable\\\":case\\\"scissor.enable\\\":case\\\"polygonOffset.enable\\\":case\\\"sample.alpha\\\":case\\\"sample.enable\\\":case\\\"depth.mask\\\":return e(function(t){return t},function(t,e,r){return r});case\\\"depth.func\\\":return e(function(t){return kt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,\\\"[\\\",r,\\\"]\\\")});case\\\"depth.range\\\":return e(function(t){return t},function(t,e,r){return[e.def(\\\"+\\\",r,\\\"[0]\\\"),e=e.def(\\\"+\\\",r,\\\"[1]\\\")]});case\\\"blend.func\\\":return e(function(t){return[wt[\\\"srcRGB\\\"in t?t.srcRGB:t.src],wt[\\\"dstRGB\\\"in t?t.dstRGB:t.dst],wt[\\\"srcAlpha\\\"in t?t.srcAlpha:t.src],wt[\\\"dstAlpha\\\"in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('\\\"',t,n,'\\\" in ',r,\\\"?\\\",r,\\\".\\\",t,n,\\\":\\\",r,\\\".\\\",t)}t=t.constants.blendFuncs;var i=n(\\\"src\\\",\\\"RGB\\\"),a=n(\\\"dst\\\",\\\"RGB\\\"),o=(i=e.def(t,\\\"[\\\",i,\\\"]\\\"),e.def(t,\\\"[\\\",n(\\\"src\\\",\\\"Alpha\\\"),\\\"]\\\"));return[i,a=e.def(t,\\\"[\\\",a,\\\"]\\\"),o,t=e.def(t,\\\"[\\\",n(\\\"dst\\\",\\\"Alpha\\\"),\\\"]\\\")]});case\\\"blend.equation\\\":return e(function(t){return\\\"string\\\"==typeof t?[$[t],$[t]]:\\\"object\\\"==typeof t?[$[t.rgb],$[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond(\\\"typeof \\\",r,'===\\\"string\\\"')).then(i,\\\"=\\\",a,\\\"=\\\",n,\\\"[\\\",r,\\\"];\\\"),t.else(i,\\\"=\\\",n,\\\"[\\\",r,\\\".rgb];\\\",a,\\\"=\\\",n,\\\"[\\\",r,\\\".alpha];\\\"),e(t),[i,a]});case\\\"blend.color\\\":return e(function(t){return a(4,function(e){return+t[e]})},function(t,e,r){return a(4,function(t){return e.def(\\\"+\\\",r,\\\"[\\\",t,\\\"]\\\")})});case\\\"stencil.mask\\\":return e(function(t){return 0|t},function(t,e,r){return e.def(r,\\\"|0\\\")});case\\\"stencil.func\\\":return e(function(t){return[kt[t.cmp||\\\"keep\\\"],t.ref||0,\\\"mask\\\"in t?t.mask:-1]},function(t,e,r){return[t=e.def('\\\"cmp\\\" in ',r,\\\"?\\\",t.constants.compareFuncs,\\\"[\\\",r,\\\".cmp]\\\",\\\":\\\",7680),e.def(r,\\\".ref|0\\\"),e=e.def('\\\"mask\\\" in ',r,\\\"?\\\",r,\\\".mask|0:-1\\\")]});case\\\"stencil.opFront\\\":case\\\"stencil.opBack\\\":return e(function(e){return[\\\"stencil.opBack\\\"===t?1029:1028,Mt[e.fail||\\\"keep\\\"],Mt[e.zfail||\\\"keep\\\"],Mt[e.zpass||\\\"keep\\\"]]},function(e,r,n){function i(t){return r.def('\\\"',t,'\\\" in ',n,\\\"?\\\",a,\\\"[\\\",n,\\\".\\\",t,\\\"]:\\\",7680)}var a=e.constants.stencilOps;return[\\\"stencil.opBack\\\"===t?1029:1028,i(\\\"fail\\\"),i(\\\"zfail\\\"),i(\\\"zpass\\\")]});case\\\"polygonOffset.offset\\\":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return[e.def(r,\\\".factor|0\\\"),e=e.def(r,\\\".units|0\\\")]});case\\\"cull.face\\\":return e(function(t){var e=0;return\\\"front\\\"===t?e=1028:\\\"back\\\"===t&&(e=1029),e},function(t,e,r){return e.def(r,'===\\\"front\\\"?',1028,\\\":\\\",1029)});case\\\"lineWidth\\\":return e(function(t){return t},function(t,e,r){return r});case\\\"frontFace\\\":return e(function(t){return At[t]},function(t,e,r){return e.def(r+'===\\\"cw\\\"?2304:2305')});case\\\"colorMask\\\":return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return a(4,function(t){return\\\"!!\\\"+r+\\\"[\\\"+t+\\\"]\\\"})});case\\\"sample.coverage\\\":return e(function(t){return[\\\"value\\\"in t?t.value:1,!!t.invert]},function(t,e,r){return[e.def('\\\"value\\\" in ',r,\\\"?+\\\",r,\\\".value:1\\\"),e=e.def(\\\"!!\\\",r,\\\".invert\\\")]})}}),i}(t),u=w(t),f=s.viewport;return f&&(c.viewport=f),(s=s[f=m(\\\"scissor.box\\\")])&&(c[f]=s),(o={framebuffer:o,draw:l,shader:u,state:c,dirty:s=0<Object.keys(c).length}).profile=function(t){var e,r=t.static;if(t=t.dynamic,\\\"profile\\\"in r){var n=!!r.profile;(e=R(function(t,e){return n})).enable=n}else if(\\\"profile\\\"in t){var i=t.profile;e=B(i,function(t,e){return t.invoke(e,i)})}return e}(t),o.uniforms=function(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var e,n=r[t];if(\\\"number\\\"==typeof n||\\\"boolean\\\"==typeof n)e=R(function(){return n});else if(\\\"function\\\"==typeof n){var o=n._reglType;\\\"texture2d\\\"===o||\\\"textureCube\\\"===o?e=R(function(t){return t.link(n)}):\\\"framebuffer\\\"!==o&&\\\"framebufferCube\\\"!==o||(e=R(function(t){return t.link(n.color[0])}))}else v(n)&&(e=R(function(t){return t.global.def(\\\"[\\\",a(n.length,function(t){return n[t]}),\\\"]\\\")}));e.value=n,i[t]=e}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=B(e,function(t,r){return t.invoke(r,e)})}),i}(r),o.attributes=M(e),o.context=function(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=R(function(t,e){return\\\"number\\\"==typeof r||\\\"boolean\\\"==typeof r?\\\"\\\"+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=B(e,function(t,r){return t.invoke(r,e)})}),n}(n),o}function T(t,e,r){var n=t.shared.context,i=t.scope();Object.keys(r).forEach(function(a){e.save(n,\\\".\\\"+a),i(n,\\\".\\\",a,\\\"=\\\",r[a].append(t,e),\\\";\\\")}),e(i)}function S(t,e,r,n){var i,a=(s=t.shared).gl,o=s.framebuffer;Q&&(i=e.def(s.extensions,\\\".webgl_draw_buffers\\\"));var s=(l=t.constants).drawBuffer,l=l.backBuffer;t=r?r.append(t,e):e.def(o,\\\".next\\\"),n||e(\\\"if(\\\",t,\\\"!==\\\",o,\\\".cur){\\\"),e(\\\"if(\\\",t,\\\"){\\\",a,\\\".bindFramebuffer(\\\",36160,\\\",\\\",t,\\\".framebuffer);\\\"),Q&&e(i,\\\".drawBuffersWEBGL(\\\",s,\\\"[\\\",t,\\\".colorAttachments.length]);\\\"),e(\\\"}else{\\\",a,\\\".bindFramebuffer(\\\",36160,\\\",null);\\\"),Q&&e(i,\\\".drawBuffersWEBGL(\\\",l,\\\");\\\"),e(\\\"}\\\",o,\\\".cur=\\\",t,\\\";\\\"),n||e(\\\"}\\\")}function C(t,e,r){var n=t.shared,i=n.gl,o=t.current,s=t.next,l=n.current,c=n.next,u=t.cond(l,\\\".dirty\\\");nt.forEach(function(e){var n,f;if(!((e=m(e))in r.state))if(e in s){n=s[e],f=o[e];var h=a(tt[e].length,function(t){return u.def(n,\\\"[\\\",t,\\\"]\\\")});u(t.cond(h.map(function(t,e){return t+\\\"!==\\\"+f+\\\"[\\\"+e+\\\"]\\\"}).join(\\\"||\\\")).then(i,\\\".\\\",at[e],\\\"(\\\",h,\\\");\\\",h.map(function(t,e){return f+\\\"[\\\"+e+\\\"]=\\\"+t}).join(\\\";\\\"),\\\";\\\"))}else n=u.def(c,\\\".\\\",e),h=t.cond(n,\\\"!==\\\",l,\\\".\\\",e),u(h),e in it?h(t.cond(n).then(i,\\\".enable(\\\",it[e],\\\");\\\").else(i,\\\".disable(\\\",it[e],\\\");\\\"),l,\\\".\\\",e,\\\"=\\\",n,\\\";\\\"):h(i,\\\".\\\",at[e],\\\"(\\\",n,\\\");\\\",l,\\\".\\\",e,\\\"=\\\",n,\\\";\\\")}),0===Object.keys(r.state).length&&u(l,\\\".dirty=false;\\\"),e(u)}function E(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;I(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var c=l.append(t,e);if(it[i]){var u=it[i];D(l)?e(s,c?\\\".enable(\\\":\\\".disable(\\\",u,\\\");\\\"):e(t.cond(c).then(s,\\\".enable(\\\",u,\\\");\\\").else(s,\\\".disable(\\\",u,\\\");\\\")),e(o,\\\".\\\",i,\\\"=\\\",c,\\\";\\\")}else if(v(c)){var f=a[i];e(s,\\\".\\\",at[i],\\\"(\\\",c,\\\");\\\",c.map(function(t,e){return f+\\\"[\\\"+e+\\\"]=\\\"+t}).join(\\\";\\\"),\\\";\\\")}else e(s,\\\".\\\",at[i],\\\"(\\\",c,\\\");\\\",o,\\\".\\\",i,\\\"=\\\",c,\\\";\\\")}})}function L(t,e){K&&(t.instancing=e.def(t.shared.extensions,\\\".angle_instanced_arrays\\\"))}function F(t,e,r,n,i){function a(){return\\\"undefined\\\"==typeof performance?\\\"Date.now()\\\":\\\"performance.now()\\\"}function o(t){t(c=e.def(),\\\"=\\\",a(),\\\";\\\"),\\\"string\\\"==typeof i?t(h,\\\".count+=\\\",i,\\\";\\\"):t(h,\\\".count++;\\\"),d&&(n?t(u=e.def(),\\\"=\\\",g,\\\".getNumPendingQueries();\\\"):t(g,\\\".beginQuery(\\\",h,\\\");\\\"))}function s(t){t(h,\\\".cpuTime+=\\\",a(),\\\"-\\\",c,\\\";\\\"),d&&(n?t(g,\\\".pushScopeStats(\\\",u,\\\",\\\",g,\\\".getNumPendingQueries(),\\\",h,\\\");\\\"):t(g,\\\".endQuery();\\\"))}function l(t){var r=e.def(p,\\\".profile\\\");e(p,\\\".profile=\\\",t,\\\";\\\"),e.exit(p,\\\".profile=\\\",r,\\\";\\\")}var c,u,f=t.shared,h=t.stats,p=f.current,g=f.timer;if(r=r.profile){if(D(r))return void(r.enable?(o(e),s(e.exit),l(\\\"true\\\")):l(\\\"false\\\"));l(r=r.append(t,e))}else r=e.def(p,\\\".profile\\\");o(f=t.block()),e(\\\"if(\\\",r,\\\"){\\\",f,\\\"}\\\"),s(t=t.block()),e.exit(\\\"if(\\\",r,\\\"){\\\",t,\\\"}\\\")}function N(t,e,r,n,i){function a(r,n,i){function a(){e(\\\"if(!\\\",u,\\\".buffer){\\\",l,\\\".enableVertexAttribArray(\\\",c,\\\");}\\\");var r,a=i.type;r=i.size?e.def(i.size,\\\"||\\\",n):n,e(\\\"if(\\\",u,\\\".type!==\\\",a,\\\"||\\\",u,\\\".size!==\\\",r,\\\"||\\\",p.map(function(t){return u+\\\".\\\"+t+\\\"!==\\\"+i[t]}).join(\\\"||\\\"),\\\"){\\\",l,\\\".bindBuffer(\\\",34962,\\\",\\\",f,\\\".buffer);\\\",l,\\\".vertexAttribPointer(\\\",[c,r,a,i.normalized,i.stride,i.offset],\\\");\\\",u,\\\".type=\\\",a,\\\";\\\",u,\\\".size=\\\",r,\\\";\\\",p.map(function(t){return u+\\\".\\\"+t+\\\"=\\\"+i[t]+\\\";\\\"}).join(\\\"\\\"),\\\"}\\\"),K&&(a=i.divisor,e(\\\"if(\\\",u,\\\".divisor!==\\\",a,\\\"){\\\",t.instancing,\\\".vertexAttribDivisorANGLE(\\\",[c,a],\\\");\\\",u,\\\".divisor=\\\",a,\\\";}\\\"))}function s(){e(\\\"if(\\\",u,\\\".buffer){\\\",l,\\\".disableVertexAttribArray(\\\",c,\\\");\\\",\\\"}if(\\\",bt.map(function(t,e){return u+\\\".\\\"+t+\\\"!==\\\"+h[e]}).join(\\\"||\\\"),\\\"){\\\",l,\\\".vertexAttrib4f(\\\",c,\\\",\\\",h,\\\");\\\",bt.map(function(t,e){return u+\\\".\\\"+t+\\\"=\\\"+h[e]+\\\";\\\"}).join(\\\"\\\"),\\\"}\\\")}var l=o.gl,c=e.def(r,\\\".location\\\"),u=e.def(o.attributes,\\\"[\\\",c,\\\"]\\\");r=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],p=[\\\"buffer\\\",\\\"normalized\\\",\\\"offset\\\",\\\"stride\\\"];1===r?a():2===r?s():(e(\\\"if(\\\",r,\\\"===\\\",1,\\\"){\\\"),a(),e(\\\"}else{\\\"),s(),e(\\\"}\\\"))}var o=t.shared;n.forEach(function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(t,e)}else{if(!i(Tt))return;var c=t.scopeAttrib(s);o={},Object.keys(new Z).forEach(function(t){o[t]=e.def(c,\\\".\\\",t)})}a(t.link(n),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)})}function j(t,r,n,i,o){for(var s,l=t.shared,c=l.gl,u=0;u<i.length;++u){var f,h=(g=i[u]).name,p=g.info.type,d=n.uniforms[h],g=t.link(g)+\\\".location\\\";if(d){if(!o(d))continue;if(D(d)){if(h=d.value,35678===p||35680===p)r(c,\\\".uniform1i(\\\",g,\\\",\\\",(p=t.link(h._texture||h.color[0]._texture))+\\\".bind());\\\"),r.exit(p,\\\".unbind();\\\");else if(35674===p||35675===p||35676===p)d=2,35675===p?d=3:35676===p&&(d=4),r(c,\\\".uniformMatrix\\\",d,\\\"fv(\\\",g,\\\",false,\\\",h=t.global.def(\\\"new Float32Array([\\\"+Array.prototype.slice.call(h)+\\\"])\\\"),\\\");\\\");else{switch(p){case 5126:s=\\\"1f\\\";break;case 35664:s=\\\"2f\\\";break;case 35665:s=\\\"3f\\\";break;case 35666:s=\\\"4f\\\";break;case 35670:case 5124:s=\\\"1i\\\";break;case 35671:case 35667:s=\\\"2i\\\";break;case 35672:case 35668:s=\\\"3i\\\";break;case 35673:s=\\\"4i\\\";break;case 35669:s=\\\"4i\\\"}r(c,\\\".uniform\\\",s,\\\"(\\\",g,\\\",\\\",v(h)?Array.prototype.slice.call(h):h,\\\");\\\")}continue}f=d.append(t,r)}else{if(!o(Tt))continue;f=r.def(l.uniforms,\\\"[\\\",e.id(h),\\\"]\\\")}switch(35678===p?r(\\\"if(\\\",f,\\\"&&\\\",f,'._reglType===\\\"framebuffer\\\"){',f,\\\"=\\\",f,\\\".color[0];\\\",\\\"}\\\"):35680===p&&r(\\\"if(\\\",f,\\\"&&\\\",f,'._reglType===\\\"framebufferCube\\\"){',f,\\\"=\\\",f,\\\".color[0];\\\",\\\"}\\\"),h=1,p){case 35678:case 35680:p=r.def(f,\\\"._texture\\\"),r(c,\\\".uniform1i(\\\",g,\\\",\\\",p,\\\".bind());\\\"),r.exit(p,\\\".unbind();\\\");continue;case 5124:case 35670:s=\\\"1i\\\";break;case 35667:case 35671:s=\\\"2i\\\",h=2;break;case 35668:case 35672:s=\\\"3i\\\",h=3;break;case 35669:case 35673:s=\\\"4i\\\",h=4;break;case 5126:s=\\\"1f\\\";break;case 35664:s=\\\"2f\\\",h=2;break;case 35665:s=\\\"3f\\\",h=3;break;case 35666:s=\\\"4f\\\",h=4;break;case 35674:s=\\\"Matrix2fv\\\";break;case 35675:s=\\\"Matrix3fv\\\";break;case 35676:s=\\\"Matrix4fv\\\"}if(r(c,\\\".uniform\\\",s,\\\"(\\\",g,\\\",\\\"),\\\"M\\\"===s.charAt(0)){g=Math.pow(p-35674+2,2);var m=t.global.def(\\\"new Float32Array(\\\",g,\\\")\\\");r(\\\"false,(Array.isArray(\\\",f,\\\")||\\\",f,\\\" instanceof Float32Array)?\\\",f,\\\":(\\\",a(g,function(t){return m+\\\"[\\\"+t+\\\"]=\\\"+f+\\\"[\\\"+t+\\\"]\\\"}),\\\",\\\",m,\\\")\\\")}else r(1<h?a(h,function(t){return f+\\\"[\\\"+t+\\\"]\\\"}):f);r(\\\");\\\")}}function V(t,e,r,n){function i(i){var a=h[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(f,\\\".\\\",i)}function a(){function t(){r(l,\\\".drawElementsInstancedANGLE(\\\",[d,v,m,g+\\\"<<((\\\"+m+\\\"-5121)>>1)\\\",s],\\\");\\\")}function e(){r(l,\\\".drawArraysInstancedANGLE(\\\",[d,g,v,s],\\\");\\\")}p?y?t():(r(\\\"if(\\\",p,\\\"){\\\"),t(),r(\\\"}else{\\\"),e(),r(\\\"}\\\")):e()}function o(){function t(){r(u+\\\".drawElements(\\\"+[d,v,m,g+\\\"<<((\\\"+m+\\\"-5121)>>1)\\\"]+\\\");\\\")}function e(){r(u+\\\".drawArrays(\\\"+[d,g,v]+\\\");\\\")}p?y?t():(r(\\\"if(\\\",p,\\\"){\\\"),t(),r(\\\"}else{\\\"),e(),r(\\\"}\\\")):e()}var s,l,c=t.shared,u=c.gl,f=c.draw,h=n.draw,p=function(){var i=h.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,\\\".\\\",\\\"elements\\\"),i&&a(\\\"if(\\\"+i+\\\")\\\"+u+\\\".bindBuffer(34963,\\\"+i+\\\".buffer.buffer);\\\"),i}(),d=i(\\\"primitive\\\"),g=i(\\\"offset\\\"),v=function(){var i=h.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,\\\".\\\",\\\"count\\\"),i}();if(\\\"number\\\"==typeof v){if(0===v)return}else r(\\\"if(\\\",v,\\\"){\\\"),r.exit(\\\"}\\\");K&&(s=i(\\\"instances\\\"),l=t.instancing);var m=p+\\\".type\\\",y=h.elements&&D(h.elements);K&&(\\\"number\\\"!=typeof s||0<=s)?\\\"string\\\"==typeof s?(r(\\\"if(\\\",s,\\\">0){\\\"),a(),r(\\\"}else if(\\\",s,\\\"<0){\\\"),o(),r(\\\"}\\\")):a():o()}function q(t,e,r,n,i){return i=(e=b()).proc(\\\"body\\\",i),K&&(e.instancing=i.def(e.shared.extensions,\\\".angle_instanced_arrays\\\")),t(e,i,r,n),e.compile().body}function H(t,e,r,n){L(t,e),N(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),V(t,e,e,r)}function G(t,e,r,n){function i(){return!0}t.batchId=\\\"a1\\\",L(t,e),N(t,e,r,n.attributes,i),j(t,e,r,n.uniforms,i),V(t,e,e,r)}function W(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,\\\"for(\\\",s,\\\"=0;\\\",s,\\\"<\\\",\\\"a1\\\",\\\";++\\\",s,\\\"){\\\",l,\\\"=\\\",\\\"a0\\\",\\\"[\\\",s,\\\"];\\\",u,\\\"}\\\",c.exit),r.needsContext&&T(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),E(t,u,r.state,i),r.profile&&i(r.profile)&&F(t,u,r,!1,!0),n?(N(t,c,r,n.attributes,a),N(t,u,r,n.attributes,i),j(t,c,r,n.uniforms,a),j(t,u,r,n.uniforms,i),V(t,c,u,r)):(e=t.global.def(\\\"{}\\\"),n=r.shader.progVar.append(t,u),l=u.def(n,\\\".id\\\"),c=u.def(e,\\\"[\\\",l,\\\"]\\\"),u(t.shared.gl,\\\".useProgram(\\\",n,\\\".program);\\\",\\\"if(!\\\",c,\\\"){\\\",c,\\\"=\\\",e,\\\"[\\\",l,\\\"]=\\\",t.link(function(e){return q(G,t,r,e,2)}),\\\"(\\\",n,\\\");}\\\",c,\\\".call(this,a0[\\\",s,\\\"],\\\",s,\\\");\\\"))}function Y(t,r){function n(e){var n=r.shader[e];n&&i.set(a.shader,\\\".\\\"+e,n.append(t,i))}var i=t.proc(\\\"scope\\\",3);t.batchId=\\\"a2\\\";var a=t.shared,o=a.current;T(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),I(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,i);v(n)?n.forEach(function(r,n){i.set(t.next[e],\\\"[\\\"+n+\\\"]\\\",r)}):i.set(a.next,\\\".\\\"+e,n)}),F(t,i,r,!0,!0),[\\\"elements\\\",\\\"offset\\\",\\\"count\\\",\\\"instances\\\",\\\"primitive\\\"].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,\\\".\\\"+e,\\\"\\\"+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,\\\"[\\\"+e.id(n)+\\\"]\\\",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Z).forEach(function(t){i.set(a,\\\".\\\"+t,n[t])})}),n(\\\"vert\\\"),n(\\\"frag\\\"),0<Object.keys(r.state).length&&(i(o,\\\".dirty=true;\\\"),i.exit(o,\\\".dirty=true;\\\")),i(\\\"a1(\\\",t.shared.context,\\\",a0,\\\",t.batchId,\\\");\\\")}function X(t,e,r){var n=e.static[r];if(n&&function(t){if(\\\"object\\\"==typeof t&&!v(t)){for(var e=Object.keys(t),r=0;r<e.length;++r)if(U.isDynamic(t[e[r]]))return!0;return!1}}(n)){var i=t.global,a=Object.keys(n),o=!1,s=!1,l=!1,c=t.global.def(\\\"{}\\\");a.forEach(function(e){var r=n[e];if(U.isDynamic(r))\\\"function\\\"==typeof r&&(r=n[e]=U.unbox(r)),e=B(r,null),o=o||e.thisDep,l=l||e.propDep,s=s||e.contextDep;else{switch(i(c,\\\".\\\",e,\\\"=\\\"),typeof r){case\\\"number\\\":i(r);break;case\\\"string\\\":i('\\\"',r,'\\\"');break;case\\\"object\\\":Array.isArray(r)&&i(\\\"[\\\",r.join(),\\\"]\\\");break;default:i(t.link(r))}i(\\\";\\\")}}),e.dynamic[r]=new U.DynamicVariable(4,{thisDep:o,contextDep:s,propDep:l,ref:c,append:function(t,e){a.forEach(function(r){var i=n[r];U.isDynamic(i)&&(i=t.invoke(e,i),e(c,\\\".\\\",r,\\\"=\\\",i,\\\";\\\"))})}}),delete e.static[r]}}var Z=u.Record,$={add:32774,subtract:32778,\\\"reverse subtract\\\":32779};r.ext_blend_minmax&&($.min=32775,$.max=32776);var K=r.angle_instanced_arrays,Q=r.webgl_draw_buffers,tt={dirty:!0,profile:g.profile},et={},nt=[],it={},at={};y(\\\"dither\\\",3024),y(\\\"blend.enable\\\",3042),x(\\\"blend.color\\\",\\\"blendColor\\\",[0,0,0,0]),x(\\\"blend.equation\\\",\\\"blendEquationSeparate\\\",[32774,32774]),x(\\\"blend.func\\\",\\\"blendFuncSeparate\\\",[1,0,1,0]),y(\\\"depth.enable\\\",2929,!0),x(\\\"depth.func\\\",\\\"depthFunc\\\",513),x(\\\"depth.range\\\",\\\"depthRange\\\",[0,1]),x(\\\"depth.mask\\\",\\\"depthMask\\\",!0),x(\\\"colorMask\\\",\\\"colorMask\\\",[!0,!0,!0,!0]),y(\\\"cull.enable\\\",2884),x(\\\"cull.face\\\",\\\"cullFace\\\",1029),x(\\\"frontFace\\\",\\\"frontFace\\\",2305),x(\\\"lineWidth\\\",\\\"lineWidth\\\",1),y(\\\"polygonOffset.enable\\\",32823),x(\\\"polygonOffset.offset\\\",\\\"polygonOffset\\\",[0,0]),y(\\\"sample.alpha\\\",32926),y(\\\"sample.enable\\\",32928),x(\\\"sample.coverage\\\",\\\"sampleCoverage\\\",[1,!1]),y(\\\"stencil.enable\\\",2960),x(\\\"stencil.mask\\\",\\\"stencilMask\\\",-1),x(\\\"stencil.func\\\",\\\"stencilFunc\\\",[519,0,-1]),x(\\\"stencil.opFront\\\",\\\"stencilOpSeparate\\\",[1028,7680,7680,7680]),x(\\\"stencil.opBack\\\",\\\"stencilOpSeparate\\\",[1029,7680,7680,7680]),y(\\\"scissor.enable\\\",3089),x(\\\"scissor.box\\\",\\\"scissor\\\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),x(\\\"viewport\\\",\\\"viewport\\\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var ot={gl:t,context:p,strings:e,next:et,current:tt,draw:h,elements:o,buffer:i,shader:f,attributes:u.state,uniforms:c,framebuffer:l,extensions:r,timer:d,isBufferArgs:O},st={primTypes:rt,compareFuncs:kt,blendFuncs:wt,blendEquations:$,stencilOps:Mt,glTypes:J,orientationType:At};Q&&(st.backBuffer=[1029],st.drawBuffer=a(n.maxDrawbuffers,function(t){return 0===t?[0]:a(t,function(t){return 36064+t})}));var lt=0;return{next:et,current:tt,procs:function(){var t=b(),e=t.proc(\\\"poll\\\"),r=t.proc(\\\"refresh\\\"),i=t.block();e(i),r(i);var o,s=t.shared,l=s.gl,c=s.next,u=s.current;i(u,\\\".dirty=false;\\\"),S(t,e),S(t,r,null,!0),K&&(o=t.link(K));for(var f=0;f<n.maxAttributes;++f){var h=r.def(s.attributes,\\\"[\\\",f,\\\"]\\\"),p=t.cond(h,\\\".buffer\\\");p.then(l,\\\".enableVertexAttribArray(\\\",f,\\\");\\\",l,\\\".bindBuffer(\\\",34962,\\\",\\\",h,\\\".buffer.buffer);\\\",l,\\\".vertexAttribPointer(\\\",f,\\\",\\\",h,\\\".size,\\\",h,\\\".type,\\\",h,\\\".normalized,\\\",h,\\\".stride,\\\",h,\\\".offset);\\\").else(l,\\\".disableVertexAttribArray(\\\",f,\\\");\\\",l,\\\".vertexAttrib4f(\\\",f,\\\",\\\",h,\\\".x,\\\",h,\\\".y,\\\",h,\\\".z,\\\",h,\\\".w);\\\",h,\\\".buffer=null;\\\"),r(p),K&&r(o,\\\".vertexAttribDivisorANGLE(\\\",f,\\\",\\\",h,\\\".divisor);\\\")}return Object.keys(it).forEach(function(n){var a=it[n],o=i.def(c,\\\".\\\",n),s=t.block();s(\\\"if(\\\",o,\\\"){\\\",l,\\\".enable(\\\",a,\\\")}else{\\\",l,\\\".disable(\\\",a,\\\")}\\\",u,\\\".\\\",n,\\\"=\\\",o,\\\";\\\"),r(s),e(\\\"if(\\\",o,\\\"!==\\\",u,\\\".\\\",n,\\\"){\\\",s,\\\"}\\\")}),Object.keys(at).forEach(function(n){var o,s,f=at[n],h=tt[n],p=t.block();p(l,\\\".\\\",f,\\\"(\\\"),v(h)?(f=h.length,o=t.global.def(c,\\\".\\\",n),s=t.global.def(u,\\\".\\\",n),p(a(f,function(t){return o+\\\"[\\\"+t+\\\"]\\\"}),\\\");\\\",a(f,function(t){return s+\\\"[\\\"+t+\\\"]=\\\"+o+\\\"[\\\"+t+\\\"];\\\"}).join(\\\"\\\")),e(\\\"if(\\\",a(f,function(t){return o+\\\"[\\\"+t+\\\"]!==\\\"+s+\\\"[\\\"+t+\\\"]\\\"}).join(\\\"||\\\"),\\\"){\\\",p,\\\"}\\\")):(o=i.def(c,\\\".\\\",n),s=i.def(u,\\\".\\\",n),p(o,\\\");\\\",u,\\\".\\\",n,\\\"=\\\",o,\\\";\\\"),e(\\\"if(\\\",o,\\\"!==\\\",s,\\\"){\\\",p,\\\"}\\\")),r(p)}),t.compile()}(),compile:function(t,e,r,n,i){var a=b();return a.stats=a.link(i),Object.keys(e.static).forEach(function(t){X(a,e,t)}),_t.forEach(function(e){X(a,t,e)}),r=A(t,e,r,n),function(t,e){var r=t.proc(\\\"draw\\\",1);L(t,r),T(t,r,e.context),S(t,r,e.framebuffer),C(t,r,e),E(t,r,e.state),F(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,\\\".useProgram(\\\",n,\\\".program);\\\"),e.shader.program)H(t,r,e,e.shader.program);else{var i=t.global.def(\\\"{}\\\"),a=r.def(n,\\\".id\\\"),o=r.def(i,\\\"[\\\",a,\\\"]\\\");r(t.cond(o).then(o,\\\".call(this,a0);\\\").else(o,\\\"=\\\",i,\\\"[\\\",a,\\\"]=\\\",t.link(function(r){return q(H,t,e,r,1)}),\\\"(\\\",n,\\\");\\\",o,\\\".call(this,a0);\\\"))}0<Object.keys(e.state).length&&r(t.shared.current,\\\".dirty=true;\\\")}(a,r),Y(a,r),function(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc(\\\"batch\\\",2);t.batchId=\\\"0\\\",L(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(T(t,n,e.context),a=!1);var o=!1;if((s=e.framebuffer)?(s.propDep?i=o=!0:s.contextDep&&i&&(o=!0),o||S(t,n,s)):S(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),C(t,n,e),E(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||F(t,n,e,!1,\\\"a1\\\"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=o,(a=e.shader.progVar).contextDep&&i||a.propDep)W(t,n,e,null);else if(a=a.append(t,n),n(t.shared.gl,\\\".useProgram(\\\",a,\\\".program);\\\"),e.shader.program)W(t,n,e,e.shader.program);else{var s=t.global.def(\\\"{}\\\"),l=(o=n.def(a,\\\".id\\\"),n.def(s,\\\"[\\\",o,\\\"]\\\"));n(t.cond(l).then(l,\\\".call(this,a0,a1);\\\").else(l,\\\"=\\\",s,\\\"[\\\",o,\\\"]=\\\",t.link(function(r){return q(W,t,e,r,2)}),\\\"(\\\",a,\\\");\\\",l,\\\".call(this,a0,a1);\\\"))}0<Object.keys(e.state).length&&n(t.shared.current,\\\".dirty=true;\\\")}(a,r),a.compile()}}}function N(t,e){for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}var j=function(t,e){for(var r=Object.keys(e),n=0;n<r.length;++n)t[r[n]]=e[r[n]];return t},V=0,U={DynamicVariable:t,define:function(r,n){return new t(r,e(n+\\\"\\\"))},isDynamic:function(e){return\\\"function\\\"==typeof e&&!e._reglType||e instanceof t},unbox:function(e,r){return\\\"function\\\"==typeof e?new t(0,e):e},accessor:e},q={next:\\\"function\\\"==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,16)},cancel:\\\"function\\\"==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:clearTimeout},H=\\\"undefined\\\"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},G=s();G.zero=s();var W=function(t,e){var r=1;e.ext_texture_filter_anisotropic&&(r=t.getParameter(34047));var n=1,i=1;e.webgl_draw_buffers&&(n=t.getParameter(34852),i=t.getParameter(36063));var a=!!e.oes_texture_float;if(a){a=t.createTexture(),t.bindTexture(3553,a),t.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var o=t.createFramebuffer();if(t.bindFramebuffer(36160,o),t.framebufferTexture2D(36160,36064,3553,a,0),t.bindTexture(3553,null),36053!==t.checkFramebufferStatus(36160))a=!1;else{t.viewport(0,0,1,1),t.clearColor(1,0,0,1),t.clear(16384);var s=G.allocType(5126,4);t.readPixels(0,0,1,1,6408,5126,s),t.getError()?a=!1:(t.deleteFramebuffer(o),t.deleteTexture(a),a=1===s[0]),G.freeType(s)}}return s=!0,s=t.createTexture(),o=G.allocType(5121,36),t.activeTexture(33984),t.bindTexture(34067,s),t.texImage2D(34069,0,6408,3,3,0,6408,5121,o),G.freeType(o),t.bindTexture(34067,null),t.deleteTexture(s),s=!t.getError(),{colorBits:[t.getParameter(3410),t.getParameter(3411),t.getParameter(3412),t.getParameter(3413)],depthBits:t.getParameter(3414),stencilBits:t.getParameter(3415),subpixelBits:t.getParameter(3408),extensions:Object.keys(e).filter(function(t){return!!e[t]}),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938),readFloat:a,npotTextureCube:s}},Y=function(t){return t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Uint8ClampedArray},X=function(t){return Object.keys(t).map(function(e){return t[e]})},Z={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,r,n){var i=1;if(e.length)for(var a=0;a<e.length;++a)i*=e[a];else i=0;switch(r=n||G.allocType(r,i),e.length){case 0:break;case 1:for(n=e[0],e=0;e<n;++e)r[e]=t[e];break;case 2:for(n=e[0],e=e[1],a=i=0;a<n;++a)for(var o=t[a],s=0;s<e;++s)r[i++]=o[s];break;case 3:c(t,e[0],e[1],e[2],r,0);break;default:!function t(e,r,n,i,a){for(var o=1,s=n+1;s<r.length;++s)o*=r[s];var l=r[n];if(4==r.length-n){var u=r[n+1],f=r[n+2];for(r=r[n+3],s=0;s<l;++s)c(e[s],u,f,r,i,a),a+=o}else for(s=0;s<l;++s)t(e[s],r,n+1,i,a),a+=o}(t,e,0,r,0)}return r}},$={\\\"[object Int8Array]\\\":5120,\\\"[object Int16Array]\\\":5122,\\\"[object Int32Array]\\\":5124,\\\"[object Uint8Array]\\\":5121,\\\"[object Uint8ClampedArray]\\\":5121,\\\"[object Uint16Array]\\\":5123,\\\"[object Uint32Array]\\\":5125,\\\"[object Float32Array]\\\":5126,\\\"[object Float64Array]\\\":5121,\\\"[object ArrayBuffer]\\\":5121},J={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},K={dynamic:35048,stream:35040,static:35044},Q=Z.flatten,tt=Z.shape,et=[];et[5120]=1,et[5122]=2,et[5124]=4,et[5121]=1,et[5123]=2,et[5125]=4,et[5126]=4;var rt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,\\\"line loop\\\":2,\\\"line strip\\\":3,\\\"triangle strip\\\":5,\\\"triangle fan\\\":6},nt=new Float32Array(1),it=new Uint32Array(nt.buffer),at=[9984,9986,9985,9987],ot=[0,6409,6410,6407,6408],st={};st[6409]=st[6406]=st[6402]=1,st[34041]=st[6410]=2,st[6407]=st[35904]=3,st[6408]=st[35906]=4;var lt=m(\\\"HTMLCanvasElement\\\"),ct=m(\\\"CanvasRenderingContext2D\\\"),ut=m(\\\"ImageBitmap\\\"),ft=m(\\\"HTMLImageElement\\\"),ht=m(\\\"HTMLVideoElement\\\"),pt=Object.keys($).concat([lt,ct,ut,ft,ht]),dt=[];dt[5121]=1,dt[5126]=4,dt[36193]=2,dt[5123]=2,dt[5125]=4;var gt=[];gt[32854]=2,gt[32855]=2,gt[36194]=2,gt[34041]=4,gt[33776]=.5,gt[33777]=.5,gt[33778]=1,gt[33779]=1,gt[35986]=.5,gt[35987]=1,gt[34798]=1,gt[35840]=.5,gt[35841]=.25,gt[35842]=.5,gt[35843]=.25,gt[36196]=.5;var vt=[];vt[32854]=2,vt[32855]=2,vt[36194]=2,vt[33189]=2,vt[36168]=1,vt[34041]=4,vt[35907]=4,vt[34836]=16,vt[34842]=8,vt[34843]=6;var mt=function(t,e,r,n,i){function a(t){this.id=c++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&&(this.stats={size:0})}function o(e){var r=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(r),e.renderbuffer=null,e.refCount=0,delete u[e.id],n.renderbufferCount--}var s={rgba4:32854,rgb565:36194,\\\"rgb5 a1\\\":32855,depth:33189,stencil:36168,\\\"depth stencil\\\":34041};e.ext_srgb&&(s.srgba=35907),e.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&&(s.rgba32f=34836);var l=[];Object.keys(s).forEach(function(t){l[s[t]]=t});var c=0,u={};return a.prototype.decRef=function(){0>=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach(function(e){t+=u[e].stats.size}),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if(\\\"object\\\"==typeof e&&e?(\\\"shape\\\"in e?(n=0|(a=e.shape)[0],a=0|a[1]):(\\\"radius\\\"in e&&(n=a=0|e.radius),\\\"width\\\"in e&&(n=0|e.width),\\\"height\\\"in e&&(a=0|e.height)),\\\"format\\\"in e&&(u=s[e.format])):\\\"number\\\"==typeof e?(n=0|e,a=\\\"number\\\"==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&&a===c.height?o:(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o)},o._reglType=\\\"renderbuffer\\\",o._renderbuffer=c,i.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){X(u).forEach(o)},restore:function(){X(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},yt=[];yt[6408]=4,yt[6407]=3;var xt=[];xt[5121]=1,xt[5126]=4,xt[36193]=2;var bt=[\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"w\\\"],_t=\\\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\\\".split(\\\" \\\"),wt={0:0,1:1,zero:0,one:1,\\\"src color\\\":768,\\\"one minus src color\\\":769,\\\"src alpha\\\":770,\\\"one minus src alpha\\\":771,\\\"dst color\\\":774,\\\"one minus dst color\\\":775,\\\"dst alpha\\\":772,\\\"one minus dst alpha\\\":773,\\\"constant color\\\":32769,\\\"one minus constant color\\\":32770,\\\"constant alpha\\\":32771,\\\"one minus constant alpha\\\":32772,\\\"src alpha saturate\\\":776},kt={never:512,less:513,\\\"<\\\":513,equal:514,\\\"=\\\":514,\\\"==\\\":514,\\\"===\\\":514,lequal:515,\\\"<=\\\":515,greater:516,\\\">\\\":516,notequal:517,\\\"!=\\\":517,\\\"!==\\\":517,gequal:518,\\\">=\\\":518,always:519},Mt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\\\"increment wrap\\\":34055,\\\"decrement wrap\\\":34056,invert:5386},At={cw:2304,ccw:2305},Tt=new P(!1,!1,!1,function(){});return function(t){function e(){if(0===Z.length)w&&w.update(),Q=null;else{Q=q.next(e),f();for(var t=Z.length-1;0<=t;--t){var r=Z[t];r&&r(z,null,0)}v.flush(),w&&w.update()}}function r(){!Q&&0<Z.length&&(Q=q.next(e))}function n(){Q&&(q.cancel(e),Q=null)}function a(t){t.preventDefault(),n(),$.forEach(function(t){t()})}function o(t){v.getError(),y.restore(),D.restore(),I.restore(),R.restore(),B.restore(),V.restore(),w&&w.restore(),G.procs.refresh(),r(),J.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];U.isDynamic(i)?r[n]=U.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}var r=e(t.context||{}),n=e(t.uniforms||{}),i=e(t.attributes||{}),a=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+\\\".\\\"+n]=e[n]})}}var r=j({},t);return delete r.uniforms,delete r.attributes,delete r.context,\\\"stencil\\\"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e(\\\"blend\\\"),e(\\\"depth\\\"),e(\\\"cull\\\"),e(\\\"stencil\\\"),e(\\\"polygonOffset\\\"),e(\\\"scissor\\\"),e(\\\"sample\\\"),r}(t));t={gpuTime:0,cpuTime:0,count:0};var o=(r=G.compile(a,i,n,r,t)).draw,s=r.batch,l=r.scope,c=[];return j(function(t,e){var r;if(\\\"function\\\"==typeof t)return l.call(this,null,t,0);if(\\\"function\\\"==typeof e)if(\\\"number\\\"==typeof t)for(r=0;r<t;++r)l.call(this,null,e,r);else{if(!Array.isArray(t))return l.call(this,t,e,0);for(r=0;r<t.length;++r)l.call(this,t[r],e,r)}else if(\\\"number\\\"==typeof t){if(0<t)return s.call(this,function(t){for(;c.length<t;)c.push(null);return c}(0|t),0|t)}else{if(!Array.isArray(t))return o.call(this,t);if(t.length)return s.call(this,t,t.length)}},{stats:t})}function l(t,e){var r=0;G.procs.poll();var n=e.color;n&&(v.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),\\\"depth\\\"in e&&(v.clearDepth(+e.depth),r|=256),\\\"stencil\\\"in e&&(v.clearStencil(0|e.stencil),r|=1024),v.clear(r)}function c(t){return Z.push(t),r(),{cancel:function(){var e=N(Z,t);Z[e]=function t(){var e=N(Z,t);Z[e]=Z[Z.length-1],--Z.length,0>=Z.length&&n()}}}}function u(){var t=Y.viewport,e=Y.scissor_box;t[0]=t[1]=e[0]=e[1]=0,z.viewportWidth=z.framebufferWidth=z.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,z.viewportHeight=z.framebufferHeight=z.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function f(){z.tick+=1,z.time=g(),u(),G.procs.poll()}function h(){u(),G.procs.refresh(),w&&w.update()}function g(){return(H()-k)/1e3}if(!(t=i(t)))return null;var v=t.gl,m=v.getContextAttributes();v.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;i<e.extensions.length;++i){var a=e.extensions[i];if(!r(a))return e.onDestroy(),e.onDone('\\\"'+a+'\\\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(r),{extensions:n,restore:function(){Object.keys(n).forEach(function(t){if(!r(t))throw Error(\\\"(regl): error restoring extension \\\"+t)})}}}(v,t);if(!y)return null;var x=function(){var t={\\\"\\\":0},e=[\\\"\\\"];return{id:function(r){var n=t[r];return n||(n=t[r]=e.length,e.push(r),n)},str:function(t){return e[t]}}}(),b={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},_=y.extensions,w=function(t,e){function r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function n(t,e,n){var i=s.pop()||new r;i.startQueryIndex=t,i.endQueryIndex=e,i.sum=0,i.stats=n,l.push(i)}var i=e.ext_disjoint_timer_query;if(!i)return null;var a=[],o=[],s=[],l=[],c=[],u=[];return{beginQuery:function(t){var e=a.pop()||i.createQueryEXT();i.beginQueryEXT(35007,e),o.push(e),n(o.length-1,o.length,t)},endQuery:function(){i.endQueryEXT(35007)},pushScopeStats:n,update:function(){var t,e;if(0!==(t=o.length)){u.length=Math.max(u.length,t+1),c.length=Math.max(c.length,t+1),c[0]=0;var r=u[0]=0;for(e=t=0;e<o.length;++e){var n=o[e];i.getQueryObjectEXT(n,34919)?(r+=i.getQueryObjectEXT(n,34918),a.push(n)):o[t++]=n,c[e+1]=r,u[e+1]=t}for(o.length=t,e=t=0;e<l.length;++e){var f=(r=l[e]).startQueryIndex;n=r.endQueryIndex,r.sum+=c[n]-c[f],f=u[f],(n=u[n])===f?(r.stats.gpuTime+=r.sum/1e6,s.push(r)):(r.startQueryIndex=f,r.endQueryIndex=n,l[t++]=r)}l.length=t}},getNumPendingQueries:function(){return o.length},clear:function(){a.push.apply(a,o);for(var t=0;t<a.length;t++)i.deleteQueryEXT(a[t]);o.length=0,a.length=0},restore:function(){o.length=0,a.length=0}}}(0,_),k=H(),E=v.drawingBufferWidth,L=v.drawingBufferHeight,z={tick:0,time:0,viewportWidth:E,viewportHeight:L,framebufferWidth:E,framebufferHeight:L,drawingBufferWidth:E,drawingBufferHeight:L,pixelRatio:t.pixelRatio},O=W(v,_),I=(E=function(t,e,r,n){for(t=r.maxAttributes,e=Array(t),r=0;r<t;++r)e[r]=new T;return{Record:T,scope:{},state:e}}(v,_,O),p(v,b,t,E)),P=d(v,_,I,b),D=S(v,x,b,t),R=M(v,_,O,function(){G.procs.poll()},z,b,t),B=mt(v,_,0,b,t),V=A(v,_,O,R,B,b),G=F(v,x,_,O,I,P,0,V,{},E,D,{elements:null,primitive:4,count:-1,offset:0,instances:-1},z,w,t),Y=(x=C(v,V,G.procs.poll,z),G.next),X=v.canvas,Z=[],$=[],J=[],K=[t.onDestroy],Q=null;X&&(X.addEventListener(\\\"webglcontextlost\\\",a,!1),X.addEventListener(\\\"webglcontextrestored\\\",o,!1));var tt=V.setFBO=s({framebuffer:U.define.call(null,1,\\\"framebuffer\\\")});return h(),m=j(s,{clear:function(t){if(\\\"framebuffer\\\"in t)if(t.framebuffer&&\\\"framebufferCube\\\"===t.framebuffer_reglType)for(var e=0;6>e;++e)tt(j({framebuffer:t.framebuffer.faces[e]},t),l);else tt(t,l);else l(0,t)},prop:U.define.bind(null,1),context:U.define.bind(null,2),this:U.define.bind(null,3),draw:s({}),buffer:function(t){return I.create(t,34962,!1,!1)},elements:function(t){return P.create(t,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:B.create,framebuffer:V.create,framebufferCube:V.createCube,attributes:m,frame:c,on:function(t,e){var r;switch(t){case\\\"frame\\\":return c(e);case\\\"lost\\\":r=$;break;case\\\"restore\\\":r=J;break;case\\\"destroy\\\":r=K}return r.push(e),{cancel:function(){for(var t=0;t<r.length;++t)if(r[t]===e){r[t]=r[r.length-1],r.pop();break}}}},limits:O,hasExtension:function(t){return 0<=O.extensions.indexOf(t.toLowerCase())},read:x,destroy:function(){Z.length=0,n(),X&&(X.removeEventListener(\\\"webglcontextlost\\\",a),X.removeEventListener(\\\"webglcontextrestored\\\",o)),D.clear(),V.clear(),B.clear(),R.clear(),P.clear(),I.clear(),w&&w.clear(),K.forEach(function(t){t()})},_gl:v,_refresh:h,poll:function(){f(),w&&w.update()},now:g,stats:b}),t.onDone(null,m),m}},\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?e.exports=i():n.createREGL=i()},{}],479:[function(t,e,r){\\\"use strict\\\";var n,i=\\\"\\\";e.exports=function(t,e){if(\\\"string\\\"!=typeof t)throw new TypeError(\\\"expected a string\\\");if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||\\\"undefined\\\"==typeof n)n=t,i=\\\"\\\";else if(i.length>=r)return i.substr(0,r);for(;r>i.length&&e>1;)1&e&&(i+=t),e>>=1,t+=t;return i=(i+=t).substr(0,r)}},{}],480:[function(t,e,r){(function(t){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{}],481:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r,o=t[i],s=(r=a+o)-a,l=o-s;l&&(t[--n]=r,r=l)}for(var c=0,i=n;i<e;++i){var a=t[i],o=r,s=(r=a+o)-a,l=o-s;l&&(t[c++]=l)}return t[c++]=r,t.length=c,t}},{}],482:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"robust-sum\\\"),a=t(\\\"robust-scale\\\"),o=t(\\\"robust-compress\\\"),s=6;function l(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function c(t){if(2===t.length)return[\\\"sum(prod(\\\",t[0][0],\\\",\\\",t[1][1],\\\"),prod(-\\\",t[0][1],\\\",\\\",t[1][0],\\\"))\\\"].join(\\\"\\\");for(var e=[],r=0;r<t.length;++r)e.push([\\\"scale(\\\",c(l(t,r)),\\\",\\\",(n=r,1&n?\\\"-\\\":\\\"\\\"),t[0][r],\\\")\\\"].join(\\\"\\\"));return function t(e){if(1===e.length)return e[0];if(2===e.length)return[\\\"sum(\\\",e[0],\\\",\\\",e[1],\\\")\\\"].join(\\\"\\\");var r=e.length>>1;return[\\\"sum(\\\",t(e.slice(0,r)),\\\",\\\",t(e.slice(r)),\\\")\\\"].join(\\\"\\\")}(e);var n}function u(t){return new Function(\\\"sum\\\",\\\"scale\\\",\\\"prod\\\",\\\"compress\\\",[\\\"function robustDeterminant\\\",t,\\\"(m){return compress(\\\",c(function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\\\"m[\\\",r,\\\"][\\\",n,\\\"]\\\"].join(\\\"\\\")}return e}(t)),\\\")};return robustDeterminant\\\",t].join(\\\"\\\"))(i,a,n,o)}var f=[function(){return[0]},function(t){return[t[0][0]]}];!function(){for(;f.length<s;)f.push(u(f.length));for(var t=[],r=[\\\"function robustDeterminant(m){switch(m.length){\\\"],n=0;n<s;++n)t.push(\\\"det\\\"+n),r.push(\\\"case \\\",n,\\\":return det\\\",n,\\\"(m);\\\");r.push(\\\"}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant\\\"),t.push(\\\"CACHE\\\",\\\"gen\\\",r.join(\\\"\\\"));var i=Function.apply(void 0,t);for(e.exports=i.apply(void 0,f.concat([f,u])),n=0;n<f.length;++n)e.exports[n]=f[n]}()},{\\\"robust-compress\\\":481,\\\"robust-scale\\\":488,\\\"robust-sum\\\":491,\\\"two-product\\\":520}],483:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"robust-sum\\\");e.exports=function(t,e){for(var r=n(t[0],e[0]),a=1;a<t.length;++a)r=i(r,n(t[a],e[a]));return r}},{\\\"robust-sum\\\":491,\\\"two-product\\\":520}],484:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"robust-sum\\\"),a=t(\\\"robust-subtract\\\"),o=t(\\\"robust-scale\\\"),s=6;function l(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function c(t){if(1===t.length)return t[0];if(2===t.length)return[\\\"sum(\\\",t[0],\\\",\\\",t[1],\\\")\\\"].join(\\\"\\\");var e=t.length>>1;return[\\\"sum(\\\",c(t.slice(0,e)),\\\",\\\",c(t.slice(e)),\\\")\\\"].join(\\\"\\\")}function u(t,e){if(\\\"m\\\"===t.charAt(0)){if(\\\"w\\\"===e.charAt(0)){var r=t.split(\\\"[\\\");return[\\\"w\\\",e.substr(1),\\\"m\\\",r[0].substr(1)].join(\\\"\\\")}return[\\\"prod(\\\",t,\\\",\\\",e,\\\")\\\"].join(\\\"\\\")}return u(e,t)}function f(t){if(2===t.length)return[[\\\"diff(\\\",u(t[0][0],t[1][1]),\\\",\\\",u(t[1][0],t[0][1]),\\\")\\\"].join(\\\"\\\")];for(var e=[],r=0;r<t.length;++r)e.push([\\\"scale(\\\",c(f(l(t,r))),\\\",\\\",(n=r,!0&n?\\\"-\\\":\\\"\\\"),t[0][r],\\\")\\\"].join(\\\"\\\"));return e;var n}function h(t,e){for(var r=[],n=0;n<e-2;++n)r.push([\\\"prod(m\\\",t,\\\"[\\\",n,\\\"],m\\\",t,\\\"[\\\",n,\\\"])\\\"].join(\\\"\\\"));return c(r)}function p(t){for(var e=[],r=[],s=function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\\\"m\\\",n,\\\"[\\\",t-r-2,\\\"]\\\"].join(\\\"\\\")}return e}(t),u=0;u<t;++u)s[0][u]=\\\"1\\\",s[t-1][u]=\\\"w\\\"+u;for(u=0;u<t;++u)0==(1&u)?e.push.apply(e,f(l(s,u))):r.push.apply(r,f(l(s,u)));var p=c(e),d=c(r),g=\\\"exactInSphere\\\"+t,v=[];for(u=0;u<t;++u)v.push(\\\"m\\\"+u);var m=[\\\"function \\\",g,\\\"(\\\",v.join(),\\\"){\\\"];for(u=0;u<t;++u){m.push(\\\"var w\\\",u,\\\"=\\\",h(u,t),\\\";\\\");for(var y=0;y<t;++y)y!==u&&m.push(\\\"var w\\\",u,\\\"m\\\",y,\\\"=scale(w\\\",u,\\\",m\\\",y,\\\"[0]);\\\")}return m.push(\\\"var p=\\\",p,\\\",n=\\\",d,\\\",d=diff(p,n);return d[d.length-1];}return \\\",g),new Function(\\\"sum\\\",\\\"diff\\\",\\\"prod\\\",\\\"scale\\\",m.join(\\\"\\\"))(i,a,n,o)}var d=[function(){return 0},function(){return 0},function(){return 0}];!function(){for(;d.length<=s;)d.push(p(d.length));for(var t=[],r=[\\\"slow\\\"],n=0;n<=s;++n)t.push(\\\"a\\\"+n),r.push(\\\"o\\\"+n);var i=[\\\"function testInSphere(\\\",t.join(),\\\"){switch(arguments.length){case 0:case 1:return 0;\\\"];for(n=2;n<=s;++n)i.push(\\\"case \\\",n,\\\":return o\\\",n,\\\"(\\\",t.slice(0,n).join(),\\\");\\\");i.push(\\\"}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere\\\"),r.push(i.join(\\\"\\\"));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=d[t.length];return e||(e=d[t.length]=p(t.length)),e.apply(void 0,t)}].concat(d)),n=0;n<=s;++n)e.exports[n]=d[n]}()},{\\\"robust-scale\\\":488,\\\"robust-subtract\\\":490,\\\"robust-sum\\\":491,\\\"two-product\\\":520}],485:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"robust-determinant\\\"),i=6;function a(t){for(var e=\\\"robustLinearSolve\\\"+t+\\\"d\\\",r=[\\\"function \\\",e,\\\"(A,b){return [\\\"],i=0;i<t;++i){r.push(\\\"det([\\\");for(var a=0;a<t;++a){a>0&&r.push(\\\",\\\"),r.push(\\\"[\\\");for(var o=0;o<t;++o)o>0&&r.push(\\\",\\\"),o===i?r.push(\\\"+b[\\\",a,\\\"]\\\"):r.push(\\\"+A[\\\",a,\\\"][\\\",o,\\\"]\\\");r.push(\\\"]\\\")}r.push(\\\"]),\\\")}r.push(\\\"det(A)]}return \\\",e);var s=new Function(\\\"det\\\",r.join(\\\"\\\"));return s(t<6?n[t]:n)}var o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length<i;)o.push(a(o.length));for(var t=[],r=[\\\"function dispatchLinearSolve(A,b){switch(A.length){\\\"],n=0;n<i;++n)t.push(\\\"s\\\"+n),r.push(\\\"case \\\",n,\\\":return s\\\",n,\\\"(A,b);\\\");r.push(\\\"}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve\\\"),t.push(\\\"CACHE\\\",\\\"g\\\",r.join(\\\"\\\"));var s=Function.apply(void 0,t);for(e.exports=s.apply(void 0,o.concat([o,a])),n=0;n<i;++n)e.exports[n]=o[n]}()},{\\\"robust-determinant\\\":482}],486:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"robust-sum\\\"),a=t(\\\"robust-scale\\\"),o=t(\\\"robust-subtract\\\"),s=5;function l(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function c(t){if(1===t.length)return t[0];if(2===t.length)return[\\\"sum(\\\",t[0],\\\",\\\",t[1],\\\")\\\"].join(\\\"\\\");var e=t.length>>1;return[\\\"sum(\\\",c(t.slice(0,e)),\\\",\\\",c(t.slice(e)),\\\")\\\"].join(\\\"\\\")}function u(t){if(2===t.length)return[[\\\"sum(prod(\\\",t[0][0],\\\",\\\",t[1][1],\\\"),prod(-\\\",t[0][1],\\\",\\\",t[1][0],\\\"))\\\"].join(\\\"\\\")];for(var e=[],r=0;r<t.length;++r)e.push([\\\"scale(\\\",c(u(l(t,r))),\\\",\\\",(n=r,1&n?\\\"-\\\":\\\"\\\"),t[0][r],\\\")\\\"].join(\\\"\\\"));return e;var n}function f(t){for(var e=[],r=[],s=function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\\\"m\\\",n,\\\"[\\\",t-r-1,\\\"]\\\"].join(\\\"\\\")}return e}(t),f=[],h=0;h<t;++h)0==(1&h)?e.push.apply(e,u(l(s,h))):r.push.apply(r,u(l(s,h))),f.push(\\\"m\\\"+h);var p=c(e),d=c(r),g=\\\"orientation\\\"+t+\\\"Exact\\\",v=[\\\"function \\\",g,\\\"(\\\",f.join(),\\\"){var p=\\\",p,\\\",n=\\\",d,\\\",d=sub(p,n);return d[d.length-1];};return \\\",g].join(\\\"\\\");return new Function(\\\"sum\\\",\\\"prod\\\",\\\"scale\\\",\\\"sub\\\",v)(i,n,a,o)}var h=f(3),p=f(4),d=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,r){var n,i=(t[1]-r[1])*(e[0]-r[0]),a=(t[0]-r[0])*(e[1]-r[1]),o=i-a;if(i>0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:h(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],h=r[2]-n[2],d=a*c,g=o*l,v=o*s,m=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(v-m)+h*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(m))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b>_||-b>_?b:p(t,e,r,n)}];!function(){for(;d.length<=s;)d.push(f(d.length));for(var t=[],r=[\\\"slow\\\"],n=0;n<=s;++n)t.push(\\\"a\\\"+n),r.push(\\\"o\\\"+n);var i=[\\\"function getOrientation(\\\",t.join(),\\\"){switch(arguments.length){case 0:case 1:return 0;\\\"];for(n=2;n<=s;++n)i.push(\\\"case \\\",n,\\\":return o\\\",n,\\\"(\\\",t.slice(0,n).join(),\\\");\\\");i.push(\\\"}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation\\\"),r.push(i.join(\\\"\\\"));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=d[t.length];return e||(e=d[t.length]=f(t.length)),e.apply(void 0,t)}].concat(d)),n=0;n<=s;++n)e.exports[n]=d[n]}()},{\\\"robust-scale\\\":488,\\\"robust-subtract\\\":490,\\\"robust-sum\\\":491,\\\"two-product\\\":520}],487:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"robust-sum\\\"),i=t(\\\"robust-scale\\\");e.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var r=[0];if(t.length<e.length)for(var a=0;a<t.length;++a)r=n(r,i(e,t[a]));else for(var a=0;a<e.length;++a)r=n(r,i(t,e[a]));return r}},{\\\"robust-scale\\\":488,\\\"robust-sum\\\":491}],488:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"two-sum\\\");e.exports=function(t,e){var r=t.length;if(1===r){var a=n(t[0],e);return a[0]?a:[a[1]]}var o=new Array(2*r),s=[.1,.1],l=[.1,.1],c=0;n(t[0],e,s),s[0]&&(o[c++]=s[0]);for(var u=1;u<r;++u){n(t[u],e,l);var f=s[1];i(f,l[0],s),s[0]&&(o[c++]=s[0]);var h=l[1],p=s[1],d=h+p,g=d-h,v=p-g;s[1]=d,v&&(o[c++]=v)}s[1]&&(o[c++]=s[1]);0===c&&(o[c++]=0);return o.length=c,o}},{\\\"two-product\\\":520,\\\"two-sum\\\":521}],489:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,i){var a=n(t,r,i),o=n(e,r,i);if(a>0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);if(s>0&&l>0||s<0&&l<0)return!1;if(0===a&&0===o&&0===s&&0===l)return function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],f=Math.min(c,u),h=Math.max(c,u);if(h<s||l<f)return!1}return!0}(t,e,r,i);return!0};var n=t(\\\"robust-orientation\\\")[3]},{\\\"robust-orientation\\\":486}],490:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);if(i)return[i,r];return[r]}(t[0],-e[0]);var i,a,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,f=t[l],h=u(f),p=-e[c],d=u(p);h<d?(a=f,(l+=1)<r&&(f=t[l],h=u(f))):(a=p,(c+=1)<n&&(p=-e[c],d=u(p)));l<r&&h<d||c>=n?(i=f,(l+=1)<r&&(f=t[l],h=u(f))):(i=p,(c+=1)<n&&(p=-e[c],d=u(p)));var g,v,m=i+a,y=m-i,x=a-y,b=x,_=m;for(;l<r&&c<n;)h<d?(i=f,(l+=1)<r&&(f=t[l],h=u(f))):(i=p,(c+=1)<n&&(p=-e[c],d=u(p))),(x=(a=b)-(y=(m=i+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g;for(;l<r;)(x=(a=b)-(y=(m=(i=f)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(l+=1)<r&&(f=t[l]);for(;c<n;)(x=(a=b)-(y=(m=(i=p)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(c+=1)<n&&(p=-e[c]);b&&(o[s++]=b);_&&(o[s++]=_);s||(o[s++]=0);return o.length=s,o}},{}],491:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);if(i)return[i,r];return[r]}(t[0],e[0]);var i,a,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,f=t[l],h=u(f),p=e[c],d=u(p);h<d?(a=f,(l+=1)<r&&(f=t[l],h=u(f))):(a=p,(c+=1)<n&&(p=e[c],d=u(p)));l<r&&h<d||c>=n?(i=f,(l+=1)<r&&(f=t[l],h=u(f))):(i=p,(c+=1)<n&&(p=e[c],d=u(p)));var g,v,m=i+a,y=m-i,x=a-y,b=x,_=m;for(;l<r&&c<n;)h<d?(i=f,(l+=1)<r&&(f=t[l],h=u(f))):(i=p,(c+=1)<n&&(p=e[c],d=u(p))),(x=(a=b)-(y=(m=i+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g;for(;l<r;)(x=(a=b)-(y=(m=(i=f)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(l+=1)<r&&(f=t[l]);for(;c<n;)(x=(a=b)-(y=(m=(i=p)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(c+=1)<n&&(p=e[c]);b&&(o[s++]=b);_&&(o[s++]=_);s||(o[s++]=0);return o.length=s,o}},{}],492:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],493:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return i(n(t))};var n=t(\\\"boundary-cells\\\"),i=t(\\\"reduce-simplicial-complex\\\")},{\\\"boundary-cells\\\":83,\\\"reduce-simplicial-complex\\\":472}],494:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,s){r=r||0,\\\"undefined\\\"==typeof s&&(s=function(t){for(var e=t.length,r=0,n=0;n<e;++n)r=0|Math.max(r,t[n].length);return r-1}(t));if(0===t.length||s<1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(t,e){for(var r=t.length,n=i.mallocUint8(r),a=0;a<r;++a)n[a]=t[a]<e|0;return n}(e,+r),c=function(t,e){for(var r=t.length,o=e*(e+1)/2*r|0,s=i.mallocUint32(2*o),l=0,c=0;c<r;++c)for(var u=t[c],e=u.length,f=0;f<e;++f)for(var h=0;h<f;++h){var p=u[h],d=u[f];s[l++]=0|Math.min(p,d),s[l++]=0|Math.max(p,d)}a(n(s,[l/2|0,2]));for(var g=2,c=2;c<l;c+=2)s[c-2]===s[c]&&s[c-1]===s[c+1]||(s[g++]=s[c],s[g++]=s[c+1]);return n(s,[g/2|0,2])}(t,s),u=function(t,e,r,a){for(var o=t.data,s=t.shape[0],l=i.mallocDouble(s),c=0,u=0;u<s;++u){var f=o[2*u],h=o[2*u+1];if(r[f]!==r[h]){var p=e[f],d=e[h];o[2*c]=f,o[2*c+1]=h,l[c++]=(d-a)/(d-p)}}return t.shape[0]=c,n(l,[c])}(c,e,l,+r),f=function(t,e){var r=i.mallocInt32(2*e),n=t.shape[0],a=t.data;r[0]=0;for(var o=0,s=0;s<n;++s){var l=a[2*s];if(l!==o){for(r[2*o+1]=s;++o<l;)r[2*o]=s,r[2*o+1]=s;r[2*o]=s}}r[2*o+1]=n;for(;++o<e;)r[2*o]=r[2*o+1]=n;return r}(c,0|e.length),h=o(s)(t,c.data,f,l),p=function(t){for(var e=0|t.shape[0],r=t.data,n=new Array(e),i=0;i<e;++i)n[i]=[r[2*i],r[2*i+1]];return n}(c),d=[].slice.call(u.data,0,u.shape[0]);return i.free(l),i.free(c.data),i.free(u.data),i.free(f),{cells:h,vertexIds:p,vertexWeights:d}};var n=t(\\\"ndarray\\\"),i=t(\\\"typedarray-pool\\\"),a=t(\\\"ndarray-sort\\\"),o=t(\\\"./lib/codegen\\\")},{\\\"./lib/codegen\\\":495,ndarray:433,\\\"ndarray-sort\\\":431,\\\"typedarray-pool\\\":522}],495:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=a[t];e||(e=a[t]=function(t){var e=0,r=new Array(t+1);r[0]=[[]];for(var a=1;a<=t;++a)for(var o=r[a]=i(a),s=0;s<o.length;++s)e=Math.max(e,o[a].length);var l=[\\\"function B(C,E,i,j){\\\",\\\"var a=Math.min(i,j)|0,b=Math.max(i,j)|0,l=C[2*a],h=C[2*a+1];\\\",\\\"while(l<h){\\\",\\\"var m=(l+h)>>1,v=E[2*m+1];\\\",\\\"if(v===b){return m}\\\",\\\"if(b<v){h=m}else{l=m+1}\\\",\\\"}\\\",\\\"return l;\\\",\\\"};\\\",\\\"function getContour\\\",t,\\\"d(F,E,C,S){\\\",\\\"var n=F.length,R=[];\\\",\\\"for(var i=0;i<n;++i){var c=F[i],l=c.length;\\\"];function c(t){if(!(t.length<=0)){l.push(\\\"R.push(\\\");for(var e=0;e<t.length;++e){var r=t[e];e>0&&l.push(\\\",\\\"),l.push(\\\"[\\\");for(var n=0;n<r.length;++n){var i=r[n];n>0&&l.push(\\\",\\\"),l.push(\\\"B(C,E,c[\\\",i[0],\\\"],c[\\\",i[1],\\\"])\\\")}l.push(\\\"]\\\")}l.push(\\\");\\\")}}for(var a=t+1;a>1;--a){a<t+1&&l.push(\\\"else \\\"),l.push(\\\"if(l===\\\",a,\\\"){\\\");for(var u=[],s=0;s<a;++s)u.push(\\\"(S[c[\\\"+s+\\\"]]<<\\\"+s+\\\")\\\");l.push(\\\"var M=\\\",u.join(\\\"+\\\"),\\\";if(M===0||M===\\\",(1<<a)-1,\\\"){continue}switch(M){\\\");for(var o=r[a-1],s=0;s<o.length;++s)l.push(\\\"case \\\",s,\\\":\\\"),c(o[s]),l.push(\\\"break;\\\");l.push(\\\"}}\\\")}return l.push(\\\"}return R;};return getContour\\\",t,\\\"d\\\"),new Function(\\\"pool\\\",l.join(\\\"\\\"))(n)}(t));return e};var n=t(\\\"typedarray-pool\\\"),i=t(\\\"marching-simplex-table\\\"),a={}},{\\\"marching-simplex-table\\\":410,\\\"typedarray-pool\\\":522}],496:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"bit-twiddle\\\"),i=t(\\\"union-find\\\");function a(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],a)-i(c+e[2],o);default:var u=t.slice(0);u.sort();var f=e.slice(0);f.sort();for(var h=0;h<r;++h)if(n=u[h]-f[h])return n;return 0}}function o(t,e){return a(t[0],e[0])}function s(t,e){if(e){for(var r=t.length,n=new Array(r),i=0;i<r;++i)n[i]=[t[i],e[i]];n.sort(o);for(i=0;i<r;++i)t[i]=n[i][0],e[i]=n[i][1];return t}return t.sort(a),t}function l(t){if(0===t.length)return[];for(var e=1,r=t.length,n=1;n<r;++n){var i=t[n];if(a(i,t[n-1])){if(n===e){e++;continue}t[e++]=i}}return t.length=e,t}function c(t,e){for(var r=0,n=t.length-1,i=-1;r<=n;){var o=r+n>>1,s=a(t[o],e);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function u(t,e){for(var r=new Array(t.length),i=0,o=r.length;i<o;++i)r[i]=[];for(var s=[],l=(i=0,e.length);i<l;++i)for(var u=e[i],f=u.length,h=1,p=1<<f;h<p;++h){s.length=n.popCount(h);for(var d=0,g=0;g<f;++g)h&1<<g&&(s[d++]=u[g]);var v=c(t,s);if(!(v<0))for(;r[v++].push(i),!(v>=t.length||0!==a(t[v],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<<e+1)-1,a=0;a<t.length;++a)for(var o=t[a],l=i;l<1<<o.length;l=n.nextCombination(l)){for(var c=new Array(e+1),u=0,f=0;f<o.length;++f)l&1<<f&&(c[u++]=o[f]);r.push(c)}return s(r)}r.dimension=function(t){for(var e=0,r=Math.max,n=0,i=t.length;n<i;++n)e=r(e,t[n].length);return e-1},r.countVertices=function(t){for(var e=-1,r=Math.max,n=0,i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)e=r(e,a[o]);return e+1},r.cloneCells=function(t){for(var e=new Array(t.length),r=0,n=t.length;r<n;++r)e[r]=t[r].slice(0);return e},r.compareCells=a,r.normalize=s,r.unique=l,r.findCell=c,r.incidence=u,r.dual=function(t,e){if(!e)return u(l(f(t,0)),t);for(var r=new Array(e),n=0;n<e;++n)r[n]=[];n=0;for(var i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)r[a[o]].push(n);return r},r.explode=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0|i.length,o=1,l=1<<a;o<l;++o){for(var c=[],u=0;u<a;++u)o>>>u&1&&c.push(i[u]);e.push(c)}return s(e)},r.skeleton=f,r.boundary=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;++a){for(var l=new Array(i.length-1),c=0,u=0;c<o;++c)c!==a&&(l[u++]=i[c]);e.push(l)}return s(e)},r.connectedComponents=function(t,e){return e?function(t,e){for(var r=new i(e),n=0;n<t.length;++n)for(var a=t[n],o=0;o<a.length;++o)for(var s=o+1;s<a.length;++s)r.link(a[o],a[s]);var l=[],c=r.ranks;for(n=0;n<c.length;++n)c[n]=-1;for(n=0;n<t.length;++n){var u=r.find(t[n][0]);c[u]<0?(c[u]=l.length,l.push([t[n].slice(0)])):l[c[u]].push(t[n].slice(0))}return l}(t,e):function(t){for(var e=l(s(f(t,0))),r=new i(e.length),n=0;n<t.length;++n)for(var a=t[n],o=0;o<a.length;++o)for(var u=c(e,[a[o]]),h=o+1;h<a.length;++h)r.link(u,c(e,[a[h]]));var p=[],d=r.ranks;for(n=0;n<d.length;++n)d[n]=-1;for(n=0;n<t.length;++n){var g=r.find(c(e,[t[n][0]]));d[g]<0?(d[g]=p.length,p.push([t[n].slice(0)])):p[d[g]].push(t[n].slice(0))}return p}(t)}},{\\\"bit-twiddle\\\":80,\\\"union-find\\\":523}],497:[function(t,e,r){arguments[4][80][0].apply(r,arguments)},{dup:80}],498:[function(t,e,r){arguments[4][496][0].apply(r,arguments)},{\\\"bit-twiddle\\\":497,dup:496,\\\"union-find\\\":499}],499:[function(t,e,r){\\\"use strict\\\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n,n.prototype.length=function(){return this.roots.length},n.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},n.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var r=e[t];e[t]=e[r],t=r}return t},n.prototype.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],500:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){for(var a=e.length,o=t.length,s=new Array(a),l=new Array(a),c=new Array(a),u=new Array(a),f=0;f<a;++f)s[f]=l[f]=-1,c[f]=1/0,u[f]=!1;for(var f=0;f<o;++f){var h=t[f];if(2!==h.length)throw new Error(\\\"Input must be a graph\\\");var p=h[1],d=h[0];-1!==l[d]?l[d]=-2:l[d]=p,-1!==s[p]?s[p]=-2:s[p]=d}function g(t){if(u[t])return 1/0;var r,i,a,o,c,f=s[t],h=l[t];return f<0||h<0?1/0:(r=e[t],i=e[f],a=e[h],o=Math.abs(n(r,i,a)),c=Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)),o/c)}function v(t,e){var r=M[t],n=M[e];M[t]=n,M[e]=r,A[r]=e,A[n]=t}function m(t){return c[M[t]]}function y(t){return 1&t?t-1>>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n<S){var o=m(n);o<r&&(a=n,r=o)}if(i<S){var s=m(i);s<r&&(a=i)}if(a===t)return t;v(t,a),t=a}}function b(t){for(var e=m(t);t>0;){var r=y(t);if(r>=0){var n=m(r);if(e<n){v(t,r),t=r;continue}}return t}}function _(){if(S>0){var t=M[0];return v(0,S-1),S-=1,x(0),t}return-1}function w(t,e){var r=M[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((S+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],g(e)),A[r]>=0&&w(A[r],g(r))}}for(var M=[],A=new Array(a),f=0;f<a;++f){var T=c[f]=g(f);T<1/0?(A[f]=M.length,M.push(f)):A[f]=-1}for(var S=M.length,f=S>>1;f>=0;--f)x(f);for(;;){var C=_();if(C<0||c[C]>r)break;k(C)}for(var E=[],f=0;f<a;++f)u[f]||(A[f]=E.length,E.push(e[f].slice()));E.length;function L(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!u[n]||i<0||i===n)break;if(i=t[n=i],!u[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}var z=[];return t.forEach(function(t){var e=L(s,t[0]),r=L(l,t[1]);if(e>=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&z.push([n,i])}}),i.unique(i.normalize(z)),{positions:E,edges:z}};var n=t(\\\"robust-orientation\\\"),i=t(\\\"simplicial-complex\\\")},{\\\"robust-orientation\\\":486,\\\"simplicial-complex\\\":498}],501:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,a,o,s;if(e[0][0]<e[1][0])r=e[0],a=e[1];else{if(!(e[0][0]>e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]<t[1][0])o=t[0],s=t[1];else{if(!(t[0][0]>t[1][0]))return-i(t,e);o=t[1],s=t[0]}var l=n(r,a,s),c=n(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,o,a),c=n(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var n=t(\\\"robust-orientation\\\");function i(t,e){var r,i,a,o;if(e[0][0]<e[1][0])r=e[0],i=e[1];else{if(!(e[0][0]>e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return l<c?l-c:s>u?s-u:l-u}r=e[1],i=e[0]}t[0][1]<t[1][1]?(a=t[0],o=t[1]):(a=t[1],o=t[0]);var f=n(i,r,a);return f||((f=n(i,r,o))||o-i)}},{\\\"robust-orientation\\\":486}],502:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=t.length,r=2*e,n=new Array(r),a=0;a<e;++a){var l=t[a],c=l[0][0]<l[1][0];n[2*a]=new f(l[0][0],l,c,a),n[2*a+1]=new f(l[1][0],l,!c,a)}n.sort(function(t,e){var r=t.x-e.x;return r||((r=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1]))});for(var h=i(o),p=[],d=[],g=[],a=0;a<r;){for(var v=n[a].x,m=[];a<r;){var y=n[a];if(y.x!==v)break;a+=1,y.segment[0][0]===y.x&&y.segment[1][0]===y.x?y.create&&(y.segment[0][1]<y.segment[1][1]?(m.push(new u(y.segment[0][1],y.index,!0,!0)),m.push(new u(y.segment[1][1],y.index,!1,!1))):(m.push(new u(y.segment[1][1],y.index,!0,!1)),m.push(new u(y.segment[0][1],y.index,!1,!0)))):h=y.create?h.insert(y.segment,y.index):h.remove(y.segment)}p.push(h.root),d.push(v),g.push(m)}return new s(p,d,g)};var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"functional-red-black-tree\\\"),a=t(\\\"robust-orientation\\\"),o=t(\\\"./lib/order-segments\\\");function s(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function l(t,e){return t.y-e}function c(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]<o[1][0]?(n=o[0],i=o[1]):(n=o[1],i=o[0]);var s=a(n,i,e);if(s<0)t=t.left;else if(s>0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var u=c(this.slabs[e-1],t);u&&(s?o(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var f=this.horizontal[e];if(f.length>0){var h=n.ge(f,t[1],l);if(h<f.length){var p=f[h];if(t[1]===p.y){if(p.closed)return p.index;for(;h<f.length-1&&f[h+1].y===t[1];)if((p=f[h+=1]).closed)return p.index;if(p.y===t[1]&&!p.start){if((h+=1)>=f.length)return i;p=f[h]}}if(p.start)if(s){var d=a(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index;else p.y!==t[1]&&(i=p.index)}}}return i}},{\\\"./lib/order-segments\\\":501,\\\"binary-search-bounds\\\":79,\\\"functional-red-black-tree\\\":219,\\\"robust-orientation\\\":486}],503:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"robust-dot-product\\\"),i=t(\\\"robust-sum\\\");function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l<o;++l)s[l]=i*t[l]+a*r[l];return s}e.exports=function(t,e){for(var r=[],n=[],i=a(t[t.length-1],e),s=t[t.length-1],l=t[0],c=0;c<t.length;++c,s=l){var u=a(l=t[c],e);if(i<0&&u>0||i>0&&u<0){var f=o(s,u,l,i);r.push(f),n.push(f.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l<t.length;++l,i=s){var c=a(s=t[l],e);(n<0&&c>0||n>0&&c<0)&&r.push(o(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l<t.length;++l,i=s){var c=a(s=t[l],e);(n<0&&c>0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{\\\"robust-dot-product\\\":483,\\\"robust-sum\\\":491}],504:[function(t,e,r){!function(){\\\"use strict\\\";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\\\x25]+/,modulo:/^\\\\x25{2}/,placeholder:/^\\\\x25(?:([1-9]\\\\d*)\\\\$|\\\\(([^\\\\)]+)\\\\))?(\\\\+)?(0|'[^$])?(-)?(\\\\d+)?(?:\\\\.(\\\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\\\d]*)/i,key_access:/^\\\\.([a-z_][a-z_\\\\d]*)/i,index_access:/^\\\\[(\\\\d+)\\\\]/,sign:/^[\\\\+\\\\-]/};function e(r){return function(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=\\\"\\\";for(a=0;a<d;a++)if(\\\"string\\\"==typeof r[a])g+=r[a];else if(Array.isArray(r[a])){if((s=r[a])[2])for(i=n[p],o=0;o<s[2].length;o++){if(!i.hasOwnProperty(s[2][o]))throw new Error(e('[sprintf] property \\\"%s\\\" does not exist',s[2][o]));i=i[s[2][o]]}else i=s[1]?n[s[1]]:n[p++];if(t.not_type.test(s[8])&&t.not_primitive.test(s[8])&&i instanceof Function&&(i=i()),t.numeric_arg.test(s[8])&&\\\"number\\\"!=typeof i&&isNaN(i))throw new TypeError(e(\\\"[sprintf] expecting number but found %T\\\",i));switch(t.number.test(s[8])&&(f=i>=0),s[8]){case\\\"b\\\":i=parseInt(i,10).toString(2);break;case\\\"c\\\":i=String.fromCharCode(parseInt(i,10));break;case\\\"d\\\":case\\\"i\\\":i=parseInt(i,10);break;case\\\"j\\\":i=JSON.stringify(i,null,s[6]?parseInt(s[6]):0);break;case\\\"e\\\":i=s[7]?parseFloat(i).toExponential(s[7]):parseFloat(i).toExponential();break;case\\\"f\\\":i=s[7]?parseFloat(i).toFixed(s[7]):parseFloat(i);break;case\\\"g\\\":i=s[7]?String(Number(i.toPrecision(s[7]))):parseFloat(i);break;case\\\"o\\\":i=(parseInt(i,10)>>>0).toString(8);break;case\\\"s\\\":i=String(i),i=s[7]?i.substring(0,s[7]):i;break;case\\\"t\\\":i=String(!!i),i=s[7]?i.substring(0,s[7]):i;break;case\\\"T\\\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s[7]?i.substring(0,s[7]):i;break;case\\\"u\\\":i=parseInt(i,10)>>>0;break;case\\\"v\\\":i=i.valueOf(),i=s[7]?i.substring(0,s[7]):i;break;case\\\"x\\\":i=(parseInt(i,10)>>>0).toString(16);break;case\\\"X\\\":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(s[8])?g+=i:(!t.number.test(s[8])||f&&!s[3]?h=\\\"\\\":(h=f?\\\"+\\\":\\\"-\\\",i=i.toString().replace(t.sign,\\\"\\\")),c=s[4]?\\\"0\\\"===s[4]?\\\"0\\\":s[4].charAt(1):\\\" \\\",u=s[6]-(h+i).length,l=s[6]&&u>0?c.repeat(u):\\\"\\\",g+=s[5]?h+i+l:\\\"0\\\"===c?h+l+i:l+h+i)}return g}(function(e){if(i[e])return i[e];var r,n=e,a=[],o=0;for(;n;){if(null!==(r=t.text.exec(n)))a.push(r[0]);else if(null!==(r=t.modulo.exec(n)))a.push(\\\"%\\\");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError(\\\"[sprintf] unexpected placeholder\\\");if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError(\\\"[sprintf] failed to parse named argument key\\\");for(s.push(c[1]);\\\"\\\"!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError(\\\"[sprintf] failed to parse named argument key\\\");s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error(\\\"[sprintf] mixing positional and named placeholders is not (yet) supported\\\");a.push(r)}n=n.substring(r[0].length)}return i[e]=a}(r),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}var i=Object.create(null);\\\"undefined\\\"!=typeof r&&(r.sprintf=e,r.vsprintf=n),\\\"undefined\\\"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],505:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"parenthesis\\\");e.exports=function(t,e,r){if(null==t)throw Error(\\\"First argument should be a string\\\");if(null==e)throw Error(\\\"Separator should be a string or a RegExp\\\");r?(\\\"string\\\"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=[\\\"[]\\\",\\\"()\\\",\\\"{}\\\",\\\"<>\\\",'\\\"\\\"',\\\"''\\\",\\\"``\\\",\\\"\\\\u201c\\\\u201d\\\",\\\"\\\\xab\\\\xbb\\\"]:(\\\"string\\\"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map(function(t){return 1===t.length&&(t+=t),t}));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s<a.length;s++){var l=a[s],c=a[s+1];\\\"\\\\\\\\\\\"===l[l.length-1]&&\\\"\\\\\\\\\\\"!==l[l.length-2]?(o.push(l+e+c),s++):o.push(l)}a=o}for(s=0;s<a.length;s++)i[0]=a[s],a[s]=n.stringify(i,{flat:!0});return a}},{parenthesis:441}],506:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=t.length,r=new Array(e),n=new Array(e),i=new Array(e),a=new Array(e),o=new Array(e),s=new Array(e),l=0;l<e;++l)r[l]=-1,n[l]=0,i[l]=!1,a[l]=0,o[l]=-1,s[l]=[];var c,u=0,f=[],h=[];function p(e){var l=[e],c=[e];for(r[e]=n[e]=u,i[e]=!0,u+=1;c.length>0;){e=c[c.length-1];var p=t[e];if(a[e]<p.length){for(var d=a[e];d<p.length;++d){var g=p[d];if(r[g]<0){r[g]=n[g]=u,i[g]=!0,u+=1,l.push(g),c.push(g);break}i[g]&&(n[e]=0|Math.min(n[e],n[g])),o[g]>=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){for(var v=[],m=[],y=0,d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,v.push(x),m.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(v);for(var b=new Array(y),d=0;d<m.length;d++)for(var _=0;_<m[d].length;_++)b[--y]=m[d][_];h.push(b)}c.pop()}}}for(var l=0;l<e;++l)r[l]<0&&p(l);for(var l=0;l<h.length;l++){var d=h[l];if(0!==d.length){d.sort(function(t,e){return t-e}),c=[d[0]];for(var g=1;g<d.length;g++)d[g]!==d[g-1]&&c.push(d[g]);h[l]=c}}return{components:f,adjacencyList:h}}},{}],507:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t.split(\\\"\\\").map(function(t){return t in n?n[t]:\\\"\\\"}).join(\\\"\\\")};var n={\\\" \\\":\\\" \\\",0:\\\"\\\\u2070\\\",1:\\\"\\\\xb9\\\",2:\\\"\\\\xb2\\\",3:\\\"\\\\xb3\\\",4:\\\"\\\\u2074\\\",5:\\\"\\\\u2075\\\",6:\\\"\\\\u2076\\\",7:\\\"\\\\u2077\\\",8:\\\"\\\\u2078\\\",9:\\\"\\\\u2079\\\",\\\"+\\\":\\\"\\\\u207a\\\",\\\"-\\\":\\\"\\\\u207b\\\",a:\\\"\\\\u1d43\\\",b:\\\"\\\\u1d47\\\",c:\\\"\\\\u1d9c\\\",d:\\\"\\\\u1d48\\\",e:\\\"\\\\u1d49\\\",f:\\\"\\\\u1da0\\\",g:\\\"\\\\u1d4d\\\",h:\\\"\\\\u02b0\\\",i:\\\"\\\\u2071\\\",j:\\\"\\\\u02b2\\\",k:\\\"\\\\u1d4f\\\",l:\\\"\\\\u02e1\\\",m:\\\"\\\\u1d50\\\",n:\\\"\\\\u207f\\\",o:\\\"\\\\u1d52\\\",p:\\\"\\\\u1d56\\\",r:\\\"\\\\u02b3\\\",s:\\\"\\\\u02e2\\\",t:\\\"\\\\u1d57\\\",u:\\\"\\\\u1d58\\\",v:\\\"\\\\u1d5b\\\",w:\\\"\\\\u02b7\\\",x:\\\"\\\\u02e3\\\",y:\\\"\\\\u02b8\\\",z:\\\"\\\\u1dbb\\\"}},{}],508:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=a(t,e),n=r.length,i=new Array(n),o=new Array(n),s=0;s<n;++s)i[s]=[r[s]],o[s]=[s];return{positions:i,cells:o}}(t,e);var r=t.order.join()+\\\"-\\\"+t.dtype,s=o[r],e=+e||0;s||(s=o[r]=function(t,e){var r=t.length,a=[\\\"'use strict';\\\"],o=\\\"surfaceNets\\\"+t.join(\\\"_\\\")+\\\"d\\\"+e;a.push(\\\"var contour=genContour({\\\",\\\"order:[\\\",t.join(),\\\"],\\\",\\\"scalarArguments: 3,\\\",\\\"phase:function phaseFunc(p,a,b,c) { return (p > c)|0 },\\\"),\\\"generic\\\"===e&&a.push(\\\"getters:[0],\\\");for(var s=[],l=[],c=0;c<r;++c)s.push(\\\"d\\\"+c),l.push(\\\"d\\\"+c);for(var c=0;c<1<<r;++c)s.push(\\\"v\\\"+c),l.push(\\\"v\\\"+c);for(var c=0;c<1<<r;++c)s.push(\\\"p\\\"+c),l.push(\\\"p\\\"+c);s.push(\\\"a\\\",\\\"b\\\",\\\"c\\\"),l.push(\\\"a\\\",\\\"c\\\"),a.push(\\\"vertex:function vertexFunc(\\\",s.join(),\\\"){\\\");for(var u=[],c=0;c<1<<r;++c)u.push(\\\"(p\\\"+c+\\\"<<\\\"+c+\\\")\\\");a.push(\\\"var m=(\\\",u.join(\\\"+\\\"),\\\")|0;if(m===0||m===\\\",(1<<(1<<r))-1,\\\"){return}\\\");var f=[],h=[];1<<(1<<r)<=128?(a.push(\\\"switch(m){\\\"),h=a):a.push(\\\"switch(m>>>7){\\\");for(var c=0;c<1<<(1<<r);++c){if(1<<(1<<r)>128&&c%128==0){f.length>0&&h.push(\\\"}}\\\");var p=\\\"vExtra\\\"+f.length;a.push(\\\"case \\\",c>>>7,\\\":\\\",p,\\\"(m&0x7f,\\\",l.join(),\\\");break;\\\"),h=[\\\"function \\\",p,\\\"(m,\\\",l.join(),\\\"){switch(m){\\\"],f.push(h)}h.push(\\\"case \\\",127&c,\\\":\\\");for(var d=new Array(r),g=new Array(r),v=new Array(r),m=new Array(r),y=0,x=0;x<r;++x)d[x]=[],g[x]=[],v[x]=0,m[x]=0;for(var x=0;x<1<<r;++x)for(var b=0;b<r;++b){var _=x^1<<b;if(!(_>x)&&!(c&1<<_)!=!(c&1<<x)){var w=1;c&1<<_?g[b].push(\\\"v\\\"+_+\\\"-v\\\"+x):(g[b].push(\\\"v\\\"+x+\\\"-v\\\"+_),w=-w),w<0?(d[b].push(\\\"-v\\\"+x+\\\"-v\\\"+_),v[b]+=2):(d[b].push(\\\"v\\\"+x+\\\"+v\\\"+_),v[b]-=2),y+=1;for(var k=0;k<r;++k)k!==b&&(_&1<<k?m[k]+=1:m[k]-=1)}}for(var M=[],b=0;b<r;++b)if(0===d[b].length)M.push(\\\"d\\\"+b+\\\"-0.5\\\");else{var A=\\\"\\\";v[b]<0?A=v[b]+\\\"*c\\\":v[b]>0&&(A=\\\"+\\\"+v[b]+\\\"*c\\\");var T=d[b].length/y*.5,S=.5+m[b]/y*.5;M.push(\\\"d\\\"+b+\\\"-\\\"+S+\\\"-\\\"+T+\\\"*(\\\"+d[b].join(\\\"+\\\")+A+\\\")/(\\\"+g[b].join(\\\"+\\\")+\\\")\\\")}h.push(\\\"a.push([\\\",M.join(),\\\"]);\\\",\\\"break;\\\")}a.push(\\\"}},\\\"),f.length>0&&h.push(\\\"}}\\\");for(var C=[],c=0;c<1<<r-1;++c)C.push(\\\"v\\\"+c);C.push(\\\"c0\\\",\\\"c1\\\",\\\"p0\\\",\\\"p1\\\",\\\"a\\\",\\\"b\\\",\\\"c\\\"),a.push(\\\"cell:function cellFunc(\\\",C.join(),\\\"){\\\");var E=i(r-1);a.push(\\\"if(p0){b.push(\\\",E.map(function(t){return\\\"[\\\"+t.map(function(t){return\\\"v\\\"+t})+\\\"]\\\"}).join(),\\\")}else{b.push(\\\",E.map(function(t){var e=t.slice();return e.reverse(),\\\"[\\\"+e.map(function(t){return\\\"v\\\"+t})+\\\"]\\\"}).join(),\\\")}}});function \\\",o,\\\"(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return \\\",o,\\\";\\\");for(var c=0;c<f.length;++c)a.push(f[c].join(\\\"\\\"));return new Function(\\\"genContour\\\",a.join(\\\"\\\"))(n)}(t.order,t.dtype));return s(t,e)};var n=t(\\\"ndarray-extract-contour\\\"),i=t(\\\"triangulate-hypercube\\\"),a=t(\\\"zero-crossings\\\");var o={}},{\\\"ndarray-extract-contour\\\":422,\\\"triangulate-hypercube\\\":518,\\\"zero-crossings\\\":551}],509:[function(t,e,r){\\\"use strict\\\";Object.defineProperty(r,\\\"__esModule\\\",{value:!0});var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError(\\\"Invalid attempt to destructure non-iterable instance\\\")}}(),i=2*Math.PI,a=function(t,e,r,n,i,a,o){var s=t.x,l=t.y;return{x:n*(s*=e)-i*(l*=r)+a,y:i*s+n*l+o}},o=function(t,e){var r=.551915024494,n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:n-i*r,y:i+n*r},{x:a+o*r,y:o-a*r},{x:a,y:o}]},s=function(t,e,r,n){var i=t*n-e*r<0?-1:1,a=(t*r+e*n)/(Math.sqrt(t*t+e*e)*Math.sqrt(t*t+e*e));return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,h=t.xAxisRotation,p=void 0===h?0:h,d=t.largeArcFlag,g=void 0===d?0:d,v=t.sweepFlag,m=void 0===v?0:v,y=[];if(0===u||0===f)return[];var x=Math.sin(p*i/360),b=Math.cos(p*i/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&&0===w)return[];u=Math.abs(u),f=Math.abs(f);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);k>1&&(u*=Math.sqrt(k),f*=Math.sqrt(k));var M=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),v=Math.pow(h,2),m=Math.pow(p,2),y=d*g-d*m-g*v;y<0&&(y=0),y/=d*m+g*v;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*p,b=y*-o/a*h,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,k=(h-x)/a,M=(p-b)/o,A=(-h-x)/a,T=(-p-b)/o,S=s(1,0,k,M),C=s(k,M,A,T);return 0===c&&C>0&&(C-=i),1===c&&C<0&&(C+=i),[_,w,S,C]}(e,r,l,c,u,f,g,m,x,b,_,w),A=n(M,4),T=A[0],S=A[1],C=A[2],E=A[3],L=Math.abs(E)/(i/4);Math.abs(1-L)<1e-7&&(L=1);var z=Math.max(Math.ceil(L),1);E/=z;for(var O=0;O<z;O++)y.push(o(C,E)),C+=E;return y.map(function(t){var e=a(t[0],u,f,b,x,T,S),r=e.x,n=e.y,i=a(t[1],u,f,b,x,T,S),o=i.x,s=i.y,l=a(t[2],u,f,b,x,T,S);return{x1:r,y1:n,x2:o,y2:s,x:l.x,y:l.y}})},e.exports=r.default},{}],510:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"parse-svg-path\\\"),i=t(\\\"abs-svg-path\\\"),a=t(\\\"normalize-svg-path\\\"),o=t(\\\"is-svg-path\\\"),s=t(\\\"assert\\\");e.exports=function(t){Array.isArray(t)&&1===t.length&&\\\"string\\\"==typeof t[0]&&(t=t[0]);\\\"string\\\"==typeof t&&(s(o(t),\\\"String is not an SVG path.\\\"),t=n(t));if(s(Array.isArray(t),\\\"Argument should be a string or an array of path segments.\\\"),t=i(t),!(t=a(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,l=t.length;r<l;r++)for(var c=t[r].slice(1),u=0;u<c.length;u+=2)c[u+0]<e[0]&&(e[0]=c[u+0]),c[u+1]<e[1]&&(e[1]=c[u+1]),c[u+0]>e[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\\\"abs-svg-path\\\":48,assert:56,\\\"is-svg-path\\\":407,\\\"normalize-svg-path\\\":511,\\\"parse-svg-path\\\":443}],511:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,h=0,p=0,d=0,g=t.length;d<g;d++){var v=t[d],m=v[0];switch(m){case\\\"M\\\":l=v[1],c=v[2];break;case\\\"A\\\":var y=n({px:h,py:p,cx:v[6],cy:v[7],rx:v[1],ry:v[2],xAxisRotation:v[3],largeArcFlag:v[4],sweepFlag:v[5]});if(!y.length)continue;for(var x,b=0;b<y.length;b++)x=y[b],v=[\\\"C\\\",x.x1,x.y1,x.x2,x.y2,x.x,x.y],b<y.length-1&&r.push(v);break;case\\\"S\\\":var _=h,w=p;\\\"C\\\"!=e&&\\\"S\\\"!=e||(_+=_-o,w+=w-s),v=[\\\"C\\\",_,w,v[1],v[2],v[3],v[4]];break;case\\\"T\\\":\\\"Q\\\"==e||\\\"T\\\"==e?(u=2*h-u,f=2*p-f):(u=h,f=p),v=a(h,p,u,f,v[1],v[2]);break;case\\\"Q\\\":u=v[1],f=v[2],v=a(h,p,v[1],v[2],v[3],v[4]);break;case\\\"L\\\":v=i(h,p,v[1],v[2]);break;case\\\"H\\\":v=i(h,p,v[1],p);break;case\\\"V\\\":v=i(h,p,h,v[1]);break;case\\\"Z\\\":v=i(h,p,l,c)}e=m,h=v[v.length-2],p=v[v.length-1],v.length>4?(o=v[v.length-4],s=v[v.length-3]):(o=h,s=p),r.push(v)}return r};var n=t(\\\"svg-arc-to-cubic-bezier\\\");function i(t,e,r,n){return[\\\"C\\\",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return[\\\"C\\\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},{\\\"svg-arc-to-cubic-bezier\\\":509}],512:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"svg-path-bounds\\\"),i=t(\\\"parse-svg-path\\\"),a=t(\\\"draw-svg-path\\\"),o=t(\\\"is-svg-path\\\"),s=t(\\\"bitmap-sdf\\\"),l=document.createElement(\\\"canvas\\\"),c=l.getContext(\\\"2d\\\");e.exports=function(t,e){if(!o(t))throw Error(\\\"Argument should be valid svg path string\\\");e||(e={});var r,u;e.shape?(r=e.shape[0],u=e.shape[1]):(r=l.width=e.w||e.width||200,u=l.height=e.h||e.height||200);var f=Math.min(r,u),h=e.stroke||0,p=e.viewbox||e.viewBox||n(t),d=[r/(p[2]-p[0]),u/(p[3]-p[1])],g=Math.min(d[0]||0,d[1]||0)/2;c.fillStyle=\\\"black\\\",c.fillRect(0,0,r,u),c.fillStyle=\\\"white\\\",h&&(\\\"number\\\"!=typeof h&&(h=1),c.strokeStyle=h>0?\\\"white\\\":\\\"black\\\",c.lineWidth=Math.abs(h));if(c.translate(.5*r,.5*u),c.scale(g,g),function(){var t=document.createElement(\\\"canvas\\\").getContext(\\\"2d\\\");t.canvas.width=t.canvas.height=1;var e=new Path2D(\\\"M0,0h1v1h-1v-1Z\\\");t.fillStyle=\\\"black\\\",t.fill(e);var r=t.getImageData(0,0,1,1);return r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);c.fill(v),h&&c.stroke(v)}else{var m=i(t);a(c,m),c.fill(),h&&c.stroke()}return c.setTransform(1,0,0,1,0,0),s(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*f})}},{\\\"bitmap-sdf\\\":81,\\\"draw-svg-path\\\":153,\\\"is-svg-path\\\":407,\\\"parse-svg-path\\\":443,\\\"svg-path-bounds\\\":510}],513:[function(t,e,r){(function(r){\\\"use strict\\\";e.exports=function t(e,r,i){var i=i||{};var o=a[e];o||(o=a[e]={\\\" \\\":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\\\\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o<e.length;++o)for(var s=e[o],l=0;l<3;++l){var c=r[s[l]];n[i++]=c[0],n[i++]=c[1]+1.4,a=Math.max(c[0],a)}return{data:n,shape:a}}(n(r,{triangles:!0,font:e,textAlign:i.textAlign||\\\"left\\\",textBaseline:\\\"alphabetic\\\"}));else{for(var l=r.split(/(\\\\d|\\\\s)/),c=new Array(l.length),u=0,f=0,h=0;h<l.length;++h)c[h]=t(e,l[h]),u+=c[h].data.length,f+=c[h].shape,h>0&&(f+=.02);for(var p=new Float32Array(u),d=0,g=-.5*f,h=0;h<c.length;++h){for(var v=c[h].data,m=0;m<v.length;m+=2)p[d++]=v[m]+g,p[d++]=v[m+1];g+=c[h].shape+.02}s=o[r]={data:p,shape:f}}return s};var n=t(\\\"vectorize-text\\\"),i=window||r.global||{},a=i.__TEXT_CACHE||{};i.__TEXT_CACHE={}}).call(this,t(\\\"_process\\\"))},{_process:465,\\\"vectorize-text\\\":527}],514:[function(t,e,r){!function(t){var r=/^\\\\s+/,n=/\\\\s+$/,i=0,a=t.round,o=t.min,s=t.max,l=t.random;function c(e,l){if(l=l||{},(e=e||\\\"\\\")instanceof c)return e;if(!(this instanceof c))return new c(e,l);var u=function(e){var i={r:0,g:0,b:0},a=1,l=null,c=null,u=null,f=!1,h=!1;\\\"string\\\"==typeof e&&(e=function(t){t=t.replace(r,\\\"\\\").replace(n,\\\"\\\").toLowerCase();var e,i=!1;if(S[t])t=S[t],i=!0;else if(\\\"transparent\\\"==t)return{r:0,g:0,b:0,a:0,format:\\\"name\\\"};if(e=j.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=j.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=j.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=j.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=j.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=j.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=j.hex8.exec(t))return{r:O(e[1]),g:O(e[2]),b:O(e[3]),a:R(e[4]),format:i?\\\"name\\\":\\\"hex8\\\"};if(e=j.hex6.exec(t))return{r:O(e[1]),g:O(e[2]),b:O(e[3]),format:i?\\\"name\\\":\\\"hex\\\"};if(e=j.hex4.exec(t))return{r:O(e[1]+\\\"\\\"+e[1]),g:O(e[2]+\\\"\\\"+e[2]),b:O(e[3]+\\\"\\\"+e[3]),a:R(e[4]+\\\"\\\"+e[4]),format:i?\\\"name\\\":\\\"hex8\\\"};if(e=j.hex3.exec(t))return{r:O(e[1]+\\\"\\\"+e[1]),g:O(e[2]+\\\"\\\"+e[2]),b:O(e[3]+\\\"\\\"+e[3]),format:i?\\\"name\\\":\\\"hex\\\"};return!1}(e));\\\"object\\\"==typeof e&&(V(e.r)&&V(e.g)&&V(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*L(p,255),g:255*L(d,255),b:255*L(g,255)},f=!0,h=\\\"%\\\"===String(e.r).substr(-1)?\\\"prgb\\\":\\\"rgb\\\"):V(e.h)&&V(e.s)&&V(e.v)?(l=P(e.s),c=P(e.v),i=function(e,r,n){e=6*L(e,360),r=L(r,100),n=L(n,100);var i=t.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,l,c),f=!0,h=\\\"hsv\\\"):V(e.h)&&V(e.s)&&V(e.l)&&(l=P(e.s),u=P(e.l),i=function(t,e,r){var n,i,a;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,l,u),f=!0,h=\\\"hsl\\\"),e.hasOwnProperty(\\\"a\\\")&&(a=e.a));var p,d,g;return a=E(a),{ok:f,format:e.format||h,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c>.5?u/(2-a-l):u/(a+l),a){case t:n=(e-r)/u+(e<r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,l:c}}function f(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=a,u=a-l;if(i=0===a?0:u/a,a==l)n=0;else{switch(a){case t:n=(e-r)/u+(e<r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,v:c}}function h(t,e,r,n){var i=[I(a(t).toString(16)),I(a(e).toString(16)),I(a(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(\\\"\\\")}function p(t,e,r,n){return[I(D(n)),I(a(t).toString(16)),I(a(e).toString(16)),I(a(r).toString(16))].join(\\\"\\\")}function d(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s-=e/100,r.s=z(r.s),c(r)}function g(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s+=e/100,r.s=z(r.s),c(r)}function v(t){return c(t).desaturate(100)}function m(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l+=e/100,r.l=z(r.l),c(r)}function y(t,e){e=0===e?0:e||10;var r=c(t).toRgb();return r.r=s(0,o(255,r.r-a(-e/100*255))),r.g=s(0,o(255,r.g-a(-e/100*255))),r.b=s(0,o(255,r.b-a(-e/100*255))),c(r)}function x(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l-=e/100,r.l=z(r.l),c(r)}function b(t,e){var r=c(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,c(r)}function _(t){var e=c(t).toHsl();return e.h=(e.h+180)%360,c(e)}function w(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+120)%360,s:e.s,l:e.l}),c({h:(r+240)%360,s:e.s,l:e.l})]}function k(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+90)%360,s:e.s,l:e.l}),c({h:(r+180)%360,s:e.s,l:e.l}),c({h:(r+270)%360,s:e.s,l:e.l})]}function M(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+72)%360,s:e.s,l:e.l}),c({h:(r+216)%360,s:e.s,l:e.l})]}function A(t,e,r){e=e||6,r=r||30;var n=c(t).toHsl(),i=360/r,a=[c(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function T(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:i,v:a})),a=(a+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,i=this.toRgb();return e=i.r/255,r=i.g/255,n=i.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=E(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.v);return 1==this._a?\\\"hsv(\\\"+e+\\\", \\\"+r+\\\"%, \\\"+n+\\\"%)\\\":\\\"hsva(\\\"+e+\\\", \\\"+r+\\\"%, \\\"+n+\\\"%, \\\"+this._roundA+\\\")\\\"},toHsl:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=u(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.l);return 1==this._a?\\\"hsl(\\\"+e+\\\", \\\"+r+\\\"%, \\\"+n+\\\"%)\\\":\\\"hsla(\\\"+e+\\\", \\\"+r+\\\"%, \\\"+n+\\\"%, \\\"+this._roundA+\\\")\\\"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return\\\"#\\\"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[I(a(t).toString(16)),I(a(e).toString(16)),I(a(r).toString(16)),I(D(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join(\\\"\\\")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return\\\"#\\\"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?\\\"rgb(\\\"+a(this._r)+\\\", \\\"+a(this._g)+\\\", \\\"+a(this._b)+\\\")\\\":\\\"rgba(\\\"+a(this._r)+\\\", \\\"+a(this._g)+\\\", \\\"+a(this._b)+\\\", \\\"+this._roundA+\\\")\\\"},toPercentageRgb:function(){return{r:a(100*L(this._r,255))+\\\"%\\\",g:a(100*L(this._g,255))+\\\"%\\\",b:a(100*L(this._b,255))+\\\"%\\\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\\\"rgb(\\\"+a(100*L(this._r,255))+\\\"%, \\\"+a(100*L(this._g,255))+\\\"%, \\\"+a(100*L(this._b,255))+\\\"%)\\\":\\\"rgba(\\\"+a(100*L(this._r,255))+\\\"%, \\\"+a(100*L(this._g,255))+\\\"%, \\\"+a(100*L(this._b,255))+\\\"%, \\\"+this._roundA+\\\")\\\"},toName:function(){return 0===this._a?\\\"transparent\\\":!(this._a<1)&&(C[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e=\\\"#\\\"+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?\\\"GradientType = 1, \\\":\\\"\\\";if(t){var i=c(t);r=\\\"#\\\"+p(i._r,i._g,i._b,i._a)}return\\\"progid:DXImageTransform.Microsoft.gradient(\\\"+n+\\\"startColorstr=\\\"+e+\\\",endColorstr=\\\"+r+\\\")\\\"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||\\\"hex\\\"!==t&&\\\"hex6\\\"!==t&&\\\"hex3\\\"!==t&&\\\"hex4\\\"!==t&&\\\"hex8\\\"!==t&&\\\"name\\\"!==t?(\\\"rgb\\\"===t&&(r=this.toRgbString()),\\\"prgb\\\"===t&&(r=this.toPercentageRgbString()),\\\"hex\\\"!==t&&\\\"hex6\\\"!==t||(r=this.toHexString()),\\\"hex3\\\"===t&&(r=this.toHexString(!0)),\\\"hex4\\\"===t&&(r=this.toHex8String(!0)),\\\"hex8\\\"===t&&(r=this.toHex8String()),\\\"name\\\"===t&&(r=this.toName()),\\\"hsl\\\"===t&&(r=this.toHslString()),\\\"hsv\\\"===t&&(r=this.toHsvString()),r||this.toHexString()):\\\"name\\\"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if(\\\"object\\\"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=\\\"a\\\"===n?t[n]:P(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),i=c(e).toRgb(),a=r/100;return c({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},c.readability=function(e,r){var n=c(e),i=c(r);return(t.max(n.getLuminance(),i.getLuminance())+.05)/(t.min(n.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,i,a=c.readability(t,e);switch(i=!1,(n=function(t){var e,r;e=((t=t||{level:\\\"AA\\\",size:\\\"small\\\"}).level||\\\"AA\\\").toUpperCase(),r=(t.size||\\\"small\\\").toLowerCase(),\\\"AA\\\"!==e&&\\\"AAA\\\"!==e&&(e=\\\"AA\\\");\\\"small\\\"!==r&&\\\"large\\\"!==r&&(r=\\\"small\\\");return{level:e,size:r}}(r)).level+n.size){case\\\"AAsmall\\\":case\\\"AAAlarge\\\":i=a>=4.5;break;case\\\"AAlarge\\\":i=a>=3;break;case\\\"AAAsmall\\\":i=a>=7}return i},c.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;u<e.length;u++)(n=c.readability(t,e[u]))>l&&(l=n,s=c(e[u]));return c.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,c.mostReadable(t,[\\\"#fff\\\",\\\"#000\\\"],r))};var S=c.names={aliceblue:\\\"f0f8ff\\\",antiquewhite:\\\"faebd7\\\",aqua:\\\"0ff\\\",aquamarine:\\\"7fffd4\\\",azure:\\\"f0ffff\\\",beige:\\\"f5f5dc\\\",bisque:\\\"ffe4c4\\\",black:\\\"000\\\",blanchedalmond:\\\"ffebcd\\\",blue:\\\"00f\\\",blueviolet:\\\"8a2be2\\\",brown:\\\"a52a2a\\\",burlywood:\\\"deb887\\\",burntsienna:\\\"ea7e5d\\\",cadetblue:\\\"5f9ea0\\\",chartreuse:\\\"7fff00\\\",chocolate:\\\"d2691e\\\",coral:\\\"ff7f50\\\",cornflowerblue:\\\"6495ed\\\",cornsilk:\\\"fff8dc\\\",crimson:\\\"dc143c\\\",cyan:\\\"0ff\\\",darkblue:\\\"00008b\\\",darkcyan:\\\"008b8b\\\",darkgoldenrod:\\\"b8860b\\\",darkgray:\\\"a9a9a9\\\",darkgreen:\\\"006400\\\",darkgrey:\\\"a9a9a9\\\",darkkhaki:\\\"bdb76b\\\",darkmagenta:\\\"8b008b\\\",darkolivegreen:\\\"556b2f\\\",darkorange:\\\"ff8c00\\\",darkorchid:\\\"9932cc\\\",darkred:\\\"8b0000\\\",darksalmon:\\\"e9967a\\\",darkseagreen:\\\"8fbc8f\\\",darkslateblue:\\\"483d8b\\\",darkslategray:\\\"2f4f4f\\\",darkslategrey:\\\"2f4f4f\\\",darkturquoise:\\\"00ced1\\\",darkviolet:\\\"9400d3\\\",deeppink:\\\"ff1493\\\",deepskyblue:\\\"00bfff\\\",dimgray:\\\"696969\\\",dimgrey:\\\"696969\\\",dodgerblue:\\\"1e90ff\\\",firebrick:\\\"b22222\\\",floralwhite:\\\"fffaf0\\\",forestgreen:\\\"228b22\\\",fuchsia:\\\"f0f\\\",gainsboro:\\\"dcdcdc\\\",ghostwhite:\\\"f8f8ff\\\",gold:\\\"ffd700\\\",goldenrod:\\\"daa520\\\",gray:\\\"808080\\\",green:\\\"008000\\\",greenyellow:\\\"adff2f\\\",grey:\\\"808080\\\",honeydew:\\\"f0fff0\\\",hotpink:\\\"ff69b4\\\",indianred:\\\"cd5c5c\\\",indigo:\\\"4b0082\\\",ivory:\\\"fffff0\\\",khaki:\\\"f0e68c\\\",lavender:\\\"e6e6fa\\\",lavenderblush:\\\"fff0f5\\\",lawngreen:\\\"7cfc00\\\",lemonchiffon:\\\"fffacd\\\",lightblue:\\\"add8e6\\\",lightcoral:\\\"f08080\\\",lightcyan:\\\"e0ffff\\\",lightgoldenrodyellow:\\\"fafad2\\\",lightgray:\\\"d3d3d3\\\",lightgreen:\\\"90ee90\\\",lightgrey:\\\"d3d3d3\\\",lightpink:\\\"ffb6c1\\\",lightsalmon:\\\"ffa07a\\\",lightseagreen:\\\"20b2aa\\\",lightskyblue:\\\"87cefa\\\",lightslategray:\\\"789\\\",lightslategrey:\\\"789\\\",lightsteelblue:\\\"b0c4de\\\",lightyellow:\\\"ffffe0\\\",lime:\\\"0f0\\\",limegreen:\\\"32cd32\\\",linen:\\\"faf0e6\\\",magenta:\\\"f0f\\\",maroon:\\\"800000\\\",mediumaquamarine:\\\"66cdaa\\\",mediumblue:\\\"0000cd\\\",mediumorchid:\\\"ba55d3\\\",mediumpurple:\\\"9370db\\\",mediumseagreen:\\\"3cb371\\\",mediumslateblue:\\\"7b68ee\\\",mediumspringgreen:\\\"00fa9a\\\",mediumturquoise:\\\"48d1cc\\\",mediumvioletred:\\\"c71585\\\",midnightblue:\\\"191970\\\",mintcream:\\\"f5fffa\\\",mistyrose:\\\"ffe4e1\\\",moccasin:\\\"ffe4b5\\\",navajowhite:\\\"ffdead\\\",navy:\\\"000080\\\",oldlace:\\\"fdf5e6\\\",olive:\\\"808000\\\",olivedrab:\\\"6b8e23\\\",orange:\\\"ffa500\\\",orangered:\\\"ff4500\\\",orchid:\\\"da70d6\\\",palegoldenrod:\\\"eee8aa\\\",palegreen:\\\"98fb98\\\",paleturquoise:\\\"afeeee\\\",palevioletred:\\\"db7093\\\",papayawhip:\\\"ffefd5\\\",peachpuff:\\\"ffdab9\\\",peru:\\\"cd853f\\\",pink:\\\"ffc0cb\\\",plum:\\\"dda0dd\\\",powderblue:\\\"b0e0e6\\\",purple:\\\"800080\\\",rebeccapurple:\\\"663399\\\",red:\\\"f00\\\",rosybrown:\\\"bc8f8f\\\",royalblue:\\\"4169e1\\\",saddlebrown:\\\"8b4513\\\",salmon:\\\"fa8072\\\",sandybrown:\\\"f4a460\\\",seagreen:\\\"2e8b57\\\",seashell:\\\"fff5ee\\\",sienna:\\\"a0522d\\\",silver:\\\"c0c0c0\\\",skyblue:\\\"87ceeb\\\",slateblue:\\\"6a5acd\\\",slategray:\\\"708090\\\",slategrey:\\\"708090\\\",snow:\\\"fffafa\\\",springgreen:\\\"00ff7f\\\",steelblue:\\\"4682b4\\\",tan:\\\"d2b48c\\\",teal:\\\"008080\\\",thistle:\\\"d8bfd8\\\",tomato:\\\"ff6347\\\",turquoise:\\\"40e0d0\\\",violet:\\\"ee82ee\\\",wheat:\\\"f5deb3\\\",white:\\\"fff\\\",whitesmoke:\\\"f5f5f5\\\",yellow:\\\"ff0\\\",yellowgreen:\\\"9acd32\\\"},C=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function E(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return\\\"string\\\"==typeof t&&-1!=t.indexOf(\\\".\\\")&&1===parseFloat(t)})(e)&&(e=\\\"100%\\\");var n=function(t){return\\\"string\\\"==typeof t&&-1!=t.indexOf(\\\"%\\\")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function z(t){return o(1,s(0,t))}function O(t){return parseInt(t,16)}function I(t){return 1==t.length?\\\"0\\\"+t:\\\"\\\"+t}function P(t){return t<=1&&(t=100*t+\\\"%\\\"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return O(t)/255}var B,F,N,j=(F=\\\"[\\\\\\\\s|\\\\\\\\(]+(\\\"+(B=\\\"(?:[-\\\\\\\\+]?\\\\\\\\d*\\\\\\\\.\\\\\\\\d+%?)|(?:[-\\\\\\\\+]?\\\\\\\\d+%?)\\\")+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")\\\\\\\\s*\\\\\\\\)?\\\",N=\\\"[\\\\\\\\s|\\\\\\\\(]+(\\\"+B+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")\\\\\\\\s*\\\\\\\\)?\\\",{CSS_UNIT:new RegExp(B),rgb:new RegExp(\\\"rgb\\\"+F),rgba:new RegExp(\\\"rgba\\\"+N),hsl:new RegExp(\\\"hsl\\\"+F),hsla:new RegExp(\\\"hsla\\\"+N),hsv:new RegExp(\\\"hsv\\\"+F),hsva:new RegExp(\\\"hsva\\\"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(t){return!!j.CSS_UNIT.exec(t)}\\\"undefined\\\"!=typeof e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],515:[function(t,e,r){\\\"use strict\\\";function n(t){if(t instanceof Float32Array)return t;if(\\\"number\\\"==typeof t)return new Float32Array([t])[0];var e=new Float32Array(t);return e.set(t),e}e.exports=n,e.exports.float32=e.exports.float=n,e.exports.fract32=e.exports.fract=function(t){if(\\\"number\\\"==typeof t)return n(t-n(t));for(var e=n(t),r=0,i=e.length;r<i;r++)e[r]=t[r]-e[r];return e}},{}],516:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"parse-unit\\\");e.exports=o;var i=96;function a(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*o(r[1],t)}function o(t,e){switch(e=e||document.body,t=(t||\\\"px\\\").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case\\\"%\\\":return e.clientHeight/100;case\\\"ch\\\":case\\\"ex\\\":return function(t,e){var r=document.createElement(\\\"div\\\");r.style[\\\"font-size\\\"]=\\\"128\\\"+t,e.appendChild(r);var n=a(r,\\\"font-size\\\")/128;return e.removeChild(r),n}(t,e);case\\\"em\\\":return a(e,\\\"font-size\\\");case\\\"rem\\\":return a(document.body,\\\"font-size\\\");case\\\"vw\\\":return window.innerWidth/100;case\\\"vh\\\":return window.innerHeight/100;case\\\"vmin\\\":return Math.min(window.innerWidth,window.innerHeight)/100;case\\\"vmax\\\":return Math.max(window.innerWidth,window.innerHeight)/100;case\\\"in\\\":return i;case\\\"cm\\\":return i/2.54;case\\\"mm\\\":return i/25.4;case\\\"pt\\\":return i/72;case\\\"pc\\\":return i/6}return 1}},{\\\"parse-unit\\\":444}],517:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";var e=function(t){return t},r=function(t){if(null==(r=t.transform))return e;var r,n,i,a=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(t,e){return e||(n=i=0),t[0]=(n+=t[0])*a+s,t[1]=(i+=t[1])*o+l,t}},n=function(t){var e=t.bbox;function n(t){l[0]=t[0],l[1]=t[1],s(l),l[0]<c&&(c=l[0]),l[0]>f&&(f=l[0]),l[1]<u&&(u=l[1]),l[1]>h&&(h=l[1])}function i(t){switch(t.type){case\\\"GeometryCollection\\\":t.geometries.forEach(i);break;case\\\"Point\\\":n(t.coordinates);break;case\\\"MultiPoint\\\":t.coordinates.forEach(n)}}if(!e){var a,o,s=r(t),l=new Array(2),c=1/0,u=c,f=-c,h=-c;for(o in t.arcs.forEach(function(t){for(var e=-1,r=t.length;++e<r;)a=t[e],l[0]=a[0],l[1]=a[1],s(l,e),l[0]<c&&(c=l[0]),l[0]>f&&(f=l[0]),l[1]<u&&(u=l[1]),l[1]>h&&(h=l[1])}),t.objects)i(t.objects[o]);e=t.bbox=[c,u,f,h]}return e},i=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r};function a(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,a=o(t,e);return null==r&&null==n?{type:\\\"Feature\\\",properties:i,geometry:a}:null==n?{type:\\\"Feature\\\",id:r,properties:i,geometry:a}:{type:\\\"Feature\\\",id:r,bbox:n,properties:i,geometry:a}}function o(t,e){var n=r(t),a=t.arcs;function o(t,e){e.length&&e.pop();for(var r=a[t<0?~t:t],o=0,s=r.length;o<s;++o)e.push(n(r[o].slice(),o));t<0&&i(e,s)}function s(t){return n(t.slice())}function l(t){for(var e=[],r=0,n=t.length;r<n;++r)o(t[r],e);return e.length<2&&e.push(e[0].slice()),e}function c(t){for(var e=l(t);e.length<4;)e.push(e[0].slice());return e}function u(t){return t.map(c)}return function t(e){var r,n=e.type;switch(n){case\\\"GeometryCollection\\\":return{type:n,geometries:e.geometries.map(t)};case\\\"Point\\\":r=s(e.coordinates);break;case\\\"MultiPoint\\\":r=e.coordinates.map(s);break;case\\\"LineString\\\":r=l(e.arcs);break;case\\\"MultiLineString\\\":r=e.arcs.map(l);break;case\\\"Polygon\\\":r=u(e.arcs);break;case\\\"MultiPolygon\\\":r=e.arcs.map(u);break;default:return null}return{type:n,coordinates:r}}(e)}var s=function(t,e){var r={},n={},i={},a=[],o=-1;function s(t,e){for(var n in t){var i=t[n];delete e[i.start],delete i.start,delete i.end,i.forEach(function(t){r[t<0?~t:t]=1}),a.push(i)}}return e.forEach(function(r,n){var i,a=t.arcs[r<0?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=e[++o],e[o]=r,e[n]=i)}),e.forEach(function(e){var r,a,o=function(e){var r,n=t.arcs[e<0?~e:e],i=n[0];t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1];return e<0?[r,i]:[i,r]}(e),s=o[0],l=o[1];if(r=i[s])if(delete i[r.end],r.push(e),r.end=l,a=n[l]){delete n[a.start];var c=a===r?r:r.concat(a);n[c.start=r.start]=i[c.end=a.end]=c}else n[r.start]=i[r.end]=r;else if(r=n[l])if(delete n[r.start],r.unshift(e),r.start=s,a=i[s]){delete i[a.end];var u=a===r?r:a.concat(r);n[u.start=a.start]=i[u.end=r.end]=u}else n[r.start]=i[r.end]=r;else n[(r=[e]).start=s]=i[r.end=l]=r}),s(i,n),s(n,i),e.forEach(function(t){r[t<0?~t:t]||a.push([t])}),a};function l(t,e,r){var n,i,a;if(arguments.length>1)n=function(t,e,r){var n,i=[],a=[];function o(t){var e=t<0?~t:t;(a[e]||(a[e]=[])).push({i:t,g:n})}function s(t){t.forEach(o)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case\\\"GeometryCollection\\\":e.geometries.forEach(t);break;case\\\"LineString\\\":s(e.arcs);break;case\\\"MultiLineString\\\":case\\\"Polygon\\\":l(e.arcs);break;case\\\"MultiPolygon\\\":e.arcs.forEach(l)}}(e),a.forEach(null==r?function(t){i.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&&i.push(t[0].i)}),i}(0,e,r);else for(i=0,n=new Array(a=t.arcs.length);i<a;++i)n[i]=i;return{type:\\\"MultiLineString\\\",arcs:s(t,n)}}function c(t,e){var r={},n=[],i=[];function a(t){t.forEach(function(e){e.forEach(function(e){(r[e=e<0?~e:e]||(r[e]=[])).push(t)})}),n.push(t)}function l(e){return function(t){for(var e,r=-1,n=t.length,i=t[n-1],a=0;++r<n;)e=i,i=t[r],a+=e[0]*i[1]-e[1]*i[0];return Math.abs(a)}(o(t,{type:\\\"Polygon\\\",arcs:[e]}).coordinates[0])}return e.forEach(function t(e){switch(e.type){case\\\"GeometryCollection\\\":e.geometries.forEach(t);break;case\\\"Polygon\\\":a(e.arcs);break;case\\\"MultiPolygon\\\":e.arcs.forEach(a)}}),n.forEach(function(t){if(!t._){var e=[],n=[t];for(t._=1,i.push(e);t=n.pop();)e.push(t),t.forEach(function(t){t.forEach(function(t){r[t<0?~t:t].forEach(function(t){t._||(t._=1,n.push(t))})})})}}),n.forEach(function(t){delete t._}),{type:\\\"MultiPolygon\\\",arcs:i.map(function(e){var n,i=[];if(e.forEach(function(t){t.forEach(function(t){t.forEach(function(t){r[t<0?~t:t].length<2&&i.push(t)})})}),(n=(i=s(t,i)).length)>1)for(var a,o,c=1,u=l(i[0]);c<n;++c)(a=l(i[c]))>u&&(o=i[0],i[0]=i[c],i[c]=o,u=a);return i})}}var u=function(t,e){for(var r=0,n=t.length;r<n;){var i=r+n>>>1;t[i]<e?r=i+1:n=i}return r};t.bbox=n,t.feature=function(t,e){return\\\"GeometryCollection\\\"===e.type?{type:\\\"FeatureCollection\\\",features:e.geometries.map(function(e){return a(t,e)})}:a(t,e)},t.mesh=function(t){return o(t,l.apply(this,arguments))},t.meshArcs=l,t.merge=function(t){return o(t,c.apply(this,arguments))},t.mergeArcs=c,t.neighbors=function(t){var e={},r=t.map(function(){return[]});function n(t,r){t.forEach(function(t){t<0&&(t=~t);var n=e[t];n?n.push(r):e[t]=[r]})}function i(t,e){t.forEach(function(t){n(t,e)})}var a={LineString:n,MultiLineString:i,Polygon:i,MultiPolygon:function(t,e){t.forEach(function(t){i(t,e)})}};for(var o in t.forEach(function t(e,r){\\\"GeometryCollection\\\"===e.type?e.geometries.forEach(function(e){t(e,r)}):e.type in a&&a[e.type](e.arcs,r)}),e)for(var s=e[o],l=s.length,c=0;c<l;++c)for(var f=c+1;f<l;++f){var h,p=s[c],d=s[f];(h=r[p])[o=u(h,d)]!==d&&h.splice(o,0,d),(h=r[d])[o=u(h,p)]!==p&&h.splice(o,0,p)}return r},t.quantize=function(t,e){if(!((e=Math.floor(e))>=2))throw new Error(\\\"n must be \\\\u22652\\\");if(t.transform)throw new Error(\\\"already quantized\\\");var r,i=n(t),a=i[0],o=(i[2]-a)/(e-1)||1,s=i[1],l=(i[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-a)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case\\\"GeometryCollection\\\":t.geometries.forEach(u);break;case\\\"Point\\\":c(t.coordinates);break;case\\\"MultiPoint\\\":t.coordinates.forEach(c)}}for(r in t.arcs.forEach(function(t){for(var e,r,n,i=1,c=1,u=t.length,f=t[0],h=f[0]=Math.round((f[0]-a)/o),p=f[1]=Math.round((f[1]-s)/l);i<u;++i)f=t[i],r=Math.round((f[0]-a)/o),n=Math.round((f[1]-s)/l),r===h&&n===p||((e=t[c++])[0]=r-h,h=r,e[1]=n-p,p=n);c<2&&((e=t[c++])[0]=0,e[1]=0),t.length=c}),t.objects)u(t.objects[r]);return t.transform={scale:[o,l],translate:[a,s]},t},t.transform=r,t.untransform=function(t){if(null==(r=t.transform))return e;var r,n,i,a=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(t,e){e||(n=i=0);var r=Math.round((t[0]-s)/a),c=Math.round((t[1]-l)/o);return t[0]=r-n,n=r,t[1]=c-i,i=c,t}},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.topojson=n.topojson||{})},{}],518:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){if(t<0)return[];if(0===t)return[[0]];for(var e=0|Math.round(a(t+1)),r=[],o=0;o<e;++o){for(var s=n.unrank(t,o),l=[0],c=0,u=0;u<s.length;++u)c+=1<<s[u],l.push(c);i(s)<1&&(l[0]=c,l[t]=0),r.push(l)}return r};var n=t(\\\"permutation-rank\\\"),i=t(\\\"permutation-parity\\\"),a=t(\\\"gamma\\\")},{gamma:220,\\\"permutation-parity\\\":446,\\\"permutation-rank\\\":447}],519:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.up||[0,1,0],n=t.right||f(r),i=t.radius||1,a=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),s(r,r),n=[].slice.call(n,0,3),s(n,n),\\\"eye\\\"in t){var p=t.eye,d=[p[0]-e[0],p[1]-e[1],p[2]-e[2]];o(n,d,r),c(n[0],n[1],n[2])<1e-6?n=f(r):s(n,n),i=c(d[0],d[1],d[2]);var g=l(r,d)/i,v=l(n,d)/i;u=Math.acos(g),a=Math.acos(v)}return i=Math.log(i),new h(t.zoomMin,t.zoomMax,e,r,n,i,a,u)};var n=t(\\\"filtered-vector\\\"),i=t(\\\"gl-mat4/invert\\\"),a=t(\\\"gl-mat4/rotate\\\"),o=t(\\\"gl-vec3/cross\\\"),s=t(\\\"gl-vec3/normalize\\\"),l=t(\\\"gl-vec3/dot\\\");function c(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function u(t){return Math.min(1,Math.max(-1,t))}function f(t){var e=Math.abs(t[0]),r=Math.abs(t[1]),n=Math.abs(t[2]),i=[0,0,0];e>Math.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=e[a]*r[a],n+=e[a]*e[a];var l=Math.sqrt(n),u=0;for(a=0;a<3;++a)r[a]-=e[a]*i/n,u+=r[a]*r[a],e[a]/=l;var f=Math.sqrt(u);for(a=0;a<3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],v=Math.cos(d),m=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=v*y,w=m*y,k=x,M=-v*x,A=-m*x,T=y,S=this.computedEye,C=this.computedMatrix;for(a=0;a<3;++a){var E=_*r[a]+w*h[a]+k*e[a];C[4*a+1]=M*r[a]+A*h[a]+T*e[a],C[4*a+2]=E,C[4*a+3]=0}var L=C[1],z=C[5],O=C[9],I=C[2],P=C[6],D=C[10],R=z*D-O*P,B=O*I-L*D,F=L*P-z*I,N=c(R,B,F);R/=N,B/=N,F/=N,C[0]=R,C[4]=B,C[8]=F;for(a=0;a<3;++a)S[a]=b[a]+C[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=C[a+4*j]*S[j];C[12+a]=-u}C[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=o[c],i[4*c+1]=s[c],i[4*c+2]=l[c];a(i,i,n,d);for(c=0;c<3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=c(u-=a*p,f-=o*p,h-=s*p),g=(u/=d)*e+a*r,v=(f/=d)*e+o*r,m=(h/=d)*e+s*r;this.center.move(t,g,v,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;\\\"number\\\"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],f=e[a+8];if(n){var h=Math.abs(s),p=Math.abs(l),d=Math.abs(f),g=Math.max(h,p,d);h===g?(s=s<0?-1:1,l=f=0):d===g?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var v=c(s,l,f);s/=v,l/=v,f/=v}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,k=c(x-=s*w,b-=l*w,_-=f*w),M=l*(_/=k)-f*(b/=k),A=f*(x/=k)-s*_,T=s*b-l*x,S=c(M,A,T);if(M/=S,A/=S,T/=S,this.center.jump(t,H,G,W),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var C=e[1],E=e[5],L=e[9],z=C*x+E*b+L*_,O=C*M+E*A+L*T;m=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(O,z)}else{var I=e[2],P=e[6],D=e[10],R=I*s+P*l+D*f,B=I*x+P*b+D*_,F=I*M+P*A+D*T;m=Math.asin(u(R)),y=Math.atan2(F,B)}this.angle.jump(t,y,m),this.recalcMatrix(t);var N=e[2],j=e[6],V=e[10],U=this.computedMatrix;i(U,e);var q=U[15],H=U[12]/q,G=U[13]/q,W=U[14]/q,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*Y,G-j*Y,W-V*Y)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=c(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],p=c(l,f,h);if(!(p<1e-6)){l/=p,f/=p,h/=p;var d=this.computedRight,g=d[0],v=d[1],m=d[2],y=i*g+a*v+o*m,x=c(g-=y*i,v-=y*a,m-=y*o);if(!(x<.01&&(x=c(g=a*h-o*f,v=o*l-i*h,m=i*f-a*l))<1e-6)){g/=x,v/=x,m/=x,this.up.set(t,i,a,o),this.right.set(t,g,v,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*m-o*v,_=o*g-i*m,w=i*v-a*g,k=c(b,_,w),M=i*l+a*f+o*h,A=g*l+v*f+m*h,T=(b/=k)*l+(_/=k)*f+(w/=k)*h,S=Math.asin(u(M)),C=Math.atan2(T,A),E=this.angle._state,L=E[E.length-1],z=E[E.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-C),I=Math.abs(L-C),P=Math.abs(L-2*Math.PI-C);O<I&&(L+=2*Math.PI),P<I&&(L-=2*Math.PI),this.angle.jump(this.angle.lastT(),L,z),this.angle.set(t,C,S)}}}}},{\\\"filtered-vector\\\":215,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/rotate\\\":258,\\\"gl-vec3/cross\\\":317,\\\"gl-vec3/dot\\\":322,\\\"gl-vec3/normalize\\\":339}],520:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var i=t*e,a=n*t,o=a-(a-t),s=t-o,l=n*e,c=l-(l-e),u=e-c,f=s*u-(i-o*c-s*c-o*u);if(r)return r[0]=f,r[1]=i,r;return[f,i]};var n=+(Math.pow(2,27)+1)},{}],521:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n=t+e,i=n-t,a=e-i,o=t-(n-i);if(r)return r[0]=o+a,r[1]=n,r;return[o+a,n]}},{}],522:[function(t,e,r){(function(e,n){\\\"use strict\\\";var i=t(\\\"bit-twiddle\\\"),a=t(\\\"dup\\\");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var o=\\\"undefined\\\"!=typeof Uint8ClampedArray,s=e.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=a([32,0])),s.BUFFER||(s.BUFFER=a([32,0]));var l=s.DATA,c=s.BUFFER;function u(t){if(t){var e=t.length||t.byteLength,r=i.log2(e);l[r].push(t)}}function f(t){t=i.nextPow2(t);var e=i.log2(t),r=l[e];return r.length>0?r.pop():new ArrayBuffer(t)}function h(t){return new Uint8Array(f(t),0,t)}function p(t){return new Uint16Array(f(2*t),0,t)}function d(t){return new Uint32Array(f(4*t),0,t)}function g(t){return new Int8Array(f(t),0,t)}function v(t){return new Int16Array(f(2*t),0,t)}function m(t){return new Int32Array(f(4*t),0,t)}function y(t){return new Float32Array(f(4*t),0,t)}function x(t){return new Float64Array(f(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(f(t),0,t):h(t)}function _(t){return new DataView(f(t),0,t)}function w(t){t=i.nextPow2(t);var e=i.log2(t),r=c[e];return r.length>0?r.pop():new n(t)}r.free=function(t){if(n.isBuffer(t))c[i.log2(t.length)].push(t);else{if(\\\"[object ArrayBuffer]\\\"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|i.log2(e);l[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){u(t.buffer)},r.freeArrayBuffer=u,r.freeBuffer=function(t){c[i.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\\\"arraybuffer\\\"===e)return f(t);switch(e){case\\\"uint8\\\":return h(t);case\\\"uint16\\\":return p(t);case\\\"uint32\\\":return d(t);case\\\"int8\\\":return g(t);case\\\"int16\\\":return v(t);case\\\"int32\\\":return m(t);case\\\"float\\\":case\\\"float32\\\":return y(t);case\\\"double\\\":case\\\"float64\\\":return x(t);case\\\"uint8_clamped\\\":return b(t);case\\\"buffer\\\":return w(t);case\\\"data\\\":case\\\"dataview\\\":return _(t);default:return null}return null},r.mallocArrayBuffer=f,r.mallocUint8=h,r.mallocUint16=p,r.mallocUint32=d,r.mallocInt8=g,r.mallocInt16=v,r.mallocInt32=m,r.mallocFloat32=r.mallocFloat=y,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=b,r.mallocDataView=_,r.mallocBuffer=w,r.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{},t(\\\"buffer\\\").Buffer)},{\\\"bit-twiddle\\\":80,buffer:93,dup:155}],523:[function(t,e,r){\\\"use strict\\\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n;var i=n.prototype;Object.defineProperty(i,\\\"length\\\",{get:function(){return this.roots.length}}),i.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},i.find=function(t){for(var e=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[e]!==t;){var n=r[e];r[e]=t,e=n}return t},i.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],524:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){return 0===t.length?t:e?(r||t.sort(e),function(t,e){for(var r=1,n=t.length,i=t[0],a=t[0],o=1;o<n;++o)if(a=i,e(i=t[o],a)){if(o===r){r++;continue}t[r++]=i}return t.length=r,t}(t,e)):(r||t.sort(),function(t){for(var e=1,r=t.length,n=t[0],i=t[0],a=1;a<r;++a,i=n)if(i=n,(n=t[a])!==i){if(a===e){e++;continue}t[e++]=n}return t.length=e,t}(t))}},{}],525:[function(t,e,r){var n=/[\\\\'\\\\\\\"]/;e.exports=function(t){return t?(n.test(t.charAt(0))&&(t=t.substr(1)),n.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):\\\"\\\"}},{}],526:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n<i;n++){var a=r[n];for(var o in a)if((void 0===e[o]||Array.isArray(e[o])||t[o]!==e[o])&&o in e){var s;if(!0===a[o])s=e[o];else{if(!1===a[o])continue;if(\\\"function\\\"==typeof a[o]&&void 0===(s=a[o](e[o],t,e)))continue}t[o]=s}}return t}},{}],527:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){\\\"object\\\"==typeof e&&null!==e||(e={});return n(t,e.canvas||i,e.context||a,e)};var n=t(\\\"./lib/vtext\\\"),i=null,a=null;\\\"undefined\\\"!=typeof document&&((i=document.createElement(\\\"canvas\\\")).width=8192,i.height=1024,a=i.getContext(\\\"2d\\\"))},{\\\"./lib/vtext\\\":528}],528:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var a=n.size||64,o=n.font||\\\"normal\\\";return r.font=a+\\\"px \\\"+o,r.textAlign=\\\"start\\\",r.textBaseline=\\\"alphabetic\\\",r.direction=\\\"ltr\\\",f(function(t,e,r,n){var a=0|Math.ceil(e.measureText(r).width+2*n);if(a>8192)throw new Error(\\\"vectorize-text: String too long (sorry, this will get fixed later)\\\");var o=3*n;t.height<o&&(t.height=o),e.fillStyle=\\\"#000\\\",e.fillRect(0,0,t.width,t.height),e.fillStyle=\\\"#fff\\\",e.fillText(r,n,2*n);var s=e.getImageData(0,0,a,o);return i(s.data,[o,a,4]).pick(-1,-1,0).transpose(1,0)}(e,r,t,a),n,a)},e.exports.processPixels=f;var n=t(\\\"surface-nets\\\"),i=t(\\\"ndarray\\\"),a=t(\\\"simplify-planar-graph\\\"),o=t(\\\"clean-pslg\\\"),s=t(\\\"cdt2d\\\"),l=t(\\\"planar-graph-to-polyline\\\");function c(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function u(t,e,r,n){var i=c(t,n),a=function(t,e,r){for(var n=e.textAlign||\\\"start\\\",i=e.textBaseline||\\\"alphabetic\\\",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l<s;++l)for(var c=t[l],u=0;u<2;++u)a[u]=0|Math.min(a[u],c[u]),o[u]=0|Math.max(o[u],c[u]);var f=0;switch(n){case\\\"center\\\":f=-.5*(a[0]+o[0]);break;case\\\"right\\\":case\\\"end\\\":f=-o[0];break;case\\\"left\\\":case\\\"start\\\":f=-a[0];break;default:throw new Error(\\\"vectorize-text: Unrecognized textAlign: '\\\"+n+\\\"'\\\")}var h=0;switch(i){case\\\"hanging\\\":case\\\"top\\\":h=-a[1];break;case\\\"middle\\\":h=-.5*(a[1]+o[1]);break;case\\\"alphabetic\\\":case\\\"ideographic\\\":h=-3*r;break;case\\\"bottom\\\":h=-o[1];break;default:throw new Error(\\\"vectorize-text: Unrecognized textBaseline: '\\\"+i+\\\"'\\\")}var p=1/r;return\\\"lineHeight\\\"in e?p*=+e.lineHeight:\\\"width\\\"in e?p=e.width/(o[0]-a[0]):\\\"height\\\"in e&&(p=e.height/(o[1]-a[1])),t.map(function(t){return[p*(t[0]+f),p*(t[1]+h)]})}(i.positions,e,r),u=i.edges,f=\\\"ccw\\\"===e.orientation;if(o(a,u),e.polygons||e.polygon||e.polyline){for(var h=l(u,a),p=new Array(h.length),d=0;d<h.length;++d){for(var g=h[d],v=new Array(g.length),m=0;m<g.length;++m){for(var y=g[m],x=new Array(y.length),b=0;b<y.length;++b)x[b]=a[y[b]].slice();f&&x.reverse(),v[m]=x}p[d]=v}return p}return e.triangles||e.triangulate||e.triangle?{cells:s(a,u,{delaunay:!1,exterior:!1,interior:!0}),positions:a}:{edges:u,positions:a}}function f(t,e,r){try{return u(t,e,r,!0)}catch(t){}try{return u(t,e,r,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},{cdt2d:94,\\\"clean-pslg\\\":104,ndarray:433,\\\"planar-graph-to-polyline\\\":451,\\\"simplify-planar-graph\\\":500,\\\"surface-nets\\\":508}],529:[function(t,e,r){!function(){\\\"use strict\\\";if(\\\"undefined\\\"==typeof ses||!ses.ok||ses.ok()){\\\"undefined\\\"!=typeof ses&&(ses.weakMapPermitHostObjects=v);var t=!1;if(\\\"function\\\"==typeof WeakMap){var r=WeakMap;if(\\\"undefined\\\"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var n=new r,i=Object.freeze({});if(n.set(i,1),1===n.get(i))return void(e.exports=WeakMap);t=!0}}Object.prototype.hasOwnProperty;var a=Object.getOwnPropertyNames,o=Object.defineProperty,s=Object.isExtensible,l=\\\"weakmap:\\\",c=l+\\\"ident:\\\"+Math.random()+\\\"___\\\";if(\\\"undefined\\\"!=typeof crypto&&\\\"function\\\"==typeof crypto.getRandomValues&&\\\"function\\\"==typeof ArrayBuffer&&\\\"function\\\"==typeof Uint8Array){var u=new ArrayBuffer(25),f=new Uint8Array(u);crypto.getRandomValues(f),c=l+\\\"rand:\\\"+Array.prototype.map.call(f,function(t){return(t%36).toString(36)}).join(\\\"\\\")+\\\"___\\\"}if(o(Object,\\\"getOwnPropertyNames\\\",{value:function(t){return a(t).filter(m)}}),\\\"getPropertyNames\\\"in Object){var h=Object.getPropertyNames;o(Object,\\\"getPropertyNames\\\",{value:function(t){return h(t).filter(m)}})}!function(){var t=Object.freeze;o(Object,\\\"freeze\\\",{value:function(e){return y(e),t(e)}});var e=Object.seal;o(Object,\\\"seal\\\",{value:function(t){return y(t),e(t)}});var r=Object.preventExtensions;o(Object,\\\"preventExtensions\\\",{value:function(t){return y(t),r(t)}})}();var p=!1,d=0,g=function(){this instanceof g||b();var t=[],e=[],r=d++;return Object.create(g.prototype,{get___:{value:x(function(n,i){var a,o=y(n);return o?r in o?o[r]:i:(a=t.indexOf(n))>=0?e[a]:i})},has___:{value:x(function(e){var n=y(e);return n?r in n:t.indexOf(e)>=0})},set___:{value:x(function(n,i){var a,o=y(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this})},delete___:{value:x(function(n){var i,a,o=y(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0||(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),\\\"function\\\"==typeof r?function(){function n(){this instanceof g||b();var e,n=new r,i=void 0,a=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new g),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new g),i.set___(t,e)}else n.set(t,e);return this},Object.create(g.prototype,{get___:{value:x(function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)})},has___:{value:x(function(t){return n.has(t)||!!i&&i.has___(t)})},set___:{value:x(e)},delete___:{value:x(function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e})},permitHostObjects___:{value:x(function(t){if(t!==v)throw new Error(\\\"bogus call to permitHostObjects___\\\");a=!0})}})}t&&\\\"undefined\\\"!=typeof Proxy&&(Proxy=void 0),n.prototype=g.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,\\\"constructor\\\",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(\\\"undefined\\\"!=typeof Proxy&&(Proxy=void 0),e.exports=g)}function v(t){t.permitHostObjects___&&t.permitHostObjects___(v)}function m(t){return!(t.substr(0,l.length)==l&&\\\"___\\\"===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError(\\\"Not an object: \\\"+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||\\\"undefined\\\"==typeof console||(p=!0,console.warn(\\\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\\\"))}}()},{}],530:[function(t,e,r){var n=t(\\\"./hidden-store.js\\\");e.exports=function(){var t={};return function(e){if((\\\"object\\\"!=typeof e||null===e)&&\\\"function\\\"!=typeof e)throw new Error(\\\"Weakmap-shim: Key must be object\\\");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},{\\\"./hidden-store.js\\\":531}],531:[function(t,e,r){e.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,\\\"valueOf\\\",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},{}],532:[function(t,e,r){var n=t(\\\"./create-store.js\\\");e.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty(\\\"value\\\")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return\\\"value\\\"in t(e)},delete:function(e){return delete t(e).value}}}},{\\\"./create-store.js\\\":530}],533:[function(t,e,r){var n=t(\\\"get-canvas-context\\\");e.exports=function(t){return n(\\\"webgl\\\",t)}},{\\\"get-canvas-context\\\":221}],534:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\"),a=n.instance();function o(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}o.prototype=new n.baseCalendar,i(o.prototype,{name:\\\"Chinese\\\",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Chinese\\\",epochs:[\\\"BEC\\\",\\\"EC\\\"],monthNumbers:function(t,e){if(\\\"string\\\"==typeof t){var r=t.match(l);return r?r[0]:\\\"\\\"}var n=this._validateYear(t),i=t.month(),a=\\\"\\\"+this.toChineseMonth(n,i);return e&&a.length<2&&(a=\\\"0\\\"+a),this.isIntercalaryMonth(n,i)&&(a+=\\\"i\\\"),a},monthNames:function(t){if(\\\"string\\\"==typeof t){var e=t.match(c);return e?e[0]:\\\"\\\"}var r=this._validateYear(t),n=t.month(),i=[\\\"\\\\u4e00\\\\u6708\\\",\\\"\\\\u4e8c\\\\u6708\\\",\\\"\\\\u4e09\\\\u6708\\\",\\\"\\\\u56db\\\\u6708\\\",\\\"\\\\u4e94\\\\u6708\\\",\\\"\\\\u516d\\\\u6708\\\",\\\"\\\\u4e03\\\\u6708\\\",\\\"\\\\u516b\\\\u6708\\\",\\\"\\\\u4e5d\\\\u6708\\\",\\\"\\\\u5341\\\\u6708\\\",\\\"\\\\u5341\\\\u4e00\\\\u6708\\\",\\\"\\\\u5341\\\\u4e8c\\\\u6708\\\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\\\"\\\\u95f0\\\"+i),i},monthNamesShort:function(t){if(\\\"string\\\"==typeof t){var e=t.match(u);return e?e[0]:\\\"\\\"}var r=this._validateYear(t),n=t.month(),i=[\\\"\\\\u4e00\\\",\\\"\\\\u4e8c\\\",\\\"\\\\u4e09\\\",\\\"\\\\u56db\\\",\\\"\\\\u4e94\\\",\\\"\\\\u516d\\\",\\\"\\\\u4e03\\\",\\\"\\\\u516b\\\",\\\"\\\\u4e5d\\\",\\\"\\\\u5341\\\",\\\"\\\\u5341\\\\u4e00\\\",\\\"\\\\u5341\\\\u4e8c\\\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\\\"\\\\u95f0\\\"+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))\\\"\\\\u95f0\\\"===e[0]&&(r=!0,e=e.substring(1)),\\\"\\\\u6708\\\"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+[\\\"\\\\u4e00\\\",\\\"\\\\u4e8c\\\",\\\"\\\\u4e09\\\",\\\"\\\\u56db\\\",\\\"\\\\u4e94\\\",\\\"\\\\u516d\\\",\\\"\\\\u4e03\\\",\\\"\\\\u516b\\\",\\\"\\\\u4e5d\\\",\\\"\\\\u5341\\\",\\\"\\\\u5341\\\\u4e00\\\",\\\"\\\\u5341\\\\u4e8c\\\"].indexOf(e);else{var i=e[e.length-1];r=\\\"i\\\"===i||\\\"I\\\"===i}return this.toMonthIndex(t,n,r)},dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),\\\"number\\\"!=typeof t||t<1888||t>2111)throw e.replace(/\\\\{0\\\\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\\\\{0\\\\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\\\\{0\\\\}/,this.local.name);return r?e<r?e+1:e:e+1},intercalaryMonth:function(t){return t=this._validateYear(t),f[t-f[0]]>>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=h[o-h[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(i=a.newDate(l,c,u)).add(4-(i.dayOfWeek()||7),\\\"d\\\");var f=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\\\\{0\\\\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if(\\\"object\\\"==typeof t)o=t,a=e||{};else{var l=\\\"number\\\"==typeof t&&t>=1888&&t<=2111;if(!l)throw new Error(\\\"Lunar year outside range 1888-2111\\\");var c=\\\"number\\\"==typeof e&&e>=1&&e<=12;if(!c)throw new Error(\\\"Lunar month outside range 1 - 12\\\");var u,p=\\\"number\\\"==typeof r&&r>=1&&r<=30;if(!p)throw new Error(\\\"Lunar day outside range 1 - 30\\\");\\\"object\\\"==typeof n?(u=!1,a=n):(u=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:u}}s=o.day-1;var d,g=f[o.year-f[0]],v=g>>13;d=v?o.month>v?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var m=0;m<d;m++){var y=g&1<<12-m?30:29;s+=y}var x=h[o.year-h[0]],b=new Date(x>>9&4095,(x>>5&15)-1,(31&x)+s);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if(\\\"object\\\"==typeof t)i=t,a=e||{};else{var o=\\\"number\\\"==typeof t&&t>=1888&&t<=2111;if(!o)throw new Error(\\\"Solar year outside range 1888-2111\\\");var s=\\\"number\\\"==typeof e&&e>=1&&e<=12;if(!s)throw new Error(\\\"Solar month outside range 1 - 12\\\");var l=\\\"number\\\"==typeof r&&r>=1&&r<=31;if(!l)throw new Error(\\\"Solar day outside range 1 - 31\\\");i={year:t,month:e,day:r},a=n||{}}var c=h[i.year-h[0]],u=i.year<<9|i.month<<5|i.day;a.year=u>=c?i.year:i.year-1,c=h[a.year-h[0]];var p,d=new Date(c>>9&4095,(c>>5&15)-1,31&c),g=new Date(i.year,i.month-1,i.day);p=Math.round((g-d)/864e5);var v,m=f[a.year-f[0]];for(v=0;v<13;v++){var y=m&1<<12-v?30:29;if(p<y)break;p-=y}var x=m>>13;!x||v<x?(a.isIntercalary=!1,a.month=1+v):v===x?(a.isIntercalary=!0,a.month=v):(a.isIntercalary=!1,a.month=v);return a.day=1+p,a}(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(s),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var n=t.year(),i=t.month(),a=this.isIntercalaryMonth(n,i),s=this.toChineseMonth(n,i),l=Object.getPrototypeOf(o.prototype).add.call(this,t,e,r);if(\\\"y\\\"===r){var c=l.year(),u=l.month(),f=this.isIntercalaryMonth(c,s),h=a&&f?this.toMonthIndex(c,s,!0):this.toMonthIndex(c,s,!1);h!==u&&l.month(h)}return l}});var s=/^\\\\s*(-?\\\\d\\\\d\\\\d\\\\d|\\\\d\\\\d)[-\\\\/](\\\\d?\\\\d)([iI]?)[-\\\\/](\\\\d?\\\\d)/m,l=/^\\\\d?\\\\d[iI]?/m,c=/^\\\\u95f0?\\\\u5341?[\\\\u4e00\\\\u4e8c\\\\u4e09\\\\u56db\\\\u4e94\\\\u516d\\\\u4e03\\\\u516b\\\\u4e5d]?\\\\u6708/m,u=/^\\\\u95f0?\\\\u5341?[\\\\u4e00\\\\u4e8c\\\\u4e09\\\\u56db\\\\u4e94\\\\u516d\\\\u4e03\\\\u516b\\\\u4e5d]?/m;n.calendars.chinese=o;var f=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],h=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{\\\"../main\\\":548,\\\"object-assign\\\":437}],535:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Coptic\\\",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Coptic\\\",epochs:[\\\"BAM\\\",\\\"AM\\\"],monthNames:[\\\"Thout\\\",\\\"Paopi\\\",\\\"Hathor\\\",\\\"Koiak\\\",\\\"Tobi\\\",\\\"Meshir\\\",\\\"Paremhat\\\",\\\"Paremoude\\\",\\\"Pashons\\\",\\\"Paoni\\\",\\\"Epip\\\",\\\"Mesori\\\",\\\"Pi Kogi Enavot\\\"],monthNamesShort:[\\\"Tho\\\",\\\"Pao\\\",\\\"Hath\\\",\\\"Koi\\\",\\\"Tob\\\",\\\"Mesh\\\",\\\"Pat\\\",\\\"Pad\\\",\\\"Pash\\\",\\\"Pao\\\",\\\"Epi\\\",\\\"Meso\\\",\\\"PiK\\\"],dayNames:[\\\"Tkyriaka\\\",\\\"Pesnau\\\",\\\"Pshoment\\\",\\\"Peftoou\\\",\\\"Ptiou\\\",\\\"Psoou\\\",\\\"Psabbaton\\\"],dayNamesShort:[\\\"Tky\\\",\\\"Pes\\\",\\\"Psh\\\",\\\"Pef\\\",\\\"Pti\\\",\\\"Pso\\\",\\\"Psa\\\"],dayNamesMin:[\\\"Tk\\\",\\\"Pes\\\",\\\"Psh\\\",\\\"Pef\\\",\\\"Pt\\\",\\\"Pso\\\",\\\"Psa\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\\\"\\\"].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.coptic=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],536:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Discworld\\\",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Discworld\\\",epochs:[\\\"BUC\\\",\\\"UC\\\"],monthNames:[\\\"Ick\\\",\\\"Offle\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"Grune\\\",\\\"August\\\",\\\"Spune\\\",\\\"Sektober\\\",\\\"Ember\\\",\\\"December\\\"],monthNamesShort:[\\\"Ick\\\",\\\"Off\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Gru\\\",\\\"Aug\\\",\\\"Spu\\\",\\\"Sek\\\",\\\"Emb\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Octeday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Oct\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Oc\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,n.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||\\\"\\\"}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()<0?1:0),e=i.month(),(r=i.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:\\\"Fruitbat\\\",21:\\\"Anchovy\\\"};n.calendars.discworld=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],537:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Ethiopian\\\",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Ethiopian\\\",epochs:[\\\"BEE\\\",\\\"EE\\\"],monthNames:[\\\"Meskerem\\\",\\\"Tikemet\\\",\\\"Hidar\\\",\\\"Tahesas\\\",\\\"Tir\\\",\\\"Yekatit\\\",\\\"Megabit\\\",\\\"Miazia\\\",\\\"Genbot\\\",\\\"Sene\\\",\\\"Hamle\\\",\\\"Nehase\\\",\\\"Pagume\\\"],monthNamesShort:[\\\"Mes\\\",\\\"Tik\\\",\\\"Hid\\\",\\\"Tah\\\",\\\"Tir\\\",\\\"Yek\\\",\\\"Meg\\\",\\\"Mia\\\",\\\"Gen\\\",\\\"Sen\\\",\\\"Ham\\\",\\\"Neh\\\",\\\"Pag\\\"],dayNames:[\\\"Ehud\\\",\\\"Segno\\\",\\\"Maksegno\\\",\\\"Irob\\\",\\\"Hamus\\\",\\\"Arb\\\",\\\"Kidame\\\"],dayNamesShort:[\\\"Ehu\\\",\\\"Seg\\\",\\\"Mak\\\",\\\"Iro\\\",\\\"Ham\\\",\\\"Arb\\\",\\\"Kid\\\"],dayNamesMin:[\\\"Eh\\\",\\\"Se\\\",\\\"Ma\\\",\\\"Ir\\\",\\\"Ha\\\",\\\"Ar\\\",\\\"Ki\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\\\"\\\"].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],538:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Hebrew\\\",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Hebrew\\\",epochs:[\\\"BAM\\\",\\\"AM\\\"],monthNames:[\\\"Nisan\\\",\\\"Iyar\\\",\\\"Sivan\\\",\\\"Tammuz\\\",\\\"Av\\\",\\\"Elul\\\",\\\"Tishrei\\\",\\\"Cheshvan\\\",\\\"Kislev\\\",\\\"Tevet\\\",\\\"Shevat\\\",\\\"Adar\\\",\\\"Adar II\\\"],monthNamesShort:[\\\"Nis\\\",\\\"Iya\\\",\\\"Siv\\\",\\\"Tam\\\",\\\"Av\\\",\\\"Elu\\\",\\\"Tis\\\",\\\"Che\\\",\\\"Kis\\\",\\\"Tev\\\",\\\"She\\\",\\\"Ada\\\",\\\"Ad2\\\"],dayNames:[\\\"Yom Rishon\\\",\\\"Yom Sheni\\\",\\\"Yom Shlishi\\\",\\\"Yom Revi'i\\\",\\\"Yom Chamishi\\\",\\\"Yom Shishi\\\",\\\"Yom Shabbat\\\"],dayNamesShort:[\\\"Ris\\\",\\\"She\\\",\\\"Shl\\\",\\\"Rev\\\",\\\"Cha\\\",\\\"Shi\\\",\\\"Sha\\\"],dayNamesMin:[\\\"Ri\\\",\\\"She\\\",\\\"Shl\\\",\\\"Re\\\",\\\"Ch\\\",\\\"Shi\\\",\\\"Sha\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?\\\"embolismic\\\":\\\"common\\\")+\\\" \\\"+[\\\"deficient\\\",\\\"regular\\\",\\\"complete\\\"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s<e;s++)o+=this.daysInMonth(t,s)}else for(s=7;s<e;s++)o+=this.daysInMonth(t,s);return o},_delay1:function(t){var e=Math.floor((235*t-234)/19),r=12084+13753*e,n=29*e+Math.floor(r/25920);return o(3*(n+1),7)<3&&n++,n},_delay2:function(t){var e=this._delay1(t-1),r=this._delay1(t);return this._delay1(t+1)-r==356?2:r-e==382?1:0},fromJD:function(t){t=Math.floor(t)+.5;for(var e=Math.floor(98496*(t-this.jdEpoch)/35975351)-1;t>=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=t<this.toJD(e,1,1)?7:1;t>this.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],539:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Islamic\\\",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Islamic\\\",epochs:[\\\"BH\\\",\\\"AH\\\"],monthNames:[\\\"Muharram\\\",\\\"Safar\\\",\\\"Rabi' al-awwal\\\",\\\"Rabi' al-thani\\\",\\\"Jumada al-awwal\\\",\\\"Jumada al-thani\\\",\\\"Rajab\\\",\\\"Sha'aban\\\",\\\"Ramadan\\\",\\\"Shawwal\\\",\\\"Dhu al-Qi'dah\\\",\\\"Dhu al-Hijjah\\\"],monthNamesShort:[\\\"Muh\\\",\\\"Saf\\\",\\\"Rab1\\\",\\\"Rab2\\\",\\\"Jum1\\\",\\\"Jum2\\\",\\\"Raj\\\",\\\"Sha'\\\",\\\"Ram\\\",\\\"Shaw\\\",\\\"DhuQ\\\",\\\"DhuH\\\"],dayNames:[\\\"Yawm al-ahad\\\",\\\"Yawm al-ithnayn\\\",\\\"Yawm ath-thulaathaa'\\\",\\\"Yawm al-arbi'aa'\\\",\\\"Yawm al-kham\\\\u012bs\\\",\\\"Yawm al-jum'a\\\",\\\"Yawm as-sabt\\\"],dayNamesShort:[\\\"Aha\\\",\\\"Ith\\\",\\\"Thu\\\",\\\"Arb\\\",\\\"Kha\\\",\\\"Jum\\\",\\\"Sab\\\"],dayNamesMin:[\\\"Ah\\\",\\\"It\\\",\\\"Th\\\",\\\"Ar\\\",\\\"Kh\\\",\\\"Ju\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t<=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],540:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Julian\\\",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Julian\\\",epochs:[\\\"BC\\\",\\\"AD\\\"],monthNames:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],monthNamesShort:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"mm/dd/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),n.calendars.julian=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],541:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Mayan\\\",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{\\\"\\\":{name:\\\"Mayan\\\",epochs:[\\\"\\\",\\\"\\\"],monthNames:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\"],monthNamesShort:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\"],dayNames:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\",\\\"18\\\",\\\"19\\\"],dayNamesShort:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\",\\\"18\\\",\\\"19\\\"],dayNamesMin:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\",\\\"18\\\",\\\"19\\\"],digits:null,dateFormat:\\\"YYYY.m.d\\\",firstDay:0,isRTL:!1,haabMonths:[\\\"Pop\\\",\\\"Uo\\\",\\\"Zip\\\",\\\"Zotz\\\",\\\"Tzec\\\",\\\"Xul\\\",\\\"Yaxkin\\\",\\\"Mol\\\",\\\"Chen\\\",\\\"Yax\\\",\\\"Zac\\\",\\\"Ceh\\\",\\\"Mac\\\",\\\"Kankin\\\",\\\"Muan\\\",\\\"Pax\\\",\\\"Kayab\\\",\\\"Cumku\\\",\\\"Uayeb\\\"],tzolkinMonths:[\\\"Imix\\\",\\\"Ik\\\",\\\"Akbal\\\",\\\"Kan\\\",\\\"Chicchan\\\",\\\"Cimi\\\",\\\"Manik\\\",\\\"Lamat\\\",\\\"Muluc\\\",\\\"Oc\\\",\\\"Chuen\\\",\\\"Eb\\\",\\\"Ben\\\",\\\"Ix\\\",\\\"Men\\\",\\\"Cib\\\",\\\"Caban\\\",\\\"Etznab\\\",\\\"Cauac\\\",\\\"Ahau\\\"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+\\\".\\\"+Math.floor(t/20)+\\\".\\\"+t%20},forYear:function(t){if((t=t.split(\\\".\\\")).length<3)throw\\\"Invalid Mayan year\\\";for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r],10);if(Math.abs(n)>19||r>0&&n<0)throw\\\"Invalid Mayan year\\\";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(t){var e=o((t-=this.jdEpoch)+8+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s((t-=this.jdEpoch)+20,20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],542:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar;var o=n.instance(\\\"gregorian\\\");i(a.prototype,{name:\\\"Nanakshahi\\\",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Nanakshahi\\\",epochs:[\\\"BN\\\",\\\"AN\\\"],monthNames:[\\\"Chet\\\",\\\"Vaisakh\\\",\\\"Jeth\\\",\\\"Harh\\\",\\\"Sawan\\\",\\\"Bhadon\\\",\\\"Assu\\\",\\\"Katak\\\",\\\"Maghar\\\",\\\"Poh\\\",\\\"Magh\\\",\\\"Phagun\\\"],monthNamesShort:[\\\"Che\\\",\\\"Vai\\\",\\\"Jet\\\",\\\"Har\\\",\\\"Saw\\\",\\\"Bha\\\",\\\"Ass\\\",\\\"Kat\\\",\\\"Mgr\\\",\\\"Poh\\\",\\\"Mgh\\\",\\\"Pha\\\"],dayNames:[\\\"Somvaar\\\",\\\"Mangalvar\\\",\\\"Budhvaar\\\",\\\"Veervaar\\\",\\\"Shukarvaar\\\",\\\"Sanicharvaar\\\",\\\"Etvaar\\\"],dayNamesShort:[\\\"Som\\\",\\\"Mangal\\\",\\\"Budh\\\",\\\"Veer\\\",\\\"Shukar\\\",\\\"Sanichar\\\",\\\"Et\\\"],dayNamesMin:[\\\"So\\\",\\\"Ma\\\",\\\"Bu\\\",\\\"Ve\\\",\\\"Sh\\\",\\\"Sa\\\",\\\"Et\\\"],digits:null,dateFormat:\\\"dd-mm-yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\\\"\\\"].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth);(t=i.year())<0&&t++;for(var a=i.day(),s=1;s<i.month();s++)a+=this.daysPerMonth[s-1];return a+o.toJD(t+1468,3,13)},fromJD:function(t){t=Math.floor(t+.5);for(var e=Math.floor((t-(this.jdEpoch-1))/366);t>=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],543:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Nepali\\\",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{\\\"\\\":{name:\\\"Nepali\\\",epochs:[\\\"BBS\\\",\\\"ABS\\\"],monthNames:[\\\"Baisakh\\\",\\\"Jestha\\\",\\\"Ashadh\\\",\\\"Shrawan\\\",\\\"Bhadra\\\",\\\"Ashwin\\\",\\\"Kartik\\\",\\\"Mangsir\\\",\\\"Paush\\\",\\\"Mangh\\\",\\\"Falgun\\\",\\\"Chaitra\\\"],monthNamesShort:[\\\"Bai\\\",\\\"Je\\\",\\\"As\\\",\\\"Shra\\\",\\\"Bha\\\",\\\"Ash\\\",\\\"Kar\\\",\\\"Mang\\\",\\\"Pau\\\",\\\"Ma\\\",\\\"Fal\\\",\\\"Chai\\\"],dayNames:[\\\"Aaitabaar\\\",\\\"Sombaar\\\",\\\"Manglbaar\\\",\\\"Budhabaar\\\",\\\"Bihibaar\\\",\\\"Shukrabaar\\\",\\\"Shanibaar\\\"],dayNamesShort:[\\\"Aaita\\\",\\\"Som\\\",\\\"Mangl\\\",\\\"Budha\\\",\\\"Bihi\\\",\\\"Shukra\\\",\\\"Shani\\\"],dayNamesMin:[\\\"Aai\\\",\\\"So\\\",\\\"Man\\\",\\\"Bu\\\",\\\"Bi\\\",\\\"Shu\\\",\\\"Sha\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),\\\"undefined\\\"==typeof this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),\\\"undefined\\\"==typeof this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,\\\"d\\\").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r<t+2;r++)\\\"undefined\\\"==typeof this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=e)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2000:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),n.calendars.nepali=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],544:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Persian\\\",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Persian\\\",epochs:[\\\"BP\\\",\\\"AP\\\"],monthNames:[\\\"Farvardin\\\",\\\"Ordibehesht\\\",\\\"Khordad\\\",\\\"Tir\\\",\\\"Mordad\\\",\\\"Shahrivar\\\",\\\"Mehr\\\",\\\"Aban\\\",\\\"Azar\\\",\\\"Day\\\",\\\"Bahman\\\",\\\"Esfand\\\"],monthNamesShort:[\\\"Far\\\",\\\"Ord\\\",\\\"Kho\\\",\\\"Tir\\\",\\\"Mor\\\",\\\"Sha\\\",\\\"Meh\\\",\\\"Aba\\\",\\\"Aza\\\",\\\"Day\\\",\\\"Bah\\\",\\\"Esf\\\"],dayNames:[\\\"Yekshambe\\\",\\\"Doshambe\\\",\\\"Seshambe\\\",\\\"Ch\\\\xe6harshambe\\\",\\\"Panjshambe\\\",\\\"Jom'e\\\",\\\"Shambe\\\"],dayNamesShort:[\\\"Yek\\\",\\\"Do\\\",\\\"Se\\\",\\\"Ch\\\\xe6\\\",\\\"Panj\\\",\\\"Jom\\\",\\\"Sha\\\"],dayNamesMin:[\\\"Ye\\\",\\\"Do\\\",\\\"Se\\\",\\\"Ch\\\",\\\"Pa\\\",\\\"Jo\\\",\\\"Sh\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:6,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 682*((e.year()-(e.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t-(t>=0?474:473),s=474+o(a,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,1029983),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l<=0?l-1:l;var c=t-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=t-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}}),n.calendars.persian=a,n.calendars.jalali=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],545:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\"),a=n.instance();function o(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}o.prototype=new n.baseCalendar,i(o.prototype,{name:\\\"Taiwan\\\",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Taiwan\\\",epochs:[\\\"BROC\\\",\\\"ROC\\\"],monthNames:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],monthNamesShort:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{\\\"../main\\\":548,\\\"object-assign\\\":437}],546:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\"),a=n.instance();function o(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}o.prototype=new n.baseCalendar,i(o.prototype,{name:\\\"Thai\\\",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Thai\\\",epochs:[\\\"BBE\\\",\\\"BE\\\"],monthNames:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],monthNamesShort:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},{\\\"../main\\\":548,\\\"object-assign\\\":437}],547:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"UmmAlQura\\\",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Umm al-Qura\\\",epochs:[\\\"BH\\\",\\\"AH\\\"],monthNames:[\\\"Al-Muharram\\\",\\\"Safar\\\",\\\"Rabi' al-awwal\\\",\\\"Rabi' Al-Thani\\\",\\\"Jumada Al-Awwal\\\",\\\"Jumada Al-Thani\\\",\\\"Rajab\\\",\\\"Sha'aban\\\",\\\"Ramadan\\\",\\\"Shawwal\\\",\\\"Dhu al-Qi'dah\\\",\\\"Dhu al-Hijjah\\\"],monthNamesShort:[\\\"Muh\\\",\\\"Saf\\\",\\\"Rab1\\\",\\\"Rab2\\\",\\\"Jum1\\\",\\\"Jum2\\\",\\\"Raj\\\",\\\"Sha'\\\",\\\"Ram\\\",\\\"Shaw\\\",\\\"DhuQ\\\",\\\"DhuH\\\"],dayNames:[\\\"Yawm al-Ahad\\\",\\\"Yawm al-Ithnain\\\",\\\"Yawm al-Thal\\\\u0101th\\\\u0101\\\\u2019\\\",\\\"Yawm al-Arba\\\\u2018\\\\u0101\\\\u2019\\\",\\\"Yawm al-Kham\\\\u012bs\\\",\\\"Yawm al-Jum\\\\u2018a\\\",\\\"Yawm al-Sabt\\\"],dayNamesMin:[\\\"Ah\\\",\\\"Ith\\\",\\\"Th\\\",\\\"Ar\\\",\\\"Kh\\\",\\\"Ju\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;a<o.length;a++){if(o[a]>r)return o[i]-o[i-1];i++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;n<o.length&&!(o[n]>e);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,c=e-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,e,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\\\\{0\\\\}/,this.local.name);return a}}),n.calendars.ummalqura=a;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{\\\"../main\\\":548,\\\"object-assign\\\":437}],548:[function(t,e,r){var n=t(\\\"object-assign\\\");function i(){this.regionalOptions=[],this.regionalOptions[\\\"\\\"]={invalidCalendar:\\\"Calendar {0} not found\\\",invalidDate:\\\"Invalid {0} date\\\",invalidMonth:\\\"Invalid {0} month\\\",invalidYear:\\\"Invalid {0} year\\\",differentCalendars:\\\"Cannot mix {0} and {1} dates\\\"},this.local=this.regionalOptions[\\\"\\\"],this.calendars={},this._localCals={}}function a(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate).replace(/\\\\{0\\\\}/,this._calendar.local.name)}function o(t,e){return\\\"000000\\\".substring(0,e-(t=\\\"\\\"+t).length)+t}function s(){this.shortYearCutoff=\\\"+10\\\"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[\\\"\\\"]}n(i.prototype,{instance:function(t,e){t=(t||\\\"gregorian\\\").toLowerCase(),e=e||\\\"\\\";var r=this._localCals[t+\\\"-\\\"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+\\\"-\\\"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[\\\"\\\"].invalidCalendar).replace(/\\\\{0\\\\}/,t);return r},newDate:function(t,e,r,n,i){return(n=(null!=t&&t.year?t.calendar():\\\"string\\\"==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+\\\"\\\").replace(/[0-9]/g,function(e){return t[e]})}},substituteChineseDigits:function(t,e){return function(r){for(var n=\\\"\\\",i=0;r>0;){var a=r%10;n=(0===a?\\\"\\\":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(a.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,\\\"y\\\")},month:function(t){return 0===arguments.length?this._month:this.set(t,\\\"m\\\")},day:function(t){return 0===arguments.length?this._day:this.set(t,\\\"d\\\")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate).replace(/\\\\{0\\\\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[\\\"\\\"].differentCalendars).replace(/\\\\{0\\\\}/,this._calendar.local.name).replace(/\\\\{1\\\\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?\\\"-\\\":\\\"\\\")+o(Math.abs(this.year()),4)+\\\"-\\\"+o(this.month(),2)+\\\"-\\\"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate),r=t.day(),e=t.month(),t=t.year()),new a(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear);return(e.year()<0?\\\"-\\\":\\\"\\\")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[\\\"\\\"].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,c.local.invalidMonth||c.regionalOptions[\\\"\\\"].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,\\\"d\\\"===r||\\\"w\\\"===r){var n=t.toJD()+e*(\\\"w\\\"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+(\\\"y\\\"===r?e:0),o=t.monthOfYear()+(\\\"m\\\"===r?e:0);i=t.day();\\\"y\\\"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):\\\"m\\\"===r&&(!function(t){for(;o<t.minMonth;)a--,o+=t.monthsInYear(a);for(var e=t.monthsInYear(a);o>e-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||\\\"y\\\"!==n&&\\\"m\\\"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,\\\"y\\\"],m:[1,this.monthsInYear(-1),\\\"m\\\"],w:[this.daysInWeek(),this.daysInYear(-1),\\\"d\\\"],d:[1,this.daysInYear(-1),\\\"d\\\"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);var n=\\\"y\\\"===r?e:t.year(),i=\\\"m\\\"===r?e:t.month(),a=\\\"d\\\"===r?e:t.day();return\\\"y\\\"!==r&&\\\"m\\\"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth<this.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);return c.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(c.instance().fromJSDate(t).toJD())},_validate:function(t,e,r,n){if(t.year){if(0===this._validateLevel&&this.name!==t.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[\\\"\\\"].differentCalendars).replace(/\\\\{0\\\\}/,this.local.name).replace(/\\\\{1\\\\}/,t.calendar().local.name);return t}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(t,e,r))throw n.replace(/\\\\{0\\\\}/,this.local.name);var i=this.newDate(t,e,r);return this._validateLevel--,i}catch(t){throw this._validateLevel--,t}}}),l.prototype=new s,n(l.prototype,{name:\\\"Gregorian\\\",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Gregorian\\\",epochs:[\\\"BCE\\\",\\\"CE\\\"],monthNames:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],monthNamesShort:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"mm/dd/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==0&&(t%100!=0||t%400==0)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[\\\"\\\"].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<3&&(e+=12,t--);var i=Math.floor(t/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r+a-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=Math.floor((e-1867216.25)/36524.25),n=(r=e+1+r-Math.floor(r/4))+1524,i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var c=e.exports=new i;c.cdate=a,c.baseCalendar=s,c.calendars.gregorian=l},{\\\"object-assign\\\":437}],549:[function(t,e,r){var n=t(\\\"object-assign\\\"),i=t(\\\"./main\\\");n(i.regionalOptions[\\\"\\\"],{invalidArguments:\\\"Invalid arguments\\\",invalidFormat:\\\"Cannot format a date from another calendar\\\",missingNumberAt:\\\"Missing number at position {0}\\\",unknownNameAt:\\\"Unknown name at position {0}\\\",unexpectedLiteralAt:\\\"Unexpected literal at position {0}\\\",unexpectedText:\\\"Additional text found at end\\\"}),i.local=i.regionalOptions[\\\"\\\"],n(i.cdate.prototype,{formatDate:function(t,e){return\\\"string\\\"!=typeof t&&(e=t,t=\\\"\\\"),this._calendar.formatDate(t||\\\"\\\",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:\\\"yyyy-mm-dd\\\",COOKIE:\\\"D, dd M yyyy\\\",FULL:\\\"DD, MM d, yyyy\\\",ISO_8601:\\\"yyyy-mm-dd\\\",JULIAN:\\\"J\\\",RFC_822:\\\"D, d M yy\\\",RFC_850:\\\"DD, dd-M-yy\\\",RFC_1036:\\\"D, d M yy\\\",RFC_1123:\\\"D, d M yyyy\\\",RFC_2822:\\\"D, d M yyyy\\\",RSS:\\\"D, d M yy\\\",TICKS:\\\"!\\\",TIMESTAMP:\\\"@\\\",W3C:\\\"yyyy-mm-dd\\\",formatDate:function(t,e,r){if(\\\"string\\\"!=typeof t&&(r=e,e=t,t=\\\"\\\"),!e)return\\\"\\\";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[\\\"\\\"].invalidFormat;t=t||this.local.dateFormat;for(var n,a,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,f=r.monthNamesShort||this.local.monthNamesShort,h=r.monthNames||this.local.monthNames,p=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;w+n<t.length&&t.charAt(w+n)===e;)n++;return w+=n-1,Math.floor(n/(r||1))>1}),d=function(t,e,r,n){var i=\\\"\\\"+e;if(p(t,n))for(;i.length<r;)i=\\\"0\\\"+i;return i},g=this,v=function(t){return\\\"function\\\"==typeof u?u.call(g,t,p(\\\"m\\\")):x(d(\\\"m\\\",t.month(),2))},m=function(t,e){return e?\\\"function\\\"==typeof h?h.call(g,t):h[t.month()-g.minMonth]:\\\"function\\\"==typeof f?f.call(g,t):f[t.month()-g.minMonth]},y=this.local.digits,x=function(t){return r.localNumbers&&y?y(t):t},b=\\\"\\\",_=!1,w=0;w<t.length;w++)if(_)\\\"'\\\"!==t.charAt(w)||p(\\\"'\\\")?b+=t.charAt(w):_=!1;else switch(t.charAt(w)){case\\\"d\\\":b+=x(d(\\\"d\\\",e.day(),2));break;case\\\"D\\\":b+=(n=\\\"D\\\",a=e.dayOfWeek(),o=l,s=c,p(n)?s[a]:o[a]);break;case\\\"o\\\":b+=d(\\\"o\\\",e.dayOfYear(),3);break;case\\\"w\\\":b+=d(\\\"w\\\",e.weekOfYear(),2);break;case\\\"m\\\":b+=v(e);break;case\\\"M\\\":b+=m(e,p(\\\"M\\\"));break;case\\\"y\\\":b+=p(\\\"y\\\",2)?e.year():(e.year()%100<10?\\\"0\\\":\\\"\\\")+e.year()%100;break;case\\\"Y\\\":p(\\\"Y\\\",2),b+=e.formatYear();break;case\\\"J\\\":b+=e.toJD();break;case\\\"@\\\":b+=(e.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case\\\"!\\\":b+=(e.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case\\\"'\\\":p(\\\"'\\\")?b+=\\\"'\\\":_=!0;break;default:b+=t.charAt(w)}return b},parseDate:function(t,e,r){if(null==e)throw i.local.invalidArguments||i.regionalOptions[\\\"\\\"].invalidArguments;if(\\\"\\\"===(e=\\\"object\\\"==typeof e?e.toString():e+\\\"\\\"))return null;t=t||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n=\\\"string\\\"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var a=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,s=r.parseMonth||this.local.parseMonth,l=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,f=-1,h=-1,p=-1,d=-1,g=-1,v=!1,m=!1,y=function(e,r){for(var n=1;T+n<t.length&&t.charAt(T+n)===e;)n++;return T+=n-1,Math.floor(n/(r||1))>1},x=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20][\\\"oyYJ@!\\\".indexOf(t)+1],o=new RegExp(\\\"^-?\\\\\\\\d{1,\\\"+a+\\\"}\\\"),s=e.substring(A).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[\\\"\\\"].missingNumberAt).replace(/\\\\{0\\\\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if(\\\"function\\\"==typeof l){y(\\\"m\\\");var t=l.call(b,e.substring(A));return A+=t.length,t}return x(\\\"m\\\")},w=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s<o.length;s++)if(e.substr(A,o[s].length).toLowerCase()===o[s].toLowerCase())return A+=o[s].length,s+b.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[\\\"\\\"].unknownNameAt).replace(/\\\\{0\\\\}/,A)},k=function(){if(\\\"function\\\"==typeof u){var t=y(\\\"M\\\")?u.call(b,e.substring(A)):c.call(b,e.substring(A));return A+=t.length,t}return w(\\\"M\\\",c,u)},M=function(){if(e.charAt(A)!==t.charAt(T))throw(i.local.unexpectedLiteralAt||i.regionalOptions[\\\"\\\"].unexpectedLiteralAt).replace(/\\\\{0\\\\}/,A);A++},A=0,T=0;T<t.length;T++)if(m)\\\"'\\\"!==t.charAt(T)||y(\\\"'\\\")?M():m=!1;else switch(t.charAt(T)){case\\\"d\\\":d=x(\\\"d\\\");break;case\\\"D\\\":w(\\\"D\\\",a,o);break;case\\\"o\\\":g=x(\\\"o\\\");break;case\\\"w\\\":x(\\\"w\\\");break;case\\\"m\\\":p=_();break;case\\\"M\\\":p=k();break;case\\\"y\\\":var S=T;v=!y(\\\"y\\\",2),T=S,h=x(\\\"y\\\",2);break;case\\\"Y\\\":h=x(\\\"Y\\\",2);break;case\\\"J\\\":f=x(\\\"J\\\")+.5,\\\".\\\"===e.charAt(A)&&(A++,x(\\\"J\\\"));break;case\\\"@\\\":f=x(\\\"@\\\")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case\\\"!\\\":f=x(\\\"!\\\")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case\\\"*\\\":A=e.length;break;case\\\"'\\\":y(\\\"'\\\")?M():m=!0;break;default:M()}if(A<e.length)throw i.local.unexpectedText||i.regionalOptions[\\\"\\\"].unexpectedText;if(-1===h?h=this.today().year():h<100&&v&&(h+=-1===n?1900:this.today().year()-this.today().year()%100-(h<=n?0:100)),\\\"string\\\"==typeof p&&(p=s.call(this,h,p)),g>-1){p=1,d=g;for(var C=this.daysInMonth(h,p);d>C;C=this.daysInMonth(h,p))p++,d-=C}return f>-1?this.fromJD(f):this.newDate(h,p,d)},determineDate:function(t,e,r,n,i){r&&\\\"object\\\"!=typeof r&&(i=n,n=r,r=null),\\\"string\\\"!=typeof n&&(i=n,n=\\\"\\\");var a=this;return e=e?e.newDate():null,t=null==t?e:\\\"string\\\"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\\\\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||\\\"d\\\"),s=o.exec(t);return e}(t):\\\"number\\\"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,\\\"d\\\"):a.newDate(t)}})},{\\\"./main\\\":548,\\\"object-assign\\\":437}],550:[function(t,e,r){e.exports=t(\\\"cwise-compiler\\\")({args:[\\\"array\\\",{offset:[1],array:0},\\\"scalar\\\",\\\"scalar\\\",\\\"index\\\"],pre:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},body:{body:\\\"{\\\\n        var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\\\\n        var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\\\\n        if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\\\\n          _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\\\\n        }\\\\n      }\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg1_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg3_\\\",lvalue:!1,rvalue:!0,count:2},{name:\\\"_inline_1_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[\\\"_inline_1_da\\\",\\\"_inline_1_db\\\"]},funcName:\\\"zeroCrossings\\\"})},{\\\"cwise-compiler\\\":134}],551:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t(\\\"./lib/zc-core\\\")},{\\\"./lib/zc-core\\\":550}],552:[function(t,e,r){\\\"use strict\\\";e.exports=[{path:\\\"\\\",backoff:0},{path:\\\"M-2.4,-3V3L0.6,0Z\\\",backoff:.6},{path:\\\"M-3.7,-2.5V2.5L1.3,0Z\\\",backoff:1.3},{path:\\\"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z\\\",backoff:1.55},{path:\\\"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z\\\",backoff:1.6},{path:\\\"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z\\\",backoff:2},{path:\\\"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z\\\",backoff:0,noRotate:!0},{path:\\\"M2,2V-2H-2V2Z\\\",backoff:0,noRotate:!0}]},{}],553:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./arrow_paths\\\"),i=t(\\\"../../plots/font_attributes\\\"),a=t(\\\"../../plots/cartesian/constants\\\"),o=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports=o(\\\"annotation\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc+arraydraw\\\"},text:{valType:\\\"string\\\",editType:\\\"calc+arraydraw\\\"},textangle:{valType:\\\"angle\\\",dflt:0,editType:\\\"calc+arraydraw\\\"},font:i({editType:\\\"calc+arraydraw\\\",colorEditType:\\\"arraydraw\\\"}),width:{valType:\\\"number\\\",min:1,dflt:null,editType:\\\"calc+arraydraw\\\"},height:{valType:\\\"number\\\",min:1,dflt:null,editType:\\\"calc+arraydraw\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,editType:\\\"arraydraw\\\"},align:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"center\\\",editType:\\\"arraydraw\\\"},valign:{valType:\\\"enumerated\\\",values:[\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"middle\\\",editType:\\\"arraydraw\\\"},bgcolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\",editType:\\\"arraydraw\\\"},bordercolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\",editType:\\\"arraydraw\\\"},borderpad:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc+arraydraw\\\"},borderwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc+arraydraw\\\"},showarrow:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc+arraydraw\\\"},arrowcolor:{valType:\\\"color\\\",editType:\\\"arraydraw\\\"},arrowhead:{valType:\\\"integer\\\",min:0,max:n.length,dflt:1,editType:\\\"arraydraw\\\"},startarrowhead:{valType:\\\"integer\\\",min:0,max:n.length,dflt:1,editType:\\\"arraydraw\\\"},arrowside:{valType:\\\"flaglist\\\",flags:[\\\"end\\\",\\\"start\\\"],extras:[\\\"none\\\"],dflt:\\\"end\\\",editType:\\\"arraydraw\\\"},arrowsize:{valType:\\\"number\\\",min:.3,dflt:1,editType:\\\"calc+arraydraw\\\"},startarrowsize:{valType:\\\"number\\\",min:.3,dflt:1,editType:\\\"calc+arraydraw\\\"},arrowwidth:{valType:\\\"number\\\",min:.1,editType:\\\"calc+arraydraw\\\"},standoff:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"calc+arraydraw\\\"},startstandoff:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"calc+arraydraw\\\"},ax:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},ay:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},axref:{valType:\\\"enumerated\\\",dflt:\\\"pixel\\\",values:[\\\"pixel\\\",a.idRegex.x.toString()],editType:\\\"calc\\\"},ayref:{valType:\\\"enumerated\\\",dflt:\\\"pixel\\\",values:[\\\"pixel\\\",a.idRegex.y.toString()],editType:\\\"calc\\\"},xref:{valType:\\\"enumerated\\\",values:[\\\"paper\\\",a.idRegex.x.toString()],editType:\\\"calc\\\"},x:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"auto\\\",editType:\\\"calc+arraydraw\\\"},xshift:{valType:\\\"number\\\",dflt:0,editType:\\\"calc+arraydraw\\\"},yref:{valType:\\\"enumerated\\\",values:[\\\"paper\\\",a.idRegex.y.toString()],editType:\\\"calc\\\"},y:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"auto\\\",editType:\\\"calc+arraydraw\\\"},yshift:{valType:\\\"number\\\",dflt:0,editType:\\\"calc+arraydraw\\\"},clicktoshow:{valType:\\\"enumerated\\\",values:[!1,\\\"onoff\\\",\\\"onout\\\"],dflt:!1,editType:\\\"arraydraw\\\"},xclick:{valType:\\\"any\\\",editType:\\\"arraydraw\\\"},yclick:{valType:\\\"any\\\",editType:\\\"arraydraw\\\"},hovertext:{valType:\\\"string\\\",editType:\\\"arraydraw\\\"},hoverlabel:{bgcolor:{valType:\\\"color\\\",editType:\\\"arraydraw\\\"},bordercolor:{valType:\\\"color\\\",editType:\\\"arraydraw\\\"},font:i({editType:\\\"arraydraw\\\"}),editType:\\\"arraydraw\\\"},captureevents:{valType:\\\"boolean\\\",editType:\\\"arraydraw\\\"},editType:\\\"calc\\\",_deprecated:{ref:{valType:\\\"string\\\",editType:\\\"calc\\\"}}})},{\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/constants\\\":751,\\\"../../plots/font_attributes\\\":772,\\\"./arrow_paths\\\":552}],554:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"./draw\\\").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach(function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref);e._extremes={},r&&s(e,r),n&&s(e,n)})}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t[\\\"a\\\"+a],l=t[a+\\\"ref\\\"],c=t[\\\"a\\\"+a+\\\"ref\\\"],u=t[\\\"_\\\"+a+\\\"padplus\\\"],f=t[\\\"_\\\"+a+\\\"padminus\\\"],h={x:1,y:-1}[a]*t[a+\\\"shift\\\"],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,g=p-h,v=3*t.startarrowsize*t.arrowwidth||0,m=v+h,y=v-h;if(c===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,m),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,m),ppadminus:Math.max(f,g,y)});t._extremes[n]=r}e.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"./draw\\\":559}],555:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plot_api/plot_template\\\").arrayEditor;function o(t,e){var r,n,i,a,o,l,c,u=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r<u.length;r++)if(a=(i=u[r]).clicktoshow){for(n=0;n<d;n++)if(l=(o=e[n]).xaxis,c=o.yaxis,l._id===i.xref&&c._id===i.yref&&l.d2r(o.x)===s(i._xclick,l)&&c.d2r(o.y)===s(i._yclick,c)){(i.visible?\\\"onout\\\"===a?h:p:f).push(r);break}n===d&&i.visible&&\\\"onout\\\"===a&&h.push(r)}return{on:f,off:h,explicitOff:p}}function s(t,e){return\\\"log\\\"===e.type?e.l2r(t):e.d2r(t)}e.exports={hasClickToShow:function(t,e){var r=o(t,e);return r.on.length>0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),c=l.on,u=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(!c.length&&!u.length)return;for(r=0;r<c.length;r++)(s=a(t.layout,\\\"annotations\\\",h[c[r]])).modifyItem(\\\"visible\\\",!0),n.extendFlat(f,s.getUpdateObj());for(r=0;r<u.length;r++)(s=a(t.layout,\\\"annotations\\\",h[u[r]])).modifyItem(\\\"visible\\\",!1),n.extendFlat(f,s.getUpdateObj());return i.call(\\\"update\\\",t,{},f)}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../registry\\\":828}],556:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../color\\\");e.exports=function(t,e,r,a){a(\\\"opacity\\\");var o=a(\\\"bgcolor\\\"),s=a(\\\"bordercolor\\\"),l=i.opacity(s);a(\\\"borderpad\\\");var c=a(\\\"borderwidth\\\"),u=a(\\\"showarrow\\\");if(a(\\\"text\\\",u?\\\" \\\":r._dfltTitle.annotation),a(\\\"textangle\\\"),n.coerceFont(a,\\\"font\\\",r.font),a(\\\"width\\\"),a(\\\"align\\\"),a(\\\"height\\\")&&a(\\\"valign\\\"),u){var f,h,p=a(\\\"arrowside\\\");-1!==p.indexOf(\\\"end\\\")&&(f=a(\\\"arrowhead\\\"),h=a(\\\"arrowsize\\\")),-1!==p.indexOf(\\\"start\\\")&&(a(\\\"startarrowhead\\\",f),a(\\\"startarrowsize\\\",h)),a(\\\"arrowcolor\\\",l?e.bordercolor:i.defaultLine),a(\\\"arrowwidth\\\",2*(l&&c||1)),a(\\\"standoff\\\"),a(\\\"startstandoff\\\")}var d=a(\\\"hovertext\\\"),g=r.hoverlabel||{};if(d){var v=a(\\\"hoverlabel.bgcolor\\\",g.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),m=a(\\\"hoverlabel.bordercolor\\\",g.bordercolor||i.contrast(v));n.coerceFont(a,\\\"hoverlabel.font\\\",{family:g.font.family,size:g.font.size,color:g.font.color||m})}a(\\\"captureevents\\\",!!d)}},{\\\"../../lib\\\":696,\\\"../color\\\":570}],557:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib/to_log_range\\\");e.exports=function(t,e,r,a){e=e||{};var o=\\\"log\\\"===r&&\\\"linear\\\"===e.type,s=\\\"linear\\\"===r&&\\\"log\\\"===e.type;if(o||s)for(var l,c,u=t._fullLayout.annotations,f=e._id.charAt(0),h=0;h<u.length;h++)l=u[h],c=\\\"annotations[\\\"+h+\\\"].\\\",l[f+\\\"ref\\\"]===e._id&&p(f),l[\\\"a\\\"+f+\\\"ref\\\"]===e._id&&p(\\\"a\\\"+f);function p(t){var r=l[t],s=null;s=o?i(r,e.range):Math.pow(10,r),n(s)||(s=null),a(c+t,s)}}},{\\\"../../lib/to_log_range\\\":723,\\\"fast-isnumeric\\\":214}],558:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../plots/array_container_defaults\\\"),o=t(\\\"./common_defaults\\\"),s=t(\\\"./attributes\\\");function l(t,e,r){function a(r,i){return n.coerce(t,e,s,r,i)}var l=a(\\\"visible\\\"),c=a(\\\"clicktoshow\\\");if(l||c){o(t,e,r,a);for(var u=e.showarrow,f=[\\\"x\\\",\\\"y\\\"],h=[-10,-30],p={_fullLayout:r},d=0;d<2;d++){var g=f[d],v=i.coerceRef(t,e,p,g,\\\"\\\",\\\"paper\\\");if(\\\"paper\\\"!==v)i.getFromId(p,v)._annIndices.push(e._index);if(i.coercePosition(e,p,a,v,g,.5),u){var m=\\\"a\\\"+g,y=i.coerceRef(t,e,p,m,\\\"pixel\\\");\\\"pixel\\\"!==y&&y!==v&&(y=e[m]=\\\"pixel\\\");var x=\\\"pixel\\\"===y?h[d]:.4;i.coercePosition(e,p,a,y,m,x)}a(g+\\\"anchor\\\"),a(g+\\\"shift\\\")}if(n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\"]),u&&n.noneOrAll(t,e,[\\\"ax\\\",\\\"ay\\\"]),c){var b=a(\\\"xclick\\\"),_=a(\\\"yclick\\\");e._xclick=void 0===b?e.x:i.cleanPosition(b,p,e.xref),e._yclick=void 0===_?e.y:i.cleanPosition(_,p,e.yref)}}}e.exports=function(t,e){a(t,e,{name:\\\"annotations\\\",handleItemDefaults:l})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/cartesian/axes\\\":745,\\\"./attributes\\\":553,\\\"./common_defaults\\\":556}],559:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../plots/cartesian/axes\\\"),l=t(\\\"../color\\\"),c=t(\\\"../drawing\\\"),u=t(\\\"../fx\\\"),f=t(\\\"../../lib/svg_text_utils\\\"),h=t(\\\"../../lib/setcursor\\\"),p=t(\\\"../dragelement\\\"),d=t(\\\"../../plot_api/plot_template\\\").arrayEditor,g=t(\\\"./draw_arrow_head\\\");function v(t,e){var r=t._fullLayout.annotations[e]||{};m(t,r,e,!1,s.getFromId(t,r.xref),s.getFromId(t,r.yref))}function m(t,e,r,a,s,v){var m,y,x=t._fullLayout,b=t._fullLayout._size,_=t._context.edits;a?(m=\\\"annotation-\\\"+a,y=a+\\\".annotations\\\"):(m=\\\"annotation\\\",y=\\\"annotations\\\");var w=d(t.layout,y,e),k=w.modifyBase,M=w.modifyItem,A=w.getUpdateObj;x._infolayer.selectAll(\\\".\\\"+m+'[data-index=\\\"'+r+'\\\"]').remove();var T=\\\"clip\\\"+x._uid+\\\"_ann\\\"+r;if(e._input&&!1!==e.visible){var S={x:{},y:{}},C=+e.textangle||0,E=x._infolayer.append(\\\"g\\\").classed(m,!0).attr(\\\"data-index\\\",String(r)).style(\\\"opacity\\\",e.opacity),L=E.append(\\\"g\\\").classed(\\\"annotation-text-g\\\",!0),z=_[e.showarrow?\\\"annotationTail\\\":\\\"annotationPosition\\\"],O=e.captureevents||_.annotationText||z,I=L.append(\\\"g\\\").style(\\\"pointer-events\\\",O?\\\"all\\\":null).call(h,\\\"pointer\\\").on(\\\"click\\\",function(){t._dragging=!1;var i={index:r,annotation:e._input,fullAnnotation:e,event:n.event};a&&(i.subplotId=a),t.emit(\\\"plotly_clickannotation\\\",i)});e.hovertext&&I.on(\\\"mouseover\\\",function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();u.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:t})}).on(\\\"mouseout\\\",function(){u.loneUnhover(x._hoverlayer.node())});var P=e.borderwidth,D=e.borderpad,R=P+D,B=I.append(\\\"rect\\\").attr(\\\"class\\\",\\\"bg\\\").style(\\\"stroke-width\\\",P+\\\"px\\\").call(l.stroke,e.bordercolor).call(l.fill,e.bgcolor),F=e.width||e.height,N=x._topclips.selectAll(\\\"#\\\"+T).data(F?[0]:[]);N.enter().append(\\\"clipPath\\\").classed(\\\"annclip\\\",!0).attr(\\\"id\\\",T).append(\\\"rect\\\"),N.exit().remove();var j=e.font,V=I.append(\\\"text\\\").classed(\\\"annotation-text\\\",!0).text(e.text);_.annotationText?V.call(f.makeEditable,{delegate:I,gd:t}).call(U).on(\\\"edit\\\",function(r){e.text=r,this.call(U),M(\\\"text\\\",r),s&&s.autorange&&k(s._name+\\\".autorange\\\",!0),v&&v.autorange&&k(v._name+\\\".autorange\\\",!0),i.call(\\\"relayout\\\",t,A())}):V.call(U)}else n.selectAll(\\\"#\\\"+T).remove();function U(r){return r.call(c.font,j).attr({\\\"text-anchor\\\":{left:\\\"start\\\",right:\\\"end\\\"}[e.align]||\\\"middle\\\"}),f.convertToTspans(r,t,q),r}function q(){var r=V.selectAll(\\\"a\\\");1===r.size()&&r.text()===V.text()&&I.insert(\\\"a\\\",\\\":first-child\\\").attr({\\\"xlink:xlink:href\\\":r.attr(\\\"xlink:href\\\"),\\\"xlink:xlink:show\\\":r.attr(\\\"xlink:show\\\")}).style({cursor:\\\"pointer\\\"}).node().appendChild(B.node());var n=I.select(\\\".annotation-text-math-group\\\"),u=!n.empty(),d=c.bBox((u?n:V).node()),m=d.width,y=d.height,w=e.width||m,O=e.height||y,D=Math.round(w+2*R),j=Math.round(O+2*R);function U(t,e){return\\\"auto\\\"===e&&(e=t<1/3?\\\"left\\\":t>2/3?\\\"right\\\":\\\"center\\\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var q=!1,H=[\\\"x\\\",\\\"y\\\"],G=0;G<H.length;G++){var W,Y,X,Z,$,J=H[G],K=e[J+\\\"ref\\\"]||J,Q=e[\\\"a\\\"+J+\\\"ref\\\"],tt={x:s,y:v}[J],et=(C+(\\\"x\\\"===J?0:-90))*Math.PI/180,rt=D*Math.cos(et),nt=j*Math.sin(et),it=Math.abs(rt)+Math.abs(nt),at=e[J+\\\"anchor\\\"],ot=e[J+\\\"shift\\\"]*(\\\"x\\\"===J?1:-1),st=S[J];if(tt){var lt=tt.r2fraction(e[J]);(lt<0||lt>1)&&(Q===K?((lt=tt.r2fraction(e[\\\"a\\\"+J]))<0||lt>1)&&(q=!0):q=!0),W=tt._offset+tt.r2p(e[J]),Z=.5}else\\\"x\\\"===J?(X=e[J],W=b.l+b.w*X):(X=1-e[J],W=b.t+b.h*X),Z=e.showarrow?.5:X;if(e.showarrow){st.head=W;var ct=e[\\\"a\\\"+J];$=rt*U(.5,e.xanchor)-nt*U(.5,e.yanchor),Q===K?(st.tail=tt._offset+tt.r2p(ct),Y=$):(st.tail=W+ct,Y=$+ct),st.text=st.tail+$;var ut=x[\\\"x\\\"===J?\\\"width\\\":\\\"height\\\"];if(\\\"paper\\\"===K&&(st.head=o.constrain(st.head,1,ut-1)),\\\"pixel\\\"===Q){var ft=-Math.max(st.tail-3,st.text),ht=Math.min(st.tail+3,st.text)-ut;ft>0?(st.tail+=ft,st.text+=ft):ht>0&&(st.tail-=ht,st.text-=ht)}st.tail+=ot,st.head+=ot}else Y=$=it*U(Z,at),st.text=W+$;st.text+=ot,$+=ot,Y+=ot,e[\\\"_\\\"+J+\\\"padplus\\\"]=it/2+Y,e[\\\"_\\\"+J+\\\"padminus\\\"]=it/2-Y,e[\\\"_\\\"+J+\\\"size\\\"]=it,e[\\\"_\\\"+J+\\\"shift\\\"]=$}if(t._dragging||!q){var pt=0,dt=0;if(\\\"left\\\"!==e.align&&(pt=(w-m)*(\\\"center\\\"===e.align?.5:1)),\\\"top\\\"!==e.valign&&(dt=(O-y)*(\\\"middle\\\"===e.valign?.5:1)),u)n.select(\\\"svg\\\").attr({x:R+pt-1,y:R+dt}).call(c.setClipUrl,F?T:null);else{var gt=R+dt-d.top,vt=R+pt-d.left;V.call(f.positionText,vt,gt).call(c.setClipUrl,F?T:null)}N.select(\\\"rect\\\").call(c.setRect,R,R,w,O),B.call(c.setRect,P/2,P/2,D-P,j-P),I.call(c.setTranslate,Math.round(S.x.text-D/2),Math.round(S.y.text-j/2)),L.attr({transform:\\\"rotate(\\\"+C+\\\",\\\"+S.x.text+\\\",\\\"+S.y.text+\\\")\\\"});var mt,yt=function(r,n){E.selectAll(\\\".annotation-arrow-g\\\").remove();var u=S.x.head,f=S.y.head,h=S.x.tail+r,d=S.y.tail+n,m=S.x.text+r,y=S.y.text+n,x=o.rotationXYMatrix(C,m,y),w=o.apply2DTransform(x),T=o.apply2DTransform2(x),z=+B.attr(\\\"width\\\"),O=+B.attr(\\\"height\\\"),P=m-.5*z,D=P+z,R=y-.5*O,F=R+O,N=[[P,R,P,F],[P,F,D,F],[D,F,D,R],[D,R,P,R]].map(T);if(!N.reduce(function(t,e){return t^!!o.segmentsIntersect(u,f,u+1e6,f+1e6,e[0],e[1],e[2],e[3])},!1)){N.forEach(function(t){var e=o.segmentsIntersect(h,d,u,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,d=e.y)});var j=e.arrowwidth,V=e.arrowcolor,U=e.arrowside,q=E.append(\\\"g\\\").style({opacity:l.opacity(V)}).classed(\\\"annotation-arrow-g\\\",!0),H=q.append(\\\"path\\\").attr(\\\"d\\\",\\\"M\\\"+h+\\\",\\\"+d+\\\"L\\\"+u+\\\",\\\"+f).style(\\\"stroke-width\\\",j+\\\"px\\\").call(l.stroke,l.rgb(V));if(g(H,U,e),_.annotationPosition&&H.node().parentNode&&!a){var G=u,W=f;if(e.standoff){var Y=Math.sqrt(Math.pow(u-h,2)+Math.pow(f-d,2));G+=e.standoff*(h-u)/Y,W+=e.standoff*(d-f)/Y}var X,Z,$=q.append(\\\"path\\\").classed(\\\"annotation-arrow\\\",!0).classed(\\\"anndrag\\\",!0).classed(\\\"cursor-move\\\",!0).attr({d:\\\"M3,3H-3V-3H3ZM0,0L\\\"+(h-G)+\\\",\\\"+(d-W),transform:\\\"translate(\\\"+G+\\\",\\\"+W+\\\")\\\"}).style(\\\"stroke-width\\\",j+6+\\\"px\\\").call(l.stroke,\\\"rgba(0,0,0,0)\\\").call(l.fill,\\\"rgba(0,0,0,0)\\\");p.init({element:$.node(),gd:t,prepFn:function(){var t=c.getTranslate(I);X=t.x,Z=t.y,s&&s.autorange&&k(s._name+\\\".autorange\\\",!0),v&&v.autorange&&k(v._name+\\\".autorange\\\",!0)},moveFn:function(t,r){var n=w(X,Z),i=n[0]+t,a=n[1]+r;I.call(c.setTranslate,i,a),M(\\\"x\\\",s?s.p2r(s.r2p(e.x)+t):e.x+t/b.w),M(\\\"y\\\",v?v.p2r(v.r2p(e.y)+r):e.y-r/b.h),e.axref===e.xref&&M(\\\"ax\\\",s.p2r(s.r2p(e.ax)+t)),e.ayref===e.yref&&M(\\\"ay\\\",v.p2r(v.r2p(e.ay)+r)),q.attr(\\\"transform\\\",\\\"translate(\\\"+t+\\\",\\\"+r+\\\")\\\"),L.attr({transform:\\\"rotate(\\\"+C+\\\",\\\"+i+\\\",\\\"+a+\\\")\\\"})},doneFn:function(){i.call(\\\"relayout\\\",t,A());var e=document.querySelector(\\\".js-notes-box-panel\\\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&yt(0,0),z)p.init({element:I.node(),gd:t,prepFn:function(){mt=L.attr(\\\"transform\\\")},moveFn:function(t,r){var n=\\\"pointer\\\";if(e.showarrow)e.axref===e.xref?M(\\\"ax\\\",s.p2r(s.r2p(e.ax)+t)):M(\\\"ax\\\",e.ax+t),e.ayref===e.yref?M(\\\"ay\\\",v.p2r(v.r2p(e.ay)+r)):M(\\\"ay\\\",e.ay+r),yt(t,r);else{if(a)return;var i,o;if(s)i=s.p2r(s.r2p(e.x)+t);else{var l=e._xsize/b.w,c=e.x+(e._xshift-e.xshift)/b.w-l/2;i=p.align(c+t/b.w,l,0,1,e.xanchor)}if(v)o=v.p2r(v.r2p(e.y)+r);else{var u=e._ysize/b.h,f=e.y-(e._yshift+e.yshift)/b.h-u/2;o=p.align(f-r/b.h,u,0,1,e.yanchor)}M(\\\"x\\\",i),M(\\\"y\\\",o),s&&v||(n=p.getCursor(s?.5:i,v?.5:o,e.xanchor,e.yanchor))}L.attr({transform:\\\"translate(\\\"+t+\\\",\\\"+r+\\\")\\\"+mt}),h(I,n)},doneFn:function(){h(I),i.call(\\\"relayout\\\",t,A());var e=document.querySelector(\\\".js-notes-box-panel\\\");e&&e.redraw(e.selectedObj)}})}else I.remove()}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\\\".annotation\\\").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&v(t,r);return a.previousPromises(t)},drawOne:v,drawRaw:m}},{\\\"../../lib\\\":696,\\\"../../lib/setcursor\\\":717,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"../fx\\\":612,\\\"./draw_arrow_head\\\":560,d3:148}],560:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../color\\\"),a=t(\\\"./arrow_paths\\\");e.exports=function(t,e,r){var o,s,l,c,u=t.node(),f=a[r.arrowhead||0],h=a[r.startarrowhead||0],p=(r.arrowwidth||1)*(r.arrowsize||1),d=(r.arrowwidth||1)*(r.startarrowsize||1),g=e.indexOf(\\\"start\\\")>=0,v=e.indexOf(\\\"end\\\")>=0,m=f.backoff*p+r.standoff,y=h.backoff*d+r.startstandoff;if(\\\"line\\\"===u.nodeName){o={x:+t.attr(\\\"x1\\\"),y:+t.attr(\\\"y1\\\")},s={x:+t.attr(\\\"x2\\\"),y:+t.attr(\\\"y2\\\")};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,m&&y&&m+y>Math.sqrt(x*x+b*b))return void z();if(m){if(m*m>x*x+b*b)return void z();var _=m*Math.cos(l),w=m*Math.sin(l);s.x+=_,s.y+=w,t.attr({x2:s.x,y2:s.y})}if(y){if(y*y>x*x+b*b)return void z();var k=y*Math.cos(l),M=y*Math.sin(l);o.x-=k,o.y-=M,t.attr({x1:o.x,y1:o.y})}}else if(\\\"path\\\"===u.nodeName){var A=u.getTotalLength(),T=\\\"\\\";if(A<m+y)return void z();var S=u.getPointAtLength(0),C=u.getPointAtLength(.1);l=Math.atan2(S.y-C.y,S.x-C.x),o=u.getPointAtLength(Math.min(y,A)),T=\\\"0px,\\\"+y+\\\"px,\\\";var E=u.getPointAtLength(A),L=u.getPointAtLength(A-.1);c=Math.atan2(E.y-L.y,E.x-L.x),s=u.getPointAtLength(Math.max(0,A-m)),T+=A-(T?y+m:m)+\\\"px,\\\"+A+\\\"px\\\",t.style(\\\"stroke-dasharray\\\",T)}function z(){t.style(\\\"stroke-dasharray\\\",\\\"0px,100px\\\")}function O(e,a,o,s){e.path&&(e.noRotate&&(o=0),n.select(u.parentNode).append(\\\"path\\\").attr({class:t.attr(\\\"class\\\"),d:e.path,transform:\\\"translate(\\\"+a.x+\\\",\\\"+a.y+\\\")\\\"+(o?\\\"rotate(\\\"+180*o/Math.PI+\\\")\\\":\\\"\\\")+\\\"scale(\\\"+s+\\\")\\\"}).style({fill:i.rgb(r.arrowcolor),\\\"stroke-width\\\":0}))}g&&O(h,o,l,d),v&&O(f,s,c,p)}},{\\\"../color\\\":570,\\\"./arrow_paths\\\":552,d3:148}],561:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./draw\\\"),i=t(\\\"./click\\\");e.exports={moduleType:\\\"component\\\",name:\\\"annotations\\\",layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),includeBasePlot:t(\\\"../../plots/cartesian/include_components\\\")(\\\"annotations\\\"),calcAutorange:t(\\\"./calc_autorange\\\"),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:t(\\\"./convert_coords\\\")}},{\\\"../../plots/cartesian/include_components\\\":756,\\\"./attributes\\\":553,\\\"./calc_autorange\\\":554,\\\"./click\\\":555,\\\"./convert_coords\\\":557,\\\"./defaults\\\":558,\\\"./draw\\\":559}],562:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../annotations/attributes\\\"),i=t(\\\"../../plot_api/edit_types\\\").overrideAll,a=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports=i(a(\\\"annotation\\\",{visible:n.visible,x:{valType:\\\"any\\\"},y:{valType:\\\"any\\\"},z:{valType:\\\"any\\\"},ax:{valType:\\\"number\\\"},ay:{valType:\\\"number\\\"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),\\\"calc\\\",\\\"from-root\\\")},{\\\"../../plot_api/edit_types\\\":728,\\\"../../plot_api/plot_template\\\":735,\\\"../annotations/attributes\\\":553}],563:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\");function a(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:\\\"linear\\\",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*a.h*(r.y[1]-r.y[0])}}e.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r<e.length;r++)a(e[r],t);t.fullLayout._infolayer.selectAll(\\\".annotation-\\\"+t.id).remove()}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],564:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../plots/array_container_defaults\\\"),o=t(\\\"../annotations/common_defaults\\\"),s=t(\\\"./attributes\\\");function l(t,e,r,a){function l(r,i){return n.coerce(t,e,s,r,i)}function c(t){var n=t+\\\"axis\\\",a={_fullLayout:{}};return a._fullLayout[n]=r[n],i.coercePosition(e,a,l,t,t,.5)}l(\\\"visible\\\")&&(o(t,e,a.fullLayout,l),c(\\\"x\\\"),c(\\\"y\\\"),c(\\\"z\\\"),n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\",\\\"z\\\"]),e.xref=\\\"x\\\",e.yref=\\\"y\\\",e.zref=\\\"z\\\",l(\\\"xanchor\\\"),l(\\\"yanchor\\\"),l(\\\"xshift\\\"),l(\\\"yshift\\\"),e.showarrow&&(e.axref=\\\"pixel\\\",e.ayref=\\\"pixel\\\",l(\\\"ax\\\",-10),l(\\\"ay\\\",-30),n.noneOrAll(t,e,[\\\"ax\\\",\\\"ay\\\"])))}e.exports=function(t,e,r){a(t,e,{name:\\\"annotations\\\",handleItemDefaults:l,fullLayout:r.fullLayout})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/cartesian/axes\\\":745,\\\"../annotations/common_defaults\\\":556,\\\"./attributes\\\":562}],565:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../annotations/draw\\\").drawRaw,i=t(\\\"../../plots/gl3d/project\\\"),a=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];e.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s<o.length;s++){for(var l=o[s],c=!1,u=0;u<3;u++){var f=a[u],h=l[f],p=e[f+\\\"axis\\\"].r2fraction(h);if(p<0||p>1){c=!0;break}}c?t.fullLayout._infolayer.select(\\\".annotation-\\\"+t.id+'[data-index=\\\"'+s+'\\\"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{\\\"../../plots/gl3d/project\\\":797,\\\"../annotations/draw\\\":559}],566:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\");e.exports={moduleType:\\\"component\\\",name:\\\"annotations3d\\\",schema:{subplots:{scene:{annotations:t(\\\"./attributes\\\")}}},layoutAttributes:t(\\\"./attributes\\\"),handleDefaults:t(\\\"./defaults\\\"),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(!r)return;for(var a=r.attrRegex,o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];a.test(l)&&(t[l].annotations||[]).length&&(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:t(\\\"./convert\\\"),draw:t(\\\"./draw\\\")}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":562,\\\"./convert\\\":563,\\\"./defaults\\\":564,\\\"./draw\\\":565}],567:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"world-calendars/dist/main\\\"),t(\\\"world-calendars/dist/plus\\\"),t(\\\"world-calendars/dist/calendars/chinese\\\"),t(\\\"world-calendars/dist/calendars/coptic\\\"),t(\\\"world-calendars/dist/calendars/discworld\\\"),t(\\\"world-calendars/dist/calendars/ethiopian\\\"),t(\\\"world-calendars/dist/calendars/hebrew\\\"),t(\\\"world-calendars/dist/calendars/islamic\\\"),t(\\\"world-calendars/dist/calendars/julian\\\"),t(\\\"world-calendars/dist/calendars/mayan\\\"),t(\\\"world-calendars/dist/calendars/nanakshahi\\\"),t(\\\"world-calendars/dist/calendars/nepali\\\"),t(\\\"world-calendars/dist/calendars/persian\\\"),t(\\\"world-calendars/dist/calendars/taiwan\\\"),t(\\\"world-calendars/dist/calendars/thai\\\"),t(\\\"world-calendars/dist/calendars/ummalqura\\\")},{\\\"world-calendars/dist/calendars/chinese\\\":534,\\\"world-calendars/dist/calendars/coptic\\\":535,\\\"world-calendars/dist/calendars/discworld\\\":536,\\\"world-calendars/dist/calendars/ethiopian\\\":537,\\\"world-calendars/dist/calendars/hebrew\\\":538,\\\"world-calendars/dist/calendars/islamic\\\":539,\\\"world-calendars/dist/calendars/julian\\\":540,\\\"world-calendars/dist/calendars/mayan\\\":541,\\\"world-calendars/dist/calendars/nanakshahi\\\":542,\\\"world-calendars/dist/calendars/nepali\\\":543,\\\"world-calendars/dist/calendars/persian\\\":544,\\\"world-calendars/dist/calendars/taiwan\\\":545,\\\"world-calendars/dist/calendars/thai\\\":546,\\\"world-calendars/dist/calendars/ummalqura\\\":547,\\\"world-calendars/dist/main\\\":548,\\\"world-calendars/dist/plus\\\":549}],568:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./calendars\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\"),o=a.EPOCHJD,s=a.ONEDAY,l={valType:\\\"enumerated\\\",values:Object.keys(n.calendars),editType:\\\"calc\\\",dflt:\\\"gregorian\\\"},c=function(t,e,r,n){var a={};return a[r]=l,i.coerce(t,e,a,r,n)},u=\\\"##\\\",f={d:{0:\\\"dd\\\",\\\"-\\\":\\\"d\\\"},e:{0:\\\"d\\\",\\\"-\\\":\\\"d\\\"},a:{0:\\\"D\\\",\\\"-\\\":\\\"D\\\"},A:{0:\\\"DD\\\",\\\"-\\\":\\\"DD\\\"},j:{0:\\\"oo\\\",\\\"-\\\":\\\"o\\\"},W:{0:\\\"ww\\\",\\\"-\\\":\\\"w\\\"},m:{0:\\\"mm\\\",\\\"-\\\":\\\"m\\\"},b:{0:\\\"M\\\",\\\"-\\\":\\\"M\\\"},B:{0:\\\"MM\\\",\\\"-\\\":\\\"MM\\\"},y:{0:\\\"yy\\\",\\\"-\\\":\\\"yy\\\"},Y:{0:\\\"yyyy\\\",\\\"-\\\":\\\"yyyy\\\"},U:u,w:u,c:{0:\\\"D M d %X yyyy\\\",\\\"-\\\":\\\"D M d %X yyyy\\\"},x:{0:\\\"mm/dd/yyyy\\\",\\\"-\\\":\\\"mm/dd/yyyy\\\"}};var h={};function p(t){var e=h[t];return e||(e=h[t]=n.instance(t))}function d(t){return i.extendFlat({},l,{description:t})}function g(t){return\\\"Sets the calendar system to use with `\\\"+t+\\\"` date data.\\\"}var v={xcalendar:d(g(\\\"x\\\"))},m=i.extendFlat({},v,{ycalendar:d(g(\\\"y\\\"))}),y=i.extendFlat({},m,{zcalendar:d(g(\\\"z\\\"))}),x=d([\\\"Sets the calendar system to use for `range` and `tick0`\\\",\\\"if this is a date axis. This does not set the calendar for\\\",\\\"interpreting data on this axis, that's specified in the trace\\\",\\\"or via the global `layout.calendar`\\\"].join(\\\" \\\"));e.exports={moduleType:\\\"component\\\",name:\\\"calendars\\\",schema:{traces:{scatter:m,bar:m,box:m,heatmap:m,contour:m,histogram:m,histogram2d:m,histogram2dcontour:m,scatter3d:y,surface:y,mesh3d:y,scattergl:m,ohlc:v,candlestick:v},layout:{calendar:d([\\\"Sets the default calendar system to use for interpreting and\\\",\\\"displaying dates throughout the plot.\\\"].join(\\\" \\\"))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:d([\\\"Sets the calendar system to use for `value`, if it is a date.\\\"].join(\\\" \\\")),targetcalendar:d([\\\"Sets the calendar system to use for `target`, if it is an\\\",\\\"array of dates. If `target` is a string (eg *x*) we use the\\\",\\\"corresponding trace attribute (eg `xcalendar`) if it exists,\\\",\\\"even if `targetcalendar` is provided.\\\"].join(\\\" \\\"))}}},layoutAttributes:l,handleDefaults:c,handleTraceDefaults:function(t,e,r,n){for(var i=0;i<r.length;i++)c(t,e,r[i]+\\\"calendar\\\",n.calendar)},CANONICAL_SUNDAY:{chinese:\\\"2000-01-02\\\",coptic:\\\"2000-01-03\\\",discworld:\\\"2000-01-03\\\",ethiopian:\\\"2000-01-05\\\",hebrew:\\\"5000-01-01\\\",islamic:\\\"1000-01-02\\\",julian:\\\"2000-01-03\\\",mayan:\\\"5000-01-01\\\",nanakshahi:\\\"1000-01-05\\\",nepali:\\\"2000-01-05\\\",persian:\\\"1000-01-01\\\",jalali:\\\"1000-01-01\\\",taiwan:\\\"1000-01-04\\\",thai:\\\"2000-01-04\\\",ummalqura:\\\"1400-01-06\\\"},CANONICAL_TICK:{chinese:\\\"2000-01-01\\\",coptic:\\\"2000-01-01\\\",discworld:\\\"2000-01-01\\\",ethiopian:\\\"2000-01-01\\\",hebrew:\\\"5000-01-01\\\",islamic:\\\"1000-01-01\\\",julian:\\\"2000-01-01\\\",mayan:\\\"5000-01-01\\\",nanakshahi:\\\"1000-01-01\\\",nepali:\\\"2000-01-01\\\",persian:\\\"1000-01-01\\\",jalali:\\\"1000-01-01\\\",taiwan:\\\"1000-01-01\\\",thai:\\\"2000-01-01\\\",ummalqura:\\\"1400-01-01\\\"},DFLTRANGE:{chinese:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"],coptic:[\\\"1700-01-01\\\",\\\"1701-01-01\\\"],discworld:[\\\"1800-01-01\\\",\\\"1801-01-01\\\"],ethiopian:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"],hebrew:[\\\"5700-01-01\\\",\\\"5701-01-01\\\"],islamic:[\\\"1400-01-01\\\",\\\"1401-01-01\\\"],julian:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"],mayan:[\\\"5200-01-01\\\",\\\"5201-01-01\\\"],nanakshahi:[\\\"0500-01-01\\\",\\\"0501-01-01\\\"],nepali:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"],persian:[\\\"1400-01-01\\\",\\\"1401-01-01\\\"],jalali:[\\\"1400-01-01\\\",\\\"1401-01-01\\\"],taiwan:[\\\"0100-01-01\\\",\\\"0101-01-01\\\"],thai:[\\\"2500-01-01\\\",\\\"2501-01-01\\\"],ummalqura:[\\\"1400-01-01\\\",\\\"1401-01-01\\\"]},getCal:p,worldCalFmt:function(t,e,r){for(var n,i,a,l,c,h=Math.floor((e+.05)/s)+o,d=p(r).fromJD(h),g=0;-1!==(g=t.indexOf(\\\"%\\\",g));)\\\"0\\\"===(n=t.charAt(g+1))||\\\"-\\\"===n||\\\"_\\\"===n?(a=3,i=t.charAt(g+2),\\\"_\\\"===n&&(n=\\\"-\\\")):(i=n,n=\\\"0\\\",a=2),(l=f[i])?(c=l===u?u:d.formatDate(l[n]),t=t.substr(0,g)+c+t.substr(g+a),g+=c.length):g+=a;return t}}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"./calendars\\\":567}],569:[function(t,e,r){\\\"use strict\\\";r.defaults=[\\\"#1f77b4\\\",\\\"#ff7f0e\\\",\\\"#2ca02c\\\",\\\"#d62728\\\",\\\"#9467bd\\\",\\\"#8c564b\\\",\\\"#e377c2\\\",\\\"#7f7f7f\\\",\\\"#bcbd22\\\",\\\"#17becf\\\"],r.defaultLine=\\\"#444\\\",r.lightLine=\\\"#eee\\\",r.background=\\\"#fff\\\",r.borderLine=\\\"#BEC8D9\\\",r.lightFraction=1e3/11},{}],570:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"tinycolor2\\\"),i=t(\\\"fast-isnumeric\\\"),a=e.exports={},o=t(\\\"./attributes\\\");a.defaults=o.defaults;var s=a.defaultLine=o.defaultLine;a.lightLine=o.lightLine;var l=a.background=o.background;function c(t){if(i(t)||\\\"string\\\"!=typeof t)return t;var e=t.trim();if(\\\"rgb\\\"!==e.substr(0,3))return t;var r=e.match(/^rgba?\\\\s*\\\\(([^()]*)\\\\)$/);if(!r)return t;var n=r[1].trim().split(/\\\\s*[\\\\s,]\\\\s*/),a=\\\"a\\\"===e.charAt(3)&&4===n.length;if(!a&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+\\\", \\\"+Math.round(255*n[1])+\\\", \\\"+Math.round(255*n[2]);return a?\\\"rgba(\\\"+s+\\\", \\\"+n[3]+\\\")\\\":\\\"rgb(\\\"+s+\\\")\\\"}a.tinyRGB=function(t){var e=t.toRgb();return\\\"rgb(\\\"+Math.round(e.r)+\\\", \\\"+Math.round(e.g)+\\\", \\\"+Math.round(e.b)+\\\")\\\"},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return\\\"rgba(\\\"+Math.round(r.r)+\\\", \\\"+Math.round(r.g)+\\\", \\\"+Math.round(r.b)+\\\", \\\"+e+\\\")\\\"},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||l).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(a.combine(t,l))),(i.isDark()?e?i.lighten(e):l:r?i.darken(r):s).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),\\\"stroke-opacity\\\":r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),\\\"fill-opacity\\\":r.getAlpha()})},a.clean=function(t){if(t&&\\\"object\\\"==typeof t){var e,r,n,i,o=Object.keys(t);for(e=0;e<o.length;e++)if(i=t[n=o[e]],\\\"color\\\"===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]=c(i[r]);else t[n]=c(i);else if(\\\"colorscale\\\"===n.substr(n.length-10)&&Array.isArray(i))for(r=0;r<i.length;r++)Array.isArray(i[r])&&(i[r][1]=c(i[r][1]));else if(Array.isArray(i)){var s=i[0];if(!Array.isArray(s)&&s&&\\\"object\\\"==typeof s)for(r=0;r<i.length;r++)a.clean(i[r])}else i&&\\\"object\\\"==typeof i&&a.clean(i)}}},{\\\"./attributes\\\":569,\\\"fast-isnumeric\\\":214,tinycolor2:514}],571:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/layout_attributes\\\"),i=t(\\\"../../plots/font_attributes\\\"),a=t(\\\"../../lib/extend\\\").extendFlat,o=t(\\\"../../plot_api/edit_types\\\").overrideAll;e.exports=o({thicknessmode:{valType:\\\"enumerated\\\",values:[\\\"fraction\\\",\\\"pixels\\\"],dflt:\\\"pixels\\\"},thickness:{valType:\\\"number\\\",min:0,dflt:30},lenmode:{valType:\\\"enumerated\\\",values:[\\\"fraction\\\",\\\"pixels\\\"],dflt:\\\"fraction\\\"},len:{valType:\\\"number\\\",min:0,dflt:1},x:{valType:\\\"number\\\",dflt:1.02,min:-2,max:3},xanchor:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\"},xpad:{valType:\\\"number\\\",min:0,dflt:10},y:{valType:\\\"number\\\",dflt:.5,min:-2,max:3},yanchor:{valType:\\\"enumerated\\\",values:[\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"middle\\\"},ypad:{valType:\\\"number\\\",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:\\\"number\\\",min:0,dflt:0},bgcolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\"},tickmode:n.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:\\\"\\\"}),ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,showexponent:n.showexponent,title:{valType:\\\"string\\\"},titlefont:i({}),titleside:{valType:\\\"enumerated\\\",values:[\\\"right\\\",\\\"top\\\",\\\"bottom\\\"],dflt:\\\"top\\\"}},\\\"colorbars\\\",\\\"from-root\\\")},{\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/cartesian/layout_attributes\\\":758,\\\"../../plots/font_attributes\\\":772}],572:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./draw\\\");e.exports=function(t,e,r){if(\\\"function\\\"==typeof r)return r(t,e);var i=e[0].trace,a=\\\"cb\\\"+i.uid,o=r.container,s=o?i[o]:i;(t._fullLayout._infolayer.selectAll(\\\".\\\"+a).remove(),s&&s.showscale)&&(e[0].t.cb=n(t,a)).fillgradient(s.colorscale).zrange([s[r.min],s[r.max]]).options(s.colorbar)()}},{\\\"./draw\\\":575}],573:[function(t,e,r){\\\"use strict\\\";e.exports={cn:{colorbar:\\\"colorbar\\\",cbbg:\\\"cbbg\\\",cbfill:\\\"cbfill\\\",cbfills:\\\"cbfills\\\",cbline:\\\"cbline\\\",cblines:\\\"cblines\\\",cbaxis:\\\"cbaxis\\\",cbtitleunshift:\\\"cbtitleunshift\\\",cbtitle:\\\"cbtitle\\\",cboutline:\\\"cboutline\\\",crisp:\\\"crisp\\\",jsPlaceholder:\\\"js-placeholder\\\"}}},{}],574:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plot_api/plot_template\\\"),a=t(\\\"../../plots/cartesian/tick_value_defaults\\\"),o=t(\\\"../../plots/cartesian/tick_mark_defaults\\\"),s=t(\\\"../../plots/cartesian/tick_label_defaults\\\"),l=t(\\\"./attributes\\\");e.exports=function(t,e,r){var c=i.newContainer(e,\\\"colorbar\\\"),u=t.colorbar||{};function f(t,e){return n.coerce(u,c,l,t,e)}var h=f(\\\"thicknessmode\\\");f(\\\"thickness\\\",\\\"fraction\\\"===h?30/(r.width-r.margin.l-r.margin.r):30);var p=f(\\\"lenmode\\\");f(\\\"len\\\",\\\"fraction\\\"===p?1:r.height-r.margin.t-r.margin.b),f(\\\"x\\\"),f(\\\"xanchor\\\"),f(\\\"xpad\\\"),f(\\\"y\\\"),f(\\\"yanchor\\\"),f(\\\"ypad\\\"),n.noneOrAll(u,c,[\\\"x\\\",\\\"y\\\"]),f(\\\"outlinecolor\\\"),f(\\\"outlinewidth\\\"),f(\\\"bordercolor\\\"),f(\\\"borderwidth\\\"),f(\\\"bgcolor\\\"),a(u,c,f,\\\"linear\\\");var d={outerTicks:!1,font:r.font};s(u,c,f,\\\"linear\\\",d),o(u,c,f,\\\"linear\\\",d),f(\\\"title\\\",r._dfltTitle.colorbar),n.coerceFont(f,\\\"titlefont\\\",r.font),f(\\\"titleside\\\")}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/tick_label_defaults\\\":765,\\\"../../plots/cartesian/tick_mark_defaults\\\":766,\\\"../../plots/cartesian/tick_value_defaults\\\":767,\\\"./attributes\\\":571}],575:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../plots/cartesian/axes\\\"),l=t(\\\"../dragelement\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../lib/extend\\\").extendFlat,f=t(\\\"../../lib/setcursor\\\"),h=t(\\\"../drawing\\\"),p=t(\\\"../color\\\"),d=t(\\\"../titles\\\"),g=t(\\\"../../lib/svg_text_utils\\\"),v=t(\\\"../../constants/alignment\\\"),m=v.LINE_SPACING,y=v.FROM_TL,x=v.FROM_BR,b=t(\\\"../../plots/cartesian/axis_defaults\\\"),_=t(\\\"../../plots/cartesian/position_defaults\\\"),w=t(\\\"../../plots/cartesian/layout_attributes\\\"),k=t(\\\"./attributes\\\"),M=t(\\\"./constants\\\").cn;e.exports=function(t,e){var r={};for(var v in k)r[v]=null;function A(){var v=t._fullLayout,k=v._size;if(\\\"function\\\"==typeof r.fillcolor||\\\"function\\\"==typeof r.line.color||r.fillgradient){var S,C,E=r.zrange||n.extent((\\\"function\\\"==typeof r.fillcolor?r.fillcolor:r.line.color).domain()),L=[],z=[],O=\\\"function\\\"==typeof r.line.color?r.line.color:function(){return r.line.color},I=\\\"function\\\"==typeof r.fillcolor?r.fillcolor:function(){return r.fillcolor},P=r.levels.end+r.levels.size/100,D=r.levels.size,R=1.001*E[0]-.001*E[1],B=1.001*E[1]-.001*E[0];for(C=0;C<1e5&&(S=r.levels.start+C*D,!(D>0?S>=P:S<=P));C++)S>R&&S<B&&L.push(S);if(r.fillgradient)z=[0];else if(\\\"function\\\"==typeof r.fillcolor)if(r.filllevels)for(P=r.filllevels.end+r.filllevels.size/100,D=r.filllevels.size,C=0;C<1e5&&(S=r.filllevels.start+C*D,!(D>0?S>=P:S<=P));C++)S>E[0]&&S<E[1]&&z.push(S);else(z=L.map(function(t){return t-r.levels.size/2})).push(z[z.length-1]+r.levels.size);else r.fillcolor&&\\\"string\\\"==typeof r.fillcolor&&(z=[0]);r.levels.size<0&&(L.reverse(),z.reverse());var F,N=k.h,j=k.w,V=Math.round(r.thickness*(\\\"fraction\\\"===r.thicknessmode?j:1)),U=V/k.w,q=Math.round(r.len*(\\\"fraction\\\"===r.lenmode?N:1)),H=q/k.h,G=r.xpad/k.w,W=(r.borderwidth+r.outlinewidth)/2,Y=r.ypad/k.h,X=Math.round(r.x*k.w+r.xpad),Z=r.x-U*({middle:.5,right:1}[r.xanchor]||0),$=r.y+H*(({top:-.5,bottom:.5}[r.yanchor]||0)-.5),J=Math.round(k.h*(1-$)),K=J-q,Q={type:\\\"linear\\\",range:E,tickmode:r.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:r.ticks,ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,showticklabels:r.showticklabels,tickfont:r.tickfont,tickangle:r.tickangle,tickformat:r.tickformat,exponentformat:r.exponentformat,separatethousands:r.separatethousands,showexponent:r.showexponent,showtickprefix:r.showtickprefix,tickprefix:r.tickprefix,showticksuffix:r.showticksuffix,ticksuffix:r.ticksuffix,title:r.title,titlefont:r.titlefont,showline:!0,anchor:\\\"free\\\",position:1},tt={type:\\\"linear\\\",_id:\\\"y\\\"+e},et={letter:\\\"y\\\",font:v.font,noHover:!0,calendar:v.calendar};if(b(Q,tt,vt,et,v),_(Q,tt,vt,et),tt.position=r.x+G+U,A.axis=tt,-1!==[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)&&(tt.titleside=r.titleside,tt.titlex=r.x+G,tt.titley=$+(\\\"top\\\"===r.titleside?H-Y:Y)),r.line.color&&\\\"auto\\\"===r.tickmode){tt.tickmode=\\\"linear\\\",tt.tick0=r.levels.start;var rt=r.levels.size,nt=c.constrain((J-K)/50,4,15)+1,it=(E[1]-E[0])/((r.nticks||nt)*rt);if(it>1){var at=Math.pow(10,Math.floor(Math.log(it)/Math.LN10));rt*=at*c.roundUp(it/at,[2,5,10]),(Math.abs(r.levels.start)/r.levels.size+1e-6)%1<2e-6&&(tt.tick0=0)}tt.dtick=rt}tt.domain=[$+Y,$+H-Y],tt.setScale();var ot=c.ensureSingle(v._infolayer,\\\"g\\\",e,function(t){t.classed(M.colorbar,!0).each(function(){var t=n.select(this);t.append(\\\"rect\\\").classed(M.cbbg,!0),t.append(\\\"g\\\").classed(M.cbfills,!0),t.append(\\\"g\\\").classed(M.cblines,!0),t.append(\\\"g\\\").classed(M.cbaxis,!0).classed(M.crisp,!0),t.append(\\\"g\\\").classed(M.cbtitleunshift,!0).append(\\\"g\\\").classed(M.cbtitle,!0),t.append(\\\"rect\\\").classed(M.cboutline,!0),t.select(\\\".cbtitle\\\").datum(0)})});ot.attr(\\\"transform\\\",\\\"translate(\\\"+Math.round(k.l)+\\\",\\\"+Math.round(k.t)+\\\")\\\");var st=ot.select(\\\".cbtitleunshift\\\").attr(\\\"transform\\\",\\\"translate(-\\\"+Math.round(k.l)+\\\",-\\\"+Math.round(k.t)+\\\")\\\");tt._axislayer=ot.select(\\\".cbaxis\\\");var lt=0;if(-1!==[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)){var ct,ut=k.l+(r.x+G)*k.w,ft=tt.titlefont.size;ct=\\\"top\\\"===r.titleside?(1-($+H-Y))*k.h+k.t+3+.75*ft:(1-($+Y))*k.h+k.t-3-.25*ft,mt(tt._id+\\\"title\\\",{attributes:{x:ut,y:ct,\\\"text-anchor\\\":\\\"start\\\"}})}var ht,pt,dt,gt=c.syncOrAsync([a.previousPromises,function(){if(-1!==[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)){var a=ot.select(\\\".cbtitle\\\"),o=a.select(\\\"text\\\"),l=[-r.outlinewidth/2,r.outlinewidth/2],u=a.select(\\\".h\\\"+tt._id+\\\"title-math-group\\\").node(),f=15.6;if(o.node()&&(f=parseInt(o.node().style.fontSize,10)*m),u?(lt=h.bBox(u).height)>f&&(l[1]-=(lt-f)/2):o.node()&&!o.classed(M.jsPlaceholder)&&(lt=h.bBox(o.node()).height),lt){if(lt+=5,\\\"top\\\"===r.titleside)tt.domain[1]-=lt/k.h,l[1]*=-1;else{tt.domain[0]+=lt/k.h;var p=g.lineCount(o);l[1]+=(1-p)*f}a.attr(\\\"transform\\\",\\\"translate(\\\"+l+\\\")\\\"),tt.setScale()}}ot.selectAll(\\\".cbfills,.cblines\\\").attr(\\\"transform\\\",\\\"translate(0,\\\"+Math.round(k.h*(1-tt.domain[1]))+\\\")\\\"),tt._axislayer.attr(\\\"transform\\\",\\\"translate(0,\\\"+Math.round(-k.t)+\\\")\\\");var d=ot.select(\\\".cbfills\\\").selectAll(\\\"rect.cbfill\\\").data(z);d.enter().append(\\\"rect\\\").classed(M.cbfill,!0).style(\\\"stroke\\\",\\\"none\\\"),d.exit().remove();var y=E.map(tt.c2p).map(Math.round).sort(function(t,e){return t-e});d.each(function(a,o){var s=[0===o?E[0]:(z[o]+z[o-1])/2,o===z.length-1?E[1]:(z[o]+z[o+1])/2].map(tt.c2p).map(Math.round);s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,y[0],y[1]);var l=n.select(this).attr({x:X,width:Math.max(V,2),y:n.min(s),height:Math.max(n.max(s)-n.min(s),2)});if(r.fillgradient)h.gradient(l,t,e,\\\"vertical\\\",r.fillgradient,\\\"fill\\\");else{var u=I(a).replace(\\\"e-\\\",\\\"\\\");l.attr(\\\"fill\\\",i(u).toHexString())}});var x=ot.select(\\\".cblines\\\").selectAll(\\\"path.cbline\\\").data(r.line.color&&r.line.width?L:[]);return x.enter().append(\\\"path\\\").classed(M.cbline,!0),x.exit().remove(),x.each(function(t){n.select(this).attr(\\\"d\\\",\\\"M\\\"+X+\\\",\\\"+(Math.round(tt.c2p(t))+r.line.width/2%1)+\\\"h\\\"+V).call(h.lineGroupStyle,r.line.width,O(t),r.line.dash)}),tt._axislayer.selectAll(\\\"g.\\\"+tt._id+\\\"tick,path\\\").remove(),tt._pos=X+V+(r.outlinewidth||0)/2-(\\\"outside\\\"===r.ticks?1:0),tt.side=\\\"right\\\",c.syncOrAsync([function(){return s.doTicksSingle(t,tt,!0)},function(){if(-1===[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)){var e=tt.titlefont.size,i=tt._offset+tt._length/2,a=k.l+(tt.position||0)*k.w+(\\\"right\\\"===tt.side?10+e*(tt.showticklabels?1:.5):-10-e*(tt.showticklabels?.5:0));mt(\\\"h\\\"+tt._id+\\\"title\\\",{avoid:{selection:n.select(t).selectAll(\\\"g.\\\"+tt._id+\\\"tick\\\"),side:r.titleside,offsetLeft:k.l,offsetTop:0,maxShift:v.width},attributes:{x:a,y:i,\\\"text-anchor\\\":\\\"middle\\\"},transform:{rotate:\\\"-90\\\",offset:0}})}}])},a.previousPromises,function(){var n=V+r.outlinewidth/2+h.bBox(tt._axislayer.node()).width;if((F=st.select(\\\"text\\\")).node()&&!F.classed(M.jsPlaceholder)){var i,o=st.select(\\\".h\\\"+tt._id+\\\"title-math-group\\\").node();i=o&&-1!==[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)?h.bBox(o).width:h.bBox(st.node()).right-X-k.l,n=Math.max(n,i)}var s=2*r.xpad+n+r.borderwidth+r.outlinewidth/2,l=J-K;ot.select(\\\".cbbg\\\").attr({x:X-r.xpad-(r.borderwidth+r.outlinewidth)/2,y:K-W,width:Math.max(s,2),height:Math.max(l+2*W,2)}).call(p.fill,r.bgcolor).call(p.stroke,r.bordercolor).style({\\\"stroke-width\\\":r.borderwidth}),ot.selectAll(\\\".cboutline\\\").attr({x:X,y:K+r.ypad+(\\\"top\\\"===r.titleside?lt:0),width:Math.max(V,2),height:Math.max(l-2*r.ypad-lt,2)}).call(p.stroke,r.outlinecolor).style({fill:\\\"None\\\",\\\"stroke-width\\\":r.outlinewidth});var c=({center:.5,right:1}[r.xanchor]||0)*s;ot.attr(\\\"transform\\\",\\\"translate(\\\"+(k.l-c)+\\\",\\\"+k.t+\\\")\\\");var u={},f=y[r.yanchor],d=x[r.yanchor];\\\"pixels\\\"===r.lenmode?(u.y=r.y,u.t=l*f,u.b=l*d):(u.t=u.b=0,u.yt=r.y+r.len*f,u.yb=r.y-r.len*d);var g=y[r.xanchor],v=x[r.xanchor];if(\\\"pixels\\\"===r.thicknessmode)u.x=r.x,u.l=s*g,u.r=s*v;else{var m=s-V;u.l=m*g,u.r=m*v,u.xl=r.x-r.thickness*g,u.xr=r.x+r.thickness*v}a.autoMargin(t,e,u)}],t);if(gt&&gt.then&&(t._promises||[]).push(gt),t._context.edits.colorbarPosition)l.init({element:ot.node(),gd:t,prepFn:function(){ht=ot.attr(\\\"transform\\\"),f(ot)},moveFn:function(t,e){ot.attr(\\\"transform\\\",ht+\\\" translate(\\\"+t+\\\",\\\"+e+\\\")\\\"),pt=l.align(Z+t/k.w,U,0,1,r.xanchor),dt=l.align($-e/k.h,H,0,1,r.yanchor);var n=l.getCursor(pt,dt,r.xanchor,r.yanchor);f(ot,n)},doneFn:function(){f(ot),void 0!==pt&&void 0!==dt&&o.call(\\\"restyle\\\",t,{\\\"colorbar.x\\\":pt,\\\"colorbar.y\\\":dt},T().index)}});return gt}function vt(t,e){return c.coerce(Q,tt,w,t,e)}function mt(e,r){var n=T(),i=\\\"colorbar.title\\\",a=n._module.colorbar.container;a&&(i=a+\\\".\\\"+i);var o={propContainer:tt,propName:i,traceIndex:n.index,placeholder:v._dfltTitle.colorbar,containerGroup:ot.select(\\\".cbtitle\\\")},s=\\\"h\\\"===e.charAt(0)?e.substr(1):\\\"h\\\"+e;ot.selectAll(\\\".\\\"+s+\\\",.\\\"+s+\\\"-math-group\\\").remove(),d.draw(t,e,u(o,r||{}))}v._infolayer.selectAll(\\\"g.\\\"+e).remove()}function T(){var r,n,i=e.substr(2);for(r=0;r<t._fullData.length;r++)if((n=t._fullData[r]).uid===i)return n}return r.fillcolor=null,r.line={color:null,width:null,dash:null},r.levels={start:null,end:null,size:null},r.filllevels=null,r.fillgradient=null,r.zrange=null,Object.keys(r).forEach(function(t){A[t]=function(e){return arguments.length?(r[t]=c.isPlainObject(r[t])?c.extendFlat(r[t],e):e,A):r[t]}}),A.options=function(t){for(var e in t)\\\"function\\\"==typeof A[e]&&A[e](t[e]);return A},A._opts=r,A}},{\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/extend\\\":685,\\\"../../lib/setcursor\\\":717,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/cartesian/axis_defaults\\\":747,\\\"../../plots/cartesian/layout_attributes\\\":758,\\\"../../plots/cartesian/position_defaults\\\":761,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"../titles\\\":661,\\\"./attributes\\\":571,\\\"./constants\\\":573,d3:148,tinycolor2:514}],576:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\\\"../../lib\\\":696}],577:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scales.js\\\");Object.keys(n);function i(t){return\\\"`\\\"+t+\\\"`\\\"}e.exports=function(t,e){t=t||\\\"\\\";var r,a=(e=e||{}).cLetter||\\\"c\\\",o=(\\\"onlyIfNumerical\\\"in e?e.onlyIfNumerical:Boolean(t),\\\"noScale\\\"in e?e.noScale:\\\"marker.line\\\"===t),s=\\\"showScaleDflt\\\"in e?e.showScaleDflt:\\\"z\\\"===a,l=\\\"string\\\"==typeof e.colorscaleDflt?n[e.colorscaleDflt]:null,c=e.editTypeOverride||\\\"\\\",u=t?t+\\\".\\\":\\\"\\\";\\\"colorAttr\\\"in e?(r=e.colorAttr,e.colorAttr):i(u+(r={z:\\\"z\\\",c:\\\"color\\\"}[a]));var f=a+\\\"auto\\\",h=a+\\\"min\\\",p=a+\\\"max\\\",d=(i(u+h),i(u+p),{});d[h]=d[p]=void 0;var g={};g[f]=!1;var v={};return\\\"color\\\"===r&&(v.color={valType:\\\"color\\\",arrayOk:!0,editType:c||\\\"style\\\"}),v[f]={valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\",impliedEdits:d},v[h]={valType:\\\"number\\\",dflt:null,editType:c||\\\"plot\\\",impliedEdits:g},v[p]={valType:\\\"number\\\",dflt:null,editType:c||\\\"plot\\\",impliedEdits:g},v.colorscale={valType:\\\"colorscale\\\",editType:\\\"calc\\\",dflt:l,impliedEdits:{autocolorscale:!1}},v.autocolorscale={valType:\\\"boolean\\\",dflt:!1!==e.autoColorDflt,editType:\\\"calc\\\",impliedEdits:{colorscale:void 0}},v.reversescale={valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},o||(v.showscale={valType:\\\"boolean\\\",dflt:s,editType:\\\"calc\\\"}),v}},{\\\"./scales.js\\\":589}],578:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./scales\\\"),a=t(\\\"./flip_scale\\\");e.exports=function(t,e,r,o){var s=t,l=t._input,c=t._fullInput,u=t.updateStyle;function f(e,n,i){void 0===i&&(i=n),u?u(t._input,r?r+\\\".\\\"+e:e,n):l[e]=n,s[e]=i,c&&t!==t._fullInput&&(u?u(t._fullInput,r?r+\\\".\\\"+e:e,i):c[e]=i)}r&&(s=n.nestedProperty(s,r).get(),l=n.nestedProperty(l,r).get(),c=n.nestedProperty(c,r).get()||{});var h=o+\\\"auto\\\",p=o+\\\"min\\\",d=o+\\\"max\\\",g=s[h],v=s[p],m=s[d],y=s.colorscale;!1===g&&void 0!==v||(v=n.aggNums(Math.min,null,e)),!1===g&&void 0!==m||(m=n.aggNums(Math.max,null,e)),v===m&&(v-=.5,m+=.5),f(p,v),f(d,m),f(h,!1!==g||void 0===v&&void 0===m),s.autocolorscale&&(f(\\\"colorscale\\\",y=v*m<0?i.RdBu:v>=0?i.Reds:i.Blues,s.reversescale?a(y):y),l.autocolorscale||f(\\\"autocolorscale\\\",!1))}},{\\\"../../lib\\\":696,\\\"./flip_scale\\\":582,\\\"./scales\\\":589}],579:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scales\\\");e.exports=n.RdBu},{\\\"./scales\\\":589}],580:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../colorbar/has_colorbar\\\"),o=t(\\\"../colorbar/defaults\\\"),s=t(\\\"./is_valid_scale\\\"),l=t(\\\"./flip_scale\\\");e.exports=function(t,e,r,c,u){var f,h=u.prefix,p=u.cLetter,d=h.slice(0,h.length-1),g=h?i.nestedProperty(t,d).get()||{}:t,v=h?i.nestedProperty(e,d).get()||{}:e,m=g[p+\\\"min\\\"],y=g[p+\\\"max\\\"],x=g.colorscale;c(h+p+\\\"auto\\\",!(n(m)&&n(y)&&m<y)),c(h+p+\\\"min\\\"),c(h+p+\\\"max\\\"),void 0!==x&&(f=!s(x)),c(h+\\\"autocolorscale\\\",f);var b,_=c(h+\\\"colorscale\\\");(c(h+\\\"reversescale\\\")&&(v.colorscale=l(_)),\\\"marker.line.\\\"!==h)&&(u.noScale||(h&&(b=a(g)),c(h+\\\"showscale\\\",b)&&o(g,v,r)))}},{\\\"../../lib\\\":696,\\\"../colorbar/defaults\\\":574,\\\"../colorbar/has_colorbar\\\":576,\\\"./flip_scale\\\":582,\\\"./is_valid_scale\\\":586,\\\"fast-isnumeric\\\":214}],581:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){for(var n=t.length,i=new Array(n),a=new Array(n),o=0;o<n;o++){var s=t[o];i[o]=e+s[0]*(r-e),a[o]=s[1]}return{domain:i,range:a}}},{}],582:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e,r=t.length,n=new Array(r),i=r-1,a=0;i>=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],583:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scales\\\"),i=t(\\\"./default_scale\\\"),a=t(\\\"./is_valid_scale_array\\\");e.exports=function(t,e){if(e||(e=i),!t)return e;function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return\\\"string\\\"==typeof t&&(r(),\\\"string\\\"==typeof t&&r()),a(t)?t:e}},{\\\"./default_scale\\\":579,\\\"./is_valid_scale_array\\\":587,\\\"./scales\\\":589}],584:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"./is_valid_scale\\\");e.exports=function(t,e){var r=e?i.nestedProperty(t,e).get()||{}:t,o=r.color,s=!1;if(i.isArrayOrTypedArray(o))for(var l=0;l<o.length;l++)if(n(o[l])){s=!0;break}return i.isPlainObject(r)&&(s||!0===r.showscale||n(r.cmin)&&n(r.cmax)||a(r.colorscale)||i.isPlainObject(r.colorbar))}},{\\\"../../lib\\\":696,\\\"./is_valid_scale\\\":586,\\\"fast-isnumeric\\\":214}],585:[function(t,e,r){\\\"use strict\\\";r.scales=t(\\\"./scales\\\"),r.defaultScale=t(\\\"./default_scale\\\"),r.attributes=t(\\\"./attributes\\\"),r.handleDefaults=t(\\\"./defaults\\\"),r.calc=t(\\\"./calc\\\"),r.hasColorscale=t(\\\"./has_colorscale\\\"),r.isValidScale=t(\\\"./is_valid_scale\\\"),r.getScale=t(\\\"./get_scale\\\"),r.flipScale=t(\\\"./flip_scale\\\"),r.extractScale=t(\\\"./extract_scale\\\"),r.makeColorScaleFunc=t(\\\"./make_color_scale_func\\\")},{\\\"./attributes\\\":577,\\\"./calc\\\":578,\\\"./default_scale\\\":579,\\\"./defaults\\\":580,\\\"./extract_scale\\\":581,\\\"./flip_scale\\\":582,\\\"./get_scale\\\":583,\\\"./has_colorscale\\\":584,\\\"./is_valid_scale\\\":586,\\\"./make_color_scale_func\\\":588,\\\"./scales\\\":589}],586:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scales\\\"),i=t(\\\"./is_valid_scale_array\\\");e.exports=function(t){return void 0!==n[t]||i(t)}},{\\\"./is_valid_scale_array\\\":587,\\\"./scales\\\":589}],587:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"tinycolor2\\\");e.exports=function(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var i=t[r];if(2!==i.length||+i[0]<e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}},{tinycolor2:514}],588:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"fast-isnumeric\\\"),o=t(\\\"../color\\\");function s(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return i(e).toRgbString()}e.exports=function(t,e){e=e||{};for(var r=t.domain,l=t.range,c=l.length,u=new Array(c),f=0;f<c;f++){var h=i(l[f]).toRgb();u[f]=[h.r,h.g,h.b,h.a]}var p,d=n.scale.linear().domain(r).range(u).clamp(!0),g=e.noNumericCheck,v=e.returnArray;return(p=g&&v?d:g?function(t){return s(d(t))}:v?function(t){return a(t)?d(t):i(t).isValid()?t:o.defaultLine}:function(t){return a(t)?s(d(t)):i(t).isValid()?t:o.defaultLine}).domain=d.domain,p.range=function(){return l},p}},{\\\"../color\\\":570,d3:148,\\\"fast-isnumeric\\\":214,tinycolor2:514}],589:[function(t,e,r){\\\"use strict\\\";e.exports={Greys:[[0,\\\"rgb(0,0,0)\\\"],[1,\\\"rgb(255,255,255)\\\"]],YlGnBu:[[0,\\\"rgb(8,29,88)\\\"],[.125,\\\"rgb(37,52,148)\\\"],[.25,\\\"rgb(34,94,168)\\\"],[.375,\\\"rgb(29,145,192)\\\"],[.5,\\\"rgb(65,182,196)\\\"],[.625,\\\"rgb(127,205,187)\\\"],[.75,\\\"rgb(199,233,180)\\\"],[.875,\\\"rgb(237,248,217)\\\"],[1,\\\"rgb(255,255,217)\\\"]],Greens:[[0,\\\"rgb(0,68,27)\\\"],[.125,\\\"rgb(0,109,44)\\\"],[.25,\\\"rgb(35,139,69)\\\"],[.375,\\\"rgb(65,171,93)\\\"],[.5,\\\"rgb(116,196,118)\\\"],[.625,\\\"rgb(161,217,155)\\\"],[.75,\\\"rgb(199,233,192)\\\"],[.875,\\\"rgb(229,245,224)\\\"],[1,\\\"rgb(247,252,245)\\\"]],YlOrRd:[[0,\\\"rgb(128,0,38)\\\"],[.125,\\\"rgb(189,0,38)\\\"],[.25,\\\"rgb(227,26,28)\\\"],[.375,\\\"rgb(252,78,42)\\\"],[.5,\\\"rgb(253,141,60)\\\"],[.625,\\\"rgb(254,178,76)\\\"],[.75,\\\"rgb(254,217,118)\\\"],[.875,\\\"rgb(255,237,160)\\\"],[1,\\\"rgb(255,255,204)\\\"]],Bluered:[[0,\\\"rgb(0,0,255)\\\"],[1,\\\"rgb(255,0,0)\\\"]],RdBu:[[0,\\\"rgb(5,10,172)\\\"],[.35,\\\"rgb(106,137,247)\\\"],[.5,\\\"rgb(190,190,190)\\\"],[.6,\\\"rgb(220,170,132)\\\"],[.7,\\\"rgb(230,145,90)\\\"],[1,\\\"rgb(178,10,28)\\\"]],Reds:[[0,\\\"rgb(220,220,220)\\\"],[.2,\\\"rgb(245,195,157)\\\"],[.4,\\\"rgb(245,160,105)\\\"],[1,\\\"rgb(178,10,28)\\\"]],Blues:[[0,\\\"rgb(5,10,172)\\\"],[.35,\\\"rgb(40,60,190)\\\"],[.5,\\\"rgb(70,100,245)\\\"],[.6,\\\"rgb(90,120,245)\\\"],[.7,\\\"rgb(106,137,247)\\\"],[1,\\\"rgb(220,220,220)\\\"]],Picnic:[[0,\\\"rgb(0,0,255)\\\"],[.1,\\\"rgb(51,153,255)\\\"],[.2,\\\"rgb(102,204,255)\\\"],[.3,\\\"rgb(153,204,255)\\\"],[.4,\\\"rgb(204,204,255)\\\"],[.5,\\\"rgb(255,255,255)\\\"],[.6,\\\"rgb(255,204,255)\\\"],[.7,\\\"rgb(255,153,255)\\\"],[.8,\\\"rgb(255,102,204)\\\"],[.9,\\\"rgb(255,102,102)\\\"],[1,\\\"rgb(255,0,0)\\\"]],Rainbow:[[0,\\\"rgb(150,0,90)\\\"],[.125,\\\"rgb(0,0,200)\\\"],[.25,\\\"rgb(0,25,255)\\\"],[.375,\\\"rgb(0,152,255)\\\"],[.5,\\\"rgb(44,255,150)\\\"],[.625,\\\"rgb(151,255,0)\\\"],[.75,\\\"rgb(255,234,0)\\\"],[.875,\\\"rgb(255,111,0)\\\"],[1,\\\"rgb(255,0,0)\\\"]],Portland:[[0,\\\"rgb(12,51,131)\\\"],[.25,\\\"rgb(10,136,186)\\\"],[.5,\\\"rgb(242,211,56)\\\"],[.75,\\\"rgb(242,143,56)\\\"],[1,\\\"rgb(217,30,30)\\\"]],Jet:[[0,\\\"rgb(0,0,131)\\\"],[.125,\\\"rgb(0,60,170)\\\"],[.375,\\\"rgb(5,255,255)\\\"],[.625,\\\"rgb(255,255,0)\\\"],[.875,\\\"rgb(250,0,0)\\\"],[1,\\\"rgb(128,0,0)\\\"]],Hot:[[0,\\\"rgb(0,0,0)\\\"],[.3,\\\"rgb(230,0,0)\\\"],[.6,\\\"rgb(255,210,0)\\\"],[1,\\\"rgb(255,255,255)\\\"]],Blackbody:[[0,\\\"rgb(0,0,0)\\\"],[.2,\\\"rgb(230,0,0)\\\"],[.4,\\\"rgb(230,210,0)\\\"],[.7,\\\"rgb(255,255,255)\\\"],[1,\\\"rgb(160,200,255)\\\"]],Earth:[[0,\\\"rgb(0,0,130)\\\"],[.1,\\\"rgb(0,180,180)\\\"],[.2,\\\"rgb(40,210,40)\\\"],[.4,\\\"rgb(230,230,50)\\\"],[.6,\\\"rgb(120,70,20)\\\"],[1,\\\"rgb(255,255,255)\\\"]],Electric:[[0,\\\"rgb(0,0,0)\\\"],[.15,\\\"rgb(30,0,100)\\\"],[.4,\\\"rgb(120,0,100)\\\"],[.6,\\\"rgb(160,90,0)\\\"],[.8,\\\"rgb(230,200,0)\\\"],[1,\\\"rgb(255,250,220)\\\"]],Viridis:[[0,\\\"#440154\\\"],[.06274509803921569,\\\"#48186a\\\"],[.12549019607843137,\\\"#472d7b\\\"],[.18823529411764706,\\\"#424086\\\"],[.25098039215686274,\\\"#3b528b\\\"],[.3137254901960784,\\\"#33638d\\\"],[.3764705882352941,\\\"#2c728e\\\"],[.4392156862745098,\\\"#26828e\\\"],[.5019607843137255,\\\"#21918c\\\"],[.5647058823529412,\\\"#1fa088\\\"],[.6274509803921569,\\\"#28ae80\\\"],[.6901960784313725,\\\"#3fbc73\\\"],[.7529411764705882,\\\"#5ec962\\\"],[.8156862745098039,\\\"#84d44b\\\"],[.8784313725490196,\\\"#addc30\\\"],[.9411764705882353,\\\"#d8e219\\\"],[1,\\\"#fde725\\\"]],Cividis:[[0,\\\"rgb(0,32,76)\\\"],[.058824,\\\"rgb(0,42,102)\\\"],[.117647,\\\"rgb(0,52,110)\\\"],[.176471,\\\"rgb(39,63,108)\\\"],[.235294,\\\"rgb(60,74,107)\\\"],[.294118,\\\"rgb(76,85,107)\\\"],[.352941,\\\"rgb(91,95,109)\\\"],[.411765,\\\"rgb(104,106,112)\\\"],[.470588,\\\"rgb(117,117,117)\\\"],[.529412,\\\"rgb(131,129,120)\\\"],[.588235,\\\"rgb(146,140,120)\\\"],[.647059,\\\"rgb(161,152,118)\\\"],[.705882,\\\"rgb(176,165,114)\\\"],[.764706,\\\"rgb(192,177,109)\\\"],[.823529,\\\"rgb(209,191,102)\\\"],[.882353,\\\"rgb(225,204,92)\\\"],[.941176,\\\"rgb(243,219,79)\\\"],[1,\\\"rgb(255,233,69)\\\"]]}},{}],590:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return\\\"left\\\"===i||\\\"bottom\\\"===i?a:\\\"center\\\"===i||\\\"middle\\\"===i?s:\\\"right\\\"===i||\\\"top\\\"===i?o:a<2/3-s?a:o>4/3-s?o:s}},{}],591:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=[[\\\"sw-resize\\\",\\\"s-resize\\\",\\\"se-resize\\\"],[\\\"w-resize\\\",\\\"move\\\",\\\"e-resize\\\"],[\\\"nw-resize\\\",\\\"n-resize\\\",\\\"ne-resize\\\"]];e.exports=function(t,e,r,a){return t=\\\"left\\\"===r?0:\\\"center\\\"===r?1:\\\"right\\\"===r?2:n.constrain(Math.floor(3*t),0,2),e=\\\"bottom\\\"===a?0:\\\"middle\\\"===a?1:\\\"top\\\"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{\\\"../../lib\\\":696}],592:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"mouse-event-offset\\\"),i=t(\\\"has-hover\\\"),a=t(\\\"has-passive-events\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../plots/cartesian/constants\\\"),c=t(\\\"../../constants/interactions\\\"),u=e.exports={};u.align=t(\\\"./align\\\"),u.getCursor=t(\\\"./cursor\\\");var f=t(\\\"./unhover\\\");function h(){var t=document.createElement(\\\"div\\\");t.className=\\\"dragcover\\\";var e=t.style;return e.position=\\\"fixed\\\",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background=\\\"none\\\",document.body.appendChild(t),t}function p(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}u.unhover=f.wrapped,u.unhoverRaw=f.raw,u.init=function(t){var e,r,n,f,d,g,v,m,y=t.gd,x=1,b=c.DBLCLICKDELAY,_=t.element;y._mouseDownTime||(y._mouseDownTime=0),_.style.pointerEvents=\\\"all\\\",_.onmousedown=k,a?(_._ontouchstart&&_.removeEventListener(\\\"touchstart\\\",_._ontouchstart),_._ontouchstart=k,_.addEventListener(\\\"touchstart\\\",k,{passive:!1})):_.ontouchstart=k;var w=t.clampFn||function(t,e,r){return Math.abs(t)<r&&(t=0),Math.abs(e)<r&&(e=0),[t,e]};function k(a){a.preventDefault(),y._dragged=!1,y._dragging=!0;var o=p(a);e=o[0],r=o[1],v=a.target,g=a,m=2===a.buttons||a.ctrlKey,\\\"undefined\\\"==typeof a.clientX&&\\\"undefined\\\"==typeof a.clientY&&(a.clientX=e,a.clientY=r),(n=(new Date).getTime())-y._mouseDownTime<b?x+=1:(x=1,y._mouseDownTime=n),t.prepFn&&t.prepFn(a,e,r),i&&!m?(d=h()).style.cursor=window.getComputedStyle(_).cursor:i||(d=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(_).cursor),document.addEventListener(\\\"mousemove\\\",M),document.addEventListener(\\\"mouseup\\\",A),document.addEventListener(\\\"touchmove\\\",M),document.addEventListener(\\\"touchend\\\",A)}function M(n){n.preventDefault();var i=p(n),a=t.minDrag||l.MINDRAG,o=w(i[0]-e,i[1]-r,a),s=o[0],c=o[1];(s||c)&&(y._dragged=!0,u.unhover(y)),y._dragged&&t.moveFn&&!m&&t.moveFn(s,c)}function A(e){if(document.removeEventListener(\\\"mousemove\\\",M),document.removeEventListener(\\\"mouseup\\\",A),document.removeEventListener(\\\"touchmove\\\",M),document.removeEventListener(\\\"touchend\\\",A),e.preventDefault(),i?s.removeElement(d):f&&(d.documentElement.style.cursor=f,f=null),y._dragging){if(y._dragging=!1,(new Date).getTime()-y._mouseDownTime>b&&(x=Math.max(x-1,1)),y._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(x,g),!m){var r;try{r=new MouseEvent(\\\"click\\\",e)}catch(t){var n=p(e);(r=document.createEvent(\\\"MouseEvents\\\")).initMouseEvent(\\\"click\\\",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}v.dispatchEvent(r)}!function(t){t._dragging=!1,t._replotPending&&o.call(\\\"plot\\\",t)}(y),y._dragged=!1}else y._dragged=!1}},u.coverSlip=h},{\\\"../../constants/interactions\\\":672,\\\"../../lib\\\":696,\\\"../../plots/cartesian/constants\\\":751,\\\"../../registry\\\":828,\\\"./align\\\":590,\\\"./cursor\\\":591,\\\"./unhover\\\":593,\\\"has-hover\\\":393,\\\"has-passive-events\\\":394,\\\"mouse-event-offset\\\":419}],593:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/events\\\"),i=t(\\\"../../lib/throttle\\\"),a=t(\\\"../../lib/get_graph_div\\\"),o=t(\\\"../fx/constants\\\"),s=e.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,\\\"plotly_beforehover\\\",e)||(r._hoverlayer.selectAll(\\\"g\\\").remove(),r._hoverlayer.selectAll(\\\"line\\\").remove(),r._hoverlayer.selectAll(\\\"circle\\\").remove(),t._hoverdata=void 0,e.target&&i&&t.emit(\\\"plotly_unhover\\\",{event:e,points:i}))}},{\\\"../../lib/events\\\":684,\\\"../../lib/get_graph_div\\\":691,\\\"../../lib/throttle\\\":722,\\\"../fx/constants\\\":607}],594:[function(t,e,r){\\\"use strict\\\";r.dash={valType:\\\"string\\\",values:[\\\"solid\\\",\\\"dot\\\",\\\"dash\\\",\\\"longdash\\\",\\\"dashdot\\\",\\\"longdashdot\\\"],dflt:\\\"solid\\\",editType:\\\"style\\\"}},{}],595:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"tinycolor2\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../color\\\"),l=t(\\\"../colorscale\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../lib/svg_text_utils\\\"),f=t(\\\"../../constants/xmlns_namespaces\\\"),h=t(\\\"../../constants/alignment\\\").LINE_SPACING,p=t(\\\"../../constants/interactions\\\").DESELECTDIM,d=t(\\\"../../traces/scatter/subtypes\\\"),g=t(\\\"../../traces/scatter/make_bubble_size_func\\\"),v=e.exports={};v.font=function(t,e,r,n){c.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style(\\\"font-family\\\",e),r+1&&t.style(\\\"font-size\\\",r+\\\"px\\\"),n&&t.call(s.fill,n)},v.setPosition=function(t,e,r){t.attr(\\\"x\\\",e).attr(\\\"y\\\",r)},v.setSize=function(t,e,r){t.attr(\\\"width\\\",e).attr(\\\"height\\\",r)},v.setRect=function(t,e,r,n,i){t.call(v.setPosition,e,r).call(v.setSize,n,i)},v.translatePoint=function(t,e,r,n){var a=r.c2p(t.x),o=n.c2p(t.y);return!!(i(a)&&i(o)&&e.node())&&(\\\"text\\\"===e.node().nodeName?e.attr(\\\"x\\\",a).attr(\\\"y\\\",o):e.attr(\\\"transform\\\",\\\"translate(\\\"+a+\\\",\\\"+o+\\\")\\\"),!0)},v.translatePoints=function(t,e,r){t.each(function(t){var i=n.select(this);v.translatePoint(t,i,e,r)})},v.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\\\"display\\\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\\\"none\\\")},v.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each(function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,l=\\\"bar\\\"===a.type?\\\".bartext\\\":\\\".point,.textpoint\\\";t.selectAll(l).each(function(t){v.hideOutsideRangePoint(t,n.select(this),r,i,o,s)})})}},v.crispRound=function(t,e,r){return e&&i(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},v.singleLineStyle=function(t,e,r,n,i){e.style(\\\"fill\\\",\\\"none\\\");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,l=i||a.dash||\\\"\\\";s.stroke(e,n||a.color),v.dashLine(e,l,o)},v.lineGroupStyle=function(t,e,r,i){t.style(\\\"fill\\\",\\\"none\\\").each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,l=i||a.dash||\\\"\\\";n.select(this).call(s.stroke,r||a.color).call(v.dashLine,l,o)})},v.dashLine=function(t,e,r){r=+r||0,e=v.dashStyle(e,r),t.style({\\\"stroke-dasharray\\\":e,\\\"stroke-width\\\":r+\\\"px\\\"})},v.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return\\\"solid\\\"===t?t=\\\"\\\":\\\"dot\\\"===t?t=r+\\\"px,\\\"+r+\\\"px\\\":\\\"dash\\\"===t?t=3*r+\\\"px,\\\"+3*r+\\\"px\\\":\\\"longdash\\\"===t?t=5*r+\\\"px,\\\"+5*r+\\\"px\\\":\\\"dashdot\\\"===t?t=3*r+\\\"px,\\\"+r+\\\"px,\\\"+r+\\\"px,\\\"+r+\\\"px\\\":\\\"longdashdot\\\"===t&&(t=5*r+\\\"px,\\\"+2*r+\\\"px,\\\"+r+\\\"px,\\\"+2*r+\\\"px\\\"),t},v.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(s.fill,e)},v.fillGroupStyle=function(t){t.style(\\\"stroke-width\\\",0).each(function(t){n.select(this).call(s.fill,t[0].trace.fillcolor)})};var m=t(\\\"./symbol_defs\\\");v.symbolNames=[],v.symbolFuncs=[],v.symbolNeedLines={},v.symbolNoDot={},v.symbolNoFill={},v.symbolList=[],Object.keys(m).forEach(function(t){var e=m[t];v.symbolList=v.symbolList.concat([e.n,t,e.n+100,t+\\\"-open\\\"]),v.symbolNames[e.n]=t,v.symbolFuncs[e.n]=e.f,e.needLine&&(v.symbolNeedLines[e.n]=!0),e.noDot?v.symbolNoDot[e.n]=!0:v.symbolList=v.symbolList.concat([e.n+200,t+\\\"-dot\\\",e.n+300,t+\\\"-open-dot\\\"]),e.noFill&&(v.symbolNoFill[e.n]=!0)});var y=v.symbolNames.length,x=\\\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\\\";function b(t,e){var r=t%100;return v.symbolFuncs[r](e)+(t>=200?x:\\\"\\\")}v.symbolNumber=function(t){if(\\\"string\\\"==typeof t){var e=0;t.indexOf(\\\"-open\\\")>0&&(e=100,t=t.replace(\\\"-open\\\",\\\"\\\")),t.indexOf(\\\"-dot\\\")>0&&(e+=200,t=t.replace(\\\"-dot\\\",\\\"\\\")),(t=v.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=y||t>=400?0:Math.floor(Math.max(t,0))};var _={x1:1,x2:0,y1:0,y2:0},w={x1:0,x2:0,y1:1,y2:0},k=n.format(\\\"~.1f\\\"),M={radial:{node:\\\"radialGradient\\\"},radialreversed:{node:\\\"radialGradient\\\",reversed:!0},horizontal:{node:\\\"linearGradient\\\",attrs:_},horizontalreversed:{node:\\\"linearGradient\\\",attrs:_,reversed:!0},vertical:{node:\\\"linearGradient\\\",attrs:w},verticalreversed:{node:\\\"linearGradient\\\",attrs:w,reversed:!0}};v.gradient=function(t,e,r,i,o,l){for(var u=o.length,f=M[i],h=new Array(u),p=0;p<u;p++)f.reversed?h[u-1-p]=[k(100*(1-o[p][0])),o[p][1]]:h[p]=[k(100*o[p][0]),o[p][1]];var d=\\\"g\\\"+e._fullLayout._uid+\\\"-\\\"+r,g=e._fullLayout._defs.select(\\\".gradients\\\").selectAll(\\\"#\\\"+d).data([i+h.join(\\\";\\\")],c.identity);g.exit().remove(),g.enter().append(f.node).each(function(){var t=n.select(this);f.attrs&&t.attr(f.attrs),t.attr(\\\"id\\\",d);var e=t.selectAll(\\\"stop\\\").data(h);e.exit().remove(),e.enter().append(\\\"stop\\\"),e.each(function(t){var e=a(t[1]);n.select(this).attr({offset:t[0]+\\\"%\\\",\\\"stop-color\\\":s.tinyRGB(e),\\\"stop-opacity\\\":e.getAlpha()})})}),t.style(l,\\\"url(#\\\"+d+\\\")\\\").style(l+\\\"-opacity\\\",null)},v.initGradients=function(t){c.ensureSingle(t._fullLayout._defs,\\\"g\\\",\\\"gradients\\\").selectAll(\\\"linearGradient,radialGradient\\\").remove()},v.pointStyle=function(t,e,r){if(t.size()){var i=v.makePointStyleFns(e);t.each(function(t){v.singlePointStyle(t,n.select(this),e,i,r)})}},v.singlePointStyle=function(t,e,r,n,i){var a=r.marker,o=a.line;if(e.style(\\\"opacity\\\",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?a.opacity:t.mo),n.ms2mrc){var l;l=\\\"various\\\"===t.ms||\\\"various\\\"===a.size?3:n.ms2mrc(t.ms),t.mrc=l,n.selectedSizeFn&&(l=t.mrc=n.selectedSizeFn(t));var u=v.symbolNumber(t.mx||a.symbol)||0;t.om=u%200>=100,e.attr(\\\"d\\\",b(u,l))}var f,h,p,d=!1;if(t.so)p=o.outlierwidth,h=o.outliercolor,f=a.outliercolor;else{var g=(o||{}).width;p=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,h=\\\"mlc\\\"in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(a.color)&&(f=s.defaultLine,d=!0),f=\\\"mc\\\"in t?t.mcc=n.markerScale(t.mc):a.color||\\\"rgba(0,0,0,0)\\\",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,f).style({\\\"stroke-width\\\":(p||1)+\\\"px\\\",fill:\\\"none\\\"});else{e.style(\\\"stroke-width\\\",p+\\\"px\\\");var m=a.gradient,y=t.mgt;if(y?d=!0:y=m&&m.type,Array.isArray(y)&&(y=y[0],M[y]||(y=0)),y&&\\\"none\\\"!==y){var x=t.mgc;x?d=!0:x=m.color;var _=r.uid;d&&(_+=\\\"-\\\"+t.i),v.gradient(e,i,_,y,[[0,x],[1,f]],\\\"fill\\\")}else s.fill(e,f);p&&s.stroke(e,h)}},v.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=v.tryColorscale(r,\\\"\\\"),e.lineScale=v.tryColorscale(r,\\\"line\\\"),o.traceIs(t,\\\"symbols\\\")&&(e.ms2mrc=d.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&&c.extendFlat(e,v.makeSelectedPointStyleFns(t)),e},v.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.marker||{},a=r.marker||{},s=n.marker||{},l=i.opacity,u=a.opacity,f=s.opacity,h=void 0!==u,d=void 0!==f;(c.isArrayOrTypedArray(l)||h||d)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?i.opacity:t.mo;return t.selected?h?u:e:d?f:p*e});var g=i.color,v=a.color,m=s.color;(v||m)&&(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?v||e:m||e});var y=i.size,x=a.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,\\\"symbols\\\")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},v.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},l=i.color,c=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,p))},e},v.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push(function(t,e){t.style(\\\"opacity\\\",r.selectedOpacityFn(e))}),r.selectedColorFn&&a.push(function(t,e){s.fill(t,r.selectedColorFn(e))}),r.selectedSizeFn&&a.push(function(t,e){var n=e.mx||i.symbol||0,a=r.selectedSizeFn(e);t.attr(\\\"d\\\",b(v.symbolNumber(n),a)),e.mrc2=a}),a.length&&t.each(function(t){for(var e=n.select(this),r=0;r<a.length;r++)a[r](e,t)})}},v.tryColorscale=function(t,e){var r=e?c.nestedProperty(t,e).get():t;if(r){var n=r.colorscale,i=r.color;if(n&&c.isArrayOrTypedArray(i))return l.makeColorScaleFunc(l.extractScale(n,r.cmin,r.cmax))}return c.identity};var A={start:1,end:-1,middle:0,bottom:1,top:-1};function T(t,e,r,i){var a=n.select(t.node().parentNode),o=-1!==e.indexOf(\\\"top\\\")?\\\"top\\\":-1!==e.indexOf(\\\"bottom\\\")?\\\"bottom\\\":\\\"middle\\\",s=-1!==e.indexOf(\\\"left\\\")?\\\"end\\\":-1!==e.indexOf(\\\"right\\\")?\\\"start\\\":\\\"middle\\\",l=i?i/.8+1:0,c=(u.lineCount(t)-1)*h+1,f=A[s]*l,p=.75*r+A[o]*l+(A[o]-1)*c*r/2;t.attr(\\\"text-anchor\\\",s),a.attr(\\\"transform\\\",\\\"translate(\\\"+f+\\\",\\\"+p+\\\")\\\")}function S(t,e){var r=t.ts||e.textfont.size;return i(r)&&r>0?r:0}v.textPointStyle=function(t,e,r){if(t.size()){var i;if(e.selectedpoints){var a=v.makeSelectedTextStyleFns(e);i=a.selectedTextColorFn}t.each(function(t){var a=n.select(this),o=c.extractOption(t,e,\\\"tx\\\",\\\"text\\\");if(o||0===o){var s=t.tp||e.textposition,l=S(t,e),f=i?i(t):t.tc||e.textfont.color;a.call(v.font,t.tf||e.textfont.family,l,f).text(o).call(u.convertToTspans,r).call(T,s,l,t.mrc)}else a.remove()})}},v.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedTextStyleFns(e);t.each(function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=S(t,e);s.fill(i,a),T(i,o,l,t.mrc2||t.mrc)})}};var C=.5;function E(t,e,r,i){var a=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],c=Math.pow(a*a+o*o,C/2),u=Math.pow(s*s+l*l,C/2),f=(u*u*a-c*c*s)*i,h=(u*u*o-c*c*l)*i,p=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(p&&f/p),2),n.round(e[1]+(p&&h/p),2)],[n.round(e[0]-(d&&f/d),2),n.round(e[1]-(d&&h/d),2)]]}v.smoothopen=function(t,e){if(t.length<3)return\\\"M\\\"+t.join(\\\"L\\\");var r,n=\\\"M\\\"+t[0],i=[];for(r=1;r<t.length-1;r++)i.push(E(t[r-1],t[r],t[r+1],e));for(n+=\\\"Q\\\"+i[0][0]+\\\" \\\"+t[1],r=2;r<t.length-1;r++)n+=\\\"C\\\"+i[r-2][1]+\\\" \\\"+i[r-1][0]+\\\" \\\"+t[r];return n+=\\\"Q\\\"+i[t.length-3][1]+\\\" \\\"+t[t.length-1]},v.smoothclosed=function(t,e){if(t.length<3)return\\\"M\\\"+t.join(\\\"L\\\")+\\\"Z\\\";var r,n=\\\"M\\\"+t[0],i=t.length-1,a=[E(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(E(t[r-1],t[r],t[r+1],e));for(a.push(E(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+=\\\"C\\\"+a[r-1][1]+\\\" \\\"+a[r][0]+\\\" \\\"+t[r];return n+=\\\"C\\\"+a[i][1]+\\\" \\\"+a[0][0]+\\\" \\\"+t[0]+\\\"Z\\\"};var L={hv:function(t,e){return\\\"H\\\"+n.round(e[0],2)+\\\"V\\\"+n.round(e[1],2)},vh:function(t,e){return\\\"V\\\"+n.round(e[1],2)+\\\"H\\\"+n.round(e[0],2)},hvh:function(t,e){return\\\"H\\\"+n.round((t[0]+e[0])/2,2)+\\\"V\\\"+n.round(e[1],2)+\\\"H\\\"+n.round(e[0],2)},vhv:function(t,e){return\\\"V\\\"+n.round((t[1]+e[1])/2,2)+\\\"H\\\"+n.round(e[0],2)+\\\"V\\\"+n.round(e[1],2)}},z=function(t,e){return\\\"L\\\"+n.round(e[0],2)+\\\",\\\"+n.round(e[1],2)};v.steps=function(t){var e=L[t]||z;return function(t){for(var r=\\\"M\\\"+n.round(t[0][0],2)+\\\",\\\"+n.round(t[0][1],2),i=1;i<t.length;i++)r+=e(t[i-1],t[i]);return r}},v.makeTester=function(){var t=c.ensureSingleById(n.select(\\\"body\\\"),\\\"svg\\\",\\\"js-plotly-tester\\\",function(t){t.attr(f.svgAttrs).style({position:\\\"absolute\\\",left:\\\"-10000px\\\",top:\\\"-10000px\\\",width:\\\"9000px\\\",height:\\\"9000px\\\",\\\"z-index\\\":\\\"1\\\"})}),e=c.ensureSingle(t,\\\"path\\\",\\\"js-reference-point\\\",function(t){t.attr(\\\"d\\\",\\\"M0,0H1V1H0Z\\\").style({\\\"stroke-width\\\":0,fill:\\\"black\\\"})});v.tester=t,v.testref=e},v.savedBBoxes={};var O=0;function I(t){var e=t.getAttribute(\\\"data-unformatted\\\");if(null!==e)return e+t.getAttribute(\\\"data-math\\\")+t.getAttribute(\\\"text-anchor\\\")+t.getAttribute(\\\"style\\\")}v.bBox=function(t,e,r){var i,a,o;if(r||(r=I(t)),r){if(i=v.savedBBoxes[r])return c.extendFlat({},i)}else if(1===t.childNodes.length){var s=t.childNodes[0];if(r=I(s)){var l=+s.getAttribute(\\\"x\\\")||0,f=+s.getAttribute(\\\"y\\\")||0,h=s.getAttribute(\\\"transform\\\");if(!h){var p=v.bBox(s,!1,r);return l&&(p.left+=l,p.right+=l),f&&(p.top+=f,p.bottom+=f),p}if(r+=\\\"~\\\"+l+\\\"~\\\"+f+\\\"~\\\"+h,i=v.savedBBoxes[r])return c.extendFlat({},i)}}e?a=t:(o=v.tester.node(),a=t.cloneNode(!0),o.appendChild(a)),n.select(a).attr(\\\"transform\\\",null).call(u.positionText,0,0);var d=a.getBoundingClientRect(),g=v.testref.node().getBoundingClientRect();e||o.removeChild(a);var m={height:d.height,width:d.width,left:d.left-g.left,top:d.top-g.top,right:d.right-g.left,bottom:d.bottom-g.top};return O>=1e4&&(v.savedBBoxes={},O=0),r&&(v.savedBBoxes[r]=m),O++,c.extendFlat({},m)},v.setClipUrl=function(t,e){if(e){if(void 0===v.baseUrl){var r=n.select(\\\"base\\\");r.size()&&r.attr(\\\"href\\\")?v.baseUrl=window.location.href.split(\\\"#\\\")[0]:v.baseUrl=\\\"\\\"}t.attr(\\\"clip-path\\\",\\\"url(\\\"+v.baseUrl+\\\"#\\\"+e+\\\")\\\")}else t.attr(\\\"clip-path\\\",null)},v.getTranslate=function(t){var e=(t[t.attr?\\\"attr\\\":\\\"getAttribute\\\"](\\\"transform\\\")||\\\"\\\").replace(/.*\\\\btranslate\\\\((-?\\\\d*\\\\.?\\\\d*)[^-\\\\d]*(-?\\\\d*\\\\.?\\\\d*)[^\\\\d].*/,function(t,e,r){return[e,r].join(\\\" \\\")}).split(\\\" \\\");return{x:+e[0]||0,y:+e[1]||0}},v.setTranslate=function(t,e,r){var n=t.attr?\\\"attr\\\":\\\"getAttribute\\\",i=t.attr?\\\"attr\\\":\\\"setAttribute\\\",a=t[n](\\\"transform\\\")||\\\"\\\";return e=e||0,r=r||0,a=a.replace(/(\\\\btranslate\\\\(.*?\\\\);?)/,\\\"\\\").trim(),a=(a+=\\\" translate(\\\"+e+\\\", \\\"+r+\\\")\\\").trim(),t[i](\\\"transform\\\",a),a},v.getScale=function(t){var e=(t[t.attr?\\\"attr\\\":\\\"getAttribute\\\"](\\\"transform\\\")||\\\"\\\").replace(/.*\\\\bscale\\\\((\\\\d*\\\\.?\\\\d*)[^\\\\d]*(\\\\d*\\\\.?\\\\d*)[^\\\\d].*/,function(t,e,r){return[e,r].join(\\\" \\\")}).split(\\\" \\\");return{x:+e[0]||1,y:+e[1]||1}},v.setScale=function(t,e,r){var n=t.attr?\\\"attr\\\":\\\"getAttribute\\\",i=t.attr?\\\"attr\\\":\\\"setAttribute\\\",a=t[n](\\\"transform\\\")||\\\"\\\";return e=e||1,r=r||1,a=a.replace(/(\\\\bscale\\\\(.*?\\\\);?)/,\\\"\\\").trim(),a=(a+=\\\" scale(\\\"+e+\\\", \\\"+r+\\\")\\\").trim(),t[i](\\\"transform\\\",a),a};var P=/\\\\s*sc.*/;v.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?\\\"\\\":\\\" scale(\\\"+e+\\\",\\\"+r+\\\")\\\";t.each(function(){var t=(this.getAttribute(\\\"transform\\\")||\\\"\\\").replace(P,\\\"\\\");t=(t+=n).trim(),this.setAttribute(\\\"transform\\\",t)})}};var D=/translate\\\\([^)]*\\\\)\\\\s*$/;v.setTextPointsScale=function(t,e,r){t&&t.each(function(){var t,i=n.select(this),a=i.select(\\\"text\\\");if(a.node()){var o=parseFloat(a.attr(\\\"x\\\")||0),s=parseFloat(a.attr(\\\"y\\\")||0),l=(i.attr(\\\"transform\\\")||\\\"\\\").match(D);t=1===e&&1===r?[]:[\\\"translate(\\\"+o+\\\",\\\"+s+\\\")\\\",\\\"scale(\\\"+e+\\\",\\\"+r+\\\")\\\",\\\"translate(\\\"+-o+\\\",\\\"+-s+\\\")\\\"],l&&t.push(l),i.attr(\\\"transform\\\",t.join(\\\" \\\"))}})}},{\\\"../../constants/alignment\\\":668,\\\"../../constants/interactions\\\":672,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../registry\\\":828,\\\"../../traces/scatter/make_bubble_size_func\\\":1061,\\\"../../traces/scatter/subtypes\\\":1068,\\\"../color\\\":570,\\\"../colorscale\\\":585,\\\"./symbol_defs\\\":596,d3:148,\\\"fast-isnumeric\\\":214,tinycolor2:514}],596:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",0A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,-\\\"+e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 0,1 \\\"+e+\\\",0Z\\\"}},square:{n:1,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+e+\\\"H\\\"+e+\\\"Z\\\"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return\\\"M\\\"+e+\\\",0L0,\\\"+e+\\\"L-\\\"+e+\\\",0L0,-\\\"+e+\\\"Z\\\"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return\\\"M\\\"+r+\\\",\\\"+e+\\\"H\\\"+e+\\\"V\\\"+r+\\\"H-\\\"+e+\\\"V\\\"+e+\\\"H-\\\"+r+\\\"V-\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+r+\\\"H\\\"+e+\\\"V-\\\"+e+\\\"H\\\"+r+\\\"Z\\\"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r=\\\"l\\\"+e+\\\",\\\"+e,i=\\\"l\\\"+e+\\\",-\\\"+e,a=\\\"l-\\\"+e+\\\",-\\\"+e,o=\\\"l-\\\"+e+\\\",\\\"+e;return\\\"M0,\\\"+e+r+i+a+i+a+o+a+o+r+o+r+\\\"Z\\\"}},\\\"triangle-up\\\":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return\\\"M-\\\"+e+\\\",\\\"+n.round(t/2,2)+\\\"H\\\"+e+\\\"L0,-\\\"+n.round(t,2)+\\\"Z\\\"}},\\\"triangle-down\\\":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return\\\"M-\\\"+e+\\\",-\\\"+n.round(t/2,2)+\\\"H\\\"+e+\\\"L0,\\\"+n.round(t,2)+\\\"Z\\\"}},\\\"triangle-left\\\":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return\\\"M\\\"+n.round(t/2,2)+\\\",-\\\"+e+\\\"V\\\"+e+\\\"L-\\\"+n.round(t,2)+\\\",0Z\\\"}},\\\"triangle-right\\\":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return\\\"M-\\\"+n.round(t/2,2)+\\\",-\\\"+e+\\\"V\\\"+e+\\\"L\\\"+n.round(t,2)+\\\",0Z\\\"}},\\\"triangle-ne\\\":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return\\\"M-\\\"+r+\\\",-\\\"+e+\\\"H\\\"+e+\\\"V\\\"+r+\\\"Z\\\"}},\\\"triangle-se\\\":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return\\\"M\\\"+e+\\\",-\\\"+r+\\\"V\\\"+e+\\\"H-\\\"+r+\\\"Z\\\"}},\\\"triangle-sw\\\":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return\\\"M\\\"+r+\\\",\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+r+\\\"Z\\\"}},\\\"triangle-nw\\\":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return\\\"M-\\\"+e+\\\",\\\"+r+\\\"V-\\\"+e+\\\"H\\\"+r+\\\"Z\\\"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(-.309*t,2);return\\\"M\\\"+e+\\\",\\\"+a+\\\"L\\\"+r+\\\",\\\"+n.round(.809*t,2)+\\\"H-\\\"+r+\\\"L-\\\"+e+\\\",\\\"+a+\\\"L0,\\\"+i+\\\"Z\\\"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return\\\"M\\\"+i+\\\",-\\\"+r+\\\"V\\\"+r+\\\"L0,\\\"+e+\\\"L-\\\"+i+\\\",\\\"+r+\\\"V-\\\"+r+\\\"L0,-\\\"+e+\\\"Z\\\"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return\\\"M-\\\"+r+\\\",\\\"+i+\\\"H\\\"+r+\\\"L\\\"+e+\\\",0L\\\"+r+\\\",-\\\"+i+\\\"H-\\\"+r+\\\"L-\\\"+e+\\\",0Z\\\"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return\\\"M-\\\"+r+\\\",-\\\"+e+\\\"H\\\"+r+\\\"L\\\"+e+\\\",-\\\"+r+\\\"V\\\"+r+\\\"L\\\"+r+\\\",\\\"+e+\\\"H-\\\"+r+\\\"L-\\\"+e+\\\",\\\"+r+\\\"V-\\\"+r+\\\"Z\\\"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return\\\"M\\\"+r+\\\",\\\"+l+\\\"H\\\"+i+\\\"L\\\"+a+\\\",\\\"+c+\\\"L\\\"+o+\\\",\\\"+u+\\\"L0,\\\"+n.round(.382*e,2)+\\\"L-\\\"+o+\\\",\\\"+u+\\\"L-\\\"+a+\\\",\\\"+c+\\\"L-\\\"+i+\\\",\\\"+l+\\\"H-\\\"+r+\\\"L0,\\\"+s+\\\"Z\\\"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return\\\"M-\\\"+i+\\\",0l-\\\"+r+\\\",-\\\"+e+\\\"h\\\"+i+\\\"l\\\"+r+\\\",-\\\"+e+\\\"l\\\"+r+\\\",\\\"+e+\\\"h\\\"+i+\\\"l-\\\"+r+\\\",\\\"+e+\\\"l\\\"+r+\\\",\\\"+e+\\\"h-\\\"+i+\\\"l-\\\"+r+\\\",\\\"+e+\\\"l-\\\"+r+\\\",-\\\"+e+\\\"h-\\\"+i+\\\"Z\\\"}},\\\"star-triangle-up\\\":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o=\\\"A \\\"+a+\\\",\\\"+a+\\\" 0 0 1 \\\";return\\\"M-\\\"+e+\\\",\\\"+r+o+e+\\\",\\\"+r+o+\\\"0,-\\\"+i+o+\\\"-\\\"+e+\\\",\\\"+r+\\\"Z\\\"}},\\\"star-triangle-down\\\":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o=\\\"A \\\"+a+\\\",\\\"+a+\\\" 0 0 1 \\\";return\\\"M\\\"+e+\\\",-\\\"+r+o+\\\"-\\\"+e+\\\",-\\\"+r+o+\\\"0,\\\"+i+o+e+\\\",-\\\"+r+\\\"Z\\\"}},\\\"star-square\\\":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i=\\\"A \\\"+r+\\\",\\\"+r+\\\" 0 0 1 \\\";return\\\"M-\\\"+e+\\\",-\\\"+e+i+\\\"-\\\"+e+\\\",\\\"+e+i+e+\\\",\\\"+e+i+e+\\\",-\\\"+e+i+\\\"-\\\"+e+\\\",-\\\"+e+\\\"Z\\\"}},\\\"star-diamond\\\":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i=\\\"A \\\"+r+\\\",\\\"+r+\\\" 0 0 1 \\\";return\\\"M-\\\"+e+\\\",0\\\"+i+\\\"0,\\\"+e+i+e+\\\",0\\\"+i+\\\"0,-\\\"+e+i+\\\"-\\\"+e+\\\",0Z\\\"}},\\\"diamond-tall\\\":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return\\\"M0,\\\"+r+\\\"L\\\"+e+\\\",0L0,-\\\"+r+\\\"L-\\\"+e+\\\",0Z\\\"}},\\\"diamond-wide\\\":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return\\\"M0,\\\"+r+\\\"L\\\"+e+\\\",0L0,-\\\"+r+\\\"L-\\\"+e+\\\",0Z\\\"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"H-\\\"+e+\\\"L\\\"+e+\\\",-\\\"+e+\\\"H-\\\"+e+\\\"Z\\\"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"V-\\\"+e+\\\"L-\\\"+e+\\\",\\\"+e+\\\"V-\\\"+e+\\\"Z\\\"},noDot:!0},\\\"circle-cross\\\":{n:27,f:function(t){var e=n.round(t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e+\\\"M\\\"+e+\\\",0H-\\\"+e+\\\"M\\\"+e+\\\",0A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,-\\\"+e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 0,1 \\\"+e+\\\",0Z\\\"},needLine:!0,noDot:!0},\\\"circle-x\\\":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return\\\"M\\\"+r+\\\",\\\"+r+\\\"L-\\\"+r+\\\",-\\\"+r+\\\"M\\\"+r+\\\",-\\\"+r+\\\"L-\\\"+r+\\\",\\\"+r+\\\"M\\\"+e+\\\",0A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,-\\\"+e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 0,1 \\\"+e+\\\",0Z\\\"},needLine:!0,noDot:!0},\\\"square-cross\\\":{n:29,f:function(t){var e=n.round(t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e+\\\"M\\\"+e+\\\",0H-\\\"+e+\\\"M\\\"+e+\\\",\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+e+\\\"H\\\"+e+\\\"Z\\\"},needLine:!0,noDot:!0},\\\"square-x\\\":{n:30,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"L-\\\"+e+\\\",-\\\"+e+\\\"M\\\"+e+\\\",-\\\"+e+\\\"L-\\\"+e+\\\",\\\"+e+\\\"M\\\"+e+\\\",\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+e+\\\"H\\\"+e+\\\"Z\\\"},needLine:!0,noDot:!0},\\\"diamond-cross\\\":{n:31,f:function(t){var e=n.round(1.3*t,2);return\\\"M\\\"+e+\\\",0L0,\\\"+e+\\\"L-\\\"+e+\\\",0L0,-\\\"+e+\\\"ZM0,-\\\"+e+\\\"V\\\"+e+\\\"M-\\\"+e+\\\",0H\\\"+e},needLine:!0,noDot:!0},\\\"diamond-x\\\":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return\\\"M\\\"+e+\\\",0L0,\\\"+e+\\\"L-\\\"+e+\\\",0L0,-\\\"+e+\\\"ZM-\\\"+r+\\\",-\\\"+r+\\\"L\\\"+r+\\\",\\\"+r+\\\"M-\\\"+r+\\\",\\\"+r+\\\"L\\\"+r+\\\",-\\\"+r},needLine:!0,noDot:!0},\\\"cross-thin\\\":{n:33,f:function(t){var e=n.round(1.4*t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e+\\\"M\\\"+e+\\\",0H-\\\"+e},needLine:!0,noDot:!0,noFill:!0},\\\"x-thin\\\":{n:34,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"L-\\\"+e+\\\",-\\\"+e+\\\"M\\\"+e+\\\",-\\\"+e+\\\"L-\\\"+e+\\\",\\\"+e},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e+\\\"M\\\"+e+\\\",0H-\\\"+e+\\\"M\\\"+r+\\\",\\\"+r+\\\"L-\\\"+r+\\\",-\\\"+r+\\\"M\\\"+r+\\\",-\\\"+r+\\\"L-\\\"+r+\\\",\\\"+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+r+\\\"V-\\\"+r+\\\"m-\\\"+r+\\\",0V\\\"+r+\\\"M\\\"+r+\\\",\\\"+e+\\\"H-\\\"+r+\\\"m0,-\\\"+r+\\\"H\\\"+r},needLine:!0,noFill:!0},\\\"y-up\\\":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return\\\"M-\\\"+e+\\\",\\\"+i+\\\"L0,0M\\\"+e+\\\",\\\"+i+\\\"L0,0M0,-\\\"+r+\\\"L0,0\\\"},needLine:!0,noDot:!0,noFill:!0},\\\"y-down\\\":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return\\\"M-\\\"+e+\\\",-\\\"+i+\\\"L0,0M\\\"+e+\\\",-\\\"+i+\\\"L0,0M0,\\\"+r+\\\"L0,0\\\"},needLine:!0,noDot:!0,noFill:!0},\\\"y-left\\\":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return\\\"M\\\"+i+\\\",\\\"+e+\\\"L0,0M\\\"+i+\\\",-\\\"+e+\\\"L0,0M-\\\"+r+\\\",0L0,0\\\"},needLine:!0,noDot:!0,noFill:!0},\\\"y-right\\\":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return\\\"M-\\\"+i+\\\",\\\"+e+\\\"L0,0M-\\\"+i+\\\",-\\\"+e+\\\"L0,0M\\\"+r+\\\",0L0,0\\\"},needLine:!0,noDot:!0,noFill:!0},\\\"line-ew\\\":{n:41,f:function(t){var e=n.round(1.4*t,2);return\\\"M\\\"+e+\\\",0H-\\\"+e},needLine:!0,noDot:!0,noFill:!0},\\\"line-ns\\\":{n:42,f:function(t){var e=n.round(1.4*t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e},needLine:!0,noDot:!0,noFill:!0},\\\"line-ne\\\":{n:43,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",-\\\"+e+\\\"L-\\\"+e+\\\",\\\"+e},needLine:!0,noDot:!0,noFill:!0},\\\"line-nw\\\":{n:44,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"L-\\\"+e+\\\",-\\\"+e},needLine:!0,noDot:!0,noFill:!0}}},{d3:148}],597:[function(t,e,r){\\\"use strict\\\";e.exports={visible:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"percent\\\",\\\"constant\\\",\\\"sqrt\\\",\\\"data\\\"],editType:\\\"calc\\\"},symmetric:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},array:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},arrayminus:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},value:{valType:\\\"number\\\",min:0,dflt:10,editType:\\\"calc\\\"},valueminus:{valType:\\\"number\\\",min:0,dflt:10,editType:\\\"calc\\\"},traceref:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"style\\\"},tracerefminus:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"style\\\"},copy_ystyle:{valType:\\\"boolean\\\",editType:\\\"plot\\\"},copy_zstyle:{valType:\\\"boolean\\\",editType:\\\"style\\\"},color:{valType:\\\"color\\\",editType:\\\"style\\\"},thickness:{valType:\\\"number\\\",min:0,dflt:2,editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,editType:\\\"plot\\\"},editType:\\\"calc\\\",_deprecated:{opacity:{valType:\\\"number\\\",editType:\\\"style\\\"}}}},{}],598:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"./compute_error\\\");function s(t,e,r,i){var s=e[\\\"error_\\\"+i]||{},l=[];if(s.visible&&-1!==[\\\"linear\\\",\\\"log\\\"].indexOf(r.type)){for(var c=o(s),u=0;u<t.length;u++){var f=t[u],h=f.i;if(void 0===h)h=u;else if(null===h)continue;var p=f[i];if(n(r.c2l(p))){var d=c(p,h);if(n(d[0])&&n(d[1])){var g=f[i+\\\"s\\\"]=p-d[0],v=f[i+\\\"h\\\"]=p+d[1];l.push(g,v)}}}var m=a.findExtremes(r,l,{padded:!0}),y=r._id;e._extremes[y].min=e._extremes[y].min.concat(m.min),e._extremes[y].max=e._extremes[y].max.concat(m.max)}}e.exports=function(t){for(var e=t.calcdata,r=0;r<e.length;r++){var n=e[r],o=n[0].trace;if(!0===o.visible&&i.traceIs(o,\\\"errorBarsOK\\\")){var l=a.getFromId(t,o.xaxis),c=a.getFromId(t,o.yaxis);s(n,o,l,\\\"x\\\"),s(n,o,c,\\\"y\\\")}}}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"./compute_error\\\":599,\\\"fast-isnumeric\\\":214}],599:[function(t,e,r){\\\"use strict\\\";function n(t,e){return\\\"percent\\\"===t?function(t){return Math.abs(t*e/100)}:\\\"constant\\\"===t?function(){return Math.abs(e)}:\\\"sqrt\\\"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}e.exports=function(t){var e=t.type,r=t.symmetric;if(\\\"data\\\"===e){var i=t.array||[];if(r)return function(t,e){var r=+i[e];return[r,r]};var a=t.arrayminus||[];return function(t,e){var r=+i[e],n=+a[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=n(e,t.value),s=n(e,t.valueminus);return r||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},{}],600:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../plot_api/plot_template\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){var c=\\\"error_\\\"+l.axis,u=o.newContainer(e,c),f=t[c]||{};function h(t,e){return a.coerce(f,u,s,t,e)}if(!1!==h(\\\"visible\\\",void 0!==f.array||void 0!==f.value||\\\"sqrt\\\"===f.type)){var p=h(\\\"type\\\",\\\"array\\\"in f?\\\"data\\\":\\\"percent\\\"),d=!0;\\\"sqrt\\\"!==p&&(d=h(\\\"symmetric\\\",!((\\\"data\\\"===p?\\\"arrayminus\\\":\\\"valueminus\\\")in f))),\\\"data\\\"===p?(h(\\\"array\\\"),h(\\\"traceref\\\"),d||(h(\\\"arrayminus\\\"),h(\\\"tracerefminus\\\"))):\\\"percent\\\"!==p&&\\\"constant\\\"!==p||(h(\\\"value\\\"),d||h(\\\"valueminus\\\"));var g=\\\"copy_\\\"+l.inherit+\\\"style\\\";if(l.inherit)(e[\\\"error_\\\"+l.inherit]||{}).visible&&h(g,!(f.color||n(f.thickness)||n(f.width)));l.inherit&&u[g]||(h(\\\"color\\\",r),h(\\\"thickness\\\"),h(\\\"width\\\",i.traceIs(e,\\\"gl3d\\\")?0:4))}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../registry\\\":828,\\\"./attributes\\\":597,\\\"fast-isnumeric\\\":214}],601:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plot_api/edit_types\\\").overrideAll,a=t(\\\"./attributes\\\"),o={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a),error_z:n.extendFlat({},a)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,e.exports={moduleType:\\\"component\\\",name:\\\"errorbars\\\",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:i(s,\\\"calc\\\",\\\"nested\\\"),scattergl:i(o,\\\"calc\\\",\\\"nested\\\")}},supplyDefaults:t(\\\"./defaults\\\"),calc:t(\\\"./calc\\\"),makeComputeError:t(\\\"./compute_error\\\"),plot:t(\\\"./plot\\\"),style:t(\\\"./style\\\"),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys));(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},{\\\"../../lib\\\":696,\\\"../../plot_api/edit_types\\\":728,\\\"./attributes\\\":597,\\\"./calc\\\":598,\\\"./compute_error\\\":599,\\\"./defaults\\\":600,\\\"./plot\\\":602,\\\"./style\\\":603}],602:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../drawing\\\"),o=t(\\\"../../traces/scatter/subtypes\\\");e.exports=function(t,e,r){var s=e.xaxis,l=e.yaxis,c=r&&r.duration>0;t.each(function(t){var u,f=t[0].trace,h=f.error_x||{},p=f.error_y||{};f.ids&&(u=function(t){return t.id});var d=o.hasMarkers(f)&&f.marker.maxdisplayed>0;p.visible||h.visible||(t=[]);var g=n.select(this).selectAll(\\\"g.errorbar\\\").data(t,u);if(g.exit().remove(),t.length){h.visible||g.selectAll(\\\"path.xerror\\\").remove(),p.visible||g.selectAll(\\\"path.yerror\\\").remove(),g.style(\\\"opacity\\\",1);var v=g.enter().append(\\\"g\\\").classed(\\\"errorbar\\\",!0);c&&v.style(\\\"opacity\\\",0).transition().duration(r.duration).style(\\\"opacity\\\",1),a.setClipUrl(g,e.layerClipId),g.each(function(t){var e=n.select(this),a=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0)));void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0)));return n}(t,s,l);if(!d||t.vis){var o,u=e.select(\\\"path.yerror\\\");if(p.visible&&i(a.x)&&i(a.yh)&&i(a.ys)){var f=p.width;o=\\\"M\\\"+(a.x-f)+\\\",\\\"+a.yh+\\\"h\\\"+2*f+\\\"m-\\\"+f+\\\",0V\\\"+a.ys,a.noYS||(o+=\\\"m-\\\"+f+\\\",0h\\\"+2*f),!u.size()?u=e.append(\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").classed(\\\"yerror\\\",!0):c&&(u=u.transition().duration(r.duration).ease(r.easing)),u.attr(\\\"d\\\",o)}else u.remove();var g=e.select(\\\"path.xerror\\\");if(h.visible&&i(a.y)&&i(a.xh)&&i(a.xs)){var v=(h.copy_ystyle?p:h).width;o=\\\"M\\\"+a.xh+\\\",\\\"+(a.y-v)+\\\"v\\\"+2*v+\\\"m0,-\\\"+v+\\\"H\\\"+a.xs,a.noXS||(o+=\\\"m0,-\\\"+v+\\\"v\\\"+2*v),!g.size()?g=e.append(\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").classed(\\\"xerror\\\",!0):c&&(g=g.transition().duration(r.duration).ease(r.easing)),g.attr(\\\"d\\\",o)}else g.remove()}})}})}},{\\\"../../traces/scatter/subtypes\\\":1068,\\\"../drawing\\\":595,d3:148,\\\"fast-isnumeric\\\":214}],603:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../color\\\");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll(\\\"path.yerror\\\").style(\\\"stroke-width\\\",r.thickness+\\\"px\\\").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll(\\\"path.xerror\\\").style(\\\"stroke-width\\\",a.thickness+\\\"px\\\").call(i.stroke,a.color)})}},{\\\"../color\\\":570,d3:148}],604:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\");e.exports={hoverlabel:{bgcolor:{valType:\\\"color\\\",arrayOk:!0,editType:\\\"none\\\"},bordercolor:{valType:\\\"color\\\",arrayOk:!0,editType:\\\"none\\\"},font:n({arrayOk:!0,editType:\\\"none\\\"}),namelength:{valType:\\\"integer\\\",min:-1,arrayOk:!0,editType:\\\"none\\\"},editType:\\\"calc\\\"}}},{\\\"../../plots/font_attributes\\\":772}],605:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\");function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}e.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s<e.length;s++){var l=e[s],c=l[0].trace;if(!i.traceIs(c,\\\"pie\\\")){var u=i.traceIs(c,\\\"2dMap\\\")?a:n.fillArray;u(c.hoverinfo,l,\\\"hi\\\",o(c)),c.hoverlabel&&(u(c.hoverlabel.bgcolor,l,\\\"hbg\\\"),u(c.hoverlabel.bordercolor,l,\\\"hbc\\\"),u(c.hoverlabel.font.size,l,\\\"hts\\\"),u(c.hoverlabel.font.color,l,\\\"htc\\\"),u(c.hoverlabel.font.family,l,\\\"htf\\\"),u(c.hoverlabel.namelength,l,\\\"hnl\\\"))}}}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828}],606:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"./hover\\\").hover;e.exports=function(t,e,r){var a=n.getComponentMethod(\\\"annotations\\\",\\\"onClick\\\")(t,t._hoverdata);function o(){t.emit(\\\"plotly_click\\\",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(a&&a.then?a.then(o):o(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},{\\\"../../registry\\\":828,\\\"./hover\\\":610}],607:[function(t,e,r){\\\"use strict\\\";e.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:\\\"Arial, sans-serif\\\",HOVERMINTIME:50,HOVERID:\\\"-hover\\\"}},{}],608:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"./hoverlabel_defaults\\\");e.exports=function(t,e,r,o){a(t,e,function(r,a){return n.coerce(t,e,i,r,a)},o.hoverlabel)}},{\\\"../../lib\\\":696,\\\"./attributes\\\":604,\\\"./hoverlabel_defaults\\\":611}],609:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");r.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},r.isTraceInSubplots=function(t,e){if(\\\"splom\\\"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a<n.length;a++)for(var o=0;o<i.length;o++)if(-1!==e.indexOf(n[a]+i[o]))return!0;return!1}return-1!==e.indexOf(r.getSubplot(t))},r.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},r.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},r.getDistanceFunction=function(t,e,n,i){return\\\"closest\\\"===t?i||r.quadrature(e,n):\\\"x\\\"===t?e:n},r.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},r.inbox=function(t,e,r){return t*e<0||0===t?r:1/0},r.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},r.makeEventData=function(t,e,n){var i=\\\"index\\\"in t?t.index:t.pointNumber,a={data:e._input,fullData:e,curveNumber:e.index,pointNumber:i};if(e._indexToPoints){var o=e._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return e._module.eventData?a=e._module.eventData(a,t,e,n,i):(\\\"xVal\\\"in t?a.x=t.xVal:\\\"x\\\"in t&&(a.x=t.x),\\\"yVal\\\"in t?a.y=t.yVal:\\\"y\\\"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),r.appendArrayPointValue(a,e,i),a},r.appendArrayPointValue=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],c=a(l);if(void 0===t[c]){var u=o(n.nestedProperty(e,l).get(),r);void 0!==u&&(t[c]=u)}}},r.appendArrayMultiPointValues=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],c=a(l);if(void 0===t[c]){for(var u=n.nestedProperty(e,l).get(),f=new Array(r.length),h=0;h<r.length;h++)f[h]=o(u,r[h]);t[c]=f}}};var i={ids:\\\"id\\\",locations:\\\"location\\\",labels:\\\"label\\\",values:\\\"value\\\",\\\"marker.colors\\\":\\\"color\\\"};function a(t){return i[t]||t}function o(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}},{\\\"../../lib\\\":696}],610:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"tinycolor2\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../lib/events\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../../lib/override_cursor\\\"),u=t(\\\"../drawing\\\"),f=t(\\\"../color\\\"),h=t(\\\"../dragelement\\\"),p=t(\\\"../../plots/cartesian/axes\\\"),d=t(\\\"../../registry\\\"),g=t(\\\"./helpers\\\"),v=t(\\\"./constants\\\"),m=v.YANGLE,y=Math.PI*m/180,x=1/Math.sin(y),b=Math.cos(y),_=Math.sin(y),w=v.HOVERARROWSIZE,k=v.HOVERTEXTPAD;function M(t,e,r){var i=e.hovermode,a=e.rotateLabels,s=e.bgColor,c=e.container,h=e.outerContainer,p=e.commonLabelOpts||{},d=e.fontFamily||v.HOVERFONT,g=e.fontSize||v.HOVERFONTSIZE,y=t[0],x=y.xa,b=y.ya,_=\\\"y\\\"===i?\\\"yLabel\\\":\\\"xLabel\\\",M=y[_],A=(String(M)||\\\"\\\").split(\\\" \\\")[0],T=h.node().getBoundingClientRect(),S=T.top,C=T.width,E=T.height,L=void 0!==M&&y.distance<=e.hoverdistance&&(\\\"x\\\"===i||\\\"y\\\"===i);if(L){var z,O,I=!0;for(z=0;z<t.length;z++){I&&void 0===t[z].zLabel&&(I=!1),O=t[z].hoverinfo||t[z].trace.hoverinfo;var P=Array.isArray(O)?O:O.split(\\\"+\\\");if(-1===P.indexOf(\\\"all\\\")&&-1===P.indexOf(i)){L=!1;break}}I&&(L=!1)}var D=c.selectAll(\\\"g.axistext\\\").data(L?[0]:[]);D.enter().append(\\\"g\\\").classed(\\\"axistext\\\",!0),D.exit().remove(),D.each(function(){var e=n.select(this),a=o.ensureSingle(e,\\\"path\\\",\\\"\\\",function(t){t.style({\\\"stroke-width\\\":\\\"1px\\\"})}),s=o.ensureSingle(e,\\\"text\\\",\\\"\\\",function(t){t.attr(\\\"data-notex\\\",1)}),c=p.bgcolor||f.defaultLine,h=p.bordercolor||f.contrast(c),v=f.contrast(c);a.style({fill:c,stroke:h}),s.text(M).call(u.font,p.font.family||d,p.font.size||g,p.font.color||v).call(l.positionText,0,0).call(l.convertToTspans,r),e.attr(\\\"transform\\\",\\\"\\\");var m=s.node().getBoundingClientRect();if(\\\"x\\\"===i){s.attr(\\\"text-anchor\\\",\\\"middle\\\").call(l.positionText,0,\\\"top\\\"===x.side?S-m.bottom-w-k:S-m.top+w+k);var T=\\\"top\\\"===x.side?\\\"-\\\":\\\"\\\";a.attr(\\\"d\\\",\\\"M0,0L\\\"+w+\\\",\\\"+T+w+\\\"H\\\"+(k+m.width/2)+\\\"v\\\"+T+(2*k+m.height)+\\\"H-\\\"+(k+m.width/2)+\\\"V\\\"+T+w+\\\"H-\\\"+w+\\\"Z\\\"),e.attr(\\\"transform\\\",\\\"translate(\\\"+(x._offset+(y.x0+y.x1)/2)+\\\",\\\"+(b._offset+(\\\"top\\\"===x.side?0:b._length))+\\\")\\\")}else{s.attr(\\\"text-anchor\\\",\\\"right\\\"===b.side?\\\"start\\\":\\\"end\\\").call(l.positionText,(\\\"right\\\"===b.side?1:-1)*(k+w),S-m.top-m.height/2);var C=\\\"right\\\"===b.side?\\\"\\\":\\\"-\\\";a.attr(\\\"d\\\",\\\"M0,0L\\\"+C+w+\\\",\\\"+w+\\\"V\\\"+(k+m.height/2)+\\\"h\\\"+C+(2*k+m.width)+\\\"V-\\\"+(k+m.height/2)+\\\"H\\\"+C+w+\\\"V-\\\"+w+\\\"Z\\\"),e.attr(\\\"transform\\\",\\\"translate(\\\"+(x._offset+(\\\"right\\\"===b.side?x._length:0))+\\\",\\\"+(b._offset+(y.y0+y.y1)/2)+\\\")\\\")}t=t.filter(function(t){return void 0!==t.zLabelVal||(t[_]||\\\"\\\").split(\\\" \\\")[0]===A})});var R=c.selectAll(\\\"g.hovertext\\\").data(t,function(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa,t.ya||\\\"\\\"].join(\\\",\\\")});return R.enter().append(\\\"g\\\").classed(\\\"hovertext\\\",!0).each(function(){var t=n.select(this);t.append(\\\"rect\\\").call(f.fill,f.addOpacity(s,.8)),t.append(\\\"text\\\").classed(\\\"name\\\",!0),t.append(\\\"path\\\").style(\\\"stroke-width\\\",\\\"1px\\\"),t.append(\\\"text\\\").classed(\\\"nums\\\",!0).call(u.font,d,g)}),R.exit().remove(),R.each(function(t){var e=n.select(this).attr(\\\"transform\\\",\\\"\\\"),o=\\\"\\\",c=\\\"\\\",h=t.bgcolor||t.color,p=f.combine(f.opacity(h)?h:f.defaultLine,s),v=f.combine(f.opacity(t.color)?t.color:f.defaultLine,s),y=t.borderColor||f.contrast(p);if(void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name){o=l.plainText(t.name||\\\"\\\");var x=Math.round(t.nameLength);x>-1&&o.length>x&&(o=x>3?o.substr(0,x-3)+\\\"...\\\":o.substr(0,x))}void 0!==t.zLabel?(void 0!==t.xLabel&&(c+=\\\"x: \\\"+t.xLabel+\\\"<br>\\\"),void 0!==t.yLabel&&(c+=\\\"y: \\\"+t.yLabel+\\\"<br>\\\"),c+=(c?\\\"z: \\\":\\\"\\\")+t.zLabel):L&&t[i+\\\"Label\\\"]===M?c=t[(\\\"x\\\"===i?\\\"y\\\":\\\"x\\\")+\\\"Label\\\"]||\\\"\\\":void 0===t.xLabel?void 0!==t.yLabel&&(c=t.yLabel):c=void 0===t.yLabel?t.xLabel:\\\"(\\\"+t.xLabel+\\\", \\\"+t.yLabel+\\\")\\\",!t.text&&0!==t.text||Array.isArray(t.text)||(c+=(c?\\\"<br>\\\":\\\"\\\")+t.text),void 0!==t.extraText&&(c+=(c?\\\"<br>\\\":\\\"\\\")+t.extraText),\\\"\\\"===c&&(\\\"\\\"===o&&e.remove(),c=o);var b=e.select(\\\"text.nums\\\").call(u.font,t.fontFamily||d,t.fontSize||g,t.fontColor||y).text(c).attr(\\\"data-notex\\\",1).call(l.positionText,0,0).call(l.convertToTspans,r),_=e.select(\\\"text.name\\\"),A=0;o&&o!==c?(_.call(u.font,t.fontFamily||d,t.fontSize||g,v).text(o).attr(\\\"data-notex\\\",1).call(l.positionText,0,0).call(l.convertToTspans,r),A=_.node().getBoundingClientRect().width+2*k):(_.remove(),e.select(\\\"rect\\\").remove()),e.select(\\\"path\\\").style({fill:p,stroke:y});var T,z,O=b.node().getBoundingClientRect(),I=t.xa._offset+(t.x0+t.x1)/2,P=t.ya._offset+(t.y0+t.y1)/2,D=Math.abs(t.x1-t.x0),R=Math.abs(t.y1-t.y0),B=O.width+w+k+A;t.ty0=S-O.top,t.bx=O.width+2*k,t.by=O.height+2*k,t.anchor=\\\"start\\\",t.txwidth=O.width,t.tx2width=A,t.offset=0,a?(t.pos=I,T=P+R/2+B<=E,z=P-R/2-B>=0,\\\"top\\\"!==t.idealAlign&&T||!z?T?(P+=R/2,t.anchor=\\\"start\\\"):t.anchor=\\\"middle\\\":(P-=R/2,t.anchor=\\\"end\\\")):(t.pos=P,T=I+D/2+B<=C,z=I-D/2-B>=0,\\\"left\\\"!==t.idealAlign&&T||!z?T?(I+=D/2,t.anchor=\\\"start\\\"):t.anchor=\\\"middle\\\":(I-=D/2,t.anchor=\\\"end\\\")),b.attr(\\\"text-anchor\\\",t.anchor),A&&_.attr(\\\"text-anchor\\\",t.anchor),e.attr(\\\"transform\\\",\\\"translate(\\\"+I+\\\",\\\"+P+\\\")\\\"+(a?\\\"rotate(\\\"+m+\\\")\\\":\\\"\\\"))}),R}function A(t,e){t.each(function(t){var r=n.select(this);if(t.del)r.remove();else{var i=\\\"end\\\"===t.anchor?-1:1,a=r.select(\\\"text.nums\\\"),o={start:1,end:-1,middle:0}[t.anchor],s=o*(w+k),c=s+o*(t.txwidth+k),f=0,h=t.offset;\\\"middle\\\"===t.anchor&&(s-=t.tx2width/2,c+=t.txwidth/2+k),e&&(h*=-_,f=t.offset*b),r.select(\\\"path\\\").attr(\\\"d\\\",\\\"middle\\\"===t.anchor?\\\"M-\\\"+(t.bx/2+t.tx2width/2)+\\\",\\\"+(h-t.by/2)+\\\"h\\\"+t.bx+\\\"v\\\"+t.by+\\\"h-\\\"+t.bx+\\\"Z\\\":\\\"M0,0L\\\"+(i*w+f)+\\\",\\\"+(w+h)+\\\"v\\\"+(t.by/2-w)+\\\"h\\\"+i*t.bx+\\\"v-\\\"+t.by+\\\"H\\\"+(i*w+f)+\\\"V\\\"+(h-w)+\\\"Z\\\"),a.call(l.positionText,s+f,h+t.ty0-t.by/2+k),t.tx2width&&(r.select(\\\"text.name\\\").call(l.positionText,c+o*k+f,h+t.ty0-t.by/2+k),r.select(\\\"rect\\\").call(u.setRect,c+(o-1)*t.tx2width/2+f,h-t.by/2-1,t.tx2width,t.by+2))}})}function T(t,e){var r=t.index,n=t.trace||{},i=t.cd[0],a=t.cd[r]||{},s=Array.isArray(r)?function(t,e){return o.castOption(i,r,t)||o.extractOption({},n,\\\"\\\",e)}:function(t,e){return o.extractOption(a,n,t,e)};function l(e,r,n){var i=s(r,n);i&&(t[e]=i)}if(l(\\\"hoverinfo\\\",\\\"hi\\\",\\\"hoverinfo\\\"),l(\\\"bgcolor\\\",\\\"hbg\\\",\\\"hoverlabel.bgcolor\\\"),l(\\\"borderColor\\\",\\\"hbc\\\",\\\"hoverlabel.bordercolor\\\"),l(\\\"fontFamily\\\",\\\"htf\\\",\\\"hoverlabel.font.family\\\"),l(\\\"fontSize\\\",\\\"hts\\\",\\\"hoverlabel.font.size\\\"),l(\\\"fontColor\\\",\\\"htc\\\",\\\"hoverlabel.font.color\\\"),l(\\\"nameLength\\\",\\\"hnl\\\",\\\"hoverlabel.namelength\\\"),t.posref=\\\"y\\\"===e?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel=\\\"xLabel\\\"in t?t.xLabel:p.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel=\\\"yLabel\\\"in t?t.yLabel:p.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||\\\"log\\\"===t.xa.type&&t.xerr<=0)){var c=p.tickText(t.xa,t.xa.c2l(t.xerr),\\\"hover\\\").text;void 0!==t.xerrneg?t.xLabel+=\\\" +\\\"+c+\\\" / -\\\"+p.tickText(t.xa,t.xa.c2l(t.xerrneg),\\\"hover\\\").text:t.xLabel+=\\\" \\\\xb1 \\\"+c,\\\"x\\\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\\\"log\\\"===t.ya.type&&t.yerr<=0)){var u=p.tickText(t.ya,t.ya.c2l(t.yerr),\\\"hover\\\").text;void 0!==t.yerrneg?t.yLabel+=\\\" +\\\"+u+\\\" / -\\\"+p.tickText(t.ya,t.ya.c2l(t.yerrneg),\\\"hover\\\").text:t.yLabel+=\\\" \\\\xb1 \\\"+u,\\\"y\\\"===e&&(t.distance+=1)}var f=t.hoverinfo||t.trace.hoverinfo;return\\\"all\\\"!==f&&(-1===(f=Array.isArray(f)?f:f.split(\\\"+\\\")).indexOf(\\\"x\\\")&&(t.xLabel=void 0),-1===f.indexOf(\\\"y\\\")&&(t.yLabel=void 0),-1===f.indexOf(\\\"z\\\")&&(t.zLabel=void 0),-1===f.indexOf(\\\"text\\\")&&(t.text=void 0),-1===f.indexOf(\\\"name\\\")&&(t.name=void 0)),t}function S(t,e){var r,n,i=e.container,o=e.fullLayout,s=e.event,l=!!t.hLinePoint,c=!!t.vLinePoint;if(i.selectAll(\\\".spikeline\\\").remove(),c||l){var h=f.combine(o.plot_bgcolor,o.paper_bgcolor);if(l){var p,d,g=t.hLinePoint;r=g&&g.xa,\\\"cursor\\\"===(n=g&&g.ya).spikesnap?(p=s.pointerX,d=s.pointerY):(p=r._offset+g.x,d=n._offset+g.y);var v,m,y=a.readability(g.color,h)<1.5?f.contrast(h):g.color,x=n.spikemode,b=n.spikethickness,_=n.spikecolor||y,w=n._boundingBox,k=(w.left+w.right)/2<p?w.right:w.left;-1===x.indexOf(\\\"toaxis\\\")&&-1===x.indexOf(\\\"across\\\")||(-1!==x.indexOf(\\\"toaxis\\\")&&(v=k,m=p),-1!==x.indexOf(\\\"across\\\")&&(v=n._counterSpan[0],m=n._counterSpan[1]),i.insert(\\\"line\\\",\\\":first-child\\\").attr({x1:v,x2:m,y1:d,y2:d,\\\"stroke-width\\\":b,stroke:_,\\\"stroke-dasharray\\\":u.dashStyle(n.spikedash,b)}).classed(\\\"spikeline\\\",!0).classed(\\\"crisp\\\",!0),i.insert(\\\"line\\\",\\\":first-child\\\").attr({x1:v,x2:m,y1:d,y2:d,\\\"stroke-width\\\":b+2,stroke:h}).classed(\\\"spikeline\\\",!0).classed(\\\"crisp\\\",!0)),-1!==x.indexOf(\\\"marker\\\")&&i.insert(\\\"circle\\\",\\\":first-child\\\").attr({cx:k+(\\\"right\\\"!==n.side?b:-b),cy:d,r:b,fill:_}).classed(\\\"spikeline\\\",!0)}if(c){var M,A,T=t.vLinePoint;r=T&&T.xa,n=T&&T.ya,\\\"cursor\\\"===r.spikesnap?(M=s.pointerX,A=s.pointerY):(M=r._offset+T.x,A=n._offset+T.y);var S,C,E=a.readability(T.color,h)<1.5?f.contrast(h):T.color,L=r.spikemode,z=r.spikethickness,O=r.spikecolor||E,I=r._boundingBox,P=(I.top+I.bottom)/2<A?I.bottom:I.top;-1===L.indexOf(\\\"toaxis\\\")&&-1===L.indexOf(\\\"across\\\")||(-1!==L.indexOf(\\\"toaxis\\\")&&(S=P,C=A),-1!==L.indexOf(\\\"across\\\")&&(S=r._counterSpan[0],C=r._counterSpan[1]),i.insert(\\\"line\\\",\\\":first-child\\\").attr({x1:M,x2:M,y1:S,y2:C,\\\"stroke-width\\\":z,stroke:O,\\\"stroke-dasharray\\\":u.dashStyle(r.spikedash,z)}).classed(\\\"spikeline\\\",!0).classed(\\\"crisp\\\",!0),i.insert(\\\"line\\\",\\\":first-child\\\").attr({x1:M,x2:M,y1:S,y2:C,\\\"stroke-width\\\":z+2,stroke:h}).classed(\\\"spikeline\\\",!0).classed(\\\"crisp\\\",!0)),-1!==L.indexOf(\\\"marker\\\")&&i.insert(\\\"circle\\\",\\\":first-child\\\").attr({cx:M,cy:P-(\\\"top\\\"!==r.side?z:-z),r:z,fill:O}).classed(\\\"spikeline\\\",!0)}}}function C(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}r.hover=function(t,e,r,a){t=o.getGraphDiv(t),o.throttle(t._fullLayout._uid+v.HOVERID,v.HOVERMINTIME,function(){!function(t,e,r,a){r||(r=\\\"xy\\\");var l=Array.isArray(r)?r:[r],u=t._fullLayout,v=u._plots||[],m=v[r],y=u._has(\\\"cartesian\\\");if(m){var b=m.overlays.map(function(t){return t.id});l=l.concat(b)}for(var _=l.length,w=new Array(_),k=new Array(_),E=!1,L=0;L<_;L++){var z=l[L],O=v[z];if(O)E=!0,w[L]=p.getFromId(t,O.xaxis._id),k[L]=p.getFromId(t,O.yaxis._id);else{var I=u[z]._subplot;w[L]=I.xaxis,k[L]=I.yaxis}}var P=e.hovermode||u.hovermode;P&&!E&&(P=\\\"closest\\\");if(-1===[\\\"x\\\",\\\"y\\\",\\\"closest\\\"].indexOf(P)||!t.calcdata||t.querySelector(\\\".zoombox\\\")||t._dragging)return h.unhoverRaw(t,e);var D,R,B,F,N,j,V,U,q,H,G,W,Y,X=-1===u.hoverdistance?1/0:u.hoverdistance,Z=-1===u.spikedistance?1/0:u.spikedistance,$=[],J=[],K={hLinePoint:null,vLinePoint:null},Q=!1;if(Array.isArray(e))for(P=\\\"array\\\",B=0;B<e.length;B++)N=t.calcdata[e[B].curveNumber||0],j=N[0].trace,\\\"skip\\\"!==N[0].trace.hoverinfo&&(J.push(N),\\\"h\\\"===j.orientation&&(Q=!0));else{for(F=0;F<t.calcdata.length;F++)N=t.calcdata[F],\\\"skip\\\"!==(j=N[0].trace).hoverinfo&&g.isTraceInSubplots(j,l)&&(J.push(N),\\\"h\\\"===j.orientation&&(Q=!0));var tt,et,rt=!e.target;if(rt)tt=\\\"xpx\\\"in e?e.xpx:w[0]._length/2,et=\\\"ypx\\\"in e?e.ypx:k[0]._length/2;else{if(!1===s.triggerHandler(t,\\\"plotly_beforehover\\\",e))return;var nt=e.target.getBoundingClientRect();if(tt=e.clientX-nt.left,et=e.clientY-nt.top,tt<0||tt>w[0]._length||et<0||et>k[0]._length)return h.unhoverRaw(t,e)}if(e.pointerX=tt+w[0]._offset,e.pointerY=et+k[0]._offset,D=\\\"xval\\\"in e?g.flat(l,e.xval):g.p2c(w,tt),R=\\\"yval\\\"in e?g.flat(l,e.yval):g.p2c(k,et),!i(D[0])||!i(R[0]))return o.warn(\\\"Fx.hover failed\\\",e,t),h.unhoverRaw(t,e)}var it=1/0;for(F=0;F<J.length;F++)if((N=J[F])&&N[0]&&N[0].trace&&!0===N[0].trace.visible&&(j=N[0].trace,-1===[\\\"carpet\\\",\\\"contourcarpet\\\"].indexOf(j._module.name))){if(\\\"splom\\\"===j.type?V=l[U=0]:(V=g.getSubplot(j),U=l.indexOf(V)),q=P,W={cd:N,trace:j,xa:w[U],ya:k[U],maxHoverDistance:X,maxSpikeDistance:Z,index:!1,distance:Math.min(it,X),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:f.defaultLine,name:j.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},u[V]&&(W.subplot=u[V]._subplot),u._splomScenes&&u._splomScenes[j.uid]&&(W.scene=u._splomScenes[j.uid]),Y=$.length,\\\"array\\\"===q){var at=e[F];\\\"pointNumber\\\"in at?(W.index=at.pointNumber,q=\\\"closest\\\"):(q=\\\"\\\",\\\"xval\\\"in at&&(H=at.xval,q=\\\"x\\\"),\\\"yval\\\"in at&&(G=at.yval,q=q?\\\"closest\\\":\\\"y\\\"))}else H=D[U],G=R[U];if(0!==X)if(j._module&&j._module.hoverPoints){var ot=j._module.hoverPoints(W,H,G,q,u._hoverlayer);if(ot)for(var st,lt=0;lt<ot.length;lt++)st=ot[lt],i(st.x0)&&i(st.y0)&&$.push(T(st,P))}else o.log(\\\"Unrecognized trace type in hover:\\\",j);if(\\\"closest\\\"===P&&$.length>Y&&($.splice(0,Y),it=$[0].distance),y&&0!==Z&&0===$.length){W.distance=Z,W.index=!1;var ct=j._module.hoverPoints(W,H,G,\\\"closest\\\",u._hoverlayer);if(ct&&(ct=ct.filter(function(t){return t.spikeDistance<=Z})),ct&&ct.length){var ut,ft=ct.filter(function(t){return t.xa.showspikes});if(ft.length){var ht=ft[0];i(ht.x0)&&i(ht.y0)&&(ut=vt(ht),(!K.vLinePoint||K.vLinePoint.spikeDistance>ut.spikeDistance)&&(K.vLinePoint=ut))}var pt=ct.filter(function(t){return t.ya.showspikes});if(pt.length){var dt=pt[0];i(dt.x0)&&i(dt.y0)&&(ut=vt(dt),(!K.hLinePoint||K.hLinePoint.spikeDistance>ut.spikeDistance)&&(K.hLinePoint=ut))}}}}function gt(t,e){for(var r,n=null,i=1/0,a=0;a<t.length;a++)(r=t[a].spikeDistance)<i&&r<=e&&(n=t[a],i=r);return n}function vt(t){return t?{xa:t.xa,ya:t.ya,x:void 0!==t.xSpike?t.xSpike:(t.x0+t.x1)/2,y:void 0!==t.ySpike?t.ySpike:(t.y0+t.y1)/2,distance:t.distance,spikeDistance:t.spikeDistance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}var mt={fullLayout:u,container:u._hoverlayer,outerContainer:u._paperdiv,event:e},yt=t._spikepoints,xt={vLinePoint:K.vLinePoint,hLinePoint:K.hLinePoint};if(t._spikepoints=xt,y&&0!==Z&&0!==$.length){var bt=$.filter(function(t){return t.ya.showspikes}),_t=gt(bt,Z);K.hLinePoint=vt(_t);var wt=$.filter(function(t){return t.xa.showspikes}),kt=gt(wt,Z);K.vLinePoint=vt(kt)}if(0===$.length){var Mt=h.unhoverRaw(t,e);return!y||null===K.hLinePoint&&null===K.vLinePoint||C(yt)&&S(K,mt),Mt}y&&C(yt)&&S(K,mt);$.sort(function(t,e){return t.distance-e.distance});var At=t._hoverdata,Tt=[];for(B=0;B<$.length;B++){var St=$[B];Tt.push(g.makeEventData(St,St.trace,St.cd))}t._hoverdata=Tt;var Ct=\\\"y\\\"===P&&(J.length>1||$.length>1)||\\\"closest\\\"===P&&Q&&$.length>1,Et=f.combine(u.plot_bgcolor||f.background,u.paper_bgcolor),Lt={hovermode:P,rotateLabels:Ct,bgColor:Et,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},zt=M($,Lt,t);if(function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.map(function(t,n){var i=t[e],a=\\\"x\\\"===i._id.charAt(0),o=i.range;return!n&&o&&o[0]>o[1]!==a&&(f=-1),[{i:n,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?x:1)/2,pmin:0,pmax:a?r.width:r.height}]}).sort(function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)});function p(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var c=0;for(o=0;o<t.length;o++)(l=t[o]).pos+l.dp+l.size>e.pmax&&c++;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos>e.pmax-1&&(l.del=!0,c--);for(o=0;o<t.length&&!(c<=0);o++)if((l=t[o]).pos<e.pmin+1)for(l.del=!0,c--,a=2*l.size,s=t.length-1;s>=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,c--)}}}for(;!n&&u<=t.length;){for(u++,n=!0,o=0;o<h.length-1;){var d=h[o],g=h[o+1],v=d[d.length-1],m=g[0];if((i=v.pos+v.dp+v.size-m.pos-m.dp+m.size)>.01&&v.pmin===m.pmin&&v.pmax===m.pmax){for(s=g.length-1;s>=0;s--)g[s].dp+=i;for(d.push.apply(d,g),h.splice(o+1,1),c=0,s=d.length-1;s>=0;s--)c+=d[s].dp;for(a=c/d.length,s=d.length-1;s>=0;s--)d[s].dp-=a;n=!1}else o++}h.forEach(p)}for(o=h.length-1;o>=0;o--){var y=h[o];for(s=y.length-1;s>=0;s--){var b=y[s],_=t[b.i];_.offset=b.dp,_.del=b.del}}}($,Ct?\\\"xa\\\":\\\"ya\\\",u),A(zt,Ct),e.target&&e.target.tagName){var Ot=d.getComponentMethod(\\\"annotations\\\",\\\"hasClickToShow\\\")(t,Tt);c(n.select(e.target),Ot?\\\"pointer\\\":\\\"\\\")}if(!e.target||a||!function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber))return!0}return!1}(t,0,At))return;At&&t.emit(\\\"plotly_unhover\\\",{event:e,points:At});t.emit(\\\"plotly_hover\\\",{event:e,points:t._hoverdata,xaxes:w,yaxes:k,xvals:D,yvals:R})}(t,e,r,a)})},r.loneHover=function(t,e){var r={color:t.color||f.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,trace:{index:0,hoverinfo:\\\"\\\"},xa:{_offset:0},ya:{_offset:0},index:0},i=n.select(e.container),a=e.outerContainer?n.select(e.outerContainer):i,o={hovermode:\\\"closest\\\",rotateLabels:!1,bgColor:e.bgColor||f.background,container:i,outerContainer:a},s=M([r],o,e.gd);return A(s,o.rotateLabels),s.node()},r.multiHovers=function(t,e){Array.isArray(t)||(t=[t]);var r=t.map(function(t){return{color:t.color||f.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,trace:{index:0,hoverinfo:\\\"\\\"},xa:{_offset:0},ya:{_offset:0},index:0}}),i=n.select(e.container),a=e.outerContainer?n.select(e.outerContainer):i,o={hovermode:\\\"closest\\\",rotateLabels:!1,bgColor:e.bgColor||f.background,container:i,outerContainer:a},s=M(r,o,e.gd),l=0;return s.sort(function(t,e){return t.y0-e.y0}).each(function(t){var e=t.y0-t.by/2;t.offset=e-5<l?l-e+5:0,l=e+t.by+t.offset}),A(s,o.rotateLabels),s.node()}},{\\\"../../lib\\\":696,\\\"../../lib/events\\\":684,\\\"../../lib/override_cursor\\\":708,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"./constants\\\":607,\\\"./helpers\\\":609,d3:148,\\\"fast-isnumeric\\\":214,tinycolor2:514}],611:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e,r,i){r(\\\"hoverlabel.bgcolor\\\",(i=i||{}).bgcolor),r(\\\"hoverlabel.bordercolor\\\",i.bordercolor),r(\\\"hoverlabel.namelength\\\",i.namelength),n.coerceFont(r,\\\"hoverlabel.font\\\",i.font)}},{\\\"../../lib\\\":696}],612:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../dragelement\\\"),o=t(\\\"./helpers\\\"),s=t(\\\"./layout_attributes\\\"),l=t(\\\"./hover\\\");e.exports={moduleType:\\\"component\\\",name:\\\"fx\\\",constants:t(\\\"./constants\\\"),schema:{layout:s},attributes:t(\\\"./attributes\\\"),layoutAttributes:s,supplyLayoutGlobalDefaults:t(\\\"./layout_global_defaults\\\"),supplyDefaults:t(\\\"./defaults\\\"),supplyLayoutDefaults:t(\\\"./layout_defaults\\\"),calc:t(\\\"./calc\\\"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,\\\"hoverlabel.\\\"+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,\\\"hoverinfo\\\",function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)})},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,multiHovers:l.multiHovers,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll(\\\"g.hovertext\\\").remove(),e.selectAll(\\\".spikeline\\\").remove()},click:t(\\\"./click\\\")}},{\\\"../../lib\\\":696,\\\"../dragelement\\\":592,\\\"./attributes\\\":604,\\\"./calc\\\":605,\\\"./click\\\":606,\\\"./constants\\\":607,\\\"./defaults\\\":608,\\\"./helpers\\\":609,\\\"./hover\\\":610,\\\"./layout_attributes\\\":613,\\\"./layout_defaults\\\":614,\\\"./layout_global_defaults\\\":615,d3:148}],613:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"../../plots/font_attributes\\\")({editType:\\\"none\\\"});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:\\\"flaglist\\\",flags:[\\\"event\\\",\\\"select\\\"],dflt:\\\"event\\\",editType:\\\"plot\\\",extras:[\\\"none\\\"]},dragmode:{valType:\\\"enumerated\\\",values:[\\\"zoom\\\",\\\"pan\\\",\\\"select\\\",\\\"lasso\\\",\\\"orbit\\\",\\\"turntable\\\"],dflt:\\\"zoom\\\",editType:\\\"modebar\\\"},hovermode:{valType:\\\"enumerated\\\",values:[\\\"x\\\",\\\"y\\\",\\\"closest\\\",!1],editType:\\\"modebar\\\"},hoverdistance:{valType:\\\"integer\\\",min:-1,dflt:20,editType:\\\"none\\\"},spikedistance:{valType:\\\"integer\\\",min:-1,dflt:20,editType:\\\"none\\\"},hoverlabel:{bgcolor:{valType:\\\"color\\\",editType:\\\"none\\\"},bordercolor:{valType:\\\"color\\\",editType:\\\"none\\\"},font:i,namelength:{valType:\\\"integer\\\",min:-1,dflt:15,editType:\\\"none\\\"},editType:\\\"none\\\"},selectdirection:{valType:\\\"enumerated\\\",values:[\\\"h\\\",\\\"v\\\",\\\"d\\\",\\\"any\\\"],dflt:\\\"any\\\",editType:\\\"none\\\"}}},{\\\"../../plots/font_attributes\\\":772,\\\"./constants\\\":607}],614:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}var o,s=a(\\\"clickmode\\\");\\\"select\\\"===a(\\\"dragmode\\\")&&a(\\\"selectdirection\\\"),e._has(\\\"cartesian\\\")?s.indexOf(\\\"select\\\")>-1?o=\\\"closest\\\":(e._isHoriz=function(t){for(var e=!0,r=0;r<t.length;r++){var n=t[r];if(\\\"h\\\"!==n.orientation){e=!1;break}}return e}(r),o=e._isHoriz?\\\"y\\\":\\\"x\\\"):o=\\\"closest\\\",a(\\\"hovermode\\\",o)&&(a(\\\"hoverdistance\\\"),a(\\\"spikedistance\\\"));var l=e._has(\\\"mapbox\\\"),c=e._has(\\\"geo\\\"),u=e._basePlotModules.length;\\\"zoom\\\"===e.dragmode&&((l||c)&&1===u||l&&c&&2===u)&&(e.dragmode=\\\"pan\\\")}},{\\\"../../lib\\\":696,\\\"./layout_attributes\\\":613}],615:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./hoverlabel_defaults\\\"),a=t(\\\"./layout_attributes\\\");e.exports=function(t,e){i(t,e,function(r,i){return n.coerce(t,e,a,r,i)})}},{\\\"../../lib\\\":696,\\\"./hoverlabel_defaults\\\":611,\\\"./layout_attributes\\\":613}],616:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../lib/regex\\\").counter,a=t(\\\"../../plots/domain\\\").attributes,o=t(\\\"../../plots/cartesian/constants\\\").idRegex,s=t(\\\"../../plot_api/plot_template\\\"),l={rows:{valType:\\\"integer\\\",min:1,editType:\\\"plot\\\"},roworder:{valType:\\\"enumerated\\\",values:[\\\"top to bottom\\\",\\\"bottom to top\\\"],dflt:\\\"top to bottom\\\",editType:\\\"plot\\\"},columns:{valType:\\\"integer\\\",min:1,editType:\\\"plot\\\"},subplots:{valType:\\\"info_array\\\",freeLength:!0,dimensions:2,items:{valType:\\\"enumerated\\\",values:[i(\\\"xy\\\").toString(),\\\"\\\"],editType:\\\"plot\\\"},editType:\\\"plot\\\"},xaxes:{valType:\\\"info_array\\\",freeLength:!0,items:{valType:\\\"enumerated\\\",values:[o.x.toString(),\\\"\\\"],editType:\\\"plot\\\"},editType:\\\"plot\\\"},yaxes:{valType:\\\"info_array\\\",freeLength:!0,items:{valType:\\\"enumerated\\\",values:[o.y.toString(),\\\"\\\"],editType:\\\"plot\\\"},editType:\\\"plot\\\"},pattern:{valType:\\\"enumerated\\\",values:[\\\"independent\\\",\\\"coupled\\\"],dflt:\\\"coupled\\\",editType:\\\"plot\\\"},xgap:{valType:\\\"number\\\",min:0,max:1,editType:\\\"plot\\\"},ygap:{valType:\\\"number\\\",min:0,max:1,editType:\\\"plot\\\"},domain:a({name:\\\"grid\\\",editType:\\\"plot\\\",noGridCell:!0},{}),xside:{valType:\\\"enumerated\\\",values:[\\\"bottom\\\",\\\"bottom plot\\\",\\\"top plot\\\",\\\"top\\\"],dflt:\\\"bottom plot\\\",editType:\\\"plot\\\"},yside:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"left plot\\\",\\\"right plot\\\",\\\"right\\\"],dflt:\\\"left plot\\\",editType:\\\"plot\\\"},editType:\\\"plot\\\"};function c(t,e,r){var n=e[r+\\\"axes\\\"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(t,e,r,n,i,a){var o=e(t+\\\"gap\\\",r),s=e(\\\"domain.\\\"+t);e(t+\\\"side\\\",n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-o),f=u*(1-o),h=0;h<i;h++){var p=c+u*h;l[a?i-1-h:h]=[p,p+f]}return l}function f(t,e,r,n,i){var a,o=new Array(r);function s(t,r){-1!==e.indexOf(r)&&void 0===n[r]?(o[t]=r,n[r]=t):o[t]=\\\"\\\"}if(Array.isArray(t))for(a=0;a<r;a++)s(a,t[a]);else for(s(0,i),a=1;a<r;a++)s(a,i+(a+1));return o}e.exports={moduleType:\\\"component\\\",name:\\\"grid\\\",schema:{layout:{grid:l}},layoutAttributes:l,sizeDefaults:function(t,e){var r=t.grid||{},i=c(e,r,\\\"x\\\"),a=c(e,r,\\\"y\\\");if(t.grid||i||a){var o,f,h=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),p=Array.isArray(i),d=Array.isArray(a),g=p&&i!==r.xaxes&&d&&a!==r.yaxes;h?(o=r.subplots.length,f=r.subplots[0].length):(d&&(o=a.length),p&&(f=i.length));var v=s.newContainer(e,\\\"grid\\\"),m=M(\\\"rows\\\",o),y=M(\\\"columns\\\",f);if(m*y>1){h||p||d||\\\"independent\\\"===M(\\\"pattern\\\")&&(h=!0),v._hasSubplotGrid=h;var x,b,_=\\\"top to bottom\\\"===M(\\\"roworder\\\"),w=h?.2:.1,k=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),v._domains={x:u(\\\"x\\\",M,w,x,y),y:u(\\\"y\\\",M,k,b,m,_)}}else delete e.grid}function M(t,e){return n.coerce(r,v,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,u,h=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,g=r.rows,v=r.columns,m=\\\"independent\\\"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n<g;n++){var _=l[n]=new Array(v),w=x[n]||[];for(i=0;i<v;i++)if(m?(s=1===b?\\\"xy\\\":\\\"x\\\"+b+\\\"y\\\"+b,b++):s=w[i],_[i]=\\\"\\\",-1!==p.cartesian.indexOf(s)){if(u=s.indexOf(\\\"y\\\"),a=s.slice(0,u),o=s.slice(u),void 0!==y[a]&&y[a]!==i||void 0!==y[o]&&y[o]!==n)continue;_[i]=s,y[a]=i,y[o]=n}}}else{var k=c(e,h,\\\"x\\\"),M=c(e,h,\\\"y\\\");r.xaxes=f(k,p.xaxis,v,y,\\\"x\\\"),r.yaxes=f(M,p.yaxis,g,y,\\\"y\\\")}var A=r._anchors={},T=\\\"top to bottom\\\"===r.roworder;for(var S in y){var C,E,L,z=S.charAt(0),O=r[z+\\\"side\\\"];if(O.length<8)A[S]=\\\"free\\\";else if(\\\"x\\\"===z){if(\\\"t\\\"===O.charAt(0)===T?(C=0,E=1,L=g):(C=g-1,E=-1,L=-1),d){var I=y[S];for(n=C;n!==L;n+=E)if((s=l[n][I])&&(u=s.indexOf(\\\"y\\\"),s.slice(0,u)===S)){A[S]=s.slice(u);break}}else for(n=C;n!==L;n+=E)if(o=r.yaxes[n],-1!==p.cartesian.indexOf(S+o)){A[S]=o;break}}else if(\\\"l\\\"===O.charAt(0)?(C=0,E=1,L=v):(C=v-1,E=-1,L=-1),d){var P=y[S];for(n=C;n!==L;n+=E)if((s=l[P][n])&&(u=s.indexOf(\\\"y\\\"),s.slice(u)===S)){A[S]=s.slice(0,u);break}}else for(n=C;n!==L;n+=E)if(a=r.xaxes[n],-1!==p.cartesian.indexOf(a+S)){A[S]=a;break}}}}}},{\\\"../../lib\\\":696,\\\"../../lib/regex\\\":713,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/constants\\\":751,\\\"../../plots/domain\\\":771}],617:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/constants\\\"),i=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports=i(\\\"image\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"arraydraw\\\"},source:{valType:\\\"string\\\",editType:\\\"arraydraw\\\"},layer:{valType:\\\"enumerated\\\",values:[\\\"below\\\",\\\"above\\\"],dflt:\\\"above\\\",editType:\\\"arraydraw\\\"},sizex:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},sizey:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},sizing:{valType:\\\"enumerated\\\",values:[\\\"fill\\\",\\\"contain\\\",\\\"stretch\\\"],dflt:\\\"contain\\\",editType:\\\"arraydraw\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,editType:\\\"arraydraw\\\"},x:{valType:\\\"any\\\",dflt:0,editType:\\\"arraydraw\\\"},y:{valType:\\\"any\\\",dflt:0,editType:\\\"arraydraw\\\"},xanchor:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\",editType:\\\"arraydraw\\\"},yanchor:{valType:\\\"enumerated\\\",values:[\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"top\\\",editType:\\\"arraydraw\\\"},xref:{valType:\\\"enumerated\\\",values:[\\\"paper\\\",n.idRegex.x.toString()],dflt:\\\"paper\\\",editType:\\\"arraydraw\\\"},yref:{valType:\\\"enumerated\\\",values:[\\\"paper\\\",n.idRegex.y.toString()],dflt:\\\"paper\\\",editType:\\\"arraydraw\\\"},editType:\\\"arraydraw\\\"})},{\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/constants\\\":751}],618:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib/to_log_range\\\");e.exports=function(t,e,r,a){e=e||{};var o=\\\"log\\\"===r&&\\\"linear\\\"===e.type,s=\\\"linear\\\"===r&&\\\"log\\\"===e.type;if(o||s)for(var l,c,u=t._fullLayout.images,f=e._id.charAt(0),h=0;h<u.length;h++)if(c=\\\"images[\\\"+h+\\\"].\\\",(l=u[h])[f+\\\"ref\\\"]===e._id){var p=l[f],d=l[\\\"size\\\"+f],g=null,v=null;if(o){g=i(p,e.range);var m=d/Math.pow(10,g)/2;v=2*Math.log(m+Math.sqrt(1+m*m))/Math.LN10}else v=(g=Math.pow(10,p))*(Math.pow(10,d/2)-Math.pow(10,-d/2));n(g)?n(v)||(v=null):(g=null,v=null),a(c+f,g),a(c+\\\"size\\\"+f,v)}}},{\\\"../../lib/to_log_range\\\":723,\\\"fast-isnumeric\\\":214}],619:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../plots/array_container_defaults\\\"),o=t(\\\"./attributes\\\");function s(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var s=a(\\\"source\\\");if(!a(\\\"visible\\\",!!s))return e;a(\\\"layer\\\"),a(\\\"xanchor\\\"),a(\\\"yanchor\\\"),a(\\\"sizex\\\"),a(\\\"sizey\\\"),a(\\\"sizing\\\"),a(\\\"opacity\\\");for(var l={_fullLayout:r},c=[\\\"x\\\",\\\"y\\\"],u=0;u<2;u++){var f=c[u],h=i.coerceRef(t,e,l,f,\\\"paper\\\");i.coercePosition(e,l,a,h,f,0)}return e}e.exports=function(t,e){a(t,e,{name:\\\"images\\\",handleItemDefaults:s})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/cartesian/axes\\\":745,\\\"./attributes\\\":617}],620:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../drawing\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../../constants/xmlns_namespaces\\\");e.exports=function(t){var e,r,s=t._fullLayout,l=[],c={},u=[];for(r=0;r<s.images.length;r++){var f=s.images[r];if(f.visible)if(\\\"below\\\"===f.layer&&\\\"paper\\\"!==f.xref&&\\\"paper\\\"!==f.yref){e=f.xref+f.yref;var h=s._plots[e];if(!h){u.push(f);continue}h.mainplot&&(e=h.mainplot.id),c[e]||(c[e]=[]),c[e].push(f)}else\\\"above\\\"===f.layer?l.push(f):u.push(f)}var p={x:{left:{sizing:\\\"xMin\\\",offset:0},center:{sizing:\\\"xMid\\\",offset:-.5},right:{sizing:\\\"xMax\\\",offset:-1}},y:{top:{sizing:\\\"YMin\\\",offset:0},middle:{sizing:\\\"YMid\\\",offset:-.5},bottom:{sizing:\\\"YMax\\\",offset:-1}}};function d(e){var r=n.select(this);if(!this.img||this.img.src!==e.source){r.attr(\\\"xmlns\\\",o.svg);var i=new Promise(function(t){var n=new Image;function i(){r.remove(),t()}this.img=n,n.setAttribute(\\\"crossOrigin\\\",\\\"anonymous\\\"),n.onerror=i,n.onload=function(){var e=document.createElement(\\\"canvas\\\");e.width=this.width,e.height=this.height,e.getContext(\\\"2d\\\").drawImage(this,0,0);var n=e.toDataURL(\\\"image/png\\\");r.attr(\\\"xlink:href\\\",n),t()},r.on(\\\"error\\\",i),n.src=e.source}.bind(this));t._promises.push(i)}}function g(e){var r=n.select(this),o=a.getFromId(t,e.xref),l=a.getFromId(t,e.yref),c=s._size,u=o?Math.abs(o.l2p(e.sizex)-o.l2p(0)):e.sizex*c.w,f=l?Math.abs(l.l2p(e.sizey)-l.l2p(0)):e.sizey*c.h,h=u*p.x[e.xanchor].offset,d=f*p.y[e.yanchor].offset,g=p.x[e.xanchor].sizing+p.y[e.yanchor].sizing,v=(o?o.r2p(e.x)+o._offset:e.x*c.w+c.l)+h,m=(l?l.r2p(e.y)+l._offset:c.h-e.y*c.h+c.t)+d;switch(e.sizing){case\\\"fill\\\":g+=\\\" slice\\\";break;case\\\"stretch\\\":g=\\\"none\\\"}r.attr({x:v,y:m,width:u,height:f,preserveAspectRatio:g,opacity:e.opacity});var y=(o?o._id:\\\"\\\")+(l?l._id:\\\"\\\");r.call(i.setClipUrl,y?\\\"clip\\\"+s._uid+y:null)}var v=s._imageLowerLayer.selectAll(\\\"image\\\").data(u),m=s._imageUpperLayer.selectAll(\\\"image\\\").data(l);v.enter().append(\\\"image\\\"),m.enter().append(\\\"image\\\"),v.exit().remove(),m.exit().remove(),v.each(function(t){d.bind(this)(t),g.bind(this)(t)}),m.each(function(t){d.bind(this)(t),g.bind(this)(t)});var y=Object.keys(s._plots);for(r=0;r<y.length;r++){e=y[r];var x=s._plots[e];if(x.imagelayer){var b=x.imagelayer.selectAll(\\\"image\\\").data(c[e]||[]);b.enter().append(\\\"image\\\"),b.exit().remove(),b.each(function(t){d.bind(this)(t),g.bind(this)(t)})}}}},{\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../plots/cartesian/axes\\\":745,\\\"../drawing\\\":595,d3:148}],621:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"component\\\",name:\\\"images\\\",layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),includeBasePlot:t(\\\"../../plots/cartesian/include_components\\\")(\\\"images\\\"),draw:t(\\\"./draw\\\"),convertCoords:t(\\\"./convert_coords\\\")}},{\\\"../../plots/cartesian/include_components\\\":756,\\\"./attributes\\\":617,\\\"./convert_coords\\\":618,\\\"./defaults\\\":619,\\\"./draw\\\":620}],622:[function(t,e,r){\\\"use strict\\\";r.isRightAnchor=function(t){return\\\"right\\\"===t.xanchor||\\\"auto\\\"===t.xanchor&&t.x>=2/3},r.isCenterAnchor=function(t){return\\\"center\\\"===t.xanchor||\\\"auto\\\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return\\\"bottom\\\"===t.yanchor||\\\"auto\\\"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return\\\"middle\\\"===t.yanchor||\\\"auto\\\"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],623:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../color/attributes\\\");e.exports={bgcolor:{valType:\\\"color\\\",editType:\\\"legend\\\"},bordercolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"legend\\\"},borderwidth:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"legend\\\"},font:n({editType:\\\"legend\\\"}),orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],dflt:\\\"v\\\",editType:\\\"legend\\\"},traceorder:{valType:\\\"flaglist\\\",flags:[\\\"reversed\\\",\\\"grouped\\\"],extras:[\\\"normal\\\"],editType:\\\"legend\\\"},tracegroupgap:{valType:\\\"number\\\",min:0,dflt:10,editType:\\\"legend\\\"},x:{valType:\\\"number\\\",min:-2,max:3,dflt:1.02,editType:\\\"legend\\\"},xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\",editType:\\\"legend\\\"},y:{valType:\\\"number\\\",min:-2,max:3,dflt:1,editType:\\\"legend\\\"},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"auto\\\",editType:\\\"legend\\\"},editType:\\\"legend\\\"}},{\\\"../../plots/font_attributes\\\":772,\\\"../color/attributes\\\":569}],624:[function(t,e,r){\\\"use strict\\\";e.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:\\\"#808BA4\\\",scrollBarMargin:4,textOffsetX:40}},{}],625:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plot_api/plot_template\\\"),o=t(\\\"./attributes\\\"),s=t(\\\"../../plots/layout_attributes\\\"),l=t(\\\"./helpers\\\");e.exports=function(t,e,r){for(var c,u,f,h,p=t.legend||{},d=0,g=!1,v=\\\"normal\\\",m=0;m<r.length;m++){var y=r[m];y.visible&&((y.showlegend||y._dfltShowLegend)&&(d++,y.showlegend&&(g=!0,(n.traceIs(y,\\\"pie\\\")||!0===y._input.showlegend)&&d++)),(n.traceIs(y,\\\"bar\\\")&&\\\"stack\\\"===e.barmode||-1!==[\\\"tonextx\\\",\\\"tonexty\\\"].indexOf(y.fill))&&(v=l.isGrouped({traceorder:v})?\\\"grouped+reversed\\\":\\\"reversed\\\"),void 0!==y.legendgroup&&\\\"\\\"!==y.legendgroup&&(v=l.isReversed({traceorder:v})?\\\"reversed+grouped\\\":\\\"grouped\\\"))}if(!1!==i.coerce(t,e,s,\\\"showlegend\\\",g&&d>1)){var x=a.newContainer(e,\\\"legend\\\");if(_(\\\"bgcolor\\\",e.paper_bgcolor),_(\\\"bordercolor\\\"),_(\\\"borderwidth\\\"),i.coerceFont(_,\\\"font\\\",e.font),_(\\\"orientation\\\"),\\\"h\\\"===x.orientation){var b=t.xaxis;b&&b.rangeslider&&b.rangeslider.visible?(c=0,f=\\\"left\\\",u=1.1,h=\\\"bottom\\\"):(c=0,f=\\\"left\\\",u=-.1,h=\\\"top\\\")}_(\\\"traceorder\\\",v),l.isGrouped(e.legend)&&_(\\\"tracegroupgap\\\"),_(\\\"x\\\",c),_(\\\"xanchor\\\",f),_(\\\"y\\\",u),_(\\\"yanchor\\\",h),i.noneOrAll(p,x,[\\\"x\\\",\\\"y\\\"])}function _(t,e){return i.coerce(p,x,o,t,e)}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/layout_attributes\\\":800,\\\"../../registry\\\":828,\\\"./attributes\\\":623,\\\"./helpers\\\":629}],626:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib/events\\\"),l=t(\\\"../dragelement\\\"),c=t(\\\"../drawing\\\"),u=t(\\\"../color\\\"),f=t(\\\"../../lib/svg_text_utils\\\"),h=t(\\\"./handle_click\\\"),p=t(\\\"./constants\\\"),d=t(\\\"../../constants/interactions\\\"),g=t(\\\"../../constants/alignment\\\"),v=g.LINE_SPACING,m=g.FROM_TL,y=g.FROM_BR,x=t(\\\"./get_legend_data\\\"),b=t(\\\"./style\\\"),_=t(\\\"./helpers\\\"),w=t(\\\"./anchor_utils\\\"),k=d.DBLCLICKDELAY;function M(t,e,r,n,i){var a=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};if(a._group&&(o.group=a._group),\\\"pie\\\"===a.type&&(o.label=r.datum()[0].label),!1!==s.triggerHandler(t,\\\"plotly_legendclick\\\",o))if(1===n)e._clickTimeout=setTimeout(function(){h(r,t,n)},k);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,\\\"plotly_legenddoubleclick\\\",o)&&h(r,t,n)}}function A(t,e,r){var n=t.data()[0][0],a=e._fullLayout,s=n.trace,l=o.traceIs(s,\\\"pie\\\"),u=s.index,h=l?n.label:s.name,d=e._context.edits.legendText&&!l,g=i.ensureSingle(t,\\\"text\\\",\\\"legendtext\\\");function m(r){f.convertToTspans(r,e,function(){!function(t,e){var r=t.data()[0][0];if(!r.trace.showlegend)return void t.remove();var n,i,a=t.select(\\\"g[class*=math-group]\\\"),o=a.node(),s=e._fullLayout.legend.font.size*v;if(o){var l=c.bBox(o);n=l.height,i=l.width,c.setTranslate(a,0,n/4)}else{var u=t.select(\\\".legendtext\\\"),h=f.lineCount(u),d=u.node();n=s*h,i=d?c.bBox(d).width:0;var g=s*(.3+(1-h)/2);f.positionText(u,p.textOffsetX,g)}n=Math.max(n,16)+3,r.height=n,r.width=i}(t,e)})}g.attr(\\\"text-anchor\\\",\\\"start\\\").classed(\\\"user-select-none\\\",!0).call(c.font,a.legend.font).text(d?T(h,r):h),f.positionText(g,p.textOffsetX,0),d?g.call(f.makeEditable,{gd:e,text:h}).call(m).on(\\\"edit\\\",function(t){this.text(T(t,r)).call(m);var a=n.trace._fullInput||{},s={};if(o.hasTransform(a,\\\"groupby\\\")){var l=o.getTransformIndices(a,\\\"groupby\\\"),c=l[l.length-1],f=i.keyedContainer(a,\\\"transforms[\\\"+c+\\\"].styles\\\",\\\"target\\\",\\\"value.name\\\");f.set(n.trace._group,t),s=f.constructUpdate()}else s.name=t;return o.call(\\\"restyle\\\",e,s,u)}):m(g)}function T(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||\\\"\\\").length;n>0;n--)t+=\\\" \\\";return t}function S(t,e){var r,a=1,o=i.ensureSingle(t,\\\"rect\\\",\\\"legendtoggle\\\",function(t){t.style(\\\"cursor\\\",\\\"pointer\\\").attr(\\\"pointer-events\\\",\\\"all\\\").call(u.fill,\\\"rgba(0,0,0,0)\\\")});o.on(\\\"mousedown\\\",function(){(r=(new Date).getTime())-e._legendMouseDownTime<k?a+=1:(a=1,e._legendMouseDownTime=r)}),o.on(\\\"mouseup\\\",function(){if(!e._dragged&&!e._editing){var r=e._fullLayout.legend;(new Date).getTime()-e._legendMouseDownTime>k&&(a=Math.max(a-1,1)),M(e,r,t,a,n.event)}})}function C(t,e,r){var i=t._fullLayout,a=i.legend,o=a.borderwidth,s=_.isGrouped(a),l=0;if(a._width=0,a._height=0,_.isVertical(a))s&&e.each(function(t,e){c.setTranslate(this,0,e*a.tracegroupgap)}),r.each(function(t){var e=t[0],r=e.height,n=e.width;c.setTranslate(this,o,5+o+a._height+r/2),a._height+=r,a._width=Math.max(a._width,n)}),a._width+=45+2*o,a._height+=10+2*o,s&&(a._height+=(a._lgroupsLength-1)*a.tracegroupgap),l=40;else if(s){for(var u=[a._width],f=e.data(),h=0,p=f.length;h<p;h++){var d=f[h].map(function(t){return t[0].width}),g=40+Math.max.apply(null,d);a._width+=a.tracegroupgap+g,u.push(a._width)}e.each(function(t,e){c.setTranslate(this,u[e],0)}),e.each(function(){var t=n.select(this).selectAll(\\\"g.traces\\\"),e=0;t.each(function(t){var r=t[0].height;c.setTranslate(this,0,5+o+e+r/2),e+=r}),a._height=Math.max(a._height,e)}),a._height+=10+2*o,a._width+=2*o}else{var v,m=0,y=0,x=0,b=0,w=0,k=a.tracegroupgap||5;r.each(function(t){x=Math.max(40+t[0].width,x),w+=40+t[0].width+k}),v=i._size.w>o+w-k,r.each(function(t){var e=t[0],r=v?40+t[0].width:x;o+b+k+r>i._size.w&&(b=0,m+=y,a._height=a._height+y,y=0),c.setTranslate(this,o+b,5+o+e.height/2+m),a._width+=k+r,a._height=Math.max(a._height,e.height),b+=k+r,y=Math.max(e.height,y)}),a._width+=2*o,a._height+=10+2*o}a._width=Math.ceil(a._width),a._height=Math.ceil(a._height);var M=t._context.edits.legendText||t._context.edits.legendPosition;r.each(function(t){var e=t[0],r=n.select(this).select(\\\".legendtoggle\\\");c.setRect(r,0,-e.height/2,(M?0:a._width)+l,e.height)})}function E(t){var e=t._fullLayout.legend,r=\\\"left\\\";w.isRightAnchor(e)?r=\\\"right\\\":w.isCenterAnchor(e)&&(r=\\\"center\\\");var n=\\\"top\\\";w.isBottomAnchor(e)?n=\\\"bottom\\\":w.isMiddleAnchor(e)&&(n=\\\"middle\\\"),a.autoMargin(t,\\\"legend\\\",{x:e.x,y:e.y,l:e._width*m[r],r:e._width*y[r],b:e._height*y[n],t:e._height*m[n]})}e.exports=function(t){var e=t._fullLayout,r=\\\"legend\\\"+e._uid;if(e._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var s=e.legend,f=e.showlegend&&x(t.calcdata,s),h=e.hiddenlabels||[];if(!e.showlegend||!f.length)return e._infolayer.selectAll(\\\".legend\\\").remove(),e._topdefs.select(\\\"#\\\"+r).remove(),void a.autoMargin(t,\\\"legend\\\");for(var d=0,g=0;g<f.length;g++)for(var v=0;v<f[g].length;v++){var _=f[g][v][0],k=_.trace,T=o.traceIs(k,\\\"pie\\\")?_.label:k.name;d=Math.max(d,T&&T.length||0)}var L=!1,z=i.ensureSingle(e._infolayer,\\\"g\\\",\\\"legend\\\",function(t){t.attr(\\\"pointer-events\\\",\\\"all\\\"),L=!0}),O=i.ensureSingleById(e._topdefs,\\\"clipPath\\\",r,function(t){t.append(\\\"rect\\\")}),I=i.ensureSingle(z,\\\"rect\\\",\\\"bg\\\",function(t){t.attr(\\\"shape-rendering\\\",\\\"crispEdges\\\")});I.call(u.stroke,s.bordercolor).call(u.fill,s.bgcolor).style(\\\"stroke-width\\\",s.borderwidth+\\\"px\\\");var P=i.ensureSingle(z,\\\"g\\\",\\\"scrollbox\\\"),D=i.ensureSingle(z,\\\"rect\\\",\\\"scrollbar\\\",function(t){t.attr({rx:20,ry:3,width:0,height:0}).call(u.fill,\\\"#808BA4\\\")}),R=P.selectAll(\\\"g.groups\\\").data(f);R.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"groups\\\"),R.exit().remove();var B=R.selectAll(\\\"g.traces\\\").data(i.identity);B.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"traces\\\"),B.exit().remove(),B.call(b,t).style(\\\"opacity\\\",function(t){var e=t[0].trace;return o.traceIs(e,\\\"pie\\\")?-1!==h.indexOf(t[0].label)?.5:1:\\\"legendonly\\\"===e.visible?.5:1}).each(function(){n.select(this).call(A,t,d).call(S,t)}),i.syncOrAsync([a.previousPromises,function(){L&&(C(t,R,B),E(t));var u=e.width,f=e.height;C(t,R,B),s._height>f?function(t){var e=t._fullLayout.legend,r=\\\"left\\\";w.isRightAnchor(e)?r=\\\"right\\\":w.isCenterAnchor(e)&&(r=\\\"center\\\");a.autoMargin(t,\\\"legend\\\",{x:e.x,y:.5,l:e._width*m[r],r:e._width*y[r],b:0,t:0})}(t):E(t);var h=e._size,d=h.l+h.w*s.x,g=h.t+h.h*(1-s.y);w.isRightAnchor(s)?d-=s._width:w.isCenterAnchor(s)&&(d-=s._width/2),w.isBottomAnchor(s)?g-=s._height:w.isMiddleAnchor(s)&&(g-=s._height/2);var v=s._width,x=h.w;v>x?(d=h.l,v=x):(d+v>u&&(d=u-v),d<0&&(d=0),v=Math.min(u-d,s._width));var b,_,k,A,T=s._height,S=h.h;if(T>S?(g=h.t,T=S):(g+T>f&&(g=f-T),g<0&&(g=0),T=Math.min(f-g,s._height)),c.setTranslate(z,d,g),D.on(\\\".drag\\\",null),z.on(\\\"wheel\\\",null),s._height<=T||t._context.staticPlot)I.attr({width:v-s.borderwidth,height:T-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),c.setTranslate(P,0,0),O.select(\\\"rect\\\").attr({width:v-2*s.borderwidth,height:T-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth}),c.setClipUrl(P,r),c.setRect(D,0,0,0,0),delete s._scrollY;else{var F,N,j=Math.max(p.scrollBarMinHeight,T*T/s._height),V=T-j-2*p.scrollBarMargin,U=s._height-T,q=V/U,H=Math.min(s._scrollY||0,U);I.attr({width:v-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:T-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),O.select(\\\"rect\\\").attr({width:v-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:T-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth+H}),c.setClipUrl(P,r),W(H,j,q),z.on(\\\"wheel\\\",function(){W(H=i.constrain(s._scrollY+n.event.deltaY/V*U,0,U),j,q),0!==H&&H!==U&&n.event.preventDefault()});var G=n.behavior.drag().on(\\\"dragstart\\\",function(){F=n.event.sourceEvent.clientY,N=H}).on(\\\"drag\\\",function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||W(H=i.constrain((t.clientY-F)/q+N,0,U),j,q)});D.call(G)}function W(e,r,n){s._scrollY=t._fullLayout.legend._scrollY=e,c.setTranslate(P,0,-e),c.setRect(D,v,p.scrollBarMargin+e*n,p.scrollBarWidth,r),O.select(\\\"rect\\\").attr({y:s.borderwidth+e})}t._context.edits.legendPosition&&(z.classed(\\\"cursor-move\\\",!0),l.init({element:z.node(),gd:t,prepFn:function(){var t=c.getTranslate(z);k=t.x,A=t.y},moveFn:function(t,e){var r=k+t,n=A+e;c.setTranslate(z,r,n),b=l.align(r,0,h.l,h.l+h.w,s.xanchor),_=l.align(n,0,h.t+h.h,h.t,s.yanchor)},doneFn:function(){void 0!==b&&void 0!==_&&o.call(\\\"relayout\\\",t,{\\\"legend.x\\\":b,\\\"legend.y\\\":_})},clickFn:function(r,n){var i=e._infolayer.selectAll(\\\"g.traces\\\").filter(function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom});i.size()>0&&M(t,z,i,r,n)}}))}],t)}}},{\\\"../../constants/alignment\\\":668,\\\"../../constants/interactions\\\":672,\\\"../../lib\\\":696,\\\"../../lib/events\\\":684,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"./anchor_utils\\\":622,\\\"./constants\\\":624,\\\"./get_legend_data\\\":627,\\\"./handle_click\\\":628,\\\"./helpers\\\":629,\\\"./style\\\":631,d3:148}],627:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"./helpers\\\");e.exports=function(t,e){var r,a,o={},s=[],l=!1,c={},u=0;function f(t,r){if(\\\"\\\"!==t&&i.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n=\\\"~~i\\\"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r<t.length;r++){var h=t[r],p=h[0],d=p.trace,g=d.legendgroup;if(d.visible&&d.showlegend)if(n.traceIs(d,\\\"pie\\\"))for(c[g]||(c[g]={}),a=0;a<h.length;a++){var v=h[a].label;c[g][v]||(f(g,{label:v,color:h[a].color,i:h[a].i,trace:d,pts:h[a].pts}),c[g][v]=!0)}else f(g,p)}if(!s.length)return[];var m,y,x=s.length;if(l&&i.isGrouped(e))for(y=new Array(x),r=0;r<x;r++)m=o[s[r]],y[r]=i.isReversed(e)?m.reverse():m;else{for(y=[new Array(x)],r=0;r<x;r++)m=o[s[r]][0],y[0][i.isReversed(e)?x-r-1:r]=m;x=1}return e._lgroupsLength=x,y}},{\\\"../../registry\\\":828,\\\"./helpers\\\":629}],628:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=!0;e.exports=function(t,e,r){if(!e._dragged&&!e._editing){var o,s,l,c,u,f=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],h=t.data()[0][0],p=e._fullData,d=h.trace,g=d.legendgroup,v={},m=[],y=[],x=[];if(1===r&&a&&e.data&&e._context.showTips?(n.notifier(n._(e,\\\"Double-click on legend to isolate one trace\\\"),\\\"long\\\"),a=!1):a=!1,i.traceIs(d,\\\"pie\\\")){var b=h.label,_=f.indexOf(b);1===r?-1===_?f.push(b):f.splice(_,1):2===r&&(f=[],e.calcdata[0].forEach(function(t){b!==t.label&&f.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===f.length&&-1===_&&(f=[])),i.call(\\\"relayout\\\",e,\\\"hiddenlabels\\\",f)}else{var w,k=g&&g.length,M=[];if(k)for(o=0;o<p.length;o++)(w=p[o]).visible&&w.legendgroup===g&&M.push(o);if(1===r){var A;switch(d.visible){case!0:A=\\\"legendonly\\\";break;case!1:A=!1;break;case\\\"legendonly\\\":A=!0}if(k)for(o=0;o<p.length;o++)!1!==p[o].visible&&p[o].legendgroup===g&&O(p[o],A);else O(d,A)}else if(2===r){var T,S,C=!0;for(o=0;o<p.length;o++)if(!(p[o]===d)&&!(T=k&&p[o].legendgroup===g)&&!0===p[o].visible&&!i.traceIs(p[o],\\\"notLegendIsolatable\\\")){C=!1;break}for(o=0;o<p.length;o++)if(!1!==p[o].visible&&!i.traceIs(p[o],\\\"notLegendIsolatable\\\"))switch(d.visible){case\\\"legendonly\\\":O(p[o],!0);break;case!0:S=!!C||\\\"legendonly\\\",T=p[o]===d||k&&p[o].legendgroup===g,O(p[o],!!T||S)}}for(o=0;o<y.length;o++)if(l=y[o]){var E=l.constructUpdate(),L=Object.keys(E);for(s=0;s<L.length;s++)c=L[s],(v[c]=v[c]||[])[x[o]]=E[c]}for(u=Object.keys(v),o=0;o<u.length;o++)for(c=u[o],s=0;s<m.length;s++)v[c].hasOwnProperty(s)||(v[c][s]=void 0);i.call(\\\"restyle\\\",e,v,m)}}function z(t,e,r){var n=m.indexOf(t),i=v[e];return i||(i=v[e]=[]),-1===m.indexOf(t)&&(m.push(t),n=m.length-1),i[n]=r,n}function O(t,e){var r=t._fullInput;if(i.hasTransform(r,\\\"groupby\\\")){var a=y[r.index];if(!a){var o=i.getTransformIndices(r,\\\"groupby\\\"),s=o[o.length-1];a=n.keyedContainer(r,\\\"transforms[\\\"+s+\\\"].styles\\\",\\\"target\\\",\\\"value.visible\\\"),y[r.index]=a}var l=a.get(t._group);void 0===l&&(l=!0),!1!==l&&a.set(t._group,e),x[r.index]=z(r.index,\\\"visible\\\",!1!==r.visible)}else{var c=!1!==r.visible&&e;z(r.index,\\\"visible\\\",c)}}}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828}],629:[function(t,e,r){\\\"use strict\\\";r.isGrouped=function(t){return-1!==(t.traceorder||\\\"\\\").indexOf(\\\"grouped\\\")},r.isVertical=function(t){return\\\"h\\\"!==t.orientation},r.isReversed=function(t){return-1!==(t.traceorder||\\\"\\\").indexOf(\\\"reversed\\\")}},{}],630:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"component\\\",name:\\\"legend\\\",layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),draw:t(\\\"./draw\\\"),style:t(\\\"./style\\\")}},{\\\"./attributes\\\":623,\\\"./defaults\\\":625,\\\"./draw\\\":626,\\\"./style\\\":631}],631:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../drawing\\\"),s=t(\\\"../color\\\"),l=t(\\\"../../traces/scatter/subtypes\\\"),c=t(\\\"../../traces/pie/style_one\\\");e.exports=function(t,e){t.each(function(t){var e=n.select(this),r=a.ensureSingle(e,\\\"g\\\",\\\"layers\\\");r.style(\\\"opacity\\\",t[0].trace.opacity),r.selectAll(\\\"g.legendfill\\\").data([t]).enter().append(\\\"g\\\").classed(\\\"legendfill\\\",!0),r.selectAll(\\\"g.legendlines\\\").data([t]).enter().append(\\\"g\\\").classed(\\\"legendlines\\\",!0);var i=r.selectAll(\\\"g.legendsymbols\\\").data([t]);i.enter().append(\\\"g\\\").classed(\\\"legendsymbols\\\",!0),i.selectAll(\\\"g.legendpoints\\\").data([t]).enter().append(\\\"g\\\").classed(\\\"legendpoints\\\",!0)}).each(function(t){var e=t[0].trace,r=e.marker||{},a=r.line||{},o=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendbar\\\").data(i.traceIs(e,\\\"bar\\\")?[t]:[]);o.enter().append(\\\"path\\\").classed(\\\"legendbar\\\",!0).attr(\\\"d\\\",\\\"M6,6H-6V-6H6Z\\\").attr(\\\"transform\\\",\\\"translate(20,0)\\\"),o.exit().remove(),o.each(function(t){var e=n.select(this),i=t[0],o=(i.mlw+1||a.width+1)-1;e.style(\\\"stroke-width\\\",o+\\\"px\\\").call(s.fill,i.mc||r.color),o&&e.call(s.stroke,i.mlc||a.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendbox\\\").data(i.traceIs(e,\\\"box-violin\\\")&&e.visible?[t]:[]);r.enter().append(\\\"path\\\").classed(\\\"legendbox\\\",!0).attr(\\\"d\\\",\\\"M6,6H-6V-6H6Z\\\").attr(\\\"transform\\\",\\\"translate(20,0)\\\"),r.exit().remove(),r.each(function(){var t=e.line.width,r=n.select(this);r.style(\\\"stroke-width\\\",t+\\\"px\\\").call(s.fill,e.fillcolor),t&&s.stroke(r,e.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendpie\\\").data(i.traceIs(e,\\\"pie\\\")&&e.visible?[t]:[]);r.enter().append(\\\"path\\\").classed(\\\"legendpie\\\",!0).attr(\\\"d\\\",\\\"M6,6H-6V-6H6Z\\\").attr(\\\"transform\\\",\\\"translate(20,0)\\\"),r.exit().remove(),r.size()&&r.call(c,t[0],e)}).each(function(t){var r=t[0].trace,i=r.visible&&r.fill&&\\\"none\\\"!==r.fill,a=l.hasLines(r),s=r.contours,c=!1,u=!1;if(s){var f=s.coloring;\\\"lines\\\"===f?c=!0:a=\\\"none\\\"===f||\\\"heatmap\\\"===f||s.showlines,\\\"constraint\\\"===s.type?i=\\\"=\\\"!==s._operation:\\\"fill\\\"!==f&&\\\"heatmap\\\"!==f||(u=!0)}var h=l.hasMarkers(r)||l.hasText(r),p=i||u,d=a||c,g=h||!p?\\\"M5,0\\\":d?\\\"M5,-2\\\":\\\"M5,-3\\\",v=n.select(this),m=v.select(\\\".legendfill\\\").selectAll(\\\"path\\\").data(i||u?[t]:[]);m.enter().append(\\\"path\\\").classed(\\\"js-fill\\\",!0),m.exit().remove(),m.attr(\\\"d\\\",g+\\\"h30v6h-30z\\\").call(i?o.fillGroupStyle:function(t){if(t.size()){var n=\\\"legendfill-\\\"+r.uid;o.gradient(t,e,n,\\\"horizontalreversed\\\",r.colorscale,\\\"fill\\\")}});var y=v.select(\\\".legendlines\\\").selectAll(\\\"path\\\").data(a||c?[t]:[]);y.enter().append(\\\"path\\\").classed(\\\"js-line\\\",!0),y.exit().remove(),y.attr(\\\"d\\\",g+(c?\\\"l30,0.0001\\\":\\\"h30\\\")).call(a?o.lineGroupStyle:function(t){if(t.size()){var n=\\\"legendline-\\\"+r.uid;o.lineGroupStyle(t),o.gradient(t,e,n,\\\"horizontalreversed\\\",r.colorscale,\\\"stroke\\\")}})}).each(function(t){var r,i,s=t[0],c=s.trace,u=l.hasMarkers(c),f=l.hasText(c),h=l.hasLines(c);function p(t,e,r){var n=a.nestedProperty(c,t).get(),i=a.isArrayOrTypedArray(n)&&e?e(n):n;if(r){if(i<r[0])return r[0];if(i>r[1])return r[1]}return i}function d(t){return t[0]}if(u||f||h){var g={},v={};if(u){g.mc=p(\\\"marker.color\\\",d),g.mx=p(\\\"marker.symbol\\\",d),g.mo=p(\\\"marker.opacity\\\",a.mean,[.2,1]),g.mlc=p(\\\"marker.line.color\\\",d),g.mlw=p(\\\"marker.line.width\\\",a.mean,[0,5]),v.marker={sizeref:1,sizemin:1,sizemode:\\\"diameter\\\"};var m=p(\\\"marker.size\\\",a.mean,[2,16]);g.ms=m,v.marker.size=m}h&&(v.line={width:p(\\\"line.width\\\",d,[0,10])}),f&&(g.tx=\\\"Aa\\\",g.tp=p(\\\"textposition\\\",d),g.ts=10,g.tc=p(\\\"textfont.color\\\",d),g.tf=p(\\\"textfont.family\\\",d)),r=[a.minExtend(s,g)],(i=a.minExtend(c,v)).selectedpoints=null}var y=n.select(this).select(\\\"g.legendpoints\\\"),x=y.selectAll(\\\"path.scatterpts\\\").data(u?r:[]);x.enter().insert(\\\"path\\\",\\\":first-child\\\").classed(\\\"scatterpts\\\",!0).attr(\\\"transform\\\",\\\"translate(20,0)\\\"),x.exit().remove(),x.call(o.pointStyle,i,e),u&&(r[0].mrc=3);var b=y.selectAll(\\\"g.pointtext\\\").data(f?r:[]);b.enter().append(\\\"g\\\").classed(\\\"pointtext\\\",!0).append(\\\"text\\\").attr(\\\"transform\\\",\\\"translate(20,0)\\\"),b.exit().remove(),b.selectAll(\\\"text\\\").call(o.textPointStyle,i,e)}).each(function(t){var e=t[0].trace,r=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendcandle\\\").data(\\\"candlestick\\\"===e.type&&e.visible?[t,t]:[]);r.enter().append(\\\"path\\\").classed(\\\"legendcandle\\\",!0).attr(\\\"d\\\",function(t,e){return e?\\\"M-15,0H-8M-8,6V-6H8Z\\\":\\\"M15,0H8M8,-6V6H-8Z\\\"}).attr(\\\"transform\\\",\\\"translate(20,0)\\\").style(\\\"stroke-miterlimit\\\",1),r.exit().remove(),r.each(function(t,r){var i=e[r?\\\"increasing\\\":\\\"decreasing\\\"],a=i.line.width,o=n.select(this);o.style(\\\"stroke-width\\\",a+\\\"px\\\").call(s.fill,i.fillcolor),a&&s.stroke(o,i.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendohlc\\\").data(\\\"ohlc\\\"===e.type&&e.visible?[t,t]:[]);r.enter().append(\\\"path\\\").classed(\\\"legendohlc\\\",!0).attr(\\\"d\\\",function(t,e){return e?\\\"M-15,0H0M-8,-6V0\\\":\\\"M15,0H0M8,6V0\\\"}).attr(\\\"transform\\\",\\\"translate(20,0)\\\").style(\\\"stroke-miterlimit\\\",1),r.exit().remove(),r.each(function(t,r){var i=e[r?\\\"increasing\\\":\\\"decreasing\\\"],a=i.line.width,l=n.select(this);l.style(\\\"fill\\\",\\\"none\\\").call(o.dashLine,i.line.dash,a),a&&s.stroke(l,i.line.color)})})}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../../traces/pie/style_one\\\":1030,\\\"../../traces/scatter/subtypes\\\":1068,\\\"../color\\\":570,\\\"../drawing\\\":595,d3:148}],632:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../plots/plots\\\"),a=t(\\\"../../plots/cartesian/axis_ids\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../../build/ploticon\\\"),l=o._,c=e.exports={};function u(t,e){var r,i,o=e.currentTarget,s=o.getAttribute(\\\"data-attr\\\"),l=o.getAttribute(\\\"data-val\\\")||!0,c=t._fullLayout,u={},f=a.list(t,null,!0),h=\\\"on\\\";if(\\\"zoom\\\"===s){var p,d=\\\"in\\\"===l?.5:2,g=(1+d)/2,v=(1-d)/2;for(i=0;i<f.length;i++)if(!(r=f[i]).fixedrange)if(p=r._name,\\\"auto\\\"===l)u[p+\\\".autorange\\\"]=!0;else if(\\\"reset\\\"===l){if(void 0===r._rangeInitial)u[p+\\\".autorange\\\"]=!0;else{var m=r._rangeInitial.slice();u[p+\\\".range[0]\\\"]=m[0],u[p+\\\".range[1]\\\"]=m[1]}void 0!==r._showSpikeInitial&&(u[p+\\\".showspikes\\\"]=r._showSpikeInitial,\\\"on\\\"!==h||r._showSpikeInitial||(h=\\\"off\\\"))}else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],x=[g*y[0]+v*y[1],g*y[1]+v*y[0]];u[p+\\\".range[0]\\\"]=r.l2r(x[0]),u[p+\\\".range[1]\\\"]=r.l2r(x[1])}c._cartesianSpikesEnabled=h}else{if(\\\"hovermode\\\"!==s||\\\"x\\\"!==l&&\\\"y\\\"!==l){if(\\\"hovermode\\\"===s&&\\\"closest\\\"===l){for(i=0;i<f.length;i++)r=f[i],\\\"on\\\"!==h||r.showspikes||(h=\\\"off\\\");c._cartesianSpikesEnabled=h}}else l=c._isHoriz?\\\"y\\\":\\\"x\\\",o.setAttribute(\\\"data-val\\\",l);u[s]=l}n.call(\\\"relayout\\\",t,u)}function f(t,e){for(var r=e.currentTarget,i=r.getAttribute(\\\"data-attr\\\"),a=r.getAttribute(\\\"data-val\\\")||!0,o=t._fullLayout._subplots.gl3d,s={},l=i.split(\\\".\\\"),c=0;c<o.length;c++)s[o[c]+\\\".\\\"+l[1]]=a;var u=\\\"pan\\\"===a?a:\\\"zoom\\\";s.dragmode=u,n.call(\\\"relayout\\\",t,s)}function h(t,e){for(var r=e.currentTarget.getAttribute(\\\"data-attr\\\"),i=t._fullLayout,a=i._subplots.gl3d,s={},l=0;l<a.length;l++){var c=a[l],u=c+\\\".camera\\\",f=i[c]._scene;\\\"resetDefault\\\"===r?s[u]=null:\\\"resetLastSave\\\"===r&&(s[u]=o.extendDeep({},f.cameraInitial))}n.call(\\\"relayout\\\",t,s)}function p(t,e){var r=e.currentTarget,i=r._previousVal||!1,a=t.layout,s=t._fullLayout,l=s._subplots.gl3d,c=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"],u=[\\\"showspikes\\\",\\\"spikesides\\\",\\\"spikethickness\\\",\\\"spikecolor\\\"],f={},h={},p={};if(i)p=o.extendDeep(a,i),r._previousVal=null;else{p={\\\"allaxes.showspikes\\\":!1};for(var d=0;d<l.length;d++){var g=l[d],v=s[g],m=f[g]={};m.hovermode=v.hovermode,p[g+\\\".hovermode\\\"]=!1;for(var y=0;y<3;y++){var x=c[y];h=m[x]={};for(var b=0;b<u.length;b++){var _=u[b];h[_]=v[x][_]}}}r._previousVal=o.extendDeep({},f)}n.call(\\\"relayout\\\",t,p)}function d(t,e){for(var r=e.currentTarget,i=r.getAttribute(\\\"data-attr\\\"),a=r.getAttribute(\\\"data-val\\\")||!0,o=t._fullLayout,s=o._subplots.geo,l=0;l<s.length;l++){var c=s[l],u=o[c];if(\\\"zoom\\\"===i){var f=u.projection.scale,h=\\\"in\\\"===a?2*f:.5*f;n.call(\\\"relayout\\\",t,c+\\\".projection.scale\\\",h)}else\\\"reset\\\"===i&&v(t,\\\"geo\\\")}}function g(t){var e,r=t._fullLayout;e=r._has(\\\"cartesian\\\")?r._isHoriz?\\\"y\\\":\\\"x\\\":\\\"closest\\\";var i=!t._fullLayout.hovermode&&e;n.call(\\\"relayout\\\",t,\\\"hovermode\\\",i)}function v(t,e){for(var r=t._fullLayout,i=r._subplots[e],a={},o=0;o<i.length;o++)for(var s=i[o],l=r[s]._subplot.viewInitial,c=Object.keys(l),u=0;u<c.length;u++){var f=c[u];a[s+\\\".\\\"+f]=l[f]}n.call(\\\"relayout\\\",t,a)}c.toImage={name:\\\"toImage\\\",title:function(t){var e=(t._context.toImageButtonOptions||{}).format||\\\"png\\\";return l(t,\\\"png\\\"===e?\\\"Download plot as a png\\\":\\\"Download plot\\\")},icon:s.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||\\\"png\\\"};o.notifier(l(t,\\\"Taking snapshot - this may take a few seconds\\\"),\\\"long\\\"),\\\"svg\\\"!==r.format&&o.isIE()&&(o.notifier(l(t,\\\"IE only supports svg.  Changing format to svg.\\\"),\\\"long\\\"),r.format=\\\"svg\\\"),[\\\"filename\\\",\\\"width\\\",\\\"height\\\",\\\"scale\\\"].forEach(function(t){e[t]&&(r[t]=e[t])}),n.call(\\\"downloadImage\\\",t,r).then(function(e){o.notifier(l(t,\\\"Snapshot succeeded\\\")+\\\" - \\\"+e,\\\"long\\\")}).catch(function(){o.notifier(l(t,\\\"Sorry, there was a problem downloading your snapshot!\\\"),\\\"long\\\")})}},c.sendDataToCloud={name:\\\"sendDataToCloud\\\",title:function(t){return l(t,\\\"Edit in Chart Studio\\\")},icon:s.disk,click:function(t){i.sendDataToCloud(t)}},c.zoom2d={name:\\\"zoom2d\\\",title:function(t){return l(t,\\\"Zoom\\\")},attr:\\\"dragmode\\\",val:\\\"zoom\\\",icon:s.zoombox,click:u},c.pan2d={name:\\\"pan2d\\\",title:function(t){return l(t,\\\"Pan\\\")},attr:\\\"dragmode\\\",val:\\\"pan\\\",icon:s.pan,click:u},c.select2d={name:\\\"select2d\\\",title:function(t){return l(t,\\\"Box Select\\\")},attr:\\\"dragmode\\\",val:\\\"select\\\",icon:s.selectbox,click:u},c.lasso2d={name:\\\"lasso2d\\\",title:function(t){return l(t,\\\"Lasso Select\\\")},attr:\\\"dragmode\\\",val:\\\"lasso\\\",icon:s.lasso,click:u},c.zoomIn2d={name:\\\"zoomIn2d\\\",title:function(t){return l(t,\\\"Zoom in\\\")},attr:\\\"zoom\\\",val:\\\"in\\\",icon:s.zoom_plus,click:u},c.zoomOut2d={name:\\\"zoomOut2d\\\",title:function(t){return l(t,\\\"Zoom out\\\")},attr:\\\"zoom\\\",val:\\\"out\\\",icon:s.zoom_minus,click:u},c.autoScale2d={name:\\\"autoScale2d\\\",title:function(t){return l(t,\\\"Autoscale\\\")},attr:\\\"zoom\\\",val:\\\"auto\\\",icon:s.autoscale,click:u},c.resetScale2d={name:\\\"resetScale2d\\\",title:function(t){return l(t,\\\"Reset axes\\\")},attr:\\\"zoom\\\",val:\\\"reset\\\",icon:s.home,click:u},c.hoverClosestCartesian={name:\\\"hoverClosestCartesian\\\",title:function(t){return l(t,\\\"Show closest data on hover\\\")},attr:\\\"hovermode\\\",val:\\\"closest\\\",icon:s.tooltip_basic,gravity:\\\"ne\\\",click:u},c.hoverCompareCartesian={name:\\\"hoverCompareCartesian\\\",title:function(t){return l(t,\\\"Compare data on hover\\\")},attr:\\\"hovermode\\\",val:function(t){return t._fullLayout._isHoriz?\\\"y\\\":\\\"x\\\"},icon:s.tooltip_compare,gravity:\\\"ne\\\",click:u},c.zoom3d={name:\\\"zoom3d\\\",title:function(t){return l(t,\\\"Zoom\\\")},attr:\\\"scene.dragmode\\\",val:\\\"zoom\\\",icon:s.zoombox,click:f},c.pan3d={name:\\\"pan3d\\\",title:function(t){return l(t,\\\"Pan\\\")},attr:\\\"scene.dragmode\\\",val:\\\"pan\\\",icon:s.pan,click:f},c.orbitRotation={name:\\\"orbitRotation\\\",title:function(t){return l(t,\\\"Orbital rotation\\\")},attr:\\\"scene.dragmode\\\",val:\\\"orbit\\\",icon:s[\\\"3d_rotate\\\"],click:f},c.tableRotation={name:\\\"tableRotation\\\",title:function(t){return l(t,\\\"Turntable rotation\\\")},attr:\\\"scene.dragmode\\\",val:\\\"turntable\\\",icon:s[\\\"z-axis\\\"],click:f},c.resetCameraDefault3d={name:\\\"resetCameraDefault3d\\\",title:function(t){return l(t,\\\"Reset camera to default\\\")},attr:\\\"resetDefault\\\",icon:s.home,click:h},c.resetCameraLastSave3d={name:\\\"resetCameraLastSave3d\\\",title:function(t){return l(t,\\\"Reset camera to last save\\\")},attr:\\\"resetLastSave\\\",icon:s.movie,click:h},c.hoverClosest3d={name:\\\"hoverClosest3d\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:null,toggle:!0,icon:s.tooltip_basic,gravity:\\\"ne\\\",click:p},c.zoomInGeo={name:\\\"zoomInGeo\\\",title:function(t){return l(t,\\\"Zoom in\\\")},attr:\\\"zoom\\\",val:\\\"in\\\",icon:s.zoom_plus,click:d},c.zoomOutGeo={name:\\\"zoomOutGeo\\\",title:function(t){return l(t,\\\"Zoom out\\\")},attr:\\\"zoom\\\",val:\\\"out\\\",icon:s.zoom_minus,click:d},c.resetGeo={name:\\\"resetGeo\\\",title:function(t){return l(t,\\\"Reset\\\")},attr:\\\"reset\\\",val:null,icon:s.autoscale,click:d},c.hoverClosestGeo={name:\\\"hoverClosestGeo\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:null,toggle:!0,icon:s.tooltip_basic,gravity:\\\"ne\\\",click:g},c.hoverClosestGl2d={name:\\\"hoverClosestGl2d\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:null,toggle:!0,icon:s.tooltip_basic,gravity:\\\"ne\\\",click:g},c.hoverClosestPie={name:\\\"hoverClosestPie\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:\\\"closest\\\",icon:s.tooltip_basic,gravity:\\\"ne\\\",click:g},c.toggleHover={name:\\\"toggleHover\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:null,toggle:!0,icon:s.tooltip_basic,gravity:\\\"ne\\\",click:function(t,e){g(t),p(t,e)}},c.resetViews={name:\\\"resetViews\\\",title:function(t){return l(t,\\\"Reset views\\\")},icon:s.home,click:function(t,e){var r=e.currentTarget;r.setAttribute(\\\"data-attr\\\",\\\"zoom\\\"),r.setAttribute(\\\"data-val\\\",\\\"reset\\\"),u(t,e),r.setAttribute(\\\"data-attr\\\",\\\"resetLastSave\\\"),h(t,e),v(t,\\\"geo\\\"),v(t,\\\"mapbox\\\")}},c.toggleSpikelines={name:\\\"toggleSpikelines\\\",title:function(t){return l(t,\\\"Toggle Spike Lines\\\")},icon:s.spikeline,attr:\\\"_cartesianSpikesEnabled\\\",val:\\\"on\\\",click:function(t){var e=t._fullLayout;e._cartesianSpikesEnabled=\\\"on\\\"===e._cartesianSpikesEnabled?\\\"off\\\":\\\"on\\\";var r=function(t){for(var e,r,n=t._fullLayout,i=a.list(t,null,!0),o={},s=0;s<i.length;s++)e=i[s],r=e._name,o[r+\\\".showspikes\\\"]=\\\"on\\\"===n._cartesianSpikesEnabled||e._showSpikeInitial;return o}(t);n.call(\\\"relayout\\\",t,r)}},c.resetViewMapbox={name:\\\"resetViewMapbox\\\",title:function(t){return l(t,\\\"Reset view\\\")},attr:\\\"reset\\\",icon:s.home,click:function(t){v(t,\\\"mapbox\\\")}}},{\\\"../../../build/ploticon\\\":2,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828}],633:[function(t,e,r){\\\"use strict\\\";r.manage=t(\\\"./manage\\\")},{\\\"./manage\\\":634}],634:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axis_ids\\\"),i=t(\\\"../../traces/scatter/subtypes\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"./modebar\\\"),s=t(\\\"./buttons\\\");e.exports=function(t){var e=t._fullLayout,r=t._context,l=e._modeBar;if(r.displayModeBar){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error([\\\"*modeBarButtonsToRemove* configuration options\\\",\\\"must be an array.\\\"].join(\\\" \\\"));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error([\\\"*modeBarButtonsToAdd* configuration options\\\",\\\"must be an array.\\\"].join(\\\" \\\"));var c,u=r.modeBarButtons;c=Array.isArray(u)&&u.length?function(t){for(var e=0;e<t.length;e++)for(var r=t[e],n=0;n<r.length;n++){var i=r[n];if(\\\"string\\\"==typeof i){if(void 0===s[i])throw new Error([\\\"*modeBarButtons* configuration options\\\",\\\"invalid button name\\\"].join(\\\" \\\"));t[e][n]=s[i]}}return t}(u):function(t,e,r){var o=t._fullLayout,l=t._fullData,c=o._has(\\\"cartesian\\\"),u=o._has(\\\"gl3d\\\"),f=o._has(\\\"geo\\\"),h=o._has(\\\"pie\\\"),p=o._has(\\\"gl2d\\\"),d=o._has(\\\"ternary\\\"),g=o._has(\\\"mapbox\\\"),v=o._has(\\\"polar\\\"),m=function(t){for(var e=n.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}(o),y=[];function x(t){if(t.length){for(var r=[],n=0;n<t.length;n++){var i=t[n];-1===e.indexOf(i)&&r.push(s[i])}y.push(r)}}x([\\\"toImage\\\",\\\"sendDataToCloud\\\"]);var b=[],_=[],w=[],k=[];(c||p||h||d)+f+u+g+v>1?(_=[\\\"toggleHover\\\"],w=[\\\"resetViews\\\"]):f?(b=[\\\"zoomInGeo\\\",\\\"zoomOutGeo\\\"],_=[\\\"hoverClosestGeo\\\"],w=[\\\"resetGeo\\\"]):u?(_=[\\\"hoverClosest3d\\\"],w=[\\\"resetCameraDefault3d\\\",\\\"resetCameraLastSave3d\\\"]):g?(_=[\\\"toggleHover\\\"],w=[\\\"resetViewMapbox\\\"]):_=p?[\\\"hoverClosestGl2d\\\"]:h?[\\\"hoverClosestPie\\\"]:[\\\"toggleHover\\\"];c&&(_=[\\\"toggleSpikelines\\\",\\\"hoverClosestCartesian\\\",\\\"hoverCompareCartesian\\\"]);!c&&!p||m||(b=[\\\"zoomIn2d\\\",\\\"zoomOut2d\\\",\\\"autoScale2d\\\"],\\\"resetViews\\\"!==w[0]&&(w=[\\\"resetScale2d\\\"]));u?k=[\\\"zoom3d\\\",\\\"pan3d\\\",\\\"orbitRotation\\\",\\\"tableRotation\\\"]:(c||p)&&!m||d?k=[\\\"zoom2d\\\",\\\"pan2d\\\"]:g||f?k=[\\\"pan2d\\\"]:v&&(k=[\\\"zoom2d\\\"]);(function(t){for(var e=!1,r=0;r<t.length&&!e;r++){var n=t[r];n._module&&n._module.selectPoints&&(a.traceIs(n,\\\"scatter-like\\\")?(i.hasMarkers(n)||i.hasText(n))&&(e=!0):a.traceIs(n,\\\"box-violin\\\")&&\\\"all\\\"!==n.boxpoints&&\\\"all\\\"!==n.points||(e=!0))}return e})(l)&&k.push(\\\"select2d\\\",\\\"lasso2d\\\");return x(k),x(b.concat(w)),x(_),function(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}(y,r)}(t,r.modeBarButtonsToRemove,r.modeBarButtonsToAdd),l?l.update(t,c):e._modeBar=o(t,c)}else l&&(l.destroy(),delete e._modeBar)}},{\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../registry\\\":828,\\\"../../traces/scatter/subtypes\\\":1068,\\\"./buttons\\\":632,\\\"./modebar\\\":635}],635:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../../build/ploticon\\\"),s=new DOMParser;function l(t){this.container=t.container,this.element=document.createElement(\\\"div\\\"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var c=l.prototype;c.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i=\\\"modebar-\\\"+n._uid;this.element.setAttribute(\\\"id\\\",i),this._uid=i,\\\"hover\\\"===r.displayModeBar?this.element.className=\\\"modebar modebar--hover\\\":this.element.className=\\\"modebar\\\",\\\"v\\\"===n.modebar.orientation&&(this.element.className+=\\\" vertical\\\",e=e.reverse()),a.deleteRelatedStyleRule(i),a.addRelatedStyleRule(i,\\\"#\\\"+i,\\\"background-color: \\\"+n.modebar.bgcolor),a.addRelatedStyleRule(i,\\\"#\\\"+i+\\\" .modebar-btn .icon path\\\",\\\"fill: \\\"+n.modebar.color),a.addRelatedStyleRule(i,\\\"#\\\"+i+\\\" .modebar-btn:hover .icon path\\\",\\\"fill: \\\"+n.modebar.activecolor),a.addRelatedStyleRule(i,\\\"#\\\"+i+\\\" .modebar-btn.active .icon path\\\",\\\"fill: \\\"+n.modebar.activecolor);var o=!this.hasButtons(e),s=this.hasLogo!==r.displaylogo,l=this.locale!==r.locale;this.locale=r.locale,(o||s||l)&&(this.removeAllButtons(),this.updateButtons(e),r.displaylogo&&(\\\"v\\\"===n.modebar.orientation?this.element.prepend(this.getLogo()):this.element.appendChild(this.getLogo()),this.hasLogo=!0)),this.updateActiveButton()},c.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var r=e.createGroup();t.forEach(function(t){var n=t.name;if(!n)throw new Error(\\\"must provide button 'name' in button config\\\");if(-1!==e.buttonsNames.indexOf(n))throw new Error(\\\"button name '\\\"+n+\\\"' is taken\\\");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)}),e.element.appendChild(r)})},c.createGroup=function(){var t=document.createElement(\\\"div\\\");return t.className=\\\"modebar-group\\\",t},c.createButton=function(t){var e=this,r=document.createElement(\\\"a\\\");r.setAttribute(\\\"rel\\\",\\\"tooltip\\\"),r.className=\\\"modebar-btn\\\";var i=t.title;void 0===i?i=t.name:\\\"function\\\"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute(\\\"data-title\\\",i),void 0!==t.attr&&r.setAttribute(\\\"data-attr\\\",t.attr);var a=t.val;if(void 0!==a&&(\\\"function\\\"==typeof a&&(a=a(this.graphInfo)),r.setAttribute(\\\"data-val\\\",a)),\\\"function\\\"!=typeof t.click)throw new Error(\\\"must provide button 'click' function in button config\\\");r.addEventListener(\\\"click\\\",function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)}),r.setAttribute(\\\"data-toggle\\\",t.toggle||!1),t.toggle&&n.select(r).classed(\\\"active\\\",!0);var s=t.icon;return\\\"function\\\"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute(\\\"data-gravity\\\",t.gravity||\\\"n\\\"),r},c.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n=\\\"http://www.w3.org/2000/svg\\\";if(t.path){(e=document.createElementNS(n,\\\"svg\\\")).setAttribute(\\\"viewBox\\\",[0,0,t.width,r].join(\\\" \\\")),e.setAttribute(\\\"class\\\",\\\"icon\\\");var a=document.createElementNS(n,\\\"path\\\");a.setAttribute(\\\"d\\\",t.path),t.transform?a.setAttribute(\\\"transform\\\",t.transform):void 0!==t.ascent&&a.setAttribute(\\\"transform\\\",\\\"matrix(1 0 0 -1 0 \\\"+t.ascent+\\\")\\\"),e.appendChild(a)}t.svg&&(e=s.parseFromString(t.svg,\\\"application/xml\\\").childNodes[0]);return e.setAttribute(\\\"height\\\",\\\"1em\\\"),e.setAttribute(\\\"width\\\",\\\"1em\\\"),e},c.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute(\\\"data-attr\\\"):null;this.buttonElements.forEach(function(t){var i=t.getAttribute(\\\"data-val\\\")||!0,o=t.getAttribute(\\\"data-attr\\\"),s=\\\"true\\\"===t.getAttribute(\\\"data-toggle\\\"),l=n.select(t);if(s)o===r&&l.classed(\\\"active\\\",!l.classed(\\\"active\\\"));else{var c=null===o?o:a.nestedProperty(e,o).get();l.classed(\\\"active\\\",c===i)}})},c.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},c.getLogo=function(){var t=this.createGroup(),e=document.createElement(\\\"a\\\");return e.href=\\\"https://plot.ly/\\\",e.target=\\\"_blank\\\",e.setAttribute(\\\"data-title\\\",a._(this.graphInfo,\\\"Produced with Plotly\\\")),e.className=\\\"modebar-btn plotlyjsicon modebar-btn--logo\\\",e.appendChild(this.createIcon(o.newplotlylogo)),t.appendChild(e),t},c.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},c.destroy=function(){a.removeElement(this.container.querySelector(\\\".modebar\\\")),a.deleteRelatedStyleRule(this._uid)},e.exports=function(t,e){var r=t._fullLayout,i=new l({graphInfo:t,container:r._paperdiv.node(),buttons:e});return r._privateplot&&n.select(i.element).append(\\\"span\\\").classed(\\\"badge-private float--left\\\",!0).text(\\\"PRIVATE\\\"),i}},{\\\"../../../build/ploticon\\\":2,\\\"../../lib\\\":696,d3:148,\\\"fast-isnumeric\\\":214}],636:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../color/attributes\\\"),a=(0,t(\\\"../../plot_api/plot_template\\\").templatedArray)(\\\"button\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},step:{valType:\\\"enumerated\\\",values:[\\\"month\\\",\\\"year\\\",\\\"day\\\",\\\"hour\\\",\\\"minute\\\",\\\"second\\\",\\\"all\\\"],dflt:\\\"month\\\",editType:\\\"plot\\\"},stepmode:{valType:\\\"enumerated\\\",values:[\\\"backward\\\",\\\"todate\\\"],dflt:\\\"backward\\\",editType:\\\"plot\\\"},count:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"plot\\\"},label:{valType:\\\"string\\\",editType:\\\"plot\\\"},editType:\\\"plot\\\"});e.exports={visible:{valType:\\\"boolean\\\",editType:\\\"plot\\\"},buttons:a,x:{valType:\\\"number\\\",min:-2,max:3,editType:\\\"plot\\\"},xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\",editType:\\\"plot\\\"},y:{valType:\\\"number\\\",min:-2,max:3,editType:\\\"plot\\\"},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"bottom\\\",editType:\\\"plot\\\"},font:n({editType:\\\"plot\\\"}),bgcolor:{valType:\\\"color\\\",dflt:i.lightLine,editType:\\\"plot\\\"},activecolor:{valType:\\\"color\\\",editType:\\\"plot\\\"},bordercolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"plot\\\"},borderwidth:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"plot\\\"},editType:\\\"plot\\\"}},{\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/font_attributes\\\":772,\\\"../color/attributes\\\":569}],637:[function(t,e,r){\\\"use strict\\\";e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],638:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../color\\\"),a=t(\\\"../../plot_api/plot_template\\\"),o=t(\\\"../../plots/array_container_defaults\\\"),s=t(\\\"./attributes\\\"),l=t(\\\"./constants\\\");function c(t,e,r,i){var a=i.calendar;function o(r,i){return n.coerce(t,e,s.buttons,r,i)}if(o(\\\"visible\\\")){var l=o(\\\"step\\\");\\\"all\\\"!==l&&(!a||\\\"gregorian\\\"===a||\\\"month\\\"!==l&&\\\"year\\\"!==l?o(\\\"stepmode\\\"):e.stepmode=\\\"backward\\\",o(\\\"count\\\")),o(\\\"label\\\")}}e.exports=function(t,e,r,u,f){var h=t.rangeselector||{},p=a.newContainer(e,\\\"rangeselector\\\");function d(t,e){return n.coerce(h,p,s,t,e)}if(d(\\\"visible\\\",o(h,p,{name:\\\"buttons\\\",handleItemDefaults:c,calendar:f}).length>0)){var g=function(t,e,r){for(var n=r.filter(function(r){return e[r].anchor===t._id}),i=0,a=0;a<n.length;a++){var o=e[n[a]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+l.yPad]}(e,r,u);d(\\\"x\\\",g[0]),d(\\\"y\\\",g[1]),n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\"]),d(\\\"xanchor\\\"),d(\\\"yanchor\\\"),n.coerceFont(d,\\\"font\\\",r.font);var v=d(\\\"bgcolor\\\");d(\\\"activecolor\\\",i.contrast(v,l.lightAmount,l.darkAmount)),d(\\\"bordercolor\\\"),d(\\\"borderwidth\\\")}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/array_container_defaults\\\":741,\\\"../color\\\":570,\\\"./attributes\\\":636,\\\"./constants\\\":637}],639:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../color\\\"),s=t(\\\"../drawing\\\"),l=t(\\\"../../lib\\\"),c=t(\\\"../../lib/svg_text_utils\\\"),u=t(\\\"../../plots/cartesian/axis_ids\\\"),f=t(\\\"../legend/anchor_utils\\\"),h=t(\\\"../../constants/alignment\\\"),p=h.LINE_SPACING,d=h.FROM_TL,g=h.FROM_BR,v=t(\\\"./constants\\\"),m=t(\\\"./get_update_object\\\");function y(t){return t._id}function x(t,e,r){var n=l.ensureSingle(t,\\\"rect\\\",\\\"selector-rect\\\",function(t){t.attr(\\\"shape-rendering\\\",\\\"crispEdges\\\")});n.attr({rx:v.rx,ry:v.ry}),n.call(o.stroke,e.bordercolor).call(o.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style(\\\"stroke-width\\\",e.borderwidth+\\\"px\\\")}function b(t,e,r,n){var i;l.ensureSingle(t,\\\"text\\\",\\\"selector-text\\\",function(t){t.classed(\\\"user-select-none\\\",!0).attr(\\\"text-anchor\\\",\\\"middle\\\")}).call(s.font,e.font).text((i=r,i.label?i.label:\\\"all\\\"===i.step?\\\"all\\\":i.count+i.step.charAt(0))).call(function(t){c.convertToTspans(t,n)})}e.exports=function(t){var e=t._fullLayout._infolayer.selectAll(\\\".rangeselector\\\").data(function(t){for(var e=u.list(t,\\\"x\\\",!0),r=[],n=0;n<e.length;n++){var i=e[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}(t),y);e.enter().append(\\\"g\\\").classed(\\\"rangeselector\\\",!0),e.exit().remove(),e.style({cursor:\\\"pointer\\\",\\\"pointer-events\\\":\\\"all\\\"}),e.each(function(e){var r=n.select(this),o=e,u=o.rangeselector,h=r.selectAll(\\\"g.button\\\").data(l.filterVisible(u.buttons));h.enter().append(\\\"g\\\").classed(\\\"button\\\",!0),h.exit().remove(),h.each(function(e){var r=n.select(this),a=m(o,e);e._isActive=function(t,e,r){if(\\\"all\\\"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(o,e,a),r.call(x,u,e),r.call(b,u,e,t),r.on(\\\"click\\\",function(){t._dragged||i.call(\\\"relayout\\\",t,a)}),r.on(\\\"mouseover\\\",function(){e._isHovered=!0,r.call(x,u,e)}),r.on(\\\"mouseout\\\",function(){e._isHovered=!1,r.call(x,u,e)})}),function(t,e,r,i,o){var l=0,u=0,h=r.borderwidth;e.each(function(){var t=n.select(this),e=t.select(\\\".selector-text\\\"),i=r.font.size*p,a=Math.max(i*c.lineCount(e),16)+3;u=Math.max(u,a)}),e.each(function(){var t=n.select(this),e=t.select(\\\".selector-rect\\\"),i=t.select(\\\".selector-text\\\"),a=i.node()&&s.bBox(i.node()).width,o=r.font.size*p,f=c.lineCount(i),d=Math.max(a+10,v.minButtonWidth);t.attr(\\\"transform\\\",\\\"translate(\\\"+(h+l)+\\\",\\\"+h+\\\")\\\"),e.attr({x:0,y:0,width:d,height:u}),c.positionText(i,d/2,u/2-(f-1)*o/2+3),l+=d+5});var m=t._fullLayout._size,y=m.l+m.w*r.x,x=m.t+m.h*(1-r.y),b=\\\"left\\\";f.isRightAnchor(r)&&(y-=l,b=\\\"right\\\");f.isCenterAnchor(r)&&(y-=l/2,b=\\\"center\\\");var _=\\\"top\\\";f.isBottomAnchor(r)&&(x-=u,_=\\\"bottom\\\");f.isMiddleAnchor(r)&&(x-=u/2,_=\\\"middle\\\");l=Math.ceil(l),u=Math.ceil(u),y=Math.round(y),x=Math.round(x),a.autoMargin(t,i+\\\"-range-selector\\\",{x:r.x,y:r.y,l:l*d[b],r:l*g[b],b:u*g[_],t:u*d[_]}),o.attr(\\\"transform\\\",\\\"translate(\\\"+y+\\\",\\\"+x+\\\")\\\")}(t,h,u,o._name,r)})}},{\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../drawing\\\":595,\\\"../legend/anchor_utils\\\":622,\\\"./constants\\\":637,\\\"./get_update_object\\\":640,d3:148}],640:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\");e.exports=function(t,e){var r=t._name,i={};if(\\\"all\\\"===e.step)i[r+\\\".autorange\\\"]=!0;else{var a=function(t,e){var r,i=t.range,a=new Date(t.r2l(i[1])),o=e.step,s=e.count;switch(e.stepmode){case\\\"backward\\\":r=t.l2r(+n.time[o].utc.offset(a,-s));break;case\\\"todate\\\":var l=n.time[o].utc.offset(a,-s);r=t.l2r(+n.time[o].utc.ceil(l))}var c=i[1];return[r,c]}(t,e);i[r+\\\".range[0]\\\"]=a[0],i[r+\\\".range[1]\\\"]=a[1]}return i}},{d3:148}],641:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"component\\\",name:\\\"rangeselector\\\",schema:{subplots:{xaxis:{rangeselector:t(\\\"./attributes\\\")}}},layoutAttributes:t(\\\"./attributes\\\"),handleDefaults:t(\\\"./defaults\\\"),draw:t(\\\"./draw\\\")}},{\\\"./attributes\\\":636,\\\"./defaults\\\":638,\\\"./draw\\\":639}],642:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../color/attributes\\\");e.exports={bgcolor:{valType:\\\"color\\\",dflt:n.background,editType:\\\"plot\\\"},bordercolor:{valType:\\\"color\\\",dflt:n.defaultLine,editType:\\\"plot\\\"},borderwidth:{valType:\\\"integer\\\",dflt:0,min:0,editType:\\\"plot\\\"},autorange:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\",impliedEdits:{\\\"range[0]\\\":void 0,\\\"range[1]\\\":void 0}},range:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"calc\\\",impliedEdits:{\\\"^autorange\\\":!1}},{valType:\\\"any\\\",editType:\\\"calc\\\",impliedEdits:{\\\"^autorange\\\":!1}}],editType:\\\"calc\\\",impliedEdits:{autorange:!1}},thickness:{valType:\\\"number\\\",dflt:.15,min:0,max:1,editType:\\\"plot\\\"},visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},editType:\\\"calc\\\"}},{\\\"../color/attributes\\\":569}],643:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axis_ids\\\").list,i=t(\\\"../../plots/cartesian/autorange\\\").getAutoRange,a=t(\\\"./constants\\\");e.exports=function(t){for(var e=n(t,\\\"x\\\",!0),r=0;r<e.length;r++){var o=e[r],s=o[a.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=i(t,o))}}},{\\\"../../plots/cartesian/autorange\\\":744,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"./constants\\\":644}],644:[function(t,e,r){\\\"use strict\\\";e.exports={name:\\\"rangeslider\\\",containerClassName:\\\"rangeslider-container\\\",bgClassName:\\\"rangeslider-bg\\\",rangePlotClassName:\\\"rangeslider-rangeplot\\\",maskMinClassName:\\\"rangeslider-mask-min\\\",maskMaxClassName:\\\"rangeslider-mask-max\\\",slideBoxClassName:\\\"rangeslider-slidebox\\\",grabberMinClassName:\\\"rangeslider-grabber-min\\\",grabAreaMinClassName:\\\"rangeslider-grabarea-min\\\",handleMinClassName:\\\"rangeslider-handle-min\\\",grabberMaxClassName:\\\"rangeslider-grabber-max\\\",grabAreaMaxClassName:\\\"rangeslider-grabarea-max\\\",handleMaxClassName:\\\"rangeslider-handle-max\\\",maskMinOppAxisClassName:\\\"rangeslider-mask-min-opp-axis\\\",maskMaxOppAxisClassName:\\\"rangeslider-mask-max-opp-axis\\\",maskColor:\\\"rgba(0,0,0,0.4)\\\",maskOppAxisColor:\\\"rgba(0,0,0,0.2)\\\",slideBoxFill:\\\"transparent\\\",slideBoxCursor:\\\"ew-resize\\\",grabAreaFill:\\\"transparent\\\",grabAreaCursor:\\\"col-resize\\\",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],645:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plot_api/plot_template\\\"),a=t(\\\"../../plots/cartesian/axis_ids\\\"),o=t(\\\"./attributes\\\"),s=t(\\\"./oppaxis_attributes\\\");e.exports=function(t,e,r){var l=t[r],c=e[r];if(l.rangeslider||e._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,f,h=l.rangeslider,p=i.newContainer(c,\\\"rangeslider\\\");if(_(\\\"visible\\\")){_(\\\"bgcolor\\\",e.plot_bgcolor),_(\\\"bordercolor\\\"),_(\\\"borderwidth\\\"),_(\\\"thickness\\\"),_(\\\"autorange\\\",!c.isValidRange(h.range)),_(\\\"range\\\");var d=e._subplots;if(d)for(var g=d.cartesian.filter(function(t){return t.substr(0,t.indexOf(\\\"y\\\"))===a.name2id(r)}).map(function(t){return t.substr(t.indexOf(\\\"y\\\"),t.length)}),v=n.simpleMap(g,a.id2name),m=0;m<v.length;m++){var y=v[m];u=h[y]||{},f=i.newContainer(p,y,\\\"yaxis\\\");var x,b=e[y];u.range&&b.isValidRange(u.range)&&(x=\\\"fixed\\\"),\\\"match\\\"!==w(\\\"rangemode\\\",x)&&w(\\\"range\\\",b.range.slice())}p._input=h}}function _(t,e){return n.coerce(h,p,o,t,e)}function w(t,e){return n.coerce(u,f,s,t,e)}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"./attributes\\\":642,\\\"./oppaxis_attributes\\\":648}],646:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../drawing\\\"),l=t(\\\"../color\\\"),c=t(\\\"../titles\\\"),u=t(\\\"../../plots/cartesian\\\"),f=t(\\\"../../plots/cartesian/axes\\\"),h=t(\\\"../dragelement\\\"),p=t(\\\"../../lib/setcursor\\\"),d=t(\\\"./constants\\\");function g(t,e,r,n){var i=o.ensureSingle(t,\\\"rect\\\",d.bgClassName,function(t){t.attr({x:0,y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}),a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,l=-n._offsetShift,c=s.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:\\\"translate(\\\"+l+\\\",\\\"+l+\\\")\\\",fill:n.bgcolor,stroke:n.bordercolor,\\\"stroke-width\\\":c})}function v(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,\\\"clipPath\\\",n._clipId,function(t){t.append(\\\"rect\\\").attr({x:0,y:0})}).select(\\\"rect\\\").attr({width:n._width,height:n._height})}function m(t,e,r,i){var l,c=f.getSubplots(e,r),h=e.calcdata,p=t.selectAll(\\\"g.\\\"+d.rangePlotClassName).data(c,o.identity);p.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return d.rangePlotClassName+\\\" \\\"+t}).call(s.setClipUrl,i._clipId),p.order(),p.exit().remove(),p.each(function(t,o){var s=n.select(this),c=0===o,p=f.getFromId(e,t,\\\"y\\\"),d=p._name,g=i[d],v={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};v.layout[d]={type:p.type,domain:[0,1],range:\\\"match\\\"!==g.rangemode?g.range.slice():p.range.slice(),calendar:p.calendar},a.supplyDefaults(v);var m={id:t,plotgroup:s,xaxis:v._fullLayout.xaxis,yaxis:v._fullLayout[d],isRangePlot:!0};c?l=m:(m.mainplot=\\\"xy\\\",m.mainplotinfo=l),u.rangePlot(e,m,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(h,t))})}function y(t,e,r,n,i){(o.ensureSingle(t,\\\"rect\\\",d.maskMinClassName,function(t){t.attr({x:0,y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr(\\\"height\\\",n._height).call(l.fill,d.maskColor),o.ensureSingle(t,\\\"rect\\\",d.maskMaxClassName,function(t){t.attr({y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr(\\\"height\\\",n._height).call(l.fill,d.maskColor),\\\"match\\\"!==i.rangemode)&&(o.ensureSingle(t,\\\"rect\\\",d.maskMinOppAxisClassName,function(t){t.attr({y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr(\\\"width\\\",n._width).call(l.fill,d.maskOppAxisColor),o.ensureSingle(t,\\\"rect\\\",d.maskMaxOppAxisClassName,function(t){t.attr({y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr(\\\"width\\\",n._width).style(\\\"border-top\\\",d.maskOppBorder).call(l.fill,d.maskOppAxisColor))}function x(t,e,r,n){e._context.staticPlot||o.ensureSingle(t,\\\"rect\\\",d.slideBoxClassName,function(t){t.attr({y:0,cursor:d.slideBoxCursor,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr({height:n._height,fill:d.slideBoxFill})}function b(t,e,r,n){var i=o.ensureSingle(t,\\\"g\\\",d.grabberMinClassName),a=o.ensureSingle(t,\\\"g\\\",d.grabberMaxClassName),s={x:0,width:d.handleWidth,rx:d.handleRadius,fill:l.background,stroke:l.defaultLine,\\\"stroke-width\\\":d.handleStrokeWidth,\\\"shape-rendering\\\":\\\"crispEdges\\\"},c={y:Math.round(n._height/4),height:Math.round(n._height/2)};if(o.ensureSingle(i,\\\"rect\\\",d.handleMinClassName,function(t){t.attr(s)}).attr(c),o.ensureSingle(a,\\\"rect\\\",d.handleMaxClassName,function(t){t.attr(s)}).attr(c),!e._context.staticPlot){var u={width:d.grabAreaWidth,x:0,y:0,fill:d.grabAreaFill,cursor:d.grabAreaCursor};o.ensureSingle(i,\\\"rect\\\",d.grabAreaMinClassName,function(t){t.attr(u)}).attr(\\\"height\\\",n._height),o.ensureSingle(a,\\\"rect\\\",d.grabAreaMaxClassName,function(t){t.attr(u)}).attr(\\\"height\\\",n._height)}}e.exports=function(t){var e=t._fullLayout,r=function(t){var e=f.list({_fullLayout:t},\\\"x\\\",!0),r=d.name,n=[];if(t._has(\\\"gl2d\\\"))return n;for(var i=0;i<e.length;i++){var a=e[i];a[r]&&a[r].visible&&n.push(a)}return n}(e);var s=e._infolayer.selectAll(\\\"g.\\\"+d.containerClassName).data(r,function(t){return t._name});s.enter().append(\\\"g\\\").classed(d.containerClassName,!0).attr(\\\"pointer-events\\\",\\\"all\\\"),s.exit().each(function(t){var r=t[d.name];e._topdefs.select(\\\"#\\\"+r._clipId).remove()}).remove(),0!==r.length&&s.each(function(r){var s=n.select(this),l=r[d.name],u=e[f.id2name(r.anchor)],_=l[f.id2name(r.anchor)];if(l.range){var w=l.range,k=r.range;w[0]=r.l2r(Math.min(r.r2l(w[0]),r.r2l(k[0]))),w[1]=r.l2r(Math.max(r.r2l(w[1]),r.r2l(k[1]))),l._input.range=w.slice()}r.cleanRange(\\\"rangeslider.range\\\");for(var M=e.margin,A=e._size,T=r.domain,S=(r._boundingBox||{}).height||0,C=1/0,E=f.getSubplots(t,r),L=0;L<E.length;L++){var z=f.getFromId(t,E[L].substr(E[L].indexOf(\\\"y\\\")));C=Math.min(C,z.domain[0])}l._id=d.name+r._id,l._clipId=l._id+\\\"-\\\"+e._uid,l._width=A.w*(T[1]-T[0]),l._height=(e.height-M.b-M.t)*l.thickness,l._offsetShift=Math.floor(l.borderwidth/2);var O=Math.round(M.l+A.w*T[0]),I=Math.round(A.t+A.h*(1-C)+S+l._offsetShift+d.extraPad);s.attr(\\\"transform\\\",\\\"translate(\\\"+O+\\\",\\\"+I+\\\")\\\");var P=r.r2l(l.range[0]),D=r.r2l(l.range[1]),R=D-P;if(l.p2d=function(t){return t/l._width*R+P},l.d2p=function(t){return(t-P)/R*l._width},l._rl=[P,D],\\\"match\\\"!==_.rangemode){var B=u.r2l(_.range[0]),F=u.r2l(_.range[1])-B;l.d2pOppAxis=function(t){return(t-B)/F*l._height}}s.call(g,t,r,l).call(v,t,r,l).call(m,t,r,l).call(y,t,r,l,_).call(x,t,r,l).call(b,t,r,l),function(t,e,r,a){var s=t.select(\\\"rect.\\\"+d.slideBoxClassName).node(),l=t.select(\\\"rect.\\\"+d.grabAreaMinClassName).node(),c=t.select(\\\"rect.\\\"+d.grabAreaMaxClassName).node();t.on(\\\"mousedown\\\",function(){var u=n.event,f=u.target,d=u.clientX,g=d-t.node().getBoundingClientRect().left,v=a.d2p(r._rl[0]),m=a.d2p(r._rl[1]),y=h.coverSlip();function x(t){var u,h,x,b=+t.clientX-d;switch(f){case s:x=\\\"ew-resize\\\",u=v+b,h=m+b;break;case l:x=\\\"col-resize\\\",u=v+b,h=m;break;case c:x=\\\"col-resize\\\",u=v,h=m+b;break;default:x=\\\"ew-resize\\\",u=g,h=g+b}if(h<u){var _=h;h=u,u=_}a._pixelMin=u,a._pixelMax=h,p(n.select(y),x),function(t,e,r,n){function a(t){return r.l2r(o.constrain(t,n._rl[0],n._rl[1]))}var s=a(n.p2d(n._pixelMin)),l=a(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){i.call(\\\"relayout\\\",e,r._name+\\\".range\\\",[s,l])})}(0,e,r,a)}y.addEventListener(\\\"mousemove\\\",x),y.addEventListener(\\\"mouseup\\\",function t(){y.removeEventListener(\\\"mousemove\\\",x);y.removeEventListener(\\\"mouseup\\\",t);o.removeElement(y)})})}(s,t,r,l),function(t,e,r,n,i,a){var s=d.handleWidth/2;function l(t){return o.constrain(t,0,n._width)}function c(t){return o.constrain(t,0,n._height)}function u(t){return o.constrain(t,-s,n._width+s)}var f=l(n.d2p(r._rl[0])),h=l(n.d2p(r._rl[1]));if(t.select(\\\"rect.\\\"+d.slideBoxClassName).attr(\\\"x\\\",f).attr(\\\"width\\\",h-f),t.select(\\\"rect.\\\"+d.maskMinClassName).attr(\\\"width\\\",f),t.select(\\\"rect.\\\"+d.maskMaxClassName).attr(\\\"x\\\",h).attr(\\\"width\\\",n._width-h),\\\"match\\\"!==a.rangemode){var p=n._height-c(n.d2pOppAxis(i._rl[1])),g=n._height-c(n.d2pOppAxis(i._rl[0]));t.select(\\\"rect.\\\"+d.maskMinOppAxisClassName).attr(\\\"x\\\",f).attr(\\\"height\\\",p).attr(\\\"width\\\",h-f),t.select(\\\"rect.\\\"+d.maskMaxOppAxisClassName).attr(\\\"x\\\",f).attr(\\\"y\\\",g).attr(\\\"height\\\",n._height-g).attr(\\\"width\\\",h-f),t.select(\\\"rect.\\\"+d.slideBoxClassName).attr(\\\"y\\\",p).attr(\\\"height\\\",g-p)}var v=Math.round(u(f-s))-.5,m=Math.round(u(h-s))+.5;t.select(\\\"g.\\\"+d.grabberMinClassName).attr(\\\"transform\\\",\\\"translate(\\\"+v+\\\",0.5)\\\"),t.select(\\\"g.\\\"+d.grabberMaxClassName).attr(\\\"transform\\\",\\\"translate(\\\"+m+\\\",0.5)\\\")}(s,0,r,l,u,_),\\\"bottom\\\"===r.side&&c.draw(t,r._id+\\\"title\\\",{propContainer:r,propName:r._name+\\\".title\\\",placeholder:e._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:I+l._height+l._offsetShift+10+1.5*r.titlefont.size,\\\"text-anchor\\\":\\\"middle\\\"}}),a.autoMargin(t,l._id,{x:T[0],y:C,l:0,r:0,t:0,b:l._height+M.b+S,pad:d.extraPad+2*l._offsetShift})})}},{\\\"../../lib\\\":696,\\\"../../lib/setcursor\\\":717,\\\"../../plots/cartesian\\\":757,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"../titles\\\":661,\\\"./constants\\\":644,d3:148}],647:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"./oppaxis_attributes\\\");e.exports={moduleType:\\\"component\\\",name:\\\"rangeslider\\\",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:t(\\\"./attributes\\\"),handleDefaults:t(\\\"./defaults\\\"),calcAutorange:t(\\\"./calc_autorange\\\"),draw:t(\\\"./draw\\\")}},{\\\"../../lib\\\":696,\\\"./attributes\\\":642,\\\"./calc_autorange\\\":643,\\\"./defaults\\\":645,\\\"./draw\\\":646,\\\"./oppaxis_attributes\\\":648}],648:[function(t,e,r){\\\"use strict\\\";e.exports={_isSubplotObj:!0,rangemode:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"fixed\\\",\\\"match\\\"],dflt:\\\"match\\\",editType:\\\"calc\\\"},range:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"plot\\\"},{valType:\\\"any\\\",editType:\\\"plot\\\"}],editType:\\\"plot\\\"},editType:\\\"calc\\\"}},{}],649:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../annotations/attributes\\\"),i=t(\\\"../../traces/scatter/attributes\\\").line,a=t(\\\"../drawing/attributes\\\").dash,o=t(\\\"../../lib/extend\\\").extendFlat,s=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports=s(\\\"shape\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc+arraydraw\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"circle\\\",\\\"rect\\\",\\\"path\\\",\\\"line\\\"],editType:\\\"calc+arraydraw\\\"},layer:{valType:\\\"enumerated\\\",values:[\\\"below\\\",\\\"above\\\"],dflt:\\\"above\\\",editType:\\\"arraydraw\\\"},xref:o({},n.xref,{}),xsizemode:{valType:\\\"enumerated\\\",values:[\\\"scaled\\\",\\\"pixel\\\"],dflt:\\\"scaled\\\",editType:\\\"calc+arraydraw\\\"},xanchor:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},x0:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},x1:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},yref:o({},n.yref,{}),ysizemode:{valType:\\\"enumerated\\\",values:[\\\"scaled\\\",\\\"pixel\\\"],dflt:\\\"scaled\\\",editType:\\\"calc+arraydraw\\\"},yanchor:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},y0:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},y1:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},path:{valType:\\\"string\\\",editType:\\\"calc+arraydraw\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,editType:\\\"arraydraw\\\"},line:{color:o({},i.color,{editType:\\\"arraydraw\\\"}),width:o({},i.width,{editType:\\\"calc+arraydraw\\\"}),dash:o({},a,{editType:\\\"arraydraw\\\"}),editType:\\\"calc+arraydraw\\\"},fillcolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\",editType:\\\"arraydraw\\\"},editType:\\\"arraydraw\\\"})},{\\\"../../lib/extend\\\":685,\\\"../../plot_api/plot_template\\\":735,\\\"../../traces/scatter/attributes\\\":1044,\\\"../annotations/attributes\\\":553,\\\"../drawing/attributes\\\":594}],650:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"./constants\\\"),o=t(\\\"./helpers\\\");function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,u=l;if(\\\"pixel\\\"===e){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],h=n.aggNums(Math.max,null,f),p=n.aggNums(Math.min,null,f),d=p<0?Math.abs(p)+c:c,g=h>0?h+c:c;return{ppad:c,ppadplus:u?d:g,ppadminus:u?g:d}}return{ppad:c}}function u(t,e,r,n,i){var s=\\\"category\\\"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,c,u,f,h=1/0,p=-1/0,d=n.match(a.segmentRE);for(\\\"date\\\"===t.type&&(s=o.decodeDate(s)),l=0;l<d.length;l++)void 0!==(c=i[d[l].charAt(0)].drawn)&&(!(u=d[l].substr(1).match(a.paramRE))||u.length<c||((f=s(u[c]))<h&&(h=f),f>p&&(p=f)));return p>=h?[h,p]:void 0}}e.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o<r.length;o++){var c,f,h=r[o];if(h._extremes={},\\\"paper\\\"!==h.xref){var p=\\\"pixel\\\"===h.xsizemode?h.xanchor:h.x0,d=\\\"pixel\\\"===h.xsizemode?h.xanchor:h.x1;(f=u(c=i.getFromId(t,h.xref),p,d,h.path,a.paramIsX))&&(h._extremes[c._id]=i.findExtremes(c,f,s(h)))}if(\\\"paper\\\"!==h.yref){var g=\\\"pixel\\\"===h.ysizemode?h.yanchor:h.y0,v=\\\"pixel\\\"===h.ysizemode?h.yanchor:h.y1;(f=u(c=i.getFromId(t,h.yref),g,v,h.path,a.paramIsY))&&(h._extremes[c._id]=i.findExtremes(c,f,l(h)))}}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"./constants\\\":651,\\\"./helpers\\\":654}],651:[function(t,e,r){\\\"use strict\\\";e.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\\\\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],652:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../plots/array_container_defaults\\\"),o=t(\\\"./attributes\\\"),s=t(\\\"./helpers\\\");function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(a(\\\"visible\\\")){a(\\\"layer\\\"),a(\\\"opacity\\\"),a(\\\"fillcolor\\\"),a(\\\"line.color\\\"),a(\\\"line.width\\\"),a(\\\"line.dash\\\");for(var l=a(\\\"type\\\",t.path?\\\"path\\\":\\\"rect\\\"),c=a(\\\"xsizemode\\\"),u=a(\\\"ysizemode\\\"),f=[\\\"x\\\",\\\"y\\\"],h=0;h<2;h++){var p,d,g,v=f[h],m=v+\\\"anchor\\\",y=\\\"x\\\"===v?c:u,x={_fullLayout:r},b=i.coerceRef(t,e,x,v,\\\"\\\",\\\"paper\\\");if(\\\"paper\\\"!==b?((p=i.getFromId(x,b))._shapeIndices.push(e._index),g=s.rangeToShapePosition(p),d=s.shapePositionToRange(p)):d=g=n.identity,\\\"path\\\"!==l){var _=v+\\\"0\\\",w=v+\\\"1\\\",k=t[_],M=t[w];t[_]=d(t[_],!0),t[w]=d(t[w],!0),\\\"pixel\\\"===y?(a(_,0),a(w,10)):(i.coercePosition(e,x,a,b,_,.25),i.coercePosition(e,x,a,b,w,.75)),e[_]=g(e[_]),e[w]=g(e[w]),t[_]=k,t[w]=M}if(\\\"pixel\\\"===y){var A=t[m];t[m]=d(t[m],!0),i.coercePosition(e,x,a,b,m,.25),e[m]=g(e[m]),t[m]=A}}\\\"path\\\"===l?a(\\\"path\\\"):n.noneOrAll(t,e,[\\\"x0\\\",\\\"x1\\\",\\\"y0\\\",\\\"y1\\\"])}}e.exports=function(t,e){a(t,e,{name:\\\"shapes\\\",handleItemDefaults:l})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/cartesian/axes\\\":745,\\\"./attributes\\\":649,\\\"./helpers\\\":654}],653:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../color\\\"),s=t(\\\"../drawing\\\"),l=t(\\\"../../plot_api/plot_template\\\").arrayEditor,c=t(\\\"../dragelement\\\"),u=t(\\\"../../lib/setcursor\\\"),f=t(\\\"./constants\\\"),h=t(\\\"./helpers\\\");function p(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index=\\\"'+e+'\\\"]').remove();var r=t._fullLayout.shapes[e]||{};if(r._input&&!1!==r.visible)if(\\\"below\\\"!==r.layer)m(t._fullLayout._shapeUpperLayer);else if(\\\"paper\\\"===r.xref||\\\"paper\\\"===r.yref)m(t._fullLayout._shapeLowerLayer);else{var p=t._fullLayout._plots[r.xref+r.yref];if(p)m((p.mainplotinfo||p).shapelayer);else m(t._fullLayout._shapeLowerLayer)}function m(p){var m={\\\"data-index\\\":e,\\\"fill-rule\\\":\\\"evenodd\\\",d:g(t,r)},y=r.line.width?r.line.color:\\\"rgba(0,0,0,0)\\\",x=p.append(\\\"path\\\").attr(m).style(\\\"opacity\\\",r.opacity).call(o.stroke,y).call(o.fill,r.fillcolor).call(s.dashLine,r.line.dash,r.line.width);d(x,t,r),t._context.edits.shapePosition&&function(t,e,r,o,p){var m,y,x,b,_,w,k,M,A,T,S,C,E,L,z,O,I=10,P=10,D=\\\"pixel\\\"===r.xsizemode,R=\\\"pixel\\\"===r.ysizemode,B=\\\"line\\\"===r.type,F=\\\"path\\\"===r.type,N=l(t.layout,\\\"shapes\\\",r),j=N.modifyItem,V=a.getFromId(t,r.xref),U=a.getFromId(t,r.yref),q=h.getDataToPixel(t,V),H=h.getDataToPixel(t,U,!0),G=h.getPixelToData(t,V),W=h.getPixelToData(t,U,!0),Y=B?function(){var t=Math.max(r.line.width,10),n=p.append(\\\"g\\\").attr(\\\"data-index\\\",o);n.append(\\\"path\\\").attr(\\\"d\\\",e.attr(\\\"d\\\")).style({cursor:\\\"move\\\",\\\"stroke-width\\\":t,\\\"stroke-opacity\\\":\\\"0\\\"});var i={\\\"fill-opacity\\\":\\\"0\\\"},a=t/2>10?t/2:10;return n.append(\\\"circle\\\").attr({\\\"data-line-point\\\":\\\"start-point\\\",cx:D?q(r.xanchor)+r.x0:q(r.x0),cy:R?H(r.yanchor)-r.y0:H(r.y0),r:a}).style(i).classed(\\\"cursor-grab\\\",!0),n.append(\\\"circle\\\").attr({\\\"data-line-point\\\":\\\"end-point\\\",cx:D?q(r.xanchor)+r.x1:q(r.x1),cy:R?H(r.yanchor)-r.y1:H(r.y1),r:a}).style(i).classed(\\\"cursor-grab\\\",!0),n}():e,X={element:Y.node(),gd:t,prepFn:function(n){D&&(_=q(r.xanchor));R&&(w=H(r.yanchor));\\\"path\\\"===r.type?z=r.path:(m=D?r.x0:q(r.x0),y=R?r.y0:H(r.y0),x=D?r.x1:q(r.x1),b=R?r.y1:H(r.y1));m<x?(A=m,E=\\\"x0\\\",T=x,L=\\\"x1\\\"):(A=x,E=\\\"x1\\\",T=m,L=\\\"x0\\\");!R&&y<b||R&&y>b?(k=y,S=\\\"y0\\\",M=b,C=\\\"y1\\\"):(k=b,S=\\\"y1\\\",M=y,C=\\\"y0\\\");Z(n),K(p,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),l=a.getFromId(r,i),c=\\\"\\\";\\\"paper\\\"===n||o.autorange||(c+=n);\\\"paper\\\"===i||l.autorange||(c+=i);t.call(s.setClipUrl,c?\\\"clip\\\"+r._fullLayout._uid+c:null)}(e,r,t),X.moveFn=\\\"move\\\"===O?$:J},doneFn:function(){u(e),Q(p),d(e,t,r),n.call(\\\"relayout\\\",t,N.getUpdateObj())},clickFn:function(){Q(p)}};function Z(t){if(B)O=\\\"path\\\"===t.target.tagName?\\\"move\\\":\\\"start-point\\\"===t.target.attributes[\\\"data-line-point\\\"].value?\\\"resize-over-start-point\\\":\\\"resize-over-end-point\\\";else{var r=X.element.getBoundingClientRect(),n=r.right-r.left,i=r.bottom-r.top,a=t.clientX-r.left,o=t.clientY-r.top,s=!F&&n>I&&i>P&&!t.shiftKey?c.getCursor(a/n,1-o/i):\\\"move\\\";u(e,s),O=s.split(\\\"-\\\")[0]}}function $(n,i){if(\\\"path\\\"===r.type){var a=function(t){return t},o=a,s=a;D?j(\\\"xanchor\\\",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&&\\\"date\\\"===V.type&&(o=h.encodeDate(o))),R?j(\\\"yanchor\\\",r.yanchor=W(w+i)):(s=function(t){return W(H(t)+i)},U&&\\\"date\\\"===U.type&&(s=h.encodeDate(s))),j(\\\"path\\\",r.path=v(z,o,s))}else D?j(\\\"xanchor\\\",r.xanchor=G(_+n)):(j(\\\"x0\\\",r.x0=G(m+n)),j(\\\"x1\\\",r.x1=G(x+n))),R?j(\\\"yanchor\\\",r.yanchor=W(w+i)):(j(\\\"y0\\\",r.y0=W(y+i)),j(\\\"y1\\\",r.y1=W(b+i)));e.attr(\\\"d\\\",g(t,r)),K(p,r)}function J(n,i){if(F){var a=function(t){return t},o=a,s=a;D?j(\\\"xanchor\\\",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&&\\\"date\\\"===V.type&&(o=h.encodeDate(o))),R?j(\\\"yanchor\\\",r.yanchor=W(w+i)):(s=function(t){return W(H(t)+i)},U&&\\\"date\\\"===U.type&&(s=h.encodeDate(s))),j(\\\"path\\\",r.path=v(z,o,s))}else if(B){if(\\\"resize-over-start-point\\\"===O){var l=m+n,c=R?y-i:y+i;j(\\\"x0\\\",r.x0=D?l:G(l)),j(\\\"y0\\\",r.y0=R?c:W(c))}else if(\\\"resize-over-end-point\\\"===O){var u=x+n,f=R?b-i:b+i;j(\\\"x1\\\",r.x1=D?u:G(u)),j(\\\"y1\\\",r.y1=R?f:W(f))}}else{var d=~O.indexOf(\\\"n\\\")?k+i:k,N=~O.indexOf(\\\"s\\\")?M+i:M,Y=~O.indexOf(\\\"w\\\")?A+n:A,X=~O.indexOf(\\\"e\\\")?T+n:T;~O.indexOf(\\\"n\\\")&&R&&(d=k-i),~O.indexOf(\\\"s\\\")&&R&&(N=M-i),(!R&&N-d>P||R&&d-N>P)&&(j(S,r[S]=R?d:W(d)),j(C,r[C]=R?N:W(N))),X-Y>I&&(j(E,r[E]=D?Y:G(Y)),j(L,r[L]=D?X:G(X)))}e.attr(\\\"d\\\",g(t,r)),K(p,r)}function K(t,e){(D||R)&&function(){var r=\\\"path\\\"!==e.type,n=t.selectAll(\\\".visual-cue\\\").data([0]);n.enter().append(\\\"path\\\").attr({fill:\\\"#fff\\\",\\\"fill-rule\\\":\\\"evenodd\\\",stroke:\\\"#000\\\",\\\"stroke-width\\\":1}).classed(\\\"visual-cue\\\",!0);var a=q(D?e.xanchor:i.midRange(r?[e.x0,e.x1]:h.extractPathCoords(e.path,f.paramIsX))),o=H(R?e.yanchor:i.midRange(r?[e.y0,e.y1]:h.extractPathCoords(e.path,f.paramIsY)));if(a=h.roundPositionForSharpStrokeRendering(a,1),o=h.roundPositionForSharpStrokeRendering(o,1),D&&R){var s=\\\"M\\\"+(a-1-1)+\\\",\\\"+(o-1-1)+\\\"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z\\\";n.attr(\\\"d\\\",s)}else if(D){var l=\\\"M\\\"+(a-1-1)+\\\",\\\"+(o-9-1)+\\\"v18 h2 v-18 Z\\\";n.attr(\\\"d\\\",l)}else{var c=\\\"M\\\"+(a-9-1)+\\\",\\\"+(o-1-1)+\\\"h18 v2 h-18 Z\\\";n.attr(\\\"d\\\",c)}}()}function Q(t){t.selectAll(\\\".visual-cue\\\").remove()}c.init(X),Y.node().onmousemove=Z}(t,x,r,e,p)}}function d(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,\\\"\\\");t.call(s.setClipUrl,n?\\\"clip\\\"+e._fullLayout._uid+n:null)}function g(t,e){var r,n,o,s,l,c,u,p,d=e.type,g=a.getFromId(t,e.xref),v=a.getFromId(t,e.yref),m=t._fullLayout._size;if(g?(r=h.shapePositionToRange(g),n=function(t){return g._offset+g.r2p(r(t,!0))}):n=function(t){return m.l+m.w*t},v?(o=h.shapePositionToRange(v),s=function(t){return v._offset+v.r2p(o(t,!0))}):s=function(t){return m.t+m.h*(1-t)},\\\"path\\\"===d)return g&&\\\"date\\\"===g.type&&(n=h.decodeDate(n)),v&&\\\"date\\\"===v.type&&(s=h.decodeDate(s)),function(t,e,r){var n=t.path,a=t.xsizemode,o=t.ysizemode,s=t.xanchor,l=t.yanchor;return n.replace(f.segmentRE,function(t){var n=0,c=t.charAt(0),u=f.paramIsX[c],h=f.paramIsY[c],p=f.numParams[c],d=t.substr(1).replace(f.paramRE,function(t){return u[n]?t=\\\"pixel\\\"===a?e(s)+Number(t):e(t):h[n]&&(t=\\\"pixel\\\"===o?r(l)-Number(t):r(t)),++n>p&&(t=\\\"X\\\"),t});return n>p&&(d=d.replace(/[\\\\s,]*X.*/,\\\"\\\"),i.log(\\\"Ignoring extra params in segment \\\"+t)),c+d})}(e,n,s);if(\\\"pixel\\\"===e.xsizemode){var y=n(e.xanchor);l=y+e.x0,c=y+e.x1}else l=n(e.x0),c=n(e.x1);if(\\\"pixel\\\"===e.ysizemode){var x=s(e.yanchor);u=x-e.y0,p=x-e.y1}else u=s(e.y0),p=s(e.y1);if(\\\"line\\\"===d)return\\\"M\\\"+l+\\\",\\\"+u+\\\"L\\\"+c+\\\",\\\"+p;if(\\\"rect\\\"===d)return\\\"M\\\"+l+\\\",\\\"+u+\\\"H\\\"+c+\\\"V\\\"+p+\\\"H\\\"+l+\\\"Z\\\";var b=(l+c)/2,_=(u+p)/2,w=Math.abs(b-l),k=Math.abs(_-u),M=\\\"A\\\"+w+\\\",\\\"+k,A=b+w+\\\",\\\"+_;return\\\"M\\\"+A+M+\\\" 0 1,1 \\\"+(b+\\\",\\\"+(_-k))+M+\\\" 0 0,1 \\\"+A+\\\"Z\\\"}function v(t,e,r){return t.replace(f.segmentRE,function(t){var n=0,i=t.charAt(0),a=f.paramIsX[i],o=f.paramIsY[i],s=f.numParams[i];return i+t.substr(1).replace(f.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}e.exports={draw:function(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll(\\\"path\\\").remove(),e._shapeLowerLayer.selectAll(\\\"path\\\").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll(\\\"path\\\").remove()}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible&&p(t,i)},drawOne:p}},{\\\"../../lib\\\":696,\\\"../../lib/setcursor\\\":717,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"./constants\\\":651,\\\"./helpers\\\":654}],654:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"../../lib\\\");r.rangeToShapePosition=function(t){return\\\"log\\\"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return\\\"log\\\"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace(\\\"_\\\",\\\" \\\")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(\\\" \\\",\\\"_\\\")}},r.extractPathCoords=function(t,e){var r=[];return t.match(n.segmentRE).forEach(function(t){var a=e[t.charAt(0)].drawn;if(void 0!==a){var o=t.substr(1).match(n.paramRE);!o||o.length<a||r.push(i.cleanNumber(o[a]))}}),r},r.getDataToPixel=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.shapePositionToRange(e);i=function(t){return e._offset+e.r2p(o(t,!0))},\\\"date\\\"===e.type&&(i=r.decodeDate(i))}else i=n?function(t){return a.t+a.h*(1-t)}:function(t){return a.l+a.w*t};return i},r.getPixelToData=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.rangeToShapePosition(e);i=function(t){return o(e.p2r(t-e._offset))}}else i=n?function(t){return 1-(t-a.t)/a.h}:function(t){return(t-a.l)/a.w};return i},r.roundPositionForSharpStrokeRendering=function(t,e){var r=1===Math.round(e%2),n=Math.round(t);return r?n+.5:n}},{\\\"../../lib\\\":696,\\\"./constants\\\":651}],655:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./draw\\\");e.exports={moduleType:\\\"component\\\",name:\\\"shapes\\\",layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),includeBasePlot:t(\\\"../../plots/cartesian/include_components\\\")(\\\"shapes\\\"),calcAutorange:t(\\\"./calc_autorange\\\"),draw:n.draw,drawOne:n.drawOne}},{\\\"../../plots/cartesian/include_components\\\":756,\\\"./attributes\\\":649,\\\"./calc_autorange\\\":650,\\\"./defaults\\\":652,\\\"./draw\\\":653}],656:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../../plots/pad_attributes\\\"),a=t(\\\"../../lib/extend\\\").extendDeepAll,o=t(\\\"../../plot_api/edit_types\\\").overrideAll,s=t(\\\"../../plots/animation_attributes\\\"),l=t(\\\"../../plot_api/plot_template\\\").templatedArray,c=t(\\\"./constants\\\"),u=l(\\\"step\\\",{visible:{valType:\\\"boolean\\\",dflt:!0},method:{valType:\\\"enumerated\\\",values:[\\\"restyle\\\",\\\"relayout\\\",\\\"animate\\\",\\\"update\\\",\\\"skip\\\"],dflt:\\\"restyle\\\"},args:{valType:\\\"info_array\\\",freeLength:!0,items:[{valType:\\\"any\\\"},{valType:\\\"any\\\"},{valType:\\\"any\\\"}]},label:{valType:\\\"string\\\"},value:{valType:\\\"string\\\"},execute:{valType:\\\"boolean\\\",dflt:!0}});e.exports=o(l(\\\"slider\\\",{visible:{valType:\\\"boolean\\\",dflt:!0},active:{valType:\\\"number\\\",min:0,dflt:0},steps:u,lenmode:{valType:\\\"enumerated\\\",values:[\\\"fraction\\\",\\\"pixels\\\"],dflt:\\\"fraction\\\"},len:{valType:\\\"number\\\",min:0,dflt:1},x:{valType:\\\"number\\\",min:-2,max:3,dflt:0},pad:a({},i,{},{t:{dflt:20}}),xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\"},y:{valType:\\\"number\\\",min:-2,max:3,dflt:0},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"top\\\"},transition:{duration:{valType:\\\"number\\\",min:0,dflt:150},easing:{valType:\\\"enumerated\\\",values:s.transition.easing.values,dflt:\\\"cubic-in-out\\\"}},currentvalue:{visible:{valType:\\\"boolean\\\",dflt:!0},xanchor:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\"},offset:{valType:\\\"number\\\",dflt:10},prefix:{valType:\\\"string\\\"},suffix:{valType:\\\"string\\\"},font:n({})},font:n({}),activebgcolor:{valType:\\\"color\\\",dflt:c.gripBgActiveColor},bgcolor:{valType:\\\"color\\\",dflt:c.railBgColor},bordercolor:{valType:\\\"color\\\",dflt:c.railBorderColor},borderwidth:{valType:\\\"number\\\",min:0,dflt:c.railBorderWidth},ticklen:{valType:\\\"number\\\",min:0,dflt:c.tickLength},tickcolor:{valType:\\\"color\\\",dflt:c.tickColor},tickwidth:{valType:\\\"number\\\",min:0,dflt:1},minorticklen:{valType:\\\"number\\\",min:0,dflt:c.minorTickLength}}),\\\"arraydraw\\\",\\\"from-root\\\")},{\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/animation_attributes\\\":740,\\\"../../plots/font_attributes\\\":772,\\\"../../plots/pad_attributes\\\":808,\\\"./constants\\\":657}],657:[function(t,e,r){\\\"use strict\\\";e.exports={name:\\\"sliders\\\",containerClassName:\\\"slider-container\\\",groupClassName:\\\"slider-group\\\",inputAreaClass:\\\"slider-input-area\\\",railRectClass:\\\"slider-rail-rect\\\",railTouchRectClass:\\\"slider-rail-touch-rect\\\",gripRectClass:\\\"slider-grip-rect\\\",tickRectClass:\\\"slider-tick-rect\\\",inputProxyClass:\\\"slider-input-proxy\\\",labelsClass:\\\"slider-labels\\\",labelGroupClass:\\\"slider-label-group\\\",labelClass:\\\"slider-label\\\",currentValueClass:\\\"slider-current-value\\\",railHeight:5,menuIndexAttrName:\\\"slider-active-index\\\",autoMarginIdRoot:\\\"slider-\\\",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:\\\"#bec8d9\\\",railBgColor:\\\"#f8fafc\\\",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:\\\"#bec8d9\\\",gripBgColor:\\\"#f6f8fa\\\",gripBgActiveColor:\\\"#dbdde0\\\",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:\\\"#333\\\",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:\\\"#333\\\",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],658:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/array_container_defaults\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"./constants\\\").name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:\\\"steps\\\",handleItemDefaults:c}),l=0,u=0;u<s.length;u++)s[u].visible&&l++;if(l<2?e.visible=!1:o(\\\"visible\\\")){e._stepCount=l;var f=e._visibleSteps=n.filterVisible(s);(s[o(\\\"active\\\")]||{}).visible||(e.active=f[0]._index),o(\\\"x\\\"),o(\\\"y\\\"),n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\"]),o(\\\"xanchor\\\"),o(\\\"yanchor\\\"),o(\\\"len\\\"),o(\\\"lenmode\\\"),o(\\\"pad.t\\\"),o(\\\"pad.r\\\"),o(\\\"pad.b\\\"),o(\\\"pad.l\\\"),n.coerceFont(o,\\\"font\\\",r.font),o(\\\"currentvalue.visible\\\")&&(o(\\\"currentvalue.xanchor\\\"),o(\\\"currentvalue.prefix\\\"),o(\\\"currentvalue.suffix\\\"),o(\\\"currentvalue.offset\\\"),n.coerceFont(o,\\\"currentvalue.font\\\",e.font)),o(\\\"transition.duration\\\"),o(\\\"transition.easing\\\"),o(\\\"bgcolor\\\"),o(\\\"activebgcolor\\\"),o(\\\"bordercolor\\\"),o(\\\"borderwidth\\\"),o(\\\"ticklen\\\"),o(\\\"tickwidth\\\"),o(\\\"tickcolor\\\"),o(\\\"minorticklen\\\")}}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}if(\\\"skip\\\"===t.method||Array.isArray(t.args)?r(\\\"visible\\\"):e.visible=!1){r(\\\"method\\\"),r(\\\"args\\\");var i=r(\\\"label\\\",\\\"step-\\\"+e._index);r(\\\"value\\\",i),r(\\\"execute\\\")}}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"./attributes\\\":656,\\\"./constants\\\":657}],659:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../plots/plots\\\"),a=t(\\\"../color\\\"),o=t(\\\"../drawing\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../legend/anchor_utils\\\"),u=t(\\\"../../plot_api/plot_template\\\").arrayEditor,f=t(\\\"./constants\\\"),h=t(\\\"../../constants/alignment\\\"),p=h.LINE_SPACING,d=h.FROM_TL,g=h.FROM_BR;function v(t){return f.autoMarginIdRoot+t._index}function m(t){return t._index}function y(t,e){var r=o.tester.selectAll(\\\"g.\\\"+f.labelGroupClass).data(e._visibleSteps);r.enter().append(\\\"g\\\").classed(f.labelGroupClass,!0);var a=0,s=0;r.each(function(t){var r=_(n.select(this),{step:t},e).node();if(r){var i=o.bBox(r);s=Math.max(s,i.height),a=Math.max(a,i.width)}}),r.remove();var u=e._dims={};u.inputAreaWidth=Math.max(f.railWidth,f.gripHeight);var h=t._fullLayout._size;u.lx=h.l+h.w*e.x,u.ly=h.t+h.h*(1-e.y),\\\"fraction\\\"===e.lenmode?u.outerLength=Math.round(h.w*e.len):u.outerLength=e.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-e.pad.l-e.pad.r);var p=(u.inputAreaLength-2*f.stepInset)/(e._stepCount-1),m=a+f.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(m/p)),u.labelHeight=s,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,e.currentvalue.visible){var y=o.tester.append(\\\"g\\\");r.each(function(t){var r=x(y,e,t.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},i=l.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,i)}),u.currentValueTotalHeight=u.currentValueHeight+e.currentvalue.offset,y.remove()}u.height=u.currentValueTotalHeight+f.tickOffset+e.ticklen+f.labelOffset+u.labelHeight+e.pad.t+e.pad.b;var b=\\\"left\\\";c.isRightAnchor(e)&&(u.lx-=u.outerLength,b=\\\"right\\\"),c.isCenterAnchor(e)&&(u.lx-=u.outerLength/2,b=\\\"center\\\");var w=\\\"top\\\";c.isBottomAnchor(e)&&(u.ly-=u.height,w=\\\"bottom\\\"),c.isMiddleAnchor(e)&&(u.ly-=u.height/2,w=\\\"middle\\\"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var k={y:e.y,b:u.height*g[w],t:u.height*d[w]};\\\"fraction\\\"===e.lenmode?(k.l=0,k.xl=e.x-e.len*d[b],k.r=0,k.xr=e.x+e.len*g[b]):(k.x=e.x,k.l=u.outerLength*d[b],k.r=u.outerLength*g[b]),i.autoMargin(t,v(e),k)}function x(t,e,r){if(e.currentvalue.visible){var n,i,a=e._dims;switch(e.currentvalue.xanchor){case\\\"right\\\":n=a.inputAreaLength-f.currentValueInset-a.currentValueMaxWidth,i=\\\"left\\\";break;case\\\"center\\\":n=.5*a.inputAreaLength,i=\\\"middle\\\";break;default:n=f.currentValueInset,i=\\\"left\\\"}var c=s.ensureSingle(t,\\\"text\\\",f.labelClass,function(t){t.classed(\\\"user-select-none\\\",!0).attr({\\\"text-anchor\\\":i,\\\"data-notex\\\":1})}),u=e.currentvalue.prefix?e.currentvalue.prefix:\\\"\\\";if(\\\"string\\\"==typeof r)u+=r;else u+=e.steps[e.active].label;e.currentvalue.suffix&&(u+=e.currentvalue.suffix),c.call(o.font,e.currentvalue.font).text(u).call(l.convertToTspans,e._gd);var h=l.lineCount(c),d=(a.currentValueMaxLines+1-h)*e.currentvalue.font.size*p;return l.positionText(c,n,d),c}}function b(t,e,r){s.ensureSingle(t,\\\"rect\\\",f.gripRectClass,function(n){n.call(A,e,t,r).style(\\\"pointer-events\\\",\\\"all\\\")}).attr({width:f.gripWidth,height:f.gripHeight,rx:f.gripRadius,ry:f.gripRadius}).call(a.stroke,r.bordercolor).call(a.fill,r.bgcolor).style(\\\"stroke-width\\\",r.borderwidth+\\\"px\\\")}function _(t,e,r){var n=s.ensureSingle(t,\\\"text\\\",f.labelClass,function(t){t.classed(\\\"user-select-none\\\",!0).attr({\\\"text-anchor\\\":\\\"middle\\\",\\\"data-notex\\\":1})});return n.call(o.font,r.font).text(e.step.label).call(l.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,\\\"g\\\",f.labelsClass),i=e._dims,a=r.selectAll(\\\"g.\\\"+f.labelGroupClass).data(i.labelSteps);a.enter().append(\\\"g\\\").classed(f.labelGroupClass,!0),a.exit().remove(),a.each(function(t){var r=n.select(this);r.call(_,t,e),o.setTranslate(r,C(e,t.fraction),f.tickOffset+e.ticklen+e.font.size*p+f.labelOffset+i.currentValueTotalHeight)})}function k(t,e,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&M(t,e,r,o,!0,i)}function M(t,e,r,n,a,o){var s=r.active;r.active=n,u(t.layout,f.name,r).applyUpdate(\\\"active\\\",n);var l=r.steps[r.active];e.call(S,r,o),e.call(x,r),t.emit(\\\"plotly_sliderchange\\\",{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&&l.method&&a&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function A(t,e,r){var i=r.node(),o=n.select(e);function s(){return r.data()[0]}t.on(\\\"mousedown\\\",function(){var t=s();e.emit(\\\"plotly_sliderstart\\\",{slider:t});var l=r.select(\\\".\\\"+f.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(a.fill,t.activebgcolor);var c=E(t,n.mouse(i)[0]);k(e,r,t,c,!0),t._dragging=!0,o.on(\\\"mousemove\\\",function(){var t=s(),a=E(t,n.mouse(i)[0]);k(e,r,t,a,!1)}),o.on(\\\"mouseup\\\",function(){var t=s();t._dragging=!1,l.call(a.fill,t.bgcolor),o.on(\\\"mouseup\\\",null),o.on(\\\"mousemove\\\",null),e.emit(\\\"plotly_sliderend\\\",{slider:t,step:t.steps[t.active]})})})}function T(t,e){var r=t.selectAll(\\\"rect.\\\"+f.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append(\\\"rect\\\").classed(f.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+\\\"px\\\",\\\"shape-rendering\\\":\\\"crispEdges\\\"}),r.each(function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(a.fill,e.tickcolor),o.setTranslate(l,C(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?f.tickOffset:f.minorTickOffset)+i.currentValueTotalHeight)})}function S(t,e,r){for(var n=t.select(\\\"rect.\\\"+f.gripRectClass),i=0,a=0;a<e._stepCount;a++)if(e._visibleSteps[a]._index===e.active){i=a;break}var o=C(e,i/(e._stepCount-1));if(!e._invokingCommand){var s=n;r&&e.transition.duration>0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(\\\"transform\\\",\\\"translate(\\\"+(o-.5*f.gripWidth)+\\\",\\\"+e._dims.currentValueTotalHeight+\\\")\\\")}}function C(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,\\\"rect\\\",f.railTouchRectClass,function(n){n.call(A,e,t,r).style(\\\"pointer-events\\\",\\\"all\\\")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr(\\\"opacity\\\",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function z(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,\\\"rect\\\",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,\\\"shape-rendering\\\":\\\"crispEdges\\\"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style(\\\"stroke-width\\\",e.borderwidth+\\\"px\\\"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[f.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=e,n.push(a))}return n}(e,t),a=e._infolayer.selectAll(\\\"g.\\\"+f.containerClassName).data(r.length>0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,v(e))}if(a.enter().append(\\\"g\\\").classed(f.containerClassName,!0).style(\\\"cursor\\\",\\\"ew-resize\\\"),a.exit().each(function(){n.select(this).selectAll(\\\"g.\\\"+f.groupClassName).each(s)}).remove(),0!==r.length){var l=a.selectAll(\\\"g.\\\"+f.groupClassName).data(r,m);l.enter().append(\\\"g\\\").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c<r.length;c++){var u=r[c];y(t,u)}l.each(function(e){var r=n.select(this);!function(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,n=0;n<r;n+=e.labelStride)e.labelSteps.push({fraction:n/(r-1),step:t._visibleSteps[n]})}(e),i.manageCommandObserver(t,e,e._visibleSteps,function(e){var n=r.data()[0];n.active!==e.index&&(n._dragging||M(t,r,n,e.index,!1,!0))}),function(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index);e.call(x,r).call(z,r).call(w,r).call(T,r).call(L,t,r).call(b,t,r);var n=r._dims;o.setTranslate(e,n.lx+r.pad.l,n.ly+r.pad.t),e.call(S,r,!1),e.call(x,r)}(t,n.select(this),e)})}}},{\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/plots\\\":809,\\\"../color\\\":570,\\\"../drawing\\\":595,\\\"../legend/anchor_utils\\\":622,\\\"./constants\\\":657,d3:148}],660:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\");e.exports={moduleType:\\\"component\\\",name:n.name,layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),draw:t(\\\"./draw\\\")}},{\\\"./attributes\\\":656,\\\"./constants\\\":657,\\\"./defaults\\\":658,\\\"./draw\\\":659}],661:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../drawing\\\"),c=t(\\\"../color\\\"),u=t(\\\"../../lib/svg_text_utils\\\"),f=t(\\\"../../constants/interactions\\\");e.exports={draw:function(t,e,r){var p,d=r.propContainer,g=r.propName,v=r.placeholder,m=r.traceIndex,y=r.avoid||{},x=r.attributes,b=r.transform,_=r.containerGroup,w=t._fullLayout,k=d.titlefont||{},M=k.family,A=k.size,T=k.color,S=1,C=!1,E=(d.title||\\\"\\\").trim();\\\"title\\\"===g?p=\\\"titleText\\\":-1!==g.indexOf(\\\"axis\\\")?p=\\\"axisTitleText\\\":g.indexOf(!0)&&(p=\\\"colorbarTitleText\\\");var L=t._context.edits[p];\\\"\\\"===E?S=0:E.replace(h,\\\" % \\\")===v.replace(h,\\\" % \\\")&&(S=.2,C=!0,L||(E=\\\"\\\"));var z=E||L;_||(_=s.ensureSingle(w._infolayer,\\\"g\\\",\\\"g-\\\"+e));var O=_.selectAll(\\\"text\\\").data(z?[0]:[]);if(O.enter().append(\\\"text\\\"),O.text(E).attr(\\\"class\\\",e),O.exit().remove(),!z)return _;function I(t){s.syncOrAsync([P,D],t)}function P(e){var r;return b?(r=\\\"\\\",b.rotate&&(r+=\\\"rotate(\\\"+[b.rotate,x.x,x.y]+\\\")\\\"),b.offset&&(r+=\\\"translate(0, \\\"+b.offset+\\\")\\\")):r=null,e.attr(\\\"transform\\\",r),e.style({\\\"font-family\\\":M,\\\"font-size\\\":n.round(A,2)+\\\"px\\\",fill:c.rgb(T),opacity:S*c.opacity(T),\\\"font-weight\\\":a.fontWeight}).attr(x).call(u.convertToTspans,t),a.previousPromises(t)}function D(t){var e=n.select(t.node().parentNode);if(y&&y.selection&&y.side&&E){e.attr(\\\"transform\\\",null);var r=0,a={left:\\\"right\\\",right:\\\"left\\\",top:\\\"bottom\\\",bottom:\\\"top\\\"}[y.side],o=-1!==[\\\"left\\\",\\\"top\\\"].indexOf(y.side)?-1:1,c=i(y.pad)?y.pad:2,u=l.bBox(e.node()),f={left:0,top:0,right:w.width,bottom:w.height},h=y.maxShift||(f[y.side]-u[y.side])*(\\\"left\\\"===y.side||\\\"top\\\"===y.side?-1:1);if(h<0)r=h;else{var p=y.offsetLeft||0,d=y.offsetTop||0;u.left-=p,u.right-=p,u.top-=d,u.bottom-=d,y.selection.each(function(){var t=l.bBox(this);s.bBoxIntersect(u,t,c)&&(r=Math.max(r,o*(t[y.side]-u[a])+c))}),r=Math.min(h,r)}if(r>0||h<0){var g={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[y.side];e.attr(\\\"transform\\\",\\\"translate(\\\"+g+\\\")\\\")}}}O.call(I),L&&(E?O.on(\\\".opacity\\\",null):(S=0,C=!0,O.text(v).on(\\\"mouseover.opacity\\\",function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style(\\\"opacity\\\",1)}).on(\\\"mouseout.opacity\\\",function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style(\\\"opacity\\\",0)})),O.call(u.makeEditable,{gd:t}).on(\\\"edit\\\",function(e){void 0!==m?o.call(\\\"restyle\\\",t,g,e,m):o.call(\\\"relayout\\\",t,g,e)}).on(\\\"cancel\\\",function(){this.text(this.attr(\\\"data-unformatted\\\")).call(I)}).on(\\\"input\\\",function(t){this.text(t||\\\" \\\").call(u.positionText,x.x,x.y)}));return O.classed(\\\"js-placeholder\\\",C),_}};var h=/ [XY][0-9]* /},{\\\"../../constants/interactions\\\":672,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../drawing\\\":595,d3:148,\\\"fast-isnumeric\\\":214}],662:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../color/attributes\\\"),a=t(\\\"../../lib/extend\\\").extendFlat,o=t(\\\"../../plot_api/edit_types\\\").overrideAll,s=t(\\\"../../plots/pad_attributes\\\"),l=t(\\\"../../plot_api/plot_template\\\").templatedArray,c=l(\\\"button\\\",{visible:{valType:\\\"boolean\\\"},method:{valType:\\\"enumerated\\\",values:[\\\"restyle\\\",\\\"relayout\\\",\\\"animate\\\",\\\"update\\\",\\\"skip\\\"],dflt:\\\"restyle\\\"},args:{valType:\\\"info_array\\\",freeLength:!0,items:[{valType:\\\"any\\\"},{valType:\\\"any\\\"},{valType:\\\"any\\\"}]},label:{valType:\\\"string\\\",dflt:\\\"\\\"},execute:{valType:\\\"boolean\\\",dflt:!0}});e.exports=o(l(\\\"updatemenu\\\",{_arrayAttrRegexps:[/^updatemenus\\\\[(0|[1-9][0-9]+)\\\\]\\\\.buttons/],visible:{valType:\\\"boolean\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"dropdown\\\",\\\"buttons\\\"],dflt:\\\"dropdown\\\"},direction:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"right\\\",\\\"up\\\",\\\"down\\\"],dflt:\\\"down\\\"},active:{valType:\\\"integer\\\",min:-1,dflt:0},showactive:{valType:\\\"boolean\\\",dflt:!0},buttons:c,x:{valType:\\\"number\\\",min:-2,max:3,dflt:-.05},xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"right\\\"},y:{valType:\\\"number\\\",min:-2,max:3,dflt:1},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"top\\\"},pad:a({},s,{}),font:n({}),bgcolor:{valType:\\\"color\\\"},bordercolor:{valType:\\\"color\\\",dflt:i.borderLine},borderwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"arraydraw\\\"}}),\\\"arraydraw\\\",\\\"from-root\\\")},{\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/font_attributes\\\":772,\\\"../../plots/pad_attributes\\\":808,\\\"../color/attributes\\\":569}],663:[function(t,e,r){\\\"use strict\\\";e.exports={name:\\\"updatemenus\\\",containerClassName:\\\"updatemenu-container\\\",headerGroupClassName:\\\"updatemenu-header-group\\\",headerClassName:\\\"updatemenu-header\\\",headerArrowClassName:\\\"updatemenu-header-arrow\\\",dropdownButtonGroupClassName:\\\"updatemenu-dropdown-button-group\\\",dropdownButtonClassName:\\\"updatemenu-dropdown-button\\\",buttonClassName:\\\"updatemenu-button\\\",itemRectClassName:\\\"updatemenu-item-rect\\\",itemTextClassName:\\\"updatemenu-item-text\\\",menuIndexAttrName:\\\"updatemenu-active-index\\\",autoMarginIdRoot:\\\"updatemenu-\\\",blankHeaderOpts:{label:\\\"  \\\"},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:\\\"#F4FAFF\\\",hoverColor:\\\"#F4FAFF\\\",arrowSymbol:{left:\\\"\\\\u25c4\\\",right:\\\"\\\\u25ba\\\",up:\\\"\\\\u25b2\\\",down:\\\"\\\\u25bc\\\"}}},{}],664:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/array_container_defaults\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"./constants\\\").name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o(\\\"visible\\\",i(t,e,{name:\\\"buttons\\\",handleItemDefaults:c}).length>0)&&(o(\\\"active\\\"),o(\\\"direction\\\"),o(\\\"type\\\"),o(\\\"showactive\\\"),o(\\\"x\\\"),o(\\\"y\\\"),n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\"]),o(\\\"xanchor\\\"),o(\\\"yanchor\\\"),o(\\\"pad.t\\\"),o(\\\"pad.r\\\"),o(\\\"pad.b\\\"),o(\\\"pad.l\\\"),n.coerceFont(o,\\\"font\\\",r.font),o(\\\"bgcolor\\\",r.paper_bgcolor),o(\\\"bordercolor\\\"),o(\\\"borderwidth\\\"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r(\\\"visible\\\",\\\"skip\\\"===t.method||Array.isArray(t.args))&&(r(\\\"method\\\"),r(\\\"args\\\"),r(\\\"label\\\"),r(\\\"execute\\\"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"./attributes\\\":662,\\\"./constants\\\":663}],665:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../plots/plots\\\"),a=t(\\\"../color\\\"),o=t(\\\"../drawing\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../legend/anchor_utils\\\"),u=t(\\\"../../plot_api/plot_template\\\").arrayEditor,f=t(\\\"../../constants/alignment\\\").LINE_SPACING,h=t(\\\"./constants\\\"),p=t(\\\"./scrollbox\\\");function d(t){return t._index}function g(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function v(t,e,r,n,i,a,o,s){e.active=o,u(t.layout,h.name,e).applyUpdate(\\\"active\\\",o),\\\"buttons\\\"===e.type?y(t,n,null,null,e):\\\"dropdown\\\"===e.type&&(i.attr(h.menuIndexAttrName,\\\"-1\\\"),m(t,n,i,a,e),s||y(t,n,i,a,e))}function m(t,e,r,n,i){var a=s.ensureSingle(e,\\\"g\\\",h.headerClassName,function(t){t.style(\\\"pointer-events\\\",\\\"all\\\")}),l=i._dims,c=i.active,u=i.buttons[c]||h.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(x,i,u,t).call(S,i,f,p),s.ensureSingle(e,\\\"text\\\",h.headerArrowClassName,function(t){t.classed(\\\"user-select-none\\\",!0).attr(\\\"text-anchor\\\",\\\"end\\\").call(o.font,i.font).text(h.arrowSymbol[i.direction])}).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),a.on(\\\"click\\\",function(){r.call(C,String(g(r,i)?-1:i._index)),y(t,e,r,n,i)}),a.on(\\\"mouseover\\\",function(){a.call(k)}),a.on(\\\"mouseout\\\",function(){a.call(M,i)}),o.setTranslate(e,l.lx,l.ly)}function y(t,e,r,a,o){r||(r=e).attr(\\\"pointer-events\\\",\\\"all\\\");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&\\\"buttons\\\"!==o.type?[]:o.buttons,c=\\\"dropdown\\\"===o.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll(\\\"g.\\\"+c).data(s.filterVisible(l)),f=u.enter().append(\\\"g\\\").classed(c,!0),p=u.exit();\\\"dropdown\\\"===o.type?(f.attr(\\\"opacity\\\",\\\"0\\\").transition().attr(\\\"opacity\\\",\\\"1\\\"),p.transition().attr(\\\"opacity\\\",\\\"0\\\").remove()):p.remove();var d=0,g=0,m=o._dims,y=-1!==[\\\"up\\\",\\\"down\\\"].indexOf(o.direction);\\\"dropdown\\\"===o.type&&(y?g=m.headerHeight+h.gapButtonHeader:d=m.headerWidth+h.gapButtonHeader),\\\"dropdown\\\"===o.type&&\\\"up\\\"===o.direction&&(g=-h.gapButtonHeader+h.gapButton-m.openHeight),\\\"dropdown\\\"===o.type&&\\\"left\\\"===o.direction&&(d=-h.gapButtonHeader+h.gapButton-m.openWidth);var b={x:m.lx+d+o.pad.l,y:m.ly+g+o.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},_={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each(function(s,l){var c=n.select(this);c.call(x,o,s,t).call(S,o,b),c.on(\\\"click\\\",function(){n.event.defaultPrevented||(v(t,o,0,e,r,a,l),s.execute&&i.executeAPICommand(t,s.method,s.args),t.emit(\\\"plotly_buttonclicked\\\",{menu:o,button:s,active:o.active}))}),c.on(\\\"mouseover\\\",function(){c.call(k)}),c.on(\\\"mouseout\\\",function(){c.call(M,o),u.call(w,o)})}),u.call(w,o),y?(_.w=Math.max(m.openWidth,m.headerWidth),_.h=b.y-_.t):(_.w=b.x-_.l,_.h=Math.max(m.openHeight,m.headerHeight)),_.direction=o.direction,a&&(u.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u=\\\"up\\\"===c||\\\"down\\\"===c,f=i._dims,p=i.active;if(u)for(s=0,l=0;l<p;l++)s+=f.heights[l]+h.gapButton;else for(o=0,l=0;l<p;l++)o+=f.widths[l]+h.gapButton;n.enable(a,o,s),n.hbar&&n.hbar.attr(\\\"opacity\\\",\\\"0\\\").transition().attr(\\\"opacity\\\",\\\"1\\\");n.vbar&&n.vbar.attr(\\\"opacity\\\",\\\"0\\\").transition().attr(\\\"opacity\\\",\\\"1\\\")}(0,0,0,a,o,_):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr(\\\"opacity\\\",\\\"0\\\").each(\\\"end\\\",function(){e=!1,r||t.disable()});r&&t.vbar.transition().attr(\\\"opacity\\\",\\\"0\\\").each(\\\"end\\\",function(){r=!1,e||t.disable()})}(a))}function x(t,e,r,n){t.call(b,e).call(_,e,r,n)}function b(t,e){s.ensureSingle(t,\\\"rect\\\",h.itemRectClassName,function(t){t.attr({rx:h.rx,ry:h.ry,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style(\\\"stroke-width\\\",e.borderwidth+\\\"px\\\")}function _(t,e,r,n){s.ensureSingle(t,\\\"text\\\",h.itemTextClassName,function(t){t.classed(\\\"user-select-none\\\",!0).attr({\\\"text-anchor\\\":\\\"start\\\",\\\"data-notex\\\":1})}).call(o.font,e.font).text(r.label).call(l.convertToTspans,n)}function w(t,e){var r=e.active;t.each(function(t,i){var o=n.select(this);i===r&&e.showactive&&o.select(\\\"rect.\\\"+h.itemRectClassName).call(a.fill,h.activeColor)})}function k(t){t.select(\\\"rect.\\\"+h.itemRectClassName).call(a.fill,h.hoverColor)}function M(t,e){t.select(\\\"rect.\\\"+h.itemRectClassName).call(a.fill,e.bgcolor)}function A(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=o.tester.selectAll(\\\"g.\\\"+h.dropdownButtonClassName).data(s.filterVisible(e.buttons));a.enter().append(\\\"g\\\").classed(h.dropdownButtonClassName,!0);var u=-1!==[\\\"up\\\",\\\"down\\\"].indexOf(e.direction);a.each(function(i,a){var s=n.select(this);s.call(x,e,i,t);var c=s.select(\\\".\\\"+h.itemTextClassName),p=c.node()&&o.bBox(c.node()).width,d=Math.max(p+h.textPadX,h.minWidth),g=e.font.size*f,v=l.lineCount(c),m=Math.max(g*v,h.minHeight)+h.textOffsetY;m=Math.ceil(m),d=Math.ceil(d),r.widths[a]=d,r.heights[a]=m,r.height1=Math.max(r.height1,m),r.width1=Math.max(r.width1,d),u?(r.totalWidth=Math.max(r.totalWidth,d),r.openWidth=r.totalWidth,r.totalHeight+=m+h.gapButton,r.openHeight+=m+h.gapButton):(r.totalWidth+=d+h.gapButton,r.openWidth+=d+h.gapButton,r.totalHeight=Math.max(r.totalHeight,m),r.openHeight=r.totalHeight)}),u?r.totalHeight-=h.gapButton:r.totalWidth-=h.gapButton,r.headerWidth=r.width1+h.arrowPadX,r.headerHeight=r.height1,\\\"dropdown\\\"===e.type&&(u?(r.width1+=h.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=h.arrowPadX),a.remove();var p=r.totalWidth+e.pad.l+e.pad.r,d=r.totalHeight+e.pad.t+e.pad.b,g=t._fullLayout._size;r.lx=g.l+g.w*e.x,r.ly=g.t+g.h*(1-e.y);var v=\\\"left\\\";c.isRightAnchor(e)&&(r.lx-=p,v=\\\"right\\\"),c.isCenterAnchor(e)&&(r.lx-=p/2,v=\\\"center\\\");var m=\\\"top\\\";c.isBottomAnchor(e)&&(r.ly-=d,m=\\\"bottom\\\"),c.isMiddleAnchor(e)&&(r.ly-=d/2,m=\\\"middle\\\"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),i.autoMargin(t,T(e),{x:e.x,y:e.y,l:p*({right:1,center:.5}[v]||0),r:p*({left:1,center:.5}[v]||0),b:d*({top:1,middle:.5}[m]||0),t:d*({bottom:1,middle:.5}[m]||0)})}function T(t){return h.autoMarginIdRoot+t._index}function S(t,e,r,n){n=n||{};var i=t.select(\\\".\\\"+h.itemRectClassName),a=t.select(\\\".\\\"+h.itemTextClassName),s=e.borderwidth,c=r.index,u=e._dims;o.setTranslate(t,s+r.x,s+r.y);var p=-1!==[\\\"up\\\",\\\"down\\\"].indexOf(e.direction),d=n.height||(p?u.heights[c]:u.height1);i.attr({x:0,y:0,width:n.width||(p?u.width1:u.widths[c]),height:d});var g=e.font.size*f,v=(l.lineCount(a)-1)*g/2;l.positionText(a,h.textOffsetX,d/2-v+h.textOffsetY),p?r.y+=u.heights[c]+r.yPad:r.x+=u.widths[c]+r.xPad,r.index++}function C(t,e){t.attr(h.menuIndexAttrName,e||\\\"-1\\\").selectAll(\\\"g.\\\"+h.dropdownButtonClassName).remove()}e.exports=function(t){var e=t._fullLayout,r=s.filterVisible(e[h.name]);function a(e){i.autoMargin(t,T(e))}var o=e._menulayer.selectAll(\\\"g.\\\"+h.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append(\\\"g\\\").classed(h.containerClassName,!0).style(\\\"cursor\\\",\\\"pointer\\\"),o.exit().each(function(){n.select(this).selectAll(\\\"g.\\\"+h.headerGroupClassName).each(a)}).remove(),0!==r.length){var l=o.selectAll(\\\"g.\\\"+h.headerGroupClassName).data(r,d);l.enter().append(\\\"g\\\").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(o,\\\"g\\\",h.dropdownButtonGroupClassName,function(t){t.style(\\\"pointer-events\\\",\\\"all\\\")}),u=0;u<r.length;u++){var f=r[u];A(t,f)}var x=\\\"updatemenus\\\"+e._uid,b=new p(t,c,x);l.enter().size()&&(c.node().parentNode.appendChild(c.node()),c.call(C)),l.exit().each(function(t){c.call(C),a(t)}).remove(),l.each(function(e){var r=n.select(this),a=\\\"dropdown\\\"===e.type?c:null;i.manageCommandObserver(t,e,e.buttons,function(n){v(t,e,e.buttons[n.index],r,a,b,n.index,!0)}),\\\"dropdown\\\"===e.type?(m(t,r,c,b,e),g(c,e)&&y(t,r,c,b,e)):y(t,r,null,null,e)})}}},{\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/plots\\\":809,\\\"../color\\\":570,\\\"../drawing\\\":595,\\\"../legend/anchor_utils\\\":622,\\\"./constants\\\":663,\\\"./scrollbox\\\":667,d3:148}],666:[function(t,e,r){arguments[4][660][0].apply(r,arguments)},{\\\"./attributes\\\":662,\\\"./constants\\\":663,\\\"./defaults\\\":664,\\\"./draw\\\":665,dup:660}],667:[function(t,e,r){\\\"use strict\\\";e.exports=s;var n=t(\\\"d3\\\"),i=t(\\\"../color\\\"),a=t(\\\"../drawing\\\"),o=t(\\\"../../lib\\\");function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll(\\\"rect.scrollbox-bg\\\").data([0]),this.bg.exit().on(\\\".drag\\\",null).on(\\\"wheel\\\",null).remove(),this.bg.enter().append(\\\"rect\\\").classed(\\\"scrollbox-bg\\\",!0).style(\\\"pointer-events\\\",\\\"all\\\").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor=\\\"#808BA4\\\",s.prototype.enable=function(t,e,r){var o=this.gd._fullLayout,l=o.width,c=o.height;this.position=t;var u,f,h,p,d=this.position.l,g=this.position.w,v=this.position.t,m=this.position.h,y=this.position.direction,x=\\\"down\\\"===y,b=\\\"left\\\"===y,_=\\\"up\\\"===y,w=g,k=m;x||b||\\\"right\\\"===y||_||(this.position.direction=\\\"down\\\",x=!0),x||_?(f=(u=d)+w,x?(h=v,k=(p=Math.min(h+k,c))-h):k=(p=v+k)-(h=Math.max(p-k,0))):(p=(h=v)+k,b?w=(f=d+w)-(u=Math.max(f-w,0)):(u=d,w=(f=Math.min(u+w,l))-u)),this._box={l:u,t:h,w:w,h:k};var M=g>w,A=s.barLength+2*s.barPad,T=s.barWidth+2*s.barPad,S=d,C=v+m;C+T>c&&(C=c-T);var E=this.container.selectAll(\\\"rect.scrollbar-horizontal\\\").data(M?[0]:[]);E.exit().on(\\\".drag\\\",null).remove(),E.enter().append(\\\"rect\\\").classed(\\\"scrollbar-horizontal\\\",!0).call(i.fill,s.barColor),M?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:C,width:A,height:T}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=m>k,z=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,I=d+g,P=v;I+z>l&&(I=l-z);var D=this.container.selectAll(\\\"rect.scrollbar-vertical\\\").data(L?[0]:[]);D.exit().on(\\\".drag\\\",null).remove(),D.enter().append(\\\"rect\\\").classed(\\\"scrollbar-vertical\\\",!0).call(i.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:P,width:z,height:O}),this._vbarYMin=P+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,B=u-.5,F=L?f+z+.5:f+.5,N=h-.5,j=M?p+T+.5:p+.5,V=o._topdefs.selectAll(\\\"#\\\"+R).data(M||L?[0]:[]);if(V.exit().remove(),V.enter().append(\\\"clipPath\\\").attr(\\\"id\\\",R).append(\\\"rect\\\"),M||L?(this._clipRect=V.select(\\\"rect\\\").attr({x:Math.floor(B),y:Math.floor(N),width:Math.ceil(F)-Math.floor(B),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R),this.bg.attr({x:d,y:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on(\\\"wheel\\\",null).on(\\\".drag\\\",null).call(a.setClipUrl,null),delete this._clipRect),M||L){var U=n.behavior.drag().on(\\\"dragstart\\\",function(){n.event.sourceEvent.preventDefault()}).on(\\\"drag\\\",this._onBoxDrag.bind(this));this.container.on(\\\"wheel\\\",null).on(\\\"wheel\\\",this._onBoxWheel.bind(this)).on(\\\".drag\\\",null).call(U);var q=n.behavior.drag().on(\\\"dragstart\\\",function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()}).on(\\\"drag\\\",this._onBarDrag.bind(this));M&&this.hbar.on(\\\".drag\\\",null).call(q),L&&this.vbar.on(\\\".drag\\\",null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on(\\\"wheel\\\",null).on(\\\".drag\\\",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(\\\".drag\\\",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(\\\".drag\\\",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},{\\\"../../lib\\\":696,\\\"../color\\\":570,\\\"../drawing\\\":595,d3:148}],668:[function(t,e,r){\\\"use strict\\\";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\\\"right\\\",right:\\\"left\\\",top:\\\"bottom\\\",bottom:\\\"top\\\"}}},{}],669:[function(t,e,r){\\\"use strict\\\";e.exports={COMPARISON_OPS:[\\\"=\\\",\\\"!=\\\",\\\"<\\\",\\\">=\\\",\\\">\\\",\\\"<=\\\"],COMPARISON_OPS2:[\\\"=\\\",\\\"<\\\",\\\">=\\\",\\\">\\\",\\\"<=\\\"],INTERVAL_OPS:[\\\"[]\\\",\\\"()\\\",\\\"[)\\\",\\\"(]\\\",\\\"][\\\",\\\")(\\\",\\\"](\\\",\\\")[\\\"],SET_OPS:[\\\"{}\\\",\\\"}{\\\"],CONSTRAINT_REDUCTION:{\\\"=\\\":\\\"=\\\",\\\"<\\\":\\\"<\\\",\\\"<=\\\":\\\"<\\\",\\\">\\\":\\\">\\\",\\\">=\\\":\\\">\\\",\\\"[]\\\":\\\"[]\\\",\\\"()\\\":\\\"[]\\\",\\\"[)\\\":\\\"[]\\\",\\\"(]\\\":\\\"[]\\\",\\\"][\\\":\\\"][\\\",\\\")(\\\":\\\"][\\\",\\\"](\\\":\\\"][\\\",\\\")[\\\":\\\"][\\\"}}},{}],670:[function(t,e,r){\\\"use strict\\\";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],671:[function(t,e,r){\\\"use strict\\\";e.exports={circle:\\\"\\\\u25cf\\\",\\\"circle-open\\\":\\\"\\\\u25cb\\\",square:\\\"\\\\u25a0\\\",\\\"square-open\\\":\\\"\\\\u25a1\\\",diamond:\\\"\\\\u25c6\\\",\\\"diamond-open\\\":\\\"\\\\u25c7\\\",cross:\\\"+\\\",x:\\\"\\\\u274c\\\"}},{}],672:[function(t,e,r){\\\"use strict\\\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300,DESELECTDIM:.2}},{}],673:[function(t,e,r){\\\"use strict\\\";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:\\\"\\\\u2212\\\"}},{}],674:[function(t,e,r){\\\"use strict\\\";r.xmlns=\\\"http://www.w3.org/2000/xmlns/\\\",r.svg=\\\"http://www.w3.org/2000/svg\\\",r.xlink=\\\"http://www.w3.org/1999/xlink\\\",r.svgAttrs={xmlns:r.svg,\\\"xmlns:xlink\\\":r.xlink}},{}],675:[function(t,e,r){\\\"use strict\\\";r.version=\\\"1.42.2\\\",t(\\\"es6-promise\\\").polyfill(),t(\\\"../build/plotcss\\\"),t(\\\"./fonts/mathjax_config\\\");for(var n=t(\\\"./registry\\\"),i=r.register=n.register,a=t(\\\"./plot_api\\\"),o=Object.keys(a),s=0;s<o.length;s++){var l=o[s];r[l]=a[l],i({moduleType:\\\"apiMethod\\\",name:l,fn:a[l]})}i(t(\\\"./traces/scatter\\\")),i([t(\\\"./components/fx\\\"),t(\\\"./components/legend\\\"),t(\\\"./components/annotations\\\"),t(\\\"./components/annotations3d\\\"),t(\\\"./components/shapes\\\"),t(\\\"./components/images\\\"),t(\\\"./components/updatemenus\\\"),t(\\\"./components/sliders\\\"),t(\\\"./components/rangeslider\\\"),t(\\\"./components/rangeselector\\\"),t(\\\"./components/grid\\\"),t(\\\"./components/errorbars\\\")]),i([t(\\\"./locale-en\\\"),t(\\\"./locale-en-us\\\")]),r.Icons=t(\\\"../build/ploticon\\\"),r.Plots=t(\\\"./plots/plots\\\"),r.Fx=t(\\\"./components/fx\\\"),r.Snapshot=t(\\\"./snapshot\\\"),r.PlotSchema=t(\\\"./plot_api/plot_schema\\\"),r.Queue=t(\\\"./lib/queue\\\"),r.d3=t(\\\"d3\\\")},{\\\"../build/plotcss\\\":1,\\\"../build/ploticon\\\":2,\\\"./components/annotations\\\":561,\\\"./components/annotations3d\\\":566,\\\"./components/errorbars\\\":601,\\\"./components/fx\\\":612,\\\"./components/grid\\\":616,\\\"./components/images\\\":621,\\\"./components/legend\\\":630,\\\"./components/rangeselector\\\":641,\\\"./components/rangeslider\\\":647,\\\"./components/shapes\\\":655,\\\"./components/sliders\\\":660,\\\"./components/updatemenus\\\":666,\\\"./fonts/mathjax_config\\\":676,\\\"./lib/queue\\\":712,\\\"./locale-en\\\":726,\\\"./locale-en-us\\\":725,\\\"./plot_api\\\":730,\\\"./plot_api/plot_schema\\\":734,\\\"./plots/plots\\\":809,\\\"./registry\\\":828,\\\"./snapshot\\\":833,\\\"./traces/scatter\\\":1056,d3:148,\\\"es6-promise\\\":203}],676:[function(t,e,r){\\\"use strict\\\";\\\"undefined\\\"!=typeof MathJax?(r.MathJax=!0,\\\"local\\\"!==(window.PlotlyConfig||{}).MathJaxConfig&&(MathJax.Hub.Config({messageStyle:\\\"none\\\",skipStartupTypeset:!0,displayAlign:\\\"left\\\",tex2jax:{inlineMath:[[\\\"$\\\",\\\"$\\\"],[\\\"\\\\\\\\(\\\",\\\"\\\\\\\\)\\\"]]}}),MathJax.Hub.Configured())):r.MathJax=!1},{}],677:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./mod\\\"),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-15}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0]<e[1]?(r=e[0],n=e[1]):(r=e[1],n=e[0]),(r=i(r,s))>(n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,f,h,p,d,g=l([r,n]);function v(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r<n?(u=r,h=n):(u=n,h=r),t<e?(p=t,d=e):(p=e,d=t);var m,y=Math.abs(h-u)<=o?0:1;function x(t,e,r){return\\\"A\\\"+[t,t]+\\\" \\\"+[0,y,r]+\\\" \\\"+v(t,e)}return g?m=null===p?\\\"M\\\"+v(d,u)+x(d,f,0)+x(d,h,0)+\\\"Z\\\":\\\"M\\\"+v(p,u)+x(p,f,0)+x(p,h,0)+\\\"ZM\\\"+v(d,u)+x(d,f,1)+x(d,h,1)+\\\"Z\\\":null===p?(m=\\\"M\\\"+v(d,u)+x(d,h,0),c&&(m+=\\\"L0,0Z\\\")):m=\\\"M\\\"+v(p,u)+\\\"L\\\"+v(d,u)+x(d,h,0)+\\\"L\\\"+v(p,h)+x(p,u,1)+\\\"Z\\\",m}e.exports={deg2rad:function(t){return t/180*o},rad2deg:function(t){return t/o*180},angleDelta:c,angleDist:function(t,e){return Math.abs(c(t,e))},isFullCircle:l,isAngleInsideSector:u,isPtInsideSector:function(t,e,r,n){return!!u(e,n)&&(r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),t>=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},{\\\"./mod\\\":704}],678:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../constants/numerical\\\").BADNUM,a=/^['\\\"%,$#\\\\s']+|[, ]|['\\\"%,$#\\\\s']+$/g;e.exports=function(t){return\\\"string\\\"==typeof t&&(t=t.replace(a,\\\"\\\")),n(t)?Number(t):i}},{\\\"../constants/numerical\\\":673,\\\"fast-isnumeric\\\":214}],679:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each(function(t){t.regl&&t.regl.clear({color:!0,depth:!0})})}},{}],680:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener(\\\"resize\\\",t._responsiveChartHandler),delete t._responsiveChartHandler)}},{}],681:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../plots/attributes\\\"),o=t(\\\"../components/colorscale/get_scale\\\"),s=(Object.keys(t(\\\"../components/colorscale/scales\\\")),t(\\\"./nested_property\\\")),l=t(\\\"./regex\\\").counter,c=t(\\\"../constants/interactions\\\").DESELECTDIM,u=t(\\\"./mod\\\").modHalf,f=t(\\\"./is_array\\\").isArrayOrTypedArray;function h(t,e){var n=r.valObjectMeta[e.valType];if(e.arrayOk&&f(t))return!0;if(n.validateFunction)return n.validateFunction(t,e);var i={},a=i,o={set:function(t){a=t}};return n.coerceFunction(t,o,i,e),a!==i}r.valObjectMeta={data_array:{coerceFunction:function(t,e,r){f(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if(\\\"/\\\"===i.charAt(0)&&\\\"/\\\"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if(\\\"string\\\"!=typeof t){var i=\\\"number\\\"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every(function(t){return i(t).isValid()})?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o(t,r))}},angle:{coerceFunction:function(t,e,r){\\\"auto\\\"===t?e.set(\\\"auto\\\"):n(t)?e.set(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||l(r);\\\"string\\\"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||\\\"string\\\"==typeof t&&!!l(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(\\\"string\\\"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var i=t.split(\\\"+\\\"),a=0;a<i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)<a?i.splice(a,1):a++}i.length?e.set(i.join(\\\"+\\\")):e.set(r)}else e.set(t);else e.set(r)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(t)}},info_array:{coerceFunction:function(t,e,n,i){function a(t,e,n){var i,a={set:function(t){i=t}};return void 0===n&&(n=e.dflt),r.valObjectMeta[e.valType].coerceFunction(t,a,n,e),i}var o=2===i.dimensions||\\\"1-2\\\"===i.dimensions&&Array.isArray(t)&&Array.isArray(t[0]);if(Array.isArray(t)){var s,l,c,u,f,h,p=i.items,d=[],g=Array.isArray(p),v=g&&o&&Array.isArray(p[0]),m=o&&g&&!v,y=g&&!m?p.length:t.length;if(n=Array.isArray(n)?n:[],o)for(s=0;s<y;s++)for(d[s]=[],c=Array.isArray(t[s])?t[s]:[],f=m?p.length:g?p[s].length:c.length,l=0;l<f;l++)u=m?p[l]:g?p[s][l]:p,void 0!==(h=a(c[l],u,(n[s]||[])[l]))&&(d[s][l]=h);else for(s=0;s<y;s++)void 0!==(h=a(t[s],g?p[s]:p,n[s]))&&(d[s]=h);e.set(d)}else e.set(n)},validateFunction:function(t,e){if(!Array.isArray(t))return!1;var r=e.items,n=Array.isArray(r),i=2===e.dimensions;if(!e.freeLength&&t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(i){if(!Array.isArray(t[a])||!e.freeLength&&t[a].length!==r[a].length)return!1;for(var o=0;o<t[a].length;o++)if(!h(t[a][o],n?r[a][o]:r))return!1}else if(!h(t[a],n?r[a]:r))return!1;return!0}}},r.coerce=function(t,e,n,i,a){var o=s(n,i).get(),l=s(t,i),c=s(e,i),u=l.get(),p=e._template;if(void 0===u&&p&&(u=s(p,i).get(),p=0),void 0===a&&(a=o.dflt),o.arrayOk&&f(u))return c.set(u),u;var d=r.valObjectMeta[o.valType].coerceFunction;d(u,c,a,o);var g=c.get();return p&&g===a&&!h(u,o)&&(d(u=s(p,i).get(),c,a,o),g=c.get()),g},r.coerce2=function(t,e,n,i,a){var o=s(t,i),l=r.coerce(t,e,n,i,a),c=o.get();return null!=c&&l},r.coerceFont=function(t,e,r){var n={};return r=r||{},n.family=t(e+\\\".family\\\",r.family),n.size=t(e+\\\".size\\\",r.size),n.color=t(e+\\\".color\\\",r.color),n},r.coerceHoverinfo=function(t,e,n){var i,o=e._module.attributes,s=o.hoverinfo?o:a,l=s.hoverinfo;if(1===n._dataLength){var c=\\\"all\\\"===l.dflt?l.flags.slice():l.dflt.split(\\\"+\\\");c.splice(c.indexOf(\\\"name\\\"),1),i=c.join(\\\"+\\\")}return r.coerce(t,e,s,\\\"hoverinfo\\\",i)},r.coerceSelectionMarkerOpacity=function(t,e){if(t.marker){var r,n,i=t.marker.opacity;if(void 0!==i)f(i)||t.selected||t.unselected||(r=i,n=c*i),e(\\\"selected.marker.opacity\\\",r),e(\\\"unselected.marker.opacity\\\",n)}},r.validate=h},{\\\"../components/colorscale/get_scale\\\":583,\\\"../components/colorscale/scales\\\":589,\\\"../constants/interactions\\\":672,\\\"../plots/attributes\\\":742,\\\"./is_array\\\":697,\\\"./mod\\\":704,\\\"./nested_property\\\":705,\\\"./regex\\\":713,\\\"fast-isnumeric\\\":214,tinycolor2:514}],682:[function(t,e,r){\\\"use strict\\\";var n,i,a=t(\\\"d3\\\"),o=t(\\\"fast-isnumeric\\\"),s=t(\\\"./loggers\\\"),l=t(\\\"./mod\\\").mod,c=t(\\\"../constants/numerical\\\"),u=c.BADNUM,f=c.ONEDAY,h=c.ONEHOUR,p=c.ONEMIN,d=c.ONESEC,g=c.EPOCHJD,v=t(\\\"../registry\\\"),m=a.time.format.utc,y=/^\\\\s*(-?\\\\d\\\\d\\\\d\\\\d|\\\\d\\\\d)(-(\\\\d?\\\\d)(-(\\\\d?\\\\d)([ Tt]([01]?\\\\d|2[0-3])(:([0-5]\\\\d)(:([0-5]\\\\d(\\\\.\\\\d+)?))?(Z|z|[+\\\\-]\\\\d\\\\d:?\\\\d\\\\d)?)?)?)?)?\\\\s*$/m,x=/^\\\\s*(-?\\\\d\\\\d\\\\d\\\\d|\\\\d\\\\d)(-(\\\\d?\\\\di?)(-(\\\\d?\\\\d)([ Tt]([01]?\\\\d|2[0-3])(:([0-5]\\\\d)(:([0-5]\\\\d(\\\\.\\\\d+)?))?(Z|z|[+\\\\-]\\\\d\\\\d:?\\\\d\\\\d)?)?)?)?)?\\\\s*$/m,b=(new Date).getFullYear()-70;function _(t){return t&&v.componentsRegistry.calendars&&\\\"string\\\"==typeof t&&\\\"gregorian\\\"!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}r.dateTick0=function(t,e){return _(t)?e?v.getComponentMethod(\\\"calendars\\\",\\\"CANONICAL_SUNDAY\\\")[t]:v.getComponentMethod(\\\"calendars\\\",\\\"CANONICAL_TICK\\\")[t]:e?\\\"2000-01-02\\\":\\\"2000-01-01\\\"},r.dfltRange=function(t){return _(t)?v.getComponentMethod(\\\"calendars\\\",\\\"DFLTRANGE\\\")[t]:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"]},r.isJSDate=function(t){return\\\"object\\\"==typeof t&&null!==t&&\\\"function\\\"==typeof t.getTime},r.dateTime2ms=function(t,e){if(r.isJSDate(t)){var a=t.getTimezoneOffset()*p,o=(t.getUTCMinutes()-t.getMinutes())*p+(t.getUTCSeconds()-t.getSeconds())*d+(t.getUTCMilliseconds()-t.getMilliseconds());if(o){var s=3*p;a=a-s/2+l(o-a+s/2,s)}return(t=Number(t)-a)>=n&&t<=i?t:u}if(\\\"string\\\"!=typeof t&&\\\"number\\\"!=typeof t)return u;t=String(t);var c=_(e),m=t.charAt(0);!c||\\\"G\\\"!==m&&\\\"g\\\"!==m||(t=t.substr(1),e=\\\"\\\");var w=c&&\\\"chinese\\\"===e.substr(0,7),k=t.match(w?x:y);if(!k)return u;var M=k[1],A=k[3]||\\\"1\\\",T=Number(k[5]||1),S=Number(k[7]||0),C=Number(k[9]||0),E=Number(k[11]||0);if(c){if(2===M.length)return u;var L;M=Number(M);try{var z=v.getComponentMethod(\\\"calendars\\\",\\\"getCal\\\")(e);if(w){var O=\\\"i\\\"===A.charAt(A.length-1);A=parseInt(A,10),L=z.newDate(M,z.toMonthIndex(M,A,O),T)}else L=z.newDate(M,Number(A),T)}catch(t){return u}return L?(L.toJD()-g)*f+S*h+C*p+E*d:u}M=2===M.length?(Number(M)+2e3-b)%100+b:Number(M),A-=1;var I=new Date(Date.UTC(2e3,A,T,S,C));return I.setUTCFullYear(M),I.getUTCMonth()!==A?u:I.getUTCDate()!==T?u:I.getTime()+E*d},n=r.MIN_MS=r.dateTime2ms(\\\"-9999\\\"),i=r.MAX_MS=r.dateTime2ms(\\\"9999-12-31 23:59:59.9999\\\"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var k=90*f,M=3*h,A=5*p;function T(t,e,r,n,i){if((e||r||n||i)&&(t+=\\\" \\\"+w(e,2)+\\\":\\\"+w(r,2),(n||i)&&(t+=\\\":\\\"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+=\\\".\\\"+w(i,a)}return t}r.ms2DateTime=function(t,e,r){if(\\\"number\\\"!=typeof t||!(t>=n&&t<=i))return u;e||(e=0);var a,o,s,c,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+g,C=Math.floor(l(t,f));try{a=v.getComponentMethod(\\\"calendars\\\",\\\"getCal\\\")(r).fromJD(S).formatDate(\\\"yyyy-mm-dd\\\")}catch(t){a=m(\\\"G%Y-%m-%d\\\")(new Date(w))}if(\\\"-\\\"===a.charAt(0))for(;a.length<11;)a=\\\"-0\\\"+a.substr(1);else for(;a.length<10;)a=\\\"0\\\"+a;o=e<k?Math.floor(C/h):0,s=e<k?Math.floor(C%h/p):0,c=e<M?Math.floor(C%p/d):0,y=e<A?C%d*10+b:0}else x=new Date(w),a=m(\\\"%Y-%m-%d\\\")(x),o=e<k?x.getUTCHours():0,s=e<k?x.getUTCMinutes():0,c=e<M?x.getUTCSeconds():0,y=e<A?10*x.getUTCMilliseconds()+b:0;return T(a,o,s,c,y)},r.ms2DateTimeLocal=function(t){if(!(t>=n+f&&t<=i-f))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return T(a.time.format(\\\"%Y-%m-%d\\\")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||\\\"number\\\"==typeof t&&isFinite(t)){if(_(n))return s.error(\\\"JS Dates and milliseconds are incompatible with world calendars\\\",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error(\\\"unrecognized date\\\",t),e;return t};var S=/%\\\\d?f/g;function C(t,e,r,n){t=t.replace(S,function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,\\\"\\\")||\\\"0\\\"});var i=new Date(Math.floor(e+.05));if(_(n))try{t=v.getComponentMethod(\\\"calendars\\\",\\\"worldCalFmt\\\")(t,e,n)}catch(t){return\\\"Invalid\\\"}return r(t)(i)}var E=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,i,a){if(i=_(i)&&i,!e)if(\\\"y\\\"===r)e=a.year;else if(\\\"m\\\"===r)e=a.month;else{if(\\\"d\\\"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+\\\":\\\"+w(l(Math.floor(r/p),60),2);if(\\\"M\\\"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),E[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,\\\"\\\").replace(/[\\\\.]$/,\\\"\\\")),n+=\\\":\\\"+i}return n}(t,r)+\\\"\\\\n\\\"+C(a.dayMonthYear,t,n,i);e=a.dayMonth+\\\"\\\\n\\\"+a.year}return C(e,t,n,i)};var L=3*f;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+g,a=v.getComponentMethod(\\\"calendars\\\",\\\"getCal\\\")(r),o=a.fromJD(i);return e%12?a.add(o,e,\\\"m\\\"):a.add(o,e/12,\\\"y\\\"),(o.toJD()-g)*f+n}catch(e){s.error(\\\"invalid ms \\\"+t+\\\" in calendar \\\"+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&v.getComponentMethod(\\\"calendars\\\",\\\"getCal\\\")(e),u=0;u<t.length;u++)if(n=t[u],o(n)){if(!(n%f))if(c)try{1===(r=c.fromJD(n/f+g)).day()?1===r.month()?i++:a++:s++}catch(t){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?i++:a++:s++}else l++;s+=a+=i;var h=t.length-l;return{exactYears:i/h,exactMonths:a/h,exactDays:s/h}}},{\\\"../constants/numerical\\\":673,\\\"../registry\\\":828,\\\"./loggers\\\":701,\\\"./mod\\\":704,d3:148,\\\"fast-isnumeric\\\":214}],683:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return Array.isArray(t)||(t=[]),t.length=e,t}},{}],684:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"events\\\").EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){\\\"undefined\\\"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;\\\"undefined\\\"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o,s=a._events[e];if(!s)return n;function l(t){return t.listener?(a.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(a,[r]))):t.apply(a,[r])}for(s=Array.isArray(s)?s:[s],o=0;o<s.length-1;o++)l(s[o]);return i=l(s[o]),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};e.exports=i},{events:92}],685:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is_plain_object.js\\\"),i=Array.isArray;function a(t,e,r,o){var s,l,c,u,f,h,p=t[0],d=t.length;if(2===d&&i(p)&&i(t[1])&&0===p.length){if(function(t,e){var r,n;for(r=0;r<t.length;r++){if(null!==(n=t[r])&&\\\"object\\\"==typeof n)return!1;void 0!==n&&(e[r]=n)}return!0}(t[1],p))return p;p.splice(0,p.length)}for(var g=1;g<d;g++)for(l in s=t[g])c=p[l],u=s[l],o&&i(u)?p[l]=u:e&&u&&(n(u)||(f=i(u)))?(f?(f=!1,h=c&&i(c)?c:[]):h=c&&n(c)?c:{},p[l]=a([h,u],e,r,o)):(\\\"undefined\\\"!=typeof u||r)&&(p[l]=u);return p}r.extendFlat=function(){return a(arguments,!1,!1,!1)},r.extendDeep=function(){return a(arguments,!0,!1,!1)},r.extendDeepAll=function(){return a(arguments,!0,!0,!1)},r.extendDeepNoArrays=function(){return a(arguments,!0,!1,!0)}},{\\\"./is_plain_object.js\\\":698}],686:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e={},r=[],n=0,i=0;i<t.length;i++){var a=t[i];1!==e[a]&&(e[a]=1,r[n++]=a)}return r}},{}],687:[function(t,e,r){\\\"use strict\\\";function n(t){return!0===t.visible}function i(t){return!0===t[0].trace.visible}e.exports=function(t){for(var e,r=(e=t,Array.isArray(e)&&Array.isArray(e[0])&&e[0][0]&&e[0][0].trace?i:n),a=[],o=0;o<t.length;o++){var s=t[o];r(s)&&a.push(s)}return a}},{}],688:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"country-regex\\\"),i=t(\\\"../lib\\\"),a=Object.keys(n),o={\\\"ISO-3\\\":i.identity,\\\"USA-states\\\":i.identity,\\\"country names\\\":function(t){for(var e=0;e<a.length;e++){var r=a[e],o=new RegExp(n[r]);if(o.test(t.trim().toLowerCase()))return r}return i.log(\\\"Unrecognized country name: \\\"+t+\\\".\\\"),!1}};r.locationToFeature=function(t,e,r){if(!e||\\\"string\\\"!=typeof e)return!1;var n=function(t,e){return(0,o[t])(e)}(t,e);if(n){for(var a=0;a<r.length;a++){var s=r[a];if(s.id===n)return s}i.log([\\\"Location with id\\\",n,\\\"does not have a matching topojson feature at this resolution.\\\"].join(\\\" \\\"))}return!1}},{\\\"../lib\\\":696,\\\"country-regex\\\":122}],689:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../constants/numerical\\\").BADNUM;r.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a<t.length;a++){var o=t[a].lonlat;o[0]!==n?i.push(o):!e&&i.length>0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},r.makeLine=function(t){return 1===t.length?{type:\\\"LineString\\\",coordinates:t[0]}:{type:\\\"MultiLineString\\\",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:\\\"Polygon\\\",coordinates:t};for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=[t[r]];return{type:\\\"MultiPolygon\\\",coordinates:e}},r.makeBlank=function(){return{type:\\\"Point\\\",coordinates:[]}}},{\\\"../constants/numerical\\\":673}],690:[function(t,e,r){\\\"use strict\\\";var n,i,a,o=t(\\\"./mod\\\").mod;function s(t,e,r,n,i,a,o,s){var l=r-t,c=i-t,u=o-i,f=n-e,h=a-e,p=s-a,d=l*p-u*f;if(0===d)return null;var g=(c*p-u*h)/d,v=(c*f-l*h)/d;return v<0||v>1||g<0||g>1?null:{x:t+l*g,y:e+f*g}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,i,a,o,c){if(s(t,e,r,n,i,a,o,c))return 0;var u=r-t,f=n-e,h=o-i,p=c-a,d=u*u+f*f,g=h*h+p*p,v=Math.min(l(u,f,d,i-t,a-e),l(u,f,d,o-t,c-e),l(h,p,g,t-i,e-a),l(h,p,g,r-i,n-a));return Math.sqrt(v)},r.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+c.x)/6,y:(4*f.y+l.y+c.y)/6,theta:u};return n[r]=h,h},r.clearLocationCache=function(){i=null},r.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),f=u;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.x<a?a-r.x:r.x>o?r.x-o:0,f=r.y<s?s-r.y:r.y>l?r.y-l:0;return Math.sqrt(c*c+f*f)}for(var p=h(c);p;){if((c+=p+r)>f)return;p=h(c)}for(p=h(f);p;){if(c>(f-=p+r))return;p=h(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f<c;){if(i=(h+p)/2,o=(a=t.getPointAtLength(i))[r]-e,Math.abs(o)<l)return a;u*o>0?p=i:h=i,f++}return a}},{\\\"./mod\\\":704}],691:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e;if(\\\"string\\\"==typeof t){if(null===(e=document.getElementById(t)))throw new Error(\\\"No DOM element with id '\\\"+t+\\\"' exists on the page.\\\");return e}if(null==t)throw new Error(\\\"DOM element provided is null or undefined\\\");return t}},{}],692:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"color-normalize\\\"),o=t(\\\"../components/colorscale\\\"),s=t(\\\"../components/color/attributes\\\").defaultLine,l=t(\\\"./is_array\\\").isArrayOrTypedArray,c=a(s),u=1;function f(t,e){var r=t;return r[3]*=e,r}function h(t){if(n(t))return c;var e=a(t);return e.length?e:c}function p(t){return n(t)?t:u}e.exports={formatColor:function(t,e,r){var n,i,s,d,g,v=t.color,m=l(v),y=l(e),x=[];if(n=void 0!==t.colorscale?o.makeColorScaleFunc(o.extractScale(t.colorscale,t.cmin,t.cmax)):h,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:h,s=y?function(t,e){return void 0===t[e]?u:p(t[e])}:p,m||y)for(var b=0;b<r;b++)d=i(v,b),g=s(e,b),x[b]=f(d,g);else x=f(a(v),e);return x},parseColorScale:function(t,e){return void 0===e&&(e=1),t.map(function(t){var r=t[0],n=i(t[1]).toRgb();return{index:r,rgb:[n.r,n.g,n.b,e]}})}}},{\\\"../components/color/attributes\\\":569,\\\"../components/colorscale\\\":585,\\\"./is_array\\\":697,\\\"color-normalize\\\":108,\\\"fast-isnumeric\\\":214,tinycolor2:514}],693:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./identity\\\");function i(t){return[t]}e.exports={keyFun:function(t){return t.key},repeat:i,descend:n,wrap:i,unwrap:function(t){return t[0]}}},{\\\"./identity\\\":695}],694:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"superscript-text\\\"),i=t(\\\"./svg_text_utils\\\").convertEntities;e.exports=function(t){return\\\"\\\"+i(function(t){return t.replace(/\\\\<.*\\\\>/g,\\\"\\\")}(function(t){for(var e=0;(e=t.indexOf(\\\"<sup>\\\",e))>=0;){var r=t.indexOf(\\\"</sup>\\\",e);if(r<e)break;t=t.slice(0,e)+n(t.slice(e+5,r))+t.slice(r+6)}return t}(t.replace(/\\\\<br\\\\>/g,\\\"\\\\n\\\"))))}},{\\\"./svg_text_utils\\\":721,\\\"superscript-text\\\":507}],695:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t}},{}],696:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../constants/numerical\\\"),o=a.FP_SAFE,s=a.BADNUM,l=e.exports={};l.nestedProperty=t(\\\"./nested_property\\\"),l.keyedContainer=t(\\\"./keyed_container\\\"),l.relativeAttr=t(\\\"./relative_attr\\\"),l.isPlainObject=t(\\\"./is_plain_object\\\"),l.toLogRange=t(\\\"./to_log_range\\\"),l.relinkPrivateKeys=t(\\\"./relink_private\\\"),l.ensureArray=t(\\\"./ensure_array\\\");var c=t(\\\"./mod\\\");l.mod=c.mod,l.modHalf=c.modHalf;var u=t(\\\"./is_array\\\");l.isTypedArray=u.isTypedArray,l.isArrayOrTypedArray=u.isArrayOrTypedArray,l.isArray1D=u.isArray1D;var f=t(\\\"./coerce\\\");l.valObjectMeta=f.valObjectMeta,l.coerce=f.coerce,l.coerce2=f.coerce2,l.coerceFont=f.coerceFont,l.coerceHoverinfo=f.coerceHoverinfo,l.coerceSelectionMarkerOpacity=f.coerceSelectionMarkerOpacity,l.validate=f.validate;var h=t(\\\"./dates\\\");l.dateTime2ms=h.dateTime2ms,l.isDateTime=h.isDateTime,l.ms2DateTime=h.ms2DateTime,l.ms2DateTimeLocal=h.ms2DateTimeLocal,l.cleanDate=h.cleanDate,l.isJSDate=h.isJSDate,l.formatDate=h.formatDate,l.incrementMonth=h.incrementMonth,l.dateTick0=h.dateTick0,l.dfltRange=h.dfltRange,l.findExactDates=h.findExactDates,l.MIN_MS=h.MIN_MS,l.MAX_MS=h.MAX_MS;var p=t(\\\"./search\\\");l.findBin=p.findBin,l.sorterAsc=p.sorterAsc,l.sorterDes=p.sorterDes,l.distinctVals=p.distinctVals,l.roundUp=p.roundUp,l.sort=p.sort,l.findIndexOfMin=p.findIndexOfMin;var d=t(\\\"./stats\\\");l.aggNums=d.aggNums,l.len=d.len,l.mean=d.mean,l.midRange=d.midRange,l.variance=d.variance,l.stdev=d.stdev,l.interp=d.interp;var g=t(\\\"./matrix\\\");l.init2dArray=g.init2dArray,l.transposeRagged=g.transposeRagged,l.dot=g.dot,l.translationMatrix=g.translationMatrix,l.rotationMatrix=g.rotationMatrix,l.rotationXYMatrix=g.rotationXYMatrix,l.apply2DTransform=g.apply2DTransform,l.apply2DTransform2=g.apply2DTransform2;var v=t(\\\"./angles\\\");l.deg2rad=v.deg2rad,l.rad2deg=v.rad2deg,l.angleDelta=v.angleDelta,l.angleDist=v.angleDist,l.isFullCircle=v.isFullCircle,l.isAngleInsideSector=v.isAngleInsideSector,l.isPtInsideSector=v.isPtInsideSector,l.pathArc=v.pathArc,l.pathSector=v.pathSector,l.pathAnnulus=v.pathAnnulus;var m=t(\\\"./geometry2d\\\");l.segmentsIntersect=m.segmentsIntersect,l.segmentDistance=m.segmentDistance,l.getTextLocation=m.getTextLocation,l.clearLocationCache=m.clearLocationCache,l.getVisibleSegment=m.getVisibleSegment,l.findPointOnPath=m.findPointOnPath;var y=t(\\\"./extend\\\");l.extendFlat=y.extendFlat,l.extendDeep=y.extendDeep,l.extendDeepAll=y.extendDeepAll,l.extendDeepNoArrays=y.extendDeepNoArrays;var x=t(\\\"./loggers\\\");l.log=x.log,l.warn=x.warn,l.error=x.error;var b=t(\\\"./regex\\\");l.counterRegex=b.counter;var _=t(\\\"./throttle\\\");function w(t){var e={};for(var r in t)for(var n=t[r],i=0;i<n.length;i++)e[n[i]]=+r;return e}l.throttle=_.throttle,l.throttleDone=_.done,l.clearThrottle=_.clear,l.getGraphDiv=t(\\\"./get_graph_div\\\"),l.clearResponsive=t(\\\"./clear_responsive\\\"),l.makeTraceGroups=t(\\\"./make_trace_groups\\\"),l._=t(\\\"./localize\\\"),l.notifier=t(\\\"./notifier\\\"),l.filterUnique=t(\\\"./filter_unique\\\"),l.filterVisible=t(\\\"./filter_visible\\\"),l.pushUnique=t(\\\"./push_unique\\\"),l.cleanNumber=t(\\\"./clean_number\\\"),l.ensureNumber=function(t){return i(t)?(t=Number(t))<-o||t>o?s:i(t)?Number(t):s:s},l.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&(i(t)&&t>=0&&t%1==0)},l.noop=t(\\\"./noop\\\"),l.identity=t(\\\"./identity\\\"),l.repeat=function(t,e){for(var r=new Array(e),n=0;n<e;n++)r[n]=t;return r},l.swapAttrs=function(t,e,r,n){r||(r=\\\"x\\\"),n||(n=\\\"y\\\");for(var i=0;i<e.length;i++){var a=e[i],o=l.nestedProperty(t,a.replace(\\\"?\\\",r)),s=l.nestedProperty(t,a.replace(\\\"?\\\",n)),c=o.get();o.set(s.get()),s.set(c)}},l.raiseToTop=function(t){t.parentNode.appendChild(t)},l.cancelTransition=function(t){return t.transition().duration(0)},l.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},l.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o<i;o++)a[o]=e(t[o],r,n);return a},l.randstr=function t(e,r,n,i){if(n||(n=16),void 0===r&&(r=24),r<=0)return\\\"0\\\";var a,o,s=Math.log(Math.pow(2,r))/Math.log(n),c=\\\"\\\";for(a=2;s===1/0;a*=2)s=Math.log(Math.pow(2,r/a))/Math.log(n)*a;var u=s-Math.floor(s);for(a=0;a<Math.floor(s);a++)c=Math.floor(Math.random()*n).toString(n)+c;u&&(o=Math.pow(n,u),c=Math.floor(Math.random()*o).toString(n)+c);var f=parseInt(c,n);return e&&e[c]||f!==1/0&&f>=Math.pow(2,r)?i>10?(l.warn(\\\"randstr failed uniqueness\\\"),c):t(e,r,n,(i||0)+1):c},l.OptionControl=function(t,e){t||(t={}),e||(e=\\\"opt\\\");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r[\\\"_\\\"+e]=t,r},l.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r<l;r++)c[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},l.syncOrAsync=function(t,e,r){var n;function i(){return l.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return\\\"/\\\"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n<r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&&!a)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},l.mergeArray=function(t,e,r){if(l.isArrayOrTypedArray(t))for(var n=Math.min(t.length,e.length),i=0;i<n;i++)e[i][r]=t[i]},l.fillArray=function(t,e,r,n){if(n=n||l.identity,l.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},l.castOption=function(t,e,r,n){n=n||l.identity;var i=l.nestedProperty(t,r).get();return l.isArrayOrTypedArray(i)?Array.isArray(e)&&l.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},l.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=l.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},l.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&&(n=w(o));for(var s=0;s<a.length;s++){var c=a[s];if(l.isIndex(c)){var u=n?n[c]:c,f=r?r[u]:u;void 0!==(i=f)&&i<t.length&&(t[f].selected=1)}}},l.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var n=w(r),i=[],a=0;a<e.length;a++){var o=e[a];if(l.isIndex(o)){var s=n[o];l.isIndex(s)&&i.push(s)}}return i}return e},l.getTargetArray=function(t,e){var r=e.target;if(\\\"string\\\"==typeof r&&r){var n=l.nestedProperty(t,r).get();return!!Array.isArray(n)&&n}return!!Array.isArray(r)&&r},l.minExtend=function(t,e){var r={};\\\"object\\\"!=typeof e&&(e={});var n,i,a,o=Object.keys(t);for(n=0;n<o.length;n++)a=t[i=o[n]],\\\"_\\\"!==i.charAt(0)&&\\\"function\\\"!=typeof a&&(\\\"module\\\"===i?r[i]=a:Array.isArray(a)?r[i]=a.slice(0,3):r[i]=a&&\\\"object\\\"==typeof a?l.minExtend(t[i],e[i]):a);for(o=Object.keys(e),n=0;n<o.length;n++)\\\"object\\\"==typeof(a=e[i=o[n]])&&i in r&&\\\"object\\\"==typeof r[i]||(r[i]=a);return r},l.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},l.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},l.isPlotDiv=function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed(\\\"js-plotly-plot\\\")},l.removeElement=function(t){var e=t&&t.parentNode;e&&e.removeChild(t)},l.addStyleRule=function(t,e){l.addRelatedStyleRule(\\\"global\\\",t,e)},l.addRelatedStyleRule=function(t,e,r){var n=\\\"plotly.js-style-\\\"+t,i=document.getElementById(n);i||((i=document.createElement(\\\"style\\\")).setAttribute(\\\"id\\\",n),i.appendChild(document.createTextNode(\\\"\\\")),document.head.appendChild(i));var a=i.sheet;a.insertRule?a.insertRule(e+\\\"{\\\"+r+\\\"}\\\",0):a.addRule?a.addRule(e,r,0):l.warn(\\\"addStyleRule failed\\\")},l.deleteRelatedStyleRule=function(t){var e=\\\"plotly.js-style-\\\"+t,r=document.getElementById(e);r&&l.removeElement(r)},l.isIE=function(){return\\\"undefined\\\"!=typeof window.navigator.msSaveBlob},l.isD3Selection=function(t){return t&&\\\"function\\\"==typeof t.classed},l.ensureSingle=function(t,e,r,n){var i=t.select(e+(r?\\\".\\\"+r:\\\"\\\"));if(i.size())return i;var a=t.append(e);return r&&a.classed(r,!0),n&&a.call(n),a},l.ensureSingleById=function(t,e,r,n){var i=t.select(e+\\\"#\\\"+r);if(i.size())return i;var a=t.append(e).attr(\\\"id\\\",r);return n&&a.call(n),a},l.objectFromPath=function(t,e){for(var r,n=t.split(\\\".\\\"),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\\\\[([0-9]+)\\\\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var k=/^([^\\\\[\\\\.]+)\\\\.(.+)?/,M=/^([^\\\\.]+)\\\\[([0-9]+)\\\\](\\\\.)?(.+)?/;l.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if(\\\"object\\\"==typeof t&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(k))?(i=t[r],n=e[1],delete t[r],t[n]=l.extendDeepNoArrays(t[n]||{},l.objectFromPath(r,l.expandObjectPaths(i))[n])):(e=r.match(M))?(i=t[r],n=e[1],a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],\\\".\\\"===e[3]?(s=e[4],o=t[n][a]=t[n][a]||{},l.extendDeepNoArrays(o,l.objectFromPath(s,l.expandObjectPaths(i)))):t[n][a]=l.expandObjectPaths(i)):t[r]=l.expandObjectPaths(t[r]));return t},l.numSeparate=function(t,e,r){if(r||(r=!1),\\\"string\\\"!=typeof e||0===e.length)throw new Error(\\\"Separator string required for formatting!\\\");\\\"number\\\"==typeof t&&(t=String(t));var n=/(\\\\d+)(\\\\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split(\\\".\\\"),s=o[0],l=o.length>1?i+o[1]:\\\"\\\";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,\\\"$1\\\"+a+\\\"$2\\\");return s+l};var A=/%{([^\\\\s%{}]*)}/g,T=/^\\\\w*$/;l.templateString=function(t,e){var r={};return t.replace(A,function(t,n){return T.test(n)?e[n]||\\\"\\\":(r[n]=r[n]||l.nestedProperty(e,n).get,r[n]()||\\\"\\\")})};l.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var S=2e9;l.seedPseudoRandom=function(){S=2e9},l.pseudoRandom=function(){var t=S;return S=(69069*S+1)%4294967296,Math.abs(S-t)<429496729?l.pseudoRandom():S/4294967296}},{\\\"../constants/numerical\\\":673,\\\"./angles\\\":677,\\\"./clean_number\\\":678,\\\"./clear_responsive\\\":680,\\\"./coerce\\\":681,\\\"./dates\\\":682,\\\"./ensure_array\\\":683,\\\"./extend\\\":685,\\\"./filter_unique\\\":686,\\\"./filter_visible\\\":687,\\\"./geometry2d\\\":690,\\\"./get_graph_div\\\":691,\\\"./identity\\\":695,\\\"./is_array\\\":697,\\\"./is_plain_object\\\":698,\\\"./keyed_container\\\":699,\\\"./localize\\\":700,\\\"./loggers\\\":701,\\\"./make_trace_groups\\\":702,\\\"./matrix\\\":703,\\\"./mod\\\":704,\\\"./nested_property\\\":705,\\\"./noop\\\":706,\\\"./notifier\\\":707,\\\"./push_unique\\\":711,\\\"./regex\\\":713,\\\"./relative_attr\\\":714,\\\"./relink_private\\\":715,\\\"./search\\\":716,\\\"./stats\\\":719,\\\"./throttle\\\":722,\\\"./to_log_range\\\":723,d3:148,\\\"fast-isnumeric\\\":214}],697:[function(t,e,r){\\\"use strict\\\";var n=\\\"undefined\\\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},i=\\\"undefined\\\"==typeof DataView?function(){}:DataView;function a(t){return n.isView(t)&&!(t instanceof i)}function o(t){return Array.isArray(t)||a(t)}e.exports={isTypedArray:a,isArrayOrTypedArray:o,isArray1D:function(t){return!o(t[0])}}},{}],698:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return window&&window.process&&window.process.versions?\\\"[object Object]\\\"===Object.prototype.toString.call(t):\\\"[object Object]\\\"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],699:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./nested_property\\\"),i=/^\\\\w*$/;e.exports=function(t,e,r,a){var o,s,l;r=r||\\\"name\\\",a=a||\\\"value\\\";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||\\\"\\\";var u={};if(s)for(o=0;o<s.length;o++)u[s[o][r]]=o;var f=i.test(a),h={set:function(t,e){var i=null===e?4:0;if(!s){if(!l||4===i)return;s=[],l.set(s)}var o=u[t];if(void 0===o){if(4===i)return;i|=3,o=s.length,u[t]=o}else e!==(f?s[o][a]:n(s[o],a).get())&&(i|=2);var p=s[o]=s[o]||{};return p[r]=t,f?p[a]=e:n(p,a).set(e),null!==e&&(i&=-5),c[o]=c[o]|i,h},get:function(t){if(s){var e=u[t];return void 0===e?void 0:f?s[e][a]:n(s[e],a).get()}},rename:function(t,e){var n=u[t];return void 0===n?h:(c[n]=1|c[n],u[e]=n,delete u[t],s[n][r]=e,h)},remove:function(t){var e=u[t];if(void 0===e)return h;var i=s[e];if(Object.keys(i).length>2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o<s.length;o++)c[o]=3|c[o];for(o=e;o<s.length;o++)u[s[o][r]]--;s.splice(e,1),delete u[t]}else n(i,a).set(null),c[e]=6|c[e];return h},constructUpdate:function(){for(var t,i,o={},l=Object.keys(c),u=0;u<l.length;u++)i=l[u],t=e+\\\"[\\\"+i+\\\"]\\\",s[i]?(1&c[i]&&(o[t+\\\".\\\"+r]=s[i][r]),2&c[i]&&(o[t+\\\".\\\"+a]=f?4&c[i]?null:s[i][a]:4&c[i]?null:n(s[i],a).get())):o[t]=null;return o}};return h}},{\\\"./nested_property\\\":705}],700:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\");e.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var c=r.split(\\\"-\\\")[0];if(c===r)break;r=c}return e}},{\\\"../registry\\\":828}],701:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../plot_api/plot_config\\\"),i=e.exports={};function a(t,e){if(t&&t.apply)try{return void t.apply(console,e)}catch(t){}for(var r=0;r<e.length;r++)try{t(e[r])}catch(t){console.log(e[r])}}i.log=function(){if(n.logging>1){for(var t=[\\\"LOG:\\\"],e=0;e<arguments.length;e++)t.push(arguments[e]);a(console.trace||console.log,t)}},i.warn=function(){if(n.logging>0){for(var t=[\\\"WARN:\\\"],e=0;e<arguments.length;e++)t.push(arguments[e]);a(console.trace||console.log,t)}},i.error=function(){if(n.logging>0){for(var t=[\\\"ERROR:\\\"],e=0;e<arguments.length;e++)t.push(arguments[e]);a(console.error,t)}}},{\\\"../plot_api/plot_config\\\":733}],702:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n=t.selectAll(\\\"g.\\\"+r.replace(/\\\\s/g,\\\".\\\")).data(e,function(t){return t[0].trace.uid});return n.exit().remove(),n.enter().append(\\\"g\\\").attr(\\\"class\\\",r),n.order(),n}},{}],703:[function(t,e,r){\\\"use strict\\\";r.init2dArray=function(t,e){for(var r=new Array(t),n=0;n<t;n++)r[n]=new Array(e);return r},r.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},r.dot=function(t,e){if(!t.length||!e.length||t.length!==e.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=r.dot(t[i],e);else if(e[0].length){var o=r.transposeRagged(e);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=r.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*e[i];return n},r.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},r.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},r.rotationXYMatrix=function(t,e,n){return r.dot(r.dot(r.translationMatrix(e,n),r.rotationMatrix(t)),r.translationMatrix(-e,-n))},r.apply2DTransform=function(t){return function(){var e=arguments;3===e.length&&(e=e[0]);var n=1===arguments.length?e[0]:[e[0],e[1]];return r.dot(t,[n[0],n[1],1]).slice(0,2)}},r.apply2DTransform2=function(t){var e=r.apply2DTransform(t);return function(t){return e(t.slice(0,2)).concat(e(t.slice(2,4)))}}},{}],704:[function(t,e,r){\\\"use strict\\\";e.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},{}],705:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"./is_array\\\").isArrayOrTypedArray;e.exports=function(t,e){if(n(e))e=String(e);else if(\\\"string\\\"!=typeof e||\\\"[-1]\\\"===e.substr(e.length-4))throw\\\"bad property string\\\";for(var r,a,o,l=0,c=e.split(\\\".\\\");l<c.length;){if(r=String(c[l]).match(/^([^\\\\[\\\\]]*)((\\\\[\\\\-?[0-9]*\\\\])+)$/)){if(r[1])c[l]=r[1];else{if(0!==l)throw\\\"bad property string\\\";c.splice(0,1)}for(a=r[2].substr(1,r[2].length-2).split(\\\"][\\\"),o=0;o<a.length;o++)l++,c.splice(l,0,Number(a[o]))}l++}return\\\"object\\\"!=typeof t?function(t,e,r){return{set:function(){throw\\\"bad container\\\"},get:function(){},astr:e,parts:r,obj:t}}(t,e,c):{set:s(t,c,e),get:function t(e,r){return function(){var n,a,o,s,l,c=e;for(s=0;s<r.length-1;s++){if(-1===(n=r[s])){for(a=!0,o=[],l=0;l<c.length;l++)o[l]=t(c[l],r.slice(s+1))(),o[l]!==o[0]&&(a=!1);return a?o[0]:o}if(\\\"number\\\"==typeof n&&!i(c))return;if(\\\"object\\\"!=typeof(c=c[n])||null===c)return}if(\\\"object\\\"==typeof c&&null!==c&&null!==(o=c[r[s]]))return o}}(t,c),astr:e,parts:c,obj:t}};var a=/(^|\\\\.)args\\\\[/;function o(t,e){return void 0===t||null===t&&!e.match(a)}function s(t,e,r){return function(n){var a,s,f=t,h=\\\"\\\",p=[[t,h]],d=o(n,r);for(s=0;s<e.length-1;s++){if(\\\"number\\\"==typeof(a=e[s])&&!i(f))throw\\\"array index but container is not an array\\\";if(-1===a){if(d=!c(f,e.slice(s+1),n,r))break;return}if(!u(f,a,e[s+1],d))break;if(\\\"object\\\"!=typeof(f=f[a])||null===f)throw\\\"container is not an object\\\";h=l(h,a),p.push([f,h])}if(d){if(s===e.length-1&&(delete f[e[s]],Array.isArray(f)&&+e[s]==f.length-1))for(;f.length&&void 0===f[f.length-1];)f.pop()}else f[e[s]]=n}}function l(t,e){var r=e;return n(e)?r=\\\"[\\\"+e+\\\"]\\\":t&&(r=\\\".\\\"+e),t+r}function c(t,e,r,n){var a,l=i(r),c=!0,f=r,h=n.replace(\\\"-1\\\",0),p=!l&&o(r,h),d=e[0];for(a=0;a<t.length;a++)h=n.replace(\\\"-1\\\",a),l&&(p=o(f=r[a%r.length],h)),p&&(c=!1),u(t,a,d,p)&&s(t[a],e,n.replace(\\\"-1\\\",a))(f);return c}function u(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]=\\\"number\\\"==typeof r?[]:{}}return!0}},{\\\"./is_array\\\":697,\\\"fast-isnumeric\\\":214}],706:[function(t,e,r){\\\"use strict\\\";e.exports=function(){}},{}],707:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=[];e.exports=function(t,e){if(-1===a.indexOf(t)){a.push(t);var r=1e3;i(e)?r=e:\\\"long\\\"===e&&(r=3e3);var o=n.select(\\\"body\\\").selectAll(\\\".plotly-notifier\\\").data([0]);o.enter().append(\\\"div\\\").classed(\\\"plotly-notifier\\\",!0),o.selectAll(\\\".notifier-note\\\").data(a).enter().append(\\\"div\\\").classed(\\\"notifier-note\\\",!0).style(\\\"opacity\\\",0).each(function(t){var e=n.select(this);e.append(\\\"button\\\").classed(\\\"notifier-close\\\",!0).html(\\\"&times;\\\").on(\\\"click\\\",function(){e.transition().call(s)});for(var i=e.append(\\\"p\\\"),a=t.split(/<br\\\\s*\\\\/?>/g),o=0;o<a.length;o++)o&&i.append(\\\"br\\\"),i.append(\\\"span\\\").text(a[o]);e.transition().duration(700).style(\\\"opacity\\\",1).transition().delay(r).call(s)})}function s(t){t.duration(700).style(\\\"opacity\\\",0).each(\\\"end\\\",function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()})}}},{d3:148,\\\"fast-isnumeric\\\":214}],708:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./setcursor\\\"),i=\\\"data-savedcursor\\\";e.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr(\\\"class\\\")||\\\"\\\").split(\\\" \\\"),o=0;o<a.length;o++){var s=a[o];0===s.indexOf(\\\"cursor-\\\")&&t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,\\\"!!\\\")}n(t,e)}else r&&(t.attr(i,null),\\\"!!\\\"===r?n(t):n(t,r))}},{\\\"./setcursor\\\":717}],709:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./matrix\\\").dot,i=t(\\\"../constants/numerical\\\").BADNUM,a=e.exports={};a.tester=function(t){var e,r=t.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for(r.push(r[0]),e=1;e<r.length;e++)n=Math.min(n,r[e][0]),a=Math.max(a,r[e][0]),o=Math.min(o,r[e][1]),s=Math.max(s,r[e][1]);var l,c=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(c=!0,l=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(c=!0,l=function(t){return t[1]===r[0][1]}));var u=!0,f=r[0];for(e=1;e<r.length;e++)if(f[0]!==r[e][0]||f[1]!==r[e][1]){u=!1;break}return{xmin:n,xmax:a,ymin:o,ymax:s,pts:r,contains:c?function(t,e){var r=t[0],c=t[1];return!(r===i||r<n||r>a||c===i||c<o||c>s||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||l<n||l>a||c===i||c<o||c>s)return!1;var u,f,h,p,d,g=r.length,v=r[0][0],m=r[0][1],y=0;for(u=1;u<g;u++)if(f=v,h=m,v=r[u][0],m=r[u][1],!(l<(p=Math.min(f,v))||l>Math.max(f,v)||c>Math.max(h,m)))if(c<Math.min(h,m))l!==p&&y++;else{if(c===(d=v===f?c:h+(l-f)*(m-h)/(v-f)))return 1!==u||!e;c<=d&&l!==p&&y++}return y%2==1},isRect:c,degenerate:u}};var o=a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],c=[t[r][0]-l[0],t[r][1]-l[1]],u=n(c,c),f=Math.sqrt(u),h=[-c[1]/f,c[0]/f];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,c))<0||s>u||Math.abs(n(o,h))>i)return!0;return!1};a.filter=function(t,e){var r=[t[0]],n=0,i=0;function a(a){t.push(a);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c<t.length;c++)(c===t.length-1||o(t,l,c+1,e))&&(r.push(t[c]),r.length<s-2&&(n=c,i=r.length-1),l=c)}t.length>1&&a(t.pop());return{addPt:a,raw:t,filtered:r}}},{\\\"../constants/numerical\\\":673,\\\"./matrix\\\":703}],710:[function(t,e,r){(function(r){\\\"use strict\\\";var n=t(\\\"./show_no_webgl_msg\\\"),i=t(\\\"regl\\\");e.exports=function(t,e){var a=t._fullLayout,o=!0;return a._glcanvas.each(function(n){if(!n.regl&&(!n.pick||a._has(\\\"parcoords\\\"))){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[]})}catch(t){o=!1}o&&this.addEventListener(\\\"webglcontextlost\\\",function(e){t&&t.emit&&t.emit(\\\"plotly_webglcontextlost\\\",{event:e,layer:n.key})},!1)}}),o||n({container:a._glcontainer.node()}),o}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"./show_no_webgl_msg\\\":718,regl:478}],711:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;r<t.length;r++)if(t[r]instanceof RegExp&&t[r].toString()===n)return t;t.push(e)}else!e&&0!==e||-1!==t.indexOf(e)||t.push(e);return t}},{}],712:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plot_api/plot_config\\\");var a={add:function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},redo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.redo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}}};a.plotDo=function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a<e.length;a++)r=e[a],i[a]=r===t?r:\\\"object\\\"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)},e.exports=a},{\\\"../lib\\\":696,\\\"../plot_api/plot_config\\\":733}],713:[function(t,e,r){\\\"use strict\\\";r.counter=function(t,e,r){var n=(e||\\\"\\\")+(r?\\\"\\\":\\\"$\\\");return\\\"xy\\\"===t?new RegExp(\\\"^x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?\\\"+n):new RegExp(\\\"^\\\"+t+\\\"([2-9]|[1-9][0-9]+)?\\\"+n)}},{}],714:[function(t,e,r){\\\"use strict\\\";var n=/^(.*)(\\\\.[^\\\\.\\\\[\\\\]]+|\\\\[\\\\d\\\\])$/,i=/^[^\\\\.\\\\[\\\\]]+$/;e.exports=function(t,e){for(;e;){var r=t.match(n);if(r)t=r[1];else{if(!t.match(i))throw new Error(\\\"bad relativeAttr call:\\\"+[t,e]);t=\\\"\\\"}if(\\\"^\\\"!==e.charAt(0))break;e=e.slice(1)}return t&&\\\"[\\\"!==e.charAt(0)?t+\\\".\\\"+e:t+e}},{}],715:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is_array\\\").isArrayOrTypedArray,i=t(\\\"./is_plain_object\\\");e.exports=function t(e,r){for(var a in r){var o=r[a],s=e[a];if(s!==o)if(\\\"_\\\"===a.charAt(0)||\\\"function\\\"==typeof o){if(a in e)continue;e[a]=o}else if(n(o)&&n(s)&&i(o[0])){if(\\\"customdata\\\"===a||\\\"ids\\\"===a)continue;for(var l=Math.min(o.length,s.length),c=0;c<l;c++)s[c]!==o[c]&&i(o[c])&&i(s[c])&&t(s[c],o[c])}else i(o)&&i(s)&&(t(s,o),Object.keys(s).length||delete e[a])}}},{\\\"./is_array\\\":697,\\\"./is_plain_object\\\":698}],716:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"./loggers\\\"),a=t(\\\"./identity\\\");function o(t,e){return t<e}function s(t,e){return t<=e}function l(t,e){return t>e}function c(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,u,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(u=d>=0?r?o:s:r?c:l,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f<h&&p++<100;)u(e[a=Math.floor((f+h)/2)],t)?f=a+1:h=a;return p>90&&i.log(\\\"Long binary search...\\\"),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;s<n;s++)e[s+1]>e[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i<a&&o++<100;)e[n=c((i+a)/2)]<=t?i=n+s:a=n-l;return e[i]},r.sort=function(t,e){for(var r=0,n=0,i=1;i<t.length;i++){var a=e(t[i],t[i-1]);if(a<0?r=1:a>0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;i<t.length;i++){var o=e(t[i]);o<n&&(n=o,r=i)}return r}},{\\\"./identity\\\":695,\\\"./loggers\\\":701,\\\"fast-isnumeric\\\":214}],717:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){(t.attr(\\\"class\\\")||\\\"\\\").split(\\\" \\\").forEach(function(e){0===e.indexOf(\\\"cursor-\\\")&&t.classed(e,!1)}),e&&t.classed(\\\"cursor-\\\"+e,!0)}},{}],718:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../components/color\\\"),i=function(){};e.exports=function(t){for(var e in t)\\\"function\\\"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement(\\\"div\\\");r.className=\\\"no-webgl\\\",r.style.cursor=\\\"pointer\\\",r.style.fontSize=\\\"24px\\\",r.style.color=n.defaults[0],r.style.position=\\\"absolute\\\",r.style.left=r.style.top=\\\"0px\\\",r.style.width=r.style.height=\\\"100%\\\",r.style[\\\"background-color\\\"]=n.lightLine,r.style[\\\"z-index\\\"]=30;var a=document.createElement(\\\"p\\\");return a.textContent=\\\"WebGL is not supported by your browser - visit https://get.webgl.org for more info\\\",a.style.position=\\\"relative\\\",a.style.top=\\\"50%\\\",a.style.left=\\\"50%\\\",a.style.height=\\\"30%\\\",a.style.width=\\\"50%\\\",a.style.margin=\\\"-15% 0 0 -25%\\\",r.appendChild(a),t.container.appendChild(r),t.container.style.background=\\\"#FFFFFF\\\",t.container.onclick=function(){window.open(\\\"https://get.webgl.org\\\")},!1}},{\\\"../components/color\\\":570}],719:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"./is_array\\\").isArrayOrTypedArray;r.aggNums=function(t,e,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;s<o;s++)l[s]=r.aggNums(t,e,a[s]);a=l}for(s=0;s<o;s++)n(e)?n(a[s])&&(e=t(+e,+a[s])):e=a[s];return e},r.len=function(t){return r.aggNums(function(t){return t+1},0,t)},r.mean=function(t,e){return e||(e=r.len(t)),r.aggNums(function(t,e){return t+e},0,t)/e},r.midRange=function(t){if(void 0!==t&&0!==t.length)return(r.aggNums(Math.max,null,t)+r.aggNums(Math.min,null,t))/2},r.variance=function(t,e,i){return e||(e=r.len(t)),n(i)||(i=r.mean(t,e)),r.aggNums(function(t,e){return t+Math.pow(e-i,2)},0,t)/e},r.stdev=function(t,e,n){return Math.sqrt(r.variance(t,e,n))},r.interp=function(t,e){if(!n(e))throw\\\"n should be a finite number\\\";if((e=e*t.length-.5)<0)return t[0];if(e>t.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\\\"./is_array\\\":697,\\\"fast-isnumeric\\\":214}],720:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-normalize\\\");e.exports=function(t){return t?n(t):[0,0,0,1]}},{\\\"color-normalize\\\":108}],721:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../constants/xmlns_namespaces\\\"),o=t(\\\"../constants/alignment\\\").LINE_SPACING;function s(t,e){return t.node().getBoundingClientRect()[e]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,v){var S=t.text(),C=!t.attr(\\\"data-notex\\\")&&\\\"undefined\\\"!=typeof MathJax&&S.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var z=t.attr(\\\"class\\\")?t.attr(\\\"class\\\").split(\\\" \\\")[0]:\\\"text\\\";return z+=\\\"-math\\\",L.selectAll(\\\"svg.\\\"+z).remove(),L.selectAll(\\\"g.\\\"+z+\\\"-group\\\").remove(),t.style(\\\"display\\\",null).attr({\\\"data-unformatted\\\":S,\\\"data-math\\\":\\\"N\\\"}),C?(e&&e._promises||[]).push(new Promise(function(e){t.style(\\\"display\\\",\\\"none\\\");var r=parseInt(t.node().style.fontSize,10),a={fontSize:r};!function(t,e,r){var a,o,s,l;MathJax.Hub.Queue(function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:\\\"none\\\",tex2jax:{inlineMath:[[\\\"$\\\",\\\"$\\\"],[\\\"\\\\\\\\(\\\",\\\"\\\\\\\\)\\\"]]},displayAlign:\\\"left\\\"})},function(){if(\\\"SVG\\\"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer(\\\"SVG\\\")},function(){var r=\\\"math-output-\\\"+i.randstr({},64);return l=n.select(\\\"body\\\").append(\\\"div\\\").attr({id:r}).style({visibility:\\\"hidden\\\",position:\\\"absolute\\\"}).style({\\\"font-size\\\":e.fontSize+\\\"px\\\"}).text(t.replace(c,\\\"\\\\\\\\lt \\\").replace(u,\\\"\\\\\\\\gt \\\")),MathJax.Hub.Typeset(l.node())},function(){var e=n.select(\\\"body\\\").select(\\\"#MathJax_SVG_glyphs\\\");if(l.select(\\\".MathJax_SVG\\\").empty()||!l.select(\\\"svg\\\").node())i.log(\\\"There was an error in the tex syntax.\\\",t),r();else{var o=l.select(\\\"svg\\\").node().getBoundingClientRect();r(l.select(\\\".MathJax_SVG\\\"),e,o)}if(l.remove(),\\\"SVG\\\"!==a)return MathJax.Hub.setRenderer(a)},function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})}(C[2],a,function(n,i,a){L.selectAll(\\\"svg.\\\"+z).remove(),L.selectAll(\\\"g.\\\"+z+\\\"-group\\\").remove();var o=n&&n.select(\\\"svg\\\");if(!o||!o.node())return O(),void e();var l=L.append(\\\"g\\\").classed(z+\\\"-group\\\",!0).attr({\\\"pointer-events\\\":\\\"none\\\",\\\"data-unformatted\\\":S,\\\"data-math\\\":\\\"Y\\\"});l.node().appendChild(o.node()),i&&i.node()&&o.node().insertBefore(i.node().cloneNode(!0),o.node().firstChild),o.attr({class:z,height:a.height,preserveAspectRatio:\\\"xMinYMin meet\\\"}).style({overflow:\\\"visible\\\",\\\"pointer-events\\\":\\\"none\\\"});var c=t.node().style.fill||\\\"black\\\";o.select(\\\"g\\\").attr({fill:c,stroke:c});var u=s(o,\\\"width\\\"),f=s(o,\\\"height\\\"),h=+t.attr(\\\"x\\\")-u*{start:0,middle:.5,end:1}[t.attr(\\\"text-anchor\\\")||\\\"start\\\"],p=-(r||s(t,\\\"height\\\"))/4;\\\"y\\\"===z[0]?(l.attr({transform:\\\"rotate(\\\"+[-90,+t.attr(\\\"x\\\"),+t.attr(\\\"y\\\")]+\\\") translate(\\\"+[-u/2,p-f/2]+\\\")\\\"}),o.attr({x:+t.attr(\\\"x\\\"),y:+t.attr(\\\"y\\\")})):\\\"l\\\"===z[0]?o.attr({x:t.attr(\\\"x\\\"),y:p-f/2}):\\\"a\\\"===z[0]?o.attr({x:0,y:p}):o.attr({x:h,y:+t.attr(\\\"y\\\")+p-f/2}),v&&v.call(t,l),e(l)})})):O(),t}function O(){L.empty()||(z=t.attr(\\\"class\\\")+\\\"-math\\\",L.select(\\\"svg.\\\"+z).remove()),t.text(\\\"\\\").style(\\\"white-space\\\",\\\"pre\\\"),function(t,e){e=e.replace(m,\\\" \\\");var r,s=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(a.svg,\\\"tspan\\\");n.select(e).attr({class:\\\"line\\\",dy:c*o+\\\"em\\\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var s=1;s<i.length;s++)v(i[s])}function v(t){var e,i=t.type,o={};if(\\\"a\\\"===i){e=\\\"a\\\";var s=t.target,c=t.href,u=t.popup;c&&(o={\\\"xlink:xlink:show\\\":\\\"_blank\\\"===s||\\\"_\\\"!==s.charAt(0)?\\\"new\\\":\\\"replace\\\",target:s,\\\"xlink:xlink:href\\\":c},u&&(o.onclick='window.open(this.href.baseVal,this.target.baseVal,\\\"'+u+'\\\");return false;'))}else e=\\\"tspan\\\";t.style&&(o.style=t.style);var f=document.createElementNS(a.svg,e);if(\\\"sup\\\"===i||\\\"sub\\\"===i){S(r,d),r.appendChild(f);var g=document.createElementNS(a.svg,\\\"tspan\\\");S(g,d),n.select(g).attr(\\\"dy\\\",p[i]),o.dy=h[i],r.appendChild(f),r.appendChild(g)}else r.appendChild(f);n.select(f).attr(o),r=t.node=f,l.push(t)}function S(t,e){t.appendChild(document.createTextNode(e))}function C(t){if(1!==l.length){var n=l.pop();t!==n.type&&i.log(\\\"Start tag <\\\"+n.type+\\\"> doesn't match end tag <\\\"+t+\\\">. Pretending it did match.\\\",e),r=l[l.length-1].node}else i.log(\\\"Ignoring unexpected end tag </\\\"+t+\\\">.\\\",e)}b.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(y),z=0;z<L.length;z++){var O=L[z],I=O.match(x),P=I&&I[2].toLowerCase(),D=f[P];if(\\\"br\\\"===P)u();else if(void 0===D)S(r,E(O));else if(I[1])C(P);else{var R=I[4],B={type:P},F=A(R,_);if(F?(F=F.replace(T,\\\"$1 fill:\\\"),D&&(F+=\\\";\\\"+D)):D&&(F=D),F&&(B.style=F),\\\"a\\\"===P){s=!0;var N=A(R,w);if(N){var j=document.createElement(\\\"a\\\");j.href=N,-1!==g.indexOf(j.protocol)&&(B.href=encodeURI(decodeURI(N)),B.target=A(R,k)||\\\"_blank\\\",B.popup=A(R,M))}}v(B)}}return s}(t.node(),S)&&t.style(\\\"pointer-events\\\",\\\"all\\\"),r.positionText(t),v&&v.call(t)}};var c=/(<|&lt;|&#60;)/g,u=/(>|&gt;|&#62;)/g;var f={sup:\\\"font-size:70%\\\",sub:\\\"font-size:70%\\\",b:\\\"font-weight:bold\\\",i:\\\"font-style:italic\\\",a:\\\"cursor:pointer\\\",span:\\\"\\\",em:\\\"font-style:italic;font-weight:bold\\\"},h={sub:\\\"0.3em\\\",sup:\\\"-0.6em\\\"},p={sub:\\\"-0.21em\\\",sup:\\\"0.42em\\\"},d=\\\"\\\\u200b\\\",g=[\\\"http:\\\",\\\"https:\\\",\\\"mailto:\\\",\\\"\\\",void 0,\\\":\\\"],v=new RegExp(\\\"</?(\\\"+Object.keys(f).join(\\\"|\\\")+\\\")( [^>]*)?/?>\\\",\\\"g\\\"),m=/(\\\\r\\\\n?|\\\\n)/g,y=/(<[^<>]*>)/,x=/<(\\\\/?)([^ >]*)(\\\\s+(.*))?>/i,b=/<br(\\\\s+.*)?>/i,_=/(^|[\\\\s\\\"'])style\\\\s*=\\\\s*(\\\"([^\\\"]*);?\\\"|'([^']*);?')/i,w=/(^|[\\\\s\\\"'])href\\\\s*=\\\\s*(\\\"([^\\\"]*)\\\"|'([^']*)')/i,k=/(^|[\\\\s\\\"'])target\\\\s*=\\\\s*(\\\"([^\\\"\\\\s]*)\\\"|'([^'\\\\s]*)')/i,M=/(^|[\\\\s\\\"'])popup\\\\s*=\\\\s*(\\\"([\\\\w=,]*)\\\"|'([\\\\w=,]*)')/i;function A(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var T=/(^|;)\\\\s*color:/;r.plainText=function(t){return(t||\\\"\\\").replace(v,\\\" \\\")};var S={mu:\\\"\\\\u03bc\\\",amp:\\\"&\\\",lt:\\\"<\\\",gt:\\\">\\\",nbsp:\\\"\\\\xa0\\\",times:\\\"\\\\xd7\\\",plusmn:\\\"\\\\xb1\\\",deg:\\\"\\\\xb0\\\"},C=/&(#\\\\d+|#x[\\\\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(C,function(t,e){return(\\\"#\\\"===e.charAt(0)?function(t){if(t>1114111)return;var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}(\\\"x\\\"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t})}function L(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||\\\"top\\\",l=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return i=\\\"bottom\\\"===s?function(){return l.bottom-n.height}:\\\"middle\\\"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a=\\\"right\\\"===o?function(){return l.right-n.width}:\\\"center\\\"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-c.top+\\\"px\\\",left:a()-c.left+\\\"px\\\",\\\"z-index\\\":1e3}),this}}r.convertEntities=E,r.lineCount=function(t){return t.selectAll(\\\"tspan.line\\\").size()||1},r.positionText=function(t,e,r){return t.each(function(){var t=n.select(this);function i(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var a=i(\\\"x\\\",e),o=i(\\\"y\\\",r);\\\"text\\\"===this.nodeName&&t.selectAll(\\\"tspan.line\\\").attr({x:a,y:o})})},r.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch(\\\"edit\\\",\\\"input\\\",\\\"cancel\\\"),o=i||t;if(t.style({\\\"pointer-events\\\":i?\\\"none\\\":\\\"all\\\"}),1!==t.size())throw new Error(\\\"boo\\\");function s(){!function(){var i=n.select(r).select(\\\".svg-container\\\"),o=i.append(\\\"div\\\"),s=t.node().style,c=parseFloat(s.fontSize||12),u=e.text;void 0===u&&(u=t.attr(\\\"data-unformatted\\\"));o.classed(\\\"plugin-editable editable\\\",!0).style({position:\\\"absolute\\\",\\\"font-family\\\":s.fontFamily||\\\"Arial\\\",\\\"font-size\\\":c,color:e.fill||s.fill||\\\"black\\\",opacity:1,\\\"background-color\\\":e.background||\\\"transparent\\\",outline:\\\"#ffffff33 1px solid\\\",margin:[-c/8+1,0,0,-1].join(\\\"px \\\")+\\\"px\\\",padding:\\\"0\\\",\\\"box-sizing\\\":\\\"border-box\\\"}).attr({contenteditable:!0}).text(u).call(L(t,i,e)).on(\\\"blur\\\",function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr(\\\"class\\\");(e=i?\\\".\\\"+i.split(\\\" \\\")[0]+\\\"-math-group\\\":\\\"[class*=-math-group]\\\")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on(\\\"mouseup\\\",null),a.edit.call(t,o)}).on(\\\"focus\\\",function(){var t=this;r._editing=!0,n.select(document).on(\\\"mouseup\\\",function(){if(n.event.target===t)return!1;document.activeElement===o.node()&&o.node().blur()})}).on(\\\"keyup\\\",function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on(\\\"blur\\\",function(){return!1}).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(L(t,i,e)))}).on(\\\"keydown\\\",function(){13===n.event.which&&this.blur()}).call(l)}(),t.style({opacity:0});var i,s=o.attr(\\\"class\\\");(i=s?\\\".\\\"+s.split(\\\" \\\")[0]+\\\"-math-group\\\":\\\"[class*=-math-group]\\\")&&n.select(t.node().parentNode).select(i).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on(\\\"click\\\",s),n.rebind(t,a,\\\"on\\\")}},{\\\"../constants/alignment\\\":668,\\\"../constants/xmlns_namespaces\\\":674,\\\"../lib\\\":696,d3:148}],722:[function(t,e,r){\\\"use strict\\\";var n={};function i(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var a=n[t],o=Date.now();if(!a){for(var s in n)n[s].ts<o-6e4&&delete n[s];a=n[t]={ts:0,timer:null}}function l(){r(),a.ts=Date.now(),a.onDone&&(a.onDone(),a.onDone=null)}i(a),o>a.ts+e?l():a.timer=setTimeout(function(){l(),a.timer=null},e)},r.done=function(t){var e=n[t];return e&&e.timer?new Promise(function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}}):Promise.resolve()},r.clear=function(t){if(t)i(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],723:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{\\\"fast-isnumeric\\\":214}],724:[function(t,e,r){\\\"use strict\\\";var n=e.exports={},i=t(\\\"../plots/geo/constants\\\").locationmodeToLayer,a=t(\\\"topojson-client\\\").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,\\\"-\\\"),\\\"_\\\",t.resolution.toString(),\\\"m\\\"].join(\\\"\\\")},n.getTopojsonPath=function(t,e){return t+e+\\\".json\\\"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{\\\"../plots/geo/constants\\\":774,\\\"topojson-client\\\":517}],725:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"locale\\\",name:\\\"en-US\\\",dictionary:{\\\"Click to enter Colorscale title\\\":\\\"Click to enter Colorscale title\\\"},format:{date:\\\"%m/%d/%Y\\\"}}},{}],726:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"locale\\\",name:\\\"en\\\",dictionary:{\\\"Click to enter Colorscale title\\\":\\\"Click to enter Colourscale title\\\"},format:{days:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],shortDays:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],months:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],shortMonths:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],periods:[\\\"AM\\\",\\\"PM\\\"],dateTime:\\\"%a %b %e %X %Y\\\",date:\\\"%d/%m/%Y\\\",time:\\\"%H:%M:%S\\\",decimal:\\\".\\\",thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"],year:\\\"%Y\\\",month:\\\"%b %Y\\\",dayMonth:\\\"%b %-d\\\",dayMonthYear:\\\"%b %-d, %Y\\\"}}},{}],727:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\");e.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split(\\\"[\\\")[0],s=0;s<a.length;s++)if((r=t.match(a[s]))&&0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\\\\[(0|[1-9][0-9]*)\\\\](\\\\.(.+))?$/))&&{array:e,index:Number(r[1]),property:r[3]||\\\"\\\"}:{array:e,index:\\\"\\\",property:\\\"\\\"}}},{\\\"../registry\\\":828}],728:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=n.extendFlat,a=n.isPlainObject,o={valType:\\\"flaglist\\\",extras:[\\\"none\\\"],flags:[\\\"calc\\\",\\\"clearAxisTypes\\\",\\\"plot\\\",\\\"style\\\",\\\"markerSize\\\",\\\"colorbars\\\"]},s={valType:\\\"flaglist\\\",extras:[\\\"none\\\"],flags:[\\\"calc\\\",\\\"plot\\\",\\\"legend\\\",\\\"ticks\\\",\\\"axrange\\\",\\\"layoutstyle\\\",\\\"modebar\\\",\\\"camera\\\",\\\"arraydraw\\\"]},l=o.flags.slice().concat([\\\"fullReplot\\\"]),c=s.flags.slice().concat(\\\"layoutReplot\\\");function u(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function f(t,e,r){var n=i({},t);for(var o in n){var s=n[o];a(s)&&(n[o]=h(s,e,r,o))}return\\\"from-root\\\"===r&&(n.editType=e),n}function h(t,e,r,n){if(t.valType){var a=i({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o<t.items.length;o++)a.items[o]=h(t.items[o],e,\\\"from-root\\\")}return a}return f(t,e,\\\"_\\\"===n.charAt(0)?\\\"nested\\\":\\\"from-root\\\")}e.exports={traces:o,layout:s,traceFlags:function(){return u(l)},layoutFlags:function(){return u(c)},update:function(t,e){var r=e.editType;if(r&&\\\"none\\\"!==r)for(var n=r.split(\\\"+\\\"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:f}},{\\\"../lib\\\":696}],729:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"gl-mat4/fromQuat\\\"),a=t(\\\"../registry\\\"),o=t(\\\"../lib\\\"),s=t(\\\"../plots/plots\\\"),l=t(\\\"../plots/cartesian/axis_ids\\\"),c=l.cleanId,u=l.getFromTrace,f=t(\\\"../components/color\\\");function h(t,e){var r=t[e],n=e.charAt(0);r&&\\\"paper\\\"!==r&&(t[e]=c(r,n))}function p(t){if(!o.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,(\\\"string\\\"==typeof e||\\\"number\\\"==typeof e)&&String(e)}function d(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,a=Math.min(t.length,e.length);for(i=0;i<a&&t.charAt(i)===e.charAt(i);i++);return t.substr(0,i).trim()}function g(t){var e=\\\"middle\\\",r=\\\"center\\\";return-1!==t.indexOf(\\\"top\\\")?e=\\\"top\\\":-1!==t.indexOf(\\\"bottom\\\")&&(e=\\\"bottom\\\"),-1!==t.indexOf(\\\"left\\\")?r=\\\"left\\\":-1!==t.indexOf(\\\"right\\\")&&(r=\\\"right\\\"),e+\\\" \\\"+r}function v(t,e){return e in t&&\\\"object\\\"==typeof t[e]&&0===Object.keys(t[e]).length}r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&o.log(\\\"Clearing previous rejected promises from queue.\\\"),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var n=(s.subplotsRegistry.cartesian||{}).attrRegex,a=(s.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(t);for(e=0;e<l.length;e++){var u=l[e];if(n&&n.test(u)){var p=t[u];p.anchor&&\\\"free\\\"!==p.anchor&&(p.anchor=c(p.anchor)),p.overlaying&&(p.overlaying=c(p.overlaying)),p.type||(p.isdate?p.type=\\\"date\\\":p.islog?p.type=\\\"log\\\":!1===p.isdate&&!1===p.islog&&(p.type=\\\"linear\\\")),\\\"withzero\\\"!==p.autorange&&\\\"tozero\\\"!==p.autorange||(p.autorange=!0,p.rangemode=\\\"tozero\\\"),delete p.islog,delete p.isdate,delete p.categories,v(p,\\\"domain\\\")&&delete p.domain,void 0!==p.autotick&&(void 0===p.tickmode&&(p.tickmode=p.autotick?\\\"auto\\\":\\\"linear\\\"),delete p.autotick)}else if(a&&a.test(u)){var d=t[u],g=d.cameraposition;if(Array.isArray(g)&&4===g[0].length){var m=g[0],y=g[1],x=g[2],b=i([],m),_=[];for(r=0;r<3;++r)_[r]=y[r]+x*b[2+4*r];d.camera={eye:{x:_[0],y:_[1],z:_[2]},center:{x:y[0],y:y[1],z:y[2]},up:{x:b[1],y:b[5],z:b[9]}},delete d.cameraposition}}}var w=Array.isArray(t.annotations)?t.annotations.length:0;for(e=0;e<w;e++){var k=t.annotations[e];o.isPlainObject(k)&&(k.ref&&(\\\"paper\\\"===k.ref?(k.xref=\\\"paper\\\",k.yref=\\\"paper\\\"):\\\"data\\\"===k.ref&&(k.xref=\\\"x\\\",k.yref=\\\"y\\\"),delete k.ref),h(k,\\\"xref\\\"),h(k,\\\"yref\\\"))}var M=Array.isArray(t.shapes)?t.shapes.length:0;for(e=0;e<M;e++){var A=t.shapes[e];o.isPlainObject(A)&&(h(A,\\\"xref\\\"),h(A,\\\"yref\\\"))}var T=t.legend;return T&&(T.x>3?(T.x=1.02,T.xanchor=\\\"left\\\"):T.x<-2&&(T.x=-.02,T.xanchor=\\\"right\\\"),T.y>3?(T.y=1.02,T.yanchor=\\\"bottom\\\"):T.y<-2&&(T.y=-.02,T.yanchor=\\\"top\\\")),\\\"rotate\\\"===t.dragmode&&(t.dragmode=\\\"orbit\\\"),f.clean(t),t},r.cleanData=function(t){for(var e=0;e<t.length;e++){var n,i=t[e];if(\\\"histogramy\\\"===i.type&&\\\"xbins\\\"in i&&!(\\\"ybins\\\"in i)&&(i.ybins=i.xbins,delete i.xbins),i.error_y&&\\\"opacity\\\"in i.error_y){var l=f.defaults,u=i.error_y.color||(a.traceIs(i,\\\"bar\\\")?f.defaultLine:l[e%l.length]);i.error_y.color=f.addOpacity(f.rgb(u),f.opacity(u)*i.error_y.opacity),delete i.error_y.opacity}if(\\\"bardir\\\"in i&&(\\\"h\\\"!==i.bardir||!a.traceIs(i,\\\"bar\\\")&&\\\"histogram\\\"!==i.type.substr(0,9)||(i.orientation=\\\"h\\\",r.swapXYData(i)),delete i.bardir),\\\"histogramy\\\"===i.type&&r.swapXYData(i),\\\"histogramx\\\"!==i.type&&\\\"histogramy\\\"!==i.type||(i.type=\\\"histogram\\\"),\\\"scl\\\"in i&&(i.colorscale=i.scl,delete i.scl),\\\"reversescl\\\"in i&&(i.reversescale=i.reversescl,delete i.reversescl),i.xaxis&&(i.xaxis=c(i.xaxis,\\\"x\\\")),i.yaxis&&(i.yaxis=c(i.yaxis,\\\"y\\\")),a.traceIs(i,\\\"gl3d\\\")&&i.scene&&(i.scene=s.subplotsRegistry.gl3d.cleanId(i.scene)),!a.traceIs(i,\\\"pie\\\")&&!a.traceIs(i,\\\"bar\\\"))if(Array.isArray(i.textposition))for(n=0;n<i.textposition.length;n++)i.textposition[n]=g(i.textposition[n]);else i.textposition&&(i.textposition=g(i.textposition));var h=a.getModule(i);if(h&&h.colorbar){var m=h.colorbar.container,y=m?i[m]:i;y&&y.colorscale&&(\\\"YIGnBu\\\"===y.colorscale&&(y.colorscale=\\\"YlGnBu\\\"),\\\"YIOrRd\\\"===y.colorscale&&(y.colorscale=\\\"YlOrRd\\\"))}if(\\\"surface\\\"===i.type&&o.isPlainObject(i.contours)){var x=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];for(n=0;n<x.length;n++){var b=i.contours[x[n]];o.isPlainObject(b)&&(b.highlightColor&&(b.highlightcolor=b.highlightColor,delete b.highlightColor),b.highlightWidth&&(b.highlightwidth=b.highlightWidth,delete b.highlightWidth))}}if(\\\"candlestick\\\"===i.type||\\\"ohlc\\\"===i.type){var _=!1!==(i.increasing||{}).showlegend,w=!1!==(i.decreasing||{}).showlegend,k=p(i.increasing),M=p(i.decreasing);if(!1!==k&&!1!==M){var A=d(k,M,_,w);A&&(i.name=A)}else!k&&!M||i.name||(i.name=k||M)}if(Array.isArray(i.transforms)){var T=i.transforms;for(n=0;n<T.length;n++){var S=T[n];if(o.isPlainObject(S))switch(S.type){case\\\"filter\\\":S.filtersrc&&(S.target=S.filtersrc,delete S.filtersrc),S.calendar&&(S.valuecalendar||(S.valuecalendar=S.calendar),delete S.calendar);break;case\\\"groupby\\\":if(S.styles=S.styles||S.style,S.styles&&!Array.isArray(S.styles)){var C=S.styles,E=Object.keys(C);S.styles=[];for(var L=0;L<E.length;L++)S.styles.push({target:E[L],value:C[E[L]]})}}}}v(i,\\\"line\\\")&&delete i.line,\\\"marker\\\"in i&&(v(i.marker,\\\"line\\\")&&delete i.marker.line,v(i,\\\"marker\\\")&&delete i.marker),f.clean(i),i.autobinx&&(delete i.autobinx,delete i.xbins),i.autobiny&&(delete i.autobiny,delete i.ybins)}},r.swapXYData=function(t){var e;if(o.swapAttrs(t,[\\\"?\\\",\\\"?0\\\",\\\"d?\\\",\\\"?bins\\\",\\\"nbins?\\\",\\\"autobin?\\\",\\\"?src\\\",\\\"error_?\\\"]),Array.isArray(t.z)&&Array.isArray(t.z[0])&&(t.transpose?delete t.transpose:t.transpose=!0),t.error_x&&t.error_y){var r=t.error_y,n=\\\"copy_ystyle\\\"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(t,[\\\"error_?.copy_ystyle\\\"]),n&&o.swapAttrs(t,[\\\"error_?.color\\\",\\\"error_?.thickness\\\",\\\"error_?.width\\\"])}if(\\\"string\\\"==typeof t.hoverinfo){var i=t.hoverinfo.split(\\\"+\\\");for(e=0;e<i.length;e++)\\\"x\\\"===i[e]?i[e]=\\\"y\\\":\\\"y\\\"===i[e]&&(i[e]=\\\"x\\\");t.hoverinfo=i.join(\\\"+\\\")}},r.coerceTraceIndices=function(t,e){if(n(e))return[e];if(!Array.isArray(e)||!e.length)return t.data.map(function(t,e){return e});if(Array.isArray(e)){for(var r=[],i=0;i<e.length;i++)o.isIndex(e[i],t.data.length)?r.push(e[i]):o.warn(\\\"trace index (\\\",e[i],\\\") is not a number or is out of bounds\\\");return r}return e},r.manageArrayContainers=function(t,e,r){var i=t.obj,a=t.parts,s=a.length,l=a[s-1],c=n(l);if(c&&null===e){var u=a.slice(0,s-1).join(\\\".\\\");o.nestedProperty(i,u).get().splice(l,1)}else c&&void 0===t.get()?(void 0===t.get()&&(r[t.astr]=null),t.set(e)):t.set(e)};var m=/(\\\\.[^\\\\[\\\\]\\\\.]+|\\\\[[^\\\\[\\\\]\\\\.]+\\\\])$/;function y(t){var e=t.search(m);if(e>0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=y(e);r;){if(r in t)return!0;r=y(r)}return!1};var x=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n<e.length;n++)for(var i=t._fullData[n],a=0;a<3;a++){var s=u(t,i,x[a]);if(s&&\\\"log\\\"!==s.type){var l=s._name,c=s._id.substr(1);if(\\\"scene\\\"===c.substr(0,5)){if(void 0!==r[c])continue;l=c+\\\".\\\"+l}var f=l+\\\".type\\\";void 0===r[l]&&void 0===r[f]&&o.nestedProperty(t.layout,f).set(null)}}}},{\\\"../components/color\\\":570,\\\"../lib\\\":696,\\\"../plots/cartesian/axis_ids\\\":748,\\\"../plots/plots\\\":809,\\\"../registry\\\":828,\\\"fast-isnumeric\\\":214,\\\"gl-mat4/fromQuat\\\":251}],730:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./plot_api\\\");r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.react=n.react,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.setPlotConfig=n.setPlotConfig,r.toImage=t(\\\"./to_image\\\"),r.validate=t(\\\"./validate\\\"),r.downloadImage=t(\\\"../snapshot/download\\\");var i=t(\\\"./template_api\\\");r.makeTemplate=i.makeTemplate,r.validateTemplate=i.validateTemplate},{\\\"../snapshot/download\\\":830,\\\"./plot_api\\\":732,\\\"./template_api\\\":737,\\\"./to_image\\\":738,\\\"./validate\\\":739}],731:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib/nested_property\\\"),i=t(\\\"../lib/is_plain_object\\\"),a=t(\\\"../lib/noop\\\"),o=t(\\\"../lib/loggers\\\"),s=t(\\\"../lib/search\\\").sorterAsc,l=t(\\\"../registry\\\");r.containerArrayMatch=t(\\\"./container_array_match\\\");var c=r.isAddVal=function(t){return\\\"add\\\"===t||i(t)},u=r.isRemoveVal=function(t){return null===t||\\\"remove\\\"===t};r.applyContainerArrayChanges=function(t,e,r,i){var f=e.astr,h=l.getComponentMethod(f,\\\"supplyLayoutDefaults\\\"),p=l.getComponentMethod(f,\\\"draw\\\"),d=l.getComponentMethod(f,\\\"drawOne\\\"),g=i.replot||i.recalc||h===a||p===a,v=t.layout,m=t._fullLayout;if(r[\\\"\\\"]){Object.keys(r).length>1&&o.warn(\\\"Full array edits are incompatible with other edits\\\",f);var y=r[\\\"\\\"][\\\"\\\"];if(u(y))e.set(null);else{if(!Array.isArray(y))return o.warn(\\\"Unrecognized full array edit value\\\",f,y),!0;e.set(y)}return!g&&(h(v,m),p(t),!0)}var x,b,_,w,k,M,A,T=Object.keys(r).map(Number).sort(s),S=e.get(),C=S||[],E=n(m,f).get(),L=[],z=-1,O=C.length;for(x=0;x<T.length;x++)if(w=r[_=T[x]],k=Object.keys(w),M=w[\\\"\\\"],A=c(M),_<0||_>C.length-(A?0:1))o.warn(\\\"index out of range\\\",f,_);else if(void 0!==M)k.length>1&&o.warn(\\\"Insertion & removal are incompatible with edits to the same index.\\\",f,_),u(M)?L.push(_):A?(\\\"add\\\"===M&&(M={}),C.splice(_,0,M),E&&E.splice(_,0,{})):o.warn(\\\"Unrecognized full object edit value\\\",f,_,M),-1===z&&(z=_);else for(b=0;b<k.length;b++)n(C[_],k[b]).set(w[k[b]]);for(x=L.length-1;x>=0;x--)C.splice(L[x],1),E&&E.splice(L[x],1);if(C.length?S||e.set(C):e.set(null),g)return!1;if(h(v,m),d!==a){var I;if(-1===z)I=T;else{for(O=Math.max(C.length,O),I=[],x=0;x<T.length&&!((_=T[x])>=z);x++)I.push(_);for(x=z;x<O;x++)I.push(x)}for(x=0;x<I.length;x++)d(t,I[x])}else p(t);return!0}},{\\\"../lib/is_plain_object\\\":698,\\\"../lib/loggers\\\":701,\\\"../lib/nested_property\\\":705,\\\"../lib/noop\\\":706,\\\"../lib/search\\\":716,\\\"../registry\\\":828,\\\"./container_array_match\\\":727}],732:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"has-hover\\\"),o=t(\\\"../lib\\\"),s=t(\\\"../lib/events\\\"),l=t(\\\"../lib/queue\\\"),c=t(\\\"../registry\\\"),u=t(\\\"./plot_schema\\\"),f=t(\\\"../plots/plots\\\"),h=t(\\\"../plots/polar/legacy\\\"),p=t(\\\"../plots/cartesian/axes\\\"),d=t(\\\"../components/drawing\\\"),g=t(\\\"../components/color\\\"),v=t(\\\"../components/colorbar/connect\\\"),m=t(\\\"../plots/cartesian/graph_interact\\\").initInteractions,y=t(\\\"../constants/xmlns_namespaces\\\"),x=t(\\\"../lib/svg_text_utils\\\"),b=t(\\\"./plot_config\\\"),_=t(\\\"./manage_arrays\\\"),w=t(\\\"./helpers\\\"),k=t(\\\"./subroutines\\\"),M=t(\\\"./edit_types\\\"),A=t(\\\"../plots/cartesian/constants\\\").AX_NAME_PATTERN,T=0;function S(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit(\\\"plotly_afterplot\\\")}function C(t,e){try{t._fullLayout._paper.style(\\\"background\\\",e)}catch(t){o.error(t)}}function E(t,e){C(t,g.combine(e,\\\"white\\\"))}function L(t,e){t._context||(t._context=o.extendDeep({},b));var r,n,i,s=t._context;if(e){for(n=Object.keys(e),r=0;r<n.length;r++)\\\"editable\\\"!==(i=n[r])&&\\\"edits\\\"!==i&&i in s&&(\\\"setBackground\\\"===i&&\\\"opaque\\\"===e[i]?s[i]=E:s[i]=e[i]);e.plot3dPixelRatio&&!s.plotGlPixelRatio&&(s.plotGlPixelRatio=s.plot3dPixelRatio);var l=e.editable;if(void 0!==l)for(s.editable=l,n=Object.keys(s.edits),r=0;r<n.length;r++)s.edits[n[r]]=l;if(e.edits)for(n=Object.keys(e.edits),r=0;r<n.length;r++)(i=n[r])in s.edits&&(s.edits[i]=e.edits[i])}s.staticPlot&&(s.editable=!1,s.edits={},s.autosizable=!1,s.scrollZoom=!1,s.doubleClick=!1,s.showTips=!1,s.showLink=!1,s.displayModeBar=!1),\\\"hover\\\"!==s.displayModeBar||a||(s.displayModeBar=!0),\\\"transparent\\\"!==s.setBackground&&\\\"function\\\"==typeof s.setBackground||(s.setBackground=C),s._hasZeroHeight=s._hasZeroHeight||0===t.clientHeight,s._hasZeroWidth=s._hasZeroWidth||0===t.clientWidth}function z(t,e){var r,n,i=e+1,a=[];for(r=0;r<t.length;r++)(n=t[r])<0?a.push(i+n):a.push(n);return a}function O(t,e,r){var n,i;for(n=0;n<e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error(\\\"all values in \\\"+r+\\\" must be integers\\\");if(i>=t.data.length||i<-t.data.length)throw new Error(r+\\\" must be valid indices for gd.data.\\\");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error(\\\"each index in \\\"+r+\\\" must be unique.\\\")}}function I(t,e,r){if(!Array.isArray(t.data))throw new Error(\\\"gd.data must be an array.\\\");if(\\\"undefined\\\"==typeof e)throw new Error(\\\"currentIndices is a required argument.\\\");if(Array.isArray(e)||(e=[e]),O(t,e,\\\"currentIndices\\\"),\\\"undefined\\\"==typeof r||Array.isArray(r)||(r=[r]),\\\"undefined\\\"!=typeof r&&O(t,r,\\\"newIndices\\\"),\\\"undefined\\\"!=typeof r&&e.length!==r.length)throw new Error(\\\"current and new indices must be of equal length.\\\")}function P(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error(\\\"gd.data must be an array\\\");if(!o.isPlainObject(e))throw new Error(\\\"update must be a key:value object\\\");if(\\\"undefined\\\"==typeof r)throw new Error(\\\"indices must be an integer or array of integers\\\");for(var a in O(t,r,\\\"indices\\\"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error(\\\"attribute \\\"+a+\\\" must be an array of length equal to indices array length\\\");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error(\\\"when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object\\\")}}(t,e,r,n);for(var s=function(t,e,r,n){var a,s,l,c,u,f=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=z(r,t.data.length-1),e)for(var d=0;d<r.length;d++){if(a=t.data[r[d]],s=(l=o.nestedProperty(a,p)).get(),c=e[p][d],!o.isArrayOrTypedArray(c))throw new Error(\\\"attribute: \\\"+p+\\\" index: \\\"+d+\\\" must be an array\\\");if(!o.isArrayOrTypedArray(s))throw new Error(\\\"cannot extend missing or non-array attribute: \\\"+p);if(s.constructor!==c.constructor)throw new Error(\\\"cannot extend array with an array of a different type: \\\"+p);u=f?n[p][d]:n,i(u)||(u=-1),h.push({prop:l,target:s,insert:c,maxp:Math.floor(u)})}return h}(t,e,r,n),l={},c={},u=0;u<s.length;u++){var f=s[u].prop,h=s[u].maxp,p=a(s[u].target,s[u].insert,h);f.set(p[0]),Array.isArray(l[f.astr])||(l[f.astr]=[]),l[f.astr].push(p[1]),Array.isArray(c[f.astr])||(c[f.astr]=[]),c[f.astr].push(s[u].target.length)}return{update:l,maxPoints:c}}function D(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}function R(t){return void 0===t?null:t}function B(t,e,r){var n,i,a=t._fullLayout,s=t._fullData,l=t.data,h=M.traceFlags(),d={},g={};function v(){return r.map(function(){})}function m(t){var e=p.id2name(t);-1===i.indexOf(e)&&i.push(e)}function y(t){return\\\"LAYOUT\\\"+t+\\\".autorange\\\"}function x(t){return\\\"LAYOUT\\\"+t+\\\".range\\\"}function b(n,i,a){var s;Array.isArray(n)?n.forEach(function(t){b(t,i,a)}):n in e||w.hasParent(e,n)||(s=\\\"LAYOUT\\\"===n.substr(0,6)?o.nestedProperty(t.layout,n.replace(\\\"LAYOUT\\\",\\\"\\\")):o.nestedProperty(l[r[a]],n),n in g||(g[n]=v()),void 0===g[n][a]&&(g[n][a]=R(s.get())),void 0!==i&&s.set(i))}function _(t){return function(e){return s[e][t]}}function k(t){return function(e,n){return!1===e?s[r[n]][t]:null}}for(var A in e){if(w.hasParent(e,A))throw new Error(\\\"cannot set \\\"+A+\\\"and a parent attribute simultaneously\\\");var T,S,C,E,L,z,O=e[A];if(\\\"autobinx\\\"!==A&&\\\"autobiny\\\"!==A||(A=A.charAt(A.length-1)+\\\"bins\\\",O=Array.isArray(O)?O.map(k(A)):!1===O?r.map(_(A)):null),d[A]=O,\\\"LAYOUT\\\"!==A.substr(0,6)){for(g[A]=v(),n=0;n<r.length;n++)if(T=l[r[n]],S=s[r[n]],E=(C=o.nestedProperty(T,A)).get(),void 0!==(L=Array.isArray(O)?O[n%O.length]:O)){var I=C.parts[C.parts.length-1],P=A.substr(0,A.length-I.length-1),D=P?P+\\\".\\\":\\\"\\\",B=P?o.nestedProperty(S,P).get():S;if((z=u.getTraceValObject(S,C.parts))&&z.impliedEdits&&null!==L)for(var F in z.impliedEdits)b(o.relativeAttr(A,F),z.impliedEdits[F],n);else if(\\\"thicknessmode\\\"!==I&&\\\"lenmode\\\"!==I||E===L||\\\"fraction\\\"!==L&&\\\"pixels\\\"!==L||!B){if(\\\"type\\\"===A&&\\\"pie\\\"===L!=(\\\"pie\\\"===E)){var N=\\\"x\\\",j=\\\"y\\\";\\\"bar\\\"!==L&&\\\"bar\\\"!==E||\\\"h\\\"!==T.orientation||(N=\\\"y\\\",j=\\\"x\\\"),o.swapAttrs(T,[\\\"?\\\",\\\"?src\\\"],\\\"labels\\\",N),o.swapAttrs(T,[\\\"d?\\\",\\\"?0\\\"],\\\"label\\\",N),o.swapAttrs(T,[\\\"?\\\",\\\"?src\\\"],\\\"values\\\",j),\\\"pie\\\"===E?(o.nestedProperty(T,\\\"marker.color\\\").set(o.nestedProperty(T,\\\"marker.colors\\\").get()),a._pielayer.selectAll(\\\"g.trace\\\").remove()):c.traceIs(T,\\\"cartesian\\\")&&o.nestedProperty(T,\\\"marker.colors\\\").set(o.nestedProperty(T,\\\"marker.color\\\").get())}}else{var V=a._size,U=B.orient,q=\\\"top\\\"===U||\\\"bottom\\\"===U;if(\\\"thicknessmode\\\"===I){var H=q?V.h:V.w;b(D+\\\"thickness\\\",B.thickness*(\\\"fraction\\\"===L?1/H:H),n)}else{var G=q?V.w:V.h;b(D+\\\"len\\\",B.len*(\\\"fraction\\\"===L?1/G:G),n)}}g[A][n]=R(E);if(-1!==[\\\"swapxy\\\",\\\"swapxyaxes\\\",\\\"orientation\\\",\\\"orientationaxes\\\"].indexOf(A)){if(\\\"orientation\\\"===A){C.set(L);var W=T.x&&!T.y?\\\"h\\\":\\\"v\\\";if((C.get()||W)===S.orientation)continue}else\\\"orientationaxes\\\"===A&&(T.orientation={v:\\\"h\\\",h:\\\"v\\\"}[S.orientation]);w.swapXYData(T),h.calc=h.clearAxisTypes=!0}else-1!==f.dataArrayContainers.indexOf(C.parts[0])?(w.manageArrayContainers(C,L,g),h.calc=!0):(z?z.arrayOk&&!c.traceIs(S,\\\"regl\\\")&&(o.isArrayOrTypedArray(L)||o.isArrayOrTypedArray(E))?h.calc=!0:M.update(h,z):h.calc=!0,C.set(L))}if(-1!==[\\\"swapxyaxes\\\",\\\"orientationaxes\\\"].indexOf(A)&&p.swap(t,r),\\\"orientationaxes\\\"===A){var Y=o.nestedProperty(t.layout,\\\"hovermode\\\");\\\"x\\\"===Y.get()?Y.set(\\\"y\\\"):\\\"y\\\"===Y.get()&&Y.set(\\\"x\\\")}if(-1!==[\\\"orientation\\\",\\\"type\\\"].indexOf(A)){for(i=[],n=0;n<r.length;n++){var X=l[r[n]];c.traceIs(X,\\\"cartesian\\\")&&(m(X.xaxis||\\\"x\\\"),m(X.yaxis||\\\"y\\\"))}b(i.map(y),!0,0),b(i.map(x),[0,1],0)}}else C=o.nestedProperty(t.layout,A.replace(\\\"LAYOUT\\\",\\\"\\\")),g[A]=[R(C.get())],C.set(Array.isArray(O)?O[0]:O),h.calc=!0}return(h.calc||h.plot)&&(h.fullReplot=!0),{flags:h,undoit:g,redoit:d,traces:r,eventData:o.extendDeepNoArrays([],[d,r])}}function F(t,e,r){var n;if(!e.axrange)return!1;for(n in e)if(\\\"axrange\\\"!==n&&e[n])return!1;for(n in r.rangesAltered){var i=p.id2name(n),a=t.layout[i],o=t._fullLayout[i];o.autorange=a.autorange,o.range=a.range.slice(),o.cleanRange()}return!0}function N(t,e){var r=e?function(t){return p.doTicks(t,Object.keys(e),!0)}:function(t){return p.doTicks(t,\\\"redraw\\\")};t.push(k.doAutoRangeAndConstraints,r,k.drawData,k.finalDraw)}r.plot=function(t,e,i,a){var l;if(t=o.getGraphDiv(t),s.init(t),o.isPlainObject(e)){var u=e;e=u.data,i=u.layout,a=u.config,l=u.frames}if(!1===s.triggerHandler(t,\\\"plotly_beforeplot\\\",[e,i,a]))return Promise.reject();e||i||o.isPlotDiv(t)||o.warn(\\\"Calling Plotly.plot as if redrawing but this container doesn't yet have a plot.\\\",t),L(t,a),i||(i={}),n.select(t).classed(\\\"js-plotly-plot\\\",!0),d.makeTester(),delete d.baseUrl,Array.isArray(t._promises)||(t._promises=[]);var g=0===(t.data||[]).length&&Array.isArray(e);if(Array.isArray(e)&&(w.cleanData(e),g?t.data=e:t.data.push.apply(t.data,e),t.empty=!1),t.layout&&!g||(t.layout=w.cleanLayout(i)),t._dragging&&!t._transitioning)return t._replotPending=!0,Promise.reject();t._replotPending=!1,f.supplyDefaults(t);var y=t._fullLayout,b=y._has(\\\"cartesian\\\");if(!y._has(\\\"polar\\\")&&e&&e[0]&&e[0].r)return o.log(\\\"Legacy polar charts are deprecated!\\\"),function(t,e,r){var i=n.select(t).selectAll(\\\".plot-container\\\").data([0]);i.enter().insert(\\\"div\\\",\\\":first-child\\\").classed(\\\"plot-container plotly\\\",!0);var a=i.selectAll(\\\".svg-container\\\").data([0]);a.enter().append(\\\"div\\\").classed(\\\"svg-container\\\",!0).style(\\\"position\\\",\\\"relative\\\"),a.html(\\\"\\\"),e&&(t.data=e);r&&(t.layout=r);h.manager.fillLayout(t),a.style({width:t._fullLayout.width+\\\"px\\\",height:t._fullLayout.height+\\\"px\\\"}),t.framework=h.manager.framework(t),t.framework({data:t.data,layout:t.layout},a.node()),t.framework.setUndoPoint();var s=t.framework.svg(),l=1,c=t._fullLayout.title;\\\"\\\"!==c&&c||(l=0);var u=function(){this.call(x.convertToTspans,t)},p=s.select(\\\".title-group text\\\").call(u);if(t._context.edits.titleText){var d=o._(t,\\\"Click to enter Plot title\\\");c&&c!==d||(l=.2,p.attr({\\\"data-unformatted\\\":d}).text(d).style({opacity:l}).on(\\\"mouseover.opacity\\\",function(){n.select(this).transition().duration(100).style(\\\"opacity\\\",1)}).on(\\\"mouseout.opacity\\\",function(){n.select(this).transition().duration(1e3).style(\\\"opacity\\\",0)}));var g=function(){this.call(x.makeEditable,{gd:t}).on(\\\"edit\\\",function(e){t.framework({layout:{title:e}}),this.text(e).call(u),this.call(g)}).on(\\\"cancel\\\",function(){var t=this.attr(\\\"data-unformatted\\\");this.text(t).call(u)})};p.call(g)}return t._context.setBackground(t,t._fullLayout.paper_bgcolor),f.addLinks(t),Promise.resolve()}(t,e,i);y._replotting=!0,g&&W(t),t.framework!==W&&(t.framework=W,W(t)),d.initGradients(t),g&&p.saveShowSpikeInitial(t);var _=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;_&&f.doCalcdata(t);for(var M=0;M<t.calcdata.length;M++)t.calcdata[M][0].trace=t._fullData[M];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){f.resize(t)},window.addEventListener(\\\"resize\\\",t._responsiveChartHandler)):o.clearResponsive(t);var A=JSON.stringify(y._size),T=0;function C(){var e,r,n,i=t.calcdata;for(f.clearAutoMarginIds(t),k.drawMarginPushers(t),p.allowAutoMargin(t),e=0;e<i.length;e++){var a=(n=(r=i[e])[0].trace)._module.colorbar;!0===n.visible&&a?v(t,r,a):f.autoMargin(t,\\\"cb\\\"+n.uid)}return f.doAutoMargin(t),f.previousPromises(t)}function E(){t._transitioning||(k.doAutoRangeAndConstraints(t),g&&p.saveRangeInitial(t))}var z=[f.previousPromises,function(){if(l)return r.addFrames(t,l)},function e(){for(var r=y._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(t);if(!y._glcanvas&&y._has(\\\"gl\\\")&&(y._glcanvas=y._glcontainer.selectAll(\\\".gl-canvas\\\").data([{key:\\\"contextLayer\\\",context:!0,pick:!1},{key:\\\"focusLayer\\\",context:!1,pick:!1},{key:\\\"pickLayer\\\",context:!1,pick:!0}],function(t){return t.key}),y._glcanvas.enter().append(\\\"canvas\\\").attr(\\\"class\\\",function(t){return\\\"gl-canvas gl-canvas-\\\"+t.key.replace(\\\"Layer\\\",\\\"\\\")}).style({position:\\\"absolute\\\",top:0,left:0,width:\\\"100%\\\",height:\\\"100%\\\",overflow:\\\"visible\\\",\\\"pointer-events\\\":\\\"none\\\"})),y._glcanvas){y._glcanvas.attr(\\\"width\\\",y.width).attr(\\\"height\\\",y.height);var i=y._glcanvas.data()[0].regl;if(i&&(Math.floor(y.width)!==i._gl.drawingBufferWidth||Math.floor(y.height)!==i._gl.drawingBufferHeight)){var a=\\\"WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.\\\";if(!T)return o.log(a+\\\" Clearing graph and plotting again.\\\"),f.cleanPlot([],{},t._fullData,y),f.supplyDefaults(t),y=t._fullLayout,f.doCalcdata(t),T++,e();o.error(a)}}return f.previousPromises(t)},C,function(){if(JSON.stringify(y._size)!==A)return o.syncOrAsync([C,k.layoutStyles],t)}];b&&z.push(function(){if(_)return o.syncOrAsync([c.getComponentMethod(\\\"shapes\\\",\\\"calcAutorange\\\"),c.getComponentMethod(\\\"annotations\\\",\\\"calcAutorange\\\"),E,c.getComponentMethod(\\\"rangeslider\\\",\\\"calcAutorange\\\")],t);E()}),z.push(k.layoutStyles),b&&z.push(function(){return p.doTicks(t,g?\\\"\\\":\\\"redraw\\\")}),z.push(k.drawData,k.finalDraw,m,f.addLinks,f.rehover,f.doAutoMargin,f.previousPromises);var O=o.syncOrAsync(z,t);return O&&O.then||(O=Promise.resolve()),O.then(function(){return S(t),t})},r.setPlotConfig=function(t){return o.extendFlat(b,t)},r.redraw=function(t){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(\\\"This element is not a Plotly plot: \\\"+t);return w.cleanData(t.data),w.cleanLayout(t.layout),t.calcdata=void 0,r.plot(t).then(function(){return t.emit(\\\"plotly_redraw\\\"),t})},r.newPlot=function(t,e,n,i){return t=o.getGraphDiv(t),f.cleanPlot([],{},t._fullData||[],t._fullLayout||{}),f.purge(t),r.plot(t,e,n,i)},r.extendTraces=function t(e,n,i,a){var s=P(e=o.getGraphDiv(e),n,i,a,function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<0){var a=new t.constructor(0),s=D(t,e);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(l)),i.set(t),i.set(e.subarray(0,l),t.length)}else{var c=r-e.length,u=t.length-c;n.set(t.subarray(u)),n.set(e,c),i.set(t.subarray(0,u))}else n=t.concat(e),i=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,i]}),c=r.redraw(e),u=[e,s.update,i,s.maxPoints];return l.add(e,r.prependTraces,u,t,arguments),c},r.prependTraces=function t(e,n,i,a){var s=P(e=o.getGraphDiv(e),n,i,a,function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<=0){var a=new t.constructor(0),s=D(e,t);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(0,l)),i.set(e.subarray(l)),i.set(t,l)}else{var c=r-e.length;n.set(e),n.set(t.subarray(0,c),e.length),i.set(t.subarray(c))}else n=e.concat(t),i=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,i]}),c=r.redraw(e),u=[e,s.update,i,s.maxPoints];return l.add(e,r.extendTraces,u,t,arguments),c},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,c=[],u=r.deleteTraces,f=t,h=[e,c],p=[e,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error(\\\"gd.data must be an array.\\\");if(\\\"undefined\\\"==typeof e)throw new Error(\\\"traces must be defined.\\\");for(Array.isArray(e)||(e=[e]),n=0;n<e.length;n++)if(\\\"object\\\"!=typeof(i=e[n])||Array.isArray(i)||null===i)throw new Error(\\\"all values in traces array must be non-array objects\\\");if(\\\"undefined\\\"==typeof r||Array.isArray(r)||(r=[r]),\\\"undefined\\\"!=typeof r&&r.length!==e.length)throw new Error(\\\"if indices is specified, traces.length must equal indices.length\\\")}(e,n,i),Array.isArray(n)||(n=[n]),n=n.map(function(t){return o.extendFlat({},t)}),w.cleanData(n),a=0;a<n.length;a++)e.data.push(n[a]);for(a=0;a<n.length;a++)c.push(-n.length+a);if(\\\"undefined\\\"==typeof i)return s=r.redraw(e),l.add(e,u,h,f,p),s;Array.isArray(i)||(i=[i]);try{I(e,c,i)}catch(t){throw e.data.splice(e.data.length-n.length,n.length),t}return l.startSequence(e),l.add(e,u,h,f,p),s=r.moveTraces(e,c,i),l.stopSequence(e),s},r.deleteTraces=function t(e,n){e=o.getGraphDiv(e);var i,a,s=[],c=r.addTraces,u=t,f=[e,s,n],h=[e,n];if(\\\"undefined\\\"==typeof n)throw new Error(\\\"indices must be an integer or array of integers.\\\");for(Array.isArray(n)||(n=[n]),O(e,n,\\\"indices\\\"),(n=z(n,e.data.length-1)).sort(o.sorterDes),i=0;i<n.length;i+=1)a=e.data.splice(n[i],1)[0],s.push(a);var p=r.redraw(e);return l.add(e,c,f,u,h),p},r.moveTraces=function t(e,n,i){var a,s=[],c=[],u=t,f=t,h=[e=o.getGraphDiv(e),i,n],p=[e,n,i];if(I(e,n,i),n=Array.isArray(n)?n:[n],\\\"undefined\\\"==typeof i)for(i=[],a=0;a<n.length;a++)i.push(-n.length+a);for(i=Array.isArray(i)?i:[i],n=z(n,e.data.length-1),i=z(i,e.data.length-1),a=0;a<e.data.length;a++)-1===n.indexOf(a)&&s.push(e.data[a]);for(a=0;a<n.length;a++)c.push({newIndex:i[a],trace:e.data[n[a]]});for(c.sort(function(t,e){return t.newIndex-e.newIndex}),a=0;a<c.length;a+=1)s.splice(c[a].newIndex,0,c[a].trace);e.data=s;var d=r.redraw(e);return l.add(e,u,h,f,p),d},r.restyle=function t(e,n,i,a){e=o.getGraphDiv(e),w.clearPromiseQueue(e);var s={};if(\\\"string\\\"==typeof n)s[n]=i;else{if(!o.isPlainObject(n))return o.warn(\\\"Restyle fail.\\\",n,i,a),Promise.reject();s=o.extendFlat({},n),void 0===a&&(a=i)}Object.keys(s).length&&(e.changed=!0);var c=w.coerceTraceIndices(e,a),u=B(e,s,c),h=u.flags;h.calc&&(e.calcdata=void 0),h.clearAxisTypes&&w.clearAxisTypes(e,c,{});var p=[];h.fullReplot?p.push(r.plot):(p.push(f.previousPromises),f.supplyDefaults(e),h.markerSize&&(f.doCalcdata(e),N(p)),h.style&&p.push(k.doTraceStyle),h.colorbars&&p.push(k.doColorBars),p.push(S)),p.push(f.rehover),l.add(e,t,[e,u.undoit,u.traces],t,[e,u.redoit,u.traces]);var d=o.syncOrAsync(p,e);return d&&d.then||(d=Promise.resolve()),d.then(function(){return e.emit(\\\"plotly_restyle\\\",u.eventData),e})},r.relayout=function t(e,r,n){if(e=o.getGraphDiv(e),w.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);var i={};if(\\\"string\\\"==typeof r)i[r]=n;else{if(!o.isPlainObject(r))return o.warn(\\\"Relayout fail.\\\",r,n),Promise.reject();i=o.extendFlat({},r)}Object.keys(i).length&&(e.changed=!0);var a=q(e,i),s=a.flags;s.calc&&(e.calcdata=void 0);var c=[f.previousPromises];s.layoutReplot?c.push(k.layoutReplot):Object.keys(i).length&&(F(e,s,a)||f.supplyDefaults(e),s.legend&&c.push(k.doLegend),s.layoutstyle&&c.push(k.layoutStyles),s.axrange&&N(c,a.rangesAltered),s.ticks&&c.push(k.doTicksRelayout),s.modebar&&c.push(k.doModeBar),s.camera&&c.push(k.doCamera),c.push(S)),c.push(f.rehover),l.add(e,t,[e,a.undoit],t,[e,a.redoit]);var u=o.syncOrAsync(c,e);return u&&u.then||(u=Promise.resolve(e)),u.then(function(){return e.emit(\\\"plotly_relayout\\\",a.eventData),e})};var j=/^[xyz]axis[0-9]*\\\\.range(\\\\[[0|1]\\\\])?$/,V=/^[xyz]axis[0-9]*\\\\.autorange$/,U=/^[xyz]axis[0-9]*\\\\.domain(\\\\[[0|1]\\\\])?$/;function q(t,e){var r,n,i,a=t.layout,s=t._fullLayout,l=Object.keys(e),f=p.list(t),h={};for(n=0;n<l.length;n++)if(0===l[n].indexOf(\\\"allaxes\\\")){for(i=0;i<f.length;i++){var d=f[i]._id.substr(1),g=-1!==d.indexOf(\\\"scene\\\")?d+\\\".\\\":\\\"\\\",v=l[n].replace(\\\"allaxes\\\",g+f[i]._name);e[v]||(e[v]=e[l[n]])}delete e[l[n]]}var m=M.layoutFlags(),y={},x={};function b(t,r){if(Array.isArray(t))t.forEach(function(t){b(t,r)});else if(!(t in e||w.hasParent(e,t))){var n=o.nestedProperty(a,t);t in x||(x[t]=R(n.get())),void 0!==r&&n.set(r)}}var k,T={};function S(t){var e=p.name2id(t.split(\\\".\\\")[0]);return T[e]=1,e}for(var C in e){if(w.hasParent(e,C))throw new Error(\\\"cannot set \\\"+C+\\\"and a parent attribute simultaneously\\\");for(var E=o.nestedProperty(a,C),L=e[C],z=E.parts.length-1;z>0&&\\\"string\\\"!=typeof E.parts[z];)z--;var O=E.parts[z],I=E.parts[z-1]+\\\".\\\"+O,P=E.parts.slice(0,z).join(\\\".\\\"),D=o.nestedProperty(t.layout,P).get(),B=o.nestedProperty(s,P).get(),F=E.get();if(void 0!==L){y[C]=L,x[C]=\\\"reverse\\\"===O?L:R(F);var N=u.getLayoutValObject(s,E.parts);if(N&&N.impliedEdits&&null!==L)for(var q in N.impliedEdits)b(o.relativeAttr(C,q),N.impliedEdits[q]);if(-1!==[\\\"width\\\",\\\"height\\\"].indexOf(C))if(L){b(\\\"autosize\\\",null);var G=\\\"height\\\"===C?\\\"width\\\":\\\"height\\\";b(G,s[G])}else s[C]=t._initialAutoSize[C];else if(\\\"autosize\\\"===C)b(\\\"width\\\",L?null:s.width),b(\\\"height\\\",L?null:s.height);else if(I.match(j))S(I),o.nestedProperty(s,P+\\\"._inputRange\\\").set(null);else if(I.match(V)){S(I),o.nestedProperty(s,P+\\\"._inputRange\\\").set(null);var W=o.nestedProperty(s,P).get();W._inputDomain&&(W._input.domain=W._inputDomain.slice())}else I.match(U)&&o.nestedProperty(s,P+\\\"._inputDomain\\\").set(null);if(\\\"type\\\"===O){var Y=D,X=\\\"linear\\\"===B.type&&\\\"log\\\"===L,Z=\\\"log\\\"===B.type&&\\\"linear\\\"===L;if(X||Z){if(Y&&Y.range)if(B.autorange)X&&(Y.range=Y.range[1]>Y.range[0]?[1,2]:[2,1]);else{var $=Y.range[0],J=Y.range[1];X?($<=0&&J<=0&&b(P+\\\".autorange\\\",!0),$<=0?$=J/1e6:J<=0&&(J=$/1e6),b(P+\\\".range[0]\\\",Math.log($)/Math.LN10),b(P+\\\".range[1]\\\",Math.log(J)/Math.LN10)):(b(P+\\\".range[0]\\\",Math.pow(10,$)),b(P+\\\".range[1]\\\",Math.pow(10,J)))}else b(P+\\\".autorange\\\",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[E.parts[0]]&&\\\"radialaxis\\\"===E.parts[1]&&delete s[E.parts[0]]._subplot.viewInitial[\\\"radialaxis.range\\\"],c.getComponentMethod(\\\"annotations\\\",\\\"convertCoords\\\")(t,B,L,b),c.getComponentMethod(\\\"images\\\",\\\"convertCoords\\\")(t,B,L,b)}else b(P+\\\".autorange\\\",!0),b(P+\\\".range\\\",null);o.nestedProperty(s,P+\\\"._inputRange\\\").set(null)}else if(O.match(A)){var K=o.nestedProperty(s,C).get(),Q=(L||{}).type;Q&&\\\"-\\\"!==Q||(Q=\\\"linear\\\"),c.getComponentMethod(\\\"annotations\\\",\\\"convertCoords\\\")(t,K,Q,b),c.getComponentMethod(\\\"images\\\",\\\"convertCoords\\\")(t,K,Q,b)}var tt=_.containerArrayMatch(C);if(tt){r=tt.array,n=tt.index;var et=tt.property,rt=(o.nestedProperty(a,r)||[])[n]||{},nt=N||{editType:\\\"calc\\\"};\\\"\\\"!==n&&\\\"\\\"===et&&(_.isAddVal(L)?x[C]=null:_.isRemoveVal(L)?x[C]=rt:o.warn(\\\"unrecognized full object value\\\",e)),M.update(m,nt),h[r]||(h[r]={});var it=h[r][n];it||(it=h[r][n]={}),it[et]=L,delete e[C]}else\\\"reverse\\\"===O?(D.range?D.range.reverse():(b(P+\\\".autorange\\\",!0),D.range=[1,0]),B.autorange?m.calc=!0:m.plot=!0):(s._has(\\\"scatter-like\\\")&&s._has(\\\"regl\\\")&&\\\"dragmode\\\"===C&&(\\\"lasso\\\"===L||\\\"select\\\"===L)&&\\\"lasso\\\"!==F&&\\\"select\\\"!==F?m.plot=!0:N?M.update(m,N):m.calc=!0,E.set(L))}}for(r in h){_.applyContainerArrayChanges(t,o.nestedProperty(a,r),h[r],m)||(m.plot=!0)}var at=s._axisConstraintGroups||[];for(k in T)for(n=0;n<at.length;n++){var ot=at[n];if(ot[k])for(var st in m.calc=!0,ot)T[st]||(p.getFromId(t,st)._constraintShrinkable=!0)}return(H(t)||e.height||e.width)&&(m.plot=!0),(m.plot||m.calc)&&(m.layoutReplot=!0),{flags:m,rangesAltered:T,undoit:x,redoit:y,eventData:o.extendDeep({},y)}}function H(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&f.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function G(t,e,r,n){var i,a,s=n.getValObject,l=n.flags,c=n.immutable,u=n.inArray,f=n.arrayIndex;function h(){var t=i.editType;u&&-1!==t.indexOf(\\\"arraydraw\\\")?o.pushUnique(l.arrays[u],f):M.update(l,i)}function p(t){return\\\"data_array\\\"===t.valType||t.arrayOk}for(a in t){if(l.calc)return;var d=t[a],g=e[a];if(\\\"_\\\"!==a.charAt(0)&&\\\"function\\\"!=typeof d&&d!==g){if((\\\"tick0\\\"===a||\\\"dtick\\\"===a)&&\\\"geo\\\"!==r[0]){var v=e.tickmode;if(\\\"auto\\\"===v||\\\"array\\\"===v||!v)continue}if((\\\"range\\\"!==a||!e.autorange)&&(\\\"zmin\\\"!==a&&\\\"zmax\\\"!==a||\\\"contourcarpet\\\"!==e.type)){var m=r.concat(a);if((i=s(m))&&(!i._compareAsJSON||JSON.stringify(d)!==JSON.stringify(g))){var y,x=i.valType,b=p(i),_=Array.isArray(d),w=Array.isArray(g);if(_&&w){var k=\\\"_input_\\\"+a,A=t[k],T=e[k];if(Array.isArray(A)&&A===T)continue}if(void 0===g)b&&_?l.calc=!0:h();else if(i._isLinkedToArray){var S=[],C=!1;u||(l.arrays[a]=S);var E=Math.min(d.length,g.length),L=Math.max(d.length,g.length);if(E!==L){if(\\\"arraydraw\\\"!==i.editType){h();continue}C=!0}for(y=0;y<E;y++)G(d[y],g[y],m.concat(y),o.extendFlat({inArray:a,arrayIndex:y},n));if(C)for(y=E;y<L;y++)S.push(y)}else!x&&o.isPlainObject(d)?G(d,g,m,n):b?_&&w?c&&(l.calc=!0):_!==w?l.calc=!0:h():_&&w&&d.length===g.length&&String(d)===String(g)||h()}}}}for(a in e)if(!(a in t||\\\"_\\\"===a.charAt(0)||\\\"function\\\"==typeof e[a])){if(p(i=s(r.concat(a)))&&Array.isArray(e[a]))return void(l.calc=!0);h()}}function W(t){var e=n.select(t),r=t._fullLayout;if(r._container=e.selectAll(\\\".plot-container\\\").data([0]),r._container.enter().insert(\\\"div\\\",\\\":first-child\\\").classed(\\\"plot-container\\\",!0).classed(\\\"plotly\\\",!0),r._paperdiv=r._container.selectAll(\\\".svg-container\\\").data([0]),r._paperdiv.enter().append(\\\"div\\\").classed(\\\"svg-container\\\",!0).style(\\\"position\\\",\\\"relative\\\"),r._glcontainer=r._paperdiv.selectAll(\\\".gl-container\\\").data([{}]),r._glcontainer.enter().append(\\\"div\\\").classed(\\\"gl-container\\\",!0),r._paperdiv.selectAll(\\\".main-svg\\\").remove(),r._paper=r._paperdiv.insert(\\\"svg\\\",\\\":first-child\\\").classed(\\\"main-svg\\\",!0),r._toppaper=r._paperdiv.append(\\\"svg\\\").classed(\\\"main-svg\\\",!0),!r._uid){var i={};n.selectAll(\\\"defs\\\").each(function(){this.id&&(i[this.id.split(\\\"-\\\")[1]]=1)}),r._uid=o.randstr(i)}r._paperdiv.selectAll(\\\".main-svg\\\").attr(y.svgAttrs),r._defs=r._paper.append(\\\"defs\\\").attr(\\\"id\\\",\\\"defs-\\\"+r._uid),r._clips=r._defs.append(\\\"g\\\").classed(\\\"clips\\\",!0),r._topdefs=r._toppaper.append(\\\"defs\\\").attr(\\\"id\\\",\\\"topdefs-\\\"+r._uid),r._topclips=r._topdefs.append(\\\"g\\\").classed(\\\"clips\\\",!0),r._bgLayer=r._paper.append(\\\"g\\\").classed(\\\"bglayer\\\",!0),r._draggers=r._paper.append(\\\"g\\\").classed(\\\"draglayer\\\",!0);var a=r._paper.append(\\\"g\\\").classed(\\\"layer-below\\\",!0);r._imageLowerLayer=a.append(\\\"g\\\").classed(\\\"imagelayer\\\",!0),r._shapeLowerLayer=a.append(\\\"g\\\").classed(\\\"shapelayer\\\",!0),r._cartesianlayer=r._paper.append(\\\"g\\\").classed(\\\"cartesianlayer\\\",!0),r._polarlayer=r._paper.append(\\\"g\\\").classed(\\\"polarlayer\\\",!0),r._ternarylayer=r._paper.append(\\\"g\\\").classed(\\\"ternarylayer\\\",!0),r._geolayer=r._paper.append(\\\"g\\\").classed(\\\"geolayer\\\",!0),r._pielayer=r._paper.append(\\\"g\\\").classed(\\\"pielayer\\\",!0),r._glimages=r._paper.append(\\\"g\\\").classed(\\\"glimages\\\",!0);var s=r._toppaper.append(\\\"g\\\").classed(\\\"layer-above\\\",!0);r._imageUpperLayer=s.append(\\\"g\\\").classed(\\\"imagelayer\\\",!0),r._shapeUpperLayer=s.append(\\\"g\\\").classed(\\\"shapelayer\\\",!0),r._infolayer=r._toppaper.append(\\\"g\\\").classed(\\\"infolayer\\\",!0),r._menulayer=r._toppaper.append(\\\"g\\\").classed(\\\"menulayer\\\",!0),r._zoomlayer=r._toppaper.append(\\\"g\\\").classed(\\\"zoomlayer\\\",!0),r._hoverlayer=r._toppaper.append(\\\"g\\\").classed(\\\"hoverlayer\\\",!0),t.emit(\\\"plotly_framework\\\")}r.update=function t(e,n,i,a){if(e=o.getGraphDiv(e),w.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);o.isPlainObject(n)||(n={}),o.isPlainObject(i)||(i={}),Object.keys(n).length&&(e.changed=!0),Object.keys(i).length&&(e.changed=!0);var s=w.coerceTraceIndices(e,a),c=B(e,o.extendFlat({},n),s),u=c.flags,h=q(e,o.extendFlat({},i)),p=h.flags;(u.calc||p.calc)&&(e.calcdata=void 0),u.clearAxisTypes&&w.clearAxisTypes(e,s,i);var d=[];if(u.fullReplot&&p.layoutReplot){var g=e.data,v=e.layout;e.data=void 0,e.layout=void 0,d.push(function(){return r.plot(e,g,v)})}else u.fullReplot?d.push(r.plot):p.layoutReplot?d.push(k.layoutReplot):(d.push(f.previousPromises),F(e,p,h)||f.supplyDefaults(e),u.style&&d.push(k.doTraceStyle),u.colorbars&&d.push(k.doColorBars),p.legend&&d.push(k.doLegend),p.layoutstyle&&d.push(k.layoutStyles),p.axrange&&N(d,h.rangesAltered),p.ticks&&d.push(k.doTicksRelayout),p.modebar&&d.push(k.doModeBar),p.camera&&d.push(k.doCamera),d.push(S));d.push(f.rehover),l.add(e,t,[e,c.undoit,h.undoit,c.traces],t,[e,c.redoit,h.redoit,c.traces]);var m=o.syncOrAsync(d,e);return m&&m.then||(m=Promise.resolve(e)),m.then(function(){return e.emit(\\\"plotly_update\\\",{data:c.eventData,layout:h.eventData}),e})},r.react=function(t,e,n,i){var a,s;var l=(t=o.getGraphDiv(t))._fullData,h=t._fullLayout;if(o.isPlotDiv(t)&&l&&h){if(o.isPlainObject(e)){var p=e;e=p.data,n=p.layout,i=p.config,a=p.frames}var d=!1;if(i){var g=o.extendDeep({},t._context);t._context=void 0,L(t,i),d=function t(e,r){var n;for(n in e)if(\\\"_\\\"!==n.charAt(0)){var i=e[n],a=r[n];if(i!==a)if(o.isPlainObject(i)&&o.isPlainObject(a)){if(t(i,a))return!0}else{if(!Array.isArray(i)||!Array.isArray(a))return!0;if(i.length!==a.length)return!0;for(var s=0;s<i.length;s++)if(i[s]!==a[s]){if(!o.isPlainObject(i[s])||!o.isPlainObject(a[s]))return!0;if(t(i[s],a[s]))return!0}}}}(g,t._context)}t.data=e||[],w.cleanData(t.data),t.layout=n||{},w.cleanLayout(t.layout),f.supplyDefaults(t,{skipUpdateCalc:!0});var v=t._fullData,m=t._fullLayout,y=void 0===m.datarevision,x=function(t,e,r,n){if(e.length!==r.length)return{fullReplot:!0,calc:!0};var i,a,o=M.traceFlags();o.arrays={};var s={getValObject:function(t){return u.getTraceValObject(a,t)},flags:o,immutable:n,gd:t},l={};for(i=0;i<e.length;i++)a=r[i]._fullInput,f.hasMakesDataTransform(a)&&(a=r[i]),l[a.uid]||(l[a.uid]=1,G(e[i]._fullInput,a,[],s));(o.calc||o.plot)&&(o.fullReplot=!0);return o}(t,l,v,y),b=function(t,e,r,n){var i=M.layoutFlags();i.arrays={},G(e,r,[],{getValObject:function(t){return u.getLayoutValObject(r,t)},flags:i,immutable:n,gd:t}),(i.plot||i.calc)&&(i.layoutReplot=!0);return i}(t,h,m,y);H(t)&&(b.layoutReplot=!0),x.calc||b.calc?t.calcdata=void 0:f.supplyDefaultsUpdateCalc(t.calcdata,v);var _=[];if(a&&(t._transitionData={},f.createTransitionData(t),_.push(function(){return r.addFrames(t,a)})),x.fullReplot||b.layoutReplot||d)t._fullLayout._skipDefaults=!0,_.push(r.plot);else{for(var A in b.arrays){var T=b.arrays[A];if(T.length){var C=c.getComponentMethod(A,\\\"drawOne\\\");if(C!==o.noop)for(var E=0;E<T.length;E++)C(t,T[E]);else{var z=c.getComponentMethod(A,\\\"draw\\\");if(z===o.noop)throw new Error(\\\"cannot draw components: \\\"+A);z(t)}}}_.push(f.previousPromises),x.style&&_.push(k.doTraceStyle),x.colorbars&&_.push(k.doColorBars),b.legend&&_.push(k.doLegend),b.layoutstyle&&_.push(k.layoutStyles),b.axrange&&N(_),b.ticks&&_.push(k.doTicksRelayout),b.modebar&&_.push(k.doModeBar),b.camera&&_.push(k.doCamera),_.push(S)}_.push(f.rehover),(s=o.syncOrAsync(_,t))&&s.then||(s=Promise.resolve(t))}else s=r.newPlot(t,e,n,i);return s.then(function(){return t.emit(\\\"plotly_react\\\",{data:e,layout:n}),t})},r.animate=function(t,e,r){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(\\\"This element is not a Plotly plot: \\\"+t+\\\". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/\\\");var n=t._transitionData;n._frameQueue||(n._frameQueue=[]);var i=(r=f.supplyAnimationDefaults(r)).transition,a=r.frame;function s(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise(function(a,u){function h(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,f.transition(t,e.frame.data,e.frame.layout,w.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit(\\\"plotly_animatingframe\\\",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit(\\\"plotly_animated\\\"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit(\\\"plotly_animating\\\"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&h()};e()}var d,g,v=0;function m(t){return Array.isArray(i)?v>=i.length?t.transitionOpts=i[v]:t.transitionOpts=i[0]:t.transitionOpts=i,v++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:\\\"object\\\",data:m(o.extendFlat({},e))});else if(x||-1!==[\\\"string\\\",\\\"number\\\"].indexOf(typeof e))for(d=0;d<n._frames.length;d++)(g=n._frames[d])&&(x||String(g.group)===String(e))&&y.push({type:\\\"byname\\\",name:String(g.name),data:m({name:g.name})});else if(b)for(d=0;d<e.length;d++){var _=e[d];-1!==[\\\"number\\\",\\\"string\\\"].indexOf(typeof _)?(_=String(_),y.push({type:\\\"byname\\\",name:_,data:m({name:_})})):o.isPlainObject(_)&&y.push({type:\\\"object\\\",data:m(o.extendFlat({},_))})}for(d=0;d<y.length;d++)if(\\\"byname\\\"===(g=y[d]).type&&!n._frameHash[g.data.name])return o.warn('animate failure: frame not found: \\\"'+g.data.name+'\\\"'),void u();-1!==[\\\"next\\\",\\\"immediate\\\"].indexOf(r.mode)&&function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var e=n._frameQueue.pop();e.onInterrupt&&e.onInterrupt()}t.emit(\\\"plotly_animationinterrupted\\\",[])}}(),\\\"reverse\\\"===r.direction&&y.reverse();var k=t._fullLayout._currentFrame;if(k&&r.fromcurrent){var M=-1;for(d=0;d<y.length;d++)if(\\\"byname\\\"===(g=y[d]).type&&g.name===k){M=d;break}if(M>0&&M<y.length-1){var A=[];for(d=0;d<y.length;d++)g=y[d],(\\\"byname\\\"!==y[d].type||d>M)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var i=0;i<e.length;i++){var o;o=\\\"byname\\\"===e[i].type?f.computeFrame(t,e[i].name):e[i].data;var h=l(i),d=s(i);d.duration=Math.min(d.duration,h.duration);var g={frame:o,name:e[i].name,frameOpts:h,transitionOpts:d};i===e.length-1&&(g.onComplete=c(a,2),g.onInterrupt=u),n._frameQueue.push(g)}\\\"immediate\\\"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||p()}}(y):(t.emit(\\\"plotly_animated\\\"),a())})},r.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw new Error(\\\"This element is not a Plotly plot: \\\"+t+\\\". It's likely that you've failed to create a plot before adding frames. For more details, see https://plot.ly/javascript/animations/\\\");var n,i,a,s,c=t._transitionData._frames,u=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error(\\\"addFrames failure: frameList must be an Array of frame definitions\\\"+e);var h=c.length+2*e.length,p=[],d={};for(n=e.length-1;n>=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,v=(u[g]||d[g]||{}).name,m=e[n].name,y=u[v]||d[v];v&&m&&\\\"number\\\"==typeof m&&y&&T<5&&(T++,o.warn('addFrames: overwriting frame \\\"'+(u[v]||d[v]).name+'\\\" with a frame whose name of type \\\"number\\\" also equates to \\\"'+v+'\\\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===T&&o.warn(\\\"addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.\\\")),d[g]={name:g},p.push({frame:f.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:h+n})}p.sort(function(t,e){return t.index>e.index?-1:t.index<e.index?1:0});var x=[],b=[],_=c.length;for(n=p.length-1;n>=0;n--){if(\\\"number\\\"==typeof(i=p[n].frame).name&&o.warn(\\\"Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings\\\"),!i.name)for(;u[i.name=\\\"frame \\\"+t._transitionData._counter++];);if(u[i.name]){for(a=0;a<c.length&&(c[a]||{}).name!==i.name;a++);x.push({type:\\\"replace\\\",index:a,value:i}),b.unshift({type:\\\"replace\\\",index:a,value:c[a]})}else s=Math.max(0,Math.min(p[n].index,_)),x.push({type:\\\"insert\\\",index:s,value:i}),b.unshift({type:\\\"delete\\\",index:s}),_++}var w=f.modifyFrames,k=f.modifyFrames,M=[t,b],A=[t,x];return l&&l.add(t,w,M,k,A),f.modifyFrames(t,x)},r.deleteFrames=function(t,e){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(\\\"This element is not a Plotly plot: \\\"+t);var r,n,i=t._transitionData._frames,a=[],s=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice(0)).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:\\\"delete\\\",index:n}),s.unshift({type:\\\"insert\\\",index:n,value:i[n]});var c=f.modifyFrames,u=f.modifyFrames,h=[t,s],p=[t,a];return l&&l.add(t,c,h,u,p),f.modifyFrames(t,a)},r.purge=function(t){var e=(t=o.getGraphDiv(t))._fullLayout||{},r=t._fullData||[];return f.cleanPlot([],{},r,e),f.purge(t),s.purge(t),e._container&&e._container.remove(),delete t._context,t}},{\\\"../components/color\\\":570,\\\"../components/colorbar/connect\\\":572,\\\"../components/drawing\\\":595,\\\"../constants/xmlns_namespaces\\\":674,\\\"../lib\\\":696,\\\"../lib/events\\\":684,\\\"../lib/queue\\\":712,\\\"../lib/svg_text_utils\\\":721,\\\"../plots/cartesian/axes\\\":745,\\\"../plots/cartesian/constants\\\":751,\\\"../plots/cartesian/graph_interact\\\":755,\\\"../plots/plots\\\":809,\\\"../plots/polar/legacy\\\":817,\\\"../registry\\\":828,\\\"./edit_types\\\":728,\\\"./helpers\\\":729,\\\"./manage_arrays\\\":731,\\\"./plot_config\\\":733,\\\"./plot_schema\\\":734,\\\"./subroutines\\\":736,d3:148,\\\"fast-isnumeric\\\":214,\\\"has-hover\\\":393}],733:[function(t,e,r){\\\"use strict\\\";e.exports={staticPlot:!1,plotlyServerURL:\\\"https://plot.ly\\\",editable:!1,edits:{annotationPosition:!1,annotationTail:!1,annotationText:!1,axisTitleText:!1,colorbarPosition:!1,colorbarTitleText:!1,legendPosition:!1,legendText:!1,shapePosition:!1,titleText:!1},autosizable:!1,responsive:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:\\\"reset+autosize\\\",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:\\\"Edit chart\\\",showSources:!1,displayModeBar:\\\"hover\\\",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,toImageButtonOptions:{},displaylogo:!0,plotGlPixelRatio:2,setBackground:\\\"transparent\\\",topojsonURL:\\\"https://cdn.plot.ly/\\\",mapboxAccessToken:null,logging:1,globalTransforms:[],locale:\\\"en-US\\\",locales:{}}},{}],734:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../plots/attributes\\\"),o=t(\\\"../plots/layout_attributes\\\"),s=t(\\\"../plots/frame_attributes\\\"),l=t(\\\"../plots/animation_attributes\\\"),c=t(\\\"../plots/polar/legacy/area_attributes\\\"),u=t(\\\"../plots/polar/legacy/axis_attributes\\\"),f=t(\\\"./edit_types\\\"),h=i.extendFlat,p=i.extendDeepAll,d=i.isPlainObject,g=\\\"_isSubplotObj\\\",v=\\\"_isLinkedToArray\\\",m=[g,v,\\\"_arrayAttrRegexps\\\",\\\"_deprecated\\\"];function y(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(x(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!d(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(!x(e[++r]))return!1}else if(\\\"info_array\\\"===t.valType){var i=e[++r];if(!x(i))return!1;var a=t.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!x(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function x(t){return t===Math.round(t)&&t>=0}function b(t){return function(t){r.crawl(t,function(t,e,n){r.isValObject(t)?\\\"data_array\\\"===t.valType?(t.role=\\\"data\\\",n[e+\\\"src\\\"]={valType:\\\"string\\\",editType:\\\"none\\\"}):!0===t.arrayOk&&(n[e+\\\"src\\\"]={valType:\\\"string\\\",editType:\\\"none\\\"}):d(t)&&(t.role=\\\"object\\\")})}(t),function(t){r.crawl(t,function(t,e,r){if(!t)return;var n=t[v];if(!n)return;delete t[v],r[e]={items:{}},r[e].items[n]=t,r[e].role=\\\"object\\\"})}(t),function(t){!function t(e){for(var r in e)if(d(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n<e[r].length;n++)t(e[r][n]);else e[r]instanceof RegExp&&(e[r]=e[r].toString())}(t)}(t),t}function _(t,e,r){var n=i.nestedProperty(t,r),a=p({},e.layoutAttributes);a[g]=!0,n.set(a)}function w(t,e,r){var n=i.nestedProperty(t,r);n.set(p(n.get()||{},e))}r.IS_SUBPLOT_OBJ=g,r.IS_LINKED_TO_ARRAY=v,r.DEPRECATED=\\\"_deprecated\\\",r.UNDERSCORE_ATTRS=m,r.get=function(){var t={};n.allTypes.concat(\\\"area\\\").forEach(function(e){t[e]=function(t){var e,o;\\\"area\\\"===t?(e={attributes:c},o={}):(e=n.modules[t]._module,o=e.basePlotModule);var s={type:null},l=p({},a),u=p({},e.attributes);r.crawl(u,function(t,e,r,n,a){i.nestedProperty(l,a).set(void 0),void 0===t&&i.nestedProperty(u,a).set(void 0)}),p(s,l),p(s,u),o.attributes&&p(s,o.attributes);s.type=t;var f={meta:e.meta||{},attributes:b(s)};if(e.layoutAttributes){var h={};p(h,e.layoutAttributes),f.layoutAttributes=b(h)}return f}(e)});var e,d={};return Object.keys(n.transformsRegistry).forEach(function(t){d[t]=function(t){var e=n.transformsRegistry[t],r=p({},e.attributes);return Object.keys(n.componentsRegistry).forEach(function(e){var i=n.componentsRegistry[e];i.schema&&i.schema.transforms&&i.schema.transforms[t]&&Object.keys(i.schema.transforms[t]).forEach(function(e){w(r,i.schema.transforms[t][e],e)})}),{attributes:b(r)}}(t)}),{defs:{valObjects:i.valObjectMeta,metaKeys:m.concat([\\\"description\\\",\\\"role\\\",\\\"editType\\\",\\\"impliedEdits\\\"]),editType:{traces:f.traces,layout:f.layout},impliedEdits:{}},traces:t,layout:function(){var t,e,r={};for(t in p(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i<e.attr.length;i++)_(r,e,e.attr[i]);else{var a=\\\"subplot\\\"===e.attr?e.name:e.attr;_(r,e,a)}for(t in r=function(t){return h(t,{radialaxis:u.radialaxis,angularaxis:u.angularaxis}),h(t,u.layout),t}(r),n.componentsRegistry){var s=(e=n.componentsRegistry[t]).schema;if(s&&(s.subplots||s.layout)){var l=s.subplots;if(l&&l.xaxis&&!l.yaxis)for(var c in l.xaxis)delete r.yaxis[c]}else e.layoutAttributes&&w(r,e.layoutAttributes,e.name)}return{layoutAttributes:b(r)}}(),transforms:d,frames:(e={frames:i.extendDeepAll({},s)},b(e),e.frames),animation:b(l)}},r.crawl=function(t,e,n,i){var a=n||0;i=i||\\\"\\\",Object.keys(t).forEach(function(n){var o=t[n];if(-1===m.indexOf(n)){var s=(i?i+\\\".\\\":\\\"\\\")+n;e(o,n,t,a,s),r.isValObject(o)||d(o)&&\\\"impliedEdits\\\"!==n&&r.crawl(o,e,a+1,s)}})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){var e,n,o=[],s=[],l=[];function c(t,r,a,c){s=s.slice(0,c).concat([r]),l=l.slice(0,c).concat([t&&t._isLinkedToArray]),t&&(\\\"data_array\\\"===t.valType||!0===t.arrayOk)&&!(\\\"colorbar\\\"===s[c-1]&&(\\\"ticktext\\\"===r||\\\"tickvals\\\"===r))&&function t(e,r,a){var c=e[s[r]];var u=a+s[r];if(r===s.length-1)i.isArrayOrTypedArray(c)&&o.push(n+u);else if(l[r]){if(Array.isArray(c))for(var f=0;f<c.length;f++)i.isPlainObject(c[f])&&t(c[f],r+1,u+\\\"[\\\"+f+\\\"].\\\")}else i.isPlainObject(c)&&t(c,r+1,u+\\\".\\\")}(e,0,\\\"\\\")}e=t,n=\\\"\\\",r.crawl(a,c),t._module&&t._module.attributes&&r.crawl(t._module.attributes,c);var u=t.transforms;if(u)for(var f=0;f<u.length;f++){var h=u[f],p=h._module;p&&(n=\\\"transforms[\\\"+f+\\\"].\\\",e=h,r.crawl(p.attributes,c))}return o},r.getTraceValObject=function(t,e){var r,i,o=e[0],s=1;if(\\\"transforms\\\"===o){if(1===e.length)return a.transforms;var l=t.transforms;if(!Array.isArray(l)||!l.length)return!1;var u=e[1];if(!x(u)||u>=l.length)return!1;i=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&&r[e[2]],s=3}else if(\\\"area\\\"===t.type)i=c[o];else{var f=t._module;if(f||(f=(n.modules[t.type||a.type.dflt]||{})._module),!f)return!1;if(!(i=(r=f.attributes)&&r[o])){var h=f.basePlotModule;h&&h.attributes&&(i=h.attributes[o])}i||(i=a[o])}return y(i,e,s)},r.getLayoutValObject=function(t,e){return y(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r<l.length;r++){if((a=l[r]).attrRegex&&a.attrRegex.test(e)){if(a.layoutAttrOverrides)return a.layoutAttrOverrides;!c&&a.layoutAttributes&&(c=a.layoutAttributes)}var f=a.baseLayoutAttrOverrides;if(f&&e in f)return f[e]}if(c)return c}var h=t._modules;if(h)for(r=0;r<h.length;r++)if((s=h[r].layoutAttributes)&&e in s)return s[e];for(i in n.componentsRegistry)if(!(a=n.componentsRegistry[i]).schema&&e===a.name)return a.layoutAttributes;if(e in o)return o[e];if(\\\"radialaxis\\\"===e||\\\"angularaxis\\\"===e)return u[e];return u.layout[e]||!1}(t,e[0]),e,1)}},{\\\"../lib\\\":696,\\\"../plots/animation_attributes\\\":740,\\\"../plots/attributes\\\":742,\\\"../plots/frame_attributes\\\":773,\\\"../plots/layout_attributes\\\":800,\\\"../plots/polar/legacy/area_attributes\\\":815,\\\"../plots/polar/legacy/axis_attributes\\\":816,\\\"../registry\\\":828,\\\"./edit_types\\\":728}],735:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plots/attributes\\\"),a=\\\"templateitemname\\\",o={name:{valType:\\\"string\\\",editType:\\\"none\\\"}};function s(t){return t&&\\\"string\\\"==typeof t}function l(t){var e=t.length-1;return\\\"s\\\"!==t.charAt(e)&&n.warn(\\\"bad argument to arrayDefaultKey: \\\"+t),t.substr(0,t.length-1)+\\\"defaults\\\"}o[a]={valType:\\\"string\\\",editType:\\\"calc\\\"},r.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=o.name,e[a]=o[a],e},r.traceTemplater=function(t){var e,r,a={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(a[e]=0);return{newTrace:function(o){var s={type:e=n.coerce(o,{},i,\\\"type\\\"),_template:null};if(e in a){r=t[e];var l=a[e]%r.length;a[e]++,s._template=r[l]}return s}}},r.newContainer=function(t,e,r){var i=t._template,a=i&&(i[e]||r&&i[r]);return n.isPlainObject(a)||(a=null),t[e]={_template:a}},r.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],o=n&&n[e];Array.isArray(o)&&o.length||(o=[]);var c={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[a]=t[a];if(!s(n))return e._template=i,e;for(var l=0;l<o.length;l++){var u=o[l];if(u.name===n)return c[n]=1,e._template=u,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e<o.length;e++){var r=o[e],n=r.name;if(s(n)&&!c[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i[a]=r[a],t.push(i),c[n]=1}}return t}}},r.arrayDefaultKey=l,r.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,o=r._index,s=o>=i&&(r._input||{})._templateitemname;s&&(o=i);var l,c=e+\\\"[\\\"+o+\\\"]\\\";function u(){l={},s&&(l[c]={},l[c][a]=s)}function f(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+\\\".\\\"+t]=e}function h(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:f,getUpdateObj:h,applyUpdate:function(e,r){e&&f(e,r);var i=h();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\\\"../lib\\\":696,\\\"../plots/attributes\\\":742}],736:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../registry\\\"),a=t(\\\"../plots/plots\\\"),o=t(\\\"../lib\\\"),s=t(\\\"../lib/clear_gl_canvases\\\"),l=t(\\\"../components/color\\\"),c=t(\\\"../components/drawing\\\"),u=t(\\\"../components/titles\\\"),f=t(\\\"../components/modebar\\\"),h=t(\\\"../plots/cartesian/axes\\\"),p=t(\\\"../constants/alignment\\\"),d=t(\\\"../plots/cartesian/constraints\\\"),g=d.enforce,v=d.clean,m=t(\\\"../plots/cartesian/autorange\\\").doAutoRange;function y(t,e,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=t[1]||i[1]<=t[0])&&(a[0]<e[1]&&a[1]>e[0]))return!0}return!1}function x(t){var e,i,a,s,u,d=t._fullLayout,g=d._size,v=g.p,m=h.list(t,\\\"\\\",!0);if(d._paperdiv.style({width:t._context.responsive&&d.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\\\"100%\\\":d.width+\\\"px\\\",height:t._context.responsive&&d.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\\\"100%\\\":d.height+\\\"px\\\"}).selectAll(\\\".main-svg\\\").call(c.setSize,d.width,d.height),t._context.setBackground(t,d.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!d._has(\\\"cartesian\\\"))return t._promises.length&&Promise.all(t._promises);function x(t,e,r){var n=t._lw/2;return\\\"x\\\"===t._id.charAt(0)?e?\\\"top\\\"===r?e._offset-v-n:e._offset+e._length+v+n:g.t+g.h*(1-(t.position||0))+n%1:e?\\\"right\\\"===r?e._offset+e._length+v+n:e._offset-v-n:g.l+g.w*(t.position||0)+n%1}for(e=0;e<m.length;e++){var w=m[e];w.setScale();var M=w._anchorAxis;w._linepositions={},w._lw=c.crispRound(t,w.linewidth,1),w._mainLinePosition=x(w,M,w.side),w._mainMirrorPosition=w.mirror&&M?x(w,M,p.OPPOSITE_SIDE[w.side]):null,w._mainSubplot=b(w,d)}var A=[],T=[],S=[],C=1===l.opacity(d.paper_bgcolor)&&1===l.opacity(d.plot_bgcolor)&&d.paper_bgcolor===d.plot_bgcolor;for(i in d._plots)if((a=d._plots[i]).mainplot)a.bg&&a.bg.remove(),a.bg=void 0;else{var E=a.xaxis.domain,L=a.yaxis.domain,z=a.plotgroup;if(y(E,L,S)){var O=z.node(),I=a.bg=o.ensureSingle(z,\\\"rect\\\",\\\"bg\\\");O.insertBefore(I.node(),O.childNodes[0]),T.push(i)}else z.select(\\\"rect.bg\\\").remove(),S.push([E,L]),C||(A.push(i),T.push(i))}var P,D,R,B,F,N,j,V,U,q,H,G,W,Y=d._bgLayer.selectAll(\\\".bg\\\").data(A);for(Y.enter().append(\\\"rect\\\").classed(\\\"bg\\\",!0),Y.exit().remove(),Y.each(function(t){d._plots[t].bg=n.select(this)}),e=0;e<T.length;e++)a=d._plots[T[e]],s=a.xaxis,u=a.yaxis,a.bg&&a.bg.call(c.setRect,s._offset-v,u._offset-v,s._length+2*v,u._length+2*v).call(l.fill,d.plot_bgcolor).style(\\\"stroke-width\\\",0);if(!d._hasOnlyLargeSploms)for(i in d._plots){a=d._plots[i],s=a.xaxis,u=a.yaxis;var X,Z,$=a.clipId=\\\"clip\\\"+d._uid+i+\\\"plot\\\",J=o.ensureSingleById(d._clips,\\\"clipPath\\\",$,function(t){t.classed(\\\"plotclip\\\",!0).append(\\\"rect\\\")});a.clipRect=J.select(\\\"rect\\\").attr({width:s._length,height:u._length}),c.setTranslate(a.plot,s._offset,u._offset),a._hasClipOnAxisFalse?(X=null,Z=$):(X=$,Z=null),c.setClipUrl(a.plot,X),a.layerClipId=Z}function K(t){return\\\"M\\\"+P+\\\",\\\"+t+\\\"H\\\"+D}function Q(t){return\\\"M\\\"+s._offset+\\\",\\\"+t+\\\"h\\\"+s._length}function tt(t){return\\\"M\\\"+t+\\\",\\\"+V+\\\"V\\\"+j}function et(t){return\\\"M\\\"+t+\\\",\\\"+u._offset+\\\"v\\\"+u._length}function rt(t,e,r){if(!t.showline||i!==t._mainSubplot)return\\\"\\\";if(!t._anchorAxis)return r(t._mainLinePosition);var n=e(t._mainLinePosition);return t.mirror&&(n+=e(t._mainMirrorPosition)),n}for(i in d._plots){a=d._plots[i],s=a.xaxis,u=a.yaxis;var nt=\\\"M0,0\\\";_(s,i)&&(F=k(s,\\\"left\\\",u,m),P=s._offset-(F?v+F:0),N=k(s,\\\"right\\\",u,m),D=s._offset+s._length+(N?v+N:0),R=x(s,u,\\\"bottom\\\"),B=x(s,u,\\\"top\\\"),!(W=!s._anchorAxis||i!==s._mainSubplot)||\\\"allticks\\\"!==s.mirror&&\\\"all\\\"!==s.mirror||(s._linepositions[i]=[R,B]),nt=rt(s,K,Q),W&&s.showline&&(\\\"all\\\"===s.mirror||\\\"allticks\\\"===s.mirror)&&(nt+=K(R)+K(B)),a.xlines.style(\\\"stroke-width\\\",s._lw+\\\"px\\\").call(l.stroke,s.showline?s.linecolor:\\\"rgba(0,0,0,0)\\\")),a.xlines.attr(\\\"d\\\",nt);var it=\\\"M0,0\\\";_(u,i)&&(H=k(u,\\\"bottom\\\",s,m),j=u._offset+u._length+(H?v:0),G=k(u,\\\"top\\\",s,m),V=u._offset-(G?v:0),U=x(u,s,\\\"left\\\"),q=x(u,s,\\\"right\\\"),!(W=!u._anchorAxis||i!==u._mainSubplot)||\\\"allticks\\\"!==u.mirror&&\\\"all\\\"!==u.mirror||(u._linepositions[i]=[U,q]),it=rt(u,tt,et),W&&u.showline&&(\\\"all\\\"===u.mirror||\\\"allticks\\\"===u.mirror)&&(it+=tt(U)+tt(q)),a.ylines.style(\\\"stroke-width\\\",u._lw+\\\"px\\\").call(l.stroke,u.showline?u.linecolor:\\\"rgba(0,0,0,0)\\\")),a.ylines.attr(\\\"d\\\",it)}return h.makeClipPaths(t),t._promises.length&&Promise.all(t._promises)}function b(t,e){var r=e._subplots,n=r.cartesian.concat(r.gl2d||[]),i={_fullLayout:e},a=\\\"x\\\"===t._id.charAt(0),o=t._mainAxis._anchorAxis,s=\\\"\\\",l=\\\"\\\",c=\\\"\\\";if(o&&(c=o._mainAxis._id,s=a?t._id+c:c+t._id),!s||!e._plots[s]){s=\\\"\\\";for(var u=0;u<n.length;u++){var f=n[u],p=f.indexOf(\\\"y\\\"),d=a?f.substr(0,p):f.substr(p),g=a?f.substr(p):f.substr(0,p);if(d===t._id){l||(l=f);var v=h.getFromId(i,g);if(c&&v.overlaying===c){s=f;break}}}}return s||l}function _(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||\\\"all\\\"===t.mirror||\\\"allticks\\\"===t.mirror)}function w(t,e,r){if(!r.showline||!r._lw)return!1;if(\\\"all\\\"===r.mirror||\\\"allticks\\\"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=p.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&&n.domain[1-i]===t.domain[1-i]}function k(t,e,r,n){if(w(t,e,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&w(t,e,a))return a._lw}return 0}r.layoutStyles=function(t){return o.syncOrAsync([a.doAutoMargin,x],t)},r.drawMainTitle=function(t){var e=t._fullLayout;u.draw(t,\\\"gtitle\\\",{propContainer:e,propName:\\\"title\\\",placeholder:e._dfltTitle.plot,attributes:{x:e.width/2,y:e._size.t/2,\\\"text-anchor\\\":\\\"middle\\\"}})},r.doTraceStyle=function(t){var e,n=t.calcdata,o=[];for(e=0;e<n.length;e++){var l=n[e],c=l[0]||{},u=c.trace||{},f=u._module||{},h=f.arraysToCalcdata;h&&h(l,u);var p=f.editStyle;p&&o.push({fn:p,cd0:c})}if(o.length){for(e=0;e<o.length;e++){var d=o[e];d.fn(t,d.cd0)}s(t),r.redrawReglTraces(t)}return a.style(t),i.getComponentMethod(\\\"legend\\\",\\\"draw\\\")(t),a.previousPromises(t)},r.doColorBars=function(t){for(var e=0;e<t.calcdata.length;e++){var r=t.calcdata[e][0];if((r.t||{}).cb){var n=r.trace,o=r.t.cb;i.traceIs(n,\\\"contour\\\")&&o.line({width:!1!==n.contours.showlines?n.line.width:0,dash:n.line.dash,color:\\\"line\\\"===n.contours.coloring?o._opts.line.color:n.line.color});var s=n._module.colorbar.container,l=(s?n[s]:n).colorbar;o.options(l)()}}return a.previousPromises(t)},r.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,i.call(\\\"plot\\\",t,\\\"\\\",e)},r.doLegend=function(t){return i.getComponentMethod(\\\"legend\\\",\\\"draw\\\")(t),a.previousPromises(t)},r.doTicksRelayout=function(t){return h.doTicks(t,\\\"redraw\\\"),t._fullLayout._hasOnlyLargeSploms&&(i.subplotsRegistry.splom.updateGrid(t),s(t),r.redrawReglTraces(t)),r.drawMainTitle(t),a.previousPromises(t)},r.doModeBar=function(t){var e=t._fullLayout;f.manage(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(t)}return a.previousPromises(t)},r.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){var i=e[r[n]];i._scene.setCamera(i.camera)}},r.drawData=function(t){var e,n=t._fullLayout,o=t.calcdata;for(e=0;e<o.length;e++){var l=o[e][0].trace;!0===l.visible&&l._module.colorbar||n._infolayer.select(\\\".cb\\\"+l.uid).remove()}s(t);var c=n._basePlotModules;for(e=0;e<c.length;e++)c[e].plot(t);return r.redrawReglTraces(t),a.style(t),i.getComponentMethod(\\\"shapes\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"annotations\\\",\\\"draw\\\")(t),n._replotting=!1,a.previousPromises(t)},r.redrawReglTraces=function(t){var e=t._fullLayout;if(e._has(\\\"regl\\\")){var r,n,i=t._fullData,a=[],s=[];for(e._hasOnlyLargeSploms&&e._splomGrid.draw(),r=0;r<i.length;r++){var l=i[r];!0===l.visible&&(\\\"splom\\\"===l.type?e._splomScenes[l.uid].draw():\\\"scattergl\\\"===l.type?o.pushUnique(a,l.xaxis+l.yaxis):\\\"scatterpolargl\\\"===l.type&&o.pushUnique(s,l.subplot))}for(r=0;r<a.length;r++)(n=e._plots[a[r]])._scene&&n._scene.draw();for(r=0;r<s.length;r++)(n=e[s[r]]._subplot)._scene&&n._scene.draw()}},r.doAutoRangeAndConstraints=function(t){for(var e=h.list(t,\\\"\\\",!0),r=0;r<e.length;r++){var n=e[r];v(t,n),m(t,n)}g(t)},r.finalDraw=function(t){i.getComponentMethod(\\\"shapes\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"images\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"annotations\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"rangeslider\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"rangeselector\\\",\\\"draw\\\")(t)},r.drawMarginPushers=function(t){i.getComponentMethod(\\\"legend\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"rangeselector\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"sliders\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"updatemenus\\\",\\\"draw\\\")(t)}},{\\\"../components/color\\\":570,\\\"../components/drawing\\\":595,\\\"../components/modebar\\\":633,\\\"../components/titles\\\":661,\\\"../constants/alignment\\\":668,\\\"../lib\\\":696,\\\"../lib/clear_gl_canvases\\\":679,\\\"../plots/cartesian/autorange\\\":744,\\\"../plots/cartesian/axes\\\":745,\\\"../plots/cartesian/constraints\\\":753,\\\"../plots/plots\\\":809,\\\"../registry\\\":828,d3:148}],737:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=n.isPlainObject,a=t(\\\"./plot_schema\\\"),o=t(\\\"../plots/plots\\\"),s=t(\\\"../plots/attributes\\\"),l=t(\\\"./plot_template\\\"),c=t(\\\"./plot_config\\\");function u(t,e){t=n.extendDeep({},t);var r,a,o=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))u(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var o=l.arrayTemplater({_template:t},n);for(a=0;a<r.length;a++){var s=r[a],c=o.newItem(s)._template;c&&u(c,s)}var f=o.defaultItems();for(a=0;a<f.length;a++)r.push(f[a]._template);for(a=0;a<r.length;a++)delete r[a].templateitemname}}for(r=0;r<o.length;r++){var c=o[r],h=t[c];if(c in e?s(h,e[c],c):e[c]=h,f(c)===c)for(var p in e){var d=f(p);p===d||d!==c||p in t||s(h,e[p],c)}}}function f(t){return t.replace(/[0-9]+$/,\\\"\\\")}function h(t,e,r,a,o){var s=o&&r(o);for(var c in t){var u=t[c],d=p(t,c,a),g=p(t,c,o),v=r(g);if(!v){var m=f(c);m!==c&&(v=r(g=p(t,m,o)))}if((!s||s!==v)&&!(!v||v._noTemplating||\\\"data_array\\\"===v.valType||v.arrayOk&&Array.isArray(u)))if(!v.valType&&i(u))h(u,e,r,d,g);else if(v._isLinkedToArray&&Array.isArray(u))for(var y=!1,x=0,b={},_=0;_<u.length;_++){var w=u[_];if(i(w)){var k=w.name;if(k)b[k]||(h(w,e,r,p(u,x,d),p(u,x,g)),x++,b[k]=1);else if(!y){var M=p(t,l.arrayDefaultKey(c),a),A=p(u,x,d);h(w,e,r,A,p(u,x,g));var T=n.nestedProperty(e,A);n.nestedProperty(e,M).set(T.get()),T.set(null),y=!0}}}else{n.nestedProperty(e,d).set(u)}}}function p(t,e,r){return r?Array.isArray(t)?r+\\\"[\\\"+e+\\\"]\\\":r+\\\".\\\"+e:e}function d(t){for(var e=0;e<t.length;e++)if(i(t[e]))return!0}function g(t){var e;switch(t.code){case\\\"data\\\":e=\\\"The template has no key data.\\\";break;case\\\"layout\\\":e=\\\"The template has no key layout.\\\";break;case\\\"missing\\\":e=t.path?\\\"There are no templates for item \\\"+t.path+\\\" with name \\\"+t.templateitemname:\\\"There are no templates for trace \\\"+t.index+\\\", of type \\\"+t.traceType+\\\".\\\";break;case\\\"unused\\\":e=t.path?\\\"The template item at \\\"+t.path+\\\" was not used in constructing the plot.\\\":t.dataCount?\\\"Some of the templates of type \\\"+t.traceType+\\\" were not used. The template has \\\"+t.templateCount+\\\" traces, the data only has \\\"+t.dataCount+\\\" of this type.\\\":\\\"The template has \\\"+t.templateCount+\\\" traces of type \\\"+t.traceType+\\\" but there are none in the data.\\\";break;case\\\"reused\\\":e=\\\"Some of the templates of type \\\"+t.traceType+\\\" were used more than once. The template has \\\"+t.templateCount+\\\" traces, the data has \\\"+t.dataCount+\\\" of this type.\\\"}return t.msg=e,t}r.makeTemplate=function(t){t=n.extendDeep({_context:c},{data:t.data,layout:t.layout}),o.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var l={data:{},layout:{}};e.forEach(function(t){var e={};h(t,e,function(t,e){return a.getTraceValObject(t,n.nestedProperty({},e).parts)}.bind(null,t));var r=n.coerce(t,{},s,\\\"type\\\"),i=l.data[r];i||(i=l.data[r]=[]),i.push(e)}),h(r,l.layout,function(t,e){return a.getLayoutValObject(t,n.nestedProperty({},e).parts)}.bind(null,r)),delete l.layout.template;var f=r.template;if(i(f)){var p,d,g,v,m,y,x=f.layout;i(x)&&u(x,l.layout);var b=f.data;if(i(b)){for(d in l.data)if(g=b[d],Array.isArray(g)){for(y=(m=l.data[d]).length,v=g.length,p=0;p<y;p++)u(g[p%v],m[p]);for(p=y;p<v;p++)m.push(n.extendDeep({},g[p]))}for(d in b)d in l.data||(l.data[d]=n.extendDeep([],b[d]))}}return l},r.validateTemplate=function(t,e){var r=n.extendDeep({},{_context:c,data:t.data,layout:t.layout}),a=r.layout||{};i(e)||(e=a.template||{});var s=e.layout,l=e.data,u=[];r.layout=a,r.layout.template=e,o.supplyDefaults(r);var h=r._fullLayout,v=r._fullData,m={};if(i(s)?(!function t(e,r){for(var n in e)if(\\\"_\\\"!==n.charAt(0)&&i(e[n])){var a,o=f(n),s=[];for(a=0;a<r.length;a++)s.push(p(e,n,r[a])),o!==n&&s.push(p(e,o,r[a]));for(a=0;a<s.length;a++)m[s[a]]=1;t(e[n],s)}}(h,[\\\"layout\\\"]),function t(e,r){for(var n in e)if(-1===n.indexOf(\\\"defaults\\\")&&i(e[n])){var a=p(e,n,r);m[a]?t(e[n],a):u.push({code:\\\"unused\\\",path:a})}}(s,\\\"layout\\\")):u.push({code:\\\"layout\\\"}),i(l)){for(var y,x={},b=0;b<v.length;b++){var _=v[b];x[y=_.type]=(x[y]||0)+1,_._fullInput._template||u.push({code:\\\"missing\\\",index:_._fullInput.index,traceType:y})}for(y in l){var w=l[y].length,k=x[y]||0;w>k?u.push({code:\\\"unused\\\",traceType:y,templateCount:w,dataCount:k}):k>w&&u.push({code:\\\"reused\\\",traceType:y,templateCount:w,dataCount:k})}}else u.push({code:\\\"data\\\"});if(function t(e,r){for(var n in e)if(\\\"_\\\"!==n.charAt(0)){var a=e[n],o=p(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&u.push({code:\\\"missing\\\",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&d(a)&&t(a,o)}}({data:v,layout:h},\\\"\\\"),u.length)return u.map(g)}},{\\\"../lib\\\":696,\\\"../plots/attributes\\\":742,\\\"../plots/plots\\\":809,\\\"./plot_config\\\":733,\\\"./plot_schema\\\":734,\\\"./plot_template\\\":735}],738:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./plot_api\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../snapshot/helpers\\\"),o=t(\\\"../snapshot/tosvg\\\"),s=t(\\\"../snapshot/svgtoimg\\\"),l={format:{valType:\\\"enumerated\\\",values:[\\\"png\\\",\\\"jpeg\\\",\\\"webp\\\",\\\"svg\\\"],dflt:\\\"png\\\"},width:{valType:\\\"number\\\",min:1},height:{valType:\\\"number\\\",min:1},scale:{valType:\\\"number\\\",min:0,dflt:1},setBackground:{valType:\\\"any\\\",dflt:!1},imageDataOnly:{valType:\\\"boolean\\\",dflt:!1}},c=/^data:image\\\\/\\\\w+;base64,/;e.exports=function(t,e){var r,u,f;function h(t){return!(t in e)||i.validate(e[t],l[t])}if(e=e||{},i.isPlainObject(t)?(r=t.data||[],u=t.layout||{},f=t.config||{}):(t=i.getGraphDiv(t),r=i.extendDeep([],t.data),u=i.extendDeep({},t.layout),f=t._context),!h(\\\"width\\\")||!h(\\\"height\\\"))throw new Error(\\\"Height and width should be pixel values.\\\");if(!h(\\\"format\\\"))throw new Error(\\\"Image format is not jpeg, png, svg or webp.\\\");var p={};function d(t,r){return i.coerce(e,p,l,t,r)}var g=d(\\\"format\\\"),v=d(\\\"width\\\"),m=d(\\\"height\\\"),y=d(\\\"scale\\\"),x=d(\\\"setBackground\\\"),b=d(\\\"imageDataOnly\\\"),_=document.createElement(\\\"div\\\");_.style.position=\\\"absolute\\\",_.style.left=\\\"-5000px\\\",document.body.appendChild(_);var w=i.extendFlat({},u);v&&(w.width=v),m&&(w.height=m);var k=i.extendFlat({},f,{staticPlot:!0,setBackground:x}),M=a.getRedrawFunc(_);function A(){return new Promise(function(t){setTimeout(t,a.getDelay(_._fullLayout))})}function T(){return new Promise(function(t,e){var r=o(_,g,y),a=_._fullLayout.width,l=_._fullLayout.height;if(n.purge(_),document.body.removeChild(_),\\\"svg\\\"===g)return t(b?r:\\\"data:image/svg+xml,\\\"+encodeURIComponent(r));var c=document.createElement(\\\"canvas\\\");c.id=i.randstr(),s({format:g,width:a,height:l,scale:y,canvas:c,svg:r,promise:!0}).then(t).catch(e)})}return new Promise(function(t,e){n.plot(_,r,w,k).then(M).then(A).then(T).then(function(e){t(function(t){return b?t.replace(c,\\\"\\\"):t}(e))}).catch(function(t){e(t)})})}},{\\\"../lib\\\":696,\\\"../snapshot/helpers\\\":832,\\\"../snapshot/svgtoimg\\\":834,\\\"../snapshot/tosvg\\\":836,\\\"./plot_api\\\":732}],739:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plots/plots\\\"),a=t(\\\"./plot_schema\\\"),o=t(\\\"./plot_config\\\"),s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;h<f.length;h++){var v=f[h];if(\\\"transforms\\\"!==v){var m=o.slice();m.push(v);var y=t[v],x=e[v],b=g(r,v),_=\\\"info_array\\\"===(b||{}).valType,w=\\\"colorscale\\\"===(b||{}).valType,k=(b||{}).items;if(d(r,v))if(s(y)&&s(x))u(y,x,b,i,a,m);else if(_&&l(y)){y.length>x.length&&i.push(p(\\\"unused\\\",a,m.concat(x.length)));var M,A,T,S,C,E=x.length,L=Array.isArray(k);if(L&&(E=Math.min(E,k.length)),2===b.dimensions)for(A=0;A<E;A++)if(l(y[A])){y[A].length>x[A].length&&i.push(p(\\\"unused\\\",a,m.concat(A,x[A].length)));var z=x[A].length;for(M=0;M<(L?Math.min(z,k[A].length):z);M++)T=L?k[A][M]:k,S=y[A][M],C=x[A][M],n.validate(S,T)?C!==S&&C!==+S&&i.push(p(\\\"dynamic\\\",a,m.concat(A,M),S,C)):i.push(p(\\\"value\\\",a,m.concat(A,M),S))}else i.push(p(\\\"array\\\",a,m.concat(A),y[A]));else for(A=0;A<E;A++)T=L?k[A]:k,S=y[A],C=x[A],n.validate(S,T)?C!==S&&C!==+S&&i.push(p(\\\"dynamic\\\",a,m.concat(A),S,C)):i.push(p(\\\"value\\\",a,m.concat(A),S))}else if(b.items&&!_&&l(y)){var O,I,P=k[Object.keys(k)[0]],D=[];for(O=0;O<x.length;O++){var R=x[O]._index||O;if((I=m.slice()).push(R),s(y[R])&&s(x[O])){D.push(R);var B=y[R],F=x[O];s(B)&&!1!==B.visible&&!1===F.visible?i.push(p(\\\"invisible\\\",a,I)):u(B,F,P,i,a,I)}}for(O=0;O<y.length;O++)(I=m.slice()).push(O),s(y[O])?-1===D.indexOf(O)&&i.push(p(\\\"unused\\\",a,I)):i.push(p(\\\"object\\\",a,I,y[O]))}else!s(y)&&s(x)?i.push(p(\\\"object\\\",a,m,y)):c(y)||!c(x)||_||w?v in e?n.validate(y,b)?\\\"enumerated\\\"===b.valType&&(b.coerceNumber&&y!==+x||y!==x)&&i.push(p(\\\"dynamic\\\",a,m,y,x)):i.push(p(\\\"value\\\",a,m,y)):i.push(p(\\\"unused\\\",a,m,y)):i.push(p(\\\"array\\\",a,m,y));else i.push(p(\\\"schema\\\",a,m))}}return i}e.exports=function(t,e){var r,c,f=a.get(),h=[],d={_context:n.extendFlat({},o)};l(t)?(d.data=n.extendDeep([],t),r=t):(d.data=[],r=[],h.push(p(\\\"array\\\",\\\"data\\\"))),s(e)?(d.layout=n.extendDeep({},e),c=e):(d.layout={},c={},arguments.length>1&&h.push(p(\\\"object\\\",\\\"layout\\\"))),i.supplyDefaults(d);for(var g=d._fullData,v=r.length,m=0;m<v;m++){var y=r[m],x=[\\\"data\\\",m];if(s(y)){var b=g[m],_=b.type,w=f.traces[_].attributes;w.type={valType:\\\"enumerated\\\",values:[_]},!1===b.visible&&!1!==y.visible&&h.push(p(\\\"invisible\\\",x)),u(y,b,w,h,x);var k=y.transforms,M=b.transforms;if(k){l(k)||h.push(p(\\\"array\\\",x,[\\\"transforms\\\"])),x.push(\\\"transforms\\\");for(var A=0;A<k.length;A++){var T=[\\\"transforms\\\",A],S=k[A].type;if(s(k[A])){var C=f.transforms[S]?f.transforms[S].attributes:{};C.type={valType:\\\"enumerated\\\",values:Object.keys(f.transforms)},u(k[A],M[A],C,h,x,T)}else h.push(p(\\\"object\\\",x,T))}}}else h.push(p(\\\"object\\\",x))}return u(c,d._fullLayout,function(t,e){for(var r=t.layout.layoutAttributes,i=0;i<e.length;i++){var a=e[i],o=t.traces[a.type],s=o.layoutAttributes;s&&(a.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}(f,g),h,\\\"layout\\\"),0===h.length?void 0:h};var f={object:function(t,e){return(\\\"layout\\\"===t&&\\\"\\\"===e?\\\"The layout argument\\\":\\\"data\\\"===t[0]&&\\\"\\\"===e?\\\"Trace \\\"+t[1]+\\\" in the data argument\\\":h(t)+\\\"key \\\"+e)+\\\" must be linked to an object container\\\"},array:function(t,e){return(\\\"data\\\"===t?\\\"The data argument\\\":h(t)+\\\"key \\\"+e)+\\\" must be linked to an array container\\\"},schema:function(t,e){return h(t)+\\\"key \\\"+e+\\\" is not part of the schema\\\"},unused:function(t,e,r){var n=s(r)?\\\"container\\\":\\\"key\\\";return h(t)+n+\\\" \\\"+e+\\\" did not get coerced\\\"},dynamic:function(t,e,r,n){return[h(t)+\\\"key\\\",e,\\\"(set to '\\\"+r+\\\"')\\\",\\\"got reset to\\\",\\\"'\\\"+n+\\\"'\\\",\\\"during defaults.\\\"].join(\\\" \\\")},invisible:function(t,e){return(e?h(t)+\\\"item \\\"+e:\\\"Trace \\\"+t[1])+\\\" got defaulted to be not visible\\\"},value:function(t,e,r){return[h(t)+\\\"key \\\"+e,\\\"is set to an invalid value (\\\"+r+\\\")\\\"].join(\\\" \\\")}};function h(t){return l(t)?\\\"In data trace \\\"+t[1]+\\\", \\\":\\\"In \\\"+t+\\\", \\\"}function p(t,e,r,i,a){var o,s;r=r||\\\"\\\",l(e)?(o=e[0],s=e[1]):(o=e,s=null);var c=function(t){if(!l(t))return String(t);for(var e=\\\"\\\",r=0;r<t.length;r++){var n=t[r];\\\"number\\\"==typeof n?e=e.substr(0,e.length-1)+\\\"[\\\"+n+\\\"]\\\":e+=n,r<t.length-1&&(e+=\\\".\\\")}return e}(r),u=f[t](e,c,i,a);return n.log(u),{code:t,container:o,trace:s,path:r,astr:c,msg:u}}function d(t,e){var r=m(e),n=r.keyMinusId,i=r.id;return!!(n in t&&t[n]._isSubplotObj&&i)||e in t}function g(t,e){return e in t?t[e]:t[m(e).keyMinusId]}var v=n.counterRegex(\\\"([a-z]+)\\\");function m(t){var e=t.match(v);return{keyMinusId:e&&e[1],id:e&&e[2]}}},{\\\"../lib\\\":696,\\\"../plots/plots\\\":809,\\\"./plot_config\\\":733,\\\"./plot_schema\\\":734}],740:[function(t,e,r){\\\"use strict\\\";e.exports={mode:{valType:\\\"enumerated\\\",dflt:\\\"afterall\\\",values:[\\\"immediate\\\",\\\"next\\\",\\\"afterall\\\"]},direction:{valType:\\\"enumerated\\\",values:[\\\"forward\\\",\\\"reverse\\\"],dflt:\\\"forward\\\"},fromcurrent:{valType:\\\"boolean\\\",dflt:!1},frame:{duration:{valType:\\\"number\\\",min:0,dflt:500},redraw:{valType:\\\"boolean\\\",dflt:!0}},transition:{duration:{valType:\\\"number\\\",min:0,dflt:500},easing:{valType:\\\"enumerated\\\",dflt:\\\"cubic-in-out\\\",values:[\\\"linear\\\",\\\"quad\\\",\\\"cubic\\\",\\\"sin\\\",\\\"exp\\\",\\\"circle\\\",\\\"elastic\\\",\\\"back\\\",\\\"bounce\\\",\\\"linear-in\\\",\\\"quad-in\\\",\\\"cubic-in\\\",\\\"sin-in\\\",\\\"exp-in\\\",\\\"circle-in\\\",\\\"elastic-in\\\",\\\"back-in\\\",\\\"bounce-in\\\",\\\"linear-out\\\",\\\"quad-out\\\",\\\"cubic-out\\\",\\\"sin-out\\\",\\\"exp-out\\\",\\\"circle-out\\\",\\\"elastic-out\\\",\\\"back-out\\\",\\\"bounce-out\\\",\\\"linear-in-out\\\",\\\"quad-in-out\\\",\\\"cubic-in-out\\\",\\\"sin-in-out\\\",\\\"exp-in-out\\\",\\\"circle-in-out\\\",\\\"elastic-in-out\\\",\\\"back-in-out\\\",\\\"bounce-in-out\\\"]}}}},{}],741:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plot_api/plot_template\\\");e.exports=function(t,e,r){var a,o,s=r.name,l=r.inclusionAttr||\\\"visible\\\",c=e[s],u=n.isArrayOrTypedArray(t[s])?t[s]:[],f=e[s]=[],h=i.arrayTemplater(e,s,l);for(a=0;a<u.length;a++){var p=u[a];n.isPlainObject(p)?o=h.newItem(p):(o=h.newItem({}))[l]=!1,o._index=a,!1!==o[l]&&r.handleItemDefaults(p,o,e,r),f.push(o)}var d=h.defaultItems();for(a=0;a<d.length;a++)(o=d[a])._index=f.length,r.handleItemDefaults({},o,e,r,{}),f.push(o);if(n.isArrayOrTypedArray(c)){var g=Math.min(c.length,f.length);for(a=0;a<g;a++)n.relinkPrivateKeys(f[a],c[a])}return f}},{\\\"../lib\\\":696,\\\"../plot_api/plot_template\\\":735}],742:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../components/fx/attributes\\\");e.exports={type:{valType:\\\"enumerated\\\",values:[],dflt:\\\"scatter\\\",editType:\\\"calc+clearAxisTypes\\\",_noTemplating:!0},visible:{valType:\\\"enumerated\\\",values:[!0,!1,\\\"legendonly\\\"],dflt:!0,editType:\\\"calc\\\"},showlegend:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"style\\\"},legendgroup:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"style\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,editType:\\\"style\\\"},name:{valType:\\\"string\\\",editType:\\\"style\\\"},uid:{valType:\\\"string\\\",editType:\\\"plot\\\"},ids:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},customdata:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},selectedpoints:{valType:\\\"any\\\",editType:\\\"calc\\\"},hoverinfo:{valType:\\\"flaglist\\\",flags:[\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"text\\\",\\\"name\\\"],extras:[\\\"all\\\",\\\"none\\\",\\\"skip\\\"],arrayOk:!0,dflt:\\\"all\\\",editType:\\\"none\\\"},hoverlabel:n.hoverlabel,stream:{token:{valType:\\\"string\\\",noBlank:!0,strict:!0,editType:\\\"calc\\\"},maxpoints:{valType:\\\"number\\\",min:0,max:1e4,dflt:500,editType:\\\"calc\\\"},editType:\\\"calc\\\"},transforms:{_isLinkedToArray:\\\"transform\\\",editType:\\\"calc\\\"}}},{\\\"../components/fx/attributes\\\":604}],743:[function(t,e,r){\\\"use strict\\\";e.exports={xaxis:{valType:\\\"subplotid\\\",dflt:\\\"x\\\",editType:\\\"calc+clearAxisTypes\\\"},yaxis:{valType:\\\"subplotid\\\",dflt:\\\"y\\\",editType:\\\"calc+clearAxisTypes\\\"}}},{}],744:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").FP_SAFE;function o(t,e){var r,n,a=[],o=s(e),c=l(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return i.simpleMap(e.range,e.r2l);var h=u[0].val,p=f[0].val;for(r=1;r<u.length&&h===p;r++)h=Math.min(h,u[r].val);for(r=1;r<f.length&&h===p;r++)p=Math.max(p,f[r].val);var d=!1;if(e.range){var g=i.simpleMap(e.range,e.r2l);d=g[1]<g[0]}\\\"reversed\\\"===e.autorange&&(d=!0,e.autorange=!0);var v,m,y,x,b,_,w=e.rangemode,k=\\\"tozero\\\"===w,M=\\\"nonnegative\\\"===w,A=e._length,T=A/10,S=0;for(r=0;r<u.length;r++)for(v=u[r],n=0;n<f.length;n++)(_=(m=f[n]).val-v.val)>0&&((b=A-o(v)-o(m))>T?_/b>S&&(y=v,x=m,S=_/b):_/A>S&&(y={val:v.val,pad:0},x={val:m.val,pad:0},S=_/A));if(h===p){var C=h-1,E=h+1;if(k)if(0===h)a=[0,1];else{var L=(h>0?f:u).reduce(function(t,e){return Math.max(t,o(e))},0),z=h/(1-Math.min(.5,L/A));a=h>0?[0,z]:[z,0]}else a=M?[Math.max(0,C),Math.max(1,E)]:[C,E]}else k?(y.val>=0&&(y={val:0,pad:0}),x.val<=0&&(x={val:0,pad:0})):M&&(y.val-S*o(y)<0&&(y={val:0,pad:0}),x.val<=0&&(x={val:1,pad:0})),S=(x.val-y.val)/(A-o(y)-o(x)),a=[y.val-S*o(y),x.val+S*o(x)];return d&&a.reverse(),i.simpleMap(a,e.l2r||Number)}function s(t){var e=t._length/20;return\\\"domain\\\"===t.constrain&&t._inputDomain&&(e*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(t){return t.pad+(t.extrapad?e:0)}}function l(t,e){var r,n,i,a=e._id,o=t._fullData,s=t._fullLayout,l=[],f=[];function h(t,e){for(r=0;r<e.length;r++){var o=t[e[r]],s=(o._extremes||{})[a];if(!0===o.visible&&s){for(n=0;n<s.min.length;n++)i=s.min[n],c(l,i.val,i.pad,{extrapad:i.extrapad});for(n=0;n<s.max.length;n++)i=s.max[n],u(f,i.val,i.pad,{extrapad:i.extrapad})}}}return h(o,e._traceIndices),h(s.annotations||[],e._annIndices||[]),h(s.shapes||[],e._shapeIndices||[]),{min:l,max:f}}function c(t,e,r,n){f(t,e,r,n,p)}function u(t,e,r,n){f(t,e,r,n,d)}function f(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<t.length&&s;l++){var c=t[l];if(i(c.val,e)&&c.pad>=r&&(c.extrapad||!o)){s=!1;break}i(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=a&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function h(t){return n(t)&&Math.abs(t)<a}function p(t,e){return t<=e}function d(t,e){return t>=e}e.exports={getAutoRange:o,makePadFn:s,doAutoRange:function(t,e){e._length||e.setScale();var r;e.autorange&&(e.range=o(t,e),e._r=e.range.slice(),e._rl=i.simpleMap(e._r,e.r2l),(r=e._input).range=e.range.slice(),r.autorange=e.autorange);if(e._anchorAxis&&e._anchorAxis.rangeslider){var n=e._anchorAxis.rangeslider[e._name];n&&\\\"auto\\\"===n.rangemode&&(n.range=o(t,e)),(r=e._anchorAxis._input).rangeslider[e._name]=i.extendFlat({},n)}},findExtremes:function(t,e,r){r||(r={});t._m||t.setScale();var i,o,s,l,f,p,d,g,v,m=[],y=[],x=e.length,b=r.padded||!1,_=r.tozero&&(\\\"linear\\\"===t.type||\\\"-\\\"===t.type),w=\\\"log\\\"===t.type,k=!1;function M(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var A=M((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),T=M((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!k){if(g=1/0,v=-1/0,w)for(i=0;i<x;i++)(o=e[i])<g&&o>0&&(g=o),o>v&&o<a&&(v=o);else for(i=0;i<x;i++)(o=e[i])<g&&o>-a&&(g=o),o>v&&o<a&&(v=o);e=[g,v],x=2}var E={tozero:_,extrapad:b};function L(r){s=e[r],n(s)&&(p=A(r),d=T(r),g=s-C(r),v=s+S(r),w&&g<v/10&&(g=v/10),l=t.c2l(g),f=t.c2l(v),_&&(l=Math.min(0,l),f=Math.max(0,f)),h(l)&&c(m,l,d,E),h(f)&&u(y,f,p,E))}var z=Math.min(6,x);for(i=0;i<z;i++)L(i);for(i=x-1;i>=z;i--)L(i);return{min:m,max:y}},concatExtremes:l}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"fast-isnumeric\\\":214}],745:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../../components/titles\\\"),u=t(\\\"../../components/color\\\"),f=t(\\\"../../components/drawing\\\"),h=t(\\\"./layout_attributes\\\"),p=t(\\\"./clean_ticks\\\"),d=t(\\\"../../constants/numerical\\\"),g=d.ONEAVGYEAR,v=d.ONEAVGMONTH,m=d.ONEDAY,y=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=d.MINUS_SIGN,w=d.BADNUM,k=t(\\\"../../constants/alignment\\\").MID_SHIFT,M=t(\\\"../../constants/alignment\\\").LINE_SPACING,A=e.exports={};A.setConvert=t(\\\"./set_convert\\\");var T=t(\\\"./axis_autotype\\\"),S=t(\\\"./axis_ids\\\");A.id2name=S.id2name,A.name2id=S.name2id,A.cleanId=S.cleanId,A.list=S.list,A.listIds=S.listIds,A.getFromId=S.getFromId,A.getFromTrace=S.getFromTrace;var C=t(\\\"./autorange\\\");A.getAutoRange=C.getAutoRange,A.findExtremes=C.findExtremes,A.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+\\\"axis\\\"],c=n+\\\"ref\\\",u={};return i||(i=l[0]||a),a||(a=i),u[c]={valType:\\\"enumerated\\\",values:l.concat(a?[a]:[]),dflt:i},s.coerce(t,e,u,c)},A.coercePosition=function(t,e,r,n,i,a){var o,l;if(\\\"paper\\\"===n||\\\"pixel\\\"===n)o=s.ensureNumber,l=r(i,a);else{var c=A.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},A.cleanPosition=function(t,e,r){return(\\\"paper\\\"===r||\\\"pixel\\\"===r?s.ensureNumber:A.getFromId(e,r).cleanPos)(t)};var E=A.getDataConversions=function(t,e,r,n){var i,a=\\\"x\\\"===r||\\\"y\\\"===r||\\\"z\\\"===r?r:n;if(Array.isArray(a)){if(i={type:T(n),_categories:[]},A.setConvert(i),\\\"category\\\"===i.type)for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=A.getFromTrace(t,e,a);return i?{d2c:i.d2c,c2d:i.c2d}:\\\"ids\\\"===a?{d2c:z,c2d:z}:{d2c:L,c2d:L}};function L(t){return+t}function z(t){return String(t)}A.getDataToCoordFunc=function(t,e,r,n){return E(t,e,r,n).d2c},A.counterLetter=function(t){var e=t.charAt(0);return\\\"x\\\"===e?\\\"y\\\":\\\"y\\\"===e?\\\"x\\\":void 0},A.minDtick=function(t,e,r,n){-1===[\\\"log\\\",\\\"category\\\"].indexOf(t.type)&&n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},A.saveRangeInitial=function(t,e){for(var r=A.list(t,\\\"\\\",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial,s=o||!(a.range[0]===a._rangeInitial[0]&&a.range[1]===a._rangeInitial[1]);(o&&!1===a.autorange||e&&s)&&(a._rangeInitial=a.range.slice(),n=!0)}return n},A.saveShowSpikeInitial=function(t,e){for(var r=A.list(t,\\\"\\\",!0),n=!1,i=\\\"on\\\",a=0;a<r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),\\\"on\\\"!==i||o.showspikes||(i=\\\"off\\\")}return t._fullLayout._cartesianSpikesEnabled=i,n},A.autoBin=function(t,e,r,n,a,o){var l,c=s.aggNums(Math.min,null,t),u=s.aggNums(Math.max,null,t);if(\\\"category\\\"===e.type)return{start:c-.5,end:u+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:u-c};if(a||(a=e.calendar),l=\\\"log\\\"===e.type?{type:\\\"linear\\\",range:[c,u]}:{type:e.type,range:s.simpleMap([c,u],e.c2r,0,a),calendar:a},A.setConvert(l),o=o&&p.dtick(o,l.type))l.dtick=o,l.tick0=p.tick0(void 0,l.type,a);else{var f;if(r)f=(u-c)/r;else{var h=s.distinctVals(t),d=Math.pow(10,Math.floor(Math.log(h.minDiff)/Math.LN10)),g=d*s.roundUp(h.minDiff/d,[.9,1.9,4.9,9.9],!0);f=Math.max(g,2*s.stdev(t)/Math.pow(t.length,n?.25:.4)),i(f)||(f=1)}A.autoTicks(l,f)}var v,y=l.dtick,x=A.tickIncrement(A.tickFirst(l),y,\\\"reverse\\\",a);if(\\\"number\\\"==typeof y)v=(x=function(t,e,r,n,a){var o=0,s=0,l=0,c=0;function u(e){return(1+100*(e-t)/r.dtick)%100<2}for(var f=0;f<e.length;f++)e[f]%1==0?l++:i(e[f])||c++,u(e[f])&&o++,u(e[f]+r.dtick/2)&&s++;var h=e.length-c;if(l===h&&\\\"date\\\"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*h&&(o>.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p<n?p:-p}return t}(x,t,l,c,u))+(1+Math.floor((u-x)/y))*y;else for(\\\"M\\\"===l.dtick.charAt(0)&&(x=function(t,e,r,n,i){var a=s.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=A.tickIncrement(t,\\\"M6\\\",\\\"reverse\\\")+1.5*m:a.exactMonths>.8?t=A.tickIncrement(t,\\\"M1\\\",\\\"reverse\\\")+15.5*m:t-=m/2;var l=A.tickIncrement(t,r);if(l<=n)return l}return t}(x,t,y,c,a)),v=x,0;v<=u;)v=A.tickIncrement(v,y,!1,a),0;return{start:e.c2r(x,0,a),end:e.c2r(v,0,a),size:y,_dataSpan:u-c}},A.prepTicks=function(t){var e=s.simpleMap(t.range,t.r2l);if(\\\"auto\\\"===t.tickmode||!t.dtick){var r,n=t.nticks;n||(\\\"category\\\"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r=\\\"y\\\"===t._id.charAt(0)?40:80,n=s.constrain(t._length/r,4,9)+1),\\\"radialaxis\\\"===t._name&&(n*=2)),\\\"array\\\"===t.tickmode&&(n*=100),A.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0=\\\"date\\\"===t.type?\\\"2000-01-01\\\":0),\\\"date\\\"===t.type&&t.dtick<.1&&(t.dtick=.1),j(t)},A.calcTicks=function(t){A.prepTicks(t);var e=s.simpleMap(t.range,t.r2l);if(\\\"array\\\"===t.tickmode)return function(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=s.simpleMap(t.range,t.r2l),l=1.0001*o[0]-1e-4*o[1],c=1.0001*o[1]-1e-4*o[0],u=Math.min(l,c),f=Math.max(l,c),h=0;Array.isArray(i)||(i=[]);var p=\\\"category\\\"===t.type?t.d2l_noadd:t.d2l;\\\"log\\\"===t.type&&\\\"L\\\"!==String(t.dtick).charAt(0)&&(t.dtick=\\\"L\\\"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(r=0;r<n.length;r++)(e=p(n[r]))>u&&e<f&&(void 0===i[r]?a[h]=A.tickText(t,e):a[h]=V(t,e,String(i[r])),h++);h<n.length&&a.splice(h,n.length-h);return a}(t);t._tmin=A.tickFirst(t);var r=1.0001*e[0]-1e-4*e[1],n=1.0001*e[1]-1e-4*e[0],i=e[1]<e[0];if(t._tmin<r!==i)return[];var a=[];\\\"category\\\"===t.type&&(n=i?Math.max(-.5,n):Math.min(t._categories.length-.5,n));for(var o=null,l=Math.max(1e3,t._length||0),c=t._tmin;(i?c>=n:c<=n)&&!(a.length>l||c===o);c=A.tickIncrement(c,t.dtick,i,t.calendar))o=c,a.push(c);$(t)&&360===Math.abs(e[1]-e[0])&&a.pop(),t._tmax=a[a.length-1],t._prevDateHead=\\\"\\\",t._inCalcTicks=!0;for(var u=new Array(a.length),f=0;f<a.length;f++)u[f]=A.tickText(t,a[f]);return t._inCalcTicks=!1,u};var O=[2,5,10],I=[1,2,3,6,12],P=[1,2,5,10,15,30],D=[1,2,3,7,14],R=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],B=[-.301,0,.301,.699,1],F=[15,30,45,90,180];function N(t,e,r){return e*s.roundUp(t/e,r)}function j(t){var e=t.dtick;if(t._tickexponent=0,i(e)||\\\"string\\\"==typeof e||(e=1),\\\"category\\\"===t.type&&(t._tickround=null),\\\"date\\\"===t.type){var r=t.r2l(t.tick0),n=t.l2r(r).replace(/(^-|i)/g,\\\"\\\"),a=n.length;if(\\\"M\\\"===String(e).charAt(0))a>10||\\\"01-01\\\"!==n.substr(5)?t._tickround=\\\"d\\\":t._tickround=+e.substr(1)%12==0?\\\"y\\\":\\\"m\\\";else if(e>=m&&a<=10||e>=15*m)t._tickround=\\\"d\\\";else if(e>=x&&a<=16||e>=y)t._tickround=\\\"M\\\";else if(e>=b&&a<=19||e>=x)t._tickround=\\\"S\\\";else{var o=t.l2r(r+e).replace(/^-/,\\\"\\\").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||\\\"L\\\"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(q(t.exponentformat)&&!H(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function V(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||\\\"\\\",fontSize:n.size,font:n.family,fontColor:n.color}}A.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if(\\\"date\\\"===t.type){t.tick0=s.dateTick0(t.calendar);var a=2*e;a>g?(e/=g,r=n(10),t.dtick=\\\"M\\\"+12*N(e,r,O)):a>v?(e/=v,t.dtick=\\\"M\\\"+N(e,1,I)):a>m?(t.dtick=N(e,m,D),t.tick0=s.dateTick0(t.calendar,!0)):a>y?t.dtick=N(e,y,I):a>x?t.dtick=N(e,x,P):a>b?t.dtick=N(e,b,P):(r=n(10),t.dtick=N(e,r,O))}else if(\\\"log\\\"===t.type){t.tick0=0;var o=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),t.dtick=\\\"L\\\"+N(e,r,O)}else t.dtick=e>.3?\\\"D2\\\":\\\"D1\\\"}else\\\"category\\\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):$(t)?(t.tick0=0,r=1,t.dtick=N(e,r,F)):(t.tick0=0,r=n(10),t.dtick=N(e,r,O));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\\\"string\\\"!=typeof t.dtick){var c=t.dtick;throw t.dtick=1,\\\"ax.dtick error: \\\"+String(c)}},A.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return t+o*e;var l=e.charAt(0),c=o*Number(e.substr(1));if(\\\"M\\\"===l)return s.incrementMonth(t,c,a);if(\\\"L\\\"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if(\\\"D\\\"===l){var u=\\\"D2\\\"===e?B:R,f=t+.01*o,h=s.roundUp(s.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw\\\"unrecognized dtick \\\"+String(e)},A.tickFirst=function(t){var e=t.r2l||Number,r=s.simpleMap(t.range,e),a=r[1]<r[0],o=a?Math.floor:Math.ceil,l=1.0001*r[0]-1e-4*r[1],c=t.dtick,u=e(t.tick0);if(i(c)){var f=o((l-u)/c)*c+u;return\\\"category\\\"===t.type&&(f=s.constrain(f,0,t._categories.length-1)),f}var h=c.charAt(0),p=Number(c.substr(1));if(\\\"M\\\"===h){for(var d,g,v,m=0,y=u;m<10;){if(((d=A.tickIncrement(y,c,a,t.calendar))-l)*(y-l)<=0)return a?Math.min(y,d):Math.max(y,d);g=(l-(y+d)/2)/(d-y),v=h+(Math.abs(Math.round(g))||1)*p,y=A.tickIncrement(y,v,g<0?!a:a,t.calendar),m++}return s.error(\\\"tickFirst did not converge\\\",t),y}if(\\\"L\\\"===h)return Math.log(o((Math.pow(10,l)-u)/p)*p+u)/Math.LN10;if(\\\"D\\\"===h){var x=\\\"D2\\\"===c?B:R,b=s.roundUp(s.mod(l,1),x,a);return Math.floor(l)+Math.log(n.round(Math.pow(10,b),1))/Math.LN10}throw\\\"unrecognized dtick \\\"+String(c)},A.tickText=function(t,e,r){var n,a,o=V(t,e),l=\\\"array\\\"===t.tickmode,c=r||l,u=\\\"category\\\"===t.type?t.d2l_noadd:t.d2l;if(l&&Array.isArray(t.ticktext)){var f=s.simpleMap(t.range,t.r2l),h=Math.abs(f[1]-f[0])/1e4;for(a=0;a<t.ticktext.length&&!(Math.abs(e-u(t.tickvals[a]))<h);a++);if(a<t.ticktext.length)return o.text=String(t.ticktext[a]),o}function p(n){var i;return void 0===n||(r?\\\"none\\\"===n:(i={first:t._tmin,last:t._tmax}[n],\\\"all\\\"!==n&&e!==i))}return n=r?\\\"never\\\":\\\"none\\\"!==t.exponentformat&&p(t.showexponent)?\\\"hide\\\":\\\"\\\",\\\"date\\\"===t.type?function(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||A.getTickFormat(t);n&&(a=i(a)?4:{y:\\\"m\\\",m:\\\"d\\\",d:\\\"M\\\",M:\\\"S\\\",S:4}[a]);var l,c=s.formatDate(e.x,o,a,t._dateFormat,t.calendar,t._extraFormat),u=c.indexOf(\\\"\\\\n\\\");-1!==u&&(l=c.substr(u+1),c=c.substr(0,u));n&&(\\\"00:00:00\\\"===c||\\\"00:00\\\"===c?(c=l,l=\\\"\\\"):8===c.length&&(c=c.replace(/:00$/,\\\"\\\")));l&&(r?\\\"d\\\"===a?c+=\\\", \\\"+l:c=l+(c?\\\", \\\"+c:\\\"\\\"):t._inCalcTicks&&l===t._prevDateHead||(c+=\\\"<br>\\\"+l,t._prevDateHead=l));e.text=c}(t,o,r,c):\\\"log\\\"===t.type?function(t,e,r,n,a){var o=t.dtick,l=e.x,c=t.tickformat,u=\\\"string\\\"==typeof o&&o.charAt(0);\\\"never\\\"===a&&(a=\\\"\\\");n&&\\\"L\\\"!==u&&(o=\\\"L3\\\",u=\\\"L\\\");if(c||\\\"L\\\"===u)e.text=G(Math.pow(10,l),t,a,n);else if(i(o)||\\\"D\\\"===u&&s.mod(l+.01,1)<.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;\\\"power\\\"===p||q(p)&&H(f)?(e.text=0===f?1:1===f?\\\"10\\\":\\\"10<sup>\\\"+(f>1?\\\"\\\":_)+h+\\\"</sup>\\\",e.fontSize*=1.25):(\\\"e\\\"===p||\\\"E\\\"===p)&&h>2?e.text=\\\"1\\\"+p+(f>0?\\\"+\\\":_)+h:(e.text=G(Math.pow(10,l),t,\\\"\\\",\\\"fakehover\\\"),\\\"D1\\\"===o&&\\\"y\\\"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if(\\\"D\\\"!==u)throw\\\"unrecognized dtick \\\"+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if(\\\"D1\\\"===t.dtick){var d=String(e.text).charAt(0);\\\"0\\\"!==d&&\\\"1\\\"!==d||(\\\"y\\\"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,n):\\\"category\\\"===t.type?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\\\"\\\");e.text=String(r)}(t,o):$(t)?function(t,e,r,n,i){if(\\\"radians\\\"!==t.thetaunit||r)e.text=G(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text=\\\"0\\\";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){var r=1;for(;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=G(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text=\\\"\\\\u03c0\\\":e.text=o[0]+\\\"\\\\u03c0\\\":e.text=[\\\"<sup>\\\",o[0],\\\"</sup>\\\",\\\"\\\\u2044\\\",\\\"<sub>\\\",o[1],\\\"</sub>\\\",\\\"\\\\u03c0\\\"].join(\\\"\\\"),l&&(e.text=_+e.text)}}}}(t,o,r,c,n):function(t,e,r,n,i){\\\"never\\\"===i?i=\\\"\\\":\\\"all\\\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\\\"hide\\\");e.text=G(e.x,t,i,n)}(t,o,0,c,n),t.tickprefix&&!p(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!p(t.showticksuffix)&&(o.text+=t.ticksuffix),o},A.hoverLabelText=function(t,e,r){if(r!==w&&r!==e)return A.hoverLabelText(t,e)+\\\" - \\\"+A.hoverLabelText(t,r);var n=\\\"log\\\"===t.type&&e<=0,i=A.tickText(t,t.c2l(n?-e:e),\\\"hover\\\").text;return n?0===e?\\\"0\\\":_+i:i};var U=[\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"\\\\u03bc\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\"];function q(t){return\\\"SI\\\"===t||\\\"B\\\"===t}function H(t){return t>14||t<-15}function G(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\\\"B\\\",c=e._tickexponent,u=A.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,dtick:\\\"none\\\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\\\"none\\\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};j(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,_);var p,d=Math.pow(10,-o)/2;if(\\\"none\\\"===l&&(c=0),(t=Math.abs(t))<d)t=\\\"0\\\",a=!1;else{if(t+=d,c&&(t*=Math.pow(10,-c),o+=c),0===o)t=String(Math.floor(t));else if(o<0){t=(t=String(Math.round(t))).substr(0,t.length+o);for(var g=o;g<0;g++)t+=\\\"0\\\"}else{var v=(t=String(t)).indexOf(\\\".\\\")+1;v&&(t=t.substr(0,v+o).replace(/\\\\.?0+$/,\\\"\\\"))}t=s.numSeparate(t,e._separators,f)}c&&\\\"hide\\\"!==l&&(q(l)&&H(c)&&(l=\\\"power\\\"),p=c<0?_+-c:\\\"power\\\"!==l?\\\"+\\\"+c:String(c),\\\"e\\\"===l||\\\"E\\\"===l?t+=l+p:\\\"power\\\"===l?t+=\\\"\\\\xd710<sup>\\\"+p+\\\"</sup>\\\":\\\"B\\\"===l&&9===c?t+=\\\"B\\\":q(l)&&(t+=U[c/3+5]));return a?_+t:t}function W(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function Y(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function X(t,e,r){var n,i,a=[],o=[],l=t.layout;for(n=0;n<e.length;n++)a.push(A.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(A.getFromId(t,r[n]));var c=Object.keys(h),u=[\\\"anchor\\\",\\\"domain\\\",\\\"overlaying\\\",\\\"position\\\",\\\"side\\\",\\\"tickangle\\\",\\\"editType\\\"],f=[\\\"linear\\\",\\\"log\\\"];for(n=0;n<c.length;n++){var p=c[n],d=a[0][p],g=o[0][p],v=!0,m=!1,y=!1;if(\\\"_\\\"!==p.charAt(0)&&\\\"function\\\"!=typeof d&&-1===u.indexOf(p)){for(i=1;i<a.length&&v;i++){var x=a[i][p];\\\"type\\\"===p&&-1!==f.indexOf(d)&&-1!==f.indexOf(x)&&d!==x?m=!0:x!==d&&(v=!1)}for(i=1;i<o.length&&v;i++){var b=o[i][p];\\\"type\\\"===p&&-1!==f.indexOf(g)&&-1!==f.indexOf(b)&&g!==b?y=!0:o[i][p]!==g&&(v=!1)}v&&(m&&(l[a[0]._name].type=\\\"linear\\\"),y&&(l[o[0]._name].type=\\\"linear\\\"),Z(l,p,a,o,t._fullLayout._dfltTitle))}}for(n=0;n<t._fullLayout.annotations.length;n++){var _=t._fullLayout.annotations[n];-1!==e.indexOf(_.xref)&&-1!==r.indexOf(_.yref)&&s.swapAttrs(l.annotations[n],[\\\"?\\\"])}}function Z(t,e,r,n,i){var a,o=s.nestedProperty,l=o(t[r[0]._name],e).get(),c=o(t[n[0]._name],e).get();for(\\\"title\\\"===e&&(l===i.x&&(l=i.y),c===i.y&&(c=i.x)),a=0;a<r.length;a++)o(t,r[a]._name+\\\".\\\"+e).set(c);for(a=0;a<n.length;a++)o(t,n[a]._name+\\\".\\\"+e).set(l)}function $(t){return\\\"angularaxis\\\"===t._id}A.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function c(t){return\\\"string\\\"!=typeof t?t:Number(t.replace(\\\"M\\\",\\\"\\\"))*v}function u(t,e){var r=[\\\"L\\\",\\\"D\\\"];if(typeof t==typeof e){if(\\\"number\\\"==typeof t)return t-e;var n=r.indexOf(t.charAt(0)),i=r.indexOf(e.charAt(0));return n===i?Number(t.replace(/(L|D)/g,\\\"\\\"))-Number(e.replace(/(L|D)/g,\\\"\\\")):n-i}return\\\"number\\\"==typeof t?1:-1}function f(t,e){var r=null===e[0],n=null===e[1],i=u(t,e[0])>=0,a=u(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case\\\"date\\\":case\\\"linear\\\":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&(i=t.dtick,a=n.dtickrange,o=void 0,void 0,void 0,o=c||function(t){return t},s=a[0],l=a[1],(!s&&\\\"number\\\"!=typeof s||o(s)<=o(i))&&(!l&&\\\"number\\\"!=typeof l||o(l)>=o(i)))){r=n;break}break;case\\\"log\\\":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&f(t.dtick,n.dtickrange)){r=n;break}}return r?r.value:t.tickformat},A.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?A.findSubplotsWithAxis(n,e):n;return i.sort(function(t,e){var r=t.substr(1).split(\\\"y\\\"),n=e.substr(1).split(\\\"y\\\");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]}),i},A.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(\\\"x\\\"===e._id.charAt(0)?\\\"^\\\"+e._id+\\\"y\\\":e._id+\\\"$\\\"),n=[],i=0;i<t.length;i++){var a=t[i];r.test(a)&&n.push(a)}return n},A.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r,i,a={_offset:0,_length:e.width,_id:\\\"\\\"},o={_offset:0,_length:e.height,_id:\\\"\\\"},s=A.list(t,\\\"x\\\",!0),l=A.list(t,\\\"y\\\",!0),c=[];for(r=0;r<s.length;r++)for(c.push({x:s[r],y:o}),i=0;i<l.length;i++)0===r&&c.push({x:a,y:l[i]}),c.push({x:s[r],y:l[i]});var u=e._clips.selectAll(\\\".axesclip\\\").data(c,function(t){return t.x._id+t.y._id});u.enter().append(\\\"clipPath\\\").classed(\\\"axesclip\\\",!0).attr(\\\"id\\\",function(t){return\\\"clip\\\"+e._uid+t.x._id+t.y._id}).append(\\\"rect\\\"),u.exit().remove(),u.each(function(t){n.select(this).select(\\\"rect\\\").attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})})}},A.doTicks=function(t,e,r){var n=t._fullLayout;\\\"redraw\\\"===e&&n._paper.selectAll(\\\"g.subplot\\\").each(function(t){var e=t[0],r=n._plots[e],i=r.xaxis,a=r.yaxis;r.xaxislayer.selectAll(\\\".\\\"+i._id+\\\"tick\\\").remove(),r.yaxislayer.selectAll(\\\".\\\"+a._id+\\\"tick\\\").remove(),r.gridlayer&&r.gridlayer.selectAll(\\\"path\\\").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll(\\\"path\\\").remove(),n._infolayer.select(\\\".g-\\\"+i._id+\\\"title\\\").remove(),n._infolayer.select(\\\".g-\\\"+a._id+\\\"title\\\").remove()});var i=e&&\\\"redraw\\\"!==e?e:A.listIds(t);s.syncOrAsync(i.map(function(e){return function(){if(e){var n=A.doTicksSingle(t,e,r),i=A.getFromId(t,e);return i._r=i.range.slice(),i._rl=s.simpleMap(i._r,i.r2l),n}}}))},A.doTicksSingle=function(t,e,r){var o,h=t._fullLayout,p=!1;s.isPlainObject(e)?(o=e,p=!0):o=A.getFromId(t,e),o.setScale();var d,g,v,m,y,x,b=o._id,_=b.charAt(0),w=A.counterLetter(b),T=o._vals=A.calcTicks(o),C=function(t){return[t.text,t.x,o.mirror,t.font,t.fontSize,t.fontColor].join(\\\"_\\\")},E=b+\\\"tick\\\",L=b+\\\"grid\\\",z=b+\\\"zl\\\",O=(o.linewidth||1)/2,I=\\\"outside\\\"===o.ticks?o.ticklen:0,P=0,D=f.crispRound(t,o.gridwidth,1),R=f.crispRound(t,o.zerolinewidth,D),B=f.crispRound(t,o.tickwidth,1);if(o._counterangle&&\\\"outside\\\"===o.ticks){var F=o._counterangle*Math.PI/180;I=o.ticklen*Math.cos(F)+1,P=o.ticklen*Math.sin(F)}if(o.showticklabels&&(\\\"outside\\\"===o.ticks||o.showline)&&(I+=.2*o.tickfont.size),\\\"x\\\"===_)d=[\\\"bottom\\\",\\\"top\\\"],g=o._transfn||function(t){return\\\"translate(\\\"+(o._offset+o.l2p(t.x))+\\\",0)\\\"},v=function(t,e){if(o._counterangle){var r=o._counterangle*Math.PI/180;return\\\"M0,\\\"+t+\\\"l\\\"+Math.sin(r)*e+\\\",\\\"+Math.cos(r)*e}return\\\"M0,\\\"+t+\\\"v\\\"+e};else if(\\\"y\\\"===_)d=[\\\"left\\\",\\\"right\\\"],g=o._transfn||function(t){return\\\"translate(0,\\\"+(o._offset+o.l2p(t.x))+\\\")\\\"},v=function(t,e){if(o._counterangle){var r=o._counterangle*Math.PI/180;return\\\"M\\\"+t+\\\",0l\\\"+Math.cos(r)*e+\\\",\\\"+-Math.sin(r)*e}return\\\"M\\\"+t+\\\",0h\\\"+e};else{if(!$(o))return void s.warn(\\\"Unrecognized doTicks axis:\\\",b);d=[\\\"left\\\",\\\"right\\\"],g=o._transfn,v=function(t,e){return\\\"M\\\"+t+\\\",0h\\\"+e}}var N=o.side||d[0],j=[-1,1,N===d[1]?1:-1];if(\\\"inside\\\"!==o.ticks==(\\\"x\\\"===_)&&(j=j.map(function(t){return-t})),o.visible){o._tickFilter&&(T=T.filter(o._tickFilter));var V=o._valsClipped=$(o)?T:T.filter(function(t){return W(o,t.x)});if(p){if(Z(o._axislayer,v(o._pos+O*j[2],j[2]*o.ticklen)),o._counteraxis)Q({gridlayer:o._gridlayer,zerolinelayer:o._zerolinelayer},o._counteraxis);return J(o._axislayer,o._pos)}if(h._has(\\\"cartesian\\\")){m=A.getSubplots(t,o);var U={};m.map(function(t){var e=h._plots[t],r=e[w+\\\"axis\\\"],n=r._mainAxis._id;U[n]||(U[n]=1,Q(e,r))});var q=o._mainSubplot,H=h._plots[q],G=[];if(o.ticks){var Y=j[2],X=v(o._mainLinePosition+O*Y,Y*o.ticklen);o._anchorAxis&&o.mirror&&!0!==o.mirror&&(X+=v(o._mainMirrorPosition-O*Y,-Y*o.ticklen)),Z(H[_+\\\"axislayer\\\"],X),G=Object.keys(o._linepositions||{})}return G.map(function(t){var e=h._plots[t][_+\\\"axislayer\\\"],r=o._linepositions[t]||[];function n(t){var e=j[t];return v(r[t]+O*e,e*o.ticklen)}Z(e,n(0)+n(1))}),J(H[_+\\\"axislayer\\\"],o._mainLinePosition)}}function Z(t,e){var r=t.selectAll(\\\"path.\\\"+E).data(\\\"inside\\\"===o.ticks?V:T,C);e&&o.ticks?(r.enter().append(\\\"path\\\").classed(E,1).classed(\\\"ticks\\\",1).classed(\\\"crisp\\\",1).call(u.stroke,o.tickcolor).style(\\\"stroke-width\\\",B+\\\"px\\\").attr(\\\"d\\\",e),r.attr(\\\"transform\\\",g),r.exit().remove()):r.remove()}function J(e,r){if(y=e.selectAll(\\\"g.\\\"+E).data(T,C),!i(r))return y.remove(),void K();if(!o.showticklabels)return y.remove(),K(),void z();var c,u,p,d,v;\\\"x\\\"===_?(c=function(t){return t.dx+P*v},d=r+(I+O)*(v=\\\"bottom\\\"===N?1:-1),u=function(t){return t.dy+d+t.fontSize*(\\\"bottom\\\"===N?1:-.2)},p=function(t){return i(t)&&0!==t&&180!==t?t*v<0?\\\"end\\\":\\\"start\\\":\\\"middle\\\"}):\\\"y\\\"===_?(v=\\\"right\\\"===N?1:-1,u=function(t){return t.dy+t.fontSize*k-P*v},c=function(t){return t.dx+r+(I+O+(90===Math.abs(o.tickangle)?t.fontSize/2:0))*v},p=function(t){return i(t)&&90===Math.abs(t)?\\\"middle\\\":\\\"right\\\"===N?\\\"start\\\":\\\"end\\\"}):$(o)&&(o._labelShift=P,o._labelStandoff=I,o._pad=O,c=o._labelx,u=o._labely,p=o._labelanchor);var w=0,A=0,S=[];function L(t,e){t.each(function(t){var r=p(e,t),a=n.select(this),o=a.select(\\\".text-math-group\\\"),s=g.call(a.node(),t)+(i(e)&&0!=+e?\\\" rotate(\\\"+e+\\\",\\\"+c(t)+\\\",\\\"+(u(t)-t.fontSize/2)+\\\")\\\":\\\"\\\"),h=function(t,e,r){var n=(t-1)*e;if(\\\"x\\\"===_){if(r<-60||60<r)return-.5*n;if(\\\"top\\\"===N)return-n}else{if((r*=\\\"left\\\"===N?1:-1)<-30)return-n;if(r<30)return-.5*n}return 0}(l.lineCount(a),M*t.fontSize,i(e)?+e:0);if(h&&(s+=\\\" translate(0, \\\"+h+\\\")\\\"),o.empty())a.select(\\\"text\\\").attr({transform:s,\\\"text-anchor\\\":r});else{var d=f.bBox(o.node()).width*{end:-.5,start:.5}[r];o.attr(\\\"transform\\\",s+(d?\\\"translate(\\\"+d+\\\",0)\\\":\\\"\\\"))}})}function z(){if(o.showticklabels){var r=t.getBoundingClientRect(),n=e.node().getBoundingClientRect();o._boundingBox={width:n.width,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,bottom:n.bottom-r.top}}else{var i,a=h._size;\\\"x\\\"===_?(i=\\\"free\\\"===o.anchor?a.t+a.h*(1-o.position):a.t+a.h*(1-o._anchorAxis.domain[{bottom:0,top:1}[o.side]]),o._boundingBox={top:i,bottom:i,left:o._offset,right:o._offset+o._length,width:o._length,height:0}):(i=\\\"free\\\"===o.anchor?a.l+a.w*o.position:a.l+a.w*o._anchorAxis.domain[{left:0,right:1}[o.side]],o._boundingBox={left:i,right:i,bottom:o._offset+o._length,top:o._offset,height:o._length,width:0})}if(m){var s=o._counterSpan=[1/0,-1/0];for(x=0;x<m.length;x++){var l=h._plots[m[x]][\\\"x\\\"===_?\\\"yaxis\\\":\\\"xaxis\\\"];c(s,[l._offset,l._offset+l._length])}\\\"free\\\"===o.anchor&&c(s,\\\"x\\\"===_?[o._boundingBox.bottom,o._boundingBox.top]:[o._boundingBox.right,o._boundingBox.left])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[1])}}y.enter().append(\\\"g\\\").classed(E,1).append(\\\"text\\\").attr(\\\"text-anchor\\\",\\\"middle\\\").each(function(e){var r=n.select(this),i=t._promises.length;r.call(l.positionText,c(e),u(e)).call(f.font,e.font,e.fontSize,e.fontColor).text(e.text).call(l.convertToTspans,t),(i=t._promises[i])?S.push(t._promises.pop().then(function(){L(r,o.tickangle)})):L(r,o.tickangle)}),y.exit().remove(),y.each(function(t){w=Math.max(w,t.fontSize)}),$(o)&&y.each(function(t){n.select(this).select(\\\"text\\\").call(l.positionText,c(t),u(t))}),L(y,o._lastangle||o.tickangle);var D=s.syncOrAsync([function(){return S.length&&Promise.all(S)},function(){if(L(y,o.tickangle),\\\"x\\\"===_&&!i(o.tickangle)&&(\\\"log\\\"!==o.type||\\\"D\\\"!==String(o.dtick).charAt(0))){var t=[];for(y.each(function(e){var r=n.select(this),i=r.select(\\\".text-math-group\\\"),a=o.l2p(e.x);i.empty()&&(i=r.select(\\\"text\\\"));var s=f.bBox(i.node());t.push({top:0,bottom:10,height:10,left:a-s.width/2,right:a+s.width/2+2,width:s.width+2})}),x=0;x<t.length-1;x++)if(s.bBoxIntersect(t[x],t[x+1])){A=30;break}A&&(Math.abs((T[T.length-1].x-T[0].x)*o._m)/(T.length-1)<2.5*w&&(A=90),L(y,A)),o._lastangle=A}return K(),b+\\\" done\\\"},z,function(){var e=o._name+\\\".automargin\\\";if(\\\"x\\\"===_||\\\"y\\\"===_)if(o.automargin){var r=o.side[0],n={x:0,y:0,r:0,l:0,t:0,b:0};\\\"x\\\"===_?(n.y=\\\"free\\\"===o.anchor?o.position:o._anchorAxis.domain[\\\"t\\\"===r?1:0],n[r]+=o._boundingBox.height):(n.x=\\\"free\\\"===o.anchor?o.position:o._anchorAxis.domain[\\\"r\\\"===r?1:0],n[r]+=o._boundingBox.width),o.title!==h._dfltTitle[_]&&(n[r]+=o.titlefont.size),a.autoMargin(t,e,n)}else a.autoMargin(t,e)}]);return D&&D.then&&t._promises.push(D),D}function K(){if(!(r||o.rangeslider&&o.rangeslider.visible&&o._boundingBox&&\\\"bottom\\\"===o.side)){var e,n,i,a,s={selection:y,side:o.side},l=b.charAt(0),u=t._fullLayout._size,p=o.titlefont.size;if(y.size()){var d=f.getTranslate(y.node().parentNode);s.offsetLeft=d.x,s.offsetTop=d.y}var g=10+1.5*p+(o.linewidth?o.linewidth-1:0);\\\"x\\\"===l?(n=\\\"free\\\"===o.anchor?{_offset:u.t+(1-(o.position||0))*u.h,_length:0}:S.getFromId(t,o.anchor),i=o._offset+o._length/2,a=\\\"top\\\"===o.side?-g-p*(o.showticklabels?1:0):n._length+g+p*(o.showticklabels?1.5:.5),a+=n._offset,s.side||(s.side=\\\"bottom\\\")):(n=\\\"free\\\"===o.anchor?{_offset:u.l+(o.position||0)*u.w,_length:0}:S.getFromId(t,o.anchor),a=o._offset+o._length/2,i=\\\"right\\\"===o.side?n._length+g+p*(o.showticklabels?1:.5):-g-p*(o.showticklabels?.5:0),i+=n._offset,e={rotate:\\\"-90\\\",offset:0},s.side||(s.side=\\\"left\\\")),c.draw(t,b+\\\"title\\\",{propContainer:o,propName:o._name+\\\".title\\\",placeholder:h._dfltTitle[l],avoid:s,transform:e,attributes:{x:i,y:a,\\\"text-anchor\\\":\\\"middle\\\"}})}}function Q(e,r){if(!h._hasOnlyLargeSploms){var i=e.gridlayer.selectAll(\\\".\\\"+b),a=e.zerolinelayer,s=o._gridpath||(\\\"x\\\"===_?\\\"M0,\\\"+r._offset+\\\"v\\\":\\\"M\\\"+r._offset+\\\",0h\\\")+r._length,l=i.selectAll(\\\"path.\\\"+L).data(!1===o.showgrid?[]:V,C);if(l.enter().append(\\\"path\\\").classed(L,1).classed(\\\"crisp\\\",1).attr(\\\"d\\\",s).each(function(t){o.zeroline&&(\\\"linear\\\"===o.type||\\\"-\\\"===o.type)&&Math.abs(t.x)<o.dtick/100&&n.select(this).remove()}),l.attr(\\\"transform\\\",g).call(u.stroke,o.gridcolor||\\\"#ddd\\\").style(\\\"stroke-width\\\",D+\\\"px\\\"),\\\"function\\\"==typeof s&&l.attr(\\\"d\\\",s),l.exit().remove(),a){var c={x:0,id:b},f=A.shouldShowZeroLine(t,o,r),p=a.selectAll(\\\"path.\\\"+z).data(f?[c]:[]);p.enter().append(\\\"path\\\").classed(z,1).classed(\\\"zl\\\",1).classed(\\\"crisp\\\",1).attr(\\\"d\\\",s).each(function(){a.selectAll(\\\"path\\\").sort(function(t,e){return S.idSort(t.id,e.id)})}),p.attr(\\\"transform\\\",g).call(u.stroke,o.zerolinecolor||u.defaultLine).style(\\\"stroke-width\\\",R+\\\"px\\\"),p.exit().remove()}}}},A.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&(\\\"linear\\\"===e.type||\\\"-\\\"===e.type)&&e._valsClipped.length&&(W(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(!i)return;var a=t._fullLayout,o=e._id.charAt(0),s=A.counterLetter(e._id),l=e._offset+(Math.abs(n[0])<Math.abs(n[1])==(\\\"x\\\"===o)?0:e._length);function c(t){if(!t.showline||!t.linewidth)return!1;var r=Math.max((t.linewidth+e.zerolinewidth)/2,1);function n(t){return\\\"number\\\"==typeof t&&Math.abs(t-l)<r}if(n(t._mainLinePosition)||n(t._mainMirrorPosition))return!0;var i=t._linepositions||{};for(var a in i)if(n(i[a][0])||n(i[a][1]))return!0}var u=a._plots[r._mainSubplot];if(!(u.mainplotinfo||u).overlays.length)return c(r);for(var f=A.list(t,s),h=0;h<f.length;h++){var p=f[h];if(p._mainAxis===i&&c(p))return!0}}(t,e,r,n)||function(t,e){for(var r=t._fullData,n=e._mainSubplot,i=e._id.charAt(0),a=0;a<r.length;a++){var s=r[a];if(!0===s.visible&&s.xaxis+s.yaxis===n&&(o.traceIs(s,\\\"bar\\\")&&s.orientation==={x:\\\"h\\\",y:\\\"v\\\"}[i]||s.fill&&s.fill.charAt(s.fill.length-1)===i))return!0}return!1}(t,e))},A.allowAutoMargin=function(t){for(var e=A.list(t,\\\"\\\",!0),r=0;r<e.length;r++){var n=e[r];n.automargin&&a.allowAutoMargin(t,n._name+\\\".automargin\\\"),n.rangeslider&&n.rangeslider.visible&&a.allowAutoMargin(t,\\\"rangeslider\\\"+n._id)}},A.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r<e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&&s){for(n=0;n<i.length;n++)-1===i[n].x.indexOf(o)&&-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,c=i[a[0]];if(a.length>1)for(n=1;n<a.length;n++)l=i[a[n]],Y(c.x,l.x),Y(c.y,l.y);Y(c.x,[o]),Y(c.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)X(t,r[n].x,r[n].y)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../components/titles\\\":661,\\\"../../constants/alignment\\\":668,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"./autorange\\\":744,\\\"./axis_autotype\\\":746,\\\"./axis_ids\\\":748,\\\"./clean_ticks\\\":750,\\\"./layout_attributes\\\":758,\\\"./set_convert\\\":764,d3:148,\\\"fast-isnumeric\\\":214}],746:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e){return function(t,e){for(var r=Math.max(1,(t.length-1)/1e3),a=0,o=0,s={},l=0;l<t.length;l+=r){var c=t[Math.round(l)],u=String(c);s[u]||(s[u]=1,i.isDateTime(c,e)&&(a+=1),n(c)&&(o+=1))}return a>2*o}(t,e)?\\\"date\\\":function(t){for(var e=Math.max(1,(t.length-1)/1e3),r=0,n=0,o={},s=0;s<t.length;s+=e){var l=t[Math.round(s)],c=String(l);o[c]||(o[c]=1,\\\"boolean\\\"==typeof l?n++:i.cleanNumber(l)!==a?r++:\\\"string\\\"==typeof l&&n++)}return n>2*r}(t)?\\\"category\\\":function(t){if(!t)return!1;for(var e=0;e<t.length;e++)if(n(t[e]))return!0;return!1}(t)?\\\"linear\\\":\\\"-\\\"}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"fast-isnumeric\\\":214}],747:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"./layout_attributes\\\"),o=t(\\\"./tick_value_defaults\\\"),s=t(\\\"./tick_mark_defaults\\\"),l=t(\\\"./tick_label_defaults\\\"),c=t(\\\"./category_order_defaults\\\"),u=t(\\\"./line_grid_defaults\\\"),f=t(\\\"./set_convert\\\");e.exports=function(t,e,r,h,p){var d=h.letter,g=h.font||{},v=h.splomStash||{},m=r(\\\"visible\\\",!h.cheateronly),y=e.type;\\\"date\\\"===y&&n.getComponentMethod(\\\"calendars\\\",\\\"handleDefaults\\\")(t,e,\\\"calendar\\\",h.calendar);if(f(e,p),!r(\\\"autorange\\\",!e.isValidRange(t.range))||\\\"linear\\\"!==y&&\\\"-\\\"!==y||r(\\\"rangemode\\\"),r(\\\"range\\\"),e.cleanRange(),c(t,e,r,h),\\\"category\\\"===y||h.noHover||r(\\\"hoverformat\\\"),!m)return e;var x=r(\\\"color\\\"),b=x!==a.color.dflt?x:g.color;return r(\\\"title\\\",v.label||p._dfltTitle[d]),i.coerceFont(r,\\\"titlefont\\\",{family:g.family,size:Math.round(1.2*g.size),color:b}),o(t,e,r,y),l(t,e,r,y,h),s(t,e,r,h),u(t,e,r,{dfltColor:x,bgColor:h.bgColor,showGrid:h.showGrid,attributes:a}),(e.showline||e.ticks)&&r(\\\"mirror\\\"),h.automargin&&r(\\\"automargin\\\"),e}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./category_order_defaults\\\":749,\\\"./layout_attributes\\\":758,\\\"./line_grid_defaults\\\":760,\\\"./set_convert\\\":764,\\\"./tick_label_defaults\\\":765,\\\"./tick_mark_defaults\\\":766,\\\"./tick_value_defaults\\\":767}],748:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"./constants\\\");r.id2name=function(t){if(\\\"string\\\"==typeof t&&t.match(i.AX_ID_PATTERN)){var e=t.substr(1);return\\\"1\\\"===e&&(e=\\\"\\\"),t.charAt(0)+\\\"axis\\\"+e}},r.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return\\\"1\\\"===e&&(e=\\\"\\\"),t.charAt(0)+e}},r.cleanId=function(t,e){if(t.match(i.AX_ID_PATTERN)&&(!e||t.charAt(0)===e)){var r=t.substr(1).replace(/^0+/,\\\"\\\");return\\\"1\\\"===r&&(r=\\\"\\\"),t.charAt(0)+r}},r.list=function(t,e,n){var i=t._fullLayout;if(!i)return[];var a,o=r.listIds(t,e),s=new Array(o.length);for(a=0;a<o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+\\\"axis\\\"+l.substr(1)]}if(!n){var c=i._subplots.gl3d||[];for(a=0;a<c.length;a++){var u=i[c[a]];e?s.push(u[e+\\\"axis\\\"]):s.push(u.xaxis,u.yaxis,u.zaxis)}}return s},r.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+\\\"axis\\\"]:n.xaxis.concat(n.yaxis)},r.getFromId=function(t,e,n){var i=t._fullLayout;return\\\"x\\\"===n?e=e.replace(/y[0-9]*/,\\\"\\\"):\\\"y\\\"===n&&(e=e.replace(/x[0-9]*/,\\\"\\\")),i[r.id2name(e)]},r.getFromTrace=function(t,e,i){var a=t._fullLayout,o=null;if(n.traceIs(e,\\\"gl3d\\\")){var s=e.scene;\\\"scene\\\"===s.substr(0,5)&&(o=a[s][i+\\\"axis\\\"])}else o=r.getFromId(t,e[i+\\\"axis\\\"]||i);return o},r.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r>n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)}},{\\\"../../registry\\\":828,\\\"./constants\\\":751}],749:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){if(\\\"category\\\"===e.type){var i,a=t.categoryarray,o=Array.isArray(a)&&a.length>0;o&&(i=\\\"array\\\");var s,l=r(\\\"categoryorder\\\",i);\\\"array\\\"===l&&(s=r(\\\"categoryarray\\\")),o||\\\"array\\\"!==l||(l=e.categoryorder=\\\"trace\\\"),\\\"trace\\\"===l?e._initialCategories=[]:\\\"array\\\"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;n<e.data.length;n++){var s=e.data[n];s[a+\\\"axis\\\"]===t._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][a];for(i=0;i<l.length;i++){var c=l[i];null!=c&&(o[c]=1)}}return Object.keys(o)}(e,n).sort(),\\\"category ascending\\\"===l?e._initialCategories=s:\\\"category descending\\\"===l&&(e._initialCategories=s.reverse()))}}},{}],750:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").ONEDAY;r.dtick=function(t,e){var r=\\\"log\\\"===e,i=\\\"date\\\"===e,o=\\\"category\\\"===e,s=i?a:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:o?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if(\\\"string\\\"!=typeof t||!i&&!r)return s;var l=t.charAt(0),c=t.substr(1);return(c=n(c)?Number(c):0)<=0||!(i&&\\\"M\\\"===l&&c===Math.round(c)||r&&\\\"L\\\"===l||r&&\\\"D\\\"===l&&(1===c||2===c))?s:t},r.tick0=function(t,e,r,a){return\\\"date\\\"===e?i.cleanDate(t,i.dateTick0(r)):\\\"D1\\\"!==a&&\\\"D2\\\"!==a?n(t)?Number(t):0:void 0}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"fast-isnumeric\\\":214}],751:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/regex\\\").counter;e.exports={idRegex:{x:n(\\\"x\\\"),y:n(\\\"y\\\")},attrRegex:n(\\\"[xy]axis\\\"),xAxisMatch:n(\\\"xaxis\\\"),yAxisMatch:n(\\\"yaxis\\\"),AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:\\\"-select\\\",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:[\\\"heatmaplayer\\\",\\\"contourcarpetlayer\\\",\\\"contourlayer\\\",\\\"barlayer\\\",\\\"carpetlayer\\\",\\\"violinlayer\\\",\\\"boxlayer\\\",\\\"ohlclayer\\\",\\\"scattercarpetlayer\\\",\\\"scatterlayer\\\"],layerValue2layerClass:{\\\"above traces\\\":\\\"above\\\",\\\"below traces\\\":\\\"below\\\"}}},{\\\"../../lib/regex\\\":713}],752:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./axis_ids\\\").id2name;e.exports=function(t,e,r,a,o){var s=o._axisConstraintGroups,l=e._id,c=l.charAt(0);if(!e.fixedrange&&(r(\\\"constrain\\\"),n.coerce(t,e,{constraintoward:{valType:\\\"enumerated\\\",values:\\\"x\\\"===c?[\\\"left\\\",\\\"center\\\",\\\"right\\\"]:[\\\"bottom\\\",\\\"middle\\\",\\\"top\\\"],dflt:\\\"x\\\"===c?\\\"center\\\":\\\"middle\\\"}},\\\"constraintoward\\\"),t.scaleanchor)){var u=function(t,e,r,n){var a,o,s,l,c=n[i(e)].type,u=[];for(o=0;o<r.length;o++)(s=r[o])!==e&&((l=n[i(s)]).type!==c||l.fixedrange||u.push(s));for(a=0;a<t.length;a++)if(t[a][e]){var f=t[a],h=[];for(o=0;o<u.length;o++)s=u[o],f[s]||h.push(s);return{linkableAxes:h,thisGroup:f}}return{linkableAxes:u,thisGroup:null}}(s,l,a,o),f=n.coerce(t,e,{scaleanchor:{valType:\\\"enumerated\\\",values:u.linkableAxes}},\\\"scaleanchor\\\");if(f){var h=r(\\\"scaleratio\\\");h||(h=e.scaleratio=1),function(t,e,r,n,i){var a,o,s,l,c;null===e?((e={})[r]=1,c=t.length,t.push(e)):c=t.indexOf(e);var u=Object.keys(e);for(a=0;a<t.length;a++)if(s=t[a],a!==c&&s[n]){var f=s[n];for(o=0;o<u.length;o++)l=u[o],s[l]=f*i*e[l];return void t.splice(c,1)}if(1!==i)for(o=0;o<u.length;o++)e[u[o]]*=i;e[n]=1}(s,u.thisGroup,l,f,h)}else-1!==a.indexOf(t.scaleanchor)&&n.warn(\\\"ignored \\\"+e._name+'.scaleanchor: \\\"'+t.scaleanchor+'\\\" to avoid either an infinite loop and possibly inconsistent scaleratios, or because the targetaxis has fixed range.')}}},{\\\"../../lib\\\":696,\\\"./axis_ids\\\":748}],753:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./axis_ids\\\").id2name,i=t(\\\"./scale_zoom\\\"),a=t(\\\"./autorange\\\").makePadFn,o=t(\\\"./autorange\\\").concatExtremes,s=t(\\\"../../constants/numerical\\\").ALMOST_EQUAL,l=t(\\\"../../constants/alignment\\\").FROM_BL;function c(t,e){var r=t._inputDomain,n=l[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e]}r.enforce=function(t){var e,r,l,u,f,h,p,d=t._fullLayout,g=d._axisConstraintGroups||[];for(e=0;e<g.length;e++){var v=g[e],m=Object.keys(v),y=1/0,x=0,b=1/0,_={},w={},k=!1;for(r=0;r<m.length;r++)w[l=m[r]]=u=d[n(l)],u._inputDomain?u.domain=u._inputDomain.slice():u._inputDomain=u.domain.slice(),u._inputRange||(u._inputRange=u.range.slice()),u.setScale(),_[l]=f=Math.abs(u._m)/v[l],y=Math.min(y,f),\\\"domain\\\"!==u.constrain&&u._constraintShrinkable||(b=Math.min(b,f)),delete u._constraintShrinkable,x=Math.max(x,f),\\\"domain\\\"===u.constrain&&(k=!0);if(!(y>s*x)||k)for(r=0;r<m.length;r++)if(f=_[l=m[r]],h=(u=w[l]).constrain,f!==b||\\\"domain\\\"===h)if(p=f/b,\\\"range\\\"===h)i(u,p);else{var M=u._inputDomain,A=(u.domain[1]-u.domain[0])/(M[1]-M[0]),T=(u.r2l(u.range[1])-u.r2l(u.range[0]))/(u.r2l(u._inputRange[1])-u.r2l(u._inputRange[0]));if((p/=A)*T<1){u.domain=u._input.domain=M.slice(),i(u,p);continue}if(T<1&&(u.range=u._input.range=u._inputRange.slice(),p*=T),u.autorange){var S=u.r2l(u.range[0]),C=u.r2l(u.range[1]),E=(S+C)/2,L=E,z=E,O=Math.abs(C-E),I=E-O*p*1.0001,P=E+O*p*1.0001,D=a(u);c(u,p),u.setScale();var R,B,F=Math.abs(u._m),N=o(t,u),j=N.min,V=N.max;for(B=0;B<j.length;B++)(R=j[B].val-D(j[B])/F)>I&&R<L&&(L=R);for(B=0;B<V.length;B++)(R=V[B].val+D(V[B])/F)<P&&R>z&&(z=R);p/=(z-L)/(2*O),L=u.l2r(L),z=u.l2r(z),u.range=u._input.range=S<C?[L,z]:[z,L]}c(u,p)}}},r.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a<i.length;a++)if(i[a][n]){r=!0;break}r&&\\\"domain\\\"===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},{\\\"../../constants/alignment\\\":668,\\\"../../constants/numerical\\\":673,\\\"./autorange\\\":744,\\\"./axis_ids\\\":748,\\\"./scale_zoom\\\":762}],754:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"has-passive-events\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../../components/color\\\"),u=t(\\\"../../components/drawing\\\"),f=t(\\\"../../components/fx\\\"),h=t(\\\"../../lib/setcursor\\\"),p=t(\\\"../../components/dragelement\\\"),d=t(\\\"../../constants/alignment\\\").FROM_TL,g=t(\\\"../../lib/clear_gl_canvases\\\"),v=t(\\\"../../plot_api/subroutines\\\").redrawReglTraces,m=t(\\\"../plots\\\"),y=t(\\\"./axes\\\").doTicksSingle,x=t(\\\"./axis_ids\\\").getFromId,b=t(\\\"./select\\\").prepSelect,_=t(\\\"./select\\\").clearSelect,w=t(\\\"./select\\\").selectOnClick,k=t(\\\"./scale_zoom\\\"),M=t(\\\"./constants\\\"),A=M.MINDRAG,T=M.MINZOOM,S=!0;function C(t,e,r,n){var i=s.ensureSingle(t.draglayer,e,r,function(e){e.classed(\\\"drag\\\",!0).style({fill:\\\"transparent\\\",\\\"stroke-width\\\":0}).attr(\\\"data-subplot\\\",t.id)});return i.call(h,n),i.node()}function E(t,e,r,i,a,o,s){var l=C(t,\\\"rect\\\",e,r);return n.select(l).call(u.setRect,i,a,o,s),l}function L(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return\\\"\\\"}function z(t,e,r,n,i){var a,o,s,l;for(a=0;a<t.length;a++)(o=t[a]).fixedrange||(s=o._rl[0],l=o._rl[1]-s,o.range=[o.l2r(s+l*e),o.l2r(s+l*r)],n[o._name+\\\".range[0]\\\"]=o.range[0],n[o._name+\\\".range[1]\\\"]=o.range[1]);if(i&&i.length){var c=(e+(1-r))/2;z(i,c,1-c,n)}}function O(t,e){for(var r=0;r<t.length;r++){var n=t[r];n.fixedrange||(n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)])}}function I(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function P(t,e,r,n,i){return t.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox\\\").style({fill:e>.2?\\\"rgba(0,0,0,0)\\\":\\\"rgba(255,255,255,0)\\\",\\\"stroke-width\\\":0}).attr(\\\"transform\\\",\\\"translate(\\\"+r+\\\", \\\"+n+\\\")\\\").attr(\\\"d\\\",i+\\\"Z\\\")}function D(t,e,r){return t.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox-corners\\\").style({fill:c.background,stroke:c.defaultLine,\\\"stroke-width\\\":1,opacity:0}).attr(\\\"transform\\\",\\\"translate(\\\"+e+\\\", \\\"+r+\\\")\\\").attr(\\\"d\\\",\\\"M0,0Z\\\")}function R(t,e,r,n,i,a){t.attr(\\\"d\\\",n+\\\"M\\\"+r.l+\\\",\\\"+r.t+\\\"v\\\"+r.h+\\\"h\\\"+r.w+\\\"v-\\\"+r.h+\\\"h-\\\"+r.w+\\\"Z\\\"),B(t,e,i,a)}function B(t,e,r,n){r||(t.transition().style(\\\"fill\\\",n>.2?\\\"rgba(0,0,0,0.4)\\\":\\\"rgba(255,255,255,0.3)\\\").duration(200),e.transition().style(\\\"opacity\\\",1).duration(200))}function F(t){n.select(t).selectAll(\\\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\\\").remove()}function N(t){S&&t.data&&t._context.showTips&&(s.notifier(s._(t,\\\"Double-click to zoom back out\\\"),\\\"long\\\"),S=!1)}function j(t){return\\\"lasso\\\"===t||\\\"select\\\"===t}function V(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,T)/2);return\\\"M\\\"+(t.l-3.5)+\\\",\\\"+(t.t-.5+e)+\\\"h3v\\\"+-e+\\\"h\\\"+e+\\\"v-3h-\\\"+(e+3)+\\\"ZM\\\"+(t.r+3.5)+\\\",\\\"+(t.t-.5+e)+\\\"h-3v\\\"+-e+\\\"h\\\"+-e+\\\"v-3h\\\"+(e+3)+\\\"ZM\\\"+(t.r+3.5)+\\\",\\\"+(t.b+.5-e)+\\\"h-3v\\\"+e+\\\"h\\\"+-e+\\\"v3h\\\"+(e+3)+\\\"ZM\\\"+(t.l-3.5)+\\\",\\\"+(t.b+.5-e)+\\\"h3v\\\"+e+\\\"h\\\"+e+\\\"v3h-\\\"+(e+3)+\\\"Z\\\"}function U(t,e){if(a){var r=void 0!==t.onwheel?\\\"wheel\\\":\\\"mousewheel\\\";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel&&(t.onmousewheel=e)}function q(t){var e=[];for(var r in t)e.push(t[r]);return e}e.exports={makeDragBox:function(t,e,r,a,c,h,S,C){var B,H,G,W,Y,X,Z,$,J,K,Q,tt,et,rt,nt,it,at,ot,st,lt,ct,ut=t._fullLayout._zoomlayer,ft=S+C===\\\"nsew\\\",ht=1===(S+C).length;function pt(){if(B=e.xaxis,H=e.yaxis,J=B._length,K=H._length,Z=B._offset,$=H._offset,(G={})[B._id]=B,(W={})[H._id]=H,S&&C)for(var r=e.overlays,n=0;n<r.length;n++){var i=r[n].xaxis;G[i._id]=i;var a=r[n].yaxis;W[a._id]=a}Y=q(G),X=q(W),tt=L(Y,C),et=L(X,S),rt=!et&&!tt,Q=function(t,e,r){for(var n,i,a,o,l=t._fullLayout._axisConstraintGroups,c=!1,u={},f={},h=0;h<l.length;h++){var p=l[h];for(n in e)if(p[n]){for(a in p)(\\\"x\\\"===a.charAt(0)?e:r)[a]||(u[a]=1);for(i in r)p[i]&&(c=!0)}for(i in r)if(p[i])for(o in p)(\\\"x\\\"===o.charAt(0)?e:r)[o]||(f[o]=1)}c&&(s.extendFlat(u,f),f={});var d={},g=[];for(a in u){var v=x(t,a);g.push(v),d[v._id]=v}var m={},y=[];for(o in f){var b=x(t,o);y.push(b),m[b._id]=b}return{xaHash:d,yaHash:m,xaxes:g,yaxes:y,isSubplotConstrained:c}}(t,G,W),nt=Q.isSubplotConstrained,it=C||nt,at=S||nt;var o=t._fullLayout;ot=o._has(\\\"scattergl\\\"),st=o._has(\\\"splom\\\"),lt=o._has(\\\"svg\\\")}pt();var dt=function(t,e,r){return t?\\\"nsew\\\"===t?r?\\\"\\\":\\\"pan\\\"===e?\\\"move\\\":\\\"crosshair\\\":t.toLowerCase()+\\\"-resize\\\":\\\"pointer\\\"}(et+tt,t._fullLayout.dragmode,ft),gt=E(e,S+C+\\\"drag\\\",dt,r,a,c,h);if(rt&&!ft)return gt.onmousedown=null,gt.style.pointerEvents=\\\"none\\\",gt;var vt,mt,yt,xt,bt,_t,wt,kt,Mt,At,Tt={element:gt,gd:t,plotinfo:e};function St(){Tt.plotinfo.selection=!1,_(ut)}function Ct(r,i){var a=t._fullLayout.clickmode;if(F(t),2!==r||ht||function(){if(!t._transitioningWithDuration){var e,r,n,i=t._context.doubleClick,a=(tt?Y:[]).concat(et?X:[]),s={};if(\\\"reset+autosize\\\"===i)for(i=\\\"autosize\\\",r=0;r<a.length;r++)if((e=a[r])._rangeInitial&&(e.range[0]!==e._rangeInitial[0]||e.range[1]!==e._rangeInitial[1])||!e._rangeInitial&&!e.autorange){i=\\\"reset\\\";break}if(\\\"autosize\\\"===i)for(r=0;r<a.length;r++)(e=a[r]).fixedrange||(s[e._name+\\\".autorange\\\"]=!0);else if(\\\"reset\\\"===i)for((tt||nt)&&(a=a.concat(Q.xaxes)),et&&!nt&&(a=a.concat(Q.yaxes)),nt&&(tt?et||(a=a.concat(X)):a=a.concat(Y)),r=0;r<a.length;r++)(e=a[r])._rangeInitial?(n=e._rangeInitial,s[e._name+\\\".range[0]\\\"]=n[0],s[e._name+\\\".range[1]\\\"]=n[1]):s[e._name+\\\".autorange\\\"]=!0;t.emit(\\\"plotly_doubleclick\\\",null),o.call(\\\"relayout\\\",t,s)}}(),ft)a.indexOf(\\\"select\\\")>-1&&w(i,t,Y,X,e.id,Tt),a.indexOf(\\\"event\\\")>-1&&f.click(t,i,e.id);else if(1===r&&ht){var s=S?H:B,c=\\\"s\\\"===S||\\\"w\\\"===C?0:1,u=s._name+\\\".range[\\\"+c+\\\"]\\\",h=function(t,e){var r,i=t.range[e],a=Math.abs(i-t.range[1-e]);return\\\"date\\\"===t.type?i:\\\"log\\\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,n.format(\\\".\\\"+r+\\\"g\\\")(Math.pow(10,i))):(r=Math.floor(Math.log(Math.abs(i))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,n.format(\\\".\\\"+String(r)+\\\"g\\\")(i))}(s,c),p=\\\"left\\\",d=\\\"middle\\\";if(s.fixedrange)return;S?(d=\\\"n\\\"===S?\\\"top\\\":\\\"bottom\\\",\\\"right\\\"===s.side&&(p=\\\"right\\\")):\\\"e\\\"===C&&(p=\\\"right\\\"),t._context.showAxisRangeEntryBoxes&&n.select(gt).call(l.makeEditable,{gd:t,immediate:!0,background:t._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:\\\"#444\\\",horizontalAlign:p,verticalAlign:d}).on(\\\"edit\\\",function(e){var r=s.d2r(e);void 0!==r&&o.call(\\\"relayout\\\",t,u,r)})}}function Et(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(J,e+vt)),i=Math.max(0,Math.min(K,r+mt)),a=Math.abs(n-vt),o=Math.abs(i-mt);function s(){wt=\\\"\\\",yt.r=yt.l,yt.t=yt.b,Mt.attr(\\\"d\\\",\\\"M0,0Z\\\")}yt.l=Math.min(vt,n),yt.r=Math.max(vt,n),yt.t=Math.min(mt,i),yt.b=Math.max(mt,i),nt?a>T||o>T?(wt=\\\"xy\\\",a/J>o/K?(o=a*K/J,mt>i?yt.t=mt-o:yt.b=mt+o):(a=o*J/K,vt>n?yt.l=vt-a:yt.r=vt+a),Mt.attr(\\\"d\\\",V(yt))):s():!et||o<Math.min(Math.max(.6*a,A),T)?a<A||!tt?s():(yt.t=0,yt.b=K,wt=\\\"x\\\",Mt.attr(\\\"d\\\",function(t,e){return\\\"M\\\"+(t.l-.5)+\\\",\\\"+(e-T-.5)+\\\"h-3v\\\"+(2*T+1)+\\\"h3ZM\\\"+(t.r+.5)+\\\",\\\"+(e-T-.5)+\\\"h3v\\\"+(2*T+1)+\\\"h-3Z\\\"}(yt,mt))):!tt||a<Math.min(.6*o,T)?(yt.l=0,yt.r=J,wt=\\\"y\\\",Mt.attr(\\\"d\\\",function(t,e){return\\\"M\\\"+(e-T-.5)+\\\",\\\"+(t.t-.5)+\\\"v-3h\\\"+(2*T+1)+\\\"v3ZM\\\"+(e-T-.5)+\\\",\\\"+(t.b+.5)+\\\"v3h\\\"+(2*T+1)+\\\"v-3Z\\\"}(yt,vt))):(wt=\\\"xy\\\",Mt.attr(\\\"d\\\",V(yt))),yt.w=yt.r-yt.l,yt.h=yt.b-yt.t,wt&&(At=!0),t._dragged=At,R(kt,Mt,yt,bt,_t,xt),_t=!0}function Lt(){if(ct={},Math.min(yt.h,yt.w)<2*A)return F(t);\\\"xy\\\"!==wt&&\\\"x\\\"!==wt||z(Y,yt.l/J,yt.r/J,ct,Q.xaxes),\\\"xy\\\"!==wt&&\\\"y\\\"!==wt||z(X,(K-yt.b)/K,(K-yt.t)/K,ct,Q.yaxes),F(t),Nt(),N(t)}Tt.prepFn=function(e,r,n){var a=Tt.dragmode,o=t._fullLayout.dragmode;o!==a&&(Tt.dragmode=o),pt(),rt||(ft?e.shiftKey?\\\"pan\\\"===o?o=\\\"zoom\\\":j(o)||(o=\\\"pan\\\"):e.ctrlKey&&(o=\\\"pan\\\"):o=\\\"pan\\\"),Tt.minDrag=\\\"lasso\\\"===o?1:void 0,j(o)?(Tt.xaxes=Y,Tt.yaxes=X,b(e,r,n,Tt,o)):(Tt.clickFn=Ct,j(a)&&St(),rt||(\\\"zoom\\\"===o?(Tt.moveFn=Et,Tt.doneFn=Lt,Tt.minDrag=1,function(e,r,n){var a=gt.getBoundingClientRect();vt=r-a.left,mt=n-a.top,yt={l:vt,r:vt,w:0,t:mt,b:mt,h:0},xt=t._hmpixcount?t._hmlumcount/t._hmpixcount:i(t._fullLayout.plot_bgcolor).getLuminance(),_t=!1,wt=\\\"xy\\\",At=!1,kt=P(ut,xt,Z,$,bt=\\\"M0,0H\\\"+J+\\\"V\\\"+K+\\\"H0V0\\\"),Mt=D(ut,Z,$)}(0,r,n)):\\\"pan\\\"===o&&(Tt.moveFn=Bt,Tt.doneFn=Nt)))},p.init(Tt);var zt,Ot,It=[0,0,J,K],Pt=null,Dt=M.REDRAWDELAY,Rt=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function Bt(e,r){if(!t._transitioningWithDuration){if(\\\"ew\\\"===tt||\\\"ns\\\"===et)return tt&&O(Y,e),et&&O(X,r),jt([tt?-e:0,et?-r:0,J,K]),void Ft(et,tt);if(nt&&tt&&et){var n=\\\"w\\\"===tt==(\\\"n\\\"===et)?1:-1,i=(e/J+n*r/K)/2;e=i*J,r=n*i*K}\\\"w\\\"===tt?e=l(Y,0,e):\\\"e\\\"===tt?e=l(Y,1,-e):tt||(e=0),\\\"n\\\"===et?r=l(X,1,r):\\\"s\\\"===et?r=l(X,0,-r):et||(r=0);var a=\\\"w\\\"===tt?e:0,o=\\\"n\\\"===et?r:0;if(nt){var s;if(!tt&&1===et.length){for(s=0;s<Y.length;s++)Y[s].range=Y[s]._r.slice(),k(Y[s],1-r/K);a=(e=r*J/K)/2}if(!et&&1===tt.length){for(s=0;s<X.length;s++)X[s].range=X[s]._r.slice(),k(X[s],1-e/J);o=(r=e*K/J)/2}}jt([a,o,J-e,K-r]),Ft(et,tt)}function l(t,e,r){for(var n,i,a=1-e,o=0;o<t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/I(r/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}}function Ft(e,r){var n,i=[];function a(t){for(n=0;n<t.length;n++)t[n].fixedrange||i.push(t[n]._id)}for(it&&(a(Y),a(Q.xaxes)),at&&(a(X),a(Q.yaxes)),ct={},n=0;n<i.length;n++){var s=i[n];y(t,s,!0);var l=x(t,s);ct[l._name+\\\".range[0]\\\"]=l.range[0],ct[l._name+\\\".range[1]\\\"]=l.range[1]}function c(a,o,s){for(n=0;n<a.length;n++){var l=a[n];if((r&&-1!==i.indexOf(l.xref)||e&&-1!==i.indexOf(l.yref))&&(o(t,n),s))return}}c(t._fullLayout.annotations||[],o.getComponentMethod(\\\"annotations\\\",\\\"drawOne\\\")),c(t._fullLayout.shapes||[],o.getComponentMethod(\\\"shapes\\\",\\\"drawOne\\\")),c(t._fullLayout.images||[],o.getComponentMethod(\\\"images\\\",\\\"draw\\\"),!0)}function Nt(){jt([0,0,J,K]),s.syncOrAsync([m.previousPromises,function(){o.call(\\\"relayout\\\",t,ct)}],t)}function jt(e){var r,n,i,a,l=t._fullLayout,c=l._plots,f=l._subplots.cartesian;if(st&&o.subplotsRegistry.splom.drag(t),ot)for(r=0;r<f.length;r++)if(i=(n=c[f[r]]).xaxis,a=n.yaxis,n._scene){var h=s.simpleMap(i.range,i.r2l),p=s.simpleMap(a.range,a.r2l);n._scene.update({range:[h[0],p[0],h[1],p[1]]})}if((st||ot)&&(g(t),v(t)),lt){var d=e[2]/B._length,m=e[3]/H._length;for(r=0;r<f.length;r++){i=(n=c[f[r]]).xaxis,a=n.yaxis;var y,x,b,_,w=it&&!i.fixedrange&&G[i._id],k=at&&!a.fixedrange&&W[a._id];if(w?(y=d,b=C?e[0]:qt(i,y)):b=Ut(i,y=Vt(i,d,m)),k?(x=m,_=S?e[1]:qt(a,x)):_=Ut(a,x=Vt(a,d,m)),y||x){y||(y=1),x||(x=1);var M=i._offset-b/y,A=a._offset-_/x;n.clipRect.call(u.setTranslate,b,_).call(u.setScale,y,x),n.plot.call(u.setTranslate,M,A).call(u.setScale,1/y,1/x),y===zt&&x===Ot||(u.setPointGroupScale(n.zoomScalePts,y,x),u.setTextPointsScale(n.zoomScaleTxt,y,x)),u.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),zt=y,Ot=x}}}}function Vt(t,e,r){return t.fixedrange?0:it&&Q.xaHash[t._id]?e:at&&(nt?Q.xaHash:Q.yaHash)[t._id]?r:0}function Ut(t,e){return e?(t.range=t._r.slice(),k(t,e),qt(t,e)):0}function qt(t,e){return t._length*(1-e)*d[t.constraintoward||\\\"middle\\\"]}return S.length*C.length!=1&&U(gt,function(e){if(t._context.scrollZoom||t._fullLayout._enablescrollzoom){if(St(),t._transitioningWithDuration)return e.preventDefault(),void e.stopPropagation();var r=t.querySelector(\\\".plotly\\\");if(pt(),!(r.scrollHeight-r.clientHeight>10||r.scrollWidth-r.clientWidth>10)){clearTimeout(Pt);var n=-e.deltaY;if(isFinite(n)||(n=e.wheelDelta/10),isFinite(n)){var i,a=Math.exp(-Math.min(Math.max(n,-20),20)/200),o=Rt.draglayer.select(\\\".nsewdrag\\\").node().getBoundingClientRect(),l=(e.clientX-o.left)/o.width,c=(o.bottom-e.clientY)/o.height;if(it){for(C||(l=.5),i=0;i<Y.length;i++)u(Y[i],l,a);It[2]*=a,It[0]+=It[2]*l*(1/a-1)}if(at){for(S||(c=.5),i=0;i<X.length;i++)u(X[i],c,a);It[3]*=a,It[1]+=It[3]*(1-c)*(1/a-1)}jt(It),Ft(S,C),Pt=setTimeout(function(){It=[0,0,J,K],Nt()},Dt),e.preventDefault()}else s.log(\\\"Did not find wheel motion attributes: \\\",e)}}function u(t,e,r){if(!t.fixedrange){var n=s.simpleMap(t.range,t.r2l),i=n[0]+(n[1]-n[0])*e;t.range=n.map(function(e){return t.l2r(i+(e-i)*r)})}}}),gt},makeDragger:C,makeRectDragger:E,makeZoombox:P,makeCorners:D,updateZoombox:R,xyCorners:V,transitionZoombox:B,removeZoombox:F,showDoubleClickNotifier:N,attachWheelEventHandler:U}},{\\\"../../components/color\\\":570,\\\"../../components/dragelement\\\":592,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/clear_gl_canvases\\\":679,\\\"../../lib/setcursor\\\":717,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/subroutines\\\":736,\\\"../../registry\\\":828,\\\"../plots\\\":809,\\\"./axes\\\":745,\\\"./axis_ids\\\":748,\\\"./constants\\\":751,\\\"./scale_zoom\\\":762,\\\"./select\\\":763,d3:148,\\\"has-passive-events\\\":394,tinycolor2:514}],755:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/fx\\\"),a=t(\\\"../../components/dragelement\\\"),o=t(\\\"../../lib/setcursor\\\"),s=t(\\\"./dragbox\\\").makeDragBox,l=t(\\\"./constants\\\").DRAGGERSIZE;r.initInteractions=function(t){var e=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(\\\".drag\\\").remove();else if(e._has(\\\"cartesian\\\")||e._has(\\\"splom\\\")){Object.keys(e._plots||{}).sort(function(t,r){if((e._plots[t].mainplot&&!0)===(e._plots[r].mainplot&&!0)){var n=t.split(\\\"y\\\"),i=r.split(\\\"y\\\");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return e._plots[t].mainplot?1:-1}).forEach(function(r){var n=e._plots[r],o=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=s(t,n,o._offset,c._offset,o._length,c._length,\\\"ns\\\",\\\"ew\\\");u.onmousemove=function(e){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===r&&i.hover(t,e,r)},i.hover(t,e,r),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=r},u.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,a.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,o._offset-l,c._offset-l,l,l,\\\"n\\\",\\\"w\\\"),s(t,n,o._offset+o._length,c._offset-l,l,l,\\\"n\\\",\\\"e\\\"),s(t,n,o._offset-l,c._offset+c._length,l,l,\\\"s\\\",\\\"w\\\"),s(t,n,o._offset+o._length,c._offset+c._length,l,l,\\\"s\\\",\\\"e\\\"))}if(t._context.showAxisDragHandles){if(r===o._mainSubplot){var f=o._mainLinePosition;\\\"top\\\"===o.side&&(f-=l),s(t,n,o._offset+.1*o._length,f,.8*o._length,l,\\\"\\\",\\\"ew\\\"),s(t,n,o._offset,f,.1*o._length,l,\\\"\\\",\\\"w\\\"),s(t,n,o._offset+.9*o._length,f,.1*o._length,l,\\\"\\\",\\\"e\\\")}if(r===c._mainSubplot){var h=c._mainLinePosition;\\\"right\\\"!==c.side&&(h-=l),s(t,n,h,c._offset+.1*c._length,l,.8*c._length,\\\"ns\\\",\\\"\\\"),s(t,n,h,c._offset+.9*c._length,l,.1*c._length,\\\"s\\\",\\\"\\\"),s(t,n,h,c._offset,l,.1*c._length,\\\"n\\\",\\\"\\\")}}});var o=e._hoverlayer.node();o.onmousemove=function(r){r.target=t._fullLayout._lasthover,i.hover(t,r,e._hoversubplot)},o.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},o.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},r.updateFx(t)}},r.updateFx=function(t){var e=t._fullLayout,r=\\\"pan\\\"===e.dragmode?\\\"move\\\":\\\"crosshair\\\";o(e._draggers,r)}},{\\\"../../components/dragelement\\\":592,\\\"../../components/fx\\\":612,\\\"../../lib/setcursor\\\":717,\\\"./constants\\\":751,\\\"./dragbox\\\":754,d3:148}],756:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\");e.exports=function(t){return function(e,r){var a=e[t];if(Array.isArray(a))for(var o=n.subplotsRegistry.cartesian,s=o.idRegex,l=r._subplots,c=l.xaxis,u=l.yaxis,f=l.cartesian,h=r._has(\\\"cartesian\\\")||r._has(\\\"gl2d\\\"),p=0;p<a.length;p++){var d=a[p];if(i.isPlainObject(d)){var g=d.xref,v=d.yref,m=s.x.test(g),y=s.y.test(v);if(m||y){h||i.pushUnique(r._basePlotModules,o);var x=!1;m&&-1===c.indexOf(g)&&(c.push(g),x=!0),y&&-1===u.indexOf(v)&&(u.push(v),x=!0),x&&m&&y&&f.push(g+v)}}}}}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828}],757:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../plots\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"../get_data\\\").getModuleCalcData,c=t(\\\"./axis_ids\\\"),u=t(\\\"./constants\\\"),f=t(\\\"../../constants/xmlns_namespaces\\\"),h=a.ensureSingle;function p(t,e,r){return a.ensureSingle(t,e,r,function(t){t.datum(r)})}function d(t,e,r,a,o){for(var c,f,h,p=u.traceLayerClasses,d=t._fullLayout,g=d._modules,v=[],m=[],y=0;y<g.length;y++){var x=(c=g[y]).name,b=i.modules[x].categories;if(b.svg){var _=c.layerName||x+\\\"layer\\\",w=c.plot;h=(f=l(r,w))[0],r=f[1],h.length&&v.push({i:p.indexOf(_),className:_,plotMethod:w,cdModule:h}),b.zoomScale&&m.push(\\\".\\\"+_)}}v.sort(function(t,e){return t.i-e.i});var k=e.plot.selectAll(\\\"g.mlayer\\\").data(v,function(t){return t.className});if(k.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return t.className}).classed(\\\"mlayer\\\",!0),k.exit().remove(),k.order(),k.each(function(r){var i=n.select(this),l=r.className;r.plotMethod(t,e,r.cdModule,i,a,o),\\\"scatterlayer\\\"!==l&&\\\"barlayer\\\"!==l&&s.setClipUrl(i,e.layerClipId)}),d._has(\\\"scattergl\\\")&&(c=i.getModule(\\\"scattergl\\\"),h=l(r,c)[0],c.plot(t,e,h)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(\\\".scatterlayer, .barlayer\\\").selectAll(\\\".trace\\\")),m.length)){var M=e.plot.selectAll(m.join(\\\",\\\")).selectAll(\\\".trace\\\");e.zoomScalePts=M.selectAll(\\\"path.point\\\"),e.zoomScaleTxt=M.selectAll(\\\".textpoint\\\")}}function g(t,e){var r=e.plotgroup,n=e.id,i=u.layerValue2layerClass[e.xaxis.layer],a=u.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,l=s.plotgroup,f=n+\\\"-x\\\",d=n+\\\"-y\\\";e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,h(s.overlinesBelow,\\\"path\\\",f),h(s.overlinesBelow,\\\"path\\\",d),h(s.overaxesBelow,\\\"g\\\",f),h(s.overaxesBelow,\\\"g\\\",d),e.plot=h(s.overplot,\\\"g\\\",n),h(s.overlinesAbove,\\\"path\\\",f),h(s.overlinesAbove,\\\"path\\\",d),h(s.overaxesAbove,\\\"g\\\",f),h(s.overaxesAbove,\\\"g\\\",d),e.xlines=l.select(\\\".overlines-\\\"+i).select(\\\".\\\"+f),e.ylines=l.select(\\\".overlines-\\\"+a).select(\\\".\\\"+d),e.xaxislayer=l.select(\\\".overaxes-\\\"+i).select(\\\".\\\"+f),e.yaxislayer=l.select(\\\".overaxes-\\\"+a).select(\\\".\\\"+d)}else if(o)e.xlines=h(r,\\\"path\\\",\\\"xlines-above\\\"),e.ylines=h(r,\\\"path\\\",\\\"ylines-above\\\"),e.xaxislayer=h(r,\\\"g\\\",\\\"xaxislayer-above\\\"),e.yaxislayer=h(r,\\\"g\\\",\\\"yaxislayer-above\\\");else{var g=h(r,\\\"g\\\",\\\"layer-subplot\\\");e.shapelayer=h(g,\\\"g\\\",\\\"shapelayer\\\"),e.imagelayer=h(g,\\\"g\\\",\\\"imagelayer\\\"),e.gridlayer=h(r,\\\"g\\\",\\\"gridlayer\\\"),e.zerolinelayer=h(r,\\\"g\\\",\\\"zerolinelayer\\\"),h(r,\\\"path\\\",\\\"xlines-below\\\"),h(r,\\\"path\\\",\\\"ylines-below\\\"),e.overlinesBelow=h(r,\\\"g\\\",\\\"overlines-below\\\"),h(r,\\\"g\\\",\\\"xaxislayer-below\\\"),h(r,\\\"g\\\",\\\"yaxislayer-below\\\"),e.overaxesBelow=h(r,\\\"g\\\",\\\"overaxes-below\\\"),e.plot=h(r,\\\"g\\\",\\\"plot\\\"),e.overplot=h(r,\\\"g\\\",\\\"overplot\\\"),e.xlines=h(r,\\\"path\\\",\\\"xlines-above\\\"),e.ylines=h(r,\\\"path\\\",\\\"ylines-above\\\"),e.overlinesAbove=h(r,\\\"g\\\",\\\"overlines-above\\\"),h(r,\\\"g\\\",\\\"xaxislayer-above\\\"),h(r,\\\"g\\\",\\\"yaxislayer-above\\\"),e.overaxesAbove=h(r,\\\"g\\\",\\\"overaxes-above\\\"),e.xlines=r.select(\\\".xlines-\\\"+i),e.ylines=r.select(\\\".ylines-\\\"+a),e.xaxislayer=r.select(\\\".xaxislayer-\\\"+i),e.yaxislayer=r.select(\\\".yaxislayer-\\\"+a)}o||(p(e.gridlayer,\\\"g\\\",e.xaxis._id),p(e.gridlayer,\\\"g\\\",e.yaxis._id),e.gridlayer.selectAll(\\\"g\\\").map(function(t){return t[0]}).sort(c.idSort)),e.xlines.style(\\\"fill\\\",\\\"none\\\").classed(\\\"crisp\\\",!0),e.ylines.style(\\\"fill\\\",\\\"none\\\").classed(\\\"crisp\\\",!0)}function v(t,e){if(t){var r={};for(var i in t.each(function(t){var i=t[0];n.select(this).remove(),m(i,e),r[i]=!0}),e._plots)for(var a=e._plots[i].overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(\\\".trace\\\").remove()}}}function m(t,e){e._draggers.selectAll(\\\"g.\\\"+t).remove(),e._defs.select(\\\"#clip\\\"+e._uid+t+\\\"plot\\\").remove()}r.name=\\\"cartesian\\\",r.attr=[\\\"xaxis\\\",\\\"yaxis\\\"],r.idRoot=[\\\"x\\\",\\\"y\\\"],r.idRegex=u.idRegex,r.attrRegex=u.attrRegex,r.attributes=t(\\\"./attributes\\\"),r.layoutAttributes=t(\\\"./layout_attributes\\\"),r.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),r.transitionAxes=t(\\\"./transition_axes\\\"),r.finalizeSubplots=function(t,e){var r,n,i,o=e._subplots,s=o.xaxis,l=o.yaxis,f=o.cartesian,h=f.concat(o.gl2d||[]),p={},d={};for(r=0;r<h.length;r++){var g=h[r].split(\\\"y\\\");p[g[0]]=1,d[\\\"y\\\"+g[1]]=1}for(r=0;r<s.length;r++)p[n=s[r]]||(i=(t[c.id2name(n)]||{}).anchor,u.idRegex.y.test(i)||(i=\\\"y\\\"),f.push(n+i),h.push(n+i),d[i]||(d[i]=1,a.pushUnique(l,i)));for(r=0;r<l.length;r++)d[i=l[r]]||(n=(t[c.id2name(i)]||{}).anchor,u.idRegex.x.test(n)||(n=\\\"x\\\"),f.push(n+i),h.push(n+i),p[n]||(p[n]=1,a.pushUnique(s,n)));if(!h.length){for(var v in n=\\\"\\\",i=\\\"\\\",t){if(u.attrRegex.test(v))\\\"x\\\"===v.charAt(0)?(!n||+v.substr(5)<+n.substr(5))&&(n=v):(!i||+v.substr(5)<+i.substr(5))&&(i=v)}n=n?c.name2id(n):\\\"x\\\",i=i?c.name2id(i):\\\"y\\\",s.push(n),l.push(i),f.push(n+i)}},r.plot=function(t,e,r,n){var i,a=t._fullLayout,o=a._subplots.cartesian,s=t.calcdata;if(null!==e){if(!Array.isArray(e))for(e=[],i=0;i<s.length;i++)e.push(i);for(i=0;i<o.length;i++){for(var l,c=o[i],u=a._plots[c],f=[],h=0;h<s.length;h++){var p=s[h],g=p[0].trace;g.xaxis+g.yaxis===c&&((-1!==e.indexOf(g.index)||g.carpet)&&(l&&l[0].trace.xaxis+l[0].trace.yaxis===c&&-1!==[\\\"tonextx\\\",\\\"tonexty\\\",\\\"tonext\\\"].indexOf(g.fill)&&-1===f.indexOf(l)&&f.push(l),f.push(p)),l=p)}d(t,u,f,r,n)}}},r.clean=function(t,e,r,n){var i,a,o,s=n._plots||{},l=e._plots||{},u=n._subplots||{};if(n._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(o in s)(i=s[o]).plotgroup&&i.plotgroup.remove();var f=n._has&&n._has(\\\"gl\\\"),h=e._has&&e._has(\\\"gl\\\");if(f&&!h)for(o in s)(i=s[o])._scene&&i._scene.destroy();if(u.xaxis&&u.yaxis){var p=c.listIds({_fullLayout:n});for(a=0;a<p.length;a++){var d=p[a];e[c.id2name(d)]||n._infolayer.selectAll(\\\".g-\\\"+d+\\\"title\\\").remove()}}var g=n._has&&n._has(\\\"cartesian\\\"),y=e._has&&e._has(\\\"cartesian\\\");if(g&&!y)v(n._cartesianlayer.selectAll(\\\".subplot\\\"),n),n._defs.selectAll(\\\".axesclip\\\").remove(),delete n._axisConstraintGroups;else if(u.cartesian)for(a=0;a<u.cartesian.length;a++){var x=u.cartesian[a];if(!l[x]){var b=\\\".\\\"+x+\\\",.\\\"+x+\\\"-x,.\\\"+x+\\\"-y\\\";n._cartesianlayer.selectAll(b).remove(),m(x,n)}}},r.drawFramework=function(t){var e=t._fullLayout,r=function(t){var e,r,n,i,a,o,s=t._fullLayout,l=s._subplots.cartesian,c=l.length,u=[],f=[];for(e=0;e<c;e++){n=l[e],i=s._plots[n],a=i.xaxis,o=i.yaxis;var h=a._mainAxis,p=o._mainAxis,d=h._id+p._id,g=s._plots[d];i.overlays=[],d!==n&&g?(i.mainplot=d,i.mainplotinfo=g,f.push(n)):(i.mainplot=void 0,i.mainPlotinfo=void 0,u.push(n))}for(e=0;e<f.length;e++)n=f[e],(i=s._plots[n]).mainplotinfo.overlays.push(i);var v=u.concat(f),m=new Array(c);for(e=0;e<c;e++){n=v[e],i=s._plots[n],a=i.xaxis,o=i.yaxis;var y=[n,a.layer,o.layer,a.overlaying||\\\"\\\",o.overlaying||\\\"\\\"];for(r=0;r<i.overlays.length;r++)y.push(i.overlays[r].id);m[e]=y}return m}(t),i=e._cartesianlayer.selectAll(\\\".subplot\\\").data(r,String);i.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"subplot \\\"+t[0]}),i.order(),i.exit().call(v,e),i.each(function(r){var i=r[0],a=e._plots[i];a.plotgroup=n.select(this),g(t,a),a.draglayer=h(e._draggers,\\\"g\\\",i)})},r.rangePlot=function(t,e,r){g(t,e),d(t,e,r),o.style(t)},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(\\\".svg-container\\\");r.filter(function(t,e){return e===r.size()-1}).selectAll(\\\".gl-canvas-context, .gl-canvas-focus\\\").each(function(){var t=this.toDataURL(\\\"image/png\\\");e.append(\\\"svg:image\\\").attr({xmlns:f.svg,\\\"xlink:href\\\":t,preserveAspectRatio:\\\"none\\\",x:0,y:0,width:this.width,height:this.height})})},r.updateFx=t(\\\"./graph_interact\\\").updateFx},{\\\"../../components/drawing\\\":595,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../get_data\\\":782,\\\"../plots\\\":809,\\\"./attributes\\\":743,\\\"./axis_ids\\\":748,\\\"./constants\\\":751,\\\"./graph_interact\\\":755,\\\"./layout_attributes\\\":758,\\\"./layout_defaults\\\":759,\\\"./transition_axes\\\":768,d3:148}],758:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../font_attributes\\\"),i=t(\\\"../../components/color/attributes\\\"),a=t(\\\"../../components/drawing/attributes\\\").dash,o=t(\\\"../../lib/extend\\\").extendFlat,s=t(\\\"../../plot_api/plot_template\\\").templatedArray,l=t(\\\"./constants\\\");e.exports={visible:{valType:\\\"boolean\\\",editType:\\\"plot\\\"},color:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"ticks\\\"},title:{valType:\\\"string\\\",editType:\\\"ticks\\\"},titlefont:n({editType:\\\"ticks\\\"}),type:{valType:\\\"enumerated\\\",values:[\\\"-\\\",\\\"linear\\\",\\\"log\\\",\\\"date\\\",\\\"category\\\"],dflt:\\\"-\\\",editType:\\\"calc\\\",_noTemplating:!0},autorange:{valType:\\\"enumerated\\\",values:[!0,!1,\\\"reversed\\\"],dflt:!0,editType:\\\"axrange\\\",impliedEdits:{\\\"range[0]\\\":void 0,\\\"range[1]\\\":void 0}},rangemode:{valType:\\\"enumerated\\\",values:[\\\"normal\\\",\\\"tozero\\\",\\\"nonnegative\\\"],dflt:\\\"normal\\\",editType:\\\"plot\\\"},range:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"axrange\\\",impliedEdits:{\\\"^autorange\\\":!1}},{valType:\\\"any\\\",editType:\\\"axrange\\\",impliedEdits:{\\\"^autorange\\\":!1}}],editType:\\\"axrange\\\",impliedEdits:{autorange:!1}},fixedrange:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},scaleanchor:{valType:\\\"enumerated\\\",values:[l.idRegex.x.toString(),l.idRegex.y.toString()],editType:\\\"plot\\\"},scaleratio:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"plot\\\"},constrain:{valType:\\\"enumerated\\\",values:[\\\"range\\\",\\\"domain\\\"],dflt:\\\"range\\\",editType:\\\"plot\\\"},constraintoward:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],editType:\\\"plot\\\"},tickmode:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"linear\\\",\\\"array\\\"],editType:\\\"ticks\\\",impliedEdits:{tick0:void 0,dtick:void 0}},nticks:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"ticks\\\"},tick0:{valType:\\\"any\\\",editType:\\\"ticks\\\",impliedEdits:{tickmode:\\\"linear\\\"}},dtick:{valType:\\\"any\\\",editType:\\\"ticks\\\",impliedEdits:{tickmode:\\\"linear\\\"}},tickvals:{valType:\\\"data_array\\\",editType:\\\"ticks\\\"},ticktext:{valType:\\\"data_array\\\",editType:\\\"ticks\\\"},ticks:{valType:\\\"enumerated\\\",values:[\\\"outside\\\",\\\"inside\\\",\\\"\\\"],editType:\\\"ticks\\\"},mirror:{valType:\\\"enumerated\\\",values:[!0,\\\"ticks\\\",!1,\\\"all\\\",\\\"allticks\\\"],dflt:!1,editType:\\\"ticks+layoutstyle\\\"},ticklen:{valType:\\\"number\\\",min:0,dflt:5,editType:\\\"ticks\\\"},tickwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"ticks\\\"},tickcolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"ticks\\\"},showticklabels:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"ticks\\\"},automargin:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"ticks\\\"},showspikes:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"modebar\\\"},spikecolor:{valType:\\\"color\\\",dflt:null,editType:\\\"none\\\"},spikethickness:{valType:\\\"number\\\",dflt:3,editType:\\\"none\\\"},spikedash:o({},a,{dflt:\\\"dash\\\",editType:\\\"none\\\"}),spikemode:{valType:\\\"flaglist\\\",flags:[\\\"toaxis\\\",\\\"across\\\",\\\"marker\\\"],dflt:\\\"toaxis\\\",editType:\\\"none\\\"},spikesnap:{valType:\\\"enumerated\\\",values:[\\\"data\\\",\\\"cursor\\\"],dflt:\\\"data\\\",editType:\\\"none\\\"},tickfont:n({editType:\\\"ticks\\\"}),tickangle:{valType:\\\"angle\\\",dflt:\\\"auto\\\",editType:\\\"ticks\\\"},tickprefix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"ticks\\\"},showtickprefix:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"ticks\\\"},ticksuffix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"ticks\\\"},showticksuffix:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"ticks\\\"},showexponent:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"ticks\\\"},exponentformat:{valType:\\\"enumerated\\\",values:[\\\"none\\\",\\\"e\\\",\\\"E\\\",\\\"power\\\",\\\"SI\\\",\\\"B\\\"],dflt:\\\"B\\\",editType:\\\"ticks\\\"},separatethousands:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"ticks\\\"},tickformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"ticks\\\"},tickformatstops:s(\\\"tickformatstop\\\",{enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"ticks\\\"},dtickrange:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"ticks\\\"},{valType:\\\"any\\\",editType:\\\"ticks\\\"}],editType:\\\"ticks\\\"},value:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"ticks\\\"},editType:\\\"ticks\\\"}),hoverformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"none\\\"},showline:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"ticks+layoutstyle\\\"},linecolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"layoutstyle\\\"},linewidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"ticks+layoutstyle\\\"},showgrid:{valType:\\\"boolean\\\",editType:\\\"ticks\\\"},gridcolor:{valType:\\\"color\\\",dflt:i.lightLine,editType:\\\"ticks\\\"},gridwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"ticks\\\"},zeroline:{valType:\\\"boolean\\\",editType:\\\"ticks\\\"},zerolinecolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"ticks\\\"},zerolinewidth:{valType:\\\"number\\\",dflt:1,editType:\\\"ticks\\\"},anchor:{valType:\\\"enumerated\\\",values:[\\\"free\\\",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:\\\"plot\\\"},side:{valType:\\\"enumerated\\\",values:[\\\"top\\\",\\\"bottom\\\",\\\"left\\\",\\\"right\\\"],editType:\\\"plot\\\"},overlaying:{valType:\\\"enumerated\\\",values:[\\\"free\\\",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:\\\"plot\\\"},layer:{valType:\\\"enumerated\\\",values:[\\\"above traces\\\",\\\"below traces\\\"],dflt:\\\"above traces\\\",editType:\\\"plot\\\"},domain:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\",min:0,max:1,editType:\\\"plot\\\"},{valType:\\\"number\\\",min:0,max:1,editType:\\\"plot\\\"}],dflt:[0,1],editType:\\\"plot\\\"},position:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"plot\\\"},categoryorder:{valType:\\\"enumerated\\\",values:[\\\"trace\\\",\\\"category ascending\\\",\\\"category descending\\\",\\\"array\\\"],dflt:\\\"trace\\\",editType:\\\"calc\\\"},categoryarray:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\",_deprecated:{autotick:{valType:\\\"boolean\\\",editType:\\\"ticks\\\"}}}},{\\\"../../components/color/attributes\\\":569,\\\"../../components/drawing/attributes\\\":594,\\\"../../lib/extend\\\":685,\\\"../../plot_api/plot_template\\\":735,\\\"../font_attributes\\\":772,\\\"./constants\\\":751}],759:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../plot_api/plot_template\\\"),o=t(\\\"../layout_attributes\\\"),s=t(\\\"./layout_attributes\\\"),l=t(\\\"./type_defaults\\\"),c=t(\\\"./axis_defaults\\\"),u=t(\\\"./constraint_defaults\\\"),f=t(\\\"./position_defaults\\\"),h=t(\\\"./axis_ids\\\"),p=h.id2name,d=h.name2id,g=t(\\\"../../registry\\\"),v=g.traceIs,m=g.getComponentMethod;function y(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}e.exports=function(t,e,r){var h,g,x={},b={},_={},w={},k={};for(h=0;h<r.length;h++){var M=r[h];if(v(M,\\\"cartesian\\\")||v(M,\\\"gl2d\\\")){var A,T;if(M.xaxis)y(x,A=p(M.xaxis),M);else if(M.xaxes)for(g=0;g<M.xaxes.length;g++)y(x,p(M.xaxes[g]),M);if(M.yaxis)y(x,T=p(M.yaxis),M);else if(M.yaxes)for(g=0;g<M.yaxes.length;g++)y(x,p(M.yaxes[g]),M);if(v(M,\\\"carpet\\\")&&(\\\"carpet\\\"!==M.type||M._cheater)||A&&(_[A]=1),\\\"carpet\\\"===M.type&&M._cheater&&A&&(b[A]=1),v(M,\\\"2dMap\\\")&&(w[A]=1,w[T]=1),v(M,\\\"oriented\\\"))k[\\\"h\\\"===M.orientation?T:A]=1}}var S=e._subplots,C=S.xaxis,E=S.yaxis,L=n.simpleMap(C,p),z=n.simpleMap(E,p),O=L.concat(z),I=i.background;C.length&&E.length&&(I=n.coerce(t,e,o,\\\"plot_bgcolor\\\"));var P,D,R,B,F=i.combine(I,e.paper_bgcolor);function N(t,e){return n.coerce(R,B,s,t,e)}function j(t,e){return n.coerce2(R,B,s,t,e)}function V(t){return\\\"x\\\"===t?E:C}var U={x:V(\\\"x\\\"),y:V(\\\"y\\\")};function q(e,r){for(var n=\\\"x\\\"===e?L:z,i=[],a=0;a<n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(d(o))}return i}for(h=0;h<O.length;h++){D=(P=O[h]).charAt(0),n.isPlainObject(t[P])||(t[P]={}),R=t[P],B=a.newContainer(e,P,D+\\\"axis\\\");var H=x[P]||[];B._traceIndices=H.map(function(t){return t._expandedIndex}),B._annIndices=[],B._shapeIndices=[],B._name=P;var G=B._id=d(P),W=q(D,P),Y={letter:D,font:e.font,outerTicks:w[P],showGrid:!k[P],data:H,bgColor:F,calendar:e.calendar,automargin:!0,cheateronly:\\\"x\\\"===D&&b[P]&&!_[P],splomStash:((e._splomAxes||{})[D]||{})[G]};l(R,B,N,Y),c(R,B,N,Y,e);var X=j(\\\"spikecolor\\\"),Z=j(\\\"spikethickness\\\"),$=j(\\\"spikedash\\\"),J=j(\\\"spikemode\\\"),K=j(\\\"spikesnap\\\");N(\\\"showspikes\\\",!!(X||Z||$||J||K))||(delete B.spikecolor,delete B.spikethickness,delete B.spikedash,delete B.spikemode,delete B.spikesnap);var Q={letter:D,counterAxes:U[D],overlayableAxes:W,grid:e.grid};f(R,B,N,Q),B._input=R}var tt=m(\\\"rangeslider\\\",\\\"handleDefaults\\\"),et=m(\\\"rangeselector\\\",\\\"handleDefaults\\\");for(h=0;h<L.length;h++)P=L[h],R=t[P],B=e[P],tt(t,e,P),\\\"date\\\"===B.type&&et(R,B,e,z,B.calendar),N(\\\"fixedrange\\\");for(h=0;h<z.length;h++){P=z[h],R=t[P],B=e[P];var rt=e[p(B.anchor)];N(\\\"fixedrange\\\",rt&&rt.rangeslider&&rt.rangeslider.visible)}e._axisConstraintGroups=[];var nt=U.x.concat(U.y);for(h=0;h<O.length;h++)D=(P=O[h]).charAt(0),R=t[P],B=e[P],u(R,B,N,nt,e)}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../registry\\\":828,\\\"../layout_attributes\\\":800,\\\"./axis_defaults\\\":747,\\\"./axis_ids\\\":748,\\\"./constraint_defaults\\\":752,\\\"./layout_attributes\\\":758,\\\"./position_defaults\\\":761,\\\"./type_defaults\\\":769}],760:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"tinycolor2\\\").mix,i=t(\\\"../../components/color/attributes\\\").lightFraction,a=t(\\\"../../lib\\\");e.exports=function(t,e,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(t,e,o.attributes,r,n)}var c=l(\\\"linecolor\\\",s),u=l(\\\"linewidth\\\");r(\\\"showline\\\",o.showLine||!!c||!!u)||(delete e.linecolor,delete e.linewidth);var f=l(\\\"gridcolor\\\",n(s,o.bgColor,o.blend||i).toRgbString()),h=l(\\\"gridwidth\\\");if(r(\\\"showgrid\\\",o.showGrid||!!f||!!h)||(delete e.gridcolor,delete e.gridwidth),!o.noZeroLine){var p=l(\\\"zerolinecolor\\\",s),d=l(\\\"zerolinewidth\\\");r(\\\"zeroline\\\",o.showGrid||!!p||!!d)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib\\\":696,tinycolor2:514}],761:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\");e.exports=function(t,e,r,a){var o,s,l,c,u=a.counterAxes||[],f=a.overlayableAxes||[],h=a.letter,p=a.grid;p&&(s=p._domains[h][p._axisMap[e._id]],o=p._anchors[e._id],s&&(l=p[h+\\\"side\\\"].split(\\\" \\\")[0],c=p.domain[h][\\\"right\\\"===l||\\\"top\\\"===l?1:0])),s=s||[0,1],o=o||(n(t.position)?\\\"free\\\":u[0]||\\\"free\\\"),l=l||(\\\"x\\\"===h?\\\"bottom\\\":\\\"left\\\"),c=c||0,\\\"free\\\"===i.coerce(t,e,{anchor:{valType:\\\"enumerated\\\",values:[\\\"free\\\"].concat(u),dflt:o}},\\\"anchor\\\")&&r(\\\"position\\\",c),i.coerce(t,e,{side:{valType:\\\"enumerated\\\",values:\\\"x\\\"===h?[\\\"bottom\\\",\\\"top\\\"]:[\\\"left\\\",\\\"right\\\"],dflt:l}},\\\"side\\\");var d=!1;if(f.length&&(d=i.coerce(t,e,{overlaying:{valType:\\\"enumerated\\\",values:[!1].concat(f),dflt:!1}},\\\"overlaying\\\")),!d){var g=r(\\\"domain\\\",s);g[0]>g[1]-.01&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\\\"layer\\\"),e}},{\\\"../../lib\\\":696,\\\"fast-isnumeric\\\":214}],762:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../constants/alignment\\\").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||\\\"center\\\"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)]}},{\\\"../../constants/alignment\\\":668}],763:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"polybooljs\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../../components/fx\\\"),s=t(\\\"../../lib/polygon\\\"),l=t(\\\"../../lib/throttle\\\"),c=t(\\\"../../components/fx/helpers\\\").makeEventData,u=t(\\\"./axis_ids\\\").getFromId,f=t(\\\"../../lib/clear_gl_canvases\\\"),h=t(\\\"../../plot_api/subroutines\\\").redrawReglTraces,p=t(\\\"./constants\\\"),d=p.MINSELECT,g=s.filter,v=s.tester;function m(t){return t._id}function y(t,e,r,n,i,a,o){var s,l,c,u,f,h,p,d,g,v=e._hoverdata,m=e._fullLayout.clickmode.indexOf(\\\"event\\\")>-1,y=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){w(t,e,a);var x=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n<e.length;n++)if(r=e[n],i.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?a=i.pointNumber:void 0!==i.binNumber&&(a=i.binNumber,o=i.pointNumbers);break}return{pointNumber:a,pointNumbers:o,searchInfo:r}}(v,s=M(e,r,n,i));if(x.pointNumbers.length>0?function(t,e){var r,n,i,a=[];for(i=0;i<t.length;i++)(r=t[i]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i<e.pointNumbers.length;i++)if(n.selectedpoints.indexOf(e.pointNumbers[i])<0)return!1;return!0}return!1}(s,x):function(t){var e,r,n,i=0;for(n=0;n<t.length;n++)if(e=t[n],(r=e.cd[0].trace).selectedpoints){if(r.selectedpoints.length>1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=T(x))){for(o&&o.remove(),g=0;g<s.length;g++)(l=s[g])._module.selectPoints(l,!1);S(e,s),k(a),m&&e.emit(\\\"plotly_deselect\\\",null)}else{for(p=t.shiftKey&&(void 0!==h?h:T(x)),c=function(t,e,r){return{pointNumber:t,searchInfo:e,subtract:r}}(x.pointNumber,x.searchInfo,p),u=_(a.selectionDefs.concat([c])),g=0;g<s.length;g++)if(f=C(s[g]._module.selectPoints(s[g],u),s[g]),y.length)for(var b=0;b<f.length;b++)y.push(f[b]);else y=f;S(e,s,d={points:y}),c&&a&&a.selectionDefs.push(c),o&&A(a.mergedPolygons,o),m&&e.emit(\\\"plotly_selected\\\",d)}}}function x(t){return\\\"pointNumber\\\"in t&&\\\"searchInfo\\\"in t}function b(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,n,i){var a=t.searchInfo.cd[0].trace._expandedIndex;return i.cd[0].trace._expandedIndex===a&&n===t.pointNumber},isRect:!1,degenerate:!1,subtract:t.subtract}}function _(t){for(var e=[],r=x(t[0])?0:t[0][0][0],n=r,i=x(t[0])?0:t[0][0][1],a=i,o=0;o<t.length;o++)if(x(t[o]))e.push(b(t[o]));else{var l=s.tester(t[o]);l.subtract=t[o].subtract,e.push(l),r=Math.min(r,l.xmin),n=Math.max(n,l.xmax),i=Math.min(i,l.ymin),a=Math.max(a,l.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:function(t,r,n,i){for(var a=!1,o=0;o<e.length;o++)e[o].contains(t,r,n,i)&&(a=!1===e[o].subtract);return a},isRect:!1,degenerate:!1}}function w(t,e,r){var n=e._fullLayout,i=n._zoomlayer,a=r.plotinfo,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===a.id,s=t.shiftKey||t.altKey;o&&s&&a.selection&&a.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=a.selection.selectionDefs,r.mergedPolygons=a.selection.mergedPolygons):s&&a.selection||k(r),o||(E(i),n._lastSelectedSubplot=a.id)}function k(t){var e=t.plotinfo;e.selection={},e.selection.selectionDefs=t.selectionDefs=[],e.selection.mergedPolygons=t.mergedPolygons=[]}function M(t,e,r,n){var i,a,o,s=[],l=e.map(m),c=r.map(m);for(o=0;o<t.calcdata.length;o++)if(!0===(a=(i=t.calcdata[o])[0].trace).visible&&a._module&&a._module.selectPoints)if(!n||a.subplot!==n&&a.geo!==n)if(\\\"splom\\\"===a.type&&a._xaxes[l[0]]&&a._yaxes[c[0]]){var f=h(a._module,i,e[0],r[0]);f.scene=t._fullLayout._splomScenes[a.uid],s.push(f)}else{if(-1===l.indexOf(a.xaxis))continue;if(-1===c.indexOf(a.yaxis))continue;s.push(h(a._module,i,u(t,a.xaxis),u(t,a.yaxis)))}else s.push(h(a._module,i,e[0],r[0]));return s;function h(t,e,r,n){return{_module:t,cd:e,xaxis:r,yaxis:n}}}function A(t,e){var r,n,i=[];for(r=0;r<t.length;r++){var a=t[r];i.push(a.join(\\\"L\\\")+\\\"L\\\"+a[0])}n=t.length>0?\\\"M\\\"+i.join(\\\"M\\\")+\\\"Z\\\":\\\"M0,0Z\\\",e.attr(\\\"d\\\",n)}function T(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function S(t,e,r){var n,a,o,s;if(r){var l=r.points||[];for(n=0;n<e.length;n++)(s=e[n].cd[0].trace).selectedpoints=[],s._input.selectedpoints=[];for(n=0;n<l.length;n++){var c=l[n],u=c.data,p=c.fullData;c.pointIndices?([].push.apply(u.selectedpoints,c.pointIndices),[].push.apply(p.selectedpoints,c.pointIndices)):(u.selectedpoints.push(c.pointIndex),p.selectedpoints.push(c.pointIndex))}}else for(n=0;n<e.length;n++)delete(s=e[n].cd[0].trace).selectedpoints,delete s._input.selectedpoints;var d=!1;for(n=0;n<e.length;n++){s=(o=(a=e[n]).cd)[0].trace,i.traceIs(s,\\\"regl\\\")&&(d=!0);var g=a._module,v=g.styleOnSelect||g.style;v&&v(t,o)}d&&(f(t),h(t))}function C(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i<t.length;i++)t[i]=c(t[i],n,r);return t}function E(t){t.selectAll(\\\".select-outline\\\").remove()}e.exports={prepSelect:function(t,e,r,i,s){var c,u,f,h,m,x,b,T=i.gd,E=T._fullLayout,L=E._zoomlayer,z=i.element.getBoundingClientRect(),O=i.plotinfo,I=O.xaxis._offset,P=O.yaxis._offset,D=e-z.left,R=r-z.top,B=D,F=R,N=\\\"M\\\"+D+\\\",\\\"+R,j=i.xaxes[0]._length,V=i.yaxes[0]._length,U=i.xaxes.concat(i.yaxes),q=t.altKey;w(t,T,i),\\\"lasso\\\"===s&&(c=g([[D,R]],p.BENDPX));var H=L.selectAll(\\\"path.select-outline-\\\"+O.id).data([1,2]);H.enter().append(\\\"path\\\").attr(\\\"class\\\",function(t){return\\\"select-outline select-outline-\\\"+t+\\\" select-outline-\\\"+O.id}).attr(\\\"transform\\\",\\\"translate(\\\"+I+\\\", \\\"+P+\\\")\\\").attr(\\\"d\\\",N+\\\"Z\\\");var G,W=L.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox-corners\\\").style({fill:a.background,stroke:a.defaultLine,\\\"stroke-width\\\":1}).attr(\\\"transform\\\",\\\"translate(\\\"+I+\\\", \\\"+P+\\\")\\\").attr(\\\"d\\\",\\\"M0,0Z\\\"),Y=E._uid+p.SELECTID,X=[],Z=M(T,i.xaxes,i.yaxes,i.subplot);function $(t){var e=\\\"y\\\"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function J(t,e){return t-e}G=O.fillRangeItems?O.fillRangeItems:\\\"select\\\"===s?function(t,e){var r=t.range={};for(m=0;m<U.length;m++){var n=U[m],i=n._id.charAt(0);r[n._id]=[n.p2d(e[i+\\\"min\\\"]),n.p2d(e[i+\\\"max\\\"])].sort(J)}}:function(t,e,r){var n=t.lassoPoints={};for(m=0;m<U.length;m++){var i=U[m];n[i._id]=r.filtered.map($(i))}},i.moveFn=function(t,e){B=Math.max(0,Math.min(j,t+D)),F=Math.max(0,Math.min(V,e+R));var r=Math.abs(B-D),a=Math.abs(F-R);if(\\\"select\\\"===s){var o=E.selectdirection;\\\"h\\\"===(o=\\\"any\\\"===E.selectdirection?a<Math.min(.6*r,d)?\\\"h\\\":r<Math.min(.6*a,d)?\\\"v\\\":\\\"d\\\":E.selectdirection)?((h=[[D,0],[D,V],[B,V],[B,0]]).xmin=Math.min(D,B),h.xmax=Math.max(D,B),h.ymin=Math.min(0,V),h.ymax=Math.max(0,V),W.attr(\\\"d\\\",\\\"M\\\"+h.xmin+\\\",\\\"+(R-d)+\\\"h-4v\\\"+2*d+\\\"h4ZM\\\"+(h.xmax-1)+\\\",\\\"+(R-d)+\\\"h4v\\\"+2*d+\\\"h-4Z\\\")):\\\"v\\\"===o?((h=[[0,R],[0,F],[j,F],[j,R]]).xmin=Math.min(0,j),h.xmax=Math.max(0,j),h.ymin=Math.min(R,F),h.ymax=Math.max(R,F),W.attr(\\\"d\\\",\\\"M\\\"+(D-d)+\\\",\\\"+h.ymin+\\\"v-4h\\\"+2*d+\\\"v4ZM\\\"+(D-d)+\\\",\\\"+(h.ymax-1)+\\\"v4h\\\"+2*d+\\\"v-4Z\\\")):\\\"d\\\"===o&&((h=[[D,R],[D,F],[B,F],[B,R]]).xmin=Math.min(D,B),h.xmax=Math.max(D,B),h.ymin=Math.min(R,F),h.ymax=Math.max(R,F),W.attr(\\\"d\\\",\\\"M0,0Z\\\"))}else\\\"lasso\\\"===s&&(c.addPt([B,F]),h=c.filtered);i.selectionDefs&&i.selectionDefs.length?(f=function(t,e,r){return r?n.difference({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions:n.union({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions}(i.mergedPolygons,h,q),h.subtract=q,u=_(i.selectionDefs.concat([h]))):(f=[h],u=v(h)),A(f,H),l.throttle(Y,p.SELECTDELAY,function(){X=[];var t,e,r=[];for(m=0;m<Z.length;m++)if(e=(x=Z[m])._module.selectPoints(x,u),r.push(e),t=C(e,x),X.length)for(var n=0;n<t.length;n++)X.push(t[n]);else X=t;S(T,Z,b={points:X}),G(b,h,c),i.gd.emit(\\\"plotly_selecting\\\",b)})},i.clickFn=function(t,e){var r=E.clickmode;W.remove(),l.done(Y).then(function(){if(l.clear(Y),2===t){for(H.remove(),m=0;m<Z.length;m++)(x=Z[m])._module.selectPoints(x,!1);S(T,Z),k(i),T.emit(\\\"plotly_deselect\\\",null)}else r.indexOf(\\\"select\\\")>-1&&y(e,T,i.xaxes,i.yaxes,i.subplot,i,H),\\\"event\\\"===r&&T.emit(\\\"plotly_selected\\\",void 0);o.click(T,e)})},i.doneFn=function(){W.remove(),l.done(Y).then(function(){l.clear(Y),i.gd.emit(\\\"plotly_selected\\\",b),h&&i.selectionDefs&&(h.subtract=q,i.selectionDefs.push(h),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,f))})}},clearSelect:E,selectOnClick:y}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../components/fx/helpers\\\":609,\\\"../../lib/clear_gl_canvases\\\":679,\\\"../../lib/polygon\\\":709,\\\"../../lib/throttle\\\":722,\\\"../../plot_api/subroutines\\\":736,\\\"../../registry\\\":828,\\\"./axis_ids\\\":748,\\\"./constants\\\":751,polybooljs:456}],764:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../lib\\\"),o=a.cleanNumber,s=a.ms2DateTime,l=a.dateTime2ms,c=a.ensureNumber,u=t(\\\"../../constants/numerical\\\"),f=u.FP_SAFE,h=u.BADNUM,p=u.LOG_CLIP,d=t(\\\"./constants\\\"),g=t(\\\"./axis_ids\\\");function v(t){return Math.pow(10,t)}e.exports=function(t,e){e=e||{};var r=(t._id||\\\"x\\\").charAt(0);function u(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*p*Math.abs(n-i))}return h}function m(e,r,n){var o=l(e,n||t.calendar);if(o===h){if(!i(e))return h;e=+e;var s=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-s/10);o=l(new Date(c))+s/10}return o}function y(e,r,n){return s(e,r,n||t.calendar)}function x(e){return t._categories[Math.round(e)]}function b(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if(i(e))return+e}function _(e){return i(e)?n.round(t._b+t._m*e,2):h}function w(e){return(e-t._b)/t._m}t.c2l=\\\"log\\\"===t.type?u:c,t.l2c=\\\"log\\\"===t.type?v:c,t.l2p=_,t.p2l=w,t.c2p=\\\"log\\\"===t.type?function(t,e){return _(u(t,e))}:_,t.p2c=\\\"log\\\"===t.type?function(t){return v(w(t))}:w,-1!==[\\\"linear\\\",\\\"-\\\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=c,t.d2p=t.r2p=function(e){return t.l2p(o(e))},t.p2d=t.p2r=w,t.cleanPos=c):\\\"log\\\"===t.type?(t.d2r=t.d2l=function(t,e){return u(o(t),e)},t.r2d=t.r2c=function(t){return v(o(t))},t.d2c=t.r2l=o,t.c2d=t.l2r=c,t.c2r=u,t.l2d=v,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return v(w(t))},t.r2p=function(e){return t.l2p(o(e))},t.p2r=w,t.cleanPos=c):\\\"date\\\"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=m,t.c2d=t.c2r=t.l2d=t.l2r=y,t.d2p=t.r2p=function(e,r,n){return t.l2p(m(e,0,n))},t.p2d=t.p2r=function(t,e,r){return y(w(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,h,t.calendar)}):\\\"category\\\"===t.type&&(t.d2c=t.d2l=function(e){if(null!=e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return h},t.r2d=t.c2d=t.l2d=x,t.d2r=t.d2l_noadd=b,t.r2c=function(e){var r=b(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=c,t.r2l=b,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return x(w(t))},t.r2p=t.d2p,t.p2r=w,t.cleanPos=function(t){return\\\"string\\\"==typeof t&&\\\"\\\"!==t?t:c(t)}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e,n){n||(n={}),e||(e=\\\"range\\\");var o,s,l=a.nestedProperty(t,e).get();if(s=(s=\\\"date\\\"===t.type?a.dfltRange(t.calendar):\\\"y\\\"===r?d.DFLTRANGEY:n.dfltRange||d.DFLTRANGEX).slice(),l&&2===l.length)for(\\\"date\\\"===t.type&&(l[0]=a.cleanDate(l[0],h,t.calendar),l[1]=a.cleanDate(l[1],h,t.calendar)),o=0;o<2;o++)if(\\\"date\\\"===t.type){if(!a.isDateTime(l[o],t.calendar)){t[e]=s;break}if(t.r2l(l[0])===t.r2l(l[1])){var c=a.constrain(t.r2l(l[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);l[0]=t.l2r(c-1e3),l[1]=t.l2r(c+1e3);break}}else{if(!i(l[o])){if(!i(l[1-o])){t[e]=s;break}l[o]=l[1-o]*(o?10:.1)}if(l[o]<-f?l[o]=-f:l[o]>f&&(l[o]=f),l[0]===l[1]){var u=Math.max(1,Math.abs(1e-6*l[0]));l[0]-=u,l[1]+=u}}else a.nestedProperty(t,e).set(s)},t.setScale=function(n){var i=e._size;if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var a=g.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var o=n&&t._r?\\\"_r\\\":\\\"range\\\",s=t.calendar;t.cleanRange(o);var l=t.r2l(t[o][0],s),c=t.r2l(t[o][1],s);if(\\\"y\\\"===r?(t._offset=i.t+(1-t.domain[1])*i.h,t._length=i.h*(t.domain[1]-t.domain[0]),t._m=t._length/(l-c),t._b=-t._m*c):(t._offset=i.l+t.domain[0]*i.w,t._length=i.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-l),t._b=-t._m*l),!isFinite(t._m)||!isFinite(t._b))throw e._replotting=!1,new Error(\\\"Something went wrong with axis scaling\\\")},t.makeCalcdata=function(e,r){var n,i,o,s,l=t.type,c=\\\"date\\\"===l&&e[r+\\\"calendar\\\"];if(r in e){if(n=e[r],s=e._length||n.length,a.isTypedArray(n)&&(\\\"linear\\\"===l||\\\"log\\\"===l)){if(s===n.length)return n;if(n.subarray)return n.subarray(0,s)}for(i=new Array(s),o=0;o<s;o++)i[o]=t.d2c(n[o],0,c)}else{var u=r+\\\"0\\\"in e?t.d2c(e[r+\\\"0\\\"],0,c):0,f=e[\\\"d\\\"+r]?Number(e[\\\"d\\\"+r]):1;for(n=e[{x:\\\"y\\\",y:\\\"x\\\"}[r]],s=e._length||n.length,i=new Array(s),o=0;o<s;o++)i[o]=u+o*f}return i},t.isValidRange=function(e){return Array.isArray(e)&&2===e.length&&i(t.r2l(e[0]))&&i(t.r2l(e[1]))},t.isPtWithinRange=function(e,n){var i=t.c2l(e[r],null,n),a=t.r2l(t.range[0]),o=t.r2l(t.range[1]);return a<o?a<=i&&i<=o:o<=i&&i<=a},t.clearCalc=function(){t._categories=(t._initialCategories||[]).slice(),t._categoriesMap={};for(var e=0;e<t._categories.length;e++)t._categoriesMap[t._categories[e]]=e};var k=e._d3locale;\\\"date\\\"===t.type&&(t._dateFormat=k?k.timeFormat.utc:n.time.format.utc,t._extraFormat=e._extraFormat),t._separators=e.separators,t._numFormat=k?k.numberFormat:n.format,delete t._minDtick,delete t._forceTick0}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"./axis_ids\\\":748,\\\"./constants\\\":751,d3:148,\\\"fast-isnumeric\\\":214}],765:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\"),a=t(\\\"../array_container_defaults\\\");function o(t,e){function r(r,a){return n.coerce(t,e,i.tickformatstops,r,a)}r(\\\"enabled\\\")&&(r(\\\"dtickrange\\\"),r(\\\"value\\\"))}e.exports=function(t,e,r,s,l){var c=function(t){var e=[\\\"showexponent\\\",\\\"showtickprefix\\\",\\\"showticksuffix\\\"].filter(function(e){return void 0!==t[e]});if(e.every(function(r){return t[r]===t[e[0]]})||1===e.length)return t[e[0]]}(t);if(r(\\\"tickprefix\\\")&&r(\\\"showtickprefix\\\",c),r(\\\"ticksuffix\\\",l.tickSuffixDflt)&&r(\\\"showticksuffix\\\",c),r(\\\"showticklabels\\\")){var u=l.font||{},f=e.color,h=f&&f!==i.color.dflt?f:u.color;if(n.coerceFont(r,\\\"tickfont\\\",{family:u.family,size:u.size,color:h}),r(\\\"tickangle\\\"),\\\"category\\\"!==s){var p=r(\\\"tickformat\\\"),d=t.tickformatstops;Array.isArray(d)&&d.length&&a(t,e,{name:\\\"tickformatstops\\\",inclusionAttr:\\\"enabled\\\",handleItemDefaults:o}),p||\\\"date\\\"===s||(r(\\\"showexponent\\\",c),r(\\\"exponentformat\\\"),r(\\\"separatethousands\\\"))}}}},{\\\"../../lib\\\":696,\\\"../array_container_defaults\\\":741,\\\"./layout_attributes\\\":758}],766:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\");e.exports=function(t,e,r,a){var o=n.coerce2(t,e,i,\\\"ticklen\\\"),s=n.coerce2(t,e,i,\\\"tickwidth\\\"),l=n.coerce2(t,e,i,\\\"tickcolor\\\",e.color);r(\\\"ticks\\\",a.outerTicks||o||s||l?\\\"outside\\\":\\\"\\\")||(delete e.ticklen,delete e.tickwidth,delete e.tickcolor)}},{\\\"../../lib\\\":696,\\\"./layout_attributes\\\":758}],767:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./clean_ticks\\\");e.exports=function(t,e,r,i){var a;\\\"array\\\"!==t.tickmode||\\\"log\\\"!==i&&\\\"date\\\"!==i?a=r(\\\"tickmode\\\",Array.isArray(t.tickvals)?\\\"array\\\":t.dtick?\\\"linear\\\":\\\"auto\\\"):a=e.tickmode=\\\"auto\\\";if(\\\"auto\\\"===a)r(\\\"nticks\\\");else if(\\\"linear\\\"===a){var o=e.dtick=n.dtick(t.dtick,i);e.tick0=n.tick0(t.tick0,i,e.calendar,o)}else{void 0===r(\\\"tickvals\\\")?e.tickmode=\\\"auto\\\":r(\\\"ticktext\\\")}}},{\\\"./clean_ticks\\\":750}],768:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"./axes\\\"),s=t(\\\"./constants\\\").attrRegex;e.exports=function(t,e,r,l){var c=t._fullLayout,u=[];var f,h,p,d,g=function(t){var e,r,n,i,a={};for(e in t)if((r=e.split(\\\".\\\"))[0].match(s)){var o=e.charAt(0),l=r[0];if(n=c[l],i={},Array.isArray(t[e])?i.to=t[e].slice(0):Array.isArray(t[e].range)&&(i.to=t[e].range.slice(0)),!i.to)continue;i.axisName=l,i.length=n._length,u.push(o),a[o]=i}return a}(e),v=Object.keys(g),m=function(t,e,r){var n,i,a,o=t._plots,s=[];for(n in o){var l=o[n];if(-1===s.indexOf(l)){var c=l.xaxis._id,u=l.yaxis._id,f=l.xaxis.range,h=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[c]?r[c].to:f,a=r[u]?r[u].to:h,f[0]===i[0]&&f[1]===i[1]&&h[0]===a[0]&&h[1]===a[1]||-1===e.indexOf(c)&&-1===e.indexOf(u)||s.push(l)}}return s}(c,v,g);if(!m.length)return function(){function e(e,r,n){for(var i=0;i<e.length;i++)if(r(t,i),n)return}e(c.annotations||[],i.getComponentMethod(\\\"annotations\\\",\\\"drawOne\\\")),e(c.shapes||[],i.getComponentMethod(\\\"shapes\\\",\\\"drawOne\\\")),e(c.images||[],i.getComponentMethod(\\\"images\\\",\\\"draw\\\"),!0)}(),!1;function y(t){var e=t.xaxis,r=t.yaxis;c._defs.select(\\\"#\\\"+t.clipId+\\\"> rect\\\").call(a.setTranslate,0,0).call(a.setScale,1,1),t.plot.call(a.setTranslate,e._offset,r._offset).call(a.setScale,1,1);var n=t.plot.selectAll(\\\".scatterlayer .trace\\\");n.selectAll(\\\".point\\\").call(a.setPointGroupScale,1,1),n.selectAll(\\\".textpoint\\\").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,t)}function x(e,r){var n,s,l,u=g[e.xaxis._id],f=g[e.yaxis._id],h=[];if(u){s=(n=t._fullLayout[u.axisName])._r,l=u.to,h[0]=(s[0]*(1-r)+r*l[0]-s[0])/(s[1]-s[0])*e.xaxis._length;var p=s[1]-s[0],d=l[1]-l[0];n.range[0]=s[0]*(1-r)+r*l[0],n.range[1]=s[1]*(1-r)+r*l[1],h[2]=e.xaxis._length*(1-r+r*d/p)}else h[0]=0,h[2]=e.xaxis._length;if(f){s=(n=t._fullLayout[f.axisName])._r,l=f.to,h[1]=(s[1]*(1-r)+r*l[1]-s[1])/(s[0]-s[1])*e.yaxis._length;var v=s[1]-s[0],m=l[1]-l[0];n.range[0]=s[0]*(1-r)+r*l[0],n.range[1]=s[1]*(1-r)+r*l[1],h[3]=e.yaxis._length*(1-r+r*m/v)}else h[1]=0,h[3]=e.yaxis._length;!function(e,r){var n,a=[];for(a=[e._id,r._id],n=0;n<a.length;n++)o.doTicksSingle(t,a[n],!0);function s(e,r,i){for(n=0;n<e.length;n++){var o=e[n];if(-1===a.indexOf(o.xref)&&-1===a.indexOf(o.yref)||r(t,n),i)return}}s(c.annotations||[],i.getComponentMethod(\\\"annotations\\\",\\\"drawOne\\\")),s(c.shapes||[],i.getComponentMethod(\\\"shapes\\\",\\\"drawOne\\\")),s(c.images||[],i.getComponentMethod(\\\"images\\\",\\\"draw\\\"),!0)}(e.xaxis,e.yaxis);var y=e.xaxis,x=e.yaxis,b=!!u,_=!!f,w=b?y._length/h[2]:1,k=_?x._length/h[3]:1,M=b?h[0]:0,A=_?h[1]:0,T=b?h[0]/h[2]*y._length:0,S=_?h[1]/h[3]*x._length:0,C=y._offset-T,E=x._offset-S;e.clipRect.call(a.setTranslate,M,A).call(a.setScale,1/w,1/k),e.plot.call(a.setTranslate,C,E).call(a.setScale,w,k),a.setPointGroupScale(e.zoomScalePts,1/w,1/k),a.setTextPointsScale(e.zoomScaleTxt,1/w,1/k)}l&&(f=l());var b=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(d),d=null,function(){for(var e={},r=0;r<v.length;r++){var n=t._fullLayout[v[r]+\\\"axis\\\"];e[n._name+\\\".range[0]\\\"]=n.range[0],e[n._name+\\\".range[1]\\\"]=n.range[1],n.range=n._r.slice()}return i.call(\\\"relayout\\\",t,e).then(function(){for(var t=0;t<m.length;t++)y(m[t])})}()}),h=Date.now(),d=window.requestAnimationFrame(function e(){p=Date.now();for(var n=Math.min(1,(p-h)/r.duration),a=b(n),o=0;o<m.length;o++)x(m[o],a);p-h>r.duration?(function(){for(var e={},r=0;r<v.length;r++){var n=t._fullLayout[g[v[r]].axisName],a=g[v[r]].to;e[n._name+\\\".range[0]\\\"]=a[0],e[n._name+\\\".range[1]\\\"]=a[1],n.range=a.slice()}f&&f(),i.call(\\\"relayout\\\",t,e).then(function(){for(var t=0;t<m.length;t++)y(m[t])})}(),d=window.cancelAnimationFrame(e)):d=window.requestAnimationFrame(e)}),Promise.resolve()}},{\\\"../../components/drawing\\\":595,\\\"../../registry\\\":828,\\\"./axes\\\":745,\\\"./constants\\\":751,d3:148}],769:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"./axis_autotype\\\");function a(t){return{v:\\\"x\\\",h:\\\"y\\\"}[t.orientation||\\\"v\\\"]}function o(t,e){var r=a(t),i=n.traceIs(t,\\\"box-violin\\\"),o=n.traceIs(t._fullInput||{},\\\"candlestick\\\");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+\\\"0\\\"]}e.exports=function(t,e,r,s){\\\"-\\\"===r(\\\"type\\\",(s.splomStash||{}).type)&&(!function(t,e){if(\\\"-\\\"!==t.type)return;var r=t._id,s=r.charAt(0);-1!==r.indexOf(\\\"scene\\\")&&(r=s);var l=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(\\\"splom\\\"===i.type&&i._length>0&&(i[\\\"_\\\"+r+\\\"axes\\\"]||{})[e])return i;if((i[r+\\\"axis\\\"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+\\\"0\\\"])return i}}}(e,r,s);if(!l)return;if(\\\"histogram\\\"===l.type&&s==={v:\\\"y\\\",h:\\\"x\\\"}[l.orientation||\\\"v\\\"])return void(t.type=\\\"linear\\\");var c,u=s+\\\"calendar\\\",f=l[u];if(o(l,s)){var h=a(l),p=[];for(c=0;c<e.length;c++){var d=e[c];n.traceIs(d,\\\"box-violin\\\")&&(d[s+\\\"axis\\\"]||s)===r&&(void 0!==d[h]?p.push(d[h][0]):void 0!==d.name?p.push(d.name):p.push(\\\"text\\\"),d[u]!==f&&(f=void 0))}t.type=i(p,f)}else if(\\\"splom\\\"===l.type){var g=l.dimensions,v=l._diag;for(c=0;c<g.length;c++){var m=g[c];if(m.visible&&(v[c][0]===r||v[c][1]===r)){t.type=i(m.values,f);break}}}else t.type=i(l[s]||[l[s+\\\"0\\\"]],f)}(e,s.data),\\\"-\\\"===e.type?e.type=\\\"linear\\\":t.type=e.type)}},{\\\"../../registry\\\":828,\\\"./axis_autotype\\\":746}],770:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\"),i=t(\\\"../lib\\\");function a(t,e,r){var n,a,o,s=!1;if(\\\"data\\\"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if(\\\"layout\\\"!==e.type)return!1;n=t._fullLayout}return a=i.nestedProperty(n,e.prop).get(),(o=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&o[e.prop]!==a&&(s=!0),o[e.prop]=a,{changed:s,value:a}}function o(t,e){var r=[],n=e[0],a={};if(\\\"string\\\"==typeof n)a[n]=e[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,function(t,e,n){r.push({type:\\\"layout\\\",prop:t,value:n})},\\\"\\\",0),r}function s(t,e){var r,n,a,o,s=[];if(n=e[0],a=e[1],r=e[2],o={},\\\"string\\\"==typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&&(r=a)}return void 0===r&&(r=null),l(o,function(e,n,i){var a;if(Array.isArray(i)){var o=Math.min(i.length,t.data.length);r&&(o=Math.min(o,r.length)),a=[];for(var l=0;l<o;l++)a[l]=r?r[l]:l}else a=r?r.slice(0):null;if(null===a)Array.isArray(i)&&(i=i[0]);else if(Array.isArray(a)){if(!Array.isArray(i)){var c=i;i=[];for(var u=0;u<a.length;u++)i[u]=c}i.length=Math.min(a.length,i.length)}s.push({type:\\\"data\\\",prop:e,traces:a,value:i})},\\\"\\\",0),s}function l(t,e,r,n){Object.keys(t).forEach(function(a){var o=t[a];if(\\\"_\\\"!==a[0]){var s=r+(n>0?\\\".\\\":\\\"\\\")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}})}r.manageCommandObserver=function(t,e,n,o){var s={},l=!0;e&&e._commandObserver&&(s=e._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=r.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(e&&e._commandObserver){if(c)return s;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,s}if(c){a(t,c,s.cache),s.check=function(){if(l){var e=a(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=[\\\"plotly_relayout\\\",\\\"plotly_redraw\\\",\\\"plotly_restyle\\\",\\\"plotly_update\\\",\\\"plotly_animatingframe\\\",\\\"plotly_afterplot\\\"],f=0;f<u.length;f++)t._internalOn(u[f],s.check);s.remove=function(){for(var e=0;e<u.length;e++)t._removeInternalListener(u[e],s.check)}}else i.log(\\\"Unable to automatically bind plot updates to API command\\\"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},e&&(e._commandObserver=s),s},r.hasSimpleAPICommandBindings=function(t,e,n){var i,a,o=e.length;for(i=0;i<o;i++){var s,l=e[i],c=l.method,u=l.args;if(Array.isArray(u)||(u=[]),!c)return!1;var f=r.computeAPICommandBindings(t,c,u);if(1!==f.length)return!1;if(a){if((s=f[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var h=0;h<a.traces.length;h++)if(a.traces[h]!==s.traces[h])return!1}else if(s.prop!==a.prop)return!1}else a=f[0],Array.isArray(a.traces)&&a.traces.sort();var p=(s=f[0]).value;if(Array.isArray(p)){if(1!==p.length)return!1;p=p[0]}n&&(n[p]=i)}return a},r.executeAPICommand=function(t,e,r){if(\\\"skip\\\"===e)return Promise.resolve();var a=n.apiMethodRegistry[e],o=[t];Array.isArray(r)||(r=[]);for(var s=0;s<r.length;s++)o.push(r[s]);return a.apply(null,o).catch(function(t){return i.warn(\\\"API call to Plotly.\\\"+e+\\\" rejected.\\\",t),Promise.reject(t)})},r.computeAPICommandBindings=function(t,e,r){var n;switch(Array.isArray(r)||(r=[]),e){case\\\"restyle\\\":n=s(t,r);break;case\\\"relayout\\\":n=o(t,r);break;case\\\"update\\\":n=s(t,[r[0],r[2]]).concat(o(t,[r[1]]));break;case\\\"animate\\\":n=function(t,e){return Array.isArray(e[0])&&1===e[0].length&&-1!==[\\\"string\\\",\\\"number\\\"].indexOf(typeof e[0][0])?[{type:\\\"layout\\\",prop:\\\"_currentFrame\\\",value:e[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},{\\\"../lib\\\":696,\\\"../registry\\\":828}],771:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib/extend\\\").extendFlat;r.attributes=function(t,e){e=e||{};var r={valType:\\\"info_array\\\",editType:(t=t||{}).editType,items:[{valType:\\\"number\\\",min:0,max:1,editType:t.editType},{valType:\\\"number\\\",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=(t.name&&t.name,t.trace,e.description&&e.description,{x:n({},r,{}),y:n({},r,{}),editType:t.editType});return t.noGridCell||(i.row={valType:\\\"integer\\\",min:0,dflt:0,editType:t.editType},i.column={valType:\\\"integer\\\",min:0,dflt:0,editType:t.editType}),i},r.defaults=function(t,e,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=e.grid;if(o){var s=r(\\\"domain.column\\\");void 0!==s&&(s<o.columns?i=o._domains.x[s]:delete t.domain.column);var l=r(\\\"domain.row\\\");void 0!==l&&(l<o.rows?a=o._domains.y[l]:delete t.domain.row)}r(\\\"domain.x\\\",i),r(\\\"domain.y\\\",a)}},{\\\"../lib/extend\\\":685}],772:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.editType,r=t.colorEditType;void 0===r&&(r=e);var n={family:{valType:\\\"string\\\",noBlank:!0,strict:!0,editType:e},size:{valType:\\\"number\\\",min:1,editType:e},color:{valType:\\\"color\\\",editType:r},editType:e};return t.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},{}],773:[function(t,e,r){\\\"use strict\\\";e.exports={_isLinkedToArray:\\\"frames_entry\\\",group:{valType:\\\"string\\\"},name:{valType:\\\"string\\\"},traces:{valType:\\\"any\\\"},baseframe:{valType:\\\"string\\\"},data:{valType:\\\"any\\\"},layout:{valType:\\\"any\\\"}}},{}],774:[function(t,e,r){\\\"use strict\\\";r.projNames={equirectangular:\\\"equirectangular\\\",mercator:\\\"mercator\\\",orthographic:\\\"orthographic\\\",\\\"natural earth\\\":\\\"naturalEarth\\\",kavrayskiy7:\\\"kavrayskiy7\\\",miller:\\\"miller\\\",robinson:\\\"robinson\\\",eckert4:\\\"eckert4\\\",\\\"azimuthal equal area\\\":\\\"azimuthalEqualArea\\\",\\\"azimuthal equidistant\\\":\\\"azimuthalEquidistant\\\",\\\"conic equal area\\\":\\\"conicEqualArea\\\",\\\"conic conformal\\\":\\\"conicConformal\\\",\\\"conic equidistant\\\":\\\"conicEquidistant\\\",gnomonic:\\\"gnomonic\\\",stereographic:\\\"stereographic\\\",mollweide:\\\"mollweide\\\",hammer:\\\"hammer\\\",\\\"transverse mercator\\\":\\\"transverseMercator\\\",\\\"albers usa\\\":\\\"albersUsa\\\",\\\"winkel tripel\\\":\\\"winkel3\\\",aitoff:\\\"aitoff\\\",sinusoidal:\\\"sinusoidal\\\"},r.axesNames=[\\\"lonaxis\\\",\\\"lataxis\\\"],r.lonaxisSpan={orthographic:180,\\\"azimuthal equal area\\\":360,\\\"azimuthal equidistant\\\":360,\\\"conic conformal\\\":180,gnomonic:160,stereographic:180,\\\"transverse mercator\\\":180,\\\"*\\\":360},r.lataxisSpan={\\\"conic conformal\\\":150,stereographic:179.5,\\\"*\\\":180},r.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:\\\"equirectangular\\\",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:\\\"albers usa\\\"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:\\\"conic conformal\\\",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:\\\"mercator\\\",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:\\\"mercator\\\",projRotate:[0,0,0]},\\\"north america\\\":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:\\\"conic conformal\\\",projRotate:[-100,0,0],projParallels:[29.5,45.5]},\\\"south america\\\":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:\\\"mercator\\\",projRotate:[0,0,0]}},r.clipPad=.001,r.precision=.1,r.landColor=\\\"#F0DC82\\\",r.waterColor=\\\"#3399FF\\\",r.locationmodeToLayer={\\\"ISO-3\\\":\\\"countries\\\",\\\"USA-states\\\":\\\"subunits\\\",\\\"country names\\\":\\\"countries\\\"},r.sphereSVG={type:\\\"Sphere\\\"},r.fillLayers={ocean:1,land:1,lakes:1},r.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},r.layers=[\\\"bg\\\",\\\"ocean\\\",\\\"land\\\",\\\"lakes\\\",\\\"subunits\\\",\\\"countries\\\",\\\"coastlines\\\",\\\"rivers\\\",\\\"lataxis\\\",\\\"lonaxis\\\",\\\"frame\\\",\\\"backplot\\\",\\\"frontplot\\\"],r.layersForChoropleth=[\\\"bg\\\",\\\"ocean\\\",\\\"land\\\",\\\"subunits\\\",\\\"countries\\\",\\\"coastlines\\\",\\\"lataxis\\\",\\\"lonaxis\\\",\\\"frame\\\",\\\"backplot\\\",\\\"rivers\\\",\\\"lakes\\\",\\\"frontplot\\\"],r.layerNameToAdjective={ocean:\\\"ocean\\\",land:\\\"land\\\",lakes:\\\"lake\\\",subunits:\\\"subunit\\\",countries:\\\"country\\\",coastlines:\\\"coastline\\\",rivers:\\\"river\\\",frame:\\\"frame\\\"}},{}],775:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"../../components/fx\\\"),c=t(\\\"../plots\\\"),u=t(\\\"../cartesian/axes\\\"),f=t(\\\"../../components/dragelement\\\"),h=t(\\\"../cartesian/select\\\").prepSelect,p=t(\\\"../cartesian/select\\\").selectOnClick,d=t(\\\"./zoom\\\"),g=t(\\\"./constants\\\"),v=t(\\\"../../lib/topojson_utils\\\"),m=t(\\\"topojson-client\\\").feature;function y(t){this.id=t.id,this.graphDiv=t.graphDiv,this.container=t.container,this.topojsonURL=t.topojsonURL,this.isStatic=t.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}t(\\\"./projections\\\")(n);var x=y.prototype;e.exports=function(t){return new y(t)},x.plot=function(t,e,r){var n=this,i=e[this.id],a=v.getTopojsonName(i);null===n.topojson||a!==n.topojsonName?(n.topojsonName=a,void 0===PlotlyGeoAssets.topojson[n.topojsonName]?r.push(n.fetchTopojson().then(function(r){PlotlyGeoAssets.topojson[n.topojsonName]=r,n.topojson=r,n.update(t,e)})):(n.topojson=PlotlyGeoAssets.topojson[n.topojsonName],n.update(t,e))):n.update(t,e)},x.fetchTopojson=function(){var t=v.getTopojsonPath(this.topojsonURL,this.topojsonName);return new Promise(function(e,r){n.json(t,function(n,i){if(n)return 404===n.status?r(new Error([\\\"plotly.js could not find topojson file at\\\",t,\\\".\\\",\\\"Make sure the *topojsonURL* plot config option\\\",\\\"is set properly.\\\"].join(\\\" \\\"))):r(new Error([\\\"unexpected error while fetching topojson file at\\\",t].join(\\\" \\\")));e(i)})})},x.update=function(t,e){var r=e[this.id];if(!this.updateProjection(e,r)){this.hasChoropleth=!1;for(var n=0;n<t.length;n++)if(\\\"choropleth\\\"===t[n][0].trace.type){this.hasChoropleth=!0;break}this.viewInitial||this.saveViewInitial(r),this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),c.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var i=this.layers.frontplot.select(\\\".scatterlayer\\\");this.dataPoints.point=i.selectAll(\\\".point\\\"),this.dataPoints.text=i.selectAll(\\\"text\\\"),this.dataPaths.line=i.selectAll(\\\".js-line\\\");var a=this.layers.backplot.select(\\\".choroplethlayer\\\");this.dataPaths.choropleth=a.selectAll(\\\"path\\\"),this.render()}},x.updateProjection=function(t,e){var r=t._size,o=e.domain,s=e.projection,l=s.rotation||{},c=e.center||{},u=this.projection=function(t){for(var e=t.projection.type,r=n.geo[g.projNames[e]](),i=t._isClipped?g.lonaxisSpan[e]/2:null,a=[\\\"center\\\",\\\"rotate\\\",\\\"parallels\\\",\\\"clipExtent\\\"],o=function(t){return t?r:[]},s=0;s<a.length;s++){var l=a[s];\\\"function\\\"!=typeof r[l]&&(r[l]=o)}r.isLonLatOverEdges=function(t){if(null===r(t))return!0;if(i){var e=r.rotate();return n.geo.distance(t,[-e[0],-e[1]])>i*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),a&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return a&&r.clipExtent(a),r.scale(150*s).translate([l,c])},r.precision(g.precision),i&&r.clipAngle(i-g.clipPad);return r}(e);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var f=[[r.l+r.w*o.x[0],r.t+r.h*(1-o.y[1])],[r.l+r.w*o.x[1],r.t+r.h*(1-o.y[0])]],h=e.lonaxis,p=e.lataxis,d=function(t,e){var r=g.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:\\\"Polygon\\\",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}(h.range,p.range);u.fitExtent(f,d);var v=this.bounds=u.getBounds(d),m=this.fitScale=u.scale(),y=u.translate();if(!isFinite(v[0][0])||!isFinite(v[0][1])||!isFinite(v[1][0])||!isFinite(v[1][1])||isNaN(y[0])||isNaN(y[0])){for(var x=this.graphDiv,b=[\\\"projection.rotation\\\",\\\"center\\\",\\\"lonaxis.range\\\",\\\"lataxis.range\\\"],_=\\\"Invalid geo settings, relayout'ing to default view.\\\",w={},k=0;k<b.length;k++)w[this.id+\\\".\\\"+b[k]]=null;return this.viewInitial=null,a.warn(_),x._promises.push(i.call(\\\"relayout\\\",x,w)),_}var M=this.midPt=[(v[0][0]+v[1][0])/2,(v[0][1]+v[1][1])/2];if(u.scale(s.scale*m).translate([y[0]+(M[0]-y[0]),y[1]+(M[1]-y[1])]).clipExtent(v),e._isAlbersUsa){var A=u([c.lon,c.lat]),T=u.translate();u.translate([T[0]-(A[0]-T[0]),T[1]-(A[1]-T[1])])}},x.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,l=r.basePaths;function c(t){return\\\"lonaxis\\\"===t||\\\"lataxis\\\"===t}function u(t){return Boolean(g.lineLayers[t])}function f(t){return Boolean(g.fillLayers[t])}var h=(this.hasChoropleth?g.layersForChoropleth:g.layers).filter(function(t){return u(t)||f(t)?e[\\\"show\\\"+t]:!c(t)||e[t].showgrid}),p=r.framework.selectAll(\\\".layer\\\").data(h,String);p.exit().each(function(t){delete a[t],delete l[t],n.select(this).remove()}),p.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"layer \\\"+t}).each(function(t){var e=a[t]=n.select(this);\\\"bg\\\"===t?r.bgRect=e.append(\\\"rect\\\").style(\\\"pointer-events\\\",\\\"all\\\"):c(t)?l[t]=e.append(\\\"path\\\").style(\\\"fill\\\",\\\"none\\\"):\\\"backplot\\\"===t?e.append(\\\"g\\\").classed(\\\"choroplethlayer\\\",!0):\\\"frontplot\\\"===t?e.append(\\\"g\\\").classed(\\\"scatterlayer\\\",!0):u(t)?l[t]=e.append(\\\"path\\\").style(\\\"fill\\\",\\\"none\\\").style(\\\"stroke-miterlimit\\\",2):f(t)&&(l[t]=e.append(\\\"path\\\").style(\\\"stroke\\\",\\\"none\\\"))}),p.order(),p.each(function(t){var r=l[t],a=g.layerNameToAdjective[t];\\\"frame\\\"===t?r.datum(g.sphereSVG):u(t)||f(t)?r.datum(m(i,i.objects[t])):c(t)&&r.datum(function(t,e){var r=e[t].dtick,i=g.scopeDefaults[e.scope],a=i.lonaxisRange,o=i.lataxisRange,s=\\\"lonaxis\\\"===t?[r]:[0,r];return n.geo.graticule().extent([[a[0],o[0]],[a[1],o[1]]]).step(s)}(t,e)).call(o.stroke,e[t].gridcolor).call(s.dashLine,\\\"\\\",e[t].gridwidth),u(t)?r.call(o.stroke,e[a+\\\"color\\\"]).call(s.dashLine,\\\"\\\",e[a+\\\"width\\\"]):f(t)&&r.call(o.fill,e[a+\\\"color\\\"])})},x.updateDims=function(t,e){var r=this.bounds,n=(e.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,l=r[1][0]-i+n,c=r[1][1]-a+n;s.setRect(this.clipRect,i,a,l,c),this.bgRect.call(s.setRect,i,a,l,c).call(o.fill,e.bgcolor),this.xaxis._offset=i,this.xaxis._length=l,this.yaxis._offset=a,this.yaxis._length=c},x.updateFx=function(t,e){var r=this,a=r.graphDiv,o=r.bgRect,s=t.dragmode,c=t.clickmode;if(!r.isStatic){var u;\\\"select\\\"===s?u=function(t,e){(t.range={})[r.id]=[v([e.xmin,e.ymin]),v([e.xmax,e.ymax])]}:\\\"lasso\\\"===s&&(u=function(t,e,n){(t.lassoPoints={})[r.id]=n.filtered.map(v)});var g={element:r.bgRect.node(),gd:a,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(e){2===e&&t._zoomlayer.selectAll(\\\".select-outline\\\").remove()}};\\\"pan\\\"===s?(o.node().onmousedown=null,o.call(d(r,e)),o.on(\\\"dblclick.zoom\\\",function(){var t=r.viewInitial,e={};for(var n in t)e[r.id+\\\".\\\"+n]=t[n];i.call(\\\"relayout\\\",a,e),a.emit(\\\"plotly_doubleclick\\\",null)})):\\\"select\\\"!==s&&\\\"lasso\\\"!==s||(o.on(\\\".zoom\\\",null),g.prepFn=function(t,e,r){h(t,e,r,g,s)},f.init(g)),o.on(\\\"mousemove\\\",function(){var t=r.projection.invert(n.mouse(this));if(!t||isNaN(t[0])||isNaN(t[1]))return f.unhover(a,n.event);r.xaxis.p2c=function(){return t[0]},r.yaxis.p2c=function(){return t[1]},l.hover(a,n.event,r.id)}),o.on(\\\"mouseout\\\",function(){a._dragging||f.unhover(a,n.event)}),o.on(\\\"click\\\",function(){\\\"select\\\"!==s&&\\\"lasso\\\"!==s&&(c.indexOf(\\\"select\\\")>-1&&p(n.event,a,[r.xaxis],[r.yaxis],r.id,g),c.indexOf(\\\"event\\\")>-1&&l.click(a,n.event))})}function v(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},x.makeFramework=function(){var t=this,e=t.graphDiv._fullLayout,r=\\\"clip\\\"+e._uid+t.id;t.clipDef=e._clips.append(\\\"clipPath\\\").attr(\\\"id\\\",r),t.clipRect=t.clipDef.append(\\\"rect\\\"),t.framework=n.select(t.container).append(\\\"g\\\").attr(\\\"class\\\",\\\"geo \\\"+t.id).call(s.setClipUrl,r),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:\\\"x\\\",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:\\\"y\\\",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:\\\"linear\\\",showexponent:\\\"all\\\",exponentformat:\\\"B\\\"},u.setConvert(t.mockAxis,e)},x.saveViewInitial=function(t){var e=t.center||{},r=t.projection,n=r.rotation||{};t._isScoped?this.viewInitial={\\\"center.lon\\\":e.lon,\\\"center.lat\\\":e.lat,\\\"projection.scale\\\":r.scale}:t._isClipped?this.viewInitial={\\\"projection.scale\\\":r.scale,\\\"projection.rotation.lon\\\":n.lon,\\\"projection.rotation.lat\\\":n.lat}:this.viewInitial={\\\"center.lon\\\":e.lon,\\\"center.lat\\\":e.lat,\\\"projection.scale\\\":r.scale,\\\"projection.rotation.lon\\\":n.lon}},x.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?\\\"translate(\\\"+r[0]+\\\",\\\"+r[1]+\\\")\\\":null}function i(t){return e.isLonLatOverEdges(t.lonlat)?\\\"none\\\":null}for(t in this.basePaths)this.basePaths[t].attr(\\\"d\\\",r);for(t in this.dataPaths)this.dataPaths[t].attr(\\\"d\\\",function(t){return r(t.geojson)});for(t in this.dataPoints)this.dataPoints[t].attr(\\\"display\\\",i).attr(\\\"transform\\\",n)}},{\\\"../../components/color\\\":570,\\\"../../components/dragelement\\\":592,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../lib/topojson_utils\\\":724,\\\"../../registry\\\":828,\\\"../cartesian/axes\\\":745,\\\"../cartesian/select\\\":763,\\\"../plots\\\":809,\\\"./constants\\\":774,\\\"./projections\\\":780,\\\"./zoom\\\":781,d3:148,\\\"topojson-client\\\":517}],776:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./geo\\\"),i=t(\\\"../../plots/get_data\\\").getSubplotCalcData,a=t(\\\"../../lib\\\").counterRegex,o=\\\"geo\\\";r.name=o,r.attr=o,r.idRoot=o,r.idRegex=r.attrRegex=a(o),r.attributes=t(\\\"./layout/attributes\\\"),r.layoutAttributes=t(\\\"./layout/layout_attributes\\\"),r.supplyLayoutDefaults=t(\\\"./layout/defaults\\\"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots.geo;void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var s=0;s<a.length;s++){var l=a[s],c=i(r,o,l),u=e[l]._subplot;u||(u=n({id:l,graphDiv:t,container:e._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),e[l]._subplot=u),u.plot(c,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.geo||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.framework.remove(),s.clipDef.remove())}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.geo,n=0;n<r.length;n++){var i=e[r[n]];i._subplot.updateFx(e,i)}}},{\\\"../../lib\\\":696,\\\"../../plots/get_data\\\":782,\\\"./geo\\\":775,\\\"./layout/attributes\\\":777,\\\"./layout/defaults\\\":778,\\\"./layout/layout_attributes\\\":779}],777:[function(t,e,r){\\\"use strict\\\";e.exports={geo:{valType:\\\"subplotid\\\",dflt:\\\"geo\\\",editType:\\\"calc\\\"}}},{}],778:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../subplot_defaults\\\"),i=t(\\\"../constants\\\"),a=t(\\\"./layout_attributes\\\"),o=i.axesNames;function s(t,e,r){var n=r(\\\"resolution\\\"),a=r(\\\"scope\\\"),s=i.scopeDefaults[a],l=r(\\\"projection.type\\\",s.projType),c=e._isAlbersUsa=\\\"albers usa\\\"===l;c&&(a=e.scope=\\\"usa\\\");var u=e._isScoped=\\\"world\\\"!==a,f=e._isConic=-1!==l.indexOf(\\\"conic\\\");e._isClipped=!!i.lonaxisSpan[l];for(var h=0;h<o.length;h++){var p,d=o[h],g=[30,10][h];if(u)p=s[d+\\\"Range\\\"];else{var v=i[d+\\\"Span\\\"],m=(v[l]||v[\\\"*\\\"])/2,y=r(\\\"projection.rotation.\\\"+d.substr(0,3),s.projRotate[h]);p=[y-m,y+m]}var x=r(d+\\\".range\\\",p);r(d+\\\".tick0\\\",x[0]),r(d+\\\".dtick\\\",g),r(d+\\\".showgrid\\\")&&(r(d+\\\".gridcolor\\\"),r(d+\\\".gridwidth\\\"))}var b=e.lonaxis.range,_=e.lataxis.range,w=b[0],k=b[1];w>0&&k<0&&(k+=360);var M,A,T,S=(w+k)/2;if(!c){var C=u?s.projRotate:[S,0,0];M=r(\\\"projection.rotation.lon\\\",C[0]),r(\\\"projection.rotation.lat\\\",C[1]),r(\\\"projection.rotation.roll\\\",C[2]),r(\\\"showcoastlines\\\",!u)&&(r(\\\"coastlinecolor\\\"),r(\\\"coastlinewidth\\\")),r(\\\"showocean\\\")&&r(\\\"oceancolor\\\")}(c?(A=-96.6,T=38.7):(A=u?S:M,T=(_[0]+_[1])/2),r(\\\"center.lon\\\",A),r(\\\"center.lat\\\",T),f)&&r(\\\"projection.parallels\\\",s.projParallels||[0,60]);r(\\\"projection.scale\\\"),r(\\\"showland\\\")&&r(\\\"landcolor\\\"),r(\\\"showlakes\\\")&&r(\\\"lakecolor\\\"),r(\\\"showrivers\\\")&&(r(\\\"rivercolor\\\"),r(\\\"riverwidth\\\")),r(\\\"showcountries\\\",u&&\\\"usa\\\"!==a)&&(r(\\\"countrycolor\\\"),r(\\\"countrywidth\\\")),(\\\"usa\\\"===a||\\\"north america\\\"===a&&50===n)&&(r(\\\"showsubunits\\\",!0),r(\\\"subunitcolor\\\"),r(\\\"subunitwidth\\\")),u||r(\\\"showframe\\\",!0)&&(r(\\\"framecolor\\\"),r(\\\"framewidth\\\")),r(\\\"bgcolor\\\")}e.exports=function(t,e,r){n(t,e,r,{type:\\\"geo\\\",attributes:a,handleDefaults:s,partition:\\\"y\\\"})}},{\\\"../../subplot_defaults\\\":823,\\\"../constants\\\":774,\\\"./layout_attributes\\\":779}],779:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../components/color/attributes\\\"),i=t(\\\"../../domain\\\").attributes,a=t(\\\"../constants\\\"),o=t(\\\"../../../plot_api/edit_types\\\").overrideAll,s={range:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\"},{valType:\\\"number\\\"}]},showgrid:{valType:\\\"boolean\\\",dflt:!1},tick0:{valType:\\\"number\\\"},dtick:{valType:\\\"number\\\"},gridcolor:{valType:\\\"color\\\",dflt:n.lightLine},gridwidth:{valType:\\\"number\\\",min:0,dflt:1}};e.exports=o({domain:i({name:\\\"geo\\\"},{}),resolution:{valType:\\\"enumerated\\\",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:\\\"enumerated\\\",values:Object.keys(a.scopeDefaults),dflt:\\\"world\\\"},projection:{type:{valType:\\\"enumerated\\\",values:Object.keys(a.projNames)},rotation:{lon:{valType:\\\"number\\\"},lat:{valType:\\\"number\\\"},roll:{valType:\\\"number\\\"}},parallels:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\"},{valType:\\\"number\\\"}]},scale:{valType:\\\"number\\\",min:0,dflt:1}},center:{lon:{valType:\\\"number\\\"},lat:{valType:\\\"number\\\"}},showcoastlines:{valType:\\\"boolean\\\"},coastlinecolor:{valType:\\\"color\\\",dflt:n.defaultLine},coastlinewidth:{valType:\\\"number\\\",min:0,dflt:1},showland:{valType:\\\"boolean\\\",dflt:!1},landcolor:{valType:\\\"color\\\",dflt:a.landColor},showocean:{valType:\\\"boolean\\\",dflt:!1},oceancolor:{valType:\\\"color\\\",dflt:a.waterColor},showlakes:{valType:\\\"boolean\\\",dflt:!1},lakecolor:{valType:\\\"color\\\",dflt:a.waterColor},showrivers:{valType:\\\"boolean\\\",dflt:!1},rivercolor:{valType:\\\"color\\\",dflt:a.waterColor},riverwidth:{valType:\\\"number\\\",min:0,dflt:1},showcountries:{valType:\\\"boolean\\\"},countrycolor:{valType:\\\"color\\\",dflt:n.defaultLine},countrywidth:{valType:\\\"number\\\",min:0,dflt:1},showsubunits:{valType:\\\"boolean\\\"},subunitcolor:{valType:\\\"color\\\",dflt:n.defaultLine},subunitwidth:{valType:\\\"number\\\",min:0,dflt:1},showframe:{valType:\\\"boolean\\\"},framecolor:{valType:\\\"color\\\",dflt:n.defaultLine},framewidth:{valType:\\\"number\\\",min:0,dflt:1},bgcolor:{valType:\\\"color\\\",dflt:n.background},lonaxis:s,lataxis:s},\\\"plot\\\",\\\"from-root\\\")},{\\\"../../../components/color/attributes\\\":569,\\\"../../../plot_api/edit_types\\\":728,\\\"../../domain\\\":771,\\\"../constants\\\":774}],780:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){function e(t,e){return{type:\\\"Feature\\\",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if(\\\"GeometryCollection\\\"===e.type)return{type:\\\"GeometryCollection\\\",geometries:object.geometries.map(function(t){return r(t,n)})};if(!c.hasOwnProperty(e.type))return null;var i=c[e.type];return t.geo.stream(e,n(i)),i.result()}t.geo.project=function(t,e){var i=e.stream;if(!i)throw new Error(\\\"not yet supported\\\");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,i)};var n={Feature:e,FeatureCollection:function(t,r){return{type:\\\"FeatureCollection\\\",features:t.features.map(function(t){return e(t,r)})}}},i=[],a=[],o={point:function(t,e){i.push([t,e])},result:function(){var t=i.length?i.length<2?{type:\\\"Point\\\",coordinates:i[0]}:{type:\\\"MultiPoint\\\",coordinates:i}:null;return i=[],t}},s={lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){i.length&&(a.push(i),i=[])},result:function(){var t=a.length?a.length<2?{type:\\\"LineString\\\",coordinates:a[0]}:{type:\\\"MultiLineString\\\",coordinates:a}:null;return a=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){var t=i.length;if(t){do{i.push(i[0].slice())}while(++t<4);a.push(i),i=[]}},polygonEnd:u,result:function(){if(!a.length)return null;var t=[],e=[];return a.forEach(function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++r<e;)n+=t[r-1][1]*t[r][0]-t[r-1][0]*t[r][1];return n<=0}(r)?e.push(r):t.push([r])}),e.forEach(function(e){var r=e[0];t.some(function(t){if(function(t,e){for(var r=e[0],n=e[1],i=!1,a=0,o=t.length,s=o-1;a<o;s=a++){var l=t[a],c=l[0],u=l[1],f=t[s],h=f[0],p=f[1];u>n^p>n&&r<(h-c)*(n-u)/(p-u)+c&&(i=!i)}return i}(t[0],r))return t.push(e),!0})||t.push([e])}),a=[],t.length?t.length>1?{type:\\\"MultiPolygon\\\",coordinates:t}:{type:\\\"Polygon\\\",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var f=1e-6,h=f*f,p=Math.PI,d=p/2,g=(Math.sqrt(p),p/180),v=180/p;function m(t){return t>1?d:t<-1?-d:Math.asin(t)}function y(t){return t>1?0:t<-1?p:Math.acos(t)}var x=t.geo.projection,b=t.geo.projectionMutator;function _(t,e){var r=(2+d)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>f;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(p*(4+p))*t*(1+Math.cos(e)),2*Math.sqrt(p/(4+p))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-p,0],[0,d],[p,0]]],[[[-p,0],[0,-d],[p,0]]]];function i(t,r){for(var i=r<0?-1:1,a=n[+(r<0)],o=0,s=a.length-1;o<s&&t>a[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}e.invert&&(i.invert=function(t,a){for(var o=r[+(a<0)],s=n[+(a<0)],c=0,u=o.length;c<u;++c){var f=o[c];if(f[0][0]<=t&&t<f[1][0]&&f[0][1]<=a&&a<f[1][1]){var h=e.invert(t-e(s[c][1][0],0)[0],a);return h[0]+=s[c][1][0],l(i(h[0],h[1]),[t,a])?h:null}}});var a=t.geo.projection(i),o=a.stream;function s(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++a<o;){n=((r=t[a])[0]-s[0])/e,i=(r[1]-s[1])/e;for(var c=0;c<e;++c)l.push([s[0]+c*n,s[1]+c*i]);s=r}return l.push(r),l}function l(t,e){return Math.abs(t[0]-e[0])<f&&Math.abs(t[1]-e[1])<f}return a.stream=function(e){var r=a.rotate(),i=o(e),l=(a.rotate([0,0]),o(e));return a.rotate(r),i.sphere=function(){t.geo.stream(function(){for(var e=1e-6,r=[],i=0,a=n[0].length;i<a;++i){var o=n[0][i],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,f=180*o[2][0]/p,h=180*o[2][1]/p;r.push(s([[l+e,c+e],[l+e,u-e],[f-e,u-e],[f-e,h+e]],30))}for(var i=n[1].length-1;i>=0;--i){var o=n[1][i],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,f=180*o[2][0]/p,h=180*o[2][1]/p;r.push(s([[f-e,h-e],[f-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:\\\"Polygon\\\",coordinates:[t.merge(r)]}}(),l)},i},a.lobes=function(t){return arguments.length?(n=t.map(function(t){return t.map(function(t){return[[t[0][0]*p/180,t[0][1]*p/180],[t[1][0]*p/180,t[1][1]*p/180],[t[2][0]*p/180,t[2][1]*p/180]]})}),r=n.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})}),a):n.map(function(t){return t.map(function(t){return[[180*t[0][0]/p,180*t[0][1]/p],[180*t[1][0]/p,180*t[1][1]/p],[180*t[2][0]/p,180*t[2][1]/p]]})})},a},_.invert=function(t,e){var r=.5*e*Math.sqrt((4+p)/p),n=m(r),i=Math.cos(n);return[t/(2/Math.sqrt(p*(4+p))*(1+i)),m((n+r*(i+2))/(2+d))]},(t.geo.eckert4=function(){return x(_)}).raw=_;var w=t.geo.azimuthalEqualArea.raw;function k(t,e){if(arguments.length<2&&(e=t),1===e)return w;if(e===1/0)return M;function r(r,n){var i=w(r/e,n);return i[0]*=t,i}return r.invert=function(r,n){var i=w.invert(r/t,n);return i[0]*=e,i},r}function M(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function A(t,e){return[3*t/(2*p)*Math.sqrt(p*p/3-e*e),e]}function T(t,e){return[t,1.25*Math.log(Math.tan(p/4+.4*e))]}function S(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>f&&--i>0);return e/2}}M.invert=function(t,e){var r=2*m(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=b(k),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=k,A.invert=function(t,e){return[2/3*p*t/Math.sqrt(p*p/3-e*e),e]},(t.geo.kavrayskiy7=function(){return x(A)}).raw=A,T.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*p]},(t.geo.miller=function(){return x(T)}).raw=T,S(p);var C=function(t,e,r){var n=S(r);function i(r,i){return[t*r*Math.cos(i=n(i)),e*Math.sin(i)]}return i.invert=function(n,i){var a=m(i/e);return[n/(t*Math.cos(a)),m((2*a+Math.sin(2*a))/r)]},i}(Math.SQRT2/d,Math.SQRT2,p);function E(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return x(C)}).raw=C,E.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Math.abs(r)>f&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return x(E)}).raw=E;var L=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function z(t,e){var r,n=Math.min(18,36*Math.abs(e)/p),i=Math.floor(n),a=n-i,o=(r=L[i])[0],s=r[1],l=(r=L[++i])[0],c=r[1],u=(r=L[Math.min(19,++i)])[0],f=r[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?d:-d)*(c+a*(f-s)/2+a*a*(f-2*c+s)/2)]}function O(t,e){return[t*Math.cos(e),e]}function I(t,e){var r,n=Math.cos(e),i=(r=y(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*i,Math.sin(e)*i]}function P(t,e){var r=I(t,e);return[(r[0]+t/d)/2,(r[1]+e)/2]}L.forEach(function(t){t[1]*=1.0144}),z.invert=function(t,e){var r=e/d,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],c=l-o,u=l-2*s+o,f=2*(Math.abs(r)-s)/c,p=u/c,m=f*(1-p*f*(1-2*p*f));if(m>=0||1===a){n=(e>=0?5:-5)*(m+i);var y,x=50;do{m=(i=Math.min(18,Math.abs(n)/5))-(a=Math.floor(i)),o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],n-=(y=(e>=0?d:-d)*(s+m*(l-o)/2+m*m*(l-2*s+o)/2)-e)*v}while(Math.abs(y)>h&&--x>0);break}}while(--a>=0);var b=L[a][0],_=L[a+1][0],w=L[Math.min(19,a+2)][0];return[t/(_+m*(w-b)/2+m*m*(w-2*_+b)/2),n*g]},(t.geo.robinson=function(){return x(z)}).raw=z,O.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return x(O)}).raw=O,I.invert=function(t,e){if(!(t*t+4*e*e>p*p+f)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),h=Math.sin(2*n),d=c*c,g=u*u,v=s*s,m=1-g*l*l,x=m?y(u*l)*Math.sqrt(a=1/m):a=0,b=2*x*u*s-t,_=x*c-e,w=a*(g*v+x*u*l*d),k=a*(.5*o*h-2*x*c*s),M=.25*a*(h*s-x*c*g*o),A=a*(d*l+x*v*u),T=k*M-A*w;if(!T)break;var S=(_*k-b*A)/T,C=(b*M-_*w)/T;r-=S,n-=C}while((Math.abs(S)>f||Math.abs(C)>f)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return x(I)}).raw=I,P.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,h=Math.sin(r),p=Math.cos(r/2),g=Math.sin(r/2),v=g*g,m=1-u*p*p,x=m?y(o*p)*Math.sqrt(a=1/m):a=0,b=.5*(2*x*o*g+r/d)-t,_=.5*(x*s+n)-e,w=.5*a*(u*v+x*o*p*c)+.5/d,k=a*(h*l/4-x*s*g),M=.125*a*(l*g-x*s*u*h),A=.5*a*(c*p+x*v*o)+.5,T=k*M-A*w,S=(_*k-b*A)/T,C=(b*M-_*w)/T;r-=S,n-=C}while((Math.abs(S)>f||Math.abs(C)>f)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return x(P)}).raw=P}},{}],781:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=Math.PI/180,o=180/Math.PI,s={cursor:\\\"pointer\\\"},l={cursor:\\\"auto\\\"};function c(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function u(t,e,r){var n=t.id,a=t.graphDiv,o=a.layout[n],s=a._fullLayout[n],l={};function c(t,e){var r=i.nestedProperty(s,t);r.get()!==e&&(r.set(e),i.nestedProperty(o,t).set(e),l[n+\\\".\\\"+t]=e)}r(c),c(\\\"projection.scale\\\",e.scale()/t.fitScale),a.emit(\\\"plotly_relayout\\\",l)}function f(t,e){var r=c(0,e);function i(r){var n=e.invert(t.midPt);r(\\\"center.lon\\\",n[0]),r(\\\"center.lat\\\",n[1])}return r.on(\\\"zoomstart\\\",function(){n.select(this).style(s)}).on(\\\"zoom\\\",function(){e.scale(n.event.scale).translate(n.event.translate),t.render()}).on(\\\"zoomend\\\",function(){n.select(this).style(l),u(t,e,i)}),r}function h(t,e){var r,i,a,o,f,h,p,d,g,v=c(0,e),m=2;function y(t){return e.invert(t)}function x(r){var n=e.rotate(),i=e.invert(t.midPt);r(\\\"projection.rotation.lon\\\",-n[0]),r(\\\"center.lon\\\",i[0]),r(\\\"center.lat\\\",i[1])}return v.on(\\\"zoomstart\\\",function(){n.select(this).style(s),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,f=y(r)}).on(\\\"zoom\\\",function(){if(h=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>m||Math.abs(n[1]-t[1])>m}(r))return v.scale(e.scale()),void v.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),f?y(h)&&(d=y(h),p=[o[0]+(d[0]-f[0]),i[1],i[2]],e.rotate(p),o=p):f=y(r=h),g=!0,t.render()}).on(\\\"zoomend\\\",function(){n.select(this).style(l),g&&u(t,e,x)}),v}function p(t,e){var r,i={r:e.rotate(),k:e.scale()},f=c(0,e),h=function(t){var e=0,r=arguments.length,i=[];for(;++e<r;)i.push(arguments[e]);var a=n.dispatch.apply(null,i);return a.of=function(e,r){return function(i){var o;try{o=i.sourceEvent=n.event,i.target=t,n.event=i,a[i.type].apply(e,r)}finally{n.event=o}}},a}(f,\\\"zoomstart\\\",\\\"zoom\\\",\\\"zoomend\\\"),p=0,v=f.on;function x(t){var r=e.rotate();t(\\\"projection.rotation.lon\\\",-r[0]),t(\\\"projection.rotation.lat\\\",-r[1])}return f.on(\\\"zoomstart\\\",function(){n.select(this).style(s);var t,l,c,u,x,b,_,w,k,M,A,T=n.mouse(this),S=e.rotate(),C=S,E=e.translate(),L=(l=.5*(t=S)[0]*a,c=.5*t[1]*a,u=.5*t[2]*a,x=Math.sin(l),b=Math.cos(l),_=Math.sin(c),w=Math.cos(c),k=Math.sin(u),M=Math.cos(u),[b*w*M+x*_*k,x*w*M-b*_*k,b*_*M+x*w*k,b*w*k-x*_*M]);r=d(e,T),v.call(f,\\\"zoom\\\",function(){var t,a,s,l,c,u,f,p,v,x,b=n.mouse(this);if(e.scale(i.k=n.event.scale),r){if(d(e,b)){e.rotate(S).translate(E);var _=d(e,b),w=function(t,e){if(!t||!e)return;var r=function(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}(t,e),n=Math.sqrt(y(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}(r,_),k=function(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*o,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*o,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*o]}((a=w,s=(t=L)[0],l=t[1],c=t[2],u=t[3],f=a[0],p=a[1],v=a[2],x=a[3],[s*f-l*p-c*v-u*x,s*p+l*f+c*x-u*v,s*v-l*x+c*f+u*p,s*x+l*v-c*p+u*f])),M=i.r=function(t,e,r){var n=m(e,2,t[0]);n=m(n,1,t[1]),n=m(n,0,t[2]-r[2]);var i,a,s=e[0],l=e[1],c=e[2],u=n[0],f=n[1],h=n[2],p=Math.atan2(l,s)*o,d=Math.sqrt(s*s+l*l);Math.abs(f)>d?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*o-p,i=Math.sqrt(d*d-f*f));var v=180-a-2*p,y=(Math.atan2(h,u)-Math.atan2(c,i))*o,x=(Math.atan2(h,u)-Math.atan2(c,-i))*o,b=g(r[0],r[1],a,y),_=g(r[0],r[1],v,x);return b<=_?[a,y,r[2]]:[v,x,r[2]]}(k,r,C);isFinite(M[0])&&isFinite(M[1])&&isFinite(M[2])||(M=C),e.rotate(M),C=M}}else r=d(e,T=b);h.of(this,arguments)({type:\\\"zoom\\\"})}),A=h.of(this,arguments),p++||A({type:\\\"zoomstart\\\"})}).on(\\\"zoomend\\\",function(){var r;n.select(this).style(l),v.call(f,\\\"zoom\\\",null),r=h.of(this,arguments),--p||r({type:\\\"zoomend\\\"}),u(t,e,x)}).on(\\\"zoom.redraw\\\",function(){t.render()}),n.rebind(f,h,\\\"on\\\")}function d(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*a,r=t[1]*a,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function g(t,e,r,n){var i=v(r-t),a=v(n-e);return Math.sqrt(i*i+a*a)}function v(t){return(t%360+540)%360-180}function m(t,e,r){var n=r*a,i=t.slice(),o=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[o]=t[o]*l-t[s]*c,i[s]=t[s]*l+t[o]*c,i}function y(t,e){for(var r=0,n=0,i=t.length;n<i;++n)r+=t[n]*e[n];return r}e.exports=function(t,e){var r=t.projection;return(e._isScoped?f:e._isClipped?p:h)(t,r)}},{\\\"../../lib\\\":696,d3:148}],782:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\"),i=t(\\\"./cartesian/constants\\\").SUBPLOT_PATTERN;r.getSubplotCalcData=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;s<t.length;s++){var l=t[s];l[0].trace[a]===r&&o.push(l)}return o},r.getModuleCalcData=function(t,e){var r,i=[],a=[];if(!(r=\\\"string\\\"==typeof e?n.getModule(e).plot:\\\"function\\\"==typeof e?e:e.plot))return[i,t];for(var o=0;o<t.length;o++){var s=t[o],l=s[0].trace;!0===l.visible&&(l._module.plot===r?i.push(s):a.push(s))}return[i,a]},r.getSubplotData=function(t,e,r){if(!n.subplotsRegistry[e])return[];var a,o,s,l=n.subplotsRegistry[e].attr,c=[];if(\\\"gl2d\\\"===e){var u=r.match(i);o=\\\"x\\\"+u[1],s=\\\"y\\\"+u[2]}for(var f=0;f<t.length;f++)a=t[f],\\\"gl2d\\\"===e&&n.traceIs(a,\\\"gl2d\\\")?a[l[0]]===o&&a[l[1]]===s&&c.push(a):a[l]===r&&c.push(a);return c}},{\\\"../registry\\\":828,\\\"./cartesian/constants\\\":751}],783:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"mouse-change\\\"),i=t(\\\"mouse-wheel\\\"),a=t(\\\"mouse-event-offset\\\"),o=t(\\\"../cartesian/constants\\\"),s=t(\\\"has-passive-events\\\");function l(t,e){this.element=t,this.plot=e,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}e.exports=function(t){var e=t.mouseContainer,r=t.glplot,c=new l(e,r);function u(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function f(e,n,i){var a,s,l=t.calcDataBox(),f=r.viewBox,h=c.lastPos[0],p=c.lastPos[1],d=o.MINDRAG*r.pixelRatio,g=o.MINZOOM*r.pixelRatio;function v(e,r,n){var i=Math.min(r,n),a=Math.max(r,n);i!==a?(l[e]=i,l[e+2]=a,c.dataBox=l,t.setRanges(l)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(n*=r.pixelRatio,i*=r.pixelRatio,i=f[3]-f[1]-i,t.fullLayout.dragmode){case\\\"zoom\\\":if(e){var m=n/(f[2]-f[0])*(l[2]-l[0])+l[0],y=i/(f[3]-f[1])*(l[3]-l[1])+l[1];c.boxInited||(c.boxStart[0]=m,c.boxStart[1]=y,c.dragStart[0]=n,c.dragStart[1]=i),c.boxEnd[0]=m,c.boxEnd[1]=y,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&&c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var x=Math.abs(c.dragStart[0]-n)<g,b=Math.abs(c.dragStart[1]-i)<g;if(!function(){for(var e=t.graphDiv._fullLayout._axisConstraintGroups,r=t.xaxis._id,n=t.yaxis._id,i=0;i<e.length;i++)if(-1!==e[i][r]){if(-1!==e[i][n])return!0;break}return!1}()||x&&b)x&&(c.boxEnd[0]=c.boxStart[0]),b&&(c.boxEnd[1]=c.boxStart[1]);else{a=c.boxEnd[0]-c.boxStart[0],s=c.boxEnd[1]-c.boxStart[1];var _=(l[3]-l[1])/(l[2]-l[0]);Math.abs(a*_)>Math.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),c.boxEnd[1]<l[1]?(c.boxEnd[1]=l[1],c.boxEnd[0]=c.boxStart[0]+(l[1]-c.boxStart[1])/Math.abs(_)):c.boxEnd[1]>l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),c.boxEnd[0]<l[0]?(c.boxEnd[0]=l[0],c.boxEnd[1]=c.boxStart[1]+(l[0]-c.boxStart[0])*Math.abs(_)):c.boxEnd[0]>l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(a=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],a||s?(a&&(v(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(v(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case\\\"pan\\\":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n)<d&&(n=c.dragStart[0]),Math.abs(c.dragStart[1]-i)<d&&(i=c.dragStart[1]),a=(h-n)*(l[2]-l[0])/(r.viewBox[2]-r.viewBox[0]),s=(p-i)*(l[3]-l[1])/(r.viewBox[3]-r.viewBox[1]),l[0]+=a,l[2]+=a,l[1]+=s,l[3]+=s,t.setRanges(l),c.panning=!0,c.lastInputTime=Date.now(),u(),t.cameraChanged(),t.handleAnnotations()):c.panning&&(c.panning=!1,t.relayoutCallback())}c.lastPos[0]=n,c.lastPos[1]=i}return c.mouseListener=n(e,f),e.addEventListener(\\\"touchstart\\\",function(t){var r=a(t.changedTouches[0],e);f(0,r[0],r[1]),f(1,r[0],r[1]),t.preventDefault()},!!s&&{passive:!1}),e.addEventListener(\\\"touchmove\\\",function(t){t.preventDefault();var r=a(t.changedTouches[0],e);f(1,r[0],r[1]),t.preventDefault()},!!s&&{passive:!1}),e.addEventListener(\\\"touchend\\\",function(t){f(0,c.lastPos[0],c.lastPos[1]),t.preventDefault()},!!s&&{passive:!1}),c.wheelListener=i(e,function(e,n){if(!t.scrollZoom)return!1;var i=t.calcDataBox(),a=r.viewBox,o=c.lastPos[0],s=c.lastPos[1],l=Math.exp(5*n/(a[3]-a[1])),f=o/(a[2]-a[0])*(i[2]-i[0])+i[0],h=s/(a[3]-a[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-f)*l+f,i[2]=(i[2]-f)*l+f,i[1]=(i[1]-h)*l+h,i[3]=(i[3]-h)*l+h,t.setRanges(i),c.lastInputTime=Date.now(),u(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0},!0),c}},{\\\"../cartesian/constants\\\":751,\\\"has-passive-events\\\":394,\\\"mouse-change\\\":418,\\\"mouse-event-offset\\\":419,\\\"mouse-wheel\\\":421}],784:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../cartesian/axes\\\"),i=t(\\\"../../lib/html2unicode\\\"),a=t(\\\"../../lib/str2rgbarray\\\");function o(t){this.scene=t,this.gl=t.gl,this.pixelRatio=t.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=[\\\"x\\\",\\\"y\\\"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=[\\\"sans-serif\\\",\\\"sans-serif\\\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title=\\\"\\\",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont=\\\"sans-serif\\\",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=!1,this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var s=o.prototype,l=[\\\"xaxis\\\",\\\"yaxis\\\"];s.merge=function(t){var e,r,n,o,s,c,u,f,h,p,d;for(this.titleEnable=!1,this.backgroundColor=a(t.plot_bgcolor),p=0;p<2;++p){var g=(e=l[p]).charAt(0);for(n=(r=t[this.scene[e]._name]).title===this.scene.fullLayout._dfltTitle[g]?\\\"\\\":r.title,d=0;d<=2;d+=2)this.labelEnable[p+d]=!1,this.labels[p+d]=i(n),this.labelColor[p+d]=a(r.titlefont.color),this.labelFont[p+d]=r.titlefont.family,this.labelSize[p+d]=r.titlefont.size,this.labelPad[p+d]=this.getLabelPad(e,r),this.tickEnable[p+d]=!1,this.tickColor[p+d]=a((r.tickfont||{}).color),this.tickAngle[p+d]=\\\"auto\\\"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[p+d]=this.getTickPad(r),this.tickMarkLength[p+d]=0,this.tickMarkWidth[p+d]=r.tickwidth||0,this.tickMarkColor[p+d]=a(r.tickcolor),this.borderLineEnable[p+d]=!1,this.borderLineColor[p+d]=a(r.linecolor),this.borderLineWidth[p+d]=r.linewidth||0;u=this.hasSharedAxis(r),s=this.hasAxisInDfltPos(e,r)&&!u,c=this.hasAxisInAltrPos(e,r)&&!u,o=r.mirror||!1,f=u?-1!==String(o).indexOf(\\\"all\\\"):!!o,h=u?\\\"allticks\\\"===o:-1!==String(o).indexOf(\\\"ticks\\\"),s?this.labelEnable[p]=!0:c&&(this.labelEnable[p+2]=!0),s?this.tickEnable[p]=r.showticklabels:c&&(this.tickEnable[p+2]=r.showticklabels),(s||f)&&(this.borderLineEnable[p]=r.showline),(c||f)&&(this.borderLineEnable[p+2]=r.showline),(s||h)&&(this.tickMarkLength[p]=this.getTickMarkLength(r)),(c||h)&&(this.tickMarkLength[p+2]=this.getTickMarkLength(r)),this.gridLineEnable[p]=r.showgrid,this.gridLineColor[p]=a(r.gridcolor),this.gridLineWidth[p]=r.gridwidth,this.zeroLineEnable[p]=r.zeroline,this.zeroLineColor[p]=a(r.zerolinecolor),this.zeroLineWidth[p]=r.zerolinewidth}},s.hasSharedAxis=function(t){var e=this.scene,r=e.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,t).indexOf(e.id)},s.hasAxisInDfltPos=function(t,e){var r=e.side;return\\\"xaxis\\\"===t?\\\"bottom\\\"===r:\\\"yaxis\\\"===t?\\\"left\\\"===r:void 0},s.hasAxisInAltrPos=function(t,e){var r=e.side;return\\\"xaxis\\\"===t?\\\"top\\\"===r:\\\"yaxis\\\"===t?\\\"right\\\"===r:void 0},s.getLabelPad=function(t,e){var r=e.titlefont.size,n=e.showticklabels;return\\\"xaxis\\\"===t?\\\"top\\\"===e.side?r*(1.5+(n?1:0))-10:r*(1.5+(n?.5:0))-10:\\\"yaxis\\\"===t?\\\"right\\\"===e.side?10+r*(1.5+(n?1:.5)):10+r*(1.5+(n?.5:0)):void 0},s.getTickPad=function(t){return\\\"outside\\\"===t.ticks?10+t.ticklen:15},s.getTickMarkLength=function(t){if(!t.ticks)return 0;var e=t.ticklen;return\\\"inside\\\"===t.ticks?-e:e},e.exports=function(t){return new o(t)}},{\\\"../../lib/html2unicode\\\":694,\\\"../../lib/str2rgbarray\\\":720,\\\"../cartesian/axes\\\":745}],785:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plot_api/edit_types\\\").overrideAll,i=t(\\\"./scene2d\\\"),a=t(\\\"../layout_attributes\\\"),o=t(\\\"../../constants/xmlns_namespaces\\\"),s=t(\\\"../cartesian/constants\\\"),l=t(\\\"../cartesian\\\"),c=t(\\\"../../components/fx/layout_attributes\\\"),u=t(\\\"../get_data\\\").getSubplotData;r.name=\\\"gl2d\\\",r.attr=[\\\"xaxis\\\",\\\"yaxis\\\"],r.idRoot=[\\\"x\\\",\\\"y\\\"],r.idRegex=s.idRegex,r.attrRegex=s.attrRegex,r.attributes=t(\\\"../cartesian/attributes\\\"),r.supplyLayoutDefaults=function(t,e,r){e._has(\\\"cartesian\\\")||l.supplyLayoutDefaults(t,e,r)},r.layoutAttrOverrides=n(l.layoutAttributes,\\\"plot\\\",\\\"from-root\\\"),r.baseLayoutAttrOverrides=n({plot_bgcolor:a.plot_bgcolor,hoverlabel:c.hoverlabel},\\\"plot\\\",\\\"nested\\\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl2d,a=0;a<n.length;a++){var o=n[a],s=e._plots[o],l=u(r,\\\"gl2d\\\",o),c=s._scene2d;void 0===c&&(c=new i({id:o,graphDiv:t,container:t.querySelector(\\\".gl-container\\\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),s._scene2d=c),c.plot(l,t.calcdata,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl2d||[],a=0;a<i.length;a++){var o=i[a],s=n._plots[o];if(s._scene2d)0===u(t,\\\"gl2d\\\",o).length&&(s._scene2d.destroy(),delete n._plots[o])}l.clean.apply(this,arguments)},r.drawFramework=function(t){t._context.staticPlot||l.drawFramework(t)},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){var i=e._plots[r[n]]._scene2d,a=i.toImage(\\\"png\\\");e._glimages.append(\\\"svg:image\\\").attr({xmlns:o.svg,\\\"xlink:href\\\":a,x:0,y:0,width:\\\"100%\\\",height:\\\"100%\\\",preserveAspectRatio:\\\"none\\\"}),i.destroy()}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){e._plots[r[n]]._scene2d.updateFx(e.dragmode)}}},{\\\"../../components/fx/layout_attributes\\\":613,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../plot_api/edit_types\\\":728,\\\"../cartesian\\\":757,\\\"../cartesian/attributes\\\":743,\\\"../cartesian/constants\\\":751,\\\"../get_data\\\":782,\\\"../layout_attributes\\\":800,\\\"./scene2d\\\":786}],786:[function(t,e,r){\\\"use strict\\\";var n,i,a=t(\\\"../../registry\\\"),o=t(\\\"../../plots/cartesian/axes\\\"),s=t(\\\"../../components/fx\\\"),l=t(\\\"gl-plot2d\\\"),c=t(\\\"gl-spikes2d\\\"),u=t(\\\"gl-select-box\\\"),f=t(\\\"webgl-context\\\"),h=t(\\\"./convert\\\"),p=t(\\\"./camera\\\"),d=t(\\\"../../lib/html2unicode\\\"),g=t(\\\"../../lib/show_no_webgl_msg\\\"),v=t(\\\"../cartesian/constraints\\\"),m=v.enforce,y=v.clean,x=t(\\\"../cartesian/autorange\\\").doAutoRange,b=[\\\"xaxis\\\",\\\"yaxis\\\"],_=t(\\\"../cartesian/constants\\\").SUBPLOT_PATTERN;function w(t,e){this.container=t.container,this.graphDiv=t.graphDiv,this.pixelRatio=t.plotGlPixelRatio||window.devicePixelRatio,this.id=t.id,this.staticPlot=!!t.staticPlot,this.scrollZoom=this.graphDiv._context.scrollZoom,this.fullData=null,this.updateRefs(e),this.makeFramework(),this.stopped||(this.glplotOptions=h(this),this.glplotOptions.merge(e),this.glplot=l(this.glplotOptions),this.camera=p(this),this.traces={},this.spikes=c(this.glplot),this.selectBox=u(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}e.exports=w;var k=w.prototype;k.makeFramework=function(){if(this.staticPlot){if(!(i||(n=document.createElement(\\\"canvas\\\"),i=f({canvas:n,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\\\"Error creating static canvas/context for image server\\\");this.canvas=n,this.gl=i}else{var t=this.container.querySelector(\\\".gl-canvas-focus\\\"),e=f({canvas:t,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!e)return g(this),void(this.stopped=!0);this.canvas=t,this.gl=e}var r=this.canvas;r.style.width=\\\"100%\\\",r.style.height=\\\"100%\\\",r.style.position=\\\"absolute\\\",r.style.top=\\\"0px\\\",r.style.left=\\\"0px\\\",r.style[\\\"pointer-events\\\"]=\\\"none\\\",this.updateSize(r),r.className+=\\\" user-select-none\\\";var a=this.svgContainer=document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",\\\"svg\\\");a.style.position=\\\"absolute\\\",a.style.top=a.style.left=\\\"0px\\\",a.style.width=a.style.height=\\\"100%\\\",a.style[\\\"z-index\\\"]=20,a.style[\\\"pointer-events\\\"]=\\\"none\\\";var o=this.mouseContainer=document.createElement(\\\"div\\\");o.style.position=\\\"absolute\\\",o.style[\\\"pointer-events\\\"]=\\\"auto\\\",this.pickCanvas=this.container.querySelector(\\\".gl-canvas-pick\\\");var s=this.container;s.appendChild(a),s.appendChild(o);var l=this;o.addEventListener(\\\"mouseout\\\",function(){l.isMouseOver=!1,l.unhover()}),o.addEventListener(\\\"mouseover\\\",function(){l.isMouseOver=!0})},k.toImage=function(t){t||(t=\\\"png\\\"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var c=0;c<4;++c){var u=a[4*(r*o+l)+c];a[4*(r*o+l)+c]=a[4*(r*s+l)+c],a[4*(r*s+l)+c]=u}var f=document.createElement(\\\"canvas\\\");f.width=r,f.height=i;var h,p=f.getContext(\\\"2d\\\"),d=p.createImageData(r,i);switch(d.data.set(a),p.putImageData(d,0,0),t){case\\\"jpeg\\\":h=f.toDataURL(\\\"image/jpeg\\\");break;case\\\"webp\\\":h=f.toDataURL(\\\"image/webp\\\");break;default:h=f.toDataURL(\\\"image/png\\\")}return this.staticPlot&&this.container.removeChild(n),h},k.updateSize=function(t){t||(t=this.canvas);var e=this.pixelRatio,r=this.fullLayout,n=r.width,i=r.height,a=0|Math.ceil(e*n),o=0|Math.ceil(e*i);return t.width===a&&t.height===o||(t.width=a,t.height=o),t},k.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var t=[o.calcTicks(this.xaxis),o.calcTicks(this.yaxis)],e=0;e<2;++e)for(var r=0;r<t[e].length;++r)t[e][r].text=d(t[e][r].text+\\\"\\\");return t},k.updateRefs=function(t){this.fullLayout=t;var e=this.id.match(_),r=\\\"xaxis\\\"+e[1],n=\\\"yaxis\\\"+e[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},k.relayoutCallback=function(){var t=this.graphDiv,e=this.xaxis,r=this.yaxis,n=t.layout;n.xaxis.autorange=e.autorange,n.xaxis.range=e.range.slice(0),n.yaxis.autorange=r.autorange,n.yaxis.range=r.range.slice(0);var i={lastInputTime:this.camera.lastInputTime};i[e._name]=e.range.slice(0),i[r._name]=r.range.slice(0),t.emit(\\\"plotly_relayout\\\",i)},k.cameraChanged=function(){var t=this.camera;this.glplot.setDataBox(this.calcDataBox());var e=this.computeTickMarks();(function(t,e){for(var r=0;r<2;++r){var n=t[r],i=e[r];if(n.length!==i.length)return!0;for(var a=0;a<n.length;++a)if(n[a].x!==i[a].x)return!0}return!1})(e,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=e,this.glplotOptions.dataBox=t.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},k.handleAnnotations=function(){for(var t=this.graphDiv,e=this.fullLayout.annotations,r=0;r<e.length;r++){var n=e[r];n.xref===this.xaxis._id&&n.yref===this.yaxis._id&&a.getComponentMethod(\\\"annotations\\\",\\\"drawOne\\\")(t,r)}},k.destroy=function(){if(this.glplot){var t=this.traces;t&&Object.keys(t).map(function(e){t[e].dispose(),delete t[e]}),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener(\\\"wheel\\\",this.camera.wheelListener),this.camera=null}},k.plot=function(t,e,r){var n=this.glplot;this.updateRefs(r),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(t,e),this.updateFx(r.dragmode);var i=r.width,a=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,i,a];var s={_fullLayout:{_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis}};y(s,this.xaxis),y(s,this.yaxis);var l,c,u=r._size,f=this.xaxis.domain,h=this.yaxis.domain;for(o.viewBox=[u.l+f[0]*u.w,u.b+h[0]*u.h,i-u.r-(1-f[1])*u.w,a-u.t-(1-h[1])*u.h],this.mouseContainer.style.width=u.w*(f[1]-f[0])+\\\"px\\\",this.mouseContainer.style.height=u.h*(h[1]-h[0])+\\\"px\\\",this.mouseContainer.height=u.h*(h[1]-h[0]),this.mouseContainer.style.left=u.l+f[0]*u.w+\\\"px\\\",this.mouseContainer.style.top=u.t+(1-h[1])*u.h+\\\"px\\\",c=0;c<2;++c)(l=this[b[c]])._length=o.viewBox[c+2]-o.viewBox[c],x(this.graphDiv,l),l.setScale();m(s),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},k.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},k.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},k.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;r<a.length;r++){var o=a[r],s=this.traces[o];for(n=0;n<t.length;n++)if((i=t[n]).uid===o&&i.type===s.type)continue t;s.dispose(),delete this.traces[o]}for(r=0;r<t.length;r++){i=t[r];var l=e[r],c=this.traces[i.uid];c?c.update(i,l):(c=i._module.plot(this,i,l),this.traces[i.uid]=c)}this.glplot.objects.sort(function(t,e){return t._trace.index-e._trace.index})},k.updateFx=function(t){\\\"lasso\\\"===t||\\\"select\\\"===t?(this.pickCanvas.style[\\\"pointer-events\\\"]=\\\"none\\\",this.mouseContainer.style[\\\"pointer-events\\\"]=\\\"none\\\"):(this.pickCanvas.style[\\\"pointer-events\\\"]=\\\"auto\\\",this.mouseContainer.style[\\\"pointer-events\\\"]=\\\"auto\\\"),this.mouseContainer.style.cursor=\\\"pan\\\"===t?\\\"move\\\":\\\"zoom\\\"===t?\\\"crosshair\\\":null},k.emitPointAction=function(t,e){for(var r,n=t.trace.uid,i=t.pointIndex,a=0;a<this.fullData.length;a++)this.fullData[a].uid===n&&(r=this.fullData[a]);var o={x:t.traceCoord[0],y:t.traceCoord[1],curveNumber:r.index,pointNumber:i,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};s.appendArrayPointValue(o,r,i),this.graphDiv.emit(e,{points:[o]})},k.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var t=this.glplot,e=this.camera,r=e.mouseListener,n=1===this.lastButtonState&&0===r.buttons,i=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var a,o=r.x*t.pixelRatio,l=this.canvas.height-t.pixelRatio*r.y;if(e.boxEnabled&&\\\"zoom\\\"===i.dragmode){this.selectBox.enabled=!0;for(var c=this.selectBox.selectBox=[Math.min(e.boxStart[0],e.boxEnd[0]),Math.min(e.boxStart[1],e.boxEnd[1]),Math.max(e.boxStart[0],e.boxEnd[0]),Math.max(e.boxStart[1],e.boxEnd[1])],u=0;u<2;u++)e.boxStart[u]===e.boxEnd[u]&&(c[u]=t.dataBox[u],c[u+2]=t.dataBox[u+2]);t.setDirty()}else if(!e.panning&&this.isMouseOver){this.selectBox.enabled=!1;var f=i._size,h=this.xaxis.domain,p=this.yaxis.domain,d=(a=t.pick(o/t.pixelRatio+f.l+h[0]*f.w,l/t.pixelRatio-(f.t+(1-p[1])*f.h)))&&a.object._trace.handlePick(a);if(d&&n&&this.emitPointAction(d,\\\"plotly_click\\\"),a&&\\\"skip\\\"!==a.object._trace.hoverinfo&&i.hovermode&&d&&(!this.lastPickResult||this.lastPickResult.traceUid!==d.trace.uid||this.lastPickResult.dataCoord[0]!==d.dataCoord[0]||this.lastPickResult.dataCoord[1]!==d.dataCoord[1])){var g=d;this.lastPickResult={traceUid:d.trace?d.trace.uid:null,dataCoord:d.dataCoord.slice()},this.spikes.update({center:a.dataCoord}),g.screenCoord=[((t.viewBox[2]-t.viewBox[0])*(a.dataCoord[0]-t.dataBox[0])/(t.dataBox[2]-t.dataBox[0])+t.viewBox[0])/t.pixelRatio,(this.canvas.height-(t.viewBox[3]-t.viewBox[1])*(a.dataCoord[1]-t.dataBox[1])/(t.dataBox[3]-t.dataBox[1])-t.viewBox[1])/t.pixelRatio],this.emitPointAction(d,\\\"plotly_hover\\\");var v=this.fullData[g.trace.index]||{},m=g.pointIndex,y=s.castHoverinfo(v,i,m);if(y&&\\\"all\\\"!==y){var x=y.split(\\\"+\\\");-1===x.indexOf(\\\"x\\\")&&(g.traceCoord[0]=void 0),-1===x.indexOf(\\\"y\\\")&&(g.traceCoord[1]=void 0),-1===x.indexOf(\\\"z\\\")&&(g.traceCoord[2]=void 0),-1===x.indexOf(\\\"text\\\")&&(g.textLabel=void 0),-1===x.indexOf(\\\"name\\\")&&(g.name=void 0)}s.loneHover({x:g.screenCoord[0],y:g.screenCoord[1],xLabel:this.hoverFormatter(\\\"xaxis\\\",g.traceCoord[0]),yLabel:this.hoverFormatter(\\\"yaxis\\\",g.traceCoord[1]),zLabel:g.traceCoord[2],text:g.textLabel,name:g.name,color:s.castHoverOption(v,m,\\\"bgcolor\\\")||g.color,borderColor:s.castHoverOption(v,m,\\\"bordercolor\\\"),fontFamily:s.castHoverOption(v,m,\\\"font.family\\\"),fontSize:s.castHoverOption(v,m,\\\"font.size\\\"),fontColor:s.castHoverOption(v,m,\\\"font.color\\\")},{container:this.svgContainer,gd:this.graphDiv})}}a||this.unhover(),t.draw()}},k.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit(\\\"plotly_unhover\\\"),s.loneUnhover(this.svgContainer))},k.hoverFormatter=function(t,e){if(void 0!==e){var r=this[t];return o.tickText(r,r.c2l(e),\\\"hover\\\").text}}},{\\\"../../components/fx\\\":612,\\\"../../lib/html2unicode\\\":694,\\\"../../lib/show_no_webgl_msg\\\":718,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"../cartesian/autorange\\\":744,\\\"../cartesian/constants\\\":751,\\\"../cartesian/constraints\\\":753,\\\"./camera\\\":783,\\\"./convert\\\":784,\\\"gl-plot2d\\\":275,\\\"gl-select-box\\\":286,\\\"gl-spikes2d\\\":295,\\\"webgl-context\\\":533}],787:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){t=t||document.body,e=e||{};var r=[.01,1/0];\\\"distanceLimits\\\"in e&&(r[0]=e.distanceLimits[0],r[1]=e.distanceLimits[1]);\\\"zoomMin\\\"in e&&(r[0]=e.zoomMin);\\\"zoomMax\\\"in e&&(r[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||\\\"orbit\\\",distanceLimits:r}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,p=t.clientHeight,d={keyBindingMode:\\\"rotate\\\",view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay,i=e-2*r;c.idle(e-r),c.recalcMatrix(i),c.flush(e-(100+2*r));for(var a=!0,o=c.computedMatrix,s=0;s<16;++s)a=a&&u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===p;return h=t.clientWidth,p=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(d,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){var e=c.computedUp.slice(),r=c.computedEye.slice(),i=c.computedCenter.slice();if(c.setMode(t),\\\"turntable\\\"===t){var a=n();c._active.lookAt(a,r,i,e),c._active.lookAt(a+500,r,i,[0,0,1]),c._active.flush(a)}return c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(r)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(\\\"contextmenu\\\",function(t){return t.preventDefault(),!1});var g=0,v=0,m={shift:!1,control:!1,alt:!1,meta:!1};function y(e,r,i,a){var o=d.keyBindingMode;if(!1!==o){var s=\\\"rotate\\\"===o,l=\\\"pan\\\"===o,u=\\\"zoom\\\"===o,h=!!a.control,p=!!a.alt,y=!!a.shift,x=!!(1&e),b=!!(2&e),_=!!(4&e),w=1/t.clientHeight,k=w*(r-g),M=w*(i-v),A=d.flipX?1:-1,T=d.flipY?1:-1,S=n(),C=Math.PI*d.rotateSpeed;if((s&&x&&!h&&!p&&!y||x&&!h&&!p&&y)&&c.rotate(S,A*C*k,-T*C*M,0),(l&&x&&!h&&!p&&!y||b||x&&h&&!p&&!y)&&c.pan(S,-d.translateSpeed*k*f,d.translateSpeed*M*f,0),u&&x&&!h&&!p&&!y||_||x&&!h&&p&&!y){var E=-d.zoomSpeed*M/window.innerHeight*(S-c.lastT())*100;c.pan(S,0,0,f*(Math.exp(E)-1))}return g=r,v=i,m=a,!0}}return d.mouseListener=a(t,y),t.addEventListener(\\\"touchstart\\\",function(e){var r=s(e.changedTouches[0],t);y(0,r[0],r[1],m),y(1,r[0],r[1],m),e.preventDefault()},!!l&&{passive:!1}),t.addEventListener(\\\"touchmove\\\",function(e){var r=s(e.changedTouches[0],t);y(1,r[0],r[1],m),e.preventDefault()},!!l&&{passive:!1}),t.addEventListener(\\\"touchend\\\",function(t){y(0,g,v,m),t.preventDefault()},!!l&&{passive:!1}),d.wheelListener=o(t,function(t,e){if(!1!==d.keyBindingMode){var r=d.flipX?1:-1,i=d.flipY?1:-1,a=n();if(Math.abs(t)>Math.abs(e))c.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else{var o=-d.zoomSpeed*i*e/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,f*(Math.exp(o)-1))}}},!0),d};var n=t(\\\"right-now\\\"),i=t(\\\"3d-view\\\"),a=t(\\\"mouse-change\\\"),o=t(\\\"mouse-wheel\\\"),s=t(\\\"mouse-event-offset\\\"),l=t(\\\"has-passive-events\\\")},{\\\"3d-view\\\":45,\\\"has-passive-events\\\":394,\\\"mouse-change\\\":418,\\\"mouse-event-offset\\\":419,\\\"mouse-wheel\\\":421,\\\"right-now\\\":480}],788:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plot_api/edit_types\\\").overrideAll,i=t(\\\"../../components/fx/layout_attributes\\\"),a=t(\\\"./scene\\\"),o=t(\\\"../get_data\\\").getSubplotData,s=t(\\\"../../lib\\\"),l=t(\\\"../../constants/xmlns_namespaces\\\");r.name=\\\"gl3d\\\",r.attr=\\\"scene\\\",r.idRoot=\\\"scene\\\",r.idRegex=r.attrRegex=s.counterRegex(\\\"scene\\\"),r.attributes=t(\\\"./layout/attributes\\\"),r.layoutAttributes=t(\\\"./layout/layout_attributes\\\"),r.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},\\\"plot\\\",\\\"nested\\\"),r.supplyLayoutDefaults=t(\\\"./layout/defaults\\\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl3d,i=0;i<n.length;i++){var l=n[i],c=o(r,\\\"gl3d\\\",l),u=e[l],f=u._scene;f||(f=new a({id:l,graphDiv:t,container:t.querySelector(\\\".gl-container\\\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),u._scene=f),f.cameraInitial||(f.cameraInitial=s.extendDeep({},u.camera)),f.plot(c,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl3d||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(\\\".annotation-\\\"+o).remove())}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,c=s.toImage(\\\"png\\\");e._glimages.append(\\\"svg:image\\\").attr({xmlns:l.svg,\\\"xlink:href\\\":c,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:\\\"none\\\"}),s.destroy()}},r.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var e=t.substr(5);return\\\"1\\\"===e&&(e=\\\"\\\"),\\\"scene\\\"+e}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){e[r[n]]._scene.updateFx(e.dragmode,e.hovermode)}}},{\\\"../../components/fx/layout_attributes\\\":613,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../plot_api/edit_types\\\":728,\\\"../get_data\\\":782,\\\"./layout/attributes\\\":789,\\\"./layout/defaults\\\":793,\\\"./layout/layout_attributes\\\":794,\\\"./scene\\\":798}],789:[function(t,e,r){\\\"use strict\\\";e.exports={scene:{valType:\\\"subplotid\\\",dflt:\\\"scene\\\",editType:\\\"calc+clearAxisTypes\\\"}}},{}],790:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../components/color\\\"),i=t(\\\"../../cartesian/layout_attributes\\\"),a=t(\\\"../../../lib/extend\\\").extendFlat,o=t(\\\"../../../plot_api/edit_types\\\").overrideAll;e.exports=o({visible:i.visible,showspikes:{valType:\\\"boolean\\\",dflt:!0},spikesides:{valType:\\\"boolean\\\",dflt:!0},spikethickness:{valType:\\\"number\\\",min:0,dflt:2},spikecolor:{valType:\\\"color\\\",dflt:n.defaultLine},showbackground:{valType:\\\"boolean\\\",dflt:!1},backgroundcolor:{valType:\\\"color\\\",dflt:\\\"rgba(204, 204, 204, 0.5)\\\"},showaxeslabels:{valType:\\\"boolean\\\",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:i.title,titlefont:i.titlefont,type:i.type,autorange:i.autorange,rangemode:i.rangemode,range:i.range,tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:a({},i.gridcolor,{dflt:\\\"rgb(204, 204, 204)\\\"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth},\\\"plot\\\",\\\"from-root\\\")},{\\\"../../../components/color\\\":570,\\\"../../../lib/extend\\\":685,\\\"../../../plot_api/edit_types\\\":728,\\\"../../cartesian/layout_attributes\\\":758}],791:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"tinycolor2\\\").mix,i=t(\\\"../../../lib\\\"),a=t(\\\"../../../plot_api/plot_template\\\"),o=t(\\\"./axis_attributes\\\"),s=t(\\\"../../cartesian/type_defaults\\\"),l=t(\\\"../../cartesian/axis_defaults\\\"),c=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"];e.exports=function(t,e,r){var u,f;function h(t,e){return i.coerce(u,f,o,t,e)}for(var p=0;p<c.length;p++){var d=c[p];u=t[d]||{},(f=a.newContainer(e,d))._id=d[0]+r.scene,f._name=d,s(u,f,h,r),l(u,f,h,{font:r.font,letter:d[0],data:r.data,showGrid:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),h(\\\"gridcolor\\\",n(f.color,r.bgColor,13600/187).toRgbString()),h(\\\"title\\\",d[0]),f.setScale=i.noop,h(\\\"showspikes\\\")&&(h(\\\"spikesides\\\"),h(\\\"spikethickness\\\"),h(\\\"spikecolor\\\",f.color)),h(\\\"showaxeslabels\\\"),h(\\\"showbackground\\\")&&h(\\\"backgroundcolor\\\")}}},{\\\"../../../lib\\\":696,\\\"../../../plot_api/plot_template\\\":735,\\\"../../cartesian/axis_defaults\\\":747,\\\"../../cartesian/type_defaults\\\":769,\\\"./axis_attributes\\\":790,tinycolor2:514}],792:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../lib/html2unicode\\\"),i=t(\\\"../../../lib/str2rgbarray\\\"),a=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"];function o(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=[\\\"sans-serif\\\",\\\"sans-serif\\\",\\\"sans-serif\\\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=[\\\"x\\\",\\\"y\\\",\\\"z\\\"],this.labelEnable=[!0,!0,!0],this.labelFont=[\\\"Open Sans\\\",\\\"Open Sans\\\",\\\"Open Sans\\\"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}o.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[a[e]];r.visible?(this.labels[e]=n(r.title),\\\"titlefont\\\"in r&&(r.titlefont.color&&(this.labelColor[e]=i(r.titlefont.color)),r.titlefont.family&&(this.labelFont[e]=r.titlefont.family),r.titlefont.size&&(this.labelSize[e]=r.titlefont.size)),\\\"showline\\\"in r&&(this.lineEnable[e]=r.showline),\\\"linecolor\\\"in r&&(this.lineColor[e]=i(r.linecolor)),\\\"linewidth\\\"in r&&(this.lineWidth[e]=r.linewidth),\\\"showgrid\\\"in r&&(this.gridEnable[e]=r.showgrid),\\\"gridcolor\\\"in r&&(this.gridColor[e]=i(r.gridcolor)),\\\"gridwidth\\\"in r&&(this.gridWidth[e]=r.gridwidth),\\\"log\\\"===r.type?this.zeroEnable[e]=!1:\\\"zeroline\\\"in r&&(this.zeroEnable[e]=r.zeroline),\\\"zerolinecolor\\\"in r&&(this.zeroLineColor[e]=i(r.zerolinecolor)),\\\"zerolinewidth\\\"in r&&(this.zeroLineWidth[e]=r.zerolinewidth),\\\"ticks\\\"in r&&r.ticks?this.lineTickEnable[e]=!0:this.lineTickEnable[e]=!1,\\\"ticklen\\\"in r&&(this.lineTickLength[e]=this._defaultLineTickLength[e]=r.ticklen),\\\"tickcolor\\\"in r&&(this.lineTickColor[e]=i(r.tickcolor)),\\\"tickwidth\\\"in r&&(this.lineTickWidth[e]=r.tickwidth),\\\"tickangle\\\"in r&&(this.tickAngle[e]=\\\"auto\\\"===r.tickangle?-3600:Math.PI*-r.tickangle/180),\\\"showticklabels\\\"in r&&(this.tickEnable[e]=r.showticklabels),\\\"tickfont\\\"in r&&(r.tickfont.color&&(this.tickColor[e]=i(r.tickfont.color)),r.tickfont.family&&(this.tickFont[e]=r.tickfont.family),r.tickfont.size&&(this.tickSize[e]=r.tickfont.size)),\\\"mirror\\\"in r?-1!==[\\\"ticks\\\",\\\"all\\\",\\\"allticks\\\"].indexOf(r.mirror)?(this.lineTickMirror[e]=!0,this.lineMirror[e]=!0):!0===r.mirror?(this.lineTickMirror[e]=!1,this.lineMirror[e]=!0):(this.lineTickMirror[e]=!1,this.lineMirror[e]=!1):this.lineMirror[e]=!1,\\\"showbackground\\\"in r&&!1!==r.showbackground?(this.backgroundEnable[e]=!0,this.backgroundColor[e]=i(r.backgroundcolor)):this.backgroundEnable[e]=!1):(this.tickEnable[e]=!1,this.labelEnable[e]=!1,this.lineEnable[e]=!1,this.lineTickEnable[e]=!1,this.gridEnable[e]=!1,this.zeroEnable[e]=!1,this.backgroundEnable[e]=!1)}},e.exports=function(t){var e=new o;return e.merge(t),e}},{\\\"../../../lib/html2unicode\\\":694,\\\"../../../lib/str2rgbarray\\\":720}],793:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../lib\\\"),i=t(\\\"../../../components/color\\\"),a=t(\\\"../../../registry\\\"),o=t(\\\"../../subplot_defaults\\\"),s=t(\\\"./axis_defaults\\\"),l=t(\\\"./layout_attributes\\\");function c(t,e,r,n){for(var o=r(\\\"bgcolor\\\"),l=i.combine(o,n.paper_bgcolor),c=[\\\"up\\\",\\\"center\\\",\\\"eye\\\"],u=0;u<c.length;u++)r(\\\"camera.\\\"+c[u]+\\\".x\\\"),r(\\\"camera.\\\"+c[u]+\\\".y\\\"),r(\\\"camera.\\\"+c[u]+\\\".z\\\");var f=!!r(\\\"aspectratio.x\\\")&&!!r(\\\"aspectratio.y\\\")&&!!r(\\\"aspectratio.z\\\"),h=r(\\\"aspectmode\\\",f?\\\"manual\\\":\\\"auto\\\");f||(t.aspectratio=e.aspectratio={x:1,y:1,z:1},\\\"manual\\\"===h&&(e.aspectmode=\\\"auto\\\"),t.aspectmode=e.aspectmode),s(t,e,{font:n.font,scene:n.id,data:n.fullData,bgColor:l,calendar:n.calendar,fullLayout:n.fullLayout}),a.getComponentMethod(\\\"annotations3d\\\",\\\"handleDefaults\\\")(t,e,n),r(\\\"dragmode\\\",n.getDfltFromLayout(\\\"dragmode\\\")),r(\\\"hovermode\\\",n.getDfltFromLayout(\\\"hovermode\\\"))}e.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:\\\"gl3d\\\",attributes:l,handleDefaults:c,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\\\"../../../components/color\\\":570,\\\"../../../lib\\\":696,\\\"../../../registry\\\":828,\\\"../../subplot_defaults\\\":823,\\\"./axis_defaults\\\":791,\\\"./layout_attributes\\\":794}],794:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./axis_attributes\\\"),i=t(\\\"../../domain\\\").attributes,a=t(\\\"../../../lib/extend\\\").extendFlat,o=t(\\\"../../../lib\\\").counterRegex;function s(t,e,r){return{x:{valType:\\\"number\\\",dflt:t,editType:\\\"camera\\\"},y:{valType:\\\"number\\\",dflt:e,editType:\\\"camera\\\"},z:{valType:\\\"number\\\",dflt:r,editType:\\\"camera\\\"},editType:\\\"camera\\\"}}e.exports={_arrayAttrRegexps:[o(\\\"scene\\\",\\\".annotations\\\",!0)],bgcolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\",editType:\\\"plot\\\"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),editType:\\\"camera\\\"},domain:i({name:\\\"scene\\\",editType:\\\"plot\\\"}),aspectmode:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"cube\\\",\\\"data\\\",\\\"manual\\\"],dflt:\\\"auto\\\",editType:\\\"plot\\\",impliedEdits:{\\\"aspectratio.x\\\":void 0,\\\"aspectratio.y\\\":void 0,\\\"aspectratio.z\\\":void 0}},aspectratio:{x:{valType:\\\"number\\\",min:0,editType:\\\"plot\\\",impliedEdits:{\\\"^aspectmode\\\":\\\"manual\\\"}},y:{valType:\\\"number\\\",min:0,editType:\\\"plot\\\",impliedEdits:{\\\"^aspectmode\\\":\\\"manual\\\"}},z:{valType:\\\"number\\\",min:0,editType:\\\"plot\\\",impliedEdits:{\\\"^aspectmode\\\":\\\"manual\\\"}},editType:\\\"plot\\\",impliedEdits:{aspectmode:\\\"manual\\\"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:\\\"enumerated\\\",values:[\\\"orbit\\\",\\\"turntable\\\",\\\"zoom\\\",\\\"pan\\\",!1],dflt:\\\"turntable\\\",editType:\\\"plot\\\"},hovermode:{valType:\\\"enumerated\\\",values:[\\\"closest\\\",!1],dflt:\\\"closest\\\",editType:\\\"modebar\\\"},editType:\\\"plot\\\",_deprecated:{cameraposition:{valType:\\\"info_array\\\",editType:\\\"camera\\\"}}}},{\\\"../../../lib\\\":696,\\\"../../../lib/extend\\\":685,\\\"../../domain\\\":771,\\\"./axis_attributes\\\":790}],795:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../lib/str2rgbarray\\\"),i=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new a;return e.merge(t),e}},{\\\"../../../lib/str2rgbarray\\\":720}],796:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,l=t.fullSceneLayout,c=[[],[],[]],u=0;u<3;++u){var f=l[o[u]];if(f._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/t.dataScale[u],Math.abs(f._length)===1/0)c[u]=[];else{f._input_range=f.range.slice(),f.range[0]=r[u].lo/t.dataScale[u],f.range[1]=r[u].hi/t.dataScale[u],f._m=1/(t.dataScale[u]*r[u].pixelsPerDataUnit),f.range[0]===f.range[1]&&(f.range[0]-=1,f.range[1]+=1);var h=f.tickmode;if(\\\"auto\\\"===f.tickmode){f.tickmode=\\\"linear\\\";var p=f.nticks||i.constrain(f._length/40,4,9);n.autoTicks(f,Math.abs(f.range[1]-f.range[0])/p)}for(var d=n.calcTicks(f),g=0;g<d.length;++g)d[g].x=d[g].x*t.dataScale[u],d[g].text=a(d[g].text);c[u]=d,f.tickmode=h}}e.ticks=c;for(var u=0;u<3;++u){s[u]=.5*(t.glplot.bounds[0][u]+t.glplot.bounds[1][u]);for(var g=0;g<2;++g)e.bounds[g][u]=t.glplot.bounds[g][u]}t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;a<n.length;++a)i[a]=n[a].x;e[r]=i}return e}(c)};var n=t(\\\"../../cartesian/axes\\\"),i=t(\\\"../../../lib\\\"),a=t(\\\"../../../lib/html2unicode\\\"),o=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"],s=[0,0,0]},{\\\"../../../lib\\\":696,\\\"../../../lib/html2unicode\\\":694,\\\"../../cartesian/axes\\\":745}],797:[function(t,e,r){\\\"use strict\\\";function n(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}e.exports=function(t,e){return n(t.projection,n(t.view,n(t.model,[e[0],e[1],e[2],1])))}},{}],798:[function(t,e,r){\\\"use strict\\\";var n,i,a=t(\\\"gl-plot3d\\\"),o=t(\\\"webgl-context\\\"),s=t(\\\"has-passive-events\\\"),l=t(\\\"../../registry\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../plots/cartesian/axes\\\"),f=t(\\\"../../components/fx\\\"),h=t(\\\"../../lib/str2rgbarray\\\"),p=t(\\\"../../lib/show_no_webgl_msg\\\"),d=t(\\\"./camera\\\"),g=t(\\\"./project\\\"),v=t(\\\"./layout/convert\\\"),m=t(\\\"./layout/spikes\\\"),y=t(\\\"./layout/tick_marks\\\");function x(t,e,r,l){var c=t.graphDiv,h={canvas:r,gl:l,container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1};if(t.staticMode){if(!(i||(n=document.createElement(\\\"canvas\\\"),i=o({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\\\"error creating static canvas/context for image server\\\");h.pixelRatio=t.pixelRatio,h.gl=i,h.canvas=n}try{t.glplot=a(h)}catch(e){return p(t)}var v=function(t){if(!1!==t.fullSceneLayout.dragmode){var e={};e[t.id+\\\".camera\\\"]=M(t.camera),t.saveCamera(c.layout),t.graphDiv.emit(\\\"plotly_relayout\\\",e)}};if(t.glplot.canvas.addEventListener(\\\"mouseup\\\",v.bind(null,t)),t.glplot.canvas.addEventListener(\\\"wheel\\\",v.bind(null,t),!!s&&{passive:!1}),t.staticMode||t.glplot.canvas.addEventListener(\\\"webglcontextlost\\\",function(e){c&&c.emit&&c.emit(\\\"plotly_webglcontextlost\\\",{event:e,layer:t.id})},!1),!t.camera){var m=t.fullSceneLayout.camera;t.camera=d(t.container,{center:[m.center.x,m.center.y,m.center.z],eye:[m.eye.x,m.eye.y,m.eye.z],up:[m.up.x,m.up.y,m.up.z],zoomMin:.1,zoomMax:100,mode:\\\"orbit\\\"})}return t.glplot.camera=t.camera,t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(t){var e,r=t.svgContainer,n=t.container.getBoundingClientRect(),i=n.width,a=n.height;r.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 \\\"+i+\\\" \\\"+a),r.setAttributeNS(null,\\\"width\\\",i),r.setAttributeNS(null,\\\"height\\\",a),y(t),t.glplot.axes.update(t.axesOptions);for(var o,s=Object.keys(t.traces),l=null,c=t.glplot.selection,h=0;h<s.length;++h)\\\"skip\\\"!==(e=t.traces[s[h]]).data.hoverinfo&&e.handlePick(c)&&(l=e),e.setContourLevels&&e.setContourLevels();function p(e,r){var n=t.fullSceneLayout[e];return u.tickText(n,n.d2l(r),\\\"hover\\\").text}if(null!==l){var d=g(t.glplot.cameraParams,c.dataCoordinate);e=l.data;var v,m=c.index,x=f.castHoverinfo(e,t.fullLayout,m),b=x.split(\\\"+\\\"),_=\\\"all\\\"===x,w=p(\\\"xaxis\\\",c.traceCoordinate[0]),k=p(\\\"yaxis\\\",c.traceCoordinate[1]),M=p(\\\"zaxis\\\",c.traceCoordinate[2]);if(_||(-1===b.indexOf(\\\"x\\\")&&(w=void 0),-1===b.indexOf(\\\"y\\\")&&(k=void 0),-1===b.indexOf(\\\"z\\\")&&(M=void 0),-1===b.indexOf(\\\"text\\\")&&(c.textLabel=void 0),-1===b.indexOf(\\\"name\\\")&&(l.name=void 0)),\\\"cone\\\"===e.type||\\\"streamtube\\\"===e.type){var A=[];(_||-1!==b.indexOf(\\\"u\\\"))&&A.push(\\\"u: \\\"+p(\\\"xaxis\\\",c.traceCoordinate[3])),(_||-1!==b.indexOf(\\\"v\\\"))&&A.push(\\\"v: \\\"+p(\\\"yaxis\\\",c.traceCoordinate[4])),(_||-1!==b.indexOf(\\\"w\\\"))&&A.push(\\\"w: \\\"+p(\\\"zaxis\\\",c.traceCoordinate[5])),(_||-1!==b.indexOf(\\\"norm\\\"))&&A.push(\\\"norm: \\\"+c.traceCoordinate[6].toPrecision(3)),\\\"streamtube\\\"!==e.type||!_&&-1===b.indexOf(\\\"divergence\\\")||A.push(\\\"divergence: \\\"+c.traceCoordinate[7].toPrecision(3)),c.textLabel&&A.push(c.textLabel),v=A.join(\\\"<br>\\\")}else v=c.textLabel;t.fullSceneLayout.hovermode&&f.loneHover({x:(.5+.5*d[0]/d[3])*i,y:(.5-.5*d[1]/d[3])*a,xLabel:w,yLabel:k,zLabel:M,text:v,name:l.name,color:f.castHoverOption(e,m,\\\"bgcolor\\\")||l.color,borderColor:f.castHoverOption(e,m,\\\"bordercolor\\\"),fontFamily:f.castHoverOption(e,m,\\\"font.family\\\"),fontSize:f.castHoverOption(e,m,\\\"font.size\\\"),fontColor:f.castHoverOption(e,m,\\\"font.color\\\")},{container:r,gd:t.graphDiv});var T={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:e._input,fullData:e,curveNumber:e.index,pointNumber:m};e._module.eventData&&(T=e._module.eventData(T,c,e,{},m)),f.appendArrayPointValue(T,e,m);var S={points:[T]};c.buttons&&c.distance<5?t.graphDiv.emit(\\\"plotly_click\\\",S):t.graphDiv.emit(\\\"plotly_hover\\\",S),o=S}else f.loneUnhover(r),t.graphDiv.emit(\\\"plotly_unhover\\\",o);t.drawAnnotations(t)}.bind(null,t),t.traces={},!0}function b(t,e){var r=document.createElement(\\\"div\\\"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",\\\"svg\\\");i.style.position=\\\"absolute\\\",i.style.top=i.style.left=\\\"0px\\\",i.style.width=i.style.height=\\\"100%\\\",i.style[\\\"z-index\\\"]=20,i.style[\\\"pointer-events\\\"]=\\\"none\\\",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position=\\\"absolute\\\",r.style.top=r.style.left=\\\"0px\\\",r.style.width=r.style.height=\\\"100%\\\",n.appendChild(r),this.fullLayout=e,this.id=t.id||\\\"scene\\\",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=v(e[this.id]),this.spikeOptions=m(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=l.getComponentMethod(\\\"annotations3d\\\",\\\"convert\\\"),this.drawAnnotations=l.getComponentMethod(\\\"annotations3d\\\",\\\"draw\\\"),x(this)}var _=b.prototype;_.recoverContext=function(){var t=this,e=this.glplot.gl,r=this.glplot.canvas;this.glplot.dispose(),requestAnimationFrame(function n(){e.isContextLost()?requestAnimationFrame(n):x(t,t.fullLayout,r,e)?t.plot.apply(t,t.plotArgs):c.error(\\\"Catastrophic and unrecoverable WebGL error. Context lost.\\\")})};var w=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"];function k(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=w[i],o=a.charAt(0),s=n[a],l=e[o],u=e[o+\\\"calendar\\\"],f=e[\\\"_\\\"+o+\\\"length\\\"];if(c.isArrayOrTypedArray(l))for(var h,p=0;p<(f||l.length);p++)if(c.isArrayOrTypedArray(l[p]))for(var d=0;d<l[p].length;++d)h=s.d2l(l[p][d],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else h=s.d2l(l[p],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],f-1)}}function M(t){return{up:{x:t.up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]}}}_.plot=function(t,e,r){if(this.plotArgs=[t,e,r],!this.glplot.contextLost){var n,i,a,o,s,l,c=e[this.id],u=r[this.id];c.bgcolor?this.glplot.clearColor=h(c.bgcolor):this.glplot.clearColor=[0,0,0,0],this.glplot.snapToData=!0,this.fullLayout=e,this.fullSceneLayout=c,this.glplotLayout=c,this.axesOptions.merge(c),this.spikeOptions.merge(c),this.setCamera(c.camera),this.updateFx(c.dragmode,c.hovermode),this.glplot.update({}),this.setConvert(s),t?Array.isArray(t)||(t=[t]):t=[];var f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;a<t.length;++a)!0===(n=t[a]).visible&&k(this,n,f);var p=[1,1,1];for(o=0;o<3;++o)f[1][o]===f[0][o]?p[o]=1:p[o]=1/(f[1][o]-f[0][o]);for(this.dataScale=p,this.convertAnnotations(this),a=0;a<t.length;++a)!0===(n=t[a]).visible&&((i=this.traces[n.uid])?i.data.type===n.type?i.update(n):(i.dispose(),i=n._module.plot(this,n),this.traces[n.uid]=i):(i=n._module.plot(this,n),this.traces[n.uid]=i),i.name=n.name);var d=Object.keys(this.traces);t:for(a=0;a<d.length;++a){for(o=0;o<t.length;++o)if(t[o].uid===d[a]&&!0===t[o].visible)continue t;(i=this.traces[d[a]]).dispose(),delete this.traces[d[a]]}this.glplot.objects.sort(function(t,e){return t._trace.data.index-e._trace.data.index});var g=[[0,0,0],[0,0,0]],v=[],m={};for(a=0;a<3;++a){if((l=(s=c[w[a]]).type)in m?(m[l].acc*=p[a],m[l].count+=1):m[l]={acc:p[a],count:1},s.autorange){g[0][a]=1/0,g[1][a]=-1/0;var y=this.glplot.objects,x=this.fullSceneLayout.annotations||[],b=s._name.charAt(0);for(o=0;o<y.length;o++){var _=y[o],M=_.bounds,A=_._trace.data._pad||0;\\\"ErrorBars\\\"===_.constructor.name&&s._lowerLogErrorBound?g[0][a]=Math.min(g[0][a],s._lowerLogErrorBound):g[0][a]=Math.min(g[0][a],M[0][a]/p[a]-A),g[1][a]=Math.max(g[1][a],M[1][a]/p[a]+A)}for(o=0;o<x.length;o++){var T=x[o];if(T.visible){var S=s.r2l(T[b]);g[0][a]=Math.min(g[0][a],S),g[1][a]=Math.max(g[1][a],S)}}if(\\\"rangemode\\\"in s&&\\\"tozero\\\"===s.rangemode&&(g[0][a]=Math.min(g[0][a],0),g[1][a]=Math.max(g[1][a],0)),g[0][a]>g[1][a])g[0][a]=-1,g[1][a]=1;else{var C=g[1][a]-g[0][a];g[0][a]-=C/32,g[1][a]+=C/32}if(\\\"reversed\\\"===s.autorange){var E=g[0][a];g[0][a]=g[1][a],g[1][a]=E}}else{var L=s.range;g[0][a]=s.r2l(L[0]),g[1][a]=s.r2l(L[1])}g[0][a]===g[1][a]&&(g[0][a]-=1,g[1][a]+=1),v[a]=g[1][a]-g[0][a],this.glplot.bounds[0][a]=g[0][a]*p[a],this.glplot.bounds[1][a]=g[1][a]*p[a]}var z=[1,1,1];for(a=0;a<3;++a){var O=m[l=(s=c[w[a]]).type];z[a]=Math.pow(O.acc,1/O.count)/p[a]}var I;if(\\\"auto\\\"===c.aspectmode)I=Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1];else if(\\\"cube\\\"===c.aspectmode)I=[1,1,1];else if(\\\"data\\\"===c.aspectmode)I=z;else{if(\\\"manual\\\"!==c.aspectmode)throw new Error(\\\"scene.js aspectRatio was not one of the enumerated types\\\");var P=c.aspectratio;I=[P.x,P.y,P.z]}c.aspectratio.x=u.aspectratio.x=I[0],c.aspectratio.y=u.aspectratio.y=I[1],c.aspectratio.z=u.aspectratio.z=I[2],this.glplot.aspect=I;var D=c.domain||null,R=e._size||null;if(D&&R){var B=this.container.style;B.position=\\\"absolute\\\",B.left=R.l+D.x[0]*R.w+\\\"px\\\",B.top=R.t+(1-D.y[1])*R.h+\\\"px\\\",B.width=R.w*(D.x[1]-D.x[0])+\\\"px\\\",B.height=R.h*(D.y[1]-D.y[0])+\\\"px\\\"}this.glplot.redraw()}},_.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\\\"wheel\\\",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},_.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),M(this.glplot.camera)},_.setCamera=function(t){var e;this.glplot.camera.lookAt.apply(this,[[(e=t).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]])},_.saveCamera=function(t){var e=this.getCamera(),r=c.nestedProperty(t,this.id+\\\".camera\\\"),n=r.get(),i=!1;function a(t,e,r,n){var i=[\\\"up\\\",\\\"center\\\",\\\"eye\\\"],a=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}if(void 0===n)i=!0;else for(var o=0;o<3;o++)for(var s=0;s<3;s++)if(!a(e,n,o,s)){i=!0;break}return i&&r.set(e),i},_.updateFx=function(t,e){var r=this.camera;r&&(\\\"orbit\\\"===t?(r.mode=\\\"orbit\\\",r.keyBindingMode=\\\"rotate\\\"):\\\"turntable\\\"===t?(r.up=[0,0,1],r.mode=\\\"turntable\\\",r.keyBindingMode=\\\"rotate\\\"):r.keyBindingMode=t),this.fullSceneLayout.hovermode=e},_.toImage=function(t){t||(t=\\\"png\\\"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var c=0;c<4;++c){var u=a[4*(r*o+l)+c];a[4*(r*o+l)+c]=a[4*(r*s+l)+c],a[4*(r*s+l)+c]=u}var f=document.createElement(\\\"canvas\\\");f.width=r,f.height=i;var h,p=f.getContext(\\\"2d\\\"),d=p.createImageData(r,i);switch(d.data.set(a),p.putImageData(d,0,0),t){case\\\"jpeg\\\":h=f.toDataURL(\\\"image/jpeg\\\");break;case\\\"webp\\\":h=f.toDataURL(\\\"image/webp\\\");break;default:h=f.toDataURL(\\\"image/png\\\")}return this.staticMode&&this.container.removeChild(n),h},_.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[w[t]];u.setConvert(e,this.fullLayout),e.setScale=c.noop}},e.exports=b},{\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../lib/show_no_webgl_msg\\\":718,\\\"../../lib/str2rgbarray\\\":720,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"./camera\\\":787,\\\"./layout/convert\\\":792,\\\"./layout/spikes\\\":795,\\\"./layout/tick_marks\\\":796,\\\"./project\\\":797,\\\"gl-plot3d\\\":277,\\\"has-passive-events\\\":394,\\\"webgl-context\\\":533}],799:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;a<n;a++)i[a]=[t[a],e[a],r[a]];return i}},{}],800:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./font_attributes\\\"),i=t(\\\"../components/color/attributes\\\"),a=n({editType:\\\"calc\\\"});a.family.dflt='\\\"Open Sans\\\", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=i.defaultLine,e.exports={font:a,title:{valType:\\\"string\\\",editType:\\\"layoutstyle\\\"},titlefont:n({editType:\\\"layoutstyle\\\"}),autosize:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"none\\\"},width:{valType:\\\"number\\\",min:10,dflt:700,editType:\\\"plot\\\"},height:{valType:\\\"number\\\",min:10,dflt:450,editType:\\\"plot\\\"},margin:{l:{valType:\\\"number\\\",min:0,dflt:80,editType:\\\"plot\\\"},r:{valType:\\\"number\\\",min:0,dflt:80,editType:\\\"plot\\\"},t:{valType:\\\"number\\\",min:0,dflt:100,editType:\\\"plot\\\"},b:{valType:\\\"number\\\",min:0,dflt:80,editType:\\\"plot\\\"},pad:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"plot\\\"},autoexpand:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},editType:\\\"plot\\\"},paper_bgcolor:{valType:\\\"color\\\",dflt:i.background,editType:\\\"plot\\\"},plot_bgcolor:{valType:\\\"color\\\",dflt:i.background,editType:\\\"layoutstyle\\\"},separators:{valType:\\\"string\\\",editType:\\\"plot\\\"},hidesources:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"plot\\\"},showlegend:{valType:\\\"boolean\\\",editType:\\\"legend\\\"},colorway:{valType:\\\"colorlist\\\",dflt:i.defaults,editType:\\\"calc\\\"},datarevision:{valType:\\\"any\\\",editType:\\\"calc\\\"},template:{valType:\\\"any\\\",editType:\\\"calc\\\"},modebar:{orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],dflt:\\\"h\\\",editType:\\\"modebar\\\"},bgcolor:{valType:\\\"color\\\",editType:\\\"modebar\\\"},color:{valType:\\\"color\\\",editType:\\\"modebar\\\"},activecolor:{valType:\\\"color\\\",editType:\\\"modebar\\\"},editType:\\\"modebar\\\"}}},{\\\"../components/color/attributes\\\":569,\\\"./font_attributes\\\":772}],801:[function(t,e,r){\\\"use strict\\\";e.exports={requiredVersion:\\\"0.45.0\\\",styleUrlPrefix:\\\"mapbox://styles/mapbox/\\\",styleUrlSuffix:\\\"v9\\\",controlContainerClassName:\\\"mapboxgl-control-container\\\",wrongVersionErrorMsg:[\\\"Your custom plotly.js bundle is not using the correct mapbox-gl version\\\",\\\"Please install mapbox-gl@0.45.0.\\\"].join(\\\"\\\\n\\\"),noAccessTokenErrorMsg:[\\\"Missing Mapbox access token.\\\",\\\"Mapbox trace type require a Mapbox access token to be registered.\\\",\\\"For example:\\\",\\\"  Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\\\",\\\"More info here: https://www.mapbox.com/help/define-access-token/\\\"].join(\\\"\\\\n\\\"),mapOnErrorMsg:\\\"Mapbox error.\\\",styleRules:{map:\\\"overflow:hidden;position:relative;\\\",\\\"missing-css\\\":\\\"display:none\\\"}}},{}],802:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e){var r=t.split(\\\" \\\"),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=[\\\"\\\",\\\"\\\"],u=[0,0];switch(i){case\\\"top\\\":c[0]=\\\"top\\\",u[1]=-l;break;case\\\"bottom\\\":c[0]=\\\"bottom\\\",u[1]=l}switch(a){case\\\"left\\\":c[1]=\\\"right\\\",u[0]=-s;break;case\\\"right\\\":c[1]=\\\"left\\\",u[0]=s}return{anchor:c[0]&&c[1]?c.join(\\\"-\\\"):c[0]?c[0]:c[1]?c[1]:\\\"center\\\",offset:u}}},{\\\"../../lib\\\":696}],803:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"mapbox-gl\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/get_data\\\").getSubplotCalcData,o=t(\\\"../../constants/xmlns_namespaces\\\"),s=t(\\\"./mapbox\\\"),l=t(\\\"./constants\\\");for(var c in l.styleRules)i.addStyleRule(\\\".mapboxgl-\\\"+c,l.styleRules[c]);r.name=\\\"mapbox\\\",r.attr=\\\"subplot\\\",r.idRoot=\\\"mapbox\\\",r.idRegex=r.attrRegex=i.counterRegex(\\\"mapbox\\\"),r.attributes={subplot:{valType:\\\"subplotid\\\",dflt:\\\"mapbox\\\",editType:\\\"calc\\\"}},r.layoutAttributes=t(\\\"./layout_attributes\\\"),r.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox;if(n.version!==l.requiredVersion)throw new Error(l.wrongVersionErrorMsg);var c=function(t,e){var r=t._fullLayout;if(\\\"\\\"===t._context.mapboxAccessToken)return\\\"\\\";for(var n=0;n<e.length;n++){var i=r[e[n]];if(i.accesstoken)return i.accesstoken}throw new Error(l.noAccessTokenErrorMsg)}(t,o);n.accessToken=c;for(var u=0;u<o.length;u++){var f=o[u],h=a(r,\\\"mapbox\\\",f),p=e[f],d=p._subplot;d||(d=s({gd:t,container:e._glcontainer.node(),id:f,fullLayout:e,staticPlot:t._context.staticPlot}),e[f]._subplot=d),d.viewInitial||(d.viewInitial={center:i.extendFlat({},p.center),zoom:p.zoom,bearing:p.bearing,pitch:p.pitch}),d.plot(h,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.mapbox||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],s=a.domain,l=a._subplot,c=l.toImage(\\\"png\\\");e._glimages.append(\\\"svg:image\\\").attr({xmlns:o.svg,\\\"xlink:href\\\":c,x:n.l+n.w*s.x[0],y:n.t+n.h*(1-s.y[1]),width:n.w*(s.x[1]-s.x[0]),height:n.h*(s.y[1]-s.y[0]),preserveAspectRatio:\\\"none\\\"}),l.destroy()}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n<r.length;n++){e[r[n]]._subplot.updateFx(e)}}},{\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../plots/get_data\\\":782,\\\"./constants\\\":801,\\\"./layout_attributes\\\":805,\\\"./layout_defaults\\\":806,\\\"./mapbox\\\":807,\\\"mapbox-gl\\\":409}],804:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./convert_text_opts\\\");function a(t,e){this.mapbox=t,this.map=t.map,this.uid=t.uid+\\\"-layer\\\"+e,this.idSource=this.uid+\\\"-source\\\",this.idLayer=this.uid+\\\"-layer\\\",this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var o=a.prototype;function s(t){var e=t.source;return t.visible&&(n.isPlainObject(e)||\\\"string\\\"==typeof e&&e.length>0)}function l(t){var e={},r={};switch(t.type){case\\\"circle\\\":n.extendFlat(r,{\\\"circle-radius\\\":t.circle.radius,\\\"circle-color\\\":t.color,\\\"circle-opacity\\\":t.opacity});break;case\\\"line\\\":n.extendFlat(r,{\\\"line-width\\\":t.line.width,\\\"line-color\\\":t.color,\\\"line-opacity\\\":t.opacity});break;case\\\"fill\\\":n.extendFlat(r,{\\\"fill-color\\\":t.color,\\\"fill-outline-color\\\":t.fill.outlinecolor,\\\"fill-opacity\\\":t.opacity});break;case\\\"symbol\\\":var a=t.symbol,o=i(a.textposition,a.iconsize);n.extendFlat(e,{\\\"icon-image\\\":a.icon+\\\"-15\\\",\\\"icon-size\\\":a.iconsize/10,\\\"text-field\\\":a.text,\\\"text-size\\\":a.textfont.size,\\\"text-anchor\\\":o.anchor,\\\"text-offset\\\":o.offset}),n.extendFlat(r,{\\\"icon-color\\\":t.color,\\\"text-color\\\":a.textfont.color,\\\"text-opacity\\\":t.opacity})}return{layout:e,paint:r}}o.update=function(t){this.visible?this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=s(t)},o.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},o.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},o.updateSource=function(t){var e=this.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,s(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,i={type:r};\\\"geojson\\\"===r?e=\\\"data\\\":\\\"vector\\\"===r&&(e=\\\"string\\\"==typeof n?\\\"url\\\":\\\"tiles\\\");return i[e]=n,i}(t);e.addSource(this.idSource,r)}},o.updateLayer=function(t){var e=this.map,r=l(t);this.removeLayer(),this.layerType=t.type,s(t)&&e.addLayer({id:this.idLayer,source:this.idSource,\\\"source-layer\\\":t.sourcelayer||\\\"\\\",type:t.type,layout:r.layout,paint:r.paint},t.below)},o.updateStyle=function(t){if(s(t)){var e=l(t);this.mapbox.setOptions(this.idLayer,\\\"setLayoutProperty\\\",e.layout),this.mapbox.setOptions(this.idLayer,\\\"setPaintProperty\\\",e.paint)}},o.removeLayer=function(){var t=this.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer)},o.dispose=function(){var t=this.map;t.removeLayer(this.idLayer),t.removeSource(this.idSource)},e.exports=function(t,e,r){var n=new a(t,e);return n.update(r),n}},{\\\"../../lib\\\":696,\\\"./convert_text_opts\\\":802}],805:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\").defaultLine,a=t(\\\"../domain\\\").attributes,o=t(\\\"../font_attributes\\\"),s=t(\\\"../../traces/scatter/attributes\\\").textposition,l=t(\\\"../../plot_api/edit_types\\\").overrideAll,c=t(\\\"../../plot_api/plot_template\\\").templatedArray,u=o({});u.family.dflt=\\\"Open Sans Regular, Arial Unicode MS Regular\\\",e.exports=l({_arrayAttrRegexps:[n.counterRegex(\\\"mapbox\\\",\\\".layers\\\",!0)],domain:a({name:\\\"mapbox\\\"}),accesstoken:{valType:\\\"string\\\",noBlank:!0,strict:!0},style:{valType:\\\"any\\\",values:[\\\"basic\\\",\\\"streets\\\",\\\"outdoors\\\",\\\"light\\\",\\\"dark\\\",\\\"satellite\\\",\\\"satellite-streets\\\"],dflt:\\\"basic\\\"},center:{lon:{valType:\\\"number\\\",dflt:0},lat:{valType:\\\"number\\\",dflt:0}},zoom:{valType:\\\"number\\\",dflt:1},bearing:{valType:\\\"number\\\",dflt:0},pitch:{valType:\\\"number\\\",dflt:0},layers:c(\\\"layer\\\",{visible:{valType:\\\"boolean\\\",dflt:!0},sourcetype:{valType:\\\"enumerated\\\",values:[\\\"geojson\\\",\\\"vector\\\"],dflt:\\\"geojson\\\"},source:{valType:\\\"any\\\"},sourcelayer:{valType:\\\"string\\\",dflt:\\\"\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"circle\\\",\\\"line\\\",\\\"fill\\\",\\\"symbol\\\"],dflt:\\\"circle\\\"},below:{valType:\\\"string\\\",dflt:\\\"\\\"},color:{valType:\\\"color\\\",dflt:i},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},circle:{radius:{valType:\\\"number\\\",dflt:15}},line:{width:{valType:\\\"number\\\",dflt:2}},fill:{outlinecolor:{valType:\\\"color\\\",dflt:i}},symbol:{icon:{valType:\\\"string\\\",dflt:\\\"marker\\\"},iconsize:{valType:\\\"number\\\",dflt:10},text:{valType:\\\"string\\\",dflt:\\\"\\\"},textfont:u,textposition:n.extendFlat({},s,{arrayOk:!1})}})},\\\"plot\\\",\\\"from-root\\\")},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plot_api/edit_types\\\":728,\\\"../../plot_api/plot_template\\\":735,\\\"../../traces/scatter/attributes\\\":1044,\\\"../domain\\\":771,\\\"../font_attributes\\\":772}],806:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../subplot_defaults\\\"),a=t(\\\"../array_container_defaults\\\"),o=t(\\\"./layout_attributes\\\");function s(t,e,r,n){r(\\\"accesstoken\\\",n.accessToken),r(\\\"style\\\"),r(\\\"center.lon\\\"),r(\\\"center.lat\\\"),r(\\\"zoom\\\"),r(\\\"bearing\\\"),r(\\\"pitch\\\"),a(t,e,{name:\\\"layers\\\",handleItemDefaults:l}),e._input=t}function l(t,e){function r(r,i){return n.coerce(t,e,o.layers,r,i)}if(r(\\\"visible\\\")){var i=r(\\\"sourcetype\\\");r(\\\"source\\\"),\\\"vector\\\"===i&&r(\\\"sourcelayer\\\");var a=r(\\\"type\\\");r(\\\"below\\\"),r(\\\"color\\\"),r(\\\"opacity\\\"),\\\"circle\\\"===a&&r(\\\"circle.radius\\\"),\\\"line\\\"===a&&r(\\\"line.width\\\"),\\\"fill\\\"===a&&r(\\\"fill.outlinecolor\\\"),\\\"symbol\\\"===a&&(r(\\\"symbol.icon\\\"),r(\\\"symbol.iconsize\\\"),r(\\\"symbol.text\\\"),n.coerceFont(r,\\\"symbol.textfont\\\"),r(\\\"symbol.textposition\\\"))}}e.exports=function(t,e,r){i(t,e,r,{type:\\\"mapbox\\\",attributes:o,handleDefaults:s,partition:\\\"y\\\",accessToken:e._mapboxAccessToken})}},{\\\"../../lib\\\":696,\\\"../array_container_defaults\\\":741,\\\"../subplot_defaults\\\":823,\\\"./layout_attributes\\\":805}],807:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"mapbox-gl\\\"),i=t(\\\"../../components/fx\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../components/dragelement\\\"),s=t(\\\"../cartesian/select\\\").prepSelect,l=t(\\\"../cartesian/select\\\").selectOnClick,c=t(\\\"./constants\\\"),u=t(\\\"./layout_attributes\\\"),f=t(\\\"./layers\\\");function h(t){this.id=t.id,this.gd=t.gd,this.container=t.container,this.isStatic=t.staticPlot;var e=t.fullLayout;this.uid=e._uid+\\\"-\\\"+this.id,this.opts=e[this.id],this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(e),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[]}var p=h.prototype;function d(t){var e=u.style.values,r=u.style.dflt,n={};return a.isPlainObject(t)?(n.id=t.id,n.style=t):\\\"string\\\"==typeof t?(n.id=t,n.style=-1!==e.indexOf(t)?g(t):t):(n.id=r,n.style=g(r)),n.transition={duration:0,delay:0},n}function g(t){return c.styleUrlPrefix+t+\\\"-\\\"+c.styleUrlSuffix}function v(t){return[t.lon,t.lat]}e.exports=function(t){return new h(t)},p.plot=function(t,e,r){var n,i=this,a=i.opts=e[this.id];i.map&&a.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash=[],i.layerList={}),n=i.map?new Promise(function(r,n){i.updateMap(t,e,r,n)}):new Promise(function(r,n){i.createMap(t,e,r,n)}),r.push(n)},p.createMap=function(t,e,r,a){var o=this,s=o.gd,u=o.opts,f=o.styleObj=d(u.style);o.accessToken=u.accesstoken;var h=o.map=new n.Map({container:o.div,style:f.style,center:v(u.center),zoom:u.zoom,bearing:u.bearing,pitch:u.pitch,interactive:!o.isStatic,preserveDrawingBuffer:o.isStatic,doubleClickZoom:!1,boxZoom:!1}),p=c.controlContainerClassName,g=o.div.getElementsByClassName(p)[0];if(o.div.removeChild(g),h._canvas.style.left=\\\"0px\\\",h._canvas.style.top=\\\"0px\\\",o.rejectOnError(a),h.once(\\\"load\\\",function(){o.updateData(t),o.updateLayout(e),o.resolveOnRender(r)}),!o.isStatic){var m=!1;h.on(\\\"moveend\\\",function(t){if(o.map){var e=o.getView();u._input.center=u.center=e.center,u._input.zoom=u.zoom=e.zoom,u._input.bearing=u.bearing=e.bearing,u._input.pitch=u.pitch=e.pitch,(t.originalEvent||m)&&x(e),m=!1}}),h.on(\\\"wheel\\\",function(){m=!0}),h.on(\\\"mousemove\\\",function(t){var e=o.div.getBoundingClientRect();t.clientX=t.point.x+e.left,t.clientY=t.point.y+e.top,t.target.getBoundingClientRect=function(){return e},o.xaxis.p2c=function(){return t.lngLat.lng},o.yaxis.p2c=function(){return t.lngLat.lat},i.hover(s,t,o.id)}),h.on(\\\"dragstart\\\",y),h.on(\\\"zoomstart\\\",y),h.on(\\\"dblclick\\\",function(){s.emit(\\\"plotly_doubleclick\\\",null);var t=o.viewInitial;h.setCenter(v(t.center)),h.setZoom(t.zoom),h.setBearing(t.bearing),h.setPitch(t.pitch);var e=o.getView();u._input.center=u.center=e.center,u._input.zoom=u.zoom=e.zoom,u._input.bearing=u.bearing=e.bearing,u._input.pitch=u.pitch=e.pitch,x(e)}),o.clearSelect=function(){s._fullLayout._zoomlayer.selectAll(\\\".select-outline\\\").remove()},o.onClickInPanFn=function(t){return function(e){var r=s._fullLayout.clickmode;r.indexOf(\\\"select\\\")>-1&&l(e.originalEvent,s,[o.xaxis],[o.yaxis],o.id,t),r.indexOf(\\\"event\\\")>-1&&i.click(s,e.originalEvent)}}}function y(){i.loneUnhover(e._toppaper)}function x(t){var e=o.id,r={};for(var n in t)r[e+\\\".\\\"+n]=t[n];s.emit(\\\"plotly_relayout\\\",r)}},p.updateMap=function(t,e,r,n){var i=this,a=i.map;i.rejectOnError(n);var o=d(i.opts.style);i.styleObj.id!==o.id?(i.styleObj=o,a.setStyle(o.style),a.once(\\\"styledata\\\",function(){i.traceHash={},i.updateData(t),i.updateLayout(e),i.resolveOnRender(r)})):(i.updateData(t),i.updateLayout(e),i.resolveOnRender(r))},p.updateData=function(t){var e,r,n,i,a=this.traceHash;for(n=0;n<t.length;n++){var o=t[n];(e=a[(r=o[0].trace).uid])?e.update(o):r._module&&(a[r.uid]=r._module.plot(this,o))}var s=Object.keys(a);t:for(n=0;n<s.length;n++){var l=s[n];for(i=0;i<t.length;i++)if(l===(r=t[i][0].trace).uid)continue t;(e=a[l]).dispose(),delete a[l]}},p.updateLayout=function(t){var e=this.map,r=this.opts;e.setCenter(v(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch),this.updateLayers(),this.updateFramework(t),this.updateFx(t),this.map.resize()},p.resolveOnRender=function(t){var e=this.map;e.on(\\\"render\\\",function r(){e.loaded()&&(e.off(\\\"render\\\",r),setTimeout(t,0))})},p.rejectOnError=function(t){var e=this.map;function r(){t(new Error(c.mapOnErrorMsg))}e.once(\\\"error\\\",r),e.once(\\\"style.error\\\",r),e.once(\\\"source.error\\\",r),e.once(\\\"tile.error\\\",r),e.once(\\\"layer.error\\\",r)},p.createFramework=function(t){var e=this,r=e.div=document.createElement(\\\"div\\\");r.id=e.uid,r.style.position=\\\"absolute\\\",e.container.appendChild(r),e.xaxis={_id:\\\"x\\\",c2p:function(t){return e.project(t).x}},e.yaxis={_id:\\\"y\\\",c2p:function(t){return e.project(t).y}},e.updateFramework(t)},p.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var i,l=t.dragmode;i=\\\"select\\\"===l?function(t,r){(t.range={})[e.id]=[u([r.xmin,r.ymin]),u([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(u)};var c=e.dragOptions;e.dragOptions=a.extendDeep(c||{},{element:e.div,gd:n,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:i},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\\\"click\\\",e.onClickInPanHandler),\\\"select\\\"===l||\\\"lasso\\\"===l?(r.dragPan.disable(),r.on(\\\"zoomstart\\\",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){s(t,r,n,e.dragOptions,l)},o.init(e.dragOptions)):(r.dragPan.enable(),r.off(\\\"zoomstart\\\",e.clearSelect),e.div.onmousedown=null,e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on(\\\"click\\\",e.onClickInPanHandler))}function u(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},p.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+\\\"px\\\",n.height=r.h*(e.y[1]-e.y[0])+\\\"px\\\",n.left=r.l+e.x[0]*r.w+\\\"px\\\",n.top=r.t+(1-e.y[1])*r.h+\\\"px\\\",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},p.updateLayers=function(){var t,e=this.opts.layers,r=this.layerList;if(e.length!==r.length){for(t=0;t<r.length;t++)r[t].dispose();for(r=this.layerList=[],t=0;t<e.length;t++)r.push(f(this,t,e[t]))}else for(t=0;t<e.length;t++)r[t].update(e[t])},p.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},p.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},p.setOptions=function(t,e,r){for(var n in r)this.map[e](t,n,r[n])},p.project=function(t){return this.map.project(new n.LngLat(t[0],t[1]))},p.getView=function(){var t=this.map,e=t.getCenter();return{center:{lon:e.lng,lat:e.lat},zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch()}}},{\\\"../../components/dragelement\\\":592,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../cartesian/select\\\":763,\\\"./constants\\\":801,\\\"./layers\\\":804,\\\"./layout_attributes\\\":805,\\\"mapbox-gl\\\":409}],808:[function(t,e,r){\\\"use strict\\\";e.exports={t:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},r:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},b:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},l:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},editType:\\\"arraydraw\\\"}},{}],809:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../registry\\\"),o=t(\\\"../plot_api/plot_schema\\\"),s=t(\\\"../plot_api/plot_template\\\"),l=t(\\\"../lib\\\"),c=t(\\\"../components/color\\\"),u=t(\\\"../constants/numerical\\\").BADNUM,f=t(\\\"../plots/cartesian/axis_ids\\\"),h=t(\\\"./animation_attributes\\\"),p=t(\\\"./frame_attributes\\\"),d=l.relinkPrivateKeys,g=l._,v=e.exports={};l.extendFlat(v,a),v.attributes=t(\\\"./attributes\\\"),v.attributes.type.values=v.allTypes,v.fontAttrs=t(\\\"./font_attributes\\\"),v.layoutAttributes=t(\\\"./layout_attributes\\\"),v.fontWeight=\\\"normal\\\";var m=v.transformsRegistry,y=t(\\\"./command\\\");v.executeAPICommand=y.executeAPICommand,v.computeAPICommandBindings=y.computeAPICommandBindings,v.manageCommandObserver=y.manageCommandObserver,v.hasSimpleAPICommandBindings=y.hasSimpleAPICommandBindings,v.redrawText=function(t){if(!((t=l.getGraphDiv(t)).data&&t.data[0]&&t.data[0].r))return new Promise(function(e){setTimeout(function(){a.getComponentMethod(\\\"annotations\\\",\\\"draw\\\")(t),a.getComponentMethod(\\\"legend\\\",\\\"draw\\\")(t),(t.calcdata||[]).forEach(function(t){t[0]&&t[0].t&&t[0].t.cb&&t[0].t.cb()}),e(v.previousPromises(t))},300)})},v.resize=function(t){return t=l.getGraphDiv(t),new Promise(function(e,r){function n(t){var e=window.getComputedStyle(t).display;return!e||\\\"none\\\"===e}t&&!n(t)||r(new Error(\\\"Resize must be passed a displayed plot div element.\\\")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._redrawTimer=setTimeout(function(){if(!t.layout||t.layout.width&&t.layout.height||n(t))e(t);else{delete t.layout.width,delete t.layout.height;var r=t.changed;t.autoplay=!0,a.call(\\\"relayout\\\",t,{autosize:!0}).then(function(){t.changed=r,e(t)})}},100)})},v.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})},v.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=l.ensureSingle(e._paper,\\\"text\\\",\\\"js-plot-link-container\\\",function(t){t.style({\\\"font-family\\\":'\\\"Open Sans\\\", Arial, sans-serif',\\\"font-size\\\":\\\"12px\\\",fill:c.defaultLine,\\\"pointer-events\\\":\\\"all\\\"}).each(function(){var t=n.select(this);t.append(\\\"tspan\\\").classed(\\\"js-link-to-tool\\\",!0),t.append(\\\"tspan\\\").classed(\\\"js-link-spacer\\\",!0),t.append(\\\"tspan\\\").classed(\\\"js-sourcelinks\\\",!0)})}),i=r.node(),a={y:e._paper.attr(\\\"height\\\")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(a[\\\"text-anchor\\\"]=\\\"start\\\",a.x=5):(a[\\\"text-anchor\\\"]=\\\"end\\\",a.x=e._paper.attr(\\\"width\\\")-7),r.attr(a);var o=r.select(\\\".js-link-to-tool\\\"),s=r.select(\\\".js-link-spacer\\\"),u=r.select(\\\".js-sourcelinks\\\");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text(\\\"\\\");var r=e.append(\\\"a\\\").attr({\\\"xlink:xlink:href\\\":\\\"#\\\",class:\\\"link--impt link--embedview\\\",\\\"font-weight\\\":\\\"bold\\\"}).text(t._context.linkText+\\\" \\\"+String.fromCharCode(187));if(t._context.sendData)r.on(\\\"click\\\",function(){v.sendDataToCloud(t)});else{var n=window.location.pathname.split(\\\"/\\\"),i=window.location.search;r.attr({\\\"xlink:xlink:show\\\":\\\"new\\\",\\\"xlink:xlink:href\\\":\\\"/\\\"+n[2].split(\\\".\\\")[0]+\\\"/\\\"+n[1]+i})}}(t,o),s.text(o.text()&&u.text()?\\\" - \\\":\\\"\\\")}},v.sendDataToCloud=function(t){t.emit(\\\"plotly_beforeexport\\\");var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL,r=n.select(t).append(\\\"div\\\").attr(\\\"id\\\",\\\"hiddenform\\\").style(\\\"display\\\",\\\"none\\\"),i=r.append(\\\"form\\\").attr({action:e+\\\"/external\\\",method:\\\"post\\\",target:\\\"_blank\\\"});return i.append(\\\"input\\\").attr({type:\\\"text\\\",name:\\\"data\\\"}).node().value=v.graphJson(t,!1,\\\"keepdata\\\"),i.node().submit(),r.remove(),t.emit(\\\"plotly_afterexport\\\"),!1};var x,b=[\\\"days\\\",\\\"shortDays\\\",\\\"months\\\",\\\"shortMonths\\\",\\\"periods\\\",\\\"dateTime\\\",\\\"date\\\",\\\"time\\\",\\\"decimal\\\",\\\"thousands\\\",\\\"grouping\\\",\\\"currency\\\"],_=[\\\"year\\\",\\\"month\\\",\\\"dayMonth\\\",\\\"dayMonthYear\\\"];function w(t,e){var r=t._context.locale,n=!1,i={};function o(t){for(var r=!0,a=0;a<e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&&(n=!0)}for(var s=0;s<2;s++){for(var l=t._context.locales,c=0;c<2;c++){var u=(l[r]||{}).format;if(u&&(o(u),n))break;l=a.localeRegistry}var f=r.split(\\\"-\\\")[0];if(n||f===r)break;r=f}return n||o(a.localeRegistry.en.format),i}function k(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var n=e[r],i=n._module||m[n.type];if(i&&i.makesData)return!0}return!1}function M(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=m[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function A(t){t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={})}function T(t){for(var e=0;e<t.length;e++)t[e].clearCalc()}v.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,i=t._fullLayout||{};if(i._skipDefaults)delete i._skipDefaults;else{var o,s=t._fullLayout={},c=t.layout||{},u=t._fullData||[],h=t._fullData=[],p=t.data||[],m=t.calcdata||[],y=t._context||{};t._transitionData||v.createTransitionData(t),s._dfltTitle={plot:g(t,\\\"Click to enter Plot title\\\"),x:g(t,\\\"Click to enter X axis title\\\"),y:g(t,\\\"Click to enter Y axis title\\\"),colorbar:g(t,\\\"Click to enter Colorscale title\\\"),annotation:g(t,\\\"new text\\\")},s._traceWord=g(t,\\\"trace\\\");var k=w(t,b);if(s._mapboxAccessToken=y.mapboxAccessToken,i._initialAutoSizeIsDone){var M=i.width,A=i.height;v.supplyLayoutGlobalDefaults(c,s,k),c.width||(s.width=M),c.height||(s.height=A),v.sanitizeMargins(s)}else{v.supplyLayoutGlobalDefaults(c,s,k);var T=!c.width||!c.height,S=s.autosize,C=y.autosizable;T&&(S||C)?v.plotAutoSize(t,c,s):T&&v.sanitizeMargins(s),!S&&T&&(c.width=s.width,c.height=s.height)}s._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),n.locale(t)}(k,s.separators),s._extraFormat=w(t,_),s._initialAutoSizeIsDone=!0,s._dataLength=p.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var E=s._subplots=function(){var t,e,r={};if(!x){x=[];var n=a.subplotsRegistry;for(var i in n){var o=n[i],s=o.attr;if(s&&(x.push(i),Array.isArray(s)))for(e=0;e<s.length;e++)l.pushUnique(x,s[e])}}for(t=0;t<x.length;t++)r[x[t]]=[];return r}(),L=s._splomAxes={x:{},y:{}},z=s._splomSubplots={};s._splomGridDflt={},s._scatterStackOpts={},s._firstScatter={},s._requestRangeslider={},s._traceUids=function(t,e){var r,n,i=e.length,a=[];for(r=0;r<t.length;r++){var o=t[r]._fullInput;o!==n&&a.push(o),n=o}var s=a.length,c=new Array(i),u={};function f(t,e){c[e]=t,u[t]=1}function h(t,e){if(t&&\\\"string\\\"==typeof t&&!u[t])return f(t,e),!0}for(r=0;r<i;r++)h(e[r].uid,r)||r<s&&h(a[r].uid,r)||f(l.randstr(u),r);return c}(u,p),s._globalTransforms=(t._context||{}).globalTransforms,v.supplyDataDefaults(p,h,c,s);var O=Object.keys(L.x),I=Object.keys(L.y);if(O.length>1&&I.length>1){for(a.getComponentMethod(\\\"grid\\\",\\\"sizeDefaults\\\")(c,s),o=0;o<O.length;o++)l.pushUnique(E.xaxis,O[o]);for(o=0;o<I.length;o++)l.pushUnique(E.yaxis,I[o]);for(var P in z)l.pushUnique(E.cartesian,P)}if(s._has=v._hasPlotType.bind(s),u.length===h.length)for(o=0;o<h.length;o++)d(h[o],u[o]);v.supplyLayoutModuleDefaults(c,s,h,t._transitionData);var D=s._visibleModules,R=[];for(o=0;o<D.length;o++){var B=D[o].crossTraceDefaults;B&&l.pushUnique(R,B)}for(o=0;o<R.length;o++)R[o](h,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&\\\"splom\\\"===s._basePlotModules[0].name&&O.length>15&&I.length>15&&0===s.shapes.length&&0===s.images.length,s._hasCartesian=s._has(\\\"cartesian\\\"),s._hasGeo=s._has(\\\"geo\\\"),s._hasGL3D=s._has(\\\"gl3d\\\"),s._hasGL2D=s._has(\\\"gl2d\\\"),s._hasTernary=s._has(\\\"ternary\\\"),s._hasPie=s._has(\\\"pie\\\"),v.linkSubplots(h,s,u,i),v.cleanPlot(h,s,u,i),d(s,i),v.doAutoMargin(t);var F=f.list(t);for(o=0;o<F.length;o++){F[o].setScale()}r||m.length!==h.length||v.supplyDefaultsUpdateCalc(m,h)}},v.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=t[r][0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o,s,c,u=a._arrayAttrs;for(o=0;o<u.length;o++)s=u[o],c=l.nestedProperty(a,s).get().slice(),l.nestedProperty(n,s).set(c)}i.trace=n}}},v.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},v._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var n=this._modules||[];for(e=0;e<n.length;e++){var i=n[e].name;if(i===t)return!0;var o=a.modules[i];if(o&&o.categories[t])return!0}return!1},v.cleanPlot=function(t,e,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(t,e,r,n)}var l=n._has&&n._has(\\\"gl\\\"),c=e._has&&e._has(\\\"gl\\\");l&&!c&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(\\\".gl-canvas\\\").remove(),n._glcontainer.selectAll(\\\".no-webgl\\\").remove(),n._glcanvas=null);var u=!!n._infolayer;t:for(i=0;i<r.length;i++){var f=r[i].uid;for(a=0;a<t.length;a++){if(f===t[a].uid)continue t}u&&n._infolayer.select(\\\".cb\\\"+f).remove()}n._zoomlayer&&n._zoomlayer.selectAll(\\\".select-outline\\\").remove()},v.linkSubplots=function(t,e,r,n){var i,a,o=n._plots||{},s=e._plots={},l=e._subplots,c={_fullData:t,_fullLayout:e},u=l.cartesian.concat(l.gl2d||[]);for(i=0;i<u.length;i++){var h,p=u[i],d=o[p],g=f.getFromId(c,p,\\\"x\\\"),v=f.getFromId(c,p,\\\"y\\\");for(d?h=s[p]=d:(h=s[p]={}).id=p,h.xaxis=g,h.yaxis=v,h._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var m=t[a];if(m.xaxis===h.xaxis._id&&m.yaxis===h.yaxis._id&&!1===m.cliponaxis){h._hasClipOnAxisFalse=!0;break}}}var y=f.list(c,null,!0);for(i=0;i<y.length;i++){var x=y[i],b=null;x.overlaying&&(b=f.getFromId(c,x.overlaying))&&b.overlaying&&(x.overlaying=!1,b=null),x._mainAxis=b||x,b&&(x.domain=b.domain.slice()),x._anchorAxis=\\\"free\\\"===x.anchor?null:f.getFromId(c,x.anchor)}},v.clearExpandedTraceDefaultColors=function(t){var e,r,n;for(r=[],(e=t._module._colorAttrs)||(t._module._colorAttrs=e=[],o.crawl(t._module.attributes,function(t,n,i,a){r[a]=n,r.length=a+1,\\\"color\\\"===t.valType&&void 0===t.dflt&&e.push(r.join(\\\".\\\"))})),n=0;n<e.length;n++){l.nestedProperty(t,\\\"_input.\\\"+e[n]).get()||l.nestedProperty(t,e[n]).set(null)}},v.supplyDataDefaults=function(t,e,r,n){var i,o,c,u=n._modules,f=n._visibleModules,h=n._basePlotModules,p=0,g=0;function m(t){e.push(t);var r=t._module;r&&(l.pushUnique(u,r),!0===t.visible&&l.pushUnique(f,r),l.pushUnique(h,t._module.basePlotModule),p++,!1!==t._input.visible&&g++)}n._transformModules=[];var y={},x=[],b=(r.template||{}).data||{},_=s.traceTemplater(b);for(i=0;i<t.length;i++){if(c=t[i],(o=_.newTrace(c)).uid=n._traceUids[i],v.supplyTraceDefaults(c,o,g,n,i),o.index=i,o._input=c,o._expandedIndex=p,o.transforms&&o.transforms.length)for(var w=!1!==c.visible&&!1===o.visible,k=M(o,e,r,n),A=0;A<k.length;A++){var T=k[A],S={_template:o._template,type:o.type,uid:o.uid+A};w&&!1===T.visible&&delete T.visible,v.supplyTraceDefaults(T,S,p,n,i),d(S,T),S.index=i,S._input=c,S._fullInput=o,S._expandedIndex=p,S._expandedInput=T,m(S)}else o._fullInput=o,o._expandedInput=o,m(o);a.traceIs(o,\\\"carpetAxis\\\")&&(y[o.carpet]=o),a.traceIs(o,\\\"carpetDependent\\\")&&x.push(i)}for(i=0;i<x.length;i++)if((o=e[x[i]]).visible){var C=y[o.carpet];o._carpet=C,C&&C.visible?(o.xaxis=C.xaxis,o.yaxis=C.yaxis):o.visible=!1}},v.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return l.coerce(t||{},r,h,e,n)}if(n(\\\"mode\\\"),n(\\\"direction\\\"),n(\\\"fromcurrent\\\"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=v.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=v.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=v.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=v.supplyAnimationTransitionDefaults(t.transition||{});return r},v.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return l.coerce(t||{},e,h.frame,r,n)}return r(\\\"duration\\\"),r(\\\"redraw\\\"),e},v.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return l.coerce(t||{},e,h.transition,r,n)}return r(\\\"duration\\\"),r(\\\"easing\\\"),e},v.supplyFrameDefaults=function(t){var e={};function r(r,n){return l.coerce(t,e,p,r,n)}return r(\\\"group\\\"),r(\\\"name\\\"),r(\\\"traces\\\"),r(\\\"baseframe\\\"),r(\\\"data\\\"),r(\\\"layout\\\"),e},v.supplyTraceDefaults=function(t,e,r,n,i){var o,s=n.colorway||c.defaults,u=s[r%s.length];function f(r,n){return l.coerce(t,e,v.attributes,r,n)}var h=f(\\\"visible\\\");f(\\\"type\\\"),f(\\\"name\\\",n._traceWord+\\\" \\\"+i);var p,d,g,m=v.getModule(e);if(e._module=m,m){var y=m.basePlotModule,x=y.attr,b=y.attributes;if(x&&b){var _=n._subplots,w=\\\"\\\";if(\\\"gl2d\\\"!==y.name||h){if(Array.isArray(x))for(o=0;o<x.length;o++){var k=x[o],M=l.coerce(t,e,b,k);_[k]&&l.pushUnique(_[k],M),w+=M}else w=l.coerce(t,e,b,x);_[y.name]&&l.pushUnique(_[y.name],w)}}}return h&&(f(\\\"customdata\\\"),f(\\\"ids\\\"),a.traceIs(e,\\\"showLegend\\\")?(e._dfltShowLegend=!0,f(\\\"showlegend\\\"),f(\\\"legendgroup\\\")):e._dfltShowLegend=!1,p=\\\"hoverlabel\\\",d=\\\"\\\",g=function(){a.getComponentMethod(\\\"fx\\\",\\\"supplyDefaults\\\")(t,e,u,n)},m&&p in m.attributes&&void 0===m.attributes[p]||(g&&\\\"function\\\"==typeof g?g():f(p,d)),m&&(m.supplyDefaults(t,e,u,n),l.coerceHoverinfo(t,e,n)),a.traceIs(e,\\\"noOpacity\\\")||f(\\\"opacity\\\"),a.traceIs(e,\\\"notLegendIsolatable\\\")&&(e.visible=!!e.visible),m&&m.selectPoints&&f(\\\"selectedpoints\\\"),v.supplyTransformDefaults(t,e,n)),e},v.hasMakesDataTransform=k,v.supplyTransformDefaults=function(t,e,r){if(e._length||k(t)){var n=r._globalTransforms||[],i=r._transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],c=0;c<o.length;c++){var u,f=o[c],h=f.type,p=m[h],d=!(f._module&&f._module===p),g=p&&\\\"function\\\"==typeof p.transform;p||l.warn(\\\"Unrecognized transform type \\\"+h+\\\".\\\"),p&&p.supplyDefaults&&(d||g)?((u=p.supplyDefaults(f,e,r,t)).type=h,u._module=p,l.pushUnique(i,p)):u=l.extendFlat({},f),s.push(u)}}},v.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return l.coerce(t,e,v.layoutAttributes,r,n)}var i=t.template;l.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data);var o=l.coerceFont(n,\\\"font\\\");n(\\\"title\\\",e._dfltTitle.plot),l.coerceFont(n,\\\"titlefont\\\",{family:o.family,size:Math.round(1.4*o.size),color:o.color}),n(\\\"autosize\\\",!(t.width&&t.height)),n(\\\"width\\\"),n(\\\"height\\\"),n(\\\"margin.l\\\"),n(\\\"margin.r\\\"),n(\\\"margin.t\\\"),n(\\\"margin.b\\\"),n(\\\"margin.pad\\\"),n(\\\"margin.autoexpand\\\"),t.width&&t.height&&v.sanitizeMargins(e),a.getComponentMethod(\\\"grid\\\",\\\"sizeDefaults\\\")(t,e),n(\\\"paper_bgcolor\\\"),n(\\\"separators\\\",r.decimal+r.thousands),n(\\\"hidesources\\\"),n(\\\"colorway\\\"),n(\\\"datarevision\\\"),n(\\\"modebar.orientation\\\"),n(\\\"modebar.bgcolor\\\",c.addOpacity(e.paper_bgcolor,.5));var s=c.contrast(c.rgb(e.modebar.bgcolor));n(\\\"modebar.color\\\",c.addOpacity(s,.3)),n(\\\"modebar.activecolor\\\",c.addOpacity(s,.7)),a.getComponentMethod(\\\"calendars\\\",\\\"handleDefaults\\\")(t,e,\\\"calendar\\\"),a.getComponentMethod(\\\"fx\\\",\\\"supplyLayoutGlobalDefaults\\\")(t,e,n)},v.plotAutoSize=function(t,e,r){var n,a,o=t._context||{},s=o.frameMargins,c=l.isPlotDiv(t);if(c&&t.emit(\\\"plotly_autosize\\\"),o.fillFrame)n=window.innerWidth,a=window.innerHeight,document.body.style.overflow=\\\"hidden\\\";else{var u=c?window.getComputedStyle(t):{};if(n=parseFloat(u.width)||parseFloat(u.maxWidth)||r.width,a=parseFloat(u.height)||parseFloat(u.maxHeight)||r.height,i(s)&&s>0){var f=1-2*s;n=Math.round(f*n),a=Math.round(f*a)}}var h=v.layoutAttributes.width.min,p=v.layoutAttributes.height.min;n<h&&(n=h),a<p&&(a=p);var d=!e.width&&Math.abs(r.width-n)>1,g=!e.height&&Math.abs(r.height-a)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=a)),t._initialAutoSize||(t._initialAutoSize={width:n,height:a}),v.sanitizeMargins(r)},v.supplyLayoutModuleDefaults=function(t,e,r,n){var i,o,s,c=a.componentsRegistry,u=e._basePlotModules,f=a.subplotsRegistry.cartesian;for(i in c)(s=c[i]).includeBasePlot&&s.includeBasePlot(t,e);for(var h in u.length||u.push(f),e._has(\\\"cartesian\\\")&&(a.getComponentMethod(\\\"grid\\\",\\\"contentDefaults\\\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(l.subplotSort);for(o=0;o<u.length;o++)(s=u[o]).supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var p=e._modules;for(o=0;o<p.length;o++)(s=p[o]).supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var d=e._transformModules;for(o=0;o<d.length;o++)(s=d[o]).supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r,n);for(i in c)(s=c[i]).supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r)},v.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&&(e._glcontainer.selectAll(\\\".gl-canvas\\\").remove(),e._glcontainer.remove(),e._glcanvas=null),void 0!==e._geocontainer&&e._geocontainer.remove(),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),l.clearThrottle(),l.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.framework,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},v.style=function(t){var e,r=t._fullLayout._visibleModules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&l.pushUnique(n,i.style)}for(e=0;e<n.length;e++)n[e](t)},v.sanitizeMargins=function(t){if(t&&t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a<0&&(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},v.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}},v.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1},v.autoMargin=function(t,e,r){var n=t._fullLayout;A(n);var i=n._pushmargin,a=n._pushmarginIds;if(!1!==n.margin.autoexpand){if(r){var o=r.pad;if(void 0===o){var s=n.margin;o=Math.min(12,s.l,s.r,s.t,s.b)}r.l+r.r>.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0);var l=void 0!==r.xl?r.xl:r.x,c=void 0!==r.xr?r.xr:r.x,u=void 0!==r.yt?r.yt:r.y,f=void 0!==r.yb?r.yb:r.y;i[e]={l:{val:l,size:r.l+o},r:{val:c,size:r.r+o},b:{val:f,size:r.b+o},t:{val:u,size:r.t+o}},a[e]=1}else delete i[e],delete a[e];n._replotting||v.doAutoMargin(t)}},v.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),A(e);var r=e._size,n=JSON.stringify(r),o=Math.max(e.margin.l||0,0),s=Math.max(e.margin.r||0,0),l=Math.max(e.margin.t||0,0),c=Math.max(e.margin.b||0,0),u=e._pushmargin,f=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var h in u)f[h]||delete u[h];for(var p in u.base={l:{val:0,size:o},r:{val:1,size:s},t:{val:1,size:l},b:{val:0,size:c}},u){var d=u[p].l||{},g=u[p].b||{},v=d.val,m=d.size,y=g.val,x=g.size;for(var b in u){if(i(m)&&u[b].r){var _=u[b].r.val,w=u[b].r.size;if(_>v){var k=(m*_+(w-e.width)*v)/(_-v),M=(w*(1-v)+(m-e.width)*(1-_))/(_-v);k>=0&&M>=0&&k+M>o+s&&(o=k,s=M)}}if(i(x)&&u[b].t){var T=u[b].t.val,S=u[b].t.size;if(T>y){var C=(x*T+(S-e.height)*y)/(T-y),E=(S*(1-y)+(x-e.height)*(1-T))/(T-y);C>=0&&E>=0&&C+E>c+l&&(c=C,l=E)}}}}}if(r.l=Math.round(o),r.r=Math.round(s),r.t=Math.round(l),r.b=Math.round(c),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&\\\"{}\\\"!==n&&n!==JSON.stringify(e._size))return\\\"_redrawFromAutoMarginCount\\\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1,a.call(\\\"plot\\\",t)},v.graphJson=function(t,e,r,n,i){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&v.supplyDefaults(t);var a=i?t._fullData:t.data,o=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function c(t){if(\\\"function\\\"==typeof t)return null;if(l.isPlainObject(t)){var e,n,i={};for(e in t)if(\\\"function\\\"!=typeof t[e]&&-1===[\\\"_\\\",\\\"[\\\"].indexOf(e.charAt(0))){if(\\\"keepdata\\\"===r){if(\\\"src\\\"===e.substr(e.length-3))continue}else if(\\\"keepstream\\\"===r){if(\\\"string\\\"==typeof(n=t[e+\\\"src\\\"])&&n.indexOf(\\\":\\\")>0&&!l.isPlainObject(t.stream))continue}else if(\\\"keepall\\\"!==r&&\\\"string\\\"==typeof(n=t[e+\\\"src\\\"])&&n.indexOf(\\\":\\\")>0)continue;i[e]=c(t[e])}return i}return Array.isArray(t)?t.map(c):l.isTypedArray(t)?l.simpleMap(t,l.identity):l.isJSDate(t)?l.ms2DateTimeLocal(+t):t}var u={data:(a||[]).map(function(t){var r=c(t);return e&&delete r.fit,r})};return e||(u.layout=c(o)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=c(s)),\\\"object\\\"===n?u:JSON.stringify(u)},v.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch((n=e[r]).type){case\\\"replace\\\":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case\\\"insert\\\":o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case\\\"delete\\\":delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},v.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error(\\\"computeFrame must be given a string frame name\\\");var s=o[e.toString()];if(!s)return!1;for(var l=[s],c=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===c.indexOf(s.name);)l.push(s),c.push(s.name);for(var u={};s=l.pop();)if(s.layout&&(u.layout=v.extendLayout(u.layout,s.layout)),s.data){if(u.data||(u.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(u.traces||(u.traces=[]),r=0;r<s.data.length;r++)null!=(i=n[r])&&(-1===(a=u.traces.indexOf(i))&&(a=u.data.length,u.traces[a]=i),u.data[a]=v.extendTrace(u.data[a],s.data[r]))}return u},v.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(e[i.name]=i)}},v.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,c,u,f=l.extendDeepNoArrays({},e||{}),h=l.expandObjectPaths(f),p={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=l.nestedProperty(h,r[a])).get())?l.nestedProperty(p,r[a]).set(null):(n.set(null),l.nestedProperty(p,r[a]).set(i));if(t=l.extendDeepNoArrays(t||{},h),r&&r.length)for(a=0;a<r.length;a++)if(c=l.nestedProperty(p,r[a]).get()){for(u=(s=l.nestedProperty(t,r[a])).get(),Array.isArray(u)||(u=[],s.set(u)),o=0;o<c.length;o++){var d=c[o];u[o]=null===d?null:v.extendObjectWithContainers(u[o],d)}s.set(u)}return t},v.dataArrayContainers=[\\\"transforms\\\",\\\"dimensions\\\"],v.layoutArrayContainers=a.layoutArrayContainers,v.extendTrace=function(t,e){return v.extendObjectWithContainers(t,e,v.dataArrayContainers)},v.extendLayout=function(t,e){return v.extendObjectWithContainers(t,e,v.layoutArrayContainers)},v.transition=function(t,e,r,n,i,o){var s,c,u=Array.isArray(e)?e.length:0,f=n.slice(0,u),h=[];var p=!1;for(s=0;s<f.length;s++){c=f[s];t._fullData[c]._module}var d=[v.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},function(){var n;for(n=0;n<f.length;n++){var i=f[n],a=t._fullData[i]._module;a&&(a.animatable&&h.push(i),t.data[f[n]]=v.extendTrace(t.data[f[n]],e[n]))}var o=l.expandObjectPaths(l.extendDeepNoArrays({},r)),s=/^[xy]axis[0-9]*$/;for(var c in o)s.test(c)&&delete o[c].range;return v.extendLayout(t.layout,o),delete t.calcdata,v.supplyDefaults(t),v.doCalcdata(t),Promise.resolve()},v.rehover,function(){return t.emit(\\\"plotly_transitioning\\\",[]),new Promise(function(e){t._transitioning=!0,o.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){p=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return a.call(\\\"redraw\\\",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit(\\\"plotly_transitioninterrupted\\\",[])});var n,s,c=0,u=0;function f(){return c++,function(){var r;u++,p||u!==c||(r=e,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(i.redraw)return a.call(\\\"redraw\\\",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\\\"plotly_transitioned\\\",[])}).then(r)))}}var d=t._fullLayout._basePlotModules,g=!1;if(r)for(s=0;s<d.length;s++)if(d[s].transitionAxes){var v=l.expandObjectPaths(r);g=d[s].transitionAxes(t,v,o,f)||g}for(g?((n=l.extendFlat({},o)).duration=0,h=null):n=o,s=0;s<d.length;s++)d[s].plot(t,h,n,f);setTimeout(f())})}],g=l.syncOrAsync(d,t);return g&&g.then||(g=Promise.resolve()),g.then(function(){return t})},v.doCalcdata=function(t,e){var r,n,i,s,c=f.list(t),h=t._fullData,p=t._fullLayout,d=new Array(h.length),g=(t.calcdata||[]).slice(0);for(t.calcdata=d,p._numBoxes=0,p._numViolins=0,p._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,p._piecolormap={},i=0;i<h.length;i++)Array.isArray(e)&&-1===e.indexOf(i)&&(d[i]=g[i]);for(i=0;i<h.length;i++)(r=h[i])._arrayAttrs=o.findArrayAttributes(r),r._extremes={};var v=p._subplots.polar||[];for(i=0;i<v.length;i++)c.push(p[v[i]].radialaxis,p[v[i]].angularaxis);T(c);var y=!1;for(i=0;i<h.length;i++)if(!0===(r=h[i]).visible&&r.transforms){if((n=r._module)&&n.calc){var x=n.calc(t,r);x[0]&&x[0].t&&x[0].t._scene&&delete x[0].t._scene.dirty}for(s=0;s<r.transforms.length;s++){var b=r.transforms[s];(n=m[b.type])&&n.calcTransform&&(r._hasCalcTransform=!0,y=!0,n.calcTransform(t,r,b))}}function _(e,i){if(r=h[e],!!(n=r._module).isContainer===i){var a=[];if(!0===r.visible){delete r._indexToPoints;var o=r.transforms||[];for(s=o.length-1;s>=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(a=n.calc(t,r))}Array.isArray(a)&&a[0]||(a=[{x:u,y:u}]),a[0].t||(a[0].t={}),a[0].trace=r,d[e]=a}}for(y&&T(c),i=0;i<h.length;i++)_(i,!0);for(i=0;i<h.length;i++)_(i,!1);!function(t){var e,r,n,i=t._fullLayout,a=i._visibleModules,o={};for(r=0;r<a.length;r++){var s=a[r],c=s.crossTraceCalc;if(c){var u=s.basePlotModule.name;o[u]?l.pushUnique(o[u],c):o[u]=[c]}}for(n in o){var f=o[n],h=i._subplots[n];if(Array.isArray(h))for(e=0;e<h.length;e++){var p=h[e],d=\\\"cartesian\\\"===n?i._plots[p]:i[p];for(r=0;r<f.length;r++)f[r](t,d,p)}else for(r=0;r<f.length;r++)f[r](t)}}(t),a.getComponentMethod(\\\"fx\\\",\\\"calc\\\")(t),a.getComponentMethod(\\\"errorbars\\\",\\\"calc\\\")(t)},v.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()},v.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i<r.length;i++){var s=r[i],c=s[0].trace;c.visible&&(o[c.type]=o[c.type]||[],o[c.type].push(s))}for(var u in a)if(!o[u]){var f=a[u][0];f[0].trace.visible=!1,o[u]=[f]}for(var h in o){var p=o[h];p[0][0].trace._module.plot(t,e,l.filterVisible(p),n)}e.traceHash=o}},{\\\"../components/color\\\":570,\\\"../constants/numerical\\\":673,\\\"../lib\\\":696,\\\"../plot_api/plot_schema\\\":734,\\\"../plot_api/plot_template\\\":735,\\\"../plots/cartesian/axis_ids\\\":748,\\\"../registry\\\":828,\\\"./animation_attributes\\\":740,\\\"./attributes\\\":742,\\\"./command\\\":770,\\\"./font_attributes\\\":772,\\\"./frame_attributes\\\":773,\\\"./layout_attributes\\\":800,d3:148,\\\"fast-isnumeric\\\":214}],810:[function(t,e,r){\\\"use strict\\\";e.exports={attr:\\\"subplot\\\",name:\\\"polar\\\",axisNames:[\\\"angularaxis\\\",\\\"radialaxis\\\"],axisName2dataArray:{angularaxis:\\\"theta\\\",radialaxis:\\\"r\\\"},layerNames:[\\\"draglayer\\\",\\\"plotbg\\\",\\\"backplot\\\",\\\"angular-grid\\\",\\\"radial-grid\\\",\\\"frontplot\\\",\\\"angular-line\\\",\\\"radial-line\\\",\\\"angular-axis\\\",\\\"radial-axis\\\"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},{}],811:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../lib/polygon\\\").tester,a=n.findIndexOfMin,o=n.isAngleInsideSector,s=n.angleDelta,l=n.angleDist;function c(t,e,r,n){var i,a,o=n[0],s=n[1],l=f(Math.sin(e)-Math.sin(t)),c=f(Math.cos(e)-Math.cos(t)),u=Math.tan(r),h=f(1/u),p=l/c,d=s-p*o;return h?l&&c?a=u*(i=d/(u-p)):c?(i=s*h,a=s):(i=o,a=o*u):l&&c?(i=0,a=d):c?(i=0,a=s):i=a=NaN,[i,a]}function u(t,e,r,i){return n.isFullCircle([e,r])?function(t,e){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;r++){var a=e[r];i[r]=[t*Math.cos(a),t*Math.sin(a)]}return i[r]=i[0].slice(),i}(t,i):function(t,e,r,i){var s,u,f=i.length,h=[];function p(e){return[t*Math.cos(e),t*Math.sin(e)]}function d(t,e,r){return c(t,e,r,p(t))}function g(t){return n.mod(t,f)}function v(t){return o(t,[e,r])}var m=a(i,function(t){return v(t)?l(t,e):1/0}),y=d(i[m],i[g(m-1)],e);for(h.push(y),s=m,u=0;u<f;s++,u++){var x=i[g(s)];if(!v(x))break;h.push(p(x))}var b=a(i,function(t){return v(t)?l(t,r):1/0}),_=d(i[b],i[g(b+1)],r);return h.push(_),h.push([0,0]),h.push(h[0].slice()),h}(t,e,r,i)}function f(t){return Math.abs(t)>1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a<n;a++){var o=t[a];i[a]=[e+o[0],r-o[1]]}return i}e.exports={isPtInsidePolygon:function(t,e,r,n,a){if(!o(e,n))return!1;var s,l;r[0]<r[1]?(s=r[0],l=r[1]):(s=r[1],l=r[0]);var c=i(u(s,n[0],n[1],a)),f=i(u(l,n[0],n[1],a)),h=[t*Math.cos(e),t*Math.sin(e)];return f.contains(h)&&!c.contains(h)},findPolygonOffset:function(t,e,r,n){for(var i=1/0,a=1/0,o=u(t,e,r,n),s=0;s<o.length;s++){var l=o[s];i=Math.min(i,l[0]),a=Math.min(a,-l[1])}return[i,a]},findEnclosingVertexAngles:function(t,e){var r=a(e,function(e){var r=s(e,t);return r>0?r:1/0}),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,e*c+i+n],[u,e*u+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return\\\"M\\\"+h(u(t,e,r,n),i,a).join(\\\"L\\\")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t<e?(s=t,l=e):(s=e,l=t);var c=h(u(s,r,n,i),a,o);return\\\"M\\\"+h(u(l,r,n,i),a,o).reverse().join(\\\"L\\\")+\\\"M\\\"+c.join(\\\"L\\\")}}},{\\\"../../lib\\\":696,\\\"../../lib/polygon\\\":709}],812:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../get_data\\\").getSubplotCalcData,i=t(\\\"../../lib\\\").counterRegex,a=t(\\\"./polar\\\"),o=t(\\\"./constants\\\"),s=o.attr,l=o.name,c=i(l),u={};u[s]={valType:\\\"subplotid\\\",dflt:l,editType:\\\"calc\\\"},e.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:t(\\\"./layout_attributes\\\"),supplyLayoutDefaults:t(\\\"./layout_defaults\\\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o<i.length;o++){var s=i[o],c=n(r,l,s),u=e[s]._subplot;u||(u=a(t,s),e[s]._subplot=u),u.plot(c,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=n._has&&n._has(\\\"gl\\\"),o=e._has&&e._has(\\\"gl\\\"),s=a&&!o,c=0;c<i.length;c++){var u=i[c],f=n[u]._subplot;if(!e[u]&&f)for(var h in f.framework.remove(),f.layers[\\\"radial-axis-title\\\"].remove(),f.clipPaths)f.clipPaths[h].remove();s&&f._scene&&(f._scene.destroy(),f._scene=null)}},toSVG:t(\\\"../cartesian\\\").toSVG}},{\\\"../../lib\\\":696,\\\"../cartesian\\\":757,\\\"../get_data\\\":782,\\\"./constants\\\":810,\\\"./layout_attributes\\\":813,\\\"./layout_defaults\\\":814,\\\"./polar\\\":821}],813:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color/attributes\\\"),i=t(\\\"../cartesian/layout_attributes\\\"),a=t(\\\"../domain\\\").attributes,o=t(\\\"../../lib\\\").extendFlat,s=t(\\\"../../plot_api/edit_types\\\").overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth},\\\"plot\\\",\\\"from-root\\\"),c=s({tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,layer:i.layer},\\\"plot\\\",\\\"from-root\\\"),u={visible:o({},i.visible,{dflt:!0}),type:i.type,autorange:o({},i.autorange,{editType:\\\"plot\\\"}),rangemode:{valType:\\\"enumerated\\\",values:[\\\"tozero\\\",\\\"nonnegative\\\",\\\"normal\\\"],dflt:\\\"tozero\\\",editType:\\\"calc\\\"},range:o({},i.range,{items:[{valType:\\\"any\\\",editType:\\\"plot\\\",impliedEdits:{\\\"^autorange\\\":!1}},{valType:\\\"any\\\",editType:\\\"plot\\\",impliedEdits:{\\\"^autorange\\\":!1}}],editType:\\\"plot\\\"}),categoryorder:i.categoryorder,categoryarray:i.categoryarray,angle:{valType:\\\"angle\\\",editType:\\\"plot\\\"},side:{valType:\\\"enumerated\\\",values:[\\\"clockwise\\\",\\\"counterclockwise\\\"],dflt:\\\"clockwise\\\",editType:\\\"plot\\\"},title:o({},i.title,{editType:\\\"plot\\\",dflt:\\\"\\\"}),titlefont:s(i.titlefont,\\\"plot\\\",\\\"from-root\\\"),hoverformat:i.hoverformat,editType:\\\"calc\\\"};o(u,l,c);var f={visible:o({},i.visible,{dflt:!0}),type:{valType:\\\"enumerated\\\",values:[\\\"-\\\",\\\"linear\\\",\\\"category\\\"],dflt:\\\"-\\\",editType:\\\"calc\\\",_noTemplating:!0},categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:\\\"enumerated\\\",values:[\\\"radians\\\",\\\"degrees\\\"],dflt:\\\"degrees\\\",editType:\\\"calc\\\"},period:{valType:\\\"number\\\",editType:\\\"calc\\\",min:0},direction:{valType:\\\"enumerated\\\",values:[\\\"counterclockwise\\\",\\\"clockwise\\\"],dflt:\\\"counterclockwise\\\",editType:\\\"calc\\\"},rotation:{valType:\\\"angle\\\",editType:\\\"calc\\\"},hoverformat:i.hoverformat,editType:\\\"calc\\\"};o(f,l,c),e.exports={domain:a({name:\\\"polar\\\",editType:\\\"plot\\\"}),sector:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\",editType:\\\"plot\\\"},{valType:\\\"number\\\",editType:\\\"plot\\\"}],dflt:[0,360],editType:\\\"plot\\\"},hole:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"plot\\\"},bgcolor:{valType:\\\"color\\\",editType:\\\"plot\\\",dflt:n.background},radialaxis:u,angularaxis:f,gridshape:{valType:\\\"enumerated\\\",values:[\\\"circular\\\",\\\"linear\\\"],dflt:\\\"circular\\\",editType:\\\"plot\\\"},editType:\\\"calc\\\"}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib\\\":696,\\\"../../plot_api/edit_types\\\":728,\\\"../cartesian/layout_attributes\\\":758,\\\"../domain\\\":771}],814:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../plot_api/plot_template\\\"),o=t(\\\"../subplot_defaults\\\"),s=t(\\\"../get_data\\\").getSubplotData,l=t(\\\"../cartesian/tick_value_defaults\\\"),c=t(\\\"../cartesian/tick_mark_defaults\\\"),u=t(\\\"../cartesian/tick_label_defaults\\\"),f=t(\\\"../cartesian/category_order_defaults\\\"),h=t(\\\"../cartesian/line_grid_defaults\\\"),p=t(\\\"../cartesian/axis_autotype\\\"),d=t(\\\"./layout_attributes\\\"),g=t(\\\"./set_convert\\\"),v=t(\\\"./constants\\\"),m=v.axisNames;function y(t,e,r,o){var p=r(\\\"bgcolor\\\");o.bgColor=i.combine(p,o.paper_bgcolor);var y=r(\\\"sector\\\");r(\\\"hole\\\");var b,_=s(o.fullData,v.name,o.id),w=o.layoutOut;function k(t,e){return r(b+\\\".\\\"+t,e)}for(var M=0;M<m.length;M++){b=m[M],n.isPlainObject(t[b])||(t[b]={});var A=t[b],T=a.newContainer(e,b);T._id=T._name=b,T._traceIndices=_.map(function(t){return t._expandedIndex});var S=v.axisName2dataArray[b],C=x(A,T,k,_,S);f(A,T,k,{axData:_,dataAttr:S});var E,L,z=k(\\\"visible\\\");switch(g(T,e,w),z&&(L=(E=k(\\\"color\\\"))===A.color?E:o.font.color),T._m=1,b){case\\\"radialaxis\\\":var O=k(\\\"autorange\\\",!T.isValidRange(A.range));A.autorange=O,!O||\\\"linear\\\"!==C&&\\\"-\\\"!==C||k(\\\"rangemode\\\"),\\\"reversed\\\"===O&&(T._m=-1),k(\\\"range\\\"),T.cleanRange(\\\"range\\\",{dfltRange:[0,1]}),z&&(k(\\\"side\\\"),k(\\\"angle\\\",y[0]),k(\\\"title\\\"),n.coerceFont(k,\\\"titlefont\\\",{family:o.font.family,size:Math.round(1.2*o.font.size),color:L}));break;case\\\"angularaxis\\\":if(\\\"date\\\"===C){n.log(\\\"Polar plots do not support date angular axes yet.\\\");for(var I=0;I<_.length;I++)_[I].visible=!1;C=A.type=T.type=\\\"linear\\\"}k(\\\"linear\\\"===C?\\\"thetaunit\\\":\\\"period\\\");var P=k(\\\"direction\\\");k(\\\"rotation\\\",{counterclockwise:0,clockwise:90}[P])}if(z)l(A,T,k,T.type),u(A,T,k,T.type,{tickSuffixDflt:\\\"degrees\\\"===T.thetaunit?\\\"\\\\xb0\\\":void 0}),c(A,T,k,{outerTicks:!0}),k(\\\"showticklabels\\\")&&(n.coerceFont(k,\\\"tickfont\\\",{family:o.font.family,size:o.font.size,color:L}),k(\\\"tickangle\\\"),k(\\\"tickformat\\\")),h(A,T,k,{dfltColor:E,bgColor:o.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:d[b]}),k(\\\"layer\\\");\\\"category\\\"!==C&&k(\\\"hoverformat\\\"),T._input=A}\\\"category\\\"===e.angularaxis.type&&r(\\\"gridshape\\\")}function x(t,e,r,n,i){if(\\\"-\\\"===r(\\\"type\\\")){for(var a,o=0;o<n.length;o++)if(n[o].visible){a=n[o];break}a&&a[i]&&(e.type=p(a[i],\\\"gregorian\\\")),\\\"-\\\"===e.type?e.type=\\\"linear\\\":t.type=e.type}return e.type}e.exports=function(t,e,r){o(t,e,r,{type:v.name,attributes:d,handleDefaults:y,font:e.font,paper_bgcolor:e.paper_bgcolor,fullData:r,layoutOut:e})}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../cartesian/axis_autotype\\\":746,\\\"../cartesian/category_order_defaults\\\":749,\\\"../cartesian/line_grid_defaults\\\":760,\\\"../cartesian/tick_label_defaults\\\":765,\\\"../cartesian/tick_mark_defaults\\\":766,\\\"../cartesian/tick_value_defaults\\\":767,\\\"../get_data\\\":782,\\\"../subplot_defaults\\\":823,\\\"./constants\\\":810,\\\"./layout_attributes\\\":813,\\\"./set_convert\\\":822}],815:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../traces/scatter/attributes\\\"),i=n.marker,a=t(\\\"../../../lib/extend\\\").extendFlat;[\\\"Area traces are deprecated!\\\",\\\"Please switch to the *barpolar* trace type.\\\"].join(\\\" \\\");e.exports={r:a({},n.r,{}),t:a({},n.t,{}),marker:{color:a({},i.color,{}),size:a({},i.size,{}),symbol:a({},i.symbol,{}),opacity:a({},i.opacity,{}),editType:\\\"calc\\\"}}},{\\\"../../../lib/extend\\\":685,\\\"../../../traces/scatter/attributes\\\":1044}],816:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../cartesian/layout_attributes\\\"),i=t(\\\"../../../lib/extend\\\").extendFlat,a=t(\\\"../../../plot_api/edit_types\\\").overrideAll,o=[\\\"Legacy polar charts are deprecated!\\\",\\\"Please switch to *polar* subplots.\\\"].join(\\\" \\\"),s=i({},n.domain,{});function l(t,e){return i({},e,{showline:{valType:\\\"boolean\\\"},showticklabels:{valType:\\\"boolean\\\"},tickorientation:{valType:\\\"enumerated\\\",values:[\\\"horizontal\\\",\\\"vertical\\\"]},ticklen:{valType:\\\"number\\\",min:0},tickcolor:{valType:\\\"color\\\"},ticksuffix:{valType:\\\"string\\\"},endpadding:{valType:\\\"number\\\",description:o},visible:{valType:\\\"boolean\\\"}})}e.exports=a({radialaxis:l(0,{range:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\"},{valType:\\\"number\\\"}]},domain:s,orientation:{valType:\\\"number\\\"}}),angularaxis:l(0,{range:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\",dflt:0},{valType:\\\"number\\\",dflt:360}]},domain:s}),layout:{direction:{valType:\\\"enumerated\\\",values:[\\\"clockwise\\\",\\\"counterclockwise\\\"]},orientation:{valType:\\\"angle\\\"}}},\\\"plot\\\",\\\"nested\\\")},{\\\"../../../lib/extend\\\":685,\\\"../../../plot_api/edit_types\\\":728,\\\"../../cartesian/layout_attributes\\\":758}],817:[function(t,e,r){\\\"use strict\\\";(e.exports=t(\\\"./micropolar\\\")).manager=t(\\\"./micropolar_manager\\\")},{\\\"./micropolar\\\":818,\\\"./micropolar_manager\\\":819}],818:[function(t,e,r){var n=t(\\\"d3\\\"),i=t(\\\"../../../lib\\\").extendDeepAll,a=t(\\\"../../../constants/alignment\\\").MID_SHIFT,o=e.exports={version:\\\"0.2.2\\\"};o.Axis=function(){var t,e,r,s,l={data:[],layout:{}},c={},u={},f=n.dispatch(\\\"hover\\\"),h={};return h.render=function(c){return function(c){e=c||e;var f=l.data,h=l.layout;(\\\"string\\\"==typeof e||e.nodeName)&&(e=n.select(e)),e.datum(f).each(function(e,l){var c=e.slice();u={data:o.util.cloneJson(c),layout:o.util.cloneJson(h)};var f=0;c.forEach(function(t,e){t.color||(t.color=h.defaultColorRange[f],f=(f+1)%h.defaultColorRange.length),t.strokeColor||(t.strokeColor=\\\"LinePlot\\\"===t.geometry?t.color:n.rgb(t.color).darker().toString()),u.data[e].color=t.color,u.data[e].strokeColor=t.strokeColor,u.data[e].strokeDash=t.strokeDash,u.data[e].strokeSize=t.strokeSize});var p=c.filter(function(t,e){var r=t.visible;return\\\"undefined\\\"==typeof r||!0===r}),d=!1,g=p.map(function(t,e){return d=d||\\\"undefined\\\"!=typeof t.groupId,t});if(d){var v=n.nest().key(function(t,e){return\\\"undefined\\\"!=typeof t.groupId?t.groupId:\\\"unstacked\\\"}).entries(g),m=[],y=v.map(function(t,e){if(\\\"unstacked\\\"===t.key)return t.values;var r=t.values[0].r.map(function(t,e){return 0});return t.values.forEach(function(t,e,n){t.yStack=[r],m.push(r),r=o.util.sumArrays(t.r,r)}),t.values});p=n.merge(y)}p.forEach(function(t,e){t.t=Array.isArray(t.t[0])?t.t:[t.t],t.r=Array.isArray(t.r[0])?t.r:[t.r]});var x=Math.min(h.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2;x=Math.max(10,x);var b,_=[h.margin.left+x,h.margin.top+x];b=d?[0,n.max(o.util.sumArrays(o.util.arrayLast(p).r[0],o.util.arrayLast(m)))]:n.extent(o.util.flattenArray(p.map(function(t,e){return t.r}))),h.radialAxis.domain!=o.DATAEXTENT&&(b[0]=0),r=n.scale.linear().domain(h.radialAxis.domain!=o.DATAEXTENT&&h.radialAxis.domain?h.radialAxis.domain:b).range([0,x]),u.layout.radialAxis.domain=r.domain();var w,k=o.util.flattenArray(p.map(function(t,e){return t.t})),M=\\\"string\\\"==typeof k[0];M&&(k=o.util.deduplicate(k),w=k.slice(),k=n.range(k.length),p=p.map(function(t,e){var r=t;return t.t=[k],d&&(r.yStack=t.yStack),r}));var A=p.filter(function(t,e){return\\\"LinePlot\\\"===t.geometry||\\\"DotPlot\\\"===t.geometry}).length===p.length,T=null===h.needsEndSpacing?M||!A:h.needsEndSpacing,S=h.angularAxis.domain&&h.angularAxis.domain!=o.DATAEXTENT&&!M&&h.angularAxis.domain[0]>=0?h.angularAxis.domain:n.extent(k),C=Math.abs(k[1]-k[0]);A&&!M&&(C=0);var E=S.slice();T&&M&&(E[1]+=C);var L=h.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),h.angularAxis.ticksStep&&(L=(E[1]-E[0])/L);var z=h.angularAxis.ticksStep||(E[1]-E[0])/(L*(h.minorTicks+1));w&&(z=Math.max(Math.round(z),1)),E[2]||(E[2]=z);var O=n.range.apply(this,E);if(O=O.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(E.slice(0,2)).range(\\\"clockwise\\\"===h.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=T?C:0,\\\"undefined\\\"==typeof(t=n.select(this).select(\\\"svg.chart-root\\\"))||t.empty()){var I=(new DOMParser).parseFromString(\\\"<svg xmlns='http://www.w3.org/2000/svg' class='chart-root'>' + '<g class='outer-group'>' + '<g class='chart-group'>' + '<circle class='background-circle'></circle>' + '<g class='geometry-group'></g>' + '<g class='radial axis-group'>' + '<circle class='outside-circle'></circle>' + '</g>' + '<g class='angular axis-group'></g>' + '<g class='guides-group'><line></line><circle r='0'></circle></g>' + '</g>' + '<g class='legend-group'></g>' + '<g class='tooltips-group'></g>' + '<g class='title-group'><text></text></g>' + '</g>' + '</svg>\\\",\\\"application/xml\\\"),P=this.appendChild(this.ownerDocument.importNode(I.documentElement,!0));t=n.select(P)}t.select(\\\".guides-group\\\").style({\\\"pointer-events\\\":\\\"none\\\"}),t.select(\\\".angular.axis-group\\\").style({\\\"pointer-events\\\":\\\"none\\\"}),t.select(\\\".radial.axis-group\\\").style({\\\"pointer-events\\\":\\\"none\\\"});var D,R=t.select(\\\".chart-group\\\"),B={fill:\\\"none\\\",stroke:h.tickColor},F={\\\"font-size\\\":h.font.size,\\\"font-family\\\":h.font.family,fill:h.font.color,\\\"text-shadow\\\":[\\\"-1px 0px\\\",\\\"1px -1px\\\",\\\"-1px 1px\\\",\\\"1px 1px\\\"].map(function(t,e){return\\\" \\\"+t+\\\" 0 \\\"+h.font.outlineColor}).join(\\\",\\\")};if(h.showLegend){D=t.select(\\\".legend-group\\\").attr({transform:\\\"translate(\\\"+[x,h.margin.top]+\\\")\\\"}).style({display:\\\"block\\\"});var N=p.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol=\\\"DotPlot\\\"===t.geometry?t.dotType||\\\"circle\\\":\\\"LinePlot\\\"!=t.geometry?\\\"square\\\":\\\"line\\\",r.visibleInLegend=\\\"undefined\\\"==typeof t.visibleInLegend||t.visibleInLegend,r.color=\\\"LinePlot\\\"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:p.map(function(t,e){return t.name||\\\"Element\\\"+e}),legendConfig:i({},o.Legend.defaultConfig().legendConfig,{container:D,elements:N,reverseOrder:h.legend.reverseOrder})})();var j=D.node().getBBox();x=Math.min(h.width-j.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,x=Math.max(10,x),_=[h.margin.left+x,h.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),D.attr(\\\"transform\\\",\\\"translate(\\\"+[_[0]+x,_[1]-x]+\\\")\\\")}else D=t.select(\\\".legend-group\\\").style({display:\\\"none\\\"});t.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),R.attr(\\\"transform\\\",\\\"translate(\\\"+_+\\\")\\\").style({cursor:\\\"crosshair\\\"});var V=[(h.width-(h.margin.left+h.margin.right+2*x+(j?j.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*x))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),t.select(\\\".outer-group\\\").attr(\\\"transform\\\",\\\"translate(\\\"+V+\\\")\\\"),h.title){var U=t.select(\\\"g.title-group text\\\").style(F).text(h.title),q=U.node().getBBox();U.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(\\\".radial.axis-group\\\");if(h.radialAxis.gridLinesVisible){var G=H.selectAll(\\\"circle.grid-circle\\\").data(r.ticks(5));G.enter().append(\\\"circle\\\").attr({class:\\\"grid-circle\\\"}).style(B),G.attr(\\\"r\\\",r),G.exit().remove()}H.select(\\\"circle.outside-circle\\\").attr({r:x}).style(B);var W=t.select(\\\"circle.background-circle\\\").attr({r:x}).style({fill:h.backgroundColor,stroke:h.stroke});function Y(t,e){return s(t)%360+h.orientation}if(h.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:\\\"rotate(\\\"+h.radialAxis.orientation+\\\")\\\"}),H.selectAll(\\\".domain\\\").style(B),H.selectAll(\\\"g>text\\\").text(function(t,e){return this.textContent+h.radialAxis.ticksSuffix}).style(F).style({\\\"text-anchor\\\":\\\"start\\\"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return\\\"horizontal\\\"===h.radialAxis.tickOrientation?\\\"rotate(\\\"+-h.radialAxis.orientation+\\\") translate(\\\"+[0,F[\\\"font-size\\\"]]+\\\")\\\":\\\"translate(\\\"+[0,F[\\\"font-size\\\"]]+\\\")\\\"}}),H.selectAll(\\\"g>line\\\").style({stroke:\\\"black\\\"})}var Z=t.select(\\\".angular.axis-group\\\").selectAll(\\\"g.angular-tick\\\").data(O),$=Z.enter().append(\\\"g\\\").classed(\\\"angular-tick\\\",!0);Z.attr({transform:function(t,e){return\\\"rotate(\\\"+Y(t)+\\\")\\\"}}).style({display:h.angularAxis.visible?\\\"block\\\":\\\"none\\\"}),Z.exit().remove(),$.append(\\\"line\\\").classed(\\\"grid-line\\\",!0).classed(\\\"major\\\",function(t,e){return e%(h.minorTicks+1)==0}).classed(\\\"minor\\\",function(t,e){return!(e%(h.minorTicks+1)==0)}).style(B),$.selectAll(\\\".minor\\\").style({stroke:h.minorTickColor}),Z.select(\\\"line.grid-line\\\").attr({x1:h.tickLength?x-h.tickLength:0,x2:x}).style({display:h.angularAxis.gridLinesVisible?\\\"block\\\":\\\"none\\\"}),$.append(\\\"text\\\").classed(\\\"axis-text\\\",!0).style(F);var J=Z.select(\\\"text.axis-text\\\").attr({x:x+h.labelOffset,dy:a+\\\"em\\\",transform:function(t,e){var r=Y(t),n=x+h.labelOffset,i=h.angularAxis.tickOrientation;return\\\"horizontal\\\"==i?\\\"rotate(\\\"+-r+\\\" \\\"+n+\\\" 0)\\\":\\\"radial\\\"==i?r<270&&r>90?\\\"rotate(180 \\\"+n+\\\" 0)\\\":null:\\\"rotate(\\\"+(r<=180&&r>0?-90:90)+\\\" \\\"+n+\\\" 0)\\\"}}).style({\\\"text-anchor\\\":\\\"middle\\\",display:h.angularAxis.labelsVisible?\\\"block\\\":\\\"none\\\"}).text(function(t,e){return e%(h.minorTicks+1)!=0?\\\"\\\":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix}).style(F);h.angularAxis.rewriteTicks&&J.text(function(t,e){return e%(h.minorTicks+1)!=0?\\\"\\\":h.angularAxis.rewriteTicks(this.textContent,e)});var K=n.max(R.selectAll(\\\".angular-tick text\\\")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));D.attr({transform:\\\"translate(\\\"+[x+K,h.margin.top]+\\\")\\\"});var Q=t.select(\\\"g.geometry-group\\\").selectAll(\\\"g\\\").size()>0,tt=t.select(\\\"g.geometry-group\\\").selectAll(\\\"g.geometry\\\").data(p);if(tt.enter().append(\\\"g\\\").attr({class:function(t,e){return\\\"geometry geometry\\\"+e}}),tt.exit().remove(),p[0]||Q){var et=[];p.forEach(function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter(function(t,r){return r==e}),n.geometry=t.geometry,n.orientation=h.orientation,n.direction=h.direction,n.index=e,et.push({data:t,geometryConfig:n})});var rt=n.nest().key(function(t,e){return\\\"undefined\\\"!=typeof t.data.groupId||\\\"unstacked\\\"}).entries(et),nt=[];rt.forEach(function(t,e){\\\"unstacked\\\"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return i(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=t.select(\\\".guides-group\\\"),st=t.select(\\\".tooltips-group\\\"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!M){var ft=ot.select(\\\"line\\\").attr({x1:0,y1:0,y2:0}).style({stroke:\\\"grey\\\",\\\"pointer-events\\\":\\\"none\\\"});R.on(\\\"mousemove.angular-guide\\\",function(t,e){var r=o.util.getMousePos(W).angle;ft.attr({x2:-x,transform:\\\"rotate(\\\"+r+\\\")\\\"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on(\\\"mouseout.angular-guide\\\",function(t,e){ot.select(\\\"line\\\").style({opacity:0})})}var ht=ot.select(\\\"circle\\\").style({stroke:\\\"grey\\\",fill:\\\"none\\\"});R.on(\\\"mousemove.radial-guide\\\",function(t,e){var n=o.util.getMousePos(W).radius;ht.attr({r:n}).style({opacity:.5}),at=r.invert(o.util.getMousePos(W).radius);var i=o.util.convertToCartesian(n,h.radialAxis.orientation);ct.text(o.util.round(at)).move([i[0]+_[0],i[1]+_[1]])}).on(\\\"mouseout.radial-guide\\\",function(t,e){ht.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()}),t.selectAll(\\\".geometry-group .mark\\\").on(\\\"mouseover.tooltip\\\",function(e,r){var i=n.select(this),a=this.style.fill,s=\\\"black\\\",l=this.style.opacity||1;if(i.attr({\\\"data-opacity\\\":l}),a&&\\\"none\\\"!==a){i.attr({\\\"data-fill\\\":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};M&&(c.t=w[e[0]]);var u=\\\"t: \\\"+c.t+\\\", r: \\\"+c.r,f=this.getBoundingClientRect(),h=t.node().getBoundingClientRect(),p=[f.left+f.width/2-V[0]-h.left,f.top+f.height/2-V[1]-h.top];ut.config({color:s}).text(u),ut.move(p)}else a=this.style.stroke||\\\"black\\\",i.attr({\\\"data-stroke\\\":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on(\\\"mousemove.tooltip\\\",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr(\\\"data-fill\\\")&&ut.show()}).on(\\\"mouseout.tooltip\\\",function(t,e){ut.hide();var r=n.select(this),i=r.attr(\\\"data-fill\\\");i?r.style({fill:i,opacity:r.attr(\\\"data-opacity\\\")}):r.style({stroke:r.attr(\\\"data-stroke\\\"),opacity:r.attr(\\\"data-opacity\\\")})})})}(c),this},h.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),i(l.data[e],o.Axis.defaultConfig().data[0]),i(l.data[e],t)}),i(l.layout,o.Axis.defaultConfig().layout),i(l.layout,e.layout),this},h.getLiveConfig=function(){return u},h.getinputConfig=function(){return c},h.radialScale=function(t){return r},h.angularScale=function(t){return s},h.svg=function(){return t},n.rebind(h,f,\\\"on\\\"),h},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:\\\"Line1\\\",geometry:\\\"LinePlot\\\",color:null,strokeDash:\\\"solid\\\",strokeColor:null,strokeSize:\\\"1\\\",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:\\\"gray\\\",outlineColor:\\\"white\\\",family:\\\"Tahoma, sans-serif\\\"},direction:\\\"clockwise\\\",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:\\\"\\\",visible:!0,gridLinesVisible:!0,tickOrientation:\\\"horizontal\\\",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:\\\"\\\",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:\\\"horizontal\\\",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:\\\"silver\\\",minorTickColor:\\\"#eee\\\",backgroundColor:\\\"none\\\",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT=\\\"dataExtent\\\",o.AREA=\\\"AreaChart\\\",o.LINE=\\\"LinePlot\\\",o.DOT=\\\"DotPlot\\\",o.BAR=\\\"BarChart\\\",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(\\\"undefined\\\"==typeof t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){\\\"string\\\"==typeof e&&(e=e.split(\\\".\\\"));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i<a;i++)(e=t[i])in r?(r[e]++,n[e]=r[e]):r[e]=1;return n},o.util.duplicates=function(t){return Object.keys(o.util.duplicatesCount(t))},o.util.translator=function(t,e,r,n){if(n){var i=r.slice();r=e,e=i}var a=e.reduce(function(t,e){if(\\\"undefined\\\"!=typeof t)return t[e]},t);\\\"undefined\\\"!=typeof a&&(e.reduce(function(t,r,n){if(\\\"undefined\\\"!=typeof t)return n===e.length-1&&delete t[r],t[r]},t),r.reduce(function(t,e,n){return\\\"undefined\\\"==typeof t[e]&&(t[e]={}),n===r.length-1&&(t[e]=a),t[e]},t))},o.PolyChart=function(){var t=[o.PolyChart.defaultConfig()],e=n.dispatch(\\\"hover\\\"),r={solid:\\\"none\\\",dash:[5,2],dot:[2,5]};function a(){var e=t[0].geometryConfig,i=e.container;\\\"string\\\"==typeof i&&(i=n.select(i)),i.datum(t).each(function(t,i){var a=!!t[0].data.yStack,o=t.map(function(t,e){return a?n.zip(t.data.t[0],t.data.r[0],t.data.yStack[0]):n.zip(t.data.t[0],t.data.r[0])}),s=e.angularScale,l=e.radialScale.domain()[0],c={bar:function(r,i,a){var o=t[a].data,l=e.radialScale(r[1])-e.radialScale(0),c=e.radialScale(r[2]||0),u=o.barWidth;n.select(this).attr({class:\\\"mark bar\\\",d:\\\"M\\\"+[[l+c,-u/2],[l+c,u/2],[c,u/2],[c,-u/2]].join(\\\"L\\\")+\\\"Z\\\",transform:function(t,r){return\\\"rotate(\\\"+(e.orientation+s(t[0]))+\\\")\\\"}})}};c.dot=function(r,i,a){var o=r[2]?[r[0],r[1]+r[2]]:r,s=n.svg.symbol().size(t[a].data.dotSize).type(t[a].data.dotType)(r,i);n.select(this).attr({class:\\\"mark dot\\\",d:s,transform:function(t,r){var n,i,a,s=(n=function(t,r){var n=e.radialScale(t[1]),i=(e.angularScale(t[0])+e.orientation)*Math.PI/180;return{r:n,t:i}}(o),i=n.r*Math.cos(n.t),a=n.r*Math.sin(n.t),{x:i,y:a});return\\\"translate(\\\"+[s.x,s.y]+\\\")\\\"}})};var u=n.svg.line.radial().interpolate(t[0].data.lineInterpolation).radius(function(t){return e.radialScale(t[1])}).angle(function(t){return e.angularScale(t[0])*Math.PI/180});c.line=function(r,i,a){var s=r[2]?o[a].map(function(t,e){return[t[0],t[1]+t[2]]}):o[a];if(n.select(this).each(c.dot).style({opacity:function(e,r){return+t[a].data.dotVisible},fill:d.stroke(r,i,a)}).attr({class:\\\"mark dot\\\"}),!(i>0)){var l=n.select(this.parentNode).selectAll(\\\"path.line\\\").data([0]);l.enter().insert(\\\"path\\\"),l.attr({class:\\\"line\\\",d:u(s),transform:function(t,r){return\\\"rotate(\\\"+(e.orientation+90)+\\\")\\\"},\\\"pointer-events\\\":\\\"none\\\"}).style({fill:function(t,e){return d.fill(r,i,a)},\\\"fill-opacity\\\":0,stroke:function(t,e){return d.stroke(r,i,a)},\\\"stroke-width\\\":function(t,e){return d[\\\"stroke-width\\\"](r,i,a)},\\\"stroke-dasharray\\\":function(t,e){return d[\\\"stroke-dasharray\\\"](r,i,a)},opacity:function(t,e){return d.opacity(r,i,a)},display:function(t,e){return d.display(r,i,a)}})}};var f=e.angularScale.range(),h=Math.abs(f[1]-f[0])/o[0].length*Math.PI/180,p=n.svg.arc().startAngle(function(t){return-h/2}).endAngle(function(t){return h/2}).innerRadius(function(t){return e.radialScale(l+(t[2]||0))}).outerRadius(function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])});c.arc=function(t,r,i){n.select(this).attr({class:\\\"mark arc\\\",d:p,transform:function(t,r){return\\\"rotate(\\\"+(e.orientation+s(t[0])+90)+\\\")\\\"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},\\\"stroke-width\\\":function(e,r,n){return t[n].data.strokeSize+\\\"px\\\"},\\\"stroke-dasharray\\\":function(e,n,i){return r[t[i].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return\\\"undefined\\\"==typeof t[n].data.visible||t[n].data.visible?\\\"block\\\":\\\"none\\\"}},g=n.select(this).selectAll(\\\"g.layer\\\").data(o);g.enter().append(\\\"g\\\").attr({class:\\\"layer\\\"});var v=g.selectAll(\\\"path.mark\\\").data(function(t,e){return t});v.enter().append(\\\"path\\\").attr({class:\\\"mark\\\"}),v.style(d).each(c[e.geometryType]),v.exit().remove(),g.exit().remove()})}return a.config=function(e){return arguments.length?(e.forEach(function(e,r){t[r]||(t[r]={}),i(t[r],o.PolyChart.defaultConfig()),i(t[r],e)}),this):t},a.getColorScale=function(){},n.rebind(a,e,\\\"on\\\"),a},o.PolyChart.defaultConfig=function(){return{data:{name:\\\"geom1\\\",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:\\\"circle\\\",dotSize:64,dotVisible:!1,barWidth:20,color:\\\"#ffa500\\\",strokeSize:1,strokeColor:\\\"silver\\\",strokeDash:\\\"solid\\\",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:\\\"LinePlot\\\",geometryType:\\\"arc\\\",direction:\\\"clockwise\\\",orientation:0,container:\\\"body\\\",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:\\\"bar\\\"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:\\\"arc\\\"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:\\\"dot\\\",dotType:\\\"circle\\\"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:\\\"line\\\"}}},o.Legend=function(){var t=o.Legend.defaultConfig(),e=n.dispatch(\\\"hover\\\");function r(){var e=t.legendConfig,a=t.data.map(function(t,r){return[].concat(t).map(function(t,n){var a=i({},e.elements[r]);return a.name=t,a.color=[].concat(e.elements[r].color)[n],a})}),o=n.merge(a);o=o.filter(function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||\\\"undefined\\\"==typeof e.elements[r].visibleInLegend)}),e.reverseOrder&&(o=o.reverse());var s=e.container;(\\\"string\\\"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),c=e.fontSize,u=null==e.isContinuous?\\\"number\\\"==typeof o[0]:e.isContinuous,f=u?e.height:c*o.length,h=s.classed(\\\"legend-group\\\",!0).selectAll(\\\"svg\\\").data([0]),p=h.enter().append(\\\"svg\\\").attr({width:300,height:f+c,xmlns:\\\"http://www.w3.org/2000/svg\\\",\\\"xmlns:xlink\\\":\\\"http://www.w3.org/1999/xlink\\\",version:\\\"1.1\\\"});p.append(\\\"g\\\").classed(\\\"legend-axis\\\",!0),p.append(\\\"g\\\").classed(\\\"legend-marks\\\",!0);var d=n.range(o.length),g=n.scale[u?\\\"linear\\\":\\\"ordinal\\\"]().domain(d).range(l),v=n.scale[u?\\\"linear\\\":\\\"ordinal\\\"]().domain(d)[u?\\\"range\\\":\\\"rangePoints\\\"]([0,f]);if(u){var m=h.select(\\\".legend-marks\\\").append(\\\"defs\\\").append(\\\"linearGradient\\\").attr({id:\\\"grad1\\\",x1:\\\"0%\\\",y1:\\\"0%\\\",x2:\\\"0%\\\",y2:\\\"100%\\\"}).selectAll(\\\"stop\\\").data(l);m.enter().append(\\\"stop\\\"),m.attr({offset:function(t,e){return e/(l.length-1)*100+\\\"%\\\"}}).style({\\\"stop-color\\\":function(t,e){return t}}),h.append(\\\"rect\\\").classed(\\\"legend-mark\\\",!0).attr({height:e.height,width:e.colorBandWidth,fill:\\\"url(#grad1)\\\"})}else{var y=h.select(\\\".legend-marks\\\").selectAll(\\\"path.legend-mark\\\").data(o);y.enter().append(\\\"path\\\").classed(\\\"legend-mark\\\",!0),y.attr({transform:function(t,e){return\\\"translate(\\\"+[c/2,v(e)+c/2]+\\\")\\\"},d:function(t,e){var r,i,a,o=t.symbol;return a=3*(i=c),\\\"line\\\"===(r=o)?\\\"M\\\"+[[-i/2,-i/12],[i/2,-i/12],[i/2,i/12],[-i/2,i/12]]+\\\"Z\\\":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(a)():n.svg.symbol().type(\\\"square\\\").size(a)()},fill:function(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(v).orient(\\\"right\\\"),b=h.select(\\\"g.legend-axis\\\").attr({transform:\\\"translate(\\\"+[u?e.colorBandWidth:c,c/2]+\\\")\\\"}).call(x);return b.selectAll(\\\".domain\\\").style({fill:\\\"none\\\",stroke:\\\"none\\\"}),b.selectAll(\\\"line\\\").style({fill:\\\"none\\\",stroke:u?e.textColor:\\\"none\\\"}),b.selectAll(\\\"text\\\").style({fill:e.textColor,\\\"font-size\\\":e.fontSize}).text(function(t,e){return o[e].name}),r}return r.config=function(e){return arguments.length?(i(t,e),this):t},n.rebind(r,e,\\\"on\\\"),r},o.Legend.defaultConfig=function(t,e){return{data:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],legendConfig:{elements:[{symbol:\\\"line\\\",color:\\\"red\\\"},{symbol:\\\"square\\\",color:\\\"yellow\\\"},{symbol:\\\"diamond\\\",color:\\\"limegreen\\\"}],height:150,colorBandWidth:30,fontSize:12,container:\\\"body\\\",isContinuous:null,textColor:\\\"grey\\\",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,a={container:null,hasTick:!1,fontSize:12,color:\\\"white\\\",padding:5},s=\\\"tooltip-\\\"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=a.container.selectAll(\\\"g.\\\"+s).data([0])).enter().append(\\\"g\\\").classed(s,!0).style({\\\"pointer-events\\\":\\\"none\\\",display:\\\"none\\\"});return r=n.append(\\\"path\\\").style({fill:\\\"white\\\",\\\"fill-opacity\\\":.9}).attr({d:\\\"M0 0\\\"}),e=n.append(\\\"text\\\").attr({dx:a.padding+l,dy:.3*+a.fontSize}),c};return c.text=function(i){var o=n.hsl(a.color).l,s=o>=.5?\\\"#aaa\\\":\\\"white\\\",u=o>=.5?\\\"black\\\":\\\"white\\\",f=i||\\\"\\\";e.style({fill:u,\\\"font-size\\\":a.fontSize+\\\"px\\\"}).text(f);var h=a.padding,p=e.node().getBBox(),d={fill:a.color,stroke:s,\\\"stroke-width\\\":\\\"2px\\\"},g=p.width+2*h+l,v=p.height+2*h;return r.attr({d:\\\"M\\\"+[[l,-v/2],[l,-v/4],[a.hasTick?0:l,0],[l,v/4],[l,v/2],[g,v/2],[g,-v/2]].join(\\\"L\\\")+\\\"Z\\\"}).style(d),t.attr({transform:\\\"translate(\\\"+[l,-v/2+2*h]+\\\")\\\"}),t.style({display:\\\"block\\\"}),c},c.move=function(e){if(t)return t.attr({transform:\\\"translate(\\\"+[e[0],e[1]]+\\\")\\\"}).style({display:\\\"block\\\"}),c},c.hide=function(){if(t)return t.style({display:\\\"none\\\"}),c},c.show=function(){if(t)return t.style({display:\\\"block\\\"}),c},c.config=function(t){return i(a,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=i({},t);return[[n,[\\\"marker\\\",\\\"color\\\"],[\\\"color\\\"]],[n,[\\\"marker\\\",\\\"opacity\\\"],[\\\"opacity\\\"]],[n,[\\\"marker\\\",\\\"line\\\",\\\"color\\\"],[\\\"strokeColor\\\"]],[n,[\\\"marker\\\",\\\"line\\\",\\\"dash\\\"],[\\\"strokeDash\\\"]],[n,[\\\"marker\\\",\\\"line\\\",\\\"width\\\"],[\\\"strokeSize\\\"]],[n,[\\\"marker\\\",\\\"symbol\\\"],[\\\"dotType\\\"]],[n,[\\\"marker\\\",\\\"size\\\"],[\\\"dotSize\\\"]],[n,[\\\"marker\\\",\\\"barWidth\\\"],[\\\"barWidth\\\"]],[n,[\\\"line\\\",\\\"interpolation\\\"],[\\\"lineInterpolation\\\"]],[n,[\\\"showlegend\\\"],[\\\"visibleInLegend\\\"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?(\\\"LinePlot\\\"===n.geometry?(n.type=\\\"scatter\\\",!0===n.dotVisible?(delete n.dotVisible,n.mode=\\\"lines+markers\\\"):n.mode=\\\"lines\\\"):\\\"DotPlot\\\"===n.geometry?(n.type=\\\"scatter\\\",n.mode=\\\"markers\\\"):\\\"AreaChart\\\"===n.geometry?n.type=\\\"area\\\":\\\"BarChart\\\"===n.geometry&&(n.type=\\\"bar\\\"),delete n.geometry):(\\\"scatter\\\"===n.type?\\\"lines\\\"===n.mode?n.geometry=\\\"LinePlot\\\":\\\"markers\\\"===n.mode?n.geometry=\\\"DotPlot\\\":\\\"lines+markers\\\"===n.mode&&(n.geometry=\\\"LinePlot\\\",n.dotVisible=!0):\\\"area\\\"===n.type?n.geometry=\\\"AreaChart\\\":\\\"bar\\\"===n.type&&(n.geometry=\\\"BarChart\\\"),delete n.mode,delete n.type),n}),!e&&t.layout&&\\\"stack\\\"===t.layout.barmode)){var a=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=i({},t.layout);if([[s,[\\\"plot_bgcolor\\\"],[\\\"backgroundColor\\\"]],[s,[\\\"showlegend\\\"],[\\\"showLegend\\\"]],[s,[\\\"radialaxis\\\"],[\\\"radialAxis\\\"]],[s,[\\\"angularaxis\\\"],[\\\"angularAxis\\\"]],[s.angularaxis,[\\\"showline\\\"],[\\\"gridLinesVisible\\\"]],[s.angularaxis,[\\\"showticklabels\\\"],[\\\"labelsVisible\\\"]],[s.angularaxis,[\\\"nticks\\\"],[\\\"ticksCount\\\"]],[s.angularaxis,[\\\"tickorientation\\\"],[\\\"tickOrientation\\\"]],[s.angularaxis,[\\\"ticksuffix\\\"],[\\\"ticksSuffix\\\"]],[s.angularaxis,[\\\"range\\\"],[\\\"domain\\\"]],[s.angularaxis,[\\\"endpadding\\\"],[\\\"endPadding\\\"]],[s.radialaxis,[\\\"showline\\\"],[\\\"gridLinesVisible\\\"]],[s.radialaxis,[\\\"tickorientation\\\"],[\\\"tickOrientation\\\"]],[s.radialaxis,[\\\"ticksuffix\\\"],[\\\"ticksSuffix\\\"]],[s.radialaxis,[\\\"range\\\"],[\\\"domain\\\"]],[s.angularAxis,[\\\"showline\\\"],[\\\"gridLinesVisible\\\"]],[s.angularAxis,[\\\"showticklabels\\\"],[\\\"labelsVisible\\\"]],[s.angularAxis,[\\\"nticks\\\"],[\\\"ticksCount\\\"]],[s.angularAxis,[\\\"tickorientation\\\"],[\\\"tickOrientation\\\"]],[s.angularAxis,[\\\"ticksuffix\\\"],[\\\"ticksSuffix\\\"]],[s.angularAxis,[\\\"range\\\"],[\\\"domain\\\"]],[s.angularAxis,[\\\"endpadding\\\"],[\\\"endPadding\\\"]],[s.radialAxis,[\\\"showline\\\"],[\\\"gridLinesVisible\\\"]],[s.radialAxis,[\\\"tickorientation\\\"],[\\\"tickOrientation\\\"]],[s.radialAxis,[\\\"ticksuffix\\\"],[\\\"ticksSuffix\\\"]],[s.radialAxis,[\\\"range\\\"],[\\\"domain\\\"]],[s.font,[\\\"outlinecolor\\\"],[\\\"outlineColor\\\"]],[s.legend,[\\\"traceorder\\\"],[\\\"reverseOrder\\\"]],[s,[\\\"labeloffset\\\"],[\\\"labelOffset\\\"]],[s,[\\\"defaultcolorrange\\\"],[\\\"defaultColorRange\\\"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?(\\\"undefined\\\"!=typeof s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&\\\"undefined\\\"!=typeof s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&\\\"undefined\\\"!=typeof s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&\\\"boolean\\\"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder=\\\"normal\\\"!=s.legend.reverseOrder),s.legend&&\\\"boolean\\\"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?\\\"reversed\\\":\\\"normal\\\",delete s.legend.reverseOrder),s.margin&&\\\"undefined\\\"!=typeof s.margin.t){var l=[\\\"t\\\",\\\"r\\\",\\\"b\\\",\\\"l\\\",\\\"pad\\\"],c=[\\\"top\\\",\\\"right\\\",\\\"bottom\\\",\\\"left\\\",\\\"pad\\\"],u={};n.entries(s.margin).forEach(function(t,e){u[c[l.indexOf(t.key)]]=t.value}),s.margin=u}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return t}},{\\\"../../../constants/alignment\\\":668,\\\"../../../lib\\\":696,d3:148}],819:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../../lib\\\"),a=t(\\\"../../../components/color\\\"),o=t(\\\"./micropolar\\\"),s=t(\\\"./undo_manager\\\"),l=i.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,i,a,u,f=new s;function h(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(\\\".svg-container>*:not(.chart-root)\\\").remove(),e=e?l(e,r):r,i||(i=o.Axis()),a=o.adapter.plotly().convert(e),i.config(a).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return h.isPolar=!0,h.svg=function(){return i.svg()},h.getConfig=function(){return e},h.getLiveConfig=function(){return o.adapter.plotly().convert(i.getLiveConfig(),!0)},h.getLiveScales=function(){return{t:i.angularScale(),r:i.radialScale()}},h.setUndoPoint=function(){var t,n,i=this,a=o.util.cloneJson(e);t=a,n=r,f.add({undo:function(){n&&i(n)},redo:function(){i(t)}}),r=o.util.cloneJson(a)},h.undo=function(){f.undo()},h.redo=function(){f.redo()},h},c.fillLayout=function(t){var e=n.select(t).selectAll(\\\".plot-container\\\"),r=e.selectAll(\\\".svg-container\\\"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{\\\"../../../components/color\\\":570,\\\"../../../lib\\\":696,\\\"./micropolar\\\":818,\\\"./undo_manager\\\":820,d3:148}],820:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t,e=[],r=-1,n=!1;function i(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n?this:(e.splice(r+1,e.length-r),e.push(t),r=e.length-1,this)},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(i(n,\\\"undo\\\"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(i(n,\\\"redo\\\"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r<e.length-1},getCommands:function(){return e},getPreviousCommand:function(){return e[r-1]},getIndex:function(){return r}}}},{}],821:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../components/color\\\"),l=t(\\\"../../components/drawing\\\"),c=t(\\\"../plots\\\"),u=t(\\\"../cartesian/set_convert\\\"),f=t(\\\"./set_convert\\\"),h=t(\\\"../cartesian/autorange\\\").doAutoRange,p=t(\\\"../cartesian/axes\\\").doTicksSingle,d=t(\\\"../cartesian/dragbox\\\"),g=t(\\\"../../components/dragelement\\\"),v=t(\\\"../../components/fx\\\"),m=t(\\\"../../components/titles\\\"),y=t(\\\"../cartesian/select\\\").prepSelect,x=t(\\\"../cartesian/select\\\").selectOnClick,b=t(\\\"../cartesian/select\\\").clearSelect,_=t(\\\"../../lib/setcursor\\\"),w=t(\\\"../../lib/clear_gl_canvases\\\"),k=t(\\\"../../plot_api/subroutines\\\").redrawReglTraces,M=t(\\\"../../constants/alignment\\\").MID_SHIFT,A=t(\\\"./constants\\\"),T=t(\\\"./helpers\\\"),S=o._,C=o.mod,E=o.deg2rad,L=o.rad2deg;function z(t,e){this.id=e,this.gd=t,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var r=t._fullLayout,n=\\\"clip\\\"+r._uid+e;this.clipIds.forTraces=n+\\\"-for-traces\\\",this.clipPaths.forTraces=r._clips.append(\\\"clipPath\\\").attr(\\\"id\\\",this.clipIds.forTraces),this.clipPaths.forTraces.append(\\\"path\\\"),this.framework=r._polarlayer.append(\\\"g\\\").attr(\\\"class\\\",e),this.radialTickLayout=null,this.angularTickLayout=null}var O=z.prototype;function I(t){var e=t.ticks+String(t.ticklen)+String(t.showticklabels);return\\\"side\\\"in t&&(e+=t.side),e}function P(t,e){return e[o.findIndexOfMin(e,function(e){return o.angleDist(t,e)})]}function D(t,e,r){return e?(t.attr(\\\"display\\\",null),t.attr(r)):t&&t.attr(\\\"display\\\",\\\"none\\\"),t}function R(t,e){return\\\"translate(\\\"+t+\\\",\\\"+e+\\\")\\\"}function B(t){return\\\"rotate(\\\"+t+\\\")\\\"}function F(t){return Math.abs(t)<1e-10?0:t>0?1:-1}function N(t){return F(Math.cos(t))}function j(t){return F(Math.sin(t))}e.exports=function(t,e){return new z(t,e)},O.plot=function(t,e){var r=e[this.id];this._hasClipOnAxisFalse=!1;for(var n=0;n<t.length;n++){if(!1===t[n][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(e,r),this.updateLayout(e,r),c.generalUpdatePerTraceModule(this.gd,this,t,r),this.updateFx(e,r)},O.updateLayers=function(t,e){var r=this.layers,i=e.radialaxis,a=e.angularaxis,o=A.layerNames,s=o.indexOf(\\\"frontplot\\\"),l=o.slice(0,s),c=\\\"below traces\\\"===a.layer,u=\\\"below traces\\\"===i.layer;c&&l.push(\\\"angular-line\\\"),u&&l.push(\\\"radial-line\\\"),c&&l.push(\\\"angular-axis\\\"),u&&l.push(\\\"radial-axis\\\"),l.push(\\\"frontplot\\\"),c||l.push(\\\"angular-line\\\"),u||l.push(\\\"radial-line\\\"),c||l.push(\\\"angular-axis\\\"),u||l.push(\\\"radial-axis\\\");var f=this.framework.selectAll(\\\".polarsublayer\\\").data(l,String);f.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"polarsublayer \\\"+t}).each(function(t){var e=r[t]=n.select(this);switch(t){case\\\"frontplot\\\":e.append(\\\"g\\\").classed(\\\"barlayer\\\",!0),e.append(\\\"g\\\").classed(\\\"scatterlayer\\\",!0);break;case\\\"backplot\\\":e.append(\\\"g\\\").classed(\\\"maplayer\\\",!0);break;case\\\"plotbg\\\":r.bg=e.append(\\\"path\\\");break;case\\\"radial-grid\\\":e.style(\\\"fill\\\",\\\"none\\\"),e.append(\\\"g\\\").classed(\\\"x\\\",1);break;case\\\"angular-grid\\\":e.style(\\\"fill\\\",\\\"none\\\"),e.append(\\\"g\\\").classed(\\\"angularaxis\\\",1);break;case\\\"radial-line\\\":e.append(\\\"line\\\").style(\\\"fill\\\",\\\"none\\\");break;case\\\"angular-line\\\":e.append(\\\"path\\\").style(\\\"fill\\\",\\\"none\\\")}}),f.order()},O.updateLayout=function(t,e){var r=this.layers,n=t._size,i=e.radialaxis,a=e.angularaxis,o=e.domain.x,c=e.domain.y;this.xOffset=n.l+n.w*o[0],this.yOffset=n.t+n.h*(1-c[1]);var u=this.xLength=n.w*(o[1]-o[0]),f=this.yLength=n.h*(c[1]-c[0]),h=e.sector;this.sectorInRad=h.map(E);var p,d,g,v,m,y=this.sectorBBox=function(t){var e,r,n,i,a=t[0],o=t[1]-a,s=C(a,360),l=s+o,c=Math.cos(E(s)),u=Math.sin(E(s)),f=Math.cos(E(l)),h=Math.sin(E(l));i=s<=90&&l>=90||s>90&&l>=450?1:u<=0&&h<=0?0:Math.max(u,h);e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&f>=0?0:Math.min(c,f);r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&h>=0?0:Math.min(u,h);n=l>=360?1:c<=0&&f<=0?0:Math.max(c,f);return[e,r,n,i]}(h),x=y[2]-y[0],b=y[3]-y[1],_=f/u,w=Math.abs(b/x);_>w?(p=u,m=(f-(d=u*w))/n.h/2,g=[o[0],o[1]],v=[c[0]+m,c[1]-m]):(d=f,m=(u-(p=f/w))/n.w/2,g=[o[0]+m,o[1]-m],v=[c[0],c[1]]),this.xLength2=p,this.yLength2=d,this.xDomain2=g,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*g[0],M=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=p/x,T=this.innerRadius=e.hole*A,S=this.cx=k-A*y[0],L=this.cy=M+A*y[3],z=this.cxx=S-k,O=this.cyy=L-M;this.radialAxis=this.mockAxis(t,e,i,{_axislayer:r[\\\"radial-axis\\\"],_gridlayer:r[\\\"radial-grid\\\"],_id:\\\"x\\\",side:{counterclockwise:\\\"top\\\",clockwise:\\\"bottom\\\"}[i.side],domain:[T/n.w,A/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{_axislayer:r[\\\"angular-axis\\\"],_gridlayer:r[\\\"angular-grid\\\"],side:\\\"right\\\",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:\\\"x\\\",domain:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:\\\"y\\\",domain:v});var I=this.pathSubplot();this.clipPaths.forTraces.select(\\\"path\\\").attr(\\\"d\\\",I).attr(\\\"transform\\\",R(z,O)),r.frontplot.attr(\\\"transform\\\",R(k,M)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces),r.bg.attr(\\\"d\\\",I).attr(\\\"transform\\\",R(S,L)).call(s.fill,e.bgcolor),this.framework.selectAll(\\\".crisp\\\").classed(\\\"crisp\\\",0)},O.mockAxis=function(t,e,r,n){var i=o.extendFlat({anchor:\\\"free\\\",position:0,_pos:0,_counteraxis:!0,automargin:!1},r,n);return f(i,e,t),i},O.mockCartesianAxis=function(t,e,r){var n=this,i=r._id,a=o.extendFlat({type:\\\"linear\\\"},r);u(a,t);var s={x:[0,2],y:[1,3]};return a.setRange=function(){var t=n.sectorBBox,r=s[i],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);a.range=[t[r[0]]*l,t[r[1]]*l]},a.isPtWithinRange=\\\"x\\\"===i?function(t){return n.isPtInside(t)}:function(){return!0},a.setRange(),a.setScale(),a},O.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=e.radialaxis;n.setScale(),h(r,n);var a=n.range;i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,\\\"gregorian\\\"),n.r2l(a[1],null,\\\"gregorian\\\")]},O.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,l=r.cx,c=r.cy,u=e.radialaxis,f=C(e.sector[0],360),h=r.radialAxis,d=o<a;r.fillViewInitialKey(\\\"radialaxis.angle\\\",u.angle),r.fillViewInitialKey(\\\"radialaxis.range\\\",h.range.slice()),h.setGeometry(),\\\"auto\\\"===h.tickangle&&f>90&&f<=270&&(h.tickangle=180),h._transfn=function(t){return\\\"translate(\\\"+(h.l2p(t.x)+o)+\\\",0)\\\"},h._gridpath=function(t){return r.pathArc(h.r2p(t.x)+o)};var g=I(u);r.radialTickLayout!==g&&(i[\\\"radial-axis\\\"].selectAll(\\\".xtick\\\").remove(),r.radialTickLayout=g),d&&(h.setScale(),p(n,h,!0));var v=r.radialAxisAngle=r.vangles?L(P(E(u.angle),r.vangles)):u.angle,m=R(l,c)+B(-v);D(i[\\\"radial-axis\\\"],d&&(u.showticklabels||u.ticks),{transform:m}),D(i[\\\"radial-grid\\\"],d&&u.showgrid,{transform:R(l,c)}).selectAll(\\\"path\\\").attr(\\\"transform\\\",null),D(i[\\\"radial-line\\\"].select(\\\"line\\\"),d&&u.showline,{x1:o,y1:0,x2:a,y2:0,transform:m}).attr(\\\"stroke-width\\\",u.linewidth).call(s.stroke,u.linecolor)},O.updateRadialAxisTitle=function(t,e,r){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=e.radialaxis,c=this.id+\\\"title\\\",u=void 0!==r?r:this.radialAxisAngle,f=E(u),h=Math.cos(f),p=Math.sin(f),d=0;if(s.title){var g=l.bBox(this.layers[\\\"radial-axis\\\"].node()).height,v=s.titlefont.size;d=\\\"counterclockwise\\\"===s.side?-g-.4*v:g+.8*v}this.layers[\\\"radial-axis-title\\\"]=m.draw(n,c,{propContainer:s,propName:this.id+\\\".radialaxis.title\\\",placeholder:S(n,\\\"Click to enter radial axis title\\\"),attributes:{x:a+i/2*h+d*p,y:o-i/2*p+d*h,\\\"text-anchor\\\":\\\"middle\\\"},transform:{rotate:-u}})},O.updateAngularAxis=function(t,e){var r=this,i=r.gd,a=r.layers,l=r.radius,c=r.innerRadius,u=r.cx,f=r.cy,h=e.angularaxis,d=r.angularAxis;r.fillViewInitialKey(\\\"angularaxis.rotation\\\",h.rotation),d.setGeometry();var g=function(t){return d.t2g(t.x)};\\\"linear\\\"===d.type&&\\\"radians\\\"===d.thetaunit&&(d.tick0=L(d.tick0),d.dtick=L(d.dtick)),\\\"category\\\"===d.type&&(d._tickFilter=function(t){return o.isAngleInsideSector(g(t),r.sectorInRad)}),d._transfn=function(t){var e=n.select(this),r=e&&e.node();if(r&&e.classed(\\\"angularaxisgrid\\\"))return\\\"\\\";var i=g(t),a=R(u+l*Math.cos(i),f-l*Math.sin(i));return r&&e.classed(\\\"ticks\\\")&&(a+=B(-L(i))),a},d._gridpath=function(t){var e=g(t),r=Math.cos(e),n=Math.sin(e);return\\\"M\\\"+[u+c*r,f-c*n]+\\\"L\\\"+[u+l*r,f-l*n]};var v=\\\"outside\\\"!==h.ticks?.7:.5;d._labelx=function(t){var e=g(t),r=d._labelStandoff,n=d._pad;return(0===j(e)?0:Math.cos(e)*(r+n+v*t.fontSize))+N(e)*(t.dx+r+n)},d._labely=function(t){var e=g(t),r=d._labelStandoff,n=d._labelShift,i=d._pad;return t.dy+t.fontSize*M-n+-Math.sin(e)*(r+i+v*t.fontSize)},d._labelanchor=function(t,e){var r=g(e);return 0===j(r)?N(r)>0?\\\"start\\\":\\\"end\\\":\\\"middle\\\"};var m,y=I(h);r.angularTickLayout!==y&&(a[\\\"angular-axis\\\"].selectAll(\\\".\\\"+d._id+\\\"tick\\\").remove(),r.angularTickLayout=y),d.setScale(),p(i,d,!0),\\\"linear\\\"===e.gridshape?(m=d._vals.map(g),o.angleDelta(m[0],m[1])<0&&(m=m.slice().reverse())):m=null,r.vangles=m,D(a[\\\"angular-line\\\"].select(\\\"path\\\"),h.showline,{d:r.pathSubplot(),transform:R(u,f)}).attr(\\\"stroke-width\\\",h.linewidth).call(s.stroke,h.linecolor)},O.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},O.updateMainDrag=function(t){var e=this,r=e.gd,o=e.layers,s=t._zoomlayer,l=A.MINZOOM,c=A.OFFEDGE,u=e.radius,f=e.innerRadius,h=e.cx,p=e.cy,m=e.cxx,_=e.cyy,w=e.sectorInRad,k=e.vangles,M=e.radialAxis,S=T.clampTiny,C=T.findXYatLength,E=T.findEnclosingVertexAngles,L=A.cornerHalfWidth,z=A.cornerLen/2,O=d.makeDragger(o,\\\"path\\\",\\\"maindrag\\\",\\\"crosshair\\\");n.select(O).attr(\\\"d\\\",e.pathSubplot()).attr(\\\"transform\\\",R(h,p));var I,P,D,B,F,N,j,V,U,q={element:O,gd:r,subplot:e.id,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis},xaxes:[e.xaxis],yaxes:[e.yaxis]};function H(t,e){return Math.sqrt(t*t+e*e)}function G(t,e){return H(t-m,e-_)}function W(t,e){return Math.atan2(_-e,t-m)}function Y(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function X(t,r){if(0===t)return e.pathSector(2*L);var n=z/t,i=r-n,a=r+n,o=Math.max(0,Math.min(t,u)),s=o-L,l=o+L;return\\\"M\\\"+Y(s,i)+\\\"A\\\"+[s,s]+\\\" 0,0,0 \\\"+Y(s,a)+\\\"L\\\"+Y(l,a)+\\\"A\\\"+[l,l]+\\\" 0,0,1 \\\"+Y(l,i)+\\\"Z\\\"}function Z(t,r,n){if(0===t)return e.pathSector(2*L);var i,a,o=Y(t,r),s=Y(t,n),l=S((o[0]+s[0])/2),c=S((o[1]+s[1])/2);if(l&&c){var u=c/l,f=-1/u,h=C(L,u,l,c);i=C(z,f,h[0][0],h[0][1]),a=C(z,f,h[1][0],h[1][1])}else{var p,d;c?(p=z,d=L):(p=L,d=z),i=[[l-p,c-d],[l+p,c-d]],a=[[l-p,c+d],[l+p,c+d]]}return\\\"M\\\"+i.join(\\\"L\\\")+\\\"L\\\"+a.reverse().join(\\\"L\\\")+\\\"Z\\\"}function $(t,e){return e=Math.max(Math.min(e,u),f),t<c?t=0:u-t<c?t=u:e<c?e=0:u-e<c&&(e=u),Math.abs(e-t)>l?(t<e?(D=t,B=e):(D=e,B=t),!0):(D=null,B=null,!1)}function J(t,e){t=t||F,e=e||\\\"M0,0Z\\\",V.attr(\\\"d\\\",t),U.attr(\\\"d\\\",e),d.transitionZoombox(V,U,N,j),N=!0}function K(t,r){var n,i,a=I+t,o=P+r,s=G(I,P),l=Math.min(G(a,o),u),c=W(I,P);$(s,l)&&(n=F+e.pathSector(B),D&&(n+=e.pathSector(D)),i=X(D,c)+X(B,c)),J(n,i)}function Q(t,e,r,n){var i=T.findIntersectionXY(r,n,r,[t-m,_-e]);return H(i[0],i[1])}function tt(t,r){var n,i,a=I+t,o=P+r,s=W(I,P),l=W(a,o),c=E(s,k),f=E(l,k);$(Q(I,P,c[0],c[1]),Math.min(Q(a,o,f[0],f[1]),u))&&(n=F+e.pathSector(B),D&&(n+=e.pathSector(D)),i=[Z(D,c[0],c[1]),Z(B,c[0],c[1])].join(\\\" \\\")),J(n,i)}function et(){if(d.removeZoombox(r),null!==D&&null!==B){d.showDoubleClickNotifier(r);var t=M._rl,n=(t[1]-t[0])/(1-f/u)/u,i=[t[0]+(D-f)*n,t[0]+(B-f)*n];a.call(\\\"relayout\\\",r,e.id+\\\".radialaxis.range\\\",i)}}function rt(t,n){var i=r._fullLayout.clickmode;if(d.removeZoombox(r),2===t){var o={};for(var s in e.viewInitial)o[e.id+\\\".\\\"+s]=e.viewInitial[s];r.emit(\\\"plotly_doubleclick\\\",null),a.call(\\\"relayout\\\",r,o)}i.indexOf(\\\"select\\\")>-1&&1===t&&x(n,r,[e.xaxis],[e.yaxis],e.id,q),i.indexOf(\\\"event\\\")>-1&&v.click(r,n,e.id)}q.prepFn=function(t,n,a){var o=r._fullLayout.dragmode,l=O.getBoundingClientRect();if(I=n-l.left,P=a-l.top,k){var c=T.findPolygonOffset(u,w[0],w[1],k);I+=m+c[0],P+=_+c[1]}switch(o){case\\\"zoom\\\":q.moveFn=k?tt:K,q.clickFn=rt,q.doneFn=et,function(){D=null,B=null,F=e.pathSubplot(),N=!1;var t=r._fullLayout[e.id];j=i(t.bgcolor).getLuminance(),(V=d.makeZoombox(s,j,h,p,F)).attr(\\\"fill-rule\\\",\\\"evenodd\\\"),U=d.makeCorners(s,h,p),b(s)}();break;case\\\"select\\\":case\\\"lasso\\\":y(t,n,a,q,o)}},O.onmousemove=function(t){v.hover(r,t,e.id),r._fullLayout._lasthover=O,r._fullLayout._hoversubplot=e.id},O.onmouseout=function(t){r._dragging||g.unhover(r,t)},g.init(q)},O.updateRadialDrag=function(t,e,r){var i=this,s=i.gd,l=i.layers,c=i.radius,u=i.innerRadius,f=i.cx,h=i.cy,v=i.radialAxis,m=A.radialDragBoxSize,y=m/2;if(v.visible){var x,_,M,T=E(i.radialAxisAngle),S=v._rl,C=S[0],z=S[1],O=S[r],I=.75*(S[1]-S[0])/(1-e.hole)/c;r?(x=f+(c+y)*Math.cos(T),_=h-(c+y)*Math.sin(T),M=\\\"radialdrag\\\"):(x=f+(u-y)*Math.cos(T),_=h-(u-y)*Math.sin(T),M=\\\"radialdrag-inner\\\");var F,N,j,V=d.makeRectDragger(l,M,\\\"crosshair\\\",-y,-y,m,m),U={element:V,gd:s};D(n.select(V),v.visible&&u<c,{transform:R(x,_)}),U.prepFn=function(){F=null,N=null,j=null,U.moveFn=q,U.doneFn=H,b(t._zoomlayer)},U.clampFn=function(t,e){return Math.sqrt(t*t+e*e)<A.MINDRAG&&(t=0,e=0),[t,e]},g.init(U)}function q(t,e){if(F)F(t,e);else{var r=[t,-e],n=[Math.cos(T),Math.sin(T)],i=Math.abs(o.dot(r,n)/Math.sqrt(o.dot(r,r)));isNaN(i)||(F=i<.5?G:W)}}function H(){null!==N?a.call(\\\"relayout\\\",s,i.id+\\\".radialaxis.angle\\\",N):null!==j&&a.call(\\\"relayout\\\",s,i.id+\\\".radialaxis.range[\\\"+r+\\\"]\\\",j)}function G(t,e){if(0!==r){var n=x+t,a=_+e;N=Math.atan2(h-a,n-f),i.vangles&&(N=P(N,i.vangles)),N=L(N);var o=R(f,h)+B(-N);l[\\\"radial-axis\\\"].attr(\\\"transform\\\",o),l[\\\"radial-line\\\"].select(\\\"line\\\").attr(\\\"transform\\\",o);var s=i.gd._fullLayout,c=s[i.id];i.updateRadialAxisTitle(s,c,N)}}function W(t,e){var n=o.dot([t,-e],[Math.cos(T),Math.sin(T)]);if(j=O-I*n,I>0==(r?j>C:j<z)){v.range[r]=j,v._rl[r]=j,v.setGeometry(),v.setScale(),i.xaxis.setRange(),i.xaxis.setScale(),i.yaxis.setRange(),i.yaxis.setScale(),p(s,v,!0),l[\\\"radial-grid\\\"].attr(\\\"transform\\\",R(f,h)).selectAll(\\\"path\\\").attr(\\\"transform\\\",null);var c=!1;for(var u in i.traceHash){var d=i.traceHash[u],g=o.filterVisible(d),m=d[0][0].trace._module,y=s._fullLayout[i.id];m.plot(s,i,g,y),a.traceIs(u,\\\"gl\\\")&&g.length&&(c=!0)}c&&(w(s),k(s))}else j=null}},O.updateAngularDrag=function(t){var e=this,r=e.gd,i=e.layers,s=e.radius,c=e.angularAxis,u=e.cx,f=e.cy,h=e.cxx,v=e.cyy,m=A.angularDragBoxSize,y=d.makeDragger(i,\\\"path\\\",\\\"angulardrag\\\",\\\"move\\\"),x={element:y,gd:r};function M(t,e){return Math.atan2(v+m-e,t-h-m)}n.select(y).attr(\\\"d\\\",e.pathAnnulus(s,s+m)).attr(\\\"transform\\\",R(u,f)).call(_,\\\"move\\\");var T,S,C,E,z,O,I=i.frontplot.select(\\\".scatterlayer\\\").selectAll(\\\".trace\\\"),P=I.selectAll(\\\".point\\\"),D=I.selectAll(\\\".textpoint\\\");function F(t,s){var d=e.gd._fullLayout,g=d[e.id],m=M(T+t,S+s),y=L(m-O);if(E=C+y,i.frontplot.attr(\\\"transform\\\",R(e.xOffset2,e.yOffset2)+B([-y,h,v])),e.vangles){z=e.radialAxisAngle+y;var x=R(u,f)+B(-y),b=R(u,f)+B(-z);i.bg.attr(\\\"transform\\\",x),i[\\\"radial-grid\\\"].attr(\\\"transform\\\",x),i[\\\"angular-line\\\"].select(\\\"path\\\").attr(\\\"transform\\\",x),i[\\\"radial-axis\\\"].attr(\\\"transform\\\",b),i[\\\"radial-line\\\"].select(\\\"line\\\").attr(\\\"transform\\\",b),e.updateRadialAxisTitle(d,g,z)}else e.clipPaths.forTraces.select(\\\"path\\\").attr(\\\"transform\\\",R(h,v)+B(y));P.each(function(){var t=n.select(this),e=l.getTranslate(t);t.attr(\\\"transform\\\",R(e.x,e.y)+B([y]))}),D.each(function(){var t=n.select(this),e=t.select(\\\"text\\\"),r=l.getTranslate(t);t.attr(\\\"transform\\\",B([y,e.attr(\\\"x\\\"),e.attr(\\\"y\\\")])+R(r.x,r.y))}),c.rotation=o.modHalf(E,360),c.setGeometry(),c.setScale(),p(r,c,!0),e._hasClipOnAxisFalse&&!o.isFullCircle(e.sectorInRad)&&I.call(l.hideOutsideRangePoints,e);var _=!1;for(var A in e.traceHash)if(a.traceIs(A,\\\"gl\\\")){var F=e.traceHash[A],N=o.filterVisible(F);F[0][0].trace._module.plot(r,e,N,g),N.length&&(_=!0)}_&&(w(r),k(r))}function N(){D.select(\\\"text\\\").attr(\\\"transform\\\",null);var t={};t[e.id+\\\".angularaxis.rotation\\\"]=E,e.vangles&&(t[e.id+\\\".radialaxis.angle\\\"]=z),a.call(\\\"relayout\\\",r,t)}x.prepFn=function(r,n,i){var a=t[e.id];C=a.angularaxis.rotation;var o=y.getBoundingClientRect();T=n-o.left,S=i-o.top,O=M(T,S),x.moveFn=F,x.doneFn=N,b(t._zoomlayer)},e.vangles&&!o.isFullCircle(e.sectorInRad)&&(x.prepFn=o.noop,_(n.select(y),null)),g.init(x)},O.isPtInside=function(t){var e=this.sectorInRad,r=this.vangles,n=this.angularAxis.c2g(t.theta),i=this.radialAxis,a=i.c2l(t.r),s=i._rl;return(r?T.isPtInsidePolygon:o.isPtInsideSector)(a,n,s,e,r)},O.pathArc=function(t){var e=this.sectorInRad,r=this.vangles;return(r?T.pathPolygon:o.pathArc)(t,e[0],e[1],r)},O.pathSector=function(t){var e=this.sectorInRad,r=this.vangles;return(r?T.pathPolygon:o.pathSector)(t,e[0],e[1],r)},O.pathAnnulus=function(t,e){var r=this.sectorInRad,n=this.vangles;return(n?T.pathPolygonAnnulus:o.pathAnnulus)(t,e,r[0],r[1],n)},O.pathSubplot=function(){var t=this.innerRadius,e=this.radius;return t?this.pathAnnulus(t,e):this.pathSector(e)},O.fillViewInitialKey=function(t,e){t in this.viewInitial||(this.viewInitial[t]=e)}},{\\\"../../components/color\\\":570,\\\"../../components/dragelement\\\":592,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../components/titles\\\":661,\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/clear_gl_canvases\\\":679,\\\"../../lib/setcursor\\\":717,\\\"../../plot_api/subroutines\\\":736,\\\"../../registry\\\":828,\\\"../cartesian/autorange\\\":744,\\\"../cartesian/axes\\\":745,\\\"../cartesian/dragbox\\\":754,\\\"../cartesian/select\\\":763,\\\"../cartesian/set_convert\\\":764,\\\"../plots\\\":809,\\\"./constants\\\":810,\\\"./helpers\\\":811,\\\"./set_convert\\\":822,d3:148,tinycolor2:514}],822:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../cartesian/set_convert\\\"),a=n.deg2rad,o=n.rad2deg;e.exports=function(t,e,r){switch(i(t,r),t._id){case\\\"x\\\":case\\\"radialaxis\\\":!function(t,e){var r=e._subplot;t.setGeometry=function(){var e=t._rl[0],n=t._rl[1],i=r.innerRadius,a=(r.radius-i)/(n-e),o=i/a,s=e>n?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case\\\"angularaxis\\\":!function(t,e){var r=t.type;if(\\\"linear\\\"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return\\\"degrees\\\"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return\\\"degrees\\\"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,c=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&&\\\"linear\\\"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o<l;o++)a[o]=c(s[o])}else{var u=i+\\\"0\\\",f=\\\"d\\\"+i,h=u in e?c(e[u]):0,p=e[f]?c(e[f]):(t.period||2*Math.PI)/l;for(a=new Array(l),o=0;o<l;o++)a[o]=h+o*p}return a},t.setGeometry=function(){var i,s,l,c,u=e.sector,f=u.map(a),h={clockwise:-1,counterclockwise:1}[t.direction],p=a(t.rotation),d=function(t){return h*t+p},g=function(t){return(t-p)/h};switch(r){case\\\"linear\\\":s=i=n.identity,c=a,l=o,t.range=n.isFullCircle(f)?[u[0],u[0]+360]:f.map(g).map(o);break;case\\\"category\\\":var v=t._categories.length,m=t.period?Math.max(t.period,v):v;s=c=function(t){return 2*t*Math.PI/m},i=l=function(t){return t*m/Math.PI/2},t.range=[0,m]}t.c2g=function(t){return d(s(t))},t.g2c=function(t){return i(g(t))},t.t2g=function(t){return d(c(t))},t.g2t=function(t){return l(g(t))}}}(t,e)}}},{\\\"../../lib\\\":696,\\\"../cartesian/set_convert\\\":764}],823:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plot_api/plot_template\\\"),a=t(\\\"./domain\\\").defaults;e.exports=function(t,e,r,o){var s,l,c=o.type,u=o.attributes,f=o.handleDefaults,h=o.partition||\\\"x\\\",p=e._subplots[c],d=p.length,g=d&&p[0].replace(/\\\\d+$/,\\\"\\\");function v(t,e){return n.coerce(s,l,u,t,e)}for(var m=0;m<d;m++){var y=p[m];s=t[y]?t[y]:t[y]={},l=i.newContainer(e,y,g);var x={};x[h]=[m/d,(m+1)/d],a(l,e,v,x),o.id=y,f(s,l,v,o)}}},{\\\"../lib\\\":696,\\\"../plot_api/plot_template\\\":735,\\\"./domain\\\":771}],824:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./ternary\\\"),i=t(\\\"../../plots/get_data\\\").getSubplotCalcData,a=t(\\\"../../lib\\\").counterRegex;r.name=\\\"ternary\\\";var o=r.attr=\\\"subplot\\\";r.idRoot=\\\"ternary\\\",r.idRegex=r.attrRegex=a(\\\"ternary\\\"),(r.attributes={})[o]={valType:\\\"subplotid\\\",dflt:\\\"ternary\\\",editType:\\\"calc\\\"},r.layoutAttributes=t(\\\"./layout_attributes\\\"),r.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),r.plot=function(t){for(var e=t._fullLayout,r=t.calcdata,a=e._subplots.ternary,o=0;o<a.length;o++){var s=a[o],l=i(r,\\\"ternary\\\",s),c=e[s]._subplot;c||(c=new n({id:s,graphDiv:t,container:e._ternarylayer.node()},e),e[s]._subplot=c),c.plot(l,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.ternary||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers[\\\"a-title\\\"].remove(),s.layers[\\\"b-title\\\"].remove(),s.layers[\\\"c-title\\\"].remove())}}},{\\\"../../lib\\\":696,\\\"../../plots/get_data\\\":782,\\\"./layout_attributes\\\":825,\\\"./layout_defaults\\\":826,\\\"./ternary\\\":827}],825:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color/attributes\\\"),i=t(\\\"../domain\\\").attributes,a=t(\\\"../cartesian/layout_attributes\\\"),o=t(\\\"../../plot_api/edit_types\\\").overrideAll,s=t(\\\"../../lib/extend\\\").extendFlat,l={title:a.title,titlefont:a.titlefont,color:a.color,tickmode:a.tickmode,nticks:s({},a.nticks,{dflt:6,min:1}),tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,showticklabels:a.showticklabels,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,hoverformat:a.hoverformat,showline:s({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:s({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,layer:a.layer,min:{valType:\\\"number\\\",dflt:0,min:0}};e.exports=o({domain:i({name:\\\"ternary\\\"}),bgcolor:{valType:\\\"color\\\",dflt:n.background},sum:{valType:\\\"number\\\",dflt:1,min:0},aaxis:l,baxis:l,caxis:l},\\\"plot\\\",\\\"from-root\\\")},{\\\"../../components/color/attributes\\\":569,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../cartesian/layout_attributes\\\":758,\\\"../domain\\\":771}],826:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../plot_api/plot_template\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../subplot_defaults\\\"),s=t(\\\"../cartesian/tick_label_defaults\\\"),l=t(\\\"../cartesian/tick_mark_defaults\\\"),c=t(\\\"../cartesian/tick_value_defaults\\\"),u=t(\\\"../cartesian/line_grid_defaults\\\"),f=t(\\\"./layout_attributes\\\"),h=[\\\"aaxis\\\",\\\"baxis\\\",\\\"caxis\\\"];function p(t,e,r,a){var o,s,l,c=r(\\\"bgcolor\\\"),u=r(\\\"sum\\\");a.bgColor=n.combine(c,a.paper_bgcolor);for(var f=0;f<h.length;f++)s=t[o=h[f]]||{},(l=i.newContainer(e,o))._name=o,d(s,l,a);var p=e.aaxis,g=e.baxis,v=e.caxis;p.min+g.min+v.min>=u&&(p.min=0,g.min=0,v.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r){var n=f[e._name];function i(r,i){return a.coerce(t,e,n,r,i)}e.type=\\\"linear\\\";var o=i(\\\"color\\\"),h=o!==n.color.dflt?o:r.font.color,p=e._name.charAt(0).toUpperCase(),d=\\\"Component \\\"+p,g=i(\\\"title\\\",d);e._hovertitle=g===d?g:p,a.coerceFont(i,\\\"titlefont\\\",{family:r.font.family,size:Math.round(1.2*r.font.size),color:h}),i(\\\"min\\\"),c(t,e,i,\\\"linear\\\"),s(t,e,i,\\\"linear\\\",{}),l(t,e,i,{outerTicks:!0}),i(\\\"showticklabels\\\")&&(a.coerceFont(i,\\\"tickfont\\\",{family:r.font.family,size:r.font.size,color:h}),i(\\\"tickangle\\\"),i(\\\"tickformat\\\")),u(t,e,i,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n}),i(\\\"hoverformat\\\"),i(\\\"layer\\\")}e.exports=function(t,e,r){o(t,e,r,{type:\\\"ternary\\\",attributes:f,handleDefaults:p,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../cartesian/line_grid_defaults\\\":760,\\\"../cartesian/tick_label_defaults\\\":765,\\\"../cartesian/tick_mark_defaults\\\":766,\\\"../cartesian/tick_value_defaults\\\":767,\\\"../subplot_defaults\\\":823,\\\"./layout_attributes\\\":825}],827:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../../lib\\\"),s=o._,l=t(\\\"../../components/color\\\"),c=t(\\\"../../components/drawing\\\"),u=t(\\\"../cartesian/set_convert\\\"),f=t(\\\"../../lib/extend\\\").extendFlat,h=t(\\\"../plots\\\"),p=t(\\\"../cartesian/axes\\\"),d=t(\\\"../../components/dragelement\\\"),g=t(\\\"../../components/fx\\\"),v=t(\\\"../../components/titles\\\"),m=t(\\\"../cartesian/select\\\").prepSelect,y=t(\\\"../cartesian/select\\\").selectOnClick,x=t(\\\"../cartesian/select\\\").clearSelect,b=t(\\\"../cartesian/constants\\\");function _(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=_;var w=_.prototype;w.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},w.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;i<t.length;i++){if(!1===t[i][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(r),this.adjustLayout(r,n),h.generalUpdatePerTraceModule(this.graphDiv,this,t,r),this.layers.plotbg.select(\\\"path\\\").call(l.fill,r.bgcolor)},w.makeFramework=function(t){var e=t[this.id],r=this.clipId=\\\"clip\\\"+this.layoutId+this.id,n=this.clipIdRelative=\\\"clip-relative\\\"+this.layoutId+this.id;this.clipDef=o.ensureSingleById(t._clips,\\\"clipPath\\\",r,function(t){t.append(\\\"path\\\").attr(\\\"d\\\",\\\"M0,0Z\\\")}),this.clipDefRelative=o.ensureSingleById(t._clips,\\\"clipPath\\\",n,function(t){t.append(\\\"path\\\").attr(\\\"d\\\",\\\"M0,0Z\\\")}),this.plotContainer=o.ensureSingle(this.container,\\\"g\\\",this.id),this.updateLayers(e),c.setClipUrl(this.layers.backplot,r),c.setClipUrl(this.layers.grids,r)},w.updateLayers=function(t){var e=this.layers,r=[\\\"draglayer\\\",\\\"plotbg\\\",\\\"backplot\\\",\\\"grids\\\"];\\\"below traces\\\"===t.aaxis.layer&&r.push(\\\"aaxis\\\",\\\"aline\\\"),\\\"below traces\\\"===t.baxis.layer&&r.push(\\\"baxis\\\",\\\"bline\\\"),\\\"below traces\\\"===t.caxis.layer&&r.push(\\\"caxis\\\",\\\"cline\\\"),r.push(\\\"frontplot\\\"),\\\"above traces\\\"===t.aaxis.layer&&r.push(\\\"aaxis\\\",\\\"aline\\\"),\\\"above traces\\\"===t.baxis.layer&&r.push(\\\"baxis\\\",\\\"bline\\\"),\\\"above traces\\\"===t.caxis.layer&&r.push(\\\"caxis\\\",\\\"cline\\\");var i=this.plotContainer.selectAll(\\\"g.toplevel\\\").data(r,String),a=[\\\"agrid\\\",\\\"bgrid\\\",\\\"cgrid\\\"];i.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"toplevel \\\"+t}).each(function(t){var r=n.select(this);e[t]=r,\\\"frontplot\\\"===t?r.append(\\\"g\\\").classed(\\\"scatterlayer\\\",!0):\\\"backplot\\\"===t?r.append(\\\"g\\\").classed(\\\"maplayer\\\",!0):\\\"plotbg\\\"===t?r.append(\\\"path\\\").attr(\\\"d\\\",\\\"M0,0Z\\\"):\\\"aline\\\"===t||\\\"bline\\\"===t||\\\"cline\\\"===t?r.append(\\\"path\\\"):\\\"grids\\\"===t&&a.forEach(function(t){e[t]=r.append(\\\"g\\\").classed(\\\"grid \\\"+t,!0);var n=\\\"bgrid\\\"===t?\\\"x\\\":\\\"y\\\";e[t].append(\\\"g\\\").classed(n,!0)})}),i.order()};var k=Math.sqrt(4/3);function M(t){return t.ticks+String(t.ticklen)+String(t.showticklabels)}w.adjustLayout=function(t,e){var r,n,i,a,o,s,h=this,p=t.domain,d=(p.x[0]+p.x[1])/2,g=(p.y[0]+p.y[1])/2,v=p.x[1]-p.x[0],m=p.y[1]-p.y[0],y=v*e.w,x=m*e.h,b=t.sum,_=t.aaxis.min,w=t.baxis.min,M=t.caxis.min;y>k*x?i=(a=x)*k:a=(i=y)/k,o=v*i/y,s=m*a/x,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-g)-a/2,h.x0=r,h.y0=n,h.w=i,h.h=a,h.sum=b,h.xaxis={type:\\\"linear\\\",range:[_+2*M-b,b-_-2*w],domain:[d-o/2,d+o/2],_id:\\\"x\\\"},u(h.xaxis,h.graphDiv._fullLayout),h.xaxis.setScale(),h.xaxis.isPtWithinRange=function(t){return t.a>=h.aaxis.range[0]&&t.a<=h.aaxis.range[1]&&t.b>=h.baxis.range[1]&&t.b<=h.baxis.range[0]&&t.c>=h.caxis.range[1]&&t.c<=h.caxis.range[0]},h.yaxis={type:\\\"linear\\\",range:[_,b-w-M],domain:[g-s/2,g+s/2],_id:\\\"y\\\"},u(h.yaxis,h.graphDiv._fullLayout),h.yaxis.setScale(),h.yaxis.isPtWithinRange=function(){return!0};var A=h.yaxis.domain[0],T=h.aaxis=f({},t.aaxis,{visible:!0,range:[_,b-w-M],side:\\\"left\\\",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*k],_axislayer:h.layers.aaxis,_gridlayer:h.layers.agrid,anchor:\\\"free\\\",position:0,_pos:0,_id:\\\"y\\\",_length:i,_gridpath:\\\"M0,0l\\\"+a+\\\",-\\\"+i/2,automargin:!1});u(T,h.graphDiv._fullLayout),T.setScale();var S=h.baxis=f({},t.baxis,{visible:!0,range:[b-_-M,w],side:\\\"bottom\\\",_counterangle:30,domain:h.xaxis.domain,_axislayer:h.layers.baxis,_gridlayer:h.layers.bgrid,_counteraxis:h.aaxis,anchor:\\\"free\\\",position:0,_pos:0,_id:\\\"x\\\",_length:i,_gridpath:\\\"M0,0l-\\\"+i/2+\\\",-\\\"+a,automargin:!1});u(S,h.graphDiv._fullLayout),S.setScale(),T._counteraxis=S;var C=h.caxis=f({},t.caxis,{visible:!0,range:[b-_-w,M],side:\\\"right\\\",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*k],_axislayer:h.layers.caxis,_gridlayer:h.layers.cgrid,_counteraxis:h.baxis,anchor:\\\"free\\\",position:0,_pos:0,_id:\\\"y\\\",_length:i,_gridpath:\\\"M0,0l-\\\"+a+\\\",\\\"+i/2,automargin:!1});u(C,h.graphDiv._fullLayout),C.setScale();var E=\\\"M\\\"+r+\\\",\\\"+(n+a)+\\\"h\\\"+i+\\\"l-\\\"+i/2+\\\",-\\\"+a+\\\"Z\\\";h.clipDef.select(\\\"path\\\").attr(\\\"d\\\",E),h.layers.plotbg.select(\\\"path\\\").attr(\\\"d\\\",E);var L=\\\"M0,\\\"+a+\\\"h\\\"+i+\\\"l-\\\"+i/2+\\\",-\\\"+a+\\\"Z\\\";h.clipDefRelative.select(\\\"path\\\").attr(\\\"d\\\",L);var z=\\\"translate(\\\"+r+\\\",\\\"+n+\\\")\\\";h.plotContainer.selectAll(\\\".scatterlayer,.maplayer\\\").attr(\\\"transform\\\",z),h.clipDefRelative.select(\\\"path\\\").attr(\\\"transform\\\",null);var O=\\\"translate(\\\"+(r-S._offset)+\\\",\\\"+(n+a)+\\\")\\\";h.layers.baxis.attr(\\\"transform\\\",O),h.layers.bgrid.attr(\\\"transform\\\",O);var I=\\\"translate(\\\"+(r+i/2)+\\\",\\\"+n+\\\")rotate(30)translate(0,\\\"+-T._offset+\\\")\\\";h.layers.aaxis.attr(\\\"transform\\\",I),h.layers.agrid.attr(\\\"transform\\\",I);var P=\\\"translate(\\\"+(r+i/2)+\\\",\\\"+n+\\\")rotate(-30)translate(0,\\\"+-C._offset+\\\")\\\";h.layers.caxis.attr(\\\"transform\\\",P),h.layers.cgrid.attr(\\\"transform\\\",P),h.drawAxes(!0),h.plotContainer.selectAll(\\\".crisp\\\").classed(\\\"crisp\\\",!1),h.layers.aline.select(\\\"path\\\").attr(\\\"d\\\",T.showline?\\\"M\\\"+r+\\\",\\\"+(n+a)+\\\"l\\\"+i/2+\\\",-\\\"+a:\\\"M0,0\\\").call(l.stroke,T.linecolor||\\\"#000\\\").style(\\\"stroke-width\\\",(T.linewidth||0)+\\\"px\\\"),h.layers.bline.select(\\\"path\\\").attr(\\\"d\\\",S.showline?\\\"M\\\"+r+\\\",\\\"+(n+a)+\\\"h\\\"+i:\\\"M0,0\\\").call(l.stroke,S.linecolor||\\\"#000\\\").style(\\\"stroke-width\\\",(S.linewidth||0)+\\\"px\\\"),h.layers.cline.select(\\\"path\\\").attr(\\\"d\\\",C.showline?\\\"M\\\"+(r+i/2)+\\\",\\\"+n+\\\"l\\\"+i/2+\\\",\\\"+a:\\\"M0,0\\\").call(l.stroke,C.linecolor||\\\"#000\\\").style(\\\"stroke-width\\\",(C.linewidth||0)+\\\"px\\\"),h.graphDiv._context.staticPlot||h.initInteractions(),c.setClipUrl(h.layers.frontplot,h._hasClipOnAxisFalse?null:h.clipId)},w.drawAxes=function(t){var e,r=this.graphDiv,n=this.id.substr(7)+\\\"title\\\",i=this.layers,a=this.aaxis,o=this.baxis,l=this.caxis;if(e=M(a),this.aTickLayout!==e&&(i.aaxis.selectAll(\\\".ytick\\\").remove(),this.aTickLayout=e),e=M(o),this.bTickLayout!==e&&(i.baxis.selectAll(\\\".xtick\\\").remove(),this.bTickLayout=e),e=M(l),this.cTickLayout!==e&&(i.caxis.selectAll(\\\".ytick\\\").remove(),this.cTickLayout=e),p.doTicksSingle(r,a,!0),p.doTicksSingle(r,o,!0),p.doTicksSingle(r,l,!0),t){var c=Math.max(a.showticklabels?a.tickfont.size/2:0,(l.showticklabels?.75*l.tickfont.size:0)+(\\\"outside\\\"===l.ticks?.87*l.ticklen:0));this.layers[\\\"a-title\\\"]=v.draw(r,\\\"a\\\"+n,{propContainer:a,propName:this.id+\\\".aaxis.title\\\",placeholder:s(r,\\\"Click to enter Component A title\\\"),attributes:{x:this.x0+this.w/2,y:this.y0-a.titlefont.size/3-c,\\\"text-anchor\\\":\\\"middle\\\"}});var u=(o.showticklabels?o.tickfont.size:0)+(\\\"outside\\\"===o.ticks?o.ticklen:0)+3;this.layers[\\\"b-title\\\"]=v.draw(r,\\\"b\\\"+n,{propContainer:o,propName:this.id+\\\".baxis.title\\\",placeholder:s(r,\\\"Click to enter Component B title\\\"),attributes:{x:this.x0-u,y:this.y0+this.h+.83*o.titlefont.size+u,\\\"text-anchor\\\":\\\"middle\\\"}}),this.layers[\\\"c-title\\\"]=v.draw(r,\\\"c\\\"+n,{propContainer:l,propName:this.id+\\\".caxis.title\\\",placeholder:s(r,\\\"Click to enter Component C title\\\"),attributes:{x:this.x0+this.w+u,y:this.y0+this.h+.83*l.titlefont.size+u,\\\"text-anchor\\\":\\\"middle\\\"}})}};var A=b.MINZOOM/2+.87,T=\\\"m-0.87,.5h\\\"+A+\\\"v3h-\\\"+(A+5.2)+\\\"l\\\"+(A/2+2.6)+\\\",-\\\"+(.87*A+4.5)+\\\"l2.6,1.5l-\\\"+A/2+\\\",\\\"+.87*A+\\\"Z\\\",S=\\\"m0.87,.5h-\\\"+A+\\\"v3h\\\"+(A+5.2)+\\\"l-\\\"+(A/2+2.6)+\\\",-\\\"+(.87*A+4.5)+\\\"l-2.6,1.5l\\\"+A/2+\\\",\\\"+.87*A+\\\"Z\\\",C=\\\"m0,1l\\\"+A/2+\\\",\\\"+.87*A+\\\"l2.6,-1.5l-\\\"+(A/2+2.6)+\\\",-\\\"+(.87*A+4.5)+\\\"l-\\\"+(A/2+2.6)+\\\",\\\"+(.87*A+4.5)+\\\"l2.6,1.5l\\\"+A/2+\\\",-\\\"+.87*A+\\\"Z\\\",E=\\\"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z\\\",L=!0;function z(t){n.select(t).selectAll(\\\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\\\").remove()}w.initInteractions=function(){var t,e,r,n,u,f,h,p,v,_,w=this,M=w.layers.plotbg.select(\\\"path\\\").node(),A=w.graphDiv,O=A._fullLayout._zoomlayer,I={element:M,gd:A,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(a,o,s){I.xaxes=[w.xaxis],I.yaxes=[w.yaxis];var c=A._fullLayout.dragmode;I.minDrag=\\\"lasso\\\"===c?1:void 0,\\\"zoom\\\"===c?(I.moveFn=F,I.clickFn=P,I.doneFn=N,function(a,o,s){var c=M.getBoundingClientRect();t=o-c.left,e=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,f=i(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),h=\\\"M0,\\\"+w.h+\\\"L\\\"+w.w/2+\\\", 0L\\\"+w.w+\\\",\\\"+w.h+\\\"Z\\\",p=!1,v=O.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox\\\").attr(\\\"transform\\\",\\\"translate(\\\"+w.x0+\\\", \\\"+w.y0+\\\")\\\").style({fill:f>.2?\\\"rgba(0,0,0,0)\\\":\\\"rgba(255,255,255,0)\\\",\\\"stroke-width\\\":0}).attr(\\\"d\\\",h),_=O.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox-corners\\\").attr(\\\"transform\\\",\\\"translate(\\\"+w.x0+\\\", \\\"+w.y0+\\\")\\\").style({fill:l.background,stroke:l.defaultLine,\\\"stroke-width\\\":1,opacity:0}).attr(\\\"d\\\",\\\"M0,0Z\\\"),x(O)}(0,o,s)):\\\"pan\\\"===c?(I.moveFn=j,I.clickFn=P,I.doneFn=V,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,x(O)):\\\"select\\\"!==c&&\\\"lasso\\\"!==c||m(a,o,s,I,c)}};function P(t,e){var r=A._fullLayout.clickmode;if(z(A),2===t){var n={};n[w.id+\\\".aaxis.min\\\"]=0,n[w.id+\\\".baxis.min\\\"]=0,n[w.id+\\\".caxis.min\\\"]=0,A.emit(\\\"plotly_doubleclick\\\",null),a.call(\\\"relayout\\\",A,n)}r.indexOf(\\\"select\\\")>-1&&1===t&&y(e,A,[w.xaxis],[w.yaxis],w.id,I),r.indexOf(\\\"event\\\")>-1&&g.click(A,e,w.id)}function D(t,e){return 1-e/w.h}function R(t,e){return 1-(t+(w.h-e)/Math.sqrt(3))/w.w}function B(t,e){return(t-(w.h-e)/Math.sqrt(3))/w.w}function F(i,a){var o=t+i,s=e+a,l=Math.max(0,Math.min(1,D(0,e),D(0,s))),c=Math.max(0,Math.min(1,R(t,e),R(o,s))),d=Math.max(0,Math.min(1,B(t,e),B(o,s))),g=(l/2+d)*w.w,m=(1-l/2-c)*w.w,y=(g+m)/2,x=m-g,M=(1-l)*w.h,A=M-x/k;x<b.MINZOOM?(u=r,v.attr(\\\"d\\\",h),_.attr(\\\"d\\\",\\\"M0,0Z\\\")):(u={a:r.a+l*n,b:r.b+c*n,c:r.c+d*n},v.attr(\\\"d\\\",h+\\\"M\\\"+g+\\\",\\\"+M+\\\"H\\\"+m+\\\"L\\\"+y+\\\",\\\"+A+\\\"L\\\"+g+\\\",\\\"+M+\\\"Z\\\"),_.attr(\\\"d\\\",\\\"M\\\"+t+\\\",\\\"+e+E+\\\"M\\\"+g+\\\",\\\"+M+T+\\\"M\\\"+m+\\\",\\\"+M+S+\\\"M\\\"+y+\\\",\\\"+A+C)),p||(v.transition().style(\\\"fill\\\",f>.2?\\\"rgba(0,0,0,0.4)\\\":\\\"rgba(255,255,255,0.3)\\\").duration(200),_.transition().style(\\\"opacity\\\",1).duration(200),p=!0)}function N(){if(z(A),u!==r){var t={};t[w.id+\\\".aaxis.min\\\"]=u.a,t[w.id+\\\".baxis.min\\\"]=u.b,t[w.id+\\\".caxis.min\\\"]=u.c,a.call(\\\"relayout\\\",A,t),L&&A.data&&A._context.showTips&&(o.notifier(s(A,\\\"Double-click to zoom back out\\\"),\\\"long\\\"),L=!1)}}function j(t,e){var n=t/w.xaxis._m,i=e/w.yaxis._m,a=[(u={a:r.a-i,b:r.b+(n+i)/2,c:r.c-(n-i)/2}).a,u.b,u.c].sort(),o=a.indexOf(u.a),s=a.indexOf(u.b),l=a.indexOf(u.c);a[0]<0&&(a[1]+a[0]/2<0?(a[2]+=a[0]+a[1],a[0]=a[1]=0):(a[2]+=a[0]/2,a[1]+=a[0]/2,a[0]=0),u={a:a[o],b:a[s],c:a[l]},e=(r.a-u.a)*w.yaxis._m,t=(r.c-u.c-r.b+u.b)*w.xaxis._m);var f=\\\"translate(\\\"+(w.x0+t)+\\\",\\\"+(w.y0+e)+\\\")\\\";w.plotContainer.selectAll(\\\".scatterlayer,.maplayer\\\").attr(\\\"transform\\\",f);var h=\\\"translate(\\\"+-t+\\\",\\\"+-e+\\\")\\\";w.clipDefRelative.select(\\\"path\\\").attr(\\\"transform\\\",h),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w.plotContainer.selectAll(\\\".crisp\\\").classed(\\\"crisp\\\",!1),w._hasClipOnAxisFalse&&w.plotContainer.select(\\\".scatterlayer\\\").selectAll(\\\".trace\\\").call(c.hideOutsideRangePoints,w)}function V(){var t={};t[w.id+\\\".aaxis.min\\\"]=u.a,t[w.id+\\\".baxis.min\\\"]=u.b,t[w.id+\\\".caxis.min\\\"]=u.c,a.call(\\\"relayout\\\",A,t)}M.onmousemove=function(t){g.hover(A,t,w.id),A._fullLayout._lasthover=M,A._fullLayout._hoversubplot=w.id},M.onmouseout=function(t){A._dragging||d.unhover(A,t)},d.init(I)}},{\\\"../../components/color\\\":570,\\\"../../components/dragelement\\\":592,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../components/titles\\\":661,\\\"../../lib\\\":696,\\\"../../lib/extend\\\":685,\\\"../../registry\\\":828,\\\"../cartesian/axes\\\":745,\\\"../cartesian/constants\\\":751,\\\"../cartesian/select\\\":763,\\\"../cartesian/set_convert\\\":764,\\\"../plots\\\":809,d3:148,tinycolor2:514}],828:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/loggers\\\"),i=t(\\\"./lib/noop\\\"),a=t(\\\"./lib/push_unique\\\"),o=t(\\\"./lib/is_plain_object\\\"),s=t(\\\"./lib/extend\\\"),l=t(\\\"./plots/attributes\\\"),c=t(\\\"./plots/layout_attributes\\\"),u=s.extendFlat,f=s.extendDeepAll;function h(t){var e=t.name,i=t.categories,a=t.meta;if(r.modules[e])n.log(\\\"Type \\\"+e+\\\" already registered\\\");else{r.subplotsRegistry[t.basePlotModule.name]||function(t){var e=t.name;if(r.subplotsRegistry[e])return void n.log(\\\"Plot type \\\"+e+\\\" already registered.\\\");for(var i in v(t),r.subplotsRegistry[e]=t,r.componentsRegistry)x(i,t.name)}(t.basePlotModule);for(var o={},s=0;s<i.length;s++)o[i[s]]=!0,r.allCategories[i[s]]=!0;for(var l in r.modules[e]={_module:t,categories:o},a&&Object.keys(a).length&&(r.modules[e].meta=a),r.allTypes.push(e),r.componentsRegistry)m(l,e);t.layoutAttributes&&u(r.traceLayoutAttributes,t.layoutAttributes)}}function p(t){if(\\\"string\\\"!=typeof t.name)throw new Error(\\\"Component module *name* must be a string.\\\");var e=t.name;for(var n in r.componentsRegistry[e]=t,t.layoutAttributes&&(t.layoutAttributes._isLinkedToArray&&a(r.layoutArrayContainers,e),v(t)),r.modules)m(e,n);for(var i in r.subplotsRegistry)x(e,i);for(var o in r.transformsRegistry)y(e,o);t.schema&&t.schema.layout&&f(c,t.schema.layout)}function d(t){if(\\\"string\\\"!=typeof t.name)throw new Error(\\\"Transform module *name* must be a string.\\\");var e=\\\"Transform module \\\"+t.name,i=\\\"function\\\"==typeof t.transform,a=\\\"function\\\"==typeof t.calcTransform;if(!i&&!a)throw new Error(e+\\\" is missing a *transform* or *calcTransform* method.\\\");for(var s in i&&a&&n.log([e+\\\" has both a *transform* and *calcTransform* methods.\\\",\\\"Please note that all *transform* methods are executed\\\",\\\"before all *calcTransform* methods.\\\"].join(\\\" \\\")),o(t.attributes)||n.log(e+\\\" registered without an *attributes* object.\\\"),\\\"function\\\"!=typeof t.supplyDefaults&&n.log(e+\\\" registered without a *supplyDefaults* method.\\\"),r.transformsRegistry[t.name]=t,r.componentsRegistry)y(s,t.name)}function g(t){var e=t.name,n=e.split(\\\"-\\\")[0],i=t.dictionary,a=t.format,o=i&&Object.keys(i).length,s=a&&Object.keys(a).length,l=r.localeRegistry,c=l[e];if(c||(l[e]=c={}),n!==e){var u=l[n];u||(l[n]=u={}),o&&u.dictionary===c.dictionary&&(u.dictionary=i),s&&u.format===c.format&&(u.format=a)}o&&(c.dictionary=i),s&&(c.format=a)}function v(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n<e.length;n++)a(r.layoutArrayRegexes,e[n])}}function m(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.traces){var i=n.traces[e];i&&f(r.modules[e]._module.attributes,i)}}function y(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.transforms){var i=n.transforms[e];i&&f(r.transformsRegistry[e].attributes,i)}}function x(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.subplots){var i=r.subplotsRegistry[e],a=i.layoutAttributes,o=\\\"subplot\\\"===i.attr?i.name:i.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];a&&s&&f(a,s)}}function b(t){return\\\"object\\\"==typeof t&&(t=t.type),t}r.modules={},r.allCategories={},r.allTypes=[],r.subplotsRegistry={},r.transformsRegistry={},r.componentsRegistry={},r.layoutArrayContainers=[],r.layoutArrayRegexes=[],r.traceLayoutAttributes={},r.localeRegistry={},r.apiMethodRegistry={},r.register=function(t){if(!t)throw new Error(\\\"No argument passed to Plotly.register.\\\");t&&!Array.isArray(t)&&(t=[t]);for(var e=0;e<t.length;e++){var n=t[e];if(!n)throw new Error(\\\"Invalid module was attempted to be registered!\\\");switch(n.moduleType){case\\\"trace\\\":h(n);break;case\\\"transform\\\":d(n);break;case\\\"component\\\":p(n);break;case\\\"locale\\\":g(n);break;case\\\"apiMethod\\\":var i=n.name;r.apiMethodRegistry[i]=n.fn;break;default:throw new Error(\\\"Invalid module was attempted to be registered!\\\")}}},r.getModule=function(t){var e=r.modules[b(t)];return!!e&&e._module},r.traceIs=function(t,e){if(\\\"various\\\"===(t=b(t)))return!1;var i=r.modules[t];return i||(t&&\\\"area\\\"!==t&&n.log(\\\"Unrecognized trace type \\\"+t+\\\".\\\"),i=r.modules[l.type.dflt]),!!i.categories[e]},r.getTransformIndices=function(t,e){for(var r=[],n=t.transforms||[],i=0;i<n.length;i++)n[i].type===e&&r.push(i);return r},r.hasTransform=function(t,e){for(var r=t.transforms||[],n=0;n<r.length;n++)if(r[n].type===e)return!0;return!1},r.getComponentMethod=function(t,e){var n=r.componentsRegistry[t];return n&&n[e]||i},r.call=function(){var t=arguments[0],e=[].slice.call(arguments,1);return r.apiMethodRegistry[t].apply(null,e)}},{\\\"./lib/extend\\\":685,\\\"./lib/is_plain_object\\\":698,\\\"./lib/loggers\\\":701,\\\"./lib/noop\\\":706,\\\"./lib/push_unique\\\":711,\\\"./plots/attributes\\\":742,\\\"./plots/layout_attributes\\\":800}],829:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=n.extendFlat,a=n.extendDeep;function o(t){var e;switch(t){case\\\"themes__thumb\\\":e={autosize:!0,width:150,height:150,title:\\\"\\\",showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case\\\"thumbnail\\\":e={title:\\\"\\\",hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:\\\"\\\",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}e.exports=function(t,e){var r;t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var n,s=t.data,l=t.layout,c=a([],s),u=a({},l,o(e.tileClass)),f=t._context||{};if(e.width&&(u.width=e.width),e.height&&(u.height=e.height),\\\"thumbnail\\\"===e.tileClass||\\\"themes__thumb\\\"===e.tileClass){u.annotations=[];var h=Object.keys(u);for(r=0;r<h.length;r++)n=h[r],[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"].indexOf(n.slice(0,5))>-1&&(u[h[r]].title=\\\"\\\");for(r=0;r<c.length;r++){var p=c[r];p.showscale=!1,p.marker&&(p.marker.showscale=!1),\\\"pie\\\"===p.type&&(p.textposition=\\\"none\\\")}}if(Array.isArray(e.annotations))for(r=0;r<e.annotations.length;r++)u.annotations.push(e.annotations[r]);var d=Object.keys(u).filter(function(t){return t.match(/^scene\\\\d*$/)});if(d.length){var g={};for(\\\"thumbnail\\\"===e.tileClass&&(g={title:\\\"\\\",showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<d.length;r++){var v=u[d[r]];v.xaxis||(v.xaxis={}),v.yaxis||(v.yaxis={}),v.zaxis||(v.zaxis={}),i(v.xaxis,g),i(v.yaxis,g),i(v.zaxis,g),v._scene=null}}var m=document.createElement(\\\"div\\\");e.tileClass&&(m.className=e.tileClass);var y={gd:m,td:m,layout:u,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:f.mapboxAccessToken}};return\\\"transparent\\\"!==e.setBackground&&(y.config.setBackground=e.setBackground||\\\"opaque\\\"),y.gd.defaultLayout=o(e.tileClass),y}},{\\\"../lib\\\":696}],830:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../plot_api/to_image\\\"),i=t(\\\"../lib\\\"),a=t(\\\"./filesaver\\\");e.exports=function(t,e){var r;return i.isPlainObject(t)||(r=i.getGraphDiv(t)),(e=e||{}).format=e.format||\\\"png\\\",new Promise(function(o,s){r&&r._snapshotInProgress&&s(new Error(\\\"Snapshotting already in progress.\\\")),i.isIE()&&\\\"svg\\\"!==e.format&&s(new Error(\\\"Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.\\\")),r&&(r._snapshotInProgress=!0);var l=n(t,e),c=e.filename||t.fn||\\\"newplot\\\";c+=\\\".\\\"+e.format,l.then(function(t){return r&&(r._snapshotInProgress=!1),a(t,c)}).then(function(t){o(t)}).catch(function(t){r&&(r._snapshotInProgress=!1),s(t)})})}},{\\\"../lib\\\":696,\\\"../plot_api/to_image\\\":738,\\\"./filesaver\\\":831}],831:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=document.createElement(\\\"a\\\"),n=\\\"download\\\"in r,i=/Version\\\\/[\\\\d\\\\.]+.*Safari/.test(navigator.userAgent);return new Promise(function(a,o){if(\\\"undefined\\\"!=typeof navigator&&/MSIE [1-9]\\\\./.test(navigator.userAgent)&&o(new Error(\\\"IE < 10 unsupported\\\")),i&&(document.location.href=\\\"data:application/octet-stream\\\"+t.slice(t.search(/[,;]/)),a(e)),e||(e=\\\"download\\\"),n&&(r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),a(e)),\\\"undefined\\\"!=typeof navigator&&navigator.msSaveBlob){var s=t.split(/^data:image\\\\/svg\\\\+xml,/)[1],l=decodeURIComponent(s);navigator.msSaveBlob(new Blob([l]),e),a(e)}o(new Error(\\\"download error\\\"))})}},{}],832:[function(t,e,r){\\\"use strict\\\";r.getDelay=function(t){return t._has&&(t._has(\\\"gl3d\\\")||t._has(\\\"gl2d\\\")||t._has(\\\"mapbox\\\"))?500:0},r.getRedrawFunc=function(t){var e=t._fullLayout||{};if(!(!(e._has&&e._has(\\\"polar\\\"))&&t.data&&t.data[0]&&t.data[0].r))return function(){(t.calcdata||[]).forEach(function(t){t[0]&&t[0].t&&t[0].t.cb&&t[0].t.cb()})}}},{}],833:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./helpers\\\"),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:t(\\\"./cloneplot\\\"),toSVG:t(\\\"./tosvg\\\"),svgToImg:t(\\\"./svgtoimg\\\"),toImage:t(\\\"./toimage\\\"),downloadImage:t(\\\"./download\\\")};e.exports=i},{\\\"./cloneplot\\\":829,\\\"./download\\\":830,\\\"./helpers\\\":832,\\\"./svgtoimg\\\":834,\\\"./toimage\\\":835,\\\"./tosvg\\\":836}],834:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"events\\\").EventEmitter;e.exports=function(t){var e=t.emitter||new i,r=new Promise(function(i,a){var o=window.Image,s=t.svg,l=t.format||\\\"png\\\";if(n.isIE()&&\\\"svg\\\"!==l){var c=new Error(\\\"Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.\\\");return a(c),t.promise?r:e.emit(\\\"error\\\",c)}var u=t.canvas,f=t.scale||1,h=t.width||300,p=t.height||150,d=f*h,g=f*p,v=u.getContext(\\\"2d\\\"),m=new o,y=\\\"data:image/svg+xml,\\\"+encodeURIComponent(s);u.width=d,u.height=g,m.onload=function(){var r;switch(\\\"svg\\\"!==l&&v.drawImage(m,0,0,d,g),l){case\\\"jpeg\\\":r=u.toDataURL(\\\"image/jpeg\\\");break;case\\\"png\\\":r=u.toDataURL(\\\"image/png\\\");break;case\\\"webp\\\":r=u.toDataURL(\\\"image/webp\\\");break;case\\\"svg\\\":r=y;break;default:var n=\\\"Image format is not jpeg, png, svg or webp.\\\";if(a(new Error(n)),!t.promise)return e.emit(\\\"error\\\",n)}i(r),t.promise||e.emit(\\\"success\\\",r)},m.onerror=function(r){if(a(r),!t.promise)return e.emit(\\\"error\\\",r)},m.src=y});return t.promise?r:e}},{\\\"../lib\\\":696,events:92}],835:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"events\\\").EventEmitter,i=t(\\\"../registry\\\"),a=t(\\\"../lib\\\"),o=t(\\\"./helpers\\\"),s=t(\\\"./cloneplot\\\"),l=t(\\\"./tosvg\\\"),c=t(\\\"./svgtoimg\\\");e.exports=function(t,e){var r=new n,u=s(t,{format:\\\"png\\\"}),f=u.gd;f.style.position=\\\"absolute\\\",f.style.left=\\\"-5000px\\\",document.body.appendChild(f);var h=o.getRedrawFunc(f);return i.call(\\\"plot\\\",f,u.data,u.layout,u.config).then(h).then(function(){var t=o.getDelay(f._fullLayout);setTimeout(function(){var t=l(f),n=document.createElement(\\\"canvas\\\");n.id=a.randstr(),(r=c({format:e.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){f&&document.body.removeChild(f)}},t)}).catch(function(t){r.emit(\\\"error\\\",t)}),r}},{\\\"../lib\\\":696,\\\"../registry\\\":828,\\\"./cloneplot\\\":829,\\\"./helpers\\\":832,\\\"./svgtoimg\\\":834,\\\"./tosvg\\\":836,events:92}],836:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../components/drawing\\\"),o=t(\\\"../components/color\\\"),s=t(\\\"../constants/xmlns_namespaces\\\"),l=/\\\"/g,c=new RegExp('(\\\"TOBESTRIPPED)|(TOBESTRIPPED\\\")',\\\"g\\\");e.exports=function(t,e,r){var u,f=t._fullLayout,h=f._paper,p=f._toppaper,d=f.width,g=f.height;h.insert(\\\"rect\\\",\\\":first-child\\\").call(a.setRect,0,0,d,g).call(o.fill,f.paper_bgcolor);var v=f._basePlotModules||[];for(u=0;u<v.length;u++){var m=v[u];m.toSVG&&m.toSVG(t)}if(p){var y=p.node().childNodes,x=Array.prototype.slice.call(y);for(u=0;u<x.length;u++){var b=x[u];b.childNodes.length&&h.node().appendChild(b)}}f._draggers&&f._draggers.remove(),h.node().style.background=\\\"\\\",h.selectAll(\\\"text\\\").attr({\\\"data-unformatted\\\":null,\\\"data-math\\\":null}).each(function(){var t=n.select(this);if(\\\"hidden\\\"!==this.style.visibility&&\\\"none\\\"!==this.style.display){t.style({visibility:null,display:null});var e=this.style.fontFamily;e&&-1!==e.indexOf('\\\"')&&t.style(\\\"font-family\\\",e.replace(l,\\\"TOBESTRIPPED\\\"))}else t.remove()}),h.selectAll(\\\".point, .scatterpts, .legendfill>path, .legendlines>path, .cbfill\\\").each(function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf(\\\"url(\\\")&&t.style(\\\"fill\\\",e.replace(l,\\\"TOBESTRIPPED\\\"));var r=this.style.stroke;r&&-1!==r.indexOf(\\\"url(\\\")&&t.style(\\\"stroke\\\",r.replace(l,\\\"TOBESTRIPPED\\\"))}),\\\"pdf\\\"!==e&&\\\"eps\\\"!==e||h.selectAll(\\\"#MathJax_SVG_glyphs path\\\").attr(\\\"stroke-width\\\",0),h.node().setAttributeNS(s.xmlns,\\\"xmlns\\\",s.svg),h.node().setAttributeNS(s.xmlns,\\\"xmlns:xlink\\\",s.xlink),\\\"svg\\\"===e&&r&&(h.attr(\\\"width\\\",r*d),h.attr(\\\"height\\\",r*g),h.attr(\\\"viewBox\\\",\\\"0 0 \\\"+d+\\\" \\\"+g));var _=(new window.XMLSerializer).serializeToString(h.node());return _=function(t){var e=n.select(\\\"body\\\").append(\\\"div\\\").style({display:\\\"none\\\"}).html(\\\"\\\"),r=t.replace(/(&[^;]*;)/gi,function(t){return\\\"&lt;\\\"===t?\\\"&#60;\\\":\\\"&rt;\\\"===t?\\\"&#62;\\\":-1!==t.indexOf(\\\"<\\\")||-1!==t.indexOf(\\\">\\\")?\\\"\\\":e.html(t).text()});return e.remove(),r}(_),_=(_=_.replace(/&(?!\\\\w+;|\\\\#[0-9]+;| \\\\#x[0-9A-F]+;)/g,\\\"&amp;\\\")).replace(c,\\\"'\\\"),i.isIE()&&(_=(_=(_=_.replace(/\\\"/gi,\\\"'\\\")).replace(/(\\\\('#)([^']*)('\\\\))/gi,'(\\\"#$2\\\")')).replace(/(\\\\\\\\')/gi,'\\\"')),_}},{\\\"../components/color\\\":570,\\\"../components/drawing\\\":595,\\\"../constants/xmlns_namespaces\\\":674,\\\"../lib\\\":696,d3:148}],837:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").mergeArray;e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n(e.text,t,\\\"tx\\\"),n(e.hovertext,t,\\\"htx\\\");var i=e.marker;if(i){n(i.opacity,t,\\\"mo\\\"),n(i.color,t,\\\"mc\\\");var a=i.line;a&&(n(a.color,t,\\\"mlc\\\"),n(a.width,t,\\\"mlw\\\"))}}},{\\\"../../lib\\\":696}],838:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../plots/font_attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l=o({editType:\\\"calc\\\",arrayOk:!0}),c=s({},n.marker.line.width,{dflt:0}),u=s({width:c,editType:\\\"calc\\\"},i(\\\"marker.line\\\")),f=s({line:u,editType:\\\"calc\\\"},i(\\\"marker\\\"),{colorbar:a,opacity:{valType:\\\"number\\\",arrayOk:!0,dflt:1,min:0,max:1,editType:\\\"style\\\"}});e.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,hovertext:n.hovertext,textposition:{valType:\\\"enumerated\\\",values:[\\\"inside\\\",\\\"outside\\\",\\\"auto\\\",\\\"none\\\"],dflt:\\\"none\\\",arrayOk:!0,editType:\\\"calc\\\"},textfont:s({},l,{}),insidetextfont:s({},l,{}),outsidetextfont:s({},l,{}),constraintext:{valType:\\\"enumerated\\\",values:[\\\"inside\\\",\\\"outside\\\",\\\"both\\\",\\\"none\\\"],dflt:\\\"both\\\",editType:\\\"calc\\\"},cliponaxis:s({},n.cliponaxis,{}),orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],editType:\\\"calc+clearAxisTypes\\\"},base:{valType:\\\"any\\\",dflt:null,arrayOk:!0,editType:\\\"calc\\\"},offset:{valType:\\\"number\\\",dflt:null,arrayOk:!0,editType:\\\"calc\\\"},width:{valType:\\\"number\\\",dflt:null,min:0,arrayOk:!0,editType:\\\"calc\\\"},marker:f,selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:\\\"style\\\"},textfont:n.selected.textfont,editType:\\\"style\\\"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:\\\"style\\\"},textfont:n.unselected.textfont,editType:\\\"style\\\"},r:n.r,t:n.t,_deprecated:{bardir:{valType:\\\"enumerated\\\",editType:\\\"calc\\\",values:[\\\"v\\\",\\\"h\\\"]}}}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/font_attributes\\\":772,\\\"../scatter/attributes\\\":1044}],839:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/calc\\\"),o=t(\\\"./arrays_to_calcdata\\\"),s=t(\\\"../scatter/calc_selection\\\");e.exports=function(t,e){var r,l,c=n.getFromId(t,e.xaxis||\\\"x\\\"),u=n.getFromId(t,e.yaxis||\\\"y\\\");\\\"h\\\"===e.orientation?(r=c.makeCalcdata(e,\\\"x\\\"),l=u.makeCalcdata(e,\\\"y\\\")):(r=u.makeCalcdata(e,\\\"y\\\"),l=c.makeCalcdata(e,\\\"x\\\"));for(var f=Math.min(l.length,r.length),h=new Array(f),p=0;p<f;p++)h[p]={p:l[p],s:r[p]},e.ids&&(h[p].id=String(e.ids[p]));return i(e,\\\"marker\\\")&&a(e,e.marker.color,\\\"marker\\\",\\\"c\\\"),i(e,\\\"marker.line\\\")&&a(e,e.marker.line.color,\\\"marker.line\\\",\\\"c\\\"),o(h,e),s(h,e),h}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/calc_selection\\\":1046,\\\"./arrays_to_calcdata\\\":837}],840:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\").isArrayOrTypedArray,a=t(\\\"../../constants/numerical\\\").BADNUM,o=t(\\\"../../registry\\\"),s=t(\\\"../../plots/cartesian/axes\\\"),l=t(\\\"./sieve.js\\\");function c(t,e,r,o){if(o.length){var c,_,w,k,M=t._fullLayout.barmode,A=\\\"overlay\\\"===M,T=\\\"group\\\"===M;if(function(t,e,r,a){var o,s;for(o=0;o<a.length;o++){var l,c=a[o],u=c[0].trace,f=u.base,h=\\\"h\\\"===u.orientation?u.xcalendar:u.ycalendar;if(i(f)){for(s=0;s<Math.min(f.length,c.length);s++)l=r.d2c(f[s],0,h),n(l)?(c[s].b=+l,c[s].hasB=1):c[s].b=0;for(;s<c.length;s++)c[s].b=0}else{l=r.d2c(f,0,h);var p=n(l);for(l=p?l:0,s=0;s<c.length;s++)c[s].b=l,p&&(c[s].hasB=1)}}}(0,0,r,o),A)u(t,e,r,o);else if(T){for(c=[],_=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.offset?_.push(k):c.push(k);_.length&&function(t,e,r,n){var i=t._fullLayout.barnorm,a=new l(n,!1,!i);(function(t,e,r){var n,i,a,o,s=t._fullLayout,l=s.bargap,c=s.bargroupgap||0,u=r.positions,f=r.distinctPositions,g=r.minDiff,v=r.traces,m=u.length!==f.length,y=v.length,x=g*(1-l),b=m?x/y:x,_=b*(1-c);for(n=0;n<y;n++){i=v[n],a=i[0];var w=m?((2*n+1-y)*b-_)/2:-_/2;(o=a.t).barwidth=_,o.poffset=w,o.bargroupwidth=x,o.bardelta=g}r.binWidth=v[0][0].t.barwidth/100,h(r),p(t,e,r),d(t,e,r,m)})(t,e,a),i?(m(t,r,a),y(t,r,a)):v(t,r,a)}(t,e,r,_),c.length&&u(t,e,r,c)}else{for(c=[],_=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.base?_.push(k):c.push(k);_.length&&function(t,e,r,i){var o=t._fullLayout.barmode,c=\\\"stack\\\"===o,u=\\\"relative\\\"===o,h=t._fullLayout.barnorm,p=new l(i,u,!(h||c||u));f(t,e,p),function(t,e,r){var i,o,l,c,u=t._fullLayout.barnorm,f=x(e),h=r.traces,p=[null,null];for(i=0;i<h.length;i++)for(o=h[i],l=0;l<o.length;l++)if((c=o[l]).s!==a){var d=r.put(c.p,c.b+c.s),v=d+c.b+c.s;c.b=d,c[f]=v,u||(n(e.c2l(v))&&g(p,v),c.hasB&&n(e.c2l(d))&&g(p,d))}if(!u){var m=s.findExtremes(e,p,{tozero:!0,padded:!0});b(h,e,m)}}(t,r,p);for(var d=0;d<i.length;d++)for(var v=i[d],m=0;m<v.length;m++){var _=v[m];if(_.s!==a){var w=_.b+_.s===p.get(_.p,_.s);w&&(_._outmost=!0)}}h&&y(t,r,p)}(t,e,r,_),c.length&&u(t,e,r,c)}!function(t,e){var r,i,a,o=e._id.charAt(0),s={},l=1/0,c=-1/0;for(r=0;r<t.length;r++)for(a=t[r],i=0;i<a.length;i++){var u=a[i].p;n(u)&&(l=Math.min(l,u),c=Math.max(c,u))}var f,h,p=1e4/(c-l),d=s.round=function(t){return String(Math.round(p*(t-l)))};for(r=0;r<t.length;r++)for((a=t[r])[0].t.extents=s,f=a[0].t.poffset,h=Array.isArray(f),i=0;i<a.length;i++){var g=a[i],v=g[o]-g.w/2;if(n(v)){var m=g[o]+g.w/2,y=d(g.p);s[y]?s[y]=[Math.min(v,s[y][0]),Math.max(m,s[y][1])]:s[y]=[v,m]}g.p0=g.p+(h?f[i]:f),g.p1=g.p0+g.w,g.s0=g.b,g.s1=g.s0+g.s}}(o,e)}}function u(t,e,r,n){for(var i=t._fullLayout.barnorm,a=!i,o=0;o<n.length;o++){var s=n[o],c=new l([s],!1,a);f(t,e,c),i?(m(t,r,c),y(t,r,c)):v(t,r,c)}}function f(t,e,r){var n,i,a=t._fullLayout,o=a.bargap,s=a.bargroupgap||0,l=r.minDiff,c=r.traces,u=l*(1-o),f=u*(1-s),g=-f/2;for(n=0;n<c.length;n++)(i=c[n][0].t).barwidth=f,i.poffset=g,i.bargroupwidth=u,i.bardelta=l;r.binWidth=c[0][0].t.barwidth/100,h(r),p(t,e,r),d(t,e,r)}function h(t){var e,r,a,o,s,l,c=t.traces;for(e=0;e<c.length;e++){o=(a=(r=c[e])[0]).trace,l=a.t;var u,f=o._offset||o.offset,h=l.poffset;if(i(f)){for(u=Array.prototype.slice.call(f,0,r.length),s=0;s<u.length;s++)n(u[s])||(u[s]=h);for(s=u.length;s<r.length;s++)u.push(h);l.poffset=u}else void 0!==f&&(l.poffset=f);var p=o._width||o.width,d=l.barwidth;if(i(p)){var g=Array.prototype.slice.call(p,0,r.length);for(s=0;s<g.length;s++)n(g[s])||(g[s]=d);for(s=g.length;s<r.length;s++)g.push(d);if(l.barwidth=g,void 0===f){for(u=[],s=0;s<r.length;s++)u.push(h+(d-g[s])/2);l.poffset=u}}else void 0!==p&&(l.barwidth=p,void 0===f&&(l.poffset=h+(d-p)/2))}}function p(t,e,r){for(var n=r.traces,i=x(e),a=0;a<n.length;a++)for(var o=n[a],s=o[0].t,l=s.poffset,c=Array.isArray(l),u=s.barwidth,f=Array.isArray(u),h=0;h<o.length;h++){var p=o[h],d=p.w=f?u[h]:u;p[i]=p.p+(c?l[h]:l)+d/2}}function d(t,e,r,n){var i=r.traces,a=r.distinctPositions,o=a[0],l=r.minDiff,c=l/2;s.minDtick(e,l,o,n);for(var u=Math.min.apply(Math,a)-c,f=Math.max.apply(Math,a)+c,h=0;h<i.length;h++){var p=i[h],d=p[0],g=d.trace;if(void 0!==g.width||void 0!==g.offset)for(var v=d.t,m=v.poffset,y=v.barwidth,x=Array.isArray(m),_=Array.isArray(y),w=0;w<p.length;w++){var k=p[w],M=x?m[w]:m,A=_?y[w]:y,T=k.p+M,S=T+A;u=Math.min(u,T),f=Math.max(f,S)}}b(i,e,s.findExtremes(e,[u,f],{padded:!1}))}function g(t,e){n(t[0])?t[0]=Math.min(t[0],e):t[0]=e,n(t[1])?t[1]=Math.max(t[1],e):t[1]=e}function v(t,e,r){for(var i=r.traces,a=x(e),o=[null,null],l=0;l<i.length;l++)for(var c=i[l],u=0;u<c.length;u++){var f=c[u],h=f.b,p=h+f.s;f[a]=p,n(e.c2l(p))&&g(o,p),f.hasB&&n(e.c2l(h))&&g(o,h)}b(i,e,s.findExtremes(e,o,{tozero:!0,padded:!0}))}function m(t,e,r){for(var n=r.traces,i=0;i<n.length;i++)for(var o=n[i],s=0;s<o.length;s++){var l=o[s];l.s!==a&&r.put(l.p,l.b+l.s)}}function y(t,e,r){var i=r.traces,o=x(e),l=\\\"fraction\\\"===t._fullLayout.barnorm?1:100,c=l/1e9,u=e.l2c(e.c2l(0)),f=\\\"stack\\\"===t._fullLayout.barmode?l:u,h=[u,f],p=!1;function d(t){n(e.c2l(t))&&(t<u-c||t>f+c||!n(u))&&(p=!0,g(h,t))}for(var v=0;v<i.length;v++)for(var m=i[v],y=0;y<m.length;y++){var _=m[y];if(_.s!==a){var w=Math.abs(l/r.get(_.p,_.s));_.b*=w,_.s*=w;var k=_.b,M=k+_.s;_[o]=M,d(M),_.hasB&&d(k)}}var A=s.findExtremes(e,h,{tozero:!0,padded:p});b(i,e,A)}function x(t){return t._id.charAt(0)}function b(t,e,r){for(var n=0;n<t.length;n++)t[n][0].trace._extremes[e._id]=r}e.exports={crossTraceCalc:function(t,e){var r,n=e.xaxis,i=e.yaxis,a=t._fullData,s=t.calcdata,l=[],u=[];for(r=0;r<a.length;r++){var f=a[r];!0===f.visible&&o.traceIs(f,\\\"bar\\\")&&f.xaxis===n._id&&f.yaxis===i._id&&(\\\"h\\\"===f.orientation?l.push(s[r]):u.push(s[r]))}c(t,n,i,u),c(t,i,n,l)},setGroupPositions:c}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"./sieve.js\\\":849,\\\"fast-isnumeric\\\":214}],841:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../scatter/xy_defaults\\\"),s=t(\\\"../bar/style_defaults\\\"),l=t(\\\"./attributes\\\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}var f=n.coerceFont;if(o(t,e,c,u)){u(\\\"orientation\\\",e.x&&!e.y?\\\"h\\\":\\\"v\\\"),u(\\\"base\\\"),u(\\\"offset\\\"),u(\\\"width\\\"),u(\\\"text\\\"),u(\\\"hovertext\\\");var h=u(\\\"textposition\\\"),p=Array.isArray(h)||\\\"auto\\\"===h,d=p||\\\"outside\\\"===h;if(p||\\\"inside\\\"===h||d){var g=f(u,\\\"textfont\\\",c.font),v=n.extendFlat({},g);!(t.textfont&&t.textfont.color)&&delete v.color,f(u,\\\"insidetextfont\\\",v),d&&f(u,\\\"outsidetextfont\\\",g),u(\\\"constraintext\\\"),u(\\\"selected.textfont.color\\\"),u(\\\"unselected.textfont.color\\\"),u(\\\"cliponaxis\\\")}s(t,e,u,r,c);var m=a.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");m(t,e,i.defaultLine,{axis:\\\"y\\\"}),m(t,e,i.defaultLine,{axis:\\\"x\\\",inherit:\\\"y\\\"}),n.coerceSelectionMarkerOpacity(e,u)}else e.visible=!1}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../bar/style_defaults\\\":851,\\\"../scatter/xy_defaults\\\":1070,\\\"./attributes\\\":838}],842:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"tinycolor2\\\");r.coerceString=function(t,e,r){if(\\\"string\\\"==typeof e){if(e||!t.noBlank)return e}else if(\\\"number\\\"==typeof e&&!t.strict)return String(e);return void 0!==r?r:t.dflt},r.coerceNumber=function(t,e,r){if(n(e)){e=+e;var i=t.min,a=t.max;if(!(void 0!==i&&e<i||void 0!==a&&e>a))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return i(e).isValid()?e:void 0!==r?r:t.dflt},r.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},r.getValue=function(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r}},{\\\"fast-isnumeric\\\":214,tinycolor2:514}],843:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../scatter/fill_hover_text\\\");function s(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=e.mlw||t.marker.line.width;return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,a){var l,c,u,f,h,p,d,g=t.cd,v=g[0].trace,m=g[0].t,y=\\\"closest\\\"===a,x=t.maxHoverDistance,b=t.maxSpikeDistance;function _(t){return t[u]-t.w/2}function w(t){return t[u]+t.w/2}var k=y?_:function(t){return Math.min(_(t),t.p-m.bardelta/2)},M=y?w:function(t){return Math.max(w(t),t.p+m.bardelta/2)};function A(t,e){return n.inbox(t-l,e-l,x+Math.min(1,Math.abs(e-t)/d)-1)}function T(t){return A(k(t),M(t))}function S(t){return n.inbox(t.b-c,t[f]-c,x+(t[f]-c)/(t[f]-t.b)-1)}\\\"h\\\"===v.orientation?(l=r,c=e,u=\\\"y\\\",f=\\\"x\\\",h=S,p=T):(l=e,c=r,u=\\\"x\\\",f=\\\"y\\\",p=S,h=T);var C=t[u+\\\"a\\\"],E=t[f+\\\"a\\\"];d=Math.abs(C.r2c(C.range[1])-C.r2c(C.range[0]));var L=n.getDistanceFunction(a,h,p,function(t){return(h(t)+p(t))/2});if(n.getClosest(g,L,t),!1!==t.index){y||(k=function(t){return Math.min(_(t),t.p-m.bargroupwidth/2)},M=function(t){return Math.max(w(t),t.p+m.bargroupwidth/2)});var z=g[t.index],O=v.base?z.b+z.s:z.s;t[f+\\\"0\\\"]=t[f+\\\"1\\\"]=E.c2p(z[f],!0),t[f+\\\"LabelVal\\\"]=O;var I=m.extents[m.extents.round(z.p)];return t[u+\\\"0\\\"]=C.c2p(y?k(z):I[0],!0),t[u+\\\"1\\\"]=C.c2p(y?M(z):I[1],!0),t[u+\\\"LabelVal\\\"]=z.p,t.spikeDistance=(S(z)+function(t){return A(_(t),w(t))}(z))/2+b-x,t[u+\\\"Spike\\\"]=C.c2p(z.p,!0),t.color=s(v,z),o(z,v,t),i.getComponentMethod(\\\"errorbars\\\",\\\"hoverInfo\\\")(z,v,t),[t]}},getTraceColor:s}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../registry\\\":828,\\\"../scatter/fill_hover_text\\\":1052}],844:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.layoutAttributes=t(\\\"./layout_attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),n.calc=t(\\\"./calc\\\"),n.crossTraceCalc=t(\\\"./cross_trace_calc\\\").crossTraceCalc,n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.arraysToCalcdata=t(\\\"./arrays_to_calcdata\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"./style\\\").style,n.styleOnSelect=t(\\\"./style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\").hoverPoints,n.selectPoints=t(\\\"./select\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"bar\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"bar\\\",\\\"oriented\\\",\\\"errorBarsOK\\\",\\\"showLegend\\\",\\\"zoomScale\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../scatter/marker_colorbar\\\":1062,\\\"./arrays_to_calcdata\\\":837,\\\"./attributes\\\":838,\\\"./calc\\\":839,\\\"./cross_trace_calc\\\":840,\\\"./defaults\\\":841,\\\"./hover\\\":843,\\\"./layout_attributes\\\":845,\\\"./layout_defaults\\\":846,\\\"./plot\\\":847,\\\"./select\\\":848,\\\"./style\\\":850}],845:[function(t,e,r){\\\"use strict\\\";e.exports={barmode:{valType:\\\"enumerated\\\",values:[\\\"stack\\\",\\\"group\\\",\\\"overlay\\\",\\\"relative\\\"],dflt:\\\"group\\\",editType:\\\"calc\\\"},barnorm:{valType:\\\"enumerated\\\",values:[\\\"\\\",\\\"fraction\\\",\\\"percent\\\"],dflt:\\\"\\\",editType:\\\"calc\\\"},bargap:{valType:\\\"number\\\",min:0,max:1,editType:\\\"calc\\\"},bargroupgap:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"calc\\\"}}},{}],846:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"./layout_attributes\\\");e.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},h=0;h<r.length;h++){var p=r[h];if(n.traceIs(p,\\\"bar\\\")&&p.visible){if(l=!0,\\\"overlay\\\"!==t.barmode&&\\\"stack\\\"!==t.barmode){var d=p.xaxis+p.yaxis;f[d]&&(u=!0),f[d]=!0}if(p.visible&&\\\"histogram\\\"===p.type)\\\"category\\\"!==i.getFromId({_fullLayout:e},p[\\\"v\\\"===p.orientation?\\\"xaxis\\\":\\\"yaxis\\\"]).type&&(c=!0)}}l&&(\\\"overlay\\\"!==s(\\\"barmode\\\")&&s(\\\"barnorm\\\"),s(\\\"bargap\\\",c&&!u?0:.2),s(\\\"bargroupgap\\\"))}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"./layout_attributes\\\":845}],847:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../lib/svg_text_utils\\\"),s=t(\\\"../../components/color\\\"),l=t(\\\"../../components/drawing\\\"),c=t(\\\"../../registry\\\"),u=t(\\\"./attributes\\\"),f=u.text,h=u.textposition,p=t(\\\"./helpers\\\"),d=t(\\\"./style\\\"),g=3;function v(t,e,r,n,i,a){var o;return i<1?o=\\\"scale(\\\"+i+\\\") \\\":(i=1,o=\\\"\\\"),\\\"translate(\\\"+(r-i*t)+\\\" \\\"+(n-i*e)+\\\")\\\"+o+(a?\\\"rotate(\\\"+a+\\\" \\\"+t+\\\" \\\"+e+\\\") \\\":\\\"\\\")}e.exports=function(t,e,r,u){var m=e.xaxis,y=e.yaxis,x=t._fullLayout,b=a.makeTraceGroups(u,r,\\\"trace bars\\\").each(function(r){var c=n.select(this),u=r[0],b=u.trace;e.isRangePlot||(u.node3=c);var _=a.ensureSingle(c,\\\"g\\\",\\\"points\\\").selectAll(\\\"g.point\\\").data(a.identity);_.enter().append(\\\"g\\\").classed(\\\"point\\\",!0),_.exit().remove(),_.each(function(c,u){var _,w,k,M,A=n.select(this);if(\\\"h\\\"===b.orientation?(k=y.c2p(c.p0,!0),M=y.c2p(c.p1,!0),_=m.c2p(c.s0,!0),w=m.c2p(c.s1,!0),c.ct=[w,(k+M)/2]):(_=m.c2p(c.p0,!0),w=m.c2p(c.p1,!0),k=y.c2p(c.s0,!0),M=y.c2p(c.s1,!0),c.ct=[(_+w)/2,M]),i(_)&&i(w)&&i(k)&&i(M)&&_!==w&&k!==M){var T=(c.mlw+1||b.marker.line.width+1||(c.trace?c.trace.marker.line.width:0)+1)-1,S=n.round(T/2%1,2);if(!t._context.staticPlot){var C=s.opacity(c.mc||b.marker.color)<1||T>.01?E:function(t,e){return Math.abs(t-e)>=2?E(t):t>e?Math.ceil(t):Math.floor(t)};_=C(_,w),w=C(w,_),k=C(k,M),M=C(M,k)}a.ensureSingle(A,\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").attr(\\\"d\\\",\\\"M\\\"+_+\\\",\\\"+k+\\\"V\\\"+M+\\\"H\\\"+w+\\\"V\\\"+k+\\\"Z\\\").call(l.setClipUrl,e.layerClipId),function(t,e,r,n,i,s,c,u){var m;function y(e,r,n){var i=a.ensureSingle(e,\\\"text\\\").text(r).attr({class:\\\"bartext bartext-\\\"+m,transform:\\\"\\\",\\\"text-anchor\\\":\\\"middle\\\",\\\"data-notex\\\":1}).call(l.font,n).call(o.convertToTspans,t);return i}var x=r[0].trace,b=x.orientation,_=function(t,e){var r=p.getValue(t.text,e);return p.coerceString(f,r)}(x,n);if(m=function(t,e){var r=p.getValue(t.textposition,e);return p.coerceEnumerated(h,r)}(x,n),!_||\\\"none\\\"===m)return void e.select(\\\"text\\\").remove();var w,k,M,A,T,S,C=t._fullLayout.font,E=d.getBarColor(r[n],x),L=d.getInsideTextFont(x,n,C,E),z=d.getOutsideTextFont(x,n,C),O=t._fullLayout.barmode,I=\\\"relative\\\"===O,P=\\\"stack\\\"===O||I,D=r[n],R=!P||D._outmost,B=Math.abs(s-i)-2*g,F=Math.abs(u-c)-2*g;\\\"outside\\\"===m&&(R||D.hasB||(m=\\\"inside\\\"));if(\\\"auto\\\"===m)if(R){m=\\\"inside\\\",w=y(e,_,L),k=l.bBox(w.node()),M=k.width,A=k.height;var N=M>0&&A>0,j=M<=B&&A<=F,V=M<=F&&A<=B,U=\\\"h\\\"===b?B>=M*(F/A):F>=A*(B/M);N&&(j||V||U)?m=\\\"inside\\\":(m=\\\"outside\\\",w.remove(),w=null)}else m=\\\"inside\\\";if(!w&&(w=y(e,_,\\\"outside\\\"===m?z:L),k=l.bBox(w.node()),M=k.width,A=k.height,M<=0||A<=0))return void w.remove();\\\"outside\\\"===m?(S=\\\"both\\\"===x.constraintext||\\\"outside\\\"===x.constraintext,T=function(t,e,r,n,i,a,o){var s,l=\\\"h\\\"===a?Math.abs(n-r):Math.abs(e-t);l>2*g&&(s=g);var c=1;o&&(c=\\\"h\\\"===a?Math.min(1,l/i.height):Math.min(1,l/i.width));var u,f,h,p,d=(i.left+i.right)/2,m=(i.top+i.bottom)/2;u=c*i.width,f=c*i.height,\\\"h\\\"===a?e<t?(h=e-s-u/2,p=(r+n)/2):(h=e+s+u/2,p=(r+n)/2):n>r?(h=(t+e)/2,p=n+s+f/2):(h=(t+e)/2,p=n-s-f/2);return v(d,m,h,p,c,!1)}(i,s,c,u,k,b,S)):(S=\\\"both\\\"===x.constraintext||\\\"inside\\\"===x.constraintext,T=function(t,e,r,n,i,a,o){var s,l,c,u,f,h,p,d=i.width,m=i.height,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=Math.abs(e-t),_=Math.abs(n-r);b>2*g&&_>2*g?(b-=2*(f=g),_-=2*f):f=0;d<=b&&m<=_?(h=!1,p=1):d<=_&&m<=b?(h=!0,p=1):d<m==b<_?(h=!1,p=o?Math.min(b/d,_/m):1):(h=!0,p=o?Math.min(_/d,b/m):1);h&&(h=90);h?(s=p*m,l=p*d):(s=p*d,l=p*m);\\\"h\\\"===a?e<t?(c=e+f+s/2,u=(r+n)/2):(c=e-f-s/2,u=(r+n)/2):n>r?(c=(t+e)/2,u=n-f-l/2):(c=(t+e)/2,u=n+f+l/2);return v(y,x,c,u,p,h)}(i,s,c,u,k,b,S));w.attr(\\\"transform\\\",T)}(t,A,r,u,_,w,k,M),e.layerClipId&&l.hideOutsideRangePoint(c,A.select(\\\"text\\\"),m,y,b.xcalendar,b.ycalendar)}else A.remove();function E(t){return 0===x.bargap&&0===x.bargroupgap?n.round(Math.round(t)-S,2):t}});var w=!1===u.trace.cliponaxis;l.setClipUrl(c,w?null:e.layerClipId)});c.getComponentMethod(\\\"errorbars\\\",\\\"plot\\\")(b,e)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../registry\\\":828,\\\"./attributes\\\":838,\\\"./helpers\\\":842,\\\"./style\\\":850,d3:148,\\\"fast-isnumeric\\\":214}],848:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[];if(!1===e)for(r=0;r<n.length;r++)n[r].selected=0;else for(r=0;r<n.length;r++){var s=n[r];e.contains(s.ct,!1,r,t)?(o.push({pointNumber:r,x:i.c2d(s.x),y:a.c2d(s.y)}),s.selected=1):s.selected=0}return o}},{}],849:[function(t,e,r){\\\"use strict\\\";e.exports=a;var n=t(\\\"../../lib\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM;function a(t,e,r){this.traces=t,this.separateNegativeValues=e,this.dontMergeOverlappingData=r;for(var a=1/0,o=[],s=0;s<t.length;s++){for(var l=t[s],c=0;c<l.length;c++){var u=l[c];u.p!==i&&o.push(u.p)}l[0]&&l[0].width1&&(a=Math.min(l[0].width1,a))}this.positions=o;var f=n.distinctVals(o);this.distinctPositions=f.vals,1===f.vals.length&&a!==1/0?this.minDiff=a:this.minDiff=Math.min(f.minDiff,a),this.binWidth=this.minDiff,this.bins={}}a.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},a.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},a.prototype.getLabel=function(t,e){return(e<0&&this.separateNegativeValues?\\\"v\\\":\\\"^\\\")+(this.dontMergeOverlappingData?t:Math.round(t/this.binWidth))}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696}],850:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../registry\\\"),l=t(\\\"./attributes\\\"),c=l.textfont,u=l.insidetextfont,f=l.outsidetextfont,h=t(\\\"./helpers\\\");function p(t,e,r){var i=t.selectAll(\\\"path\\\"),o=t.selectAll(\\\"text\\\");a.pointStyle(i,e,r),o.each(function(t){var i=n.select(this),o=d(i,t,e,r);a.font(i,o)})}function d(t,e,r,n){var i=n._fullLayout.font,a=r.textfont;if(t.classed(\\\"bartext-inside\\\")){var o=x(e,r);a=v(r,e.i,i,o)}else t.classed(\\\"bartext-outside\\\")&&(a=m(r,e.i,i));return a}function g(t,e,r){return y(c,t.textfont,e,r)}function v(t,e,r,n){var a=g(t,e,r);return(void 0===t._input.textfont||void 0===t._input.textfont.color||Array.isArray(t.textfont.color)&&void 0===t.textfont.color[e])&&(a={color:i.contrast(n),family:a.family,size:a.size}),y(u,t.insidetextfont,e,a)}function m(t,e,r){var n=g(t,e,r);return y(f,t.outsidetextfont,e,n)}function y(t,e,r,n){e=e||{};var i=h.getValue(e.family,r),a=h.getValue(e.size,r),o=h.getValue(e.color,r);return{family:h.coerceString(t.family,i,n.family),size:h.coerceNumber(t.size,a,n.size),color:h.coerceColor(t.color,o,n.color)}}function x(t,e){return t.mc||e.marker.color}e.exports={style:function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.trace.bars\\\"),i=r.size(),a=t._fullLayout;r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}).each(function(t){(\\\"stack\\\"===a.barmode&&i>1||0===a.bargap&&0===a.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\\\"shape-rendering\\\",\\\"crispEdges\\\")}),r.selectAll(\\\"g.points\\\").each(function(e){p(n.select(this),e[0].trace,t)}),s.getComponentMethod(\\\"errorbars\\\",\\\"style\\\")(r)},styleOnSelect:function(t,e){var r=e[0].node3,i=e[0].trace;i.selectedpoints?function(t,e,r){a.selectedPointStyle(t.selectAll(\\\"path\\\"),e),function(t,e,r){t.each(function(t){var i,s=n.select(this);if(t.selected){i=o.extendFlat({},d(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)})}(t.selectAll(\\\"text\\\"),e,r)}(r,i,t):p(r,i,t)},getInsideTextFont:v,getOutsideTextFont:m,getBarColor:x}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":838,\\\"./helpers\\\":842,d3:148}],851:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\");e.exports=function(t,e,r,o,s){r(\\\"marker.color\\\",o),i(t,\\\"marker\\\")&&a(t,e,s,r,{prefix:\\\"marker.\\\",cLetter:\\\"c\\\"}),r(\\\"marker.line.color\\\",n.defaultLine),i(t,\\\"marker.line\\\")&&a(t,e,s,r,{prefix:\\\"marker.line.\\\",cLetter:\\\"c\\\"}),r(\\\"marker.line.width\\\"),r(\\\"marker.opacity\\\"),r(\\\"selected.marker.color\\\"),r(\\\"unselected.marker.color\\\")}},{\\\"../../components/color\\\":570,\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584}],852:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/extend\\\").extendFlat,i=t(\\\"../scatterpolar/attributes\\\"),a=t(\\\"../bar/attributes\\\");e.exports={r:i.r,theta:i.theta,r0:i.r0,dr:i.dr,theta0:i.theta0,dtheta:i.dtheta,thetaunit:i.thetaunit,base:n({},a.base,{}),offset:n({},a.offset,{}),width:n({},a.width,{}),text:n({},a.text,{}),marker:a.marker,hoverinfo:i.hoverinfo,selected:a.selected,unselected:a.unselected}},{\\\"../../lib/extend\\\":685,\\\"../bar/attributes\\\":838,\\\"../scatterpolar/attributes\\\":1106}],853:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/has_colorscale\\\"),i=t(\\\"../../components/colorscale/calc\\\"),a=t(\\\"../bar/arrays_to_calcdata\\\"),o=t(\\\"../bar/cross_trace_calc\\\").setGroupPositions,s=t(\\\"../scatter/calc_selection\\\"),l=t(\\\"../../registry\\\").traceIs,c=t(\\\"../../lib\\\").extendFlat;e.exports={calc:function(t,e){for(var r=t._fullLayout,o=e.subplot,l=r[o].radialaxis,c=r[o].angularaxis,u=l.makeCalcdata(e,\\\"r\\\"),f=c.makeCalcdata(e,\\\"theta\\\"),h=e._length,p=new Array(h),d=u,g=f,v=0;v<h;v++)p[v]={p:g[v],s:d[v]};function m(t){var r=e[t];void 0!==r&&(e[\\\"_\\\"+t]=Array.isArray(r)?c.makeCalcdata(e,t):c.d2c(r,e.thetaunit))}return\\\"linear\\\"===c.type&&(m(\\\"width\\\"),m(\\\"offset\\\")),n(e,\\\"marker\\\")&&i(e,e.marker.color,\\\"marker\\\",\\\"c\\\"),n(e,\\\"marker.line\\\")&&i(e,e.marker.line.color,\\\"marker.line\\\",\\\"c\\\"),a(p,e),s(p,e),p},crossTraceCalc:function(t,e,r){for(var n=t.calcdata,i=[],a=0;a<n.length;a++){var s=n[a],u=s[0].trace;!0===u.visible&&l(u,\\\"bar\\\")&&u.subplot===r&&i.push(s)}var f=c({},e.radialaxis,{_id:\\\"x\\\"}),h=e.angularaxis;o({_fullLayout:e},h,f,i)}}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../bar/arrays_to_calcdata\\\":837,\\\"../bar/cross_trace_calc\\\":840,\\\"../scatter/calc_selection\\\":1046}],854:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatterpolar/defaults\\\").handleRThetaDefaults,a=t(\\\"../bar/style_defaults\\\"),o=t(\\\"./attributes\\\");e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}i(t,e,s,l)?(l(\\\"thetaunit\\\"),l(\\\"base\\\"),l(\\\"offset\\\"),l(\\\"width\\\"),l(\\\"text\\\"),a(t,e,l,r,s),n.coerceSelectionMarkerOpacity(e,l)):e.visible=!1}},{\\\"../../lib\\\":696,\\\"../bar/style_defaults\\\":851,\\\"../scatterpolar/defaults\\\":1108,\\\"./attributes\\\":852}],855:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../bar/hover\\\").getTraceColor,o=t(\\\"../scatter/fill_hover_text\\\"),s=t(\\\"../scatterpolar/hover\\\").makeHoverPointText,l=t(\\\"../../plots/polar/helpers\\\").isPtInsidePolygon;e.exports=function(t,e,r){var c=t.cd,u=c[0].trace,f=t.subplot,h=f.radialAxis,p=f.angularAxis,d=f.vangles,g=d?l:i.isPtInsideSector,v=t.maxHoverDistance,m=p._period||2*Math.PI,y=Math.abs(h.g2p(Math.sqrt(e*e+r*r))),x=Math.atan2(r,e);h.range[0]>h.range[1]&&(x+=Math.PI);if(n.getClosest(c,function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?v+Math.min(1,Math.abs(t.thetag1-t.thetag0)/m)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0},t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,f,t),t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\\\"left\\\"),[t]}}},{\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../plots/polar/helpers\\\":811,\\\"../bar/hover\\\":843,\\\"../scatter/fill_hover_text\\\":1052,\\\"../scatterpolar/hover\\\":1109}],856:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"barpolar\\\",basePlotModule:t(\\\"../../plots/polar\\\"),categories:[\\\"polar\\\",\\\"bar\\\",\\\"showLegend\\\"],attributes:t(\\\"./attributes\\\"),layoutAttributes:t(\\\"./layout_attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),supplyLayoutDefaults:t(\\\"./layout_defaults\\\"),calc:t(\\\"./calc\\\").calc,crossTraceCalc:t(\\\"./calc\\\").crossTraceCalc,plot:t(\\\"./plot\\\"),colorbar:t(\\\"../scatter/marker_colorbar\\\"),style:t(\\\"../bar/style\\\").style,hoverPoints:t(\\\"./hover\\\"),selectPoints:t(\\\"../bar/select\\\"),meta:{}}},{\\\"../../plots/polar\\\":812,\\\"../bar/select\\\":848,\\\"../bar/style\\\":850,\\\"../scatter/marker_colorbar\\\":1062,\\\"./attributes\\\":852,\\\"./calc\\\":853,\\\"./defaults\\\":854,\\\"./hover\\\":855,\\\"./layout_attributes\\\":857,\\\"./layout_defaults\\\":858,\\\"./plot\\\":859}],857:[function(t,e,r){\\\"use strict\\\";e.exports={barmode:{valType:\\\"enumerated\\\",values:[\\\"stack\\\",\\\"overlay\\\"],dflt:\\\"stack\\\",editType:\\\"calc\\\"},bargap:{valType:\\\"number\\\",dflt:.1,min:0,max:1,editType:\\\"calc\\\"}}},{}],858:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\");e.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l<r.length;l++){var c=r[l];\\\"barpolar\\\"===c.type&&!0===c.visible&&(o[a=c.subplot]||(s(\\\"barmode\\\"),s(\\\"bargap\\\"),o[a]=1))}}},{\\\"../../lib\\\":696,\\\"./layout_attributes\\\":857}],859:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../components/drawing\\\"),s=t(\\\"../../plots/polar/helpers\\\");e.exports=function(t,e,r){var l=e.xaxis,c=e.yaxis,u=e.radialAxis,f=e.angularAxis,h=function(t){var e=t.cxx,r=t.cyy;if(t.vangles)return function(n,i,o,l){var c,u;a.angleDelta(o,l)>0?(c=o,u=l):(c=l,u=o);var f=s.findEnclosingVertexAngles(c,t.vangles)[0],h=s.findEnclosingVertexAngles(u,t.vangles)[1],p=[f,(c+u)/2,h];return s.pathPolygonAnnulus(n,i,c,u,p,e,r)};return function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select(\\\"g.barlayer\\\");a.makeTraceGroups(p,r,\\\"trace bars\\\").each(function(t){var r=t[0].node3=n.select(this),s=a.ensureSingle(r,\\\"g\\\",\\\"points\\\").selectAll(\\\"g.point\\\").data(a.identity);s.enter().append(\\\"g\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").style(\\\"stroke-miterlimit\\\",2).classed(\\\"point\\\",!0),s.exit().remove(),s.each(function(t){var e,r=n.select(this),o=t.rp0=u.c2p(t.s0),s=t.rp1=u.c2p(t.s1),p=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(i(o)&&i(s)&&i(p)&&i(d)&&o!==s&&p!==d){var g=u.c2g(t.s1),v=(p+d)/2;t.ct=[l.c2p(g*Math.cos(v)),c.c2p(g*Math.sin(v))],e=h(o,s,p,d)}else e=\\\"M0,0Z\\\";a.ensureSingle(r,\\\"path\\\").attr(\\\"d\\\",e)}),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null)})}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../plots/polar/helpers\\\":811,d3:148,\\\"fast-isnumeric\\\":214}],860:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/color/attributes\\\"),a=t(\\\"../../lib/extend\\\").extendFlat,o=n.marker,s=o.line;e.exports={y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},x0:{valType:\\\"any\\\",editType:\\\"calc+clearAxisTypes\\\"},y0:{valType:\\\"any\\\",editType:\\\"calc+clearAxisTypes\\\"},name:{valType:\\\"string\\\",editType:\\\"calc+clearAxisTypes\\\"},text:a({},n.text,{}),whiskerwidth:{valType:\\\"number\\\",min:0,max:1,dflt:.5,editType:\\\"calc\\\"},notched:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},notchwidth:{valType:\\\"number\\\",min:0,max:.5,dflt:.25,editType:\\\"calc\\\"},boxpoints:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"outliers\\\",\\\"suspectedoutliers\\\",!1],dflt:\\\"outliers\\\",editType:\\\"calc\\\"},boxmean:{valType:\\\"enumerated\\\",values:[!0,\\\"sd\\\",!1],dflt:!1,editType:\\\"calc\\\"},jitter:{valType:\\\"number\\\",min:0,max:1,editType:\\\"calc\\\"},pointpos:{valType:\\\"number\\\",min:-2,max:2,editType:\\\"calc\\\"},orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],editType:\\\"calc+clearAxisTypes\\\"},marker:{outliercolor:{valType:\\\"color\\\",dflt:\\\"rgba(0, 0, 0, 0)\\\",editType:\\\"style\\\"},symbol:a({},o.symbol,{arrayOk:!1,editType:\\\"plot\\\"}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1,editType:\\\"style\\\"}),size:a({},o.size,{arrayOk:!1,editType:\\\"calc\\\"}),color:a({},o.color,{arrayOk:!1,editType:\\\"style\\\"}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine,editType:\\\"style\\\"}),width:a({},s.width,{arrayOk:!1,dflt:0,editType:\\\"style\\\"}),outliercolor:{valType:\\\"color\\\",editType:\\\"style\\\"},outlierwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"style\\\"},editType:\\\"style\\\"},editType:\\\"plot\\\"},line:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,dflt:2,editType:\\\"style\\\"},editType:\\\"plot\\\"},fillcolor:n.fillcolor,selected:{marker:n.selected.marker,editType:\\\"style\\\"},unselected:{marker:n.unselected.marker,editType:\\\"style\\\"},hoveron:{valType:\\\"flaglist\\\",flags:[\\\"boxes\\\",\\\"points\\\"],dflt:\\\"boxes+points\\\",editType:\\\"style\\\"}}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib/extend\\\":685,\\\"../scatter/attributes\\\":1044}],861:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=i._,o=t(\\\"../../plots/cartesian/axes\\\");function s(t,e,r){var n={text:\\\"tx\\\"};for(var i in n)Array.isArray(e[i])&&(t[n[i]]=e[i][r])}function l(t,e){return t.v-e.v}function c(t){return t.v}e.exports=function(t,e){var r,u,f,h,p,d=t._fullLayout,g=o.getFromId(t,e.xaxis||\\\"x\\\"),v=o.getFromId(t,e.yaxis||\\\"y\\\"),m=[],y=\\\"violin\\\"===e.type?\\\"_numViolins\\\":\\\"_numBoxes\\\";\\\"h\\\"===e.orientation?(u=g,f=\\\"x\\\",h=v,p=\\\"y\\\"):(u=v,f=\\\"y\\\",h=g,p=\\\"x\\\");var x=u.makeCalcdata(e,f),b=function(t,e,r,a,o){if(e in t)return r.makeCalcdata(t,e);var s;s=e+\\\"0\\\"in t?t[e+\\\"0\\\"]:\\\"name\\\"in t&&(\\\"category\\\"===r.type||n(t.name)&&-1!==[\\\"linear\\\",\\\"log\\\"].indexOf(r.type)||i.isDateTime(t.name)&&\\\"date\\\"===r.type)?t.name:o;var l=r.d2c(s,0,t[e+\\\"calendar\\\"]);return a.map(function(){return l})}(e,p,h,x,d[y]),_=i.distinctVals(b),w=_.vals,k=_.minDiff/2,M=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i<r;i++)n[i]=t[i]-e;return n[r]=t[r-1]+e,n}(w,k),A=w.length,T=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=[];return e}(A);for(r=0;r<e._length;r++){var S=x[r];if(n(S)){var C=i.findBin(b[r],M);if(C>=0&&C<A){var E={v:S,i:r};s(E,e,r),T[C].push(E)}}}for(r=0;r<A;r++)if(T[r].length>0){var L=T[r].sort(l),z=L.map(c),O=z.length,I={pos:w[r],pts:L};I.min=z[0],I.max=z[O-1],I.mean=i.mean(z,O),I.sd=i.stdev(z,O,I.mean),I.q1=i.interp(z,.25),I.med=i.interp(z,.5),I.q3=i.interp(z,.75),I.lf=Math.min(I.q1,z[Math.min(i.findBin(2.5*I.q1-1.5*I.q3,z,!0)+1,O-1)]),I.uf=Math.max(I.q3,z[Math.max(i.findBin(2.5*I.q3-1.5*I.q1,z),0)]),I.lo=4*I.q1-3*I.q3,I.uo=4*I.q3-3*I.q1;var P=1.57*(I.q3-I.q1)/Math.sqrt(O);I.ln=I.med-P,I.un=I.med+P,m.push(I)}!function(t,e){if(i.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r<t.length;r++){for(var n=t[r].pts||[],a={},o=0;o<n.length;o++)a[n[o].i]=o;i.tagSelected(n,e,a)}}(m,e);var D=o.findExtremes(u,x,{padded:!0});return e._extremes[u._id]=D,m.length>0?(m[0].t={num:d[y],dPos:k,posLetter:p,valLetter:f,labels:{med:a(t,\\\"median:\\\"),min:a(t,\\\"min:\\\"),q1:a(t,\\\"q1:\\\"),q3:a(t,\\\"q3:\\\"),max:a(t,\\\"max:\\\"),mean:\\\"sd\\\"===e.boxmean?a(t,\\\"mean \\\\xb1 \\\\u03c3:\\\"):a(t,\\\"mean:\\\"),lf:a(t,\\\"lower fence:\\\"),uf:a(t,\\\"upper fence:\\\")}},d[y]++,m):[{t:{empty:!0}}]}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"fast-isnumeric\\\":214}],862:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\"),a=[\\\"v\\\",\\\"h\\\"];function o(t,e,r,a,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=[],p=\\\"violin\\\"===t?\\\"_numViolins\\\":\\\"_numBoxes\\\";for(s=0;s<r.length;s++)for(c=u[r[s]],l=0;l<c.length;l++)h.push(c[l].pos);if(h.length){var d=i.distinctVals(h),g=d.minDiff/2;h.length===d.vals.length&&(f[p]=1),n.minDtick(a,d.minDiff,d.vals[0],!0);var v=(1-f[t+\\\"gap\\\"])*(1-f[t+\\\"groupgap\\\"])*g/f[p],m=n.findExtremes(a,d.vals,{vpadminus:g+o[0]*v,vpadplus:g+o[1]*v});for(s=0;s<r.length;s++)(c=u[r[s]])[0].t.dPos=g,c[0].trace._extremes[a._id]=m}}e.exports={crossTraceCalc:function(t,e){for(var r=t.calcdata,n=e.xaxis,i=e.yaxis,s=0;s<a.length;s++){for(var l=a[s],c=\\\"h\\\"===l?i:n,u=[],f=0,h=0,p=0;p<r.length;p++){var d=r[p],g=d[0].t,v=d[0].trace;!0!==v.visible||\\\"box\\\"!==v.type&&\\\"candlestick\\\"!==v.type||g.empty||(v.orientation||\\\"v\\\")!==l||v.xaxis!==n._id||v.yaxis!==i._id||(u.push(p),v.boxpoints&&(f=Math.max(f,v.jitter-v.pointpos-1),h=Math.max(h,v.jitter+v.pointpos-1)))}o(\\\"box\\\",t,u,c,[f,h])}},setPositionOffset:o}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],863:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"./attributes\\\");function s(t,e,r,n){var a,o,s=r(\\\"y\\\"),l=r(\\\"x\\\"),c=l&&l.length;if(s&&s.length)a=\\\"v\\\",c?o=Math.min(l.length,s.length):(r(\\\"x0\\\"),o=s.length);else{if(!c)return void(e.visible=!1);a=\\\"h\\\",r(\\\"y0\\\"),o=l.length}e._length=o,i.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\"],n),r(\\\"orientation\\\",a)}function l(t,e,r,i){var a=i.prefix,s=n.coerce2(t,e,o,\\\"marker.outliercolor\\\"),l=r(\\\"marker.line.outliercolor\\\"),c=r(a+\\\"points\\\",s||l?\\\"suspectedoutliers\\\":void 0);c?(r(\\\"jitter\\\",\\\"all\\\"===c?.3:0),r(\\\"pointpos\\\",\\\"all\\\"===c?-1.5:0),r(\\\"marker.symbol\\\"),r(\\\"marker.opacity\\\"),r(\\\"marker.size\\\"),r(\\\"marker.color\\\",e.line.color),r(\\\"marker.line.color\\\"),r(\\\"marker.line.width\\\"),\\\"suspectedoutliers\\\"===c&&(r(\\\"marker.line.outliercolor\\\",e.marker.color),r(\\\"marker.line.outlierwidth\\\")),r(\\\"selected.marker.color\\\"),r(\\\"unselected.marker.color\\\"),r(\\\"selected.marker.size\\\"),r(\\\"unselected.marker.size\\\"),r(\\\"text\\\")):delete e.marker,r(\\\"hoveron\\\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function c(r,i){return n.coerce(t,e,o,r,i)}s(t,e,c,i),!1!==e.visible&&(c(\\\"line.color\\\",(t.marker||{}).color||r),c(\\\"line.width\\\"),c(\\\"fillcolor\\\",a.addOpacity(e.line.color,.5)),c(\\\"whiskerwidth\\\"),c(\\\"boxmean\\\"),c(\\\"notched\\\",void 0!==t.notchwidth)&&c(\\\"notchwidth\\\"),l(t,e,c,{prefix:\\\"box\\\"}))},handleSampleDefaults:s,handlePointsDefaults:l}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":860}],864:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return e.hoverOnBox&&(t.hoverOnBox=e.hoverOnBox),\\\"xVal\\\"in e&&(t.x=e.xVal),\\\"yVal\\\"in e&&(t.y=e.yVal),e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),t}},{}],865:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/fx\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../scatter/fill_hover_text\\\");function l(t,e,r,s){var l,c,u,f,h,p,d,g,v,m,y,x,b=t.cd,_=t.xa,w=t.ya,k=b[0].trace,M=b[0].t,A=\\\"violin\\\"===k.type,T=[],S=M.bdPos,C=M.wHover,E=function(t){return t.pos+M.bPos-p};A&&\\\"both\\\"!==k.side?(\\\"positive\\\"===k.side&&(v=function(t){var e=E(t);return a.inbox(e,e+C,m)}),\\\"negative\\\"===k.side&&(v=function(t){var e=E(t);return a.inbox(e-C,e,m)})):v=function(t){var e=E(t);return a.inbox(e-C,e+C,m)},x=A?function(t){return a.inbox(t.span[0]-h,t.span[1]-h,m)}:function(t){return a.inbox(t.min-h,t.max-h,m)},\\\"h\\\"===k.orientation?(h=e,p=r,d=x,g=v,l=\\\"y\\\",u=w,c=\\\"x\\\",f=_):(h=r,p=e,d=v,g=x,l=\\\"x\\\",u=_,c=\\\"y\\\",f=w);var L=Math.min(1,S/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function z(t){return(d(t)+g(t))/2}m=t.maxHoverDistance-L,y=t.maxSpikeDistance-L;var O=a.getDistanceFunction(s,d,g,z);if(a.getClosest(b,O,t),!1===t.index)return[];var I=b[t.index],P=k.line.color,D=(k.marker||{}).color;o.opacity(P)&&k.line.width?t.color=P:o.opacity(D)&&k.boxpoints?t.color=D:t.color=k.fillcolor,t[l+\\\"0\\\"]=u.c2p(I.pos+M.bPos-S,!0),t[l+\\\"1\\\"]=u.c2p(I.pos+M.bPos+S,!0),t[l+\\\"LabelVal\\\"]=I.pos;var R=l+\\\"Spike\\\";t.spikeDistance=z(I)*y/m,t[R]=u.c2p(I.pos,!0);var B={},F=[\\\"med\\\",\\\"min\\\",\\\"q1\\\",\\\"q3\\\",\\\"max\\\"];(k.boxmean||(k.meanline||{}).visible)&&F.push(\\\"mean\\\"),(k.boxpoints||k.points)&&F.push(\\\"lf\\\",\\\"uf\\\");for(var N=0;N<F.length;N++){var j=F[N];if(j in I&&!(I[j]in B)){B[I[j]]=!0;var V=I[j],U=f.c2p(V,!0),q=i.extendFlat({},t);q[c+\\\"0\\\"]=q[c+\\\"1\\\"]=U,q[c+\\\"LabelVal\\\"]=V,q[c+\\\"Label\\\"]=(M.labels?M.labels[j]+\\\" \\\":\\\"\\\")+n.hoverLabelText(f,V),q.hoverOnBox=!0,\\\"mean\\\"===j&&\\\"sd\\\"in I&&\\\"sd\\\"===k.boxmean&&(q[c+\\\"err\\\"]=I.sd),t.name=\\\"\\\",t.spikeDistance=void 0,t[R]=void 0,T.push(q)}}return T}function c(t,e,r){for(var n,o,l,c=t.cd,u=t.xa,f=t.ya,h=c[0].trace,p=u.c2p(e),d=f.c2p(r),g=a.quadrature(function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(u.c2p(t.x)-p)-e,1-3/e)},function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(f.c2p(t.y)-d)-e,1-3/e)}),v=!1,m=0;m<c.length;m++){o=c[m];for(var y=0;y<(o.pts||[]).length;y++){var x=g(l=o.pts[y]);x<=t.distance&&(t.distance=x,v=[m,y])}}if(!v)return!1;l=(o=c[v[0]]).pts[v[1]];var b=u.c2p(l.x,!0),_=f.c2p(l.y,!0),w=l.mrc||1;n=i.extendFlat({},t,{index:l.i,color:(h.marker||{}).color,name:h.name,x0:b-w,x1:b+w,xLabelVal:l.x,y0:_-w,y1:_+w,yLabelVal:l.y,spikeDistance:t.distance});var k=\\\"h\\\"===h.orientation?\\\"y\\\":\\\"x\\\",M=\\\"h\\\"===h.orientation?f:u;return n[k+\\\"Spike\\\"]=M.c2p(o.pos,!0),s(l,h,n),n}e.exports={hoverPoints:function(t,e,r,n){var i,a=t.cd[0].trace.hoveron,o=[];return-1!==a.indexOf(\\\"boxes\\\")&&(o=o.concat(l(t,e,r,n))),-1!==a.indexOf(\\\"points\\\")&&(i=c(t,e,r)),\\\"closest\\\"===n?i?[i]:o:i?(o.push(i),o):o},hoverOnBoxes:l,hoverOnPoints:c}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/fill_hover_text\\\":1052}],866:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.layoutAttributes=t(\\\"./layout_attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\").supplyDefaults,n.supplyLayoutDefaults=t(\\\"./layout_defaults\\\").supplyLayoutDefaults,n.calc=t(\\\"./calc\\\"),n.crossTraceCalc=t(\\\"./cross_trace_calc\\\").crossTraceCalc,n.plot=t(\\\"./plot\\\").plot,n.style=t(\\\"./style\\\").style,n.styleOnSelect=t(\\\"./style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\").hoverPoints,n.eventData=t(\\\"./event_data\\\"),n.selectPoints=t(\\\"./select\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"box\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"symbols\\\",\\\"oriented\\\",\\\"box-violin\\\",\\\"showLegend\\\",\\\"boxLayout\\\",\\\"zoomScale\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":860,\\\"./calc\\\":861,\\\"./cross_trace_calc\\\":862,\\\"./defaults\\\":863,\\\"./event_data\\\":864,\\\"./hover\\\":865,\\\"./layout_attributes\\\":867,\\\"./layout_defaults\\\":868,\\\"./plot\\\":869,\\\"./select\\\":870,\\\"./style\\\":871}],867:[function(t,e,r){\\\"use strict\\\";e.exports={boxmode:{valType:\\\"enumerated\\\",values:[\\\"group\\\",\\\"overlay\\\"],dflt:\\\"overlay\\\",editType:\\\"calc\\\"},boxgap:{valType:\\\"number\\\",min:0,max:1,dflt:.3,editType:\\\"calc\\\"},boxgroupgap:{valType:\\\"number\\\",min:0,max:1,dflt:.3,editType:\\\"calc\\\"}}},{}],868:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"./layout_attributes\\\");function o(t,e,r,i,a){for(var o,s=a+\\\"Layout\\\",l=0;l<r.length;l++)if(n.traceIs(r[l],s)){o=!0;break}o&&(i(a+\\\"mode\\\"),i(a+\\\"gap\\\"),i(a+\\\"groupgap\\\"))}e.exports={supplyLayoutDefaults:function(t,e,r){o(0,0,r,function(r,n){return i.coerce(t,e,a,r,n)},\\\"box\\\")},_supply:o}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./layout_attributes\\\":867}],869:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/drawing\\\"),o=5,s=.01;function l(t,e,r,a){var o,s,l=e.pos,c=e.val,u=a.bPos,f=a.wdPos||0,h=a.bPosPxOffset||0,p=r.whiskerwidth||0,d=r.notched||!1,g=d?1-2*r.notchwidth:1;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var v=t.selectAll(\\\"path.box\\\").data(\\\"violin\\\"!==r.type||r.box.visible?i.identity:[]);v.enter().append(\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").attr(\\\"class\\\",\\\"box\\\"),v.exit().remove(),v.each(function(t){var e=t.pos,a=l.c2p(e+u,!0)+h,v=l.c2p(e+u-o,!0)+h,m=l.c2p(e+u+s,!0)+h,y=l.c2p(e+u-f,!0)+h,x=l.c2p(e+u+f,!0)+h,b=l.c2p(e+u-o*g,!0)+h,_=l.c2p(e+u+s*g,!0)+h,w=c.c2p(t.q1,!0),k=c.c2p(t.q3,!0),M=i.constrain(c.c2p(t.med,!0),Math.min(w,k)+1,Math.max(w,k)-1),A=void 0===t.lf||!1===r.boxpoints,T=c.c2p(A?t.min:t.lf,!0),S=c.c2p(A?t.max:t.uf,!0),C=c.c2p(t.ln,!0),E=c.c2p(t.un,!0);\\\"h\\\"===r.orientation?n.select(this).attr(\\\"d\\\",\\\"M\\\"+M+\\\",\\\"+b+\\\"V\\\"+_+\\\"M\\\"+w+\\\",\\\"+v+\\\"V\\\"+m+(d?\\\"H\\\"+C+\\\"L\\\"+M+\\\",\\\"+_+\\\"L\\\"+E+\\\",\\\"+m:\\\"\\\")+\\\"H\\\"+k+\\\"V\\\"+v+(d?\\\"H\\\"+E+\\\"L\\\"+M+\\\",\\\"+b+\\\"L\\\"+C+\\\",\\\"+v:\\\"\\\")+\\\"ZM\\\"+w+\\\",\\\"+a+\\\"H\\\"+T+\\\"M\\\"+k+\\\",\\\"+a+\\\"H\\\"+S+(0===p?\\\"\\\":\\\"M\\\"+T+\\\",\\\"+y+\\\"V\\\"+x+\\\"M\\\"+S+\\\",\\\"+y+\\\"V\\\"+x)):n.select(this).attr(\\\"d\\\",\\\"M\\\"+b+\\\",\\\"+M+\\\"H\\\"+_+\\\"M\\\"+v+\\\",\\\"+w+\\\"H\\\"+m+(d?\\\"V\\\"+C+\\\"L\\\"+_+\\\",\\\"+M+\\\"L\\\"+m+\\\",\\\"+E:\\\"\\\")+\\\"V\\\"+k+\\\"H\\\"+v+(d?\\\"V\\\"+E+\\\"L\\\"+b+\\\",\\\"+M+\\\"L\\\"+v+\\\",\\\"+C:\\\"\\\")+\\\"ZM\\\"+a+\\\",\\\"+w+\\\"V\\\"+T+\\\"M\\\"+a+\\\",\\\"+k+\\\"V\\\"+S+(0===p?\\\"\\\":\\\"M\\\"+y+\\\",\\\"+T+\\\"H\\\"+x+\\\"M\\\"+y+\\\",\\\"+S+\\\"H\\\"+x))})}function c(t,e,r,n){var l=e.x,c=e.y,u=n.bdPos,f=n.bPos,h=r.boxpoints||r.points;i.seedPseudoRandom();var p=t.selectAll(\\\"g.points\\\").data(h?function(t){return t.forEach(function(t){t.t=n,t.trace=r}),t}:[]);p.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"points\\\"),p.exit().remove();var d=p.selectAll(\\\"path\\\").data(function(t){var e,n,a=\\\"all\\\"===h?t.pts:t.pts.filter(function(e){return e.v<t.lf||e.v>t.uf}),l=Math.max((t.max-t.min)/10,t.q3-t.q1),c=1e-9*l,p=l*s,d=[],g=0;if(r.jitter){if(0===l)for(g=1,d=new Array(a.length),e=0;e<a.length;e++)d[e]=1;else for(e=0;e<a.length;e++){var v=Math.max(0,e-o),m=a[v].v,y=Math.min(a.length-1,e+o),x=a[y].v;\\\"all\\\"!==h&&(a[e].v<t.lf?x=Math.min(x,t.lf):m=Math.max(m,t.uf));var b=Math.sqrt(p*(y-v)/(x-m+c))||0;b=i.constrain(Math.abs(b),0,1),d.push(b),g=Math.max(b,g)}n=2*r.jitter/(g||1)}for(e=0;e<a.length;e++){var _=a[e],w=_.v,k=r.jitter?n*d[e]*(i.pseudoRandom()-.5):0,M=t.pos+f+u*(r.pointpos+k);\\\"h\\\"===r.orientation?(_.y=M,_.x=w):(_.x=M,_.y=w),\\\"suspectedoutliers\\\"===h&&w<t.uo&&w>t.lo&&(_.so=!0)}return a});d.enter().append(\\\"path\\\").classed(\\\"point\\\",!0),d.exit().remove(),d.call(a.translatePoints,l,c)}function u(t,e,r,a){var o,s,l=e.pos,c=e.val,u=a.bPos,f=a.bPosPxOffset||0,h=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=t.selectAll(\\\"path.mean\\\").data(\\\"box\\\"===r.type&&r.boxmean||\\\"violin\\\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);p.enter().append(\\\"path\\\").attr(\\\"class\\\",\\\"mean\\\").style({fill:\\\"none\\\",\\\"vector-effect\\\":\\\"non-scaling-stroke\\\"}),p.exit().remove(),p.each(function(t){var e=l.c2p(t.pos+u,!0)+f,i=l.c2p(t.pos+u-o,!0)+f,a=l.c2p(t.pos+u+s,!0)+f,p=c.c2p(t.mean,!0),d=c.c2p(t.mean-t.sd,!0),g=c.c2p(t.mean+t.sd,!0);\\\"h\\\"===r.orientation?n.select(this).attr(\\\"d\\\",\\\"M\\\"+p+\\\",\\\"+i+\\\"V\\\"+a+(\\\"sd\\\"===h?\\\"m0,0L\\\"+d+\\\",\\\"+e+\\\"L\\\"+p+\\\",\\\"+i+\\\"L\\\"+g+\\\",\\\"+e+\\\"Z\\\":\\\"\\\")):n.select(this).attr(\\\"d\\\",\\\"M\\\"+i+\\\",\\\"+p+\\\"H\\\"+a+(\\\"sd\\\"===h?\\\"m0,0L\\\"+e+\\\",\\\"+d+\\\"L\\\"+i+\\\",\\\"+p+\\\"L\\\"+e+\\\",\\\"+g+\\\"Z\\\":\\\"\\\"))})}e.exports={plot:function(t,e,r,a){var o=t._fullLayout,s=e.xaxis,f=e.yaxis,h=o._numBoxes,p=1-o.boxgap,d=\\\"group\\\"===o.boxmode&&h>1;i.makeTraceGroups(a,r,\\\"trace boxes\\\").each(function(t){var r=n.select(this),i=t[0],a=i.t,g=i.trace;e.isRangePlot||(i.node3=r);var v,m,y=a.dPos*p*(1-o.boxgroupgap)/(d?h:1),x=d?2*a.dPos*((a.num+.5)/h-.5)*p:0,b=y*g.whiskerwidth;!0!==g.visible||a.empty?r.remove():(\\\"h\\\"===g.orientation?(v=f,m=s):(v=s,m=f),a.bPos=x,a.bdPos=y,a.wdPos=b,a.wHover=a.dPos*(d?p/h:1),l(r,{pos:v,val:m},g,a),c(r,{x:s,y:f},g,a),u(r,{pos:v,val:m},g,a))})},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,d3:148}],870:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++)i[r].pts[n].selected=0;else for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++){var l=i[r].pts[n],c=a.c2p(l.x),u=o.c2p(l.y);e.contains([c,u],null,l.i,t)?(s.push({pointNumber:l.i,x:a.c2d(l.x),y:o.c2d(l.y)}),l.selected=1):l.selected=0}return s}},{}],871:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../components/drawing\\\");e.exports={style:function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.trace.boxes\\\");r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),r.each(function(e){var r=n.select(this),o=e[0].trace,s=o.line.width;function l(t,e,r,n){t.style(\\\"stroke-width\\\",e+\\\"px\\\").call(i.stroke,r).call(i.fill,n)}var c=r.selectAll(\\\"path.box\\\");if(\\\"candlestick\\\"===o.type)c.each(function(t){var e=n.select(this),r=o[t.dir];l(e,r.line.width,r.line.color,r.fillcolor),e.style(\\\"opacity\\\",o.selectedpoints&&!t.selected?.3:1)});else{l(c,s,o.line.color,o.fillcolor),r.selectAll(\\\"path.mean\\\").style({\\\"stroke-width\\\":s,\\\"stroke-dasharray\\\":2*s+\\\"px,\\\"+s+\\\"px\\\"}).call(i.stroke,o.line.color);var u=r.selectAll(\\\"path.point\\\");a.pointStyle(u,o,t)}})},styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace,i=r.selectAll(\\\"path.point\\\");n.selectedpoints?a.selectedPointStyle(i,n):a.pointStyle(i,n,t)}}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,d3:148}],872:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").extendFlat,i=t(\\\"../ohlc/attributes\\\"),a=t(\\\"../box/attributes\\\");function o(t){return{line:{color:n({},a.line.color,{dflt:t}),width:a.line.width,editType:\\\"style\\\"},fillcolor:a.fillcolor,editType:\\\"style\\\"}}e.exports={x:i.x,open:i.open,high:i.high,low:i.low,close:i.close,line:{width:n({},a.line.width,{}),editType:\\\"style\\\"},increasing:o(i.increasing.line.color.dflt),decreasing:o(i.decreasing.line.color.dflt),text:i.text,whiskerwidth:n({},a.whiskerwidth,{dflt:0}),hoverlabel:i.hoverlabel}},{\\\"../../lib\\\":696,\\\"../box/attributes\\\":860,\\\"../ohlc/attributes\\\":992}],873:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../ohlc/calc\\\").calcCommon;function o(t,e,r,n){return{min:r,q1:Math.min(t,n),med:n,q3:Math.max(t,n),max:e}}e.exports=function(t,e){var r=t._fullLayout,s=i.getFromId(t,e.xaxis),l=i.getFromId(t,e.yaxis),c=s.makeCalcdata(e,\\\"x\\\"),u=a(t,e,c,l,o);return u.length?(n.extendFlat(u[0].t,{num:r._numBoxes,dPos:n.distinctVals(c).minDiff/2,posLetter:\\\"x\\\",valLetter:\\\"y\\\"}),r._numBoxes++,u):[{t:{empty:!0}}]}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../ohlc/calc\\\":993}],874:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../ohlc/ohlc_defaults\\\"),o=t(\\\"./attributes\\\");function s(t,e,r,n){var a=r(n+\\\".line.color\\\");r(n+\\\".line.width\\\",e.line.width),r(n+\\\".fillcolor\\\",i.addOpacity(a,.5))}e.exports=function(t,e,r,i){function l(r,i){return n.coerce(t,e,o,r,i)}a(t,e,l,i)?(l(\\\"line.width\\\"),s(t,e,l,\\\"increasing\\\"),s(t,e,l,\\\"decreasing\\\"),l(\\\"text\\\"),l(\\\"whiskerwidth\\\"),i._requestRangeslider[e.xaxis]=!0):e.visible=!1}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../ohlc/ohlc_defaults\\\":997,\\\"./attributes\\\":872}],875:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"candlestick\\\",basePlotModule:t(\\\"../../plots/cartesian\\\"),categories:[\\\"cartesian\\\",\\\"svg\\\",\\\"showLegend\\\",\\\"candlestick\\\",\\\"boxLayout\\\"],meta:{},attributes:t(\\\"./attributes\\\"),layoutAttributes:t(\\\"../box/layout_attributes\\\"),supplyLayoutDefaults:t(\\\"../box/layout_defaults\\\").supplyLayoutDefaults,crossTraceCalc:t(\\\"../box/cross_trace_calc\\\").crossTraceCalc,supplyDefaults:t(\\\"./defaults\\\"),calc:t(\\\"./calc\\\"),plot:t(\\\"../box/plot\\\").plot,layerName:\\\"boxlayer\\\",style:t(\\\"../box/style\\\").style,hoverPoints:t(\\\"../ohlc/hover\\\").hoverPoints,selectPoints:t(\\\"../ohlc/select\\\")}},{\\\"../../plots/cartesian\\\":757,\\\"../box/cross_trace_calc\\\":862,\\\"../box/layout_attributes\\\":867,\\\"../box/layout_defaults\\\":868,\\\"../box/plot\\\":869,\\\"../box/style\\\":871,\\\"../ohlc/hover\\\":995,\\\"../ohlc/select\\\":999,\\\"./attributes\\\":872,\\\"./calc\\\":873,\\\"./defaults\\\":874}],876:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./axis_defaults\\\"),i=t(\\\"../../plot_api/plot_template\\\");e.exports=function(t,e,r,a,o){a(\\\"a\\\")||(a(\\\"da\\\"),a(\\\"a0\\\")),a(\\\"b\\\")||(a(\\\"db\\\"),a(\\\"b0\\\")),function(t,e,r,a){[\\\"aaxis\\\",\\\"baxis\\\"].forEach(function(o){var s=o.charAt(0),l=t[o]||{},c=i.newContainer(e,o),u={tickfont:\\\"x\\\",id:s+\\\"axis\\\",letter:s,font:e.font,name:o,data:t[s],calendar:e.calendar,dfltColor:a,bgColor:r.paper_bgcolor,fullLayout:r};n(l,c,u),c._categories=c._categories||[],t[o]||\\\"-\\\"===l.type||(t[o]={type:l.type})})}(t,e,r,o)}},{\\\"../../plot_api/plot_template\\\":735,\\\"./axis_defaults\\\":881}],877:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t){return function t(e,r){if(!n(e)||r>=10)return null;var i=1/0;var a=-1/0;var o=e.length;for(var s=0;s<o;s++){var l=e[s];if(n(l)){var c=t(l,r+1);c&&(i=Math.min(c[0],i),a=Math.max(c[1],a))}else i=Math.min(l,i),a=Math.max(l,a)}return[i,a]}(t,0)}},{\\\"../../lib\\\":696}],878:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"./axis_attributes\\\"),a=t(\\\"../../components/color/attributes\\\"),o=n({editType:\\\"calc\\\"});o.family.dflt='\\\"Open Sans\\\", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=a.defaultLine,e.exports={carpet:{valType:\\\"string\\\",editType:\\\"calc\\\"},x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},a:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},a0:{valType:\\\"number\\\",dflt:0,editType:\\\"calc\\\"},da:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},b:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},b0:{valType:\\\"number\\\",dflt:0,editType:\\\"calc\\\"},db:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},cheaterslope:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},aaxis:i,baxis:i,font:o,color:{valType:\\\"color\\\",dflt:a.defaultLine,editType:\\\"plot\\\"},transforms:void 0}},{\\\"../../components/color/attributes\\\":569,\\\"../../plots/font_attributes\\\":772,\\\"./axis_attributes\\\":880}],879:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r,i){var a,o,s,l,c,u,f,h,p,d,g,v,m,y=n(r)?\\\"a\\\":\\\"b\\\",x=(\\\"a\\\"===y?t.aaxis:t.baxis).smoothing,b=\\\"a\\\"===y?t.a2i:t.b2j,_=\\\"a\\\"===y?r:i,w=\\\"a\\\"===y?i:r,k=\\\"a\\\"===y?e.a.length:e.b.length,M=\\\"a\\\"===y?e.b.length:e.a.length,A=Math.floor(\\\"a\\\"===y?t.b2j(w):t.a2i(w)),T=\\\"a\\\"===y?function(e){return t.evalxy([],e,A)}:function(e){return t.evalxy([],A,e)};x&&(s=Math.max(0,Math.min(M-2,A)),l=A-s,o=\\\"a\\\"===y?function(e,r){return t.dxydi([],e,s,r,l)}:function(e,r){return t.dxydj([],s,e,l,r)});var S=b(_[0]),C=b(_[1]),E=S<C?1:-1,L=1e-8*(C-S),z=E>0?Math.floor:Math.ceil,O=E>0?Math.ceil:Math.floor,I=E>0?Math.min:Math.max,P=E>0?Math.max:Math.min,D=z(S+L),R=O(C-L),B=[[f=T(S)]];for(a=D;a*E<R*E;a+=E)c=[],g=P(S,a),m=(v=I(C,a+E))-g,u=Math.max(0,Math.min(k-2,Math.floor(.5*(g+v)))),h=T(v),x&&(p=o(u,g-u),d=o(u,v-u),c.push([f[0]+p[0]/3*m,f[1]+p[1]/3*m]),c.push([h[0]-d[0]/3*m,h[1]-d[1]/3*m])),c.push(h),B.push(c),f=h;return B}},{\\\"../../lib\\\":696}],880:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../../components/color/attributes\\\"),a=t(\\\"../../plots/cartesian/layout_attributes\\\"),o=t(\\\"../../plot_api/edit_types\\\").overrideAll;e.exports={color:{valType:\\\"color\\\",editType:\\\"calc\\\"},smoothing:{valType:\\\"number\\\",dflt:1,min:0,max:1.3,editType:\\\"calc\\\"},title:{valType:\\\"string\\\",editType:\\\"calc\\\"},titlefont:n({editType:\\\"calc\\\"}),titleoffset:{valType:\\\"number\\\",dflt:10,editType:\\\"calc\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"-\\\",\\\"linear\\\",\\\"date\\\",\\\"category\\\"],dflt:\\\"-\\\",editType:\\\"calc\\\"},autorange:{valType:\\\"enumerated\\\",values:[!0,!1,\\\"reversed\\\"],dflt:!0,editType:\\\"calc\\\"},rangemode:{valType:\\\"enumerated\\\",values:[\\\"normal\\\",\\\"tozero\\\",\\\"nonnegative\\\"],dflt:\\\"normal\\\",editType:\\\"calc\\\"},range:{valType:\\\"info_array\\\",editType:\\\"calc\\\",items:[{valType:\\\"any\\\",editType:\\\"calc\\\"},{valType:\\\"any\\\",editType:\\\"calc\\\"}]},fixedrange:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},cheatertype:{valType:\\\"enumerated\\\",values:[\\\"index\\\",\\\"value\\\"],dflt:\\\"value\\\",editType:\\\"calc\\\"},tickmode:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"array\\\"],dflt:\\\"array\\\",editType:\\\"calc\\\"},nticks:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},tickvals:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},ticktext:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},showticklabels:{valType:\\\"enumerated\\\",values:[\\\"start\\\",\\\"end\\\",\\\"both\\\",\\\"none\\\"],dflt:\\\"start\\\",editType:\\\"calc\\\"},tickfont:n({editType:\\\"calc\\\"}),tickangle:{valType:\\\"angle\\\",dflt:\\\"auto\\\",editType:\\\"calc\\\"},tickprefix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},showtickprefix:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"calc\\\"},ticksuffix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},showticksuffix:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"calc\\\"},showexponent:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"calc\\\"},exponentformat:{valType:\\\"enumerated\\\",values:[\\\"none\\\",\\\"e\\\",\\\"E\\\",\\\"power\\\",\\\"SI\\\",\\\"B\\\"],dflt:\\\"B\\\",editType:\\\"calc\\\"},separatethousands:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},tickformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},tickformatstops:o(a.tickformatstops,\\\"calc\\\",\\\"from-root\\\"),categoryorder:{valType:\\\"enumerated\\\",values:[\\\"trace\\\",\\\"category ascending\\\",\\\"category descending\\\",\\\"array\\\"],dflt:\\\"trace\\\",editType:\\\"calc\\\"},categoryarray:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},labelpadding:{valType:\\\"integer\\\",dflt:10,editType:\\\"calc\\\"},labelprefix:{valType:\\\"string\\\",editType:\\\"calc\\\"},labelsuffix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},showline:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},linecolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"calc\\\"},linewidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc\\\"},gridcolor:{valType:\\\"color\\\",editType:\\\"calc\\\"},gridwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc\\\"},showgrid:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},minorgridcount:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},minorgridwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc\\\"},minorgridcolor:{valType:\\\"color\\\",dflt:i.lightLine,editType:\\\"calc\\\"},startline:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},startlinecolor:{valType:\\\"color\\\",editType:\\\"calc\\\"},startlinewidth:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},endline:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},endlinewidth:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},endlinecolor:{valType:\\\"color\\\",editType:\\\"calc\\\"},tick0:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"calc\\\"},dtick:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc\\\"},arraytick0:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},arraydtick:{valType:\\\"integer\\\",min:1,dflt:1,editType:\\\"calc\\\"},editType:\\\"calc\\\"}},{\\\"../../components/color/attributes\\\":569,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/cartesian/layout_attributes\\\":758,\\\"../../plots/font_attributes\\\":772}],881:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./attributes\\\"),i=t(\\\"../../components/color\\\").addOpacity,a=t(\\\"../../registry\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../plots/cartesian/tick_value_defaults\\\"),l=t(\\\"../../plots/cartesian/tick_label_defaults\\\"),c=t(\\\"../../plots/cartesian/category_order_defaults\\\"),u=t(\\\"../../plots/cartesian/set_convert\\\"),f=t(\\\"../../plots/cartesian/axis_autotype\\\");e.exports=function(t,e,r){var h=r.letter,p=r.font||{},d=n[h+\\\"axis\\\"];function g(r,n){return o.coerce(t,e,d,r,n)}function v(r,n){return o.coerce2(t,e,d,r,n)}r.name&&(e._name=r.name,e._id=r.name);var m=g(\\\"type\\\");(\\\"-\\\"===m&&(r.data&&function(t,e){if(\\\"-\\\"!==t.type)return;var r=t._id.charAt(0),n=t[r+\\\"calendar\\\"];t.type=f(e,n)}(e,r.data),\\\"-\\\"===e.type?e.type=\\\"linear\\\":m=t.type=e.type),g(\\\"smoothing\\\"),g(\\\"cheatertype\\\"),g(\\\"showticklabels\\\"),g(\\\"labelprefix\\\",h+\\\" = \\\"),g(\\\"labelsuffix\\\"),g(\\\"showtickprefix\\\"),g(\\\"showticksuffix\\\"),g(\\\"separatethousands\\\"),g(\\\"tickformat\\\"),g(\\\"exponentformat\\\"),g(\\\"showexponent\\\"),g(\\\"categoryorder\\\"),g(\\\"tickmode\\\"),g(\\\"tickvals\\\"),g(\\\"ticktext\\\"),g(\\\"tick0\\\"),g(\\\"dtick\\\"),\\\"array\\\"===e.tickmode&&(g(\\\"arraytick0\\\"),g(\\\"arraydtick\\\")),g(\\\"labelpadding\\\"),e._hovertitle=h,\\\"date\\\"===m)&&a.getComponentMethod(\\\"calendars\\\",\\\"handleDefaults\\\")(t,e,\\\"calendar\\\",r.calendar);u(e,r.fullLayout),e.c2p=o.identity;var y=g(\\\"color\\\",r.dfltColor),x=y===t.color?y:p.color;g(\\\"title\\\"),o.coerceFont(g,\\\"titlefont\\\",{family:p.family,size:Math.round(1.2*p.size),color:x}),g(\\\"titleoffset\\\"),g(\\\"tickangle\\\"),g(\\\"autorange\\\",!e.isValidRange(t.range))&&g(\\\"rangemode\\\"),g(\\\"range\\\"),e.cleanRange(),g(\\\"fixedrange\\\"),s(t,e,g,m),l(t,e,g,m,r),c(t,e,g,{data:r.data,dataAttr:h});var b=v(\\\"gridcolor\\\",i(y,.3)),_=v(\\\"gridwidth\\\"),w=g(\\\"showgrid\\\");w||(delete e.gridcolor,delete e.gridwidth);var k=v(\\\"startlinecolor\\\",y),M=v(\\\"startlinewidth\\\",_);g(\\\"startline\\\",e.showgrid||!!k||!!M)||(delete e.startlinecolor,delete e.startlinewidth);var A=v(\\\"endlinecolor\\\",y),T=v(\\\"endlinewidth\\\",_);return g(\\\"endline\\\",e.showgrid||!!A||!!T)||(delete e.endlinecolor,delete e.endlinewidth),w?(g(\\\"minorgridcount\\\"),g(\\\"minorgridwidth\\\",_),g(\\\"minorgridcolor\\\",i(b,.06)),e.minorgridcount||(delete e.minorgridwidth,delete e.minorgridcolor)):(delete e.gridcolor,delete e.gridWidth),\\\"none\\\"===e.showticklabels&&(delete e.tickfont,delete e.tickangle,delete e.showexponent,delete e.exponentformat,delete e.tickformat,delete e.showticksuffix,delete e.showtickprefix),e.showticksuffix||delete e.ticksuffix,e.showtickprefix||delete e.tickprefix,g(\\\"tickmode\\\"),(!e.title||e.title&&0===e.title.length)&&(delete e.titlefont,delete e.titleoffset),e}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axis_autotype\\\":746,\\\"../../plots/cartesian/category_order_defaults\\\":749,\\\"../../plots/cartesian/set_convert\\\":764,\\\"../../plots/cartesian/tick_label_defaults\\\":765,\\\"../../plots/cartesian/tick_value_defaults\\\":767,\\\"../../registry\\\":828,\\\"./attributes\\\":878}],882:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\").isArray1D,a=t(\\\"./cheater_basis\\\"),o=t(\\\"./array_minmax\\\"),s=t(\\\"./calc_gridlines\\\"),l=t(\\\"./calc_labels\\\"),c=t(\\\"./calc_clippath\\\"),u=t(\\\"../heatmap/clean_2d_array\\\"),f=t(\\\"./smooth_fill_2d_array\\\"),h=t(\\\"../heatmap/convert_column_xyz\\\"),p=t(\\\"./set_convert\\\");e.exports=function(t,e){var r=n.getFromId(t,e.xaxis),d=n.getFromId(t,e.yaxis),g=e.aaxis,v=e.baxis,m=e.x,y=e.y,x=[];m&&i(m)&&x.push(\\\"x\\\"),y&&i(y)&&x.push(\\\"y\\\"),x.length&&h(e,g,v,\\\"a\\\",\\\"b\\\",x);var b=e._a=e._a||e.a,_=e._b=e._b||e.b;m=e._x||e.x,y=e._y||e.y;var w={};if(e._cheater){var k=\\\"index\\\"===g.cheatertype?b.length:b,M=\\\"index\\\"===v.cheatertype?_.length:_;m=a(k,M,e.cheaterslope)}e._x=m=u(m),e._y=y=u(y),f(m,b,_),f(y,b,_),p(e),e.setScale();var A=o(m),T=o(y),S=.5*(A[1]-A[0]),C=.5*(A[1]+A[0]),E=.5*(T[1]-T[0]),L=.5*(T[1]+T[0]);return A=[C-1.3*S,C+1.3*S],T=[L-1.3*E,L+1.3*E],e._extremes[r._id]=n.findExtremes(r,A,{padded:!0}),e._extremes[d._id]=n.findExtremes(d,T,{padded:!0}),s(e,\\\"a\\\",\\\"b\\\"),s(e,\\\"b\\\",\\\"a\\\"),l(e,g),l(e,v),w.clipsegments=c(e._xctrl,e._yctrl,g,v),w.x=m,w.y=y,w.a=b,w.b=_,[w]}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../heatmap/clean_2d_array\\\":948,\\\"../heatmap/convert_column_xyz\\\":950,\\\"./array_minmax\\\":877,\\\"./calc_clippath\\\":883,\\\"./calc_gridlines\\\":884,\\\"./calc_labels\\\":885,\\\"./cheater_basis\\\":887,\\\"./set_convert\\\":900,\\\"./smooth_fill_2d_array\\\":901}],883:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i,a,o,s=[],l=!!r.smoothing,c=!!n.smoothing,u=t[0].length-1,f=t.length-1;for(i=0,a=[],o=[];i<=u;i++)a[i]=t[0][i],o[i]=e[0][i];for(s.push({x:a,y:o,bicubic:l}),i=0,a=[],o=[];i<=f;i++)a[i]=t[i][u],o[i]=e[i][u];for(s.push({x:a,y:o,bicubic:c}),i=u,a=[],o=[];i>=0;i--)a[u-i]=t[f][i],o[u-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],884:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib/extend\\\").extendFlat;e.exports=function(t,e,r){var a,o,s,l,c,u,f,h,p,d,g,v,m,y,x=t[\\\"_\\\"+e],b=t[e+\\\"axis\\\"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],M=t[\\\"_\\\"+r],A=t[r+\\\"axis\\\"];\\\"array\\\"===b.tickmode&&(b.tickvals=x.slice());var T=t._xctrl,S=t._yctrl,C=T[0].length,E=T.length,L=t._a.length,z=t._b.length;n.prepTicks(b),\\\"array\\\"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function I(n){var i,a,o,s,l,c,u,f,p,d,g,v,m=[],y=[],x={};if(\\\"b\\\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(z-2,a))),s=a-o,x.length=z,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i<L;i++)c=Math.min(L-2,i),u=i-c,f=t.evalxy([],i,a),A.smoothing&&i>0&&(p=t.dxydi([],i-1,o,0,s),m.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),m.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),m.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,i))),u=i-c,x.length=L,x.crossLength=z,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a<z;a++)o=Math.min(z-2,a),s=a-o,f=t.evalxy([],i,a),A.smoothing&&a>0&&(g=t.dxydj([],c,a-1,u,0),m.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),v=t.dxydj([],c,a-1,u,1),m.push(f[0]-v[0]/3),y.push(f[1]-v[1]/3)),m.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=h,x.x=m,x.y=y,x.smoothing=A.smoothing,x}function P(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=M.length,\\\"b\\\"===e)for(o=Math.max(0,Math.min(z-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;i<C;i++)c[i]=T[n*O][i],u[i]=S[n*O][i];else for(a=Math.max(0,Math.min(L-2,n)),s=Math.min(1,Math.max(0,n-a)),f.xy=function(e){return t.evalxy([],n,e)},f.dxy=function(e,r){return t.dxydj([],a,e,s,r)},i=0;i<E;i++)c[i]=T[i][n*O],u[i]=S[i][n*O];return f.axisLetter=e,f.axis=b,f.crossAxis=A,f.value=x[n],f.constvar=r,f.index=n,f.x=c,f.y=u,f.smoothing=A.smoothing,f}if(\\\"array\\\"===b.tickmode){for(l=5e-15,u=(c=[Math.floor((x.length-1-b.arraytick0)/b.arraydtick*(1+l)),Math.ceil(-b.arraytick0/b.arraydtick/(1+l))].sort(function(t,e){return t-e}))[0]-1,f=c[1]+1,h=u;h<f;h++)(o=b.arraytick0+b.arraydtick*h)<0||o>x.length-1||_.push(i(P(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;h<f;h++)if(s=b.arraytick0+b.arraydtick*h,g=Math.min(s+b.arraydtick,x.length-1),!(s<0||s>x.length-1||g<0||g>x.length-1))for(v=x[s],m=x[g],a=0;a<b.minorgridcount;a++)(y=g-s)<=0||(d=v+(m-v)*(a+1)/(b.minorgridcount+1)*(b.arraydtick/y))<x[0]||d>x[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(i(P(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(P(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort(function(t,e){return t-e}))[0],f=c[1],h=u;h<=f;h++)p=b.tick0+b.dtick*h,_.push(i(I(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;h<f+1;h++)for(p=b.tick0+b.dtick*h,a=0;a<b.minorgridcount;a++)(d=p+b.dtick*(a+1)/(b.minorgridcount+1))<x[0]||d>x[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(i(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\\\"../../lib/extend\\\":685,\\\"../../plots/cartesian/axes\\\":745}],885:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib/extend\\\").extendFlat;e.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;r<l.length;r++)o=l[r],-1!==[\\\"start\\\",\\\"both\\\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:o.xy(0),dxy:o.dxy(0,0),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a)),-1!==[\\\"end\\\",\\\"both\\\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{endAnchor:!1,xy:o.xy(o.crossLength-1),dxy:o.dxy(o.crossLength-2,1),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a))}},{\\\"../../lib/extend\\\":685,\\\"../../plots/cartesian/axes\\\":745}],886:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,f=(c*c*a-l*l*s)*n,h=c*(l+c)*3,p=l*(l+c)*3;return[[e[0]+(h&&u/h),e[1]+(h&&f/h)],[e[0]-(p&&u/p),e[1]-(p&&f/p)]]}},{}],887:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r){var i,a,o,s,l,c,u=[],f=n(t)?t.length:t,h=n(e)?e.length:e,p=n(t)?t:null,d=n(e)?e:null;p&&(o=(p.length-1)/(p[p.length-1]-p[0])/(f-1)),d&&(s=(d.length-1)/(d[d.length-1]-d[0])/(h-1));var g=1/0,v=-1/0;for(a=0;a<h;a++)for(u[a]=[],l=d?(d[a]-d[0])*s:a/(h-1),i=0;i<f;i++)c=(p?(p[i]-p[0])*o:i/(f-1))-l*r,g=Math.min(c,g),v=Math.max(c,v),u[a][i]=c;var m=1/(v-g),y=-g*m;for(a=0;a<h;a++)for(i=0;i<f;i++)u[a][i]=m*u[a][i]+y;return u}},{\\\"../../lib\\\":696}],888:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./catmull_rom\\\"),i=t(\\\"../../lib\\\").ensureArray;function a(t,e,r){var n=-.5*r[0]+1.5*e[0],i=-.5*r[1]+1.5*e[1];return[(2*n+t[0])/3,(2*i+t[1])/3]}e.exports=function(t,e,r,o,s,l){var c,u,f,h,p,d,g,v,m,y,x=r[0].length,b=r.length,_=s?3*x-2:x,w=l?3*b-2:b;for(t=i(t,w),e=i(e,w),f=0;f<w;f++)t[f]=i(t[f],_),e[f]=i(e[f],_);for(u=0,h=0;u<b;u++,h+=l?3:1)for(p=t[h],d=e[h],g=r[u],v=o[u],c=0,f=0;c<x;c++,f+=s?3:1)p[f]=g[c],d[f]=v[c];if(s)for(u=0,h=0;u<b;u++,h+=l?3:1){for(c=1,f=3;c<x-1;c++,f+=3)m=n([r[u][c-1],o[u][c-1]],[r[u][c],o[u][c]],[r[u][c+1],o[u][c+1]],s),t[h][f-1]=m[0][0],e[h][f-1]=m[0][1],t[h][f+1]=m[1][0],e[h][f+1]=m[1][1];y=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=y[0],e[h][1]=y[1],y=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=y[0],e[h][_-2]=y[1]}if(l)for(f=0;f<_;f++){for(h=3;h<w-3;h+=3)m=n([t[h-3][f],e[h-3][f]],[t[h][f],e[h][f]],[t[h+3][f],e[h+3][f]],l),t[h-1][f]=m[0][0],e[h-1][f]=m[0][1],t[h+1][f]=m[1][0],e[h+1][f]=m[1][1];y=a([t[0][f],e[0][f]],[t[2][f],e[2][f]],[t[3][f],e[3][f]]),t[1][f]=y[0],e[1][f]=y[1],y=a([t[w-1][f],e[w-1][f]],[t[w-3][f],e[w-3][f]],[t[w-4][f],e[w-4][f]]),t[w-2][f]=y[0],e[w-2][f]=y[1]}if(s&&l)for(h=1;h<w;h+=(h+1)%3==0?2:1){for(f=3;f<_-3;f+=3)m=n([t[h][f-3],e[h][f-3]],[t[h][f],e[h][f]],[t[h][f+3],e[h][f+3]],s),t[h][f-1]=.5*(t[h][f-1]+m[0][0]),e[h][f-1]=.5*(e[h][f-1]+m[0][1]),t[h][f+1]=.5*(t[h][f+1]+m[1][0]),e[h][f+1]=.5*(e[h][f+1]+m[1][1]);y=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=.5*(t[h][1]+y[0]),e[h][1]=.5*(e[h][1]+y[1]),y=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=.5*(t[h][_-2]+y[0]),e[h][_-2]=.5*(e[h][_-2]+y[1])}return[t,e]}},{\\\"../../lib\\\":696,\\\"./catmull_rom\\\":886}],889:[function(t,e,r){\\\"use strict\\\";e.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],890:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=1-i,d=p*p,g=p*i*2,v=-3*d,m=3*(d-g),y=3*(g-h),x=3*h,b=a*a,_=b*a,w=1-a,k=w*w,M=k*w;for(f=0;f<t.length;f++)o=v*(u=t[f])[n][r]+m*u[n][r+1]+y*u[n][r+2]+x*u[n][r+3],s=v*u[n+1][r]+m*u[n+1][r+1]+y*u[n+1][r+2]+x*u[n+1][r+3],l=v*u[n+2][r]+m*u[n+2][r+1]+y*u[n+2][r+2]+x*u[n+2][r+3],c=v*u[n+3][r]+m*u[n+3][r+1]+y*u[n+3][r+2]+x*u[n+3][r+3],e[f]=M*o+3*(k*a*s+w*b*l)+_*c;return e}:e?function(e,r,n,i,a){var o,s,l,c;e||(e=[]),r*=3;var u=i*i,f=1-i,h=f*f,p=f*i*2,d=-3*h,g=3*(h-p),v=3*(p-u),m=3*u,y=1-a;for(l=0;l<t.length;l++)o=d*(c=t[l])[n][r]+g*c[n][r+1]+v*c[n][r+2]+m*c[n][r+3],s=d*c[n+1][r]+g*c[n+1][r+1]+v*c[n+1][r+2]+m*c[n+1][r+3],e[l]=y*o+a*s;return e}:r?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),n*=3;var h=a*a,p=h*a,d=1-a,g=d*d,v=g*d;for(u=0;u<t.length;u++)o=(f=t[u])[n][r+1]-f[n][r],s=f[n+1][r+1]-f[n+1][r],l=f[n+2][r+1]-f[n+2][r],c=f[n+3][r+1]-f[n+3][r],e[u]=v*o+3*(g*a*s+d*h*l)+p*c;return e}:function(e,r,n,i,a){var o,s,l,c;e||(e=[]);var u=1-a;for(l=0;l<t.length;l++)o=(c=t[l])[n][r+1]-c[n][r],s=c[n+1][r+1]-c[n+1][r],e[l]=u*o+a*s;return e}}},{}],891:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=h*i,d=1-i,g=d*d,v=g*d,m=a*a,y=1-a,x=y*y,b=y*a*2,_=-3*x,w=3*(x-b),k=3*(b-m),M=3*m;for(f=0;f<t.length;f++)o=_*(u=t[f])[n][r]+w*u[n+1][r]+k*u[n+2][r]+M*u[n+3][r],s=_*u[n][r+1]+w*u[n+1][r+1]+k*u[n+2][r+1]+M*u[n+3][r+1],l=_*u[n][r+2]+w*u[n+1][r+2]+k*u[n+2][r+2]+M*u[n+3][r+2],c=_*u[n][r+3]+w*u[n+1][r+3]+k*u[n+2][r+3]+M*u[n+3][r+3],e[f]=v*o+3*(g*i*s+d*h*l)+p*c;return e}:e?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),r*=3;var h=a*a,p=h*a,d=1-a,g=d*d,v=g*d;for(u=0;u<t.length;u++)o=(f=t[u])[n+1][r]-f[n][r],s=f[n+1][r+1]-f[n][r+1],l=f[n+1][r+2]-f[n][r+2],c=f[n+1][r+3]-f[n][r+3],e[u]=v*o+3*(g*a*s+d*h*l)+p*c;return e}:r?function(e,r,n,i,a){var o,s,l,c;e||(e=[]),n*=3;var u=1-i,f=a*a,h=1-a,p=h*h,d=h*a*2,g=-3*p,v=3*(p-d),m=3*(d-f),y=3*f;for(l=0;l<t.length;l++)o=g*(c=t[l])[n][r]+v*c[n+1][r]+m*c[n+2][r]+y*c[n+3][r],s=g*c[n][r+1]+v*c[n+1][r+1]+m*c[n+2][r+1]+y*c[n+3][r+1],e[l]=u*o+i*s;return e}:function(e,r,n,i,a){var o,s,l,c;e||(e=[]);var u=1-i;for(l=0;l<t.length;l++)o=(c=t[l])[n+1][r]-c[n][r],s=c[n+1][r+1]-c[n][r+1],e[l]=u*o+i*s;return e}}},{}],892:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){var a=e-2,o=r-2;return n&&i?function(e,r,n){var i,s,l,c,u,f;e||(e=[]);var h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));h*=3,p*=3;var v=d*d,m=v*d,y=1-d,x=y*y,b=x*y,_=g*g,w=_*g,k=1-g,M=k*k,A=M*k;for(f=0;f<t.length;f++)i=b*(u=t[f])[p][h]+3*(x*d*u[p][h+1]+y*v*u[p][h+2])+m*u[p][h+3],s=b*u[p+1][h]+3*(x*d*u[p+1][h+1]+y*v*u[p+1][h+2])+m*u[p+1][h+3],l=b*u[p+2][h]+3*(x*d*u[p+2][h+1]+y*v*u[p+2][h+2])+m*u[p+2][h+3],c=b*u[p+3][h]+3*(x*d*u[p+3][h+1]+y*v*u[p+3][h+2])+m*u[p+3][h+3],e[f]=A*i+3*(M*g*s+k*_*l)+w*c;return e}:n?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));h*=3;var v=d*d,m=v*d,y=1-d,x=y*y,b=x*y,_=1-g;for(u=0;u<t.length;u++)i=_*(f=t[u])[p][h]+g*f[p+1][h],s=_*f[p][h+1]+g*f[p+1][h+1],l=_*f[p][h+2]+g*f[p+1][h+1],c=_*f[p][h+3]+g*f[p+1][h+1],e[u]=b*i+3*(x*d*s+y*v*l)+m*c;return e}:i?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));p*=3;var v=g*g,m=v*g,y=1-g,x=y*y,b=x*y,_=1-d;for(u=0;u<t.length;u++)i=_*(f=t[u])[p][h]+d*f[p][h+1],s=_*f[p+1][h]+d*f[p+1][h+1],l=_*f[p+2][h]+d*f[p+2][h+1],c=_*f[p+3][h]+d*f[p+3][h+1],e[u]=b*i+3*(x*g*s+y*v*l)+m*c;return e}:function(e,r,n){e||(e=[]);var i,s,l,c,u=Math.max(0,Math.min(Math.floor(r),a)),f=Math.max(0,Math.min(Math.floor(n),o)),h=Math.max(0,Math.min(1,r-u)),p=Math.max(0,Math.min(1,n-f)),d=1-p,g=1-h;for(l=0;l<t.length;l++)i=g*(c=t[l])[f][u]+h*c[f][u+1],s=g*c[f+1][u]+h*c[f+1][u+1],e[l]=d*i+p*s;return e}}},{}],893:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./xy_defaults\\\"),a=t(\\\"./ab_defaults\\\"),o=t(\\\"./attributes\\\"),s=t(\\\"../../components/color/attributes\\\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,o,r,i)}e._clipPathId=\\\"clip\\\"+e.uid+\\\"carpet\\\";var u=c(\\\"color\\\",s.defaultLine);(n.coerceFont(c,\\\"font\\\"),c(\\\"carpet\\\"),a(t,e,l,c,u),e.a&&e.b)?(e.a.length<3&&(e.aaxis.smoothing=0),e.b.length<3&&(e.baxis.smoothing=0),i(t,e,c)||(e.visible=!1),e._cheater&&c(\\\"cheaterslope\\\")):e.visible=!1}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib\\\":696,\\\"./ab_defaults\\\":876,\\\"./attributes\\\":878,\\\"./xy_defaults\\\":902}],894:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.plot=t(\\\"./plot\\\"),n.calc=t(\\\"./calc\\\"),n.animatable=!0,n.isContainer=!0,n.moduleType=\\\"trace\\\",n.name=\\\"carpet\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"carpet\\\",\\\"carpetAxis\\\",\\\"notLegendIsolatable\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":878,\\\"./calc\\\":882,\\\"./defaults\\\":893,\\\"./plot\\\":899}],895:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r,n=t._fullData.length,i=0;i<n;i++){var a=t._fullData[i];if(a.index!==e.index&&(\\\"carpet\\\"===a.type&&(r||(r=a),a.carpet===e.carpet)))return a}return r}},{}],896:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){if(0===t.length)return\\\"\\\";var n,i=[],a=r?3:1;for(n=0;n<t.length;n+=a)i.push(t[n]+\\\",\\\"+e[n]),r&&n<t.length-a&&(i.push(\\\"C\\\"),i.push([t[n+1]+\\\",\\\"+e[n+1],t[n+2]+\\\",\\\"+e[n+2]+\\\" \\\"].join(\\\" \\\")));return i.join(r?\\\"\\\":\\\"L\\\")}},{}],897:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r){var i;for(n(t)?t.length>e.length&&(t=t.slice(0,e.length)):t=[],i=0;i<e.length;i++)t[i]=r(e[i]);return t}},{\\\"../../lib\\\":696}],898:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i,a){var o=i[0]*t.dpdx(e),s=i[1]*t.dpdy(r),l=1,c=1;if(a){var u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=(i[0]*a[0]+i[1]*a[1])/u/f;c=Math.max(0,h)}var p=180*Math.atan2(s,o)/Math.PI;return p<-90?(p+=180,l=-l):p>90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],899:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"./map_1d_array\\\"),o=t(\\\"./makepath\\\"),s=t(\\\"./orient_text\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../constants/alignment\\\");function f(t,e,r,i,s,l){var c=\\\"const-\\\"+s+\\\"-lines\\\",u=r.selectAll(\\\".\\\"+c).data(l);u.enter().append(\\\"path\\\").classed(c,!0).style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\"),u.each(function(r){var i=r,s=i.x,l=i.y,c=a([],s,t.c2p),u=a([],l,e.c2p),f=\\\"M\\\"+o(c,u,i.smoothing);n.select(this).attr(\\\"d\\\",f).style(\\\"stroke-width\\\",i.width).style(\\\"stroke\\\",i.color).style(\\\"fill\\\",\\\"none\\\")}),u.exit().remove()}function h(t,e,r,a,o,c,u,f){var h=c.selectAll(\\\"text.\\\"+f).data(u);h.enter().append(\\\"text\\\").classed(f,!0);var p=0,d={};return h.each(function(o,c){var u;if(\\\"auto\\\"===o.axis.tickangle)u=s(a,e,r,o.xy,o.dxy);else{var f=(o.axis.tickangle+180)*Math.PI/180;u=s(a,e,r,o.xy,[Math.cos(f),Math.sin(f)])}c||(d={angle:u.angle,flip:u.flip});var h=(o.endAnchor?-1:1)*u.flip,g=n.select(this).attr({\\\"text-anchor\\\":h>0?\\\"start\\\":\\\"end\\\",\\\"data-notex\\\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),v=i.bBox(this);g.attr(\\\"transform\\\",\\\"translate(\\\"+u.p[0]+\\\",\\\"+u.p[1]+\\\") rotate(\\\"+u.angle+\\\")translate(\\\"+o.axis.labelpadding*h+\\\",\\\"+.3*v.height+\\\")\\\"),p=Math.max(p,v.width+o.axis.labelpadding)}),h.exit().remove(),d.maxExtent=p,d}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,p=t._fullLayout._clips;c.makeTraceGroups(i,r,\\\"trace\\\").each(function(e){var r=n.select(this),i=e[0],d=i.trace,v=d.aaxis,m=d.baxis,y=c.ensureSingle(r,\\\"g\\\",\\\"minorlayer\\\"),x=c.ensureSingle(r,\\\"g\\\",\\\"majorlayer\\\"),b=c.ensureSingle(r,\\\"g\\\",\\\"boundarylayer\\\"),_=c.ensureSingle(r,\\\"g\\\",\\\"labellayer\\\");r.style(\\\"opacity\\\",d.opacity),f(l,u,x,v,\\\"a\\\",v._gridlines),f(l,u,x,m,\\\"b\\\",m._gridlines),f(l,u,y,v,\\\"a\\\",v._minorgridlines),f(l,u,y,m,\\\"b\\\",m._minorgridlines),f(l,u,b,v,\\\"a-boundary\\\",v._boundarylines),f(l,u,b,m,\\\"b-boundary\\\",m._boundarylines);var w=h(t,l,u,d,i,_,v._labels,\\\"a-label\\\"),k=h(t,l,u,d,i,_,m._labels,\\\"b-label\\\");!function(t,e,r,n,i,a,o,l){var u,f,h,p;u=.5*(r.a[0]+r.a[r.a.length-1]),f=r.b[0],h=r.ab2xy(u,f,!0),p=r.dxyda_rough(u,f),void 0===o.angle&&c.extendFlat(o,s(r,i,a,h,r.dxydb_rough(u,f)));g(t,e,r,n,h,p,r.aaxis,i,a,o,\\\"a-title\\\"),u=r.a[0],f=.5*(r.b[0]+r.b[r.b.length-1]),h=r.ab2xy(u,f,!0),p=r.dxydb_rough(u,f),void 0===l.angle&&c.extendFlat(l,s(r,i,a,h,r.dxyda_rough(u,f)));g(t,e,r,n,h,p,r.baxis,i,a,l,\\\"b-title\\\")}(t,_,d,i,l,u,w,k),function(t,e,r,n,i){var s,l,u,f,h=r.select(\\\"#\\\"+t._clipPathId);h.size()||(h=r.append(\\\"clipPath\\\").classed(\\\"carpetclip\\\",!0));var p=c.ensureSingle(h,\\\"path\\\",\\\"carpetboundary\\\"),d=e.clipsegments,g=[];for(f=0;f<d.length;f++)s=d[f],l=a([],s.x,n.c2p),u=a([],s.y,i.c2p),g.push(o(l,u,s.bicubic));var v=\\\"M\\\"+g.join(\\\"L\\\")+\\\"Z\\\";h.attr(\\\"id\\\",t._clipPathId),p.attr(\\\"d\\\",v)}(d,i,p,l,u)})};var p=u.LINE_SPACING,d=(1-u.MID_SHIFT)/p+1;function g(t,e,r,a,o,c,u,f,h,g,v){var m=[];u.title&&m.push(u.title);var y=e.selectAll(\\\"text.\\\"+v).data(m),x=g.maxExtent;y.enter().append(\\\"text\\\").classed(v,!0),y.each(function(){var e=s(r,f,h,o,c);-1===[\\\"start\\\",\\\"both\\\"].indexOf(u.showticklabels)&&(x=0);var a=u.titlefont.size;x+=a+u.titleoffset;var v=(g.angle+(g.flip<0?180:0)-e.angle+450)%360,m=v>90&&v<270,y=n.select(this);y.text(u.title||\\\"\\\").call(l.convertToTspans,t),m&&(x=(-l.lineCount(y)+d)*p*a-x),y.attr(\\\"transform\\\",\\\"translate(\\\"+e.p[0]+\\\",\\\"+e.p[1]+\\\") rotate(\\\"+e.angle+\\\") translate(0,\\\"+x+\\\")\\\").classed(\\\"user-select-none\\\",!0).attr(\\\"text-anchor\\\",\\\"middle\\\").call(i.font,u.titlefont)}),y.exit().remove()}},{\\\"../../components/drawing\\\":595,\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"./makepath\\\":896,\\\"./map_1d_array\\\":897,\\\"./orient_text\\\":898,d3:148}],900:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"../../lib/search\\\").findBin,a=t(\\\"./compute_control_points\\\"),o=t(\\\"./create_spline_evaluator\\\"),s=t(\\\"./create_i_derivative_evaluator\\\"),l=t(\\\"./create_j_derivative_evaluator\\\");e.exports=function(t){var e=t._a,r=t._b,c=e.length,u=r.length,f=t.aaxis,h=t.baxis,p=e[0],d=e[c-1],g=r[0],v=r[u-1],m=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=m*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,v+=b,t.isVisible=function(t,e){return t>p&&t<d&&e>g&&e<v},t.isOccluded=function(t,e){return t<p||t>d||e<g||e>v},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,f.smoothing,h.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,f.smoothing,h.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,h.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),c-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),c-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),u-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(n<e[0]||n>e[c-1]|i<r[0]||i>r[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,p,d,g=0,v=0,m=[];n<e[0]?(f=0,h=0,g=(n-e[0])/(e[1]-e[0])):n>e[c-1]?(f=c-2,h=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):h=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),i<r[0]?(p=0,d=0,v=(i-r[0])/(r[1]-r[0])):i>r[u-1]?(p=u-2,d=1,v=(i-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(m,f,p,h,d),l[0]+=m[0]*g,l[1]+=m[1]*g),v&&(t.dxydj(m,f,p,h,d),l[0]+=m[0]*v,l[1]+=m[1]*v)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=m*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{\\\"../../lib/search\\\":716,\\\"./compute_control_points\\\":888,\\\"./constants\\\":889,\\\"./create_i_derivative_evaluator\\\":890,\\\"./create_j_derivative_evaluator\\\":891,\\\"./create_spline_evaluator\\\":892}],901:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e,r){var i,a,o,s=[],l=[],c=t[0].length,u=t.length;function f(e,r){var n,i=0,a=0;return e>0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e<c-1&&void 0!==(n=t[r][e+1])&&(a++,i+=n),r>0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r<u-1&&void 0!==(n=t[r+1][e])&&(a++,i+=n),i/Math.max(1,a)}var h,p,d,g,v,m,y,x,b,_,w,k=0;for(i=0;i<c;i++)for(a=0;a<u;a++)void 0===t[a][i]&&(s.push(i),l.push(a),t[a][i]=f(i,a)),k=Math.max(k,Math.abs(t[a][i]));if(!s.length)return t;var M=0,A=0,T=s.length;do{for(M=0,o=0;o<T;o++){i=s[o],a=l[o];var S,C,E,L,z,O,I=0,P=0;0===i?(E=e[z=Math.min(c-1,2)],L=e[1],S=t[a][z],P+=(C=t[a][1])+(C-S)*(e[0]-L)/(L-E),I++):i===c-1&&(E=e[z=Math.max(0,c-3)],L=e[c-2],S=t[a][z],P+=(C=t[a][c-2])+(C-S)*(e[c-1]-L)/(L-E),I++),(0===i||i===c-1)&&a>0&&a<u-1&&(h=r[a+1]-r[a],P+=((p=r[a]-r[a-1])*t[a+1][i]+h*t[a-1][i])/(p+h),I++),0===a?(E=r[O=Math.min(u-1,2)],L=r[1],S=t[O][i],P+=(C=t[1][i])+(C-S)*(r[0]-L)/(L-E),I++):a===u-1&&(E=r[O=Math.max(0,u-3)],L=r[u-2],S=t[O][i],P+=(C=t[u-2][i])+(C-S)*(r[u-1]-L)/(L-E),I++),(0===a||a===u-1)&&i>0&&i<c-1&&(h=e[i+1]-e[i],P+=((p=e[i]-e[i-1])*t[a][i+1]+h*t[a][i-1])/(p+h),I++),I?P/=I:(d=e[i+1]-e[i],g=e[i]-e[i-1],x=(v=r[a+1]-r[a])*(m=r[a]-r[a-1])*(v+m),P=((y=d*g*(d+g))*(m*t[a+1][i]+v*t[a-1][i])+x*(g*t[a][i+1]+d*t[a][i-1]))/(x*(g+d)+y*(m+v))),M+=(_=(b=P-t[a][i])/k)*_,w=I?0:.85,t[a][i]+=b*(1+w)}M=Math.sqrt(M)}while(A++<100&&M>1e-5);return n.log(\\\"Smoother converged to\\\",M,\\\"after\\\",A,\\\"iterations\\\"),t}},{\\\"../../lib\\\":696}],902:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArray1D;e.exports=function(t,e,r){var i=r(\\\"x\\\"),a=i&&i.length,o=r(\\\"y\\\"),s=o&&o.length;if(!a&&!s)return!1;if(e._cheater=!i,a&&!n(i)||s&&!n(o))e._length=null;else{var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}return!0}},{\\\"../../lib\\\":696}],903:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scattergeo/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l=n.marker.line;e.exports=s({locations:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},locationmode:n.locationmode,z:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},text:s({},n.text,{}),marker:{line:{color:l.color,width:s({},l.width,{dflt:1}),editType:\\\"calc\\\"},opacity:{valType:\\\"number\\\",arrayOk:!0,min:0,max:1,dflt:1,editType:\\\"style\\\"},editType:\\\"calc\\\"},selected:{marker:{opacity:n.selected.marker.opacity,editType:\\\"plot\\\"},editType:\\\"plot\\\"},unselected:{marker:{opacity:n.unselected.marker.opacity,editType:\\\"plot\\\"},editType:\\\"plot\\\"},hoverinfo:s({},o.hoverinfo,{editType:\\\"calc\\\",flags:[\\\"location\\\",\\\"z\\\",\\\"text\\\",\\\"name\\\"]})},i(\\\"\\\",{cLetter:\\\"z\\\",editTypeOverride:\\\"calc\\\"}),{colorbar:a})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../scattergeo/attributes\\\":1084}],904:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM,a=t(\\\"../../components/colorscale/calc\\\"),o=t(\\\"../scatter/arrays_to_calcdata\\\"),s=t(\\\"../scatter/calc_selection\\\");e.exports=function(t,e){for(var r=e._length,l=new Array(r),c=0;c<r;c++){var u=l[c]={},f=e.locations[c],h=e.z[c];u.loc=\\\"string\\\"==typeof f?f:null,u.z=n(h)?h:i}return o(l,e),a(e,e.z,\\\"\\\",\\\"z\\\"),s(l,e),l}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../constants/numerical\\\":673,\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc_selection\\\":1046,\\\"fast-isnumeric\\\":214}],905:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/defaults\\\"),a=t(\\\"./attributes\\\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\\\"locations\\\"),c=s(\\\"z\\\");l&&l.length&&n.isArrayOrTypedArray(c)&&c.length?(e._length=Math.min(l.length,c.length),s(\\\"locationmode\\\"),s(\\\"text\\\"),s(\\\"marker.line.color\\\"),s(\\\"marker.line.width\\\"),s(\\\"marker.opacity\\\"),i(t,e,o,s,{prefix:\\\"\\\",cLetter:\\\"z\\\"}),n.coerceSelectionMarkerOpacity(e,s)):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"./attributes\\\":903}],906:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],907:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"../scatter/fill_hover_text\\\");e.exports=function(t,e,r){var o,s,l,c,u=t.cd,f=u[0].trace,h=t.subplot;for(s=0;s<u.length;s++)if(c=!1,(o=u[s])._polygons){for(l=0;l<o._polygons.length;l++)o._polygons[l].contains([e,r])&&(c=!c),o._polygons[l].contains([e+360,r])&&(c=!c);if(c)break}if(c&&o)return t.x0=t.x1=t.xa.c2p(o.ct),t.y0=t.y1=t.ya.c2p(o.ct),t.index=o.index,t.location=o.loc,t.z=o.z,function(t,e,r,o){var s=r.hi||e.hoverinfo,l=\\\"all\\\"===s?i.hoverinfo.flags:s.split(\\\"+\\\"),c=-1!==l.indexOf(\\\"name\\\"),u=-1!==l.indexOf(\\\"location\\\"),f=-1!==l.indexOf(\\\"z\\\"),h=-1!==l.indexOf(\\\"text\\\"),p=[];!c&&u?t.nameOverride=r.loc:(c&&(t.nameOverride=e.name),u&&p.push(r.loc));f&&p.push((d=r.z,n.tickText(o,o.c2l(d),\\\"hover\\\").text));var d;h&&a(r,e,p);t.extraText=p.join(\\\"<br>\\\")}(t,f,o,h.mockAxis),[t]}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/fill_hover_text\\\":1052,\\\"./attributes\\\":903}],908:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../heatmap/colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"./style\\\").style,n.styleOnSelect=t(\\\"./style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.eventData=t(\\\"./event_data\\\"),n.selectPoints=t(\\\"./select\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"choropleth\\\",n.basePlotModule=t(\\\"../../plots/geo\\\"),n.categories=[\\\"geo\\\",\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"../../plots/geo\\\":776,\\\"../heatmap/colorbar\\\":949,\\\"./attributes\\\":903,\\\"./calc\\\":904,\\\"./defaults\\\":905,\\\"./event_data\\\":906,\\\"./hover\\\":907,\\\"./plot\\\":909,\\\"./select\\\":910,\\\"./style\\\":911}],909:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../lib/polygon\\\"),o=t(\\\"../../lib/topojson_utils\\\").getTopojsonFeatures,s=t(\\\"../../lib/geo_location_utils\\\").locationToFeature,l=t(\\\"./style\\\").style;function c(t,e){for(var r=t[0].trace,n=t.length,i=o(r,e),a=0;a<n;a++){var l=t[a],c=s(r.locationmode,l.loc,i);c?(l.geojson=c,l.ct=c.properties.ct,l.index=a,l._polygons=u(c)):l.geojson=null}}function u(t){var e,r,n,i,o=t.geometry,s=o.coordinates,l=t.id,c=[];function u(t){for(var e=0;e<t.length-1;e++)if(t[e][0]>0&&t[e+1][0]<0)return e;return null}switch(e=\\\"RUS\\\"===l||\\\"FJI\\\"===l?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),i=0;i<t.length;i++)e[i]=[t[i][0]<0?t[i][0]+360:t[i][0],t[i][1]];c.push(a.tester(e))}:\\\"ATA\\\"===l?function(t){var e=u(t);if(null===e)return c.push(a.tester(t));var r=new Array(t.length+1),n=0;for(i=0;i<t.length;i++)i>e?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var o=a.tester(r);o.pts.pop(),c.push(o)}:function(t){c.push(a.tester(t))},o.type){case\\\"MultiPolygon\\\":for(r=0;r<s.length;r++)for(n=0;n<s[r].length;n++)e(s[r][n]);break;case\\\"Polygon\\\":for(r=0;r<s.length;r++)e(s[r])}return c}e.exports=function(t,e,r){for(var a=0;a<r.length;a++)c(r[a],e.topojson);var o=e.layers.backplot.select(\\\".choroplethlayer\\\");i.makeTraceGroups(o,r,\\\"trace choropleth\\\").each(function(e){var r=(e[0].node3=n.select(this)).selectAll(\\\"path.choroplethlocation\\\").data(i.identity);r.enter().append(\\\"path\\\").classed(\\\"choroplethlocation\\\",!0),r.exit().remove(),l(t,e)})}},{\\\"../../lib\\\":696,\\\"../../lib/geo_location_utils\\\":688,\\\"../../lib/polygon\\\":709,\\\"../../lib/topojson_utils\\\":724,\\\"./style\\\":911,d3:148}],910:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)(i=(n=s[r]).ct)&&(a=l.c2p(i),o=c.c2p(i),e.contains([a,o],null,r,t)?(u.push({pointNumber:r,lon:i[0],lat:i[1]}),n.selected=1):n.selected=0);return u}},{}],911:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"../../components/colorscale\\\");function s(t,e){var r=e[0].trace,s=e[0].node3.selectAll(\\\".choroplethlocation\\\"),l=r.marker||{},c=l.line||{},u=o.makeColorScaleFunc(o.extractScale(r.colorscale,r.zmin,r.zmax));s.each(function(t){n.select(this).attr(\\\"fill\\\",u(t.z)).call(i.stroke,t.mlc||c.color).call(a.dashLine,\\\"\\\",t.mlw||c.width||0).style(\\\"opacity\\\",l.opacity)}),a.selectedPointStyle(s,r,t)}e.exports={style:function(t,e){e&&s(t,e)},styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace;n.selectedpoints?a.selectedPointStyle(r.selectAll(\\\".choroplethlocation\\\"),n,t):s(t,e)}}},{\\\"../../components/color\\\":570,\\\"../../components/colorscale\\\":585,\\\"../../components/drawing\\\":595,d3:148}],912:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../mesh3d/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},z:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},u:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},v:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},w:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},sizemode:{valType:\\\"enumerated\\\",values:[\\\"scaled\\\",\\\"absolute\\\"],editType:\\\"calc\\\",dflt:\\\"scaled\\\"},sizeref:{valType:\\\"number\\\",editType:\\\"calc\\\",min:0},anchor:{valType:\\\"enumerated\\\",editType:\\\"calc\\\",values:[\\\"tip\\\",\\\"tail\\\",\\\"cm\\\",\\\"center\\\"],dflt:\\\"cm\\\"},text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"calc\\\"}};s(l,n(\\\"\\\",{colorAttr:\\\"u/v/w norm\\\",showScaleDflt:!0,editTypeOverride:\\\"calc\\\"}),{colorbar:i});[\\\"opacity\\\",\\\"lightposition\\\",\\\"lighting\\\"].forEach(function(t){l[t]=a[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:\\\"calc\\\",flags:[\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"u\\\",\\\"v\\\",\\\"w\\\",\\\"norm\\\",\\\"text\\\",\\\"name\\\"],dflt:\\\"x+y+z+norm+text+name\\\"}),l.transforms=void 0,e.exports=l},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../mesh3d/attributes\\\":987}],913:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\");e.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,c=0;c<o;c++){var u=r[c],f=i[c],h=a[c],p=Math.sqrt(u*u+f*f+h*h);s=Math.max(s,p),l=Math.min(l,p)}e._len=o,e._normMax=s,n(e,[l,s],\\\"\\\",\\\"c\\\")}},{\\\"../../components/colorscale/calc\\\":578}],914:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-cone3d\\\"),i=t(\\\"gl-cone3d\\\").createConeMesh,a=t(\\\"../../lib\\\").simpleMap,o=t(\\\"../../lib/gl_format_color\\\").parseColorScale,s=t(\\\"../../plots/gl3d/zip3\\\");function l(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var c=l.prototype;c.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index,r=this.data.x[e],n=this.data.y[e],i=this.data.z[e],a=this.data.u[e],o=this.data.v[e],s=this.data.w[e];t.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.text;return Array.isArray(l)&&void 0!==l[e]?t.textLabel=l[e]:l&&(t.textLabel=l),!0}};var u={xaxis:0,yaxis:1,zaxis:2},f={tip:1,tail:0,cm:.25,center:.5},h={tip:1,tail:1,cm:.75,center:.5};function p(t,e){var r=t.fullSceneLayout,i=t.dataScale,l={};function c(t,e){var n=r[e],o=i[u[e]];return a(t,function(t){return n.d2l(t)*o})}l.vectors=s(c(e.u,\\\"xaxis\\\"),c(e.v,\\\"yaxis\\\"),c(e.w,\\\"zaxis\\\"),e._len),l.positions=s(c(e.x,\\\"xaxis\\\"),c(e.y,\\\"yaxis\\\"),c(e.z,\\\"zaxis\\\"),e._len),l.colormap=o(e.colorscale),l.vertexIntensityBounds=[e.cmin/e._normMax,e.cmax/e._normMax],l.coneOffset=f[e.anchor],\\\"scaled\\\"===e.sizemode?l.coneSize=e.sizeref||.5:l.coneSize=e.sizeref&&e._normMax?e.sizeref/e._normMax:.5;var p=n(l),d=e.lightposition;return p.lightPosition=[d.x,d.y,d.z],p.ambient=e.lighting.ambient,p.diffuse=e.lighting.diffuse,p.specular=e.lighting.specular,p.roughness=e.lighting.roughness,p.fresnel=e.lighting.fresnel,p.opacity=e.opacity,e._pad=h[e.anchor]*p.vectorScale*p.coneScale*e._normMax,p}c.update=function(t){this.data=t;var e=p(this.scene,t);this.mesh.update(e)},c.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,n=p(t,e),a=i(r,n),o=new l(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},{\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../plots/gl3d/zip3\\\":799,\\\"gl-cone3d\\\":231}],915:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/defaults\\\"),a=t(\\\"./attributes\\\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\\\"u\\\"),c=s(\\\"v\\\"),u=s(\\\"w\\\"),f=s(\\\"x\\\"),h=s(\\\"y\\\"),p=s(\\\"z\\\");l&&l.length&&c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length&&p&&p.length?(s(\\\"sizeref\\\"),s(\\\"sizemode\\\"),s(\\\"anchor\\\"),s(\\\"lighting.ambient\\\"),s(\\\"lighting.diffuse\\\"),s(\\\"lighting.specular\\\"),s(\\\"lighting.roughness\\\"),s(\\\"lighting.fresnel\\\"),s(\\\"lightposition.x\\\"),s(\\\"lightposition.y\\\"),s(\\\"lightposition.z\\\"),i(t,e,o,s,{prefix:\\\"\\\",cLetter:\\\"c\\\"}),s(\\\"text\\\"),e._length=null):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"./attributes\\\":912}],916:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"cone\\\",basePlotModule:t(\\\"../../plots/gl3d\\\"),categories:[\\\"gl3d\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),colorbar:{min:\\\"cmin\\\",max:\\\"cmax\\\"},calc:t(\\\"./calc\\\"),plot:t(\\\"./convert\\\"),meta:{}}},{\\\"../../plots/gl3d\\\":788,\\\"./attributes\\\":912,\\\"./calc\\\":913,\\\"./convert\\\":914,\\\"./defaults\\\":915}],917:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../heatmap/attributes\\\"),i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/colorbar/attributes\\\"),s=t(\\\"../../components/drawing/attributes\\\").dash,l=t(\\\"../../plots/font_attributes\\\"),c=t(\\\"../../lib/extend\\\").extendFlat,u=t(\\\"../../constants/filter_ops\\\"),f=u.COMPARISON_OPS2,h=u.INTERVAL_OPS,p=i.line;e.exports=c({z:n.z,x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,transpose:n.transpose,xtype:n.xtype,ytype:n.ytype,zhoverformat:n.zhoverformat,connectgaps:n.connectgaps,fillcolor:{valType:\\\"color\\\",editType:\\\"calc\\\"},autocontour:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\",impliedEdits:{\\\"contours.start\\\":void 0,\\\"contours.end\\\":void 0,\\\"contours.size\\\":void 0}},ncontours:{valType:\\\"integer\\\",dflt:15,min:1,editType:\\\"calc\\\"},contours:{type:{valType:\\\"enumerated\\\",values:[\\\"levels\\\",\\\"constraint\\\"],dflt:\\\"levels\\\",editType:\\\"calc\\\"},start:{valType:\\\"number\\\",dflt:null,editType:\\\"plot\\\",impliedEdits:{\\\"^autocontour\\\":!1}},end:{valType:\\\"number\\\",dflt:null,editType:\\\"plot\\\",impliedEdits:{\\\"^autocontour\\\":!1}},size:{valType:\\\"number\\\",dflt:null,min:0,editType:\\\"plot\\\",impliedEdits:{\\\"^autocontour\\\":!1}},coloring:{valType:\\\"enumerated\\\",values:[\\\"fill\\\",\\\"heatmap\\\",\\\"lines\\\",\\\"none\\\"],dflt:\\\"fill\\\",editType:\\\"calc\\\"},showlines:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},showlabels:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"plot\\\"},labelfont:l({editType:\\\"plot\\\",colorEditType:\\\"style\\\"}),labelformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"plot\\\"},operation:{valType:\\\"enumerated\\\",values:[].concat(f).concat(h),dflt:\\\"=\\\",editType:\\\"calc\\\"},value:{valType:\\\"any\\\",dflt:0,editType:\\\"calc\\\"},editType:\\\"calc\\\",impliedEdits:{autocontour:!1}},line:{color:c({},p.color,{editType:\\\"style+colorbars\\\"}),width:c({},p.width,{editType:\\\"style+colorbars\\\"}),dash:s,smoothing:c({},p.smoothing,{}),editType:\\\"plot\\\"}},a(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1,editTypeOverride:\\\"calc\\\"}),{colorbar:o})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../components/drawing/attributes\\\":594,\\\"../../constants/filter_ops\\\":669,\\\"../../lib/extend\\\":685,\\\"../../plots/font_attributes\\\":772,\\\"../heatmap/attributes\\\":946,\\\"../scatter/attributes\\\":1044}],918:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../heatmap/calc\\\"),i=t(\\\"./set_contours\\\");e.exports=function(t,e){var r=n(t,e);return i(e),r}},{\\\"../heatmap/calc\\\":947,\\\"./set_contours\\\":936}],919:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i,a,o,s=t[0],l=s.x.length,c=s.y.length,u=s.z,f=n.contours,h=-1/0,p=1/0;for(i=0;i<c;i++)p=Math.min(p,u[i][0]),p=Math.min(p,u[i][l-1]),h=Math.max(h,u[i][0]),h=Math.max(h,u[i][l-1]);for(i=1;i<l-1;i++)p=Math.min(p,u[0][i]),p=Math.min(p,u[c-1][i]),h=Math.max(h,u[0][i]),h=Math.max(h,u[c-1][i]);switch(s.prefixBoundary=!1,e){case\\\">\\\":f.value>h&&(s.prefixBoundary=!0);break;case\\\"<\\\":f.value<p&&(s.prefixBoundary=!0);break;case\\\"[]\\\":a=Math.min.apply(null,f.value),((o=Math.max.apply(null,f.value))<p||a>h)&&(s.prefixBoundary=!0);break;case\\\"][\\\":a=Math.min.apply(null,f.value),o=Math.max.apply(null,f.value),a<p&&o>h&&(s.prefixBoundary=!0)}}},{}],920:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorbar/draw\\\"),i=t(\\\"./make_color_map\\\"),a=t(\\\"./end_plus\\\");e.exports=function(t,e){var r=e[0].trace,o=\\\"cb\\\"+r.uid;if(t._fullLayout._infolayer.selectAll(\\\".\\\"+o).remove(),r.showscale){var s=e[0].t.cb=n(t,o),l=r.contours,c=r.line,u=l.size||1,f=l.coloring,h=i(r,{isColorbar:!0});s.fillgradient(\\\"heatmap\\\"===f?r.colorscale:\\\"\\\").zrange(\\\"heatmap\\\"===f?[r.zmin,r.zmax]:\\\"\\\").fillcolor(\\\"fill\\\"===f?h:\\\"\\\").line({color:\\\"lines\\\"===f?h:c.color,width:!1!==l.showlines?c.width:0,dash:c.dash}).levels({start:l.start,end:a(l),size:u}).options(r.colorbar)()}}},{\\\"../../components/colorbar/draw\\\":575,\\\"./end_plus\\\":928,\\\"./make_color_map\\\":933}],921:[function(t,e,r){\\\"use strict\\\";e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],922:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"./label_defaults\\\"),a=t(\\\"../../components/color\\\"),o=a.addOpacity,s=a.opacity,l=t(\\\"../../constants/filter_ops\\\"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,a,l,f){var h,p,d,g=e.contours,v=r(\\\"contours.operation\\\");(g._operation=c[v],function(t,e){var r;-1===u.indexOf(e.operation)?(t(\\\"contours.value\\\",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t(\\\"contours.value\\\",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),\\\"=\\\"===v?h=g.showlines=!0:(h=r(\\\"contours.showlines\\\"),d=r(\\\"fillcolor\\\",o((t.line||{}).color||l,.5))),h)&&(p=r(\\\"line.color\\\",d&&s(d)?o(e.fillcolor,1):l),r(\\\"line.width\\\",2),r(\\\"line.dash\\\"));r(\\\"line.smoothing\\\"),i(r,a,p,f)}},{\\\"../../components/color\\\":570,\\\"../../constants/filter_ops\\\":669,\\\"./label_defaults\\\":932,\\\"fast-isnumeric\\\":214}],923:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../constants/filter_ops\\\"),i=t(\\\"fast-isnumeric\\\");function a(t,e){var r,a=Array.isArray(e);function o(t){return i(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(a?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=a?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=a?e.map(o):[o(e)]),r}function o(t){return function(e){e=a(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=a(t,e),end:1/0,size:1/0}}}e.exports={\\\"[]\\\":o(\\\"[]\\\"),\\\"][\\\":o(\\\"][\\\"),\\\">\\\":s(\\\">\\\"),\\\"<\\\":s(\\\"<\\\"),\\\"=\\\":s(\\\"=\\\")}},{\\\"../../constants/filter_ops\\\":669,\\\"fast-isnumeric\\\":214}],924:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i=n(\\\"contours.start\\\"),a=n(\\\"contours.end\\\"),o=!1===i||!1===a,s=r(\\\"contours.size\\\");!(o?e.autocontour=!0:r(\\\"autocontour\\\",!1))&&s||r(\\\"ncontours\\\")}},{}],925:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths)})}e.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case\\\"=\\\":case\\\"<\\\":return t;case\\\">\\\":for(1!==t.length&&n.warn(\\\"Contour data invalid for the specified inequality operation.\\\"),a=t[0],r=0;r<a.edgepaths.length;r++)a.edgepaths[r]=s(a.edgepaths[r]);for(r=0;r<a.paths.length;r++)a.paths[r]=s(a.paths[r]);return t;case\\\"][\\\":var c=s;s=l,l=c;case\\\"[]\\\":for(2!==t.length&&n.warn(\\\"Contour data invalid for the specified inequality range operation.\\\"),a=i(t[0]),o=i(t[1]),r=0;r<a.edgepaths.length;r++)a.edgepaths[r]=s(a.edgepaths[r]);for(r=0;r<a.paths.length;r++)a.paths[r]=s(a.paths[r]);for(;o.edgepaths.length;)a.edgepaths.push(l(o.edgepaths.shift()));for(;o.paths.length;)a.paths.push(l(o.paths.shift()));return[a]}}},{\\\"../../lib\\\":696}],926:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../heatmap/xyz_defaults\\\"),a=t(\\\"./constraint_defaults\\\"),o=t(\\\"./contours_defaults\\\"),s=t(\\\"./style_defaults\\\"),l=t(\\\"./attributes\\\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}if(i(t,e,u,c)){u(\\\"text\\\");var f=\\\"constraint\\\"===u(\\\"contours.type\\\");u(\\\"connectgaps\\\",n.isArray1D(e.z)),f?a(t,e,u,c,r):(o(t,e,u,function(r){return n.coerce2(t,e,l,r)}),s(t,e,u,c))}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../heatmap/xyz_defaults\\\":961,\\\"./attributes\\\":917,\\\"./constraint_defaults\\\":922,\\\"./contours_defaults\\\":924,\\\"./style_defaults\\\":938}],927:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./constraint_mapping\\\"),a=t(\\\"./end_plus\\\");e.exports=function(t,e,r){for(var o=\\\"constraint\\\"===t.type?i[t._operation](t.value):t,s=o.size,l=[],c=a(o),u=r.trace._carpetTrace,f=u?{xaxis:u.aaxis,yaxis:u.baxis,x:r.a,y:r.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:r.x,y:r.y},h=o.start;h<c;h+=s)if(l.push(n.extendFlat({level:h,crossings:{},starts:[],edgepaths:[],paths:[],z:r.z,smoothing:r.trace.line.smoothing},f)),l.length>1e3){n.warn(\\\"Too many contours, clipping at 1000\\\",t);break}return l}},{\\\"../../lib\\\":696,\\\"./constraint_mapping\\\":923,\\\"./end_plus\\\":928}],928:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t.end+t.size/1e6}},{}],929:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./constants\\\");function a(t,e,r,n){return Math.abs(t[0]-e[0])<r&&Math.abs(t[1]-e[1])<n}function o(t,e,r,o,l){var c,u=e.join(\\\",\\\"),f=u,h=t.crossings[f],p=function(t,e,r){var n=0,a=0;t>20&&e?208===t||1114===t?n=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(t)?a=1:-1!==i.LEFTSTART.indexOf(t)?n=1:-1!==i.TOPSTART.indexOf(t)?a=-1:n=-1;return[n,a]}(h,r,e),d=[s(t,e,[-p[0],-p[1]])],g=p.join(\\\",\\\"),v=t.z.length,m=t.z[0].length;for(c=0;c<1e4;c++){if(h>20?(h=i.CHOOSESADDLE[h][(p[0]||p[1])<0?0:1],t.crossings[f]=i.SADDLEREMAINDER[h]):delete t.crossings[f],!(p=i.NEWDELTA[h])){n.log(\\\"Found bad marching index:\\\",h,e,t.level);break}d.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],a(d[d.length-1],d[d.length-2],o,l)&&d.pop(),f=e.join(\\\",\\\");var y=p[0]&&(e[0]<0||e[0]>m-2)||p[1]&&(e[1]<0||e[1]>v-2);if(f===u&&p.join(\\\",\\\")===g||r&&y)break;h=t.crossings[f]}1e4===c&&n.log(\\\"Infinite loop in contour?\\\");var x,b,_,w,k,M,A,T,S,C,E,L,z,O,I,P=a(d[0],d[d.length-1],o,l),D=0,R=.2*t.smoothing,B=[],F=0;for(c=1;c<d.length;c++)L=d[c],z=d[c-1],void 0,void 0,O=L[2]-z[2],I=L[3]-z[3],D+=A=Math.sqrt(O*O+I*I),B.push(A);var N=D/B.length*R;function j(t){return d[t%d.length]}for(c=d.length-2;c>=F;c--)if((x=B[c])<N){for(_=0,b=c-1;b>=F&&x+B[b]<N;b--)x+=B[b];if(P&&c===d.length-2)for(_=0;_<b&&x+B[_]<N;_++)x+=B[_];k=c-b+_+1,M=Math.floor((c+b+_+2)/2),w=P||c!==d.length-2?P||-1!==b?k%2?j(M):[(j(M)[0]+j(M+1)[0])/2,(j(M)[1]+j(M+1)[1])/2]:d[0]:d[d.length-1],d.splice(b+1,c-b+1,w),c=b+1,_&&(F=_),P&&(c===d.length-2?d[_]=d[d.length-1]:0===c&&(d[d.length-1]=d[0]))}for(d.splice(0,F),c=0;c<d.length;c++)d[c].length=2;if(!(d.length<2))if(P)d.pop(),t.paths.push(d);else{r||n.log(\\\"Unclosed interior contour?\\\",t.level,u,d.join(\\\"L\\\"));var V=!1;for(T=0;T<t.edgepaths.length;T++)if(C=t.edgepaths[T],!V&&a(C[0],d[d.length-1],o,l)){d.pop(),V=!0;var U=!1;for(S=0;S<t.edgepaths.length;S++)if(a((E=t.edgepaths[S])[E.length-1],d[0],o,l)){U=!0,d.shift(),t.edgepaths.splice(T,1),S===T?t.paths.push(d.concat(E)):(S>T&&S--,t.edgepaths[S]=E.concat(d,C));break}U||(t.edgepaths[T]=d.concat(C))}for(T=0;T<t.edgepaths.length&&!V;T++)a((C=t.edgepaths[T])[C.length-1],d[0],o,l)&&(d.shift(),t.edgepaths[T]=C.concat(d),V=!0);V||t.edgepaths.push(d)}}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a);return[o.c2p((1-l)*t.x[n]+l*t.x[n+1],!0),s.c2p(t.y[i],!0),n+l,i]}var c=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-c)*t.y[i]+c*t.y[i+1],!0),n,i+c]}e.exports=function(t,e,r){var i,a,s,l;for(e=e||.01,r=r||.01,a=0;a<t.length;a++){for(s=t[a],l=0;l<s.starts.length;l++)o(s,s.starts[l],\\\"edge\\\",e,r);for(i=0;Object.keys(s.crossings).length&&i<1e4;)i++,o(s,Object.keys(s.crossings)[0].split(\\\",\\\").map(Number),void 0,e,r);1e4===i&&n.log(\\\"Infinite loop in contour?\\\")}}},{\\\"../../lib\\\":696,\\\"./constants\\\":921}],930:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../heatmap/hover\\\");e.exports=function(t,e,r,a,o){var s=i(t,e,r,a,o,!0);return s&&s.forEach(function(t){var e=t.trace;\\\"constraint\\\"===e.contours.type&&(e.fillcolor&&n.opacity(e.fillcolor)?t.color=n.addOpacity(e.fillcolor,1):e.contours.showlines&&n.opacity(e.line.color)&&(t.color=n.addOpacity(e.line.color,1)))}),s}},{\\\"../../components/color\\\":570,\\\"../heatmap/hover\\\":953}],931:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\").plot,n.style=t(\\\"./style\\\"),n.colorbar=t(\\\"./colorbar\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"contour\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"2dMap\\\",\\\"contour\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":917,\\\"./calc\\\":918,\\\"./colorbar\\\":920,\\\"./defaults\\\":926,\\\"./hover\\\":930,\\\"./plot\\\":935,\\\"./style\\\":937}],932:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e,r,i){if(i||(i={}),t(\\\"contours.showlabels\\\")){var a=e.font;n.coerceFont(t,\\\"contours.labelfont\\\",{family:a.family,size:a.size,color:r}),t(\\\"contours.labelformat\\\")}!1!==i.hasHover&&t(\\\"zhoverformat\\\")}},{\\\"../../lib\\\":696}],933:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/colorscale\\\"),a=t(\\\"./end_plus\\\");e.exports=function(t){var e=t.contours,r=e.start,o=a(e),s=e.size||1,l=Math.floor((o-r)/s)+1,c=\\\"lines\\\"===e.coloring?0:1;isFinite(s)||(s=1,l=1);var u,f,h=t.colorscale,p=h.length,d=new Array(p),g=new Array(p);if(\\\"heatmap\\\"===e.coloring){for(t.zauto&&!1===t.autocontour&&(t.zmin=r-s/2,t.zmax=t.zmin+l*s),f=0;f<p;f++)u=h[f],d[f]=u[0]*(t.zmax-t.zmin)+t.zmin,g[f]=u[1];var v=n.extent([t.zmin,t.zmax,e.start,e.start+s*(l-1)]),m=v[t.zmin<t.zmax?0:1],y=v[t.zmin<t.zmax?1:0];m!==t.zmin&&(d.splice(0,0,m),g.splice(0,0,Range[0])),y!==t.zmax&&(d.push(y),g.push(g[g.length-1]))}else for(f=0;f<p;f++)u=h[f],d[f]=(u[0]*(l+c-1)-c/2)*s+r,g[f]=u[1];return i.makeColorScaleFunc({domain:d,range:g},{noNumericCheck:!0})}},{\\\"../../components/colorscale\\\":585,\\\"./end_plus\\\":928,d3:148}],934:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\");function i(t,e){var r=(e[0][0]>t?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(t){var e,r,a,o,s,l,c,u,f,h=t[0].z,p=h.length,d=h[0].length,g=2===p||2===d;for(r=0;r<p-1;r++)for(o=[],0===r&&(o=o.concat(n.BOTTOMSTART)),r===p-2&&(o=o.concat(n.TOPSTART)),e=0;e<d-1;e++)for(a=o.slice(),0===e&&(a=a.concat(n.LEFTSTART)),e===d-2&&(a=a.concat(n.RIGHTSTART)),s=e+\\\",\\\"+r,l=[[h[r][e],h[r][e+1]],[h[r+1][e],h[r+1][e+1]]],f=0;f<t.length;f++)(c=i((u=t[f]).level,l))&&(u.crossings[s]=c,-1!==a.indexOf(c)&&(u.starts.push([e,r]),g&&-1!==a.indexOf(c,a.indexOf(c)+1)&&u.starts.push([e,r])))}},{\\\"./constants\\\":921}],935:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"../../lib/svg_text_utils\\\"),s=t(\\\"../../plots/cartesian/axes\\\"),l=t(\\\"../../plots/cartesian/set_convert\\\"),c=t(\\\"../heatmap/plot\\\"),u=t(\\\"./make_crossings\\\"),f=t(\\\"./find_all_paths\\\"),h=t(\\\"./empty_pathinfo\\\"),p=t(\\\"./convert_to_constraints\\\"),d=t(\\\"./close_boundaries\\\"),g=t(\\\"./constants\\\"),v=g.LABELOPTIMIZER;function m(t,e){var r,n,o,s,l,c,u,f=function(t,e){var r=t.prefixBoundary;if(void 0===r){var n=Math.min(t.z[0][0],t.z[0][1]);r=!t.edgepaths.length&&n>t.level}return r?\\\"M\\\"+e.join(\\\"L\\\")+\\\"Z\\\":\\\"\\\"}(t,e),h=0,p=t.edgepaths.map(function(t,e){return e}),d=!0;function g(t){return Math.abs(t[1]-e[2][1])<.01}function v(t){return Math.abs(t[0]-e[0][0])<.01}function m(t){return Math.abs(t[0]-e[2][0])<.01}for(;p.length;){for(c=a.smoothopen(t.edgepaths[h],t.smoothing),f+=d?c:c.replace(/^M/,\\\"L\\\"),p.splice(p.indexOf(h),1),r=t.edgepaths[h][t.edgepaths[h].length-1],s=-1,o=0;o<4;o++){if(!r){i.log(\\\"Missing end?\\\",h,t);break}for(u=r,Math.abs(u[1]-e[0][1])<.01&&!m(r)?n=e[1]:v(r)?n=e[0]:g(r)?n=e[3]:m(r)&&(n=e[2]),l=0;l<t.edgepaths.length;l++){var y=t.edgepaths[l][0];Math.abs(r[0]-n[0])<.01?Math.abs(r[0]-y[0])<.01&&(y[1]-r[1])*(n[1]-y[1])>=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):i.log(\\\"endpt to newendpt is not vert. or horz.\\\",r,n,y)}if(r=n,s>=0)break;f+=\\\"L\\\"+n}if(s===t.edgepaths.length){i.log(\\\"unclosed perimeter path\\\");break}h=s,(d=-1===p.indexOf(h))&&(h=p[0],f+=\\\"Z\\\")}for(h=0;h<t.paths.length;h++)f+=a.smoothclosed(t.paths[h],t.smoothing);return f}function y(t,e,r,n){var a=e.width/2,o=e.height/2,s=t.x,l=t.y,c=t.theta,u=Math.cos(c)*a,f=Math.sin(c)*a,h=(s>n.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),p=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*o);if(h<1||p<1)return 1/0;var d=v.EDGECOST*(1/(h-1)+1/(p-1));d+=v.ANGLECOST*c*c;for(var g=s-u,m=l-f,y=s+u,x=l+f,b=0;b<r.length;b++){var _=r[b],w=Math.cos(_.theta)*_.width/2,k=Math.sin(_.theta)*_.width/2,M=2*i.segmentDistance(g,m,y,x,_.x-w,_.y-k,_.x+w,_.y+k)/(e.height+_.height),A=_.level===e.level,T=A?v.SAMELEVELDISTANCE:1;if(M<=T)return 1/0;d+=v.NEIGHBORCOST*(A?v.SAMELEVELFACTOR:1)/(M-T)}return d}r.plot=function(t,e,o,s){var l=e.xaxis,v=e.yaxis,y=t._fullLayout;i.makeTraceGroups(s,o,\\\"contour\\\").each(function(o){var s=n.select(this),x=o[0],b=x.trace,_=x.x,w=x.y,k=b.contours,M=h(k,e,x),A=i.ensureSingle(s,\\\"g\\\",\\\"heatmapcoloring\\\"),T=[];\\\"heatmap\\\"===k.coloring&&(b.zauto&&!1===b.autocontour&&(b._input.zmin=b.zmin=k.start-k.size/2,b._input.zmax=b.zmax=b.zmin+M.length*k.size),T=[o]),c(t,e,T,A),u(M),f(M);var S=l.c2p(_[0],!0),C=l.c2p(_[_.length-1],!0),E=v.c2p(w[0],!0),L=v.c2p(w[w.length-1],!0),z=[[S,L],[C,L],[C,E],[S,E]],O=M;\\\"constraint\\\"===k.type&&(O=p(M,k._operation),d(O,k._operation,z,b)),function(t,e,r){var n=i.ensureSingle(t,\\\"g\\\",\\\"contourbg\\\").selectAll(\\\"path\\\").data(\\\"fill\\\"===r.coloring?[0]:[]);n.enter().append(\\\"path\\\"),n.exit().remove(),n.attr(\\\"d\\\",\\\"M\\\"+e.join(\\\"L\\\")+\\\"Z\\\").style(\\\"stroke\\\",\\\"none\\\")}(s,z,k),function(t,e,r,a){var o=i.ensureSingle(t,\\\"g\\\",\\\"contourfill\\\").selectAll(\\\"path\\\").data(\\\"fill\\\"===a.coloring||\\\"constraint\\\"===a.type&&\\\"=\\\"!==a._operation?e:[]);o.enter().append(\\\"path\\\"),o.exit().remove(),o.each(function(t){var e=m(t,r);e?n.select(this).attr(\\\"d\\\",e).style(\\\"stroke\\\",\\\"none\\\"):n.select(this).remove()})}(s,O,z,k),function(t,e,o,s,l,c){var u=i.ensureSingle(t,\\\"g\\\",\\\"contourlines\\\"),f=!1!==l.showlines,h=l.showlabels,p=f&&h,d=r.createLines(u,f||h,e),v=r.createLineClip(u,p,o._fullLayout._clips,s.trace.uid),m=t.selectAll(\\\"g.contourlabels\\\").data(h?[0]:[]);if(m.exit().remove(),m.enter().append(\\\"g\\\").classed(\\\"contourlabels\\\",!0),h){var y=[c],x=[];i.clearLocationCache();var b=r.labelFormatter(l,s.t.cb,o._fullLayout),_=a.tester.append(\\\"text\\\").attr(\\\"data-notex\\\",1).call(a.font,l.labelfont),w=e[0].xaxis._length,k=e[0].yaxis._length,M={left:Math.max(c[0][0],0),right:Math.min(c[2][0],w),top:Math.max(c[0][1],0),bottom:Math.min(c[2][1],k)};M.middle=(M.top+M.bottom)/2,M.center=(M.left+M.right)/2;var A=Math.sqrt(w*w+k*k),T=g.LABELDISTANCE*A/Math.max(1,e.length/g.LABELINCREASE);d.each(function(t){var e=r.calcTextOpts(t.level,b,_,o);n.select(this).selectAll(\\\"path\\\").each(function(){var t=i.getVisibleSegment(this,M,e.height/2);if(t&&!(t.len<(e.width+e.height)*g.LABELMIN))for(var n=Math.min(Math.ceil(t.len/T),g.LABELMAX),a=0;a<n;a++){var o=r.findBestTextLocation(this,t,e,x,M);if(!o)break;r.addLabelData(o,e,x,y)}})}),_.remove(),r.drawLabels(m,x,o,v,p?y:null)}h&&!f&&d.remove()}(s,M,t,x,k,z),function(t,e,r,n,o){var s=\\\"clip\\\"+n.trace.uid,l=r.selectAll(\\\"#\\\"+s).data(n.trace.connectgaps?[]:[0]);if(l.enter().append(\\\"clipPath\\\").classed(\\\"contourclip\\\",!0).attr(\\\"id\\\",s),l.exit().remove(),!1===n.trace.connectgaps){var c={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:e.xaxis,yaxis:e.yaxis,x:n.x,y:n.y,z:function(t){var e,r,n=t.trace._emptypoints,i=[],a=t.z.length,o=t.z[0].length,s=[];for(e=0;e<o;e++)s.push(1);for(e=0;e<a;e++)i.push(s.slice());for(e=0;e<n.length;e++)r=n[e],i[r[0]][r[1]]=0;return t.zmask=i,i}(n),smoothing:0};u([c]),f([c]);var h=m(c,o),p=i.ensureSingle(l,\\\"path\\\",\\\"\\\");p.attr(\\\"d\\\",h)}else s=null;t.call(a.setClipUrl,s)}(s,e,y._clips,x,z)})},r.createLines=function(t,e,r){var n=r[0].smoothing,i=t.selectAll(\\\"g.contourlevel\\\").data(e?r:[]);if(i.exit().remove(),i.enter().append(\\\"g\\\").classed(\\\"contourlevel\\\",!0),e){var o=i.selectAll(\\\"path.openline\\\").data(function(t){return t.pedgepaths||t.edgepaths});o.exit().remove(),o.enter().append(\\\"path\\\").classed(\\\"openline\\\",!0),o.attr(\\\"d\\\",function(t){return a.smoothopen(t,n)}).style(\\\"stroke-miterlimit\\\",1).style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\");var s=i.selectAll(\\\"path.closedline\\\").data(function(t){return t.ppaths||t.paths});s.exit().remove(),s.enter().append(\\\"path\\\").classed(\\\"closedline\\\",!0),s.attr(\\\"d\\\",function(t){return a.smoothclosed(t,n)}).style(\\\"stroke-miterlimit\\\",1).style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\")}return i},r.createLineClip=function(t,e,r,n){var i=e?\\\"clipline\\\"+n:null,o=r.selectAll(\\\"#\\\"+i).data(e?[0]:[]);return o.exit().remove(),o.enter().append(\\\"clipPath\\\").classed(\\\"contourlineclip\\\",!0).attr(\\\"id\\\",i),a.setClipUrl(t,i),o},r.labelFormatter=function(t,e,r){if(t.labelformat)return r._d3locale.numberFormat(t.labelformat);var n;if(e)n=e.axis;else{if(n={type:\\\"linear\\\",_id:\\\"ycontour\\\",showexponent:\\\"all\\\",exponentformat:\\\"B\\\"},\\\"constraint\\\"===t.type){var i=t.value;Array.isArray(i)?n.range=[i[0],i[i.length-1]]:n.range=[i,i]}else n.range=[t.start,t.end],n.nticks=(t.end-t.start)/t.size;n.range[0]===n.range[1]&&(n.range[1]+=n.range[0]||1),n.nticks||(n.nticks=1e3),l(n,r),s.prepTicks(n),n._tmin=null,n._tmax=null}return function(t){return s.tickText(n,t).text}},r.calcTextOpts=function(t,e,r,n){var i=e(t);r.text(i).call(o.convertToTspans,n);var s=a.bBox(r.node(),!0);return{text:i,width:s.width,height:s.height,level:t,dy:(s.top+s.bottom)/2}},r.findBestTextLocation=function(t,e,r,n,a){var o,s,l,c,u,f=r.width;e.isClosed?(s=e.len/v.INITIALSEARCHPOINTS,o=e.min+s/2,l=e.max):(s=(e.len-f)/(v.INITIALSEARCHPOINTS+1),o=e.min+s+f/2,l=e.max-(s+f)/2);for(var h=1/0,p=0;p<v.ITERATIONS;p++){for(var d=o;d<l;d+=s){var g=i.getTextLocation(t,e.total,d,f),m=y(g,r,n,a);m<h&&(h=m,u=g,c=d)}if(h>2*v.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(h<=v.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.width/2,a=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),f=i*u,h=a*c,p=i*c,d=-a*u,g=[[o-f-h,s-p-d],[o+f-h,s+p-d],[o+f+h,s+p+d],[o-f+h,s-p+d]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(g)},r.drawLabels=function(t,e,r,a,s){var l=t.selectAll(\\\"text\\\").data(e,function(t){return t.text+\\\",\\\"+t.x+\\\",\\\"+t.y+\\\",\\\"+t.theta});if(l.exit().remove(),l.enter().append(\\\"text\\\").attr({\\\"data-notex\\\":1,\\\"text-anchor\\\":\\\"middle\\\"}).each(function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:\\\"rotate(\\\"+180*t.theta/Math.PI+\\\" \\\"+e+\\\" \\\"+i+\\\")\\\"}).call(o.convertToTspans,r)}),s){for(var c=\\\"\\\",u=0;u<s.length;u++)c+=\\\"M\\\"+s[u].join(\\\"L\\\")+\\\"Z\\\";i.ensureSingle(a,\\\"path\\\",\\\"\\\").attr(\\\"d\\\",c)}}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/cartesian/set_convert\\\":764,\\\"../heatmap/plot\\\":958,\\\"./close_boundaries\\\":919,\\\"./constants\\\":921,\\\"./convert_to_constraints\\\":925,\\\"./empty_pathinfo\\\":927,\\\"./find_all_paths\\\":929,\\\"./make_crossings\\\":934,d3:148}],936:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\");function a(t,e,r){var i={type:\\\"linear\\\",range:[t,e]};return n.autoTicks(i,(e-t)/(r||15)),i}e.exports=function(t){var e=t.contours;if(t.autocontour){var r=t.zmin,o=t.zmax;void 0!==r&&void 0!==o||(r=i.aggNums(Math.min,null,t._z),o=i.aggNums(Math.max,null,t._z));var s=a(r,o,t.ncontours);e.size=s.dtick,e.start=n.tickFirst(s),s.range.reverse(),e.end=n.tickFirst(s),e.start===r&&(e.start+=e.size),e.end===o&&(e.end-=e.size),e.start>e.end&&(e.start=e.end=(e.start+e.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:e.start,end:e.end,size:e.size}),t._input.autocontour=!0}else if(\\\"constraint\\\"!==e.type){var l,c=e.start,u=e.end,f=t._input.contours;if(c>u&&(e.start=f.start=u,u=e.end=f.end=c,c=e.start),!(e.size>0))l=c===u?1:a(c,u,t.ncontours).dtick,f.size=e.size=l}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],937:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"../heatmap/style\\\"),o=t(\\\"./make_color_map\\\");e.exports=function(t){var e=n.select(t).selectAll(\\\"g.contour\\\");e.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),e.each(function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u=\\\"constraint\\\"===a.type,f=!u&&\\\"lines\\\"===a.coloring,h=!u&&\\\"fill\\\"===a.coloring,p=f||h?o(r):null;e.selectAll(\\\"g.contourlevel\\\").each(function(t){n.select(this).selectAll(\\\"path\\\").call(i.lineGroupStyle,s.width,f?p(t.level):s.color,s.dash)});var d=a.labelfont;if(e.selectAll(\\\"g.contourlabels text\\\").each(function(t){i.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?p(t.level):s.color)})}),u)e.selectAll(\\\"g.contourfill path\\\").style(\\\"fill\\\",r.fillcolor);else if(h){var g;e.selectAll(\\\"g.contourfill path\\\").style(\\\"fill\\\",function(t){return void 0===g&&(g=t.level),p(t.level+.5*l)}),void 0===g&&(g=c),e.selectAll(\\\"g.contourbg path\\\").style(\\\"fill\\\",p(g-.5*l))}}),a(t)}},{\\\"../../components/drawing\\\":595,\\\"../heatmap/style\\\":959,\\\"./make_color_map\\\":933,d3:148}],938:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/defaults\\\"),i=t(\\\"./label_defaults\\\");e.exports=function(t,e,r,a,o){var s,l=r(\\\"contours.coloring\\\"),c=\\\"\\\";\\\"fill\\\"===l&&(s=r(\\\"contours.showlines\\\")),!1!==s&&(\\\"lines\\\"!==l&&(c=r(\\\"line.color\\\",\\\"#000\\\")),r(\\\"line.width\\\",.5),r(\\\"line.dash\\\")),\\\"none\\\"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,a,r,{prefix:\\\"\\\",cLetter:\\\"z\\\"})),r(\\\"line.smoothing\\\"),i(r,a,c,o)}},{\\\"../../components/colorscale/defaults\\\":580,\\\"./label_defaults\\\":932}],939:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../heatmap/attributes\\\"),i=t(\\\"../contour/attributes\\\"),a=i.contours,o=t(\\\"../scatter/attributes\\\"),s=t(\\\"../../components/colorscale/attributes\\\"),l=t(\\\"../../components/colorbar/attributes\\\"),c=t(\\\"../../lib/extend\\\").extendFlat,u=o.line;e.exports=c({carpet:{valType:\\\"string\\\",editType:\\\"calc\\\"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:a.type,start:a.start,end:a.end,size:a.size,coloring:{valType:\\\"enumerated\\\",values:[\\\"fill\\\",\\\"lines\\\",\\\"none\\\"],dflt:\\\"fill\\\",editType:\\\"calc\\\"},showlines:a.showlines,showlabels:a.showlabels,labelfont:a.labelfont,labelformat:a.labelformat,operation:a.operation,value:a.value,editType:\\\"calc\\\",impliedEdits:{autocontour:!1}},line:{color:c({},u.color,{}),width:u.width,dash:u.dash,smoothing:c({},u.smoothing,{}),editType:\\\"plot\\\"},transforms:void 0},s(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1}),{colorbar:l})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../contour/attributes\\\":917,\\\"../heatmap/attributes\\\":946,\\\"../scatter/attributes\\\":1044}],940:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\"),i=t(\\\"../../lib\\\").isArray1D,a=t(\\\"../heatmap/convert_column_xyz\\\"),o=t(\\\"../heatmap/clean_2d_array\\\"),s=t(\\\"../heatmap/max_row_length\\\"),l=t(\\\"../heatmap/interp2d\\\"),c=t(\\\"../heatmap/find_empties\\\"),u=t(\\\"../heatmap/make_bound_array\\\"),f=t(\\\"./defaults\\\"),h=t(\\\"../carpet/lookup_carpetid\\\"),p=t(\\\"../contour/set_contours\\\");e.exports=function(t,e){var r=e._carpetTrace=h(t,e);if(r&&r.visible&&\\\"legendonly\\\"!==r.visible){if(!e.a||!e.b){var d=t.data[r.index],g=t.data[e.index];g.a||(g.a=d.a),g.b||(g.b=d.b),f(g,e,e._defaultColor,t._fullLayout)}var v=function(t,e){var r,f,h,p,d,g,v,m=e._carpetTrace,y=m.aaxis,x=m.baxis;y._minDtick=0,x._minDtick=0,i(e.z)&&a(e,y,x,\\\"a\\\",\\\"b\\\",[\\\"z\\\"]);r=e._a=e._a||e.a,p=e._b=e._b||e.b,r=r?y.makeCalcdata(e,\\\"_a\\\"):[],p=p?x.makeCalcdata(e,\\\"_b\\\"):[],f=e.a0||0,h=e.da||1,d=e.b0||0,g=e.db||1,v=e._z=o(e._z||e.z,e.transpose),e._emptypoints=c(v),l(v,e._emptypoints);var b=s(v),_=\\\"scaled\\\"===e.xtype?\\\"\\\":r,w=u(e,_,f,h,b,y),k=\\\"scaled\\\"===e.ytype?\\\"\\\":p,M=u(e,k,d,g,v.length,x),A={a:w,b:M,z:v};\\\"levels\\\"===e.contours.type&&\\\"none\\\"!==e.contours.coloring&&n(e,v,\\\"\\\",\\\"z\\\");return[A]}(0,e);return p(e),v}}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../lib\\\":696,\\\"../carpet/lookup_carpetid\\\":895,\\\"../contour/set_contours\\\":936,\\\"../heatmap/clean_2d_array\\\":948,\\\"../heatmap/convert_column_xyz\\\":950,\\\"../heatmap/find_empties\\\":952,\\\"../heatmap/interp2d\\\":955,\\\"../heatmap/make_bound_array\\\":956,\\\"../heatmap/max_row_length\\\":957,\\\"./defaults\\\":941}],941:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../heatmap/xyz_defaults\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"../contour/constraint_defaults\\\"),s=t(\\\"../contour/contours_defaults\\\"),l=t(\\\"../contour/style_defaults\\\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,a,r,i)}if(u(\\\"carpet\\\"),t.a&&t.b){if(!i(t,e,u,c,\\\"a\\\",\\\"b\\\"))return void(e.visible=!1);u(\\\"text\\\"),\\\"constraint\\\"===u(\\\"contours.type\\\")?o(t,e,u,c,r,{hasHover:!1}):(s(t,e,u,function(r){return n.coerce2(t,e,a,r)}),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{\\\"../../lib\\\":696,\\\"../contour/constraint_defaults\\\":922,\\\"../contour/contours_defaults\\\":924,\\\"../contour/style_defaults\\\":938,\\\"../heatmap/xyz_defaults\\\":961,\\\"./attributes\\\":939}],942:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../contour/colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"../contour/style\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"contourcarpet\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"carpet\\\",\\\"contour\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"hasLines\\\",\\\"carpetDependent\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../contour/colorbar\\\":920,\\\"../contour/style\\\":937,\\\"./attributes\\\":939,\\\"./calc\\\":940,\\\"./defaults\\\":941,\\\"./plot\\\":945}],943:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/drawing\\\"),i=t(\\\"../carpet/axis_aligned_line\\\"),a=t(\\\"../../lib\\\");e.exports=function(t,e,r,o,s,l,c,u){var f,h,p,d,g,v,m,y=\\\"\\\",x=e.edgepaths.map(function(t,e){return e}),b=!0,_=1e-4*Math.abs(r[0][0]-r[2][0]),w=1e-4*Math.abs(r[0][1]-r[2][1]);function k(t){return Math.abs(t[1]-r[0][1])<w}function M(t){return Math.abs(t[1]-r[2][1])<w}function A(t){return Math.abs(t[0]-r[0][0])<_}function T(t){return Math.abs(t[0]-r[2][0])<_}function S(t,e){var r,n,a,o,f=\\\"\\\";for(k(t)&&!T(t)||M(t)&&!A(t)?(o=s.aaxis,a=i(s,l,[t[0],e[0]],.5*(t[1]+e[1]))):(o=s.baxis,a=i(s,l,.5*(t[0]+e[0]),[t[1],e[1]])),r=1;r<a.length;r++)for(f+=o.smoothing?\\\"C\\\":\\\"L\\\",n=0;n<a[r].length;n++){var h=a[r][n];f+=[c.c2p(h[0]),u.c2p(h[1])]+\\\" \\\"}return f}for(f=0,h=null;x.length;){var C=e.edgepaths[f][0];for(h&&(y+=S(h,C)),m=n.smoothopen(e.edgepaths[f].map(o),e.smoothing),y+=b?m:m.replace(/^M/,\\\"L\\\"),x.splice(x.indexOf(f),1),h=e.edgepaths[f][e.edgepaths[f].length-1],g=-1,d=0;d<4;d++){if(!h){a.log(\\\"Missing end?\\\",f,e);break}for(k(h)&&!T(h)?p=r[1]:A(h)?p=r[0]:M(h)?p=r[3]:T(h)&&(p=r[2]),v=0;v<e.edgepaths.length;v++){var E=e.edgepaths[v][0];Math.abs(h[0]-p[0])<_?Math.abs(h[0]-E[0])<_&&(E[1]-h[1])*(p[1]-E[1])>=0&&(p=E,g=v):Math.abs(h[1]-p[1])<w?Math.abs(h[1]-E[1])<w&&(E[0]-h[0])*(p[0]-E[0])>=0&&(p=E,g=v):a.log(\\\"endpt to newendpt is not vert. or horz.\\\",h,p,E)}if(g>=0)break;y+=S(h,p),h=p}if(g===e.edgepaths.length){a.log(\\\"unclosed perimeter path\\\");break}f=g,(b=-1===x.indexOf(f))&&(f=x[0],y+=S(h,p)+\\\"Z\\\",h=null)}for(f=0;f<e.paths.length;f++)y+=n.smoothclosed(e.paths[f].map(o),e.smoothing);return y}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../carpet/axis_aligned_line\\\":879}],944:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r<t.length;r++){for(o=(a=t[r]).pedgepaths=[],s=a.ppaths=[],n=0;n<a.edgepaths.length;n++){for(u=a.edgepaths[n],l=[],i=0;i<u.length;i++)l[i]=e(u[i]);o.push(l)}for(n=0;n<a.paths.length;n++){for(u=a.paths[n],c=[],i=0;i<u.length;i++)c[i]=e(u[i]);s.push(c)}}}},{}],945:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../carpet/map_1d_array\\\"),a=t(\\\"../carpet/makepath\\\"),o=t(\\\"../../components/drawing\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../contour/make_crossings\\\"),c=t(\\\"../contour/find_all_paths\\\"),u=t(\\\"../contour/plot\\\"),f=t(\\\"../contour/constants\\\"),h=t(\\\"../contour/convert_to_constraints\\\"),p=t(\\\"./join_all_paths\\\"),d=t(\\\"../contour/empty_pathinfo\\\"),g=t(\\\"./map_pathinfo\\\"),v=t(\\\"../carpet/lookup_carpetid\\\"),m=t(\\\"../contour/close_boundaries\\\");function y(t,e,r){var n=t.getPointAtLength(e),i=t.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function x(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function b(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}e.exports=function(t,e,r,_){var w=e.xaxis,k=e.yaxis;s.makeTraceGroups(_,r,\\\"contour\\\").each(function(r){var _=n.select(this),M=r[0],A=M.trace,T=A._carpetTrace=v(t,A),S=t.calcdata[T.index][0];if(T.visible&&\\\"legendonly\\\"!==T.visible){var C=M.a,E=M.b,L=A.contours,z=d(L,e,M),O=\\\"constraint\\\"===L.type,I=L._operation,P=O?\\\"=\\\"===I?\\\"lines\\\":\\\"fill\\\":L.coloring,D=[[C[0],E[E.length-1]],[C[C.length-1],E[E.length-1]],[C[C.length-1],E[0]],[C[0],E[0]]];l(z);var R=1e-8*(C[C.length-1]-C[0]),B=1e-8*(E[E.length-1]-E[0]);c(z,R,B);var F,N,j,V,U=z;\\\"constraint\\\"===L.type&&(U=h(z,I),m(U,I,D,A)),g(z,G);var q=[];for(V=S.clipsegments.length-1;V>=0;V--)F=S.clipsegments[V],N=i([],F.x,w.c2p),j=i([],F.y,k.c2p),N.reverse(),j.reverse(),q.push(a(N,j,F.bicubic));var H=\\\"M\\\"+q.join(\\\"L\\\")+\\\"Z\\\";!function(t,e,r,n,o,l){var c,u,f,h,p=s.ensureSingle(t,\\\"g\\\",\\\"contourbg\\\").selectAll(\\\"path\\\").data(\\\"fill\\\"!==l||o?[]:[0]);p.enter().append(\\\"path\\\"),p.exit().remove();var d=[];for(h=0;h<e.length;h++)c=e[h],u=i([],c.x,r.c2p),f=i([],c.y,n.c2p),d.push(a(u,f,c.bicubic));p.attr(\\\"d\\\",\\\"M\\\"+d.join(\\\"L\\\")+\\\"Z\\\").style(\\\"stroke\\\",\\\"none\\\")}(_,S.clipsegments,w,k,O,P),function(t,e,r,i,a,o,l,c,u,f,h){var d=s.ensureSingle(e,\\\"g\\\",\\\"contourfill\\\").selectAll(\\\"path\\\").data(\\\"fill\\\"===f?a:[]);d.enter().append(\\\"path\\\"),d.exit().remove(),d.each(function(e){var a=p(t,e,o,l,c,u,r,i);e.prefixBoundary&&(a=h+a),a?n.select(this).attr(\\\"d\\\",a).style(\\\"stroke\\\",\\\"none\\\"):n.select(this).remove()})}(A,_,w,k,U,D,G,T,S,P,H),function(t,e,r,i,a,l,c){var h=s.ensureSingle(t,\\\"g\\\",\\\"contourlines\\\"),p=!1!==a.showlines,d=a.showlabels,g=p&&d,v=u.createLines(h,p||d,e),m=u.createLineClip(h,g,r._fullLayout._defs,i.trace.uid),_=t.selectAll(\\\"g.contourlabels\\\").data(d?[0]:[]);if(_.exit().remove(),_.enter().append(\\\"g\\\").classed(\\\"contourlabels\\\",!0),d){var w=l.xaxis,k=l.yaxis,M=w._length,A=k._length,T=[[[0,0],[M,0],[M,A],[0,A]]],S=[];s.clearLocationCache();var C=u.labelFormatter(a,i.t.cb,r._fullLayout),E=o.tester.append(\\\"text\\\").attr(\\\"data-notex\\\",1).call(o.font,a.labelfont),L={left:0,right:M,center:M/2,top:0,bottom:A,middle:A/2},z=Math.sqrt(M*M+A*A),O=f.LABELDISTANCE*z/Math.max(1,e.length/f.LABELINCREASE);v.each(function(t){var e=u.calcTextOpts(t.level,C,E,r);n.select(this).selectAll(\\\"path\\\").each(function(r){var n=s.getVisibleSegment(this,L,e.height/2);if(n&&(function(t,e,r,n,i,a){for(var o,s=0;s<r.pedgepaths.length;s++)e===r.pedgepaths[s]&&(o=r.edgepaths[s]);if(!o)return;var l=i.a[0],c=i.a[i.a.length-1],u=i.b[0],f=i.b[i.b.length-1];function h(t,e){var r,n=0;return(Math.abs(t[0]-l)<.1||Math.abs(t[0]-c)<.1)&&(r=x(i.dxydb_rough(t[0],t[1],.1)),n=Math.max(n,a*b(e,r)/2)),(Math.abs(t[1]-u)<.1||Math.abs(t[1]-f)<.1)&&(r=x(i.dxyda_rough(t[0],t[1],.1)),n=Math.max(n,a*b(e,r)/2)),n}var p=y(t,0,1),d=y(t,n.total,n.total-1),g=h(o[0],p),v=n.total-h(o[o.length-1],d);n.min<g&&(n.min=g);n.max>v&&(n.max=v);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*f.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/O),f.LABELMAX),a=0;a<i;a++){var o=u.findBestTextLocation(this,n,e,S,L);if(!o)break;u.addLabelData(o,e,S,T)}})}),E.remove(),u.drawLabels(_,S,r,m,g?T:null)}d&&!p&&v.remove()}(_,z,t,M,L,e,T),o.setClipUrl(_,T._clipPathId)}function G(t){var e=T.ab2xy(t[0],t[1],!0);return[w.c2p(e[0]),k.c2p(e[1])]}})}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../carpet/lookup_carpetid\\\":895,\\\"../carpet/makepath\\\":896,\\\"../carpet/map_1d_array\\\":897,\\\"../contour/close_boundaries\\\":919,\\\"../contour/constants\\\":921,\\\"../contour/convert_to_constraints\\\":925,\\\"../contour/empty_pathinfo\\\":927,\\\"../contour/find_all_paths\\\":929,\\\"../contour/make_crossings\\\":934,\\\"../contour/plot\\\":935,\\\"./join_all_paths\\\":943,\\\"./map_pathinfo\\\":944,d3:148}],946:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../lib/extend\\\").extendFlat;e.exports=o({z:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},x:o({},n.x,{impliedEdits:{xtype:\\\"array\\\"}}),x0:o({},n.x0,{impliedEdits:{xtype:\\\"scaled\\\"}}),dx:o({},n.dx,{impliedEdits:{xtype:\\\"scaled\\\"}}),y:o({},n.y,{impliedEdits:{ytype:\\\"array\\\"}}),y0:o({},n.y0,{impliedEdits:{ytype:\\\"scaled\\\"}}),dy:o({},n.dy,{impliedEdits:{ytype:\\\"scaled\\\"}}),text:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},transpose:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},xtype:{valType:\\\"enumerated\\\",values:[\\\"array\\\",\\\"scaled\\\"],editType:\\\"calc+clearAxisTypes\\\"},ytype:{valType:\\\"enumerated\\\",values:[\\\"array\\\",\\\"scaled\\\"],editType:\\\"calc+clearAxisTypes\\\"},zsmooth:{valType:\\\"enumerated\\\",values:[\\\"fast\\\",\\\"best\\\",!1],dflt:!1,editType:\\\"calc\\\"},connectgaps:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},xgap:{valType:\\\"number\\\",dflt:0,min:0,editType:\\\"plot\\\"},ygap:{valType:\\\"number\\\",dflt:0,min:0,editType:\\\"plot\\\"},zhoverformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"none\\\"},transforms:void 0},i(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1}),{colorbar:a})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../scatter/attributes\\\":1044}],947:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../histogram2d/calc\\\"),s=t(\\\"../../components/colorscale/calc\\\"),l=t(\\\"./convert_column_xyz\\\"),c=t(\\\"./max_row_length\\\"),u=t(\\\"./clean_2d_array\\\"),f=t(\\\"./interp2d\\\"),h=t(\\\"./find_empties\\\"),p=t(\\\"./make_bound_array\\\");e.exports=function(t,e){var r,d,g,v,m,y,x,b,_,w=a.getFromId(t,e.xaxis||\\\"x\\\"),k=a.getFromId(t,e.yaxis||\\\"y\\\"),M=n.traceIs(e,\\\"contour\\\"),A=n.traceIs(e,\\\"histogram\\\"),T=n.traceIs(e,\\\"gl2d\\\"),S=M?\\\"best\\\":e.zsmooth;if(w._minDtick=0,k._minDtick=0,A)r=(_=o(t,e)).x,d=_.x0,g=_.dx,v=_.y,m=_.y0,y=_.dy,x=_.z;else{var C=e.z;i.isArray1D(C)?(l(e,w,k,\\\"x\\\",\\\"y\\\",[\\\"z\\\"]),r=e._x,v=e._y,C=e._z):(r=e.x?w.makeCalcdata(e,\\\"x\\\"):[],v=e.y?k.makeCalcdata(e,\\\"y\\\"):[]),d=e.x0||0,g=e.dx||1,m=e.y0||0,y=e.dy||1,x=u(C,e.transpose),(M||e.connectgaps)&&(e._emptypoints=h(x),f(x,e._emptypoints))}function E(t){S=e._input.zsmooth=e.zsmooth=!1,i.warn('cannot use zsmooth: \\\"fast\\\": '+t)}if(\\\"fast\\\"===S)if(\\\"log\\\"===w.type||\\\"log\\\"===k.type)E(\\\"log axis found\\\");else if(!A){if(r.length){var L=(r[r.length-1]-r[0])/(r.length-1),z=Math.abs(L/100);for(b=0;b<r.length-1;b++)if(Math.abs(r[b+1]-r[b]-L)>z){E(\\\"x scale is not linear\\\");break}}if(v.length&&\\\"fast\\\"===S){var O=(v[v.length-1]-v[0])/(v.length-1),I=Math.abs(O/100);for(b=0;b<v.length-1;b++)if(Math.abs(v[b+1]-v[b]-O)>I){E(\\\"y scale is not linear\\\");break}}}var P=c(x),D=\\\"scaled\\\"===e.xtype?\\\"\\\":r,R=p(e,D,d,g,P,w),B=\\\"scaled\\\"===e.ytype?\\\"\\\":v,F=p(e,B,m,y,x.length,k);T||(e._extremes[w._id]=a.findExtremes(w,R),e._extremes[k._id]=a.findExtremes(k,F));var N={x:R,y:F,z:x,text:e._text||e.text};if(D&&D.length===R.length-1&&(N.xCenter=D),B&&B.length===F.length-1&&(N.yCenter=B),A&&(N.xRanges=_.xRanges,N.yRanges=_.yRanges,N.pts=_.pts),M&&\\\"constraint\\\"===e.contours.type||s(e,x,\\\"\\\",\\\"z\\\"),M&&e.contours&&\\\"heatmap\\\"===e.contours.coloring){var j={type:\\\"contour\\\"===e.type?\\\"heatmap\\\":\\\"histogram2d\\\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};N.xfill=p(j,D,d,g,P,w),N.yfill=p(j,B,m,y,x.length,k)}return[N]}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"../histogram2d/calc\\\":978,\\\"./clean_2d_array\\\":948,\\\"./convert_column_xyz\\\":950,\\\"./find_empties\\\":952,\\\"./interp2d\\\":955,\\\"./make_bound_array\\\":956,\\\"./max_row_length\\\":957}],948:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\");e.exports=function(t,e){var r,i,a,o,s,l;function c(t){if(n(t))return+t}if(e){for(r=0,s=0;s<t.length;s++)r=Math.max(r,t[s].length);if(0===r)return!1;a=function(t){return t.length},o=function(t,e,r){return t[r][e]}}else r=t.length,a=function(t,e){return t[e].length},o=function(t,e,r){return t[e][r]};var u=new Array(r);for(s=0;s<r;s++)for(i=a(t,s),u[s]=new Array(i),l=0;l<i;l++)u[s][l]=c(o(t,s,l));return u}},{\\\"fast-isnumeric\\\":214}],949:[function(t,e,r){\\\"use strict\\\";e.exports={min:\\\"zmin\\\",max:\\\"zmax\\\"}},{}],950:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e,r,a,o,s){var l,c,u,f=t._length,h=t[a].slice(0,f),p=t[o].slice(0,f),d=t.text,g=void 0!==d&&n.isArray1D(d),v=t[a+\\\"calendar\\\"],m=t[o+\\\"calendar\\\"];for(l=0;l<f;l++)h[l]=e.d2c(h[l],0,v),p[l]=r.d2c(p[l],0,m);var y,x,b,_=n.distinctVals(h),w=_.vals,k=n.distinctVals(p),M=k.vals,A=[];for(l=0;l<s.length;l++)A[l]=n.init2dArray(M.length,w.length);for(g&&(b=n.init2dArray(M.length,w.length)),l=0;l<f;l++)if(h[l]!==i&&p[l]!==i){for(y=n.findBin(h[l]+_.minDiff/2,w),x=n.findBin(p[l]+k.minDiff/2,M),c=0;c<s.length;c++)u=t[s[c]],A[c][x][y]=u[l];g&&(b[x][y]=d[l])}for(t[\\\"_\\\"+a]=w,t[\\\"_\\\"+o]=M,c=0;c<s.length;c++)t[\\\"_\\\"+s[c]]=A[c];g&&(t._text=b)}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696}],951:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./xyz_defaults\\\"),a=t(\\\"./style_defaults\\\"),o=t(\\\"../../components/colorscale/defaults\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l)?(c(\\\"text\\\"),a(t,e,c,l),c(\\\"connectgaps\\\",n.isArray1D(e.z)&&!1!==e.zsmooth),o(t,e,l,c,{prefix:\\\"\\\",cLetter:\\\"z\\\"})):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"./attributes\\\":946,\\\"./style_defaults\\\":960,\\\"./xyz_defaults\\\":961}],952:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./max_row_length\\\");e.exports=function(t){var e,r,i,a,o,s,l,c,u=[],f={},h=[],p=t[0],d=[],g=[0,0,0],v=n(t);for(r=0;r<t.length;r++)for(e=d,d=p,p=t[r+1]||[],i=0;i<v;i++)void 0===d[i]&&((s=(void 0!==d[i-1]?1:0)+(void 0!==d[i+1]?1:0)+(void 0!==e[i]?1:0)+(void 0!==p[i]?1:0))?(0===r&&s++,0===i&&s++,r===t.length-1&&s++,i===d.length-1&&s++,s<4&&(f[[r,i]]=[r,i,s]),u.push([r,i,s])):h.push([r,i]));for(;h.length;){for(l={},c=!1,o=h.length-1;o>=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||g)[2]+(f[[r+1,i]]||g)[2]+(f[[r,i-1]]||g)[2]+(f[[r,i+1]]||g)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),c=!0);if(!c)throw\\\"findEmpties iterated with no new neighbors\\\";for(a in l)f[a]=l[a],u.push(l[a])}return u.sort(function(t,e){return e[2]-t[2]})}},{\\\"./max_row_length\\\":957}],953:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\");e.exports=function(t,e,r,o,s,l){var c,u,f,h,p=t.cd[0],d=p.trace,g=t.xa,v=t.ya,m=p.x,y=p.y,x=p.z,b=p.xCenter,_=p.yCenter,w=p.zmask,k=[d.zmin,d.zmax],M=d.zhoverformat,A=m,T=y;if(!1!==t.index){try{f=Math.round(t.index[1]),h=Math.round(t.index[0])}catch(e){return void i.error(\\\"Error hovering on heatmap, pointNumber must be [row,col], found:\\\",t.index)}if(f<0||f>=x[0].length||h<0||h>x.length)return}else{if(n.inbox(e-m[0],e-m[m.length-1],0)>0||n.inbox(r-y[0],r-y[y.length-1],0)>0)return;if(l){var S;for(A=[2*m[0]-m[1]],S=1;S<m.length;S++)A.push((m[S]+m[S-1])/2);for(A.push([2*m[m.length-1]-m[m.length-2]]),T=[2*y[0]-y[1]],S=1;S<y.length;S++)T.push((y[S]+y[S-1])/2);T.push([2*y[y.length-1]-y[y.length-2]])}f=Math.max(0,Math.min(A.length-2,i.findBin(e,A))),h=Math.max(0,Math.min(T.length-2,i.findBin(r,T)))}var C=g.c2p(m[f]),E=g.c2p(m[f+1]),L=v.c2p(y[h]),z=v.c2p(y[h+1]);l?(E=C,c=m[f],z=L,u=y[h]):(c=b?b[f]:(m[f]+m[f+1])/2,u=_?_[h]:(y[h]+y[h+1])/2,d.zsmooth&&(C=E=g.c2p(c),L=z=v.c2p(u)));var O,I,P=x[h][f];w&&!w[h][f]&&(P=void 0),Array.isArray(p.text)&&Array.isArray(p.text[h])&&(O=p.text[h][f]);var D={type:\\\"linear\\\",range:k,hoverformat:M,_separators:g._separators,_numFormat:g._numFormat};return I=a.tickText(D,P,\\\"hover\\\").text,[i.extendFlat(t,{index:[h,f],distance:t.maxHoverDistance,spikeDistance:t.maxSpikeDistance,x0:C,x1:E,y0:L,y1:z,xLabelVal:c,yLabelVal:u,zLabelVal:P,zLabel:I,text:O})]}},{\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],954:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.colorbar=t(\\\"./colorbar\\\"),n.style=t(\\\"./style\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"heatmap\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"2dMap\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":946,\\\"./calc\\\":947,\\\"./colorbar\\\":949,\\\"./defaults\\\":951,\\\"./hover\\\":953,\\\"./plot\\\":958,\\\"./style\\\":959}],955:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=[[-1,0],[1,0],[0,-1],[0,1]];function a(t){return.5-.25*Math.min(1,.5*t)}function o(t,e,r){var n,a,o,s,l,c,u,f,h,p,d,g,v,m=0;for(s=0;s<e.length;s++){for(a=(n=e[s])[0],o=n[1],d=t[a][o],p=0,h=0,l=0;l<4;l++)(u=t[a+(c=i[l])[0]])&&void 0!==(f=u[o+c[1]])&&(0===p?g=v=f:(g=Math.min(g,f),v=Math.max(v,f)),h++,p+=f);if(0===h)throw\\\"iterateInterp2d order is wrong: no defined neighbors\\\";t[a][o]=p/h,void 0===d?h<4&&(m=1):(t[a][o]=(1+r)*t[a][o]-r*d,v>g&&(m=Math.max(m,Math.abs(t[a][o]-d)/(v-g))))}return m}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r<e.length&&!(e[r][2]<4);r++);for(e=e.slice(r),r=0;r<100&&i>.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\\\"interp2d didn't converge quickly\\\",i),t}},{\\\"../../lib\\\":696}],956:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r,a,o,s){var l,c,u,f=[],h=n.traceIs(t,\\\"contour\\\"),p=n.traceIs(t,\\\"histogram\\\"),d=n.traceIs(t,\\\"gl2d\\\");if(i(e)&&e.length>1&&!p&&\\\"category\\\"!==s.type){var g=e.length;if(!(g<=o))return h?e.slice(0,o):e.slice(0,o+1);if(h||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],u=1;u<g;u++)f.push(.5*(e[u-1]+e[u]));f.push(1.5*e[g-1]-.5*e[g-2])}if(g<o){var v=f[f.length-1],m=v-f[f.length-2];for(u=g;u<o;u++)v+=m,f.push(v)}}else{c=a||1;var y=t[s._id.charAt(0)+\\\"calendar\\\"];for(l=p||\\\"category\\\"===s.type?s.r2c(r,0,y)||0:i(e)&&1===e.length?e[0]:void 0===r?0:s.d2c(r,0,y),u=h||d?0:-.5;u<o;u++)f.push(l+c*u)}return f}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828}],957:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=0,r=0;r<t.length;r++)e=Math.max(e,t[r].length);return e}},{}],958:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../components/colorscale\\\"),l=t(\\\"../../constants/xmlns_namespaces\\\"),c=t(\\\"./max_row_length\\\");function u(t,e){var r=e.length-2,n=o.constrain(o.findBin(t,e),0,r),i=e[n],a=e[n+1],s=o.constrain(n+(t-i)/(a-i)-.5,0,r),l=Math.round(s),c=Math.abs(s-l);return s&&s!==r&&c?{bin0:l,frac:c,bin1:Math.round(l+c/(s-l))}:{bin0:l,bin1:l,frac:0}}function f(t,e){var r=e.length-1,n=o.constrain(o.findBin(t,e),0,r),i=e[n],a=(t-i)/(e[n+1]-i)||0;return a<=0?{bin0:n,bin1:n,frac:0}:a<.5?{bin0:n,bin1:n+1,frac:a}:{bin0:n+1,bin1:n,frac:1-a}}function h(t,e,r){t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=Math.round(255*r[3])}e.exports=function(t,e,r,p){var d=e.xaxis,g=e.yaxis;o.makeTraceGroups(p,r,\\\"hm\\\").each(function(e){var r,p,v,m,y,x,b=n.select(this),_=e[0],w=_.trace,k=_.z,M=_.x,A=_.y,T=_.xCenter,S=_.yCenter,C=a.traceIs(w,\\\"contour\\\"),E=C?\\\"best\\\":w.zsmooth,L=k.length,z=c(k),O=!1,I=!1;for(x=0;void 0===r&&x<M.length-1;)r=d.c2p(M[x]),x++;for(x=M.length-1;void 0===p&&x>0;)p=d.c2p(M[x]),x--;for(p<r&&(v=p,p=r,r=v,O=!0),x=0;void 0===m&&x<A.length-1;)m=g.c2p(A[x]),x++;for(x=A.length-1;void 0===y&&x>0;)y=g.c2p(A[x]),x--;if(y<m&&(v=m,m=y,y=v,I=!0),C&&(T=M,S=A,M=_.xfill,A=_.yfill),\\\"fast\\\"!==E){var P=\\\"best\\\"===E?0:.5;r=Math.max(-P*d._length,r),p=Math.min((1+P)*d._length,p),m=Math.max(-P*g._length,m),y=Math.min((1+P)*g._length,y)}var D=Math.round(p-r),R=Math.round(y-m);if(D<=0||R<=0){b.selectAll(\\\"image\\\").data([]).exit().remove()}else{var B,F;\\\"fast\\\"===E?(B=z,F=L):(B=D,F=R);var N=document.createElement(\\\"canvas\\\");N.width=B,N.height=F;var j,V,U=N.getContext(\\\"2d\\\"),q=s.makeColorScaleFunc(s.extractScale(w.colorscale,w.zmin,w.zmax),{noNumericCheck:!0,returnArray:!0});\\\"fast\\\"===E?(j=O?function(t){return z-1-t}:o.identity,V=I?function(t){return L-1-t}:o.identity):(j=function(t){return o.constrain(Math.round(d.c2p(M[t])-r),0,D)},V=function(t){return o.constrain(Math.round(g.c2p(A[t])-m),0,R)});var H,G,W,Y,X,Z=V(0),$=[Z,Z],J=O?0:1,K=I?0:1,Q=0,tt=0,et=0,rt=0;if(E){var nt,it=0;try{nt=new Uint8Array(D*R*4)}catch(t){nt=new Array(D*R*4)}if(\\\"best\\\"===E){var at,ot,st,lt=T||M,ct=S||A,ut=new Array(lt.length),ft=new Array(ct.length),ht=new Array(D),pt=T?f:u,dt=S?f:u;for(x=0;x<lt.length;x++)ut[x]=Math.round(d.c2p(lt[x])-r);for(x=0;x<ct.length;x++)ft[x]=Math.round(g.c2p(ct[x])-m);for(x=0;x<D;x++)ht[x]=pt(x,ut);for(G=0;G<R;G++)for(ot=k[(at=dt(G,ft)).bin0],st=k[at.bin1],x=0;x<D;x++,it+=4)h(nt,it,X=At(ot,st,ht[x],at))}else for(G=0;G<L;G++)for(Y=k[G],$=V(G),x=0;x<D;x++)X=Mt(Y[x],1),h(nt,it=4*($*D+j(x)),X);var gt=U.createImageData(D,R);try{gt.data.set(nt)}catch(t){var vt=gt.data,mt=vt.length;for(G=0;G<mt;G++)vt[G]=nt[G]}U.putImageData(gt,0,0)}else{var yt=w.xgap,xt=w.ygap,bt=Math.floor(yt/2),_t=Math.floor(xt/2);for(G=0;G<L;G++)if(Y=k[G],$.reverse(),$[K]=V(G+1),$[0]!==$[1]&&void 0!==$[0]&&void 0!==$[1])for(H=[W=j(0),W],x=0;x<z;x++)H.reverse(),H[J]=j(x+1),H[0]!==H[1]&&void 0!==H[0]&&void 0!==H[1]&&(X=Mt(Y[x],(H[1]-H[0])*($[1]-$[0])),U.fillStyle=\\\"rgba(\\\"+X.join(\\\",\\\")+\\\")\\\",U.fillRect(H[0]+bt,$[0]+_t,H[1]-H[0]-yt,$[1]-$[0]-xt))}tt=Math.round(tt/Q),et=Math.round(et/Q),rt=Math.round(rt/Q);var wt=i(\\\"rgb(\\\"+tt+\\\",\\\"+et+\\\",\\\"+rt+\\\")\\\");t._hmpixcount=(t._hmpixcount||0)+Q,t._hmlumcount=(t._hmlumcount||0)+Q*wt.getLuminance();var kt=b.selectAll(\\\"image\\\").data(e);kt.enter().append(\\\"svg:image\\\").attr({xmlns:l.svg,preserveAspectRatio:\\\"none\\\"}),kt.attr({height:R,width:D,x:r,y:m,\\\"xlink:href\\\":N.toDataURL(\\\"image/png\\\")})}function Mt(t,e){if(void 0!==t){var r=q(t);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),Q+=e,tt+=r[0]*e,et+=r[1]*e,rt+=r[2]*e,r}return[0,0,0,0]}function At(t,e,r,n){var i=t[r.bin0];if(void 0===i)return Mt(void 0,1);var a,o=t[r.bin1],s=e[r.bin0],l=e[r.bin1],c=o-i||0,u=s-i||0;return a=void 0===o?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-o-s)/3:void 0===s?2*(2*l-o-i)/3:l+i-o-s,Mt(i+r.frac*c+n.frac*(u+r.frac*a))}})}},{\\\"../../components/colorscale\\\":585,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./max_row_length\\\":957,d3:148,tinycolor2:514}],959:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\");e.exports=function(t){n.select(t).selectAll(\\\".hm image\\\").style(\\\"opacity\\\",function(t){return t.trace.opacity})}},{d3:148}],960:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){!1===r(\\\"zsmooth\\\")&&(r(\\\"xgap\\\"),r(\\\"ygap\\\")),r(\\\"zhoverformat\\\")}},{}],961:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../registry\\\");function o(t,e){var r=e(t);return\\\"scaled\\\"===(r?e(t+\\\"type\\\",\\\"array\\\"):\\\"scaled\\\")&&(e(t+\\\"0\\\"),e(\\\"d\\\"+t)),r}e.exports=function(t,e,r,s,l,c){var u,f,h=r(\\\"z\\\");if(l=l||\\\"x\\\",c=c||\\\"y\\\",void 0===h||!h.length)return 0;if(i.isArray1D(t.z)){if(u=r(l),f=r(c),!(u&&u.length&&f&&f.length))return 0;e._length=Math.min(u.length,f.length,h.length)}else{if(u=o(l,r),f=o(c,r),!function(t){for(var e,r=!0,a=!1,o=!1,s=0;s<t.length;s++){if(e=t[s],!i.isArrayOrTypedArray(e)){r=!1;break}e.length>0&&(a=!0);for(var l=0;l<e.length;l++)if(n(e[l])){o=!0;break}}return r&&a&&o}(h))return 0;r(\\\"transpose\\\"),e._length=null}return a.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[l,c],s),!0}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"fast-isnumeric\\\":214}],962:[function(t,e,r){\\\"use strict\\\";for(var n=t(\\\"../heatmap/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../lib/extend\\\").extendFlat,s=t(\\\"../../plot_api/edit_types\\\").overrideAll,l=[\\\"z\\\",\\\"x\\\",\\\"x0\\\",\\\"dx\\\",\\\"y\\\",\\\"y0\\\",\\\"dy\\\",\\\"text\\\",\\\"transpose\\\",\\\"xtype\\\",\\\"ytype\\\"],c={},u=0;u<l.length;u++){var f=l[u];c[f]=n[f]}o(c,i(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1}),{colorbar:a}),e.exports=s(c,\\\"calc\\\",\\\"nested\\\")},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../heatmap/attributes\\\":946}],963:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-heatmap2d\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../lib/str2rgbarray\\\");function o(t,e){this.scene=t,this.uid=e,this.type=\\\"heatmapgl\\\",this.name=\\\"\\\",this.hoverinfo=\\\"all\\\",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=n(t.glplot,this.options),this.heatmap._trace=this}var s=o.prototype;s.handlePick=function(t){var e=this.options,r=e.shape,n=t.pointId,i=n%r[0],a=Math.floor(n/r[0]),o=n;return{trace:this,dataCoord:t.dataCoord,traceCoord:[e.x[i],e.y[a],e.z[o]],textLabel:this.textLabels[n],name:this.name,pointIndex:[a,i],hoverinfo:this.hoverinfo}},s.update=function(t,e){var r=e[0];this.index=t.index,this.name=t.name,this.hoverinfo=t.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var o=n[0].length,s=n.length;this.options.shape=[o,s],this.options.x=r.x,this.options.y=r.y;var l=function(t){for(var e=t.colorscale,r=t.zmin,n=t.zmax,i=e.length,o=new Array(i),s=new Array(4*i),l=0;l<i;l++){var c=e[l],u=a(c[1]);o[l]=r+c[0]*(n-r);for(var f=0;f<4;f++)s[4*l+f]=u[f]}return{colorLevels:o,colorValues:s}}(t);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],t.text),this.heatmap.update(this.options);var c=this.scene.xaxis,u=this.scene.yaxis;t._extremes[c._id]=i.findExtremes(c,r.x),t._extremes[u._id]=i.findExtremes(u,r.y)},s.dispose=function(){this.heatmap.dispose()},e.exports=function(t,e,r){var n=new o(t,e.uid);return n.update(e,r),n}},{\\\"../../lib/str2rgbarray\\\":720,\\\"../../plots/cartesian/axes\\\":745,\\\"gl-heatmap2d\\\":241}],964:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"../heatmap/defaults\\\"),n.colorbar=t(\\\"../heatmap/colorbar\\\"),n.calc=t(\\\"../heatmap/calc\\\"),n.plot=t(\\\"./convert\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"heatmapgl\\\",n.basePlotModule=t(\\\"../../plots/gl2d\\\"),n.categories=[\\\"gl\\\",\\\"gl2d\\\",\\\"2dMap\\\"],n.meta={},e.exports=n},{\\\"../../plots/gl2d\\\":785,\\\"../heatmap/calc\\\":947,\\\"../heatmap/colorbar\\\":949,\\\"../heatmap/defaults\\\":951,\\\"./attributes\\\":962,\\\"./convert\\\":963}],965:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../bar/attributes\\\"),i=t(\\\"./bin_attributes\\\");e.exports={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},text:n.text,orientation:n.orientation,histfunc:{valType:\\\"enumerated\\\",values:[\\\"count\\\",\\\"sum\\\",\\\"avg\\\",\\\"min\\\",\\\"max\\\"],dflt:\\\"count\\\",editType:\\\"calc\\\"},histnorm:{valType:\\\"enumerated\\\",values:[\\\"\\\",\\\"percent\\\",\\\"probability\\\",\\\"density\\\",\\\"probability density\\\"],dflt:\\\"\\\",editType:\\\"calc\\\"},cumulative:{enabled:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},direction:{valType:\\\"enumerated\\\",values:[\\\"increasing\\\",\\\"decreasing\\\"],dflt:\\\"increasing\\\",editType:\\\"calc\\\"},currentbin:{valType:\\\"enumerated\\\",values:[\\\"include\\\",\\\"exclude\\\",\\\"half\\\"],dflt:\\\"include\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"},nbinsx:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},xbins:i(\\\"x\\\",!0),nbinsy:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},ybins:i(\\\"y\\\",!0),autobinx:{valType:\\\"boolean\\\",dflt:null,editType:\\\"calc\\\"},autobiny:{valType:\\\"boolean\\\",dflt:null,editType:\\\"calc\\\",impliedEdits:{\\\"ybins.start\\\":void 0,\\\"ybins.end\\\":void 0,\\\"ybins.size\\\":void 0}},marker:n.marker,selected:n.selected,unselected:n.unselected,_deprecated:{bardir:n._deprecated.bardir}}},{\\\"../bar/attributes\\\":838,\\\"./bin_attributes\\\":967}],966:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r=t.length,n=0,i=0;i<r;i++)e[i]?(t[i]/=e[i],n+=t[i]):t[i]=null;return n}},{}],967:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return{start:{valType:\\\"any\\\",editType:\\\"calc\\\"},end:{valType:\\\"any\\\",editType:\\\"calc\\\"},size:{valType:\\\"any\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"}}},{}],968:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\");e.exports={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,i){var a=i[e];return n(a)?(a=Number(a),r[t]+=a,a):0},avg:function(t,e,r,i,a){var o=i[e];return n(o)&&(o=Number(o),r[t]+=o,a[t]++),0},min:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]>a){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]<a){var o=a-r[t];return r[t]=a,o}}return 0}}},{\\\"fast-isnumeric\\\":214}],969:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../constants/numerical\\\"),i=n.ONEAVGYEAR,a=n.ONEAVGMONTH,o=n.ONEDAY,s=n.ONEHOUR,l=n.ONEMIN,c=n.ONESEC,u=t(\\\"../../plots/cartesian/axes\\\").tickIncrement;function f(t,e,r,n){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),a=\\\"date\\\"===r.type,o=h(i,a),s=0;s<10;s++){var l=h(80*o,a);if(o===l)break;if(!p(l,t,e,a,r,n))break;o=l}return o}function h(t,e){return e&&t>c?t>o?t>1.1*i?i:t>1.1*a?a:o:t>s?s:t>l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,a,s){if(n&&t>o){var l=d(e,a,s),c=d(r,a,s),u=t===i?0:1;return l[u]!==c[u]}return Math.floor(r/t)-Math.floor(e/t)>.1}function d(t,e,r){var n=e.c2d(t,i,r).split(\\\"-\\\");return\\\"\\\"===n[0]&&(n.unshift(),n[0]=\\\"-\\\"+n[0]),n}e.exports=function(t,e,r,n,a){var s,l,c=-1.1*e,h=-.1*e,p=t-h,d=r[0],g=r[1],v=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),m=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(v>m&&m<Math.abs(g-d)/4e3?(s=v,l=!1):(s=Math.min(v,m),l=!0),\\\"date\\\"===n.type&&s>o){var y=s===i?1:6,x=s===i?\\\"M12\\\":\\\"M1\\\";return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf(\\\"-\\\",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,a);if(c<e){var f=u(c,x,!1,a);(c+f)/2<e+t&&(c=f)}return r&&l?u(c,x,!0,a):c}}return function(e,r){var n=s*Math.round(e/s);return n+s/10<e&&n+.9*s<e+t&&(n+=s),r&&l&&(n-=s),n}}},{\\\"../../constants/numerical\\\":673,\\\"../../plots/cartesian/axes\\\":745}],970:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../bar/arrays_to_calcdata\\\"),s=t(\\\"./bin_functions\\\"),l=t(\\\"./norm_functions\\\"),c=t(\\\"./average\\\"),u=t(\\\"./bin_label_vals\\\");function f(t,e,r,o,s){var l,c,u,h,p,d,g,v=o+\\\"bins\\\",m=t._fullLayout,y=\\\"overlay\\\"===m.barmode,x=\\\"date\\\"===r.type?function(t){return t||0===t?i.cleanDate(t,null,r.calendar):null}:function(t){return n(t)?Number(t):null};function b(t,e,r){e[t+\\\"Found\\\"]?(e[t]=x(e[t]),null===e[t]&&(e[t]=r[t])):(d[t]=e[t]=r[t],i.nestedProperty(c[0],v+\\\".\\\"+t).set(r[t]))}var _=m._histogramBinOpts[e._groupName];if(e._autoBinFinished)delete e._autoBinFinished;else{c=_.traces;var w=_.sizeFound,k=[];d=c[0]._autoBin={};var M=!0;for(l=0;l<c.length;l++)p=(u=c[l])._pos0=r.makeCalcdata(u,o),k=k.concat(p),delete u._autoBinFinished,!0===e.visible&&(M?M=!1:(delete u._autoBin,u._autoBinFinished=1));h=c[0][o+\\\"calendar\\\"];var A=a.autoBin(k,r,_.nbins,!1,h,w&&_.size);if(y&&0===A._dataSpan&&\\\"category\\\"!==r.type){if(s)return[A,p,!0];A=function(t,e,r,n,a){var o,s,l=function(t,e){for(var r=e.xaxis,n=e.yaxis,i=e.orientation,a=[],o=t._fullData,s=0;s<o.length;s++){var l=o[s];\\\"histogram\\\"===l.type&&!0===l.visible&&l.orientation===i&&l.xaxis===r&&l.yaxis===n&&a.push(l)}return a}(t,e),c=!1,u=1/0,h=[e];for(o=0;o<l.length;o++)if((s=l[o])===e)c=!0;else if(c){var p=f(t,s,r,n,!0),d=p[0],g=p[2];s._autoBinFinished=1,s._pos0=p[1],g?h.push(s):u=Math.min(u,d.size)}else u=Math.min(u,s[a].size);var v=new Array(h.length);for(o=0;o<h.length;o++)for(var m=h[o]._pos0,y=0;y<m.length;y++)if(void 0!==m[y]){v[o]=m[y];break}isFinite(u)||(u=i.distinctVals(v).minDiff);for(o=0;o<h.length;o++){var x=(s=h[o])[n+\\\"calendar\\\"];s._input[a]=s[a]={start:r.c2r(v[o]-u/2,0,x),end:r.c2r(v[o]+u/2,0,x),size:u}}return e[a]}(t,e,r,o,v)}(g=u.cumulative).enabled&&\\\"include\\\"!==g.currentbin&&(\\\"decreasing\\\"===g.direction?A.start=r.c2r(a.tickIncrement(r.r2c(A.start,0,h),A.size,!0,h)):A.end=r.c2r(a.tickIncrement(r.r2c(A.end,0,h),A.size,!1,h))),_.size=A.size,w||(d.size=A.size,i.nestedProperty(c[0],v+\\\".size\\\").set(A.size)),b(\\\"start\\\",_,A),b(\\\"end\\\",_,A)}p=e._pos0,delete e._pos0;var T=e._input[v]||{},S=i.extendFlat({},_),C=_.start,E=r.r2l(T.start),L=void 0!==E;if((_.startFound||L)&&E!==r.r2l(C)){var z=L?E:i.aggNums(Math.min,null,p),O={type:\\\"category\\\"===r.type?\\\"linear\\\":r.type,r2l:r.r2l,dtick:_.size,tick0:C,calendar:h,range:[z,a.tickIncrement(z,_.size,!1,h)].map(r.l2r)},I=a.tickFirst(O);I>r.r2l(z)&&(I=a.tickIncrement(I,_.size,!0,h)),S.start=r.l2r(I),L||i.nestedProperty(e,v+\\\".start\\\").set(S.start)}var P=_.end,D=r.r2l(T.end),R=void 0!==D;if((_.endFound||R)&&D!==r.r2l(P)){var B=R?D:i.aggNums(Math.max,null,p);S.end=r.l2r(B),R||i.nestedProperty(e,v+\\\".start\\\").set(S.end)}var F=\\\"autobin\\\"+o;return!1===e._input[F]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[F],delete e[F]),[S,p]}e.exports=function(t,e){if(!0===e.visible){var r,h,p,d,g=[],v=[],m=a.getFromId(t,\\\"h\\\"===e.orientation?e.yaxis||\\\"y\\\":e.xaxis||\\\"x\\\"),y=\\\"h\\\"===e.orientation?\\\"y\\\":\\\"x\\\",x={x:\\\"y\\\",y:\\\"x\\\"}[y],b=e[y+\\\"calendar\\\"],_=e.cumulative,w=f(t,e,m,y),k=w[0],M=w[1],A=\\\"string\\\"==typeof k.size,T=[],S=A?T:k,C=[],E=[],L=[],z=0,O=e.histnorm,I=e.histfunc,P=-1!==O.indexOf(\\\"density\\\");_.enabled&&P&&(O=O.replace(/ ?density$/,\\\"\\\"),P=!1);var D,R=\\\"max\\\"===I||\\\"min\\\"===I?null:0,B=s.count,F=l[O],N=!1,j=function(t){return m.r2c(t,0,b)};for(i.isArrayOrTypedArray(e[x])&&\\\"count\\\"!==I&&(D=e[x],N=\\\"avg\\\"===I,B=s[I]),r=j(k.start),p=j(k.end)+(r-a.tickIncrement(r,k.size,!1,b))/1e6;r<p&&g.length<1e6&&(h=a.tickIncrement(r,k.size,!1,b),g.push((r+h)/2),v.push(R),L.push([]),T.push(r),P&&C.push(1/(h-r)),N&&E.push(0),!(h<=r));)r=h;T.push(r),A||\\\"date\\\"!==m.type||(S={start:j(S.start),end:j(S.end),size:S.size});var V,U=v.length,q=!0,H=1/0,G=1/0,W={};for(r=0;r<M.length;r++){var Y=M[r];(d=i.findBin(Y,S))>=0&&d<U&&(z+=B(d,r,v,D,E),q&&L[d].length&&Y!==M[L[d][0]]&&(q=!1),L[d].push(r),W[r]=d,H=Math.min(H,Y-T[d]),G=Math.min(G,T[d+1]-Y))}q||(V=u(H,G,T,m,b)),N&&(z=c(v,E)),F&&F(v,z,C),_.enabled&&function(t,e,r){var n,i,a;function o(e){a=t[e],t[e]/=2}function s(e){i=t[e],t[e]=a+i/2,a+=i}if(\\\"half\\\"===r)if(\\\"increasing\\\"===e)for(o(0),n=1;n<t.length;n++)s(n);else for(o(t.length-1),n=t.length-2;n>=0;n--)s(n);else if(\\\"increasing\\\"===e){for(n=1;n<t.length;n++)t[n]+=t[n-1];\\\"exclude\\\"===r&&(t.unshift(0),t.pop())}else{for(n=t.length-2;n>=0;n--)t[n]+=t[n+1];\\\"exclude\\\"===r&&(t.push(0),t.shift())}}(v,_.direction,_.currentbin);var X=Math.min(g.length,v.length),Z=[],$=0,J=X-1;for(r=0;r<X;r++)if(v[r]){$=r;break}for(r=X-1;r>=$;r--)if(v[r]){J=r;break}for(r=$;r<=J;r++)if(n(g[r])&&n(v[r])){var K={p:g[r],s:v[r],b:0};_.enabled||(K.pts=L[r],q?K.ph0=K.ph1=L[r].length?M[L[r][0]]:g[r]:(K.ph0=V(T[r]),K.ph1=V(T[r+1],!0))),Z.push(K)}return 1===Z.length&&(Z[0].width1=a.tickIncrement(Z[0].p,k.size,!1,b)-Z[0].p),o(Z,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Z,e,W),Z}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../bar/arrays_to_calcdata\\\":837,\\\"./average\\\":966,\\\"./bin_functions\\\":968,\\\"./bin_label_vals\\\":969,\\\"./norm_functions\\\":976,\\\"fast-isnumeric\\\":214}],971:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=n.nestedProperty,a=t(\\\"./attributes\\\"),o={x:[{aStr:\\\"xbins.start\\\",name:\\\"start\\\"},{aStr:\\\"xbins.end\\\",name:\\\"end\\\"},{aStr:\\\"xbins.size\\\",name:\\\"size\\\"},{aStr:\\\"nbinsx\\\",name:\\\"nbins\\\"}],y:[{aStr:\\\"ybins.start\\\",name:\\\"start\\\"},{aStr:\\\"ybins.end\\\",name:\\\"end\\\"},{aStr:\\\"ybins.size\\\",name:\\\"size\\\"},{aStr:\\\"nbinsy\\\",name:\\\"nbins\\\"}]};e.exports=function(t,e){var r,s,l,c,u,f,h,p=e._histogramBinOpts={},d=\\\"overlay\\\"===e.barmode;function g(t){return n.coerce(l._input,l,a,t)}for(r=0;r<t.length;r++)\\\"histogram\\\"===(l=t[r]).type&&(delete l._autoBinFinished,u=\\\"v\\\"===l.orientation?\\\"x\\\":\\\"y\\\",f=d?l.uid:l.xaxis+l.yaxis+u,l._groupName=f,(h=p[f])?h.traces.push(l):h=p[f]={traces:[l],direction:u});for(f in p){u=(h=p[f]).direction;var v=o[u];for(s=0;s<v.length;s++){var m=v[s],y=m.name;if(\\\"nbins\\\"!==y||!h.sizeFound){var x=m.aStr;for(r=0;r<h.traces.length;r++){if(c=(l=h.traces[r])._input,void 0!==i(c,x).get()){h[y]=g(x),h[y+\\\"Found\\\"]=!0;break}var b=l._autoBin;b&&b[y]&&i(l,x).set(b[y])}if(\\\"start\\\"===y||\\\"end\\\"===y)for(;r<h.traces.length;r++)g(x,((l=h.traces[r])._autoBin||{})[y]);\\\"nbins\\\"!==y||h.sizeFound||h.nbinsFound||(l=h.traces[0],h[y]=g(x))}}}}},{\\\"../../lib\\\":696,\\\"./attributes\\\":965}],972:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../bar/style_defaults\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){function c(r,n){return i.coerce(t,e,s,r,n)}var u=c(\\\"x\\\"),f=c(\\\"y\\\");c(\\\"cumulative.enabled\\\")&&(c(\\\"cumulative.direction\\\"),c(\\\"cumulative.currentbin\\\")),c(\\\"text\\\");var h=c(\\\"orientation\\\",f&&!u?\\\"h\\\":\\\"v\\\"),p=\\\"v\\\"===h?\\\"x\\\":\\\"y\\\",d=\\\"v\\\"===h?\\\"y\\\":\\\"x\\\",g=u&&f?Math.min(u.length&&f.length):(e[p]||[]).length;if(g){e._length=g,n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\"],l),e[d]&&c(\\\"histfunc\\\"),c(\\\"histnorm\\\"),c(\\\"autobin\\\"+p),o(t,e,c,r,l);var v=n.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");v(t,e,a.defaultLine,{axis:\\\"y\\\"}),v(t,e,a.defaultLine,{axis:\\\"x\\\",inherit:\\\"y\\\"}),i.coerceSelectionMarkerOpacity(e,c)}else e.visible=!1}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../bar/style_defaults\\\":851,\\\"./attributes\\\":965}],973:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){if(t.x=\\\"xVal\\\"in e?e.xVal:e.x,t.y=\\\"yVal\\\"in e?e.yVal:e.y,e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),!(r.cumulative||{}).enabled){var a,o=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;if(t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,r._indexToPoints){a=[];for(var s=0;s<o.length;s++)a=a.concat(r._indexToPoints[o[s]])}else a=o;t.pointIndices=a}return t}},{}],974:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../bar/hover\\\").hoverPoints,i=t(\\\"../../plots/cartesian/axes\\\").hoverLabelText;e.exports=function(t,e,r,a){var o=n(t,e,r,a);if(o){var s=(t=o[0]).cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var c=\\\"h\\\"===l.orientation?\\\"y\\\":\\\"x\\\";t[c+\\\"Label\\\"]=i(t[c+\\\"a\\\"],s.ph0,s.ph1)}return o}}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../bar/hover\\\":843}],975:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.layoutAttributes=t(\\\"../bar/layout_attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.crossTraceDefaults=t(\\\"./cross_trace_defaults\\\"),n.supplyLayoutDefaults=t(\\\"../bar/layout_defaults\\\"),n.calc=t(\\\"./calc\\\"),n.crossTraceCalc=t(\\\"../bar/cross_trace_calc\\\").crossTraceCalc,n.plot=t(\\\"../bar/plot\\\"),n.layerName=\\\"barlayer\\\",n.style=t(\\\"../bar/style\\\").style,n.styleOnSelect=t(\\\"../bar/style\\\").styleOnSelect,n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.selectPoints=t(\\\"../bar/select\\\"),n.eventData=t(\\\"./event_data\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"histogram\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"bar\\\",\\\"histogram\\\",\\\"oriented\\\",\\\"errorBarsOK\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../bar/cross_trace_calc\\\":840,\\\"../bar/layout_attributes\\\":845,\\\"../bar/layout_defaults\\\":846,\\\"../bar/plot\\\":847,\\\"../bar/select\\\":848,\\\"../bar/style\\\":850,\\\"../scatter/marker_colorbar\\\":1062,\\\"./attributes\\\":965,\\\"./calc\\\":970,\\\"./cross_trace_defaults\\\":971,\\\"./defaults\\\":972,\\\"./event_data\\\":973,\\\"./hover\\\":974}],976:[function(t,e,r){\\\"use strict\\\";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;i<r;i++)t[i]*=n},probability:function(t,e){for(var r=t.length,n=0;n<r;n++)t[n]/=e},density:function(t,e,r,n){var i=t.length;n=n||1;for(var a=0;a<i;a++)t[a]*=r[a]*n},\\\"probability density\\\":function(t,e,r,n){var i=t.length;n&&(e/=n);for(var a=0;a<i;a++)t[a]*=r[a]/e}}},{}],977:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../histogram/attributes\\\"),i=t(\\\"../histogram/bin_attributes\\\"),a=t(\\\"../heatmap/attributes\\\"),o=t(\\\"../../components/colorscale/attributes\\\"),s=t(\\\"../../components/colorbar/attributes\\\"),l=t(\\\"../../lib/extend\\\").extendFlat;e.exports=l({x:n.x,y:n.y,z:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},marker:{color:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"},histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:i(\\\"x\\\"),nbinsy:n.nbinsy,ybins:i(\\\"y\\\"),autobinx:n.autobinx,autobiny:n.autobiny,xgap:a.xgap,ygap:a.ygap,zsmooth:a.zsmooth,zhoverformat:a.zhoverformat},o(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1}),{colorbar:s})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../heatmap/attributes\\\":946,\\\"../histogram/attributes\\\":965,\\\"../histogram/bin_attributes\\\":967}],978:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../histogram/bin_functions\\\"),o=t(\\\"../histogram/norm_functions\\\"),s=t(\\\"../histogram/average\\\"),l=t(\\\"../histogram/bin_label_vals\\\");function c(t,e,r,a,o,s,l){var c=e+\\\"bins\\\",u=t[c];u||(u=t[c]={});var f=t._input[c]||{},h=t._autoBin={};f.size||delete u.size,void 0===f.start&&delete u.start,void 0===f.end&&delete u.end;var p=!u.size,d=void 0===u.start,g=void 0===u.end;if(p||d||g){var v=i.autoBin(r,a,t[\\\"nbins\\\"+e],\\\"2d\\\",l,u.size);\\\"histogram2dcontour\\\"===t.type&&(d&&(v.start=s(i.tickIncrement(o(v.start),v.size,!0,l))),g&&(v.end=s(i.tickIncrement(o(v.end),v.size,!1,l)))),p&&(u.size=h.size=v.size),d&&(u.start=h.start=v.start),g&&(u.end=h.end=v.end)}var m=\\\"autobin\\\"+e;!1===t._input[m]&&(t._input[c]=n.extendFlat({},u),delete t._input[m],delete t[m])}function u(t,e,r,n){var i,a=new Array(t);if(n)for(i=0;i<t;i++)a[i]=1/(e[i+1]-e[i]);else{var o=1/r;for(i=0;i<t;i++)a[i]=o}return a}function f(t,e){return{start:t(e.start),end:t(e.end),size:e.size}}function h(t,e,r,n,i,a){var o,s=t.length-1,c=new Array(s);if(e)for(o=0;o<s;o++)c[o]=[e[o],e[o]];else{var u=l(r,n,t,i,a);for(o=0;o<s;o++)c[o]=[u(t[o]),u(t[o+1],!0)]}return c}e.exports=function(t,e){var r,l,p,d,g=i.getFromId(t,e.xaxis||\\\"x\\\"),v=e.x?g.makeCalcdata(e,\\\"x\\\"):[],m=i.getFromId(t,e.yaxis||\\\"y\\\"),y=e.y?m.makeCalcdata(e,\\\"y\\\"):[],x=e.xcalendar,b=e.ycalendar,_=function(t){return g.r2c(t,0,x)},w=function(t){return m.r2c(t,0,b)},k=function(t){return g.c2r(t,0,x)},M=function(t){return m.c2r(t,0,b)},A=e._length;v.length>A&&v.splice(A,v.length-A),y.length>A&&y.splice(A,y.length-A),c(e,\\\"x\\\",v,g,_,k,x),c(e,\\\"y\\\",y,m,w,M,b);var T=[],S=[],C=[],E=\\\"string\\\"==typeof e.xbins.size,L=\\\"string\\\"==typeof e.ybins.size,z=[],O=[],I=E?z:e.xbins,P=L?O:e.ybins,D=0,R=[],B=[],F=e.histnorm,N=e.histfunc,j=-1!==F.indexOf(\\\"density\\\"),V=\\\"max\\\"===N||\\\"min\\\"===N?null:0,U=a.count,q=o[F],H=!1,G=[],W=[],Y=\\\"z\\\"in e?e.z:\\\"marker\\\"in e&&Array.isArray(e.marker.color)?e.marker.color:\\\"\\\";Y&&\\\"count\\\"!==N&&(H=\\\"avg\\\"===N,U=a[N]);var X=e.xbins,Z=_(X.start),$=_(X.end)+(Z-i.tickIncrement(Z,X.size,!1,x))/1e6;for(r=Z;r<$;r=i.tickIncrement(r,X.size,!1,x))S.push(V),z.push(r),H&&C.push(0);z.push(r);var J=S.length,K=_(e.xbins.start),Q=(r-K)/J,tt=k(K+Q/2);for(Z=w((X=e.ybins).start),$=w(X.end)+(Z-i.tickIncrement(Z,X.size,!1,b))/1e6,r=Z;r<$;r=i.tickIncrement(r,X.size,!1,b)){T.push(S.slice()),O.push(r);var et=new Array(J);for(l=0;l<J;l++)et[l]=[];B.push(et),H&&R.push(C.slice())}O.push(r);var rt=T.length,nt=w(e.ybins.start),it=(r-nt)/rt,at=M(nt+it/2);j&&(G=u(S.length,I,Q,E),W=u(T.length,P,it,L)),E||\\\"date\\\"!==g.type||(I=f(_,I)),L||\\\"date\\\"!==m.type||(P=f(w,P));var ot=!0,st=!0,lt=new Array(J),ct=new Array(rt),ut=1/0,ft=1/0,ht=1/0,pt=1/0;for(r=0;r<A;r++){var dt=v[r],gt=y[r];p=n.findBin(dt,I),d=n.findBin(gt,P),p>=0&&p<J&&d>=0&&d<rt&&(D+=U(p,r,T[d],Y,R[d]),B[d][p].push(r),ot&&(void 0===lt[p]?lt[p]=dt:lt[p]!==dt&&(ot=!1)),st&&(void 0===ct[p]?ct[p]=gt:ct[p]!==gt&&(st=!1)),ut=Math.min(ut,dt-z[p]),ft=Math.min(ft,z[p+1]-dt),ht=Math.min(ht,gt-O[d]),pt=Math.min(pt,O[d+1]-gt))}if(H)for(d=0;d<rt;d++)D+=s(T[d],R[d]);if(q)for(d=0;d<rt;d++)q(T[d],D,G,W[d]);return{x:v,xRanges:h(z,ot&&lt,ut,ft,g,x),x0:tt,dx:Q,y:y,yRanges:h(O,st&&ct,ht,pt,m,b),y0:at,dy:it,z:T,pts:B}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../histogram/average\\\":966,\\\"../histogram/bin_functions\\\":968,\\\"../histogram/bin_label_vals\\\":969,\\\"../histogram/norm_functions\\\":976}],979:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM,a=t(\\\"../../plots/cartesian/axis_ids\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"./attributes\\\"),l=[\\\"x\\\",\\\"y\\\"];function c(t,e,r,s){var l=r[a.id2name(t[e+\\\"axis\\\"])].type,c=e+\\\"bins\\\",u=t[c],f=t[e+\\\"calendar\\\"];u||(u=t[c]={});var h=\\\"date\\\"===l?function(t,e){return t||0===t?o.cleanDate(t,i,f):e}:function(t,e){return n(t)?Number(t):e};u.start=h(u.start,s.start),u.end=h(u.end,s.end);var p=s.size,d=u.size;if(n(d))u.size=d>0?Number(d):p;else if(\\\"string\\\"!=typeof d)u.size=p;else{var g=d.charAt(0),v=d.substr(1);((v=n(v)?Number(v):0)<=0||\\\"date\\\"!==l||\\\"M\\\"!==g||v!==Math.round(v))&&(u.size=p)}}e.exports=function(t,e){var r,n,i,a;function u(t){return o.coerce(i._input,i,s,t)}for(r=0;r<t.length;r++){var f=(i=t[r]).type;if(\\\"histogram2d\\\"===f||\\\"histogram2dcontour\\\"===f)for(n=0;n<l.length;n++){var h=(a=l[n])+\\\"bins\\\",p=(i._autoBin||{})[a]||{};u(h+\\\".start\\\",p.start),u(h+\\\".end\\\",p.end),u(h+\\\".size\\\",p.size),c(i,a,e,p),(i[h]||{}).size||u(\\\"nbins\\\"+a)}}}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"./attributes\\\":977,\\\"fast-isnumeric\\\":214}],980:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./sample_defaults\\\"),a=t(\\\"../heatmap/style_defaults\\\"),o=t(\\\"../../components/colorscale/defaults\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&&(a(t,e,c,l),o(t,e,l,c,{prefix:\\\"\\\",cLetter:\\\"z\\\"}))}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"../heatmap/style_defaults\\\":960,\\\"./attributes\\\":977,\\\"./sample_defaults\\\":983}],981:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../heatmap/hover\\\"),i=t(\\\"../../plots/cartesian/axes\\\").hoverLabelText;e.exports=function(t,e,r,a,o,s){var l=n(t,e,r,a,o,s);if(l){var c=(t=l[0]).index,u=c[0],f=c[1],h=t.cd[0],p=h.xRanges[f],d=h.yRanges[u];return t.xLabel=i(t.xa,p[0],p[1]),t.yLabel=i(t.ya,d[0],d[1]),l}}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../heatmap/hover\\\":953}],982:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.crossTraceDefaults=t(\\\"./cross_trace_defaults\\\"),n.calc=t(\\\"../heatmap/calc\\\"),n.plot=t(\\\"../heatmap/plot\\\"),n.layerName=\\\"heatmaplayer\\\",n.colorbar=t(\\\"../heatmap/colorbar\\\"),n.style=t(\\\"../heatmap/style\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.eventData=t(\\\"../histogram/event_data\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"histogram2d\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"2dMap\\\",\\\"histogram\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../heatmap/calc\\\":947,\\\"../heatmap/colorbar\\\":949,\\\"../heatmap/plot\\\":958,\\\"../heatmap/style\\\":959,\\\"../histogram/event_data\\\":973,\\\"./attributes\\\":977,\\\"./cross_trace_defaults\\\":979,\\\"./defaults\\\":980,\\\"./hover\\\":981}],983:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\");e.exports=function(t,e,r,i){var a=r(\\\"x\\\"),o=r(\\\"y\\\");a&&a.length&&o&&o.length?(e._length=Math.min(a.length,o.length),n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\"],i),(r(\\\"z\\\")||r(\\\"marker.color\\\"))&&r(\\\"histfunc\\\"),r(\\\"histnorm\\\"),r(\\\"autobinx\\\"),r(\\\"autobiny\\\")):e.visible=!1}},{\\\"../../registry\\\":828}],984:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../histogram2d/attributes\\\"),i=t(\\\"../contour/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/colorbar/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat;e.exports=s({x:n.x,y:n.y,z:n.z,marker:n.marker,histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:n.xbins,nbinsy:n.nbinsy,ybins:n.ybins,autobinx:n.autobinx,autobiny:n.autobiny,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:i.line,zhoverformat:n.zhoverformat},a(\\\"\\\",{cLetter:\\\"z\\\",editTypeOverride:\\\"calc\\\"}),{colorbar:o})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../contour/attributes\\\":917,\\\"../histogram2d/attributes\\\":977}],985:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../histogram2d/sample_defaults\\\"),a=t(\\\"../contour/contours_defaults\\\"),o=t(\\\"../contour/style_defaults\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&&(a(t,e,c,function(r){return n.coerce2(t,e,s,r)}),o(t,e,c,l))}},{\\\"../../lib\\\":696,\\\"../contour/contours_defaults\\\":924,\\\"../contour/style_defaults\\\":938,\\\"../histogram2d/sample_defaults\\\":983,\\\"./attributes\\\":984}],986:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.crossTraceDefaults=t(\\\"../histogram2d/cross_trace_defaults\\\"),n.calc=t(\\\"../contour/calc\\\"),n.plot=t(\\\"../contour/plot\\\").plot,n.layerName=\\\"contourlayer\\\",n.style=t(\\\"../contour/style\\\"),n.colorbar=t(\\\"../contour/colorbar\\\"),n.hoverPoints=t(\\\"../contour/hover\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"histogram2dcontour\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"2dMap\\\",\\\"contour\\\",\\\"histogram\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../contour/calc\\\":918,\\\"../contour/colorbar\\\":920,\\\"../contour/hover\\\":930,\\\"../contour/plot\\\":935,\\\"../contour/style\\\":937,\\\"../histogram2d/cross_trace_defaults\\\":979,\\\"./attributes\\\":984,\\\"./defaults\\\":985}],987:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../surface/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat;e.exports=s({x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},z:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},i:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},j:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},k:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"calc\\\"},delaunayaxis:{valType:\\\"enumerated\\\",values:[\\\"x\\\",\\\"y\\\",\\\"z\\\"],dflt:\\\"z\\\",editType:\\\"calc\\\"},alphahull:{valType:\\\"number\\\",dflt:-1,editType:\\\"calc\\\"},intensity:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},color:{valType:\\\"color\\\",editType:\\\"calc\\\"},vertexcolor:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},facecolor:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},transforms:void 0},n(\\\"\\\",{colorAttr:\\\"`intensity`\\\",showScaleDflt:!0,editTypeOverride:\\\"calc\\\"}),{colorbar:i,opacity:a.opacity,flatshading:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},contour:{show:s({},a.contours.x.show,{}),color:a.contours.x.color,width:a.contours.x.width,editType:\\\"calc\\\"},lightposition:{x:s({},a.lightposition.x,{dflt:1e5}),y:s({},a.lightposition.y,{dflt:1e5}),z:s({},a.lightposition.z,{dflt:0}),editType:\\\"calc\\\"},lighting:s({vertexnormalsepsilon:{valType:\\\"number\\\",min:0,max:1,dflt:1e-12,editType:\\\"calc\\\"},facenormalsepsilon:{valType:\\\"number\\\",min:0,max:1,dflt:1e-6,editType:\\\"calc\\\"},editType:\\\"calc\\\"},a.lighting),hoverinfo:s({},o.hoverinfo,{editType:\\\"calc\\\"})})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../surface/attributes\\\":1131}],988:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\");e.exports=function(t,e){e.intensity&&n(e,e.intensity,\\\"\\\",\\\"c\\\")}},{\\\"../../components/colorscale/calc\\\":578}],989:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-mesh3d\\\"),i=t(\\\"delaunay-triangulate\\\"),a=t(\\\"alpha-shape\\\"),o=t(\\\"convex-hull\\\"),s=t(\\\"../../lib/gl_format_color\\\").parseColorScale,l=t(\\\"../../lib/str2rgbarray\\\"),c=t(\\\"../../plots/gl3d/zip3\\\");function u(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\\\"\\\",this.color=\\\"#fff\\\",this.data=null,this.showContour=!1}var f=u.prototype;function h(t){return t.map(l)}f.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map(function(e){return t.d2l(e,0,n)*r})}this.data=t;var u,f=c(n(r.xaxis,t.x,e.dataScale[0],t.xcalendar),n(r.yaxis,t.y,e.dataScale[1],t.ycalendar),n(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k)u=c(t.i,t.j,t.k);else if(0===t.alphahull)u=o(f);else if(t.alphahull>0)u=a(t.alphahull,f);else{var p=[\\\"x\\\",\\\"y\\\",\\\"z\\\"].indexOf(t.delaunayaxis);u=i(f.map(function(t){return[t[(p+1)%3],t[(p+2)%3]]}))}var d={positions:f,cells:u,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:l(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color=\\\"#fff\\\",d.vertexIntensity=t.intensity,d.vertexIntensityBounds=[t.cmin,t.cmax],d.colormap=s(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolor[0],d.vertexColors=h(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],d.cellColors=h(t.facecolor)):(this.color=t.color,d.meshColor=l(t.color)),this.mesh.update(d)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new u(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{\\\"../../lib/gl_format_color\\\":692,\\\"../../lib/str2rgbarray\\\":720,\\\"../../plots/gl3d/zip3\\\":799,\\\"alpha-shape\\\":52,\\\"convex-hull\\\":118,\\\"delaunay-triangulate\\\":150,\\\"gl-mesh3d\\\":268}],990:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"./attributes\\\");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function c(t){var e=t.map(function(t){var e=l(t);return e&&i.isArrayOrTypedArray(e)?e:null});return e.every(function(t){return t&&t.length===e[0].length})&&e}var u=c([\\\"x\\\",\\\"y\\\",\\\"z\\\"]),f=c([\\\"i\\\",\\\"j\\\",\\\"k\\\"]);u?(f&&f.forEach(function(t){for(var e=0;e<t.length;++e)t[e]|=0}),n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\",\\\"z\\\"],s),[\\\"lighting.ambient\\\",\\\"lighting.diffuse\\\",\\\"lighting.specular\\\",\\\"lighting.roughness\\\",\\\"lighting.fresnel\\\",\\\"lighting.vertexnormalsepsilon\\\",\\\"lighting.facenormalsepsilon\\\",\\\"lightposition.x\\\",\\\"lightposition.y\\\",\\\"lightposition.z\\\",\\\"contour.show\\\",\\\"contour.color\\\",\\\"contour.width\\\",\\\"colorscale\\\",\\\"reversescale\\\",\\\"flatshading\\\",\\\"alphahull\\\",\\\"delaunayaxis\\\",\\\"opacity\\\"].forEach(function(t){l(t)}),\\\"intensity\\\"in t?(l(\\\"intensity\\\"),a(t,e,s,l,{prefix:\\\"\\\",cLetter:\\\"c\\\"})):(e.showscale=!1,\\\"facecolor\\\"in t?l(\\\"facecolor\\\"):\\\"vertexcolor\\\"in t?l(\\\"vertexcolor\\\"):l(\\\"color\\\",r)),l(\\\"text\\\"),e._length=null):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":987}],991:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.colorbar={min:\\\"cmin\\\",max:\\\"cmax\\\"},n.plot=t(\\\"./convert\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"mesh3d\\\",n.basePlotModule=t(\\\"../../plots/gl3d\\\"),n.categories=[\\\"gl3d\\\"],n.meta={},e.exports=n},{\\\"../../plots/gl3d\\\":788,\\\"./attributes\\\":987,\\\"./calc\\\":988,\\\"./convert\\\":989,\\\"./defaults\\\":990}],992:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").extendFlat,i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../components/drawing/attributes\\\").dash,o=t(\\\"../../components/fx/attributes\\\"),s=i.line;function l(t){return{line:{color:n({},s.color,{dflt:t}),width:s.width,dash:a,editType:\\\"style\\\"},editType:\\\"style\\\"}}e.exports={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},open:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},high:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},low:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},close:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},line:{width:n({},s.width,{}),dash:n({},a,{}),editType:\\\"style\\\"},increasing:l(\\\"#3D9970\\\"),decreasing:l(\\\"#FF4136\\\"),text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"calc\\\"},tickwidth:{valType:\\\"number\\\",min:0,max:.5,dflt:.3,editType:\\\"calc\\\"},hoverlabel:n({},o.hoverlabel,{split:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"style\\\"}})}},{\\\"../../components/drawing/attributes\\\":594,\\\"../../components/fx/attributes\\\":604,\\\"../../lib\\\":696,\\\"../scatter/attributes\\\":1044}],993:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=n._,a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../../constants/numerical\\\").BADNUM;function s(t,e,r,n){return{o:t,h:e,l:r,c:n}}function l(t,e,r,n,s){for(var l=n.makeCalcdata(e,\\\"open\\\"),c=n.makeCalcdata(e,\\\"high\\\"),u=n.makeCalcdata(e,\\\"low\\\"),f=n.makeCalcdata(e,\\\"close\\\"),h=Array.isArray(e.text),p=!0,d=null,g=[],v=0;v<r.length;v++){var m=r[v],y=l[v],x=c[v],b=u[v],_=f[v];if(m!==o&&y!==o&&x!==o&&b!==o&&_!==o){_===y?null!==d&&_!==d&&(p=_>d):p=_>y,d=_;var w=s(y,x,b,_);w.pos=m,w.yc=(y+_)/2,w.i=v,w.dir=p?\\\"increasing\\\":\\\"decreasing\\\",h&&(w.tx=e.text[v]),g.push(w)}}return e._extremes[n._id]=a.findExtremes(n,u.concat(c),{padded:!0}),g.length&&(g[0].t={labels:{open:i(t,\\\"open:\\\")+\\\" \\\",high:i(t,\\\"high:\\\")+\\\" \\\",low:i(t,\\\"low:\\\")+\\\" \\\",close:i(t,\\\"close:\\\")+\\\" \\\"}}),g}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),o=function(t,e,r){var i=r._minDiff;if(!i){var a,o=t._fullData,s=[];for(i=1/0,a=0;a<o.length;a++){var l=o[a];if(\\\"ohlc\\\"===l.type&&!0===l.visible&&l.xaxis===e._id){s.push(l);var c=e.makeCalcdata(l,\\\"x\\\");l._xcalc=c;var u=n.distinctVals(c).minDiff;u&&isFinite(u)&&(i=Math.min(i,u))}}for(i===1/0&&(i=1),a=0;a<s.length;a++)s[a]._minDiff=i}return i*r.tickwidth}(t,r,e),c=e._minDiff;e._minDiff=null;var u=e._xcalc;e._xcalc=null;var f=l(t,e,u,i,s);return e._extremes[r._id]=a.findExtremes(r,u,{vpad:c/2}),f.length?(n.extendFlat(f[0].t,{wHover:c/2,tickLen:o}),f):[{t:{empty:!0}}]},calcCommon:l}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],994:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./ohlc_defaults\\\"),a=t(\\\"./attributes\\\");function o(t,e,r,n){r(n+\\\".line.color\\\"),r(n+\\\".line.width\\\",e.line.width),r(n+\\\".line.dash\\\",e.line.dash)}e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,a,r,i)}i(t,e,l,s)?(l(\\\"line.width\\\"),l(\\\"line.dash\\\"),o(t,e,l,\\\"increasing\\\"),o(t,e,l,\\\"decreasing\\\"),l(\\\"text\\\"),l(\\\"tickwidth\\\"),s._requestRangeslider[e.xaxis]=!0):e.visible=!1}},{\\\"../../lib\\\":696,\\\"./attributes\\\":992,\\\"./ohlc_defaults\\\":997}],995:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/fx\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../scatter/fill_hover_text\\\"),l={increasing:\\\"\\\\u25b2\\\",decreasing:\\\"\\\\u25bc\\\"};function c(t,e,r,n){var i,s,l=t.cd,c=t.xa,u=l[0].trace,f=l[0].t,h=u.type,p=\\\"ohlc\\\"===h?\\\"l\\\":\\\"min\\\",d=\\\"ohlc\\\"===h?\\\"h\\\":\\\"max\\\",g=f.bPos||0,v=function(t){return t.pos+g-e},m=f.bdPos||f.tickLen,y=f.wHover,x=Math.min(1,m/Math.abs(c.r2c(c.range[1])-c.r2c(c.range[0])));function b(t){var e=v(t);return a.inbox(e-y,e+y,i)}function _(t){return a.inbox(t[p]-r,t[d]-r,i)}function w(t){return(b(t)+_(t))/2}i=t.maxHoverDistance-x,s=t.maxSpikeDistance-x;var k=a.getDistanceFunction(n,b,_,w);if(a.getClosest(l,k,t),!1===t.index)return null;var M=l[t.index],A=u[M.dir],T=A.line.color;return o.opacity(T)&&A.line.width?t.color=T:t.color=A.fillcolor,t.x0=c.c2p(M.pos+g-m,!0),t.x1=c.c2p(M.pos+g+m,!0),t.xLabelVal=M.pos,t.spikeDistance=w(M)*s/i,t.xSpike=c.c2p(M.pos,!0),t}function u(t,e,r,a){var o=t.cd,s=t.ya,l=o[0].trace,u=o[0].t,f=[],h=c(t,e,r,a);if(!h)return[];var p=l.hoverinfo,d=p.split(\\\"+\\\");if(!(\\\"all\\\"===p||-1!==d.indexOf(\\\"y\\\")))return[];for(var g=[\\\"high\\\",\\\"open\\\",\\\"close\\\",\\\"low\\\"],v={},m=0;m<g.length;m++){var y,x=g[m],b=l[x][h.index],_=s.c2p(b,!0);b in v?(y=v[b]).yLabel+=\\\"<br>\\\"+u.labels[x]+n.hoverLabelText(s,b):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=u.labels[x]+n.hoverLabelText(s,b),y.name=\\\"\\\",f.push(y),v[b]=y)}return f}function f(t,e,r,i){var a=t.cd,o=t.ya,u=a[0].trace,f=a[0].t,h=c(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function v(t){return f.labels[t]+n.hoverLabelText(o,u[t][d])}var m=u.hoverinfo,y=m.split(\\\"+\\\"),x=\\\"all\\\"===m,b=x||-1!==y.indexOf(\\\"y\\\"),_=x||-1!==y.indexOf(\\\"text\\\"),w=b?[v(\\\"open\\\"),v(\\\"high\\\"),v(\\\"low\\\"),v(\\\"close\\\")+\\\"  \\\"+l[g]]:[];return _&&s(p,u,w),h.extraText=w.join(\\\"<br>\\\"),h.y0=h.y1=o.c2p(p.yc,!0),[h]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?u(t,e,r,n):f(t,e,r,n)},hoverSplit:u,hoverOnPoints:f}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/fill_hover_text\\\":1052}],996:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"ohlc\\\",basePlotModule:t(\\\"../../plots/cartesian\\\"),categories:[\\\"cartesian\\\",\\\"svg\\\",\\\"showLegend\\\"],meta:{},attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),calc:t(\\\"./calc\\\").calc,plot:t(\\\"./plot\\\"),style:t(\\\"./style\\\"),hoverPoints:t(\\\"./hover\\\").hoverPoints,selectPoints:t(\\\"./select\\\")}},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":992,\\\"./calc\\\":993,\\\"./defaults\\\":994,\\\"./hover\\\":995,\\\"./plot\\\":998,\\\"./select\\\":999,\\\"./style\\\":1e3}],997:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\");e.exports=function(t,e,r,i){var a=r(\\\"x\\\"),o=r(\\\"open\\\"),s=r(\\\"high\\\"),l=r(\\\"low\\\"),c=r(\\\"close\\\");if(r(\\\"hoverlabel.split\\\"),n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\"],i),o&&s&&l&&c){var u=Math.min(o.length,s.length,l.length,c.length);return a&&(u=Math.min(u,a.length)),e._length=u,u}}},{\\\"../../registry\\\":828}],998:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\");e.exports=function(t,e,r,a){var o=e.xaxis,s=e.yaxis;i.makeTraceGroups(a,r,\\\"trace ohlc\\\").each(function(t){var r=n.select(this),a=t[0],l=a.t,c=a.trace;if(e.isRangePlot||(a.node3=r),!0!==c.visible||l.empty)r.remove();else{var u=l.tickLen,f=r.selectAll(\\\"path\\\").data(i.identity);f.enter().append(\\\"path\\\"),f.exit().remove(),f.attr(\\\"d\\\",function(t){var e=o.c2p(t.pos,!0),r=o.c2p(t.pos-u,!0),n=o.c2p(t.pos+u,!0);return\\\"M\\\"+r+\\\",\\\"+s.c2p(t.o,!0)+\\\"H\\\"+e+\\\"M\\\"+e+\\\",\\\"+s.c2p(t.h,!0)+\\\"V\\\"+s.c2p(t.l,!0)+\\\"M\\\"+n+\\\",\\\"+s.c2p(t.c,!0)+\\\"H\\\"+e})}})}},{\\\"../../lib\\\":696,d3:148}],999:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r<n.length;r++)n[r].selected=0;else for(r=0;r<n.length;r++){var l=n[r];e.contains([i.c2p(l.pos+s),a.c2p(l.yc)],null,l.i,t)?(o.push({pointNumber:l.i,x:i.c2d(l.pos),y:a.c2d(l.yc)}),l.selected=1):l.selected=0}return o}},{}],1000:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"../../components/color\\\");e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.ohlclayer\\\").selectAll(\\\"g.trace\\\");r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),r.each(function(t){var e=t[0].trace;n.select(this).selectAll(\\\"path\\\").each(function(t){var r=e[t.dir].line;n.select(this).style(\\\"fill\\\",\\\"none\\\").call(a.stroke,r.color).call(i.dashLine,r.dash,r.width).style(\\\"opacity\\\",e.selectedpoints&&!t.selected?.3:1)})})}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,d3:148}],1001:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/extend\\\").extendFlat,i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../plots/font_attributes\\\"),o=t(\\\"../../components/colorscale/attributes\\\"),s=t(\\\"../../plots/domain\\\").attributes,l=t(\\\"../scatter/attributes\\\").line,c=t(\\\"../../components/colorbar/attributes\\\"),u=n({editType:\\\"calc\\\"},o(\\\"line\\\",{editType:\\\"calc\\\"}),{showscale:l.showscale,colorbar:c,shape:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"hspline\\\"],dflt:\\\"linear\\\",editType:\\\"plot\\\"}});e.exports={domain:s({name:\\\"parcats\\\",trace:!0,editType:\\\"calc\\\"}),hoverinfo:n({},i.hoverinfo,{flags:[\\\"count\\\",\\\"probability\\\"],editType:\\\"plot\\\"}),hoveron:{valType:\\\"enumerated\\\",values:[\\\"category\\\",\\\"color\\\",\\\"dimension\\\"],dflt:\\\"category\\\",editType:\\\"plot\\\"},arrangement:{valType:\\\"enumerated\\\",values:[\\\"perpendicular\\\",\\\"freeform\\\",\\\"fixed\\\"],dflt:\\\"perpendicular\\\",editType:\\\"plot\\\"},bundlecolors:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},sortpaths:{valType:\\\"enumerated\\\",values:[\\\"forward\\\",\\\"backward\\\"],dflt:\\\"forward\\\",editType:\\\"plot\\\"},labelfont:a({editType:\\\"calc\\\"}),tickfont:a({editType:\\\"calc\\\"}),dimensions:{_isLinkedToArray:\\\"dimension\\\",label:{valType:\\\"string\\\",editType:\\\"calc\\\"},categoryorder:{valType:\\\"enumerated\\\",values:[\\\"trace\\\",\\\"category ascending\\\",\\\"category descending\\\",\\\"array\\\"],dflt:\\\"trace\\\",editType:\\\"calc\\\"},categoryarray:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},ticktext:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},values:{valType:\\\"data_array\\\",dflt:[],editType:\\\"calc\\\"},displayindex:{valType:\\\"integer\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\",visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"}},line:u,counts:{valType:\\\"number\\\",min:0,dflt:1,arrayOk:!0,editType:\\\"calc\\\"},customdata:void 0,hoverlabel:void 0,ids:void 0,legendgroup:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772,\\\"../scatter/attributes\\\":1044}],1002:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/get_data\\\").getModuleCalcData,i=t(\\\"./plot\\\");r.name=\\\"parcats\\\",r.plot=function(t,e,r,a){var o=n(t.calcdata,\\\"parcats\\\");if(o.length){var s=o[0];i(t,s,r,a)}},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"parcats\\\"),a=e._has&&e._has(\\\"parcats\\\");i&&!a&&n._paperdiv.selectAll(\\\".parcats\\\").remove()}},{\\\"../../plots/get_data\\\":782,\\\"./plot\\\":1007}],1003:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/gup\\\").wrap,i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/calc\\\"),o=t(\\\"../../lib/filter_unique.js\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"../../lib\\\");function c(t,e,r){t.valueInds.push(e),t.count+=r}function u(t,e,r){t.valueInds.push(e),t.count+=r}e.exports=function(t,e){var r=l.filterVisible(e.dimensions);if(0===r.length)return[];var f,h,p,d=r.map(function(t){var e;return\\\"trace\\\"===t.categoryorder?e=null:\\\"array\\\"===t.categoryorder?e=t.categoryarray:(e=o(t.values).sort(),\\\"category descending\\\"===t.categoryorder&&(e=e.reverse())),function(t,e){e=null==e?[]:e.map(function(t){return t});var r={},n={},i=[];e.forEach(function(t,e){r[t]=0,n[t]=e});for(var a=0;a<t.length;a++){var o,s=t[a];void 0===r[s]?(r[s]=1,o=e.push(s)-1,n[s]=o):(r[s]++,o=n[s]),i.push(o)}var l=e.map(function(t){return r[t]});return{uniqueValues:e,uniqueCounts:l,inds:i}}(t.values,e)});f=l.isArrayOrTypedArray(e.counts)?e.counts:[e.counts],function(t){var e;if(function(t){for(var e=new Array(t.length),r=0;r<t.length;r++){if(t[r]<0||t[r]>=t.length)return!1;if(void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(t.map(function(t){return t.displayindex})))for(e=0;e<t.length;e++)t[e]._displayindex=t[e].displayindex;else for(e=0;e<t.length;e++)t[e]._displayindex=e}(r),r.forEach(function(t,e){!function(t,e){t._categoryarray=e.uniqueValues,null===t.ticktext||void 0===t.ticktext?t._ticktext=[]:t._ticktext=t.ticktext.slice();for(var r=t._ticktext.length;r<e.uniqueValues.length;r++)t._ticktext.push(e.uniqueValues[r])}(t,d[e])});var g,v=e.line;v?(i(e,\\\"line\\\")&&a(e,e.line.color,\\\"line\\\",\\\"c\\\"),g=s.tryColorscale(v)):g=l.identity;var m,y,x,b,_=r[0].values.length,w={},k=d.map(function(t){return t.inds});for(p=0,m=0;m<_;m++){var M=[];for(y=0;y<k.length;y++)M.push(k[y][m]);h=f[m%f.length],p+=h;var A=(x=m,b=void 0,b=l.isArrayOrTypedArray(v.color)?v.color[x%v.color.length]:v.color,{color:g(b),rawColor:b}),T=M+\\\"-\\\"+A.rawColor;void 0===w[T]&&(w[T]={categoryInds:M,color:A.color,rawColor:A.rawColor,valueInds:[],count:0}),u(w[T],m,h)}var S,C=r.map(function(t,e){return r=e,n=t._index,i=t._displayindex,a=t.label,{dimensionInd:r,containerInd:n,displayInd:i,dimensionLabel:a,count:p,categories:[],dragX:null};var r,n,i,a});for(m=0;m<_;m++)for(h=f[m%f.length],y=0;y<C.length;y++){var E=C[y].containerInd,L=d[y].inds[m],z=C[y].categories;if(void 0===z[L]){var O=e.dimensions[E]._categoryarray[L],I=e.dimensions[E]._ticktext[L];z[L]={dimensionInd:y,categoryInd:S=L,categoryValue:O,displayInd:S,categoryLabel:I,valueInds:[],count:0,dragY:null}}c(z[L],m,h)}return n(function(t,e,r){var n=t.map(function(t){return t.categories.length}).reduce(function(t,e){return Math.max(t,e)});return{dimensions:t,paths:e,trace:void 0,maxCats:n,count:r}}(C,w,p))}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/filter_unique.js\\\":686,\\\"../../lib/gup\\\":693}],1004:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"../../plots/domain\\\").defaults,s=t(\\\"../../plots/array_container_defaults\\\"),l=t(\\\"./attributes\\\"),c=t(\\\"../parcoords/merge_length\\\");function u(t,e){function r(r,i){return n.coerce(t,e,l.dimensions,r,i)}var i=r(\\\"values\\\"),a=r(\\\"visible\\\");if(i&&i.length||(a=e.visible=!1),a){r(\\\"label\\\"),r(\\\"displayindex\\\",e._index);var o,s=t.categoryarray,c=Array.isArray(s)&&s.length>0;c&&(o=\\\"array\\\");var u=r(\\\"categoryorder\\\",o);\\\"array\\\"===u?(r(\\\"categoryarray\\\"),r(\\\"ticktext\\\")):(delete t.categoryarray,delete t.ticktext),c||\\\"array\\\"!==u||(e.categoryorder=\\\"trace\\\")}}e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,l,r,i)}var p=s(t,e,{name:\\\"dimensions\\\",handleItemDefaults:u}),d=function(t,e,r,o,s){s(\\\"line.shape\\\");var l=s(\\\"line.color\\\",o.colorway[0]);if(i(t,\\\"line\\\")&&n.isArrayOrTypedArray(l)){if(l.length)return s(\\\"line.colorscale\\\"),a(t,e,o,s,{prefix:\\\"line.\\\",cLetter:\\\"c\\\"}),l.length;e.line.color=r}return 1/0}(t,e,r,f,h);o(e,f,h),Array.isArray(p)&&p.length||(e.visible=!1),c(e,p,\\\"values\\\",d),h(\\\"hoveron\\\"),h(\\\"arrangement\\\"),h(\\\"bundlecolors\\\"),h(\\\"sortpaths\\\"),h(\\\"counts\\\");var g={family:f.font.family,size:Math.round(f.font.size),color:f.font.color};n.coerceFont(h,\\\"labelfont\\\",g);var v={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\\\"tickfont\\\",v)}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/domain\\\":771,\\\"../parcoords/merge_length\\\":1016,\\\"./attributes\\\":1001}],1005:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.colorbar={container:\\\"line\\\",min:\\\"cmin\\\",max:\\\"cmax\\\"},n.moduleType=\\\"trace\\\",n.name=\\\"parcats\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1001,\\\"./base_plot\\\":1002,\\\"./calc\\\":1003,\\\"./defaults\\\":1004,\\\"./plot\\\":1007}],1006:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../plot_api/plot_api\\\"),a=t(\\\"../../components/fx\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"tinycolor2\\\"),c=t(\\\"../../lib/svg_text_utils\\\");function u(t,e,r,i){var a=t.map(function(t,e,r){var n,i=r[0],a=e.margin||{l:80,r:80,t:100,b:80},o=i.trace,s=o.domain,l=e.width,c=e.height,u=Math.floor(l*(s.x[1]-s.x[0])),f=Math.floor(c*(s.y[1]-s.y[0])),h=s.x[0]*l+a.l,p=e.height-s.y[1]*e.height+a.t,d=o.line.shape;n=\\\"all\\\"===o.hoverinfo?[\\\"count\\\",\\\"probability\\\"]:o.hoverinfo.split(\\\"+\\\");var g={key:o.uid,model:i,x:h,y:p,width:u,height:f,hoveron:o.hoveron,hoverinfoItems:n,arrangement:o.arrangement,bundlecolors:o.bundlecolors,sortpaths:o.sortpaths,labelfont:o.labelfont,categorylabelfont:o.tickfont,pathShape:d,dragDimension:null,margin:a,paths:[],dimensions:[],graphDiv:t,traceSelection:null,pathSelection:null,dimensionSelection:null};i.dimensions&&(R(g),D(g));return g}.bind(0,e,r)),l=i.selectAll(\\\"g.parcatslayer\\\").data([null]);l.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"parcatslayer\\\").style(\\\"pointer-events\\\",\\\"all\\\");var u=l.selectAll(\\\"g.trace.parcats\\\").data(a,f),v=u.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"trace parcats\\\");u.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\", \\\"+t.y+\\\")\\\"}),v.append(\\\"g\\\").attr(\\\"class\\\",\\\"paths\\\");var x=u.select(\\\"g.paths\\\").selectAll(\\\"path.path\\\").data(function(t){return t.paths},f);x.attr(\\\"fill\\\",function(t){return t.model.color});var w=x.enter().append(\\\"path\\\").attr(\\\"class\\\",\\\"path\\\").attr(\\\"stroke-opacity\\\",0).attr(\\\"fill\\\",function(t){return t.model.color}).attr(\\\"fill-opacity\\\",0);y(w),x.attr(\\\"d\\\",function(t){return t.svgD}),w.empty()||x.sort(p),x.exit().remove(),x.on(\\\"mouseover\\\",d).on(\\\"mouseout\\\",g).on(\\\"click\\\",m),v.append(\\\"g\\\").attr(\\\"class\\\",\\\"dimensions\\\");var k=u.select(\\\"g.dimensions\\\").selectAll(\\\"g.dimension\\\").data(function(t){return t.dimensions},f);k.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"dimension\\\"),k.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\", 0)\\\"}),k.exit().remove();var M=k.selectAll(\\\"g.category\\\").data(function(t){return t.categories},f),A=M.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"category\\\");M.attr(\\\"transform\\\",function(t){return\\\"translate(0, \\\"+t.y+\\\")\\\"}),A.append(\\\"rect\\\").attr(\\\"class\\\",\\\"catrect\\\").attr(\\\"pointer-events\\\",\\\"none\\\"),M.select(\\\"rect.catrect\\\").attr(\\\"fill\\\",\\\"none\\\").attr(\\\"width\\\",function(t){return t.width}).attr(\\\"height\\\",function(t){return t.height}),b(A);var z=M.selectAll(\\\"rect.bandrect\\\").data(function(t){return t.bands},f);z.each(function(){o.raiseToTop(this)}),z.attr(\\\"fill\\\",function(t){return t.color});var O=z.enter().append(\\\"rect\\\").attr(\\\"class\\\",\\\"bandrect\\\").attr(\\\"stroke-opacity\\\",0).attr(\\\"fill\\\",function(t){return t.color}).attr(\\\"fill-opacity\\\",0);z.attr(\\\"fill\\\",function(t){return t.color}).attr(\\\"width\\\",function(t){return t.width}).attr(\\\"height\\\",function(t){return t.height}).attr(\\\"y\\\",function(t){return t.y}).attr(\\\"cursor\\\",function(t){return\\\"fixed\\\"===t.parcatsViewModel.arrangement?\\\"default\\\":\\\"perpendicular\\\"===t.parcatsViewModel.arrangement?\\\"ns-resize\\\":\\\"move\\\"}),_(O),z.exit().remove(),A.append(\\\"text\\\").attr(\\\"class\\\",\\\"catlabel\\\").attr(\\\"pointer-events\\\",\\\"none\\\");var I=e._fullLayout.paper_bgcolor;M.select(\\\"text.catlabel\\\").attr(\\\"text-anchor\\\",function(t){return h(t)?\\\"start\\\":\\\"end\\\"}).attr(\\\"alignment-baseline\\\",\\\"middle\\\").style(\\\"text-shadow\\\",I+\\\" -1px  1px 2px, \\\"+I+\\\" 1px  1px 2px, \\\"+I+\\\"  1px -1px 2px, \\\"+I+\\\" -1px -1px 2px\\\").style(\\\"fill\\\",\\\"rgb(0, 0, 0)\\\").attr(\\\"x\\\",function(t){return h(t)?t.width+5:-5}).attr(\\\"y\\\",function(t){return t.height/2}).text(function(t){return t.model.categoryLabel}).each(function(t){s.font(n.select(this),t.parcatsViewModel.categorylabelfont),c.convertToTspans(n.select(this),e)}),A.append(\\\"text\\\").attr(\\\"class\\\",\\\"dimlabel\\\"),M.select(\\\"text.dimlabel\\\").attr(\\\"text-anchor\\\",\\\"middle\\\").attr(\\\"alignment-baseline\\\",\\\"baseline\\\").attr(\\\"cursor\\\",function(t){return\\\"fixed\\\"===t.parcatsViewModel.arrangement?\\\"default\\\":\\\"ew-resize\\\"}).attr(\\\"x\\\",function(t){return t.width/2}).attr(\\\"y\\\",-5).text(function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null}).each(function(t){s.font(n.select(this),t.parcatsViewModel.labelfont)}),M.selectAll(\\\"rect.bandrect\\\").on(\\\"mouseover\\\",T).on(\\\"mouseout\\\",S),M.exit().remove(),k.call(n.behavior.drag().origin(function(t){return{x:t.x,y:0}}).on(\\\"dragstart\\\",C).on(\\\"drag\\\",E).on(\\\"dragend\\\",L)),u.each(function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll(\\\"g.paths\\\").selectAll(\\\"path.path\\\"),t.dimensionSelection=n.select(this).selectAll(\\\"g.dimensions\\\").selectAll(\\\"g.dimension\\\")}),u.exit().remove()}function f(t){return t.key}function h(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function p(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor<e.model.rawColor?-1:0}function d(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\")){o.raiseToTop(this),x(n.select(this));var e=v(t);if(t.parcatsViewModel.graphDiv.emit(\\\"plotly_hover\\\",{points:e,event:n.event}),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"none\\\")){var r,i,s,c=n.mouse(this)[0],u=t.parcatsViewModel.graphDiv,f=u._fullLayout,h=f._paperdiv.node().getBoundingClientRect(),p=t.parcatsViewModel.graphDiv.getBoundingClientRect();for(s=0;s<t.leftXs.length-1;s++)if(t.leftXs[s]+t.dimWidths[s]-2<=c&&c<=t.leftXs[s+1]+2){var d=t.parcatsViewModel.dimensions[s],g=t.parcatsViewModel.dimensions[s+1];r=(d.x+d.width+g.x)/2,i=(t.topYs[s]+t.topYs[s+1]+t.height)/2;break}var m=t.parcatsViewModel.x+r,y=t.parcatsViewModel.y+i,b=l.mostReadable(t.model.color,[\\\"black\\\",\\\"white\\\"]),_=[];-1!==t.parcatsViewModel.hoverinfoItems.indexOf(\\\"count\\\")&&_.push([\\\"Count:\\\",t.model.count].join(\\\" \\\")),-1!==t.parcatsViewModel.hoverinfoItems.indexOf(\\\"probability\\\")&&_.push([\\\"P:\\\",(t.model.count/t.parcatsViewModel.model.count).toFixed(3)].join(\\\" \\\"));var w=_.join(\\\"<br>\\\"),k=n.mouse(u)[0];a.loneHover({x:m-h.left+p.left,y:y-h.top+p.top,text:w,color:t.model.color,borderColor:\\\"black\\\",fontFamily:'Monaco, \\\"Courier New\\\", monospace',fontSize:10,fontColor:b,idealAlign:k<m?\\\"right\\\":\\\"left\\\"},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:u})}}}function g(t){if(!t.parcatsViewModel.dragDimension&&(y(n.select(this)),a.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),t.parcatsViewModel.pathSelection.sort(p),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\"))){var e=v(t);t.parcatsViewModel.graphDiv.emit(\\\"plotly_unhover\\\",{points:e,event:n.event})}}function v(t){for(var e=[],r=z(t.parcatsViewModel),n=0;n<t.model.valueInds.length;n++){var i=t.model.valueInds[n];e.push({curveNumber:r,pointNumber:i})}return e}function m(t){if(-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\")){var e=v(t);t.parcatsViewModel.graphDiv.emit(\\\"plotly_click\\\",{points:e,event:n.event})}}function y(t){t.attr(\\\"fill\\\",function(t){return t.model.color}).attr(\\\"fill-opacity\\\",.6).attr(\\\"stroke\\\",\\\"lightgray\\\").attr(\\\"stroke-width\\\",.2).attr(\\\"stroke-opacity\\\",1)}function x(t){t.attr(\\\"fill-opacity\\\",.8).attr(\\\"stroke\\\",function(t){return l.mostReadable(t.model.color,[\\\"black\\\",\\\"white\\\"])}).attr(\\\"stroke-width\\\",.3)}function b(t){t.select(\\\"rect.catrect\\\").attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",1).attr(\\\"stroke-opacity\\\",1)}function _(t){t.attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",.2).attr(\\\"stroke-opacity\\\",1).attr(\\\"fill-opacity\\\",1)}function w(t){var e=t.parcatsViewModel.pathSelection,r=t.categoryViewModel.model.dimensionInd,n=t.categoryViewModel.model.categoryInd;return e.filter(function(e){return e.model.categoryInds[r]===n&&e.model.color===t.color})}function k(t,e,r){var i=n.select(t).datum().parcatsViewModel.graphDiv,a=n.select(t.parentNode).selectAll(\\\"rect.bandrect\\\"),o=[];a.each(function(t){w(t).each(function(t){Array.prototype.push.apply(o,v(t))})}),i.emit(e,{points:o,event:r})}function M(t,e,r){var i=n.select(t).datum(),a=i.parcatsViewModel.graphDiv,o=w(i),s=[];o.each(function(t){Array.prototype.push.apply(s,v(t))}),a.emit(e,{points:s,event:r})}function A(t,e){var r,i,a=n.select(e.parentNode).select(\\\"rect.catrect\\\"),o=a.node().getBoundingClientRect(),s=a.datum(),l=s.parcatsViewModel,c=l.model.dimensions[s.model.dimensionInd],u=o.top+o.height/2;l.dimensions.length>1&&c.displayInd===l.dimensions.length-1?(r=o.left,i=\\\"left\\\"):(r=o.left+o.width,i=\\\"right\\\");var f=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf(\\\"count\\\")&&f.push([\\\"Count:\\\",s.model.count].join(\\\" \\\")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf(\\\"probability\\\")&&f.push([\\\"P(\\\"+s.model.categoryLabel+\\\"):\\\",(s.model.count/s.parcatsViewModel.model.count).toFixed(3)].join(\\\" \\\"));var h=f.join(\\\"<br>\\\");return{x:r-t.left,y:u-t.top,text:h,color:\\\"lightgray\\\",borderColor:\\\"black\\\",fontFamily:'Monaco, \\\"Courier New\\\", monospace',fontSize:12,fontColor:\\\"black\\\",idealAlign:i}}function T(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,i=r._fullLayout,s=i._paperdiv.node().getBoundingClientRect(),c=t.parcatsViewModel.hoveron;if(\\\"color\\\"===c?(!function(t){var e=n.select(t).datum(),r=w(e);x(r),r.each(function(){o.raiseToTop(this)}),n.select(t.parentNode).selectAll(\\\"rect.bandrect\\\").filter(function(t){return t.color===e.color}).each(function(){o.raiseToTop(this),n.select(this).attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",1.5)})}(this),M(this,\\\"plotly_hover\\\",n.event)):(!function(t){n.select(t.parentNode).selectAll(\\\"rect.bandrect\\\").each(function(t){var e=w(t);x(e),e.each(function(){o.raiseToTop(this)})}),n.select(t.parentNode).select(\\\"rect.catrect\\\").attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",2.5)}(this),k(this,\\\"plotly_hover\\\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"none\\\"))\\\"category\\\"===c?e=A(s,this):\\\"color\\\"===c?e=function(t,e){var r,i,a=e.getBoundingClientRect(),o=n.select(e).datum(),s=o.categoryViewModel,c=s.parcatsViewModel,u=c.model.dimensions[s.model.dimensionInd],f=a.y+a.height/2;c.dimensions.length>1&&u.displayInd===c.dimensions.length-1?(r=a.left,i=\\\"left\\\"):(r=a.left+a.width,i=\\\"right\\\");var h=s.model.categoryLabel,p=o.parcatsViewModel.model.count,d=0;o.categoryViewModel.bands.forEach(function(t){t.color===o.color&&(d+=t.count)});var g=s.model.count,v=0;c.pathSelection.each(function(t){t.model.color===o.color&&(v+=t.model.count)});var m=[];if(-1!==s.parcatsViewModel.hoverinfoItems.indexOf(\\\"count\\\")&&m.push([\\\"Count:\\\",d].join(\\\" \\\")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf(\\\"probability\\\")){var y=\\\"P(color \\\\u2229 \\\"+h+\\\"): \\\"+(d/p).toFixed(3);m.push(y);var x=\\\"P(\\\"+h+\\\" | color): \\\"+(d/v).toFixed(3);m.push(x);var b=\\\"P(color | \\\"+h+\\\"): \\\"+(d/g).toFixed(3);m.push(b)}var _=m.join(\\\"<br>\\\"),w=l.mostReadable(o.color,[\\\"black\\\",\\\"white\\\"]);return{x:r-t.left,y:f-t.top,text:_,color:o.color,borderColor:\\\"black\\\",fontFamily:'Monaco, \\\"Courier New\\\", monospace',fontColor:w,fontSize:10,idealAlign:i}}(s,this):\\\"dimension\\\"===c&&(e=function(t,e){var r=[];return n.select(e.parentNode.parentNode).selectAll(\\\"g.category\\\").select(\\\"rect.catrect\\\").each(function(){r.push(A(t,this))}),r}(s,this)),e&&a.multiHovers(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function S(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(y(e.pathSelection),b(e.dimensionSelection.selectAll(\\\"g.category\\\")),_(e.dimensionSelection.selectAll(\\\"g.category\\\").selectAll(\\\"rect.bandrect\\\")),a.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(p),-1===e.hoverinfoItems.indexOf(\\\"skip\\\"))){\\\"color\\\"===t.parcatsViewModel.hoveron?M(this,\\\"plotly_unhover\\\",n.event):k(this,\\\"plotly_unhover\\\",n.event)}}function C(t){\\\"fixed\\\"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll(\\\"g.category\\\").select(\\\"rect.catrect\\\").each(function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map(function(t){return t.displayInd}),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\\\"rect.bandrect\\\").each(function(e){e.y<i&&i<=e.y+e.height&&(t.potentialClickBand=this)}))}),t.parcatsViewModel.dragDimension=t,a.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function E(t){if(\\\"fixed\\\"!==t.parcatsViewModel.arrangement&&(t.dragHasMoved=!0,null!==t.dragDimensionDisplayInd)){var e=t.dragDimensionDisplayInd,r=e-1,i=e+1,a=t.parcatsViewModel.dimensions[e];if(null!==t.dragCategoryDisplayInd){var o=a.categories[t.dragCategoryDisplayInd];o.model.dragY+=n.event.dy;var s=o.model.dragY,l=o.model.displayInd,c=a.categories,u=c[l-1],f=c[l+1];void 0!==u&&s<u.y+u.height/2&&(o.model.displayInd=u.model.displayInd,u.model.displayInd=l),void 0!==f&&s+o.height>f.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||\\\"freeform\\\"===t.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var h=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[i];void 0!==h&&a.model.dragX<h.x+h.width&&(a.model.displayInd=h.model.displayInd,h.model.displayInd=e),void 0!==p&&a.model.dragX+a.width>p.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}R(t.parcatsViewModel),D(t.parcatsViewModel),I(t.parcatsViewModel),O(t.parcatsViewModel)}}function L(t){if(\\\"fixed\\\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\\\"text\\\").attr(\\\"font-weight\\\",\\\"normal\\\");var e={},r=z(t.parcatsViewModel),a=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),o=t.initialDragDimensionDisplayInds.some(function(t,e){return t!==a[e]});o&&a.forEach(function(r,n){var i=t.parcatsViewModel.model.dimensions[n].containerInd;e[\\\"dimensions[\\\"+i+\\\"].displayindex\\\"]=r});var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map(function(t){return t.displayInd});if(s=t.initialDragCategoryDisplayInds.some(function(t,e){return t!==l[e]})){var c=t.model.categories.slice().sort(function(t,e){return t.displayInd-e.displayInd}),u=c.map(function(t){return t.categoryValue}),f=c.map(function(t){return t.categoryLabel});e[\\\"dimensions[\\\"+t.model.containerInd+\\\"].categoryarray\\\"]=[u],e[\\\"dimensions[\\\"+t.model.containerInd+\\\"].ticktext\\\"]=[f],e[\\\"dimensions[\\\"+t.model.containerInd+\\\"].categoryorder\\\"]=\\\"array\\\"}}if(-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\")&&!t.dragHasMoved&&t.potentialClickBand&&(\\\"color\\\"===t.parcatsViewModel.hoveron?M(t.potentialClickBand,\\\"plotly_click\\\",n.event.sourceEvent):k(t.potentialClickBand,\\\"plotly_click\\\",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd)t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null;t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,R(t.parcatsViewModel),D(t.parcatsViewModel),n.transition().duration(300).ease(\\\"cubic-in-out\\\").each(function(){I(t.parcatsViewModel,!0),O(t.parcatsViewModel,!0)}).each(\\\"end\\\",function(){(o||s)&&i.restyle(t.parcatsViewModel.graphDiv,e,[r])})}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n<r.length;n++)if(t.key===r[n].uid){e=n;break}return e}function O(t,e){var r;void 0===e&&(e=!1),t.pathSelection.data(function(t){return t.paths},f),(r=t.pathSelection,e?r.transition():r).attr(\\\"d\\\",function(t){return t.svgD})}function I(t,e){function r(t){return e?t.transition():t}void 0===e&&(e=!1),t.dimensionSelection.data(function(t){return t.dimensions},f);var i=t.dimensionSelection.selectAll(\\\"g.category\\\").data(function(t){return t.categories},f);r(t.dimensionSelection).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\", 0)\\\"}),r(i).attr(\\\"transform\\\",function(t){return\\\"translate(0, \\\"+t.y+\\\")\\\"}),i.select(\\\".dimlabel\\\").text(function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null}),i.select(\\\".catlabel\\\").attr(\\\"text-anchor\\\",function(t){return h(t)?\\\"start\\\":\\\"end\\\"}).attr(\\\"x\\\",function(t){return h(t)?t.width+5:-5}).each(function(t){var e,r;h(t)?(e=t.width+5,r=\\\"start\\\"):(e=-5,r=\\\"end\\\"),n.select(this).selectAll(\\\"tspan\\\").attr(\\\"x\\\",e).attr(\\\"text-anchor\\\",r)});var a=i.selectAll(\\\"rect.bandrect\\\").data(function(t){return t.bands},f),s=a.enter().append(\\\"rect\\\").attr(\\\"class\\\",\\\"bandrect\\\").attr(\\\"cursor\\\",\\\"move\\\").attr(\\\"stroke-opacity\\\",0).attr(\\\"fill\\\",function(t){return t.color}).attr(\\\"fill-opacity\\\",0);a.attr(\\\"fill\\\",function(t){return t.color}).attr(\\\"width\\\",function(t){return t.width}).attr(\\\"height\\\",function(t){return t.height}).attr(\\\"y\\\",function(t){return t.y}),_(s),a.each(function(){o.raiseToTop(this)}),a.exit().remove()}function P(t,e,r,i,a){var o,s,l=[],c=[];for(s=0;s<r.length-1;s++)o=n.interpolateNumber(r[s]+t[s],t[s+1]),l.push(o(a)),c.push(o(1-a));var u=\\\"M \\\"+t[0]+\\\",\\\"+e[0];for(u+=\\\"l\\\"+r[0]+\\\",0 \\\",s=1;s<r.length;s++)u+=\\\"C\\\"+l[s-1]+\\\",\\\"+e[s-1]+\\\" \\\"+c[s-1]+\\\",\\\"+e[s]+\\\" \\\"+t[s]+\\\",\\\"+e[s],u+=\\\"l\\\"+r[s]+\\\",0 \\\";for(u+=\\\"l0,\\\"+i+\\\" \\\",u+=\\\"l -\\\"+r[r.length-1]+\\\",0 \\\",s=r.length-2;s>=0;s--)u+=\\\"C\\\"+c[s]+\\\",\\\"+(e[s+1]+i)+\\\" \\\"+l[s]+\\\",\\\"+(e[s]+i)+\\\" \\\"+(t[s]+r[s])+\\\",\\\"+(e[s]+i),u+=\\\"l-\\\"+r[s]+\\\",0 \\\";return u+=\\\"Z\\\"}function D(t){var e=t.dimensions,r=t.model,n=e.map(function(t){return t.categories.map(function(t){return t.y})}),i=t.model.dimensions.map(function(t){return t.categories.map(function(t){return t.displayInd})}),a=t.model.dimensions.map(function(t){return t.displayInd}),o=t.dimensions.map(function(t){return t.model.dimensionInd}),s=e.map(function(t){return t.x}),l=e.map(function(t){return t.width}),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function f(t){var e=t.categoryInds.map(function(t,e){return i[e][t]});return o.map(function(t){return e[t]})}c.sort(function(e,r){var n=f(e),i=f(r);return\\\"backward\\\"===t.sortpaths&&(n.reverse(),i.reverse()),n.push(e.valueInds[0]),i.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),i.unshift(r.rawColor)),n<i?-1:n>i?1:0});for(var h=new Array(c.length),p=e[0].model.count,d=e[0].categories.map(function(t){return t.height}).reduce(function(t,e){return t+e}),g=0;g<c.length;g++){var v,m=c[g];v=p>0?d*(m.count/p):0;for(var y,x=new Array(n.length),b=0;b<m.categoryInds.length;b++){var _=m.categoryInds[b],w=i[b][_],k=a[b];x[k]=n[k][w],n[k][w]+=v;var M=t.dimensions[k].categories[w],A=M.bands.length,T=M.bands[A-1];if(void 0===T||m.rawColor!==T.rawColor){var S=void 0===T?0:T.y+T.height;M.bands.push({key:S,color:m.color,rawColor:m.rawColor,height:v,width:M.width,count:m.count,y:S,categoryViewModel:M,parcatsViewModel:t})}else{var C=M.bands[A-1];C.height+=v,C.count+=m.count}}y=\\\"hspline\\\"===t.pathShape?P(s,x,l,v,.5):P(s,x,l,v,0),h[g]={key:m.valueInds[0],model:m,height:v,leftXs:s,topYs:x,dimWidths:l,svgD:y,parcatsViewModel:t}}t.paths=h}function R(t){var e=t.model.dimensions.map(function(t){return{displayInd:t.displayInd,dimensionInd:t.dimensionInd}});e.sort(function(t,e){return t.displayInd-e.displayInd});var r=[];for(var n in e){var i=e[n].dimensionInd,a=t.model.dimensions[i];r.push(B(t,a))}t.dimensions=r}function B(t,e){var r,n=t.model.dimensions.length,i=e.displayInd;r=40+(n>1?(t.width-80-16)/(n-1):0)*i;var a,o,s,l,c,u=[],f=t.model.maxCats,h=e.categories.length,p=e.count,d=t.height-8*(f-1),g=8*(f-h)/2,v=e.categories.map(function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}});for(v.sort(function(t,e){return t.displayInd-e.displayInd}),c=0;c<h;c++)l=v[c].categoryInd,o=e.categories[l],a=p>0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:g,bands:[],parcatsViewModel:t},g=g+a+8,u.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:u,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){u(r,t,n,e)}},{\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/plot_api\\\":732,d3:148,tinycolor2:514}],1007:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./parcats\\\");e.exports=function(t,e,r,i){var a=t._fullLayout,o=a._paper,s=a._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},{\\\"./parcats\\\":1006}],1008:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../../plots/cartesian/layout_attributes\\\"),o=t(\\\"../../plots/font_attributes\\\"),s=t(\\\"../../plots/domain\\\").attributes,l=t(\\\"../../lib/extend\\\").extendFlat,c=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports={domain:s({name:\\\"parcoords\\\",trace:!0,editType:\\\"calc\\\"}),hoverlabel:void 0,labelfont:o({editType:\\\"calc\\\"}),tickfont:o({editType:\\\"calc\\\"}),rangefont:o({editType:\\\"calc\\\"}),dimensions:c(\\\"dimension\\\",{label:{valType:\\\"string\\\",editType:\\\"calc\\\"},tickvals:l({},a.tickvals,{editType:\\\"calc\\\"}),ticktext:l({},a.ticktext,{editType:\\\"calc\\\"}),tickformat:{valType:\\\"string\\\",dflt:\\\"3s\\\",editType:\\\"calc\\\"},visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},range:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\",editType:\\\"calc\\\"},{valType:\\\"number\\\",editType:\\\"calc\\\"}],editType:\\\"calc\\\"},constraintrange:{valType:\\\"info_array\\\",freeLength:!0,dimensions:\\\"1-2\\\",items:[{valType:\\\"number\\\",editType:\\\"calc\\\"},{valType:\\\"number\\\",editType:\\\"calc\\\"}],editType:\\\"calc\\\"},multiselect:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},values:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"}),line:l(n(\\\"line\\\",{colorscaleDflt:\\\"Viridis\\\",autoColorDflt:!1,editTypeOverride:\\\"calc\\\"}),{colorbar:i,editType:\\\"calc\\\"})}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/layout_attributes\\\":758,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772}],1009:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"d3\\\"),a=t(\\\"../../lib/gup\\\").keyFun,o=t(\\\"../../lib/gup\\\").repeat,s=t(\\\"../../lib\\\").sorterAsc,l=n.bar.snapRatio;function c(t,e){return t*(1-l)+e*l}var u=n.bar.snapClose;function f(t,e){return t*(1-u)+e*u}function h(t,e,r){if(d(e,r))return e;for(var n=t[0],i=n,a=1;a<t.length;a++){var o=t[a];if(e<f(n,o))return c(n,i);if(e<o||a===t.length-1)return c(o,n);i=n,n=o}}function p(t,e,r){if(d(e,r))return e;for(var n=t[t.length-1],i=n,a=t.length-2;a>=0;a--){var o=t[a];if(e>f(n,o))return c(n,i);if(e>o||a===t.length-1)return c(o,n);i=n,n=o}}function d(t,e){for(var r=0;r<e.length;r++)if(t>=e[r][0]&&t<=e[r][1])return!0;return!1}function g(t){t.attr(\\\"x\\\",-n.bar.captureWidth/2).attr(\\\"width\\\",n.bar.captureWidth)}function v(t){t.attr(\\\"visibility\\\",\\\"visible\\\").style(\\\"visibility\\\",\\\"visible\\\").attr(\\\"fill\\\",\\\"yellow\\\").attr(\\\"opacity\\\",0)}function m(t){if(!t.brush.filterSpecified)return\\\"0,\\\"+t.height;for(var e,r,n,i=y(t.brush.filter.getConsolidated(),t.height),a=[0],o=i.length?i[0][0]:null,s=0;s<i.length;s++)r=(e=i[s])[1]-e[0],a.push(o),a.push(r),(n=s+1)<i.length&&(o=i[n][0]-e[1]);return a.push(t.height),a}function y(t,e){return t.map(function(t){return t.map(function(t){return t*e}).sort(s)})}function x(){i.select(document.body).style(\\\"cursor\\\",null)}function b(t){t.attr(\\\"stroke-dasharray\\\",m)}function _(t,e){var r=i.select(t).selectAll(\\\".highlight, .highlight-shadow\\\");b(e?r.transition().duration(n.bar.snapDuration).each(\\\"end\\\",e):r)}function w(t,e){var r,i=t.brush,a=NaN,o={};if(i.filterSpecified){var s=t.height,l=i.filter.getConsolidated(),c=y(l,s),u=NaN,f=NaN,h=NaN;for(r=0;r<=c.length;r++){var p=c[r];if(p&&p[0]<=e&&e<=p[1]){u=r;break}if(f=r?r-1:NaN,p&&p[0]>e){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]<c[h][0]-e?f:h),!isNaN(a)){var d=c[a],g=function(t,e){var r=n.bar.handleHeight;if(!(e>t[1]+r||e<t[0]-r))return e>=.9*t[1]+.1*t[0]?\\\"n\\\":e<=.9*t[0]+.1*t[1]?\\\"s\\\":\\\"ns\\\"}(d,e);g&&(o.interval=l[a],o.intervalPix=d,o.region=g)}}if(t.ordinal&&!o.region){var v=t.unitTickvals,m=t.unitToPaddedPx.invert(e);for(r=0;r<v.length;r++){var x=[.25*v[Math.max(r-1,0)]+.75*v[r],.25*v[Math.min(r+1,v.length-1)]+.75*v[r]];if(m>=x[0]&&m<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function k(t){t.on(\\\"mousemove\\\",function(t){if(i.event.preventDefault(),!t.parent.inBrushDrag){var e=w(t,t.height-i.mouse(this)[1]-2*n.verticalPadding),r=\\\"crosshair\\\";e.clickableOrdinalRange?r=\\\"pointer\\\":e.region&&(r=e.region+\\\"-resize\\\"),i.select(document.body).style(\\\"cursor\\\",r)}}).on(\\\"mouseleave\\\",function(t){t.parent.inBrushDrag||x()}).call(i.behavior.drag().on(\\\"dragstart\\\",function(t){i.event.sourceEvent.stopPropagation();var e=t.height-i.mouse(this)[1]-2*n.verticalPadding,r=t.unitToPaddedPx.invert(e),a=t.brush,o=w(t,e),s=o.interval,l=a.svgBrush;if(l.wasDragged=!1,l.grabbingBar=\\\"ns\\\"===o.region,l.grabbingBar){var c=s.map(t.unitToPaddedPx);l.grabPoint=e-c[0]-n.verticalPadding,l.barLength=c[1]-c[0]}l.clickableOrdinalRange=o.clickableOrdinalRange,l.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],s&&(l.stayingIntervals=l.stayingIntervals.filter(function(t){return t[0]!==s[0]&&t[1]!==s[1]})),l.startExtent=o.region?s[\\\"s\\\"===o.region?1:0]:r,t.parent.inBrushDrag=!0,l.brushStartCallback()}).on(\\\"drag\\\",function(t){i.event.sourceEvent.stopPropagation();var e=t.height-i.mouse(this)[1]-2*n.verticalPadding,r=t.brush.svgBrush;r.wasDragged=!0,r.grabbingBar?r.newExtent=[e-r.grabPoint,e+r.barLength-r.grabPoint].map(t.unitToPaddedPx.invert):r.newExtent=[r.startExtent,t.unitToPaddedPx.invert(e)].sort(s);var a=Math.max(0,-r.newExtent[0]),o=Math.max(0,r.newExtent[1]-1);r.newExtent[0]+=a,r.newExtent[1]-=o,r.grabbingBar&&(r.newExtent[1]+=a,r.newExtent[0]-=o),t.brush.filterSpecified=!0,r.extent=r.stayingIntervals.concat([r.newExtent]),r.brushCallback(t),_(this.parentNode)}).on(\\\"dragend\\\",function(t){i.event.sourceEvent.stopPropagation();var e=t.brush,r=e.filter,n=e.svgBrush,a=n.grabbingBar;if(n.grabbingBar=!1,n.grabLocation=void 0,t.parent.inBrushDrag=!1,x(),!n.wasDragged)return n.wasDragged=void 0,n.clickableOrdinalRange?e.filterSpecified&&t.multiselect?n.extent.push(n.clickableOrdinalRange):(n.extent=[n.clickableOrdinalRange],e.filterSpecified=!0):a?(n.extent=n.stayingIntervals,0===n.extent.length&&A(e)):A(e),n.brushCallback(t),_(this.parentNode),void n.brushEndCallback(e.filterSpecified?r.getConsolidated():[]);var o=function(){r.set(r.getConsolidated())};if(t.ordinal){var s=t.unitTickvals;s[s.length-1]<s[0]&&s.reverse(),n.newExtent=[h(s,n.newExtent[0],n.stayingIntervals),p(s,n.newExtent[1],n.stayingIntervals)];var l=n.newExtent[1]>n.newExtent[0];n.extent=n.stayingIntervals.concat(l?[n.newExtent]:[]),n.extent.length||A(e),n.brushCallback(t),l?_(this.parentNode,o):(o(),_(this.parentNode))}else o();n.brushEndCallback(e.filterSpecified?r.getConsolidated():[])}))}function M(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[0,1]]}function T(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){r=n.map(function(t){return t.slice().sort(s)}).sort(M),t=T(r),e=r.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map(function(t){return t.slice()})}(e).slice();e.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t){var e=t.selectAll(\\\".\\\"+n.cn.axisBrush).data(o,a);e.enter().append(\\\"g\\\").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(\\\".background\\\").data(o);e.enter().append(\\\"rect\\\").classed(\\\"background\\\",!0).call(g).call(v).style(\\\"pointer-events\\\",\\\"auto\\\").attr(\\\"transform\\\",\\\"translate(0 \\\"+n.verticalPadding+\\\")\\\"),e.call(k).attr(\\\"height\\\",function(t){return t.height-n.verticalPadding});var r=t.selectAll(\\\".highlight-shadow\\\").data(o);r.enter().append(\\\"line\\\").classed(\\\"highlight-shadow\\\",!0).attr(\\\"x\\\",-n.bar.width/2).attr(\\\"stroke-width\\\",n.bar.width+n.bar.strokeWidth).attr(\\\"stroke\\\",n.bar.strokeColor).attr(\\\"opacity\\\",n.bar.strokeOpacity).attr(\\\"stroke-linecap\\\",\\\"butt\\\"),r.attr(\\\"y1\\\",function(t){return t.height}).call(b);var i=t.selectAll(\\\".highlight\\\").data(o);i.enter().append(\\\"line\\\").classed(\\\"highlight\\\",!0).attr(\\\"x\\\",-n.bar.width/2).attr(\\\"stroke-width\\\",n.bar.width-n.bar.strokeWidth).attr(\\\"stroke\\\",n.bar.fillColor).attr(\\\"opacity\\\",n.bar.fillOpacity).attr(\\\"stroke-linecap\\\",\\\"butt\\\"),i.attr(\\\"y1\\\",function(t){return t.height}).call(b)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map(function(t){return t.sort(s)}),t=e.multiselect?T(t.sort(M)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map(function(t){var e=[h(r,t[0],[]),p(r,t[1],[])];if(e[1]>e[0])return e}).filter(function(t){return t})).length)return}return t.length>1?t:t[0]}}},{\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"./constants\\\":1012,d3:148}],1010:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../plots/get_data\\\").getModuleCalcData,a=t(\\\"./plot\\\"),o=t(\\\"../../constants/xmlns_namespaces\\\");r.name=\\\"parcoords\\\",r.plot=function(t){var e=i(t.calcdata,\\\"parcoords\\\")[0];e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"parcoords\\\"),a=e._has&&e._has(\\\"parcoords\\\");i&&!a&&(n._paperdiv.selectAll(\\\".parcoords\\\").remove(),n._glimages.selectAll(\\\"*\\\").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(\\\".svg-container\\\");r.filter(function(t,e){return e===r.size()-1}).selectAll(\\\".gl-canvas-context, .gl-canvas-focus\\\").each(function(){var t=this.toDataURL(\\\"image/png\\\");e.append(\\\"svg:image\\\").attr({xmlns:o.svg,\\\"xlink:href\\\":t,preserveAspectRatio:\\\"none\\\",x:0,y:0,width:this.width,height:this.height})}),window.setTimeout(function(){n.selectAll(\\\"#filterBarPattern\\\").attr(\\\"id\\\",\\\"filterBarPattern\\\")},60)}},{\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../plots/get_data\\\":782,\\\"./plot\\\":1018,d3:148}],1011:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/has_colorscale\\\"),i=t(\\\"../../components/colorscale/calc\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../lib/gup\\\").wrap;e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArrayOrTypedArray(e.line.color),s=r?e.line.color:function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=.5;return e}(e._length),l=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,\\\"line\\\")&&i(e,s,\\\"line\\\",\\\"c\\\"),o({lineColor:s,cscale:l})}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693}],1012:[function(t,e,r){\\\"use strict\\\";e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:[\\\"contextLineLayer\\\",\\\"focusLineLayer\\\",\\\"pickLineLayer\\\"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:\\\"magenta\\\",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeColor:\\\"white\\\",strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:\\\"axis-extent-text\\\",parcoordsLineLayers:\\\"parcoords-line-layers\\\",parcoordsLineLayer:\\\"parcoords-lines\\\",parcoords:\\\"parcoords\\\",parcoordsControlView:\\\"parcoords-control-view\\\",yAxis:\\\"y-axis\\\",axisOverlays:\\\"axis-overlays\\\",axis:\\\"axis\\\",axisHeading:\\\"axis-heading\\\",axisTitle:\\\"axis-title\\\",axisExtent:\\\"axis-extent\\\",axisExtentTop:\\\"axis-extent-top\\\",axisExtentTopText:\\\"axis-extent-top-text\\\",axisExtentBottom:\\\"axis-extent-bottom\\\",axisExtentBottomText:\\\"axis-extent-bottom-text\\\",axisBrush:\\\"axis-brush\\\"},id:{filterBarPattern:\\\"filter-bar-pattern\\\"}}},{}],1013:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"../../plots/domain\\\").defaults,s=t(\\\"../../plots/array_container_defaults\\\"),l=t(\\\"./attributes\\\"),c=t(\\\"./axisbrush\\\"),u=t(\\\"./constants\\\").maxDimensionCount,f=t(\\\"./merge_length\\\");function h(t,e){function r(r,i){return n.coerce(t,e,l.dimensions,r,i)}var i=r(\\\"values\\\"),a=r(\\\"visible\\\");if(i&&i.length||(a=e.visible=!1),a){r(\\\"label\\\"),r(\\\"tickvals\\\"),r(\\\"ticktext\\\"),r(\\\"tickformat\\\"),r(\\\"range\\\"),r(\\\"multiselect\\\");var o=r(\\\"constraintrange\\\");o&&(e.constraintrange=c.cleanRanges(o,e))}}e.exports=function(t,e,r,c){function p(r,i){return n.coerce(t,e,l,r,i)}var d=t.dimensions;Array.isArray(d)&&d.length>u&&(n.log(\\\"parcoords traces support up to \\\"+u+\\\" dimensions at the moment\\\"),d.splice(u));var g=s(t,e,{name:\\\"dimensions\\\",handleItemDefaults:h}),v=function(t,e,r,o,s){var l=s(\\\"line.color\\\",r);if(i(t,\\\"line\\\")&&n.isArrayOrTypedArray(l)){if(l.length)return s(\\\"line.colorscale\\\"),a(t,e,o,s,{prefix:\\\"line.\\\",cLetter:\\\"c\\\"}),l.length;e.line.color=r}return 1/0}(t,e,r,c,p);o(e,c,p),Array.isArray(g)&&g.length||(e.visible=!1),f(e,g,\\\"values\\\",v);var m={family:c.font.family,size:Math.round(c.font.size/1.2),color:c.font.color};n.coerceFont(p,\\\"labelfont\\\",m),n.coerceFont(p,\\\"tickfont\\\",m),n.coerceFont(p,\\\"rangefont\\\",m)}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/domain\\\":771,\\\"./attributes\\\":1008,\\\"./axisbrush\\\":1009,\\\"./constants\\\":1012,\\\"./merge_length\\\":1016}],1014:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.colorbar={container:\\\"line\\\",min:\\\"cmin\\\",max:\\\"cmax\\\"},n.moduleType=\\\"trace\\\",n.name=\\\"parcoords\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"gl\\\",\\\"regl\\\",\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1008,\\\"./base_plot\\\":1010,\\\"./calc\\\":1011,\\\"./defaults\\\":1013,\\\"./plot\\\":1018}],1015:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=n([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 p0, p1, p2, p3,\\\\n               p4, p5, p6, p7,\\\\n               p8, p9, pa, pb,\\\\n               pc, pd, pe;\\\\n\\\\nattribute vec4 pf;\\\\n\\\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\\\n             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\\\n\\\\nuniform vec2 resolution,\\\\n             viewBoxPosition,\\\\n             viewBoxSize;\\\\n\\\\nuniform sampler2D palette;\\\\nuniform sampler2D mask;\\\\nuniform float maskHeight;\\\\n\\\\nuniform vec2 colorClamp;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvec4 unit_1 = vec4(1, 1, 1, 1);\\\\n\\\\nfloat val(mat4 p, mat4 v) {\\\\n    return dot(matrixCompMult(p, v) * unit_1, unit_1);\\\\n}\\\\n\\\\nfloat axisY(\\\\n        float x,\\\\n        mat4 d[4],\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\\\n    ) {\\\\n\\\\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\\\\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\\\\n    return y1 * (1.0 - x) + y2 * x;\\\\n}\\\\n\\\\nconst int bitsPerByte = 8;\\\\n\\\\nint mod2(int a) {\\\\n    return a - 2 * (a / 2);\\\\n}\\\\n\\\\nint mod8(int a) {\\\\n    return a - 8 * (a / 8);\\\\n}\\\\n\\\\nvec4 zero = vec4(0, 0, 0, 0);\\\\nvec4 unit_0 = vec4(1, 1, 1, 1);\\\\nvec2 xyProjection = vec2(1, 1);\\\\n\\\\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\\\\n    return mat4(clamp(m[0], lo[0], hi[0]),\\\\n                clamp(m[1], lo[1], hi[1]),\\\\n                clamp(m[2], lo[2], hi[2]),\\\\n                clamp(m[3], lo[3], hi[3]));\\\\n}\\\\n\\\\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\\\\n    return mclamp(p, lo, hi) == p;\\\\n}\\\\n\\\\nbool withinBoundingBox(\\\\n        mat4 d[4],\\\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD\\\\n    ) {\\\\n\\\\n    return mshow(d[0], loA, hiA) &&\\\\n           mshow(d[1], loB, hiB) &&\\\\n           mshow(d[2], loC, hiC) &&\\\\n           mshow(d[3], loD, hiD);\\\\n}\\\\n\\\\nbool withinRasterMask(mat4 d[4], sampler2D mask, float height) {\\\\n    bool result = true;\\\\n    int bitInByteStepper;\\\\n    float valY, valueY, scaleX;\\\\n    int hit, bitmask, valX;\\\\n    for(int i = 0; i < 4; i++) {\\\\n        for(int j = 0; j < 4; j++) {\\\\n            for(int k = 0; k < 4; k++) {\\\\n                bitInByteStepper = mod8(j * 4 + k);\\\\n                valX = i * 2 + j / 2;\\\\n                valY = d[i][j][k];\\\\n                valueY = valY * (height - 1.0) + 0.5;\\\\n                scaleX = (float(valX) + 0.5) / 8.0;\\\\n                hit = int(texture2D(mask, vec2(scaleX, (valueY + 0.5) / height))[3] * 255.0) / int(pow(2.0, float(bitInByteStepper)));\\\\n                result = result && mod2(hit) == 1;\\\\n            }\\\\n        }\\\\n    }\\\\n    return result;\\\\n}\\\\n\\\\nvec4 position(\\\\n        float depth,\\\\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\\\\n        mat4 dims[4],\\\\n        float signum,\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D,\\\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD,\\\\n        sampler2D mask, float maskHeight\\\\n    ) {\\\\n\\\\n    float x = 0.5 * signum + 0.5;\\\\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\\\\n\\\\n    float show = float(\\\\n                            withinBoundingBox(dims, loA, hiA, loB, hiB, loC, hiC, loD, hiD)\\\\n                         && withinRasterMask(dims, mask, maskHeight)\\\\n                      );\\\\n\\\\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\\\\n    float depthOrHide = depth + 2.0 * (1.0 - show);\\\\n\\\\n    return vec4(\\\\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\\\n        depthOrHide,\\\\n        1.0\\\\n    );\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\n    float prominence = abs(pf[3]);\\\\n\\\\n    mat4 p[4];\\\\n    p[0] = mat4(p0, p1, p2, p3);\\\\n    p[1] = mat4(p4, p5, p6, p7);\\\\n    p[2] = mat4(p8, p9, pa, pb);\\\\n    p[3] = mat4(pc, pd, pe, abs(pf));\\\\n\\\\n    gl_Position = position(\\\\n        1.0 - prominence,\\\\n        resolution, viewBoxPosition, viewBoxSize,\\\\n        p,\\\\n        sign(pf[3]),\\\\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\\\n        loA, hiA, loB, hiB, loC, hiC, loD, hiD,\\\\n        mask, maskHeight\\\\n    );\\\\n\\\\n    float clampedColorIndex = clamp((prominence - colorClamp[0]) / (colorClamp[1] - colorClamp[0]), 0.0, 1.0);\\\\n    fragColor = texture2D(palette, vec2((clampedColorIndex * 255.0 + 0.5) / 256.0, 0.5));\\\\n}\\\\n\\\"]),a=n([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 p0, p1, p2, p3,\\\\n               p4, p5, p6, p7,\\\\n               p8, p9, pa, pb,\\\\n               pc, pd, pe;\\\\n\\\\nattribute vec4 pf;\\\\n\\\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D;\\\\n\\\\nuniform vec2 resolution,\\\\n             viewBoxPosition,\\\\n             viewBoxSize;\\\\n\\\\nuniform sampler2D palette;\\\\n\\\\nuniform vec2 colorClamp;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvec2 xyProjection = vec2(1, 1);\\\\n\\\\nvec4 unit = vec4(1, 1, 1, 1);\\\\n\\\\nfloat val(mat4 p, mat4 v) {\\\\n    return dot(matrixCompMult(p, v) * unit, unit);\\\\n}\\\\n\\\\nfloat axisY(\\\\n        float x,\\\\n        mat4 d[4],\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\\\n    ) {\\\\n\\\\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\\\\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\\\\n    return y1 * (1.0 - x) + y2 * x;\\\\n}\\\\n\\\\nvec4 position(\\\\n        float depth,\\\\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\\\\n        mat4 dims[4],\\\\n        float signum,\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\\\n    ) {\\\\n\\\\n    float x = 0.5 * signum + 0.5;\\\\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\\\\n\\\\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\\\\n\\\\n    return vec4(\\\\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\\\n        depth,\\\\n        1.0\\\\n    );\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\n    float prominence = abs(pf[3]);\\\\n\\\\n    mat4 p[4];\\\\n    p[0] = mat4(p0, p1, p2, p3);\\\\n    p[1] = mat4(p4, p5, p6, p7);\\\\n    p[2] = mat4(p8, p9, pa, pb);\\\\n    p[3] = mat4(pc, pd, pe, abs(pf));\\\\n\\\\n    gl_Position = position(\\\\n        1.0 - prominence,\\\\n        resolution, viewBoxPosition, viewBoxSize,\\\\n        p,\\\\n        sign(pf[3]),\\\\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D\\\\n    );\\\\n\\\\n    float clampedColorIndex = clamp((prominence - colorClamp[0]) / (colorClamp[1] - colorClamp[0]), 0.0, 1.0);\\\\n    fragColor = texture2D(palette, vec2((clampedColorIndex * 255.0 + 0.5) / 256.0, 0.5));\\\\n}\\\\n\\\"]),o=n([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 p0, p1, p2, p3,\\\\n               p4, p5, p6, p7,\\\\n               p8, p9, pa, pb,\\\\n               pc, pd, pe;\\\\n\\\\nattribute vec4 pf;\\\\n\\\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\\\n             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\\\n\\\\nuniform vec2 resolution,\\\\n             viewBoxPosition,\\\\n             viewBoxSize;\\\\n\\\\nuniform sampler2D mask;\\\\nuniform float maskHeight;\\\\n\\\\nuniform vec2 colorClamp;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvec4 unit_1 = vec4(1, 1, 1, 1);\\\\n\\\\nfloat val(mat4 p, mat4 v) {\\\\n    return dot(matrixCompMult(p, v) * unit_1, unit_1);\\\\n}\\\\n\\\\nfloat axisY(\\\\n        float x,\\\\n        mat4 d[4],\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\\\n    ) {\\\\n\\\\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\\\\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\\\\n    return y1 * (1.0 - x) + y2 * x;\\\\n}\\\\n\\\\nconst int bitsPerByte = 8;\\\\n\\\\nint mod2(int a) {\\\\n    return a - 2 * (a / 2);\\\\n}\\\\n\\\\nint mod8(int a) {\\\\n    return a - 8 * (a / 8);\\\\n}\\\\n\\\\nvec4 zero = vec4(0, 0, 0, 0);\\\\nvec4 unit_0 = vec4(1, 1, 1, 1);\\\\nvec2 xyProjection = vec2(1, 1);\\\\n\\\\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\\\\n    return mat4(clamp(m[0], lo[0], hi[0]),\\\\n                clamp(m[1], lo[1], hi[1]),\\\\n                clamp(m[2], lo[2], hi[2]),\\\\n                clamp(m[3], lo[3], hi[3]));\\\\n}\\\\n\\\\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\\\\n    return mclamp(p, lo, hi) == p;\\\\n}\\\\n\\\\nbool withinBoundingBox(\\\\n        mat4 d[4],\\\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD\\\\n    ) {\\\\n\\\\n    return mshow(d[0], loA, hiA) &&\\\\n           mshow(d[1], loB, hiB) &&\\\\n           mshow(d[2], loC, hiC) &&\\\\n           mshow(d[3], loD, hiD);\\\\n}\\\\n\\\\nbool withinRasterMask(mat4 d[4], sampler2D mask, float height) {\\\\n    bool result = true;\\\\n    int bitInByteStepper;\\\\n    float valY, valueY, scaleX;\\\\n    int hit, bitmask, valX;\\\\n    for(int i = 0; i < 4; i++) {\\\\n        for(int j = 0; j < 4; j++) {\\\\n            for(int k = 0; k < 4; k++) {\\\\n                bitInByteStepper = mod8(j * 4 + k);\\\\n                valX = i * 2 + j / 2;\\\\n                valY = d[i][j][k];\\\\n                valueY = valY * (height - 1.0) + 0.5;\\\\n                scaleX = (float(valX) + 0.5) / 8.0;\\\\n                hit = int(texture2D(mask, vec2(scaleX, (valueY + 0.5) / height))[3] * 255.0) / int(pow(2.0, float(bitInByteStepper)));\\\\n                result = result && mod2(hit) == 1;\\\\n            }\\\\n        }\\\\n    }\\\\n    return result;\\\\n}\\\\n\\\\nvec4 position(\\\\n        float depth,\\\\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\\\\n        mat4 dims[4],\\\\n        float signum,\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D,\\\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD,\\\\n        sampler2D mask, float maskHeight\\\\n    ) {\\\\n\\\\n    float x = 0.5 * signum + 0.5;\\\\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\\\\n\\\\n    float show = float(\\\\n                            withinBoundingBox(dims, loA, hiA, loB, hiB, loC, hiC, loD, hiD)\\\\n                         && withinRasterMask(dims, mask, maskHeight)\\\\n                      );\\\\n\\\\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\\\\n    float depthOrHide = depth + 2.0 * (1.0 - show);\\\\n\\\\n    return vec4(\\\\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\\\n        depthOrHide,\\\\n        1.0\\\\n    );\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\n    float prominence = abs(pf[3]);\\\\n\\\\n    mat4 p[4];\\\\n    p[0] = mat4(p0, p1, p2, p3);\\\\n    p[1] = mat4(p4, p5, p6, p7);\\\\n    p[2] = mat4(p8, p9, pa, pb);\\\\n    p[3] = mat4(pc, pd, pe, abs(pf));\\\\n\\\\n    gl_Position = position(\\\\n        1.0 - prominence,\\\\n        resolution, viewBoxPosition, viewBoxSize,\\\\n        p,\\\\n        sign(pf[3]),\\\\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\\\n        loA, hiA, loB, hiB, loC, hiC, loD, hiD,\\\\n        mask, maskHeight\\\\n    );\\\\n\\\\n    fragColor = vec4(pf.rgb, 1.0);\\\\n}\\\\n\\\"]),s=n([\\\"precision lowp float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n    gl_FragColor = fragColor;\\\\n}\\\\n\\\"]),l=t(\\\"../../lib\\\"),c=1e-6,u=1e-7,f=2048,h=64,p=2,d=4,g=8,v=h/g,m=[119,119,119],y=new Uint8Array(4),x=new Uint8Array(4),b={shape:[256,1],format:\\\"rgba\\\",type:\\\"uint8\\\",mag:\\\"nearest\\\",min:\\\"nearest\\\"};function _(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function w(t,e,r,n,i,a){var o=a.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:y})}(t),r.drawCompleted=!0),function s(l){var c;c=Math.min(n,i-l*n),a.offset=p*l*n,a.count=p*c,0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],_(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(e(a),l*n+c<i&&(r.currentRafs[o]=window.requestAnimationFrame(function(){s(l+1)})),r.drawCompleted=!1)}(0)}function k(t,e){return(t>>>8*e)%256/255}function M(t,e,r){var n,i,a,o=[];for(i=0;i<t;i++)for(a=0;a<p;a++)for(n=0;n<d;n++)o.push(e[i*h+r*d+n]),r*d+n===h-1&&a%2==0&&(o[o.length-1]*=-1);return o}e.exports=function(t,e){var r,n,p,d,y,A=e.context,T=e.pick,S=e.regl,C={currentRafs:{},drawCompleted:!0,clearOnly:!1},E=function(t){for(var e={},r=0;r<16;r++)e[\\\"p\\\"+r.toString(16)]=t.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array(0)});return e}(S),L=S.texture(b);O(e);var z=S({profile:!1,blend:{enable:A,func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:1,dstAlpha:1},equation:{rgb:\\\"add\\\",alpha:\\\"add\\\"},color:[0,0,0,0]},depth:{enable:!A,mask:!0,func:\\\"less\\\",range:[0,1]},cull:{enable:!0,face:\\\"back\\\"},scissor:{enable:!0,box:{x:S.prop(\\\"scissorX\\\"),y:S.prop(\\\"scissorY\\\"),width:S.prop(\\\"scissorWidth\\\"),height:S.prop(\\\"scissorHeight\\\")}},viewport:{x:S.prop(\\\"viewportX\\\"),y:S.prop(\\\"viewportY\\\"),width:S.prop(\\\"viewportWidth\\\"),height:S.prop(\\\"viewportHeight\\\")},dither:!1,vert:T?o:A?a:i,frag:s,primitive:\\\"lines\\\",lineWidth:1,attributes:E,uniforms:{resolution:S.prop(\\\"resolution\\\"),viewBoxPosition:S.prop(\\\"viewBoxPosition\\\"),viewBoxSize:S.prop(\\\"viewBoxSize\\\"),dim1A:S.prop(\\\"dim1A\\\"),dim2A:S.prop(\\\"dim2A\\\"),dim1B:S.prop(\\\"dim1B\\\"),dim2B:S.prop(\\\"dim2B\\\"),dim1C:S.prop(\\\"dim1C\\\"),dim2C:S.prop(\\\"dim2C\\\"),dim1D:S.prop(\\\"dim1D\\\"),dim2D:S.prop(\\\"dim2D\\\"),loA:S.prop(\\\"loA\\\"),hiA:S.prop(\\\"hiA\\\"),loB:S.prop(\\\"loB\\\"),hiB:S.prop(\\\"hiB\\\"),loC:S.prop(\\\"loC\\\"),hiC:S.prop(\\\"hiC\\\"),loD:S.prop(\\\"loD\\\"),hiD:S.prop(\\\"hiD\\\"),palette:L,mask:S.prop(\\\"maskTexture\\\"),maskHeight:S.prop(\\\"maskHeight\\\"),colorClamp:S.prop(\\\"colorClamp\\\")},offset:S.prop(\\\"offset\\\"),count:S.prop(\\\"count\\\")});function O(t){r=t.model,n=t.viewModel,p=n.dimensions.slice(),d=p[0]?p[0].values.length:0;var e=r.lines,i=T?e.color.map(function(t,r){return r/e.color.length}):e.color,a=Math.max(1/255,Math.pow(1/i.length,1/3)),o=function(t,e,r){for(var n,i=e.length,a=[],o=0;o<t;o++)for(var s=0;s<h;s++)a.push(s<i?e[s].paddedUnitValues[o]:s===h-1?(n=r[o],Math.max(c,Math.min(1-c,n))):s>=h-4?k(o,h-2-s):.5);return a}(d,p,i);!function(t,e,r){for(var n=0;n<16;n++)t[\\\"p\\\"+n.toString(16)](M(e,r,n))}(E,d,o),L=S.texture(l.extendFlat({data:function(t,e,r){for(var n=[],i=0;i<256;i++){var a=t(i/255);n.push((e?m:a).concat(r))}return n}(r.unitToColor,A,Math.round(255*(A?a:1)))},b))}var I=[0,1];var P=[];function D(t,e,n,i,a,o,s,c,u,f,h){var p,d,g,v,m=[t,e],y=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})});for(p=0;p<2;p++)for(v=m[p],d=0;d<4;d++)for(g=0;g<16;g++)y[p][d][g]=g+16*d===v?1:0;var x=r.lines.canvasOverdrag,b=r.domain,_=r.canvasWidth,w=r.canvasHeight;return l.extendFlat({key:s,resolution:[_,w],viewBoxPosition:[n+x,i],viewBoxSize:[a,o],i:t,ii:e,dim1A:y[0][0],dim1B:y[0][1],dim1C:y[0][2],dim1D:y[0][3],dim2A:y[1][0],dim2B:y[1][1],dim2C:y[1][2],dim2D:y[1][3],colorClamp:I,scissorX:(c===u?0:n+x)+(r.pad.l-x)+r.layoutWidth*b.x[0],scissorWidth:(c===f?_-n+x:a+.5)+(c===u?n+x:0),scissorY:i+r.pad.b+r.layoutHeight*b.y[0],scissorHeight:o,viewportX:r.pad.l-x+r.layoutWidth*b.x[0],viewportY:r.pad.b+r.layoutHeight*b.y[0],viewportWidth:_,viewportHeight:w},h)}return{setColorDomain:function(t){I[0]=t[0],I[1]=t[1]},render:function(t,e,n){var i,a,o,s=t.length,l=1/0,c=-1/0;for(i=0;i<s;i++)t[i].dim2.canvasX>c&&(c=t[i].dim2.canvasX,o=i),t[i].dim1.canvasX<l&&(l=t[i].dim1.canvasX,a=i);0===s&&_(S,0,0,r.canvasWidth,r.canvasHeight);var h=A?{}:function(){var t,e,r,n=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})});for(t=0;t<2;t++)for(e=0;e<4;e++)for(r=0;r<16;r++){var i,a=r+16*e;i=a<p.length?p[a].brush.filter.getBounds()[t]:t,n[t][e][r]=i+(2*t-1)*u}function o(t,e){var r=f-1;return[Math.max(0,Math.floor(e[0]*r)),Math.min(r,Math.ceil(e[1]*r))]}for(var s=Array.apply(null,new Array(f*v)).map(function(){return 255}),l=0;l<p.length;l++){var c=l%g,h=(l-c)/g,d=Math.pow(2,c),m=p[l],x=m.brush.filter.get();if(!(x.length<2))for(var b=o(0,x[0])[1],_=1;_<x.length;_++){for(var w=o(0,x[_]),k=b+1;k<w[0];k++)s[k*v+h]&=~d;b=Math.max(b,w[1])}}var M={shape:[v,f],format:\\\"alpha\\\",type:\\\"uint8\\\",mag:\\\"nearest\\\",min:\\\"nearest\\\",data:s};return y?y(M):y=S.texture(M),{maskTexture:y,maskHeight:f,loA:n[0][0],loB:n[0][1],loC:n[0][2],loD:n[0][3],hiA:n[1][0],hiB:n[1][1],hiC:n[1][2],hiD:n[1][3]}}();for(i=0;i<s;i++){var m=t[i],x=m.dim1,b=x.crossfilterDimensionIndex,k=m.canvasX,M=m.canvasY,T=m.dim2.crossfilterDimensionIndex,E=m.panelSizeX,L=m.panelSizeY,O=k+E;if(e||!P[b]||P[b][0]!==k||P[b][1]!==O){P[b]=[k,O];var I=D(b,T,k,M,E,L,x.crossfilterDimensionIndex,i,a,o,h);C.clearOnly=n,w(S,z,C,e?r.lines.blockLineCount:d,d,I)}}},readPixel:function(t,e){return S.read({x:t,y:e,width:1,height:1,data:x}),x},readPixels:function(t,e,r,n){var i=new Uint8Array(4*r*n);return S.read({x:t,y:e,width:r,height:n,data:i}),i},destroy:function(){for(var e in t.style[\\\"pointer-events\\\"]=\\\"none\\\",L.destroy(),y&&y.destroy(),E)E[e].destroy()},update:O}}},{\\\"../../lib\\\":696,glslify:392}],1016:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i,a;for(n||(n=1/0),i=0;i<e.length;i++)(a=e[i]).visible&&(n=Math.min(n,a[r].length));for(n===1/0&&(n=0),t._length=n,i=0;i<e.length;i++)(a=e[i]).visible&&(a._length=n);return n}},{}],1017:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lines\\\"),i=t(\\\"./constants\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"d3\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"../../lib/gup\\\"),c=l.keyFun,u=l.repeat,f=l.unwrap,h=t(\\\"./axisbrush\\\");function p(t){return!(\\\"visible\\\"in t)||t.visible}function d(t){var e=t.range?t.range[0]:a.aggNums(Math.min,null,t.values,t._length),r=t.range?t.range[1]:a.aggNums(Math.max,null,t.values,t._length);return!isNaN(e)&&isFinite(e)||(e=0),!isNaN(r)&&isFinite(r)||(r=0),e===r&&(0===e?(e-=1,r+=1):(e*=.9,r*=1.1)),[e,r]}function g(t){return t.dimensions.some(function(t){return t.brush.filterSpecified})}function v(t,e,r){var n=f(e),s=n.trace,l=n.lineColor,c=n.cscale,u=s.line,h=s.domain,g=s.dimensions,v=t.width,m=s.labelfont,y=s.tickfont,x=s.rangefont,b=a.extendDeepNoArrays({},u,{color:l.map(o.scale.linear().domain(d({values:l,range:[u.cmin,u.cmax],_length:s._length}))),blockLineCount:i.blockLineCount,canvasOverdrag:i.overdrag*i.canvasPixelRatio}),_=Math.floor(v*(h.x[1]-h.x[0])),w=Math.floor(t.height*(h.y[1]-h.y[0])),k=t.margin||{l:80,r:80,t:100,b:80},M=_,A=w;return{key:r,colCount:g.filter(p).length,dimensions:g,tickDistance:i.tickDistance,unitToColor:function(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return o.rgb(t[1])}),n=\\\"rgb\\\".split(\\\"\\\").map(function(t){return o.scale.linear().clamp(!0).domain(e).range(r.map((n=t,function(t){return t[n]})));var n});return function(t){return n.map(function(e){return e(t)})}}(c),lines:b,labelFont:m,tickFont:y,rangeFont:x,layoutWidth:v,layoutHeight:t.height,domain:h,translateX:h.x[0]*v,translateY:t.height-h.y[1]*t.height,pad:k,canvasWidth:M*i.canvasPixelRatio+2*b.canvasOverdrag,canvasHeight:A*i.canvasPixelRatio,width:M,height:A,canvasPixelRatio:i.canvasPixelRatio}}function m(t,e,r){var n=r.width,s=r.height,l=r.dimensions,c=r.canvasPixelRatio,u=function(t){return n*t/Math.max(1,r.colCount-1)},f=i.verticalPadding/s,v=function(t,e){return o.scale.linear().range([e,t-e])}(s,i.verticalPadding),m={key:r.key,xScale:u,model:r,inBrushDrag:!1},y={};return m.dimensions=l.filter(p).map(function(n,l){var p=function(t,e){return o.scale.linear().domain(d(t)).range([e,1-e])}(n,f),x=y[n.label];y[n.label]=(x||0)+1;var b=n.label+(x?\\\"__\\\"+x:\\\"\\\"),_=n.constraintrange,w=_&&_.length;w&&!Array.isArray(_[0])&&(_=[_]);var k=w?_.map(function(t){return t.map(p)}):[[0,1]],M=n.values;M.length>n._length&&(M=M.slice(0,n._length));var A,T=n.tickvals;function S(t,e){return{val:t,text:A[e]}}function C(t,e){return t.val-e.val}if(Array.isArray(T)&&T.length){A=n.ticktext,Array.isArray(A)&&A.length?A.length>T.length?A=A.slice(0,T.length):T.length>A.length&&(T=T.slice(0,A.length)):A=T.map(o.format(n.tickformat));for(var E=1;E<T.length;E++)if(T[E]<T[E-1]){for(var L=T.map(S).sort(C),z=0;z<T.length;z++)T[z]=L[z].val,A[z]=L[z].text;break}}else T=void 0;return{key:b,label:n.label,tickFormat:n.tickformat,tickvals:T,ticktext:A,ordinal:!!T,multiselect:n.multiselect,xIndex:l,crossfilterDimensionIndex:l,visibleIndex:n._index,height:s,values:M,paddedUnitValues:M.map(p),unitTickvals:T&&T.map(p),xScale:u,x:u(l),canvasX:u(l)*c,unitToPaddedPx:v,domainScale:function(t,e,r,n,i){var a,s,l=d(r);return n?o.scale.ordinal().domain(n.map((a=o.format(r.tickformat),s=i,s?function(t,e){var r=s[e];return null==r?a(t):r}:a))).range(n.map(function(r){var n=(r-l[0])/(l[1]-l[0]);return t-e+n*(2*e-t)})):o.scale.linear().domain(l).range([t-e,e])}(s,i.verticalPadding,n,T,A),ordinalScale:function(t){if(t.tickvals){var e=d(t);return o.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}}(n),parent:m,model:r,brush:h.makeBrush(t,w,k,function(){t.linePickActive(!1)},function(){var e=m;e.focusLayer&&e.focusLayer.render(e.panels,!0);var r=g(e);!t.contextShown()&&r?(e.contextLayer&&e.contextLayer.render(e.panels,!0),t.contextShown(!0)):t.contextShown()&&!r&&(e.contextLayer&&e.contextLayer.render(e.panels,!0,!0),t.contextShown(!1))},function(r){var i=m;if(i.focusLayer.render(i.panels,!0),i.pickLayer&&i.pickLayer.render(i.panels,!0),t.linePickActive(!0),e&&e.filterChanged){var o=p.invert,s=r.map(function(t){return t.map(o).sort(a.sorterAsc)}).sort(function(t,e){return t[0]-e[0]});e.filterChanged(i.key,n._index,s)}})}}),m}function y(t){t.classed(i.cn.axisExtentText,!0).attr(\\\"text-anchor\\\",\\\"middle\\\").style(\\\"cursor\\\",\\\"default\\\").style(\\\"user-select\\\",\\\"none\\\")}e.exports=function(t,e,r,l,p,d){var x,b,_=(x=!0,b=!1,{linePickActive:function(t){return arguments.length?x=!!t:x},contextShown:function(t){return arguments.length?b=!!t:b}}),w=l.filter(function(t){return f(t).trace.visible}).map(v.bind(0,p)).map(m.bind(0,_,d));r.each(function(t,e){return a.extendFlat(t,w[e])});var k=r.selectAll(\\\".gl-canvas\\\").each(function(t){t.viewModel=w[0],t.model=t.viewModel?t.viewModel.model:null}),M=null;k.filter(function(t){return t.pick}).style(\\\"pointer-events\\\",\\\"auto\\\").on(\\\"mousemove\\\",function(t){if(_.linePickActive()&&t.lineLayer&&d&&d.hover){var e=o.event,r=this.width,n=this.height,i=o.mouse(this),a=i[0],s=i[1];if(a<0||s<0||a>=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),c=0!==l[3],u=c?l[2]+256*(l[1]+256*l[0]):null,f={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:u};u!==M&&(c?d.hover(f):d.unhover&&d.unhover(f),M=u)}}),k.style(\\\"opacity\\\",function(t){return t.pick?.01:1}),e.style(\\\"background\\\",\\\"rgba(255, 255, 255, 0)\\\");var A=e.selectAll(\\\".\\\"+i.cn.parcoords).data(w,c);A.exit().remove(),A.enter().append(\\\"g\\\").classed(i.cn.parcoords,!0).style(\\\"shape-rendering\\\",\\\"crispEdges\\\").style(\\\"pointer-events\\\",\\\"none\\\"),A.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.model.translateX+\\\",\\\"+t.model.translateY+\\\")\\\"});var T=A.selectAll(\\\".\\\"+i.cn.parcoordsControlView).data(u,c);T.enter().append(\\\"g\\\").classed(i.cn.parcoordsControlView,!0),T.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.model.pad.l+\\\",\\\"+t.model.pad.t+\\\")\\\"});var S=T.selectAll(\\\".\\\"+i.cn.yAxis).data(function(t){return t.dimensions},c);function C(t,e){for(var r=e.panels||(e.panels=[]),n=t.data(),i=n.length-1,a=0;a<i;a++){var o=r[a]||(r[a]={}),s=n[a],l=n[a+1];o.dim1=s,o.dim2=l,o.canvasX=s.canvasX,o.panelSizeX=l.canvasX-s.canvasX,o.panelSizeY=e.model.canvasHeight,o.y=0,o.canvasY=0}}S.enter().append(\\\"g\\\").classed(i.cn.yAxis,!0),T.each(function(t){C(S,t)}),k.each(function(t){if(t.viewModel){!t.lineLayer||d?t.lineLayer=n(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||d;t.lineLayer.render(t.viewModel.panels,e)}}),S.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.xScale(t.xIndex)+\\\", 0)\\\"}),S.call(o.behavior.drag().origin(function(t){return t}).on(\\\"drag\\\",function(t){var e=t.parent;_.linePickActive(!1),t.x=Math.max(-i.overdrag,Math.min(t.model.width+i.overdrag,o.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,S.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),C(S,e),S.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.xScale(t.xIndex)+\\\", 0)\\\"}),o.select(this).attr(\\\"transform\\\",\\\"translate(\\\"+t.x+\\\", 0)\\\"),S.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!g(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)}).on(\\\"dragend\\\",function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,C(S,e),o.select(this).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\", 0)\\\"}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!g(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),_.linePickActive(!0),d&&d.axesMoved&&d.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),S.exit().remove();var E=S.selectAll(\\\".\\\"+i.cn.axisOverlays).data(u,c);E.enter().append(\\\"g\\\").classed(i.cn.axisOverlays,!0),E.selectAll(\\\".\\\"+i.cn.axis).remove();var L=E.selectAll(\\\".\\\"+i.cn.axis).data(u,c);L.enter().append(\\\"g\\\").classed(i.cn.axis,!0),L.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain();o.select(this).call(o.svg.axis().orient(\\\"left\\\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n:null).tickFormat(t.ordinal?function(t){return t}:null).scale(r)),s.font(L.selectAll(\\\"text\\\"),t.model.tickFont)}),L.selectAll(\\\".domain, .tick>line\\\").attr(\\\"fill\\\",\\\"none\\\").attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-opacity\\\",.25).attr(\\\"stroke-width\\\",\\\"1px\\\"),L.selectAll(\\\"text\\\").style(\\\"text-shadow\\\",\\\"1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff\\\").style(\\\"cursor\\\",\\\"default\\\").style(\\\"user-select\\\",\\\"none\\\");var z=E.selectAll(\\\".\\\"+i.cn.axisHeading).data(u,c);z.enter().append(\\\"g\\\").classed(i.cn.axisHeading,!0);var O=z.selectAll(\\\".\\\"+i.cn.axisTitle).data(u,c);O.enter().append(\\\"text\\\").classed(i.cn.axisTitle,!0).attr(\\\"text-anchor\\\",\\\"middle\\\").style(\\\"cursor\\\",\\\"ew-resize\\\").style(\\\"user-select\\\",\\\"none\\\").style(\\\"pointer-events\\\",\\\"auto\\\"),O.attr(\\\"transform\\\",\\\"translate(0,\\\"+-i.axisTitleOffset+\\\")\\\").text(function(t){return t.label}).each(function(t){s.font(o.select(this),t.model.labelFont)});var I=E.selectAll(\\\".\\\"+i.cn.axisExtent).data(u,c);I.enter().append(\\\"g\\\").classed(i.cn.axisExtent,!0);var P=I.selectAll(\\\".\\\"+i.cn.axisExtentTop).data(u,c);P.enter().append(\\\"g\\\").classed(i.cn.axisExtentTop,!0),P.attr(\\\"transform\\\",\\\"translate(0,\\\"+-i.axisExtentOffset+\\\")\\\");var D=P.selectAll(\\\".\\\"+i.cn.axisExtentTopText).data(u,c);function R(t,e){if(t.ordinal)return\\\"\\\";var r=t.domainScale.domain();return o.format(t.tickFormat)(r[e?r.length-1:0])}D.enter().append(\\\"text\\\").classed(i.cn.axisExtentTopText,!0).call(y),D.text(function(t){return R(t,!0)}).each(function(t){s.font(o.select(this),t.model.rangeFont)});var B=I.selectAll(\\\".\\\"+i.cn.axisExtentBottom).data(u,c);B.enter().append(\\\"g\\\").classed(i.cn.axisExtentBottom,!0),B.attr(\\\"transform\\\",function(t){return\\\"translate(0,\\\"+(t.model.height+i.axisExtentOffset)+\\\")\\\"});var F=B.selectAll(\\\".\\\"+i.cn.axisExtentBottomText).data(u,c);F.enter().append(\\\"text\\\").classed(i.cn.axisExtentBottomText,!0).attr(\\\"dy\\\",\\\"0.75em\\\").call(y),F.text(function(t){return R(t)}).each(function(t){s.font(o.select(this),t.model.rangeFont)}),h.ensureAxisBrush(E)}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"./axisbrush\\\":1009,\\\"./constants\\\":1012,\\\"./lines\\\":1015,d3:148}],1018:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./parcoords\\\"),i=t(\\\"../../lib/prepare_regl\\\");e.exports=function(t,e){var r=t._fullLayout,a=r._toppaper,o=r._paperdiv,s=r._glcontainer;if(i(t)){var l={},c={},u=r._size;e.forEach(function(e,r){l[r]=t.data[r].dimensions,c[r]=t.data[r].dimensions.slice()});n(o,a,s,e,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:function(e,r,n){var i=c[e][r],a=n.map(function(t){return t.slice()});a.length?(1===a.length&&(a=a[0]),i.constraintrange=a,a=[a]):(delete i.constraintrange,a=null);var o={};o[\\\"dimensions[\\\"+r+\\\"].constraintrange\\\"]=a,t.emit(\\\"plotly_restyle\\\",[o,[e]])},hover:function(e){t.emit(\\\"plotly_hover\\\",e)},unhover:function(e){t.emit(\\\"plotly_unhover\\\",e)},axesMoved:function(e,r){function n(t){return!(\\\"visible\\\"in t)||t.visible}function i(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}var a=function(t){return function(e,n){return i(r,t,e)-i(r,t,n)}}(c[e].filter(n));l[e].sort(a),c[e].filter(function(t){return!n(t)}).sort(function(t){return c[e].indexOf(t)}).forEach(function(t){l[e].splice(l[e].indexOf(t),1),l[e].splice(c[e].indexOf(t),0,t)}),t.emit(\\\"plotly_restyle\\\")}})}}},{\\\"../../lib/prepare_regl\\\":710,\\\"./parcoords\\\":1017}],1019:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color/attributes\\\"),i=t(\\\"../../plots/font_attributes\\\"),a=t(\\\"../../plots/attributes\\\"),o=t(\\\"../../plots/domain\\\").attributes,s=t(\\\"../../lib/extend\\\").extendFlat,l=i({editType:\\\"calc\\\",arrayOk:!0,colorEditType:\\\"style\\\"});e.exports={labels:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},label0:{valType:\\\"number\\\",dflt:0,editType:\\\"calc\\\"},dlabel:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},values:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},marker:{colors:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},line:{color:{valType:\\\"color\\\",dflt:n.defaultLine,arrayOk:!0,editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,dflt:0,arrayOk:!0,editType:\\\"style\\\"},editType:\\\"calc\\\"},editType:\\\"calc\\\"},text:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},hovertext:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"style\\\"},scalegroup:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},textinfo:{valType:\\\"flaglist\\\",flags:[\\\"label\\\",\\\"text\\\",\\\"value\\\",\\\"percent\\\"],extras:[\\\"none\\\"],editType:\\\"calc\\\"},hoverinfo:s({},a.hoverinfo,{flags:[\\\"label\\\",\\\"text\\\",\\\"value\\\",\\\"percent\\\",\\\"name\\\"]}),textposition:{valType:\\\"enumerated\\\",values:[\\\"inside\\\",\\\"outside\\\",\\\"auto\\\",\\\"none\\\"],dflt:\\\"auto\\\",arrayOk:!0,editType:\\\"calc\\\"},textfont:s({},l,{}),insidetextfont:s({},l,{}),outsidetextfont:s({},l,{}),title:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},titleposition:{valType:\\\"enumerated\\\",values:[\\\"top left\\\",\\\"top center\\\",\\\"top right\\\",\\\"middle center\\\",\\\"bottom left\\\",\\\"bottom center\\\",\\\"bottom right\\\"],editType:\\\"calc\\\"},titlefont:s({},l,{}),domain:o({name:\\\"pie\\\",trace:!0,editType:\\\"calc\\\"}),hole:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"calc\\\"},sort:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},direction:{valType:\\\"enumerated\\\",values:[\\\"clockwise\\\",\\\"counterclockwise\\\"],dflt:\\\"counterclockwise\\\",editType:\\\"calc\\\"},rotation:{valType:\\\"number\\\",min:-360,max:360,dflt:0,editType:\\\"calc\\\"},pull:{valType:\\\"number\\\",min:0,max:1,dflt:0,arrayOk:!0,editType:\\\"calc\\\"}}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772}],1020:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../plots/get_data\\\").getModuleCalcData;r.name=\\\"pie\\\",r.plot=function(t){var e=n.getModule(\\\"pie\\\"),r=i(t.calcdata,e)[0];r.length&&e.plot(t,r)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"pie\\\"),a=e._has&&e._has(\\\"pie\\\");i&&!a&&n._pielayer.selectAll(\\\"g.trace\\\").remove()}},{\\\"../../plots/get_data\\\":782,\\\"../../registry\\\":828}],1021:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\").isArrayOrTypedArray,a=t(\\\"tinycolor2\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"./helpers\\\");r.calc=function(t,e){var r,l,c,u,f,h=e.values,p=i(h)&&h.length,d=e.labels,g=e.marker.colors||[],v=[],m=t._fullLayout,y=m._piecolormap,x={},b=0,_=m.hiddenlabels||[];if(e.dlabel)for(d=new Array(h.length),r=0;r<h.length;r++)d[r]=String(e.label0+r*e.dlabel);function w(t,e){return!!t&&(!!(t=a(t)).isValid()&&(t=o.addOpacity(t,t.getAlpha()),y[e]||(y[e]=t),t))}var k=(p?h:d).length;for(r=0;r<k;r++){if(p){if(l=h[r],!n(l))continue;if((l=+l)<0)continue}else l=1;void 0!==(c=d[r])&&\\\"\\\"!==c||(c=r);var M=x[c=String(c)];void 0===M?(x[c]=v.length,(u=-1!==_.indexOf(c))||(b+=l),v.push({v:l,label:c,color:w(g[r],c),i:r,pts:[r],hidden:u})):((f=v[M]).v+=l,f.pts.push(r),f.hidden||(b+=l),!1===f.color&&g[r]&&(f.color=w(g[r],c)))}if(e.sort&&v.sort(function(t,e){return e.v-t.v}),v[0]&&(v[0].vTotal=b),e.textinfo&&\\\"none\\\"!==e.textinfo){var A,T=-1!==e.textinfo.indexOf(\\\"label\\\"),S=-1!==e.textinfo.indexOf(\\\"text\\\"),C=-1!==e.textinfo.indexOf(\\\"value\\\"),E=-1!==e.textinfo.indexOf(\\\"percent\\\"),L=m.separators;for(r=0;r<v.length;r++){if(f=v[r],A=T?[f.label]:[],S){var z=s.getFirstFilled(e.text,f.pts);z&&A.push(z)}C&&A.push(s.formatPieValue(f.v,L)),E&&A.push(s.formatPiePercent(f.v/b,L)),f.text=A.join(\\\"<br>\\\")}}return v},r.crossTraceCalc=function(t){var e=t._fullLayout,r=t.calcdata,n=e.piecolorway,i=e._piecolormap;e.extendpiecolors&&(n=function(t){var e,r=JSON.stringify(t),n=l[r];if(!n){for(n=t.slice(),e=0;e<t.length;e++)n.push(a(t[e]).lighten(20).toHexString());for(e=0;e<t.length;e++)n.push(a(t[e]).darken(20).toHexString());l[r]=n}return n}(n));var o,s,c,u,f=0;for(o=0;o<r.length;o++)if(\\\"pie\\\"===(c=r[o])[0].trace.type)for(s=0;s<c.length;s++)!1===(u=c[s]).color&&(i[u.label]?u.color=i[u.label]:(i[u.label]=u.color=n[f%n.length],f++))};var l={}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"./helpers\\\":1024,\\\"fast-isnumeric\\\":214,tinycolor2:514}],1022:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"../../plots/domain\\\").defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}var l,c=n.coerceFont,u=s(\\\"values\\\"),f=n.isArrayOrTypedArray(u),h=s(\\\"labels\\\");if(Array.isArray(h)?(l=h.length,f&&(l=Math.min(l,u.length))):f&&(l=u.length,s(\\\"label0\\\"),s(\\\"dlabel\\\")),l){e._length=l,s(\\\"marker.line.width\\\")&&s(\\\"marker.line.color\\\"),s(\\\"marker.colors\\\"),s(\\\"scalegroup\\\");var p=s(\\\"text\\\"),d=s(\\\"textinfo\\\",Array.isArray(p)?\\\"text+percent\\\":\\\"percent\\\");if(s(\\\"hovertext\\\"),d&&\\\"none\\\"!==d){var g=s(\\\"textposition\\\"),v=Array.isArray(g)||\\\"auto\\\"===g,m=v||\\\"inside\\\"===g,y=v||\\\"outside\\\"===g;if(m||y){var x=c(s,\\\"textfont\\\",o.font);if(m){var b=n.extendFlat({},x);!(t.textfont&&t.textfont.color)&&delete b.color,c(s,\\\"insidetextfont\\\",b)}y&&c(s,\\\"outsidetextfont\\\",x)}}a(e,o,s);var _=s(\\\"hole\\\");if(s(\\\"title\\\")){var w=s(\\\"titleposition\\\",_?\\\"middle center\\\":\\\"top center\\\");_||\\\"middle center\\\"!==w||(e.titleposition=\\\"top center\\\"),c(s,\\\"titlefont\\\",o.font)}s(\\\"sort\\\"),s(\\\"direction\\\"),s(\\\"rotation\\\"),s(\\\"pull\\\")}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../../plots/domain\\\":771,\\\"./attributes\\\":1019}],1023:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx/helpers\\\").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),r}},{\\\"../../components/fx/helpers\\\":609}],1024:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return-1!==r.lastIndexOf(\\\".\\\")&&(r=r.replace(/[.]?0+$/,\\\"\\\")),n.numSeparate(r,e)+\\\"%\\\"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return-1!==r.lastIndexOf(\\\".\\\")&&(r=r.replace(/[.]?0+$/,\\\"\\\")),n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r<e.length;r++){var n=t[e[r]];if(n||0===n)return n}},r.castOption=function(t,e){return Array.isArray(t)?r.getFirstFilled(t,e):t||void 0}},{\\\"../../lib\\\":696}],1025:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),n.layoutAttributes=t(\\\"./layout_attributes\\\");var i=t(\\\"./calc\\\");n.calc=i.calc,n.crossTraceCalc=i.crossTraceCalc,n.plot=t(\\\"./plot\\\"),n.style=t(\\\"./style\\\"),n.styleOne=t(\\\"./style_one\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"pie\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"pie\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1019,\\\"./base_plot\\\":1020,\\\"./calc\\\":1021,\\\"./defaults\\\":1022,\\\"./layout_attributes\\\":1026,\\\"./layout_defaults\\\":1027,\\\"./plot\\\":1028,\\\"./style\\\":1029,\\\"./style_one\\\":1030}],1026:[function(t,e,r){\\\"use strict\\\";e.exports={hiddenlabels:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},piecolorway:{valType:\\\"colorlist\\\",editType:\\\"calc\\\"},extendpiecolors:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"}}},{}],1027:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\\\"hiddenlabels\\\"),r(\\\"piecolorway\\\",e.colorway),r(\\\"extendpiecolors\\\")}},{\\\"../../lib\\\":696,\\\"./layout_attributes\\\":1026}],1028:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/fx\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../../components/drawing\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"./helpers\\\"),u=t(\\\"./event_data\\\");function f(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function h(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function p(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function d(t){var e,r=t.pull;if(Array.isArray(r))for(r=0,e=0;e<t.pull.length;e++)t.pull[e]>r&&(r=t.pull[e]);return r}e.exports=function(t,e){var r=t._fullLayout;!function(t,e){for(var r,n,i=0;i<t.length;i++)if(r=t[i][0],(n=r.trace).title){var a=o.tester.append(\\\"text\\\").attr(\\\"data-notex\\\",1).text(n.title).call(o.font,n.titlefont).call(l.convertToTspans,e),s=o.bBox(a.node(),!0);r.titleBox={width:s.width,height:s.height},a.remove()}}(e,t),function(t,e){var r,n,i,a,o,s,l,c,u,f=[];for(i=0;i<t.length;i++)o=t[i][0],s=o.trace,r=e.w*(s.domain.x[1]-s.domain.x[0]),n=e.h*(s.domain.y[1]-s.domain.y[0]),s.title&&\\\"middle center\\\"!==s.titleposition&&(n-=p(o,e)),l=d(s),o.r=Math.min(r,n)/(2+2*l),o.cx=e.l+e.w*(s.domain.x[1]+s.domain.x[0])/2,o.cy=e.t+e.h*(1-s.domain.y[0])-n/2,s.title&&-1!==s.titleposition.indexOf(\\\"bottom\\\")&&(o.cy-=p(o,e)),s.scalegroup&&-1===f.indexOf(s.scalegroup)&&f.push(s.scalegroup);for(a=0;a<f.length;a++){for(u=1/0,c=f[a],i=0;i<t.length;i++)(o=t[i][0]).trace.scalegroup===c&&(u=Math.min(u,o.r*o.r/o.vTotal));for(i=0;i<t.length;i++)(o=t[i][0]).trace.scalegroup===c&&(o.r=Math.sqrt(u*o.vTotal))}}(e,r._size);var g=s.makeTraceGroups(r._pielayer,e,\\\"trace\\\").each(function(e){var g=n.select(this),v=e[0],m=v.trace;!function(t){var e,r,n,i=t[0],a=i.trace,o=a.rotation*Math.PI/180,s=2*Math.PI/i.vTotal,l=\\\"px0\\\",c=\\\"px1\\\";if(\\\"counterclockwise\\\"===a.direction){for(e=0;e<t.length&&t[e].hidden;e++);if(e===t.length)return;o+=s*t[e].v,s*=-1,l=\\\"px1\\\",c=\\\"px0\\\"}function u(t){return[i.r*Math.sin(t),-i.r*Math.cos(t)]}for(n=u(o),e=0;e<t.length;e++)(r=t[e]).hidden||(r[l]=n,o+=s*r.v/2,r.pxmid=u(o),r.midangle=o,o+=s*r.v/2,n=u(o),r[c]=n,r.largeArc=r.v>i.vTotal/2?1:0)}(e),g.attr(\\\"stroke-linejoin\\\",\\\"round\\\"),g.each(function(){var g=n.select(this).selectAll(\\\"g.slice\\\").data(e);g.enter().append(\\\"g\\\").classed(\\\"slice\\\",!0),g.exit().remove();var y=[[[],[]],[[],[]]],x=!1;g.each(function(e){if(e.hidden)n.select(this).selectAll(\\\"path,g\\\").remove();else{e.pointNumber=e.i,e.curveNumber=m.index,y[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var p=v.cx,d=v.cy,g=n.select(this),b=g.selectAll(\\\"path.surface\\\").data([e]),_=!1,w=!1;if(b.enter().append(\\\"path\\\").classed(\\\"surface\\\",!0).style({\\\"pointer-events\\\":\\\"all\\\"}),g.select(\\\"path.textline\\\").remove(),g.on(\\\"mouseover\\\",function(){var a=t._fullLayout,o=t._fullData[m.index];if(!t._dragging&&!1!==a.hovermode){var s=o.hoverinfo;if(Array.isArray(s)&&(s=i.castHoverinfo({hoverinfo:[c.castOption(s,e.pts)],_module:m._module},a,0)),\\\"all\\\"===s&&(s=\\\"label+text+value+percent+name\\\"),\\\"none\\\"!==s&&\\\"skip\\\"!==s&&s){var l=f(e,v),h=p+e.pxmid[0]*(1-l),g=d+e.pxmid[1]*(1-l),y=r.separators,x=[];if(-1!==s.indexOf(\\\"label\\\")&&x.push(e.label),-1!==s.indexOf(\\\"text\\\")){var b=c.castOption(o.hovertext||o.text,e.pts);b&&x.push(b)}-1!==s.indexOf(\\\"value\\\")&&x.push(c.formatPieValue(e.v,y)),-1!==s.indexOf(\\\"percent\\\")&&x.push(c.formatPiePercent(e.v/v.vTotal,y));var k=m.hoverlabel,M=k.font;i.loneHover({x0:h-l*v.r,x1:h+l*v.r,y:g,text:x.join(\\\"<br>\\\"),name:-1!==s.indexOf(\\\"name\\\")?o.name:void 0,idealAlign:e.pxmid[0]<0?\\\"left\\\":\\\"right\\\",color:c.castOption(k.bgcolor,e.pts)||e.color,borderColor:c.castOption(k.bordercolor,e.pts),fontFamily:c.castOption(M.family,e.pts),fontSize:c.castOption(M.size,e.pts),fontColor:c.castOption(M.color,e.pts)},{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:t}),_=!0}t.emit(\\\"plotly_hover\\\",{points:[u(e,o)],event:n.event}),w=!0}}).on(\\\"mouseout\\\",function(r){var a=t._fullLayout,o=t._fullData[m.index];w&&(r.originalEvent=n.event,t.emit(\\\"plotly_unhover\\\",{points:[u(e,o)],event:n.event}),w=!1),_&&(i.loneUnhover(a._hoverlayer.node()),_=!1)}).on(\\\"click\\\",function(){var r=t._fullLayout,a=t._fullData[m.index];t._dragging||!1===r.hovermode||(t._hoverdata=[u(e,a)],i.click(t,n.event))}),m.pull){var k=+c.castOption(m.pull,e.pts)||0;k>0&&(p+=k*e.pxmid[0],d+=k*e.pxmid[1])}e.cxFinal=p,e.cyFinal=d;var M=m.hole;if(e.v===v.vTotal){var A=\\\"M\\\"+(p+e.px0[0])+\\\",\\\"+(d+e.px0[1])+L(e.px0,e.pxmid,!0,1)+L(e.pxmid,e.px0,!0,1)+\\\"Z\\\";M?b.attr(\\\"d\\\",\\\"M\\\"+(p+M*e.px0[0])+\\\",\\\"+(d+M*e.px0[1])+L(e.px0,e.pxmid,!1,M)+L(e.pxmid,e.px0,!1,M)+\\\"Z\\\"+A):b.attr(\\\"d\\\",A)}else{var T=L(e.px0,e.px1,!0,1);if(M){var S=1-M;b.attr(\\\"d\\\",\\\"M\\\"+(p+M*e.px1[0])+\\\",\\\"+(d+M*e.px1[1])+L(e.px1,e.px0,!1,M)+\\\"l\\\"+S*e.px0[0]+\\\",\\\"+S*e.px0[1]+T+\\\"Z\\\")}else b.attr(\\\"d\\\",\\\"M\\\"+p+\\\",\\\"+d+\\\"l\\\"+e.px0[0]+\\\",\\\"+e.px0[1]+T+\\\"Z\\\")}var C=c.castOption(m.textposition,e.pts),E=g.selectAll(\\\"g.slicetext\\\").data(e.text&&\\\"none\\\"!==C?[0]:[]);E.enter().append(\\\"g\\\").classed(\\\"slicetext\\\",!0),E.exit().remove(),E.each(function(){var r=s.ensureSingle(n.select(this),\\\"text\\\",\\\"\\\",function(t){t.attr(\\\"data-notex\\\",1)});r.text(e.text).attr({class:\\\"slicetext\\\",transform:\\\"\\\",\\\"text-anchor\\\":\\\"middle\\\"}).call(o.font,\\\"outside\\\"===C?function(t,e,r){var n=c.castOption(t.outsidetextfont.color,e.pts)||c.castOption(t.textfont.color,e.pts)||r.color,i=c.castOption(t.outsidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,a=c.castOption(t.outsidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(m,e,t._fullLayout.font):function(t,e,r){var n=c.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=c.castOption(t._input.textfont.color,e.pts));var i=c.castOption(t.insidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,o=c.castOption(t.insidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n||a.contrast(e.color),family:i,size:o}}(m,e,t._fullLayout.font)).call(l.convertToTspans,t);var i,u=o.bBox(r.node());\\\"outside\\\"===C?i=h(u,e):(i=function(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),i=t.width/t.height,a=Math.PI*Math.min(e.v/r.vTotal,.5),o=1-r.trace.hole,s=f(e,r),l={scale:s*r.r*2/n,rCenter:1-s,rotate:0};if(l.scale>=1)return l;var c=i+1/(2*Math.tan(a)),u=r.r*Math.min(1/(Math.sqrt(c*c+.5)+c),o/(Math.sqrt(i*i+o/2)+i)),h={scale:2*u/t.height,rCenter:Math.cos(u/r.r)-u*i/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},p=1/i,d=p+1/(2*Math.tan(a)),g=r.r*Math.min(1/(Math.sqrt(d*d+.5)+d),o/(Math.sqrt(p*p+o/2)+p)),v={scale:2*g/t.width,rCenter:Math.cos(g/r.r)-g/i/r.r,rotate:(180/Math.PI*e.midangle+810)%180-90},m=v.scale>h.scale?v:h;return l.scale<1&&m.scale>l.scale?m:l}(u,e,v),\\\"auto\\\"===C&&i.scale<1&&(r.call(o.font,m.outsidetextfont),m.outsidetextfont.family===m.insidetextfont.family&&m.outsidetextfont.size===m.insidetextfont.size||(u=o.bBox(r.node())),i=h(u,e)));var g=p+e.pxmid[0]*i.rCenter+(i.x||0),y=d+e.pxmid[1]*i.rCenter+(i.y||0);i.outside&&(e.yLabelMin=y-u.height/2,e.yLabelMid=y,e.yLabelMax=y+u.height/2,e.labelExtraX=0,e.labelExtraY=0,x=!0),r.attr(\\\"transform\\\",\\\"translate(\\\"+g+\\\",\\\"+y+\\\")\\\"+(i.scale<1?\\\"scale(\\\"+i.scale+\\\")\\\":\\\"\\\")+(i.rotate?\\\"rotate(\\\"+i.rotate+\\\")\\\":\\\"\\\")+\\\"translate(\\\"+-(u.left+u.right)/2+\\\",\\\"+-(u.top+u.bottom)/2+\\\")\\\")})}function L(t,r,n,i){return\\\"a\\\"+i*v.r+\\\",\\\"+i*v.r+\\\" 0 \\\"+e.largeArc+(n?\\\" 1 \\\":\\\" 0 \\\")+i*(r[0]-t[0])+\\\",\\\"+i*(r[1]-t[1])}});var b=n.select(this).selectAll(\\\"g.titletext\\\").data(m.title?[0]:[]);b.enter().append(\\\"g\\\").classed(\\\"titletext\\\",!0),b.exit().remove(),b.each(function(){var e,i=s.ensureSingle(n.select(this),\\\"text\\\",\\\"\\\",function(t){t.attr(\\\"data-notex\\\",1)});i.text(m.title).attr({class:\\\"titletext\\\",transform:\\\"\\\",\\\"text-anchor\\\":\\\"middle\\\"}).call(o.font,m.titlefont).call(l.convertToTspans,t),e=\\\"middle center\\\"===m.titleposition?function(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.titlefont.size}}(v):function(t,e){var r,n,i=1,a=1,o=t.trace,s={x:t.cx,y:t.cy},l={tx:0,ty:0};l.ty+=o.titlefont.size,n=d(o),-1!==o.titleposition.indexOf(\\\"top\\\")?(s.y-=(1+n)*t.r,l.ty-=t.titleBox.height):-1!==o.titleposition.indexOf(\\\"bottom\\\")&&(s.y+=(1+n)*t.r);-1!==o.titleposition.indexOf(\\\"left\\\")?(r=e.w*(o.domain.x[1]-o.domain.x[0])/2+t.r,s.x-=(1+n)*t.r,l.tx+=t.titleBox.width/2):-1!==o.titleposition.indexOf(\\\"center\\\")?r=e.w*(o.domain.x[1]-o.domain.x[0]):-1!==o.titleposition.indexOf(\\\"right\\\")&&(r=e.w*(o.domain.x[1]-o.domain.x[0])/2+t.r,s.x+=(1+n)*t.r,l.tx-=t.titleBox.width/2);return i=r/t.titleBox.width,a=p(t,e)/t.titleBox.height,{x:s.x,y:s.y,scale:Math.min(i,a),tx:l.tx,ty:l.ty}}(v,r._size),i.attr(\\\"transform\\\",\\\"translate(\\\"+e.x+\\\",\\\"+e.y+\\\")\\\"+(e.scale<1?\\\"scale(\\\"+e.scale+\\\")\\\":\\\"\\\")+\\\"translate(\\\"+e.tx+\\\",\\\"+e.ty+\\\")\\\")}),x&&function(t,e){var r,n,i,a,o,s,l,u,f,h,p,d,g;function v(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,u,f,p,d,g,v=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?t.yLabelMin:t.yLabelMax,y=n?t.yLabelMax:t.yLabelMin,x=t.cyFinal+o(t.px0[1],t.px1[1]),b=v-m;if(b*l>0&&(t.labelExtraY=b),Array.isArray(e.pull))for(u=0;u<h.length;u++)(f=h[u])===t||(c.castOption(e.pull,t.pts)||0)>=(c.castOption(e.pull,f.pts)||0)||((t.pxmid[1]-f.pxmid[1])*l>0?(p=f.cyFinal+o(f.px0[1],f.px1[1]),(b=p-m-t.labelExtraY)*l>0&&(t.labelExtraY+=b)):(y+t.labelExtraY-x)*l>0&&(i=3*s*Math.abs(u-h.indexOf(t)),d=f.cxFinal+a(f.px0[0],f.px1[0]),(g=d+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=g)))}for(n=0;n<2;n++)for(i=n?v:m,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(u=t[n][r]).sort(i),f=t[1-n][r],h=f.concat(u),d=[],p=0;p<u.length;p++)void 0!==u[p].yLabelMid&&d.push(u[p]);for(g=!1,p=0;n&&p<f.length;p++)if(void 0!==f[p].yLabelMid){g=f[p];break}for(p=0;p<d.length;p++){var x=p&&d[p-1];g&&!p&&(x=g),y(d[p],x)}}}(y,m),g.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=n.select(this),r=e.select(\\\"g.slicetext text\\\");r.attr(\\\"transform\\\",\\\"translate(\\\"+t.labelExtraX+\\\",\\\"+t.labelExtraY+\\\")\\\"+r.attr(\\\"transform\\\"));var i=t.cxFinal+t.pxmid[0],o=\\\"M\\\"+i+\\\",\\\"+(t.cyFinal+t.pxmid[1]),s=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var l=t.labelExtraX*t.pxmid[1]/t.pxmid[0],c=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(l)>Math.abs(c)?o+=\\\"l\\\"+c*t.pxmid[0]/t.pxmid[1]+\\\",\\\"+c+\\\"H\\\"+(i+t.labelExtraX+s):o+=\\\"l\\\"+t.labelExtraX+\\\",\\\"+l+\\\"v\\\"+(c-l)+\\\"h\\\"+s}else o+=\\\"V\\\"+(t.yLabelMid+t.labelExtraY)+\\\"h\\\"+s;e.append(\\\"path\\\").classed(\\\"textline\\\",!0).call(a.stroke,m.outsidetextfont.color).attr({\\\"stroke-width\\\":Math.min(2,m.outsidetextfont.size/8),d:o,fill:\\\"none\\\"})}})})});setTimeout(function(){g.selectAll(\\\"tspan\\\").each(function(){var t=n.select(this);t.attr(\\\"dy\\\")&&t.attr(\\\"dy\\\",t.attr(\\\"dy\\\"))})},0)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"./event_data\\\":1023,\\\"./helpers\\\":1024,d3:148}],1029:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"./style_one\\\");e.exports=function(t){t._fullLayout._pielayer.selectAll(\\\".trace\\\").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll(\\\"path.surface\\\").each(function(t){n.select(this).call(i,t,e)})})}},{\\\"./style_one\\\":1030,d3:148}],1030:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"./helpers\\\").castOption;e.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style({\\\"stroke-width\\\":s}).call(n.fill,e.color).call(n.stroke,o)}},{\\\"../../components/color\\\":570,\\\"./helpers\\\":1024}],1031:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\");e.exports={x:n.x,y:n.y,xy:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},indices:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},xbounds:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},ybounds:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},text:n.text,marker:{color:{valType:\\\"color\\\",arrayOk:!1,editType:\\\"calc\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,arrayOk:!1,editType:\\\"calc\\\"},blend:{valType:\\\"boolean\\\",dflt:null,editType:\\\"calc\\\"},sizemin:{valType:\\\"number\\\",min:.1,max:2,dflt:.5,editType:\\\"calc\\\"},sizemax:{valType:\\\"number\\\",min:.1,dflt:20,editType:\\\"calc\\\"},border:{color:{valType:\\\"color\\\",arrayOk:!1,editType:\\\"calc\\\"},arearatio:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"calc\\\"},editType:\\\"calc\\\"},editType:\\\"calc\\\"},transforms:void 0}},{\\\"../scatter/attributes\\\":1044}],1032:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-pointcloud2d\\\"),i=t(\\\"../../lib/str2rgbarray\\\"),a=t(\\\"../../plots/cartesian/autorange\\\").findExtremes,o=t(\\\"../scatter/get_trace_color\\\");function s(t,e){this.scene=t,this.uid=e,this.type=\\\"pointcloud\\\",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color=\\\"rgb(0, 0, 0)\\\",this.name=\\\"\\\",this.hoverinfo=\\\"all\\\",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;l<e;l++)o=n[2*l],s=n[2*l+1],o<d[0]&&(d[0]=o),o>d[2]&&(d[2]=o),s<d[1]&&(d[1]=s),s>d[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;l<e;l++)r[l]=l}else for(e=c.length,n=new Float32Array(2*e),r=new Int32Array(e),l=0;l<e;l++)o=c[l],s=u[l],r[l]=l,n[2*l]=o,n[2*l+1]=s,o<d[0]&&(d[0]=o),o>d[2]&&(d[2]=o),s<d[1]&&(d[1]=s),s>d[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),v=i(t.marker.border.color),m=t.opacity*t.marker.opacity;g[3]*=m,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,v[3]*=m,this.pointcloudOptions.borderColor=v;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\\\"../../lib/str2rgbarray\\\":720,\\\"../../plots/cartesian/autorange\\\":744,\\\"../scatter/get_trace_color\\\":1054,\\\"gl-pointcloud2d\\\":279}],1033:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a(\\\"x\\\"),a(\\\"y\\\"),a(\\\"xbounds\\\"),a(\\\"ybounds\\\"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a(\\\"text\\\"),a(\\\"marker.color\\\",r),a(\\\"marker.opacity\\\"),a(\\\"marker.blend\\\"),a(\\\"marker.sizemin\\\"),a(\\\"marker.sizemax\\\"),a(\\\"marker.border.color\\\",r),a(\\\"marker.border.arearatio\\\"),e._length=null}},{\\\"../../lib\\\":696,\\\"./attributes\\\":1031}],1034:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"../scatter3d/calc\\\"),n.plot=t(\\\"./convert\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"pointcloud\\\",n.basePlotModule=t(\\\"../../plots/gl2d\\\"),n.categories=[\\\"gl\\\",\\\"gl2d\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../plots/gl2d\\\":785,\\\"../scatter3d/calc\\\":1072,\\\"./attributes\\\":1031,\\\"./convert\\\":1032,\\\"./defaults\\\":1033}],1035:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../components/color/attributes\\\"),o=t(\\\"../../components/fx/attributes\\\"),s=t(\\\"../../plots/domain\\\").attributes,l=t(\\\"../../lib/extend\\\").extendFlat,c=t(\\\"../../plot_api/edit_types\\\").overrideAll;(e.exports=c({hoverinfo:l({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:\\\"sankey\\\",trace:!0}),orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],dflt:\\\"h\\\"},valueformat:{valType:\\\"string\\\",dflt:\\\".3s\\\"},valuesuffix:{valType:\\\"string\\\",dflt:\\\"\\\"},arrangement:{valType:\\\"enumerated\\\",values:[\\\"snap\\\",\\\"perpendicular\\\",\\\"freeform\\\",\\\"fixed\\\"],dflt:\\\"snap\\\"},textfont:n({}),node:{label:{valType:\\\"data_array\\\",dflt:[]},color:{valType:\\\"color\\\",arrayOk:!0},line:{color:{valType:\\\"color\\\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\\\"number\\\",min:0,dflt:.5,arrayOk:!0}},pad:{valType:\\\"number\\\",arrayOk:!1,min:0,dflt:20},thickness:{valType:\\\"number\\\",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"none\\\",\\\"skip\\\"],dflt:\\\"all\\\"},hoverlabel:o.hoverlabel},link:{label:{valType:\\\"data_array\\\",dflt:[]},color:{valType:\\\"color\\\",arrayOk:!0},line:{color:{valType:\\\"color\\\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\\\"number\\\",min:0,dflt:0,arrayOk:!0}},source:{valType:\\\"data_array\\\",dflt:[]},target:{valType:\\\"data_array\\\",dflt:[]},value:{valType:\\\"data_array\\\",dflt:[]},hoverinfo:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"none\\\",\\\"skip\\\"],dflt:\\\"all\\\"},hoverlabel:o.hoverlabel}},\\\"calc\\\",\\\"nested\\\")).transforms=void 0},{\\\"../../components/color/attributes\\\":569,\\\"../../components/fx/attributes\\\":604,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772}],1036:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plot_api/edit_types\\\").overrideAll,i=t(\\\"../../plots/get_data\\\").getModuleCalcData,a=t(\\\"./plot\\\"),o=t(\\\"../../components/fx/layout_attributes\\\");r.name=\\\"sankey\\\",r.baseLayoutAttrOverrides=n({hoverlabel:o.hoverlabel},\\\"plot\\\",\\\"nested\\\"),r.plot=function(t){var e=i(t.calcdata,\\\"sankey\\\")[0];a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"sankey\\\"),a=e._has&&e._has(\\\"sankey\\\");i&&!a&&n._paperdiv.selectAll(\\\".sankey\\\").remove()}},{\\\"../../components/fx/layout_attributes\\\":613,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/get_data\\\":782,\\\"./plot\\\":1041}],1037:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"strongly-connected-components\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../lib/gup\\\").wrap;e.exports=function(t,e){return function(t,e,r){for(var a=t.length,o=i.init2dArray(a,0),s=0;s<Math.min(e.length,r.length);s++)if(i.isIndex(e[s],a)&&i.isIndex(r[s],a)){if(e[s]===r[s])return!0;o[e[s]].push(r[s])}return n(o).components.some(function(t){return t.length>1})}(e.node.label,e.link.source,e.link.target)&&(i.error(\\\"Circularity is present in the Sankey data. Removing all nodes and links.\\\"),e.link.label=[],e.link.source=[],e.link.target=[],e.link.value=[],e.link.color=[],e.node.label=[],e.node.color=[]),a({link:e.link,node:e.node})}},{\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"strongly-connected-components\\\":506}],1038:[function(t,e,r){\\\"use strict\\\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\\\"cubic-in-out\\\",cn:{sankey:\\\"sankey\\\",sankeyLinks:\\\"sankey-links\\\",sankeyLink:\\\"sankey-link\\\",sankeyNodeSet:\\\"sankey-node-set\\\",sankeyNode:\\\"sankey-node\\\",nodeRect:\\\"node-rect\\\",nodeCapture:\\\"node-capture\\\",nodeCentered:\\\"node-entered\\\",nodeLabelGuide:\\\"node-label-guide\\\",nodeLabel:\\\"node-label\\\",nodeLabelTextPath:\\\"node-label-text-path\\\"}}},{}],1039:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"tinycolor2\\\"),s=t(\\\"../../plots/domain\\\").defaults,l=t(\\\"../../components/fx/hoverlabel_defaults\\\"),c=t(\\\"../../plot_api/plot_template\\\");e.exports=function(t,e,r,u){function f(r,a){return n.coerce(t,e,i,r,a)}var h=n.extendDeep(u.hoverlabel,t.hoverlabel),p=t.node,d=c.newContainer(e,\\\"node\\\");function g(t,e){return n.coerce(p,d,i.node,t,e)}g(\\\"label\\\"),g(\\\"pad\\\"),g(\\\"thickness\\\"),g(\\\"line.color\\\"),g(\\\"line.width\\\"),g(\\\"hoverinfo\\\",t.hoverinfo),l(p,d,g,h);var v=u.colorway;g(\\\"color\\\",d.label.map(function(t,e){return a.addOpacity(function(t){return v[t%v.length]}(e),.8)}));var m=t.link,y=c.newContainer(e,\\\"link\\\");function x(t,e){return n.coerce(m,y,i.link,t,e)}x(\\\"label\\\"),x(\\\"source\\\"),x(\\\"target\\\"),x(\\\"value\\\"),x(\\\"line.color\\\"),x(\\\"line.width\\\"),x(\\\"hoverinfo\\\",t.hoverinfo),l(m,y,x,h);var b=o(u.paper_bgcolor).getLuminance()<.333?\\\"rgba(255, 255, 255, 0.6)\\\":\\\"rgba(0, 0, 0, 0.2)\\\";x(\\\"color\\\",n.repeat(b,y.value.length)),s(e,u,f),f(\\\"orientation\\\"),f(\\\"valueformat\\\"),f(\\\"valuesuffix\\\"),f(\\\"arrangement\\\"),n.coerceFont(f,\\\"textfont\\\",n.extendFlat({},u.font)),e._length=null}},{\\\"../../components/color\\\":570,\\\"../../components/fx/hoverlabel_defaults\\\":611,\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/domain\\\":771,\\\"./attributes\\\":1035,tinycolor2:514}],1040:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"sankey\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1035,\\\"./base_plot\\\":1036,\\\"./calc\\\":1037,\\\"./defaults\\\":1039,\\\"./plot\\\":1041}],1041:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"./render\\\"),a=t(\\\"../../components/fx\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"./constants\\\").cn,c=s._;function u(t){return\\\"\\\"!==t}function f(t,e){return t.filter(function(t){return t.key===e.traceId})}function h(t,e){n.select(t).select(\\\"path\\\").style(\\\"fill-opacity\\\",e),n.select(t).select(\\\"rect\\\").style(\\\"fill-opacity\\\",e)}function p(t){n.select(t).select(\\\"text.name\\\").style(\\\"fill\\\",\\\"black\\\")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function v(t,e,r){e&&r&&f(r,e).selectAll(\\\".\\\"+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function m(t,e,r){e&&r&&f(r,e).selectAll(\\\".\\\"+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var i=n.datum().link.label;n.style(\\\"fill-opacity\\\",.4),i&&f(e,t).selectAll(\\\".\\\"+l.sankeyLink).filter(function(t){return t.link.label===i}).style(\\\"fill-opacity\\\",.4),r&&f(e,t).selectAll(\\\".\\\"+l.sankeyNode).filter(g(t)).call(v)}function x(t,e,r,n){var i=n.datum().link.label;n.style(\\\"fill-opacity\\\",function(t){return t.tinyColorAlpha}),i&&f(e,t).selectAll(\\\".\\\"+l.sankeyLink).filter(function(t){return t.link.label===i}).style(\\\"fill-opacity\\\",function(t){return t.tinyColorAlpha}),r&&f(e,t).selectAll(l.sankeyNode).filter(g(t)).call(m)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){var r=t._fullLayout,s=r._paper,f=r._size,d=c(t,\\\"source:\\\")+\\\" \\\",g=c(t,\\\"target:\\\")+\\\" \\\",_=c(t,\\\"incoming flow count:\\\")+\\\" \\\",w=c(t,\\\"outgoing flow count:\\\")+\\\" \\\";i(s,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:function(e,r,i){!1!==t._fullLayout.hovermode&&(n.select(e).call(y.bind(0,r,i,!0)),\\\"skip\\\"!==r.link.trace.link.hoverinfo&&t.emit(\\\"plotly_hover\\\",{event:n.event,points:[r.link]}))},follow:function(e,i){if(!1!==t._fullLayout.hovermode){var s=i.link.trace.link;if(\\\"none\\\"!==s.hoverinfo&&\\\"skip\\\"!==s.hoverinfo){var l=t._fullLayout._paperdiv.node().getBoundingClientRect(),c=e.getBoundingClientRect(),f=c.left+c.width/2,v=c.top+c.height/2,m=a.loneHover({x:f-l.left,y:v-l.top,name:n.format(i.valueFormat)(i.link.value)+i.valueSuffix,text:[i.link.label||\\\"\\\",d+i.link.source.label,g+i.link.target.label].filter(u).join(\\\"<br>\\\"),color:b(s,\\\"bgcolor\\\")||o.addOpacity(i.tinyColorHue,1),borderColor:b(s,\\\"bordercolor\\\"),fontFamily:b(s,\\\"font.family\\\"),fontSize:b(s,\\\"font.size\\\"),fontColor:b(s,\\\"font.color\\\"),idealAlign:n.event.x<f?\\\"right\\\":\\\"left\\\"},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});h(m,.65),p(m)}}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(x.bind(0,i,o,!0)),\\\"skip\\\"!==i.link.trace.link.hoverinfo&&t.emit(\\\"plotly_unhover\\\",{event:n.event,points:[i.link]}),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r){var i=r.link;i.originalEvent=n.event,t._hoverdata=[i],a.click(t,{target:!0})}},nodeEvents:{hover:function(e,r,i){!1!==t._fullLayout.hovermode&&(n.select(e).call(v,r,i),\\\"skip\\\"!==r.node.trace.node.hoverinfo&&t.emit(\\\"plotly_hover\\\",{event:n.event,points:[r.node]}))},follow:function(e,i){if(!1!==t._fullLayout.hovermode){var o=i.node.trace.node;if(\\\"none\\\"!==o.hoverinfo&&\\\"skip\\\"!==o.hoverinfo){var s=n.select(e).select(\\\".\\\"+l.nodeRect),c=t._fullLayout._paperdiv.node().getBoundingClientRect(),f=s.node().getBoundingClientRect(),d=f.left-2-c.left,g=f.right+2-c.left,v=f.top+f.height/4-c.top,m=a.loneHover({x0:d,x1:g,y:v,name:n.format(i.valueFormat)(i.node.value)+i.valueSuffix,text:[i.node.label,_+i.node.targetLinks.length,w+i.node.sourceLinks.length].filter(u).join(\\\"<br>\\\"),color:b(o,\\\"bgcolor\\\")||i.tinyColorHue,borderColor:b(o,\\\"bordercolor\\\"),fontFamily:b(o,\\\"font.family\\\"),fontSize:b(o,\\\"font.size\\\"),fontColor:b(o,\\\"font.color\\\"),idealAlign:\\\"left\\\"},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});h(m,.85),p(m)}}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,i,o),\\\"skip\\\"!==i.node.trace.node.hoverinfo&&t.emit(\\\"plotly_unhover\\\",{event:n.event,points:[i.node]}),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(m,r,i),a.click(t,{target:!0})}}})}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"./constants\\\":1038,\\\"./render\\\":1042,d3:148}],1042:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"d3\\\"),a=t(\\\"tinycolor2\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"@plotly/d3-sankey\\\").sankey,c=t(\\\"d3-force\\\"),u=t(\\\"../../lib\\\"),f=u.isArrayOrTypedArray,h=u.isIndex,p=t(\\\"../../lib/gup\\\"),d=p.keyFun,g=p.repeat,v=p.unwrap;function m(t){t.lastDraggedX=t.x,t.lastDraggedY=t.y}function y(t){return function(e){return e.node.originalX===t.node.originalX}}function x(t){for(var e=0;e<t.length;e++)t[e].y=t[e].y+t[e].dy/2}function b(t){t.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.node.x.toFixed(3)+\\\", \\\"+(t.node.y-t.node.dy/2).toFixed(3)+\\\")\\\"})}function _(t){var e=t.sankey.nodes();!function(t){for(var e=0;e<t.length;e++)t[e].y=t[e].y-t[e].dy/2}(e);var r=t.sankey.link()(t.link);return x(e),r}function w(t){t.call(b)}function k(t,e){t.call(w),e.attr(\\\"d\\\",_)}function M(t){t.attr(\\\"width\\\",function(t){return t.visibleWidth}).attr(\\\"height\\\",function(t){return t.visibleHeight})}function A(t){return t.link.dy>1||t.linkLineWidth>0}function T(t){return\\\"translate(\\\"+t.translateX+\\\",\\\"+t.translateY+\\\")\\\"+(t.horizontal?\\\"matrix(1 0 0 1 0 0)\\\":\\\"matrix(0 1 1 0 0 0)\\\")}function S(t){return\\\"translate(\\\"+(t.horizontal?0:t.labelY)+\\\" \\\"+(t.horizontal?t.labelY:0)+\\\")\\\"}function C(t){return i.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function E(t){return t.horizontal?\\\"matrix(1 0 0 1 0 0)\\\":\\\"matrix(0 1 1 0 0 0)\\\"}function L(t){return t.horizontal?\\\"scale(1 1)\\\":\\\"scale(-1 1)\\\"}function z(t){return t.darkBackground&&!t.horizontal?\\\"rgb(255,255,255)\\\":\\\"rgb(0,0,0)\\\"}function O(t){return t.horizontal&&t.left?\\\"100%\\\":\\\"0%\\\"}function I(t,e,r){t.on(\\\".basic\\\",null).on(\\\"mouseover.basic\\\",function(t){t.interactionState.dragInProgress||(r.hover(this,t,e),t.interactionState.hovered=[this,t])}).on(\\\"mousemove.basic\\\",function(t){t.interactionState.dragInProgress||(r.follow(this,t),t.interactionState.hovered=[this,t])}).on(\\\"mouseout.basic\\\",function(t){t.interactionState.dragInProgress||(r.unhover(this,t,e),t.interactionState.hovered=!1)}).on(\\\"click.basic\\\",function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||r.select(this,t,e)})}function P(t,e,r){var a=i.behavior.drag().origin(function(t){return t.node}).on(\\\"dragstart\\\",function(i){if(\\\"fixed\\\"!==i.arrangement&&(u.raiseToTop(this),i.interactionState.dragInProgress=i.node,m(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),\\\"snap\\\"===i.arrangement)){var a=i.traceId+\\\"|\\\"+Math.floor(i.node.originalX);i.forceLayouts[a]?i.forceLayouts[a].alpha(1):function(t,e,r){var i=r.sankey.nodes().filter(function(t){return t.originalX===r.node.originalX});r.forceLayouts[e]=c.forceSimulation(i).alphaDecay(0).force(\\\"collide\\\",c.forceCollide().radius(function(t){return t.dy/2+r.nodePad/2}).strength(1).iterations(n.forceIterations)).force(\\\"constrain\\\",function(t,e,r,i){return function(){for(var t=0,a=0;a<r.length;a++){var o=r[a];o===i.interactionState.dragInProgress?(o.x=o.lastDraggedX,o.y=o.lastDraggedY):(o.vx=(o.originalX-o.x)/n.forceTicksPerFrame,o.y=Math.min(i.size-o.dy/2,Math.max(o.dy/2,o.y))),t=Math.max(t,Math.abs(o.vx),Math.abs(o.vy))}!i.interactionState.dragInProgress&&t<.1&&i.forceLayouts[e].alpha()>0&&i.forceLayouts[e].alpha(0)}}(0,e,i,r)).stop()}(0,a,i),function(t,e,r,i){window.requestAnimationFrame(function a(){for(var o=0;o<n.forceTicksPerFrame;o++)r.forceLayouts[i].tick();r.sankey.relayout(),k(t.filter(y(r)),e),r.forceLayouts[i].alpha()>0&&window.requestAnimationFrame(a)})}(t,e,i,a)}}).on(\\\"drag\\\",function(r){if(\\\"fixed\\\"!==r.arrangement){var n=i.event.x,a=i.event.y;\\\"snap\\\"===r.arrangement?(r.node.x=n,r.node.y=a):(\\\"freeform\\\"===r.arrangement&&(r.node.x=n),r.node.y=Math.max(r.node.dy/2,Math.min(r.size-r.node.dy/2,a))),m(r.node),\\\"snap\\\"!==r.arrangement&&(r.sankey.relayout(),k(t.filter(y(r)),e))}}).on(\\\"dragend\\\",function(t){t.interactionState.dragInProgress=!1});t.on(\\\".drag\\\",null).call(a)}e.exports=function(t,e,r,i){var c=t.selectAll(\\\".\\\"+n.cn.sankey).data(e.filter(function(t){return v(t).trace.visible}).map(function(t,e,r){var i,a=v(e).trace,o=a.domain,s=a.node,c=a.link,p=a.arrangement,d=\\\"h\\\"===a.orientation,g=a.node.pad,m=a.node.thickness,y=a.node.line.color,b=a.node.line.width,_=a.link.line.color,w=a.link.line.width,k=a.valueformat,M=a.valuesuffix,A=a.textfont,T=t.width*(o.x[1]-o.x[0]),S=t.height*(o.y[1]-o.y[0]),C=[],E=f(c.color),L={},z=s.label.length;for(i=0;i<c.value.length;i++){var O=c.value[i],I=c.source[i],P=c.target[i];O>0&&h(I,z)&&h(P,z)&&(P=+P,L[I=+I]=L[P]=!0,C.push({pointNumber:i,label:c.label[i],color:E?c.color[i]:c.color,source:I,target:P,value:+O}))}var D=f(s.color),R=[],B=!1,F={};for(i=0;i<z;i++)if(L[i]){var N=s.label[i];F[i]=R.length,R.push({pointNumber:i,label:N,color:D?s.color[i]:s.color})}else B=!0;if(B)for(i=0;i<C.length;i++)C[i].source=F[C[i].source],C[i].target=F[C[i].target];var j=l().size(d?[T,S]:[S,T]).nodeWidth(m).nodePadding(g).nodes(R).links(C).layout(n.sankeyIterations);j.nodePadding()<g&&u.warn(\\\"node.pad was reduced to \\\",j.nodePadding(),\\\" to fit within the figure.\\\");for(var V,U=j.nodes(),q=0;q<U.length;q++)(V=U[q]).width=T,V.height=S;return x(R),{key:r,trace:a,guid:Math.floor(1e12*(1+Math.random())),horizontal:d,width:T,height:S,nodePad:g,nodeLineColor:y,nodeLineWidth:b,linkLineColor:_,linkLineWidth:w,valueFormat:k,valueSuffix:M,textFont:A,translateX:o.x[0]*t.width+t.margin.l,translateY:t.height-o.y[1]*t.height+t.margin.t,dragParallel:d?S:T,dragPerpendicular:d?T:S,nodes:R,links:C,arrangement:p,sankey:j,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}.bind(null,r)),d);c.exit().remove(),c.enter().append(\\\"g\\\").classed(n.cn.sankey,!0).style(\\\"box-sizing\\\",\\\"content-box\\\").style(\\\"position\\\",\\\"absolute\\\").style(\\\"left\\\",0).style(\\\"shape-rendering\\\",\\\"geometricPrecision\\\").style(\\\"pointer-events\\\",\\\"auto\\\").attr(\\\"transform\\\",T),c.transition().ease(n.ease).duration(n.duration).attr(\\\"transform\\\",T);var p=c.selectAll(\\\".\\\"+n.cn.sankeyLinks).data(g,d);p.enter().append(\\\"g\\\").classed(n.cn.sankeyLinks,!0).style(\\\"fill\\\",\\\"none\\\");var m=p.selectAll(\\\".\\\"+n.cn.sankeyLink).data(function(t){return t.sankey.links().filter(function(t){return t.value}).map(function(t,e,r){var n=a(r.color),i=r.source.label+\\\"|\\\"+r.target.label,s=t[i];t[i]=(s||0)+1;var l=i+\\\"__\\\"+t[i];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:l,traceId:e.key,link:r,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,interactionState:e.interactionState}}.bind(null,{},t))},d);m.enter().append(\\\"path\\\").classed(n.cn.sankeyLink,!0).attr(\\\"d\\\",_).call(I,c,i.linkEvents),m.style(\\\"stroke\\\",function(t){return A(t)?o.tinyRGB(a(t.linkLineColor)):t.tinyColorHue}).style(\\\"stroke-opacity\\\",function(t){return A(t)?o.opacity(t.linkLineColor):t.tinyColorAlpha}).style(\\\"stroke-width\\\",function(t){return A(t)?t.linkLineWidth:1}).style(\\\"fill\\\",function(t){return t.tinyColorHue}).style(\\\"fill-opacity\\\",function(t){return t.tinyColorAlpha}),m.transition().ease(n.ease).duration(n.duration).attr(\\\"d\\\",_),m.exit().transition().ease(n.ease).duration(n.duration).style(\\\"opacity\\\",0).remove();var y=c.selectAll(\\\".\\\"+n.cn.sankeyNodeSet).data(g,d);y.enter().append(\\\"g\\\").classed(n.cn.sankeyNodeSet,!0),y.style(\\\"cursor\\\",function(t){switch(t.arrangement){case\\\"fixed\\\":return\\\"default\\\";case\\\"perpendicular\\\":return\\\"ns-resize\\\";default:return\\\"move\\\"}});var w=y.selectAll(\\\".\\\"+n.cn.sankeyNode).data(function(t){var e=t.sankey.nodes();return function(t){var e,r=[];for(e=0;e<t.length;e++)t[e].originalX=t[e].x,t[e].originalY=t[e].y,-1===r.indexOf(t[e].x)&&r.push(t[e].x);for(r.sort(function(t,e){return t-e}),e=0;e<t.length;e++)t[e].originalLayerIndex=r.indexOf(t[e].originalX),t[e].originalLayer=t[e].originalLayerIndex/(r.length-1)}(e),e.filter(function(t){return t.value}).map(function(t,e,r){var i=a(r.color),s=n.nodePadAcross,l=e.nodePad/2,c=r.dx,u=Math.max(.5,r.dy),f=r.label,h=t[f];t[f]=(h||0)+1;var p=f+\\\"__\\\"+t[f];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:p,traceId:e.key,node:r,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(c),visibleHeight:u,zoneX:-s,zoneY:-l,zoneWidth:c+2*s,zoneHeight:u+2*l,labelY:e.horizontal?r.dy/2+1:r.dx/2+1,left:1===r.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:i.getBrightness()<=128,tinyColorHue:o.tinyRGB(i),tinyColorAlpha:i.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,p].join(\\\" \\\"),interactionState:e.interactionState}}.bind(null,{},t))},d);w.enter().append(\\\"g\\\").classed(n.cn.sankeyNode,!0).call(b).call(I,c,i.nodeEvents),w.call(P,m,i),w.transition().ease(n.ease).duration(n.duration).call(b),w.exit().transition().ease(n.ease).duration(n.duration).style(\\\"opacity\\\",0).remove();var k=w.selectAll(\\\".\\\"+n.cn.nodeRect).data(g);k.enter().append(\\\"rect\\\").classed(n.cn.nodeRect,!0).call(M),k.style(\\\"stroke-width\\\",function(t){return t.nodeLineWidth}).style(\\\"stroke\\\",function(t){return o.tinyRGB(a(t.nodeLineColor))}).style(\\\"stroke-opacity\\\",function(t){return o.opacity(t.nodeLineColor)}).style(\\\"fill\\\",function(t){return t.tinyColorHue}).style(\\\"fill-opacity\\\",function(t){return t.tinyColorAlpha}),k.transition().ease(n.ease).duration(n.duration).call(M);var D=w.selectAll(\\\".\\\"+n.cn.nodeCapture).data(g);D.enter().append(\\\"rect\\\").classed(n.cn.nodeCapture,!0).style(\\\"fill-opacity\\\",0),D.attr(\\\"x\\\",function(t){return t.zoneX}).attr(\\\"y\\\",function(t){return t.zoneY}).attr(\\\"width\\\",function(t){return t.zoneWidth}).attr(\\\"height\\\",function(t){return t.zoneHeight});var R=w.selectAll(\\\".\\\"+n.cn.nodeCentered).data(g);R.enter().append(\\\"g\\\").classed(n.cn.nodeCentered,!0).attr(\\\"transform\\\",S),R.transition().ease(n.ease).duration(n.duration).attr(\\\"transform\\\",S);var B=R.selectAll(\\\".\\\"+n.cn.nodeLabelGuide).data(g);B.enter().append(\\\"path\\\").classed(n.cn.nodeLabelGuide,!0).attr(\\\"id\\\",function(t){return t.uniqueNodeLabelPathId}).attr(\\\"d\\\",C).attr(\\\"transform\\\",E),B.transition().ease(n.ease).duration(n.duration).attr(\\\"d\\\",C).attr(\\\"transform\\\",E);var F=R.selectAll(\\\".\\\"+n.cn.nodeLabel).data(g);F.enter().append(\\\"text\\\").classed(n.cn.nodeLabel,!0).attr(\\\"transform\\\",L).style(\\\"user-select\\\",\\\"none\\\").style(\\\"cursor\\\",\\\"default\\\").style(\\\"fill\\\",\\\"black\\\"),F.style(\\\"text-shadow\\\",function(t){return t.horizontal?\\\"-1px 1px 1px #fff, 1px 1px 1px #fff, 1px -1px 1px #fff, -1px -1px 1px #fff\\\":\\\"none\\\"}).each(function(t){s.font(F,t.textFont)}),F.transition().ease(n.ease).duration(n.duration).attr(\\\"transform\\\",L);var N=F.selectAll(\\\".\\\"+n.cn.nodeLabelTextPath).data(g);N.enter().append(\\\"textPath\\\").classed(n.cn.nodeLabelTextPath,!0).attr(\\\"alignment-baseline\\\",\\\"middle\\\").attr(\\\"xlink:href\\\",function(t){return\\\"#\\\"+t.uniqueNodeLabelPathId}).attr(\\\"startOffset\\\",O).style(\\\"fill\\\",z),N.text(function(t){return t.horizontal||t.node.dy>5?t.node.label:\\\"\\\"}).attr(\\\"text-anchor\\\",function(t){return t.horizontal&&t.left?\\\"end\\\":\\\"start\\\"}),N.transition().ease(n.ease).duration(n.duration).attr(\\\"startOffset\\\",O).style(\\\"fill\\\",z)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"./constants\\\":1038,\\\"@plotly/d3-sankey\\\":46,d3:148,\\\"d3-force\\\":144,tinycolor2:514}],1043:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n.mergeArray(e.text,t,\\\"tx\\\"),n.mergeArray(e.hovertext,t,\\\"htx\\\"),n.mergeArray(e.customdata,t,\\\"data\\\"),n.mergeArray(e.textposition,t,\\\"tp\\\"),e.textfont&&(n.mergeArray(e.textfont.size,t,\\\"ts\\\"),n.mergeArray(e.textfont.color,t,\\\"tc\\\"),n.mergeArray(e.textfont.family,t,\\\"tf\\\"));var i=e.marker;if(i){n.mergeArray(i.size,t,\\\"ms\\\"),n.mergeArray(i.opacity,t,\\\"mo\\\"),n.mergeArray(i.symbol,t,\\\"mx\\\"),n.mergeArray(i.color,t,\\\"mc\\\");var a=i.line;i.line&&(n.mergeArray(a.color,t,\\\"mlc\\\"),n.mergeArray(a.width,t,\\\"mlw\\\"));var o=i.gradient;o&&\\\"none\\\"!==o.type&&(n.mergeArray(o.type,t,\\\"mgt\\\"),n.mergeArray(o.color,t,\\\"mgc\\\"))}}},{\\\"../../lib\\\":696}],1044:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../../plots/font_attributes\\\"),o=t(\\\"../../components/drawing/attributes\\\").dash,s=t(\\\"../../components/drawing\\\"),l=(t(\\\"./constants\\\"),t(\\\"../../lib/extend\\\").extendFlat);e.exports={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},x0:{valType:\\\"any\\\",dflt:0,editType:\\\"calc+clearAxisTypes\\\"},dx:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y0:{valType:\\\"any\\\",dflt:0,editType:\\\"calc+clearAxisTypes\\\"},dy:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},stackgroup:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],editType:\\\"calc\\\"},groupnorm:{valType:\\\"enumerated\\\",values:[\\\"\\\",\\\"fraction\\\",\\\"percent\\\"],dflt:\\\"\\\",editType:\\\"calc\\\"},stackgaps:{valType:\\\"enumerated\\\",values:[\\\"infer zero\\\",\\\"interpolate\\\"],dflt:\\\"infer zero\\\",editType:\\\"calc\\\"},text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"calc\\\"},hovertext:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"style\\\"},mode:{valType:\\\"flaglist\\\",flags:[\\\"lines\\\",\\\"markers\\\",\\\"text\\\"],extras:[\\\"none\\\"],editType:\\\"calc\\\"},hoveron:{valType:\\\"flaglist\\\",flags:[\\\"points\\\",\\\"fills\\\"],editType:\\\"style\\\"},line:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,dflt:2,editType:\\\"style\\\"},shape:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"spline\\\",\\\"hv\\\",\\\"vh\\\",\\\"hvh\\\",\\\"vhv\\\"],dflt:\\\"linear\\\",editType:\\\"plot\\\"},smoothing:{valType:\\\"number\\\",min:0,max:1.3,dflt:1,editType:\\\"plot\\\"},dash:l({},o,{editType:\\\"style\\\"}),simplify:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},editType:\\\"plot\\\"},connectgaps:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},cliponaxis:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},fill:{valType:\\\"enumerated\\\",values:[\\\"none\\\",\\\"tozeroy\\\",\\\"tozerox\\\",\\\"tonexty\\\",\\\"tonextx\\\",\\\"toself\\\",\\\"tonext\\\"],editType:\\\"calc\\\"},fillcolor:{valType:\\\"color\\\",editType:\\\"style\\\"},marker:l({symbol:{valType:\\\"enumerated\\\",values:s.symbolList,dflt:\\\"circle\\\",arrayOk:!0,editType:\\\"style\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,arrayOk:!0,editType:\\\"style\\\"},size:{valType:\\\"number\\\",min:0,dflt:6,arrayOk:!0,editType:\\\"calc\\\"},maxdisplayed:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"plot\\\"},sizeref:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},sizemin:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"calc\\\"},sizemode:{valType:\\\"enumerated\\\",values:[\\\"diameter\\\",\\\"area\\\"],dflt:\\\"diameter\\\",editType:\\\"calc\\\"},colorbar:i,line:l({width:{valType:\\\"number\\\",min:0,arrayOk:!0,editType:\\\"style\\\"},editType:\\\"calc\\\"},n(\\\"marker.line\\\")),gradient:{type:{valType:\\\"enumerated\\\",values:[\\\"radial\\\",\\\"horizontal\\\",\\\"vertical\\\",\\\"none\\\"],arrayOk:!0,dflt:\\\"none\\\",editType:\\\"calc\\\"},color:{valType:\\\"color\\\",arrayOk:!0,editType:\\\"calc\\\"},editType:\\\"calc\\\"},editType:\\\"calc\\\"},n(\\\"marker\\\")),selected:{marker:{opacity:{valType:\\\"number\\\",min:0,max:1,editType:\\\"style\\\"},color:{valType:\\\"color\\\",editType:\\\"style\\\"},size:{valType:\\\"number\\\",min:0,editType:\\\"style\\\"},editType:\\\"style\\\"},textfont:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},editType:\\\"style\\\"},editType:\\\"style\\\"},unselected:{marker:{opacity:{valType:\\\"number\\\",min:0,max:1,editType:\\\"style\\\"},color:{valType:\\\"color\\\",editType:\\\"style\\\"},size:{valType:\\\"number\\\",min:0,editType:\\\"style\\\"},editType:\\\"style\\\"},textfont:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},editType:\\\"style\\\"},editType:\\\"style\\\"},textposition:{valType:\\\"enumerated\\\",values:[\\\"top left\\\",\\\"top center\\\",\\\"top right\\\",\\\"middle left\\\",\\\"middle center\\\",\\\"middle right\\\",\\\"bottom left\\\",\\\"bottom center\\\",\\\"bottom right\\\"],dflt:\\\"middle center\\\",arrayOk:!0,editType:\\\"calc\\\"},textfont:a({editType:\\\"calc\\\",colorEditType:\\\"style\\\",arrayOk:!0}),r:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},t:{valType:\\\"data_array\\\",editType:\\\"calc\\\"}}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../components/drawing\\\":595,\\\"../../components/drawing/attributes\\\":594,\\\"../../lib/extend\\\":685,\\\"../../plots/font_attributes\\\":772,\\\"./constants\\\":1048}],1045:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../../constants/numerical\\\").BADNUM,s=t(\\\"./subtypes\\\"),l=t(\\\"./colorscale_calc\\\"),c=t(\\\"./arrays_to_calcdata\\\"),u=t(\\\"./calc_selection\\\");function f(t,e,r,n,i,o,l){var c=e._length,u=t._fullLayout,f=r._id,h=n._id,p=u._firstScatter[d(e)]===e.uid,v=(g(e,u,r,n)||{}).orientation,m=e.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},x={padded:!0};l&&(y.ppad=x.ppad=l);var b=c<2||i[0]!==i[c-1]||o[0]!==o[c-1];b&&(\\\"tozerox\\\"===m||\\\"tonextx\\\"===m&&(p||\\\"h\\\"===v))?y.tozero=!0:(e.error_y||{}).visible||\\\"tonexty\\\"!==m&&\\\"tozeroy\\\"!==m&&(s.hasMarkers(e)||s.hasText(e))||(y.padded=!1,y.ppad=0),b&&(\\\"tozeroy\\\"===m||\\\"tonexty\\\"===m&&(p||\\\"v\\\"===v))?x.tozero=!0:\\\"tonextx\\\"!==m&&\\\"tozerox\\\"!==m||(x.padded=!1),f&&(e._extremes[f]=a.findExtremes(r,i,y)),h&&(e._extremes[h]=a.findExtremes(n,o,x))}function h(t,e){if(s.hasMarkers(t)){var r,n=t.marker,o=1.6*(t.marker.sizeref||1);if(r=\\\"area\\\"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/o),3)}:function(t){return Math.max((t||0)/o,3)},i.isArrayOrTypedArray(n.size)){var l={type:\\\"linear\\\"};a.setConvert(l);for(var c=l.makeCalcdata(t.marker,\\\"size\\\"),u=new Array(e),f=0;f<e;f++)u[f]=r(c[f]);return u}return r(n.size)}}function p(t,e){var r=d(e),n=t._firstScatter;n[r]||(n[r]=e.uid)}function d(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?\\\"-\\\"+e:\\\"\\\")}function g(t,e,r,n){var i=t.stackgroup;if(i){var a=e._scatterStackOpts[r._id+n._id][i],o=\\\"v\\\"===a.orientation?n:r;return\\\"linear\\\"===o.type||\\\"log\\\"===o.type?a:void 0}}e.exports={calc:function(t,e){var r,s,d,v,m,y,x=t._fullLayout,b=a.getFromId(t,e.xaxis||\\\"x\\\"),_=a.getFromId(t,e.yaxis||\\\"y\\\"),w=b.makeCalcdata(e,\\\"x\\\"),k=_.makeCalcdata(e,\\\"y\\\"),M=e._length,A=new Array(M),T=e.ids,S=g(e,x,b,_),C=!1;p(x,e);var E,L=\\\"x\\\",z=\\\"y\\\";for(S?(S.traceIndices.push(e.index),(r=\\\"v\\\"===S.orientation)?(z=\\\"s\\\",E=\\\"x\\\"):(L=\\\"s\\\",E=\\\"y\\\"),m=\\\"interpolate\\\"===S.stackgaps):f(t,e,b,_,w,k,h(e,M)),s=0;s<M;s++){var O=A[s]={},I=n(w[s]),P=n(k[s]);I&&P?(O[L]=w[s],O[z]=k[s]):S&&(r?I:P)?(O[E]=r?w[s]:k[s],O.gap=!0,m?(O.s=o,C=!0):O.s=0):O[L]=O[z]=o,T&&(O.id=String(T[s]))}if(c(A,e),l(e),u(A,e),S){for(s=0;s<A.length;)A[s][E]===o?A.splice(s,1):s++;if(i.sort(A,function(t,e){return t[E]-e[E]||t.i-e.i}),C){for(s=0;s<A.length-1&&A[s].gap;)s++;for((y=A[s].s)||(y=A[s].s=0),d=0;d<s;d++)A[d].s=y;for(v=A.length-1;v>s&&A[v].gap;)v--;for(y=A[v].s,d=A.length-1;d>v;d--)A[d].s=y;for(;s<v;)if(A[++s].gap){for(d=s+1;A[d].gap;)d++;for(var D=A[s-1][E],R=A[s-1].s,B=(A[d].s-R)/(A[d][E]-D);s<d;)A[s].s=R+(A[s][E]-D)*B,s++}}}return A},calcMarkerSize:h,calcAxisExpansion:f,setFirstScatter:p,getStackOpts:g}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"./arrays_to_calcdata\\\":1043,\\\"./calc_selection\\\":1046,\\\"./colorscale_calc\\\":1047,\\\"./subtypes\\\":1068,\\\"fast-isnumeric\\\":214}],1046:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&&n.tagSelected(t,e)}},{\\\"../../lib\\\":696}],1047:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/has_colorscale\\\"),i=t(\\\"../../components/colorscale/calc\\\"),a=t(\\\"./subtypes\\\");e.exports=function(t){a.hasLines(t)&&n(t,\\\"line\\\")&&i(t,t.line.color,\\\"line\\\",\\\"c\\\"),a.hasMarkers(t)&&(n(t,\\\"marker\\\")&&i(t,t.marker.color,\\\"marker\\\",\\\"c\\\"),n(t,\\\"marker.line\\\")&&i(t,t.marker.line.color,\\\"marker.line\\\",\\\"c\\\"))}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"./subtypes\\\":1068}],1048:[function(t,e,r){\\\"use strict\\\";e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20}},{}],1049:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./calc\\\");function i(t,e,r,n,i,a,o){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,t.splice(e,0,s),e&&r===t[e-1][o]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&&(s.s=function(t,e,r,n){var i=t[e-1],a=t[e+1];return a?i?i.s+(a.s-i.s)*(r-i[n])/(a[n]-i[n]):a.s:i.s}(t,e,r,o));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}e.exports=function(t,e){var r=e.xaxis,a=e.yaxis,o=r._id+a._id,s=t._fullLayout._scatterStackOpts[o];if(s){var l,c,u,f,h,p,d,g,v,m,y,x,b,_,w,k=t.calcdata;for(var M in s){var A=(m=s[M]).traceIndices;if(A.length){for(y=\\\"interpolate\\\"===m.stackgaps,x=m.groupnorm,\\\"v\\\"===m.orientation?(b=\\\"x\\\",_=\\\"y\\\"):(b=\\\"y\\\",_=\\\"x\\\"),w=new Array(A.length),l=0;l<w.length;l++)w[l]=!1;p=k[A[0]];var T=new Array(p.length);for(l=0;l<p.length;l++)T[l]=p[l][b];for(l=1;l<A.length;l++){for(h=k[A[l]],c=u=0;c<h.length;c++){for(d=h[c][b];d>T[u]&&u<T.length;u++)i(h,c,T[u],l,w,y,b),c++;if(d!==T[u]){for(f=0;f<l;f++)i(k[A[f]],u,d,f,w,y,b);T.splice(u,0,d)}u++}for(;u<T.length;u++)i(h,c,T[u],l,w,y,b),c++}var S=T.length;for(c=0;c<p.length;c++){for(g=p[c][_]=p[c].s,l=1;l<A.length;l++)(h=k[A[l]])[0].trace._rawLength=h[0].trace._length,h[0].trace._length=S,g+=h[c].s,h[c][_]=g;if(x)for(v=(\\\"fraction\\\"===x?g:g/100)||1,l=0;l<A.length;l++){var C=k[A[l]][c];C[_]/=v,C.sNorm=C.s/v}}for(l=0;l<A.length;l++){var E=(h=k[A[l]])[0].trace,L=n.calcMarkerSize(E,E._rawLength),z=Array.isArray(L);if(L&&w[l]||z){var O=L;for(L=new Array(S),c=0;c<S;c++)L[c]=h[c].gap?0:z?O[h[c].i]:O}var I=new Array(S),P=new Array(S);for(c=0;c<S;c++)I[c]=h[c].x,P[c]=h[c].y;n.calcAxisExpansion(t,E,r,a,I,P,L),h[0].t.orientation=m.orientation}}}}}},{\\\"./calc\\\":1045}],1050:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=0;e<t.length;e++){var r=t[e];if(\\\"scatter\\\"===r.type){var n=r.fill;if(\\\"none\\\"!==n&&\\\"toself\\\"!==n&&(r.opacity=void 0,\\\"tonexty\\\"===n||\\\"tonextx\\\"===n))for(var i=e-1;i>=0;i--){var a=t[i];if(\\\"scatter\\\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],1051:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"./constants\\\"),s=t(\\\"./subtypes\\\"),l=t(\\\"./xy_defaults\\\"),c=t(\\\"./stack_defaults\\\"),u=t(\\\"./marker_defaults\\\"),f=t(\\\"./line_defaults\\\"),h=t(\\\"./line_shape_defaults\\\"),p=t(\\\"./text_defaults\\\"),d=t(\\\"./fillcolor_defaults\\\");e.exports=function(t,e,r,g){function v(r,i){return n.coerce(t,e,a,r,i)}var m=l(t,e,g,v);if(m||(e.visible=!1),e.visible){var y=c(t,e,g,v),x=!y&&m<o.PTS_LINESONLY?\\\"lines+markers\\\":\\\"lines\\\";v(\\\"text\\\"),v(\\\"hovertext\\\"),v(\\\"mode\\\",x),s.hasLines(e)&&(f(t,e,r,g,v),h(t,e,v),v(\\\"connectgaps\\\"),v(\\\"line.simplify\\\")),s.hasMarkers(e)&&u(t,e,r,g,v,{gradient:!0}),s.hasText(e)&&p(t,e,g,v);var b=[];(s.hasMarkers(e)||s.hasText(e))&&(v(\\\"cliponaxis\\\"),v(\\\"marker.maxdisplayed\\\"),b.push(\\\"points\\\")),v(\\\"fill\\\",y?y.fillDflt:\\\"none\\\"),\\\"none\\\"!==e.fill&&(d(t,e,r,v),s.hasLines(e)||h(t,e,v)),\\\"tonext\\\"!==e.fill&&\\\"toself\\\"!==e.fill||b.push(\\\"fills\\\"),v(\\\"hoveron\\\",b.join(\\\"+\\\")||\\\"points\\\");var _=i.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");_(t,e,r,{axis:\\\"y\\\"}),_(t,e,r,{axis:\\\"x\\\",inherit:\\\"y\\\"}),n.coerceSelectionMarkerOpacity(e,v)}}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":1044,\\\"./constants\\\":1048,\\\"./fillcolor_defaults\\\":1053,\\\"./line_defaults\\\":1057,\\\"./line_shape_defaults\\\":1059,\\\"./marker_defaults\\\":1063,\\\"./stack_defaults\\\":1066,\\\"./subtypes\\\":1068,\\\"./text_defaults\\\":1069,\\\"./xy_defaults\\\":1070}],1052:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");function i(t){return t||0===t}e.exports=function(t,e,r){var a=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},o=n.extractOption(t,e,\\\"htx\\\",\\\"hovertext\\\");if(i(o))return a(o);var s=n.extractOption(t,e,\\\"tx\\\",\\\"text\\\");return i(s)?a(s):void 0}},{\\\"../../lib\\\":696}],1053:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r,a){var o=!1;if(e.marker){var s=e.marker.color,l=(e.marker.line||{}).color;s&&!i(s)?o=s:l&&!i(l)&&(o=l)}a(\\\"fillcolor\\\",n.addOpacity((e.line||{}).color||o||r,.5))}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696}],1054:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"./subtypes\\\");e.exports=function(t,e){var r,a;if(\\\"lines\\\"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if(\\\"none\\\"===t.mode)return t.fill?t.fillcolor:\\\"\\\";var o=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(a=o&&n.opacity(o)?o:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:\\\"\\\")?n.opacity(a)<.3?n.addOpacity(a,.3):a:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},{\\\"../../components/color\\\":570,\\\"./subtypes\\\":1068}],1055:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/fx\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"./get_trace_color\\\"),s=t(\\\"../../components/color\\\"),l=t(\\\"./fill_hover_text\\\");e.exports=function(t,e,r,c){var u=t.cd,f=u[0].trace,h=t.xa,p=t.ya,d=h.c2p(e),g=p.c2p(r),v=[d,g],m=f.hoveron||\\\"\\\",y=-1!==f.mode.indexOf(\\\"markers\\\")?3:.5;if(-1!==m.indexOf(\\\"points\\\")){var x=function(t){var e=Math.max(y,t.mrc||0),r=h.c2p(t.x)-d,n=p.c2p(t.y)-g;return Math.max(Math.sqrt(r*r+n*n)-e,1-y/e)},b=i.getDistanceFunction(c,function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(h.c2p(t.x)-d);return n<e?r*n/e:n-e+r},function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(p.c2p(t.y)-g);return n<e?r*n/e:n-e+r},x);if(i.getClosest(u,b,t),!1!==t.index){var _=u[t.index],w=h.c2p(_.x,!0),k=p.c2p(_.y,!0),M=_.mrc||1;t.index=_.i;var A=u[0].t.orientation,T=A&&(_.sNorm||_.s),S=\\\"h\\\"===A?T:_.x,C=\\\"v\\\"===A?T:_.y;return n.extendFlat(t,{color:o(f,_),x0:w-M,x1:w+M,xLabelVal:S,y0:k-M,y1:k+M,yLabelVal:C,spikeDistance:x(_)}),l(_,f,t),a.getComponentMethod(\\\"errorbars\\\",\\\"hoverInfo\\\")(_,f,t),[t]}}if(-1!==m.indexOf(\\\"fills\\\")&&f._polygons){var E,L,z,O,I,P,D,R,B,F=f._polygons,N=[],j=!1,V=1/0,U=-1/0,q=1/0,H=-1/0;for(E=0;E<F.length;E++)(z=F[E]).contains(v)&&(j=!j,N.push(z),q=Math.min(q,z.ymin),H=Math.max(H,z.ymax));if(j){var G=((q=Math.max(q,0))+(H=Math.min(H,p._length)))/2;for(E=0;E<N.length;E++)for(O=N[E].pts,L=1;L<O.length;L++)(R=O[L-1][1])>G!=(B=O[L][1])>=G&&(P=O[L-1][0],D=O[L][0],B-R&&(I=P+(D-P)*(G-R)/(B-R),V=Math.min(V,I),U=Math.max(U,I)));V=Math.max(V,0),U=Math.min(U,h._length);var W=s.defaultLine;return s.opacity(f.fillcolor)?W=f.fillcolor:s.opacity((f.line||{}).color)&&(W=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:V,x1:U,y0:G,y1:G,color:W}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./fill_hover_text\\\":1052,\\\"./get_trace_color\\\":1054}],1056:[function(t,e,r){\\\"use strict\\\";var n={},i=t(\\\"./subtypes\\\");n.hasLines=i.hasLines,n.hasMarkers=i.hasMarkers,n.hasText=i.hasText,n.isBubble=i.isBubble,n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.crossTraceDefaults=t(\\\"./cross_trace_defaults\\\"),n.calc=t(\\\"./calc\\\").calc,n.crossTraceCalc=t(\\\"./cross_trace_calc\\\"),n.arraysToCalcdata=t(\\\"./arrays_to_calcdata\\\"),n.plot=t(\\\"./plot\\\"),n.colorbar=t(\\\"./marker_colorbar\\\"),n.style=t(\\\"./style\\\").style,n.styleOnSelect=t(\\\"./style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.selectPoints=t(\\\"./select\\\"),n.animatable=!0,n.moduleType=\\\"trace\\\",n.name=\\\"scatter\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"symbols\\\",\\\"errorBarsOK\\\",\\\"showLegend\\\",\\\"scatter-like\\\",\\\"zoomScale\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./arrays_to_calcdata\\\":1043,\\\"./attributes\\\":1044,\\\"./calc\\\":1045,\\\"./cross_trace_calc\\\":1049,\\\"./cross_trace_defaults\\\":1050,\\\"./defaults\\\":1051,\\\"./hover\\\":1055,\\\"./marker_colorbar\\\":1062,\\\"./plot\\\":1064,\\\"./select\\\":1065,\\\"./style\\\":1067,\\\"./subtypes\\\":1068}],1057:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray,i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\");e.exports=function(t,e,r,o,s,l){var c=(t.marker||{}).color;(s(\\\"line.color\\\",r),i(t,\\\"line\\\"))?a(t,e,o,s,{prefix:\\\"line.\\\",cLetter:\\\"c\\\",noScale:!0}):s(\\\"line.color\\\",!n(c)&&c||r);s(\\\"line.width\\\"),(l||{}).noDash||s(\\\"line.dash\\\")}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696}],1058:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../constants/numerical\\\"),i=n.BADNUM,a=n.LOG_CLIP,o=a+.5,s=a-.5,l=t(\\\"../../lib\\\"),c=l.segmentsIntersect,u=l.constrain,f=t(\\\"./constants\\\");e.exports=function(t,e){var r,n,a,h,p,d,g,v,m,y,x,b,_,w,k,M,A,T,S=e.xaxis,C=e.yaxis,E=\\\"log\\\"===S.type,L=\\\"log\\\"===C.type,z=S._length,O=C._length,I=e.connectGaps,P=e.baseTolerance,D=e.shape,R=\\\"linear\\\"===D,B=[],F=f.minTolerance,N=new Array(t.length),j=0;function V(e){var r=t[e];if(!r)return!1;var n=S.c2p(r.x),a=C.c2p(r.y);if(n===i){if(E&&(n=S.c2p(r.x,!0)),n===i)return!1;L&&a===i&&(n*=Math.abs(S._m*O*(S._m>0?o:s)/(C._m*z*(C._m>0?o:s)))),n*=1e3}if(a===i){if(L&&(a=C.c2p(r.y,!0)),a===i)return!1;a*=1e3}return[n,a]}function U(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,c=i*o+a*s;if(c>0&&c<l){var u=o*a-s*i;if(u*u<l)return!0}}function q(t,e){var r=t[0]/z,n=t[1]/O,i=Math.max(0,-r,r-1,-n,n-1);return i&&void 0!==A&&U(r,n,A,T)&&(i=0),i&&e&&U(r,n,e[0]/z,e[1]/O)&&(i=0),(1+f.toleranceGrowth*i)*P}function H(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}var G,W,Y,X,Z,$,J,K=f.maxScreensAway,Q=-z*K,tt=z*(1+K),et=-O*K,rt=O*(1+K),nt=[[Q,et,tt,et],[tt,et,tt,rt],[tt,rt,Q,rt],[Q,rt,Q,et]];function it(t){if(t[0]<Q||t[0]>tt||t[1]<et||t[1]>rt)return[u(t[0],Q,tt),u(t[1],et,rt)]}function at(t,e){return t[0]===e[0]&&(t[0]===Q||t[0]===tt)||(t[1]===e[1]&&(t[1]===et||t[1]===rt)||void 0)}function ot(t,e,r){return function(n,i){var a=it(n),o=it(i),s=[];if(a&&o&&at(a,o))return s;a&&s.push(a),o&&s.push(o);var c=2*l.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);c&&((a&&o?c>0==a[t]>o[t]?a:o:a||o)[t]+=c);return s}}function st(t){var e=t[0],r=t[1],n=e===N[j-1][0],i=r===N[j-1][1];if(!n||!i)if(j>1){var a=e===N[j-2][0],o=r===N[j-2][1];n&&(e===Q||e===tt)&&a?o?j--:N[j-1]=t:i&&(r===et||r===rt)&&o?a?j--:N[j-1]=t:N[j++]=t}else N[j++]=t}function lt(t){N[j-1][0]!==t[0]&&N[j-1][1]!==t[1]&&st([Y,X]),st(t),Z=null,Y=X=0}function ct(t){if(A=t[0]/z,T=t[1]/O,G=t[0]<Q?Q:t[0]>tt?tt:0,W=t[1]<et?et:t[1]>rt?rt:0,G||W){if(j)if(Z){var e=J(Z,t);e.length>1&&(lt(e[0]),N[j++]=e[1])}else $=J(N[j-1],t)[0],N[j++]=$;else N[j++]=[G||t[0],W||t[1]];var r=N[j-1];G&&W&&(r[0]!==G||r[1]!==W)?(Z&&(Y!==G&&X!==W?st(Y&&X?(n=Z,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?Q:tt,rt]:[o>0?tt:Q,et]):[Y||G,X||W]):Y&&X&&st([Y,X])),st([G,W])):Y-G&&X-W&&st([G||Y,W||X]),Z=t,Y=G,X=W}else Z&&lt(J(Z,t)[0]),N[j++]=t;var n,i,a,o}for(\\\"linear\\\"===D||\\\"spline\\\"===D?J=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=nt[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&H(o,t)<H(r[0],t)?r.unshift(o):r.push(o),n++)}return r}:\\\"hv\\\"===D||\\\"vh\\\"===D?J=function(t,e){var r=[],n=it(t),i=it(e);return n&&i&&at(n,i)?r:(n&&r.push(n),i&&r.push(i),r)}:\\\"hvh\\\"===D?J=ot(0,Q,tt):\\\"vhv\\\"===D&&(J=ot(1,et,rt)),r=0;r<t.length;r++)if(n=V(r)){for(j=0,Z=null,ct(n),r++;r<t.length;r++){if(!(h=V(r))){if(I)continue;break}if(R&&e.simplify){var ut=V(r+1);if(!((y=H(h,n))<q(h,ut)*F)){for(v=[(h[0]-n[0])/y,(h[1]-n[1])/y],p=n,x=y,b=w=k=0,g=!1,a=h,r++;r<t.length;r++){if(d=ut,ut=V(r+1),!d){if(I)continue;break}if(M=(m=[d[0]-n[0],d[1]-n[1]])[0]*v[1]-m[1]*v[0],w=Math.min(w,M),(k=Math.max(k,M))-w>q(d,ut))break;a=d,(_=m[0]*v[0]+m[1]*v[1])>x?(x=_,h=d,g=!1):_<b&&(b=_,p=d,g=!0)}if(g?(ct(h),a!==p&&ct(p)):(p!==n&&ct(p),a!==h&&ct(h)),ct(a),r>=t.length||!d)break;ct(d),n=d}}else ct(h)}Z&&st([Y||Z[0],X||Z[1]]),B.push(N.slice(0,j))}return B}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"./constants\\\":1048}],1059:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){\\\"spline\\\"===r(\\\"line.shape\\\")&&r(\\\"line.smoothing\\\")}},{}],1060:[function(t,e,r){\\\"use strict\\\";var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var i,a,o,s,l,c={},u=!1,f=-1,h=0,p=-1;for(a=0;a<r.length;a++)(o=(i=r[a][0].trace).stackgroup||\\\"\\\")?o in c?l=c[o]:(l=c[o]=h,h++):i.fill in n&&p>=0?l=p:(l=p=h,h++),l<f&&(u=!0),i._groupIndex=f=l;var d=r.slice();u&&d.sort(function(t,e){var r=t[0].trace,n=e[0].trace;return r._groupIndex-n._groupIndex||r.index-n.index});var g={};for(a=0;a<d.length;a++)o=(i=d[a][0].trace).stackgroup||\\\"\\\",!0===i.visible?(i._nexttrace=null,i.fill in n&&(s=g[o],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&(\\\"tozero\\\"===i.fill.substr(0,6)||\\\"toself\\\"===i.fill||\\\"to\\\"===i.fill.substr(0,2)&&!i._prevtrace),g[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return d}},{}],1061:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\");e.exports=function(t){var e=t.marker,r=e.sizeref||1,i=e.sizemin||0,a=\\\"area\\\"===e.sizemode?function(t){return Math.sqrt(t/r)}:function(t){return t/r};return function(t){var e=a(t/2);return n(e)&&e>0?Math.max(e,i):0}}},{\\\"fast-isnumeric\\\":214}],1062:[function(t,e,r){\\\"use strict\\\";e.exports={container:\\\"marker\\\",min:\\\"cmin\\\",max:\\\"cmax\\\"}},{}],1063:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"./subtypes\\\");e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),f=(t.line||{}).color;(c=c||{},f&&(r=f),l(\\\"marker.symbol\\\"),l(\\\"marker.opacity\\\",u?.7:1),l(\\\"marker.size\\\"),l(\\\"marker.color\\\",r),i(t,\\\"marker\\\")&&a(t,e,s,l,{prefix:\\\"marker.\\\",cLetter:\\\"c\\\"}),c.noSelect||(l(\\\"selected.marker.color\\\"),l(\\\"unselected.marker.color\\\"),l(\\\"selected.marker.size\\\"),l(\\\"unselected.marker.size\\\")),c.noLine||(l(\\\"marker.line.color\\\",f&&!Array.isArray(f)&&e.marker.color!==f?f:u?n.background:n.defaultLine),i(t,\\\"marker.line\\\")&&a(t,e,s,l,{prefix:\\\"marker.line.\\\",cLetter:\\\"c\\\"}),l(\\\"marker.line.width\\\",u?1:0)),u&&(l(\\\"marker.sizeref\\\"),l(\\\"marker.sizemin\\\"),l(\\\"marker.sizemode\\\")),c.gradient)&&(\\\"none\\\"!==l(\\\"marker.gradient.type\\\")&&l(\\\"marker.gradient.color\\\"))}},{\\\"../../components/color\\\":570,\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"./subtypes\\\":1068}],1064:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=a.ensureSingle,s=a.identity,l=t(\\\"../../components/drawing\\\"),c=t(\\\"./subtypes\\\"),u=t(\\\"./line_points\\\"),f=t(\\\"./link_traces\\\"),h=t(\\\"../../lib/polygon\\\").tester;function p(t,e,r,f,p,d,g){var v;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,u=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(!c.hasMarkers(h))return;var p=h.marker.maxdisplayed;if(0===p)return;var d=i.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]}),g=Math.ceil(d.length/p),v=0;o.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<e&&v++});var m=Math.round(v*g/3+Math.floor(v/3)*g/7.1);i.forEach(function(t){delete t.vis}),d.forEach(function(t,e){0===Math.round((e+m)%g)&&(t.vis=!0)})}(0,e,r,f,p);var m=!!g&&g.duration>0;function y(t){return m?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,k=n.select(d),M=o(k,\\\"g\\\",\\\"errorbars\\\"),A=o(k,\\\"g\\\",\\\"lines\\\"),T=o(k,\\\"g\\\",\\\"points\\\"),S=o(k,\\\"g\\\",\\\"text\\\");if(i.getComponentMethod(\\\"errorbars\\\",\\\"plot\\\")(M,r,g),!0===_.visible){var C,E;y(k).style(\\\"opacity\\\",_.opacity);var L=_.fill.charAt(_.fill.length-1);\\\"x\\\"!==L&&\\\"y\\\"!==L&&(L=\\\"\\\"),r.isRangePlot||(f[0].node3=k);var z=\\\"\\\",O=[],I=_._prevtrace;I&&(z=I._prevRevpath||\\\"\\\",E=I._nextFill,O=I._polygons);var P,D,R,B,F,N,j,V,U,q=\\\"\\\",H=\\\"\\\",G=[],W=a.noop;if(C=_._ownFill,c.hasLines(_)||\\\"none\\\"!==_.fill){for(E&&E.datum(f),-1!==[\\\"hv\\\",\\\"vh\\\",\\\"hvh\\\",\\\"vhv\\\"].indexOf(w.shape)?(R=l.steps(w.shape),B=l.steps(w.shape.split(\\\"\\\").reverse().join(\\\"\\\"))):R=B=\\\"spline\\\"===w.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return\\\"M\\\"+t.join(\\\"L\\\")},F=function(t){return B(t.reverse())},G=u(f,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify}),U=_._polygons=new Array(G.length),v=0;v<G.length;v++)_._polygons[v]=h(G[v]);G.length&&(N=G[0][0],V=(j=G[G.length-1])[j.length-1]),W=function(t){return function(e){if(P=R(e),D=F(e),q?L?(q+=\\\"L\\\"+P.substr(1),H=D+\\\"L\\\"+H.substr(1)):(q+=\\\"Z\\\"+P,H=D+\\\"Z\\\"+H):(q=P,H=D),c.hasLines(_)&&e.length>1){var r=n.select(this);if(r.datum(f),t)y(r.style(\\\"opacity\\\",0).attr(\\\"d\\\",P).call(l.lineGroupStyle)).style(\\\"opacity\\\",1);else{var i=y(r);i.attr(\\\"d\\\",P),l.singleLineStyle(f,i)}}}}}var Y=A.selectAll(\\\".js-line\\\").data(G);y(Y.exit()).style(\\\"opacity\\\",0).remove(),Y.each(W(!1)),Y.enter().append(\\\"path\\\").classed(\\\"js-line\\\",!0).style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").call(l.lineGroupStyle).each(W(!0)),l.setClipUrl(Y,r.layerClipId),G.length?(C?(C.datum(f),N&&V&&(L?(\\\"y\\\"===L?N[1]=V[1]=b.c2p(0,!0):\\\"x\\\"===L&&(N[0]=V[0]=x.c2p(0,!0)),y(C).attr(\\\"d\\\",\\\"M\\\"+V+\\\"L\\\"+N+\\\"L\\\"+q.substr(1)).call(l.singleFillStyle)):y(C).attr(\\\"d\\\",q+\\\"Z\\\").call(l.singleFillStyle))):E&&(\\\"tonext\\\"===_.fill.substr(0,6)&&q&&z?(\\\"tonext\\\"===_.fill?y(E).attr(\\\"d\\\",q+\\\"Z\\\"+z+\\\"Z\\\").call(l.singleFillStyle):y(E).attr(\\\"d\\\",q+\\\"L\\\"+z.substr(1)+\\\"Z\\\").call(l.singleFillStyle),_._polygons=_._polygons.concat(O)):(Z(E),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=U):(C?Z(C):E&&Z(E),_._polygons=_._prevRevpath=_._prevPolygons=null),T.datum(f),S.datum(f),function(e,i,a){var o,u=a[0].trace,f=c.hasMarkers(u),h=c.hasText(u),p=tt(u),d=et,g=et;if(f||h){var v=s,_=u.stackgroup,w=_&&\\\"infer zero\\\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?v=w?J:$:_&&!w&&(v=K),f&&(d=v),h&&(g=v)}var k,M=(o=e.selectAll(\\\"path.point\\\").data(d,p)).enter().append(\\\"path\\\").classed(\\\"point\\\",!0);m&&M.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(\\\"opacity\\\",0).transition().style(\\\"opacity\\\",1),o.order(),f&&(k=l.makePointStyleFns(u)),o.each(function(e){var i=n.select(this),a=y(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,u,k,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,x,b,u.xcalendar,u.ycalendar),u.customdata&&i.classed(\\\"plotly-customdata\\\",null!==e.data&&void 0!==e.data)):a.remove()}),m?o.exit().transition().style(\\\"opacity\\\",0).remove():o.exit().remove(),(o=i.selectAll(\\\"g\\\").data(g,p)).enter().append(\\\"g\\\").classed(\\\"textpoint\\\",!0).append(\\\"text\\\"),o.order(),o.each(function(t){var e=n.select(this),i=y(e.select(\\\"text\\\"));l.translatePoint(t,i,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()}),o.selectAll(\\\"text\\\").call(l.textPointStyle,u,t).each(function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll(\\\"tspan.line\\\").each(function(){y(n.select(this)).attr({x:e,y:r})})}),o.exit().remove()}(T,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(T,X),l.setClipUrl(S,X)}function Z(t){y(t).attr(\\\"d\\\",\\\"M0,0Z\\\")}function $(t){return t.filter(function(t){return!t.gap&&t.vis})}function J(t){return t.filter(function(t){return t.vis})}function K(t){return t.filter(function(t){return!t.gap})}function Q(t){return t.id}function tt(t){if(t.ids)return Q}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,v=f(t,e,r);((u=i.selectAll(\\\"g.trace\\\").data(v,function(t){return t[0].trace.uid})).enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"trace scatter trace\\\"+t[0].trace.uid}).style(\\\"stroke-miterlimit\\\",2),u.order(),function(t,e,r){e.each(function(t){var e=o(n.select(this),\\\"g\\\",\\\"fills\\\");l.setClipUrl(e,r.layerClipId);var i=t[0].trace,a=[];i._ownfill&&a.push(\\\"_ownFill\\\"),i._nexttrace&&a.push(\\\"_nextFill\\\");var c=e.selectAll(\\\"g\\\").data(a,s);c.enter().append(\\\"g\\\"),c.exit().each(function(t){i[t]=null}).remove(),c.order().each(function(t){i[t]=o(n.select(this),\\\"path\\\",\\\"js-fill\\\")})})}(0,u,e),g)?(c&&(h=c()),n.transition().duration(a.duration).ease(a.easing).each(\\\"end\\\",function(){h&&h()}).each(\\\"interrupt\\\",function(){h&&h()}).each(function(){i.selectAll(\\\"g.trace\\\").each(function(r,n){p(t,n,e,r,v,this,a)})})):u.each(function(r,n){p(t,n,e,r,v,this,a)});d&&u.exit().remove(),i.selectAll(\\\"path:not([d])\\\").remove()}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/polygon\\\":709,\\\"../../registry\\\":828,\\\"./line_points\\\":1058,\\\"./link_traces\\\":1060,\\\"./subtypes\\\":1068,d3:148}],1065:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./subtypes\\\");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)i=s[r],a=l.c2p(i.x),o=c.c2p(i.y),null!==i.i&&e.contains([a,o],!1,r,t)?(u.push({pointNumber:i.i,x:l.c2d(i.x),y:c.c2d(i.y)}),i.selected=1):i.selected=0;return u}},{\\\"./subtypes\\\":1068}],1066:[function(t,e,r){\\\"use strict\\\";var n=[\\\"orientation\\\",\\\"groupnorm\\\",\\\"stackgaps\\\"];e.exports=function(t,e,r,i){var a=r._scatterStackOpts,o=i(\\\"stackgroup\\\");if(o){var s=e.xaxis+e.yaxis,l=a[s];l||(l=a[s]={});var c=l[o],u=!1;c?c.traces.push(e):(c=l[o]={traceIndices:[],traces:[e]},u=!0);for(var f={orientation:e.x&&!e.y?\\\"h\\\":\\\"v\\\"},h=0;h<n.length;h++){var p=n[h],d=p+\\\"Found\\\";if(!c[d]){var g=void 0!==t[p],v=\\\"orientation\\\"===p;if((g||u)&&(c[p]=i(p,f[p]),v&&(c.fillDflt=\\\"h\\\"===c[p]?\\\"tonextx\\\":\\\"tonexty\\\"),g&&(c[d]=!0,!u&&(delete c.traces[0][p],v))))for(var m=0;m<c.traces.length-1;m++){var y=c.traces[m];y._input.fill!==y.fill&&(y.fill=c.fillDflt)}}}return c}}},{}],1067:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"../../registry\\\");function o(t,e,r){i.pointStyle(t.selectAll(\\\"path.point\\\"),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll(\\\"text\\\"),e,r)}e.exports={style:function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.trace.scatter\\\");r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),r.selectAll(\\\"g.points\\\").each(function(e){o(n.select(this),e.trace||e[0].trace,t)}),r.selectAll(\\\"g.text\\\").each(function(e){s(n.select(this),e.trace||e[0].trace,t)}),r.selectAll(\\\"g.trace path.js-line\\\").call(i.lineGroupStyle),r.selectAll(\\\"g.trace path.js-fill\\\").call(i.fillGroupStyle),a.getComponentMethod(\\\"errorbars\\\",\\\"style\\\")(r)},stylePoints:o,styleText:s,styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll(\\\"path.point\\\"),n),i.selectedTextStyle(r.selectAll(\\\"text\\\"),n)):(o(r,n,t),s(r,n,t))}}},{\\\"../../components/drawing\\\":595,\\\"../../registry\\\":828,d3:148}],1068:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\\\"lines\\\")},hasMarkers:function(t){return t.visible&&(t.mode&&-1!==t.mode.indexOf(\\\"markers\\\")||\\\"splom\\\"===t.type)},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\\\"text\\\")},isBubble:function(t){return n.isPlainObject(t.marker)&&n.isArrayOrTypedArray(t.marker.size)}}},{\\\"../../lib\\\":696}],1069:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e,r,i,a){a=a||{},i(\\\"textposition\\\"),n.coerceFont(i,\\\"textfont\\\",r.font),a.noSelect||(i(\\\"selected.textfont.color\\\"),i(\\\"unselected.textfont.color\\\"))}},{\\\"../../lib\\\":696}],1070:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\");e.exports=function(t,e,r,i){var a,o=i(\\\"x\\\"),s=i(\\\"y\\\");if(n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\"],r),o)s?a=Math.min(o.length,s.length):(a=o.length,i(\\\"y0\\\"),i(\\\"dy\\\"));else{if(!s)return 0;a=e.y.length,i(\\\"x0\\\"),i(\\\"dx\\\")}return e._length=a,a}},{\\\"../../registry\\\":828}],1071:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../plots/attributes\\\"),o=t(\\\"../../constants/gl3d_dashes\\\"),s=t(\\\"../../constants/gl3d_markers\\\"),l=t(\\\"../../lib/extend\\\").extendFlat,c=t(\\\"../../plot_api/edit_types\\\").overrideAll,u=n.line,f=n.marker,h=f.line,p=l({width:u.width,dash:{valType:\\\"enumerated\\\",values:Object.keys(o),dflt:\\\"solid\\\"}},i(\\\"line\\\"));delete p.showscale,delete p.colorbar;var d=e.exports=c({x:n.x,y:n.y,z:{valType:\\\"data_array\\\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),mode:l({},n.mode,{dflt:\\\"lines+markers\\\"}),surfaceaxis:{valType:\\\"enumerated\\\",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:\\\"color\\\"},projection:{x:{show:{valType:\\\"boolean\\\",dflt:!1},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},scale:{valType:\\\"number\\\",min:0,max:10,dflt:2/3}},y:{show:{valType:\\\"boolean\\\",dflt:!1},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},scale:{valType:\\\"number\\\",min:0,max:10,dflt:2/3}},z:{show:{valType:\\\"boolean\\\",dflt:!1},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},scale:{valType:\\\"number\\\",min:0,max:10,dflt:2/3}}},connectgaps:n.connectgaps,line:p,marker:l({symbol:{valType:\\\"enumerated\\\",values:Object.keys(s),dflt:\\\"circle\\\",arrayOk:!0},size:l({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:l({},f.opacity,{arrayOk:!1}),colorbar:f.colorbar,line:l({width:l({},h.width,{arrayOk:!1})},i(\\\"marker.line\\\"))},i(\\\"marker\\\")),textposition:l({},n.textposition,{dflt:\\\"top center\\\",arrayOk:!1}),textfont:{color:n.textfont.color,size:n.textfont.size,family:l({},n.textfont.family,{arrayOk:!1})},hoverinfo:l({},a.hoverinfo)},\\\"calc\\\",\\\"nested\\\");d.x.editType=d.y.editType=d.z.editType=\\\"calc+clearAxisTypes\\\"},{\\\"../../components/colorscale/attributes\\\":577,\\\"../../constants/gl3d_dashes\\\":670,\\\"../../constants/gl3d_markers\\\":671,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1072:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/arrays_to_calcdata\\\"),i=t(\\\"../scatter/colorscale_calc\\\");e.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(e),r}},{\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/colorscale_calc\\\":1047}],1073:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\");function i(t,e,r,i){if(!e||!e.visible)return null;for(var a=n.getComponentMethod(\\\"errorbars\\\",\\\"makeComputeError\\\")(e),o=new Array(t.length),s=0;s<t.length;s++){var l=a(+t[s],s);if(\\\"log\\\"===i.type){var c=i.c2l(t[s]),u=t[s]-l[0],f=t[s]+l[1];if(o[s]=[(i.c2l(u,!0)-c)*r,(i.c2l(f,!0)-c)*r],u>0){var h=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e<t.length;e++)if(t[e])return t[e].length;return 0}(n);if(0===a)return null;for(var o=new Array(a),s=0;s<a;s++){for(var l=[[0,0,0],[0,0,0]],c=0;c<3;c++)if(n[c])for(var u=0;u<2;u++)l[u][c]=n[c][s][u];o[s]=l}return o}},{\\\"../../registry\\\":828}],1074:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-line3d\\\"),i=t(\\\"gl-scatter3d\\\"),a=t(\\\"gl-error3d\\\"),o=t(\\\"gl-mesh3d\\\"),s=t(\\\"delaunay-triangulate\\\"),l=t(\\\"../../lib\\\"),c=t(\\\"../../lib/str2rgbarray\\\"),u=t(\\\"../../lib/gl_format_color\\\").formatColor,f=t(\\\"../scatter/make_bubble_size_func\\\"),h=t(\\\"../../constants/gl3d_dashes\\\"),p=t(\\\"../../constants/gl3d_markers\\\"),d=t(\\\"./calc_errors\\\");function g(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode=\\\"\\\",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var v=g.prototype;function m(t,e){return e(4*t)}function y(t){return p[t]}function x(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o<e;o++)void 0===t[o]?a[o]=n:a[o]=r(t[o],i)}else a=r(t,l.identity);return a}function b(t,e){var r,n,i,a,o,s,h,p,g=[],v=t.fullSceneLayout,b=t.dataScale,_=v.xaxis,w=v.yaxis,k=v.zaxis,M=e.marker,A=e.line,T=e.x||[],S=e.y||[],C=e.z||[],E=T.length,L=e.xcalendar,z=e.ycalendar,O=e.zcalendar;for(n=0;n<E;n++)i=_.d2l(T[n],0,L)*b[0],a=w.d2l(S[n],0,z)*b[1],o=k.d2l(C[n],0,O)*b[2],g[n]=[i,a,o];if(Array.isArray(e.text))s=e.text;else if(void 0!==e.text)for(s=new Array(E),n=0;n<E;n++)s[n]=e.text;if(r={position:g,mode:e.mode,text:s},\\\"line\\\"in e&&(r.lineColor=u(A,1,E),r.lineWidth=A.width,r.lineDashes=A.dash),\\\"marker\\\"in e){var I=f(e);r.scatterColor=u(M,1,E),r.scatterSize=x(M.size,E,m,20,I),r.scatterMarker=x(M.symbol,E,y,\\\"\\\\u25cf\\\"),r.scatterLineWidth=M.line.width,r.scatterLineColor=u(M.line,1,E),r.scatterAngle=0}\\\"textposition\\\"in e&&(r.textOffset=(h=e.textposition,p=[0,0],Array.isArray(h)?[0,-1]:(h.indexOf(\\\"bottom\\\")>=0&&(p[1]+=1),h.indexOf(\\\"top\\\")>=0&&(p[1]-=1),h.indexOf(\\\"left\\\")>=0&&(p[0]-=1),h.indexOf(\\\"right\\\")>=0&&(p[0]+=1),p)),r.textColor=u(e.textfont,1,E),r.textSize=x(e.textfont.size,E,l.identity,12),r.textFont=e.textfont.family,r.textAngle=0);var P=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];for(r.project=[!1,!1,!1],r.projectScale=[1,1,1],r.projectOpacity=[1,1,1],n=0;n<3;++n){var D=e.projection[P[n]];(r.project[n]=D.show)&&(r.projectOpacity[n]=D.opacity,r.projectScale[n]=D.scale)}r.errorBounds=d(e,b,v);var R=function(t){for(var e=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[1,1,1],i=0;i<3;i++){var a=t[i];a&&!1!==a.copy_zstyle&&!1!==t[2].visible&&(a=t[2]),a&&a.visible&&(e[i]=a.width/2,r[i]=c(a.color),n[i]=a.thickness)}return{capSize:e,color:r,lineWidth:n}}([e.error_x,e.error_y,e.error_z]);return r.errorColor=R.color,r.errorLineWidth=R.lineWidth,r.errorCapSize=R.capSize,r.delaunayAxis=e.surfaceaxis,r.delaunayColor=c(e.surfacecolor),r}function _(t){if(Array.isArray(t)){var e=t[0];return Array.isArray(e)&&(t=e),\\\"rgb(\\\"+t.slice(0,3).map(function(t){return Math.round(255*t)})+\\\")\\\"}return null}v.handlePick=function(t){if(t.object&&(t.object===this.linePlot||t.object===this.delaunayMesh||t.object===this.textMarkers||t.object===this.scatterPlot)){var e=t.index=t.data.index;return t.object.highlight&&t.object.highlight(null),this.scatterPlot&&(t.object=this.scatterPlot,this.scatterPlot.highlight(t.data)),t.textLabel=\\\"\\\",this.textLabels&&(Array.isArray(this.textLabels)?(this.textLabels[e]||0===this.textLabels[e])&&(t.textLabel=this.textLabels[e]):t.textLabel=this.textLabels),t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]],!0}},v.update=function(t){var e,r,l,c,u=this.scene.glplot.gl,f=h.solid;this.data=t;var p=b(this.scene,t);\\\"mode\\\"in p&&(this.mode=p.mode),\\\"lineDashes\\\"in p&&p.lineDashes in h&&(f=h[p.lineDashes]),this.color=_(p.scatterColor)||_(p.lineColor),this.dataPoints=p.position,e={gl:u,position:p.position,color:p.lineColor,lineWidth:p.lineWidth||1,dashes:f[0],dashScale:f[1],opacity:t.opacity,connectGaps:t.connectgaps},-1!==this.mode.indexOf(\\\"lines\\\")?this.linePlot?this.linePlot.update(e):(this.linePlot=n(e),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var d=t.opacity;if(t.marker&&t.marker.opacity&&(d*=t.marker.opacity),r={gl:u,position:p.position,color:p.scatterColor,size:p.scatterSize,glyph:p.scatterMarker,opacity:d,orthographic:!0,lineWidth:p.scatterLineWidth,lineColor:p.scatterLineColor,project:p.project,projectScale:p.projectScale,projectOpacity:p.projectOpacity},-1!==this.mode.indexOf(\\\"markers\\\")?this.scatterPlot?this.scatterPlot.update(r):(this.scatterPlot=i(r),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),c={gl:u,position:p.position,glyph:p.text,color:p.textColor,size:p.textSize,angle:p.textAngle,alignment:p.textOffset,font:p.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:t.opacity},this.textLabels=t.hovertext||t.text,-1!==this.mode.indexOf(\\\"text\\\")?this.textMarkers?this.textMarkers.update(c):(this.textMarkers=i(c),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),l={gl:u,position:p.position,color:p.errorColor,error:p.errorBounds,lineWidth:p.errorLineWidth,capSize:p.errorCapSize,opacity:t.opacity},this.errorBars?p.errorBounds?this.errorBars.update(l):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):p.errorBounds&&(this.errorBars=a(l),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),p.delaunayAxis>=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n<t.length;++n){var c=t[n];!isNaN(c[i])&&isFinite(c[i])&&!isNaN(c[a])&&isFinite(c[a])&&(o.push([c[i],c[a]]),l.push(n))}var u=s(o);for(n=0;n<u.length;++n)for(var f=u[n],h=0;h<f.length;++h)f[h]=l[f[h]];return{positions:t,cells:u,meshColor:e}}(p.position,p.delaunayColor,p.delaunayAxis);g.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(g):(g.gl=u,this.delaunayMesh=o(g),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},v.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=function(t,e){var r=new g(t,e.uid);return r.update(e),r}},{\\\"../../constants/gl3d_dashes\\\":670,\\\"../../constants/gl3d_markers\\\":671,\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../lib/str2rgbarray\\\":720,\\\"../scatter/make_bubble_size_func\\\":1061,\\\"./calc_errors\\\":1073,\\\"delaunay-triangulate\\\":150,\\\"gl-error3d\\\":237,\\\"gl-line3d\\\":245,\\\"gl-mesh3d\\\":268,\\\"gl-scatter3d\\\":284}],1075:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../scatter/subtypes\\\"),o=t(\\\"../scatter/marker_defaults\\\"),s=t(\\\"../scatter/line_defaults\\\"),l=t(\\\"../scatter/text_defaults\\\"),c=t(\\\"./attributes\\\");e.exports=function(t,e,r,u){function f(r,n){return i.coerce(t,e,c,r,n)}if(function(t,e,r,i){var a=0,o=r(\\\"x\\\"),s=r(\\\"y\\\"),l=r(\\\"z\\\");n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\",\\\"z\\\"],i),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),e._length=e._xlength=e._ylength=e._zlength=a);return a}(t,e,f,u)){f(\\\"text\\\"),f(\\\"hovertext\\\"),f(\\\"mode\\\"),a.hasLines(e)&&(f(\\\"connectgaps\\\"),s(t,e,r,u,f)),a.hasMarkers(e)&&o(t,e,r,u,f,{noSelect:!0}),a.hasText(e)&&l(t,e,u,f,{noSelect:!0});var h=(e.line||{}).color,p=(e.marker||{}).color;f(\\\"surfaceaxis\\\")>=0&&f(\\\"surfacecolor\\\",h||p);for(var d=[\\\"x\\\",\\\"y\\\",\\\"z\\\"],g=0;g<3;++g){var v=\\\"projection.\\\"+d[g];f(v+\\\".show\\\")&&(f(v+\\\".opacity\\\"),f(v+\\\".scale\\\"))}var m=n.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");m(t,e,r,{axis:\\\"z\\\"}),m(t,e,r,{axis:\\\"y\\\",inherit:\\\"z\\\"}),m(t,e,r,{axis:\\\"x\\\",inherit:\\\"z\\\"})}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1071}],1076:[function(t,e,r){\\\"use strict\\\";var n={};n.plot=t(\\\"./convert\\\"),n.attributes=t(\\\"./attributes\\\"),n.markerSymbols=t(\\\"../../constants/gl3d_markers\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"scatter3d\\\",n.basePlotModule=t(\\\"../../plots/gl3d\\\"),n.categories=[\\\"gl3d\\\",\\\"symbols\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../constants/gl3d_markers\\\":671,\\\"../../plots/gl3d\\\":788,\\\"../scatter/marker_colorbar\\\":1062,\\\"./attributes\\\":1071,\\\"./calc\\\":1072,\\\"./convert\\\":1074,\\\"./defaults\\\":1075}],1077:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/colorbar/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l=n.marker,c=n.line,u=l.line;e.exports={carpet:{valType:\\\"string\\\",editType:\\\"calc\\\"},a:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},b:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},mode:s({},n.mode,{dflt:\\\"markers\\\"}),text:s({},n.text,{}),line:{color:c.color,width:c.width,dash:c.dash,shape:s({},c.shape,{values:[\\\"linear\\\",\\\"spline\\\"]}),smoothing:c.smoothing,editType:\\\"calc\\\"},connectgaps:n.connectgaps,fill:s({},n.fill,{values:[\\\"none\\\",\\\"toself\\\",\\\"tonext\\\"],dflt:\\\"none\\\"}),fillcolor:n.fillcolor,marker:s({symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({width:u.width,editType:\\\"calc\\\"},a(\\\"marker.line\\\")),gradient:l.gradient,editType:\\\"calc\\\"},a(\\\"marker\\\"),{colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[\\\"a\\\",\\\"b\\\",\\\"text\\\",\\\"name\\\"]}),hoveron:n.hoveron}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1078:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../scatter/colorscale_calc\\\"),a=t(\\\"../scatter/arrays_to_calcdata\\\"),o=t(\\\"../scatter/calc_selection\\\"),s=t(\\\"../scatter/calc\\\").calcMarkerSize,l=t(\\\"../carpet/lookup_carpetid\\\");e.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&&r.visible&&\\\"legendonly\\\"!==r.visible){var c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,h=e._length,p=new Array(h),d=!1;for(c=0;c<h;c++)if(u=e.a[c],f=e.b[c],n(u)&&n(f)){var g=r.ab2xy(+u,+f,!0),v=r.isVisible(+u,+f);v||(d=!0),p[c]={x:g[0],y:g[1],a:u,b:f,vis:v}}else p[c]={x:!1,y:!1};return e._needsCull=d,p[0].carpet=r,p[0].trace=e,s(e,h),i(e),a(p,e),o(p,e),p}}},{\\\"../carpet/lookup_carpetid\\\":895,\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc\\\":1045,\\\"../scatter/calc_selection\\\":1046,\\\"../scatter/colorscale_calc\\\":1047,\\\"fast-isnumeric\\\":214}],1079:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/constants\\\"),a=t(\\\"../scatter/subtypes\\\"),o=t(\\\"../scatter/marker_defaults\\\"),s=t(\\\"../scatter/line_defaults\\\"),l=t(\\\"../scatter/line_shape_defaults\\\"),c=t(\\\"../scatter/text_defaults\\\"),u=t(\\\"../scatter/fillcolor_defaults\\\"),f=t(\\\"./attributes\\\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}p(\\\"carpet\\\"),e.xaxis=\\\"x\\\",e.yaxis=\\\"y\\\";var d=p(\\\"a\\\"),g=p(\\\"b\\\"),v=Math.min(d.length,g.length);if(v){e._length=v,p(\\\"text\\\"),p(\\\"mode\\\",v<i.PTS_LINESONLY?\\\"lines+markers\\\":\\\"lines\\\"),a.hasLines(e)&&(s(t,e,r,h,p),l(t,e,p),p(\\\"connectgaps\\\")),a.hasMarkers(e)&&o(t,e,r,h,p,{gradient:!0}),a.hasText(e)&&c(t,e,h,p);var m=[];(a.hasMarkers(e)||a.hasText(e))&&(p(\\\"marker.maxdisplayed\\\"),m.push(\\\"points\\\")),p(\\\"fill\\\"),\\\"none\\\"!==e.fill&&(u(t,e,r,p),a.hasLines(e)||l(t,e,p)),\\\"tonext\\\"!==e.fill&&\\\"toself\\\"!==e.fill||m.push(\\\"fills\\\"),p(\\\"hoveron\\\",m.join(\\\"+\\\")||\\\"points\\\"),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/line_shape_defaults\\\":1059,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1077}],1080:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){var a=n[i];return t.a=a.a,t.b=a.b,t}},{}],1081:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/hover\\\");e.exports=function(t,e,r,i){var a=n(t,e,r,i);if(a&&!1!==a[0].index){var o=a[0];if(void 0===o.index){var s=1-o.y0/t.ya._length,l=t.xa._length,c=l*s/2,u=l-c;return o.x0=Math.max(Math.min(o.x0,u),c),o.x1=Math.max(Math.min(o.x1,u),c),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,p=h._carpet,d=(f.hi||h.hoverinfo).split(\\\"+\\\"),g=[];-1!==d.indexOf(\\\"all\\\")&&(d=[\\\"a\\\",\\\"b\\\"]),-1!==d.indexOf(\\\"a\\\")&&w(p.aaxis,f.a),-1!==d.indexOf(\\\"b\\\")&&w(p.baxis,f.b);var v=p.ab2ij([f.a,f.b]),m=Math.floor(v[0]),y=v[0]-m,x=Math.floor(v[1]),b=v[1]-x,_=p.evalxy([],m,x,y,b);return g.push(\\\"y: \\\"+_[1].toFixed(3)),o.extraText=g.join(\\\"<br>\\\"),a}function w(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\\\"\\\"):t._hovertitle,g.push(r+\\\": \\\"+e.toFixed(3)+t.labelsuffix)}}},{\\\"../scatter/hover\\\":1055}],1082:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"../scatter/style\\\").style,n.styleOnSelect=t(\\\"../scatter/style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.selectPoints=t(\\\"../scatter/select\\\"),n.eventData=t(\\\"./event_data\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"scattercarpet\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"svg\\\",\\\"carpet\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"carpetDependent\\\",\\\"zoomScale\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/select\\\":1065,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1077,\\\"./calc\\\":1078,\\\"./defaults\\\":1079,\\\"./event_data\\\":1080,\\\"./hover\\\":1081,\\\"./plot\\\":1083}],1083:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/plot\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../components/drawing\\\");e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,f={xaxis:i.getFromId(t,u.xaxis||\\\"x\\\"),yaxis:i.getFromId(t,u.yaxis||\\\"y\\\"),plot:e.plot};for(n(t,f,r,o),s=0;s<r.length;s++)l=r[s][0].trace,c=o.selectAll(\\\"g.trace\\\"+l.uid+\\\" .js-line\\\"),a.setClipUrl(c,u._clipPathId)}},{\\\"../../components/drawing\\\":595,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/plot\\\":1064}],1084:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/drawing/attributes\\\").dash,s=t(\\\"../../lib/extend\\\").extendFlat,l=t(\\\"../../plot_api/edit_types\\\").overrideAll,c=n.marker,u=n.line,f=c.line;e.exports=l({lon:{valType:\\\"data_array\\\"},lat:{valType:\\\"data_array\\\"},locations:{valType:\\\"data_array\\\"},locationmode:{valType:\\\"enumerated\\\",values:[\\\"ISO-3\\\",\\\"USA-states\\\",\\\"country names\\\"],dflt:\\\"ISO-3\\\"},mode:s({},n.mode,{dflt:\\\"markers\\\"}),text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),textfont:n.textfont,textposition:n.textposition,line:{color:u.color,width:u.width,dash:o},connectgaps:n.connectgaps,marker:s({symbol:c.symbol,opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,colorbar:c.colorbar,line:s({width:f.width},a(\\\"marker.line\\\")),gradient:c.gradient},a(\\\"marker\\\")),fill:{valType:\\\"enumerated\\\",values:[\\\"none\\\",\\\"toself\\\"],dflt:\\\"none\\\"},fillcolor:n.fillcolor,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[\\\"lon\\\",\\\"lat\\\",\\\"location\\\",\\\"text\\\",\\\"name\\\"]})},\\\"calc\\\",\\\"nested\\\")},{\\\"../../components/colorscale/attributes\\\":577,\\\"../../components/drawing/attributes\\\":594,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1085:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM,a=t(\\\"../scatter/colorscale_calc\\\"),o=t(\\\"../scatter/arrays_to_calcdata\\\"),s=t(\\\"../scatter/calc_selection\\\"),l=t(\\\"../../lib\\\")._;e.exports=function(t,e){for(var r=Array.isArray(e.locations),c=r?e.locations.length:e._length,u=new Array(c),f=0;f<c;f++){var h=u[f]={};if(r){var p=e.locations[f];h.loc=\\\"string\\\"==typeof p?p:null}else{var d=e.lon[f],g=e.lat[f];n(d)&&n(g)?h.lonlat=[+d,+g]:h.lonlat=[i,i]}}return o(u,e),a(e),s(u,e),c&&(u[0].t={labels:{lat:l(t,\\\"lat:\\\")+\\\" \\\",lon:l(t,\\\"lon:\\\")+\\\" \\\"}}),u}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc_selection\\\":1046,\\\"../scatter/colorscale_calc\\\":1047,\\\"fast-isnumeric\\\":214}],1086:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../scatter/marker_defaults\\\"),o=t(\\\"../scatter/line_defaults\\\"),s=t(\\\"../scatter/text_defaults\\\"),l=t(\\\"../scatter/fillcolor_defaults\\\"),c=t(\\\"./attributes\\\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}!function(t,e,r){var n,i,a=0,o=r(\\\"locations\\\");if(o)return r(\\\"locationmode\\\"),a=o.length;return n=r(\\\"lon\\\")||[],i=r(\\\"lat\\\")||[],a=Math.min(n.length,i.length),e._length=a,a}(0,e,f)?e.visible=!1:(f(\\\"text\\\"),f(\\\"hovertext\\\"),f(\\\"mode\\\"),i.hasLines(e)&&(o(t,e,r,u,f),f(\\\"connectgaps\\\")),i.hasMarkers(e)&&a(t,e,r,u,f,{gradient:!0}),i.hasText(e)&&s(t,e,u,f),f(\\\"fill\\\"),\\\"none\\\"!==e.fill&&l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f))}},{\\\"../../lib\\\":696,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1084}],1087:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.location=e.loc?e.loc:null,t}},{}],1088:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM,o=t(\\\"../scatter/get_trace_color\\\"),s=t(\\\"../scatter/fill_hover_text\\\"),l=t(\\\"./attributes\\\");e.exports=function(t,e,r){var c=t.cd,u=c[0].trace,f=t.xa,h=t.ya,p=t.subplot,d=p.projection.isLonLatOverEdges,g=p.project;if(n.getClosest(c,function(t){var n=t.lonlat;if(n[0]===a)return 1/0;if(d(n))return 1/0;var i=g(n),o=g([e,r]),s=Math.abs(i[0]-o[0]),l=Math.abs(i[1]-o[1]),c=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-c,1-3/c)},t),!1!==t.index){var v=c[t.index],m=v.lonlat,y=[f.c2p(m),h.c2p(m)],x=v.mrc||1;return t.x0=y[0]-x,t.x1=y[0]+x,t.y0=y[1]-x,t.y1=y[1]+x,t.loc=v.loc,t.lon=m[0],t.lat=m[1],t.color=o(u,v),t.extraText=function(t,e,r,n){var a=e.hi||t.hoverinfo,o=\\\"all\\\"===a?l.hoverinfo.flags:a.split(\\\"+\\\"),c=-1!==o.indexOf(\\\"location\\\")&&Array.isArray(t.locations),u=-1!==o.indexOf(\\\"lon\\\"),f=-1!==o.indexOf(\\\"lat\\\"),h=-1!==o.indexOf(\\\"text\\\"),p=[];function d(t){return i.tickText(r,r.c2l(t),\\\"hover\\\").text+\\\"\\\\xb0\\\"}c?p.push(e.loc):u&&f?p.push(\\\"(\\\"+d(e.lonlat[0])+\\\", \\\"+d(e.lonlat[1])+\\\")\\\"):u?p.push(n.lon+d(e.lonlat[0])):f&&p.push(n.lat+d(e.lonlat[1]));h&&s(e,t,p);return p.join(\\\"<br>\\\")}(u,v,p.mockAxis,c[0].t.labels),[t]}}},{\\\"../../components/fx\\\":612,\\\"../../constants/numerical\\\":673,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/fill_hover_text\\\":1052,\\\"../scatter/get_trace_color\\\":1054,\\\"./attributes\\\":1084}],1089:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"./style\\\"),n.styleOnSelect=t(\\\"../scatter/style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.eventData=t(\\\"./event_data\\\"),n.selectPoints=t(\\\"./select\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"scattergeo\\\",n.basePlotModule=t(\\\"../../plots/geo\\\"),n.categories=[\\\"geo\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],n.meta={},e.exports=n},{\\\"../../plots/geo\\\":776,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1084,\\\"./calc\\\":1085,\\\"./defaults\\\":1086,\\\"./event_data\\\":1087,\\\"./hover\\\":1088,\\\"./plot\\\":1090,\\\"./select\\\":1091,\\\"./style\\\":1092}],1090:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM,o=t(\\\"../../lib/topojson_utils\\\").getTopojsonFeatures,s=t(\\\"../../lib/geo_location_utils\\\").locationToFeature,l=t(\\\"../../lib/geojson_utils\\\"),c=t(\\\"../scatter/subtypes\\\"),u=t(\\\"./style\\\");function f(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=o(r,e),i=r.locationmode,l=0;l<t.length;l++){var c=t[l],u=s(i,c.loc,n);c.lonlat=u?u.properties.ct:[a,a]}}e.exports=function(t,e,r){for(var o=0;o<r.length;o++)f(r[o],e.topojson);function s(t,e){t.lonlat[0]===a&&n.select(e).remove()}var h=e.layers.frontplot.select(\\\".scatterlayer\\\"),p=i.makeTraceGroups(h,r,\\\"trace scattergeo\\\");p.selectAll(\\\"*\\\").remove(),p.each(function(e){var r=e[0].node3=n.select(this),a=e[0].trace;if(c.hasLines(a)||\\\"none\\\"!==a.fill){var o=l.calcTraceToLineCoords(e),f=\\\"none\\\"!==a.fill?l.makePolygon(o):l.makeLine(o);r.selectAll(\\\"path.js-line\\\").data([{geojson:f,trace:a}]).enter().append(\\\"path\\\").classed(\\\"js-line\\\",!0).style(\\\"stroke-miterlimit\\\",2)}c.hasMarkers(a)&&r.selectAll(\\\"path.point\\\").data(i.identity).enter().append(\\\"path\\\").classed(\\\"point\\\",!0).each(function(t){s(t,this)}),c.hasText(a)&&r.selectAll(\\\"g\\\").data(i.identity).enter().append(\\\"g\\\").append(\\\"text\\\").each(function(t){s(t,this)}),u(t,e)})}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../lib/geo_location_utils\\\":688,\\\"../../lib/geojson_utils\\\":689,\\\"../../lib/topojson_utils\\\":724,\\\"../scatter/subtypes\\\":1068,\\\"./style\\\":1092,d3:148}],1091:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/subtypes\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e){var r,a,o,s,l,c=t.cd,u=t.xaxis,f=t.yaxis,h=[],p=c[0].trace;if(!n.hasMarkers(p)&&!n.hasText(p))return[];if(!1===e)for(l=0;l<c.length;l++)c[l].selected=0;else for(l=0;l<c.length;l++)(a=(r=c[l]).lonlat)[0]!==i&&(o=u.c2p(a),s=f.c2p(a),e.contains([o,s],null,l,t)?(h.push({pointNumber:l,lon:a[0],lat:a[1]}),r.selected=1):r.selected=0);return h}},{\\\"../../constants/numerical\\\":673,\\\"../scatter/subtypes\\\":1068}],1092:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../scatter/style\\\"),s=o.stylePoints,l=o.styleText;e.exports=function(t,e){e&&function(t,e){var r=e[0].trace,o=e[0].node3;o.style(\\\"opacity\\\",e[0].trace.opacity),s(o,r,t),l(o,r,t),o.selectAll(\\\"path.js-line\\\").style(\\\"fill\\\",\\\"none\\\").each(function(t){var e=n.select(this),r=t.trace,o=r.line||{};e.call(a.stroke,o.color).call(i.dashLine,o.dash||\\\"\\\",o.width||0),\\\"none\\\"!==r.fill&&e.call(a.fill,r.fillcolor)})}(t,e)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../scatter/style\\\":1067,d3:148}],1093:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/attributes\\\"),i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../lib/extend\\\").extendFlat,s=t(\\\"../../plot_api/edit_types\\\").overrideAll,l=t(\\\"./constants\\\").DASHES,c=i.line,u=i.marker,f=u.line,h=e.exports=s({x:i.x,x0:i.x0,dx:i.dx,y:i.y,y0:i.y0,dy:i.dy,text:i.text,hovertext:i.hovertext,textposition:i.textposition,textfont:i.textfont,mode:{valType:\\\"flaglist\\\",flags:[\\\"lines\\\",\\\"markers\\\",\\\"text\\\"],extras:[\\\"none\\\"]},line:{color:c.color,width:c.width,shape:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"hv\\\",\\\"vh\\\",\\\"hvh\\\",\\\"vhv\\\"],dflt:\\\"linear\\\",editType:\\\"plot\\\"},dash:{valType:\\\"enumerated\\\",values:Object.keys(l),dflt:\\\"solid\\\"}},marker:o({},a(\\\"marker\\\"),{symbol:u.symbol,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:o({},a(\\\"marker.line\\\"),{width:f.width})}),connectgaps:i.connectgaps,fill:o({},i.fill,{dflt:\\\"none\\\"}),fillcolor:i.fillcolor,selected:{marker:i.selected.marker,textfont:i.selected.textfont},unselected:{marker:i.unselected.marker,textfont:i.unselected.textfont},opacity:n.opacity},\\\"calc\\\",\\\"nested\\\");h.x.editType=h.y.editType=h.x0.editType=h.y0.editType=\\\"calc+clearAxisTypes\\\"},{\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044,\\\"./constants\\\":1094}],1094:[function(t,e,r){\\\"use strict\\\";e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],1095:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"svg-path-sdf\\\"),a=t(\\\"color-normalize\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../components/drawing\\\"),c=t(\\\"../../plots/cartesian/axis_ids\\\"),u=t(\\\"../../lib/gl_format_color\\\").formatColor,f=t(\\\"../scatter/subtypes\\\"),h=t(\\\"../scatter/make_bubble_size_func\\\"),p=t(\\\"./constants\\\"),d=t(\\\"../../constants/interactions\\\").DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1};function v(t){var e,r=t._length,i=t.textfont,a=t.textposition,o=Array.isArray(a)?a:[a],s=i.color,l=i.size,c=i.family,u={};for(u.text=t.text,u.opacity=t.opacity,u.font={},u.align=[],u.baseline=[],e=0;e<o.length;e++){var f=o[e].split(/\\\\s+/);switch(f[1]){case\\\"left\\\":u.align.push(\\\"right\\\");break;case\\\"right\\\":u.align.push(\\\"left\\\");break;default:u.align.push(f[1])}switch(f[0]){case\\\"top\\\":u.baseline.push(\\\"bottom\\\");break;case\\\"bottom\\\":u.baseline.push(\\\"top\\\");break;default:u.baseline.push(f[0])}}if(Array.isArray(s))for(u.color=new Array(r),e=0;e<r;e++)u.color[e]=s[e];else u.color=s;if(Array.isArray(l)||Array.isArray(c))for(u.font=new Array(r),e=0;e<r;e++){var h=u.font[e]={};h.size=Array.isArray(l)?n(l[e])?l[e]:0:l,h.family=Array.isArray(c)?c[e]:c}else u.font={size:l,family:c};return u}function m(t){var e,r,n=t._length,i=t.marker,o={},l=Array.isArray(i.symbol),c=s.isArrayOrTypedArray(i.color),f=s.isArrayOrTypedArray(i.line.color),d=s.isArrayOrTypedArray(i.opacity),g=s.isArrayOrTypedArray(i.size),v=s.isArrayOrTypedArray(i.line.width);if(l||(r=p.OPEN_RE.test(i.symbol)),l||c||f||d){o.colors=new Array(n),o.borderColors=new Array(n);var m=u(i,i.opacity,n),y=u(i.line,i.opacity,n);if(!Array.isArray(y[0])){var x=y;for(y=Array(n),e=0;e<n;e++)y[e]=x}if(!Array.isArray(m[0])){var b=m;for(m=Array(n),e=0;e<n;e++)m[e]=b}for(o.colors=m,o.borderColors=y,e=0;e<n;e++){if(l){var _=i.symbol[e];r=p.OPEN_RE.test(_)}r&&(y[e]=m[e].slice(),m[e]=m[e].slice(),m[e][3]=0)}o.opacity=t.opacity}else r?(o.color=a(i.color,\\\"uint8\\\"),o.color[3]=0,o.borderColor=a(i.color,\\\"uint8\\\")):(o.color=a(i.color,\\\"uint8\\\"),o.borderColor=a(i.line.color,\\\"uint8\\\")),o.opacity=t.opacity*i.opacity;if(l)for(o.markers=new Array(n),e=0;e<n;e++)o.markers[e]=T(i.symbol[e]);else o.marker=T(i.symbol);var w,k=h(t);if(g||v){var M,A=o.sizes=new Array(n),S=o.borderSizes=new Array(n),C=0;if(g){for(e=0;e<n;e++)A[e]=k(i.size[e]),C+=A[e];M=C/n}else for(w=k(i.size),e=0;e<n;e++)A[e]=w;if(v)for(e=0;e<n;e++)S[e]=i.line.width[e]/2;else for(w=i.line.width/2,e=0;e<n;e++)S[e]=w;o.sizeAvg=M}else o.size=k(i&&i.size||10),o.borderSizes=k(i.line.width);return o}function y(t,e){var r=t.marker,n={};return e?(e.marker&&e.marker.symbol?n=m(s.extendFlat({},r,e.marker)):e.marker&&(e.marker.size&&(n.size=e.marker.size/2),e.marker.color&&(n.colors=e.marker.color),void 0!==e.marker.opacity&&(n.opacity=e.marker.opacity)),n):n}function x(t,e){var r={};if(!e)return r;if(e.textfont){var n={opacity:1,text:t.text,textposition:t.textposition,textfont:s.extendFlat({},t.textfont)};e.textfont&&s.extendFlat(n.textfont,e.textfont),r=v(n)}return r}function b(t,e){var r={capSize:2*e.width,lineWidth:e.thickness,color:e.color};return e.copy_ystyle&&(r=t.error_y),r}var _=p.SYMBOL_SDF_SIZE,w=p.SYMBOL_SIZE,k=p.SYMBOL_STROKE,M={},A=l.symbolFuncs[0](.05*w);function T(t){if(\\\"circle\\\"===t)return null;var e,r,n=l.symbolNumber(t),a=l.symbolFuncs[n%100],o=!!l.symbolNoDot[n%100],s=!!l.symbolNoFill[n%100],c=p.DOT_RE.test(t);return M[t]?M[t]:(e=c&&!o?a(1.1*w)+A:a(w),r=i(e,{w:_,h:_,viewBox:[-w,-w,w,w],stroke:s?k:-k}),M[t]=r,r||null)}e.exports={style:function(t,e){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0};if(!0!==e.visible)return n;if(f.hasText(e)&&(n.text=v(e),n.textSel=x(e,e.selected),n.textUnsel=x(e,e.unselected)),f.hasMarkers(e)&&(n.marker=m(e),n.markerSel=y(e,e.selected),n.markerUnsel=y(e,e.unselected),!e.unselected&&Array.isArray(e.marker.opacity))){var i=e.marker.opacity;for(n.markerUnsel.opacity=new Array(i.length),r=0;r<i.length;r++)n.markerUnsel.opacity[r]=d*i[r]}if(f.hasLines(e)){n.line={overlay:!0,thickness:e.line.width,color:e.line.color,opacity:e.opacity};var a=(p.DASHES[e.line.dash]||[1]).slice();for(r=0;r<a.length;++r)a[r]*=e.line.width;n.line.dashes=a}return e.error_x&&e.error_x.visible&&(n.errorX=b(e,e.error_x)),e.error_y&&e.error_y.visible&&(n.errorY=b(e,e.error_y)),e.fill&&\\\"none\\\"!==e.fill&&(n.fill={closed:!0,fill:e.fillcolor,thickness:0}),n},markerStyle:m,markerSelection:y,linePositions:function(t,e,r){var n,i,a=r.length,o=a/2;if(f.hasLines(e)&&o)if(\\\"hv\\\"===e.line.shape){for(n=[],i=0;i<o-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*i],r[2*i+1]),isNaN(r[2*i+2])||isNaN(r[2*i+3])?n.push(NaN,NaN):n.push(r[2*i+2],r[2*i+1]));n.push(r[a-2],r[a-1])}else if(\\\"hvh\\\"===e.line.shape){for(n=[],i=0;i<o-1;i++)if(isNaN(r[2*i])||isNaN(r[2*i+1])||isNaN(r[2*i+2])||isNaN(r[2*i+3]))isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+1]),n.push(NaN,NaN);else{var s=(r[2*i]+r[2*i+2])/2;n.push(r[2*i],r[2*i+1],s,r[2*i+1],s,r[2*i+3])}n.push(r[a-2],r[a-1])}else if(\\\"vhv\\\"===e.line.shape){for(n=[],i=0;i<o-1;i++)if(isNaN(r[2*i])||isNaN(r[2*i+1])||isNaN(r[2*i+2])||isNaN(r[2*i+3]))isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+1]),n.push(NaN,NaN);else{var l=(r[2*i+1]+r[2*i+3])/2;n.push(r[2*i],r[2*i+1],r[2*i],l,r[2*i+2],l)}n.push(r[a-2],r[a-1])}else if(\\\"vh\\\"===e.line.shape){for(n=[],i=0;i<o-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*i],r[2*i+1]),isNaN(r[2*i+2])||isNaN(r[2*i+3])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+3]));n.push(r[a-2],r[a-1])}else n=r;var c=!1;for(i=0;i<n.length;i++)if(isNaN(n[i])){c=!0;break}var u=c||n.length>p.TOO_MANY_POINTS?\\\"rect\\\":f.hasMarkers(e)?\\\"rect\\\":\\\"round\\\";if(c&&e.connectgaps){var h=n[0],d=n[1];for(i=0;i<n.length;i+=2)isNaN(n[i])||isNaN(n[i+1])?(n[i]=h,n[i+1]=d):(h=n[i],d=n[i+1])}return{join:u,positions:n}},errorBarPositions:function(t,e,r,i,a){var s=o.getComponentMethod(\\\"errorbars\\\",\\\"makeComputeError\\\"),l=c.getFromId(t,e.xaxis),u=c.getFromId(t,e.yaxis),f=r.length/2,h={};function p(t,i){var a=i._id.charAt(0),o=e[\\\"error_\\\"+a];if(o&&o.visible&&(\\\"linear\\\"===i.type||\\\"log\\\"===i.type)){for(var l=s(o),c={x:0,y:1}[a],u={x:[0,1,2,3],y:[2,3,0,1]}[a],p=new Float64Array(4*f),d=1/0,g=-1/0,v=0,m=0;v<f;v++,m+=4){var y=t[v];if(n(y)){var x=r[2*v+c],b=l(y,v),_=b[0],w=b[1];if(n(_)&&n(w)){var k=y-_,M=y+w;p[m+u[0]]=x-i.c2l(k),p[m+u[1]]=i.c2l(M)-x,p[m+u[2]]=0,p[m+u[3]]=0,d=Math.min(d,y-_),g=Math.max(g,y+w)}}}h[a]={positions:r,errors:p,_bnds:[d,g]}}}return p(i,l),p(a,u),h},textPosition:function(t,e,r,n){var i,a=e._length,o={};if(f.hasMarkers(e)){var s=r.font,l=r.align,c=r.baseline;for(o.offset=new Array(a),i=0;i<a;i++){var u=n.sizes?n.sizes[i]:n.size,h=Array.isArray(s)?s[i].size:s.size,p=Array.isArray(l)?l.length>1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,v=g[p],m=g[d],y=u?u/.8+1:0,x=-m*y-.5*m;o.offset[i]=[v*y/h,x/h]}}return o}}},{\\\"../../components/drawing\\\":595,\\\"../../constants/interactions\\\":672,\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../registry\\\":828,\\\"../scatter/make_bubble_size_func\\\":1061,\\\"../scatter/subtypes\\\":1068,\\\"./constants\\\":1094,\\\"color-normalize\\\":108,\\\"fast-isnumeric\\\":214,\\\"svg-path-sdf\\\":512}],1096:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"../scatter/constants\\\"),s=t(\\\"../scatter/subtypes\\\"),l=t(\\\"../scatter/xy_defaults\\\"),c=t(\\\"../scatter/marker_defaults\\\"),u=t(\\\"../scatter/line_defaults\\\"),f=t(\\\"../scatter/fillcolor_defaults\\\"),h=t(\\\"../scatter/text_defaults\\\");e.exports=function(t,e,r,p){function d(r,i){return n.coerce(t,e,a,r,i)}var g=!!t.marker&&/-open/.test(t.marker.symbol),v=s.isBubble(t),m=l(t,e,p,d);if(m){var y=m<o.PTS_LINESONLY?\\\"lines+markers\\\":\\\"lines\\\";d(\\\"text\\\"),d(\\\"hovertext\\\"),d(\\\"mode\\\",y),s.hasLines(e)&&(d(\\\"connectgaps\\\"),u(t,e,r,p,d),d(\\\"line.shape\\\")),s.hasMarkers(e)&&(c(t,e,r,p,d),d(\\\"marker.line.width\\\",g||v?1:0)),s.hasText(e)&&h(t,e,p,d),d(\\\"fill\\\"),\\\"none\\\"!==e.fill&&f(t,e,r,d);var x=i.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");x(t,e,r,{axis:\\\"y\\\"}),x(t,e,r,{axis:\\\"x\\\",inherit:\\\"y\\\"}),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"../scatter/xy_defaults\\\":1070,\\\"./attributes\\\":1093}],1097:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"regl-scatter2d\\\"),i=t(\\\"regl-line2d\\\"),a=t(\\\"regl-error2d\\\"),o=t(\\\"point-cluster\\\"),s=t(\\\"array-range\\\"),l=t(\\\"gl-text\\\"),c=t(\\\"../../registry\\\"),u=t(\\\"../../lib\\\"),f=t(\\\"../../lib/prepare_regl\\\"),h=t(\\\"../../plots/cartesian/axis_ids\\\"),p=t(\\\"../../plots/cartesian/autorange\\\").findExtremes,d=t(\\\"../../components/color\\\"),g=t(\\\"../scatter/subtypes\\\"),v=t(\\\"../scatter/calc\\\"),m=v.calcMarkerSize,y=v.calcAxisExpansion,x=v.setFirstScatter,b=t(\\\"../scatter/colorscale_calc\\\"),_=t(\\\"../scatter/link_traces\\\"),w=t(\\\"../scatter/get_trace_color\\\"),k=t(\\\"../scatter/fill_hover_text\\\"),M=t(\\\"./convert\\\"),A=t(\\\"../../constants/numerical\\\").BADNUM,T=t(\\\"./constants\\\").TOO_MANY_POINTS,S=t(\\\"../../constants/interactions\\\").DESELECTDIM;function C(t,e,r){var n=t._extremes[e._id],i=p(e,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}function E(t,e){var r=e._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[]},i={selectBatch:null,unselectBatch:null,fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:null};return e._scene||((r=e._scene={}).init=function(){u.extendFlat(r,i,n)},r.init(),r.update=function(t){var e=u.repeat(t,r.count);if(r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.glText)for(var n=0;n<r.count;n++)r.glText[n].update(t)},r.draw=function(){for(var t=r.count,e=r.fill2d,n=r.error2d,i=r.line2d,a=r.scatter2d,o=r.glText,s=r.select2d,l=r.selectBatch,c=r.unselectBatch,u=0;u<t;u++)e&&r.fillOrder[u]&&e.draw(r.fillOrder[u]),i&&r.lineOptions[u]&&i.draw(u),n&&(r.errorXOptions[u]&&n.draw(u),r.errorYOptions[u]&&n.draw(u+t)),!a||!r.markerOptions[u]||l&&l[u]||a.draw(u),o[u]&&r.textOptions[u]&&o[u].render();a&&s&&l&&(s.draw(l),a.draw(c)),r.dirty=!1},r.destroy=function(){r.fill2d&&r.fill2d.destroy&&r.fill2d.destroy(),r.scatter2d&&r.scatter2d.destroy&&r.scatter2d.destroy(),r.error2d&&r.error2d.destroy&&r.error2d.destroy(),r.line2d&&r.line2d.destroy&&r.line2d.destroy(),r.select2d&&r.select2d.destroy&&r.select2d.destroy(),r.glText&&r.glText.forEach(function(t){t.destroy&&t.destroy()}),r.lineOptions=null,r.fillOptions=null,r.markerOptions=null,r.markerSelectedOptions=null,r.markerUnselectedOptions=null,r.errorXOptions=null,r.errorYOptions=null,r.textOptions=null,r.textSelectedOptions=null,r.textUnselectedOptions=null,r.selectBatch=null,r.unselectBatch=null,e._scene=null}),r.dirty||u.extendFlat(r,n),r}function L(t,e,r,n){var i=t.xa,a=t.ya,o=t.distance,s=t.dxy,l=t.index,f={pointNumber:l,x:e[l],y:r[l]};f.tx=Array.isArray(n.text)?n.text[l]:n.text,f.htx=Array.isArray(n.hovertext)?n.hovertext[l]:n.hovertext,f.data=Array.isArray(n.customdata)?n.customdata[l]:n.customdata,f.tp=Array.isArray(n.textposition)?n.textposition[l]:n.textposition;var h=n.textfont;h&&(f.ts=Array.isArray(h.size)?h.size[l]:h.size,f.tc=Array.isArray(h.color)?h.color[l]:h.color,f.tf=Array.isArray(h.family)?h.family[l]:h.family);var p=n.marker;p&&(f.ms=u.isArrayOrTypedArray(p.size)?p.size[l]:p.size,f.mo=u.isArrayOrTypedArray(p.opacity)?p.opacity[l]:p.opacity,f.mx=Array.isArray(p.symbol)?p.symbol[l]:p.symbol,f.mc=u.isArrayOrTypedArray(p.color)?p.color[l]:p.color);var d=p&&p.line;d&&(f.mlc=Array.isArray(d.color)?d.color[l]:d.color,f.mlw=u.isArrayOrTypedArray(d.width)?d.width[l]:d.width);var g=p&&p.gradient;g&&\\\"none\\\"!==g.type&&(f.mgt=Array.isArray(g.type)?g.type[l]:g.type,f.mgc=Array.isArray(g.color)?g.color[l]:g.color);var v=i.c2p(f.x,!0),m=a.c2p(f.y,!0),y=f.mrc||1,x=n.hoverlabel;x&&(f.hbg=Array.isArray(x.bgcolor)?x.bgcolor[l]:x.bgcolor,f.hbc=Array.isArray(x.bordercolor)?x.bordercolor[l]:x.bordercolor,f.hts=Array.isArray(x.font.size)?x.font.size[l]:x.font.size,f.htc=Array.isArray(x.font.color)?x.font.color[l]:x.font.color,f.htf=Array.isArray(x.font.family)?x.font.family[l]:x.font.family,f.hnl=Array.isArray(x.namelength)?x.namelength[l]:x.namelength);var b=n.hoverinfo;b&&(f.hi=Array.isArray(b)?b[l]:b);var _={};return _[t.index]=f,u.extendFlat(t,{color:w(n,f),x0:v-y,x1:v+y,xLabelVal:f.x,y0:m-y,y1:m+y,yLabelVal:f.y,cd:_,distance:o,spikeDistance:s}),f.htx?t.text=f.htx:f.tx?t.text=f.tx:n.text&&(t.text=n.text),k(f,n,t),c.getComponentMethod(\\\"errorbars\\\",\\\"hoverInfo\\\")(f,n,t),t}function z(t){var e,r,n=t[0],i=n.trace,a=n.t,o=a._scene,s=a.index,l=o.selectBatch[s],c=o.unselectBatch[s],f=o.textOptions[s],h=o.textSelectedOptions[s]||{},p=o.textUnselectedOptions[s]||{},g=u.extendFlat({},f);if(l&&c){var v=h.color,m=p.color,y=f.color,x=Array.isArray(y);for(g.color=new Array(i._length),e=0;e<l.length;e++)r=l[e],g.color[r]=v||(x?y[r]:y);for(e=0;e<c.length;e++){r=c[e];var b=x?y[r]:y;g.color[r]=m||(v?b:d.addOpacity(b,S))}}o.glText[s].update(g)}e.exports={moduleType:\\\"trace\\\",name:\\\"scattergl\\\",basePlotModule:t(\\\"../../plots/cartesian\\\"),categories:[\\\"gl\\\",\\\"regl\\\",\\\"cartesian\\\",\\\"symbols\\\",\\\"errorBarsOK\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),crossTraceDefaults:t(\\\"../scatter/cross_trace_defaults\\\"),colorbar:t(\\\"../scatter/marker_colorbar\\\"),calc:function(t,e){var r,n,i,a=t._fullLayout,s=h.getFromId(t,e.xaxis),l=h.getFromId(t,e.yaxis),c=a._plots[e.xaxis+e.yaxis],f=e._length,p=2*f,d={},g=s.makeCalcdata(e,\\\"x\\\"),v=l.makeCalcdata(e,\\\"y\\\"),_=new Array(p);for(r=0;r<f;r++)n=g[r],i=v[r],_[2*r]=n===A?NaN:n,_[2*r+1]=i===A?NaN:i;if(\\\"log\\\"===s.type)for(r=0;r<p;r+=2)_[r]=s.c2l(_[r]);if(\\\"log\\\"===l.type)for(r=1;r<p;r+=2)_[r]=l.c2l(_[r]);if(\\\"log\\\"!==s.type&&\\\"log\\\"!==l.type)d.tree=o(_);else{var w=d.ids=new Array(f);for(r=0;r<f;r++)w[r]=r}b(e);var k=function(t,e,r,n,i,a){var o=M.style(t,r);if(o.marker&&(o.marker.positions=n),o.line&&n.length>1&&u.extendFlat(o.line,M.linePositions(t,r,n)),o.errorX||o.errorY){var s=M.errorBarPositions(t,r,n,i,a);o.errorX&&u.extendFlat(o.errorX,s.x),o.errorY&&u.extendFlat(o.errorY,s.y)}return o.text&&(u.extendFlat(o.text,{positions:n},M.textPosition(t,r,o.text,o.marker)),u.extendFlat(o.textSel,{positions:n},M.textPosition(t,r,o.text,o.markerSel)),u.extendFlat(o.textUnsel,{positions:n},M.textPosition(t,r,o.text,o.markerUnsel))),o}(t,0,e,_,g,v),S=E(0,c);x(a,e);var L=f<T?m(e,f):2*(k.marker.sizeAvg||Math.max(k.marker.size,3));return y(t,e,s,l,g,v,L),k.errorX&&C(e,s,k.errorX),k.errorY&&C(e,l,k.errorY),k.fill&&!S.fill2d&&(S.fill2d=!0),k.marker&&!S.scatter2d&&(S.scatter2d=!0),k.line&&!S.line2d&&(S.line2d=!0),!k.errorX&&!k.errorY||S.error2d||(S.error2d=!0),k.text&&!S.glText&&(S.glText=!0),k.marker&&f>=T&&(k.marker.cluster=d.tree),S.lineOptions.push(k.line),S.errorXOptions.push(k.errorX),S.errorYOptions.push(k.errorY),S.fillOptions.push(k.fill),S.markerOptions.push(k.marker),S.markerSelectedOptions.push(k.markerSel),S.markerUnselectedOptions.push(k.markerUnsel),S.textOptions.push(k.text),S.textSelectedOptions.push(k.textSel),S.textUnselectedOptions.push(k.textUnsel),d._scene=S,d.index=S.count,d.x=g,d.y=v,d.positions=_,S.count++,[{x:!1,y:!1,t:d,trace:e}]},plot:function(t,e,r){if(r.length){var o,s,c=t._fullLayout,h=e._scene,p=e.xaxis,d=e.yaxis;if(h)if(f(t,[\\\"ANGLE_instanced_arrays\\\",\\\"OES_element_index_uint\\\"])){var g=c._glcanvas.data()[0].regl;if(_(t,e,r),h.dirty){if(!0===h.error2d&&(h.error2d=a(g)),!0===h.line2d&&(h.line2d=i(g)),!0===h.scatter2d&&(h.scatter2d=n(g)),!0===h.fill2d&&(h.fill2d=i(g)),!0===h.glText)for(h.glText=new Array(h.count),o=0;o<h.count;o++)h.glText[o]=new l(g);if(h.glText)for(o=0;o<h.count;o++)h.glText[o].update(h.textOptions[o]);if(h.line2d&&(h.line2d.update(h.lineOptions),h.lineOptions=h.lineOptions.map(function(t){if(t&&t.positions){for(var e=t.positions,r=0;r<e.length&&(isNaN(e[r])||isNaN(e[r+1]));)r+=2;for(var n=e.length-2;n>r&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t}),h.line2d.update(h.lineOptions)),h.error2d){var v=(h.errorXOptions||[]).concat(h.errorYOptions||[]);h.error2d.update(v)}h.scatter2d&&h.scatter2d.update(h.markerOptions),h.fillOrder=u.repeat(null,h.count),h.fill2d&&(h.fillOptions=h.fillOptions.map(function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,c=h.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(h.fillOrder[e]=u);var f,p,d=[],g=c&&c.positions||l.positions;if(\\\"tozeroy\\\"===s.fill){for(f=0;f<g.length&&isNaN(g[f+1]);)f+=2;for(p=g.length-2;p>f&&isNaN(g[p+1]);)p-=2;0!==g[f+1]&&(d=[g[f],0]),d=d.concat(g.slice(f,p+2)),0!==g[p+1]&&(d=d.concat([g[p],0]))}else if(\\\"tozerox\\\"===s.fill){for(f=0;f<g.length&&isNaN(g[f]);)f+=2;for(p=g.length-2;p>f&&isNaN(g[p]);)p-=2;0!==g[f]&&(d=[0,g[f+1]]),d=d.concat(g.slice(f,p+2)),0!==g[p]&&(d=d.concat([0,g[p+1]]))}else if(\\\"toself\\\"===s.fill||\\\"tonext\\\"===s.fill){for(d=[],i=0,a=0;a<g.length;a+=2)(isNaN(g[a])||isNaN(g[a+1]))&&((d=d.concat(g.slice(i,a))).push(g[i],g[i+1]),i=a+2);d=d.concat(g.slice(i)),i&&d.push(g[i],g[i+1])}else{var v=s._nexttrace;if(v){var m=h.lineOptions[e+1];if(m){var y=m.positions;if(\\\"tonexty\\\"===s.fill){for(d=g.slice(),e=Math.floor(y.length/2);e--;){var x=y[2*e],b=y[2*e+1];isNaN(x)||isNaN(b)||d.push(x,b)}t.fill=v.fillcolor}}}}if(s._prevtrace&&\\\"tonext\\\"===s._prevtrace.fill){var _=h.lineOptions[e-1].positions,w=d.length/2,k=[i=w];for(a=0;a<_.length;a+=2)(isNaN(_[a])||isNaN(_[a+1]))&&(k.push(a/2+w+1),i=a+2);d=d.concat(_),t.hole=k}return t.fillmode=s.fill,t.opacity=s.opacity,t.positions=d,t}}),h.fill2d.update(h.fillOptions))}h.selectBatch=null,h.unselectBatch=null;var m=c.dragmode,y=\\\"lasso\\\"===m||\\\"select\\\"===m,x=c.clickmode.indexOf(\\\"select\\\")>-1;for(o=0;o<r.length;o++){var b=r[o][0],w=b.trace,k=b.t,M=k.index,A=w._length,T=k.x,S=k.y;if(w.selectedpoints||y||x){if(y||(y=!0),h.selectBatch||(h.selectBatch=[],h.unselectBatch=[]),w.selectedpoints){var C=h.selectBatch[M]=u.selIndices2selPoints(w),E={};for(s=0;s<C.length;s++)E[C[s]]=1;var L=[];for(s=0;s<A;s++)E[s]||L.push(s);h.unselectBatch[M]=L}var O=k.xpx=new Array(A),I=k.ypx=new Array(A);for(s=0;s<A;s++)O[s]=p.c2p(T[s]),I[s]=d.c2p(S[s])}else k.xpx=k.ypx=null}y?(h.select2d||(h.select2d=n(c._glcanvas.data()[1].regl)),h.scatter2d&&h.selectBatch&&h.selectBatch.length&&h.scatter2d.update(h.markerUnselectedOptions.map(function(t,e){return h.selectBatch[e]?t:null})),h.select2d&&(h.select2d.update(h.markerOptions),h.select2d.update(h.markerSelectedOptions)),h.glText&&r.forEach(function(t){t&&t[0]&&t[0].trace&&z(t)})):h.scatter2d&&h.scatter2d.update(h.markerOptions);var P={viewport:function(t,e,r){var n=t._size,i=t.width,a=t.height;return[n.l+e.domain[0]*n.w,n.b+r.domain[0]*n.h,i-n.r-(1-e.domain[1])*n.w,a-n.t-(1-r.domain[1])*n.h]}(c,p,d),range:[(p._rl||p.range)[0],(d._rl||d.range)[0],(p._rl||p.range)[1],(d._rl||d.range)[1]]},D=u.repeat(P,h.count);h.fill2d&&h.fill2d.update(D),h.line2d&&h.line2d.update(D),h.error2d&&h.error2d.update(D.concat(D)),h.scatter2d&&h.scatter2d.update(D),h.select2d&&h.select2d.update(D),h.glText&&h.glText.forEach(function(t){t.update(P)})}else h.init()}},hoverPoints:function(t,e,r,n){var i,a,o,s,l,c,u,f,h,p=t.cd,d=p[0].t,g=p[0].trace,v=t.xa,m=t.ya,y=d.x,x=d.y,b=v.c2p(e),_=m.c2p(r),w=t.distance;if(d.tree){var k=v.p2c(b-w),M=v.p2c(b+w),A=m.p2c(_-w),T=m.p2c(_+w);i=\\\"x\\\"===n?d.tree.range(Math.min(k,M),Math.min(m._rl[0],m._rl[1]),Math.max(k,M),Math.max(m._rl[0],m._rl[1])):d.tree.range(Math.min(k,M),Math.min(A,T),Math.max(k,M),Math.max(A,T))}else{if(!d.ids)return[t];i=d.ids}var S=w;if(\\\"x\\\"===n)for(l=0;l<i.length;l++)o=y[i[l]],(c=Math.abs(v.c2p(o)-b))<S&&(S=c,u=m.c2p(x[i[l]])-_,h=Math.sqrt(c*c+u*u),a=i[l]);else for(l=0;l<i.length;l++)o=y[i[l]],s=x[i[l]],c=v.c2p(o)-b,u=m.c2p(s)-_,(f=Math.sqrt(c*c+u*u))<S&&(S=h=f,a=i[l]);return t.index=a,t.distance=S,t.dxy=h,void 0===a?[t]:(L(t,y,x,g),[t])},selectPoints:function(t,e){var r=t.cd,n=[],i=r[0].trace,a=r[0].t,o=i._length,l=a.x,c=a.y,u=a._scene;if(!u)return n;var f=g.hasText(i),h=g.hasMarkers(i),p=!h&&!f;if(!0!==i.visible||p)return n;var d,v=null,m=null;if(!1===e||e.degenerate)m=s(o);else for(v=[],m=[],d=0;d<o;d++)e.contains([a.xpx[d],a.ypx[d]],!1,d,t)?(v.push(d),n.push({pointNumber:d,x:l[d],y:c[d]})):m.push(d);if(u.selectBatch||(u.selectBatch=[],u.unselectBatch=[]),!u.selectBatch[a.index]){for(d=0;d<u.count;d++)u.selectBatch[d]=[],u.unselectBatch[d]=[];h&&u.scatter2d.update(u.markerUnselectedOptions)}return u.selectBatch[a.index]=v,u.unselectBatch[a.index]=m,f&&z(r),n},sceneUpdate:E,calcHover:L,meta:{}}},{\\\"../../components/color\\\":570,\\\"../../constants/interactions\\\":672,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../lib/prepare_regl\\\":710,\\\"../../plots/cartesian\\\":757,\\\"../../plots/cartesian/autorange\\\":744,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../registry\\\":828,\\\"../scatter/calc\\\":1045,\\\"../scatter/colorscale_calc\\\":1047,\\\"../scatter/cross_trace_defaults\\\":1050,\\\"../scatter/fill_hover_text\\\":1052,\\\"../scatter/get_trace_color\\\":1054,\\\"../scatter/link_traces\\\":1060,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/subtypes\\\":1068,\\\"./attributes\\\":1093,\\\"./constants\\\":1094,\\\"./convert\\\":1095,\\\"./defaults\\\":1096,\\\"array-range\\\":55,\\\"gl-text\\\":304,\\\"point-cluster\\\":452,\\\"regl-error2d\\\":473,\\\"regl-line2d\\\":474,\\\"regl-scatter2d\\\":475}],1098:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scattergeo/attributes\\\"),i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../plots/mapbox/layout_attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../components/colorbar/attributes\\\"),l=t(\\\"../../lib/extend\\\").extendFlat,c=t(\\\"../../plot_api/edit_types\\\").overrideAll,u=n.line,f=n.marker;e.exports=c({lon:n.lon,lat:n.lat,mode:l({},i.mode,{dflt:\\\"markers\\\"}),text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),line:{color:u.color,width:u.width},connectgaps:i.connectgaps,marker:{symbol:{valType:\\\"string\\\",dflt:\\\"circle\\\",arrayOk:!0},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,color:f.color,colorscale:f.colorscale,cauto:f.cauto,cmax:f.cmax,cmin:f.cmin,autocolorscale:f.autocolorscale,reversescale:f.reversescale,showscale:f.showscale,colorbar:s},fill:n.fill,fillcolor:i.fillcolor,textfont:a.layers.symbol.textfont,textposition:a.layers.symbol.textposition,selected:{marker:i.selected.marker},unselected:{marker:i.unselected.marker},hoverinfo:l({},o.hoverinfo,{flags:[\\\"lon\\\",\\\"lat\\\",\\\"text\\\",\\\"name\\\"]})},\\\"calc\\\",\\\"nested\\\")},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../../plots/mapbox/layout_attributes\\\":805,\\\"../scatter/attributes\\\":1044,\\\"../scattergeo/attributes\\\":1084}],1099:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM,o=t(\\\"../../lib/geojson_utils\\\"),s=t(\\\"../../components/colorscale\\\"),l=t(\\\"../../components/drawing\\\"),c=t(\\\"../scatter/make_bubble_size_func\\\"),u=t(\\\"../scatter/subtypes\\\"),f=t(\\\"../../plots/mapbox/convert_text_opts\\\");function h(){return{geojson:o.makeBlank(),layout:{visibility:\\\"none\\\"},paint:{}}}function p(t){return i.isArrayOrTypedArray(t)?function(t){return t}:t?function(){return t}:d}function d(){return\\\"\\\"}function g(t){return t[0]===a}e.exports=function(t){var e,r=t[0].trace,a=!0===r.visible,v=\\\"none\\\"!==r.fill,m=u.hasLines(r),y=u.hasMarkers(r),x=u.hasText(r),b=y&&\\\"circle\\\"===r.marker.symbol,_=y&&\\\"circle\\\"!==r.marker.symbol,w=h(),k=h(),M=h(),A=h(),T={fill:w,line:k,circle:M,symbol:A};if(!a)return T;if((v||m)&&(e=o.calcTraceToLineCoords(t)),v&&(w.geojson=o.makePolygon(e),w.layout.visibility=\\\"visible\\\",i.extendFlat(w.paint,{\\\"fill-color\\\":r.fillcolor})),m&&(k.geojson=o.makeLine(e),k.layout.visibility=\\\"visible\\\",i.extendFlat(k.paint,{\\\"line-width\\\":r.line.width,\\\"line-color\\\":r.line.color,\\\"line-opacity\\\":r.opacity})),b){var S=function(t){var e,r,a,o,u=t[0].trace,f=u.marker,h=u.selectedpoints,p=i.isArrayOrTypedArray(f.color),d=i.isArrayOrTypedArray(f.size),v=i.isArrayOrTypedArray(f.opacity);function m(t){return u.opacity*t}p&&(r=s.hasColorscale(u,\\\"marker\\\")?s.makeColorScaleFunc(s.extractScale(f.colorscale,f.cmin,f.cmax)):i.identity);d&&(a=c(u));v&&(o=function(t){var e=n(t)?+i.constrain(t,0,1):0;return m(e)});var y,x=[];for(e=0;e<t.length;e++){var b=t[e],_=b.lonlat;if(!g(_)){var w={};r&&(w.mcc=b.mcc=r(b.mc)),a&&(w.mrc=b.mrc=a(b.ms)),o&&(w.mo=o(b.mo)),h&&(w.selected=b.selected||0),x.push({type:\\\"Feature\\\",geometry:{type:\\\"Point\\\",coordinates:_},properties:w})}}if(h)for(y=l.makeSelectedPointStyleFns(u),e=0;e<x.length;e++){var k=x[e].properties;y.selectedOpacityFn&&(k.mo=m(y.selectedOpacityFn(k))),y.selectedColorFn&&(k.mcc=y.selectedColorFn(k)),y.selectedSizeFn&&(k.mrc=y.selectedSizeFn(k))}return{geojson:{type:\\\"FeatureCollection\\\",features:x},mcc:p||y&&y.selectedColorFn?{type:\\\"identity\\\",property:\\\"mcc\\\"}:f.color,mrc:d||y&&y.selectedSizeFn?{type:\\\"identity\\\",property:\\\"mrc\\\"}:(M=f.size,M/2),mo:v||y&&y.selectedOpacityFn?{type:\\\"identity\\\",property:\\\"mo\\\"}:m(f.opacity)};var M}(t);M.geojson=S.geojson,M.layout.visibility=\\\"visible\\\",i.extendFlat(M.paint,{\\\"circle-color\\\":S.mcc,\\\"circle-radius\\\":S.mrc,\\\"circle-opacity\\\":S.mo})}if((_||x)&&(A.geojson=function(t){for(var e=t[0].trace,r=(e.marker||{}).symbol,n=e.text,i=\\\"circle\\\"!==r?p(r):d,a=u.hasText(e)?p(n):d,o=[],s=0;s<t.length;s++){var l=t[s];g(l.lonlat)||o.push({type:\\\"Feature\\\",geometry:{type:\\\"Point\\\",coordinates:l.lonlat},properties:{symbol:i(l.mx),text:a(l.tx)}})}return{type:\\\"FeatureCollection\\\",features:o}}(t),i.extendFlat(A.layout,{visibility:\\\"visible\\\",\\\"icon-image\\\":\\\"{symbol}-15\\\",\\\"text-field\\\":\\\"{text}\\\"}),_&&(i.extendFlat(A.layout,{\\\"icon-size\\\":r.marker.size/10}),i.extendFlat(A.paint,{\\\"icon-opacity\\\":r.opacity*r.marker.opacity,\\\"icon-color\\\":r.marker.color})),x)){var C=(r.marker||{}).size,E=f(r.textposition,C);i.extendFlat(A.layout,{\\\"text-size\\\":r.textfont.size,\\\"text-anchor\\\":E.anchor,\\\"text-offset\\\":E.offset}),i.extendFlat(A.paint,{\\\"text-color\\\":r.textfont.color,\\\"text-opacity\\\":r.opacity})}return T}},{\\\"../../components/colorscale\\\":585,\\\"../../components/drawing\\\":595,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../lib/geojson_utils\\\":689,\\\"../../plots/mapbox/convert_text_opts\\\":802,\\\"../scatter/make_bubble_size_func\\\":1061,\\\"../scatter/subtypes\\\":1068,\\\"fast-isnumeric\\\":214}],1100:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../scatter/marker_defaults\\\"),o=t(\\\"../scatter/line_defaults\\\"),s=t(\\\"../scatter/text_defaults\\\"),l=t(\\\"../scatter/fillcolor_defaults\\\"),c=t(\\\"./attributes\\\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}if(function(t,e,r){var n=r(\\\"lon\\\")||[],i=r(\\\"lat\\\")||[],a=Math.min(n.length,i.length);return e._length=a,a}(0,e,f)){if(f(\\\"text\\\"),f(\\\"hovertext\\\"),f(\\\"mode\\\"),i.hasLines(e)&&(o(t,e,r,u,f,{noDash:!0}),f(\\\"connectgaps\\\")),i.hasMarkers(e)){a(t,e,r,u,f,{noLine:!0});var h=e.marker;\\\"circle\\\"!==h.symbol&&(n.isArrayOrTypedArray(h.size)&&(h.size=h.size[0]),n.isArrayOrTypedArray(h.color)&&(h.color=h.color[0]))}i.hasText(e)&&s(t,e,u,f,{noSelect:!0}),f(\\\"fill\\\"),\\\"none\\\"!==e.fill&&l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1098}],1101:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t}},{}],1102:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../scatter/get_trace_color\\\"),o=t(\\\"../scatter/fill_hover_text\\\"),s=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e,r){var l=t.cd,c=l[0].trace,u=t.xa,f=t.ya,h=t.subplot,p=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-p;if(n.getClosest(l,function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=h.project([n,a]),l=o.x-u.c2p([d,a]),c=o.y-f.c2p([n,r]),p=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-p,1-3/p)},t),!1!==t.index){var g=l[t.index],v=g.lonlat,m=[i.modHalf(v[0],360)+p,v[1]],y=u.c2p(m),x=f.c2p(m),b=g.mrc||1;return t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b,t.color=a(c,g),t.extraText=function(t,e,r){var n=(e.hi||t.hoverinfo).split(\\\"+\\\"),i=-1!==n.indexOf(\\\"all\\\"),a=-1!==n.indexOf(\\\"lon\\\"),s=-1!==n.indexOf(\\\"lat\\\"),l=e.lonlat,c=[];function u(t){return t+\\\"\\\\xb0\\\"}i||a&&s?c.push(\\\"(\\\"+u(l[0])+\\\", \\\"+u(l[1])+\\\")\\\"):a?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(i||-1!==n.indexOf(\\\"text\\\"))&&o(e,t,c);return c.join(\\\"<br>\\\")}(c,g,l[0].t.labels),[t]}}},{\\\"../../components/fx\\\":612,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../scatter/fill_hover_text\\\":1052,\\\"../scatter/get_trace_color\\\":1054}],1103:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"../scattergeo/calc\\\"),n.plot=t(\\\"./plot\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.eventData=t(\\\"./event_data\\\"),n.selectPoints=t(\\\"./select\\\"),n.style=function(t,e){e&&e[0].trace._glTrace.update(e)},n.moduleType=\\\"trace\\\",n.name=\\\"scattermapbox\\\",n.basePlotModule=t(\\\"../../plots/mapbox\\\"),n.categories=[\\\"mapbox\\\",\\\"gl\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatterlike\\\"],n.meta={},e.exports=n},{\\\"../../plots/mapbox\\\":803,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scattergeo/calc\\\":1085,\\\"./attributes\\\":1098,\\\"./defaults\\\":1100,\\\"./event_data\\\":1101,\\\"./hover\\\":1102,\\\"./plot\\\":1104,\\\"./select\\\":1105}],1104:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./convert\\\");function i(t,e){this.subplot=t,this.uid=e,this.sourceIds={fill:e+\\\"-source-fill\\\",line:e+\\\"-source-line\\\",circle:e+\\\"-source-circle\\\",symbol:e+\\\"-source-symbol\\\"},this.layerIds={fill:e+\\\"-layer-fill\\\",line:e+\\\"-layer-line\\\",circle:e+\\\"-layer-circle\\\",symbol:e+\\\"-layer-symbol\\\"},this.order=[\\\"fill\\\",\\\"line\\\",\\\"circle\\\",\\\"symbol\\\"]}var a=i.prototype;a.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:\\\"geojson\\\",data:e.geojson})},a.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},a.addLayer=function(t,e){this.subplot.map.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint})},a.update=function(t){for(var e=this.subplot,r=n(t),i=0;i<this.order.length;i++){var a=this.order[i],o=r[a];e.setOptions(this.layerIds[a],\\\"setLayoutProperty\\\",o.layout),\\\"visible\\\"===o.layout.visibility&&(this.setSourceData(a,o),e.setOptions(this.layerIds[a],\\\"setPaintProperty\\\",o.paint))}t[0].trace._glTrace=this},a.dispose=function(){for(var t=this.subplot.map,e=0;e<this.order.length;e++){var r=this.order[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=new i(t,e[0].trace.uid),a=n(e),o=0;o<r.order.length;o++){var s=r.order[o],l=a[s];r.addSource(s,l),r.addLayer(s,l)}return e[0].trace._glTrace=r,r}},{\\\"./convert\\\":1099}],1105:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e){var r,o=t.cd,s=t.xaxis,l=t.yaxis,c=[],u=o[0].trace;if(!i.hasMarkers(u))return[];if(!1===e)for(r=0;r<o.length;r++)o[r].selected=0;else for(r=0;r<o.length;r++){var f=o[r],h=f.lonlat;if(h[0]!==a){var p=[n.modHalf(h[0],360),h[1]],d=[s.c2p(p),l.c2p(p)];e.contains(d,null,r,t)?(c.push({pointNumber:r,lon:h[0],lat:h[1]}),f.selected=1):f.selected=0}}return c}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../scatter/subtypes\\\":1068}],1106:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/extend\\\").extendFlat,i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../plots/attributes\\\"),o=i.line;e.exports={mode:i.mode,r:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},theta:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},r0:{valType:\\\"any\\\",dflt:0,editType:\\\"calc+clearAxisTypes\\\"},dr:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},theta0:{valType:\\\"any\\\",dflt:0,editType:\\\"calc+clearAxisTypes\\\"},dtheta:{valType:\\\"number\\\",editType:\\\"calc\\\"},thetaunit:{valType:\\\"enumerated\\\",values:[\\\"radians\\\",\\\"degrees\\\",\\\"gradians\\\"],dflt:\\\"degrees\\\",editType:\\\"calc+clearAxisTypes\\\"},text:i.text,hovertext:i.hovertext,line:{color:o.color,width:o.width,dash:o.dash,shape:n({},o.shape,{values:[\\\"linear\\\",\\\"spline\\\"]}),smoothing:o.smoothing,editType:\\\"calc\\\"},connectgaps:i.connectgaps,marker:i.marker,cliponaxis:n({},i.cliponaxis,{dflt:!1}),textposition:i.textposition,textfont:i.textfont,fill:n({},i.fill,{values:[\\\"none\\\",\\\"toself\\\",\\\"tonext\\\"],dflt:\\\"none\\\"}),fillcolor:i.fillcolor,hoverinfo:n({},a.hoverinfo,{flags:[\\\"r\\\",\\\"theta\\\",\\\"text\\\",\\\"name\\\"]}),hoveron:i.hoveron,selected:i.selected,unselected:i.unselected}},{\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1107:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM,a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../scatter/colorscale_calc\\\"),s=t(\\\"../scatter/arrays_to_calcdata\\\"),l=t(\\\"../scatter/calc_selection\\\"),c=t(\\\"../scatter/calc\\\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,u=e.subplot,f=r[u].radialaxis,h=r[u].angularaxis,p=f.makeCalcdata(e,\\\"r\\\"),d=h.makeCalcdata(e,\\\"theta\\\"),g=e._length,v=new Array(g),m=0;m<g;m++){var y=p[m],x=d[m],b=v[m]={};n(y)&&n(x)?(b.r=y,b.theta=x):b.r=i}var _=c(e,g);return e._extremes.x=a.findExtremes(f,p,{ppad:_}),o(e),s(v,e),l(v,e),v}},{\\\"../../constants/numerical\\\":673,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc\\\":1045,\\\"../scatter/calc_selection\\\":1046,\\\"../scatter/colorscale_calc\\\":1047,\\\"fast-isnumeric\\\":214}],1108:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../scatter/marker_defaults\\\"),o=t(\\\"../scatter/line_defaults\\\"),s=t(\\\"../scatter/line_shape_defaults\\\"),l=t(\\\"../scatter/text_defaults\\\"),c=t(\\\"../scatter/fillcolor_defaults\\\"),u=t(\\\"../scatter/constants\\\").PTS_LINESONLY,f=t(\\\"./attributes\\\");function h(t,e,r,n){var i,a=n(\\\"r\\\"),o=n(\\\"theta\\\");if(a)o?i=Math.min(a.length,o.length):(i=a.length,n(\\\"theta0\\\"),n(\\\"dtheta\\\"));else{if(!o)return 0;i=e.theta.length,n(\\\"r0\\\"),n(\\\"dr\\\")}return e._length=i,i}e.exports={handleRThetaDefaults:h,supplyDefaults:function(t,e,r,p){function d(r,i){return n.coerce(t,e,f,r,i)}var g=h(0,e,0,d);if(g){d(\\\"thetaunit\\\"),d(\\\"mode\\\",g<u?\\\"lines+markers\\\":\\\"lines\\\"),d(\\\"text\\\"),d(\\\"hovertext\\\"),i.hasLines(e)&&(o(t,e,r,p,d),s(t,e,d),d(\\\"connectgaps\\\")),i.hasMarkers(e)&&a(t,e,r,p,d,{gradient:!0}),i.hasText(e)&&l(t,e,p,d);var v=[];(i.hasMarkers(e)||i.hasText(e))&&(d(\\\"cliponaxis\\\"),d(\\\"marker.maxdisplayed\\\"),v.push(\\\"points\\\")),d(\\\"fill\\\"),\\\"none\\\"!==e.fill&&(c(t,e,r,d),i.hasLines(e)||s(t,e,d)),\\\"tonext\\\"!==e.fill&&\\\"toself\\\"!==e.fill||v.push(\\\"fills\\\"),d(\\\"hoveron\\\",v.join(\\\"+\\\")||\\\"points\\\"),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}}},{\\\"../../lib\\\":696,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/line_shape_defaults\\\":1059,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1106}],1109:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/hover\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../lib\\\");function o(t,e,r,n){var o=r.radialAxis,s=r.angularAxis,l=(t.hi||e.hoverinfo).split(\\\"+\\\"),c=[];function u(t,e){c.push(t._hovertitle+\\\": \\\"+i.tickText(t,e,\\\"hover\\\").text)}if(o._hovertitle=\\\"r\\\",s._hovertitle=\\\"\\\\u03b8\\\",-1!==l.indexOf(\\\"all\\\")&&(l=[\\\"r\\\",\\\"theta\\\",\\\"text\\\"]),-1!==l.indexOf(\\\"r\\\")&&u(o,o.c2l(t.r)),-1!==l.indexOf(\\\"theta\\\")){var f=t.theta;u(s,\\\"degrees\\\"===s.thetaunit?a.rad2deg(f):f)}-1!==l.indexOf(\\\"text\\\")&&n.text&&(c.push(n.text),delete n.text),n.extraText=c.join(\\\"<br>\\\")}e.exports={hoverPoints:function(t,e,r,i){var a=n(t,e,r,i);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,o(c,u,l,s),a}},makeHoverPointText:o}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/hover\\\":1055}],1110:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"scatterpolar\\\",basePlotModule:t(\\\"../../plots/polar\\\"),categories:[\\\"polar\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\").supplyDefaults,colorbar:t(\\\"../scatter/marker_colorbar\\\"),calc:t(\\\"./calc\\\"),plot:t(\\\"./plot\\\"),style:t(\\\"../scatter/style\\\").style,hoverPoints:t(\\\"./hover\\\").hoverPoints,selectPoints:t(\\\"../scatter/select\\\"),meta:{}}},{\\\"../../plots/polar\\\":812,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/select\\\":1065,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1106,\\\"./calc\\\":1107,\\\"./defaults\\\":1108,\\\"./hover\\\":1109,\\\"./plot\\\":1111}],1111:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/plot\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e,r){for(var a=e.layers.frontplot.select(\\\"g.scatterlayer\\\"),o={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=e.radialAxis,l=e.angularAxis,c=0;c<r.length;c++)for(var u=r[c],f=0;f<u.length;f++){var h=u[f],p=h.r;if(p===i)h.x=h.y=i;else{var d=s.c2g(p),g=l.c2g(h.theta);h.x=d*Math.cos(g),h.y=d*Math.sin(g)}}n(t,o,r,a)}},{\\\"../../constants/numerical\\\":673,\\\"../scatter/plot\\\":1064}],1112:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatterpolar/attributes\\\"),i=t(\\\"../scattergl/attributes\\\");e.exports={mode:n.mode,r:n.r,theta:n.theta,r0:n.r0,dr:n.dr,theta0:n.theta0,dtheta:n.dtheta,thetaunit:n.thetaunit,text:n.text,hovertext:n.hovertext,line:i.line,connectgaps:i.connectgaps,marker:i.marker,fill:i.fill,fillcolor:i.fillcolor,textposition:i.textposition,textfont:i.textfont,hoverinfo:n.hoverinfo,selected:n.selected,unselected:n.unselected}},{\\\"../scattergl/attributes\\\":1093,\\\"../scatterpolar/attributes\\\":1106}],1113:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../scatterpolar/defaults\\\").handleRThetaDefaults,o=t(\\\"../scatter/marker_defaults\\\"),s=t(\\\"../scatter/line_defaults\\\"),l=t(\\\"../scatter/text_defaults\\\"),c=t(\\\"../scatter/fillcolor_defaults\\\"),u=t(\\\"../scatter/constants\\\").PTS_LINESONLY,f=t(\\\"./attributes\\\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}var d=a(t,e,h,p);d?(p(\\\"thetaunit\\\"),p(\\\"mode\\\",d<u?\\\"lines+markers\\\":\\\"lines\\\"),p(\\\"text\\\"),p(\\\"hovertext\\\"),i.hasLines(e)&&(s(t,e,r,h,p),p(\\\"connectgaps\\\")),i.hasMarkers(e)&&o(t,e,r,h,p),i.hasText(e)&&l(t,e,h,p),p(\\\"fill\\\"),\\\"none\\\"!==e.fill&&c(t,e,r,p),n.coerceSelectionMarkerOpacity(e,p)):e.visible=!1}},{\\\"../../lib\\\":696,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"../scatterpolar/defaults\\\":1108,\\\"./attributes\\\":1112}],1114:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"point-cluster\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../scattergl\\\"),o=t(\\\"../scatter/colorscale_calc\\\"),s=t(\\\"../scatter/calc\\\").calcMarkerSize,l=t(\\\"../scattergl/convert\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../plots/cartesian/axes\\\"),f=t(\\\"../scatterpolar/hover\\\").makeHoverPointText,h=t(\\\"../scattergl/constants\\\").TOO_MANY_POINTS;e.exports={moduleType:\\\"trace\\\",name:\\\"scatterpolargl\\\",basePlotModule:t(\\\"../../plots/polar\\\"),categories:[\\\"gl\\\",\\\"regl\\\",\\\"polar\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),colorbar:t(\\\"../scatter/marker_colorbar\\\"),calc:function(t,e){var r=t._fullLayout,n=e.subplot,i=r[n].radialaxis,a=r[n].angularaxis,c=i.makeCalcdata(e,\\\"r\\\"),f=a.makeCalcdata(e,\\\"theta\\\"),p=e._length,d={};p<c.length&&(c=c.slice(0,p)),p<f.length&&(f=f.slice(0,p)),d.r=c,d.theta=f,o(e);var g=d.opts=l.style(t,e),v=p<h?s(e,p):2*(g.marker.sizeAvg||Math.max(g.marker.size,3));return e._extremes.x=u.findExtremes(i,c,{ppad:v}),[{x:!1,y:!1,t:d,trace:e}]},plot:function(t,e,r){if(r.length){var o=e.radialAxis,s=e.angularAxis,u=a.sceneUpdate(t,e);return r.forEach(function(r){if(r&&r[0]&&r[0].trace){var a,f=r[0],p=f.trace,d=f.t,g=p._length,v=d.r,m=d.theta,y=d.opts,x=v.slice(),b=m.slice();for(a=0;a<v.length;a++)e.isPtInside({r:v[a],theta:m[a]})||(x[a]=NaN,b[a]=NaN);var _=new Array(2*g),w=Array(g),k=Array(g);for(a=0;a<g;a++){var M,A,T=x[a];if(i(T)){var S=o.c2g(T),C=s.c2g(b[a],p.thetaunit);M=S*Math.cos(C),A=S*Math.sin(C)}else M=A=NaN;w[a]=_[2*a]=M,k[a]=_[2*a+1]=A}d.tree=n(_),y.marker&&g>=h&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&c.extendFlat(y.line,l.linePositions(t,p,_)),y.text&&(c.extendFlat(y.text,{positions:_},l.textPosition(t,p,y.text,y.marker)),c.extendFlat(y.textSel,{positions:_},l.textPosition(t,p,y.text,y.markerSel)),c.extendFlat(y.textUnsel,{positions:_},l.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!u.fill2d&&(u.fill2d=!0),y.marker&&!u.scatter2d&&(u.scatter2d=!0),y.line&&!u.line2d&&(u.line2d=!0),y.text&&!u.glText&&(u.glText=!0),u.lineOptions.push(y.line),u.fillOptions.push(y.fill),u.markerOptions.push(y.marker),u.markerSelectedOptions.push(y.markerSel),u.markerUnselectedOptions.push(y.markerUnsel),u.textOptions.push(y.text),u.textSelectedOptions.push(y.textSel),u.textUnselectedOptions.push(y.textUnsel),d.x=w,d.y=k,d.rawx=w,d.rawy=k,d.r=v,d.theta=m,d.positions=_,d._scene=u,d.index=u.count,u.count++}}),a.plot(t,e,r)}},hoverPoints:function(t,e,r,n){var i=t.cd[0].t,o=i.r,s=i.theta,l=a.hoverPoints(t,e,r,n);if(l&&!1!==l[0].index){var c=l[0];if(void 0===c.index)return l;var u=t.subplot,h=c.cd[c.index],p=c.trace;if(h.r=o[c.index],h.theta=s[c.index],u.isPtInside(h))return c.xLabelVal=void 0,c.yLabelVal=void 0,f(h,p,u,c),l}},selectPoints:a.selectPoints,meta:{}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/polar\\\":812,\\\"../scatter/calc\\\":1045,\\\"../scatter/colorscale_calc\\\":1047,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scattergl\\\":1097,\\\"../scattergl/constants\\\":1094,\\\"../scattergl/convert\\\":1095,\\\"../scatterpolar/hover\\\":1109,\\\"./attributes\\\":1112,\\\"./defaults\\\":1113,\\\"fast-isnumeric\\\":214,\\\"point-cluster\\\":452}],1115:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/colorbar/attributes\\\"),s=t(\\\"../../components/drawing/attributes\\\").dash,l=t(\\\"../../lib/extend\\\").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={a:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},b:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},c:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},sum:{valType:\\\"number\\\",dflt:0,min:0,editType:\\\"calc\\\"},mode:l({},n.mode,{dflt:\\\"markers\\\"}),text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:s,shape:l({},u.shape,{values:[\\\"linear\\\",\\\"spline\\\"]}),smoothing:u.smoothing,editType:\\\"calc\\\"},connectgaps:n.connectgaps,cliponaxis:n.cliponaxis,fill:l({},n.fill,{values:[\\\"none\\\",\\\"toself\\\",\\\"tonext\\\"],dflt:\\\"none\\\"}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:\\\"calc\\\"},a(\\\"marker.line\\\")),gradient:c.gradient,editType:\\\"calc\\\"},a(\\\"marker\\\"),{colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\\\"a\\\",\\\"b\\\",\\\"c\\\",\\\"text\\\",\\\"name\\\"]}),hoveron:n.hoveron}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../components/drawing/attributes\\\":594,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1116:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../scatter/colorscale_calc\\\"),a=t(\\\"../scatter/arrays_to_calcdata\\\"),o=t(\\\"../scatter/calc_selection\\\"),s=t(\\\"../scatter/calc\\\").calcMarkerSize,l=[\\\"a\\\",\\\"b\\\",\\\"c\\\"],c={a:[\\\"b\\\",\\\"c\\\"],b:[\\\"a\\\",\\\"c\\\"],c:[\\\"a\\\",\\\"b\\\"]};e.exports=function(t,e){var r,u,f,h,p,d,g=t._fullLayout[e.subplot].sum,v=e.sum||g,m={a:e.a,b:e.b,c:e.c};for(r=0;r<l.length;r++)if(!m[f=l[r]]){for(p=m[c[f][0]],d=m[c[f][1]],h=new Array(p.length),u=0;u<p.length;u++)h[u]=v-p[u]-d[u];m[f]=h}var y,x,b,_,w,k,M=e._length,A=new Array(M);for(r=0;r<M;r++)y=m.a[r],x=m.b[r],b=m.c[r],n(y)&&n(x)&&n(b)?(1!==(_=g/((y=+y)+(x=+x)+(b=+b)))&&(y*=_,x*=_,b*=_),k=y,w=b-x,A[r]={x:w,y:k,a:y,b:x,c:b}):A[r]={x:!1,y:!1};return s(e,M),i(e),a(A,e),o(A,e),A}},{\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc\\\":1045,\\\"../scatter/calc_selection\\\":1046,\\\"../scatter/colorscale_calc\\\":1047,\\\"fast-isnumeric\\\":214}],1117:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/constants\\\"),a=t(\\\"../scatter/subtypes\\\"),o=t(\\\"../scatter/marker_defaults\\\"),s=t(\\\"../scatter/line_defaults\\\"),l=t(\\\"../scatter/line_shape_defaults\\\"),c=t(\\\"../scatter/text_defaults\\\"),u=t(\\\"../scatter/fillcolor_defaults\\\"),f=t(\\\"./attributes\\\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}var d,g=p(\\\"a\\\"),v=p(\\\"b\\\"),m=p(\\\"c\\\");if(g?(d=g.length,v?(d=Math.min(d,v.length),m&&(d=Math.min(d,m.length))):d=m?Math.min(d,m.length):0):v&&m&&(d=Math.min(v.length,m.length)),d){e._length=d,p(\\\"sum\\\"),p(\\\"text\\\"),p(\\\"hovertext\\\"),p(\\\"mode\\\",d<i.PTS_LINESONLY?\\\"lines+markers\\\":\\\"lines\\\"),a.hasLines(e)&&(s(t,e,r,h,p),l(t,e,p),p(\\\"connectgaps\\\")),a.hasMarkers(e)&&o(t,e,r,h,p,{gradient:!0}),a.hasText(e)&&c(t,e,h,p);var y=[];(a.hasMarkers(e)||a.hasText(e))&&(p(\\\"cliponaxis\\\"),p(\\\"marker.maxdisplayed\\\"),y.push(\\\"points\\\")),p(\\\"fill\\\"),\\\"none\\\"!==e.fill&&(u(t,e,r,p),a.hasLines(e)||l(t,e,p)),\\\"tonext\\\"!==e.fill&&\\\"toself\\\"!==e.fill||y.push(\\\"fills\\\"),p(\\\"hoveron\\\",y.join(\\\"+\\\")||\\\"points\\\"),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/line_shape_defaults\\\":1059,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1115}],1118:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){if(e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),n[i]){var a=n[i];t.a=a.a,t.b=a.b,t.c=a.c}else t.a=e.a,t.b=e.b,t.c=e.c;return t}},{}],1119:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/hover\\\"),i=t(\\\"../../plots/cartesian/axes\\\");e.exports=function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index){var l=1-s.y0/t.ya._length,c=t.xa._length,u=c*l/2,f=c-u;return s.x0=Math.max(Math.min(s.x0,f),u),s.x1=Math.max(Math.min(s.x1,f),u),o}var h=s.cd[s.index];s.a=h.a,s.b=h.b,s.c=h.c,s.xLabelVal=void 0,s.yLabelVal=void 0;var p=s.trace,d=s.subplot,g=(h.hi||p.hoverinfo).split(\\\"+\\\"),v=[];return-1!==g.indexOf(\\\"all\\\")&&(g=[\\\"a\\\",\\\"b\\\",\\\"c\\\"]),-1!==g.indexOf(\\\"a\\\")&&m(d.aaxis,h.a),-1!==g.indexOf(\\\"b\\\")&&m(d.baxis,h.b),-1!==g.indexOf(\\\"c\\\")&&m(d.caxis,h.c),s.extraText=v.join(\\\"<br>\\\"),o}function m(t,e){v.push(t._hovertitle+\\\": \\\"+i.tickText(t,e,\\\"hover\\\").text)}}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/hover\\\":1055}],1120:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"../scatter/style\\\").style,n.styleOnSelect=t(\\\"../scatter/style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.selectPoints=t(\\\"../scatter/select\\\"),n.eventData=t(\\\"./event_data\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"scatterternary\\\",n.basePlotModule=t(\\\"../../plots/ternary\\\"),n.categories=[\\\"ternary\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],n.meta={},e.exports=n},{\\\"../../plots/ternary\\\":824,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/select\\\":1065,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1115,\\\"./calc\\\":1116,\\\"./defaults\\\":1117,\\\"./event_data\\\":1118,\\\"./hover\\\":1119,\\\"./plot\\\":1121}],1121:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/plot\\\");e.exports=function(t,e,r){var i=e.plotContainer;i.select(\\\".scatterlayer\\\").selectAll(\\\"*\\\").remove();var a={xaxis:e.xaxis,yaxis:e.yaxis,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},o=e.layers.frontplot.select(\\\"g.scatterlayer\\\");n(t,a,r,o)}},{\\\"../scatter/plot\\\":1064}],1122:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../scattergl/attributes\\\"),o=t(\\\"../../plots/cartesian/constants\\\").idRegex,s=t(\\\"../../plot_api/plot_template\\\").templatedArray,l=t(\\\"../../lib/extend\\\").extendFlat,c=n.marker,u=c.line,f=l(i(\\\"marker.line\\\",{editTypeOverride:\\\"calc\\\"}),{width:l({},u.width,{editType:\\\"calc\\\"}),editType:\\\"calc\\\"}),h=l(i(\\\"marker\\\"),{symbol:c.symbol,size:l({},c.size,{editType:\\\"markerSize\\\"}),sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,opacity:c.opacity,colorbar:c.colorbar,line:f,editType:\\\"calc\\\"});function p(t){return{valType:\\\"info_array\\\",freeLength:!0,editType:\\\"calc\\\",items:{valType:\\\"subplotid\\\",regex:o[t],editType:\\\"plot\\\"}}}h.color.editType=h.cmin.editType=h.cmax.editType=\\\"style\\\",e.exports={dimensions:s(\\\"dimension\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},label:{valType:\\\"string\\\",editType:\\\"calc\\\"},values:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},axis:{type:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"log\\\",\\\"date\\\",\\\"category\\\"],editType:\\\"calc+clearAxisTypes\\\"},editType:\\\"calc+clearAxisTypes\\\"},editType:\\\"calc+clearAxisTypes\\\"}),text:l({},a.text,{}),marker:h,xaxes:p(\\\"x\\\"),yaxes:p(\\\"y\\\"),diagonal:{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},editType:\\\"calc\\\"},showupperhalf:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},showlowerhalf:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},selected:{marker:a.selected.marker,editType:\\\"calc\\\"},unselected:{marker:a.unselected.marker,editType:\\\"calc\\\"},opacity:a.opacity}},{\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/constants\\\":751,\\\"../scatter/attributes\\\":1044,\\\"../scattergl/attributes\\\":1093}],1123:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"regl-line2d\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib/prepare_regl\\\"),o=t(\\\"../../plots/get_data\\\").getModuleCalcData,s=t(\\\"../../plots/cartesian\\\"),l=t(\\\"../../plots/cartesian/axis_ids\\\").getFromId,c=t(\\\"../../plots/cartesian/axes\\\").shouldShowZeroLine,u=\\\"splom\\\";function f(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;o<i.length;o++){var s=i[o],c=a[o]=new Array(4),u=l(t,e._diag[s][0]);u&&(c[0]=u.r2l(u.range[0]),c[2]=u.r2l(u.range[1]));var f=l(t,e._diag[s][1]);f&&(c[1]=f.r2l(f.range[0]),c[3]=f.r2l(f.range[1]))}r.selectBatch?r.matrix.update({ranges:a},{ranges:a}):r.matrix.update({ranges:a})}function h(t){var e=t._fullLayout,r=e._glcanvas.data()[0].regl,i=e._splomGrid;i||(i=e._splomGrid=n(r)),i.update(function(t){var e,r=t._fullLayout,n=r._size,i=[0,0,r.width,r.height],a={};function o(t,e,r,n,o,s){var l=e[t+\\\"color\\\"],c=e[t+\\\"width\\\"],u=String(l+c);u in a?a[u].data.push(NaN,NaN,r,n,o,s):a[u]={data:[r,n,o,s],join:\\\"rect\\\",thickness:c,color:l,viewport:i,range:i,overlay:!1}}for(e in r._splomSubplots){var s,l,u=r._plots[e],f=u.xaxis,h=u.yaxis,p=f._vals,d=h._vals,g=n.b+h.domain[0]*n.h,v=-h._m,m=-v*h.r2l(h.range[0],h.calendar);if(f.showgrid)for(e=0;e<p.length;e++)s=f._offset+f.l2p(p[e].x),o(\\\"grid\\\",f,s,g,s,g+h._length);if(h.showgrid)for(e=0;e<d.length;e++)l=g+m+v*d[e].x,o(\\\"grid\\\",h,f._offset,l,f._offset+f._length,l);c(t,f,h)&&(s=f._offset+f.l2p(0),o(\\\"zeroline\\\",f,s,g,s,g+h._length)),c(t,h,f)&&(l=g+m+0,o(\\\"zeroline\\\",h,f._offset,l,f._offset+f._length,l))}var y=[];for(e in a)y.push(a[e]);return y}(t))}e.exports={name:u,attr:s.attr,attrRegex:s.attrRegex,layoutAttributes:s.layoutAttributes,supplyLayoutDefaults:s.supplyLayoutDefaults,drawFramework:s.drawFramework,plot:function(t){var e=t._fullLayout,r=i.getModule(u),n=o(t.calcdata,r)[0];a(t,[\\\"ANGLE_instanced_arrays\\\",\\\"OES_element_index_uint\\\"])&&(e._hasOnlyLargeSploms&&h(t),r.plot(t,{},n))},drag:function(t){var e=t.calcdata,r=t._fullLayout;r._hasOnlyLargeSploms&&h(t);for(var n=0;n<e.length;n++){var i=e[n][0].trace,a=r._splomScenes[i.uid];\\\"splom\\\"===i.type&&a&&a.matrix&&f(t,i,a)}},updateGrid:h,clean:function(t,e,r,n){var i,a={};if(n._splomScenes){for(i=0;i<t.length;i++){var o=t[i];\\\"splom\\\"===o.type&&(a[o.uid]=1)}for(i=0;i<r.length;i++){var l=r[i];if(!a[l.uid]){var c=n._splomScenes[l.uid];c&&c.destroy&&c.destroy(),n._splomScenes[l.uid]=null,delete n._splomScenes[l.uid]}}}0===Object.keys(n._splomScenes||{}).length&&delete n._splomScenes,n._splomGrid&&!e._hasOnlyLargeSploms&&n._hasOnlyLargeSploms&&(n._splomGrid.destroy(),n._splomGrid=null,delete n._splomGrid),s.clean(t,e,r,n)},updateFx:function(t){s.updateFx(t);var e=t._fullLayout,r=e.dragmode;if(\\\"zoom\\\"===r||\\\"pan\\\"===r)for(var n=t.calcdata,i=0;i<n.length;i++){var a=n[i][0].trace;if(\\\"splom\\\"===a.type){var o=e._splomScenes[a.uid];null===o.selectBatch&&o.matrix.update(o.matrixOptions,null)}}},toSVG:s.toSVG}},{\\\"../../lib/prepare_regl\\\":710,\\\"../../plots/cartesian\\\":757,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../plots/get_data\\\":782,\\\"../../registry\\\":828,\\\"regl-line2d\\\":474}],1124:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/array_container_defaults\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"../scatter/subtypes\\\"),s=t(\\\"../scatter/marker_defaults\\\"),l=t(\\\"../parcoords/merge_length\\\"),c=/-open/;function u(t,e){function r(r,i){return n.coerce(t,e,a.dimensions,r,i)}r(\\\"label\\\");var i=r(\\\"values\\\");i&&i.length?r(\\\"visible\\\"):e.visible=!1,r(\\\"axis.type\\\")}e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,a,r,i)}var p=i(t,e,{name:\\\"dimensions\\\",handleItemDefaults:u}),d=h(\\\"diagonal.visible\\\"),g=h(\\\"showupperhalf\\\"),v=h(\\\"showlowerhalf\\\");if(l(e,p,\\\"values\\\")&&(d||g||v)){h(\\\"text\\\"),s(t,e,r,f,h);var m=c.test(e.marker.symbol),y=o.isBubble(e);h(\\\"marker.line.width\\\",m||y?1:0),function(t,e,r,n){var i,a,o=e.dimensions,s=o.length,l=e.showupperhalf,c=e.showlowerhalf,u=e.diagonal.visible,f=new Array(s),h=new Array(s);for(i=0;i<s;i++){var p=i?i+1:\\\"\\\";f[i]=\\\"x\\\"+p,h[i]=\\\"y\\\"+p}var d=n(\\\"xaxes\\\",f),g=n(\\\"yaxes\\\",h),v=e._diag=new Array(s);e._xaxes={},e._yaxes={};var m=[],y=[];function x(t,n,i){if(t){var a=t.charAt(0),o=r._splomAxes[a];if(e[\\\"_\\\"+a+\\\"axes\\\"][t]=1,i.push(t),!(t in o)){var s=o[t]={};n&&(s.label=n.label||\\\"\\\",n.visible&&n.axis&&(s.type=n.axis.type))}}}var b=!u&&!c,_=!u&&!l;for(i=0;i<s;i++){var w=o[i],k=0===i,M=i===s-1,A=k&&b||M&&_?void 0:d[i],T=k&&_||M&&b?void 0:g[i];x(A,w,m),x(T,w,y),v[i]=[A,T]}for(i=0;i<m.length;i++)for(a=0;a<y.length;a++){var S=m[i]+y[a];i>a&&l?r._splomSubplots[S]=1:i<a&&c?r._splomSubplots[S]=1:i!==a||!u&&c&&l||(r._splomSubplots[S]=1)}(!c||!u&&l&&c)&&(r._splomGridDflt.xside=\\\"bottom\\\",r._splomGridDflt.yside=\\\"left\\\")}(0,e,f,h),n.coerceSelectionMarkerOpacity(e,h)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../parcoords/merge_length\\\":1016,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"./attributes\\\":1122}],1125:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"regl-splom\\\"),i=t(\\\"array-range\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../../components/grid\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../plots/cartesian/axis_ids\\\"),c=t(\\\"../scatter/subtypes\\\"),u=t(\\\"../scatter/calc\\\").calcMarkerSize,f=t(\\\"../scatter/calc\\\").calcAxisExpansion,h=t(\\\"../scatter/colorscale_calc\\\"),p=t(\\\"../scattergl/convert\\\").markerSelection,d=t(\\\"../scattergl/convert\\\").markerStyle,g=t(\\\"../scattergl\\\").calcHover,v=t(\\\"../../constants/numerical\\\").BADNUM,m=t(\\\"../scattergl/constants\\\").TOO_MANY_POINTS;function y(t,e){var r,i,a,o,c,u=t._fullLayout,f=u._size,h=e.trace,p=e.t,d=u._splomScenes[h.uid],g=d.matrixOptions,v=g.cdata,m=u._glcanvas.data()[0].regl,y=u.dragmode;if(0!==v.length){g.lower=h.showupperhalf,g.upper=h.showlowerhalf,g.diagonal=h.diagonal.visible;var x=h._visibleDims,b=v.length,_=d.viewOpts={};for(_.ranges=new Array(b),_.domains=new Array(b),c=0;c<x.length;c++){a=x[c];var w=_.ranges[c]=new Array(4),k=_.domains[c]=new Array(4);(r=l.getFromId(t,h._diag[a][0]))&&(w[0]=r._rl[0],w[2]=r._rl[1],k[0]=r.domain[0],k[2]=r.domain[1]),(i=l.getFromId(t,h._diag[a][1]))&&(w[1]=i._rl[0],w[3]=i._rl[1],k[1]=i.domain[0],k[3]=i.domain[1])}_.viewport=[f.l,f.b,f.w+f.l,f.h+f.b],!0===d.matrix&&(d.matrix=n(m));var M=u.clickmode.indexOf(\\\"select\\\")>-1,A=\\\"lasso\\\"===y||\\\"select\\\"===y||!!h.selectedpoints||M;if(d.selectBatch=null,d.unselectBatch=null,A){var T=h._length;if(d.selectBatch||(d.selectBatch=[],d.unselectBatch=[]),h.selectedpoints){d.selectBatch=h.selectedpoints;var S=h.selectedpoints,C={};for(a=0;a<S.length;a++)C[S[a]]=!0;var E=[];for(a=0;a<T;a++)C[a]||E.push(a);d.unselectBatch=E}var L=p.xpx=new Array(b),z=p.ypx=new Array(b);for(c=0;c<x.length;c++){if(a=x[c],r=l.getFromId(t,h._diag[a][0]))for(L[c]=new Array(T),o=0;o<T;o++)L[c][o]=r.c2p(v[c][o]);if(i=l.getFromId(t,h._diag[a][1]))for(z[c]=new Array(T),o=0;o<T;o++)z[c][o]=i.c2p(v[c][o])}d.selectBatch?(d.matrix.update(g,g),d.matrix.update(d.unselectedOptions,d.selectedOptions),d.matrix.update(_,_)):d.matrix.update(_,null)}else{var O=s.extendFlat({},g,_);d.matrix.update(O,null),p.xpx=p.ypx=null}}}function x(t,e){for(var r=e._id,n={x:0,y:1}[r.charAt(0)],i=t._visibleDims,a=0;a<i.length;a++){var o=i[a];if(t._diag[o][n]===r)return a}return!1}e.exports={moduleType:\\\"trace\\\",name:\\\"splom\\\",basePlotModule:t(\\\"./base_plot\\\"),categories:[\\\"gl\\\",\\\"regl\\\",\\\"cartesian\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),colorbar:t(\\\"../scatter/marker_colorbar\\\"),calc:function(t,e){var r,n,i,a,o,c,g=e.dimensions,y=e._length,x={},b=x.cdata=[],_=x.data=[],w=e._visibleDims=[];function k(t,r){for(var n=t.makeCalcdata({v:r.values,vcalendar:e.calendar},\\\"v\\\"),i=0;i<n.length;i++)n[i]=n[i]===v?NaN:n[i];b.push(n),_.push(\\\"log\\\"===t.type?s.simpleMap(n,t.c2l):n)}for(r=0;r<g.length;r++)if((i=g[r]).visible){if(a=l.getFromId(t,e._diag[r][0]),o=l.getFromId(t,e._diag[r][1]),a&&o&&a.type!==o.type){s.log(\\\"Skipping splom dimension \\\"+r+\\\" with conflicting axis types\\\");continue}a?(k(a,i),o&&\\\"category\\\"===o.type&&(o._categories=a._categories.slice())):k(o,i),w.push(r)}for(h(e),s.extendFlat(x,d(e)),c=b.length*y>m?2*(x.sizeAvg||Math.max(x.size,3)):u(e,y),n=0;n<w.length;n++)i=g[r=w[n]],a=l.getFromId(t,e._diag[r][0])||{},o=l.getFromId(t,e._diag[r][1])||{},f(t,e,a,o,b[n],b[n],c);var M=function(t,e){var r=t._fullLayout,n=e.uid,i=r._splomScenes;i||(i=r._splomScenes={});var a={dirty:!0},o=i[e.uid];return o||((o=i[n]=s.extendFlat({},a,{selectBatch:null,unselectBatch:null,matrix:!1,select:null})).draw=function(){o.matrix&&o.matrix.draw&&(o.selectBatch?o.matrix.draw(o.unselectBatch,o.selectBatch):o.matrix.draw()),o.dirty=!1},o.destroy=function(){o.matrix&&o.matrix.destroy&&o.matrix.destroy(),o.matrixOptions=null,o.selectBatch=null,o.unselectBatch=null,o=null}),o.dirty||s.extendFlat(o,a),o}(t,e);return M.matrix||(M.matrix=!0),M.matrixOptions=x,M.selectedOptions=p(e,e.selected),M.unselectedOptions=p(e,e.unselected),[{x:!1,y:!1,t:{},trace:e}]},plot:function(t,e,r){if(r.length)for(var n=0;n<r.length;n++)y(t,r[n][0])},hoverPoints:function(t,e,r){var n=t.cd[0].trace,i=t.scene.matrixOptions.cdata,a=t.xa,o=t.ya,s=a.c2p(e),l=o.c2p(r),c=t.distance,u=x(n,a),f=x(n,o);if(!1===u||!1===f)return[t];for(var h,p,d=i[u],v=i[f],m=c,y=0;y<d.length;y++){var b=d[y],_=v[y],w=a.c2p(b)-s,k=o.c2p(_)-l,M=Math.sqrt(w*w+k*k);M<m&&(m=p=M,h=y)}return t.index=h,t.distance=m,t.dxy=p,void 0===h?[t]:(g(t,d,v,n),[t])},selectPoints:function(t,e){var r,n=t.cd,a=n[0].trace,o=n[0].t,s=t.scene,l=s.matrixOptions.cdata,u=t.xaxis,f=t.yaxis,h=[];if(!s)return h;var p=!c.hasMarkers(a)&&!c.hasText(a);if(!0!==a.visible||p)return h;var d=x(a,u),g=x(a,f);if(!1===d||!1===g)return h;var v=o.xpx[d],m=o.ypx[g],y=l[d],b=l[g],_=null,w=null;if(!1===e||e.degenerate)w=i(o.count);else for(_=[],w=[],r=0;r<y.length;r++)e.contains([v[r],m[r]],null,r,t)?(_.push(r),h.push({pointNumber:r,x:y[r],y:b[r]})):w.push(r);if(s.selectBatch||(s.selectBatch=[],s.unselectBatch=[]),!s.selectBatch){for(r=0;r<s.count;r++)s.selectBatch=[],s.unselectBatch=[];s.matrix.update(s.unselectedOptions,s.selectedOptions)}return s.selectBatch=_,s.unselectBatch=w,h},editStyle:function(t,e){var r=e.trace,n=t._fullLayout._splomScenes[r.uid];if(n){h(r),s.extendFlat(n.matrixOptions,d(r));var i=s.extendFlat({},n.matrixOptions,n.viewOpts);n.matrix.update(i,null)}},meta:{}},a.register(o)},{\\\"../../components/grid\\\":616,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../registry\\\":828,\\\"../scatter/calc\\\":1045,\\\"../scatter/colorscale_calc\\\":1047,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/subtypes\\\":1068,\\\"../scattergl\\\":1097,\\\"../scattergl/constants\\\":1094,\\\"../scattergl/convert\\\":1095,\\\"./attributes\\\":1122,\\\"./base_plot\\\":1123,\\\"./defaults\\\":1124,\\\"array-range\\\":55,\\\"regl-splom\\\":477}],1126:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../mesh3d/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},z:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},u:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},v:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},w:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},starts:{x:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},z:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"},maxdisplayed:{valType:\\\"integer\\\",min:0,dflt:1e3,editType:\\\"calc\\\"},sizeref:{valType:\\\"number\\\",editType:\\\"calc\\\",min:0,dflt:1},text:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"}};s(l,n(\\\"\\\",{colorAttr:\\\"u/v/w norm\\\",showScaleDflt:!0,editTypeOverride:\\\"calc\\\"}),{colorbar:i});[\\\"opacity\\\",\\\"lightposition\\\",\\\"lighting\\\"].forEach(function(t){l[t]=a[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:\\\"calc\\\",flags:[\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"u\\\",\\\"v\\\",\\\"w\\\",\\\"norm\\\",\\\"divergence\\\",\\\"text\\\",\\\"name\\\"],dflt:\\\"x+y+z+norm+text+name\\\"}),l.transforms=void 0,e.exports=l},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../mesh3d/attributes\\\":987}],1127:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\");e.exports=function(t,e){var r,i,a,o,s=e.u,l=e.v,c=e.w,u=e.x,f=e.y,h=e.z,p=Math.min(u.length,f.length,h.length,s.length,l.length,c.length),d=0;e.starts&&(i=e.starts.x||[],a=e.starts.y||[],o=e.starts.z||[],d=Math.min(i.length,a.length,o.length));var g=0,v=1/0;for(r=0;r<p;r++){var m=s[r],y=l[r],x=c[r],b=Math.sqrt(m*m+y*y+x*x);g=Math.max(g,b),v=Math.min(v,b)}n(e,[v,g],\\\"\\\",\\\"c\\\");var _=-1/0,w=1/0,k=-1/0,M=1/0,A=-1/0,T=1/0;for(r=0;r<p;r++){var S=u[r];_=Math.max(_,S),w=Math.min(w,S);var C=f[r];k=Math.max(k,C),M=Math.min(M,C);var E=h[r];A=Math.max(A,E),T=Math.min(T,E)}for(r=0;r<d;r++){var L=i[r];_=Math.max(_,L),w=Math.min(w,L);var z=a[r];k=Math.max(k,z),M=Math.min(M,z);var O=o[r];A=Math.max(A,O),T=Math.min(T,O)}e._len=p,e._slen=d,e._normMax=g,e._xbnds=[w,_],e._ybnds=[M,k],e._zbnds=[T,A]}},{\\\"../../components/colorscale/calc\\\":578}],1128:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-streamtube3d\\\"),i=n.createTubeMesh,a=t(\\\"../../lib\\\"),o=t(\\\"../../lib/gl_format_color\\\").parseColorScale,s=t(\\\"../../plots/gl3d/zip3\\\"),l={xaxis:0,yaxis:1,zaxis:2};function c(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var u=c.prototype;function f(t){return a.distinctVals(t).vals}function h(t){var e=t.length;return e>2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function p(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,c=e._len,u={};function d(t,e){var n=r[e],o=i[l[e]];return a.simpleMap(t,function(t){return n.d2l(t)*o})}u.vectors=s(d(e.u,\\\"xaxis\\\"),d(e.v,\\\"yaxis\\\"),d(e.w,\\\"zaxis\\\"),c);var g=f(e.x.slice(0,c)),v=f(e.y.slice(0,c)),m=f(e.z.slice(0,c));if(g.length*v.length*m.length>c)return{positions:[],cells:[]};var y=d(g,\\\"xaxis\\\"),x=d(v,\\\"yaxis\\\"),b=d(m,\\\"zaxis\\\");if(u.meshgrid=[y,x,b],e.starts){var _=e._slen;u.startingPositions=s(d(e.starts.x.slice(0,_),\\\"xaxis\\\"),d(e.starts.y.slice(0,_),\\\"yaxis\\\"),d(e.starts.z.slice(0,_),\\\"zaxis\\\"))}else{for(var w=x[0],k=h(y),M=h(b),A=new Array(k.length*M.length),T=0,S=0;S<k.length;S++)for(var C=0;C<M.length;C++)A[T++]=[k[S],w,M[C]];u.startingPositions=A}u.colormap=o(e.colorscale),u.tubeSize=e.sizeref,u.maxLength=e.maxdisplayed;var E=d(e._xbnds,\\\"xaxis\\\"),L=d(e._ybnds,\\\"yaxis\\\"),z=d(e._zbnds,\\\"zaxis\\\"),O=p(y),I=p(x),P=p(b),D=[[E[0]-O[0],L[0]-I[0],z[0]-P[0]],[E[1]+O[1],L[1]+I[1],z[1]+P[1]]],R=n(u,D);R.vertexIntensityBounds=[e.cmin/e._normMax,e.cmax/e._normMax];var B=e.lightposition;return R.lightPosition=[B.x,B.y,B.z],R.ambient=e.lighting.ambient,R.diffuse=e.lighting.diffuse,R.specular=e.lighting.specular,R.roughness=e.lighting.roughness,R.fresnel=e.lighting.fresnel,R.opacity=e.opacity,e._pad=R.tubeScale*e.sizeref*2,R}u.handlePick=function(t){var e=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(t,n){var i=e[n],a=r[l[n]];return i.l2c(t)/a}if(t.object===this.mesh){var i=t.data.position,a=t.data.velocity;return t.traceCoordinate=[n(i[0],\\\"xaxis\\\"),n(i[1],\\\"yaxis\\\"),n(i[2],\\\"zaxis\\\"),n(a[0],\\\"xaxis\\\"),n(a[1],\\\"yaxis\\\"),n(a[2],\\\"zaxis\\\"),t.data.intensity*this.data._normMax,t.data.divergence],t.textLabel=this.data.text,!0}},u.update=function(t){this.data=t;var e=d(this.scene,t);this.mesh.update(e)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,n=d(t,e),a=i(r,n),o=new c(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},{\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../plots/gl3d/zip3\\\":799,\\\"gl-streamtube3d\\\":301}],1129:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/defaults\\\"),a=t(\\\"./attributes\\\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\\\"u\\\"),c=s(\\\"v\\\"),u=s(\\\"w\\\"),f=s(\\\"x\\\"),h=s(\\\"y\\\"),p=s(\\\"z\\\");l&&l.length&&c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length&&p&&p.length?(s(\\\"starts.x\\\"),s(\\\"starts.y\\\"),s(\\\"starts.z\\\"),s(\\\"maxdisplayed\\\"),s(\\\"sizeref\\\"),s(\\\"lighting.ambient\\\"),s(\\\"lighting.diffuse\\\"),s(\\\"lighting.specular\\\"),s(\\\"lighting.roughness\\\"),s(\\\"lighting.fresnel\\\"),s(\\\"lightposition.x\\\"),s(\\\"lightposition.y\\\"),s(\\\"lightposition.z\\\"),i(t,e,o,s,{prefix:\\\"\\\",cLetter:\\\"c\\\"}),s(\\\"text\\\"),e._length=null):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"./attributes\\\":1126}],1130:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"streamtube\\\",basePlotModule:t(\\\"../../plots/gl3d\\\"),categories:[\\\"gl3d\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),colorbar:{min:\\\"cmin\\\",max:\\\"cmax\\\"},calc:t(\\\"./calc\\\"),plot:t(\\\"./convert\\\"),eventData:function(t,e){return t.tubex=t.x,t.tubey=t.y,t.tubez=t.z,t.tubeu=e.traceCoordinate[3],t.tubev=e.traceCoordinate[4],t.tubew=e.traceCoordinate[5],t.norm=e.traceCoordinate[6],t.divergence=e.traceCoordinate[7],delete t.x,delete t.y,delete t.z,t},meta:{}}},{\\\"../../plots/gl3d\\\":788,\\\"./attributes\\\":1126,\\\"./calc\\\":1127,\\\"./convert\\\":1128,\\\"./defaults\\\":1129}],1131:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l=t(\\\"../../plot_api/edit_types\\\").overrideAll;function c(t){return{show:{valType:\\\"boolean\\\",dflt:!1},project:{x:{valType:\\\"boolean\\\",dflt:!1},y:{valType:\\\"boolean\\\",dflt:!1},z:{valType:\\\"boolean\\\",dflt:!1}},color:{valType:\\\"color\\\",dflt:n.defaultLine},usecolormap:{valType:\\\"boolean\\\",dflt:!1},width:{valType:\\\"number\\\",min:1,max:16,dflt:2},highlight:{valType:\\\"boolean\\\",dflt:!0},highlightcolor:{valType:\\\"color\\\",dflt:n.defaultLine},highlightwidth:{valType:\\\"number\\\",min:1,max:16,dflt:2}}}var u=e.exports=l(s({z:{valType:\\\"data_array\\\"},x:{valType:\\\"data_array\\\"},y:{valType:\\\"data_array\\\"},text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0},surfacecolor:{valType:\\\"data_array\\\"}},i(\\\"\\\",{colorAttr:\\\"z or surfacecolor\\\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\\\"calc\\\"}),{colorbar:a,contours:{x:c(),y:c(),z:c()},hidesurface:{valType:\\\"boolean\\\",dflt:!1},lightposition:{x:{valType:\\\"number\\\",min:-1e5,max:1e5,dflt:10},y:{valType:\\\"number\\\",min:-1e5,max:1e5,dflt:1e4},z:{valType:\\\"number\\\",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:\\\"number\\\",min:0,max:1,dflt:.8},diffuse:{valType:\\\"number\\\",min:0,max:1,dflt:.8},specular:{valType:\\\"number\\\",min:0,max:2,dflt:.05},roughness:{valType:\\\"number\\\",min:0,max:1,dflt:.5},fresnel:{valType:\\\"number\\\",min:0,max:5,dflt:.2}},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},_deprecated:{zauto:s({},i.zauto,{}),zmin:s({},i.zmin,{}),zmax:s({},i.zmax,{})},hoverinfo:s({},o.hoverinfo)}),\\\"calc\\\",\\\"nested\\\");u.x.editType=u.y.editType=u.z.editType=\\\"calc+clearAxisTypes\\\",u.transforms=void 0},{\\\"../../components/color\\\":570,\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742}],1132:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\");e.exports=function(t,e){e.surfacecolor?n(e,e.surfacecolor,\\\"\\\",\\\"c\\\"):n(e,e.z,\\\"\\\",\\\"c\\\")}},{\\\"../../components/colorscale/calc\\\":578}],1133:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-surface3d\\\"),i=t(\\\"ndarray\\\"),a=t(\\\"ndarray-homography\\\"),o=t(\\\"ndarray-fill\\\"),s=t(\\\"ndarray-ops\\\"),l=t(\\\"../../lib\\\").isArrayOrTypedArray,c=t(\\\"../../lib/gl_format_color\\\").parseColorScale,u=t(\\\"../../lib/str2rgbarray\\\"),f=128;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.dataScale=1}var p=h.prototype;function d(t){var e=t.shape,r=[e[0]+2,e[1]+2],n=i(new Float32Array(r[0]*r[1]),r);return s.assign(n.lo(1,1).hi(e[0],e[1]),t),s.assign(n.lo(1).hi(e[0],1),t.hi(e[0],1)),s.assign(n.lo(1,r[1]-1).hi(e[0],1),t.lo(0,e[1]-1).hi(e[0],1)),s.assign(n.lo(0,1).hi(1,e[1]),t.hi(1)),s.assign(n.lo(r[0]-1,1).hi(1,e[1]),t.lo(e[0]-1)),n.set(0,0,t.get(0,0)),n.set(0,r[1]-1,t.get(0,e[1]-1)),n.set(r[0]-1,0,t.get(e[0]-1,0)),n.set(r[0]-1,r[1]-1,t.get(e[0]-1,e[1]-1)),n}p.handlePick=function(t){if(t.object===this.surface){var e=t.index=[Math.min(0|Math.round(t.data.index[0]/this.dataScale-1),this.data.z[0].length-1),Math.min(0|Math.round(t.data.index[1]/this.dataScale-1),this.data.z.length-1)],r=[0,0,0];l(this.data.x)?l(this.data.x[0])?r[0]=this.data.x[e[1]][e[0]]:r[0]=this.data.x[e[0]]:r[0]=e[0],l(this.data.y)?l(this.data.y[0])?r[1]=this.data.y[e[1]][e[0]]:r[1]=this.data.y[e[1]]:r[1]=e[1],r[2]=this.data.z[e[1]][e[0]],t.traceCoordinate=r;var n=this.scene.fullSceneLayout;t.dataCoordinate=[n.xaxis.d2l(r[0],0,this.data.xcalendar)*this.scene.dataScale[0],n.yaxis.d2l(r[1],0,this.data.ycalendar)*this.scene.dataScale[1],n.zaxis.d2l(r[2],0,this.data.zcalendar)*this.scene.dataScale[2]];var i=this.data.text;return Array.isArray(i)&&i[e[1]]&&void 0!==i[e[1]][e[0]]?t.textLabel=i[e[1]][e[0]]:t.textLabel=i||\\\"\\\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}},p.setContourLevels=function(){for(var t=[[],[],[]],e=!1,r=0;r<3;++r)this.showContour[r]&&(e=!0,t[r]=this.scene.contourLevels[r]);e&&this.surface.update({levels:t})},p.update=function(t){var e,r=this.scene,n=r.fullSceneLayout,s=this.surface,h=t.opacity,p=c(t.colorscale,h),g=t.z,v=t.x,m=t.y,y=n.xaxis,x=n.yaxis,b=n.zaxis,_=r.dataScale,w=g[0].length,k=t._ylength,M=[i(new Float32Array(w*k),[w,k]),i(new Float32Array(w*k),[w,k]),i(new Float32Array(w*k),[w,k])],A=M[0],T=M[1],S=r.contourLevels;this.data=t;var C=t.xcalendar,E=t.ycalendar,L=t.zcalendar;o(M[2],function(t,e){return b.d2l(g[e][t],0,L)*_[2]}),l(v)?l(v[0])?o(A,function(t,e){return y.d2l(v[e][t],0,C)*_[0]}):o(A,function(t){return y.d2l(v[t],0,C)*_[0]}):o(A,function(t){return y.d2l(t,0,C)*_[0]}),l(v)?l(m[0])?o(T,function(t,e){return x.d2l(m[e][t],0,E)*_[1]}):o(T,function(t,e){return x.d2l(m[e],0,E)*_[1]}):o(T,function(t,e){return x.d2l(e,0,C)*_[1]});var z={colormap:p,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!t.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacity:t.opacity};if(z.intensityBounds=[t.cmin,t.cmax],t.surfacecolor){var O=i(new Float32Array(w*k),[w,k]);o(O,function(e,r){return t.surfacecolor[r][e]}),M.push(O)}else z.intensityBounds[0]*=_[2],z.intensityBounds[1]*=_[2];this.dataScale=function(t){var e=Math.max(t[0].shape[0],t[0].shape[1]);if(e<f){for(var r=f/e,n=[0|Math.floor(t[0].shape[0]*r+1),0|Math.floor(t[0].shape[1]*r+1)],o=n[0]*n[1],s=0;s<t.length;++s){var l=d(t[s]),c=i(new Float32Array(o),n);a(c,l,[r,0,0,0,r,0,0,0,1]),t[s]=c}return r}return 1}(M),t.surfacecolor&&(z.intensity=M.pop());var I=[!0,!0,!0],P=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];for(e=0;e<3;++e){var D=t.contours[P[e]];I[e]=D.highlight,z.showContour[e]=D.show||D.highlight,z.showContour[e]&&(z.contourProject[e]=[D.project.x,D.project.y,D.project.z],D.show?(this.showContour[e]=!0,z.levels[e]=S[e],s.highlightColor[e]=z.contourColor[e]=u(D.color),D.usecolormap?s.highlightTint[e]=z.contourTint[e]=0:s.highlightTint[e]=z.contourTint[e]=1,z.contourWidth[e]=D.width):this.showContour[e]=!1,D.highlight&&(z.dynamicColor[e]=u(D.highlightcolor),z.dynamicWidth[e]=D.highlightwidth))}(function(t){var e=t[0].rgb,r=t[t.length-1].rgb;return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]})(p)&&(z.vertexColor=!0),z.coords=M,s.update(z),s.visible=t.visible,s.enableDynamic=I,s.enableHighlight=I,s.snapToData=!0,\\\"lighting\\\"in t&&(s.ambientLight=t.lighting.ambient,s.diffuseLight=t.lighting.diffuse,s.specularLight=t.lighting.specular,s.roughness=t.lighting.roughness,s.fresnel=t.lighting.fresnel),\\\"lightposition\\\"in t&&(s.lightPosition=[t.lightposition.x,t.lightposition.y,t.lightposition.z]),h&&h<1&&(s.supportsTransparency=!0)},p.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new h(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../lib/str2rgbarray\\\":720,\\\"gl-surface3d\\\":303,ndarray:433,\\\"ndarray-fill\\\":423,\\\"ndarray-homography\\\":425,\\\"ndarray-ops\\\":427}],1134:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"./attributes\\\");function s(t,e,r){e in t&&!(r in t)&&(t[r]=t[e])}e.exports=function(t,e,r,l){var c,u;function f(r,n){return i.coerce(t,e,o,r,n)}var h=f(\\\"z\\\");if(h){var p=f(\\\"x\\\");f(\\\"y\\\"),e._xlength=Array.isArray(p)&&i.isArrayOrTypedArray(p[0])?h.length:h[0].length,e._ylength=h.length,n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\",\\\"z\\\"],l),f(\\\"text\\\"),[\\\"lighting.ambient\\\",\\\"lighting.diffuse\\\",\\\"lighting.specular\\\",\\\"lighting.roughness\\\",\\\"lighting.fresnel\\\",\\\"lightposition.x\\\",\\\"lightposition.y\\\",\\\"lightposition.z\\\",\\\"hidesurface\\\",\\\"opacity\\\"].forEach(function(t){f(t)});var d=f(\\\"surfacecolor\\\");f(\\\"colorscale\\\");var g=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];for(c=0;c<3;++c){var v=\\\"contours.\\\"+g[c],m=f(v+\\\".show\\\"),y=f(v+\\\".highlight\\\");if(m||y)for(u=0;u<3;++u)f(v+\\\".project.\\\"+g[u]);m&&(f(v+\\\".color\\\"),f(v+\\\".width\\\"),f(v+\\\".usecolormap\\\")),y&&(f(v+\\\".highlightcolor\\\"),f(v+\\\".highlightwidth\\\"))}d||(s(t,\\\"zmin\\\",\\\"cmin\\\"),s(t,\\\"zmax\\\",\\\"cmax\\\"),s(t,\\\"zauto\\\",\\\"cauto\\\")),a(t,e,l,f,{prefix:\\\"\\\",cLetter:\\\"c\\\"}),e._length=null}else e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":1131}],1135:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar={min:\\\"cmin\\\",max:\\\"cmax\\\"},n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./convert\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"surface\\\",n.basePlotModule=t(\\\"../../plots/gl3d\\\"),n.categories=[\\\"gl3d\\\",\\\"2dMap\\\",\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"../../plots/gl3d\\\":788,\\\"./attributes\\\":1131,\\\"./calc\\\":1132,\\\"./convert\\\":1133,\\\"./defaults\\\":1134}],1136:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/annotations/attributes\\\"),i=t(\\\"../../lib/extend\\\").extendFlat,a=t(\\\"../../plot_api/edit_types\\\").overrideAll,o=t(\\\"../../plots/font_attributes\\\"),s=t(\\\"../../plots/domain\\\").attributes;(e.exports=a({domain:s({name:\\\"table\\\",trace:!0}),columnwidth:{valType:\\\"number\\\",arrayOk:!0,dflt:null},columnorder:{valType:\\\"data_array\\\"},header:{values:{valType:\\\"data_array\\\",dflt:[]},format:{valType:\\\"data_array\\\",dflt:[]},prefix:{valType:\\\"string\\\",arrayOk:!0,dflt:null},suffix:{valType:\\\"string\\\",arrayOk:!0,dflt:null},height:{valType:\\\"number\\\",dflt:28},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\\\"number\\\",arrayOk:!0,dflt:1},color:{valType:\\\"color\\\",arrayOk:!0,dflt:\\\"grey\\\"}},fill:{color:{valType:\\\"color\\\",arrayOk:!0,dflt:\\\"white\\\"}},font:i({},o({arrayOk:!0}))},cells:{values:{valType:\\\"data_array\\\",dflt:[]},format:{valType:\\\"data_array\\\",dflt:[]},prefix:{valType:\\\"string\\\",arrayOk:!0,dflt:null},suffix:{valType:\\\"string\\\",arrayOk:!0,dflt:null},height:{valType:\\\"number\\\",dflt:20},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\\\"number\\\",arrayOk:!0,dflt:1},color:{valType:\\\"color\\\",arrayOk:!0,dflt:\\\"grey\\\"}},fill:{color:{valType:\\\"color\\\",arrayOk:!0,dflt:\\\"white\\\"}},font:i({},o({arrayOk:!0}))}},\\\"calc\\\",\\\"from-root\\\")).transforms=void 0},{\\\"../../components/annotations/attributes\\\":553,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772}],1137:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/get_data\\\").getModuleCalcData,i=t(\\\"./plot\\\");r.name=\\\"table\\\",r.plot=function(t){var e=n(t.calcdata,\\\"table\\\")[0];e.length&&i(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"table\\\"),a=e._has&&e._has(\\\"table\\\");i&&!a&&n._paperdiv.selectAll(\\\".table\\\").remove()}},{\\\"../../plots/get_data\\\":782,\\\"./plot\\\":1144}],1138:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/gup\\\").wrap;e.exports=function(){return n({})}},{\\\"../../lib/gup\\\":693}],1139:[function(t,e,r){\\\"use strict\\\";e.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\\\\$.*\\\\$$/,goldenRatio:1.618,lineBreaker:\\\"<br>\\\",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:\\\"cubic-out\\\",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:\\\"cubic-out\\\",uplift:5,wrapSpacer:\\\" \\\",wrapSplitCharacter:\\\" \\\",cn:{table:\\\"table\\\",tableControlView:\\\"table-control-view\\\",scrollBackground:\\\"scroll-background\\\",yColumn:\\\"y-column\\\",columnBlock:\\\"column-block\\\",scrollAreaClip:\\\"scroll-area-clip\\\",scrollAreaClipRect:\\\"scroll-area-clip-rect\\\",columnBoundary:\\\"column-boundary\\\",columnBoundaryClippath:\\\"column-boundary-clippath\\\",columnBoundaryRect:\\\"column-boundary-rect\\\",columnCells:\\\"column-cells\\\",columnCell:\\\"column-cell\\\",cellRect:\\\"cell-rect\\\",cellText:\\\"cell-text\\\",cellTextHolder:\\\"cell-text-holder\\\",scrollbarKit:\\\"scrollbar-kit\\\",scrollbar:\\\"scrollbar\\\",scrollbarSlider:\\\"scrollbar-slider\\\",scrollbarGlyph:\\\"scrollbar-glyph\\\",scrollbarCaptureZone:\\\"scrollbar-capture-zone\\\"}}},{}],1140:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"../../lib/extend\\\").extendFlat,a=t(\\\"fast-isnumeric\\\");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r<t.length;r++)e=Math.max(e,o(t[r]));return e}return t}function s(t,e){return t+e}function l(t){var e,r=t.slice(),n=1/0,i=0;for(e=0;e<r.length;e++)Array.isArray(r[e])||(r[e]=[r[e]]),n=Math.min(n,r[e].length),i=Math.max(i,r[e].length);if(n!==i)for(e=0;e<r.length;e++){var a=i-r[e].length;a&&(r[e]=r[e].concat(c(a)))}return r}function c(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=\\\"\\\";return e}function u(t){return t.calcdata.columns.reduce(function(e,r){return r.xIndex<t.xIndex?e+r.columnWidth:e},0)}function f(t,e){return Object.keys(t).map(function(r){return i({},t[r],{auxiliaryBlocks:e})})}function h(t,e){for(var r,n={},i=0,a=0,o={firstRowIndex:null,lastRowIndex:null,rows:[]},s=0,l=0,c=0;c<t.length;c++)r=t[c],o.rows.push({rowIndex:c,rowHeight:r}),((a+=r)>=e||c===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}e.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[\\\"\\\"],d=l(d));var g=d.concat(p(r).map(function(){return c((d[0]||[\\\"\\\"]).length)})),v=e.domain,m=Math.floor(t._fullLayout._size.w*(v.x[1]-v.x[0])),y=Math.floor(t._fullLayout._size.h*(v.y[1]-v.y[0])),x=e.header.values.length?g[0].map(function(){return e.header.height}):[n.emptyHeaderHeight],b=r.length?r[0].map(function(){return e.cells.height}):[],_=x.reduce(s,0),w=h(b,y-_+n.uplift),k=f(h(x,_),[]),M=f(w,k),A={},T=e._fullInput.columnorder.concat(p(r.map(function(t,e){return e}))),S=g.map(function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return a(n)?Number(n):1}),C=S.reduce(s,0);S=S.map(function(t){return t/C*m});var E=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.index,translateX:v.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-v.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:E,height:y,columnOrder:T,groupHeight:y,rowBlocks:M,headerRowBlocks:k,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:g}),gdColumns:g.map(function(t){return t[0]}),gdColumnsOriginalOrder:g.map(function(t){return t[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(t,e){var r=A[t];return A[t]=(r||0)+1,{key:t+\\\"__\\\"+A[t],label:t,specIndex:e,xIndex:T[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}})};return L.columns.forEach(function(t){t.calcdata=L,t.x=u(t)}),L}},{\\\"../../lib/extend\\\":685,\\\"./constants\\\":1139,\\\"fast-isnumeric\\\":214}],1141:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/extend\\\").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:\\\"header\\\",type:\\\"header\\\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:\\\"cells1\\\",type:\\\"cells\\\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:\\\"cells2\\\",type:\\\"cells\\\",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0,n=e?r+e.rows.length:0;return[r,n]}(t);return(t.values||[]).slice(e[0],e[1]).map(function(r,n){return{keyWithinBlock:n+(\\\"string\\\"==typeof r&&r.match(/[<$&> ]/)?\\\"_keybuster_\\\"+Math.random():\\\"\\\"),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}})}},{\\\"../../lib/extend\\\":685}],1142:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"../../plots/domain\\\").defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}a(e,o,s),s(\\\"columnwidth\\\"),s(\\\"header.values\\\"),s(\\\"header.format\\\"),s(\\\"header.align\\\"),s(\\\"header.prefix\\\"),s(\\\"header.suffix\\\"),s(\\\"header.height\\\"),s(\\\"header.line.width\\\"),s(\\\"header.line.color\\\"),s(\\\"header.fill.color\\\"),n.coerceFont(s,\\\"header.font\\\",n.extendFlat({},o.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(t,e){return t-e}),o=i.map(function(t){return a.indexOf(t)}),s=o.length;s<n;s++)o.push(s);e(\\\"columnorder\\\",o)}(e,s),s(\\\"cells.values\\\"),s(\\\"cells.format\\\"),s(\\\"cells.align\\\"),s(\\\"cells.prefix\\\"),s(\\\"cells.suffix\\\"),s(\\\"cells.height\\\"),s(\\\"cells.line.width\\\"),s(\\\"cells.line.color\\\"),s(\\\"cells.fill.color\\\"),n.coerceFont(s,\\\"cells.font\\\",n.extendFlat({},o.font)),e._length=null}},{\\\"../../lib\\\":696,\\\"../../plots/domain\\\":771,\\\"./attributes\\\":1136}],1143:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"table\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1136,\\\"./base_plot\\\":1137,\\\"./calc\\\":1138,\\\"./defaults\\\":1142,\\\"./plot\\\":1144}],1144:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"d3\\\"),a=t(\\\"../../lib/gup\\\"),o=t(\\\"../../components/drawing\\\"),s=t(\\\"../../lib/svg_text_utils\\\"),l=t(\\\"../../lib\\\").raiseToTop,c=t(\\\"../../lib\\\").cancelTransition,u=t(\\\"./data_preparation_helper\\\"),f=t(\\\"./data_split_helpers\\\"),h=t(\\\"../../components/color\\\");function p(t){return Math.ceil(t.calcdata.maxLineWidth/2)}function d(t,e){return\\\"clip\\\"+t._fullLayout._uid+\\\"_scrollAreaBottomClip_\\\"+e.key}function g(t,e){return\\\"clip\\\"+t._fullLayout._uid+\\\"_columnBoundaryClippath_\\\"+e.calcdata.key+\\\"_\\\"+e.specIndex}function v(t){return[].concat.apply([],t.map(function(t){return t})).map(function(t){return t.__data__})}function m(t,e,r){var o=t.selectAll(\\\".\\\"+n.cn.scrollbarKit).data(a.repeat,a.keyFun);o.enter().append(\\\"g\\\").classed(n.cn.scrollbarKit,!0).style(\\\"shape-rendering\\\",\\\"geometricPrecision\\\"),o.each(function(t){var e=t.scrollbarState;e.totalHeight=function(t){var e=t.rowBlocks;return I(e,e.length-1)+(e.length?P(e[e.length-1],1/0):1)}(t),e.scrollableAreaHeight=t.groupHeight-A(t),e.currentlyVisibleHeight=Math.min(e.totalHeight,e.scrollableAreaHeight),e.ratio=e.currentlyVisibleHeight/e.totalHeight,e.barLength=Math.max(e.ratio*e.currentlyVisibleHeight,n.goldenRatio*n.scrollbarWidth),e.barWiggleRoom=e.currentlyVisibleHeight-e.barLength,e.wiggleRoom=Math.max(0,e.totalHeight-e.scrollableAreaHeight),e.topY=0===e.barWiggleRoom?0:t.scrollY/e.wiggleRoom*e.barWiggleRoom,e.bottomY=e.topY+e.barLength,e.dragMultiplier=e.wiggleRoom/e.barWiggleRoom}).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+(t.width+n.scrollbarWidth/2+n.scrollbarOffset)+\\\" \\\"+A(t)+\\\")\\\"});var s=o.selectAll(\\\".\\\"+n.cn.scrollbar).data(a.repeat,a.keyFun);s.enter().append(\\\"g\\\").classed(n.cn.scrollbar,!0);var l=s.selectAll(\\\".\\\"+n.cn.scrollbarSlider).data(a.repeat,a.keyFun);l.enter().append(\\\"g\\\").classed(n.cn.scrollbarSlider,!0),l.attr(\\\"transform\\\",function(t){return\\\"translate(0 \\\"+(t.scrollbarState.topY||0)+\\\")\\\"});var c=l.selectAll(\\\".\\\"+n.cn.scrollbarGlyph).data(a.repeat,a.keyFun);c.enter().append(\\\"line\\\").classed(n.cn.scrollbarGlyph,!0).attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",n.scrollbarWidth).attr(\\\"stroke-linecap\\\",\\\"round\\\").attr(\\\"y1\\\",n.scrollbarWidth/2),c.attr(\\\"y2\\\",function(t){return t.scrollbarState.barLength-n.scrollbarWidth/2}).attr(\\\"stroke-opacity\\\",function(t){return t.columnDragInProgress||!t.scrollbarState.barWiggleRoom||r?0:.4}),c.transition().delay(0).duration(0),c.transition().delay(n.scrollbarHideDelay).duration(n.scrollbarHideDuration).attr(\\\"stroke-opacity\\\",0);var u=s.selectAll(\\\".\\\"+n.cn.scrollbarCaptureZone).data(a.repeat,a.keyFun);u.enter().append(\\\"line\\\").classed(n.cn.scrollbarCaptureZone,!0).attr(\\\"stroke\\\",\\\"white\\\").attr(\\\"stroke-opacity\\\",.01).attr(\\\"stroke-width\\\",n.scrollbarCaptureWidth).attr(\\\"stroke-linecap\\\",\\\"butt\\\").attr(\\\"y1\\\",0).on(\\\"mousedown\\\",function(r){var n=i.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=n-a.top,l=i.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||S(e,t,null,l(s-o.barLength/2))(r)}).call(i.behavior.drag().origin(function(t){return i.event.stopPropagation(),t.scrollbarState.scrollbarScrollInProgress=!0,t}).on(\\\"drag\\\",S(e,t)).on(\\\"dragend\\\",function(){})),u.attr(\\\"y2\\\",function(t){return t.scrollbarState.scrollableAreaHeight})}function y(t,e,r,s){var l=function(t){var e=t.selectAll(\\\".\\\"+n.cn.columnCell).data(f.splitToCells,function(t){return t.keyWithinBlock});return e.enter().append(\\\"g\\\").classed(n.cn.columnCell,!0),e.exit().remove(),e}(function(t){var e=t.selectAll(\\\".\\\"+n.cn.columnCells).data(a.repeat,a.keyFun);return e.enter().append(\\\"g\\\").classed(n.cn.columnCells,!0),e.exit().remove(),e}(r));!function(t){t.each(function(t,e){var r=t.calcdata.cells.font,n=t.column.specIndex,i={size:_(r.size,n,e),color:_(r.color,n,e),family:_(r.family,n,e)};t.rowNumber=t.key,t.align=_(t.calcdata.cells.align,n,e),t.cellBorderWidth=_(t.calcdata.cells.line.width,n,e),t.font=i})}(l),function(t){t.attr(\\\"width\\\",function(t){return t.column.columnWidth}).attr(\\\"stroke-width\\\",function(t){return t.cellBorderWidth}).each(function(t){var e=i.select(this);h.stroke(e,_(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),h.fill(e,_(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}(function(t){var e=t.selectAll(\\\".\\\"+n.cn.cellRect).data(a.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\\\"rect\\\").classed(n.cn.cellRect,!0),e}(l));var c=function(t){var e=t.selectAll(\\\".\\\"+n.cn.cellText).data(a.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\\\"text\\\").classed(n.cn.cellText,!0).style(\\\"cursor\\\",function(){return\\\"auto\\\"}).on(\\\"mousedown\\\",function(){i.event.stopPropagation()}),e}(function(t){var e=t.selectAll(\\\".\\\"+n.cn.cellTextHolder).data(a.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\\\"g\\\").classed(n.cn.cellTextHolder,!0).style(\\\"shape-rendering\\\",\\\"geometricPrecision\\\"),e}(l));!function(t){t.each(function(t){o.font(i.select(this),t.font)})}(c),x(c,e,s,t),O(l)}function x(t,e,r,a){t.text(function(t){var e=t.column.specIndex,r=t.rowNumber,a=t.value,o=\\\"string\\\"==typeof a,s=o&&a.match(/<br>/i),l=!o||s;t.mayHaveMarkup=o&&a.match(/[<&>]/);var c,u=\\\"string\\\"==typeof(c=a)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?\\\"\\\":_(t.calcdata.cells.prefix,e,r)||\\\"\\\",d=u?\\\"\\\":_(t.calcdata.cells.suffix,e,r)||\\\"\\\",g=u?null:_(t.calcdata.cells.format,e,r)||null,v=p+(g?i.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=b(v)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?b(v):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var m=(\\\" \\\"===n.wrapSplitCharacter?v.replace(/<a href=/gi,\\\"<a_href=\\\"):v).split(n.wrapSplitCharacter),y=\\\" \\\"===n.wrapSplitCharacter?m.map(function(t){return t.replace(/<a_href=/gi,\\\"<a href=\\\")}):m;t.fragments=y.map(function(t){return{text:t,width:null}}),t.fragments.push({fragment:n.wrapSpacer,width:null}),h=y.join(n.lineBreaker)+n.lineBreaker+n.wrapSpacer}else delete t.fragments,h=v;return h}).attr(\\\"dy\\\",function(t){return t.needsConvertToTspans?0:\\\"0.75em\\\"}).each(function(t){var o=i.select(this),l=t.wrappingNeeded?E:L;t.needsConvertToTspans?s.convertToTspans(o,a,l(r,this,e,a,t)):i.select(this.parentNode).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+z(t)+\\\" \\\"+n.cellPad+\\\")\\\"}).attr(\\\"text-anchor\\\",function(t){return{left:\\\"start\\\",center:\\\"middle\\\",right:\\\"end\\\"}[t.align]})})}function b(t){return-1!==t.indexOf(n.wrapSplitCharacter)}function _(t,e,r){if(Array.isArray(t)){var n=t[Math.min(e,t.length-1)];return Array.isArray(n)?n[Math.min(r,n.length-1)]:n}return t}function w(t,e,r){t.transition().ease(n.releaseTransitionEase).duration(n.releaseTransitionDuration).attr(\\\"transform\\\",\\\"translate(\\\"+e.x+\\\" \\\"+r+\\\")\\\")}function k(t){return\\\"cells\\\"===t.type}function M(t){return\\\"header\\\"===t.type}function A(t){return(t.rowBlocks.length?t.rowBlocks[0].auxiliaryBlocks:[]).reduce(function(t,e){return t+P(e,1/0)},0)}function T(t,e,r){var n=v(e)[0];if(void 0!==n){var i=n.rowBlocks,a=n.calcdata,o=I(i,i.length),s=n.calcdata.groupHeight-A(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),c=function(t,e,r){for(var n=[],i=0,a=0;a<t.length;a++){for(var o=t[a],s=o.rows,l=0,c=0;c<s.length;c++)l+=s[c].rowHeight;o.allRowsHeight=l,e<i+l&&e+r>i&&n.push(a),i+=l}return n}(i,l,s);1===c.length&&(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),e.each(function(t,e){t.page=c[e],t.scrollY=l}),e.attr(\\\"transform\\\",function(t){return\\\"translate(0 \\\"+(I(t.rowBlocks,t.page)-t.scrollY)+\\\")\\\"}),t&&(C(t,r,e,c,n.prevPages,n,0),C(t,r,e,c,n.prevPages,n,1),m(r,t))}}function S(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter(function(t){return s.key===t.key}),c=r||s.scrollbarState.dragMultiplier;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var u=l.selectAll(\\\".\\\"+n.cn.yColumn).selectAll(\\\".\\\"+n.cn.columnBlock).filter(k);T(t,u,l)}}function C(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var a=r.filter(function(t,e){return e===o&&n[e]!==i[e]});y(t,e,a,r),i[o]=n[o]}))}function E(t,e,r){return function(){var a=i.select(e.parentNode);a.each(function(t){var e=t.fragments;a.selectAll(\\\"tspan.line\\\").each(function(t,r){e[r].width=this.getComputedTextLength()});var r,i,o=e[e.length-1].width,s=e.slice(0,-1),l=[],c=0,u=t.column.columnWidth-2*n.cellPad;for(t.value=\\\"\\\";s.length;)c+(i=(r=s.shift()).width+o)>u&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=i;c&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0}),a.selectAll(\\\"tspan.line\\\").remove(),x(a.select(\\\".\\\"+n.cn.cellText),r,t),i.select(e.parentNode.parentNode).call(O)}}function L(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=R(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,f=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:u,h=Math.max(f,u);h-l.rows[c].rowHeight&&(l.rows[c].rowHeight=h,t.selectAll(\\\".\\\"+n.cn.columnCell).call(O),T(null,t.filter(k),0),m(r,a,!0)),s.attr(\\\"transform\\\",function(){var t=this.parentNode.getBoundingClientRect(),e=i.select(this.parentNode).select(\\\".\\\"+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),a=e.top-t.top+(r?r.matrix.f:n.cellPad);return\\\"translate(\\\"+z(o,i.select(this.parentNode).select(\\\".\\\"+n.cn.cellTextHolder).node().getBoundingClientRect().width)+\\\" \\\"+a+\\\")\\\"}),o.settledY=!0}}}function z(t,e){switch(t.align){case\\\"left\\\":return n.cellPad;case\\\"right\\\":return t.column.columnWidth-(e||0)-n.cellPad;case\\\"center\\\":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function O(t){t.attr(\\\"transform\\\",function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+P(e,1/0)},0);return\\\"translate(0 \\\"+(P(R(t),t.key)+e)+\\\")\\\"}).selectAll(\\\".\\\"+n.cn.cellRect).attr(\\\"height\\\",function(t){return(e=R(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r})}function I(t,e){for(var r=0,n=e-1;n>=0;n--)r+=D(t[n]);return r}function P(t,e){for(var r=0,n=0;n<t.rows.length&&t.rows[n].rowIndex<e;n++)r+=t.rows[n].rowHeight;return r}function D(t){var e=t.allRowsHeight;if(void 0!==e)return e;for(var r=0,n=0;n<t.rows.length;n++)r+=t.rows[n].rowHeight;return t.allRowsHeight=r,r}function R(t){return t.rowBlocks[t.page]}e.exports=function(t,e){var r=t._fullLayout._paper.selectAll(\\\".\\\"+n.cn.table).data(e.map(function(e){var r=a.unwrap(e).trace;return u(t,r)}),a.keyFun);r.exit().remove(),r.enter().append(\\\"g\\\").classed(n.cn.table,!0).attr(\\\"overflow\\\",\\\"visible\\\").style(\\\"box-sizing\\\",\\\"content-box\\\").style(\\\"position\\\",\\\"absolute\\\").style(\\\"left\\\",0).style(\\\"overflow\\\",\\\"visible\\\").style(\\\"shape-rendering\\\",\\\"crispEdges\\\").style(\\\"pointer-events\\\",\\\"all\\\"),r.attr(\\\"width\\\",function(t){return t.width+t.size.l+t.size.r}).attr(\\\"height\\\",function(t){return t.height+t.size.t+t.size.b}).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.translateX+\\\",\\\"+t.translateY+\\\")\\\"});var s=r.selectAll(\\\".\\\"+n.cn.tableControlView).data(a.repeat,a.keyFun);s.enter().append(\\\"g\\\").classed(n.cn.tableControlView,!0).style(\\\"box-sizing\\\",\\\"content-box\\\").on(\\\"mousemove\\\",function(e){s.filter(function(t){return e===t}).call(m,t)}).on(\\\"mousewheel\\\",function(e){e.scrollbarState.wheeling||(e.scrollbarState.wheeling=!0,i.event.stopPropagation(),i.event.preventDefault(),S(t,s,null,e.scrollY+i.event.deltaY)(e),e.scrollbarState.wheeling=!1)}).call(m,t,!0),s.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.size.l+\\\" \\\"+t.size.t+\\\")\\\"});var h=s.selectAll(\\\".\\\"+n.cn.scrollBackground).data(a.repeat,a.keyFun);h.enter().append(\\\"rect\\\").classed(n.cn.scrollBackground,!0).attr(\\\"fill\\\",\\\"none\\\"),h.attr(\\\"width\\\",function(t){return t.width}).attr(\\\"height\\\",function(t){return t.height}),s.each(function(e){o.setClipUrl(i.select(this),d(t,e))});var x=s.selectAll(\\\".\\\"+n.cn.yColumn).data(function(t){return t.columns},a.keyFun);x.enter().append(\\\"g\\\").classed(n.cn.yColumn,!0),x.exit().remove(),x.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\" 0)\\\"}).call(i.behavior.drag().origin(function(e){return w(i.select(this),e,-n.uplift),l(this),e.calcdata.columnDragInProgress=!0,m(s.filter(function(t){return e.calcdata.key===t.key}),t),e}).on(\\\"drag\\\",function(t){var e=i.select(this),r=function(e){return(t===e?i.event.x:e.x)+e.columnWidth/2};t.x=Math.max(-n.overdrag,Math.min(t.calcdata.width+n.overdrag-t.columnWidth,i.event.x)),v(x).filter(function(e){return e.calcdata.key===t.calcdata.key}).sort(function(t,e){return r(t)-r(e)}).forEach(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e)}),x.filter(function(e){return t!==e}).transition().ease(n.transitionEase).duration(n.transitionDuration).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\" 0)\\\"}),e.call(c).attr(\\\"transform\\\",\\\"translate(\\\"+t.x+\\\" -\\\"+n.uplift+\\\" )\\\")}).on(\\\"dragend\\\",function(e){var r=i.select(this),n=e.calcdata;e.x=e.xScale(e),e.calcdata.columnDragInProgress=!1,w(r,e,0),function(t,e,r){var n=e.gdColumnsOriginalOrder;e.gdColumns.sort(function(t,e){return r[n.indexOf(t)]-r[n.indexOf(e)]}),e.columnorder=r,t.emit(\\\"plotly_restyle\\\")}(t,n,n.columns.map(function(t){return t.xIndex}))})),x.each(function(e){o.setClipUrl(i.select(this),g(t,e))});var b=x.selectAll(\\\".\\\"+n.cn.columnBlock).data(f.splitToPanels,a.keyFun);b.enter().append(\\\"g\\\").classed(n.cn.columnBlock,!0).attr(\\\"id\\\",function(t){return t.key}),b.style(\\\"cursor\\\",function(t){return t.dragHandle?\\\"ew-resize\\\":t.calcdata.scrollbarState.barWiggleRoom?\\\"ns-resize\\\":\\\"default\\\"});var _=b.filter(M),A=b.filter(k);A.call(i.behavior.drag().origin(function(t){return i.event.stopPropagation(),t}).on(\\\"drag\\\",S(t,s,-1)).on(\\\"dragend\\\",function(){})),y(t,s,_,b),y(t,s,A,b);var C=s.selectAll(\\\".\\\"+n.cn.scrollAreaClip).data(a.repeat,a.keyFun);C.enter().append(\\\"clipPath\\\").classed(n.cn.scrollAreaClip,!0).attr(\\\"id\\\",function(e){return d(t,e)});var E=C.selectAll(\\\".\\\"+n.cn.scrollAreaClipRect).data(a.repeat,a.keyFun);E.enter().append(\\\"rect\\\").classed(n.cn.scrollAreaClipRect,!0).attr(\\\"x\\\",-n.overdrag).attr(\\\"y\\\",-n.uplift).attr(\\\"fill\\\",\\\"none\\\"),E.attr(\\\"width\\\",function(t){return t.width+2*n.overdrag}).attr(\\\"height\\\",function(t){return t.height+n.uplift}),x.selectAll(\\\".\\\"+n.cn.columnBoundary).data(a.repeat,a.keyFun).enter().append(\\\"g\\\").classed(n.cn.columnBoundary,!0);var L=x.selectAll(\\\".\\\"+n.cn.columnBoundaryClippath).data(a.repeat,a.keyFun);L.enter().append(\\\"clipPath\\\").classed(n.cn.columnBoundaryClippath,!0),L.attr(\\\"id\\\",function(e){return g(t,e)});var z=L.selectAll(\\\".\\\"+n.cn.columnBoundaryRect).data(a.repeat,a.keyFun);z.enter().append(\\\"rect\\\").classed(n.cn.columnBoundaryRect,!0).attr(\\\"fill\\\",\\\"none\\\"),z.attr(\\\"width\\\",function(t){return t.columnWidth+2*p(t)}).attr(\\\"height\\\",function(t){return t.calcdata.height+2*p(t)+n.uplift}).attr(\\\"x\\\",function(t){return-p(t)}).attr(\\\"y\\\",function(t){return-p(t)}),T(null,A,s)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"../../lib/svg_text_utils\\\":721,\\\"./constants\\\":1139,\\\"./data_preparation_helper\\\":1140,\\\"./data_split_helpers\\\":1141,d3:148}],1145:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../box/attributes\\\"),i=t(\\\"../../lib/extend\\\").extendFlat;e.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,name:n.name,orientation:i({},n.orientation,{}),bandwidth:{valType:\\\"number\\\",min:0,editType:\\\"calc\\\"},scalegroup:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},scalemode:{valType:\\\"enumerated\\\",values:[\\\"width\\\",\\\"count\\\"],dflt:\\\"width\\\",editType:\\\"calc\\\"},spanmode:{valType:\\\"enumerated\\\",values:[\\\"soft\\\",\\\"hard\\\",\\\"manual\\\"],dflt:\\\"soft\\\",editType:\\\"calc\\\"},span:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"calc\\\"},{valType:\\\"any\\\",editType:\\\"calc\\\"}],editType:\\\"calc\\\"},line:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,dflt:2,editType:\\\"style\\\"},editType:\\\"plot\\\"},fillcolor:n.fillcolor,points:i({},n.boxpoints,{}),jitter:i({},n.jitter,{}),pointpos:i({},n.pointpos,{}),marker:n.marker,text:n.text,box:{visible:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"plot\\\"},width:{valType:\\\"number\\\",min:0,max:1,dflt:.25,editType:\\\"plot\\\"},fillcolor:{valType:\\\"color\\\",editType:\\\"style\\\"},line:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,editType:\\\"style\\\"},editType:\\\"style\\\"},editType:\\\"plot\\\"},meanline:{visible:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"plot\\\"},color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,editType:\\\"style\\\"},editType:\\\"plot\\\"},side:{valType:\\\"enumerated\\\",values:[\\\"both\\\",\\\"positive\\\",\\\"negative\\\"],dflt:\\\"both\\\",editType:\\\"plot\\\"},selected:n.selected,unselected:n.unselected,hoveron:{valType:\\\"flaglist\\\",flags:[\\\"violins\\\",\\\"points\\\",\\\"kde\\\"],dflt:\\\"violins+points+kde\\\",extras:[\\\"all\\\"],editType:\\\"style\\\"}}},{\\\"../../lib/extend\\\":685,\\\"../box/attributes\\\":860}],1146:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../box/calc\\\"),o=t(\\\"./helpers\\\"),s=t(\\\"../../constants/numerical\\\").BADNUM;function l(t,e,r){var i=e.max-e.min;if(!i)return 1;if(t.bandwidth)return Math.max(t.bandwidth,i/1e4);var a=r.length,o=n.stdev(r,a-1,e.mean);return Math.max(function(t,e,r){return 1.059*Math.min(e,r/1.349)*Math.pow(t,-.2)}(a,o,e.q3-e.q1),i/100)}function c(t,e,r,n){var a,o=t.spanmode,l=t.span||[],c=[e.min,e.max],u=[e.min-2*n,e.max+2*n];function f(n){var i=l[n],a=r.d2c(i,0,t[e.valLetter+\\\"calendar\\\"]);return a===s?u[n]:a}var h={type:\\\"linear\\\",range:a=\\\"soft\\\"===o?u:\\\"hard\\\"===o?c:[f(0),f(1)]};return i.setConvert(h),h.cleanRange(),a}e.exports=function(t,e){var r=a(t,e);if(r[0].t.empty)return r;var s=t._fullLayout,u=i.getFromId(t,e[\\\"h\\\"===e.orientation?\\\"xaxis\\\":\\\"yaxis\\\"]),f=s._violinScaleGroupStats,h=e.scalegroup,p=f[h];p||(p=f[h]={maxWidth:0,maxCount:0});for(var d=1/0,g=-1/0,v=0;v<r.length;v++){var m=r[v],y=m.pts.map(o.extractVal),x=m.bandwidth=l(e,m,y),b=m.span=c(e,m,u,x),_=b[1]-b[0],w=Math.ceil(_/(x/3)),k=_/w;if(!isFinite(k)||!isFinite(w))return n.error(\\\"Something went wrong with computing the violin span\\\"),r[0].t.empty=!0,r;var M=o.makeKDE(m,e,y);m.density=new Array(w);for(var A=0,T=b[0];T<b[1]+k/2;A++,T+=k){var S=M(T);p.maxWidth=Math.max(p.maxWidth,S),m.density[A]={v:S,t:T}}p.maxCount=Math.max(p.maxCount,y.length),d=Math.min(d,b[0]),g=Math.max(g,b[1])}var C=i.findExtremes(u,[d,g],{padded:!0});return e._extremes[u._id]=C,r[0].t.labels.kde=n._(t,\\\"kde:\\\"),r}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../box/calc\\\":861,\\\"./helpers\\\":1149}],1147:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../box/cross_trace_calc\\\").setPositionOffset,i=[\\\"v\\\",\\\"h\\\"];e.exports=function(t,e){for(var r=t.calcdata,a=e.xaxis,o=e.yaxis,s=0;s<i.length;s++){for(var l=i[s],c=\\\"h\\\"===l?o:a,u=[],f=0,h=0,p=0;p<r.length;p++){var d=r[p],g=d[0].t,v=d[0].trace;!0!==v.visible||\\\"violin\\\"!==v.type||g.empty||v.orientation!==l||v.xaxis!==a._id||v.yaxis!==o._id||(u.push(p),!1!==v.points&&(f=Math.max(f,v.jitter-v.pointpos-1),h=Math.max(h,v.jitter+v.pointpos-1)))}n(\\\"violin\\\",t,u,c,[f,h])}}},{\\\"../box/cross_trace_calc\\\":862}],1148:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../box/defaults\\\"),o=t(\\\"./attributes\\\");e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}function c(r,i){return n.coerce2(t,e,o,r,i)}if(a.handleSampleDefaults(t,e,l,s),!1!==e.visible){l(\\\"bandwidth\\\"),l(\\\"scalegroup\\\",e.name),l(\\\"scalemode\\\"),l(\\\"side\\\");var u,f=l(\\\"span\\\");Array.isArray(f)&&(u=\\\"manual\\\"),l(\\\"spanmode\\\",u);var h=l(\\\"line.color\\\",(t.marker||{}).color||r),p=l(\\\"line.width\\\"),d=l(\\\"fillcolor\\\",i.addOpacity(e.line.color,.5));a.handlePointsDefaults(t,e,l,{prefix:\\\"\\\"});var g=c(\\\"box.width\\\"),v=c(\\\"box.fillcolor\\\",d),m=c(\\\"box.line.color\\\",h),y=c(\\\"box.line.width\\\",p);l(\\\"box.visible\\\",Boolean(g||v||m||y))||(e.box={visible:!1});var x=c(\\\"meanline.color\\\",h),b=c(\\\"meanline.width\\\",p);l(\\\"meanline.visible\\\",Boolean(x||b))||(e.meanline={visible:!1})}}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../box/defaults\\\":863,\\\"./attributes\\\":1145}],1149:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=function(t){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*t*t)};r.makeKDE=function(t,e,r){var n=r.length,a=i,o=t.bandwidth,s=1/(n*o);return function(t){for(var e=0,i=0;i<n;i++)e+=a((t-r[i])/o);return s*e}},r.getPositionOnKdePath=function(t,e,r){var i,a;\\\"h\\\"===e.orientation?(i=\\\"y\\\",a=\\\"x\\\"):(i=\\\"x\\\",a=\\\"y\\\");var o=n.findPointOnPath(t.path,r,a,{pathLength:t.pathLength}),s=t.posCenterPx,l=o[i];return[l,\\\"both\\\"===e.side?2*s-l:s]},r.getKdeValue=function(t,e,n){var i=t.pts.map(r.extractVal);return r.makeKDE(t,e,i)(n)/t.posDensityScale},r.extractVal=function(t){return t.v}},{\\\"../../lib\\\":696}],1150:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../box/hover\\\"),o=t(\\\"./helpers\\\");e.exports=function(t,e,r,s,l){var c,u,f=t.cd,h=f[0].trace,p=h.hoveron,d=-1!==p.indexOf(\\\"violins\\\"),g=-1!==p.indexOf(\\\"kde\\\"),v=[];if(d||g){var m=a.hoverOnBoxes(t,e,r,s);if(d&&(v=v.concat(m)),g&&m.length>0){var y,x,b,_,w,k=t.xa,M=t.ya;\\\"h\\\"===h.orientation?(w=e,y=\\\"y\\\",b=M,x=\\\"x\\\",_=k):(w=r,y=\\\"x\\\",b=k,x=\\\"y\\\",_=M);var A=f[t.index];if(w>=A.span[0]&&w<=A.span[1]){var T=n.extendFlat({},t),S=_.c2p(w,!0),C=o.getKdeValue(A,h,w),E=o.getPositionOnKdePath(A,h,S),L=b._offset,z=b._length;T[y+\\\"0\\\"]=E[0],T[y+\\\"1\\\"]=E[1],T[x+\\\"0\\\"]=T[x+\\\"1\\\"]=S,T[x+\\\"Label\\\"]=x+\\\": \\\"+i.hoverLabelText(_,w)+\\\", \\\"+f[0].t.labels.kde+\\\" \\\"+C.toFixed(3),T.spikeDistance=m[0].spikeDistance;var O=y+\\\"Spike\\\";T[O]=m[0][O],m[0].spikeDistance=void 0,m[0][O]=void 0,v.push(T),(u={stroke:t.color})[y+\\\"1\\\"]=n.constrain(L+E[0],L,L+z),u[y+\\\"2\\\"]=n.constrain(L+E[1],L,L+z),u[x+\\\"1\\\"]=u[x+\\\"2\\\"]=_._offset+S}}}-1!==p.indexOf(\\\"points\\\")&&(c=a.hoverOnPoints(t,e,r));var I=l.selectAll(\\\".violinline-\\\"+h.uid).data(u?[0]:[]);return I.enter().append(\\\"line\\\").classed(\\\"violinline-\\\"+h.uid,!0).attr(\\\"stroke-width\\\",1.5),I.exit().remove(),I.attr(u),\\\"closest\\\"===s?c?[c]:v:c?(v.push(c),v):v}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../box/hover\\\":865,\\\"./helpers\\\":1149}],1151:[function(t,e,r){\\\"use strict\\\";e.exports={attributes:t(\\\"./attributes\\\"),layoutAttributes:t(\\\"./layout_attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),supplyLayoutDefaults:t(\\\"./layout_defaults\\\"),calc:t(\\\"./calc\\\"),crossTraceCalc:t(\\\"./cross_trace_calc\\\"),plot:t(\\\"./plot\\\"),style:t(\\\"./style\\\"),styleOnSelect:t(\\\"../scatter/style\\\").styleOnSelect,hoverPoints:t(\\\"./hover\\\"),selectPoints:t(\\\"../box/select\\\"),moduleType:\\\"trace\\\",name:\\\"violin\\\",basePlotModule:t(\\\"../../plots/cartesian\\\"),categories:[\\\"cartesian\\\",\\\"svg\\\",\\\"symbols\\\",\\\"oriented\\\",\\\"box-violin\\\",\\\"showLegend\\\",\\\"violinLayout\\\",\\\"zoomScale\\\"],meta:{}}},{\\\"../../plots/cartesian\\\":757,\\\"../box/select\\\":870,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1145,\\\"./calc\\\":1146,\\\"./cross_trace_calc\\\":1147,\\\"./defaults\\\":1148,\\\"./hover\\\":1150,\\\"./layout_attributes\\\":1152,\\\"./layout_defaults\\\":1153,\\\"./plot\\\":1154,\\\"./style\\\":1155}],1152:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../box/layout_attributes\\\"),i=t(\\\"../../lib\\\").extendFlat;e.exports={violinmode:i({},n.boxmode,{}),violingap:i({},n.boxgap,{}),violingroupgap:i({},n.boxgroupgap,{})}},{\\\"../../lib\\\":696,\\\"../box/layout_attributes\\\":867}],1153:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\"),a=t(\\\"../box/layout_defaults\\\");e.exports=function(t,e,r){a._supply(t,e,r,function(r,a){return n.coerce(t,e,i,r,a)},\\\"violin\\\")}},{\\\"../../lib\\\":696,\\\"../box/layout_defaults\\\":868,\\\"./layout_attributes\\\":1152}],1154:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"../box/plot\\\"),s=t(\\\"../scatter/line_points\\\"),l=t(\\\"./helpers\\\");e.exports=function(t,e,r,c){var u=t._fullLayout,f=e.xaxis,h=e.yaxis;function p(t){var e=s(t,{xaxis:f,yaxis:h,connectGaps:!0,baseTolerance:.75,shape:\\\"spline\\\",simplify:!0});return a.smoothopen(e[0],1)}i.makeTraceGroups(c,r,\\\"trace violins\\\").each(function(t){var r=n.select(this),a=t[0],s=a.t,c=a.trace;e.isRangePlot||(a.node3=r);var d=u._numViolins,g=\\\"group\\\"===u.violinmode&&d>1,v=1-u.violingap,m=s.bdPos=s.dPos*v*(1-u.violingroupgap)/(g?d:1),y=s.bPos=g?2*s.dPos*((s.num+.5)/d-.5)*v:0;if(s.wHover=s.dPos*(g?v/d:1),!0!==c.visible||s.empty)r.remove();else{var x=e[s.valLetter+\\\"axis\\\"],b=e[s.posLetter+\\\"axis\\\"],_=\\\"both\\\"===c.side,w=_||\\\"positive\\\"===c.side,k=_||\\\"negative\\\"===c.side,M=u._violinScaleGroupStats[c.scalegroup],A=r.selectAll(\\\"path.violin\\\").data(i.identity);A.enter().append(\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").attr(\\\"class\\\",\\\"violin\\\"),A.exit().remove(),A.each(function(t){var e,r,i,a,o,l,u,f,h=n.select(this),d=t.density,g=d.length,v=t.pos+y,A=b.c2p(v);switch(c.scalemode){case\\\"width\\\":e=M.maxWidth/m;break;case\\\"count\\\":e=M.maxWidth/m*(M.maxCount/t.pts.length)}if(w){for(u=new Array(g),o=0;o<g;o++)(f=u[o]={})[s.posLetter]=v+d[o].v/e,f[s.valLetter]=d[o].t;r=p(u)}if(k){for(u=new Array(g),l=0,o=g-1;l<g;l++,o--)(f=u[l]={})[s.posLetter]=v-d[o].v/e,f[s.valLetter]=d[o].t;i=p(u)}if(_)a=r+\\\"L\\\"+i.substr(1)+\\\"Z\\\";else{var T=[A,x.c2p(d[0].t)],S=[A,x.c2p(d[g-1].t)];\\\"h\\\"===c.orientation&&(T.reverse(),S.reverse()),a=w?\\\"M\\\"+T+\\\"L\\\"+r.substr(1)+\\\"L\\\"+S:\\\"M\\\"+S+\\\"L\\\"+i.substr(1)+\\\"L\\\"+T}h.attr(\\\"d\\\",a),t.posCenterPx=A,t.posDensityScale=e*m,t.path=h.node(),t.pathLength=t.path.getTotalLength()/(_?2:1)});var T,S,C,E=c.box,L=E.width,z=(E.line||{}).width;_?(T=m*L,S=0):w?(T=[0,m*L/2],S=-z):(T=[m*L/2,0],S=z),o.plotBoxAndWhiskers(r,{pos:b,val:x},c,{bPos:y,bdPos:T,bPosPxOffset:S}),o.plotBoxMean(r,{pos:b,val:x},c,{bPos:y,bdPos:T,bPosPxOffset:S}),!c.box.visible&&c.meanline.visible&&(C=i.identity);var O=r.selectAll(\\\"path.meanline\\\").data(C||[]);O.enter().append(\\\"path\\\").attr(\\\"class\\\",\\\"meanline\\\").style(\\\"fill\\\",\\\"none\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\"),O.exit().remove(),O.each(function(t){var e=x.c2p(t.mean,!0),r=l.getPositionOnKdePath(t,c,e);n.select(this).attr(\\\"d\\\",\\\"h\\\"===c.orientation?\\\"M\\\"+e+\\\",\\\"+r[0]+\\\"V\\\"+r[1]:\\\"M\\\"+r[0]+\\\",\\\"+e+\\\"H\\\"+r[1])}),o.plotPoints(r,{x:f,y:h},c,s)}})}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../box/plot\\\":869,\\\"../scatter/line_points\\\":1058,\\\"./helpers\\\":1149,d3:148}],1155:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../scatter/style\\\").stylePoints;e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.trace.violins\\\");r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),r.each(function(e){var r=e[0].trace,o=n.select(this),s=r.box||{},l=s.line||{},c=r.meanline||{},u=c.width;o.selectAll(\\\"path.violin\\\").style(\\\"stroke-width\\\",r.line.width+\\\"px\\\").call(i.stroke,r.line.color).call(i.fill,r.fillcolor),o.selectAll(\\\"path.box\\\").style(\\\"stroke-width\\\",l.width+\\\"px\\\").call(i.stroke,l.color).call(i.fill,s.fillcolor);var f={\\\"stroke-width\\\":u+\\\"px\\\",\\\"stroke-dasharray\\\":2*u+\\\"px,\\\"+u+\\\"px\\\"};o.selectAll(\\\"path.mean\\\").style(f).call(i.stroke,c.color),o.selectAll(\\\"path.meanline\\\").style(f).call(i.stroke,c.color),a(o,r,t)})}},{\\\"../../components/color\\\":570,\\\"../scatter/style\\\":1067,d3:148}],1156:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../plots/cartesian/axes\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../plot_api/plot_schema\\\"),o=t(\\\"./helpers\\\").pointsAccessorFunction,s=t(\\\"../constants/numerical\\\").BADNUM;r.moduleType=\\\"transform\\\",r.name=\\\"aggregate\\\";var l=r.attributes={enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},groups:{valType:\\\"string\\\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\\\"x\\\",editType:\\\"calc\\\"},aggregations:{_isLinkedToArray:\\\"aggregation\\\",target:{valType:\\\"string\\\",editType:\\\"calc\\\"},func:{valType:\\\"enumerated\\\",values:[\\\"count\\\",\\\"sum\\\",\\\"avg\\\",\\\"median\\\",\\\"mode\\\",\\\"rms\\\",\\\"stddev\\\",\\\"min\\\",\\\"max\\\",\\\"first\\\",\\\"last\\\",\\\"change\\\",\\\"range\\\"],dflt:\\\"first\\\",editType:\\\"calc\\\"},funcmode:{valType:\\\"enumerated\\\",values:[\\\"sample\\\",\\\"population\\\"],dflt:\\\"sample\\\",editType:\\\"calc\\\"},enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},editType:\\\"calc\\\"},editType:\\\"calc\\\"},c=l.aggregations;function u(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,i=e.c2d;switch(r){case\\\"count\\\":return f;case\\\"first\\\":return h;case\\\"last\\\":return p;case\\\"sum\\\":return function(t,e){for(var r=0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==s&&(r+=o)}return i(r)};case\\\"avg\\\":return function(t,e){for(var r=0,a=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l,a++)}return a?i(r/a):s};case\\\"min\\\":return function(t,e){for(var r=1/0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==s&&(r=Math.min(r,o))}return r===1/0?s:i(r)};case\\\"max\\\":return function(t,e){for(var r=-1/0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==s&&(r=Math.max(r,o))}return r===-1/0?s:i(r)};case\\\"range\\\":return function(t,e){for(var r=1/0,a=-1/0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r=Math.min(r,l),a=Math.max(a,l))}return a===-1/0||r===1/0?s:i(a-r)};case\\\"change\\\":return function(t,e){var r=n(t[e[0]]),a=n(t[e[e.length-1]]);return r===s||a===s?s:i(a-r)};case\\\"median\\\":return function(t,e){for(var r=[],a=0;a<e.length;a++){var o=n(t[e[a]]);o!==s&&r.push(o)}if(!r.length)return s;r.sort();var l=(r.length-1)/2;return i((r[Math.floor(l)]+r[Math.ceil(l)])/2)};case\\\"mode\\\":return function(t,e){for(var r={},a=0,o=s,l=0;l<e.length;l++){var c=n(t[e[l]]);if(c!==s){var u=r[c]=(r[c]||0)+1;u>a&&(a=u,o=c)}}return a?i(o):s};case\\\"rms\\\":return function(t,e){for(var r=0,a=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l*l,a++)}return a?i(Math.sqrt(r/a)):s};case\\\"stddev\\\":return function(e,r){var i,a=0,o=0,l=1,c=s;for(i=0;i<r.length&&c===s;i++)c=n(e[r[i]]);if(c===s)return s;for(;i<r.length;i++){var u=n(e[r[i]]);if(u!==s){var f=u-c;a+=f,o+=f*f,l++}}var h=\\\"sample\\\"===t.funcmode?l-1:l;return h?Math.sqrt((o-a*a/l)/h):0}}}(a,n.getDataConversions(t,e,o,c)),d=new Array(r.length),g=0;g<r.length;g++)d[g]=u(c,r[g]);l.set(d),\\\"count\\\"===a.func&&i.pushUnique(e._arrayAttrs,o)}}function f(t,e){return e.length}function h(t,e){return t[e[0]]}function p(t,e){return t[e[e.length-1]]}r.supplyDefaults=function(t,e){var r,n={};function o(e,r){return i.coerce(t,n,l,e,r)}if(!o(\\\"enabled\\\"))return n;var s=a.findArrayAttributes(e),u={};for(r=0;r<s.length;r++)u[s[r]]=1;var f=o(\\\"groups\\\");if(!Array.isArray(f)){if(!u[f])return n.enabled=!1,n;u[f]=0}var h,p=t.aggregations||[],d=n.aggregations=new Array(p.length);function g(t,e){return i.coerce(p[r],h,c,t,e)}for(r=0;r<p.length;r++){h={_index:r};var v=g(\\\"target\\\"),m=g(\\\"func\\\");g(\\\"enabled\\\")&&v&&(u[v]||\\\"count\\\"===m&&void 0===u[v])?(\\\"stddev\\\"===m&&g(\\\"funcmode\\\"),u[v]=0,d[r]=h):d[r]={enabled:!1,_index:r}}for(r=0;r<s.length;r++)u[s[r]]&&d.push({target:s[r],func:c.func.dflt,enabled:!0,_index:-1});return n},r.calcTransform=function(t,e,r){if(r.enabled){var n=r.groups,a=i.getTargetArray(e,{target:n});if(a){var s,l,c,f,h={},p={},d=[],g=o(e.transforms,r),v=a.length;for(e._length&&(v=Math.min(v,e._length)),s=0;s<v;s++)void 0===(c=h[l=a[s]])?(h[l]=d.length,f=[s],d.push(f),p[h[l]]=g(s)):(d[c].push(s),p[h[l]]=(p[h[l]]||[]).concat(g(s)));r._indexToPoints=p;var m=r.aggregations;for(s=0;s<m.length;s++)u(t,e,d,m[s]);\\\"string\\\"==typeof n&&u(t,e,d,{target:n,func:\\\"first\\\",enabled:!0}),e._length=d.length}}}},{\\\"../constants/numerical\\\":673,\\\"../lib\\\":696,\\\"../plot_api/plot_schema\\\":734,\\\"../plots/cartesian/axes\\\":745,\\\"./helpers\\\":1159}],1157:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../registry\\\"),a=t(\\\"../plots/cartesian/axes\\\"),o=t(\\\"./helpers\\\").pointsAccessorFunction,s=t(\\\"../constants/filter_ops\\\"),l=s.COMPARISON_OPS,c=s.INTERVAL_OPS,u=s.SET_OPS;r.moduleType=\\\"transform\\\",r.name=\\\"filter\\\",r.attributes={enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},target:{valType:\\\"string\\\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\\\"x\\\",editType:\\\"calc\\\"},operation:{valType:\\\"enumerated\\\",values:[].concat(l).concat(c).concat(u),dflt:\\\"=\\\",editType:\\\"calc\\\"},value:{valType:\\\"any\\\",dflt:0,editType:\\\"calc\\\"},preservegaps:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},editType:\\\"calc\\\"},r.supplyDefaults=function(t){var e={};function a(i,a){return n.coerce(t,e,r.attributes,i,a)}if(a(\\\"enabled\\\")){a(\\\"preservegaps\\\"),a(\\\"operation\\\"),a(\\\"value\\\"),a(\\\"target\\\");var o=i.getComponentMethod(\\\"calendars\\\",\\\"handleDefaults\\\");o(t,e,\\\"valuecalendar\\\",null),o(t,e,\\\"targetcalendar\\\",null)}return e},r.calcTransform=function(t,e,r){if(r.enabled){var i=n.getTargetArray(e,r);if(i){var s=r.target,f=i.length;e._length&&(f=Math.min(f,e._length));var h=r.targetcalendar,p=e._arrayAttrs,d=r.preservegaps;if(\\\"string\\\"==typeof s){var g=n.nestedProperty(e,s+\\\"calendar\\\").get();g&&(h=g)}var v,m,y=function(t,e,r){var n=t.operation,i=t.value,a=Array.isArray(i);function o(t){return-1!==t.indexOf(n)}var s,f=function(r){return e(r,0,t.valuecalendar)},h=function(t){return e(t,0,r)};o(l)?s=f(a?i[0]:i):o(c)?s=a?[f(i[0]),f(i[1])]:[f(i),f(i)]:o(u)&&(s=a?i.map(f):[f(i)]);switch(n){case\\\"=\\\":return function(t){return h(t)===s};case\\\"!=\\\":return function(t){return h(t)!==s};case\\\"<\\\":return function(t){return h(t)<s};case\\\"<=\\\":return function(t){return h(t)<=s};case\\\">\\\":return function(t){return h(t)>s};case\\\">=\\\":return function(t){return h(t)>=s};case\\\"[]\\\":return function(t){var e=h(t);return e>=s[0]&&e<=s[1]};case\\\"()\\\":return function(t){var e=h(t);return e>s[0]&&e<s[1]};case\\\"[)\\\":return function(t){var e=h(t);return e>=s[0]&&e<s[1]};case\\\"(]\\\":return function(t){var e=h(t);return e>s[0]&&e<=s[1]};case\\\"][\\\":return function(t){var e=h(t);return e<=s[0]||e>=s[1]};case\\\")(\\\":return function(t){var e=h(t);return e<s[0]||e>s[1]};case\\\"](\\\":return function(t){var e=h(t);return e<=s[0]||e>s[1]};case\\\")[\\\":return function(t){var e=h(t);return e<s[0]||e>=s[1]};case\\\"{}\\\":return function(t){return-1!==s.indexOf(h(t))};case\\\"}{\\\":return function(t){return-1===s.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),h),x={},b={},_=0;d?(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),M(v);for(var w=o(e.transforms,r),k=0;k<f;k++){y(i[k])?(M(m,k),b[_++]=w(k)):d&&_++}r._indexToPoints=b,e._length=_}}function M(t,r){for(var i=0;i<p.length;i++){t(n.nestedProperty(e,p[i]),r)}}}},{\\\"../constants/filter_ops\\\":669,\\\"../lib\\\":696,\\\"../plots/cartesian/axes\\\":745,\\\"../registry\\\":828,\\\"./helpers\\\":1159}],1158:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plot_api/plot_schema\\\"),a=t(\\\"../plots/plots\\\"),o=t(\\\"./helpers\\\").pointsAccessorFunction;function s(t,e){var r,s,c,u,f,h,p,d,g,v,m=e.transform,y=e.transformIndex,x=t.transforms[y].groups,b=o(t.transforms,m);if(!Array.isArray(x)||0===x.length)return[t];var _=n.filterUnique(x),w=new Array(_.length),k=x.length,M=i.findArrayAttributes(t),A=m.styles||[],T={};for(r=0;r<A.length;r++)T[A[r].target]=A[r].value;m.styles&&(v=n.keyedContainer(m,\\\"styles\\\",\\\"target\\\",\\\"value.name\\\"));var S={},C={};for(r=0;r<_.length;r++){S[h=_[r]]=r,C[h]=0,(p=w[r]=n.extendDeepNoArrays({},t))._group=h,p.updateStyle=l(h,y),p.transforms[y]._indexToPoints={};var E=null;for(v&&(E=v.get(h)),p.name=E||\\\"\\\"===E?E:n.templateString(m.nameformat,{trace:t.name,group:h}),d=p.transforms,p.transforms=[],s=0;s<d.length;s++)p.transforms[s]=n.extendDeepNoArrays({},d[s]);for(s=0;s<M.length;s++)n.nestedProperty(p,M[s]).set([])}for(c=0;c<M.length;c++){for(u=M[c],s=0,g=[];s<_.length;s++)g[s]=n.nestedProperty(w[s],u).get();for(f=n.nestedProperty(t,u).get(),s=0;s<k;s++)g[S[x[s]]].push(f[s])}for(s=0;s<k;s++){(p=w[S[x[s]]]).transforms[y]._indexToPoints[C[x[s]]]=b(s),C[x[s]]++}for(r=0;r<_.length;r++)h=_[r],p=w[r],a.clearExpandedTraceDefaultColors(p),p=n.extendDeepNoArrays(p,T[h]||{});return w}function l(t,e){return function(r,i,a){n.keyedContainer(r,\\\"transforms[\\\"+e+\\\"].styles\\\",\\\"target\\\",\\\"value.\\\"+i).set(String(t),a)}}r.moduleType=\\\"transform\\\",r.name=\\\"groupby\\\",r.attributes={enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},groups:{valType:\\\"data_array\\\",dflt:[],editType:\\\"calc\\\"},nameformat:{valType:\\\"string\\\",editType:\\\"calc\\\"},styles:{_isLinkedToArray:\\\"style\\\",target:{valType:\\\"string\\\",editType:\\\"calc\\\"},value:{valType:\\\"any\\\",dflt:{},editType:\\\"calc\\\",_compareAsJSON:!0},editType:\\\"calc\\\"},editType:\\\"calc\\\"},r.supplyDefaults=function(t,e,i){var a,o={};function s(e,i){return n.coerce(t,o,r.attributes,e,i)}if(!s(\\\"enabled\\\"))return o;s(\\\"groups\\\"),s(\\\"nameformat\\\",i._dataLength>1?\\\"%{group} (%{trace})\\\":\\\"%{group}\\\");var l=t.styles,c=o.styles=[];if(l)for(a=0;a<l.length;a++){var u=c[a]={};n.coerce(l[a],c[a],r.attributes.styles,\\\"target\\\");var f=n.coerce(l[a],c[a],r.attributes.styles,\\\"value\\\");n.isPlainObject(f)?u.value=n.extendDeep({},f):f&&delete u.value}return o},r.transform=function(t,e){var r,n,i,a=[];for(n=0;n<t.length;n++)for(r=s(t[n],e),i=0;i<r.length;i++)a.push(r[i]);return a}},{\\\"../lib\\\":696,\\\"../plot_api/plot_schema\\\":734,\\\"../plots/plots\\\":809,\\\"./helpers\\\":1159}],1159:[function(t,e,r){\\\"use strict\\\";r.pointsAccessorFunction=function(t,e){for(var r,n,i=0;i<t.length&&(r=t[i])!==e;i++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);return n?function(t){return n[t]}:function(t){return[t]}}},{}],1160:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plots/cartesian/axes\\\"),a=t(\\\"./helpers\\\").pointsAccessorFunction;r.moduleType=\\\"transform\\\",r.name=\\\"sort\\\",r.attributes={enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},target:{valType:\\\"string\\\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\\\"x\\\",editType:\\\"calc\\\"},order:{valType:\\\"enumerated\\\",values:[\\\"ascending\\\",\\\"descending\\\"],dflt:\\\"ascending\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"},r.supplyDefaults=function(t){var e={};function i(i,a){return n.coerce(t,e,r.attributes,i,a)}return i(\\\"enabled\\\")&&(i(\\\"target\\\"),i(\\\"order\\\")),e},r.calcTransform=function(t,e,r){if(r.enabled){var o=n.getTargetArray(e,r);if(o){var s=r.target,l=o.length;e._length&&(l=Math.min(l,e._length));var c,u,f=e._arrayAttrs,h=function(t,e,r,n){var i,a=new Array(n),o=new Array(n);for(i=0;i<n;i++)a[i]={v:e[i],i:i};for(a.sort(function(t,e){switch(t.order){case\\\"ascending\\\":return function(t,r){return e(t.v)-e(r.v)};case\\\"descending\\\":return function(t,r){return e(r.v)-e(t.v)}}}(t,r)),i=0;i<n;i++)o[i]=a[i].i;return o}(r,o,i.getDataToCoordFunc(t,e,s,o),l),p=a(e.transforms,r),d={};for(c=0;c<f.length;c++){var g=n.nestedProperty(e,f[c]),v=g.get(),m=new Array(l);for(u=0;u<l;u++)m[u]=v[h[u]];g.set(m)}for(u=0;u<l;u++)d[u]=p(h[u]);r._indexToPoints=d,e._length=l}}}},{\\\"../lib\\\":696,\\\"../plots/cartesian/axes\\\":745,\\\"./helpers\\\":1159}]},{},[22])(22)});});require(['plotly'], function(Plotly) {window._Plotly = Plotly;});}</script>\"\n      ],\n      \"text/vnd.plotly.v1+html\": [\n       \"<script type=\\\"text/javascript\\\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script><script type=\\\"text/javascript\\\">if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \\\"STIX-Web\\\"}});}</script><script type='text/javascript'>if(!window._Plotly){define('plotly', function(require, exports, module) {/**\\n\",\n       \"* plotly.js v1.42.2\\n\",\n       \"* Copyright 2012-2018, Plotly, Inc.\\n\",\n       \"* All rights reserved.\\n\",\n       \"* Licensed under the MIT license\\n\",\n       \"*/\\n\",\n       \"!function(t){if(\\\"object\\\"==typeof exports&&\\\"undefined\\\"!=typeof module)module.exports=t();else if(\\\"function\\\"==typeof define&&define.amd)define([],t);else{(\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:this).Plotly=t()}}(function(){return function(){return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l=\\\"function\\\"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error(\\\"Cannot find module '\\\"+o+\\\"'\\\");throw c.code=\\\"MODULE_NOT_FOUND\\\",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){return i(e[o][1][t]||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var a=\\\"function\\\"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}}()({1:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../src/lib\\\"),i={\\\"X,X div\\\":\\\"direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;\\\",\\\"X input,X button\\\":\\\"font-family:'Open Sans', verdana, arial, sans-serif;\\\",\\\"X input:focus,X button:focus\\\":\\\"outline:none;\\\",\\\"X a\\\":\\\"text-decoration:none;\\\",\\\"X a:hover\\\":\\\"text-decoration:none;\\\",\\\"X .crisp\\\":\\\"shape-rendering:crispEdges;\\\",\\\"X .user-select-none\\\":\\\"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\\\",\\\"X svg\\\":\\\"overflow:hidden;\\\",\\\"X svg a\\\":\\\"fill:#447adb;\\\",\\\"X svg a:hover\\\":\\\"fill:#3c6dc5;\\\",\\\"X .main-svg\\\":\\\"position:absolute;top:0;left:0;pointer-events:none;\\\",\\\"X .main-svg .draglayer\\\":\\\"pointer-events:all;\\\",\\\"X .cursor-default\\\":\\\"cursor:default;\\\",\\\"X .cursor-pointer\\\":\\\"cursor:pointer;\\\",\\\"X .cursor-crosshair\\\":\\\"cursor:crosshair;\\\",\\\"X .cursor-move\\\":\\\"cursor:move;\\\",\\\"X .cursor-col-resize\\\":\\\"cursor:col-resize;\\\",\\\"X .cursor-row-resize\\\":\\\"cursor:row-resize;\\\",\\\"X .cursor-ns-resize\\\":\\\"cursor:ns-resize;\\\",\\\"X .cursor-ew-resize\\\":\\\"cursor:ew-resize;\\\",\\\"X .cursor-sw-resize\\\":\\\"cursor:sw-resize;\\\",\\\"X .cursor-s-resize\\\":\\\"cursor:s-resize;\\\",\\\"X .cursor-se-resize\\\":\\\"cursor:se-resize;\\\",\\\"X .cursor-w-resize\\\":\\\"cursor:w-resize;\\\",\\\"X .cursor-e-resize\\\":\\\"cursor:e-resize;\\\",\\\"X .cursor-nw-resize\\\":\\\"cursor:nw-resize;\\\",\\\"X .cursor-n-resize\\\":\\\"cursor:n-resize;\\\",\\\"X .cursor-ne-resize\\\":\\\"cursor:ne-resize;\\\",\\\"X .cursor-grab\\\":\\\"cursor:-webkit-grab;cursor:grab;\\\",\\\"X .modebar\\\":\\\"position:absolute;top:2px;right:2px;z-index:1001;\\\",\\\"X .modebar--hover\\\":\\\"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;\\\",\\\"X:hover .modebar--hover\\\":\\\"opacity:1;\\\",\\\"X .modebar-group\\\":\\\"float:left;display:inline-block;box-sizing:border-box;margin-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\\\",\\\"X .modebar-btn\\\":\\\"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;\\\",\\\"X .modebar-btn svg\\\":\\\"position:relative;top:2px;\\\",\\\"X .modebar.vertical\\\":\\\"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;\\\",\\\"X .modebar.vertical svg\\\":\\\"top:-1px;\\\",\\\"X .modebar.vertical .modebar-group\\\":\\\"display:block;float:none;margin-left:0px;margin-bottom:8px;\\\",\\\"X .modebar.vertical .modebar-group .modebar-btn\\\":\\\"display:block;text-align:center;\\\",\\\"X [data-title]:before,X [data-title]:after\\\":\\\"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;\\\",\\\"X [data-title]:hover:before,X [data-title]:hover:after\\\":\\\"display:block;opacity:1;\\\",\\\"X [data-title]:before\\\":\\\"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;\\\",\\\"X [data-title]:after\\\":\\\"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;\\\",\\\"X .vertical [data-title]:before,X .vertical [data-title]:after\\\":\\\"top:0%;right:200%;\\\",\\\"X .vertical [data-title]:before\\\":\\\"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;\\\",\\\"X .select-outline\\\":\\\"fill:none;stroke-width:1;shape-rendering:crispEdges;\\\",\\\"X .select-outline-1\\\":\\\"stroke:white;\\\",\\\"X .select-outline-2\\\":\\\"stroke:black;stroke-dasharray:2px 2px;\\\",Y:\\\"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;\\\",\\\"Y p\\\":\\\"margin:0;\\\",\\\"Y .notifier-note\\\":\\\"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;\\\",\\\"Y .notifier-close\\\":\\\"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;\\\",\\\"Y .notifier-close:hover\\\":\\\"color:#444;text-decoration:none;cursor:pointer;\\\"};for(var a in i){var o=a.replace(/^,/,\\\" ,\\\").replace(/X/g,\\\".js-plotly-plot .plotly\\\").replace(/Y/g,\\\".plotly-notifier\\\");n.addStyleRule(o,i[a])}},{\\\"../src/lib\\\":696}],2:[function(t,e,r){\\\"use strict\\\";e.exports={undo:{width:857.1,height:1e3,path:\\\"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},home:{width:928.6,height:1e3,path:\\\"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},\\\"camera-retro\\\":{width:1e3,height:1e3,path:\\\"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},zoombox:{width:1e3,height:1e3,path:\\\"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},pan:{width:1e3,height:1e3,path:\\\"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},zoom_plus:{width:875,height:1e3,path:\\\"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},zoom_minus:{width:875,height:1e3,path:\\\"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},autoscale:{width:1e3,height:1e3,path:\\\"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},tooltip_basic:{width:1500,height:1e3,path:\\\"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},tooltip_compare:{width:1125,height:1e3,path:\\\"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},plotlylogo:{width:1542,height:1e3,path:\\\"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},\\\"z-axis\\\":{width:1e3,height:1e3,path:\\\"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},\\\"3d_rotate\\\":{width:1e3,height:1e3,path:\\\"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},camera:{width:1e3,height:1e3,path:\\\"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},movie:{width:1e3,height:1e3,path:\\\"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},question:{width:857.1,height:1e3,path:\\\"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},disk:{width:857.1,height:1e3,path:\\\"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},lasso:{width:1031,height:1e3,path:\\\"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},selectbox:{width:1e3,height:1e3,path:\\\"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z\\\",transform:\\\"matrix(1 0 0 -1 0 850)\\\"},spikeline:{width:1e3,height:1e3,path:\\\"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z\\\",transform:\\\"matrix(1.5 0 0 -1.5 0 850)\\\"},newplotlylogo:{name:\\\"newplotlylogo\\\",svg:\\\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'><defs><style>.cls-1 {fill: #119dff;} .cls-2 {fill: #25fefd;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id='symbol'><rect class='cls-1' width='132' height='132' rx='6' ry='6'/><circle class='cls-2' cx='78' cy='54' r='6'/><circle class='cls-2' cx='102' cy='30' r='6'/><circle class='cls-2' cx='78' cy='30' r='6'/><circle class='cls-2' cx='54' cy='30' r='6'/><circle class='cls-2' cx='30' cy='30' r='6'/><circle class='cls-2' cx='30' cy='54' r='6'/><path class='cls-3' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/><path class='cls-3' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/><path class='cls-3' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/><path class='cls-3' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/></g></svg>\\\"}}},{}],3:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/transforms/aggregate\\\")},{\\\"../src/transforms/aggregate\\\":1156}],4:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/bar\\\")},{\\\"../src/traces/bar\\\":844}],5:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/barpolar\\\")},{\\\"../src/traces/barpolar\\\":856}],6:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/box\\\")},{\\\"../src/traces/box\\\":866}],7:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/components/calendars\\\")},{\\\"../src/components/calendars\\\":568}],8:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/candlestick\\\")},{\\\"../src/traces/candlestick\\\":875}],9:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/carpet\\\")},{\\\"../src/traces/carpet\\\":894}],10:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/choropleth\\\")},{\\\"../src/traces/choropleth\\\":908}],11:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/cone\\\")},{\\\"../src/traces/cone\\\":916}],12:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/contour\\\")},{\\\"../src/traces/contour\\\":931}],13:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/contourcarpet\\\")},{\\\"../src/traces/contourcarpet\\\":942}],14:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/core\\\")},{\\\"../src/core\\\":675}],15:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/transforms/filter\\\")},{\\\"../src/transforms/filter\\\":1157}],16:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/transforms/groupby\\\")},{\\\"../src/transforms/groupby\\\":1158}],17:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/heatmap\\\")},{\\\"../src/traces/heatmap\\\":954}],18:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/heatmapgl\\\")},{\\\"../src/traces/heatmapgl\\\":964}],19:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/histogram\\\")},{\\\"../src/traces/histogram\\\":975}],20:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/histogram2d\\\")},{\\\"../src/traces/histogram2d\\\":982}],21:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/histogram2dcontour\\\")},{\\\"../src/traces/histogram2dcontour\\\":986}],22:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./core\\\");n.register([t(\\\"./bar\\\"),t(\\\"./box\\\"),t(\\\"./heatmap\\\"),t(\\\"./histogram\\\"),t(\\\"./histogram2d\\\"),t(\\\"./histogram2dcontour\\\"),t(\\\"./pie\\\"),t(\\\"./contour\\\"),t(\\\"./scatterternary\\\"),t(\\\"./violin\\\"),t(\\\"./scatter3d\\\"),t(\\\"./surface\\\"),t(\\\"./mesh3d\\\"),t(\\\"./cone\\\"),t(\\\"./streamtube\\\"),t(\\\"./scattergeo\\\"),t(\\\"./choropleth\\\"),t(\\\"./scattergl\\\"),t(\\\"./splom\\\"),t(\\\"./pointcloud\\\"),t(\\\"./heatmapgl\\\"),t(\\\"./parcoords\\\"),t(\\\"./parcats\\\"),t(\\\"./scattermapbox\\\"),t(\\\"./sankey\\\"),t(\\\"./table\\\"),t(\\\"./carpet\\\"),t(\\\"./scattercarpet\\\"),t(\\\"./contourcarpet\\\"),t(\\\"./ohlc\\\"),t(\\\"./candlestick\\\"),t(\\\"./scatterpolar\\\"),t(\\\"./scatterpolargl\\\"),t(\\\"./barpolar\\\")]),n.register([t(\\\"./aggregate\\\"),t(\\\"./filter\\\"),t(\\\"./groupby\\\"),t(\\\"./sort\\\")]),n.register([t(\\\"./calendars\\\")]),e.exports=n},{\\\"./aggregate\\\":3,\\\"./bar\\\":4,\\\"./barpolar\\\":5,\\\"./box\\\":6,\\\"./calendars\\\":7,\\\"./candlestick\\\":8,\\\"./carpet\\\":9,\\\"./choropleth\\\":10,\\\"./cone\\\":11,\\\"./contour\\\":12,\\\"./contourcarpet\\\":13,\\\"./core\\\":14,\\\"./filter\\\":15,\\\"./groupby\\\":16,\\\"./heatmap\\\":17,\\\"./heatmapgl\\\":18,\\\"./histogram\\\":19,\\\"./histogram2d\\\":20,\\\"./histogram2dcontour\\\":21,\\\"./mesh3d\\\":23,\\\"./ohlc\\\":24,\\\"./parcats\\\":25,\\\"./parcoords\\\":26,\\\"./pie\\\":27,\\\"./pointcloud\\\":28,\\\"./sankey\\\":29,\\\"./scatter3d\\\":30,\\\"./scattercarpet\\\":31,\\\"./scattergeo\\\":32,\\\"./scattergl\\\":33,\\\"./scattermapbox\\\":34,\\\"./scatterpolar\\\":35,\\\"./scatterpolargl\\\":36,\\\"./scatterternary\\\":37,\\\"./sort\\\":38,\\\"./splom\\\":39,\\\"./streamtube\\\":40,\\\"./surface\\\":41,\\\"./table\\\":42,\\\"./violin\\\":43}],23:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/mesh3d\\\")},{\\\"../src/traces/mesh3d\\\":991}],24:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/ohlc\\\")},{\\\"../src/traces/ohlc\\\":996}],25:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/parcats\\\")},{\\\"../src/traces/parcats\\\":1005}],26:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/parcoords\\\")},{\\\"../src/traces/parcoords\\\":1014}],27:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/pie\\\")},{\\\"../src/traces/pie\\\":1025}],28:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/pointcloud\\\")},{\\\"../src/traces/pointcloud\\\":1034}],29:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/sankey\\\")},{\\\"../src/traces/sankey\\\":1040}],30:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scatter3d\\\")},{\\\"../src/traces/scatter3d\\\":1076}],31:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scattercarpet\\\")},{\\\"../src/traces/scattercarpet\\\":1082}],32:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scattergeo\\\")},{\\\"../src/traces/scattergeo\\\":1089}],33:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scattergl\\\")},{\\\"../src/traces/scattergl\\\":1097}],34:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scattermapbox\\\")},{\\\"../src/traces/scattermapbox\\\":1103}],35:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scatterpolar\\\")},{\\\"../src/traces/scatterpolar\\\":1110}],36:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scatterpolargl\\\")},{\\\"../src/traces/scatterpolargl\\\":1114}],37:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/scatterternary\\\")},{\\\"../src/traces/scatterternary\\\":1120}],38:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/transforms/sort\\\")},{\\\"../src/transforms/sort\\\":1160}],39:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/splom\\\")},{\\\"../src/traces/splom\\\":1125}],40:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/streamtube\\\")},{\\\"../src/traces/streamtube\\\":1130}],41:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/surface\\\")},{\\\"../src/traces/surface\\\":1135}],42:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/table\\\")},{\\\"../src/traces/table\\\":1143}],43:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"../src/traces/violin\\\")},{\\\"../src/traces/violin\\\":1151}],44:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){t=t||document.body,e=e||{};var r=[.01,1/0];\\\"distanceLimits\\\"in e&&(r[0]=e.distanceLimits[0],r[1]=e.distanceLimits[1]);\\\"zoomMin\\\"in e&&(r[0]=e.zoomMin);\\\"zoomMax\\\"in e&&(r[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||\\\"orbit\\\",distanceLimits:r}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,p=t.clientHeight,d={view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay;c.idle(e-r),c.flush(e-(100+2*r));var i=e-2*r;c.recalcMatrix(i);for(var a=!0,o=c.computedMatrix,s=0;s<16;++s)a=a&&u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===p;return h=t.clientWidth,p=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(d,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){return c.setMode(t),c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(r)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(\\\"contextmenu\\\",function(t){return t.preventDefault(),!1});var g=0,v=0,m={shift:!1,control:!1,alt:!1,meta:!1};function y(e,r,i,a){var o=1/t.clientHeight,s=o*(r-g),l=o*(i-v),u=d.flipX?1:-1,h=d.flipY?1:-1,p=Math.PI*d.rotateSpeed,y=n();if(1&e)a.shift?c.rotate(y,0,0,-s*p):c.rotate(y,u*p*s,-h*p*l,0);else if(2&e)c.pan(y,-d.translateSpeed*s*f,d.translateSpeed*l*f,0);else if(4&e){var x=d.zoomSpeed*l/window.innerHeight*(y-c.lastT())*50;c.pan(y,0,0,f*(Math.exp(x)-1))}g=r,v=i,m=a}return a(t,y),t.addEventListener(\\\"touchstart\\\",function(e){var r=s(e.changedTouches[0],t);y(0,r[0],r[1],m),y(1,r[0],r[1],m),e.preventDefault()},!!l&&{passive:!1}),t.addEventListener(\\\"touchmove\\\",function(e){var r=s(e.changedTouches[0],t);y(1,r[0],r[1],m),e.preventDefault()},!!l&&{passive:!1}),t.addEventListener(\\\"touchend\\\",function(e){s(e.changedTouches[0],t),y(0,g,v,m),e.preventDefault()},!!l&&{passive:!1}),o(t,function(t,e,r){var i=d.flipX?1:-1,a=d.flipY?1:-1,o=n();if(Math.abs(t)>Math.abs(e))c.rotate(o,0,0,-t*i*Math.PI*d.rotateSpeed/window.innerWidth);else{var s=d.zoomSpeed*a*e/window.innerHeight*(o-c.lastT())/100;c.pan(o,0,0,f*(Math.exp(s)-1))}},!0),d};var n=t(\\\"right-now\\\"),i=t(\\\"3d-view\\\"),a=t(\\\"mouse-change\\\"),o=t(\\\"mouse-wheel\\\"),s=t(\\\"mouse-event-offset\\\"),l=t(\\\"has-passive-events\\\")},{\\\"3d-view\\\":45,\\\"has-passive-events\\\":394,\\\"mouse-change\\\":418,\\\"mouse-event-offset\\\":419,\\\"mouse-wheel\\\":421,\\\"right-now\\\":480}],45:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||\\\"turntable\\\",u=n(),f=i(),h=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new o({turntable:u,orbit:f,matrix:h},c)};var n=t(\\\"turntable-camera-controller\\\"),i=t(\\\"orbit-camera-controller\\\"),a=t(\\\"matrix-camera-controller\\\");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode=\\\"turntable\\\",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[[\\\"flush\\\",1],[\\\"idle\\\",1],[\\\"lookAt\\\",4],[\\\"rotate\\\",4],[\\\"pan\\\",4],[\\\"translate\\\",4],[\\\"setMatrix\\\",2],[\\\"setDistanceLimits\\\",2],[\\\"setDistance\\\",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n<t[1];++n)r.push(\\\"a\\\"+n);var i=\\\"var cc=this._controllerList;for(var i=0;i<cc.length;++i){cc[i].\\\"+t[0]+\\\"(\\\"+r.join()+\\\")}\\\";s[e]=Function.apply(null,r.concat(i))}),s.recalcMatrix=function(t){this._active.recalcMatrix(t)},s.getDistance=function(t){return this._active.getDistance(t)},s.getDistanceLimits=function(t){return this._active.getDistanceLimits(t)},s.lastT=function(){return this._active.lastT()},s.setMode=function(t){if(t!==this._mode){var e=this._controllerNames.indexOf(t);if(!(e<0)){var r=this._active,n=this._controllerList[e],i=Math.max(r.lastT(),n.lastT());r.recalcMatrix(i),n.setMatrix(i,r.computedMatrix),this._active=n,this._mode=t,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode}},{\\\"matrix-camera-controller\\\":416,\\\"orbit-camera-controller\\\":439,\\\"turntable-camera-controller\\\":519}],46:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n){\\\"use strict\\\";t.sankey=function(){var t={},i=24,a=8,o=[1,1],s=[],l=[],c=2/3;function u(){function t(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function e(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}s.forEach(function(r){r.sourceLinks.sort(e),r.targetLinks.sort(t)}),s.forEach(function(t){var e=0,r=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=r,r+=t.dy})})}function f(t){return t.y+t.dy/2}function h(t){return t.value}return t.nodeWidth=function(e){return arguments.length?(i=+e,t):i},t.nodePadding=function(e){return arguments.length?(a=+e,t):a},t.nodes=function(e){return arguments.length?(s=e,t):s},t.links=function(e){return arguments.length?(l=e,t):l},t.size=function(e){return arguments.length?(o=e,t):o},t.layout=function(n){return s.forEach(function(t){t.sourceLinks=[],t.targetLinks=[]}),l.forEach(function(t,e){var r=t.source,n=t.target;\\\"number\\\"==typeof r&&(r=t.source=s[t.source]),\\\"number\\\"==typeof n&&(n=t.target=s[t.target]),t.originalIndex=e,r.sourceLinks.push(t),n.targetLinks.push(t)}),s.forEach(function(t){t.value=Math.max(e.sum(t.sourceLinks,h),e.sum(t.targetLinks,h))}),function(){for(var t,e,r=s,n=0;r.length;)t=[],r.forEach(function(e){e.x=n,e.dx=i,e.sourceLinks.forEach(function(e){t.indexOf(e.target)<0&&t.push(e.target)})}),r=t,++n;(function(t){s.forEach(function(e){e.sourceLinks.length||(e.x=t-1)})})(n),e=(o[0]-i)/(n-1),s.forEach(function(t){t.x*=e})}(),function(t){var n=r.nest().key(function(t){return t.x}).sortKeys(e.ascending).entries(s).map(function(t){return t.values});(function(){var t=e.max(n,function(t){return t.length}),r=c*o[1]/(t-1);a>r&&(a=r);var i=e.min(n,function(t){return(o[1]-(t.length-1)*a)/e.sum(t,h)});n.forEach(function(t){t.forEach(function(t,e){t.y=e,t.dy=t.value*i})}),l.forEach(function(t){t.dy=t.value*i})})(),d();for(var i=1;t>0;--t)p(i*=.99),d(),u(i),d();function u(t){function r(t){return f(t.source)*t.value}n.forEach(function(n){n.forEach(function(n){if(n.targetLinks.length){var i=e.sum(n.targetLinks,r)/e.sum(n.targetLinks,h);n.y+=(i-f(n))*t}})})}function p(t){function r(t){return f(t.target)*t.value}n.slice().reverse().forEach(function(n){n.forEach(function(n){if(n.sourceLinks.length){var i=e.sum(n.sourceLinks,r)/e.sum(n.sourceLinks,h);n.y+=(i-f(n))*t}})})}function d(){n.forEach(function(t){var e,r,n,i=0,s=t.length;for(t.sort(g),n=0;n<s;++n)e=t[n],(r=i-e.y)>0&&(e.y+=r),i=e.y+e.dy+a;if((r=i-a-o[1])>0)for(i=e.y-=r,n=s-2;n>=0;--n)e=t[n],(r=e.y+e.dy+a-i)>0&&(e.y-=r),i=e.y})}function g(t,e){return t.y-e.y}}(n),u(),t},t.relayout=function(){return u(),t},t.link=function(){var t=.5;function e(e){var r=e.source.x+e.source.dx,i=e.target.x,a=n.interpolateNumber(r,i),o=a(t),s=a(1-t),l=e.source.y+e.sy,c=l+e.dy,u=e.target.y+e.ty,f=u+e.dy;return\\\"M\\\"+r+\\\",\\\"+l+\\\"C\\\"+o+\\\",\\\"+l+\\\" \\\"+s+\\\",\\\"+u+\\\" \\\"+i+\\\",\\\"+u+\\\"L\\\"+i+\\\",\\\"+f+\\\"C\\\"+s+\\\",\\\"+f+\\\" \\\"+o+\\\",\\\"+c+\\\" \\\"+r+\\\",\\\"+c+\\\"Z\\\"}return e.curvature=function(r){return arguments.length?(t=+r,e):t},e},t},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})},\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?i(r,t(\\\"d3-array\\\"),t(\\\"d3-collection\\\"),t(\\\"d3-interpolate\\\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{\\\"d3-array\\\":140,\\\"d3-collection\\\":141,\\\"d3-interpolate\\\":145}],47:[function(t,e,r){\\\"use strict\\\";var n=\\\"undefined\\\"==typeof WeakMap?t(\\\"weak-map\\\"):WeakMap,i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=new n;e.exports=function(t){var e=o.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},{\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310,\\\"weak-map\\\":529}],48:[function(t,e,r){e.exports=function(t){var e=0,r=0,n=0,i=0;return t.map(function(t){var a=(t=t.slice())[0],o=a.toUpperCase();if(a!=o)switch(t[0]=o,a){case\\\"a\\\":t[6]+=n,t[7]+=i;break;case\\\"v\\\":t[1]+=i;break;case\\\"h\\\":t[1]+=n;break;default:for(var s=1;s<t.length;)t[s++]+=n,t[s++]+=i}switch(o){case\\\"Z\\\":n=e,i=r;break;case\\\"H\\\":n=t[1];break;case\\\"V\\\":i=t[1];break;case\\\"M\\\":n=e=t[1],i=r=t[2];break;default:n=t[t.length-2],i=t[t.length-1]}return t})}},{}],49:[function(t,e,r){var n=t(\\\"pad-left\\\");e.exports=function(t,e,r){e=\\\"number\\\"==typeof e?e:1,r=r||\\\": \\\";var i=t.split(/\\\\r?\\\\n/),a=String(i.length+e-1).length;return i.map(function(t,i){var o=i+e,s=String(o).length,l=n(o,a-s);return l+r+t}).join(\\\"\\\\n\\\")}},{\\\"pad-left\\\":440}],50:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[0];for(var r=t[0].length,n=[t[0]],a=[0],o=1;o<e;++o)if(n.push(t[o]),i(n,r)){if(a.push(o),a.length===r+1)return a}else n.pop();return a};var n=t(\\\"robust-orientation\\\");function i(t,e){for(var r=new Array(e+1),i=0;i<t.length;++i)r[i]=t[i];for(i=0;i<=t.length;++i){for(var a=t.length;a<=e;++a){for(var o=new Array(e),s=0;s<e;++s)o[s]=Math.pow(a+1-i,s);r[a]=o}if(n.apply(void 0,r))return!0}return!1}},{\\\"robust-orientation\\\":486}],51:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return n(e).filter(function(r){for(var n=new Array(r.length),a=0;a<r.length;++a)n[a]=e[r[a]];return i(n)*t<1})};var n=t(\\\"delaunay-triangulate\\\"),i=t(\\\"circumradius\\\")},{circumradius:102,\\\"delaunay-triangulate\\\":150}],52:[function(t,e,r){e.exports=function(t,e){return i(n(t,e))};var n=t(\\\"alpha-complex\\\"),i=t(\\\"simplicial-complex-boundary\\\")},{\\\"alpha-complex\\\":51,\\\"simplicial-complex-boundary\\\":493}],53:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){if(!t||null==t.length)throw Error(\\\"Argument should be an array\\\");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;n<e;n++){for(var i=-1/0,a=1/0,o=n,s=t.length;o<s;o+=e)t[o]>i&&(i=t[o]),t[o]<a&&(a=t[o]);r[n]=a,r[e+n]=i}return r}},{}],54:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"array-bounds\\\");e.exports=function(t,e,r){if(!t||null==t.length)throw Error(\\\"Argument should be an array\\\");null==e&&(e=1);null==r&&(r=n(t,e));for(var i=0;i<e;i++){var a=r[e+i],o=r[i],s=i,l=t.length;if(a===1/0&&o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:t[s]===o?0:.5;else if(a===1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:0;else if(o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===o?0:1;else{var c=a-o;for(s=i;s<l;s+=e)t[s]=0===c?.5:(t[s]-o)/c}}return t}},{\\\"array-bounds\\\":53}],55:[function(t,e,r){e.exports=function(t,e){var r=\\\"number\\\"==typeof t,n=\\\"number\\\"==typeof e;r&&!n?(e=t,t=0):r||n||(t=0,e=0);var i=(e|=0)-(t|=0);if(i<0)throw new Error(\\\"array length must be positive\\\");for(var a=new Array(i),o=0,s=t;o<i;o++,s++)a[o]=s;return a}},{}],56:[function(t,e,r){(function(r){\\\"use strict\\\";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return r.Buffer&&\\\"function\\\"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=t(\\\"util/\\\"),o=Object.prototype.hasOwnProperty,s=Array.prototype.slice,l=\\\"foo\\\"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function u(t){return!i(t)&&(\\\"function\\\"==typeof r.ArrayBuffer&&(\\\"function\\\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var f=e.exports=m,h=/\\\\s*function\\\\s+([^\\\\(\\\\s]*)\\\\s*/;function p(t){if(a.isFunction(t)){if(l)return t.name;var e=t.toString().match(h);return e&&e[1]}}function d(t,e){return\\\"string\\\"==typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(l||!a.isFunction(t))return a.inspect(t);var e=p(t);return\\\"[Function\\\"+(e?\\\": \\\"+e:\\\"\\\")+\\\"]\\\"}function v(t,e,r,n,i){throw new f.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function m(t,e){t||v(t,!0,e,\\\"==\\\",f.ok)}function y(t,e,r,o){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&\\\"object\\\"==typeof t||null!==e&&\\\"object\\\"==typeof e){if(u(t)&&u(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var l=(o=o||{actual:[],expected:[]}).actual.indexOf(t);return-1!==l&&l===o.expected.indexOf(e)||(o.actual.push(t),o.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=x(t),o=x(e);if(i&&!o||!i&&o)return!1;if(i)return t=s.call(t),e=s.call(e),y(t,e,r);var l,c,u=w(t),f=w(e);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),c=u.length-1;c>=0;c--)if(u[c]!==f[c])return!1;for(c=u.length-1;c>=0;c--)if(l=u[c],!y(t[l],e[l],r,n))return!1;return!0}(t,e,r,o))}return r?t===e:t==e}function x(t){return\\\"[object Arguments]\\\"==Object.prototype.toString.call(t)}function b(t,e){if(!t||!e)return!1;if(\\\"[object RegExp]\\\"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,r,n){var i;if(\\\"function\\\"!=typeof e)throw new TypeError('\\\"block\\\" argument must be a function');\\\"string\\\"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?\\\" (\\\"+r.name+\\\").\\\":\\\".\\\")+(n?\\\" \\\"+n:\\\".\\\"),t&&!i&&v(i,r,\\\"Missing expected exception\\\"+n);var o=\\\"string\\\"==typeof n,s=!t&&i&&!r;if((!t&&a.isError(i)&&o&&b(i,r)||s)&&v(i,r,\\\"Got unwanted exception\\\"+n),t&&i&&r&&!b(i,r)||!t&&i)throw i}f.AssertionError=function(t){var e;this.name=\\\"AssertionError\\\",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=d(g((e=this).actual),128)+\\\" \\\"+e.operator+\\\" \\\"+d(g(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,a=p(r),o=i.indexOf(\\\"\\\\n\\\"+a);if(o>=0){var s=i.indexOf(\\\"\\\\n\\\",o+1);i=i.substring(s+1)}this.stack=i}}},a.inherits(f.AssertionError,Error),f.fail=v,f.ok=m,f.equal=function(t,e,r){t!=e&&v(t,e,r,\\\"==\\\",f.equal)},f.notEqual=function(t,e,r){t==e&&v(t,e,r,\\\"!=\\\",f.notEqual)},f.deepEqual=function(t,e,r){y(t,e,!1)||v(t,e,r,\\\"deepEqual\\\",f.deepEqual)},f.deepStrictEqual=function(t,e,r){y(t,e,!0)||v(t,e,r,\\\"deepStrictEqual\\\",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){y(t,e,!1)&&v(t,e,r,\\\"notDeepEqual\\\",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&&v(e,r,n,\\\"notDeepStrictEqual\\\",t)},f.strictEqual=function(t,e,r){t!==e&&v(t,e,r,\\\"===\\\",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,\\\"!==\\\",f.notStrictEqual)},f.throws=function(t,e,r){_(!0,t,e,r)},f.doesNotThrow=function(t,e,r){_(!1,t,e,r)},f.ifError=function(t){if(t)throw t};var w=Object.keys||function(t){var e=[];for(var r in t)o.call(t,r)&&e.push(r);return e}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"util/\\\":59}],57:[function(t,e,r){\\\"function\\\"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],58:[function(t,e,r){e.exports=function(t){return t&&\\\"object\\\"==typeof t&&\\\"function\\\"==typeof t.copy&&\\\"function\\\"==typeof t.fill&&\\\"function\\\"==typeof t.readUInt8}},{}],59:[function(t,e,r){(function(e,n){var i=/%[sdj%]/g;r.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(s(arguments[r]));return e.join(\\\" \\\")}r=1;for(var n=arguments,a=n.length,o=String(t).replace(i,function(t){if(\\\"%%\\\"===t)return\\\"%\\\";if(r>=a)return t;switch(t){case\\\"%s\\\":return String(n[r++]);case\\\"%d\\\":return Number(n[r++]);case\\\"%j\\\":try{return JSON.stringify(n[r++])}catch(t){return\\\"[Circular]\\\"}default:return t}}),l=n[r];r<a;l=n[++r])g(l)||!b(l)?o+=\\\" \\\"+l:o+=\\\" \\\"+s(l);return o},r.deprecate=function(t,i){if(y(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}};var a,o={};function s(t,e){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?\\\"\\\\x1b[\\\"+s.colors[r][0]+\\\"m\\\"+t+\\\"\\\\x1b[\\\"+s.colors[r][1]+\\\"m\\\":t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return m(i)||(i=u(t,i,n)),i}var a=function(t,e){if(y(e))return t.stylize(\\\"undefined\\\",\\\"undefined\\\");if(m(e)){var r=\\\"'\\\"+JSON.stringify(e).replace(/^\\\"|\\\"$/g,\\\"\\\").replace(/'/g,\\\"\\\\\\\\'\\\").replace(/\\\\\\\\\\\"/g,'\\\"')+\\\"'\\\";return t.stylize(r,\\\"string\\\")}if(v(e))return t.stylize(\\\"\\\"+e,\\\"number\\\");if(d(e))return t.stylize(\\\"\\\"+e,\\\"boolean\\\");if(g(e))return t.stylize(\\\"null\\\",\\\"null\\\")}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),w(e)&&(o.indexOf(\\\"message\\\")>=0||o.indexOf(\\\"description\\\")>=0))return f(e);if(0===o.length){if(k(e)){var l=e.name?\\\": \\\"+e.name:\\\"\\\";return t.stylize(\\\"[Function\\\"+l+\\\"]\\\",\\\"special\\\")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),\\\"regexp\\\");if(_(e))return t.stylize(Date.prototype.toString.call(e),\\\"date\\\");if(w(e))return f(e)}var c,b=\\\"\\\",M=!1,A=[\\\"{\\\",\\\"}\\\"];(p(e)&&(M=!0,A=[\\\"[\\\",\\\"]\\\"]),k(e))&&(b=\\\" [Function\\\"+(e.name?\\\": \\\"+e.name:\\\"\\\")+\\\"]\\\");return x(e)&&(b=\\\" \\\"+RegExp.prototype.toString.call(e)),_(e)&&(b=\\\" \\\"+Date.prototype.toUTCString.call(e)),w(e)&&(b=\\\" \\\"+f(e)),0!==o.length||M&&0!=e.length?n<0?x(e)?t.stylize(RegExp.prototype.toString.call(e),\\\"regexp\\\"):t.stylize(\\\"[Object]\\\",\\\"special\\\"):(t.seen.push(e),c=M?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o<s;++o)S(e,String(o))?a.push(h(t,e,r,n,String(o),!0)):a.push(\\\"\\\");return i.forEach(function(i){i.match(/^\\\\d+$/)||a.push(h(t,e,r,n,i,!0))}),a}(t,e,n,s,o):o.map(function(r){return h(t,e,n,s,r,M)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf(\\\"\\\\n\\\")>=0&&0,t+e.replace(/\\\\u001b\\\\[\\\\d\\\\d?m/g,\\\"\\\").length+1},0)>60)return r[0]+(\\\"\\\"===e?\\\"\\\":e+\\\"\\\\n \\\")+\\\" \\\"+t.join(\\\",\\\\n  \\\")+\\\" \\\"+r[1];return r[0]+e+\\\" \\\"+t.join(\\\", \\\")+\\\" \\\"+r[1]}(c,b,A)):A[0]+b+A[1]}function f(t){return\\\"[\\\"+Error.prototype.toString.call(t)+\\\"]\\\"}function h(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize(\\\"[Getter/Setter]\\\",\\\"special\\\"):t.stylize(\\\"[Getter]\\\",\\\"special\\\"):l.set&&(s=t.stylize(\\\"[Setter]\\\",\\\"special\\\")),S(n,i)||(o=\\\"[\\\"+i+\\\"]\\\"),s||(t.seen.indexOf(l.value)<0?(s=g(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf(\\\"\\\\n\\\")>-1&&(s=a?s.split(\\\"\\\\n\\\").map(function(t){return\\\"  \\\"+t}).join(\\\"\\\\n\\\").substr(2):\\\"\\\\n\\\"+s.split(\\\"\\\\n\\\").map(function(t){return\\\"   \\\"+t}).join(\\\"\\\\n\\\")):s=t.stylize(\\\"[Circular]\\\",\\\"special\\\")),y(o)){if(a&&i.match(/^\\\\d+$/))return s;(o=JSON.stringify(\\\"\\\"+i)).match(/^\\\"([a-zA-Z_][a-zA-Z_0-9]*)\\\"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,\\\"name\\\")):(o=o.replace(/'/g,\\\"\\\\\\\\'\\\").replace(/\\\\\\\\\\\"/g,'\\\"').replace(/(^\\\"|\\\"$)/g,\\\"'\\\"),o=t.stylize(o,\\\"string\\\"))}return o+\\\": \\\"+s}function p(t){return Array.isArray(t)}function d(t){return\\\"boolean\\\"==typeof t}function g(t){return null===t}function v(t){return\\\"number\\\"==typeof t}function m(t){return\\\"string\\\"==typeof t}function y(t){return void 0===t}function x(t){return b(t)&&\\\"[object RegExp]\\\"===M(t)}function b(t){return\\\"object\\\"==typeof t&&null!==t}function _(t){return b(t)&&\\\"[object Date]\\\"===M(t)}function w(t){return b(t)&&(\\\"[object Error]\\\"===M(t)||t instanceof Error)}function k(t){return\\\"function\\\"==typeof t}function M(t){return Object.prototype.toString.call(t)}function A(t){return t<10?\\\"0\\\"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(a)&&(a=e.env.NODE_DEBUG||\\\"\\\"),t=t.toUpperCase(),!o[t])if(new RegExp(\\\"\\\\\\\\b\\\"+t+\\\"\\\\\\\\b\\\",\\\"i\\\").test(a)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error(\\\"%s %d: %s\\\",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.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]},s.styles={special:\\\"cyan\\\",number:\\\"yellow\\\",boolean:\\\"yellow\\\",undefined:\\\"grey\\\",null:\\\"bold\\\",string:\\\"green\\\",date:\\\"magenta\\\",regexp:\\\"red\\\"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=v,r.isString=m,r.isSymbol=function(t){return\\\"symbol\\\"==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=k,r.isPrimitive=function(t){return null===t||\\\"boolean\\\"==typeof t||\\\"number\\\"==typeof t||\\\"string\\\"==typeof t||\\\"symbol\\\"==typeof t||\\\"undefined\\\"==typeof t},r.isBuffer=t(\\\"./support/isBuffer\\\");var T=[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log(\\\"%s - %s\\\",(t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(\\\":\\\"),[t.getDate(),T[t.getMonth()],e].join(\\\" \\\")),r.format.apply(r,arguments))},r.inherits=t(\\\"inherits\\\"),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t(\\\"_process\\\"),\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"./support/isBuffer\\\":58,_process:465,inherits:57}],60:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],61:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o<r;++o){for(var s=new Array(r+1),l=0;l<=r;++l)s[l]=t[l][o];a[o]=s}a[r]=new Array(r+1);for(var o=0;o<=r;++o)a[r][o]=1;for(var c=new Array(r+1),o=0;o<r;++o)c[o]=e[o];c[r]=1;var u=n(a,c),f=i(u[r+1]);0===f&&(f=1);for(var h=new Array(r+1),o=0;o<=r;++o)h[o]=i(u[o])/f;return h};var n=t(\\\"robust-linear-solve\\\");function i(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return e}},{\\\"robust-linear-solve\\\":485}],62:[function(t,e,r){\\\"use strict\\\";r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){for(var e,r=c(t),n=r[0],o=r[1],s=new a(function(t,e,r){return 3*(e+r)/4-r}(0,n,o)),l=0,u=o>0?n-4:n,f=0;f<u;f+=4)e=i[t.charCodeAt(f)]<<18|i[t.charCodeAt(f+1)]<<12|i[t.charCodeAt(f+2)]<<6|i[t.charCodeAt(f+3)],s[l++]=e>>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===o&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,s[l++]=255&e);1===o&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;o<s;o+=16383)a.push(u(t,o,o+16383>s?s:o+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+\\\"==\\\")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+\\\"=\\\"));return a.join(\\\"\\\")};for(var n=[],i=[],a=\\\"undefined\\\"!=typeof Uint8Array?Uint8Array:Array,o=\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\",s=0,l=o.length;s<l;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error(\\\"Invalid string. Length must be a multiple of 4\\\");var r=t.indexOf(\\\"=\\\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,r){for(var i,a,o=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join(\\\"\\\")}i[\\\"-\\\".charCodeAt(0)]=62,i[\\\"_\\\".charCodeAt(0)]=63},{}],63:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/rationalize\\\");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{\\\"./lib/rationalize\\\":73}],64:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],65:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/rationalize\\\");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{\\\"./lib/rationalize\\\":73}],66:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-rat\\\"),i=t(\\\"./lib/is-bn\\\"),a=t(\\\"./lib/num-to-bn\\\"),o=t(\\\"./lib/str-to-bn\\\"),s=t(\\\"./lib/rationalize\\\"),l=t(\\\"./div\\\");e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c=0;var u,f;if(i(e))u=e.clone();else if(\\\"string\\\"==typeof e)u=o(e);else{if(0===e)return[a(0),a(1)];if(e===Math.floor(e))u=a(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),c-=256;u=a(e)}}if(n(r))u.mul(r[1]),f=r[0].clone();else if(i(r))f=r.clone();else if(\\\"string\\\"==typeof r)f=o(r);else if(r)if(r===Math.floor(r))f=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),c+=256;f=a(r)}else f=a(1);c>0?u=u.ushln(c):c<0&&(f=f.ushln(-c));return s(u,f)}},{\\\"./div\\\":65,\\\"./is-rat\\\":67,\\\"./lib/is-bn\\\":71,\\\"./lib/num-to-bn\\\":72,\\\"./lib/rationalize\\\":73,\\\"./lib/str-to-bn\\\":74}],67:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/is-bn\\\");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{\\\"./lib/is-bn\\\":71}],68:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"bn.js\\\");e.exports=function(t){return t.cmp(new n(0))}},{\\\"bn.js\\\":82}],69:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./bn-sign\\\");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a<e;a++){var o=r[a];i+=o*Math.pow(67108864,a)}return n(t)*i}},{\\\"./bn-sign\\\":68}],70:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"double-bits\\\"),i=t(\\\"bit-twiddle\\\").countTrailingZeros;e.exports=function(t){var e=i(n.lo(t));if(e<32)return e;var r=i(n.hi(t));if(r>20)return 52;return r+32}},{\\\"bit-twiddle\\\":80,\\\"double-bits\\\":152}],71:[function(t,e,r){\\\"use strict\\\";t(\\\"bn.js\\\");e.exports=function(t){return t&&\\\"object\\\"==typeof t&&Boolean(t.words)}},{\\\"bn.js\\\":82}],72:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"bn.js\\\"),i=t(\\\"double-bits\\\");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{\\\"bn.js\\\":82,\\\"double-bits\\\":152}],73:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./num-to-bn\\\"),i=t(\\\"./bn-sign\\\");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{\\\"./bn-sign\\\":68,\\\"./num-to-bn\\\":72}],74:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"bn.js\\\");e.exports=function(t){return new n(t)}},{\\\"bn.js\\\":82}],75:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/rationalize\\\");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{\\\"./lib/rationalize\\\":73}],76:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/bn-sign\\\");e.exports=function(t){return n(t[0])*n(t[1])}},{\\\"./lib/bn-sign\\\":68}],77:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/rationalize\\\");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{\\\"./lib/rationalize\\\":73}],78:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/bn-to-num\\\"),i=t(\\\"./lib/ctz\\\");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4,f=n(l.ushln(u).divRound(r));return c*(s+f*Math.pow(2,-u))}var h=r.bitLength()-l.bitLength()+53,f=n(l.ushln(h).divRound(r));return h<1023?c*f*Math.pow(2,-h):(f*=Math.pow(2,-1023),c*f*Math.pow(2,1023-h))}},{\\\"./lib/bn-to-num\\\":69,\\\"./lib/ctz\\\":70}],79:[function(t,e,r){\\\"use strict\\\";function n(t,e,r,n,i,a){var o=[\\\"function \\\",t,\\\"(a,l,h,\\\",n.join(\\\",\\\"),\\\"){\\\",a?\\\"\\\":\\\"var i=\\\",r?\\\"l-1\\\":\\\"h+1\\\",\\\";while(l<=h){var m=(l+h)>>>1,x=a\\\",i?\\\".get(m)\\\":\\\"[m]\\\"];return a?e.indexOf(\\\"c\\\")<0?o.push(\\\";if(x===y){return m}else if(x<=y){\\\"):o.push(\\\";var p=c(x,y);if(p===0){return m}else if(p<=0){\\\"):o.push(\\\";if(\\\",e,\\\"){i=m;\\\"),r?o.push(\\\"l=m+1}else{h=m-1}\\\"):o.push(\\\"h=m-1}else{l=m+1}\\\"),o.push(\\\"}\\\"),a?o.push(\\\"return -1};\\\"):o.push(\\\"return i};\\\"),o.join(\\\"\\\")}function i(t,e,r,i){return new Function([n(\\\"A\\\",\\\"x\\\"+t+\\\"y\\\",e,[\\\"y\\\"],!1,i),n(\\\"B\\\",\\\"x\\\"+t+\\\"y\\\",e,[\\\"y\\\"],!0,i),n(\\\"P\\\",\\\"c(x,y)\\\"+t+\\\"0\\\",e,[\\\"y\\\",\\\"c\\\"],!1,i),n(\\\"Q\\\",\\\"c(x,y)\\\"+t+\\\"0\\\",e,[\\\"y\\\",\\\"c\\\"],!0,i),\\\"function dispatchBsearch\\\",r,\\\"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch\\\",r].join(\\\"\\\"))()}e.exports={ge:i(\\\">=\\\",!1,\\\"GE\\\"),gt:i(\\\">\\\",!1,\\\"GT\\\"),lt:i(\\\"<\\\",!0,\\\"LT\\\"),le:i(\\\"<=\\\",!0,\\\"LE\\\"),eq:i(\\\"-\\\",!0,\\\"EQ\\\",!0)}},{}],80:[function(t,e,r){\\\"use strict\\\";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(i),r.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],81:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"clamp\\\");e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,f,h,p,d,g,v=null==e.cutoff?.25:e.cutoff,m=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error(\\\"For raw data width and height should be provided by options\\\");r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(f=(h=t).getContext(\\\"2d\\\"),r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(h=t.canvas,f=t,r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,g=c.length;d<g;d++)l[d]=c[d*u+y]/255;else if(1!==u)throw Error(\\\"Raw data can have only 1 value per pixel\\\");var x=Array(r*o),b=Array(r*o),_=Array(s),w=Array(s),k=Array(s+1),M=Array(s);for(d=0,g=r*o;d<g;d++){var A=l[d];x[d]=1===A?0:0===A?i:Math.pow(Math.max(0,.5-A),2),b[d]=1===A?i:0===A?0:Math.pow(Math.max(0,A-.5),2)}a(x,r,o,_,w,M,k),a(b,r,o,_,w,M,k);var T=window.Float32Array?new Float32Array(r*o):new Array(r*o);for(d=0,g=r*o;d<g;d++)T[d]=n(1-((x[d]-b[d])/m+v),0,1);return T};var i=1e20;function a(t,e,r,n,i,a,s){for(var l=0;l<e;l++){for(var c=0;c<r;c++)n[c]=t[c*e+l];for(o(n,i,a,s,r),c=0;c<r;c++)t[c*e+l]=i[c]}for(c=0;c<r;c++){for(l=0;l<e;l++)n[l]=t[c*e+l];for(o(n,i,a,s,e),l=0;l<e;l++)t[c*e+l]=Math.sqrt(i[l])}}function o(t,e,r,n,a){r[0]=0,n[0]=-i,n[1]=+i;for(var o=1,s=0;o<a;o++){for(var l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l<=n[s];)s--,l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);r[++s]=o,n[s]=l,n[s+1]=+i}for(o=0,s=0;o<a;o++){for(;n[s+1]<o;)s++;e[o]=(o-r[s])*(o-r[s])+t[r[s]]}}},{clamp:103}],82:[function(t,e,r){!function(e,r){\\\"use strict\\\";function n(t,e){if(!t)throw new Error(e||\\\"Assertion failed\\\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\\\"le\\\"!==e&&\\\"be\\\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\\\"be\\\"))}var o;\\\"object\\\"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{o=t(\\\"buffer\\\").Buffer}catch(t){}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),a=e;a<i;a++){var o=t.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function l(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o<a;o++){var s=t.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&\\\"object\\\"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if(\\\"number\\\"==typeof t)return this._initNumber(t,e,r);if(\\\"object\\\"==typeof t)return this._initArray(t,e,r);\\\"hex\\\"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;\\\"-\\\"===(t=t.toString().replace(/\\\\s+/g,\\\"\\\"))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),\\\"-\\\"===t[0]&&(this.negative=1),this.strip(),\\\"le\\\"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\\\"le\\\"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n(\\\"number\\\"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if(\\\"be\\\"===r)for(i=t.length-1,a=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if(\\\"le\\\"===r)for(i=0,a=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=t.length-6,n=0;r>=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,u=r;u<s;u+=n)c=l(t,u,u+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var f=1;for(c=l(t,u,t.length,e),u=0;u<o;u++)f*=e;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&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},a.prototype.inspect=function(){return(this.red?\\\"<BN-R: \\\":\\\"<BN: \\\")+this.toString(16)+\\\">\\\"};var c=[\\\"\\\",\\\"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\\\"],u=[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],f=[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 h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var u=l>>>26,f=67108863&l,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=h;p++){var d=c-p|0;u+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\\\"hex\\\"===t){r=\\\"\\\";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],l=(16777215&(s<<i|a)).toString(16);r=0!==(a=s>>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r=\\\"0\\\"+r;return 0!==this.negative&&(r=\\\"-\\\"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=u[t],p=f[t];r=\\\"\\\";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r=\\\"0\\\"+r);r.length%e!=0;)r=\\\"0\\\"+r;return 0!==this.negative&&(r=\\\"-\\\"+r),r}n(!1,\\\"Base should be between 2 and 36\\\")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\\\"Number can only safely store up to 53 bits\\\"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(\\\"undefined\\\"!=typeof o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,\\\"byte array longer than desired length\\\"),n(a>0,\\\"Requested array length <= 0\\\"),this.strip();var o,s,l=\\\"le\\\"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n(\\\"number\\\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n(\\\"number\\\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a<n.length;a++)e=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<r.length;a++)e=(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o<n.length;o++)a=(e=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&e;for(;0!==a&&o<r.length;o++)a=(e=(0|r.words[o])+a)>>26,this.words[o]=67108863&e;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,a,o=t.words,s=e.words,l=r.words,c=0,u=0|o[0],f=8191&u,h=u>>>13,p=0|o[1],d=8191&p,g=p>>>13,v=0|o[2],m=8191&v,y=v>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],k=8191&w,M=w>>>13,A=0|o[5],T=8191&A,S=A>>>13,C=0|o[6],E=8191&C,L=C>>>13,z=0|o[7],O=8191&z,I=z>>>13,P=0|o[8],D=8191&P,R=P>>>13,B=0|o[9],F=8191&B,N=B>>>13,j=0|s[0],V=8191&j,U=j>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Y=8191&W,X=W>>>13,Z=0|s[3],$=8191&Z,J=Z>>>13,K=0|s[4],Q=8191&K,tt=K>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ft=8191&ut,ht=ut>>>13,pt=0|s[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(f,V))|0)+((8191&(i=(i=Math.imul(f,U))+Math.imul(h,V)|0))<<13)|0;c=((a=Math.imul(h,U))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(d,V),i=(i=Math.imul(d,U))+Math.imul(g,V)|0,a=Math.imul(g,U);var mt=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))<<13)|0;c=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,V),i=(i=Math.imul(m,U))+Math.imul(y,V)|0,a=Math.imul(y,U),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,G)|0;var yt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,V),i=(i=Math.imul(b,U))+Math.imul(_,V)|0,a=Math.imul(_,U),n=n+Math.imul(m,H)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,X)|0;var xt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,$)|0))<<13)|0;c=((a=a+Math.imul(h,J)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(k,V),i=(i=Math.imul(k,U))+Math.imul(M,V)|0,a=Math.imul(M,U),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,Y)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,J)|0;var bt=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(T,V),i=(i=Math.imul(T,U))+Math.imul(S,V)|0,a=Math.imul(S,U),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,G)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(E,V),i=(i=Math.imul(E,U))+Math.imul(L,V)|0,a=Math.imul(L,U),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var wt=(c+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;c=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,V),i=(i=Math.imul(O,U))+Math.imul(I,V)|0,a=Math.imul(I,U),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0;var kt=(c+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,lt)|0))<<13)|0;c=((a=a+Math.imul(h,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,V),i=(i=Math.imul(D,U))+Math.imul(R,V)|0,a=Math.imul(R,U),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(m,at)|0,i=(i=i+Math.imul(m,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ct)|0;var Mt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,V),i=(i=Math.imul(F,U))+Math.imul(N,V)|0,a=Math.imul(N,U),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(I,Y)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ft)|0,a=a+Math.imul(g,ht)|0;var At=(c+(n=n+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,dt)|0))<<13)|0;c=((a=a+Math.imul(h,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,G))+Math.imul(N,H)|0,a=Math.imul(N,G),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(m,ft)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,X))+Math.imul(N,Y)|0,a=Math.imul(N,X),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((a=a+Math.imul(y,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,J))+Math.imul(N,$)|0,a=Math.imul(N,J),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(M,ft)|0,a=a+Math.imul(M,ht)|0;var Ct=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(N,Q)|0,a=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Et=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(M,dt)|0))<<13)|0;c=((a=a+Math.imul(M,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(I,lt)|0,a=a+Math.imul(I,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(L,ft)|0,a=a+Math.imul(L,ht)|0;var Lt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(F,at),i=(i=Math.imul(F,ot))+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ct)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(I,ft)|0,a=a+Math.imul(I,ht)|0;var zt=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(L,dt)|0))<<13)|0;c=((a=a+Math.imul(L,gt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(F,lt),i=(i=Math.imul(F,ct))+Math.imul(N,lt)|0,a=Math.imul(N,ct),n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(R,ft)|0,a=a+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(I,dt)|0))<<13)|0;c=((a=a+Math.imul(I,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(F,ft),i=(i=Math.imul(F,ht))+Math.imul(N,ft)|0,a=Math.imul(N,ht);var It=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((a=a+Math.imul(R,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(c+(n=Math.imul(F,dt))|0)+((8191&(i=(i=Math.imul(F,gt))+Math.imul(N,dt)|0))<<13)|0;return c=((a=Math.imul(N,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=vt,l[1]=mt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=Mt,l[9]=At,l[10]=Tt,l[11]=St,l[12]=Ct,l[13]=Et,l[14]=Lt,l[15]=zt,l[16]=Ot,l[17]=It,l[18]=Pt,0!==c&&(l[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=h),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?h(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,l=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c<=l;c++){var u=a-c,f=(0|t.words[u])*(0|e.words[c]),h=67108863&f;s=67108863&(h=h+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o<a;o++)n[o]=e[t[o]],i[o]=r[t[o]]},g.prototype.transform=function(t,e,r,n,i,a){this.permute(a,t,e,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var f=l,h=c,p=0;p<o;p++){var d=r[u+p],g=n[u+p],v=r[u+p+o],m=n[u+p+o],y=f*v-h*m;m=f*m+h*v,v=y,r[u+p]=d+v,n[u+p]=g+m,r[u+p+o]=d-v,n[u+p+o]=g-m,p!==s&&(y=l*f-c*h,h=l*h+c*f,f=y)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var a=0,o=0;o<e;o++)a+=0|t[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,c,n),this.transform(o,a,s,l,n,i),this.transform(c,a,u,f,n,i);for(var p=0;p<n;p++){var d=s[p]*u[p]-l[p]*f[p];l[p]=s[p]*f[p]+l[p]*u[p],s[p]=d}return this.conjugate(s,l,n),this.transform(s,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),d(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){n(\\\"number\\\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,a=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(t){n(\\\"number\\\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e<this.length;e++){var s=this.words[e]&a,l=(0|this.words[e])-s<<r;this.words[e]=l|o,o=s>>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var i;n(\\\"number\\\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<<a,l=r;if(i-=o,i=Math.max(0,i),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-a|f>>>a,u=f&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n(\\\"number\\\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},a.prototype.imaskn=function(t){n(\\\"number\\\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\\\"imaskn works only with positive numbers\\\"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return n(\\\"number\\\"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n(\\\"number\\\"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var i,a,o=t.length+r;this._expand(o);var s=0;for(i=0;i<t.length;i++){a=(0|this.words[i+r])+s;var l=(0|t.words[i])*e;s=((a-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)s=(a=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(a=-(0|this.words[i])+s)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,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,l=n.length-i.length;if(\\\"mod\\\"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,l);0===u.negative&&(n=u,s&&(s.words[l]=1));for(var f=l-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),\\\"div\\\"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),\\\"mod\\\"!==e&&(i=s.div.neg()),\\\"div\\\"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),\\\"mod\\\"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),\\\"div\\\"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?\\\"div\\\"===e?{div:this.divn(t.words[0]),mod:null}:\\\"mod\\\"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,\\\"div\\\",!1).div},a.prototype.mod=function(t){return this.divmod(t,\\\"mod\\\",!1).mod},a.prototype.umod=function(t){return this.divmod(t,\\\"mod\\\",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n(\\\"number\\\"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,\\\"Number is too big\\\");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new w(t)},a.prototype.toRed=function(t){return n(!this.red,\\\"Already a number in reduction context\\\"),n(0===this.negative,\\\"red works only with positives\\\"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,\\\"fromRed works only with numbers in reduction context\\\"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,\\\"Already a number in reduction context\\\"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,\\\"redAdd works only with red numbers\\\"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,\\\"redIAdd works only with red numbers\\\"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,\\\"redSub works only with red numbers\\\"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,\\\"redISub works only with red numbers\\\"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,\\\"redShl works only with red numbers\\\"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,\\\"redMul works only with red numbers\\\"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,\\\"redMul works only with red numbers\\\"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,\\\"redSqr works only with red numbers\\\"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,\\\"redISqr works only with red numbers\\\"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,\\\"redSqrt works only with red numbers\\\"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,\\\"redInvm works only with red numbers\\\"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,\\\"redNeg works only with red numbers\\\"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,\\\"redPow(normalNum)\\\"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,\\\"k256\\\",\\\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\\\")}function x(){m.call(this,\\\"p224\\\",\\\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\\\")}function b(){m.call(this,\\\"p192\\\",\\\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\\\")}function _(){m.call(this,\\\"25519\\\",\\\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\\\")}function w(t){if(\\\"string\\\"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\\\"modulus must be greater than 1\\\"),this.m=t,this.prime=null}function k(t){w.call(this,t),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)}m.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(y,m),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(x,m),i(b,m),i(_,m),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(v[t])return v[t];var e;if(\\\"k256\\\"===t)e=new y;else if(\\\"p224\\\"===t)e=new x;else if(\\\"p192\\\"===t)e=new b;else{if(\\\"p25519\\\"!==t)throw new Error(\\\"Unknown prime \\\"+t);e=new _}return v[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,\\\"red works only with positives\\\"),n(t.red,\\\"red works only with red numbers\\\")},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\\\"red works only with positives\\\"),n(t.red&&t.red===e.red,\\\"red works only with red numbers\\\")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var g=p,v=0;0!==g.cmp(s);v++)g=g.redSqr();n(v<d);var m=this.pow(f,new a(1).iushln(d-v-1));h=h.redMul(m),f=m.redSqr(),p=p.redMul(f),d=v}return h},w.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},w.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,s=0,l=e.bitLength()%26;for(0===l&&(l=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,w),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),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)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(\\\"undefined\\\"==typeof e||e,this)},{buffer:91}],83:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e<i;++e)a+=t[e].length;var o=new Array(a),s=0;for(e=0;e<i;++e){var l=t[e],c=l.length;for(r=0;r<c;++r){var u=o[s++]=new Array(c-1),f=0;for(n=0;n<c;++n)n!==r&&(u[f++]=l[n]);if(1&r){var h=u[1];u[1]=u[0],u[0]=h}}}return o}},{}],84:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){switch(arguments.length){case 1:return n=[],c(i=t,i,u,!0),n;case 2:return\\\"function\\\"==typeof e?c(t,t,e,!0):function(t,e){return n=[],c(t,e,u,!1),n}(t,e);case 3:return c(t,e,r,!1);default:throw new Error(\\\"box-intersect: Invalid arguments\\\")}var i};var n,i=t(\\\"typedarray-pool\\\"),a=t(\\\"./lib/sweep\\\"),o=t(\\\"./lib/intersect\\\");function s(t,e){for(var r=0;r<t;++r)if(!(e[r]<=e[r+t]))return!0;return!1}function l(t,e,r,n){for(var i=0,a=0,o=0,l=t.length;o<l;++o){var c=t[o];if(!s(e,c)){for(var u=0;u<2*e;++u)r[i++]=c[u];n[a++]=o}}return a}function c(t,e,r,n){var s=t.length,c=e.length;if(!(s<=0||c<=0)){var u=t[0].length>>>1;if(!(u<=0)){var f,h=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(t,u,h,p))>0){if(1===u&&n)a.init(s),f=a.sweepComplete(u,r,0,s,h,p,0,s,h,p);else{var d=i.mallocDouble(2*u*c),g=i.mallocInt32(c);(c=l(e,u,d,g))>0&&(a.init(s+c),f=1===u?a.sweepBipartite(u,r,0,s,h,p,0,c,d,g):o(u,r,n,s,h,p,c,d,g),i.free(d),i.free(g))}i.free(h),i.free(p)}return f}}}function u(t,e){n.push([t,e])}},{\\\"./lib/intersect\\\":86,\\\"./lib/sweep\\\":90,\\\"typedarray-pool\\\":522}],85:[function(t,e,r){\\\"use strict\\\";var n=\\\"d\\\",i=\\\"ax\\\",a=\\\"vv\\\",o=\\\"fp\\\",s=\\\"es\\\",l=\\\"rs\\\",c=\\\"re\\\",u=\\\"rb\\\",f=\\\"ri\\\",h=\\\"rp\\\",p=\\\"bs\\\",d=\\\"be\\\",g=\\\"bb\\\",v=\\\"bi\\\",m=\\\"bp\\\",y=\\\"rv\\\",x=\\\"Q\\\",b=[n,i,a,l,c,u,f,p,d,g,v];function _(t){var e=\\\"bruteForce\\\"+(t?\\\"Full\\\":\\\"Partial\\\"),r=[],_=b.slice();t||_.splice(3,0,o);var w=[\\\"function \\\"+e+\\\"(\\\"+_.join()+\\\"){\\\"];function k(e,o){var _=function(t,e,r){var o=\\\"bruteForce\\\"+(t?\\\"Red\\\":\\\"Blue\\\")+(e?\\\"Flip\\\":\\\"\\\")+(r?\\\"Full\\\":\\\"\\\"),_=[\\\"function \\\",o,\\\"(\\\",b.join(),\\\"){\\\",\\\"var \\\",s,\\\"=2*\\\",n,\\\";\\\"],w=\\\"for(var i=\\\"+l+\\\",\\\"+h+\\\"=\\\"+s+\\\"*\\\"+l+\\\";i<\\\"+c+\\\";++i,\\\"+h+\\\"+=\\\"+s+\\\"){var x0=\\\"+u+\\\"[\\\"+i+\\\"+\\\"+h+\\\"],x1=\\\"+u+\\\"[\\\"+i+\\\"+\\\"+h+\\\"+\\\"+n+\\\"],xi=\\\"+f+\\\"[i];\\\",k=\\\"for(var j=\\\"+p+\\\",\\\"+m+\\\"=\\\"+s+\\\"*\\\"+p+\\\";j<\\\"+d+\\\";++j,\\\"+m+\\\"+=\\\"+s+\\\"){var y0=\\\"+g+\\\"[\\\"+i+\\\"+\\\"+m+\\\"],\\\"+(r?\\\"y1=\\\"+g+\\\"[\\\"+i+\\\"+\\\"+m+\\\"+\\\"+n+\\\"],\\\":\\\"\\\")+\\\"yi=\\\"+v+\\\"[j];\\\";return t?_.push(w,x,\\\":\\\",k):_.push(k,x,\\\":\\\",w),r?_.push(\\\"if(y1<x0||x1<y0)continue;\\\"):e?_.push(\\\"if(y0<=x0||x1<y0)continue;\\\"):_.push(\\\"if(y0<x0||x1<y0)continue;\\\"),_.push(\\\"for(var k=\\\"+i+\\\"+1;k<\\\"+n+\\\";++k){var r0=\\\"+u+\\\"[k+\\\"+h+\\\"],r1=\\\"+u+\\\"[k+\\\"+n+\\\"+\\\"+h+\\\"],b0=\\\"+g+\\\"[k+\\\"+m+\\\"],b1=\\\"+g+\\\"[k+\\\"+n+\\\"+\\\"+m+\\\"];if(r1<b0||b1<r0)continue \\\"+x+\\\";}var \\\"+y+\\\"=\\\"+a+\\\"(\\\"),e?_.push(\\\"yi,xi\\\"):_.push(\\\"xi,yi\\\"),_.push(\\\");if(\\\"+y+\\\"!==void 0)return \\\"+y+\\\";}}}\\\"),{name:o,code:_.join(\\\"\\\")}}(e,o,t);r.push(_.code),w.push(\\\"return \\\"+_.name+\\\"(\\\"+b.join()+\\\");\\\")}w.push(\\\"if(\\\"+c+\\\"-\\\"+l+\\\">\\\"+d+\\\"-\\\"+p+\\\"){\\\"),t?(k(!0,!1),w.push(\\\"}else{\\\"),k(!1,!1)):(w.push(\\\"if(\\\"+o+\\\"){\\\"),k(!0,!0),w.push(\\\"}else{\\\"),k(!0,!1),w.push(\\\"}}else{if(\\\"+o+\\\"){\\\"),k(!1,!0),w.push(\\\"}else{\\\"),k(!1,!1),w.push(\\\"}\\\")),w.push(\\\"}}return \\\"+e);var M=r.join(\\\"\\\")+w.join(\\\"\\\");return new Function(M)()}r.partial=_(!1),r.full=_(!0)},{}],86:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,a,u,S,C,E,L){!function(t,e){var r=8*i.log2(e+1)*(t+1)|0,a=i.nextPow2(b*r);w.length<a&&(n.free(w),w=n.mallocInt32(a));var o=i.nextPow2(_*r);k<o&&(n.free(k),k=n.mallocDouble(o))}(t,a+C);var z,O=0,I=2*t;M(O++,0,0,a,0,C,r?16:0,-1/0,1/0),r||M(O++,0,0,C,0,a,1,-1/0,1/0);for(;O>0;){var P=(O-=1)*b,D=w[P],R=w[P+1],B=w[P+2],F=w[P+3],N=w[P+4],j=w[P+5],V=O*_,U=k[V],q=k[V+1],H=1&j,G=!!(16&j),W=u,Y=S,X=E,Z=L;if(H&&(W=E,Y=L,X=u,Z=S),!(2&j&&(B=v(t,D,R,B,W,Y,q),R>=B)||4&j&&(R=m(t,D,R,B,W,Y,U))>=B)){var $=B-R,J=N-F;if(G){if(t*$*($+J)<p){if(void 0!==(z=l.scanComplete(t,D,e,R,B,W,Y,F,N,X,Z)))return z;continue}}else{if(t*Math.min($,J)<f){if(void 0!==(z=o(t,D,e,H,R,B,W,Y,F,N,X,Z)))return z;continue}if(t*$*J<h){if(void 0!==(z=l.scanBipartite(t,D,e,H,R,B,W,Y,F,N,X,Z)))return z;continue}}var K=d(t,D,R,B,W,Y,U,q);if(R<K)if(t*(K-R)<f){if(void 0!==(z=s(t,D+1,e,R,K,W,Y,F,N,X,Z)))return z}else if(D===t-2){if(void 0!==(z=H?l.sweepBipartite(t,e,F,N,X,Z,R,K,W,Y):l.sweepBipartite(t,e,R,K,W,Y,F,N,X,Z)))return z}else M(O++,D+1,R,K,F,N,H,-1/0,1/0),M(O++,D+1,F,N,R,K,1^H,-1/0,1/0);if(K<B){var Q=c(t,D,F,N,X,Z),tt=X[I*Q+D],et=g(t,D,Q,N,X,Z,tt);if(et<N&&M(O++,D,K,B,et,N,(4|H)+(G?16:0),tt,q),F<Q&&M(O++,D,K,B,F,Q,(2|H)+(G?16:0),U,tt),Q+1===et){if(void 0!==(z=G?T(t,D,e,K,B,W,Y,Q,X,Z[Q]):A(t,D,e,H,K,B,W,Y,Q,X,Z[Q])))return z}else if(Q<et){var rt;if(G){if(rt=y(t,D,K,B,W,Y,tt),K<rt){var nt=g(t,D,K,rt,W,Y,tt);if(D===t-2){if(K<nt&&void 0!==(z=l.sweepComplete(t,e,K,nt,W,Y,Q,et,X,Z)))return z;if(nt<rt&&void 0!==(z=l.sweepBipartite(t,e,nt,rt,W,Y,Q,et,X,Z)))return z}else K<nt&&M(O++,D+1,K,nt,Q,et,16,-1/0,1/0),nt<rt&&(M(O++,D+1,nt,rt,Q,et,0,-1/0,1/0),M(O++,D+1,Q,et,nt,rt,1,-1/0,1/0))}}else rt=H?x(t,D,K,B,W,Y,tt):y(t,D,K,B,W,Y,tt),K<rt&&(D===t-2?z=H?l.sweepBipartite(t,e,Q,et,X,Z,K,rt,W,Y):l.sweepBipartite(t,e,K,rt,W,Y,Q,et,X,Z):(M(O++,D+1,K,rt,Q,et,H,-1/0,1/0),M(O++,D+1,Q,et,K,rt,1^H,-1/0,1/0)))}}}}};var n=t(\\\"typedarray-pool\\\"),i=t(\\\"bit-twiddle\\\"),a=t(\\\"./brute\\\"),o=a.partial,s=a.full,l=t(\\\"./sweep\\\"),c=t(\\\"./median\\\"),u=t(\\\"./partition\\\"),f=128,h=1<<22,p=1<<22,d=u(\\\"!(lo>=p0)&&!(p1>=hi)\\\",[\\\"p0\\\",\\\"p1\\\"]),g=u(\\\"lo===p0\\\",[\\\"p0\\\"]),v=u(\\\"lo<p0\\\",[\\\"p0\\\"]),m=u(\\\"hi<=p0\\\",[\\\"p0\\\"]),y=u(\\\"lo<=p0&&p0<=hi\\\",[\\\"p0\\\"]),x=u(\\\"lo<p0&&p0<=hi\\\",[\\\"p0\\\"]),b=6,_=2,w=n.mallocInt32(1024),k=n.mallocDouble(1024);function M(t,e,r,n,i,a,o,s,l){var c=b*t;w[c]=e,w[c+1]=r,w[c+2]=n,w[c+3]=i,w[c+4]=a,w[c+5]=o;var u=_*t;k[u]=s,k[u+1]=l}function A(t,e,r,n,i,a,o,s,l,c,u){var f=2*t,h=l*f,p=c[h+e];t:for(var d=i,g=i*f;d<a;++d,g+=f){var v=o[g+e],m=o[g+e+t];if(!(p<v||m<p)&&(!n||p!==v)){for(var y,x=s[d],b=e+1;b<t;++b){v=o[g+b],m=o[g+b+t];var _=c[h+b],w=c[h+b+t];if(m<_||w<v)continue t}if(void 0!==(y=n?r(u,x):r(x,u)))return y}}}function T(t,e,r,n,i,a,o,s,l,c){var u=2*t,f=s*u,h=l[f+e];t:for(var p=n,d=n*u;p<i;++p,d+=u){var g=o[p];if(g!==c){var v=a[d+e],m=a[d+e+t];if(!(h<v||m<h)){for(var y=e+1;y<t;++y){v=a[d+y],m=a[d+y+t];var x=l[f+y],b=l[f+y+t];if(m<x||b<v)continue t}var _=r(g,c);if(void 0!==_)return _}}}}},{\\\"./brute\\\":85,\\\"./median\\\":87,\\\"./partition\\\":88,\\\"./sweep\\\":90,\\\"bit-twiddle\\\":80,\\\"typedarray-pool\\\":522}],87:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,o,s,l){if(o<=r+1)return r;var c=r,u=o,f=o+r>>>1,h=2*t,p=f,d=s[h*f+e];for(;c<u;){if(u-c<i){a(t,e,c,u,s,l),d=s[h*f+e];break}var g=u-c,v=Math.random()*g+c|0,m=s[h*v+e],y=Math.random()*g+c|0,x=s[h*y+e],b=Math.random()*g+c|0,_=s[h*b+e];m<=x?_>=x?(p=y,d=x):m>=_?(p=v,d=m):(p=b,d=_):x>=_?(p=y,d=x):_>=m?(p=v,d=m):(p=b,d=_);for(var w=h*(u-1),k=h*p,M=0;M<h;++M,++w,++k){var A=s[w];s[w]=s[k],s[k]=A}var T=l[u-1];l[u-1]=l[p],l[p]=T,p=n(t,e,c,u-1,s,l,d);for(var w=h*(u-1),k=h*p,M=0;M<h;++M,++w,++k){var A=s[w];s[w]=s[k],s[k]=A}var T=l[u-1];if(l[u-1]=l[p],l[p]=T,f<p){for(u=p-1;c<u&&s[h*(u-1)+e]===d;)u-=1;u+=1}else{if(!(p<f))break;for(c=p+1;c<u&&s[h*c+e]===d;)c+=1}}return n(t,e,r,f,s,l,s[h*f+e])};var n=t(\\\"./partition\\\")(\\\"lo<p0\\\",[\\\"p0\\\"]),i=8;function a(t,e,r,n,i,a){for(var o=2*t,s=o*(r+1)+e,l=r+1;l<n;++l,s+=o)for(var c=i[s],u=l,f=o*(l-1);u>r&&i[f+e]>c;--u,f-=o){for(var h=f,p=f+o,d=0;d<o;++d,++h,++p){var g=i[h];i[h]=i[p],i[p]=g}var v=a[u];a[u]=a[u-1],a[u-1]=v}}},{\\\"./partition\\\":88}],88:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=\\\"abcdef\\\".split(\\\"\\\").concat(e),i=[];t.indexOf(\\\"lo\\\")>=0&&i.push(\\\"lo=e[k+n]\\\");t.indexOf(\\\"hi\\\")>=0&&i.push(\\\"hi=e[k+o]\\\");return r.push(n.replace(\\\"_\\\",i.join()).replace(\\\"$\\\",t)),Function.apply(void 0,r)};var n=\\\"for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m\\\"},{}],89:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){e<=4*n?i(0,e-1,t):function t(e,r,f){var h=(r-e+1)/6|0,p=e+h,d=r-h,g=e+r>>1,v=g-h,m=g+h,y=p,x=v,b=g,_=m,w=d,k=e+1,M=r-1,A=0;c(y,x,f)&&(A=y,y=x,x=A);c(_,w,f)&&(A=_,_=w,w=A);c(y,b,f)&&(A=y,y=b,b=A);c(x,b,f)&&(A=x,x=b,b=A);c(y,_,f)&&(A=y,y=_,_=A);c(b,_,f)&&(A=b,b=_,_=A);c(x,w,f)&&(A=x,x=w,w=A);c(x,b,f)&&(A=x,x=b,b=A);c(_,w,f)&&(A=_,_=w,w=A);var T=f[2*x];var S=f[2*x+1];var C=f[2*_];var E=f[2*_+1];var L=2*y;var z=2*b;var O=2*w;var I=2*p;var P=2*g;var D=2*d;for(var R=0;R<2;++R){var B=f[L+R],F=f[z+R],N=f[O+R];f[I+R]=B,f[P+R]=F,f[D+R]=N}o(v,e,f);o(m,r,f);for(var j=k;j<=M;++j)if(u(j,T,S,f))j!==k&&a(j,k,f),++k;else if(!u(j,C,E,f))for(;;){if(u(M,C,E,f)){u(M,T,S,f)?(s(j,k,M,f),++k,--M):(a(j,M,f),--M);break}if(--M<j)break}l(e,k-1,T,S,f);l(r,M+1,C,E,f);k-2-e<=n?i(e,k-2,f):t(e,k-2,f);r-(M+2)<=n?i(M+2,r,f):t(M+2,r,f);M-k<=n?i(k,M,f):t(k,M,f)}(0,e-1,t)};var n=32;function i(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var c=r[l-2],u=r[l-1];if(c<a)break;if(c===a&&u<o)break;r[l]=c,r[l+1]=u,l-=2}r[l]=a,r[l+1]=o}}function a(t,e,r){e*=2;var n=r[t*=2],i=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=n,r[e+1]=i}function o(t,e,r){e*=2,r[t*=2]=r[e],r[t+1]=r[e+1]}function s(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}function l(t,e,r,n,i){e*=2,i[t*=2]=i[e],i[e]=r,i[t+1]=i[e+1],i[e+1]=n}function c(t,e,r){e*=2;var n=r[t*=2],i=r[e];return!(n<i)&&(n!==i||r[t+1]>r[e+1])}function u(t,e,r,n){var i=n[t*=2];return i<e||i===e&&n[t+1]<r}},{}],90:[function(t,e,r){\\\"use strict\\\";e.exports={init:function(t){var e=i.nextPow2(t);s.length<e&&(n.free(s),s=n.mallocInt32(e));l.length<e&&(n.free(l),l=n.mallocInt32(e));c.length<e&&(n.free(c),c=n.mallocInt32(e));u.length<e&&(n.free(u),u=n.mallocInt32(e));f.length<e&&(n.free(f),f=n.mallocInt32(e));h.length<e&&(n.free(h),h=n.mallocInt32(e));var r=8*e;p.length<r&&(n.free(p),p=n.mallocDouble(r))},sweepBipartite:function(t,e,r,n,i,f,h,v,m,y){for(var x=0,b=2*t,_=t-1,w=b-1,k=r;k<n;++k){var M=f[k],A=b*k;p[x++]=i[A+_],p[x++]=-(M+1),p[x++]=i[A+w],p[x++]=M}for(var k=h;k<v;++k){var M=y[k]+o,T=b*k;p[x++]=m[T+_],p[x++]=-M,p[x++]=m[T+w],p[x++]=M}var S=x>>>1;a(p,S);for(var C=0,E=0,k=0;k<S;++k){var L=0|p[2*k+1];if(L>=o)d(c,u,E--,L=L-o|0);else if(L>=0)d(s,l,C--,L);else if(L<=-o){L=-L-o|0;for(var z=0;z<C;++z){var O=e(s[z],L);if(void 0!==O)return O}g(c,u,E++,L)}else{L=-L-1|0;for(var z=0;z<E;++z){var O=e(L,c[z]);if(void 0!==O)return O}g(s,l,C++,L)}}},sweepComplete:function(t,e,r,n,i,o,v,m,y,x){for(var b=0,_=2*t,w=t-1,k=_-1,M=r;M<n;++M){var A=o[M]+1<<1,T=_*M;p[b++]=i[T+w],p[b++]=-A,p[b++]=i[T+k],p[b++]=A}for(var M=v;M<m;++M){var A=x[M]+1<<1,S=_*M;p[b++]=y[S+w],p[b++]=1|-A,p[b++]=y[S+k],p[b++]=1|A}var C=b>>>1;a(p,C);for(var E=0,L=0,z=0,M=0;M<C;++M){var O=0|p[2*M+1],I=1&O;if(M<C-1&&O>>1==p[2*M+3]>>1&&(I=2,M+=1),O<0){for(var P=-(O>>1)-1,D=0;D<z;++D){var R=e(f[D],P);if(void 0!==R)return R}if(0!==I)for(var D=0;D<E;++D){var R=e(s[D],P);if(void 0!==R)return R}if(1!==I)for(var D=0;D<L;++D){var R=e(c[D],P);if(void 0!==R)return R}0===I?g(s,l,E++,P):1===I?g(c,u,L++,P):2===I&&g(f,h,z++,P)}else{var P=(O>>1)-1;0===I?d(s,l,E--,P):1===I?d(c,u,L--,P):2===I&&d(f,h,z--,P)}}},scanBipartite:function(t,e,r,n,i,c,u,f,h,v,m,y){var x=0,b=2*t,_=e,w=e+t,k=1,M=1;n?M=o:k=o;for(var A=i;A<c;++A){var T=A+k,S=b*A;p[x++]=u[S+_],p[x++]=-T,p[x++]=u[S+w],p[x++]=T}for(var A=h;A<v;++A){var T=A+M,C=b*A;p[x++]=m[C+_],p[x++]=-T}var E=x>>>1;a(p,E);for(var L=0,A=0;A<E;++A){var z=0|p[2*A+1];if(z<0){var T=-z,O=!1;if(T>=o?(O=!n,T-=o):(O=!!n,T-=1),O)g(s,l,L++,T);else{var I=y[T],P=b*T,D=m[P+e+1],R=m[P+e+1+t];t:for(var B=0;B<L;++B){var F=s[B],N=b*F;if(!(R<u[N+e+1]||u[N+e+1+t]<D)){for(var j=e+2;j<t;++j)if(m[P+j+t]<u[N+j]||u[N+j+t]<m[P+j])continue t;var V,U=f[F];if(void 0!==(V=n?r(I,U):r(U,I)))return V}}}}else d(s,l,L--,z-k)}},scanComplete:function(t,e,r,n,i,l,c,u,f,h,d){for(var g=0,v=2*t,m=e,y=e+t,x=n;x<i;++x){var b=x+o,_=v*x;p[g++]=l[_+m],p[g++]=-b,p[g++]=l[_+y],p[g++]=b}for(var x=u;x<f;++x){var b=x+1,w=v*x;p[g++]=h[w+m],p[g++]=-b}var k=g>>>1;a(p,k);for(var M=0,x=0;x<k;++x){var A=0|p[2*x+1];if(A<0){var b=-A;if(b>=o)s[M++]=b-o;else{var T=d[b-=1],S=v*b,C=h[S+e+1],E=h[S+e+1+t];t:for(var L=0;L<M;++L){var z=s[L],O=c[z];if(O===T)break;var I=v*z;if(!(E<l[I+e+1]||l[I+e+1+t]<C)){for(var P=e+2;P<t;++P)if(h[S+P+t]<l[I+P]||l[I+P+t]<h[S+P])continue t;var D=r(O,T);if(void 0!==D)return D}}}}else{for(var b=A-o,L=M-1;L>=0;--L)if(s[L]===b){for(var P=L+1;P<M;++P)s[P-1]=s[P];break}--M}}}};var n=t(\\\"typedarray-pool\\\"),i=t(\\\"bit-twiddle\\\"),a=t(\\\"./sort\\\"),o=1<<28,s=n.mallocInt32(1024),l=n.mallocInt32(1024),c=n.mallocInt32(1024),u=n.mallocInt32(1024),f=n.mallocInt32(1024),h=n.mallocInt32(1024),p=n.mallocDouble(8192);function d(t,e,r,n){var i=e[n],a=t[r-1];t[i]=a,e[a]=i}function g(t,e,r,n){t[r]=n,e[n]=r}},{\\\"./sort\\\":89,\\\"bit-twiddle\\\":80,\\\"typedarray-pool\\\":522}],91:[function(t,e,r){},{}],92:[function(t,e,r){var n=Object.create||function(t){var e=function(){};return e.prototype=t,new e},i=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return r},a=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function o(){this._events&&Object.prototype.hasOwnProperty.call(this,\\\"_events\\\")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var s,l=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,\\\"x\\\",{value:0}),s=0===c.x}catch(t){s=!1}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function f(t,e,r,i){var a,o,s;if(\\\"function\\\"!=typeof r)throw new TypeError('\\\"listener\\\" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit(\\\"newListener\\\",e,r.listener?r.listener:r),o=t._events),s=o[e]):(o=t._events=n(null),t._eventsCount=0),s){if(\\\"function\\\"==typeof s?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),!s.warned&&(a=u(t))&&a>0&&s.length>a){s.warned=!0;var l=new Error(\\\"Possible EventEmitter memory leak detected. \\\"+s.length+' \\\"'+String(e)+'\\\" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name=\\\"MaxListenersExceededWarning\\\",l.emitter=t,l.type=e,l.count=s.length,\\\"object\\\"==typeof console&&console.warn&&console.warn(\\\"%s: %s\\\",l.name,l.message)}}else s=o[e]=r,++t._eventsCount;return t}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=a.call(h,n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(!n)return[];var i=n[e];return i?\\\"function\\\"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):v(i,i.length):[]}function g(t){var e=this._events;if(e){var r=e[t];if(\\\"function\\\"==typeof r)return 1;if(r)return r.length}return 0}function v(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}s?Object.defineProperty(o,\\\"defaultMaxListeners\\\",{enumerable:!0,get:function(){return l},set:function(t){if(\\\"number\\\"!=typeof t||t<0||t!=t)throw new TypeError('\\\"defaultMaxListeners\\\" must be a positive number');l=t}}):o.defaultMaxListeners=l,o.prototype.setMaxListeners=function(t){if(\\\"number\\\"!=typeof t||t<0||isNaN(t))throw new TypeError('\\\"n\\\" argument must be a positive number');return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){var e,r,n,i,a,o,s=\\\"error\\\"===t;if(o=this._events)s=s&&null==o.error;else if(!s)return!1;if(s){if(arguments.length>1&&(e=arguments[1]),e instanceof Error)throw e;var l=new Error('Unhandled \\\"error\\\" event. ('+e+\\\")\\\");throw l.context=e,l}if(!(r=o[t]))return!1;var c=\\\"function\\\"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,i=v(t,n),a=0;a<n;++a)i[a].call(r)}(r,c,this);break;case 2:!function(t,e,r,n){if(e)t.call(r,n);else for(var i=t.length,a=v(t,i),o=0;o<i;++o)a[o].call(r,n)}(r,c,this,arguments[1]);break;case 3:!function(t,e,r,n,i){if(e)t.call(r,n,i);else for(var a=t.length,o=v(t,a),s=0;s<a;++s)o[s].call(r,n,i)}(r,c,this,arguments[1],arguments[2]);break;case 4:!function(t,e,r,n,i,a){if(e)t.call(r,n,i,a);else for(var o=t.length,s=v(t,o),l=0;l<o;++l)s[l].call(r,n,i,a)}(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),a=1;a<n;a++)i[a-1]=arguments[a];!function(t,e,r,n){if(e)t.apply(r,n);else for(var i=t.length,a=v(t,i),o=0;o<i;++o)a[o].apply(r,n)}(r,c,this,i)}return!0},o.prototype.addListener=function(t,e){return f(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return f(this,t,e,!0)},o.prototype.once=function(t,e){if(\\\"function\\\"!=typeof e)throw new TypeError('\\\"listener\\\" argument must be a function');return this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){if(\\\"function\\\"!=typeof e)throw new TypeError('\\\"listener\\\" argument must be a function');return this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,i,a,o,s;if(\\\"function\\\"!=typeof e)throw new TypeError('\\\"listener\\\" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=n(null):(delete i[t],i.removeListener&&this.emit(\\\"removeListener\\\",t,r.listener||e));else if(\\\"function\\\"!=typeof r){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,a=o;break}if(a<0)return this;0===a?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n<i;r+=1,n+=1)t[r]=t[n];t.pop()}(r,a),1===r.length&&(i[t]=r[0]),i.removeListener&&this.emit(\\\"removeListener\\\",t,s||e)}return this},o.prototype.removeAllListeners=function(t){var e,r,a;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=n(null):delete r[t]),this;if(0===arguments.length){var o,s=i(r);for(a=0;a<s.length;++a)\\\"removeListener\\\"!==(o=s[a])&&this.removeAllListeners(o);return this.removeAllListeners(\\\"removeListener\\\"),this._events=n(null),this._eventsCount=0,this}if(\\\"function\\\"==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(a=e.length-1;a>=0;a--)this.removeListener(t,e[a]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return\\\"function\\\"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],93:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"base64-js\\\"),i=t(\\\"ieee754\\\");r.Buffer=s,r.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function o(t){if(t>a)throw new RangeError('The value \\\"'+t+'\\\" is invalid for option \\\"size\\\"');var e=new Uint8Array(t);return e.__proto__=s.prototype,e}function s(t,e,r){if(\\\"number\\\"==typeof t){if(\\\"string\\\"==typeof e)throw new TypeError('The \\\"string\\\" argument must be of type string. Received type number');return u(t)}return l(t,e,r)}function l(t,e,r){if(\\\"string\\\"==typeof t)return function(t,e){\\\"string\\\"==typeof e&&\\\"\\\"!==e||(e=\\\"utf8\\\");if(!s.isEncoding(e))throw new TypeError(\\\"Unknown encoding: \\\"+e);var r=0|p(t,e),n=o(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return f(t);if(null==t)throw TypeError(\\\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \\\"+typeof t);if(j(t,ArrayBuffer)||t&&j(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('\\\"offset\\\" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('\\\"length\\\" is outside of buffer bounds');var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=s.prototype,n}(t,e,r);if(\\\"number\\\"==typeof t)throw new TypeError('The \\\"value\\\" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);var i=function(t){if(s.isBuffer(t)){var e=0|h(t.length),r=o(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(void 0!==t.length)return\\\"number\\\"!=typeof t.length||V(t.length)?o(0):f(t);if(\\\"Buffer\\\"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if(\\\"undefined\\\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\\\"function\\\"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive](\\\"string\\\"),e,r);throw new TypeError(\\\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \\\"+typeof t)}function c(t){if(\\\"number\\\"!=typeof t)throw new TypeError('\\\"size\\\" argument must be of type number');if(t<0)throw new RangeError('The value \\\"'+t+'\\\" is invalid for option \\\"size\\\"')}function u(t){return c(t),o(t<0?0:0|h(t))}function f(t){for(var e=t.length<0?0:0|h(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t){if(t>=a)throw new RangeError(\\\"Attempt to allocate Buffer larger than maximum size: 0x\\\"+a.toString(16)+\\\" bytes\\\");return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if(\\\"string\\\"!=typeof t)throw new TypeError('The \\\"string\\\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case\\\"ascii\\\":case\\\"latin1\\\":case\\\"binary\\\":return r;case\\\"utf8\\\":case\\\"utf-8\\\":return B(t).length;case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return 2*r;case\\\"hex\\\":return r>>>1;case\\\"base64\\\":return F(t).length;default:if(i)return n?-1:B(t).length;e=(\\\"\\\"+e).toLowerCase(),i=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if(\\\"string\\\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if(\\\"string\\\"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if(\\\"number\\\"==typeof e)return e&=255,\\\"function\\\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError(\\\"val must be string, number or Buffer\\\")}function v(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&(\\\"ucs2\\\"===(n=String(n).toLowerCase())||\\\"ucs-2\\\"===n||\\\"utf16le\\\"===n||\\\"utf-16le\\\"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=r;a<s;a++)if(c(t,a)===c(e,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(r+l>s&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;h<l;h++)if(c(t,a+h)!==c(e,h)){f=!1;break}if(f)return a}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(V(s))return o;t[r+o]=s}return o}function y(t,e,r,n){return N(B(e,t.length-r),t,r,n)}function x(t,e,r,n){return N(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function b(t,e,r,n){return x(t,e,r,n)}function _(t,e,r,n){return N(F(e),t,r,n)}function w(t,e,r,n){return N(function(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function M(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a,o,s,l,c=t[i],u=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var r=\\\"\\\",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=A));return r}(n)}r.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||\\\"undefined\\\"==typeof console||\\\"function\\\"!=typeof console.error||console.error(\\\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\\\"),Object.defineProperty(s.prototype,\\\"parent\\\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,\\\"offset\\\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),\\\"undefined\\\"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(t,e,r){return l(t,e,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?o(t):void 0!==e?\\\"string\\\"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},s.allocUnsafe=function(t){return u(t)},s.allocUnsafeSlow=function(t){return u(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(j(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),j(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The \\\"buf1\\\", \\\"buf2\\\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case\\\"hex\\\":case\\\"utf8\\\":case\\\"utf-8\\\":case\\\"ascii\\\":case\\\"latin1\\\":case\\\"binary\\\":case\\\"base64\\\":case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('\\\"list\\\" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(j(a,Uint8Array)&&(a=s.from(a)),!s.isBuffer(a))throw new TypeError('\\\"list\\\" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError(\\\"Buffer size must be a multiple of 16-bits\\\");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError(\\\"Buffer size must be a multiple of 32-bits\\\");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError(\\\"Buffer size must be a multiple of 64-bits\\\");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?\\\"\\\":0===arguments.length?M(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return\\\"\\\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\\\"\\\";if((r>>>=0)<=(e>>>=0))return\\\"\\\";for(t||(t=\\\"utf8\\\");;)switch(t){case\\\"hex\\\":return C(this,e,r);case\\\"utf8\\\":case\\\"utf-8\\\":return M(this,e,r);case\\\"ascii\\\":return T(this,e,r);case\\\"latin1\\\":case\\\"binary\\\":return S(this,e,r);case\\\"base64\\\":return k(this,e,r);case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return E(this,e,r);default:if(n)throw new TypeError(\\\"Unknown encoding: \\\"+t);t=(t+\\\"\\\").toLowerCase(),n=!0}}.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError(\\\"Argument must be a Buffer\\\");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t=\\\"\\\",e=r.INSPECT_MAX_BYTES;return t=this.toString(\\\"hex\\\",0,e).replace(/(.{2})/g,\\\"$1 \\\").trim(),this.length>e&&(t+=\\\" ... \\\"),\\\"<Buffer \\\"+t+\\\">\\\"},s.prototype.compare=function(t,e,r,n,i){if(j(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The \\\"target\\\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError(\\\"out of range index\\\");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),l=Math.min(a,o),c=this.slice(n,i),u=t.slice(e,r),f=0;f<l;++f)if(c[f]!==u[f]){a=c[f],o=u[f];break}return a<o?-1:o<a?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n=\\\"utf8\\\",r=this.length,e=0;else if(void 0===r&&\\\"string\\\"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(\\\"Buffer.write(string, encoding, offset[, length]) is no longer supported\\\");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\\\"utf8\\\")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\\\"Attempt to write outside buffer bounds\\\");n||(n=\\\"utf8\\\");for(var a=!1;;)switch(n){case\\\"hex\\\":return m(this,t,e,r);case\\\"utf8\\\":case\\\"utf-8\\\":return y(this,t,e,r);case\\\"ascii\\\":return x(this,t,e,r);case\\\"latin1\\\":case\\\"binary\\\":return b(this,t,e,r);case\\\"base64\\\":return _(this,t,e,r);case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return w(this,t,e,r);default:if(a)throw new TypeError(\\\"Unknown encoding: \\\"+n);n=(\\\"\\\"+n).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:\\\"Buffer\\\",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(t,e,r){var n=\\\"\\\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function S(t,e,r){var n=\\\"\\\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i=\\\"\\\",a=e;a<r;++a)i+=R(t[a]);return i}function E(t,e,r){for(var n=t.slice(e,r),i=\\\"\\\",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError(\\\"offset is not uint\\\");if(t+e>r)throw new RangeError(\\\"Trying to access beyond buffer length\\\")}function z(t,e,r,n,i,a){if(!s.isBuffer(t))throw new TypeError('\\\"buffer\\\" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('\\\"value\\\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\\\"Index out of range\\\")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError(\\\"Index out of range\\\");if(r<0)throw new RangeError(\\\"Index out of range\\\")}function I(t,e,r,n,a){return e=+e,r>>>=0,a||O(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,a){return e=+e,r>>>=0,a||O(t,0,r,8),i.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||z(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError(\\\"argument should be a Buffer\\\");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError(\\\"targetStart out of bounds\\\");if(r<0||r>=this.length)throw new RangeError(\\\"Index out of range\\\");if(n<0)throw new RangeError(\\\"sourceEnd out of bounds\\\");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&\\\"function\\\"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var a=i-1;a>=0;--a)t[a+e]=this[a+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},s.prototype.fill=function(t,e,r,n){if(\\\"string\\\"==typeof t){if(\\\"string\\\"==typeof e?(n=e,e=0,r=this.length):\\\"string\\\"==typeof r&&(n=r,r=this.length),void 0!==n&&\\\"string\\\"!=typeof n)throw new TypeError(\\\"encoding must be a string\\\");if(\\\"string\\\"==typeof n&&!s.isEncoding(n))throw new TypeError(\\\"Unknown encoding: \\\"+n);if(1===t.length){var i=t.charCodeAt(0);(\\\"utf8\\\"===n&&i<128||\\\"latin1\\\"===n)&&(t=i)}}else\\\"number\\\"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError(\\\"Out of range index\\\");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\\\"number\\\"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var o=s.isBuffer(t)?t:s.from(t,n),l=o.length;if(0===l)throw new TypeError('The value \\\"'+t+'\\\" is invalid for argument \\\"value\\\"');for(a=0;a<r-e;++a)this[a+e]=o[a%l]}return this};var D=/[^+\\\\/0-9A-Za-z-_]/g;function R(t){return t<16?\\\"0\\\"+t.toString(16):t.toString(16)}function B(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\\\"Invalid code point\\\");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function F(t){return n.toByteArray(function(t){if((t=(t=t.split(\\\"=\\\")[0]).trim().replace(D,\\\"\\\")).length<2)return\\\"\\\";for(;t.length%4!=0;)t+=\\\"=\\\";return t}(t))}function N(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}},{\\\"base64-js\\\":62,ieee754:395}],94:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/monotone\\\"),i=t(\\\"./lib/triangulation\\\"),a=t(\\\"./lib/delaunay\\\"),o=t(\\\"./lib/filter\\\");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!c(r,\\\"delaunay\\\",!0),f=!!c(r,\\\"interior\\\",!0),h=!!c(r,\\\"exterior\\\",!0),p=!!c(r,\\\"infinity\\\",!1);if(!f&&!h||0===t.length)return[];var d=n(t,e);if(u||f!==h||p){for(var g=i(t.length,function(t){return t.map(s).sort(l)}(e)),v=0;v<d.length;++v){var m=d[v];g.addTriangle(m[0],m[1],m[2])}return u&&a(t,g),h?f?p?o(g,0,p):g.cells():o(g,1,p):o(g,-1)}return d}},{\\\"./lib/delaunay\\\":95,\\\"./lib/filter\\\":96,\\\"./lib/monotone\\\":97,\\\"./lib/triangulation\\\":98}],95:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"robust-in-sphere\\\")[4];t(\\\"binary-search-bounds\\\");function i(t,e,r,i,a,o){var s=e.opposite(i,a);if(!(s<0)){if(a<i){var l=i;i=a,a=l,l=o,o=s,s=l}e.isConstraint(i,a)||n(t[i],t[a],t[o],t[s])<0&&r.push(i,a)}}e.exports=function(t,e){for(var r=[],a=t.length,o=e.stars,s=0;s<a;++s)for(var l=o[s],c=1;c<l.length;c+=2){var u=l[c];if(!(u<s)&&!e.isConstraint(s,u)){for(var f=l[c-1],h=-1,p=1;p<l.length;p+=2)if(l[p-1]===u){h=l[p];break}h<0||n(t[s],t[u],t[f],t[h])<0&&r.push(s,u)}}for(;r.length>0;){for(var u=r.pop(),s=r.pop(),f=-1,h=-1,l=o[s],d=1;d<l.length;d+=2){var g=l[d-1],v=l[d];g===u?h=v:v===u&&(f=g)}f<0||h<0||(n(t[s],t[u],t[f],t[h])>=0||(e.flip(s,u),i(t,e,r,f,s,h),i(t,e,r,s,h,f),i(t,e,r,h,u,f),i(t,e,r,u,f,h)))}}},{\\\"binary-search-bounds\\\":99,\\\"robust-in-sphere\\\":484}],96:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"binary-search-bounds\\\");function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i<n;++i){var s=r[i],l=s[0],c=s[1],u=s[2];c<u?c<l&&(s[0]=c,s[1]=u,s[2]=l):u<l&&(s[0]=u,s[1]=l,s[2]=c)}r.sort(o);for(var f=new Array(n),i=0;i<f.length;++i)f[i]=0;var h=[],p=[],d=new Array(3*n),g=new Array(3*n),v=null;e&&(v=[]);for(var m=new a(r,d,g,f,h,p,v),i=0;i<n;++i)for(var s=r[i],y=0;y<3;++y){var l=s[y],c=s[(y+1)%3],x=d[3*i+y]=m.locate(c,l,t.opposite(c,l)),b=g[3*i+y]=t.isConstraint(l,c);x<0&&(b?p.push(i):(h.push(i),f[i]=1),e&&v.push([c,l,-1]))}return m}(t,r);if(0===e)return r?n.cells.concat(n.boundary):n.cells;var i=1,s=n.active,l=n.next,c=n.flags,u=n.cells,f=n.constraint,h=n.neighbor;for(;s.length>0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-i){c[p]=i;u[p];for(var d=0;d<3;++d){var g=h[3*p+d];g>=0&&0===c[g]&&(f[3*p+d]?l.push(g):(s.push(g),c[g]=i))}}}var v=l;l=s,s=v,l.length=0,i=-i}var m=function(t,e,r){for(var n=0,i=0;i<t.length;++i)e[i]===r&&(t[n++]=t[i]);return t.length=n,t}(u,c,e);if(r)return m.concat(n.boundary);return m},a.prototype.locate=(n=[0,0,0],function(t,e,r){var a=t,s=e,l=r;return e<r?e<t&&(a=e,s=r,l=t):r<t&&(a=r,s=t,l=e),a<0?-1:(n[0]=a,n[1]=s,n[2]=l,i.eq(this.cells,n,o))})},{\\\"binary-search-bounds\\\":99}],97:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"robust-orientation\\\")[3],a=0,o=1,s=2;function l(t,e,r,n,i){this.a=t,this.b=e,this.idx=r,this.lowerIds=n,this.upperIds=i}function c(t,e,r,n){this.a=t,this.b=e,this.type=r,this.idx=n}function u(t,e){var r=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return r||(t.type!==a&&(r=i(t.a,t.b,e.b))?r:t.idx-e.idx)}function f(t,e){return i(t.a,t.b,e)}function h(t,e,r,a,o){for(var s=n.lt(e,a,f),l=n.gt(e,a,f),c=s;c<l;++c){for(var u=e[c],h=u.lowerIds,p=h.length;p>1&&i(r[h[p-2]],r[h[p-1]],a)>0;)t.push([h[p-1],h[p-2],o]),p-=1;h.length=p,h.push(o);var d=u.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function p(t,e){var r;return(r=t.a[0]<e.a[0]?i(t.a,t.b,e.a):i(e.b,e.a,t.a))?r:(r=e.b[0]<t.b[0]?i(t.a,t.b,e.b):i(e.b,e.a,t.b))||t.idx-e.idx}function d(t,e,r){var i=n.le(t,r,p),a=t[i],o=a.upperIds,s=o[o.length-1];a.upperIds=[s],t.splice(i+1,0,new l(r.a,r.b,r.idx,[s],o))}function g(t,e,r){var i=r.a;r.a=r.b,r.b=i;var a=n.eq(t,r,p),o=t[a];t[a-1].upperIds=o.upperIds,t.splice(a,1)}e.exports=function(t,e){for(var r=t.length,n=e.length,i=[],f=0;f<r;++f)i.push(new c(t[f],null,a,f));for(var f=0;f<n;++f){var p=e[f],v=t[p[0]],m=t[p[1]];v[0]<m[0]?i.push(new c(v,m,s,f),new c(m,v,o,f)):v[0]>m[0]&&i.push(new c(m,v,s,f),new c(v,m,o,f))}i.sort(u);for(var y=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),x=[new l([y,1],[y,0],-1,[],[],[],[])],b=[],f=0,_=i.length;f<_;++f){var w=i[f],k=w.type;k===a?h(b,x,t,w.a,w.idx):k===s?d(x,t,w):g(x,t,w)}return b}},{\\\"binary-search-bounds\\\":99,\\\"robust-orientation\\\":486}],98:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\");function i(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=[];return new i(r,e)};var a=i.prototype;function o(t,e,r){for(var n=1,i=t.length;n<i;n+=2)if(t[n-1]===e&&t[n]===r)return t[n-1]=t[i-2],t[n]=t[i-1],void(t.length=i-2)}a.isConstraint=function(){var t=[0,0];function e(t,e){return t[0]-e[0]||t[1]-e[1]}return function(r,i){return t[0]=Math.min(r,i),t[1]=Math.max(r,i),n.eq(this.edges,t,e)>=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n<i;n+=2)if(r[n]===t)return r[n-1];return-1},a.flip=function(t,e){var r=this.opposite(t,e),n=this.opposite(e,t);this.removeTriangle(t,e,r),this.removeTriangle(e,t,n),this.addTriangle(t,n,r),this.addTriangle(e,r,n)},a.edges=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2)e.push([i[a],i[a+1]]);return e},a.cells=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2){var s=i[a],l=i[a+1];r<Math.min(s,l)&&e.push([r,s,l])}return e}},{\\\"binary-search-bounds\\\":99}],99:[function(t,e,r){\\\"use strict\\\";function n(t,e,r,n,i){var a=[\\\"function \\\",t,\\\"(a,l,h,\\\",n.join(\\\",\\\"),\\\"){\\\",i?\\\"\\\":\\\"var i=\\\",r?\\\"l-1\\\":\\\"h+1\\\",\\\";while(l<=h){var m=(l+h)>>>1,x=a[m]\\\"];return i?e.indexOf(\\\"c\\\")<0?a.push(\\\";if(x===y){return m}else if(x<=y){\\\"):a.push(\\\";var p=c(x,y);if(p===0){return m}else if(p<=0){\\\"):a.push(\\\";if(\\\",e,\\\"){i=m;\\\"),r?a.push(\\\"l=m+1}else{h=m-1}\\\"):a.push(\\\"h=m-1}else{l=m+1}\\\"),a.push(\\\"}\\\"),i?a.push(\\\"return -1};\\\"):a.push(\\\"return i};\\\"),a.join(\\\"\\\")}function i(t,e,r,i){return new Function([n(\\\"A\\\",\\\"x\\\"+t+\\\"y\\\",e,[\\\"y\\\"],i),n(\\\"P\\\",\\\"c(x,y)\\\"+t+\\\"0\\\",e,[\\\"y\\\",\\\"c\\\"],i),\\\"function dispatchBsearch\\\",r,\\\"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch\\\",r].join(\\\"\\\"))()}e.exports={ge:i(\\\">=\\\",!1,\\\"GE\\\"),gt:i(\\\">\\\",!1,\\\"GT\\\"),lt:i(\\\"<\\\",!0,\\\"LT\\\"),le:i(\\\"<=\\\",!0,\\\"LE\\\"),eq:i(\\\"-\\\",!0,\\\"EQ\\\",!0)}},{}],100:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=1,r=1;r<t.length;++r)for(var n=0;n<r;++n)if(t[r]<t[n])e=-e;else if(t[n]===t[r])return 0;return e}},{}],101:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"dup\\\"),i=t(\\\"robust-linear-solve\\\");function a(t,e){for(var r=0,n=t.length,i=0;i<n;++i)r+=t[i]*e[i];return r}function o(t){var e=t.length;if(0===e)return[];t[0].length;var r=n([t.length+1,t.length+1],1),o=n([t.length+1],1);r[e][e]=0;for(var s=0;s<e;++s){for(var l=0;l<=s;++l)r[l][s]=r[s][l]=2*a(t[s],t[l]);o[s]=a(t[s],t[s])}var c=i(r,o),u=0,f=c[e+1];for(s=0;s<f.length;++s)u+=f[s];var h=new Array(e);for(s=0;s<e;++s){f=c[s];var p=0;for(l=0;l<f.length;++l)p+=f[l];h[s]=p/u}return h}function s(t){if(0===t.length)return[];for(var e=t[0].length,r=n([e]),i=o(t),a=0;a<t.length;++a)for(var s=0;s<e;++s)r[s]+=t[a][s]*i[a];return r}s.barycenetric=o,e.exports=s},{dup:155,\\\"robust-linear-solve\\\":485}],102:[function(t,e,r){e.exports=function(t){for(var e=n(t),r=0,i=0;i<t.length;++i)for(var a=t[i],o=0;o<e.length;++o)r+=Math.pow(a[o]-e[o],2);return Math.sqrt(r/t.length)};var n=t(\\\"circumcenter\\\")},{circumcenter:101}],103:[function(t,e,r){e.exports=function(t,e,r){return e<r?t<e?e:t>r?r:t:t<r?r:t>e?e:t}},{}],104:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a<e.length;++a){var o=e[a];i[a]=[o[0],o[1],r[a]]}e=i}var s=function(t,e,r){var n=d(t,[],p(t));return m(e,n,r),!!n}(t,e,!!r);for(;y(t,e,!!r);)s=!0;if(r&&s){n.length=0,r.length=0;for(var a=0;a<e.length;++a){var o=e[a];n.push([o[0],o[1]]),r.push(o[2])}}return s};var n=t(\\\"union-find\\\"),i=t(\\\"box-intersect\\\"),a=t(\\\"robust-segment-intersect\\\"),o=t(\\\"big-rat\\\"),s=t(\\\"big-rat/cmp\\\"),l=t(\\\"big-rat/to-float\\\"),c=t(\\\"rat-vec\\\"),u=t(\\\"nextafter\\\"),f=t(\\\"./lib/rat-seg-intersect\\\");function h(t){var e=l(t);return[u(e,-1/0),u(e,1/0)]}function p(t){for(var e=new Array(t.length),r=0;r<t.length;++r){var n=t[r];e[r]=[u(n[0],-1/0),u(n[1],-1/0),u(n[0],1/0),u(n[1],1/0)]}return e}function d(t,e,r){for(var a=e.length,o=new n(a),s=[],l=0;l<e.length;++l){var c=e[l],f=h(c[0]),p=h(c[1]);s.push([u(f[0],-1/0),u(p[0],-1/0),u(f[1],1/0),u(p[1],1/0)])}i(s,function(t,e){o.link(t,e)});var d=!0,g=new Array(a);for(l=0;l<a;++l){(m=o.find(l))!==l&&(d=!1,t[m]=[Math.min(t[l][0],t[m][0]),Math.min(t[l][1],t[m][1])])}if(d)return null;var v=0;for(l=0;l<a;++l){var m;(m=o.find(l))===l?(g[l]=v,t[v++]=t[l]):g[l]=-1}t.length=v;for(l=0;l<a;++l)g[l]<0&&(g[l]=g[o.find(l)]);return g}function g(t,e){return t[0]-e[0]||t[1]-e[1]}function v(t,e){var r=t[0]-e[0]||t[1]-e[1];return r||(t[2]<e[2]?-1:t[2]>e[2]?1:0)}function m(t,e,r){if(0!==t.length){if(e)for(var n=0;n<t.length;++n){var i=e[(o=t[n])[0]],a=e[o[1]];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}else for(n=0;n<t.length;++n){var o;i=(o=t[n])[0],a=o[1];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}r?t.sort(v):t.sort(g);var s=1;for(n=1;n<t.length;++n){var l=t[n-1],c=t[n];(c[0]!==l[0]||c[1]!==l[1]||r&&c[2]!==l[2])&&(t[s++]=c)}t.length=s}}function y(t,e,r){var n=function(t,e){for(var r=new Array(e.length),n=0;n<e.length;++n){var i=e[n],a=t[i[0]],o=t[i[1]];r[n]=[u(Math.min(a[0],o[0]),-1/0),u(Math.min(a[1],o[1]),-1/0),u(Math.max(a[0],o[0]),1/0),u(Math.max(a[1],o[1]),1/0)]}return r}(t,e),h=function(t,e,r){var n=[];return i(r,function(r,i){var o=e[r],s=e[i];if(o[0]!==s[0]&&o[0]!==s[1]&&o[1]!==s[0]&&o[1]!==s[1]){var l=t[o[0]],c=t[o[1]],u=t[s[0]],f=t[s[1]];a(l,c,u,f)&&n.push([r,i])}}),n}(t,e,n),g=p(t),v=function(t,e,r,n){var o=[];return i(r,n,function(r,n){var i=e[r];if(i[0]!==n&&i[1]!==n){var s=t[n],l=t[i[0]],c=t[i[1]];a(l,c,s,s)&&o.push([r,n])}}),o}(t,e,n,g),y=d(t,function(t,e,r,n,i){var a,u,h=t.map(function(t){return[o(t[0]),o(t[1])]});for(a=0;a<r.length;++a){var p=r[a];u=p[0];var d=p[1],g=e[u],v=e[d],m=f(c(t[g[0]]),c(t[g[1]]),c(t[v[0]]),c(t[v[1]]));if(m){var y=t.length;t.push([l(m[0]),l(m[1])]),h.push(m),n.push([u,y],[d,y])}}for(n.sort(function(t,e){if(t[0]!==e[0])return t[0]-e[0];var r=h[t[1]],n=h[e[1]];return s(r[0],n[0])||s(r[1],n[1])}),a=n.length-1;a>=0;--a){var x=e[u=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],k=t[_];if((w[0]-k[0]||w[1]-k[1])<0){var M=b;b=_,_=M}x[0]=b;var A,T=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===u;){var S,C=(S=n[--a])[1];i?e.push([T,C,A]):e.push([T,C]),T=C}i?e.push([T,_,A]):e.push([T,_])}return h}(t,e,h,v,r));return m(e,y,r),!!y||(h.length>0||v.length>0)}},{\\\"./lib/rat-seg-intersect\\\":105,\\\"big-rat\\\":66,\\\"big-rat/cmp\\\":64,\\\"big-rat/to-float\\\":78,\\\"box-intersect\\\":84,nextafter:434,\\\"rat-vec\\\":469,\\\"robust-segment-intersect\\\":489,\\\"union-find\\\":523}],105:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var a=s(e,t),f=s(n,r),h=u(a,f);if(0===o(h))return null;var p=s(t,r),d=u(f,p),g=i(d,h),v=c(a,g);return l(t,v)};var n=t(\\\"big-rat/mul\\\"),i=t(\\\"big-rat/div\\\"),a=t(\\\"big-rat/sub\\\"),o=t(\\\"big-rat/sign\\\"),s=t(\\\"rat-vec/sub\\\"),l=t(\\\"rat-vec/add\\\"),c=t(\\\"rat-vec/muls\\\");function u(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},{\\\"big-rat/div\\\":65,\\\"big-rat/mul\\\":75,\\\"big-rat/sign\\\":76,\\\"big-rat/sub\\\":77,\\\"rat-vec/add\\\":468,\\\"rat-vec/muls\\\":470,\\\"rat-vec/sub\\\":471}],106:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"clamp\\\");function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((a=255&n(a,0,255))<<8)+(o=255&n(o,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:103}],107:[function(t,e,r){\\\"use strict\\\";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],108:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-rgba\\\"),i=t(\\\"clamp\\\"),a=t(\\\"dtype\\\");e.exports=function(t,e){\\\"float\\\"!==e&&e||(e=\\\"array\\\"),\\\"uint\\\"===e&&(e=\\\"uint8\\\"),\\\"uint_clamped\\\"===e&&(e=\\\"uint8_clamped\\\");var r=new(a(e))(4),o=\\\"uint8\\\"!==e&&\\\"uint8_clamped\\\"!==e;return t.length&&\\\"string\\\"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},{clamp:103,\\\"color-rgba\\\":110,dtype:154}],109:[function(t,e,r){(function(r){\\\"use strict\\\";var n=t(\\\"color-name\\\"),i=t(\\\"is-plain-obj\\\"),a=t(\\\"defined\\\");e.exports=function(t){var e,s,l=[],c=1;if(\\\"string\\\"==typeof t)if(n[t])l=n[t].slice(),s=\\\"rgb\\\";else if(\\\"transparent\\\"===t)c=0,s=\\\"rgb\\\",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1),f=u.length,h=f<=4;c=1,h?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===f&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===f&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s=\\\"rgb\\\"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\\\\s*\\\\(([^\\\\)]*)\\\\)/.exec(t)){var p=e[1],u=p.replace(/a$/,\\\"\\\");s=u;var f=\\\"cmyk\\\"===u?4:\\\"gray\\\"===u?1:3;l=e[2].trim().split(/\\\\s*,\\\\s*/).map(function(t,e){if(/%$/.test(t))return e===f?parseFloat(t)/100:\\\"rgb\\\"===u?255*parseFloat(t)/100:parseFloat(t);if(\\\"h\\\"===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),p===u&&l.push(1),c=void 0===l[f]?1:l[f],l=l.slice(0,f)}else t.length>10&&/[0-9](?:\\\\s|\\\\/)/.test(t)&&(l=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),s=t.match(/([a-z])/gi).join(\\\"\\\").toLowerCase());else if(isNaN(t))if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s=\\\"rgb\\\",l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s=\\\"hsl\\\",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s=\\\"rgb\\\",c=4===t.length?t[3]:1);else s=\\\"rgb\\\",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"color-name\\\":107,defined:149,\\\"is-plain-obj\\\":405}],110:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-parse\\\"),i=t(\\\"color-space/hsl\\\"),a=t(\\\"clamp\\\");e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),\\\"h\\\"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:103,\\\"color-parse\\\":109,\\\"color-space/hsl\\\":111}],111:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./rgb\\\");e.exports={name:\\\"hsl\\\",min:[0,0,0],max:[360,100,100],channel:[\\\"hue\\\",\\\"saturation\\\",\\\"lightness\\\"],alias:[\\\"HSL\\\"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[c]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+s)/2,[e,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},{\\\"./rgb\\\":112}],112:[function(t,e,r){\\\"use strict\\\";e.exports={name:\\\"rgb\\\",min:[0,0,0],max:[255,255,255],channel:[\\\"red\\\",\\\"green\\\",\\\"blue\\\"],alias:[\\\"RGB\\\"]}},{}],113:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],\\\"rainbow-soft\\\":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],\\\"freesurface-blue\\\":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],\\\"freesurface-red\\\":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],\\\"velocity-blue\\\":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],\\\"velocity-green\\\":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],114:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./colorScale\\\"),i=t(\\\"lerp\\\");function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r=\\\"#\\\",n=0;n<3;++n)r+=(\\\"00\\\"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return\\\"rgba(\\\"+t.join(\\\",\\\")+\\\")\\\"}e.exports=function(t){var e,r,l,c,u,f,h,p,d,g;t||(t={});p=(t.nshades||72)-1,h=t.format||\\\"hex\\\",(f=t.colormap)||(f=\\\"jet\\\");if(\\\"string\\\"==typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+\\\" not a supported colorscale\\\");u=n[f]}else{if(!Array.isArray(f))throw Error(\\\"unsupported colormap option\\\",f);u=f.slice()}if(u.length>p)throw new Error(f+\\\" map requires nshades to be at least size \\\"+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():\\\"number\\\"==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map(function(t){return Math.round(t.index*p)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var v=u.map(function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1?n:(n[3]=d[0]+(d[1]-d[0])*r,n)}),m=[];for(g=0;g<e.length-1;++g){c=e[g+1]-e[g],r=v[g],l=v[g+1];for(var y=0;y<c;y++){var x=y/c;m.push([Math.round(i(r[0],l[0],x)),Math.round(i(r[1],l[1],x)),Math.round(i(r[2],l[2],x)),i(r[3],l[3],x)])}}m.push(u[u.length-1].rgb.concat(d[1])),\\\"hex\\\"===h?m=m.map(o):\\\"rgbaString\\\"===h?m=m.map(s):\\\"float\\\"===h&&(m=m.map(a));return m}},{\\\"./colorScale\\\":113,lerp:408}],115:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,a){var o=n(e,r,a);if(0===o){var s=i(n(t,e,r)),c=i(n(t,e,a));if(s===c){if(0===s){var u=l(t,e,r),f=l(t,e,a);return u===f?0:u?1:-1}return 0}return 0===c?s>0?-1:l(t,e,a)?-1:1:0===s?c>0?1:l(t,e,r)?1:-1:i(c-s)}var h=n(t,e,r);if(h>0)return o>0&&n(t,e,a)>0?1:-1;if(h<0)return o>0||n(t,e,a)>0?1:-1;var p=n(t,e,a);return p>0?1:l(t,e,r)?1:-1};var n=t(\\\"robust-orientation\\\"),i=t(\\\"signum\\\"),a=t(\\\"two-sum\\\"),o=t(\\\"robust-product\\\"),s=t(\\\"robust-sum\\\");function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),c=a(r[1],-e[1]),u=s(o(n,l),o(i,c));return u[u.length-1]>=0}},{\\\"robust-orientation\\\":486,\\\"robust-product\\\":487,\\\"robust-sum\\\":491,signum:492,\\\"two-sum\\\":521}],116:[function(t,e,r){e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],f=t[1],h=t[2],p=t[3],d=e[0],g=e[1],v=e[2],m=e[3];return u+f+h+p-(d+g+v+m)||n(u,f,h,p)-n(d,g,v,m,d)||n(u+f,u+h,u+p,f+h,f+p,h+p)-n(d+g,d+v,d+m,g+v,g+m,v+m)||n(u+f+h,u+f+p,u+h+p,f+h+p)-n(d+g+v,d+g+m,d+v+m,g+v+m);default:for(var y=t.slice().sort(i),x=e.slice().sort(i),b=0;b<r;++b)if(a=y[b]-x[b])return a;return 0}};var n=Math.min;function i(t,e){return t-e}},{}],117:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"compare-cell\\\"),i=t(\\\"cell-orientation\\\");e.exports=function(t,e){return n(t,e)||i(t)-i(e)}},{\\\"cell-orientation\\\":100,\\\"compare-cell\\\":116}],118:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/ch1d\\\"),i=t(\\\"./lib/ch2d\\\"),a=t(\\\"./lib/chnd\\\");e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[[0]];var r=t[0].length;if(0===r)return[];if(1===r)return n(t);if(2===r)return i(t);return a(t,r)}},{\\\"./lib/ch1d\\\":119,\\\"./lib/ch2d\\\":120,\\\"./lib/chnd\\\":121}],119:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=0,r=0,n=1;n<t.length;++n)t[n][0]<t[e][0]&&(e=n),t[n][0]>t[r][0]&&(r=n);return e<r?[[e],[r]]:e>r?[[r],[e]]:[[e]]}},{}],120:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o<r;++o){var s=e[o];i[o]=[a,s],a=s}return i};var n=t(\\\"monotone-convex-hull-2d\\\")},{\\\"monotone-convex-hull-2d\\\":417}],121:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){try{return n(t,!0)}catch(s){var r=i(t);if(r.length<=e)return[];var a=function(t,e){for(var r=t.length,n=new Array(r),i=0;i<e.length;++i)n[i]=t[e[i]];for(var a=e.length,i=0;i<r;++i)e.indexOf(i)<0&&(n[a++]=t[i]);return n}(t,r),o=n(a,!0);return function(t,e){for(var r=t.length,n=e.length,i=0;i<r;++i)for(var a=t[i],o=0;o<a.length;++o){var s=a[o];if(s<n)a[o]=e[s];else{s-=n;for(var l=0;l<n;++l)s>=e[l]&&(s+=1);a[o]=s}}return t}(o,r)}};var n=t(\\\"incremental-convex-hull\\\"),i=t(\\\"affine-hull\\\")},{\\\"affine-hull\\\":50,\\\"incremental-convex-hull\\\":396}],122:[function(t,e,r){e.exports={AFG:\\\"afghan\\\",ALA:\\\"\\\\\\\\b\\\\\\\\wland\\\",ALB:\\\"albania\\\",DZA:\\\"algeria\\\",ASM:\\\"^(?=.*americ).*samoa\\\",AND:\\\"andorra\\\",AGO:\\\"angola\\\",AIA:\\\"anguill?a\\\",ATA:\\\"antarctica\\\",ATG:\\\"antigua\\\",ARG:\\\"argentin\\\",ARM:\\\"armenia\\\",ABW:\\\"^(?!.*bonaire).*\\\\\\\\baruba\\\",AUS:\\\"australia\\\",AUT:\\\"^(?!.*hungary).*austria|\\\\\\\\baustri.*\\\\\\\\bemp\\\",AZE:\\\"azerbaijan\\\",BHS:\\\"bahamas\\\",BHR:\\\"bahrain\\\",BGD:\\\"bangladesh|^(?=.*east).*paki?stan\\\",BRB:\\\"barbados\\\",BLR:\\\"belarus|byelo\\\",BEL:\\\"^(?!.*luxem).*belgium\\\",BLZ:\\\"belize|^(?=.*british).*honduras\\\",BEN:\\\"benin|dahome\\\",BMU:\\\"bermuda\\\",BTN:\\\"bhutan\\\",BOL:\\\"bolivia\\\",BES:\\\"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\\\\\\\bbes.?islands\\\",BIH:\\\"herzegovina|bosnia\\\",BWA:\\\"botswana|bechuana\\\",BVT:\\\"bouvet\\\",BRA:\\\"brazil\\\",IOT:\\\"british.?indian.?ocean\\\",BRN:\\\"brunei\\\",BGR:\\\"bulgaria\\\",BFA:\\\"burkina|\\\\\\\\bfaso|upper.?volta\\\",BDI:\\\"burundi\\\",CPV:\\\"verde\\\",KHM:\\\"cambodia|kampuchea|khmer\\\",CMR:\\\"cameroon\\\",CAN:\\\"canada\\\",CYM:\\\"cayman\\\",CAF:\\\"\\\\\\\\bcentral.african.republic\\\",TCD:\\\"\\\\\\\\bchad\\\",CHL:\\\"\\\\\\\\bchile\\\",CHN:\\\"^(?!.*\\\\\\\\bmac)(?!.*\\\\\\\\bhong)(?!.*\\\\\\\\btai)(?!.*\\\\\\\\brep).*china|^(?=.*peo)(?=.*rep).*china\\\",CXR:\\\"christmas\\\",CCK:\\\"\\\\\\\\bcocos|keeling\\\",COL:\\\"colombia\\\",COM:\\\"comoro\\\",COG:\\\"^(?!.*\\\\\\\\bdem)(?!.*\\\\\\\\bd[\\\\\\\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\\\\\\\bcongo\\\",COK:\\\"\\\\\\\\bcook\\\",CRI:\\\"costa.?rica\\\",CIV:\\\"ivoire|ivory\\\",HRV:\\\"croatia\\\",CUB:\\\"\\\\\\\\bcuba\\\",CUW:\\\"^(?!.*bonaire).*\\\\\\\\bcura(c|\\\\xe7)ao\\\",CYP:\\\"cyprus\\\",CSK:\\\"czechoslovakia\\\",CZE:\\\"^(?=.*rep).*czech|czechia|bohemia\\\",COD:\\\"\\\\\\\\bdem.*congo|congo.*\\\\\\\\bdem|congo.*\\\\\\\\bd[\\\\\\\\.]?r|\\\\\\\\bd[\\\\\\\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc\\\",DNK:\\\"denmark\\\",DJI:\\\"djibouti\\\",DMA:\\\"dominica(?!n)\\\",DOM:\\\"dominican.rep\\\",ECU:\\\"ecuador\\\",EGY:\\\"egypt\\\",SLV:\\\"el.?salvador\\\",GNQ:\\\"guine.*eq|eq.*guine|^(?=.*span).*guinea\\\",ERI:\\\"eritrea\\\",EST:\\\"estonia\\\",ETH:\\\"ethiopia|abyssinia\\\",FLK:\\\"falkland|malvinas\\\",FRO:\\\"faroe|faeroe\\\",FJI:\\\"fiji\\\",FIN:\\\"finland\\\",FRA:\\\"^(?!.*\\\\\\\\bdep)(?!.*martinique).*france|french.?republic|\\\\\\\\bgaul\\\",GUF:\\\"^(?=.*french).*guiana\\\",PYF:\\\"french.?polynesia|tahiti\\\",ATF:\\\"french.?southern\\\",GAB:\\\"gabon\\\",GMB:\\\"gambia\\\",GEO:\\\"^(?!.*south).*georgia\\\",DDR:\\\"german.?democratic.?republic|democratic.?republic.*germany|east.germany\\\",DEU:\\\"^(?!.*east).*germany|^(?=.*\\\\\\\\bfed.*\\\\\\\\brep).*german\\\",GHA:\\\"ghana|gold.?coast\\\",GIB:\\\"gibraltar\\\",GRC:\\\"greece|hellenic|hellas\\\",GRL:\\\"greenland\\\",GRD:\\\"grenada\\\",GLP:\\\"guadeloupe\\\",GUM:\\\"\\\\\\\\bguam\\\",GTM:\\\"guatemala\\\",GGY:\\\"guernsey\\\",GIN:\\\"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea\\\",GNB:\\\"bissau|^(?=.*portu).*guinea\\\",GUY:\\\"guyana|british.?guiana\\\",HTI:\\\"haiti\\\",HMD:\\\"heard.*mcdonald\\\",VAT:\\\"holy.?see|vatican|papal.?st\\\",HND:\\\"^(?!.*brit).*honduras\\\",HKG:\\\"hong.?kong\\\",HUN:\\\"^(?!.*austr).*hungary\\\",ISL:\\\"iceland\\\",IND:\\\"india(?!.*ocea)\\\",IDN:\\\"indonesia\\\",IRN:\\\"\\\\\\\\biran|persia\\\",IRQ:\\\"\\\\\\\\biraq|mesopotamia\\\",IRL:\\\"(^ireland)|(^republic.*ireland)\\\",IMN:\\\"^(?=.*isle).*\\\\\\\\bman\\\",ISR:\\\"israel\\\",ITA:\\\"italy\\\",JAM:\\\"jamaica\\\",JPN:\\\"japan\\\",JEY:\\\"jersey\\\",JOR:\\\"jordan\\\",KAZ:\\\"kazak\\\",KEN:\\\"kenya|british.?east.?africa|east.?africa.?prot\\\",KIR:\\\"kiribati\\\",PRK:\\\"^(?=.*democrat|people|north|d.*p.*.r).*\\\\\\\\bkorea|dprk|korea.*(d.*p.*r)\\\",KWT:\\\"kuwait\\\",KGZ:\\\"kyrgyz|kirghiz\\\",LAO:\\\"\\\\\\\\blaos?\\\\\\\\b\\\",LVA:\\\"latvia\\\",LBN:\\\"lebanon\\\",LSO:\\\"lesotho|basuto\\\",LBR:\\\"liberia\\\",LBY:\\\"libya\\\",LIE:\\\"liechtenstein\\\",LTU:\\\"lithuania\\\",LUX:\\\"^(?!.*belg).*luxem\\\",MAC:\\\"maca(o|u)\\\",MDG:\\\"madagascar|malagasy\\\",MWI:\\\"malawi|nyasa\\\",MYS:\\\"malaysia\\\",MDV:\\\"maldive\\\",MLI:\\\"\\\\\\\\bmali\\\\\\\\b\\\",MLT:\\\"\\\\\\\\bmalta\\\",MHL:\\\"marshall\\\",MTQ:\\\"martinique\\\",MRT:\\\"mauritania\\\",MUS:\\\"mauritius\\\",MYT:\\\"\\\\\\\\bmayotte\\\",MEX:\\\"\\\\\\\\bmexic\\\",FSM:\\\"fed.*micronesia|micronesia.*fed\\\",MCO:\\\"monaco\\\",MNG:\\\"mongolia\\\",MNE:\\\"^(?!.*serbia).*montenegro\\\",MSR:\\\"montserrat\\\",MAR:\\\"morocco|\\\\\\\\bmaroc\\\",MOZ:\\\"mozambique\\\",MMR:\\\"myanmar|burma\\\",NAM:\\\"namibia\\\",NRU:\\\"nauru\\\",NPL:\\\"nepal\\\",NLD:\\\"^(?!.*\\\\\\\\bant)(?!.*\\\\\\\\bcarib).*netherlands\\\",ANT:\\\"^(?=.*\\\\\\\\bant).*(nether|dutch)\\\",NCL:\\\"new.?caledonia\\\",NZL:\\\"new.?zealand\\\",NIC:\\\"nicaragua\\\",NER:\\\"\\\\\\\\bniger(?!ia)\\\",NGA:\\\"nigeria\\\",NIU:\\\"niue\\\",NFK:\\\"norfolk\\\",MNP:\\\"mariana\\\",NOR:\\\"norway\\\",OMN:\\\"\\\\\\\\boman|trucial\\\",PAK:\\\"^(?!.*east).*paki?stan\\\",PLW:\\\"palau\\\",PSE:\\\"palestin|\\\\\\\\bgaza|west.?bank\\\",PAN:\\\"panama\\\",PNG:\\\"papua|new.?guinea\\\",PRY:\\\"paraguay\\\",PER:\\\"peru\\\",PHL:\\\"philippines\\\",PCN:\\\"pitcairn\\\",POL:\\\"poland\\\",PRT:\\\"portugal\\\",PRI:\\\"puerto.?rico\\\",QAT:\\\"qatar\\\",KOR:\\\"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\\\\\\\bkorea(?!.*d.*p.*r)\\\",MDA:\\\"moldov|b(a|e)ssarabia\\\",REU:\\\"r(e|\\\\xe9)union\\\",ROU:\\\"r(o|u|ou)mania\\\",RUS:\\\"\\\\\\\\brussia|soviet.?union|u\\\\\\\\.?s\\\\\\\\.?s\\\\\\\\.?r|socialist.?republics\\\",RWA:\\\"rwanda\\\",BLM:\\\"barth(e|\\\\xe9)lemy\\\",SHN:\\\"helena\\\",KNA:\\\"kitts|\\\\\\\\bnevis\\\",LCA:\\\"\\\\\\\\blucia\\\",MAF:\\\"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)\\\",SPM:\\\"miquelon\\\",VCT:\\\"vincent\\\",WSM:\\\"^(?!.*amer).*samoa\\\",SMR:\\\"san.?marino\\\",STP:\\\"\\\\\\\\bs(a|\\\\xe3)o.?tom(e|\\\\xe9)\\\",SAU:\\\"\\\\\\\\bsa\\\\\\\\w*.?arabia\\\",SEN:\\\"senegal\\\",SRB:\\\"^(?!.*monte).*serbia\\\",SYC:\\\"seychell\\\",SLE:\\\"sierra\\\",SGP:\\\"singapore\\\",SXM:\\\"^(?!.*martin)(?!.*saba).*maarten\\\",SVK:\\\"^(?!.*cze).*slovak\\\",SVN:\\\"slovenia\\\",SLB:\\\"solomon\\\",SOM:\\\"somali\\\",ZAF:\\\"south.africa|s\\\\\\\\\\\\\\\\..?africa\\\",SGS:\\\"south.?georgia|sandwich\\\",SSD:\\\"\\\\\\\\bs\\\\\\\\w*.?sudan\\\",ESP:\\\"spain\\\",LKA:\\\"sri.?lanka|ceylon\\\",SDN:\\\"^(?!.*\\\\\\\\bs(?!u)).*sudan\\\",SUR:\\\"surinam|dutch.?guiana\\\",SJM:\\\"svalbard\\\",SWZ:\\\"swaziland\\\",SWE:\\\"sweden\\\",CHE:\\\"switz|swiss\\\",SYR:\\\"syria\\\",TWN:\\\"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china\\\",TJK:\\\"tajik\\\",THA:\\\"thailand|\\\\\\\\bsiam\\\",MKD:\\\"macedonia|fyrom\\\",TLS:\\\"^(?=.*leste).*timor|^(?=.*east).*timor\\\",TGO:\\\"togo\\\",TKL:\\\"tokelau\\\",TON:\\\"tonga\\\",TTO:\\\"trinidad|tobago\\\",TUN:\\\"tunisia\\\",TUR:\\\"turkey\\\",TKM:\\\"turkmen\\\",TCA:\\\"turks\\\",TUV:\\\"tuvalu\\\",UGA:\\\"uganda\\\",UKR:\\\"ukrain\\\",ARE:\\\"emirates|^u\\\\\\\\.?a\\\\\\\\.?e\\\\\\\\.?$|united.?arab.?em\\\",GBR:\\\"united.?kingdom|britain|^u\\\\\\\\.?k\\\\\\\\.?$\\\",TZA:\\\"tanzania\\\",USA:\\\"united.?states\\\\\\\\b(?!.*islands)|\\\\\\\\bu\\\\\\\\.?s\\\\\\\\.?a\\\\\\\\.?\\\\\\\\b|^\\\\\\\\s*u\\\\\\\\.?s\\\\\\\\.?\\\\\\\\b(?!.*islands)\\\",UMI:\\\"minor.?outlying.?is\\\",URY:\\\"uruguay\\\",UZB:\\\"uzbek\\\",VUT:\\\"vanuatu|new.?hebrides\\\",VEN:\\\"venezuela\\\",VNM:\\\"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam\\\",VGB:\\\"^(?=.*\\\\\\\\bu\\\\\\\\.?\\\\\\\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin\\\",VIR:\\\"^(?=.*\\\\\\\\bu\\\\\\\\.?\\\\\\\\s?s).*virgin|^(?=.*states).*virgin\\\",WLF:\\\"futuna|wallis\\\",ESH:\\\"western.sahara\\\",YEM:\\\"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\\\\\\\bp\\\\\\\\.?d\\\\\\\\.?r).*yemen\\\",YMD:\\\"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\\\\\\\bp\\\\\\\\.?d\\\\\\\\.?r).*yemen\\\",YUG:\\\"yugoslavia\\\",ZMB:\\\"zambia|northern.?rhodesia\\\",EAZ:\\\"zanzibar\\\",ZWE:\\\"zimbabwe|^(?!.*northern).*rhodesia\\\"}},{}],123:[function(t,e,r){e.exports=[\\\"xx-small\\\",\\\"x-small\\\",\\\"small\\\",\\\"medium\\\",\\\"large\\\",\\\"x-large\\\",\\\"xx-large\\\",\\\"larger\\\",\\\"smaller\\\"]},{}],124:[function(t,e,r){e.exports=[\\\"normal\\\",\\\"condensed\\\",\\\"semi-condensed\\\",\\\"extra-condensed\\\",\\\"ultra-condensed\\\",\\\"expanded\\\",\\\"semi-expanded\\\",\\\"extra-expanded\\\",\\\"ultra-expanded\\\"]},{}],125:[function(t,e,r){e.exports=[\\\"normal\\\",\\\"italic\\\",\\\"oblique\\\"]},{}],126:[function(t,e,r){e.exports=[\\\"normal\\\",\\\"bold\\\",\\\"bolder\\\",\\\"lighter\\\",\\\"100\\\",\\\"200\\\",\\\"300\\\",\\\"400\\\",\\\"500\\\",\\\"600\\\",\\\"700\\\",\\\"800\\\",\\\"900\\\"]},{}],127:[function(t,e,r){\\\"use strict\\\";e.exports={parse:t(\\\"./parse\\\"),stringify:t(\\\"./stringify\\\")}},{\\\"./parse\\\":129,\\\"./stringify\\\":130}],128:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"css-font-size-keywords\\\");e.exports={isSize:function(t){return/^[\\\\d\\\\.]/.test(t)||-1!==t.indexOf(\\\"/\\\")||-1!==n.indexOf(t)}}},{\\\"css-font-size-keywords\\\":123}],129:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"unquote\\\"),i=t(\\\"css-global-keywords\\\"),a=t(\\\"css-system-font-keywords\\\"),o=t(\\\"css-font-weight-keywords\\\"),s=t(\\\"css-font-style-keywords\\\"),l=t(\\\"css-font-stretch-keywords\\\"),c=t(\\\"string-split-by\\\"),u=t(\\\"./lib/util\\\").isSize;e.exports=h;var f=h.cache={};function h(t){if(\\\"string\\\"!=typeof t)throw new Error(\\\"Font argument must be a string.\\\");if(f[t])return f[t];if(\\\"\\\"===t)throw new Error(\\\"Cannot parse an empty string.\\\");if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:\\\"normal\\\",variant:\\\"normal\\\",weight:\\\"normal\\\",stretch:\\\"normal\\\",lineHeight:\\\"normal\\\",size:\\\"1rem\\\",family:[\\\"serif\\\"]},h=c(t,/\\\\s+/);e=h.shift();){if(-1!==i.indexOf(e))return[\\\"style\\\",\\\"variant\\\",\\\"weight\\\",\\\"stretch\\\"].forEach(function(t){r[t]=e}),f[t]=r;if(-1===s.indexOf(e))if(\\\"normal\\\"!==e&&\\\"small-caps\\\"!==e)if(-1===l.indexOf(e)){if(-1===o.indexOf(e)){if(u(e)){var d=c(e,\\\"/\\\");if(r.size=d[0],null!=d[1]?r.lineHeight=p(d[1]):\\\"/\\\"===h[0]&&(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw new Error(\\\"Missing required font-family.\\\");return r.family=c(h.join(\\\" \\\"),/\\\\s*,\\\\s*/).map(n),f[t]=r}throw new Error(\\\"Unknown or unsupported font token: \\\"+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error(\\\"Missing required font-size.\\\")}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},{\\\"./lib/util\\\":128,\\\"css-font-stretch-keywords\\\":124,\\\"css-font-style-keywords\\\":125,\\\"css-font-weight-keywords\\\":126,\\\"css-global-keywords\\\":131,\\\"css-system-font-keywords\\\":132,\\\"string-split-by\\\":505,unquote:525}],130:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"pick-by-alias\\\"),i=t(\\\"./lib/util\\\").isSize,a=g(t(\\\"css-global-keywords\\\")),o=g(t(\\\"css-system-font-keywords\\\")),s=g(t(\\\"css-font-weight-keywords\\\")),l=g(t(\\\"css-font-style-keywords\\\")),c=g(t(\\\"css-font-stretch-keywords\\\")),u={normal:1,\\\"small-caps\\\":1},f={serif:1,\\\"sans-serif\\\":1,monospace:1,cursive:1,fantasy:1,\\\"system-ui\\\":1},h=\\\"1rem\\\",p=\\\"serif\\\";function d(t,e){if(t&&!e[t]&&!a[t])throw Error(\\\"Unknown keyword `\\\"+t+\\\"`\\\");return t}function g(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=1;return e}e.exports=function(t){if((t=n(t,{style:\\\"style fontstyle fontStyle font-style slope distinction\\\",variant:\\\"variant font-variant fontVariant fontvariant var capitalization\\\",weight:\\\"weight w font-weight fontWeight fontweight\\\",stretch:\\\"stretch font-stretch fontStretch fontstretch width\\\",size:\\\"size s font-size fontSize fontsize height em emSize\\\",lineHeight:\\\"lh line-height lineHeight lineheight leading\\\",family:\\\"font family fontFamily font-family fontfamily type typeface face\\\",system:\\\"system reserved default global\\\"})).system)return t.system&&d(t.system,o),t.system;if(d(t.style,l),d(t.variant,u),d(t.weight,s),d(t.stretch,c),null==t.size&&(t.size=h),\\\"number\\\"==typeof t.size&&(t.size+=\\\"px\\\"),!i)throw Error(\\\"Bad size value `\\\"+t.size+\\\"`\\\");t.family||(t.family=p),Array.isArray(t.family)&&(t.family.length||(t.family=[p]),t.family=t.family.map(function(t){return f[t]?t:'\\\"'+t+'\\\"'}).join(\\\", \\\"));var e=[];return e.push(t.style),t.variant!==t.style&&e.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&e.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&e.push(t.stretch),e.push(t.size+(null==t.lineHeight||\\\"normal\\\"===t.lineHeight||t.lineHeight+\\\"\\\"==\\\"1\\\"?\\\"\\\":\\\"/\\\"+t.lineHeight)),e.push(t.family),e.filter(Boolean).join(\\\" \\\")}},{\\\"./lib/util\\\":128,\\\"css-font-stretch-keywords\\\":124,\\\"css-font-style-keywords\\\":125,\\\"css-font-weight-keywords\\\":126,\\\"css-global-keywords\\\":131,\\\"css-system-font-keywords\\\":132,\\\"pick-by-alias\\\":448}],131:[function(t,e,r){e.exports=[\\\"inherit\\\",\\\"initial\\\",\\\"unset\\\"]},{}],132:[function(t,e,r){e.exports=[\\\"caption\\\",\\\"icon\\\",\\\"menu\\\",\\\"message-box\\\",\\\"small-caption\\\",\\\"status-bar\\\"]},{}],133:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var p=t.length-1;p>=0;--p)a[p]=c*t[p]+u*e[p]+f*r[p]+h*n[p];return a}return c*t+u*e+f*r+h*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u>=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],134:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/thunk.js\\\");function i(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName=\\\"\\\",this.pre=null,this.body=null,this.post=null,this.debug=!1}e.exports=function(t){var e=new i;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var a=0;a<r.length;++a){var o=r[a];if(\\\"array\\\"===o||\\\"object\\\"==typeof o&&o.blockIndices){if(e.argTypes[a]=\\\"array\\\",e.arrayArgs.push(a),e.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),e.shimArgs.push(\\\"array\\\"+a),a<e.pre.args.length&&e.pre.args[a].count>0)throw new Error(\\\"cwise: pre() block may not reference array args\\\");if(a<e.post.args.length&&e.post.args[a].count>0)throw new Error(\\\"cwise: post() block may not reference array args\\\")}else if(\\\"scalar\\\"===o)e.scalarArgs.push(a),e.shimArgs.push(\\\"scalar\\\"+a);else if(\\\"index\\\"===o){if(e.indexArgs.push(a),a<e.pre.args.length&&e.pre.args[a].count>0)throw new Error(\\\"cwise: pre() block may not reference array index\\\");if(a<e.body.args.length&&e.body.args[a].lvalue)throw new Error(\\\"cwise: body() block may not write to array index\\\");if(a<e.post.args.length&&e.post.args[a].count>0)throw new Error(\\\"cwise: post() block may not reference array index\\\")}else if(\\\"shape\\\"===o){if(e.shapeArgs.push(a),a<e.pre.args.length&&e.pre.args[a].lvalue)throw new Error(\\\"cwise: pre() block may not write to array shape\\\");if(a<e.body.args.length&&e.body.args[a].lvalue)throw new Error(\\\"cwise: body() block may not write to array shape\\\");if(a<e.post.args.length&&e.post.args[a].lvalue)throw new Error(\\\"cwise: post() block may not write to array shape\\\")}else{if(\\\"object\\\"!=typeof o||!o.offset)throw new Error(\\\"cwise: Unknown argument type \\\"+r[a]);e.argTypes[a]=\\\"offset\\\",e.offsetArgs.push({array:o.array,offset:o.offset}),e.offsetArgIndex.push(a)}}if(e.arrayArgs.length<=0)throw new Error(\\\"cwise: No array arguments specified\\\");if(e.pre.args.length>r.length)throw new Error(\\\"cwise: Too many arguments in pre() block\\\");if(e.body.args.length>r.length)throw new Error(\\\"cwise: Too many arguments in body() block\\\");if(e.post.args.length>r.length)throw new Error(\\\"cwise: Too many arguments in post() block\\\");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||\\\"cwise\\\",e.blockSize=t.blockSize||64,n(e)}},{\\\"./lib/thunk.js\\\":136}],135:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"uniq\\\");function i(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],c=[],u=0,f=0;for(n=0;n<a;++n)c.push([\\\"i\\\",n,\\\"=0\\\"].join(\\\"\\\"));for(i=0;i<o;++i)for(n=0;n<a;++n)f=u,u=t[n],0===n?c.push([\\\"d\\\",i,\\\"s\\\",n,\\\"=t\\\",i,\\\"p\\\",u].join(\\\"\\\")):c.push([\\\"d\\\",i,\\\"s\\\",n,\\\"=(t\\\",i,\\\"p\\\",u,\\\"-s\\\",f,\\\"*t\\\",i,\\\"p\\\",f,\\\")\\\"].join(\\\"\\\"));for(c.length>0&&l.push(\\\"var \\\"+c.join(\\\",\\\")),n=a-1;n>=0;--n)u=t[n],l.push([\\\"for(i\\\",n,\\\"=0;i\\\",n,\\\"<s\\\",u,\\\";++i\\\",n,\\\"){\\\"].join(\\\"\\\"));for(l.push(r),n=0;n<a;++n){for(f=u,u=t[n],i=0;i<o;++i)l.push([\\\"p\\\",i,\\\"+=d\\\",i,\\\"s\\\",n].join(\\\"\\\"));s&&(n>0&&l.push([\\\"index[\\\",f,\\\"]-=s\\\",f].join(\\\"\\\")),l.push([\\\"++index[\\\",u,\\\"]\\\"].join(\\\"\\\"))),l.push(\\\"}\\\")}return l.join(\\\"\\\\n\\\")}function a(t,e,r){for(var n=t.body,i=[],a=[],o=0;o<t.args.length;++o){var s=t.args[o];if(!(s.count<=0)){var l=new RegExp(s.name,\\\"g\\\"),c=\\\"\\\",u=e.arrayArgs.indexOf(o);switch(e.argTypes[o]){case\\\"offset\\\":var f=e.offsetArgIndex.indexOf(o);u=e.offsetArgs[f].array,c=\\\"+q\\\"+f;case\\\"array\\\":c=\\\"p\\\"+u+c;var h=\\\"l\\\"+o,p=\\\"a\\\"+u;if(0===e.arrayBlockIndices[u])1===s.count?\\\"generic\\\"===r[u]?s.lvalue?(i.push([\\\"var \\\",h,\\\"=\\\",p,\\\".get(\\\",c,\\\")\\\"].join(\\\"\\\")),n=n.replace(l,h),a.push([p,\\\".set(\\\",c,\\\",\\\",h,\\\")\\\"].join(\\\"\\\"))):n=n.replace(l,[p,\\\".get(\\\",c,\\\")\\\"].join(\\\"\\\")):n=n.replace(l,[p,\\\"[\\\",c,\\\"]\\\"].join(\\\"\\\")):\\\"generic\\\"===r[u]?(i.push([\\\"var \\\",h,\\\"=\\\",p,\\\".get(\\\",c,\\\")\\\"].join(\\\"\\\")),n=n.replace(l,h),s.lvalue&&a.push([p,\\\".set(\\\",c,\\\",\\\",h,\\\")\\\"].join(\\\"\\\"))):(i.push([\\\"var \\\",h,\\\"=\\\",p,\\\"[\\\",c,\\\"]\\\"].join(\\\"\\\")),n=n.replace(l,h),s.lvalue&&a.push([p,\\\"[\\\",c,\\\"]=\\\",h].join(\\\"\\\")));else{for(var d=[s.name],g=[c],v=0;v<Math.abs(e.arrayBlockIndices[u]);v++)d.push(\\\"\\\\\\\\s*\\\\\\\\[([^\\\\\\\\]]+)\\\\\\\\]\\\"),g.push(\\\"$\\\"+(v+1)+\\\"*t\\\"+u+\\\"b\\\"+v);if(l=new RegExp(d.join(\\\"\\\"),\\\"g\\\"),c=g.join(\\\"+\\\"),\\\"generic\\\"===r[u])throw new Error(\\\"cwise: Generic arrays not supported in combination with blocks!\\\");n=n.replace(l,[p,\\\"[\\\",c,\\\"]\\\"].join(\\\"\\\"))}break;case\\\"scalar\\\":n=n.replace(l,\\\"Y\\\"+e.scalarArgs.indexOf(o));break;case\\\"index\\\":n=n.replace(l,\\\"index\\\");break;case\\\"shape\\\":n=n.replace(l,\\\"shape\\\")}}}return[i.join(\\\"\\\\n\\\"),n,a.join(\\\"\\\\n\\\")].join(\\\"\\\\n\\\").trim()}e.exports=function(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,o=new Array(t.arrayArgs.length),s=new Array(t.arrayArgs.length),l=0;l<t.arrayArgs.length;++l)s[l]=e[2*l],o[l]=e[2*l+1];var c=[],u=[],f=[],h=[],p=[];for(l=0;l<t.arrayArgs.length;++l){t.arrayBlockIndices[l]<0?(f.push(0),h.push(r),c.push(r),u.push(r+t.arrayBlockIndices[l])):(f.push(t.arrayBlockIndices[l]),h.push(t.arrayBlockIndices[l]+r),c.push(0),u.push(t.arrayBlockIndices[l]));for(var d=[],g=0;g<o[l].length;g++)f[l]<=o[l][g]&&o[l][g]<h[l]&&d.push(o[l][g]-f[l]);p.push(d)}var v=[\\\"SS\\\"],m=[\\\"'use strict'\\\"],y=[];for(g=0;g<r;++g)y.push([\\\"s\\\",g,\\\"=SS[\\\",g,\\\"]\\\"].join(\\\"\\\"));for(l=0;l<t.arrayArgs.length;++l){for(v.push(\\\"a\\\"+l),v.push(\\\"t\\\"+l),v.push(\\\"p\\\"+l),g=0;g<r;++g)y.push([\\\"t\\\",l,\\\"p\\\",g,\\\"=t\\\",l,\\\"[\\\",f[l]+g,\\\"]\\\"].join(\\\"\\\"));for(g=0;g<Math.abs(t.arrayBlockIndices[l]);++g)y.push([\\\"t\\\",l,\\\"b\\\",g,\\\"=t\\\",l,\\\"[\\\",c[l]+g,\\\"]\\\"].join(\\\"\\\"))}for(l=0;l<t.scalarArgs.length;++l)v.push(\\\"Y\\\"+l);if(t.shapeArgs.length>0&&y.push(\\\"shape=SS.slice(0)\\\"),t.indexArgs.length>0){var x=new Array(r);for(l=0;l<r;++l)x[l]=\\\"0\\\";y.push([\\\"index=[\\\",x.join(\\\",\\\"),\\\"]\\\"].join(\\\"\\\"))}for(l=0;l<t.offsetArgs.length;++l){var b=t.offsetArgs[l],_=[];for(g=0;g<b.offset.length;++g)0!==b.offset[g]&&(1===b.offset[g]?_.push([\\\"t\\\",b.array,\\\"p\\\",g].join(\\\"\\\")):_.push([b.offset[g],\\\"*t\\\",b.array,\\\"p\\\",g].join(\\\"\\\")));0===_.length?y.push(\\\"q\\\"+l+\\\"=0\\\"):y.push([\\\"q\\\",l,\\\"=\\\",_.join(\\\"+\\\")].join(\\\"\\\"))}var w=n([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for((y=y.concat(w)).length>0&&m.push(\\\"var \\\"+y.join(\\\",\\\")),l=0;l<t.arrayArgs.length;++l)m.push(\\\"p\\\"+l+\\\"|=0\\\");t.pre.body.length>3&&m.push(a(t.pre,t,s));var k=a(t.body,t,s),M=function(t){for(var e=0,r=t[0].length;e<r;){for(var n=1;n<t.length;++n)if(t[n][e]!==t[0][e])return e;++e}return e}(p);M<r?m.push(function(t,e,r,n){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,c=[],u=0;u<o;++u)c.push([\\\"var offset\\\",u,\\\"=p\\\",u].join(\\\"\\\"));for(u=t;u<a;++u)c.push([\\\"for(var j\\\"+u+\\\"=SS[\\\",e[u],\\\"]|0;j\\\",u,\\\">0;){\\\"].join(\\\"\\\")),c.push([\\\"if(j\\\",u,\\\"<\\\",s,\\\"){\\\"].join(\\\"\\\")),c.push([\\\"s\\\",e[u],\\\"=j\\\",u].join(\\\"\\\")),c.push([\\\"j\\\",u,\\\"=0\\\"].join(\\\"\\\")),c.push([\\\"}else{s\\\",e[u],\\\"=\\\",s].join(\\\"\\\")),c.push([\\\"j\\\",u,\\\"-=\\\",s,\\\"}\\\"].join(\\\"\\\")),l&&c.push([\\\"index[\\\",e[u],\\\"]=j\\\",u].join(\\\"\\\"));for(u=0;u<o;++u){for(var f=[\\\"offset\\\"+u],h=t;h<a;++h)f.push([\\\"j\\\",h,\\\"*t\\\",u,\\\"p\\\",e[h]].join(\\\"\\\"));c.push([\\\"p\\\",u,\\\"=(\\\",f.join(\\\"+\\\"),\\\")\\\"].join(\\\"\\\"))}for(c.push(i(e,r,n)),u=t;u<a;++u)c.push(\\\"}\\\");return c.join(\\\"\\\\n\\\")}(M,p[0],t,k)):m.push(i(p[0],t,k)),t.post.body.length>3&&m.push(a(t.post,t,s)),t.debug&&console.log(\\\"-----Generated cwise routine for \\\",e,\\\":\\\\n\\\"+m.join(\\\"\\\\n\\\")+\\\"\\\\n----------\\\");var A=[t.funcName||\\\"unnamed\\\",\\\"_cwise_loop_\\\",o[0].join(\\\"s\\\"),\\\"m\\\",M,function(t){for(var e=new Array(t.length),r=!0,n=0;n<t.length;++n){var i=t[n],a=i.match(/\\\\d+/);a=a?a[0]:\\\"\\\",0===i.charAt(0)?e[n]=\\\"u\\\"+i.charAt(1)+a:e[n]=i.charAt(0)+a,n>0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join(\\\"\\\")}(s)].join(\\\"\\\");return new Function([\\\"function \\\",A,\\\"(\\\",v.join(\\\",\\\"),\\\"){\\\",m.join(\\\"\\\\n\\\"),\\\"} return \\\",A].join(\\\"\\\"))()}},{uniq:524}],136:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./compile.js\\\");e.exports=function(t){var e=[\\\"'use strict'\\\",\\\"var CACHED={}\\\"],r=[],i=t.funcName+\\\"_cwise_thunk\\\";e.push([\\\"return function \\\",i,\\\"(\\\",t.shimArgs.join(\\\",\\\"),\\\"){\\\"].join(\\\"\\\"));for(var a=[],o=[],s=[[\\\"array\\\",t.arrayArgs[0],\\\".shape.slice(\\\",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?\\\",\\\"+t.arrayBlockIndices[0]+\\\")\\\":\\\")\\\"].join(\\\"\\\")],l=[],c=[],u=0;u<t.arrayArgs.length;++u){var f=t.arrayArgs[u];r.push([\\\"t\\\",f,\\\"=array\\\",f,\\\".dtype,\\\",\\\"r\\\",f,\\\"=array\\\",f,\\\".order\\\"].join(\\\"\\\")),a.push(\\\"t\\\"+f),a.push(\\\"r\\\"+f),o.push(\\\"t\\\"+f),o.push(\\\"r\\\"+f+\\\".join()\\\"),s.push(\\\"array\\\"+f+\\\".data\\\"),s.push(\\\"array\\\"+f+\\\".stride\\\"),s.push(\\\"array\\\"+f+\\\".offset|0\\\"),u>0&&(l.push(\\\"array\\\"+t.arrayArgs[0]+\\\".shape.length===array\\\"+f+\\\".shape.length+\\\"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push(\\\"array\\\"+t.arrayArgs[0]+\\\".shape[shapeIndex+\\\"+Math.max(0,t.arrayBlockIndices[0])+\\\"]===array\\\"+f+\\\".shape[shapeIndex+\\\"+Math.max(0,t.arrayBlockIndices[u])+\\\"]\\\"))}for(t.arrayArgs.length>1&&(e.push(\\\"if (!(\\\"+l.join(\\\" && \\\")+\\\")) throw new Error('cwise: Arrays do not all have the same dimensionality!')\\\"),e.push(\\\"for(var shapeIndex=array\\\"+t.arrayArgs[0]+\\\".shape.length-\\\"+Math.abs(t.arrayBlockIndices[0])+\\\"; shapeIndex--\\\\x3e0;) {\\\"),e.push(\\\"if (!(\\\"+c.join(\\\" && \\\")+\\\")) throw new Error('cwise: Arrays do not all have the same shape!')\\\"),e.push(\\\"}\\\")),u=0;u<t.scalarArgs.length;++u)s.push(\\\"scalar\\\"+t.scalarArgs[u]);return r.push([\\\"type=[\\\",o.join(\\\",\\\"),\\\"].join()\\\"].join(\\\"\\\")),r.push(\\\"proc=CACHED[type]\\\"),e.push(\\\"var \\\"+r.join(\\\",\\\")),e.push([\\\"if(!proc){\\\",\\\"CACHED[type]=proc=compile([\\\",a.join(\\\",\\\"),\\\"])}\\\",\\\"return proc(\\\",s.join(\\\",\\\"),\\\")}\\\"].join(\\\"\\\")),t.debug&&console.log(\\\"-----Generated thunk:\\\\n\\\"+e.join(\\\"\\\\n\\\")+\\\"\\\\n----------\\\"),new Function(\\\"compile\\\",e.join(\\\"\\\\n\\\"))(n.bind(void 0,t))}},{\\\"./compile.js\\\":135}],137:[function(t,e,r){e.exports=t(\\\"cwise-compiler\\\")},{\\\"cwise-compiler\\\":134}],138:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/object/copy\\\"),a=t(\\\"es5-ext/object/normalize-options\\\"),o=t(\\\"es5-ext/object/valid-callable\\\"),s=t(\\\"es5-ext/object/map\\\"),l=t(\\\"es5-ext/object/valid-callable\\\"),c=t(\\\"es5-ext/object/valid-value\\\"),u=Function.prototype.bind,f=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,a=c(e)&&l(e.value);return delete(n=i(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?a:(e.value=u.call(a,r.resolveContext?r.resolveContext(this):this),f(this,t,e),this[t])},n},e.exports=function(t){var e=a(arguments[1]);return null!=e.resolveContext&&o(e.resolveContext),s(t,function(t,r){return n(r,t,e)})}},{\\\"es5-ext/object/copy\\\":174,\\\"es5-ext/object/map\\\":183,\\\"es5-ext/object/normalize-options\\\":184,\\\"es5-ext/object/valid-callable\\\":188,\\\"es5-ext/object/valid-value\\\":190}],139:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es5-ext/object/assign\\\"),i=t(\\\"es5-ext/object/normalize-options\\\"),a=t(\\\"es5-ext/object/is-callable\\\"),o=t(\\\"es5-ext/string/#/contains\\\");(e.exports=function(t,e){var r,a,s,l,c;return arguments.length<2||\\\"string\\\"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(r=s=!0,a=!1):(r=o.call(t,\\\"c\\\"),a=o.call(t,\\\"e\\\"),s=o.call(t,\\\"w\\\")),c={value:e,configurable:r,enumerable:a,writable:s},l?n(i(l),c):c}).gs=function(t,e,r){var s,l,c,u;return\\\"string\\\"!=typeof t?(c=r,r=e,e=t,t=null):c=arguments[3],null==e?e=void 0:a(e)?null==r?r=void 0:a(r)||(c=r,r=void 0):(c=e,e=r=void 0),null==t?(s=!0,l=!1):(s=o.call(t,\\\"c\\\"),l=o.call(t,\\\"e\\\")),u={get:e,set:r,configurable:s,enumerable:l},c?n(i(c),u):u}},{\\\"es5-ext/object/assign\\\":171,\\\"es5-ext/object/is-callable\\\":177,\\\"es5-ext/object/normalize-options\\\":184,\\\"es5-ext/string/#/contains\\\":191}],140:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";function e(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function r(t){var r;return 1===t.length&&(r=t,t=function(t,n){return e(r(t),n)}),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}var n=r(e),i=n.right,a=n.left;function o(t,e){return[t,e]}function s(t){return null===t?NaN:+t}function l(t,e){var r,n,i=t.length,a=0,o=-1,l=0,c=0;if(null==e)for(;++o<i;)isNaN(r=s(t[o]))||(c+=(n=r-l)*(r-(l+=n/++a)));else for(;++o<i;)isNaN(r=s(e(t[o],o,t)))||(c+=(n=r-l)*(r-(l+=n/++a)));if(a>1)return c/(a-1)}function c(t,e){var r=l(t,e);return r?Math.sqrt(r):r}function u(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(r=t[o])&&r>=r)for(n=i=r;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),i<r&&(i=r))}else for(;++o<a;)if(null!=(r=e(t[o],o,t))&&r>=r)for(n=i=r;++o<a;)null!=(r=e(t[o],o,t))&&(n>r&&(n=r),i<r&&(i=r));return[n,i]}var f=Array.prototype,h=f.slice,p=f.map;function d(t){return function(){return t}}function g(t){return t}function v(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n<i;)a[n]=t+n*r;return a}var m=Math.sqrt(50),y=Math.sqrt(10),x=Math.sqrt(2);function b(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return i>=0?(a>=m?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=m?10:a>=y?5:a>=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=m?i*=10:a>=y?i*=5:a>=x&&(i*=2),e<t?-i:i}function w(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function k(t,e,r){if(null==r&&(r=s),n=t.length){if((e=+e)<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}}function M(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&n>r&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&n>r&&(n=r);return n}function A(t){if(!(i=t.length))return[];for(var e=-1,r=M(t,T),n=new Array(r);++e<r;)for(var i,a=-1,o=n[e]=new Array(i);++a<i;)o[a]=t[a][e];return n}function T(t){return t.length}t.bisect=i,t.bisectRight=i,t.bisectLeft=a,t.ascending=e,t.bisector=r,t.cross=function(t,e,r){var n,i,a,s,l=t.length,c=e.length,u=new Array(l*c);for(null==r&&(r=o),n=a=0;n<l;++n)for(s=t[n],i=0;i<c;++i,++a)u[a]=r(s,e[i]);return u},t.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},t.deviation=c,t.extent=u,t.histogram=function(){var t=g,e=u,r=w;function n(n){var a,o,s=n.length,l=new Array(s);for(a=0;a<s;++a)l[a]=t(n[a],a,n);var c=e(l),u=c[0],f=c[1],h=r(l,u,f);Array.isArray(h)||(h=_(u,f,h),h=v(Math.ceil(u/h)*h,f,h));for(var p=h.length;h[0]<=u;)h.shift(),--p;for(;h[p-1]>f;)h.pop(),--p;var d,g=new Array(p+1);for(a=0;a<=p;++a)(d=g[a]=[]).x0=a>0?h[a-1]:u,d.x1=a<p?h[a]:f;for(a=0;a<s;++a)u<=(o=l[a])&&o<=f&&g[i(h,o,0,p)].push(n[a]);return g}return n.value=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:d(e),n):t},n.domain=function(t){return arguments.length?(e=\\\"function\\\"==typeof t?t:d([t[0],t[1]]),n):e},n.thresholds=function(t){return arguments.length?(r=\\\"function\\\"==typeof t?t:Array.isArray(t)?d(h.call(t)):d(t),n):r},n},t.thresholdFreedmanDiaconis=function(t,r,n){return t=p.call(t,s).sort(e),Math.ceil((n-r)/(2*(k(t,.75)-k(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,e,r){return Math.ceil((r-e)/(3.5*c(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=w,t.max=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&r>n&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&r>n&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a<n;)isNaN(r=s(t[a]))?--i:o+=r;else for(;++a<n;)isNaN(r=s(e(t[a],a,t)))?--i:o+=r;if(i)return o/i},t.median=function(t,r){var n,i=t.length,a=-1,o=[];if(null==r)for(;++a<i;)isNaN(n=s(t[a]))||o.push(n);else for(;++a<i;)isNaN(n=s(r(t[a],a,t)))||o.push(n);return k(o.sort(e),.5)},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=M,t.pairs=function(t,e){null==e&&(e=o);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return a},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.quantile=k,t.range=v,t.scan=function(t,r){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==r&&(r=e);++a<n;)(r(i=t[a],s)<0||0!==r(s,s))&&(s=i,o=a);return 0===r(s,s)?o:void 0}},t.shuffle=function(t,e,r){for(var n,i,a=(null==r?t.length:r)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.sum=function(t,e){var r,n=t.length,i=-1,a=0;if(null==e)for(;++i<n;)(r=+t[i])&&(a+=r);else for(;++i<n;)(r=+e(t[i],i,t))&&(a+=r);return a},t.ticks=function(t,e,r){var n,i,a,o,s=-1;if(r=+r,(t=+t)==(e=+e)&&r>0)return[t];if((n=e<t)&&(i=t,t=e,e=i),0===(o=b(t,e,r))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return n&&a.reverse(),a},t.tickIncrement=b,t.tickStep=_,t.transpose=A,t.variance=l,t.zip=function(){return A(arguments)},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],141:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";function e(){}function r(t,r){var n=new e;if(t instanceof e)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var i,a=-1,o=t.length;if(null==r)for(;++a<o;)n.set(a,t[a]);else for(;++a<o;)n.set(r(i=t[a],a,t),i)}else if(t)for(var s in t)n.set(s,t[s]);return n}e.prototype=r.prototype={constructor:e,has:function(t){return\\\"$\\\"+t in this},get:function(t){return this[\\\"$\\\"+t]},set:function(t,e){return this[\\\"$\\\"+t]=e,this},remove:function(t){var e=\\\"$\\\"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)\\\"$\\\"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)\\\"$\\\"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)\\\"$\\\"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)\\\"$\\\"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)\\\"$\\\"===e[0]&&++t;return t},empty:function(){for(var t in this)if(\\\"$\\\"===t[0])return!1;return!0},each:function(t){for(var e in this)\\\"$\\\"===e[0]&&t(this[e],e.slice(1),this)}};function n(){return{}}function i(t,e,r){t[e]=r}function a(){return r()}function o(t,e,r){t.set(e,r)}function s(){}var l=r.prototype;function c(t,e){var r=new s;if(t instanceof s)t.each(function(t){r.add(t)});else if(t){var n=-1,i=t.length;if(null==e)for(;++n<i;)r.add(t[n]);else for(;++n<i;)r.add(e(t[n],n,t))}return r}s.prototype=c.prototype={constructor:s,has:l.has,add:function(t){return this[\\\"$\\\"+(t+=\\\"\\\")]=t,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each};t.nest=function(){var t,e,s,l=[],c=[];function u(n,i,a,o){if(i>=l.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var s,c,f,h=-1,p=n.length,d=l[i++],g=r(),v=a();++h<p;)(f=g.get(s=d(c=n[h])+\\\"\\\"))?f.push(c):g.set(s,[c]);return g.each(function(t,e){o(v,e,u(t,i,a,o))}),v}return s={object:function(t){return u(t,0,n,i)},map:function(t){return u(t,0,a,o)},entries:function(t){return function t(r,n){if(++n>l.length)return r;var i,a=c[n-1];return null!=e&&n>=l.length?i=r.entries():(i=[],r.each(function(e,r){i.push({key:r,values:t(e,n)})})),null!=a?i.sort(function(t,e){return a(t.key,e.key)}):i}(u(t,0,a,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],142:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";function e(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var i=\\\"\\\\\\\\s*([+-]?\\\\\\\\d+)\\\\\\\\s*\\\",a=\\\"\\\\\\\\s*([+-]?\\\\\\\\d*\\\\\\\\.?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)\\\\\\\\s*\\\",o=\\\"\\\\\\\\s*([+-]?\\\\\\\\d*\\\\\\\\.?\\\\\\\\d+(?:[eE][+-]?\\\\\\\\d+)?)%\\\\\\\\s*\\\",s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,c=new RegExp(\\\"^rgb\\\\\\\\(\\\"+[i,i,i]+\\\"\\\\\\\\)$\\\"),u=new RegExp(\\\"^rgb\\\\\\\\(\\\"+[o,o,o]+\\\"\\\\\\\\)$\\\"),f=new RegExp(\\\"^rgba\\\\\\\\(\\\"+[i,i,i,a]+\\\"\\\\\\\\)$\\\"),h=new RegExp(\\\"^rgba\\\\\\\\(\\\"+[o,o,o,a]+\\\"\\\\\\\\)$\\\"),p=new RegExp(\\\"^hsl\\\\\\\\(\\\"+[a,o,o]+\\\"\\\\\\\\)$\\\"),d=new RegExp(\\\"^hsla\\\\\\\\(\\\"+[a,o,o,a]+\\\"\\\\\\\\)$\\\"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(t){var e;return t=(t+\\\"\\\").trim().toLowerCase(),(e=s.exec(t))?new _((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=l.exec(t))?m(parseInt(e[1],16)):(e=c.exec(t))?new _(e[1],e[2],e[3],1):(e=u.exec(t))?new _(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=f.exec(t))?y(e[1],e[2],e[3],e[4]):(e=h.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?k(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?k(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?m(g[t]):\\\"transparent\\\"===t?new _(NaN,NaN,NaN,0):null}function m(t){return new _(t>>16&255,t>>8&255,255&t,1)}function y(t,e,r,n){return n<=0&&(t=e=r=NaN),new _(t,e,r,n)}function x(t){return t instanceof n||(t=v(t)),t?new _((t=t.rgb()).r,t.g,t.b,t.opacity):new _}function b(t,e,r,n){return 1===arguments.length?x(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function w(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\\\"0\\\":\\\"\\\")+t.toString(16)}function k(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new A(t,e,r,n)}function M(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new A;if(t instanceof A)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),o=Math.max(e,r,i),s=NaN,l=o-a,c=(o+a)/2;return l?(s=e===o?(r-i)/l+6*(r<i):r===o?(i-e)/l+2:(e-r)/l+4,l/=c<.5?o+a:2-o-a,s*=60):l=c>0&&c<1?0:s,new A(s,l,c,t.opacity)}(t):new A(t,e,r,null==i?1:i)}function A(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function T(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(n,v,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+\\\"\\\"}}),e(_,b,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return\\\"#\\\"+w(this.r)+w(this.g)+w(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\\\"rgb(\\\":\\\"rgba(\\\")+Math.max(0,Math.min(255,Math.round(this.r)||0))+\\\", \\\"+Math.max(0,Math.min(255,Math.round(this.g)||0))+\\\", \\\"+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?\\\")\\\":\\\", \\\"+t+\\\")\\\")}})),e(A,M,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new _(T(t>=240?t-240:t+120,i,n),T(t,i,n),T(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var S=Math.PI/180,C=180/Math.PI,E=.96422,L=1,z=.82521,O=4/29,I=6/29,P=3*I*I,D=I*I*I;function R(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof G){if(isNaN(t.h))return new F(t.l,0,0,t.opacity);var e=t.h*S;return new F(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof _||(t=x(t));var r,n,i=U(t.r),a=U(t.g),o=U(t.b),s=N((.2225045*i+.7168786*a+.0606169*o)/L);return i===a&&a===o?r=n=s:(r=N((.4360747*i+.3850649*a+.1430804*o)/E),n=N((.0139322*i+.0971045*a+.7141733*o)/z)),new F(116*s-16,500*(r-s),200*(s-n),t.opacity)}function B(t,e,r,n){return 1===arguments.length?R(t):new F(t,e,r,null==n?1:n)}function F(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function N(t){return t>D?Math.pow(t,1/3):t/P+O}function j(t){return t>I?t*t*t:P*(t-O)}function V(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function U(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=R(t)),0===t.a&&0===t.b)return new G(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*C;return new G(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function H(t,e,r,n){return 1===arguments.length?q(t):new G(t,e,r,null==n?1:n)}function G(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}e(F,B,r(n,{brighter:function(t){return new F(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new F(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _(V(3.1338561*(e=E*j(e))-1.6168667*(t=L*j(t))-.4906146*(r=z*j(r))),V(-.9787684*e+1.9161415*t+.033454*r),V(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),e(G,H,r(n,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return R(this).rgb()}}));var W=-.14861,Y=1.78277,X=-.29227,Z=-.90649,$=1.97294,J=$*Z,K=$*Y,Q=Y*X-Z*W;function tt(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);t instanceof _||(t=x(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(Q*n+J*e-K*r)/(Q+J-K),a=n-i,o=($*(r-i)-X*a)/Z,s=Math.sqrt(o*o+a*a)/($*i*(1-i)),l=s?Math.atan2(o,a)*C-120:NaN;return new et(l<0?l+360:l,s,i,t.opacity)}(t):new et(t,e,r,null==n?1:n)}function et(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(et,tt,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*S,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new _(255*(e+r*(W*n+Y*i)),255*(e+r*(X*n+Z*i)),255*(e+r*($*n)),this.opacity)}})),t.color=v,t.rgb=b,t.hsl=M,t.lab=B,t.hcl=H,t.lch=function(t,e,r,n){return 1===arguments.length?q(t):new G(r,e,t,null==n?1:n)},t.gray=function(t,e){return new F(t,0,0,null==e?1:e)},t.cubehelix=tt,Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],143:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";var e={value:function(){}};function r(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+\\\"\\\")||t in i)throw new Error(\\\"illegal type: \\\"+t);i[t]=[]}return new n(i)}function n(t){this._=t}function i(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}function a(t,r,n){for(var i=0,a=t.length;i<a;++i)if(t[i].name===r){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:r,value:n}),t}n.prototype=r.prototype={constructor:n,on:function(t,e){var r,n,o=this._,s=(n=o,(t+\\\"\\\").trim().split(/^|\\\\s+/).map(function(t){var e=\\\"\\\",r=t.indexOf(\\\".\\\");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error(\\\"unknown type: \\\"+t);return{type:t,name:e}})),l=-1,c=s.length;if(!(arguments.length<2)){if(null!=e&&\\\"function\\\"!=typeof e)throw new Error(\\\"invalid callback: \\\"+e);for(;++l<c;)if(r=(t=s[l]).type)o[r]=a(o[r],t.name,e);else if(null==e)for(r in o)o[r]=a(o[r],t.name,null);return this}for(;++l<c;)if((r=(t=s[l]).type)&&(r=i(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new n(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error(\\\"unknown type: \\\"+t);for(a=0,r=(n=this._[t]).length;a<r;++a)n[a].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error(\\\"unknown type: \\\"+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}},t.dispatch=r,Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],144:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n,i){\\\"use strict\\\";var a=function(t){return function(){return t}},o=function(){return 1e-6*(Math.random()-.5)};function s(t){return t.x+t.vx}function l(t){return t.y+t.vy}function c(t){return t.index}function u(t,e){var r=t.get(e);if(!r)throw new Error(\\\"missing: \\\"+e);return r}function f(t){return t.x}function h(t){return t.y}var p=10,d=Math.PI*(3-Math.sqrt(5));t.forceCenter=function(t,e){var r;function n(){var n,i,a=r.length,o=0,s=0;for(n=0;n<a;++n)o+=(i=r[n]).x,s+=i.y;for(o=o/a-t,s=s/a-e,n=0;n<a;++n)(i=r[n]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),n.initialize=function(t){r=t},n.x=function(e){return arguments.length?(t=+e,n):t},n.y=function(t){return arguments.length?(e=+t,n):e},n},t.forceCollide=function(t){var r,n,i=1,c=1;function u(){for(var t,a,u,h,p,d,g,v=r.length,m=0;m<c;++m)for(a=e.quadtree(r,s,l).visitAfter(f),t=0;t<v;++t)u=r[t],d=n[u.index],g=d*d,h=u.x+u.vx,p=u.y+u.vy,a.visit(y);function y(t,e,r,n,a){var s=t.data,l=t.r,c=d+l;if(!s)return e>h+c||n<h-c||r>p+c||a<p-c;if(s.index>u.index){var f=h-s.x-s.vx,v=p-s.y-s.vy,m=f*f+v*v;m<c*c&&(0===f&&(m+=(f=o())*f),0===v&&(m+=(v=o())*v),m=(c-(m=Math.sqrt(m)))/m*i,u.vx+=(f*=m)*(c=(l*=l)/(g+l)),u.vy+=(v*=m)*c,s.vx-=f*(c=1-c),s.vy-=v*c)}}}function f(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e<a;++e)i=r[e],n[i.index]=+t(i,e,r)}}return\\\"function\\\"!=typeof t&&(t=a(null==t?1:+t)),u.initialize=function(t){r=t,h()},u.iterations=function(t){return arguments.length?(c=+t,u):c},u.strength=function(t){return arguments.length?(i=+t,u):i},u.radius=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:a(+e),h(),u):t},u},t.forceLink=function(t){var e,n,i,s,l,f=c,h=function(t){return 1/Math.min(s[t.source.index],s[t.target.index])},p=a(30),d=1;function g(r){for(var i=0,a=t.length;i<d;++i)for(var s,c,u,f,h,p,g,v=0;v<a;++v)c=(s=t[v]).source,f=(u=s.target).x+u.vx-c.x-c.vx||o(),h=u.y+u.vy-c.y-c.vy||o(),f*=p=((p=Math.sqrt(f*f+h*h))-n[v])/p*r*e[v],h*=p,u.vx-=f*(g=l[v]),u.vy-=h*g,c.vx+=f*(g=1-g),c.vy+=h*g}function v(){if(i){var a,o,c=i.length,h=t.length,p=r.map(i,f);for(a=0,s=new Array(c);a<h;++a)(o=t[a]).index=a,\\\"object\\\"!=typeof o.source&&(o.source=u(p,o.source)),\\\"object\\\"!=typeof o.target&&(o.target=u(p,o.target)),s[o.source.index]=(s[o.source.index]||0)+1,s[o.target.index]=(s[o.target.index]||0)+1;for(a=0,l=new Array(h);a<h;++a)o=t[a],l[a]=s[o.source.index]/(s[o.source.index]+s[o.target.index]);e=new Array(h),m(),n=new Array(h),y()}}function m(){if(i)for(var r=0,n=t.length;r<n;++r)e[r]=+h(t[r],r,t)}function y(){if(i)for(var e=0,r=t.length;e<r;++e)n[e]=+p(t[e],e,t)}return null==t&&(t=[]),g.initialize=function(t){i=t,v()},g.links=function(e){return arguments.length?(t=e,v(),g):t},g.id=function(t){return arguments.length?(f=t,g):f},g.iterations=function(t){return arguments.length?(d=+t,g):d},g.strength=function(t){return arguments.length?(h=\\\"function\\\"==typeof t?t:a(+t),m(),g):h},g.distance=function(t){return arguments.length?(p=\\\"function\\\"==typeof t?t:a(+t),y(),g):p},g},t.forceManyBody=function(){var t,r,n,i,s=a(-30),l=1,c=1/0,u=.81;function p(i){var a,o=t.length,s=e.quadtree(t,f,h).visitAfter(g);for(n=i,a=0;a<o;++a)r=t[a],s.visit(v)}function d(){if(t){var e,r,n=t.length;for(i=new Array(n),e=0;e<n;++e)r=t[e],i[r.index]=+s(r,e,t)}}function g(t){var e,r,n,a,o,s=0,l=0;if(t.length){for(n=a=o=0;o<4;++o)(e=t[o])&&(r=Math.abs(e.value))&&(s+=e.value,l+=r,n+=r*e.x,a+=r*e.y);t.x=n/l,t.y=a/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index]}while(e=e.next)}t.value=s}function v(t,e,a,s){if(!t.value)return!0;var f=t.x-r.x,h=t.y-r.y,p=s-e,d=f*f+h*h;if(p*p/u<d)return d<c&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d<l&&(d=Math.sqrt(l*d)),r.vx+=f*t.value*n/d,r.vy+=h*t.value*n/d),!0;if(!(t.length||d>=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d<l&&(d=Math.sqrt(l*d)));do{t.data!==r&&(p=i[t.data.index]*n/d,r.vx+=f*p,r.vy+=h*p)}while(t=t.next)}}return p.initialize=function(e){t=e,d()},p.strength=function(t){return arguments.length?(s=\\\"function\\\"==typeof t?t:a(+t),d(),p):s},p.distanceMin=function(t){return arguments.length?(l=t*t,p):Math.sqrt(l)},p.distanceMax=function(t){return arguments.length?(c=t*t,p):Math.sqrt(c)},p.theta=function(t){return arguments.length?(u=t*t,p):Math.sqrt(u)},p},t.forceRadial=function(t,e,r){var n,i,o,s=a(.1);function l(t){for(var a=0,s=n.length;a<s;++a){var l=n[a],c=l.x-e||1e-6,u=l.y-r||1e-6,f=Math.sqrt(c*c+u*u),h=(o[a]-f)*i[a]*t/f;l.vx+=c*h,l.vy+=u*h}}function c(){if(n){var e,r=n.length;for(i=new Array(r),o=new Array(r),e=0;e<r;++e)o[e]=+t(n[e],e,n),i[e]=isNaN(o[e])?0:+s(n[e],e,n)}}return\\\"function\\\"!=typeof t&&(t=a(+t)),null==e&&(e=0),null==r&&(r=0),l.initialize=function(t){n=t,c()},l.strength=function(t){return arguments.length?(s=\\\"function\\\"==typeof t?t:a(+t),c(),l):s},l.radius=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:a(+e),c(),l):t},l.x=function(t){return arguments.length?(e=+t,l):e},l.y=function(t){return arguments.length?(r=+t,l):r},l},t.forceSimulation=function(t){var e,a=1,o=.001,s=1-Math.pow(o,1/300),l=0,c=.6,u=r.map(),f=i.timer(g),h=n.dispatch(\\\"tick\\\",\\\"end\\\");function g(){v(),h.call(\\\"tick\\\",e),a<o&&(f.stop(),h.call(\\\"end\\\",e))}function v(){var e,r,n=t.length;for(a+=(l-a)*s,u.each(function(t){t(a)}),e=0;e<n;++e)null==(r=t[e]).fx?r.x+=r.vx*=c:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=c:(r.y=r.fy,r.vy=0)}function m(){for(var e,r=0,n=t.length;r<n;++r){if((e=t[r]).index=r,isNaN(e.x)||isNaN(e.y)){var i=p*Math.sqrt(r),a=r*d;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function y(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),m(),e={tick:v,restart:function(){return f.restart(g),e},stop:function(){return f.stop(),e},nodes:function(r){return arguments.length?(t=r,m(),u.each(y),e):t},alpha:function(t){return arguments.length?(a=+t,e):a},alphaMin:function(t){return arguments.length?(o=+t,e):o},alphaDecay:function(t){return arguments.length?(s=+t,e):+s},alphaTarget:function(t){return arguments.length?(l=+t,e):l},velocityDecay:function(t){return arguments.length?(c=1-t,e):1-c},force:function(t,r){return arguments.length>1?(null==r?u.remove(t):u.set(t,y(r)),e):u.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c<u;++c)(o=(i=e-(s=t[c]).x)*i+(a=r-s.y)*a)<n&&(l=s,n=o);return l},on:function(t,r){return arguments.length>1?(h.on(t,r),e):h.on(t)}}},t.forceX=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(n[a]-i.x)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a<o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return\\\"function\\\"!=typeof t&&(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=\\\"function\\\"==typeof t?t:a(+t),s(),o):i},o.x=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:a(+e),s(),o):t},o},t.forceY=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(n[a]-i.y)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a<o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return\\\"function\\\"!=typeof t&&(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=\\\"function\\\"==typeof t?t:a(+t),s(),o):i},o.y=function(e){return arguments.length?(t=\\\"function\\\"==typeof e?e:a(+e),s(),o):t},o},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})},\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?i(r,t(\\\"d3-quadtree\\\"),t(\\\"d3-collection\\\"),t(\\\"d3-dispatch\\\"),t(\\\"d3-timer\\\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3)},{\\\"d3-collection\\\":141,\\\"d3-dispatch\\\":143,\\\"d3-quadtree\\\":146,\\\"d3-timer\\\":147}],145:[function(t,e,r){var n,i;n=this,i=function(t,e){\\\"use strict\\\";function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function n(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=i<e-1?t[i+2]:2*o-a;return r((n-i/e)*e,s,a,o,l)}}function i(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),a=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],l=t[(i+2)%e];return r((n-i/e)*e,a,o,s,l)}}function a(t){return function(){return t}}function o(t,e){return function(r){return t+r*e}}function s(t,e){var r=e-t;return r?o(t,r>180||r<-180?r-360*Math.round(r/360):r):a(isNaN(t)?e:t)}function l(t){return 1==(t=+t)?c:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):a(isNaN(e)?r:e)}}function c(t,e){var r=e-t;return r?o(t,r):a(isNaN(t)?e:t)}var u=function t(r){var n=l(r);function i(t,r){var i=n((t=e.rgb(t)).r,(r=e.rgb(r)).r),a=n(t.g,r.g),o=n(t.b,r.b),s=c(t.opacity,r.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=o(e),t.opacity=s(e),t+\\\"\\\"}}return i.gamma=t,i}(1);function f(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n<a;++n)i=e.rgb(r[n]),o[n]=i.r||0,s[n]=i.g||0,l[n]=i.b||0;return o=t(o),s=t(s),l=t(l),i.opacity=1,function(t){return i.r=o(t),i.g=s(t),i.b=l(t),i+\\\"\\\"}}}var h=f(n),p=f(i);function d(t,e){var r,n=e?e.length:0,i=t?Math.min(n,t.length):0,a=new Array(i),o=new Array(n);for(r=0;r<i;++r)a[r]=_(t[r],e[r]);for(;r<n;++r)o[r]=e[r];return function(t){for(r=0;r<i;++r)o[r]=a[r](t);return o}}function g(t,e){var r=new Date;return e-=t=+t,function(n){return r.setTime(t+e*n),r}}function v(t,e){return e-=t=+t,function(r){return t+e*r}}function m(t,e){var r,n={},i={};for(r in null!==t&&\\\"object\\\"==typeof t||(t={}),null!==e&&\\\"object\\\"==typeof e||(e={}),e)r in t?n[r]=_(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}var y=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,x=new RegExp(y.source,\\\"g\\\");function b(t,e){var r,n,i,a=y.lastIndex=x.lastIndex=0,o=-1,s=[],l=[];for(t+=\\\"\\\",e+=\\\"\\\";(r=y.exec(t))&&(n=x.exec(e));)(i=n.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:v(r,n)})),a=x.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+\\\"\\\"}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\\\"\\\")})}function _(t,r){var n,i=typeof r;return null==r||\\\"boolean\\\"===i?a(r):(\\\"number\\\"===i?v:\\\"string\\\"===i?(n=e.color(r))?(r=n,u):b:r instanceof e.color?u:r instanceof Date?g:Array.isArray(r)?d:\\\"function\\\"!=typeof r.valueOf&&\\\"function\\\"!=typeof r.toString||isNaN(r)?m:v)(t,r)}var w,k,M,A,T=180/Math.PI,S={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function C(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*T,skewX:Math.atan(l)*T,scaleX:o,scaleY:s}}function E(t,e,r,n){function i(t){return t.length?t.pop()+\\\" \\\":\\\"\\\"}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,n,i,a,o,s){if(t!==i||n!==a){var l=o.push(\\\"translate(\\\",null,e,null,r);s.push({i:l-4,x:v(t,i)},{i:l-2,x:v(n,a)})}else(i||a)&&o.push(\\\"translate(\\\"+i+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\\\"rotate(\\\",null,n)-2,x:v(t,e)})):e&&r.push(i(r)+\\\"rotate(\\\"+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+\\\"skewX(\\\",null,n)-2,x:v(t,e)}):e&&r.push(i(r)+\\\"skewX(\\\"+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+\\\"scale(\\\",null,\\\",\\\",null,\\\")\\\");o.push({i:s-4,x:v(t,r)},{i:s-2,x:v(e,n)})}else 1===r&&1===n||a.push(i(a)+\\\"scale(\\\"+r+\\\",\\\"+n+\\\")\\\")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r<n;)s[(e=l[r]).i]=e.x(t);return s.join(\\\"\\\")}}}var L=E(function(t){return\\\"none\\\"===t?S:(w||(w=document.createElement(\\\"DIV\\\"),k=document.documentElement,M=document.defaultView),w.style.transform=t,t=M.getComputedStyle(k.appendChild(w),null).getPropertyValue(\\\"transform\\\"),k.removeChild(w),C(+(t=t.slice(7,-1).split(\\\",\\\"))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},\\\"px, \\\",\\\"px)\\\",\\\"deg)\\\"),z=E(function(t){return null==t?S:(A||(A=document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\")),A.setAttribute(\\\"transform\\\",t),(t=A.transform.baseVal.consolidate())?C((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):S)},\\\", \\\",\\\")\\\",\\\")\\\"),O=Math.SQRT2,I=2,P=4,D=1e-12;function R(t){return((t=Math.exp(t))+1/t)/2}function B(t){return function(r,n){var i=t((r=e.hsl(r)).h,(n=e.hsl(n)).h),a=c(r.s,n.s),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(t){return r.h=i(t),r.s=a(t),r.l=o(t),r.opacity=s(t),r+\\\"\\\"}}}var F=B(s),N=B(c);function j(t){return function(r,n){var i=t((r=e.hcl(r)).h,(n=e.hcl(n)).h),a=c(r.c,n.c),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(t){return r.h=i(t),r.c=a(t),r.l=o(t),r.opacity=s(t),r+\\\"\\\"}}}var V=j(s),U=j(c);function q(t){return function r(n){function i(r,i){var a=t((r=e.cubehelix(r)).h,(i=e.cubehelix(i)).h),o=c(r.s,i.s),s=c(r.l,i.l),l=c(r.opacity,i.opacity);return function(t){return r.h=a(t),r.s=o(t),r.l=s(Math.pow(t,n)),r.opacity=l(t),r+\\\"\\\"}}return n=+n,i.gamma=r,i}(1)}var H=q(s),G=q(c);t.interpolate=_,t.interpolateArray=d,t.interpolateBasis=n,t.interpolateBasisClosed=i,t.interpolateDate=g,t.interpolateDiscrete=function(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}},t.interpolateHue=function(t,e){var r=s(+t,+e);return function(t){var e=r(t);return e-360*Math.floor(e/360)}},t.interpolateNumber=v,t.interpolateObject=m,t.interpolateRound=function(t,e){return e-=t=+t,function(r){return Math.round(t+e*r)}},t.interpolateString=b,t.interpolateTransformCss=L,t.interpolateTransformSvg=z,t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h<D)n=Math.log(c/o)/O,r=function(t){return[i+t*u,a+t*f,o*Math.exp(O*t*n)]};else{var p=Math.sqrt(h),d=(c*c-o*o+P*h)/(2*o*I*p),g=(c*c-o*o-P*h)/(2*c*I*p),v=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(g*g+1)-g);n=(m-v)/O,r=function(t){var e,r=t*n,s=R(v),l=o/(I*p)*(s*(e=O*r+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+l*u,a+l*f,o*s/R(O*r+v)]}}return r.duration=1e3*n,r},t.interpolateRgb=u,t.interpolateRgbBasis=h,t.interpolateRgbBasisClosed=p,t.interpolateHsl=F,t.interpolateHslLong=N,t.interpolateLab=function(t,r){var n=c((t=e.lab(t)).l,(r=e.lab(r)).l),i=c(t.a,r.a),a=c(t.b,r.b),o=c(t.opacity,r.opacity);return function(e){return t.l=n(e),t.a=i(e),t.b=a(e),t.opacity=o(e),t+\\\"\\\"}},t.interpolateHcl=V,t.interpolateHclLong=U,t.interpolateCubehelix=H,t.interpolateCubehelixLong=G,t.piecewise=function(t,e){for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(t){var e=Math.max(0,Math.min(n-1,Math.floor(t*=n)));return a[e](t-e)}},t.quantize=function(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t(n/(e-1));return r},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})},\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?i(r,t(\\\"d3-color\\\")):i(n.d3=n.d3||{},n.d3)},{\\\"d3-color\\\":142}],146:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,f,h,p=t._root,d={data:n},g=t._x0,v=t._y0,m=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=r>=(o=(v+y)/2))?v=o:y=o,i=p,!(p=p[f=u<<1|c]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&&r===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=r>=(o=(v+y)/2))?v=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}var r=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i};function n(t){return t[0]}function i(t){return t[1]}function a(t,e,r){var a=new o(null==e?n:e,null==r?i:r,NaN,NaN,NaN,NaN);return null==t?a:a.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var l=a.prototype=o.prototype;l.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},l.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},l.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(i=+this._x.call(null,r=t[n]))||isNaN(a=+this._y.call(null,r))||(s[n]=i,l[n]=a,i<c&&(c=i),i>f&&(f=i),a<u&&(u=a),a>h&&(h=a));for(f<c&&(c=this._x0,f=this._x1),h<u&&(u=this._y0,h=this._y1),this.cover(c,u).cover(f,h),n=0;n<o;++n)e(this,s[n],l[n],t[n]);return this},l.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{if(!(r>t||t>i||n>e||e>a))return this;var o,s,l=i-r,c=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),t>(i=r+l)||e>a);break;case 1:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),(r=i-l)>t||e>a);break;case 2:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),t>(i=r+l)||n>e);break;case 3:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),(r=i-l)>t||n>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},l.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},l.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(t,e,n){var i,a,o,s,l,c,u,f=this._x0,h=this._y0,p=this._x1,d=this._y1,g=[],v=this._root;for(v&&g.push(new r(v,f,h,p,d)),null==n?n=1/0:(f=t-n,h=e-n,p=t+n,d=e+n,n*=n);c=g.pop();)if(!(!(v=c.node)||(a=c.x0)>p||(o=c.y0)>d||(s=c.x1)<f||(l=c.y1)<h))if(v.length){var m=(a+s)/2,y=(o+l)/2;g.push(new r(v[3],m,y,s,l),new r(v[2],a,y,m,l),new r(v[1],m,o,s,y),new r(v[0],a,o,m,y)),(u=(e>=y)<<1|t>=m)&&(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_<n){var w=Math.sqrt(n=_);f=t-w,h=e-w,p=t+w,d=e+w,i=v.data}}return i},l.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,r,n,i,a,o,s,l,c,u,f,h,p=this._root,d=this._x0,g=this._y0,v=this._x1,m=this._y1;if(!p)return this;if(p.length)for(;;){if((c=a>=(s=(d+v)/2))?d=s:v=s,(u=o>=(l=(g+m)/2))?g=l:m=l,e=p,!(p=p[f=u<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this},l.root=function(){return this._root},l.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},l.visit=function(t){var e,n,i,a,o,s,l=[],c=this._root;for(c&&l.push(new r(c,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(c=e.node,i=e.x0,a=e.y0,o=e.x1,s=e.y1)&&c.length){var u=(i+o)/2,f=(a+s)/2;(n=c[3])&&l.push(new r(n,u,f,o,s)),(n=c[2])&&l.push(new r(n,i,f,u,s)),(n=c[1])&&l.push(new r(n,u,a,o,f)),(n=c[0])&&l.push(new r(n,i,a,u,f))}return this},l.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new r(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var a=e.node;if(a.length){var o,s=e.x0,l=e.y0,c=e.x1,u=e.y1,f=(s+c)/2,h=(l+u)/2;(o=a[0])&&n.push(new r(o,s,l,f,h)),(o=a[1])&&n.push(new r(o,f,l,c,h)),(o=a[2])&&n.push(new r(o,s,h,f,u)),(o=a[3])&&n.push(new r(o,f,h,c,u))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},l.x=function(t){return arguments.length?(this._x=t,this):this._x},l.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=a,Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],147:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";var e,r,n=0,i=0,a=0,o=1e3,s=0,l=0,c=0,u=\\\"object\\\"==typeof performance&&performance.now?performance:Date,f=\\\"object\\\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function h(){return l||(f(p),l=u.now()+c)}function p(){l=0}function d(){this._call=this._time=this._next=null}function g(t,e,r){var n=new d;return n.restart(t,e,r),n}function v(){h(),++n;for(var t,r=e;r;)(t=l-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function m(){l=(s=u.now())+c,n=i=0;try{v()}finally{n=0,function(){var t,n,i=e,a=1/0;for(;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:e=n);r=t,x(a)}(),l=0}}function y(){var t=u.now(),e=t-s;e>o&&(c-=e,s=t)}function x(t){n||(i&&(i=clearTimeout(i)),t-l>24?(t<1/0&&(i=setTimeout(m,t-u.now()-c)),a&&(a=clearInterval(a))):(a||(s=u.now(),a=setInterval(y,o)),n=1,f(m)))}d.prototype=g.prototype={constructor:d,restart:function(t,n,i){if(\\\"function\\\"!=typeof t)throw new TypeError(\\\"callback is not a function\\\");i=(null==i?h():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}};t.now=h,t.timer=g,t.timerFlush=v,t.timeout=function(t,e,r){var n=new d;return e=null==e?0:+e,n.restart(function(r){n.stop(),t(r+e)},e,r),n},t.interval=function(t,e,r){var n=new d,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?h():+r,n.restart(function a(o){o+=i,n.restart(a,i+=e,r),t(o)},e,r),n)},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.d3=n.d3||{})},{}],148:[function(t,e,r){!function(){var t={version:\\\"3.5.17\\\"},r=[].slice,n=function(t){return r.call(t)},i=this.document;function a(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement(\\\"DIV\\\").style.setProperty(\\\"opacity\\\",0,\\\"\\\")}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+\\\"\\\")},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+\\\"\\\")},u.setProperty=function(t,e,r){f.call(this,t,e+\\\"\\\",r)}}function h(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}t.ascending=h,t.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},t.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&r>n&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&r>n&&(r=n)}return r},t.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&n>r&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&n>r&&(r=n)}return r},t.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a<o;)if(null!=(n=t[a])&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else{for(;++a<o;)if(null!=(n=e.call(t,t[a],a))&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=e.call(t,t[a],a))&&(r>n&&(r=n),i<n&&(i=n))}return[r,i]},t.sum=function(t,e){var r,n=0,i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)d(r=+t[a])&&(n+=r);else for(;++a<i;)d(r=+e.call(t,t[a],a))&&(n+=r);return n},t.mean=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(1===arguments.length)for(;++a<i;)d(r=p(t[a]))?n+=r:--o;else for(;++a<i;)d(r=p(e.call(t,t[a],a)))?n+=r:--o;if(o)return n/o},t.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},t.median=function(e,r){var n,i=[],a=e.length,o=-1;if(1===arguments.length)for(;++o<a;)d(n=p(e[o]))&&i.push(n);else for(;++o<a;)d(n=p(r.call(e,e[o],o)))&&i.push(n);if(i.length)return t.quantile(i.sort(h),.5)},t.variance=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s<i;)d(r=p(t[s]))&&(o+=(n=r-a)*(r-(a+=n/++l)));else for(;++s<i;)d(r=p(e.call(t,t[s],s)))&&(o+=(n=r-a)*(r-(a+=n/++l)));if(l>1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var v=g(h);function m(t){return t.length}t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(t){return g(1===t.length?function(e,r){return h(t(e),r)}:t)},t.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e<r;)i[e]=[n,n=t[++e]];return i},t.transpose=function(e){if(!(a=e.length))return[];for(var r=-1,n=t.min(e,m),i=new Array(n);++r<n;)for(var a,o=-1,s=i[r]=new Array(a);++o<a;)s[o]=e[o][r];return i},t.zip=function(){return t.transpose(arguments)},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function b(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error(\\\"infinite range\\\");var n,i=[],a=function(t){var e=1;for(;t*e%1;)e*=10;return e}(y(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)<e;)i.push(n/a);return i},t.map=function(t,e){var r=new b;if(t instanceof b)t.forEach(function(t,e){r.set(t,e)});else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i<a;)r.set(i,t[i]);else for(;++i<a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r};var _=\\\"__proto__\\\",w=\\\"\\\\0\\\";function k(t){return(t+=\\\"\\\")===_||t[0]===w?w+t:t}function M(t){return(t+=\\\"\\\")[0]===w?t.slice(1):t}function A(t){return k(t)in this._}function T(t){return(t=k(t))in this._&&delete this._[t]}function S(){var t=[];for(var e in this._)t.push(M(e));return t}function C(){var t=0;for(var e in this._)++t;return t}function E(){for(var t in this._)return!1;return!0}function L(){this._=Object.create(null)}function z(t){return t}function O(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function I(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=P.length;r<n;++r){var i=P[r]+e;if(i in t)return i}}x(b,{has:A,get:function(t){return this._[k(t)]},set:function(t,e){return this._[k(t)]=e},remove:T,keys:S,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:M(e),value:this._[e]});return t},size:C,empty:E,forEach:function(t){for(var e in this._)t.call(this,M(e),this._[e])}}),t.nest=function(){var e,r,n={},i=[],a=[];function o(t,a,s){if(s>=i.length)return r?r.call(n,a):e?a.sort(e):a;for(var l,c,u,f,h=-1,p=a.length,d=i[s++],g=new b;++h<p;)(f=g.get(l=d(c=a[h])))?f.push(c):g.set(l,[c]);return t?(c=t(),u=function(e,r){c.set(e,o(t,r,s))}):(c={},u=function(e,r){c[e]=o(t,r,s)}),g.forEach(u),c}return n.map=function(t,e){return o(e,t,0)},n.entries=function(e){return function t(e,r){if(r>=i.length)return e;var n=[],o=a[r++];return e.forEach(function(e,i){n.push({key:e,values:t(i,r)})}),o?n.sort(function(t,e){return o(t.key,e.key)}):n}(o(t.map,e,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return a[i.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new L;if(t)for(var r=0,n=t.length;r<n;++r)e.add(t[r]);return e},x(L,{has:A,add:function(t){return this._[k(t+=\\\"\\\")]=!0,t},remove:T,values:S,size:C,empty:E,forEach:function(t){for(var e in this._)t.call(this,M(e))}}),t.behavior={},t.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n<i;)t[r=arguments[n]]=O(t,e,e[r]);return t};var P=[\\\"webkit\\\",\\\"ms\\\",\\\"moz\\\",\\\"Moz\\\",\\\"o\\\",\\\"O\\\"];function D(){}function R(){}function B(t){var e=[],r=new b;function n(){for(var r,n=e,i=-1,a=n.length;++i<a;)(r=n[i].on)&&r.apply(this,arguments);return t}return n.on=function(n,i){var a,o=r.get(n);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,a=e.indexOf(o)).concat(e.slice(a+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function F(){t.event.preventDefault()}function N(){for(var e,r=t.event;e=r.sourceEvent;)r=e;return r}function j(e){for(var r=new R,n=0,i=arguments.length;++n<i;)r[arguments[n]]=B(r);return r.of=function(n,i){return function(a){try{var o=a.sourceEvent=t.event;a.target=e,t.event=a,r[a.type].apply(n,i)}finally{t.event=o}}},r}t.dispatch=function(){for(var t=new R,e=-1,r=arguments.length;++e<r;)t[arguments[e]]=B(t);return t},R.prototype.on=function(t,e){var r=t.indexOf(\\\".\\\"),n=\\\"\\\";if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(V,\\\"\\\\\\\\$&\\\")};var V=/[\\\\\\\\\\\\^\\\\$\\\\*\\\\+\\\\?\\\\|\\\\[\\\\]\\\\(\\\\)\\\\.\\\\{\\\\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function q(t){return U(t,Y),t}var H=function(t,e){return e.querySelector(t)},G=function(t,e){return e.querySelectorAll(t)},W=function(t,e){var r=t.matches||t[I(t,\\\"matchesSelector\\\")];return(W=function(t,e){return r.call(t,e)})(t,e)};\\\"function\\\"==typeof Sizzle&&(H=function(t,e){return Sizzle(t,e)[0]||null},G=Sizzle,W=Sizzle.matchesSelector),t.selection=function(){return t.select(i.documentElement)};var Y=t.selection.prototype=[];function X(t){return\\\"function\\\"==typeof t?t:function(){return H(t,this)}}function Z(t){return\\\"function\\\"==typeof t?t:function(){return G(t,this)}}Y.select=function(t){var e,r,n,i,a=[];t=X(t);for(var o=-1,s=this.length;++o<s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,c=n.length;++l<c;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&&\\\"__data__\\\"in i&&(r.__data__=i.__data__)):e.push(null)}return q(a)},Y.selectAll=function(t){var e,r,i=[];t=Z(t);for(var a=-1,o=this.length;++a<o;)for(var s=this[a],l=-1,c=s.length;++l<c;)(r=s[l])&&(i.push(e=n(t.call(r,r.__data__,l,a))),e.parentNode=r);return q(i)};var $=\\\"http://www.w3.org/1999/xhtml\\\",J={svg:\\\"http://www.w3.org/2000/svg\\\",xhtml:$,xlink:\\\"http://www.w3.org/1999/xlink\\\",xml:\\\"http://www.w3.org/XML/1998/namespace\\\",xmlns:\\\"http://www.w3.org/2000/xmlns/\\\"};function K(e,r){return e=t.ns.qualify(e),null==r?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:\\\"function\\\"==typeof r?e.local?function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}:function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}:e.local?function(){this.setAttributeNS(e.space,e.local,r)}:function(){this.setAttribute(e,r)}}function Q(t){return t.trim().replace(/\\\\s+/g,\\\" \\\")}function tt(e){return new RegExp(\\\"(?:^|\\\\\\\\s+)\\\"+t.requote(e)+\\\"(?:\\\\\\\\s+|$)\\\",\\\"g\\\")}function et(t){return(t+\\\"\\\").trim().split(/^|\\\\s+/)}function rt(t,e){var r=(t=et(t).map(nt)).length;return\\\"function\\\"==typeof e?function(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}:function(){for(var n=-1;++n<r;)t[n](this,e)}}function nt(t){var e=tt(t);return function(r,n){if(i=r.classList)return n?i.add(t):i.remove(t);var i=r.getAttribute(\\\"class\\\")||\\\"\\\";n?(e.lastIndex=0,e.test(i)||r.setAttribute(\\\"class\\\",Q(i+\\\" \\\"+t))):r.setAttribute(\\\"class\\\",Q(i.replace(e,\\\" \\\")))}}function it(t,e,r){return null==e?function(){this.style.removeProperty(t)}:\\\"function\\\"==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function at(t,e){return null==e?function(){delete this[t]}:\\\"function\\\"==typeof e?function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}:function(){this[t]=e}}function ot(e){return\\\"function\\\"==typeof e?e:(e=t.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,r=this.namespaceURI;return r===$&&t.documentElement.namespaceURI===$?t.createElement(e):t.createElementNS(r,e)}}function st(){var t=this.parentNode;t&&t.removeChild(this)}function lt(t){return{__data__:t}}function ct(t){return function(){return W(this,t)}}function ut(t,e){for(var r=0,n=t.length;r<n;r++)for(var i,a=t[r],o=0,s=a.length;o<s;o++)(i=a[o])&&e(i,o,r);return t}function ft(t){return U(t,ht),t}t.ns={prefix:J,qualify:function(t){var e=t.indexOf(\\\":\\\"),r=t;return e>=0&&\\\"xmlns\\\"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),J.hasOwnProperty(r)?{space:J[r],local:t}:t}},Y.attr=function(e,r){if(arguments.length<2){if(\\\"string\\\"==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each(K(r,e[r]));return this}return this.each(K(e,r))},Y.classed=function(t,e){if(arguments.length<2){if(\\\"string\\\"==typeof t){var r=this.node(),n=(t=et(t)).length,i=-1;if(e=r.classList){for(;++i<n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute(\\\"class\\\");++i<n;)if(!tt(t[i]).test(e))return!1;return!0}for(e in t)this.each(rt(e,t[e]));return this}return this.each(rt(t,e))},Y.style=function(t,e,r){var n=arguments.length;if(n<3){if(\\\"string\\\"!=typeof t){for(r in n<2&&(e=\\\"\\\"),t)this.each(it(r,t[r],e));return this}if(n<2){var i=this.node();return o(i).getComputedStyle(i,null).getPropertyValue(t)}r=\\\"\\\"}return this.each(it(t,e,r))},Y.property=function(t,e){if(arguments.length<2){if(\\\"string\\\"==typeof t)return this.node()[t];for(e in t)this.each(at(e,t[e]));return this}return this.each(at(t,e))},Y.text=function(t){return arguments.length?this.each(\\\"function\\\"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?\\\"\\\":e}:null==t?function(){this.textContent=\\\"\\\"}:function(){this.textContent=t}):this.node().textContent},Y.html=function(t){return arguments.length?this.each(\\\"function\\\"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?\\\"\\\":e}:null==t?function(){this.innerHTML=\\\"\\\"}:function(){this.innerHTML=t}):this.node().innerHTML},Y.append=function(t){return t=ot(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Y.insert=function(t,e){return t=ot(t),e=X(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},Y.remove=function(){return this.each(st)},Y.data=function(t,e){var r,n,i=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++i<a;)(n=r[i])&&(t[i]=n.__data__);return t}function o(t,r){var n,i,a,o=t.length,u=r.length,f=Math.min(o,u),h=new Array(u),p=new Array(u),d=new Array(o);if(e){var g,v=new b,m=new Array(o);for(n=-1;++n<o;)(i=t[n])&&(v.has(g=e.call(i,i.__data__,n))?d[n]=i:v.set(g,i),m[n]=g);for(n=-1;++n<u;)(i=v.get(g=e.call(r,a=r[n],n)))?!0!==i&&(h[n]=i,i.__data__=a):p[n]=lt(a),v.set(g,!0);for(n=-1;++n<o;)n in m&&!0!==v.get(m[n])&&(d[n]=t[n])}else{for(n=-1;++n<f;)i=t[n],a=r[n],i?(i.__data__=a,h[n]=i):p[n]=lt(a);for(;n<u;++n)p[n]=lt(r[n]);for(;n<o;++n)d[n]=t[n]}p.update=h,p.parentNode=h.parentNode=d.parentNode=t.parentNode,s.push(p),l.push(h),c.push(d)}var s=ft([]),l=q([]),c=q([]);if(\\\"function\\\"==typeof t)for(;++i<a;)o(r=this[i],t.call(r,r.parentNode.__data__,i));else for(;++i<a;)o(r=this[i],t);return l.enter=function(){return s},l.exit=function(){return c},l},Y.datum=function(t){return arguments.length?this.property(\\\"__data__\\\",t):this.property(\\\"__data__\\\")},Y.filter=function(t){var e,r,n,i=[];\\\"function\\\"!=typeof t&&(t=ct(t));for(var a=0,o=this.length;a<o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s<l;s++)(n=r[s])&&t.call(n,n.__data__,s,a)&&e.push(n)}return q(i)},Y.order=function(){for(var t=-1,e=this.length;++t<e;)for(var r,n=this[t],i=n.length-1,a=n[i];--i>=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Y.sort=function(t){t=function(t){arguments.length||(t=h);return function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e<r;)this[e].sort(t);return this.order()},Y.each=function(t){return ut(this,function(e,r,n){t.call(e,e.__data__,r,n)})},Y.call=function(t){var e=n(arguments);return t.apply(e[0]=this,e),this},Y.empty=function(){return!this.node()},Y.node=function(){for(var t=0,e=this.length;t<e;t++)for(var r=this[t],n=0,i=r.length;n<i;n++){var a=r[n];if(a)return a}return null},Y.size=function(){var t=0;return ut(this,function(){++t}),t};var ht=[];function pt(e,r,i){var a=\\\"__on\\\"+e,o=e.indexOf(\\\".\\\"),s=gt;o>0&&(e=e.slice(0,o));var l=dt.get(e);function c(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}return l&&(e=l,s=vt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[a]=t,t.$=i),t._=r}:c:r?D:function(){var r,n=new RegExp(\\\"^__on([^.]+)\\\"+t.requote(e)+\\\"$\\\");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}t.selection.enter=ft,t.selection.enter.prototype=ht,ht.append=Y.append,ht.empty=Y.empty,ht.node=Y.node,ht.call=Y.call,ht.size=Y.size,ht.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s<l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var c=-1,u=i.length;++c<u;)(a=i[c])?(e.push(n[c]=r=t.call(i.parentNode,a.__data__,c,s)),r.__data__=a.__data__):e.push(null)}return q(o)},ht.insert=function(t,e){var r,n,i;return arguments.length<2&&(r=this,e=function(t,e,a){var o,s=r[a].update,l=s.length;for(a!=i&&(i=a,n=0),e>=n&&(n=e+1);!(o=s[n])&&++n<l;);return o}),Y.insert.call(this,t,e)},t.select=function(t){var e;return\\\"string\\\"==typeof t?(e=[H(t,i)]).parentNode=i.documentElement:(e=[t]).parentNode=a(t),q([e])},t.selectAll=function(t){var e;return\\\"string\\\"==typeof t?(e=n(G(t,i))).parentNode=i.documentElement:(e=n(t)).parentNode=null,q([e])},Y.on=function(t,e,r){var n=arguments.length;if(n<3){if(\\\"string\\\"!=typeof t){for(r in n<2&&(e=!1),t)this.each(pt(r,t[r],e));return this}if(n<2)return(n=this.node()[\\\"__on\\\"+t])&&n._;r=!1}return this.each(pt(t,e,r))};var dt=t.map({mouseenter:\\\"mouseover\\\",mouseleave:\\\"mouseout\\\"});function gt(e,r){return function(n){var i=t.event;t.event=n,r[0]=this.__data__;try{e.apply(this,r)}finally{t.event=i}}}function vt(t,e){var r=gt(t,e);return function(t){var e=t.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||r.call(this,t)}}i&&dt.forEach(function(t){\\\"on\\\"+t in i&&dt.remove(t)});var mt,yt=0;function xt(e){var r=\\\".dragsuppress-\\\"+ ++yt,n=\\\"click\\\"+r,i=t.select(o(e)).on(\\\"touchmove\\\"+r,F).on(\\\"dragstart\\\"+r,F).on(\\\"selectstart\\\"+r,F);if(null==mt&&(mt=!(\\\"onselectstart\\\"in e)&&I(e.style,\\\"userSelect\\\")),mt){var s=a(e).style,l=s[mt];s[mt]=\\\"none\\\"}return function(t){if(i.on(r,null),mt&&(s[mt]=l),t){var e=function(){i.on(n,null)};i.on(n,function(){F(),e()},!0),setTimeout(e,0)}}}t.mouse=function(t){return _t(t,N())};var bt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function _t(e,r){r.changedTouches&&(r=r.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();if(bt<0){var a=o(e);if(a.scrollX||a.scrollY){var s=(n=t.select(\\\"body\\\").append(\\\"svg\\\").style({position:\\\"absolute\\\",top:0,left:0,margin:0,padding:0,border:\\\"none\\\"},\\\"important\\\"))[0][0].getScreenCTM();bt=!(s.f||s.e),n.remove()}}return bt?(i.x=r.pageX,i.y=r.pageY):(i.x=r.clientX,i.y=r.clientY),[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}var l=e.getBoundingClientRect();return[r.clientX-l.left-e.clientLeft,r.clientY-l.top-e.clientTop]}function wt(){return t.event.changedTouches[0].identifier}t.touch=function(t,e,r){if(arguments.length<3&&(r=e,e=N().changedTouches),e)for(var n,i=0,a=e.length;i<a;++i)if((n=e[i]).identifier===r)return _t(t,n)},t.behavior.drag=function(){var e=j(a,\\\"drag\\\",\\\"dragstart\\\",\\\"dragend\\\"),r=null,n=s(D,t.mouse,o,\\\"mousemove\\\",\\\"mouseup\\\"),i=s(wt,t.touch,z,\\\"touchmove\\\",\\\"touchend\\\");function a(){this.on(\\\"mousedown.drag\\\",n).on(\\\"touchstart.drag\\\",i)}function s(n,i,a,o,s){return function(){var l,c=t.event.target.correspondingElement||t.event.target,u=this.parentNode,f=e.of(this,arguments),h=0,p=n(),d=\\\".drag\\\"+(null==p?\\\"\\\":\\\"-\\\"+p),g=t.select(a(c)).on(o+d,function(){var t,e,r=i(u,p);if(!r)return;t=r[0]-m[0],e=r[1]-m[1],h|=t|e,m=r,f({type:\\\"drag\\\",x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:e})}).on(s+d,function(){if(!i(u,p))return;g.on(o+d,null).on(s+d,null),v(h),f({type:\\\"dragend\\\"})}),v=xt(c),m=i(u,p);l=r?[(l=r.apply(this,arguments)).x-m[0],l.y-m[1]]:[0,0],f({type:\\\"dragstart\\\"})}}return a.origin=function(t){return arguments.length?(r=t,a):r},t.rebind(a,e,\\\"on\\\")},t.touches=function(t,e){return arguments.length<2&&(e=N().touches),e?n(e).map(function(e){var r=_t(t,e);return r.identifier=e.identifier,r}):[]};var kt=1e-6,Mt=kt*kt,At=Math.PI,Tt=2*At,St=Tt-kt,Ct=At/2,Et=At/180,Lt=180/At;function zt(t){return t>0?1:t<0?-1:0}function Ot(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function It(t){return t>1?0:t<-1?At:Math.acos(t)}function Pt(t){return t>1?Ct:t<-1?-Ct:Math.asin(t)}function Dt(t){return((t=Math.exp(t))+1/t)/2}function Rt(t){return(t=Math.sin(t/2))*t}var Bt=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h<Mt)n=Math.log(c/o)/Bt,r=function(t){return[i+t*u,a+t*f,o*Math.exp(Bt*t*n)]};else{var p=Math.sqrt(h),d=(c*c-o*o+4*h)/(2*o*2*p),g=(c*c-o*o-4*h)/(2*c*2*p),v=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(g*g+1)-g);n=(m-v)/Bt,r=function(t){var e,r=t*n,s=Dt(v),l=o/(2*p)*(s*(e=Bt*r+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+l*u,a+l*f,o*s/Dt(Bt*r+v)]}}return r.duration=1e3*n,r},t.behavior.zoom=function(){var e,r,n,a,s,l,c,u,f,h={x:0,y:0,k:1},p=[960,500],d=jt,g=250,v=0,m=\\\"mousedown.zoom\\\",y=\\\"mousemove.zoom\\\",x=\\\"mouseup.zoom\\\",b=\\\"touchstart.zoom\\\",_=j(w,\\\"zoomstart\\\",\\\"zoom\\\",\\\"zoomend\\\");function w(t){t.on(m,z).on(Nt+\\\".zoom\\\",I).on(\\\"dblclick.zoom\\\",P).on(b,O)}function k(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function M(t){h.k=Math.max(d[0],Math.min(d[1],t))}function A(t,e){e=function(t){return[t[0]*h.k+h.x,t[1]*h.k+h.y]}(e),h.x+=t[0]-e[0],h.y+=t[1]-e[1]}function T(e,n,i,a){e.__chart__={x:h.x,y:h.y,k:h.k},M(Math.pow(2,a)),A(r=n,i),e=t.select(e),g>0&&(e=e.transition().duration(g)),e.call(w.event)}function S(){c&&c.domain(l.range().map(function(t){return(t-h.x)/h.k}).map(l.invert)),f&&f.domain(u.range().map(function(t){return(t-h.y)/h.k}).map(u.invert))}function C(t){v++||t({type:\\\"zoomstart\\\"})}function E(t){S(),t({type:\\\"zoom\\\",scale:h.k,translate:[h.x,h.y]})}function L(t){--v||(t({type:\\\"zoomend\\\"}),r=null)}function z(){var e=this,r=_.of(e,arguments),n=0,i=t.select(o(e)).on(y,function(){n=1,A(t.mouse(e),a),E(r)}).on(x,function(){i.on(y,null).on(x,null),s(n),L(r)}),a=k(t.mouse(e)),s=xt(e);fs.call(e),C(r)}function O(){var e,r=this,n=_.of(r,arguments),i={},a=0,o=\\\".zoom-\\\"+t.event.changedTouches[0].identifier,l=\\\"touchmove\\\"+o,c=\\\"touchend\\\"+o,u=[],f=t.select(r),p=xt(r);function d(){var n=t.touches(r);return e=h.k,n.forEach(function(t){t.identifier in i&&(i[t.identifier]=k(t))}),n}function g(){var e=t.event.target;t.select(e).on(l,v).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,f=n.length;o<f;++o)i[n[o].identifier]=null;var p=d(),g=Date.now();if(1===p.length){if(g-s<500){var m=p[0];T(r,m,i[m.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),F()}s=g}else if(p.length>1){m=p[0];var x=p[1],b=m[0]-x[0],_=m[1]-x[1];a=b*b+_*_}}function v(){var o,l,c,u,f=t.touches(r);fs.call(r);for(var h=0,p=f.length;h<p;++h,u=null)if(c=f[h],u=i[c.identifier]){if(l)break;o=c,l=u}if(u){var d=(d=c[0]-o[0])*d+(d=c[1]-o[1])*d,g=a&&Math.sqrt(d/a);o=[(o[0]+c[0])/2,(o[1]+c[1])/2],l=[(l[0]+u[0])/2,(l[1]+u[1])/2],M(g*e)}s=null,A(o,l),E(n)}function y(){if(t.event.touches.length){for(var e=t.event.changedTouches,r=0,a=e.length;r<a;++r)delete i[e[r].identifier];for(var s in i)return void d()}t.selectAll(u).on(o,null),f.on(m,z).on(b,O),p(),L(n)}g(),C(n),f.on(m,null).on(b,g)}function I(){var i=_.of(this,arguments);a?clearTimeout(a):(fs.call(this),e=k(r=n||t.mouse(this)),C(i)),a=setTimeout(function(){a=null,L(i)},50),F(),M(Math.pow(2,.002*Ft())*h.k),A(r,e),E(i)}function P(){var e=t.mouse(this),r=Math.log(h.k)/Math.LN2;T(this,e,k(e),t.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1)}return Nt||(Nt=\\\"onwheel\\\"in i?(Ft=function(){return-t.event.deltaY*(t.event.deltaMode?120:1)},\\\"wheel\\\"):\\\"onmousewheel\\\"in i?(Ft=function(){return t.event.wheelDelta},\\\"mousewheel\\\"):(Ft=function(){return-t.event.detail},\\\"MozMousePixelScroll\\\")),w.event=function(e){e.each(function(){var e=_.of(this,arguments),n=h;ds?t.select(this).transition().each(\\\"start.zoom\\\",function(){h=this.__chart__||{x:0,y:0,k:1},C(e)}).tween(\\\"zoom:zoom\\\",function(){var i=p[0],a=p[1],o=r?r[0]:i/2,s=r?r[1]:a/2,l=t.interpolateZoom([(o-h.x)/h.k,(s-h.y)/h.k,i/h.k],[(o-n.x)/n.k,(s-n.y)/n.k,i/n.k]);return function(t){var r=l(t),n=i/r[2];this.__chart__=h={x:o-r[0]*n,y:s-r[1]*n,k:n},E(e)}}).each(\\\"interrupt.zoom\\\",function(){L(e)}).each(\\\"end.zoom\\\",function(){L(e)}):(this.__chart__=h,C(e),E(e),L(e))})},w.translate=function(t){return arguments.length?(h={x:+t[0],y:+t[1],k:h.k},S(),w):[h.x,h.y]},w.scale=function(t){return arguments.length?(h={x:h.x,y:h.y,k:null},M(+t),S(),w):h.k},w.scaleExtent=function(t){return arguments.length?(d=null==t?jt:[+t[0],+t[1]],w):d},w.center=function(t){return arguments.length?(n=t&&[+t[0],+t[1]],w):n},w.size=function(t){return arguments.length?(p=t&&[+t[0],+t[1]],w):p},w.duration=function(t){return arguments.length?(g=+t,w):g},w.x=function(t){return arguments.length?(c=t,l=t.copy(),h={x:0,y:0,k:1},w):c},w.y=function(t){return arguments.length?(f=t,u=t.copy(),h={x:0,y:0,k:1},w):f},t.rebind(w,_,\\\"on\\\")};var Ft,Nt,jt=[0,1/0];function Vt(){}function Ut(t,e,r){return this instanceof Ut?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof Ut?new Ut(t.h,t.s,t.l):ue(\\\"\\\"+t,fe,Ut):new Ut(t,e,r)}t.color=Vt,Vt.prototype.toString=function(){return this.rgb()+\\\"\\\"},t.hsl=Ut;var qt=Ut.prototype=new Vt;function Ht(t,e,r){var n,i;function a(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ae(a(t+120),a(t),a(t-120))}function Gt(e,r,n){return this instanceof Gt?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length<2?e instanceof Gt?new Gt(e.h,e.c,e.l):ee(e instanceof Xt?e.l:(e=he((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Gt(e,r,n)}qt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,this.l/t)},qt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,t*this.l)},qt.rgb=function(){return Ht(this.h,this.s,this.l)},t.hcl=Gt;var Wt=Gt.prototype=new Vt;function Yt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Xt(r,Math.cos(t*=Et)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof Gt?Yt(t.h,t.c,t.l):he((t=ae(t)).r,t.g,t.b):new Xt(t,e,r)}Wt.brighter=function(t){return new Gt(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Wt.darker=function(t){return new Gt(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Wt.rgb=function(){return Yt(this.h,this.c,this.l).rgb()},t.lab=Xt;var Zt=18,$t=.95047,Jt=1,Kt=1.08883,Qt=Xt.prototype=new Vt;function te(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ae(ie(3.2404542*(i=re(i)*$t)-1.5371385*(n=re(n)*Jt)-.4985314*(a=re(a)*Kt)),ie(-.969266*i+1.8760108*n+.041556*a),ie(.0556434*i-.2040259*n+1.0572252*a))}function ee(t,e,r){return t>0?new Gt(Math.atan2(r,e)*Lt,Math.sqrt(e*e+r*r),t):new Gt(NaN,NaN,t)}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ae(t,e,r){return this instanceof ae?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ae?new ae(t.r,t.g,t.b):ue(\\\"\\\"+t,ae,Ht):new ae(t,e,r)}function oe(t){return new ae(t>>16,t>>8&255,255&t)}function se(t){return oe(t)+\\\"\\\"}Qt.brighter=function(t){return new Xt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},Qt.darker=function(t){return new Xt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},Qt.rgb=function(){return te(this.l,this.a,this.b)},t.rgb=ae;var le=ae.prototype=new Vt;function ce(t){return t<16?\\\"0\\\"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\\\\((.*)\\\\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(\\\",\\\"),n[1]){case\\\"hsl\\\":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case\\\"rgb\\\":return e(de(i[0]),de(i[1]),de(i[2]))}return(a=ge.get(t))?e(a.r,a.g,a.b):(null==t||\\\"#\\\"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function fe(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e<r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=l>0&&l<1?0:n),new Ut(n,i,l)}function he(t,e,r){var n=ne((.4124564*(t=pe(t))+.3575761*(e=pe(e))+.1804375*(r=pe(r)))/$t),i=ne((.2126729*t+.7151522*e+.072175*r)/Jt);return Xt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/Kt)))}function pe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return\\\"%\\\"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e<i&&(e=i),r&&r<i&&(r=i),n&&n<i&&(n=i),new ae(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new ae(i,i,i)},le.darker=function(t){return new ae((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},le.hsl=function(){return fe(this.r,this.g,this.b)},le.toString=function(){return\\\"#\\\"+ce(this.r)+ce(this.g)+ce(this.b)};var ge=t.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function ve(t){return\\\"function\\\"==typeof t?t:function(){return t}}function me(t){return function(e,r,n){return 2===arguments.length&&\\\"function\\\"==typeof r&&(n=r,r=null),ye(e,r,t,n)}}function ye(e,r,i,a){var o={},s=t.dispatch(\\\"beforesend\\\",\\\"progress\\\",\\\"load\\\",\\\"error\\\"),l={},c=new XMLHttpRequest,u=null;function f(){var t,e=c.status;if(!e&&function(t){var e=t.responseType;return e&&\\\"text\\\"!==e?t.response:t.responseText}(c)||e>=200&&e<300||304===e){try{t=i.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return!this.XDomainRequest||\\\"withCredentials\\\"in c||!/^(http(s)?:)?\\\\/\\\\//.test(e)||(c=new XDomainRequest),\\\"onload\\\"in c?c.onload=c.onerror=f:c.onreadystatechange=function(){c.readyState>3&&f()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+\\\"\\\").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+\\\"\\\",o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+\\\"\\\",o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return i=t,o},[\\\"get\\\",\\\"post\\\"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}}),o.send=function(t,n,i){if(2===arguments.length&&\\\"function\\\"==typeof n&&(i=n,n=null),c.open(t,e,!0),null==r||\\\"accept\\\"in l||(l.accept=r+\\\",*/*\\\"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=i&&o.on(\\\"error\\\",i).on(\\\"load\\\",function(t){i(null,t)}),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,\\\"on\\\"),null==a?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(a))}ge.forEach(function(t,e){ge.set(t,oe(e))}),t.functor=ve,t.xhr=me(z),t.dsv=function(t,e){var r=new RegExp('[\\\"'+t+\\\"\\\\n]\\\"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=ye(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'\\\"'+t.replace(/\\\\\\\"/g,'\\\"\\\"')+'\\\"':t}return i.parse=function(t,e){var r;return i.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function(\\\"d\\\",\\\"return {\\\"+t.map(function(t,e){return JSON.stringify(t)+\\\": d[\\\"+e+\\\"]\\\"}).join(\\\",\\\")+\\\"}\\\");r=e?function(t,r){return e(i(t),r)}:i})},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,c=0,u=0;function f(){if(c>=l)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++<l;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return c=r+2,13===(s=t.charCodeAt(r+1))?(i=!0,10===t.charCodeAt(r+2)&&++c):10===s&&(i=!0),t.slice(e+1,r).replace(/\\\"\\\"/g,'\\\"')}for(;c<l;){var s,u=1;if(10===(s=t.charCodeAt(c++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(c)&&(++c,++u);else if(s!==n)continue;return t.slice(e,c-u)}return t.slice(e)}for(;(r=f())!==o;){for(var h=[];r!==a&&r!==o;)h.push(r),r=f();e&&null==(h=e(h,u++))||s.push(h)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var r=new L,n=[];return e.forEach(function(t){for(var e in t)r.has(e)||n.push(r.add(e))}),[n.map(l).join(t)].concat(e.map(function(e){return n.map(function(t){return l(e[t])}).join(t)})).join(\\\"\\\\n\\\")},i.formatRows=function(t){return t.map(s).join(\\\"\\\\n\\\")},i},t.csv=t.dsv(\\\",\\\",\\\"text/csv\\\"),t.tsv=t.dsv(\\\"\\\\t\\\",\\\"text/tab-separated-values\\\");var xe,be,_e,we,ke=this[I(this,\\\"requestAnimationFrame\\\")]||function(t){setTimeout(t,17)};function Me(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i={c:t,t:r+e,n:null};return be?be.n=i:xe=i,be=i,_e||(we=clearTimeout(we),_e=1,ke(Ae)),i}function Ae(){var t=Te(),e=Se()-t;e>24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Ae,e)),_e=0):(_e=1,ke(Ae))}function Te(){for(var t=Date.now(),e=xe;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Se(){for(var t,e=xe,r=1/0;e;)e.c?(e.t<r&&(r=e.t),e=(t=e).n):e=t?t.n=e.n:xe=e.n;return be=t,r}function Ce(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}t.timer=function(){Me.apply(this,arguments)},t.timer.flush=function(){Te(),Se()},t.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Ee=[\\\"y\\\",\\\"z\\\",\\\"a\\\",\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"\\\\xb5\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\",\\\"P\\\",\\\"E\\\",\\\"Z\\\",\\\"Y\\\"].map(function(t,e){var r=Math.pow(10,3*y(8-e));return{scale:e>8?function(t){return t/r}:function(t){return t*r},symbol:t}});t.formatPrefix=function(e,r){var n=0;return(e=+e)&&(e<0&&(e*=-1),r&&(e=t.round(e,Ce(e,r))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ee[8+n/3]};var Le=/(?:([^{])?([<>=^]))?([+\\\\- ])?([$#])?(0)?(\\\\d+)?(,)?(\\\\.-?\\\\d+)?([a-z%])?/i,ze=t.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(e,r){return(e=t.round(e,Ce(e,r))).toFixed(Math.max(0,Math.min(20,Ce(e*(1+1e-15),r))))}});function Oe(t){return t+\\\"\\\"}var Ie=t.time={},Pe=Date;function De(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}De.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Re.setUTCDate.apply(this._,arguments)},setDay:function(){Re.setUTCDay.apply(this._,arguments)},setFullYear:function(){Re.setUTCFullYear.apply(this._,arguments)},setHours:function(){Re.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Re.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Re.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Re.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Re.setUTCSeconds.apply(this._,arguments)},setTime:function(){Re.setTime.apply(this._,arguments)}};var Re=Date.prototype;function Be(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r<n-e?r:n}function i(r){return e(r=t(new Pe(r-1)),1),r}function a(t,r){return e(t=new Pe(+t),r),t}function o(t,n,a){var o=i(t),s=[];if(a>1)for(;o<n;)r(o)%a||s.push(new Date(+o)),e(o,1);else for(;o<n;)s.push(new Date(+o)),e(o,1);return s}t.floor=t,t.round=n,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=Fe(t);return s.floor=s,s.round=Fe(n),s.ceil=Fe(i),s.offset=Fe(a),s.range=function(t,e,r){try{Pe=De;var n=new De;return n._=t,o(n,e,r)}finally{Pe=Date}},t}function Fe(t){return function(e,r){try{Pe=De;var n=new De;return n._=e,t(n,r)._}finally{Pe=Date}}}Ie.year=Be(function(t){return(t=Ie.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Ie.years=Ie.year.range,Ie.years.utc=Ie.year.utc.range,Ie.day=Be(function(t){var e=new Pe(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),Ie.days=Ie.day.range,Ie.days.utc=Ie.day.utc.range,Ie.dayOfYear=function(t){var e=Ie.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},[\\\"sunday\\\",\\\"monday\\\",\\\"tuesday\\\",\\\"wednesday\\\",\\\"thursday\\\",\\\"friday\\\",\\\"saturday\\\"].forEach(function(t,e){e=7-e;var r=Ie[t]=Be(function(t){return(t=Ie.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=Ie.year(t).getDay();return Math.floor((Ie.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});Ie[t+\\\"s\\\"]=r.range,Ie[t+\\\"s\\\"].utc=r.utc.range,Ie[t+\\\"OfYear\\\"]=function(t){var r=Ie.year(t).getDay();return Math.floor((Ie.dayOfYear(t)+(r+e)%7)/7)}}),Ie.week=Ie.sunday,Ie.weeks=Ie.sunday.range,Ie.weeks.utc=Ie.sunday.utc.range,Ie.weekOfYear=Ie.sundayOfYear;var Ne={\\\"-\\\":\\\"\\\",_:\\\" \\\",0:\\\"0\\\"},je=/^\\\\s*\\\\d+/,Ve=/^%/;function Ue(t,e,r){var n=t<0?\\\"-\\\":\\\"\\\",i=(n?-t:t)+\\\"\\\",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function qe(e){return new RegExp(\\\"^(?:\\\"+e.map(t.requote).join(\\\"|\\\")+\\\")\\\",\\\"i\\\")}function He(t){for(var e=new b,r=-1,n=t.length;++r<n;)e.set(t[r].toLowerCase(),r);return e}function Ge(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function We(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r));return n?(t.U=+n[0],r+n[0].length):-1}function Ye(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r));return n?(t.W=+n[0],r+n[0].length):-1}function Xe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Ze(t,e,r){je.lastIndex=0;var n,i=je.exec(e.slice(r,r+2));return i?(t.y=(n=+i[0])+(n>68?1900:2e3),r+i[0].length):-1}function $e(t,e,r){return/^[+-]\\\\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Je(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Ke(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Qe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function tr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function er(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function rr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function nr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ir(t){var e=t.getTimezoneOffset(),r=e>0?\\\"-\\\":\\\"+\\\",n=y(e)/60|0,i=y(e)%60;return r+Ue(n,\\\"0\\\",2)+Ue(i,\\\"0\\\",2)}function ar(t,e,r){Ve.lastIndex=0;var n=Ve.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function or(t){for(var e=t.length,r=-1;++r<e;)t[r][0]=this(t[r][0]);return function(e){for(var r=0,n=t[r];!n[1](e);)n=t[++r];return n[0](e)}}t.locale=function(e){return{numberFormat:function(e){var r=e.decimal,n=e.thousands,i=e.grouping,a=e.currency,o=i&&n?function(t,e){for(var r=t.length,a=[],o=0,s=i[0],l=0;r>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(r-=s,r+s)),!((l+=s+1)>e));)s=i[o=(o+1)%i.length];return a.reverse().join(n)}:z;return function(e){var n=Le.exec(e),i=n[1]||\\\" \\\",s=n[2]||\\\">\\\",l=n[3]||\\\"-\\\",c=n[4]||\\\"\\\",u=n[5],f=+n[6],h=n[7],p=n[8],d=n[9],g=1,v=\\\"\\\",m=\\\"\\\",y=!1,x=!0;switch(p&&(p=+p.substring(1)),(u||\\\"0\\\"===i&&\\\"=\\\"===s)&&(u=i=\\\"0\\\",s=\\\"=\\\"),d){case\\\"n\\\":h=!0,d=\\\"g\\\";break;case\\\"%\\\":g=100,m=\\\"%\\\",d=\\\"f\\\";break;case\\\"p\\\":g=100,m=\\\"%\\\",d=\\\"r\\\";break;case\\\"b\\\":case\\\"o\\\":case\\\"x\\\":case\\\"X\\\":\\\"#\\\"===c&&(v=\\\"0\\\"+d.toLowerCase());case\\\"c\\\":x=!1;case\\\"d\\\":y=!0,p=0;break;case\\\"s\\\":g=-1,d=\\\"r\\\"}\\\"$\\\"===c&&(v=a[0],m=a[1]),\\\"r\\\"!=d||p||(d=\\\"g\\\"),null!=p&&(\\\"g\\\"==d?p=Math.max(1,Math.min(21,p)):\\\"e\\\"!=d&&\\\"f\\\"!=d||(p=Math.max(0,Math.min(20,p)))),d=ze.get(d)||Oe;var b=u&&h;return function(e){var n=m;if(y&&e%1)return\\\"\\\";var a=e<0||0===e&&1/e<0?(e=-e,\\\"-\\\"):\\\"-\\\"===l?\\\"\\\":l;if(g<0){var c=t.formatPrefix(e,p);e=c.scale(e),n=c.symbol+m}else e*=g;var _,w,k=(e=d(e,p)).lastIndexOf(\\\".\\\");if(k<0){var M=x?e.lastIndexOf(\\\"e\\\"):-1;M<0?(_=e,w=\\\"\\\"):(_=e.substring(0,M),w=e.substring(M))}else _=e.substring(0,k),w=r+e.substring(k+1);!u&&h&&(_=o(_,1/0));var A=v.length+_.length+w.length+(b?0:a.length),T=A<f?new Array(A=f-A+1).join(i):\\\"\\\";return b&&(_=o(T+_,T.length?f-w.length:1/0)),a+=v,e=_+w,(\\\"<\\\"===s?a+e+T:\\\">\\\"===s?T+a+e:\\\"^\\\"===s?T.substring(0,A>>=1)+a+e+T.substring(A):a+(b?e:T+e))+n}}}(e),timeFormat:function(e){var r=e.dateTime,n=e.date,i=e.time,a=e.periods,o=e.days,s=e.shortDays,l=e.months,c=e.shortMonths;function u(t){var e=t.length;function r(r){for(var n,i,a,o=[],s=-1,l=0;++s<e;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(i=Ne[n=t.charAt(++s)])&&(n=t.charAt(++s)),(a=_[n])&&(n=a(r,null==i?\\\"e\\\"===n?\\\" \\\":\\\"0\\\":i)),o.push(n),l=s+1);return o.push(t.slice(l,s)),o.join(\\\"\\\")}return r.parse=function(e){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(f(r,t,e,0)!=e.length)return null;\\\"p\\\"in r&&(r.H=r.H%12+12*r.p);var n=null!=r.Z&&Pe!==De,i=new(n?De:Pe);return\\\"j\\\"in r?i.setFullYear(r.y,0,r.j):\\\"W\\\"in r||\\\"U\\\"in r?(\\\"w\\\"in r||(r.w=\\\"W\\\"in r?1:0),i.setFullYear(r.y,0,1),i.setFullYear(r.y,0,\\\"W\\\"in r?(r.w+6)%7+7*r.W-(i.getDay()+5)%7:r.w+7*r.U-(i.getDay()+6)%7)):i.setFullYear(r.y,r.m,r.d),i.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),n?i._:i},r.toString=function(){return t},r}function f(t,e,r,n){for(var i,a,o,s=0,l=e.length,c=r.length;s<l;){if(n>=c)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=w[o in Ne?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}u.utc=function(t){var e=u(t);function r(t){try{var r=new(Pe=De);return r._=t,e(r)}finally{Pe=Date}}return r.parse=function(t){try{Pe=De;var r=e.parse(t);return r&&r._}finally{Pe=Date}},r.toString=e.toString,r},u.multi=u.utc.multi=or;var h=t.map(),p=qe(o),d=He(o),g=qe(s),v=He(s),m=qe(l),y=He(l),x=qe(c),b=He(c);a.forEach(function(t,e){h.set(t.toLowerCase(),e)});var _={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(r),d:function(t,e){return Ue(t.getDate(),e,2)},e:function(t,e){return Ue(t.getDate(),e,2)},H:function(t,e){return Ue(t.getHours(),e,2)},I:function(t,e){return Ue(t.getHours()%12||12,e,2)},j:function(t,e){return Ue(1+Ie.dayOfYear(t),e,3)},L:function(t,e){return Ue(t.getMilliseconds(),e,3)},m:function(t,e){return Ue(t.getMonth()+1,e,2)},M:function(t,e){return Ue(t.getMinutes(),e,2)},p:function(t){return a[+(t.getHours()>=12)]},S:function(t,e){return Ue(t.getSeconds(),e,2)},U:function(t,e){return Ue(Ie.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ue(Ie.mondayOfYear(t),e,2)},x:u(n),X:u(i),y:function(t,e){return Ue(t.getFullYear()%100,e,2)},Y:function(t,e){return Ue(t.getFullYear()%1e4,e,4)},Z:ir,\\\"%\\\":function(){return\\\"%\\\"}},w={a:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.w=v.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){m.lastIndex=0;var n=m.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return f(t,_.c.toString(),e,r)},d:Ke,e:Ke,H:tr,I:tr,j:Qe,L:nr,m:Je,M:er,p:function(t,e,r){var n=h.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:rr,U:We,w:Ge,W:Ye,x:function(t,e,r){return f(t,_.x.toString(),e,r)},X:function(t,e,r){return f(t,_.X.toString(),e,r)},y:Ze,Y:Xe,Z:$e,\\\"%\\\":ar};return u}(e)}};var sr=t.locale({decimal:\\\".\\\",thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"],dateTime:\\\"%a %b %e %X %Y\\\",date:\\\"%m/%d/%Y\\\",time:\\\"%H:%M:%S\\\",periods:[\\\"AM\\\",\\\"PM\\\"],days:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],shortDays:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],months:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],shortMonths:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"]});function lr(){}t.format=sr.numberFormat,t.geo={},lr.prototype={s:0,t:0,add:function(t){ur(t,this.t,cr),ur(cr.s,this.s,this),this.s?this.t+=cr.t:this.s=cr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cr=new lr;function ur(t,e,r){var n=r.s=t+e,i=n-t,a=n-i;r.t=t-a+(e-i)}function fr(t,e){t&&pr.hasOwnProperty(t.type)&&pr[t.type](t,e)}t.geo.stream=function(t,e){t&&hr.hasOwnProperty(t.type)?hr[t.type](t,e):fr(t,e)};var hr={Feature:function(t,e){fr(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n<i;)fr(r[n].geometry,e)}},pr={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){dr(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)dr(r[n],e,0)},Polygon:function(t,e){gr(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)gr(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n<i;)fr(r[n],e)}};function dr(t,e,r){var n,i=-1,a=t.length-r;for(e.lineStart();++i<a;)n=t[i],e.point(n[0],n[1],n[2]);e.lineEnd()}function gr(t,e){var r=-1,n=t.length;for(e.polygonStart();++r<n;)dr(t[r],e,1);e.polygonEnd()}t.geo.area=function(e){return vr=0,t.geo.stream(e,Er),vr};var vr,mr,yr,xr,br,_r,wr,kr,Mr,Ar,Tr,Sr,Cr=new lr,Er={sphere:function(){vr+=4*At},point:D,lineStart:D,lineEnd:D,polygonStart:function(){Cr.reset(),Er.lineStart=Lr},polygonEnd:function(){var t=2*Cr;vr+=t<0?4*At+t:t,Er.lineStart=Er.lineEnd=Er.point=D}};function Lr(){var t,e,r,n,i;function a(t,e){e=e*Et/2+At/4;var a=(t*=Et)-r,o=a>=0?1:-1,s=o*a,l=Math.cos(e),c=Math.sin(e),u=i*c,f=n*l+u*Math.cos(s),h=u*o*Math.sin(s);Cr.add(Math.atan2(h,f)),r=t,n=l,i=c}Er.point=function(o,s){Er.point=a,r=(t=o)*Et,n=Math.cos(s=(e=s)*Et/2+At/4),i=Math.sin(s)},Er.lineEnd=function(){a(t,e)}}function zr(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function Or(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ir(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Pr(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Dr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Rr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Br(t){return[Math.atan2(t[1],t[0]),Pt(t[2])]}function Fr(t,e){return y(t[0]-e[0])<kt&&y(t[1]-e[1])<kt}t.geo.bounds=function(){var e,r,n,i,a,o,s,l,c,u,f,h={point:p,lineStart:g,lineEnd:v,polygonStart:function(){h.point=m,h.lineStart=x,h.lineEnd=b,c=0,Er.polygonStart()},polygonEnd:function(){Er.polygonEnd(),h.point=p,h.lineStart=g,h.lineEnd=v,Cr<0?(e=-(n=180),r=-(i=90)):c>kt?i=90:c<-kt&&(r=-90),f[0]=e,f[1]=n}};function p(t,a){u.push(f=[e=t,n=t]),a<r&&(r=a),a>i&&(i=a)}function d(t,o){var s=zr([t*Et,o*Et]);if(l){var c=Ir(l,s),u=Ir([c[1],-c[0],0],c);Rr(u),u=Br(u);var f=t-a,h=f>0?1:-1,d=u[0]*Lt*h,g=y(f)>180;if(g^(h*a<d&&d<h*t))(v=u[1]*Lt)>i&&(i=v);else if(g^(h*a<(d=(d+360)%360-180)&&d<h*t)){var v;(v=-u[1]*Lt)<r&&(r=v)}else o<r&&(r=o),o>i&&(i=o);g?t<a?_(e,t)>_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t):n>=e?(t<e&&(e=t),t>n&&(n=t)):t>a?_(e,t)>_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t)}else p(t,o);l=s,a=t}function g(){h.point=d}function v(){f[0]=e,f[1]=n,h.point=p,l=null}function m(t,e){if(l){var r=t-a;c+=y(r)>180?r+(r>0?360:-360):r}else o=t,s=e;Er.point(t,e),d(t,e)}function x(){Er.lineStart()}function b(){m(o,s),Er.lineEnd(),y(c)>kt&&(e=-(n=180)),f[0]=e,f[1]=n,l=null}function _(t,e){return(e-=t)<0?e+360:e}function w(t,e){return t[0]-e[0]}function k(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}return function(a){if(i=n=-(e=r=1/0),u=[],t.geo.stream(a,h),c=u.length){u.sort(w);for(var o=1,s=[g=u[0]];o<c;++o)k((p=u[o])[0],g)||k(p[1],g)?(_(g[0],p[1])>_(g[0],g[1])&&(g[1]=p[1]),_(p[0],g[1])>_(g[0],g[1])&&(g[0]=p[0])):s.push(g=p);for(var l,c,p,d=-1/0,g=(o=0,s[c=s.length-1]);o<=c;g=p,++o)p=s[o],(l=_(g[1],p[0]))>d&&(d=l,e=p[0],n=g[1])}return u=f=null,e===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,r],[n,i]]}}(),t.geo.centroid=function(e){mr=yr=xr=br=_r=wr=kr=Mr=Ar=Tr=Sr=0,t.geo.stream(e,Nr);var r=Ar,n=Tr,i=Sr,a=r*r+n*n+i*i;return a<Mt&&(r=wr,n=kr,i=Mr,yr<kt&&(r=xr,n=br,i=_r),(a=r*r+n*n+i*i)<Mt)?[NaN,NaN]:[Math.atan2(n,r)*Lt,Pt(i/Math.sqrt(a))*Lt]};var Nr={sphere:D,point:jr,lineStart:Ur,lineEnd:qr,polygonStart:function(){Nr.lineStart=Hr},polygonEnd:function(){Nr.lineStart=Ur}};function jr(t,e){t*=Et;var r=Math.cos(e*=Et);Vr(r*Math.cos(t),r*Math.sin(t),Math.sin(e))}function Vr(t,e,r){xr+=(t-xr)/++mr,br+=(e-br)/mr,_r+=(r-_r)/mr}function Ur(){var t,e,r;function n(n,i){n*=Et;var a=Math.cos(i*=Et),o=a*Math.cos(n),s=a*Math.sin(n),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*l-r*s)*c+(c=r*o-t*l)*c+(c=t*s-e*o)*c),t*o+e*s+r*l);yr+=c,wr+=c*(t+(t=o)),kr+=c*(e+(e=s)),Mr+=c*(r+(r=l)),Vr(t,e,r)}Nr.point=function(i,a){i*=Et;var o=Math.cos(a*=Et);t=o*Math.cos(i),e=o*Math.sin(i),r=Math.sin(a),Nr.point=n,Vr(t,e,r)}}function qr(){Nr.point=jr}function Hr(){var t,e,r,n,i;function a(t,e){t*=Et;var a=Math.cos(e*=Et),o=a*Math.cos(t),s=a*Math.sin(t),l=Math.sin(e),c=n*l-i*s,u=i*o-r*l,f=r*s-n*o,h=Math.sqrt(c*c+u*u+f*f),p=r*o+n*s+i*l,d=h&&-It(p)/h,g=Math.atan2(h,p);Ar+=d*c,Tr+=d*u,Sr+=d*f,yr+=g,wr+=g*(r+(r=o)),kr+=g*(n+(n=s)),Mr+=g*(i+(i=l)),Vr(r,n,i)}Nr.point=function(o,s){t=o,e=s,Nr.point=a,o*=Et;var l=Math.cos(s*=Et);r=l*Math.cos(o),n=l*Math.sin(o),i=Math.sin(s),Vr(r,n,i)},Nr.lineEnd=function(){a(t,e),Nr.lineEnd=qr,Nr.point=jr}}function Gr(t,e){function r(r,n){return r=t(r,n),e(r[0],r[1])}return t.invert&&e.invert&&(r.invert=function(r,n){return(r=e.invert(r,n))&&t.invert(r[0],r[1])}),r}function Wr(){return!0}function Yr(t,e,r,n,i){var a=[],o=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,r=t[0],n=t[e];if(Fr(r,n)){i.lineStart();for(var s=0;s<e;++s)i.point((r=t[s])[0],r[1]);i.lineEnd()}else{var l=new Zr(r,t,null,!0),c=new Zr(r,null,l,!1);l.o=c,a.push(l),o.push(c),l=new Zr(n,t,null,!1),c=new Zr(n,null,l,!0),l.o=c,a.push(l),o.push(c)}}}),o.sort(e),Xr(a),Xr(o),a.length){for(var s=0,l=r,c=o.length;s<c;++s)o[s].e=l=!l;for(var u,f,h=a[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(s=0,c=u.length;s<c;++s)i.point((f=u[s])[0],f[1]);else n(p.x,p.n.x,1,i);p=p.n}else{if(d)for(s=(u=p.p.z).length-1;s>=0;--s)i.point((f=u[s])[0],f[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function Xr(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n<e;)i.n=r=t[n],r.p=i,i=r;i.n=r=t[0],r.p=i}}function Zr(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function $r(e,r,n,i){return function(a,o){var s,l=r(o),c=a.invert(i[0],i[1]),u={point:f,lineStart:p,lineEnd:d,polygonStart:function(){u.point=b,u.lineStart=_,u.lineEnd=w,s=[],g=[]},polygonEnd:function(){u.point=f,u.lineStart=p,u.lineEnd=d,s=t.merge(s);var e=function(t,e){var r=t[0],n=t[1],i=[Math.sin(r),-Math.cos(r),0],a=0,o=0;Cr.reset();for(var s=0,l=e.length;s<l;++s){var c=e[s],u=c.length;if(u)for(var f=c[0],h=f[0],p=f[1]/2+At/4,d=Math.sin(p),g=Math.cos(p),v=1;;){v===u&&(v=0);var m=(t=c[v])[0],y=t[1]/2+At/4,x=Math.sin(y),b=Math.cos(y),_=m-h,w=_>=0?1:-1,k=w*_,M=k>At,A=d*x;if(Cr.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),a+=M?_+w*Tt:_,M^h>=r^m>=r){var T=Ir(zr(f),zr(t));Rr(T);var S=Ir(i,T);Rr(S);var C=(M^_>=0?-1:1)*Pt(S[2]);(n>C||n===C&&(T[0]||T[1]))&&(o+=M^_>=0?1:-1)}if(!v++)break;h=m,d=x,g=b,f=t}}return(a<-kt||a<kt&&Cr<-kt)^1&o}(c,g);s.length?(x||(o.polygonStart(),x=!0),Yr(s,Qr,e,n,o)):e&&(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),s=g=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function f(t,r){var n=a(t,r);e(t=n[0],r=n[1])&&o.point(t,r)}function h(t,e){var r=a(t,e);l.point(r[0],r[1])}function p(){u.point=h,l.lineStart()}function d(){u.point=f,l.lineEnd()}var g,v,m=Kr(),y=r(m),x=!1;function b(t,e){v.push([t,e]);var r=a(t,e);y.point(r[0],r[1])}function _(){y.lineStart(),v=[]}function w(){b(v[0][0],v[0][1]),y.lineEnd();var t,e=y.clean(),r=m.buffer(),n=r.length;if(v.pop(),g.push(v),v=null,n)if(1&e){var i,a=-1;if((n=(t=r[0]).length-1)>0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a<n;)o.point((i=t[a])[0],i[1]);o.lineEnd()}}else n>1&&2&e&&r.push(r.pop().concat(r.shift())),s.push(r.filter(Jr))}return u}}function Jr(t){return t.length>1}function Kr(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:D,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Qr(t,e){return((t=t.x)[0]<0?t[1]-Ct-kt:Ct-t[1])-((e=e.x)[0]<0?e[1]-Ct-kt:Ct-e[1])}var tn=$r(Wr,function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?At:-At,l=y(a-r);y(l-At)<kt?(t.point(r,n=(n+o)/2>0?Ct:-Ct),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=At&&(y(r-i)<kt&&(r-=i*kt),y(a-s)<kt&&(a-=s*kt),n=function(t,e,r,n){var i,a,o=Math.sin(t-r);return y(o)>kt?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}(r,n,a,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=a,n=o),i=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var i;if(null==t)i=r*Ct,n.point(-At,i),n.point(0,i),n.point(At,i),n.point(At,0),n.point(At,-i),n.point(0,-i),n.point(-At,-i),n.point(-At,0),n.point(-At,i);else if(y(t[0]-e[0])>kt){var a=t[0]<e[0]?At:-At;i=r*a/2,n.point(-a,i),n.point(0,i),n.point(a,i)}else n.point(e[0],e[1])},[-At,-At/2]);function en(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,c=o.y,u=0,f=1,h=s.x-l,p=s.y-c;if(a=t-l,h||!(a>0)){if(a/=h,h<0){if(a<u)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>u&&(u=a)}if(a=r-l,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>u&&(u=a)}else if(h>0){if(a<u)return;a<f&&(f=a)}if(a=e-c,p||!(a>0)){if(a/=p,p<0){if(a<u)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>u&&(u=a)}if(a=n-c,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>u&&(u=a)}else if(p>0){if(a<u)return;a<f&&(f=a)}return u>0&&(i.a={x:l+u*h,y:c+u*p}),f<1&&(i.b={x:l+f*h,y:c+f*p}),i}}}}}}var rn=1e9;function nn(e,r,n,i){return function(l){var c,u,f,h,p,d,g,v,m,y,x,b=l,_=Kr(),w=en(e,r,n,i),k={point:T,lineStart:function(){k.point=S,u&&u.push(f=[]);y=!0,m=!1,g=v=NaN},lineEnd:function(){c&&(S(h,p),d&&m&&_.rejoin(),c.push(_.buffer()));k.point=T,m&&l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=t.merge(c);var r=function(t){for(var e=0,r=u.length,n=t[1],i=0;i<r;++i)for(var a,o=1,s=u[i],l=s.length,c=s[0];o<l;++o)a=s[o],c[1]<=n?a[1]>n&&Ot(c,a,t)>0&&++e:a[1]<=n&&Ot(c,a,t)<0&&--e,c=a;return 0!==e}([e,i]),n=x&&r,a=c.length;(n||a)&&(l.polygonStart(),n&&(l.lineStart(),M(null,null,1,l),l.lineEnd()),a&&Yr(c,o,r,M,l),l.polygonEnd()),c=u=f=null}};function M(t,o,l,c){var u=0,f=0;if(null==t||(u=a(t,l))!==(f=a(o,l))||s(t,o)<0^l>0)do{c.point(0===u||3===u?e:n,u>1?i:r)}while((u=(u+l+4)%4)!==f);else c.point(o[0],o[1])}function A(t,a){return e<=t&&t<=n&&r<=a&&a<=i}function T(t,e){A(t,e)&&l.point(t,e)}function S(t,e){var r=A(t=Math.max(-rn,Math.min(rn,t)),e=Math.max(-rn,Math.min(rn,e)));if(u&&f.push([t,e]),y)h=t,p=e,d=r,y=!1,r&&(l.lineStart(),l.point(t,e));else if(r&&m)l.point(t,e);else{var n={a:{x:g,y:v},b:{x:t,y:e}};w(n)?(m||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),x=!1):r&&(l.lineStart(),l.point(t,e),x=!1)}g=t,v=e,m=r}return k};function a(t,i){return y(t[0]-e)<kt?i>0?0:3:y(t[0]-n)<kt?i>0?2:1:y(t[1]-r)<kt?i>0?1:0:i>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var r=a(t,1),n=a(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}}function an(t){var e=0,r=At/3,n=En(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*At/180,r=t[1]*At/180):[e/At*180,r/At*180]},i}function on(t,e){var r=Math.sin(t),n=(r+Math.sin(e))/2,i=1+r*(2*n-r),a=Math.sqrt(i)/n;function o(t,e){var r=Math.sqrt(i-2*n*Math.sin(e))/n;return[r*Math.sin(t*=n),a-r*Math.cos(t)]}return o.invert=function(t,e){var r=a-e;return[Math.atan2(t,r)/n,Pt((i-(t*t+r*r)*n*n)/(2*n))]},o}t.geo.clipExtent=function(){var t,e,r,n,i,a,o={stream:function(t){return i&&(i.valid=!1),(i=a(t)).valid=!0,i},extent:function(s){return arguments.length?(a=nn(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(t.geo.conicEqualArea=function(){return an(on)}).raw=on,t.geo.albers=function(){return t.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},t.geo.albersUsa=function(){var e,r,n,i,a=t.geo.albers(),o=t.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=t.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};function c(t){var a=t[0],o=t[1];return e=null,r(a,o),e||(n(a,o),e)||i(a,o),e}return c.invert=function(t){var e=a.scale(),r=a.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},c.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(t){return arguments.length?(a.precision(t),o.precision(t),s.precision(t),c):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),o.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),u=+t[0],f=+t[1];return r=a.translate(t).clipExtent([[u-.455*e,f-.238*e],[u+.455*e,f+.238*e]]).stream(l).point,n=o.translate([u-.307*e,f+.201*e]).clipExtent([[u-.425*e+kt,f+.12*e+kt],[u-.214*e-kt,f+.234*e-kt]]).stream(l).point,i=s.translate([u-.205*e,f+.212*e]).clipExtent([[u-.214*e+kt,f+.166*e+kt],[u-.115*e-kt,f+.234*e-kt]]).stream(l).point,c},c.scale(1070)};var sn,ln,cn,un,fn,hn,pn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){ln=0,pn.lineStart=dn},polygonEnd:function(){pn.lineStart=pn.lineEnd=pn.point=D,sn+=y(ln/2)}};function dn(){var t,e,r,n;function i(t,e){ln+=n*t-r*e,r=t,n=e}pn.point=function(a,o){pn.point=i,t=r=a,e=n=o},pn.lineEnd=function(){i(t,e)}}var gn={point:function(t,e){t<cn&&(cn=t);t>fn&&(fn=t);e<un&&(un=e);e>hn&&(hn=e)},lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D};function vn(){var t=mn(4.5),e=[],r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=mn(e),r},result:function(){if(e.length){var t=e.join(\\\"\\\");return e=[],t}}};function n(r,n){e.push(\\\"M\\\",r,\\\",\\\",n,t)}function i(t,n){e.push(\\\"M\\\",t,\\\",\\\",n),r.point=a}function a(t,r){e.push(\\\"L\\\",t,\\\",\\\",r)}function o(){r.point=n}function s(){e.push(\\\"Z\\\")}return r}function mn(t){return\\\"m0,\\\"+t+\\\"a\\\"+t+\\\",\\\"+t+\\\" 0 1,1 0,\\\"+-2*t+\\\"a\\\"+t+\\\",\\\"+t+\\\" 0 1,1 0,\\\"+2*t+\\\"z\\\"}var yn,xn={point:bn,lineStart:_n,lineEnd:wn,polygonStart:function(){xn.lineStart=kn},polygonEnd:function(){xn.point=bn,xn.lineStart=_n,xn.lineEnd=wn}};function bn(t,e){xr+=t,br+=e,++_r}function _n(){var t,e;function r(r,n){var i=r-t,a=n-e,o=Math.sqrt(i*i+a*a);wr+=o*(t+r)/2,kr+=o*(e+n)/2,Mr+=o,bn(t=r,e=n)}xn.point=function(n,i){xn.point=r,bn(t=n,e=i)}}function wn(){xn.point=bn}function kn(){var t,e,r,n;function i(t,e){var i=t-r,a=e-n,o=Math.sqrt(i*i+a*a);wr+=o*(r+t)/2,kr+=o*(n+e)/2,Mr+=o,Ar+=(o=n*t-r*e)*(r+t),Tr+=o*(n+e),Sr+=3*o,bn(r=t,n=e)}xn.point=function(a,o){xn.point=i,bn(t=r=a,e=n=o)},xn.lineEnd=function(){i(t,e)}}function Mn(t){var e=4.5,r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=t,r},result:D};function n(r,n){t.moveTo(r+e,n),t.arc(r,n,e,0,Tt)}function i(e,n){t.moveTo(e,n),r.point=a}function a(e,r){t.lineTo(e,r)}function o(){r.point=n}function s(){t.closePath()}return r}function An(t){var e=.5,r=Math.cos(30*Et),n=16;function i(e){return(n?function(e){var r,i,o,s,l,c,u,f,h,p,d,g,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),v.lineStart=_},polygonEnd:function(){e.polygonEnd(),v.lineStart=y}};function m(r,n){r=t(r,n),e.point(r[0],r[1])}function y(){f=NaN,v.point=x,e.lineStart()}function x(r,i){var o=zr([r,i]),s=t(r,i);a(f,h,u,p,d,g,f=s[0],h=s[1],u=r,p=o[0],d=o[1],g=o[2],n,e),e.point(f,h)}function b(){v.point=m,e.lineEnd()}function _(){y(),v.point=w,v.lineEnd=k}function w(t,e){x(r=t,e),i=f,o=h,s=p,l=d,c=g,v.point=x}function k(){a(f,h,u,p,d,g,i,o,r,s,l,c,n,e),v.lineEnd=b,b()}return v}:function(e){return Sn(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function a(n,i,o,s,l,c,u,f,h,p,d,g,v,m){var x=u-n,b=f-i,_=x*x+b*b;if(_>4*e&&v--){var w=s+p,k=l+d,M=c+g,A=Math.sqrt(w*w+k*k+M*M),T=Math.asin(M/=A),S=y(y(M)-1)<kt||y(o-h)<kt?(o+h)/2:Math.atan2(k,w),C=t(S,T),E=C[0],L=C[1],z=E-n,O=L-i,I=b*z-x*O;(I*I/_>e||y((x*z+b*O)/_-.5)>.3||s*p+l*d+c*g<r)&&(a(n,i,o,s,l,c,E,L,S,w/=A,k/=A,M,v,m),m.point(E,L),a(E,L,S,w,k,M,u,f,h,p,d,g,v,m))}}return i.precision=function(t){return arguments.length?(n=(e=t*t)>0&&16,i):Math.sqrt(e)},i}function Tn(t){this.stream=t}function Sn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Cn(t){return En(function(){return t})()}function En(e){var r,n,i,a,o,s,l=An(function(t,e){return[(t=r(t,e))[0]*c+a,o-t[1]*c]}),c=150,u=480,f=250,h=0,p=0,d=0,g=0,v=0,m=tn,x=z,b=null,_=null;function w(t){return[(t=i(t[0]*Et,t[1]*Et))[0]*c+a,o-t[1]*c]}function k(t){return(t=i.invert((t[0]-a)/c,(o-t[1])/c))&&[t[0]*Lt,t[1]*Lt]}function M(){i=Gr(n=In(d,g,v),r);var t=r(h,p);return a=u-t[0]*c,o=f+t[1]*c,A()}function A(){return s&&(s.valid=!1,s=null),w}return w.stream=function(t){return s&&(s.valid=!1),(s=Ln(m(n,l(x(t))))).valid=!0,s},w.clipAngle=function(t){return arguments.length?(m=null==t?(b=t,tn):function(t){var e=Math.cos(t),r=e>0,n=y(e)>kt;return $r(i,function(t){var e,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var p,d=[f,h],g=i(f,h),v=r?g?0:o(f,h):g?o(f+(f<0?At:-At),h):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(p=a(e,d),(Fr(e,p)||Fr(d,p))&&(d[0]+=kt,d[1]+=kt,g=i(d[0],d[1]))),g!==l)u=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(n&&e&&r^g){var m;v&s||!(m=a(d,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||e&&Fr(e,d)||t.point(d[0],d[1]),e=d,l=g,s=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}},Bn(t,6*Et),r?[0,-t]:[-At,t-At]);function i(t,r){return Math.cos(t)*Math.cos(r)>e}function a(t,r,n){var i=[1,0,0],a=Ir(zr(t),zr(r)),o=Or(a,a),s=a[0],l=o-s*s;if(!l)return!n&&t;var c=e*o/l,u=-e*s/l,f=Ir(i,a),h=Dr(i,c);Pr(h,Dr(a,u));var p=f,d=Or(h,p),g=Or(p,p),v=d*d-g*(Or(h,h)-1);if(!(v<0)){var m=Math.sqrt(v),x=Dr(p,(-d-m)/g);if(Pr(x,h),x=Br(x),!n)return x;var b,_=t[0],w=r[0],k=t[1],M=r[1];w<_&&(b=_,_=w,w=b);var A=w-_,T=y(A-At)<kt;if(!T&&M<k&&(b=k,k=M,M=b),T||A<kt?T?k+M>0^x[1]<(y(x[0]-_)<kt?k:M):k<=x[1]&&x[1]<=M:A>At^(_<=x[0]&&x[0]<=w)){var S=Dr(p,(-d+m)/g);return Pr(S,h),[x,Br(S)]}}}function o(e,n){var i=r?t:At-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}}((b=+t)*Et),A()):b},w.clipExtent=function(t){return arguments.length?(_=t,x=t?nn(t[0][0],t[0][1],t[1][0],t[1][1]):z,A()):_},w.scale=function(t){return arguments.length?(c=+t,M()):c},w.translate=function(t){return arguments.length?(u=+t[0],f=+t[1],M()):[u,f]},w.center=function(t){return arguments.length?(h=t[0]%360*Et,p=t[1]%360*Et,M()):[h*Lt,p*Lt]},w.rotate=function(t){return arguments.length?(d=t[0]%360*Et,g=t[1]%360*Et,v=t.length>2?t[2]%360*Et:0,M()):[d*Lt,g*Lt,v*Lt]},t.rebind(w,l,\\\"precision\\\"),function(){return r=e.apply(this,arguments),w.invert=r.invert&&k,M()}}function Ln(t){return Sn(t,function(e,r){t.point(e*Et,r*Et)})}function zn(t,e){return[t,e]}function On(t,e){return[t>At?t-Tt:t<-At?t+Tt:t,e]}function In(t,e,r){return t?e||r?Gr(Dn(t),Rn(e,r)):Dn(t):e||r?Rn(e,r):On}function Pn(t){return function(e,r){return[(e+=t)>At?e-Tt:e<-At?e+Tt:e,r]}}function Dn(t){var e=Pn(t);return e.invert=Pn(-t),e}function Rn(t,e){var r=Math.cos(t),n=Math.sin(t),i=Math.cos(e),a=Math.sin(e);function o(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*r+s*n;return[Math.atan2(l*i-u*a,s*r-c*n),Pt(u*i+l*a)]}return o.invert=function(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*i-l*a;return[Math.atan2(l*i+c*a,s*r+u*n),Pt(u*r-s*n)]},o}function Bn(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Fn(r,i),a=Fn(r,a),(o>0?i<a:i>a)&&(i+=o*Tt)):(i=t+o*Tt,a=t-.5*l);for(var c,u=i;o>0?u>a:u<a;u-=l)s.point((c=Br([r,-n*Math.cos(u),-n*Math.sin(u)]))[0],c[1])}}function Fn(t,e){var r=zr(e);r[0]-=t,Rr(r);var n=It(-r[1]);return((-r[2]<0?-n:n)+2*Math.PI-kt)%(2*Math.PI)}function Nn(e,r,n){var i=t.range(e,r-kt,n).concat(r);return function(t){return i.map(function(e){return[t,e]})}}function jn(e,r,n){var i=t.range(e,r-kt,n).concat(r);return function(t){return i.map(function(e){return[e,t]})}}function Vn(t){return t.source}function Un(t){return t.target}t.geo.path=function(){var e,r,n,i,a,o=4.5;function s(e){return e&&(\\\"function\\\"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=n(i)),t.geo.stream(e,a)),i.result()}function l(){return a=null,s}return s.area=function(e){return sn=0,t.geo.stream(e,n(pn)),sn},s.centroid=function(e){return xr=br=_r=wr=kr=Mr=Ar=Tr=Sr=0,t.geo.stream(e,n(xn)),Sr?[Ar/Sr,Tr/Sr]:Mr?[wr/Mr,kr/Mr]:_r?[xr/_r,br/_r]:[NaN,NaN]},s.bounds=function(e){return fn=hn=-(cn=un=1/0),t.geo.stream(e,n(gn)),[[cn,un],[fn,hn]]},s.projection=function(t){return arguments.length?(n=(e=t)?t.stream||(r=t,i=An(function(t,e){return r([t*Lt,e*Lt])}),function(t){return Ln(i(t))}):z,l()):e;var r,i},s.context=function(t){return arguments.length?(i=null==(r=t)?new vn:new Mn(t),\\\"function\\\"!=typeof o&&i.pointRadius(o),l()):r},s.pointRadius=function(t){return arguments.length?(o=\\\"function\\\"==typeof t?t:(i.pointRadius(+t),+t),s):o},s.projection(t.geo.albersUsa()).context(null)},t.geo.transform=function(t){return{stream:function(e){var r=new Tn(e);for(var n in t)r[n]=t[n];return r}}},Tn.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},t.geo.projection=Cn,t.geo.projectionMutator=En,(t.geo.equirectangular=function(){return Cn(zn)}).raw=zn.invert=zn,t.geo.rotation=function(t){function e(e){return(e=t(e[0]*Et,e[1]*Et))[0]*=Lt,e[1]*=Lt,e}return t=In(t[0]%360*Et,t[1]*Et,t.length>2?t[2]*Et:0),e.invert=function(e){return(e=t.invert(e[0]*Et,e[1]*Et))[0]*=Lt,e[1]*=Lt,e},e},On.invert=zn,t.geo.circle=function(){var t,e,r=[0,0],n=6;function i(){var t=\\\"function\\\"==typeof r?r.apply(this,arguments):r,n=In(-t[0]*Et,-t[1]*Et,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Lt,t[1]*=Lt}}),{type:\\\"Polygon\\\",coordinates:[i]}}return i.origin=function(t){return arguments.length?(r=t,i):r},i.angle=function(r){return arguments.length?(e=Bn((t=+r)*Et,n*Et),i):t},i.precision=function(r){return arguments.length?(e=Bn(t*Et,(n=+r)*Et),i):n},i.angle(90)},t.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Et,i=t[1]*Et,a=e[1]*Et,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),c=Math.cos(i),u=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((r=f*o)*r+(r=c*u-l*f*s)*r),l*u+c*f*s)},t.geo.graticule=function(){var e,r,n,i,a,o,s,l,c,u,f,h,p=10,d=p,g=90,v=360,m=2.5;function x(){return{type:\\\"MultiLineString\\\",coordinates:b()}}function b(){return t.range(Math.ceil(i/g)*g,n,g).map(f).concat(t.range(Math.ceil(l/v)*v,s,v).map(h)).concat(t.range(Math.ceil(r/p)*p,e,p).filter(function(t){return y(t%g)>kt}).map(c)).concat(t.range(Math.ceil(o/d)*d,a,d).filter(function(t){return y(t%v)>kt}).map(u))}return x.lines=function(){return b().map(function(t){return{type:\\\"LineString\\\",coordinates:t}})},x.outline=function(){return{type:\\\"Polygon\\\",coordinates:[f(i).concat(h(s).slice(1),f(n).reverse().slice(1),h(l).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],i>n&&(t=i,i=n,n=t),l>s&&(t=l,l=s,s=t),x.precision(m)):[[i,l],[n,s]]},x.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),x.precision(m)):[[r,o],[e,a]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],x):[g,v]},x.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],x):[p,d]},x.precision=function(t){return arguments.length?(m=+t,c=Nn(o,a,90),u=jn(r,e,m),f=Nn(l,s,90),h=jn(i,n,m),x):m},x.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},t.geo.greatArc=function(){var e,r,n=Vn,i=Un;function a(){return{type:\\\"LineString\\\",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}return a.distance=function(){return t.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},a.source=function(t){return arguments.length?(n=t,e=\\\"function\\\"==typeof t?null:t,a):n},a.target=function(t){return arguments.length?(i=t,r=\\\"function\\\"==typeof t?null:t,a):i},a.precision=function(){return arguments.length?a:0},a},t.geo.interpolate=function(t,e){return r=t[0]*Et,n=t[1]*Et,i=e[0]*Et,a=e[1]*Et,o=Math.cos(n),s=Math.sin(n),l=Math.cos(a),c=Math.sin(a),u=o*Math.cos(r),f=o*Math.sin(r),h=l*Math.cos(i),p=l*Math.sin(i),d=2*Math.asin(Math.sqrt(Rt(a-n)+o*l*Rt(i-r))),g=1/Math.sin(d),(v=d?function(t){var e=Math.sin(t*=d)*g,r=Math.sin(d-t)*g,n=r*u+e*h,i=r*f+e*p,a=r*s+e*c;return[Math.atan2(i,n)*Lt,Math.atan2(a,Math.sqrt(n*n+i*i))*Lt]}:function(){return[r*Lt,n*Lt]}).distance=d,v;var r,n,i,a,o,s,l,c,u,f,h,p,d,g,v},t.geo.length=function(e){return yn=0,t.geo.stream(e,qn),yn};var qn={sphere:D,point:D,lineStart:function(){var t,e,r;function n(n,i){var a=Math.sin(i*=Et),o=Math.cos(i),s=y((n*=Et)-t),l=Math.cos(s);yn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*a-e*o*l)*s),e*a+r*o*l),t=n,e=a,r=o}qn.point=function(i,a){t=i*Et,e=Math.sin(a*=Et),r=Math.cos(a),qn.point=n},qn.lineEnd=function(){qn.point=qn.lineEnd=D}},lineEnd:D,polygonStart:D,polygonEnd:D};function Hn(t,e){function r(e,r){var n=Math.cos(e),i=Math.cos(r),a=t(n*i);return[a*i*Math.sin(e),a*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),i=e(n),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,n*o),Math.asin(n&&r*a/n)]},r}var Gn=Hn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(t.geo.azimuthalEqualArea=function(){return Cn(Gn)}).raw=Gn;var Wn=Hn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},z);function Yn(t,e){var r=Math.cos(t),n=function(t){return Math.tan(At/4+t/2)},i=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(n(e)/n(t)),a=r*Math.pow(n(t),i)/i;if(!i)return $n;function o(t,e){a>0?e<-Ct+kt&&(e=-Ct+kt):e>Ct-kt&&(e=Ct-kt);var r=a/Math.pow(n(e),i);return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}return o.invert=function(t,e){var r=a-e,n=zt(i)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/i,2*Math.atan(Math.pow(a/n,1/i))-Ct]},o}function Xn(t,e){var r=Math.cos(t),n=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),i=r/n+t;if(y(n)<kt)return zn;function a(t,e){var r=i-e;return[r*Math.sin(n*t),i-r*Math.cos(n*t)]}return a.invert=function(t,e){var r=i-e;return[Math.atan2(t,r)/n,i-zt(n)*Math.sqrt(t*t+r*r)]},a}(t.geo.azimuthalEquidistant=function(){return Cn(Wn)}).raw=Wn,(t.geo.conicConformal=function(){return an(Yn)}).raw=Yn,(t.geo.conicEquidistant=function(){return an(Xn)}).raw=Xn;var Zn=Hn(function(t){return 1/t},Math.atan);function $n(t,e){return[t,Math.log(Math.tan(At/4+e/2))]}function Jn(t){var e,r=Cn(t),n=r.scale,i=r.translate,a=r.clipExtent;return r.scale=function(){var t=n.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.translate=function(){var t=i.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.clipExtent=function(t){var o=a.apply(r,arguments);if(o===r){if(e=null==t){var s=At*n(),l=i();a([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else e&&(o=null);return o},r.clipExtent(null)}(t.geo.gnomonic=function(){return Cn(Zn)}).raw=Zn,$n.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Ct]},(t.geo.mercator=function(){return Jn($n)}).raw=$n;var Kn=Hn(function(){return 1},Math.asin);(t.geo.orthographic=function(){return Cn(Kn)}).raw=Kn;var Qn=Hn(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});function ti(t,e){return[Math.log(Math.tan(At/4+e/2)),-t]}function ei(t){return t[0]}function ri(t){return t[1]}function ni(t){for(var e=t.length,r=[0,1],n=2,i=2;i<e;i++){for(;n>1&&Ot(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function ii(t,e){return t[0]-e[0]||t[1]-e[1]}(t.geo.stereographic=function(){return Cn(Qn)}).raw=Qn,ti.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Ct]},(t.geo.transverseMercator=function(){var t=Jn(ti),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90])}).raw=ti,t.geom={},t.geom.hull=function(t){var e=ei,r=ri;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ve(e),a=ve(r),o=t.length,s=[],l=[];for(n=0;n<o;n++)s.push([+i.call(this,t[n],n),+a.call(this,t[n],n),n]);for(s.sort(ii),n=0;n<o;n++)l.push([s[n][0],-s[n][1]]);var c=ni(s),u=ni(l),f=u[0]===c[0],h=u[u.length-1]===c[c.length-1],p=[];for(n=c.length-1;n>=0;--n)p.push(t[s[c[n]][2]]);for(n=+f;n<u.length-h;++n)p.push(t[s[u[n]][2]]);return p}return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n},t.geom.polygon=function(t){return U(t,ai),t};var ai=t.geom.polygon.prototype=[];function oi(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function si(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],c=r[1],u=e[1]-l,f=n[1]-c,h=(s*(l-c)-f*(i-a))/(f*o-s*u);return[i+h*o,l+h*u]}function li(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}ai.area=function(){for(var t,e=-1,r=this.length,n=this[r-1],i=0;++e<r;)t=n,n=this[e],i+=t[1]*n[0]-t[0]*n[1];return.5*i},ai.centroid=function(t){var e,r,n=-1,i=this.length,a=0,o=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++n<i;)e=s,s=this[n],r=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*r,o+=(e[1]+s[1])*r;return[a*t,o*t]},ai.clip=function(t){for(var e,r,n,i,a,o,s=li(t),l=-1,c=this.length-li(this),u=this[c-1];++l<c;){for(e=t.slice(),t.length=0,i=this[l],a=e[(n=e.length-s)-1],r=-1;++r<n;)oi(o=e[r],u,i)?(oi(a,u,i)||t.push(si(a,o,u,i)),t.push(o)):oi(a,u,i)&&t.push(si(a,o,u,i)),a=o;s&&t.push(t[0]),u=i}return t};var ci,ui,fi,hi,pi,di=[],gi=[];function vi(){Pi(this),this.edge=this.site=this.circle=null}function mi(t){var e=di.pop()||new vi;return e.site=t,e}function yi(t){Si(t),fi.remove(t),di.push(t),Pi(t)}function xi(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];yi(t);for(var l=a;l.circle&&y(r-l.circle.x)<kt&&y(n-l.circle.cy)<kt;)a=l.P,s.unshift(l),yi(l),l=a;s.unshift(l),Si(l);for(var c=o;c.circle&&y(r-c.circle.x)<kt&&y(n-c.circle.cy)<kt;)o=c.N,s.push(c),yi(c),c=o;s.push(c),Si(c);var u,f=s.length;for(u=1;u<f;++u)c=s[u],l=s[u-1],zi(c.edge,l.site,c.site,i);l=s[0],(c=s[f-1]).edge=Li(l.site,c.site,null,i),Ti(l),Ti(c)}function bi(t){for(var e,r,n,i,a=t.x,o=t.y,s=fi._;s;)if((n=_i(s,o)-a)>kt)s=s.L;else{if(!((i=a-wi(s,o))>kt)){n>-kt?(e=s.P,r=s):i>-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=mi(t);if(fi.insert(e,l),e||r){if(e===r)return Si(e),r=mi(e.site),fi.insert(l,r),l.edge=r.edge=Li(e.site,l.site),Ti(e),void Ti(r);if(r){Si(e),Si(r);var c=e.site,u=c.x,f=c.y,h=t.x-u,p=t.y-f,d=r.site,g=d.x-u,v=d.y-f,m=2*(h*v-p*g),y=h*h+p*p,x=g*g+v*v,b={x:(v*y-p*x)/m+u,y:(h*x-g*y)/m+f};zi(r.edge,c,d,b),l.edge=Li(c,t,null,b),r.edge=Li(t,d,null,b),Ti(e),Ti(r)}else l.edge=Li(e.site,l.site)}}function _i(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,f=1/a-1/c,h=u/c;return f?(-h+Math.sqrt(h*h-2*f*(u*u/(-2*c)-l+c/2+i-a/2)))/f+n:(n+s)/2}function wi(t,e){var r=t.N;if(r)return _i(r,e);var n=t.site;return n.y===e?n.x:1/0}function ki(t){this.site=t,this.edges=[]}function Mi(t,e){return e.angle-t.angle}function Ai(){Pi(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ti(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,f=2*(l*(v=a.y-s)-c*u);if(!(f>=-Mt)){var h=l*l+c*c,p=u*u+v*v,d=(v*h-c*p)/f,g=(l*p-u*h)/f,v=g+s,m=gi.pop()||new Ai;m.arc=t,m.site=i,m.x=d+o,m.y=v+Math.sqrt(d*d+g*g),m.cy=v,t.circle=m;for(var y=null,x=pi._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}pi.insert(y,m),y||(hi=m)}}}}function Si(t){var e=t.circle;e&&(e.P||(hi=e.N),pi.remove(e),gi.push(e),Pi(e),t.circle=null)}function Ci(t,e){var r=t.b;if(r)return!0;var n,i,a=t.a,o=e[0][0],s=e[1][0],l=e[0][1],c=e[1][1],u=t.l,f=t.r,h=u.x,p=u.y,d=f.x,g=f.y,v=(h+d)/2,m=(p+g)/2;if(g===p){if(v<o||v>=s)return;if(h>d){if(a){if(a.y>=c)return}else a={x:v,y:l};r={x:v,y:c}}else{if(a){if(a.y<l)return}else a={x:v,y:c};r={x:v,y:l}}}else if(i=m-(n=(h-d)/(g-p))*v,n<-1||n>1)if(h>d){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y<l)return}else a={x:(c-i)/n,y:c};r={x:(l-i)/n,y:l}}else if(p<g){if(a){if(a.x>=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x<o)return}else a={x:s,y:n*s+i};r={x:o,y:n*o+i}}return t.a=a,t.b=r,!0}function Ei(t,e){this.l=t,this.r=e,this.a=this.b=null}function Li(t,e,r,n){var i=new Ei(t,e);return ci.push(i),r&&zi(i,t,e,r),n&&zi(i,e,t,n),ui[t.i].edges.push(new Oi(i,t,e)),ui[e.i].edges.push(new Oi(i,e,t)),i}function zi(t,e,r,n){t.a||t.b?t.l===r?t.b=n:t.a=n:(t.a=n,t.l=e,t.r=r)}function Oi(t,e,r){var n=t.a,i=t.b;this.edge=t,this.site=e,this.angle=r?Math.atan2(r.y-e.y,r.x-e.x):t.l===e?Math.atan2(i.x-n.x,n.y-i.y):Math.atan2(n.x-i.x,i.y-n.y)}function Ii(){this._=null}function Pi(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Di(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function Ri(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function Bi(t){for(;t.L;)t=t.L;return t}function Fi(t,e){var r,n,i,a=t.sort(Ni).pop();for(ci=[],ui=new Array(t.length),fi=new Ii,pi=new Ii;;)if(i=hi,a&&(!i||a.y<i.y||a.y===i.y&&a.x<i.x))a.x===r&&a.y===n||(ui[a.i]=new ki(a),bi(a),r=a.x,n=a.y),a=t.pop();else{if(!i)break;xi(i.arc)}e&&(function(t){for(var e,r=ci,n=en(t[0][0],t[0][1],t[1][0],t[1][1]),i=r.length;i--;)(!Ci(e=r[i],t)||!n(e)||y(e.a.x-e.b.x)<kt&&y(e.a.y-e.b.y)<kt)&&(e.a=e.b=null,r.splice(i,1))}(e),function(t){for(var e,r,n,i,a,o,s,l,c,u,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],g=ui,v=g.length;v--;)if((a=g[v])&&a.prepare())for(l=(s=a.edges).length,o=0;o<l;)n=(u=s[o].end()).x,i=u.y,e=(c=s[++o%l].start()).x,r=c.y,(y(n-e)>kt||y(i-r)>kt)&&(s.splice(o,0,new Oi((m=a.site,x=u,b=y(n-f)<kt&&d-i>kt?{x:f,y:y(e-f)<kt?r:d}:y(i-d)<kt&&h-n>kt?{x:y(r-d)<kt?e:h,y:d}:y(n-h)<kt&&i-p>kt?{x:h,y:y(e-h)<kt?r:p}:y(i-p)<kt&&n-f>kt?{x:y(r-p)<kt?e:f,y:p}:null,_=void 0,_=new Ei(m,null),_.a=x,_.b=b,ci.push(_),_),a.site,null)),++l);var m,x,b,_}(e));var o={cells:ui,edges:ci};return fi=pi=ci=ui=null,o}function Ni(t,e){return e.y-t.y||e.x-t.x}ki.prototype.prepare=function(){for(var t,e=this.edges,r=e.length;r--;)(t=e[r].edge).b&&t.a||e.splice(r,1);return e.sort(Mi),e.length},Oi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Ii.prototype={insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=Bi(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)r===(n=r.U).L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(Di(this,r),r=(t=r).U),r.C=!1,n.C=!0,Ri(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(Ri(this,r),r=(t=r).U),r.C=!1,n.C=!0,Di(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,a=t.L,o=t.R;if(r=a?o?Bi(o):a:o,i?i.L===t?i.L=r:i.R=r:this._=r,a&&o?(n=r.C,r.C=t.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=o,o.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&&(t.U=i),!n)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Di(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ri(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Di(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ri(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Di(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ri(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},t.geom.voronoi=function(t){var e=ei,r=ri,n=e,i=r,a=ji;if(t)return o(t);function o(t){var e=new Array(t.length),r=a[0][0],n=a[0][1],i=a[1][0],o=a[1][1];return Fi(s(t),a).cells.forEach(function(a,s){var l=a.edges,c=a.site;(e[s]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):c.x>=r&&c.x<=i&&c.y>=n&&c.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}})}return o.links=function(t){return Fi(s(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},o.triangles=function(t){var e=[];return Fi(s(t)).cells.forEach(function(r,n){for(var i,a,o,s,l=r.site,c=r.edges.sort(Mi),u=-1,f=c.length,h=c[f-1].edge,p=h.l===l?h.r:h.l;++u<f;)h,i=p,p=(h=c[u].edge).l===l?h.r:h.l,n<i.i&&n<p.i&&(o=i,s=p,((a=l).x-s.x)*(o.y-a.y)-(a.x-o.x)*(s.y-a.y)<0)&&e.push([t[n],t[i.i],t[p.i]])}),e},o.x=function(t){return arguments.length?(n=ve(e=t),o):e},o.y=function(t){return arguments.length?(i=ve(r=t),o):r},o.clipExtent=function(t){return arguments.length?(a=null==t?ji:t,o):a===ji?null:a},o.size=function(t){return arguments.length?o.clipExtent(t&&[[0,0],t]):a===ji?null:a&&a[1]},o};var ji=[[-1e6,-1e6],[1e6,1e6]];function Vi(t){return t.x}function Ui(t){return t.y}function qi(e,r){e=t.rgb(e),r=t.rgb(r);var n=e.r,i=e.g,a=e.b,o=r.r-n,s=r.g-i,l=r.b-a;return function(t){return\\\"#\\\"+ce(Math.round(n+o*t))+ce(Math.round(i+s*t))+ce(Math.round(a+l*t))}}function Hi(t,e){var r,n={},i={};for(r in t)r in e?n[r]=Zi(t[r],e[r]):i[r]=t[r];for(r in e)r in t||(i[r]=e[r]);return function(t){for(r in n)i[r]=n[r](t);return i}}function Gi(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Wi(t,e){var r,n,i,a=Yi.lastIndex=Xi.lastIndex=0,o=-1,s=[],l=[];for(t+=\\\"\\\",e+=\\\"\\\";(r=Yi.exec(t))&&(n=Xi.exec(e));)(i=n.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Gi(r,n)})),a=Xi.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?(e=l[0].x,function(t){return e(t)+\\\"\\\"}):function(){return e}:(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\\\"\\\")})}t.geom.delaunay=function(e){return t.geom.voronoi().triangles(e)},t.geom.quadtree=function(t,e,r,n,i){var a,o=ei,s=ri;if(a=arguments.length)return o=Vi,s=Ui,3===a&&(i=r,n=e,r=e=0),l(t);function l(t){var l,c,u,f,h,p,d,g,v,m=ve(o),x=ve(s);if(null!=e)p=e,d=r,g=n,v=i;else if(g=v=-(p=d=1/0),c=[],u=[],h=t.length,a)for(f=0;f<h;++f)(l=t[f]).x<p&&(p=l.x),l.y<d&&(d=l.y),l.x>g&&(g=l.x),l.y>v&&(v=l.y),c.push(l.x),u.push(l.y);else for(f=0;f<h;++f){var b=+m(l=t[f],f),_=+x(l,f);b<p&&(p=b),_<d&&(d=_),b>g&&(g=b),_>v&&(v=_),c.push(b),u.push(_)}var w=g-p,k=v-d;function M(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)<.01)A(t,e,r,n,i,a,o,s);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,i,a,o,s),A(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}function A(t,e,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r>=l,f=n>=c,h=f<<1|u;t.leaf=!1,u?i=l:o=l,f?a=c:s=c,M(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(T,t,+m(t,++f),+x(t,f),p,d,g,v)}}),e,r,n,i,a,o,s)}w>k?v=d+w:g=p+k;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(T,t,+m(t,++f),+x(t,f),p,d,g,v)}};if(T.visit=function(t){!function t(e,r,n,i,a,o){if(!e(r,n,i,a,o)){var s=.5*(n+a),l=.5*(i+o),c=r.nodes;c[0]&&t(e,c[0],n,i,s,l),c[1]&&t(e,c[1],s,i,a,l),c[2]&&t(e,c[2],n,l,s,o),c[3]&&t(e,c[3],s,l,a,o)}}(t,T,p,d,g,v)},T.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(c,u,f,h,p){if(!(u>a||f>o||h<n||p<i)){if(d=c.point){var d,g=e-c.x,v=r-c.y,m=g*g+v*v;if(m<l){var y=Math.sqrt(l=m);n=e-y,i=r-y,a=e+y,o=r+y,s=d}}for(var x=c.nodes,b=.5*(u+h),_=.5*(f+p),w=(r>=_)<<1|e>=b,k=w+4;w<k;++w)if(c=x[3&w])switch(3&w){case 0:t(c,u,f,b,_);break;case 1:t(c,b,f,h,_);break;case 2:t(c,u,_,b,p);break;case 3:t(c,b,_,h,p)}}}(t,n,i,a,o),s}(T,t[0],t[1],p,d,g,v)},f=-1,null==e){for(;++f<h;)M(T,t[f],c[f],u[f],p,d,g,v);--f}else t.forEach(T.add);return c=u=t=l=null,T}return l.x=function(t){return arguments.length?(o=t,l):o},l.y=function(t){return arguments.length?(s=t,l):s},l.extent=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),l):null==e?null:[[e,r],[n,i]]},l.size=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=r=0,n=+t[0],i=+t[1]),l):null==e?null:[n-e,i-r]},l},t.interpolateRgb=qi,t.interpolateObject=Hi,t.interpolateNumber=Gi,t.interpolateString=Wi;var Yi=/[-+]?(?:\\\\d+\\\\.?\\\\d*|\\\\.?\\\\d+)(?:[eE][-+]?\\\\d+)?/g,Xi=new RegExp(Yi.source,\\\"g\\\");function Zi(e,r){for(var n,i=t.interpolators.length;--i>=0&&!(n=t.interpolators[i](e,r)););return n}function $i(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r<s;++r)n.push(Zi(t[r],e[r]));for(;r<a;++r)i[r]=t[r];for(;r<o;++r)i[r]=e[r];return function(t){for(r=0;r<s;++r)i[r]=n[r](t);return i}}t.interpolate=Zi,t.interpolators=[function(t,e){var r=typeof e;return(\\\"string\\\"===r?ge.has(e.toLowerCase())||/^(#|rgb\\\\(|hsl\\\\()/i.test(e)?qi:Wi:e instanceof Vt?qi:Array.isArray(e)?$i:\\\"object\\\"===r&&isNaN(e)?Hi:Gi)(t,e)}],t.interpolateArray=$i;var Ji=function(){return z},Ki=t.map({linear:Ji,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return ra},cubic:function(){return na},sin:function(){return aa},exp:function(){return oa},circle:function(){return sa},elastic:function(t,e){var r;arguments.length<2&&(e=.45);arguments.length?r=e/Tt*Math.asin(1/t):(t=1,r=e/4);return function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Tt/e)}},back:function(t){t||(t=1.70158);return function(e){return e*e*((t+1)*e-t)}},bounce:function(){return la}}),Qi=t.map({in:z,out:ta,\\\"in-out\\\":ea,\\\"out-in\\\":function(t){return ea(ta(t))}});function ta(t){return function(e){return 1-t(1-e)}}function ea(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function ra(t){return t*t}function na(t){return t*t*t}function ia(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function aa(t){return 1-Math.cos(t*Ct)}function oa(t){return Math.pow(2,10*(t-1))}function sa(t){return 1-Math.sqrt(1-t*t)}function la(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ca(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function ua(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=ha(i),s=fa(i,a),l=ha(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]<a[0]*i[1]&&(i[0]*=-1,i[1]*=-1,o*=-1,s*=-1),this.rotate=(o?Math.atan2(i[1],i[0]):Math.atan2(-a[0],a[1]))*Lt,this.translate=[t.e,t.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*Lt:0}function fa(t,e){return t[0]*e[0]+t[1]*e[1]}function ha(t){var e=Math.sqrt(fa(t,t));return e&&(t[0]/=e,t[1]/=e),e}t.ease=function(t){var e,n=t.indexOf(\\\"-\\\"),i=n>=0?t.slice(0,n):t,a=n>=0?t.slice(n+1):\\\"in\\\";return i=Ki.get(i)||Ji,a=Qi.get(a)||z,e=a(i.apply(null,r.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,i=e.c,a=e.l,o=r.h-n,s=r.c-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.c:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Yt(n+o*t,i+s*t,a+l*t)+\\\"\\\"}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,i=e.s,a=e.l,o=r.h-n,s=r.s-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.s:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Ht(n+o*t,i+s*t,a+l*t)+\\\"\\\"}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,i=e.a,a=e.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(t){return te(n+o*t,i+s*t,a+l*t)+\\\"\\\"}},t.interpolateRound=ca,t.transform=function(e){var r=i.createElementNS(t.ns.prefix.svg,\\\"g\\\");return(t.transform=function(t){if(null!=t){r.setAttribute(\\\"transform\\\",t);var e=r.transform.baseVal.consolidate()}return new ua(e?e.matrix:pa)})(e)},ua.prototype.toString=function(){return\\\"translate(\\\"+this.translate+\\\")rotate(\\\"+this.rotate+\\\")skewX(\\\"+this.skew+\\\")scale(\\\"+this.scale+\\\")\\\"};var pa={a:1,b:0,c:0,d:1,e:0,f:0};function da(t){return t.length?t.pop()+\\\",\\\":\\\"\\\"}function ga(e,r){var n=[],i=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(\\\"translate(\\\",null,\\\",\\\",null,\\\")\\\");n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else(e[0]||e[1])&&r.push(\\\"translate(\\\"+e+\\\")\\\")}(e.translate,r.translate,n,i),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(da(r)+\\\"rotate(\\\",null,\\\")\\\")-2,x:Gi(t,e)})):e&&r.push(da(r)+\\\"rotate(\\\"+e+\\\")\\\")}(e.rotate,r.rotate,n,i),function(t,e,r,n){t!==e?n.push({i:r.push(da(r)+\\\"skewX(\\\",null,\\\")\\\")-2,x:Gi(t,e)}):e&&r.push(da(r)+\\\"skewX(\\\"+e+\\\")\\\")}(e.skew,r.skew,n,i),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(da(r)+\\\"scale(\\\",null,\\\",\\\",null,\\\")\\\");n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(da(r)+\\\"scale(\\\"+e+\\\")\\\")}(e.scale,r.scale,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r<a;)n[(e=i[r]).i]=e.x(t);return n.join(\\\"\\\")}}function va(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}}function ma(t,e){return e=(e-=t=+t)||1/e,function(r){return Math.max(0,Math.min(1,(r-t)/e))}}function ya(t){for(var e=t.source,r=t.target,n=function(t,e){if(t===e)return t;var r=xa(t),n=xa(e),i=r.pop(),a=n.pop(),o=null;for(;i===a;)o=i,i=r.pop(),a=n.pop();return o}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i}function xa(t){for(var e=[],r=t.parent;null!=r;)e.push(t),t=r,r=r.parent;return e.push(t),e}function ba(t){t.fixed|=2}function _a(t){t.fixed&=-7}function wa(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ka(t){t.fixed&=-5}t.interpolateTransform=ga,t.layout={},t.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r<n;)e.push(ya(t[r]));return e}},t.layout.chord=function(){var e,r,n,i,a,o,s,l={},c=0;function u(){var l,u,h,p,d,g={},v=[],m=t.range(i),y=[];for(e=[],r=[],l=0,p=-1;++p<i;){for(u=0,d=-1;++d<i;)u+=n[p][d];v.push(u),y.push(t.range(i)),l+=u}for(a&&m.sort(function(t,e){return a(v[t],v[e])}),o&&y.forEach(function(t,e){t.sort(function(t,r){return o(n[e][t],n[e][r])})}),l=(Tt-c*i)/l,u=0,p=-1;++p<i;){for(h=u,d=-1;++d<i;){var x=m[p],b=y[x][d],_=n[x][b],w=u,k=u+=_*l;g[x+\\\"-\\\"+b]={index:x,subindex:b,startAngle:w,endAngle:k,value:_}}r[x]={index:x,startAngle:h,endAngle:u,value:v[x]},u+=c}for(p=-1;++p<i;)for(d=p-1;++d<i;){var M=g[p+\\\"-\\\"+d],A=g[d+\\\"-\\\"+p];(M.value||A.value)&&e.push(M.value<A.value?{source:A,target:M}:{source:M,target:A})}s&&f()}function f(){e.sort(function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}return l.matrix=function(t){return arguments.length?(i=(n=t)&&n.length,e=r=null,l):n},l.padding=function(t){return arguments.length?(c=t,e=r=null,l):c},l.sortGroups=function(t){return arguments.length?(a=t,e=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(o=t,e=null,l):o},l.sortChords=function(t){return arguments.length?(s=t,e&&f(),l):s},l.chords=function(){return e||u(),e},l.groups=function(){return r||u(),r},l},t.layout.force=function(){var e,r,n,i,a,o,s={},l=t.dispatch(\\\"start\\\",\\\"tick\\\",\\\"end\\\"),c=[1,1],u=.9,f=Ma,h=Aa,p=-30,d=Ta,g=.1,v=.64,m=[],y=[];function x(t){return function(e,r,n,i){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=i-r,l=a*a+o*o;if(s*s/v<l){if(l<d){var c=e.charge/l;t.px-=a*c,t.py-=o*c}return!0}if(e.point&&l&&l<d){c=e.pointCharge/l;t.px-=a*c,t.py-=o*c}}return!e.charge}}function b(e){e.px=t.event.x,e.py=t.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return e=null,l.end({type:\\\"end\\\",alpha:n=0}),!0;var r,s,f,h,d,v,b,_,w,k=m.length,M=y.length;for(s=0;s<M;++s)h=(f=y[s]).source,(v=(_=(d=f.target).x-h.x)*_+(w=d.y-h.y)*w)&&(_*=v=n*a[s]*((v=Math.sqrt(v))-i[s])/v,w*=v,d.x-=_*(b=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=w*b,h.x+=_*(b=1-b),h.y+=w*b);if((b=n*g)&&(_=c[0]/2,w=c[1]/2,s=-1,b))for(;++s<k;)(f=m[s]).x+=(_-f.x)*b,f.y+=(w-f.y)*b;if(p)for(!function t(e,r,n){var i=0,a=0;e.charge=0;if(!e.leaf)for(var o,s=e.nodes,l=s.length,c=-1;++c<l;)null!=(o=s[c])&&(t(o,r,n),e.charge+=o.charge,i+=o.charge*o.cx,a+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=r*n[e.point.index];e.charge+=e.pointCharge=u,i+=u*e.point.x,a+=u*e.point.y}e.cx=i/e.charge;e.cy=a/e.charge}(r=t.geom.quadtree(m),n,o),s=-1;++s<k;)(f=m[s]).fixed||r.visit(x(f));for(s=-1;++s<k;)(f=m[s]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*u,f.y-=(f.py-(f.py=f.y))*u);l.tick({type:\\\"tick\\\",alpha:n})},s.nodes=function(t){return arguments.length?(m=t,s):m},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(c=t,s):c},s.linkDistance=function(t){return arguments.length?(f=\\\"function\\\"==typeof t?t:+t,s):f},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(h=\\\"function\\\"==typeof t?t:+t,s):h},s.friction=function(t){return arguments.length?(u=+t,s):u},s.charge=function(t){return arguments.length?(p=\\\"function\\\"==typeof t?t:+t,s):p},s.chargeDistance=function(t){return arguments.length?(d=t*t,s):Math.sqrt(d)},s.gravity=function(t){return arguments.length?(g=+t,s):g},s.theta=function(t){return arguments.length?(v=t*t,s):Math.sqrt(v)},s.alpha=function(t){return arguments.length?(t=+t,n?t>0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:\\\"end\\\",alpha:n=0})):t>0&&(l.start({type:\\\"start\\\",alpha:n=t}),e=Me(s.tick)),s):n},s.start=function(){var t,e,r,n=m.length,l=y.length,u=c[0],d=c[1];for(t=0;t<n;++t)(r=m[t]).index=t,r.weight=0;for(t=0;t<l;++t)\\\"number\\\"==typeof(r=y[t]).source&&(r.source=m[r.source]),\\\"number\\\"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<n;++t)r=m[t],isNaN(r.x)&&(r.x=g(\\\"x\\\",u)),isNaN(r.y)&&(r.y=g(\\\"y\\\",d)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],\\\"function\\\"==typeof f)for(t=0;t<l;++t)i[t]=+f.call(this,y[t],t);else for(t=0;t<l;++t)i[t]=f;if(a=[],\\\"function\\\"==typeof h)for(t=0;t<l;++t)a[t]=+h.call(this,y[t],t);else for(t=0;t<l;++t)a[t]=h;if(o=[],\\\"function\\\"==typeof p)for(t=0;t<n;++t)o[t]=+p.call(this,m[t],t);else for(t=0;t<n;++t)o[t]=p;function g(r,i){if(!e){for(e=new Array(n),c=0;c<n;++c)e[c]=[];for(c=0;c<l;++c){var a=y[c];e[a.source.index].push(a.target),e[a.target.index].push(a.source)}}for(var o,s=e[t],c=-1,u=s.length;++c<u;)if(!isNaN(o=s[c][r]))return o;return Math.random()*i}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(r||(r=t.behavior.drag().origin(z).on(\\\"dragstart.force\\\",ba).on(\\\"drag.force\\\",b).on(\\\"dragend.force\\\",_a)),!arguments.length)return r;this.on(\\\"mouseover.force\\\",wa).on(\\\"mouseout.force\\\",ka).call(r)},t.rebind(s,l,\\\"on\\\")};var Ma=20,Aa=1,Ta=1/0;function Sa(e,r){return t.rebind(e,r,\\\"sort\\\",\\\"children\\\",\\\"value\\\"),e.nodes=e,e.links=Ia,e}function Ca(t,e){for(var r=[t];null!=(t=r.pop());)if(e(t),(i=t.children)&&(n=i.length))for(var n,i;--n>=0;)r.push(i[n])}function Ea(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o<i;)r.push(a[o]);for(;null!=(t=n.pop());)e(t)}function La(t){return t.children}function za(t){return t.value}function Oa(t,e){return e.value-t.value}function Ia(e){return t.merge(e.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}t.layout.hierarchy=function(){var t=Oa,e=La,r=za;function n(i){var a,o=[i],s=[];for(i.depth=0;null!=(a=o.pop());)if(s.push(a),(c=e.call(n,a,a.depth))&&(l=c.length)){for(var l,c,u;--l>=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return Ea(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ca(t,function(t){t.children&&(t.value=0)}),Ea(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var i=e.call(this,t,n);return function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++c<o;)t(s=a[c],r,l=s.value*n,i),r+=l}}(i[0],0,r[0],r[1]/function t(e){var r=e.children,n=0;if(r&&(i=r.length))for(var i,a=-1;++a<i;)n=Math.max(n,t(r[a]));return 1+n}(i[0])),i}return n.size=function(t){return arguments.length?(r=t,n):r},Sa(n,e)},t.layout.pie=function(){var e=Number,r=Pa,n=0,i=Tt,a=0;function o(s){var l,c=s.length,u=s.map(function(t,r){return+e.call(o,t,r)}),f=+(\\\"function\\\"==typeof n?n.apply(this,arguments):n),h=(\\\"function\\\"==typeof i?i.apply(this,arguments):i)-f,p=Math.min(Math.abs(h)/c,+(\\\"function\\\"==typeof a?a.apply(this,arguments):a)),d=p*(h<0?-1:1),g=t.sum(u),v=g?(h-c*d)/g:0,m=t.range(c),y=[];return null!=r&&m.sort(r===Pa?function(t,e){return u[e]-u[t]}:function(t,e){return r(s[t],s[e])}),m.forEach(function(t){y[t]={data:s[t],value:l=u[t],startAngle:f,endAngle:f+=l*v+d,padAngle:p}}),y}return o.value=function(t){return arguments.length?(e=t,o):e},o.sort=function(t){return arguments.length?(r=t,o):r},o.startAngle=function(t){return arguments.length?(n=t,o):n},o.endAngle=function(t){return arguments.length?(i=t,o):i},o.padAngle=function(t){return arguments.length?(a=t,o):a},o};var Pa={};function Da(t){return t.x}function Ra(t){return t.y}function Ba(t,e,r){t.y0=e,t.y=r}t.layout.stack=function(){var e=z,r=ja,n=Va,i=Ba,a=Da,o=Ra;function s(l,c){if(!(p=l.length))return l;var u=l.map(function(t,r){return e.call(s,t,r)}),f=u.map(function(t){return t.map(function(t,e){return[a.call(s,t,e),o.call(s,t,e)]})}),h=r.call(s,f,c);u=t.permute(u,h),f=t.permute(f,h);var p,d,g,v,m=n.call(s,f,c),y=u[0].length;for(g=0;g<y;++g)for(i.call(s,u[0][g],v=m[g],f[0][g][1]),d=1;d<p;++d)i.call(s,u[d][g],v+=f[d-1][g][1],f[d][g][1]);return l}return s.values=function(t){return arguments.length?(e=t,s):e},s.order=function(t){return arguments.length?(r=\\\"function\\\"==typeof t?t:Fa.get(t)||ja,s):r},s.offset=function(t){return arguments.length?(n=\\\"function\\\"==typeof t?t:Na.get(t)||Va,s):n},s.x=function(t){return arguments.length?(a=t,s):a},s.y=function(t){return arguments.length?(o=t,s):o},s.out=function(t){return arguments.length?(i=t,s):i},s};var Fa=t.map({\\\"inside-out\\\":function(e){var r,n,i=e.length,a=e.map(Ua),o=e.map(qa),s=t.range(i).sort(function(t,e){return a[t]-a[e]}),l=0,c=0,u=[],f=[];for(r=0;r<i;++r)n=s[r],l<c?(l+=o[n],u.push(n)):(c+=o[n],f.push(n));return f.reverse().concat(u)},reverse:function(e){return t.range(e.length).reverse()},default:ja}),Na=t.map({silhouette:function(t){var e,r,n,i=t.length,a=t[0].length,o=[],s=0,l=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];n>s&&(s=n),o.push(n)}for(r=0;r<a;++r)l[r]=(s-o[r])/2;return l},wiggle:function(t){var e,r,n,i,a,o,s,l,c,u=t.length,f=t[0],h=f.length,p=[];for(p[0]=l=c=0,r=1;r<h;++r){for(e=0,i=0;e<u;++e)i+=t[e][r][1];for(e=0,a=0,s=f[r][0]-f[r-1][0];e<u;++e){for(n=0,o=(t[e][r][1]-t[e][r-1][1])/(2*s);n<e;++n)o+=(t[n][r][1]-t[n][r-1][1])/s;a+=o*t[e][r][1]}p[r]=l-=i?a/i*s:0,l<c&&(c=l)}for(r=0;r<h;++r)p[r]-=c;return p},expand:function(t){var e,r,n,i=t.length,a=t[0].length,o=1/i,s=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];if(n)for(e=0;e<i;e++)t[e][r][1]/=n;else for(e=0;e<i;e++)t[e][r][1]=o}for(r=0;r<a;++r)s[r]=0;return s},zero:Va});function ja(e){return t.range(e.length)}function Va(t){for(var e=-1,r=t[0].length,n=[];++e<r;)n[e]=0;return n}function Ua(t){for(var e,r=1,n=0,i=t[0][1],a=t.length;r<a;++r)(e=t[r][1])>i&&(n=r,i=e);return n}function qa(t){return t.reduce(Ha,0)}function Ha(t,e){return t+e[1]}function Ga(t,e){return Wa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Wa(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Ya(e){return[t.min(e),t.max(e)]}function Xa(t,e){return t.value-e.value}function Za(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function $a(t,e){t._pack_next=e,e._pack_prev=t}function Ja(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ka(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,c=1/0,u=-1/0,f=1/0,h=-1/0;if(e.forEach(Qa),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(eo(r,n,i=e[2]),x(i),Za(r,i),r._pack_prev=i,Za(i,n),n=r._pack_next,a=3;a<l;a++){eo(r,n,i=e[a]);var p=0,d=1,g=1;for(o=n._pack_next;o!==n;o=o._pack_next,d++)if(Ja(o,i)){p=1;break}if(1==p)for(s=r._pack_prev;s!==o._pack_prev&&!Ja(s,i);s=s._pack_prev,g++);p?(d<g||d==g&&n.r<r.r?$a(r,n=o):$a(r=s,n),a--):(Za(r,i),n=i,x(i))}var v=(c+u)/2,m=(f+h)/2,y=0;for(a=0;a<l;a++)(i=e[a]).x-=v,i.y-=m,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,e.forEach(to)}function x(t){c=Math.min(t.x-t.r,c),u=Math.max(t.x+t.r,u),f=Math.min(t.y-t.r,f),h=Math.max(t.y+t.r,h)}}function Qa(t){t._pack_next=t._pack_prev=t}function to(t){delete t._pack_next,delete t._pack_prev}function eo(t,e,r){var n=t.r+r.r,i=e.x-t.x,a=e.y-t.y;if(n&&(i||a)){var o=e.r+r.r,s=i*i+a*a,l=.5+((n*=n)-(o*=o))/(2*s),c=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=t.x+l*i+c*a,r.y=t.y+l*a-c*i}else r.x=t.x+n,r.y=t.y}function ro(t,e){return t.parent==e.parent?1:2}function no(t){var e=t.children;return e.length?e[0]:t.t}function io(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function ao(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function oo(t,e,r){return t.a.parent===e.parent?t.a:r}function so(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function lo(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function co(t){var e=t[0],r=t[t.length-1];return e<r?[e,r]:[r,e]}function uo(t){return t.rangeExtent?t.rangeExtent():co(t.range())}function fo(t,e,r,n){var i=r(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(i(t))}}function ho(t,e){var r,n=0,i=t.length-1,a=t[n],o=t[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}function po(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:go}t.layout.histogram=function(){var e=!0,r=Number,n=Ya,i=Ga;function a(a,o){for(var s,l,c=[],u=a.map(r,this),f=n.call(this,u,o),h=i.call(this,f,u,o),p=(o=-1,u.length),d=h.length-1,g=e?1:1/p;++o<d;)(s=c[o]=[]).dx=h[o+1]-(s.x=h[o]),s.y=0;if(d>0)for(o=-1;++o<p;)(l=u[o])>=f[0]&&l<=f[1]&&((s=c[t.bisect(h,l,1,d)-1]).y+=g,s.push(a[o]));return c}return a.value=function(t){return arguments.length?(r=t,a):r},a.range=function(t){return arguments.length?(n=ve(t),a):n},a.bins=function(t){return arguments.length?(i=\\\"number\\\"==typeof t?function(e){return Wa(e,t)}:ve(t),a):i},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(Xa),n=0,i=[1,1];function a(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:\\\"function\\\"==typeof e?e:function(){return e};if(s.x=s.y=0,Ea(s,function(t){t.r=+u(t.value)}),Ea(s,Ka),n){var f=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;Ea(s,function(t){t.r+=f}),Ea(s,Ka),Ea(s,function(t){t.r-=f})}return function t(e,r,n,i){var a=e.children;e.x=r+=i*e.x;e.y=n+=i*e.y;e.r*=i;if(a)for(var o=-1,s=a.length;++o<s;)t(a[o],r,n,i)}(s,l/2,c/2,e?1:1/Math.max(2*s.r/l,2*s.r/c)),o}return a.size=function(t){return arguments.length?(i=t,a):i},a.radius=function(t){return arguments.length?(e=null==t||\\\"function\\\"==typeof t?t:+t,a):e},a.padding=function(t){return arguments.length?(n=+t,a):n},Sa(a,r)},t.layout.tree=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=null;function a(t,a){var c=e.call(this,t,a),u=c[0],f=function(t){var e,r={A:null,children:[t]},n=[r];for(;null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o<s;++o)n.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return r.children[0]}(u);if(Ea(f,o),f.parent.m=-f.z,Ca(f,s),i)Ca(u,l);else{var h=u,p=u,d=u;Ca(u,function(t){t.x<h.x&&(h=t),t.x>p.x&&(p=t),t.depth>d.depth&&(d=t)});var g=r(h,p)/2-h.x,v=n[0]/(p.x+r(p,h)/2+g),m=n[1]/(d.depth||1);Ca(u,function(t){t.x=(t.x+g)*v,t.y=t.depth*m})}return c}function o(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,i=t.children,a=i.length;for(;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+r(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+r(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,a=t,o=t,s=e,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=io(s),a=no(a),s&&a;)l=no(l),(o=io(o)).a=t,(i=s.z+f-a.z-c+r(s._,a._))>0&&(ao(oo(s,t,n),t,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!io(o)&&(o.t=s,o.m+=f-u),a&&!no(l)&&(l.t=a,l.m+=c-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t)?l:null,a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,a):i?n:null},Sa(a,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=!1;function a(a,o){var s,l=e.call(this,a,o),c=l[0],u=0;Ea(c,function(e){var n=e.children;n&&n.length?(e.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),e.y=function(e){return 1+t.max(e,function(t){return t.y})}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)});var f=function t(e){var r=e.children;return r&&r.length?t(r[0]):e}(c),h=function t(e){var r,n=e.children;return n&&(r=n.length)?t(n[r-1]):e}(c),p=f.x-r(f,h)/2,d=h.x+r(h,f)/2;return Ea(c,i?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t),a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null!=(n=t),a):i?n:null},Sa(a,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=so,s=!1,l=\\\"squarify\\\",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,a=t.length;++i<a;)n=(r=t[i]).value*(e<0?0:e),r.area=isNaN(n)||n<=0?0:n}function f(t){var e=t.children;if(e&&e.length){var r,n,i,a=o(t),s=[],c=e.slice(),h=1/0,g=\\\"slice\\\"===l?a.dx:\\\"dice\\\"===l?a.dy:\\\"slice-dice\\\"===l?1&t.depth?a.dy:a.dx:Math.min(a.dx,a.dy);for(u(c,a.dx*a.dy/t.value),s.area=0;(i=c.length)>0;)s.push(r=c[i-1]),s.area+=r.area,\\\"squarify\\\"!==l||(n=p(s,g))<=h?(c.pop(),h=n):(s.area-=s.pop().area,d(s,g,a,!1),g=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&&(d(s,g,a,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(u(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(h)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++o<s;)(r=t[o].area)&&(r<a&&(a=r),r>i&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*a*c)):1/0}function d(t,e,r,i){var a,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((i||u>r.dy)&&(u=r.dy);++o<s;)(a=t[o]).x=l,a.y=c,a.dy=u,l+=a.dx=Math.min(r.x+r.dx-l,u?n(a.area/u):0);a.z=!0,a.dx+=r.x+r.dx-l,r.y+=u,r.dy-=u}else{for((i||u>r.dx)&&(u=r.dx);++o<s;)(a=t[o]).x=l,a.y=c,a.dx=u,c+=a.dy=Math.min(r.y+r.dy-c,u?n(a.area/u):0);a.z=!1,a.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function g(t){var n=e||r(t),a=n[0];return a.x=a.y=0,a.value?(a.dx=i[0],a.dy=i[1]):a.dx=a.dy=0,e&&r.revalue(a),u([a],a.dx*a.dy/a.value),(e?h:f)(a),s&&(e=n),n}return g.size=function(t){return arguments.length?(i=t,g):i},g.padding=function(t){if(!arguments.length)return a;function e(e){return lo(e,t)}var r;return o=null==(a=t)?so:\\\"function\\\"==(r=typeof t)?function(e){var r=t.call(g,e,e.depth);return null==r?so(e):lo(e,\\\"number\\\"==typeof r?[r,r,r,r]:r)}:\\\"number\\\"===r?(t=[t,t,t,t],e):e,g},g.round=function(t){return arguments.length?(n=t?Math.round:Number,g):n!=Number},g.sticky=function(t){return arguments.length?(s=t,e=null,g):s},g.ratio=function(t){return arguments.length?(c=t,g):c},g.mode=function(t){return arguments.length?(l=t+\\\"\\\",g):l},Sa(g,r)},t.random={normal:function(t,e){var r=arguments.length;return r<2&&(e=1),r<1&&(t=0),function(){var r,n,i;do{i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!i||i>1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r<t;r++)e+=Math.random();return e}}},t.scale={};var go={floor:z,ceil:z};function vo(e,r,n,i){var a=[],o=[],s=0,l=Math.min(e.length,r.length)-1;for(e[l]<e[0]&&(e=e.slice().reverse(),r=r.slice().reverse());++s<=l;)a.push(n(e[s-1],e[s])),o.push(i(r[s-1],r[s]));return function(r){var n=t.bisect(e,r,1,l)-1;return o[n](a[n](r))}}function mo(e,r){return t.rebind(e,r,\\\"range\\\",\\\"rangeRound\\\",\\\"interpolate\\\",\\\"clamp\\\")}function yo(t,e){return ho(t,po(xo(t,e)[2])),ho(t,po(xo(t,e)[2])),t}function xo(t,e){null==e&&(e=10);var r=co(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function bo(e,r){return t.range.apply(t,xo(e,r))}function _o(e,r,n){var i=xo(e,r);if(n){var a=Le.exec(n);if(a.shift(),\\\"s\\\"===a[8]){var o=t.formatPrefix(Math.max(y(i[0]),y(i[1])));return a[7]||(a[7]=\\\".\\\"+ko(o.scale(i[2]))),a[8]=\\\"f\\\",n=t.format(a.join(\\\"\\\")),function(t){return n(o.scale(t))+o.symbol}}a[7]||(a[7]=\\\".\\\"+function(t,e){var r=ko(e[2]);return t in wo?Math.abs(r-ko(Math.max(y(e[0]),y(e[1]))))+ +(\\\"e\\\"!==t):r-2*(\\\"%\\\"===t)}(a[8],i)),n=a.join(\\\"\\\")}else n=\\\",.\\\"+ko(i[2])+\\\"f\\\";return t.format(n)}t.scale.linear=function(){return function t(e,r,n,i){var a,o;function s(){var t=Math.min(e.length,r.length)>2?vo:fo,s=i?ma:va;return a=t(e,r,s,n),o=t(r,e,s,Zi),l}function l(t){return a(t)}l.invert=function(t){return o(t)};l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};l.range=function(t){return arguments.length?(r=t,s()):r};l.rangeRound=function(t){return l.range(t).interpolate(ca)};l.clamp=function(t){return arguments.length?(i=t,s()):i};l.interpolate=function(t){return arguments.length?(n=t,s()):n};l.ticks=function(t){return bo(e,t)};l.tickFormat=function(t,r){return _o(e,t,r)};l.nice=function(t){return yo(e,t),s()};l.copy=function(){return t(e,r,n,i)};return s()}([0,1],[0,1],Zi,!1)};var wo={s:1,g:1,p:1,r:1,e:1};function ko(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}t.scale.log=function(){return function e(r,n,i,a){function o(t){return(i?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function s(t){return i?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return r(o(t))}l.invert=function(t){return s(r.invert(t))};l.domain=function(t){return arguments.length?(i=t[0]>=0,r.domain((a=t.map(Number)).map(o)),l):a};l.base=function(t){return arguments.length?(n=+t,r.domain(a.map(o)),l):n};l.nice=function(){var t=ho(a.map(o),i?Math:Ao);return r.domain(t),a=t.map(s),l};l.ticks=function(){var t=co(a),e=[],r=t[0],l=t[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),f=n%1?2:n;if(isFinite(u-c)){if(i){for(;c<u;c++)for(var h=1;h<f;h++)e.push(s(c)*h);e.push(s(c))}else for(e.push(s(c));c++<u;)for(var h=f-1;h>0;h--)e.push(s(c)*h);for(c=0;e[c]<r;c++);for(u=e.length;e[u-1]>l;u--);e=e.slice(c,u)}return e};l.tickFormat=function(e,r){if(!arguments.length)return Mo;arguments.length<2?r=Mo:\\\"function\\\"!=typeof r&&(r=t.format(r));var i=Math.max(1,n*e/l.ticks().length);return function(t){var e=t/s(Math.round(o(t)));return e*n<n-.5&&(e*=n),e<=i?r(t):\\\"\\\"}};l.copy=function(){return e(r.copy(),n,i,a)};return mo(l,r)}(t.scale.linear().domain([0,1]),10,!0,[1,10])};var Mo=t.format(\\\".0e\\\"),Ao={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function To(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}t.scale.pow=function(){return function t(e,r,n){var i=To(r),a=To(1/r);function o(t){return e(i(t))}o.invert=function(t){return a(e.invert(t))};o.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),o):n};o.ticks=function(t){return bo(n,t)};o.tickFormat=function(t,e){return _o(n,t,e)};o.nice=function(t){return o.domain(yo(n,t))};o.exponent=function(t){return arguments.length?(i=To(r=t),a=To(1/r),e.domain(n.map(i)),o):r};o.copy=function(){return t(e.copy(),r,n)};return mo(o,e)}(t.scale.linear(),1,[0,1])},t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return function e(r,n){var i,a,o;function s(t){return a[((i.get(t)||(\\\"range\\\"===n.t?i.set(t,r.push(t)):NaN))-1)%a.length]}function l(e,n){return t.range(r.length).map(function(t){return e+n*t})}s.domain=function(t){if(!arguments.length)return r;r=[],i=new b;for(var e,a=-1,o=t.length;++a<o;)i.has(e=t[a])||i.set(e,r.push(e));return s[n.t].apply(s,n.a)};s.range=function(t){return arguments.length?(a=t,o=0,n={t:\\\"range\\\",a:arguments},s):a};s.rangePoints=function(t,e){arguments.length<2&&(e=0);var i=t[0],c=t[1],u=r.length<2?(i=(i+c)/2,0):(c-i)/(r.length-1+e);return a=l(i+u*e/2,u),o=0,n={t:\\\"rangePoints\\\",a:arguments},s};s.rangeRoundPoints=function(t,e){arguments.length<2&&(e=0);var i=t[0],c=t[1],u=r.length<2?(i=c=Math.round((i+c)/2),0):(c-i)/(r.length-1+e)|0;return a=l(i+Math.round(u*e/2+(c-i-(r.length-1+e)*u)/2),u),o=0,n={t:\\\"rangeRoundPoints\\\",a:arguments},s};s.rangeBands=function(t,e,i){arguments.length<2&&(e=0),arguments.length<3&&(i=e);var c=t[1]<t[0],u=t[c-0],f=t[1-c],h=(f-u)/(r.length-e+2*i);return a=l(u+h*i,h),c&&a.reverse(),o=h*(1-e),n={t:\\\"rangeBands\\\",a:arguments},s};s.rangeRoundBands=function(t,e,i){arguments.length<2&&(e=0),arguments.length<3&&(i=e);var c=t[1]<t[0],u=t[c-0],f=t[1-c],h=Math.floor((f-u)/(r.length-e+2*i));return a=l(u+Math.round((f-u-(r.length-e)*h)/2),h),c&&a.reverse(),o=Math.round(h*(1-e)),n={t:\\\"rangeRoundBands\\\",a:arguments},s};s.rangeBand=function(){return o};s.rangeExtent=function(){return co(n.a[0])};s.copy=function(){return e(r,n)};return s.domain(r)}([],{t:\\\"range\\\",a:[[]]})},t.scale.category10=function(){return t.scale.ordinal().range(So)},t.scale.category20=function(){return t.scale.ordinal().range(Co)},t.scale.category20b=function(){return t.scale.ordinal().range(Eo)},t.scale.category20c=function(){return t.scale.ordinal().range(Lo)};var So=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(se),Co=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(se),Eo=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(se),Lo=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(se);function zo(){return 0}t.scale.quantile=function(){return function e(r,n){var i;function a(){var e=0,a=n.length;for(i=[];++e<a;)i[e-1]=t.quantile(r,e/a);return o}function o(e){if(!isNaN(e=+e))return n[t.bisect(i,e)]}o.domain=function(t){return arguments.length?(r=t.map(p).filter(d).sort(h),a()):r};o.range=function(t){return arguments.length?(n=t,a()):n};o.quantiles=function(){return i};o.invertExtent=function(t){return(t=n.indexOf(t))<0?[NaN,NaN]:[t>0?i[t-1]:r[0],t<i.length?i[t]:r[r.length-1]]};o.copy=function(){return e(r,n)};return a()}([],[])},t.scale.quantize=function(){return function t(e,r,n){var i,a;function o(t){return n[Math.max(0,Math.min(a,Math.floor(i*(t-e))))]}function s(){return i=n.length/(r-e),a=n.length-1,o}o.domain=function(t){return arguments.length?(e=+t[0],r=+t[t.length-1],s()):[e,r]};o.range=function(t){return arguments.length?(n=t,s()):n};o.invertExtent=function(t){return[t=(t=n.indexOf(t))<0?NaN:t/i+e,t+1/i]};o.copy=function(){return t(e,r,n)};return s()}(0,1,[0,1])},t.scale.threshold=function(){return function e(r,n){function i(e){if(e<=e)return n[t.bisect(r,e)]}i.domain=function(t){return arguments.length?(r=t,i):r};i.range=function(t){return arguments.length?(n=t,i):n};i.invertExtent=function(t){return t=n.indexOf(t),[r[t-1],r[t]]};i.copy=function(){return e(r,n)};return i}([.5],[0,1])},t.scale.identity=function(){return function t(e){function r(t){return+t}r.invert=r;r.domain=r.range=function(t){return arguments.length?(e=t.map(r),r):e};r.ticks=function(t){return bo(e,t)};r.tickFormat=function(t,r){return _o(e,t,r)};r.copy=function(){return t(e)};return r}([0,1])},t.svg={},t.svg.arc=function(){var t=Io,e=Po,r=zo,n=Oo,i=Do,a=Ro,o=Bo;function s(){var s=Math.max(0,+t.apply(this,arguments)),c=Math.max(0,+e.apply(this,arguments)),u=i.apply(this,arguments)-Ct,f=a.apply(this,arguments)-Ct,h=Math.abs(f-u),p=u>f?0:1;if(c<s&&(d=c,c=s,s=d),h>=St)return l(c,p)+(s?l(s,1-p):\\\"\\\")+\\\"Z\\\";var d,g,v,m,y,x,b,_,w,k,M,A,T=0,S=0,C=[];if((m=(+o.apply(this,arguments)||0)/2)&&(v=n===Oo?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=Pt(v/c*Math.sin(m))),s&&(T=Pt(v/s*Math.sin(m)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(f-S),_=c*Math.sin(f-S);var E=Math.abs(f-u-2*S)<=At?0:1;if(S&&Fo(y,x,b,_)===p^E){var L=(u+f)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-T),k=s*Math.sin(f-T),M=s*Math.cos(u+T),A=s*Math.sin(u+T);var z=Math.abs(u-f+2*T)<=At?0:1;if(T&&Fo(w,k,M,A)===1-p^z){var O=(u+f)/2;w=s*Math.cos(O),k=s*Math.sin(O),M=A=null}}else w=k=0;if(h>kt&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){g=s<c^p?0:1;var I=d,P=d;if(h<At){var D=null==M?[w,k]:null==b?[y,x]:si([y,x],[M,A],[b,_],[w,k]),R=y-D[0],B=x-D[1],F=b-D[0],N=_-D[1],j=1/Math.sin(Math.acos((R*F+B*N)/(Math.sqrt(R*R+B*B)*Math.sqrt(F*F+N*N)))/2),V=Math.sqrt(D[0]*D[0]+D[1]*D[1]);P=Math.min(d,(s-V)/(j-1)),I=Math.min(d,(c-V)/(j+1))}if(null!=b){var U=No(null==M?[w,k]:[M,A],[y,x],c,I,p),q=No([b,_],[w,k],c,I,p);d===I?C.push(\\\"M\\\",U[0],\\\"A\\\",I,\\\",\\\",I,\\\" 0 0,\\\",g,\\\" \\\",U[1],\\\"A\\\",c,\\\",\\\",c,\\\" 0 \\\",1-p^Fo(U[1][0],U[1][1],q[1][0],q[1][1]),\\\",\\\",p,\\\" \\\",q[1],\\\"A\\\",I,\\\",\\\",I,\\\" 0 0,\\\",g,\\\" \\\",q[0]):C.push(\\\"M\\\",U[0],\\\"A\\\",I,\\\",\\\",I,\\\" 0 1,\\\",g,\\\" \\\",q[0])}else C.push(\\\"M\\\",y,\\\",\\\",x);if(null!=M){var H=No([y,x],[M,A],s,-P,p),G=No([w,k],null==b?[y,x]:[b,_],s,-P,p);d===P?C.push(\\\"L\\\",G[0],\\\"A\\\",P,\\\",\\\",P,\\\" 0 0,\\\",g,\\\" \\\",G[1],\\\"A\\\",s,\\\",\\\",s,\\\" 0 \\\",p^Fo(G[1][0],G[1][1],H[1][0],H[1][1]),\\\",\\\",1-p,\\\" \\\",H[1],\\\"A\\\",P,\\\",\\\",P,\\\" 0 0,\\\",g,\\\" \\\",H[0]):C.push(\\\"L\\\",G[0],\\\"A\\\",P,\\\",\\\",P,\\\" 0 0,\\\",g,\\\" \\\",H[0])}else C.push(\\\"L\\\",w,\\\",\\\",k)}else C.push(\\\"M\\\",y,\\\",\\\",x),null!=b&&C.push(\\\"A\\\",c,\\\",\\\",c,\\\" 0 \\\",E,\\\",\\\",p,\\\" \\\",b,\\\",\\\",_),C.push(\\\"L\\\",w,\\\",\\\",k),null!=M&&C.push(\\\"A\\\",s,\\\",\\\",s,\\\" 0 \\\",z,\\\",\\\",1-p,\\\" \\\",M,\\\",\\\",A);return C.push(\\\"Z\\\"),C.join(\\\"\\\")}function l(t,e){return\\\"M0,\\\"+t+\\\"A\\\"+t+\\\",\\\"+t+\\\" 0 1,\\\"+e+\\\" 0,\\\"+-t+\\\"A\\\"+t+\\\",\\\"+t+\\\" 0 1,\\\"+e+\\\" 0,\\\"+t}return s.innerRadius=function(e){return arguments.length?(t=ve(e),s):t},s.outerRadius=function(t){return arguments.length?(e=ve(t),s):e},s.cornerRadius=function(t){return arguments.length?(r=ve(t),s):r},s.padRadius=function(t){return arguments.length?(n=t==Oo?Oo:ve(t),s):n},s.startAngle=function(t){return arguments.length?(i=ve(t),s):i},s.endAngle=function(t){return arguments.length?(a=ve(t),s):a},s.padAngle=function(t){return arguments.length?(o=ve(t),s):o},s.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,n=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Ct;return[Math.cos(n)*r,Math.sin(n)*r]},s};var Oo=\\\"auto\\\";function Io(t){return t.innerRadius}function Po(t){return t.outerRadius}function Do(t){return t.startAngle}function Ro(t){return t.endAngle}function Bo(t){return t&&t.padAngle}function Fo(t,e,r,n){return(t-r)*e-(e-n)*t>0?0:1}function No(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=t[0]+l,f=t[1]+c,h=e[0]+l,p=e[1]+c,d=(u+h)/2,g=(f+p)/2,v=h-u,m=p-f,y=v*v+m*m,x=r-n,b=u*p-h*f,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-v*_)/y,k=(-b*v-m*_)/y,M=(b*m+v*_)/y,A=(-b*v+m*_)/y,T=w-d,S=k-g,C=M-d,E=A-g;return T*T+S*S>C*C+E*E&&(w=M,k=A),[[w-l,k-c],[w*r/x,k*r/x]]}function jo(t){var e=ei,r=ri,n=Wr,i=Uo,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,f=a.length,h=ve(e),p=ve(r);function d(){l.push(\\\"M\\\",i(t(c),o))}for(;++u<f;)n.call(this,s=a[u],u)?c.push([+h.call(this,s,u),+p.call(this,s,u)]):c.length&&(d(),c=[]);return c.length&&d(),l.length?l.join(\\\"\\\"):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(r=t,s):r},s.defined=function(t){return arguments.length?(n=t,s):n},s.interpolate=function(t){return arguments.length?(a=\\\"function\\\"==typeof t?i=t:(i=Vo.get(t)||Uo).key,s):a},s.tension=function(t){return arguments.length?(o=t,s):o},s}t.svg.line=function(){return jo(z)};var Vo=t.map({linear:Uo,\\\"linear-closed\\\":qo,step:function(t){var e=0,r=t.length,n=t[0],i=[n[0],\\\",\\\",n[1]];for(;++e<r;)i.push(\\\"H\\\",(n[0]+(n=t[e])[0])/2,\\\"V\\\",n[1]);r>1&&i.push(\\\"H\\\",n[0]);return i.join(\\\"\\\")},\\\"step-before\\\":Ho,\\\"step-after\\\":Go,basis:Xo,\\\"basis-open\\\":function(t){if(t.length<4)return Uo(t);var e,r=[],n=-1,i=t.length,a=[0],o=[0];for(;++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);r.push(Zo(Ko,a)+\\\",\\\"+Zo(Ko,o)),--n;for(;++n<i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Qo(r,a,o);return r.join(\\\"\\\")},\\\"basis-closed\\\":function(t){var e,r,n=-1,i=t.length,a=i+4,o=[],s=[];for(;++n<4;)r=t[n%i],o.push(r[0]),s.push(r[1]);e=[Zo(Ko,o),\\\",\\\",Zo(Ko,s)],--n;for(;++n<a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Qo(e,o,s);return e.join(\\\"\\\")},bundle:function(t,e){var r=t.length-1;if(r)for(var n,i,a=t[0][0],o=t[0][1],s=t[r][0]-a,l=t[r][1]-o,c=-1;++c<=r;)n=t[c],i=c/r,n[0]=e*n[0]+(1-e)*(a+i*s),n[1]=e*n[1]+(1-e)*(o+i*l);return Xo(t)},cardinal:function(t,e){return t.length<3?Uo(t):t[0]+Wo(t,Yo(t,e))},\\\"cardinal-open\\\":function(t,e){return t.length<4?Uo(t):t[1]+Wo(t.slice(1,-1),Yo(t,e))},\\\"cardinal-closed\\\":function(t,e){return t.length<3?qo(t):t[0]+Wo((t.push(t[0]),t),Yo([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?Uo(t):t[0]+Wo(t,function(t){var e,r,n,i,a=[],o=function(t){var e=0,r=t.length-1,n=[],i=t[0],a=t[1],o=n[0]=ts(i,a);for(;++e<r;)n[e]=(o+(o=ts(i=a,a=t[e+1])))/2;return n[e]=o,n}(t),s=-1,l=t.length-1;for(;++s<l;)e=ts(t[s],t[s+1]),y(e)<kt?o[s]=o[s+1]=0:(r=o[s]/e,n=o[s+1]/e,(i=r*r+n*n)>9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));s=-1;for(;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Uo(t){return t.length>1?t.join(\\\"L\\\"):t+\\\"Z\\\"}function qo(t){return t.join(\\\"L\\\")+\\\"Z\\\"}function Ho(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\\\",\\\",n[1]];++e<r;)i.push(\\\"V\\\",(n=t[e])[1],\\\"H\\\",n[0]);return i.join(\\\"\\\")}function Go(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\\\",\\\",n[1]];++e<r;)i.push(\\\"H\\\",(n=t[e])[0],\\\"V\\\",n[1]);return i.join(\\\"\\\")}function Wo(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Uo(t);var r=t.length!=e.length,n=\\\"\\\",i=t[0],a=t[1],o=e[0],s=o,l=1;if(r&&(n+=\\\"Q\\\"+(a[0]-2*o[0]/3)+\\\",\\\"+(a[1]-2*o[1]/3)+\\\",\\\"+a[0]+\\\",\\\"+a[1],i=t[1],l=2),e.length>1){s=e[1],a=t[l],l++,n+=\\\"C\\\"+(i[0]+o[0])+\\\",\\\"+(i[1]+o[1])+\\\",\\\"+(a[0]-s[0])+\\\",\\\"+(a[1]-s[1])+\\\",\\\"+a[0]+\\\",\\\"+a[1];for(var c=2;c<e.length;c++,l++)a=t[l],s=e[c],n+=\\\"S\\\"+(a[0]-s[0])+\\\",\\\"+(a[1]-s[1])+\\\",\\\"+a[0]+\\\",\\\"+a[1]}if(r){var u=t[l];n+=\\\"Q\\\"+(a[0]+2*s[0]/3)+\\\",\\\"+(a[1]+2*s[1]/3)+\\\",\\\"+u[0]+\\\",\\\"+u[1]}return n}function Yo(t,e){for(var r,n=[],i=(1-e)/2,a=t[0],o=t[1],s=1,l=t.length;++s<l;)r=a,a=o,o=t[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function Xo(t){if(t.length<3)return Uo(t);var e=1,r=t.length,n=t[0],i=n[0],a=n[1],o=[i,i,i,(n=t[1])[0]],s=[a,a,a,n[1]],l=[i,\\\",\\\",a,\\\"L\\\",Zo(Ko,o),\\\",\\\",Zo(Ko,s)];for(t.push(t[r-1]);++e<=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Qo(l,o,s);return t.pop(),l.push(\\\"L\\\",n),l.join(\\\"\\\")}function Zo(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}Vo.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var $o=[0,2/3,1/3,0],Jo=[0,1/3,2/3,0],Ko=[0,1/6,2/3,1/6];function Qo(t,e,r){t.push(\\\"C\\\",Zo($o,e),\\\",\\\",Zo($o,r),\\\",\\\",Zo(Jo,e),\\\",\\\",Zo(Jo,r),\\\",\\\",Zo(Ko,e),\\\",\\\",Zo(Ko,r))}function ts(t,e){return(e[1]-t[1])/(e[0]-t[0])}function es(t){for(var e,r,n,i=-1,a=t.length;++i<a;)r=(e=t[i])[0],n=e[1]-Ct,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function rs(t){var e=ei,r=ei,n=0,i=ri,a=Wr,o=Uo,s=o.key,l=o,c=\\\"L\\\",u=.7;function f(s){var f,h,p,d=[],g=[],v=[],m=-1,y=s.length,x=ve(e),b=ve(n),_=e===r?function(){return h}:ve(r),w=n===i?function(){return p}:ve(i);function k(){d.push(\\\"M\\\",o(t(v),u),c,l(t(g.reverse()),u),\\\"Z\\\")}for(;++m<y;)a.call(this,f=s[m],m)?(g.push([h=+x.call(this,f,m),p=+b.call(this,f,m)]),v.push([+_.call(this,f,m),+w.call(this,f,m)])):g.length&&(k(),g=[],v=[]);return g.length&&k(),d.length?d.join(\\\"\\\"):null}return f.x=function(t){return arguments.length?(e=r=t,f):r},f.x0=function(t){return arguments.length?(e=t,f):e},f.x1=function(t){return arguments.length?(r=t,f):r},f.y=function(t){return arguments.length?(n=i=t,f):i},f.y0=function(t){return arguments.length?(n=t,f):n},f.y1=function(t){return arguments.length?(i=t,f):i},f.defined=function(t){return arguments.length?(a=t,f):a},f.interpolate=function(t){return arguments.length?(s=\\\"function\\\"==typeof t?o=t:(o=Vo.get(t)||Uo).key,l=o.reverse||o,c=o.closed?\\\"M\\\":\\\"L\\\",f):s},f.tension=function(t){return arguments.length?(u=t,f):u},f}function ns(t){return t.radius}function is(t){return[t.x,t.y]}function as(){return 64}function os(){return\\\"circle\\\"}function ss(t){var e=Math.sqrt(t/At);return\\\"M0,\\\"+e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,\\\"+-e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,\\\"+e+\\\"Z\\\"}t.svg.line.radial=function(){var t=jo(es);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Ho.reverse=Go,Go.reverse=Ho,t.svg.area=function(){return rs(z)},t.svg.area.radial=function(){var t=rs(es);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},t.svg.chord=function(){var t=Vn,e=Un,r=ns,n=Do,i=Ro;function a(r,n){var i,a,c=o(this,t,r,n),u=o(this,e,r,n);return\\\"M\\\"+c.p0+s(c.r,c.p1,c.a1-c.a0)+(a=u,(i=c).a0==a.a0&&i.a1==a.a1?l(c.r,c.p1,c.r,c.p0):l(c.r,c.p1,u.r,u.p0)+s(u.r,u.p1,u.a1-u.a0)+l(u.r,u.p1,c.r,c.p0))+\\\"Z\\\"}function o(t,e,a,o){var s=e.call(t,a,o),l=r.call(t,s,o),c=n.call(t,s,o)-Ct,u=i.call(t,s,o)-Ct;return{r:l,a0:c,a1:u,p0:[l*Math.cos(c),l*Math.sin(c)],p1:[l*Math.cos(u),l*Math.sin(u)]}}function s(t,e,r){return\\\"A\\\"+t+\\\",\\\"+t+\\\" 0 \\\"+ +(r>At)+\\\",1 \\\"+e}function l(t,e,r,n){return\\\"Q 0,0 \\\"+n}return a.radius=function(t){return arguments.length?(r=ve(t),a):r},a.source=function(e){return arguments.length?(t=ve(e),a):t},a.target=function(t){return arguments.length?(e=ve(t),a):e},a.startAngle=function(t){return arguments.length?(n=ve(t),a):n},a.endAngle=function(t){return arguments.length?(i=ve(t),a):i},a},t.svg.diagonal=function(){var t=Vn,e=Un,r=is;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return\\\"M\\\"+(l=l.map(r))[0]+\\\"C\\\"+l[1]+\\\" \\\"+l[2]+\\\" \\\"+l[3]}return n.source=function(e){return arguments.length?(t=ve(e),n):t},n.target=function(t){return arguments.length?(e=ve(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=is,n=e.projection;return e.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Ct;return[r*Math.cos(n),r*Math.sin(n)]}}(r=t)):r},e},t.svg.symbol=function(){var t=os,e=as;function r(r,n){return(ls.get(t.call(this,r,n))||ss)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ve(e),r):t},r.size=function(t){return arguments.length?(e=ve(t),r):e},r};var ls=t.map({circle:ss,cross:function(t){var e=Math.sqrt(t/5)/2;return\\\"M\\\"+-3*e+\\\",\\\"+-e+\\\"H\\\"+-e+\\\"V\\\"+-3*e+\\\"H\\\"+e+\\\"V\\\"+-e+\\\"H\\\"+3*e+\\\"V\\\"+e+\\\"H\\\"+e+\\\"V\\\"+3*e+\\\"H\\\"+-e+\\\"V\\\"+e+\\\"H\\\"+-3*e+\\\"Z\\\"},diamond:function(t){var e=Math.sqrt(t/(2*us)),r=e*us;return\\\"M0,\\\"+-e+\\\"L\\\"+r+\\\",0 0,\\\"+e+\\\" \\\"+-r+\\\",0Z\\\"},square:function(t){var e=Math.sqrt(t)/2;return\\\"M\\\"+-e+\\\",\\\"+-e+\\\"L\\\"+e+\\\",\\\"+-e+\\\" \\\"+e+\\\",\\\"+e+\\\" \\\"+-e+\\\",\\\"+e+\\\"Z\\\"},\\\"triangle-down\\\":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return\\\"M0,\\\"+r+\\\"L\\\"+e+\\\",\\\"+-r+\\\" \\\"+-e+\\\",\\\"+-r+\\\"Z\\\"},\\\"triangle-up\\\":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return\\\"M0,\\\"+-r+\\\"L\\\"+e+\\\",\\\"+r+\\\" \\\"+-e+\\\",\\\"+r+\\\"Z\\\"}});t.svg.symbolTypes=ls.keys();var cs=Math.sqrt(3),us=Math.tan(30*Et);Y.transition=function(t){for(var e,r,n=ds||++ms,i=bs(t),a=[],o=gs||{time:Date.now(),ease:ia,delay:0,duration:250},s=-1,l=this.length;++s<l;){a.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u<f;)(r=c[u])&&_s(r,u,i,n,o),e.push(r)}return ps(a,i,n)},Y.interrupt=function(t){return this.each(null==t?fs:hs(bs(t)))};var fs=hs(bs());function hs(t){return function(){var e,r,n;(e=this[t])&&(n=e[r=e.active])&&(n.timer.c=null,n.timer.t=NaN,--e.count?delete e[r]:delete this[t],e.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function ps(t,e,r){return U(t,vs),t.namespace=e,t.id=r,t}var ds,gs,vs=[],ms=0;function ys(t,e,r,n){var i=t.id,a=t.namespace;return ut(t,\\\"function\\\"==typeof r?function(t,o,s){t[a][i].tween.set(e,n(r.call(t,t.__data__,o,s)))}:(r=n(r),function(t){t[a][i].tween.set(e,r)}))}function xs(t){return null==t&&(t=\\\"\\\"),function(){this.textContent=t}}function bs(t){return null==t?\\\"__transition__\\\":\\\"__transition_\\\"+t+\\\"__\\\"}function _s(t,e,r,n,i){var a,o,s,l,c,u=t[r]||(t[r]={active:0,count:0}),f=u[n];function h(r){var i=u.active,h=u[i];for(var d in h&&(h.timer.c=null,h.timer.t=NaN,--u.count,delete u[i],h.event&&h.event.interrupt.call(t,t.__data__,h.index)),u)if(+d<n){var g=u[d];g.timer.c=null,g.timer.t=NaN,--u.count,delete u[d]}o.c=p,Me(function(){return o.c&&p(r||1)&&(o.c=null,o.t=NaN),1},0,a),u.active=n,f.event&&f.event.start.call(t,t.__data__,e),c=[],f.tween.forEach(function(r,n){(n=n.call(t,t.__data__,e))&&c.push(n)}),l=f.ease,s=f.duration}function p(i){for(var a=i/s,o=l(a),h=c.length;h>0;)c[--h].call(t,o);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}f||(a=i.time,o=Me(function(t){var e=f.delay;if(o.t=e+a,e<=t)return h(t-e);o.c=h},0,a),f=u[n]={tween:new b,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}vs.call=Y.call,vs.empty=Y.empty,vs.node=Y.node,vs.size=Y.size,t.transition=function(e,r){return e&&e.transition?ds?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=vs,vs.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=X(t);for(var s=-1,l=this.length;++s<l;){o.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u<f;)(n=c[u])&&(r=t.call(n,n.__data__,u,s))?(\\\"__data__\\\"in n&&(r.__data__=n.__data__),_s(r,u,a,i,n[a][i]),e.push(r)):e.push(null)}return ps(o,a,i)},vs.selectAll=function(t){var e,r,n,i,a,o=this.id,s=this.namespace,l=[];t=Z(t);for(var c=-1,u=this.length;++c<u;)for(var f=this[c],h=-1,p=f.length;++h<p;)if(n=f[h]){a=n[s][o],r=t.call(n,n.__data__,h,c),l.push(e=[]);for(var d=-1,g=r.length;++d<g;)(i=r[d])&&_s(i,d,s,o,a),e.push(i)}return ps(l,s,o)},vs.filter=function(t){var e,r,n=[];\\\"function\\\"!=typeof t&&(t=ct(t));for(var i=0,a=this.length;i<a;i++){n.push(e=[]);for(var o,s=0,l=(o=this[i]).length;s<l;s++)(r=o[s])&&t.call(r,r.__data__,s,i)&&e.push(r)}return ps(n,this.namespace,this.id)},vs.tween=function(t,e){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(t):ut(this,null==e?function(e){e[n][r].tween.remove(t)}:function(i){i[n][r].tween.set(t,e)})},vs.attr=function(e,r){if(arguments.length<2){for(r in e)this.attr(r,e[r]);return this}var n=\\\"transform\\\"==e?ga:Zi,i=t.ns.qualify(e);function a(){this.removeAttribute(i)}function o(){this.removeAttributeNS(i.space,i.local)}return ys(this,\\\"attr.\\\"+e,r,i.local?function(t){return null==t?o:(t+=\\\"\\\",function(){var e,r=this.getAttributeNS(i.space,i.local);return r!==t&&(e=n(r,t),function(t){this.setAttributeNS(i.space,i.local,e(t))})})}:function(t){return null==t?a:(t+=\\\"\\\",function(){var e,r=this.getAttribute(i);return r!==t&&(e=n(r,t),function(t){this.setAttribute(i,e(t))})})})},vs.attrTween=function(e,r){var n=t.ns.qualify(e);return this.tween(\\\"attr.\\\"+e,n.local?function(t,e){var i=r.call(this,t,e,this.getAttributeNS(n.space,n.local));return i&&function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,e){var i=r.call(this,t,e,this.getAttribute(n));return i&&function(t){this.setAttribute(n,i(t))}})},vs.style=function(t,e,r){var n=arguments.length;if(n<3){if(\\\"string\\\"!=typeof t){for(r in n<2&&(e=\\\"\\\"),t)this.style(r,t[r],e);return this}r=\\\"\\\"}function i(){this.style.removeProperty(t)}return ys(this,\\\"style.\\\"+t,e,function(e){return null==e?i:(e+=\\\"\\\",function(){var n,i=o(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(n=Zi(i,e),function(e){this.style.setProperty(t,n(e),r)})})})},vs.styleTween=function(t,e,r){return arguments.length<3&&(r=\\\"\\\"),this.tween(\\\"style.\\\"+t,function(n,i){var a=e.call(this,n,i,o(this).getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),r)}})},vs.text=function(t){return ys(this,\\\"text\\\",t,xs)},vs.remove=function(){var t=this.namespace;return this.each(\\\"end.transition\\\",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},vs.ease=function(e){var r=this.id,n=this.namespace;return arguments.length<1?this.node()[n][r].ease:(\\\"function\\\"!=typeof e&&(e=t.ease.apply(t,arguments)),ut(this,function(t){t[n][r].ease=e}))},vs.delay=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].delay:ut(this,\\\"function\\\"==typeof t?function(n,i,a){n[r][e].delay=+t.call(n,n.__data__,i,a)}:(t=+t,function(n){n[r][e].delay=t}))},vs.duration=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].duration:ut(this,\\\"function\\\"==typeof t?function(n,i,a){n[r][e].duration=Math.max(1,t.call(n,n.__data__,i,a))}:(t=Math.max(1,t),function(n){n[r][e].duration=t}))},vs.each=function(e,r){var n=this.id,i=this.namespace;if(arguments.length<2){var a=gs,o=ds;try{ds=n,ut(this,function(t,r,a){gs=t[i][n],e.call(t,t.__data__,r,a)})}finally{gs=a,ds=o}}else ut(this,function(a){var o=a[i][n];(o.event||(o.event=t.dispatch(\\\"start\\\",\\\"end\\\",\\\"interrupt\\\"))).on(e,r)});return this},vs.transition=function(){for(var t,e,r,n=this.id,i=++ms,a=this.namespace,o=[],s=0,l=this.length;s<l;s++){o.push(t=[]);for(var c,u=0,f=(c=this[s]).length;u<f;u++)(e=c[u])&&_s(e,u,a,i,{time:(r=e[a][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),t.push(e)}return ps(o,a,i)},t.svg.axis=function(){var e,r=t.scale.linear(),i=ws,a=6,o=6,s=3,l=[10],c=null;function u(n){n.each(function(){var n,u=t.select(this),f=this.__chart__||r,h=this.__chart__=r.copy(),p=null==c?h.ticks?h.ticks.apply(h,l):h.domain():c,d=null==e?h.tickFormat?h.tickFormat.apply(h,l):z:e,g=u.selectAll(\\\".tick\\\").data(p,h),v=g.enter().insert(\\\"g\\\",\\\".domain\\\").attr(\\\"class\\\",\\\"tick\\\").style(\\\"opacity\\\",kt),m=t.transition(g.exit()).style(\\\"opacity\\\",kt).remove(),y=t.transition(g.order()).style(\\\"opacity\\\",1),x=Math.max(a,0)+s,b=uo(h),_=u.selectAll(\\\".domain\\\").data([0]),w=(_.enter().append(\\\"path\\\").attr(\\\"class\\\",\\\"domain\\\"),t.transition(_));v.append(\\\"line\\\"),v.append(\\\"text\\\");var k,M,A,T,S=v.select(\\\"line\\\"),C=y.select(\\\"line\\\"),E=g.select(\\\"text\\\").text(d),L=v.select(\\\"text\\\"),O=y.select(\\\"text\\\"),I=\\\"top\\\"===i||\\\"left\\\"===i?-1:1;if(\\\"bottom\\\"===i||\\\"top\\\"===i?(n=Ms,k=\\\"x\\\",A=\\\"y\\\",M=\\\"x2\\\",T=\\\"y2\\\",E.attr(\\\"dy\\\",I<0?\\\"0em\\\":\\\".71em\\\").style(\\\"text-anchor\\\",\\\"middle\\\"),w.attr(\\\"d\\\",\\\"M\\\"+b[0]+\\\",\\\"+I*o+\\\"V0H\\\"+b[1]+\\\"V\\\"+I*o)):(n=As,k=\\\"y\\\",A=\\\"x\\\",M=\\\"y2\\\",T=\\\"x2\\\",E.attr(\\\"dy\\\",\\\".32em\\\").style(\\\"text-anchor\\\",I<0?\\\"end\\\":\\\"start\\\"),w.attr(\\\"d\\\",\\\"M\\\"+I*o+\\\",\\\"+b[0]+\\\"H0V\\\"+b[1]+\\\"H\\\"+I*o)),S.attr(T,I*a),L.attr(A,I*x),C.attr(M,0).attr(T,I*a),O.attr(k,0).attr(A,I*x),h.rangeBand){var P=h,D=P.rangeBand()/2;f=h=function(t){return P(t)+D}}else f.rangeBand?f=h:m.call(n,h,f);v.call(n,f,h),y.call(n,h,h)})}return u.scale=function(t){return arguments.length?(r=t,u):r},u.orient=function(t){return arguments.length?(i=t in ks?t+\\\"\\\":ws,u):i},u.ticks=function(){return arguments.length?(l=n(arguments),u):l},u.tickValues=function(t){return arguments.length?(c=t,u):c},u.tickFormat=function(t){return arguments.length?(e=t,u):e},u.tickSize=function(t){var e=arguments.length;return e?(a=+t,o=+arguments[e-1],u):a},u.innerTickSize=function(t){return arguments.length?(a=+t,u):a},u.outerTickSize=function(t){return arguments.length?(o=+t,u):o},u.tickPadding=function(t){return arguments.length?(s=+t,u):s},u.tickSubdivide=function(){return arguments.length&&u},u};var ws=\\\"bottom\\\",ks={top:1,right:1,bottom:1,left:1};function Ms(t,e,r){t.attr(\\\"transform\\\",function(t){var n=e(t);return\\\"translate(\\\"+(isFinite(n)?n:r(t))+\\\",0)\\\"})}function As(t,e,r){t.attr(\\\"transform\\\",function(t){var n=e(t);return\\\"translate(0,\\\"+(isFinite(n)?n:r(t))+\\\")\\\"})}t.svg.brush=function(){var e,r,n=j(h,\\\"brushstart\\\",\\\"brush\\\",\\\"brushend\\\"),i=null,a=null,s=[0,0],l=[0,0],c=!0,u=!0,f=Ss[0];function h(e){e.each(function(){var e=t.select(this).style(\\\"pointer-events\\\",\\\"all\\\").style(\\\"-webkit-tap-highlight-color\\\",\\\"rgba(0,0,0,0)\\\").on(\\\"mousedown.brush\\\",v).on(\\\"touchstart.brush\\\",v),r=e.selectAll(\\\".background\\\").data([0]);r.enter().append(\\\"rect\\\").attr(\\\"class\\\",\\\"background\\\").style(\\\"visibility\\\",\\\"hidden\\\").style(\\\"cursor\\\",\\\"crosshair\\\"),e.selectAll(\\\".extent\\\").data([0]).enter().append(\\\"rect\\\").attr(\\\"class\\\",\\\"extent\\\").style(\\\"cursor\\\",\\\"move\\\");var n=e.selectAll(\\\".resize\\\").data(f,z);n.exit().remove(),n.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"resize \\\"+t}).style(\\\"cursor\\\",function(t){return Ts[t]}).append(\\\"rect\\\").attr(\\\"x\\\",function(t){return/[ew]$/.test(t)?-3:null}).attr(\\\"y\\\",function(t){return/^[ns]/.test(t)?-3:null}).attr(\\\"width\\\",6).attr(\\\"height\\\",6).style(\\\"visibility\\\",\\\"hidden\\\"),n.style(\\\"display\\\",h.empty()?\\\"none\\\":null);var o,s=t.transition(e),l=t.transition(r);i&&(o=uo(i),l.attr(\\\"x\\\",o[0]).attr(\\\"width\\\",o[1]-o[0]),d(s)),a&&(o=uo(a),l.attr(\\\"y\\\",o[0]).attr(\\\"height\\\",o[1]-o[0]),g(s)),p(s)})}function p(t){t.selectAll(\\\".resize\\\").attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+s[+/e$/.test(t)]+\\\",\\\"+l[+/^s/.test(t)]+\\\")\\\"})}function d(t){t.select(\\\".extent\\\").attr(\\\"x\\\",s[0]),t.selectAll(\\\".extent,.n>rect,.s>rect\\\").attr(\\\"width\\\",s[1]-s[0])}function g(t){t.select(\\\".extent\\\").attr(\\\"y\\\",l[0]),t.selectAll(\\\".extent,.e>rect,.w>rect\\\").attr(\\\"height\\\",l[1]-l[0])}function v(){var f,v,m=this,y=t.select(t.event.target),x=n.of(m,arguments),b=t.select(m),_=y.datum(),w=!/^(n|s)$/.test(_)&&i,k=!/^(e|w)$/.test(_)&&a,M=y.classed(\\\"extent\\\"),A=xt(m),T=t.mouse(m),S=t.select(o(m)).on(\\\"keydown.brush\\\",function(){32==t.event.keyCode&&(M||(f=null,T[0]-=s[1],T[1]-=l[1],M=2),F())}).on(\\\"keyup.brush\\\",function(){32==t.event.keyCode&&2==M&&(T[0]+=s[1],T[1]+=l[1],M=0,F())});if(t.event.changedTouches?S.on(\\\"touchmove.brush\\\",L).on(\\\"touchend.brush\\\",O):S.on(\\\"mousemove.brush\\\",L).on(\\\"mouseup.brush\\\",O),b.interrupt().selectAll(\\\"*\\\").interrupt(),M)T[0]=s[0]-T[0],T[1]=l[0]-T[1];else if(_){var C=+/w$/.test(_),E=+/^n/.test(_);v=[s[1-C]-T[0],l[1-E]-T[1]],T[0]=s[C],T[1]=l[E]}else t.event.altKey&&(f=T.slice());function L(){var e=t.mouse(m),r=!1;v&&(e[0]+=v[0],e[1]+=v[1]),M||(t.event.altKey?(f||(f=[(s[0]+s[1])/2,(l[0]+l[1])/2]),T[0]=s[+(e[0]<f[0])],T[1]=l[+(e[1]<f[1])]):f=null),w&&z(e,i,0)&&(d(b),r=!0),k&&z(e,a,1)&&(g(b),r=!0),r&&(p(b),x({type:\\\"brush\\\",mode:M?\\\"move\\\":\\\"resize\\\"}))}function z(t,n,i){var a,o,h=uo(n),p=h[0],d=h[1],g=T[i],v=i?l:s,m=v[1]-v[0];if(M&&(p-=g,d-=m+g),a=(i?u:c)?Math.max(p,Math.min(d,t[i])):t[i],M?o=(a+=g)+m:(f&&(g=Math.max(p,Math.min(d,2*f[i]-a))),g<a?(o=a,a=g):o=g),v[0]!=a||v[1]!=o)return i?r=null:e=null,v[0]=a,v[1]=o,!0}function O(){L(),b.style(\\\"pointer-events\\\",\\\"all\\\").selectAll(\\\".resize\\\").style(\\\"display\\\",h.empty()?\\\"none\\\":null),t.select(\\\"body\\\").style(\\\"cursor\\\",null),S.on(\\\"mousemove.brush\\\",null).on(\\\"mouseup.brush\\\",null).on(\\\"touchmove.brush\\\",null).on(\\\"touchend.brush\\\",null).on(\\\"keydown.brush\\\",null).on(\\\"keyup.brush\\\",null),A(),x({type:\\\"brushend\\\"})}b.style(\\\"pointer-events\\\",\\\"none\\\").selectAll(\\\".resize\\\").style(\\\"display\\\",null),t.select(\\\"body\\\").style(\\\"cursor\\\",y.style(\\\"cursor\\\")),x({type:\\\"brushstart\\\"}),L()}return h.event=function(i){i.each(function(){var i=n.of(this,arguments),a={x:s,y:l,i:e,j:r},o=this.__chart__||a;this.__chart__=a,ds?t.select(this).transition().each(\\\"start.brush\\\",function(){e=o.i,r=o.j,s=o.x,l=o.y,i({type:\\\"brushstart\\\"})}).tween(\\\"brush:brush\\\",function(){var t=$i(s,a.x),n=$i(l,a.y);return e=r=null,function(e){s=a.x=t(e),l=a.y=n(e),i({type:\\\"brush\\\",mode:\\\"resize\\\"})}}).each(\\\"end.brush\\\",function(){e=a.i,r=a.j,i({type:\\\"brush\\\",mode:\\\"resize\\\"}),i({type:\\\"brushend\\\"})}):(i({type:\\\"brushstart\\\"}),i({type:\\\"brush\\\",mode:\\\"resize\\\"}),i({type:\\\"brushend\\\"}))})},h.x=function(t){return arguments.length?(f=Ss[!(i=t)<<1|!a],h):i},h.y=function(t){return arguments.length?(f=Ss[!i<<1|!(a=t)],h):a},h.clamp=function(t){return arguments.length?(i&&a?(c=!!t[0],u=!!t[1]):i?c=!!t:a&&(u=!!t),h):i&&a?[c,u]:i?c:a?u:null},h.extent=function(t){var n,o,c,u,f;return arguments.length?(i&&(n=t[0],o=t[1],a&&(n=n[0],o=o[0]),e=[n,o],i.invert&&(n=i(n),o=i(o)),o<n&&(f=n,n=o,o=f),n==s[0]&&o==s[1]||(s=[n,o])),a&&(c=t[0],u=t[1],i&&(c=c[1],u=u[1]),r=[c,u],a.invert&&(c=a(c),u=a(u)),u<c&&(f=c,c=u,u=f),c==l[0]&&u==l[1]||(l=[c,u])),h):(i&&(e?(n=e[0],o=e[1]):(n=s[0],o=s[1],i.invert&&(n=i.invert(n),o=i.invert(o)),o<n&&(f=n,n=o,o=f))),a&&(r?(c=r[0],u=r[1]):(c=l[0],u=l[1],a.invert&&(c=a.invert(c),u=a.invert(u)),u<c&&(f=c,c=u,u=f))),i&&a?[[n,c],[o,u]]:i?[n,o]:a&&[c,u])},h.clear=function(){return h.empty()||(s=[0,0],l=[0,0],e=r=null),h},h.empty=function(){return!!i&&s[0]==s[1]||!!a&&l[0]==l[1]},t.rebind(h,n,\\\"on\\\")};var Ts={n:\\\"ns-resize\\\",e:\\\"ew-resize\\\",s:\\\"ns-resize\\\",w:\\\"ew-resize\\\",nw:\\\"nwse-resize\\\",ne:\\\"nesw-resize\\\",se:\\\"nwse-resize\\\",sw:\\\"nesw-resize\\\"},Ss=[[\\\"n\\\",\\\"e\\\",\\\"s\\\",\\\"w\\\",\\\"nw\\\",\\\"ne\\\",\\\"se\\\",\\\"sw\\\"],[\\\"e\\\",\\\"w\\\"],[\\\"n\\\",\\\"s\\\"],[]],Cs=Ie.format=sr.timeFormat,Es=Cs.utc,Ls=Es(\\\"%Y-%m-%dT%H:%M:%S.%LZ\\\");function zs(t){return t.toISOString()}function Os(e,r,n){function i(t){return e(t)}function a(e,n){var i=(e[1]-e[0])/n,a=t.bisect(Ps,i);return a==Ps.length?[r.year,xo(e.map(function(t){return t/31536e6}),n)[2]]:a?r[i/Ps[a-1]<Ps[a]/i?a-1:a]:[Bs,xo(e,n)[2]]}return i.invert=function(t){return Is(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain().map(Is)},i.nice=function(t,e){var r=i.domain(),n=co(r),o=null==t?a(n,10):\\\"number\\\"==typeof t&&a(n,t);function s(r){return!isNaN(r)&&!t.range(r,Is(+r+1),e).length}return o&&(t=o[0],e=o[1]),i.domain(ho(r,e>1?{floor:function(e){for(;s(e=t.floor(e));)e=Is(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=Is(+e+1);return e}}:t))},i.ticks=function(t,e){var r=co(i.domain()),n=null==t?a(r,10):\\\"number\\\"==typeof t?a(r,t):!t.range&&[{range:t},e];return n&&(t=n[0],e=n[1]),t.range(r[0],Is(+r[1]+1),e<1?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Os(e.copy(),r,n)},mo(i,e)}function Is(t){return new Date(t)}Cs.iso=Date.prototype.toISOString&&+new Date(\\\"2000-01-01T00:00:00.000Z\\\")?zs:Ls,zs.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},zs.toString=Ls.toString,Ie.second=Be(function(t){return new Pe(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Ie.seconds=Ie.second.range,Ie.seconds.utc=Ie.second.utc.range,Ie.minute=Be(function(t){return new Pe(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Ie.minutes=Ie.minute.range,Ie.minutes.utc=Ie.minute.utc.range,Ie.hour=Be(function(t){var e=t.getTimezoneOffset()/60;return new Pe(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Ie.hours=Ie.hour.range,Ie.hours.utc=Ie.hour.utc.range,Ie.month=Be(function(t){return(t=Ie.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Ie.months=Ie.month.range,Ie.months.utc=Ie.month.utc.range;var Ps=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ds=[[Ie.second,1],[Ie.second,5],[Ie.second,15],[Ie.second,30],[Ie.minute,1],[Ie.minute,5],[Ie.minute,15],[Ie.minute,30],[Ie.hour,1],[Ie.hour,3],[Ie.hour,6],[Ie.hour,12],[Ie.day,1],[Ie.day,2],[Ie.week,1],[Ie.month,1],[Ie.month,3],[Ie.year,1]],Rs=Cs.multi([[\\\".%L\\\",function(t){return t.getMilliseconds()}],[\\\":%S\\\",function(t){return t.getSeconds()}],[\\\"%I:%M\\\",function(t){return t.getMinutes()}],[\\\"%I %p\\\",function(t){return t.getHours()}],[\\\"%a %d\\\",function(t){return t.getDay()&&1!=t.getDate()}],[\\\"%b %d\\\",function(t){return 1!=t.getDate()}],[\\\"%B\\\",function(t){return t.getMonth()}],[\\\"%Y\\\",Wr]]),Bs={range:function(e,r,n){return t.range(Math.ceil(e/n)*n,+r,n).map(Is)},floor:z,ceil:z};Ds.year=Ie.year,Ie.scale=function(){return Os(t.scale.linear(),Ds,Rs)};var Fs=Ds.map(function(t){return[t[0].utc,t[1]]}),Ns=Es.multi([[\\\".%L\\\",function(t){return t.getUTCMilliseconds()}],[\\\":%S\\\",function(t){return t.getUTCSeconds()}],[\\\"%I:%M\\\",function(t){return t.getUTCMinutes()}],[\\\"%I %p\\\",function(t){return t.getUTCHours()}],[\\\"%a %d\\\",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],[\\\"%b %d\\\",function(t){return 1!=t.getUTCDate()}],[\\\"%B\\\",function(t){return t.getUTCMonth()}],[\\\"%Y\\\",Wr]]);function js(t){return JSON.parse(t.responseText)}function Vs(t){var e=i.createRange();return e.selectNode(i.body),e.createContextualFragment(t.responseText)}Fs.year=Ie.year.utc,Ie.scale.utc=function(){return Os(t.scale.linear(),Fs,Ns)},t.text=me(function(t){return t.responseText}),t.json=function(t,e){return ye(t,\\\"application/json\\\",js,e)},t.html=function(t,e){return ye(t,\\\"text/html\\\",Vs,e)},t.xml=me(function(t){return t.responseXML}),\\\"object\\\"==typeof e&&e.exports?e.exports=t:this.d3=t}()},{}],149:[function(t,e,r){e.exports=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}},{}],150:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"incremental-convex-hull\\\"),i=t(\\\"uniq\\\");function a(t,e){this.point=t,this.index=e}function o(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a<i;++a){var o=n[a]-r[a];if(o)return o}return 0}e.exports=function(t,e){var r=t.length;if(0===r)return[];var s=t[0].length;if(s<1)return[];if(1===s)return function(t,e,r){if(1===t)return r?[[-1,0]]:[];var n=e.map(function(t,e){return[t[0],e]});n.sort(function(t,e){return t[0]-e[0]});for(var i=new Array(t-1),a=1;a<t;++a){var o=n[a-1],s=n[a];i[a-1]=[o[1],s[1]]}r&&i.push([-1,i[0][1]],[i[t-1][1],-1]);return i}(r,t,e);for(var l=new Array(r),c=1,u=0;u<r;++u){for(var f=t[u],h=new Array(s+1),p=0,d=0;d<s;++d){var g=f[d];h[d]=g,p+=g*g}h[s]=p,l[u]=new a(h,u),c=Math.max(p,c)}i(l,o),r=l.length;for(var v=new Array(r+s+1),m=new Array(r+s+1),y=(s+1)*(s+1)*c,x=new Array(s+1),u=0;u<=s;++u)x[u]=0;x[s]=y,v[0]=x.slice(),m[0]=-1;for(var u=0;u<=s;++u){var h=x.slice();h[u]=1,v[u+1]=h,m[u+1]=-1}for(var u=0;u<r;++u){var b=l[u];v[u+s+1]=b.point,m[u+s+1]=b.index}var _=n(v,!1);_=e?_.filter(function(t){for(var e=0,r=0;r<=s;++r){var n=m[t[r]];if(n<0&&++e>=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e<=s;++e){var r=m[t[e]];if(r<0)return!1;t[e]=r}return!0});if(1&s)for(var u=0;u<_.length;++u){var b=_[u],h=b[0];b[0]=b[1],b[1]=h}return _}},{\\\"incremental-convex-hull\\\":396,uniq:524}],151:[function(t,e,r){\\\"use strict\\\";e.exports=a;var n=(a.canvas=document.createElement(\\\"canvas\\\")).getContext(\\\"2d\\\"),i=o([32,126]);function a(t,e){Array.isArray(t)&&(t=t.join(\\\", \\\"));var r,a={},s=16,l=.05;e&&(2===e.length&&\\\"number\\\"==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&&(r=e.pairs),e.fontSize&&(s=e.fontSize),null!=e.threshold&&(l=e.threshold))),r||(r=i),n.font=s+\\\"px \\\"+t;for(var c=0;c<r.length;c++){var u=r[c],f=n.measureText(u[0]).width+n.measureText(u[1]).width,h=n.measureText(u).width;if(Math.abs(f-h)>s*l){var p=(h-f)/s;a[u]=1e3*p}}return a}function o(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i<t[1];i++){var a=n+String.fromCharCode(i);e.push(a)}return e}a.createPairs=o,a.ascii=i},{}],152:[function(t,e,r){(function(t){var r=!1;if(\\\"undefined\\\"!=typeof Float64Array){var n=new Float64Array(1),i=new Uint32Array(n.buffer);if(n[0]=1,r=!0,1072693248===i[1]){e.exports=function(t){return n[0]=t,[i[0],i[1]]},e.exports.pack=function(t,e){return i[0]=t,i[1]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[0]},e.exports.hi=function(t){return n[0]=t,i[1]}}else if(1072693248===i[0]){e.exports=function(t){return n[0]=t,[i[1],i[0]]},e.exports.pack=function(t,e){return i[1]=t,i[0]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[1]},e.exports.hi=function(t){return n[0]=t,i[0]}}else r=!1}if(!r){var a=new t(8);e.exports=function(t){return a.writeDoubleLE(t,0,!0),[a.readUInt32LE(0,!0),a.readUInt32LE(4,!0)]},e.exports.pack=function(t,e){return a.writeUInt32LE(t,0,!0),a.writeUInt32LE(e,4,!0),a.readDoubleLE(0,!0)},e.exports.lo=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(0,!0)},e.exports.hi=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t(\\\"buffer\\\").Buffer)},{buffer:93}],153:[function(t,e,r){var n=t(\\\"abs-svg-path\\\"),i=t(\\\"normalize-svg-path\\\"),a={M:\\\"moveTo\\\",C:\\\"bezierCurveTo\\\"};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)}),t.closePath()}},{\\\"abs-svg-path\\\":48,\\\"normalize-svg-path\\\":435}],154:[function(t,e,r){e.exports=function(t){switch(t){case\\\"int8\\\":return Int8Array;case\\\"int16\\\":return Int16Array;case\\\"int32\\\":return Int32Array;case\\\"uint8\\\":return Uint8Array;case\\\"uint16\\\":return Uint16Array;case\\\"uint32\\\":return Uint32Array;case\\\"float32\\\":return Float32Array;case\\\"float64\\\":return Float64Array;case\\\"array\\\":return Array;case\\\"uint8_clamped\\\":return Uint8ClampedArray}}},{}],155:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){switch(\\\"undefined\\\"==typeof e&&(e=0),typeof t){case\\\"number\\\":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n<t;++n)r[n]=e;return r}(0|t,e);break;case\\\"object\\\":if(\\\"number\\\"==typeof t.length)return function t(e,r,n){var i=0|e[n];if(i<=0)return[];var a,o=new Array(i);if(n===e.length-1)for(a=0;a<i;++a)o[a]=r;else for(a=0;a<i;++a)o[a]=t(e,r,n+1);return o}(t,e,0)}return[]}},{}],156:[function(t,e,r){\\\"use strict\\\";function n(t,e,r){r=r||2;var n,s,l,c,u,p,g,v=e&&e.length,m=v?e[0]*r:t.length,y=i(t,0,m,r,!0),x=[];if(!y)return x;if(v&&(y=function(t,e,r,n){var o,s,l,c,u,p=[];for(o=0,s=e.length;o<s;o++)l=e[o]*n,c=o<s-1?e[o+1]*n:t.length,(u=i(t,l,c,n,!1))===u.next&&(u.steiner=!0),p.push(d(u));for(p.sort(f),o=0;o<p.length;o++)h(p[o],r),r=a(r,r.next);return r}(t,e,y,r)),t.length>80*r){n=l=t[0],s=c=t[1];for(var b=r;b<m;b+=r)(u=t[b])<n&&(n=u),(p=t[b+1])<s&&(s=p),u>l&&(l=u),p>c&&(c=p);g=0!==(g=Math.max(l-n,c-s))?1/g:0}return o(y,x,r,n,s,g),x}function i(t,e,r,n,i){var a,o;if(i===A(t,e,r,n)>0)for(a=e;a<r;a+=n)o=w(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=w(a,t[a],t[a+1],o);return o&&y(o,o.next)&&(k(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,f,h){if(t){!h&&f&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<c&&(s++,n=n.nextZ);e++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,f);for(var d,g,v=t;t.prev!==t.next;)if(d=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(d.i/r),e.push(t.i/r),e.push(g.i/r),k(t),t=g.next,v=g.next;else if((t=g)===v){h?1===h?o(t=c(t,e,r),e,r,n,i,f,2):2===h&&u(t,e,r,n,i,f):o(a(t),e,r,n,i,f,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(m(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(g(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&m(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(m(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,c=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=p(s,l,e,r,n),h=p(c,u,e,r,n),d=t.prevZ,v=t.nextZ;d&&d.z>=f&&v&&v.z<=h;){if(d!==t.prev&&d!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,v!==t.prev&&v!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;d&&d.z>=f;){if(d!==t.prev&&d!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=h;){if(v!==t.prev&&v!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!y(i,a)&&x(i,n,n.next,a)&&b(i,a)&&b(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),k(n),k(n.next),n=t=a),n=n.next}while(n!==t);return n}function u(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=_(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,c=r,u=r.x,f=r.y,h=1/0;n=r.next;for(;n!==c;)i>=n.x&&n.x>=u&&i!==n.x&&g(a<f?i:o,a,u,f,a<f?o:i,a,n.x,n.y)&&((l=Math.abs(a-n.y)/(i-n.x))<h||l===h&&n.x>r.x)&&b(n,t)&&(r=n,h=l),n=n.next;return r}(t,e)){var r=_(e,t);a(r,r.next)}}function p(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function g(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&b(t,e)&&b(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function m(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,r,n){return!!(y(t,e)&&y(r,n)||y(t,n)&&y(r,e))||m(t,e,r)>0!=m(t,e,n)>0&&m(r,n,t)>0!=m(r,n,e)>0}function b(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function _(t,e){var r=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function w(t,e,r,n){var i=new M(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}e.exports=n,e.exports.default=n,n.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(A(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var c=e[s]*r,u=s<l-1?e[s+1]*r:t.length;o-=Math.abs(A(t,c,u,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],157:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=t.length;if(\\\"number\\\"!=typeof e){e=0;for(var i=0;i<r;++i){var a=t[i];e=Math.max(e,a[0],a[1])}e=1+(0|e)}e|=0;for(var o=new Array(e),i=0;i<e;++i)o[i]=[];for(var i=0;i<r;++i){var a=t[i];o[a[0]].push(a[1]),o[a[1]].push(a[0])}for(var s=0;s<e;++s)n(o[s],function(t,e){return t-e});return o};var n=t(\\\"uniq\\\")},{uniq:524}],158:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../object/valid-value\\\");e.exports=function(){return n(this).length=0,this}},{\\\"../../object/valid-value\\\":190}],159:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Array.from:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":160,\\\"./shim\\\":161}],160:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t,e,r=Array.from;return\\\"function\\\"==typeof r&&(e=r(t=[\\\"raz\\\",\\\"dwa\\\"]),Boolean(e&&e!==t&&\\\"dwa\\\"===e[1]))}},{}],161:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es6-symbol\\\").iterator,i=t(\\\"../../function/is-arguments\\\"),a=t(\\\"../../function/is-function\\\"),o=t(\\\"../../number/to-pos-integer\\\"),s=t(\\\"../../object/valid-callable\\\"),l=t(\\\"../../object/valid-value\\\"),c=t(\\\"../../object/is-value\\\"),u=t(\\\"../../string/is-string\\\"),f=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;e.exports=function(t){var e,r,g,v,m,y,x,b,_,w,k=arguments[1],M=arguments[2];if(t=Object(l(t)),c(k)&&s(k),this&&this!==Array&&a(this))e=this;else{if(!k){if(i(t))return 1!==(m=t.length)?Array.apply(null,t):((v=new Array(1))[0]=t[0],v);if(f(t)){for(v=new Array(m=t.length),r=0;r<m;++r)v[r]=t[r];return v}}v=[]}if(!f(t))if(void 0!==(_=t[n])){for(x=s(_).call(t),e&&(v=new e),b=x.next(),r=0;!b.done;)w=k?h.call(k,M,b.value,r):b.value,e?(p.value=w,d(v,r,p)):v[r]=w,b=x.next(),++r;m=r}else if(u(t)){for(m=t.length,e&&(v=new e),r=0,g=0;r<m;++r)w=t[r],r+1<m&&(y=w.charCodeAt(0))>=55296&&y<=56319&&(w+=t[++r]),w=k?h.call(k,M,w,g):w,e?(p.value=w,d(v,g,p)):v[g]=w,++g;m=g}if(void 0===m)for(m=o(t.length),e&&(v=new e(m)),r=0;r<m;++r)w=k?h.call(k,M,t[r],r):t[r],e?(p.value=w,d(v,r,p)):v[r]=w;return e&&(p.value=null,v.length=m),v}},{\\\"../../function/is-arguments\\\":162,\\\"../../function/is-function\\\":163,\\\"../../number/to-pos-integer\\\":169,\\\"../../object/is-value\\\":179,\\\"../../object/valid-callable\\\":188,\\\"../../object/valid-value\\\":190,\\\"../../string/is-string\\\":194,\\\"es6-symbol\\\":204}],162:[function(t,e,r){\\\"use strict\\\";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(t){return n.call(t)===i}},{}],163:[function(t,e,r){\\\"use strict\\\";var n=Object.prototype.toString,i=n.call(t(\\\"./noop\\\"));e.exports=function(t){return\\\"function\\\"==typeof t&&n.call(t)===i}},{\\\"./noop\\\":164}],164:[function(t,e,r){\\\"use strict\\\";e.exports=function(){}},{}],165:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Math.sign:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":166,\\\"./shim\\\":167}],166:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t=Math.sign;return\\\"function\\\"==typeof t&&(1===t(10)&&-1===t(-20))}},{}],167:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},{}],168:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../math/sign\\\"),i=Math.abs,a=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*a(i(t)):t}},{\\\"../math/sign\\\":165}],169:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./to-integer\\\"),i=Math.max;e.exports=function(t){return i(0,n(t))}},{\\\"./to-integer\\\":168}],170:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./valid-callable\\\"),i=t(\\\"./valid-value\\\"),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,c){var u,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),u=s(r),h&&u.sort(\\\"function\\\"==typeof h?a.call(h,r):void 0),\\\"function\\\"!=typeof t&&(t=u[t]),o.call(t,u,function(t,n){return l.call(r,t)?o.call(c,f,r[t],t,r,n):e})}}},{\\\"./valid-callable\\\":188,\\\"./valid-value\\\":190}],171:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Object.assign:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":172,\\\"./shim\\\":173}],172:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t,e=Object.assign;return\\\"function\\\"==typeof e&&(e(t={foo:\\\"raz\\\"},{bar:\\\"dwa\\\"},{trzy:\\\"trzy\\\"}),t.foo+t.bar+t.trzy===\\\"razdwatrzy\\\")}},{}],173:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../keys\\\"),i=t(\\\"../valid-value\\\"),a=Math.max;e.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o<l;++o)e=arguments[o],n(e).forEach(s);if(void 0!==r)throw r;return t}},{\\\"../keys\\\":180,\\\"../valid-value\\\":190}],174:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../array/from\\\"),i=t(\\\"./assign\\\"),a=t(\\\"./valid-value\\\");e.exports=function(t){var e=Object(a(t)),r=arguments[1],o=Object(arguments[2]);if(e!==t&&!r)return e;var s={};return r?n(r,function(e){(o.ensure||e in t)&&(s[e]=t[e])}):i(s,t),s}},{\\\"../array/from\\\":159,\\\"./assign\\\":171,\\\"./valid-value\\\":190}],175:[function(t,e,r){\\\"use strict\\\";var n,i,a,o,s=Object.create;t(\\\"./set-prototype-of/is-implemented\\\")()||(n=t(\\\"./set-prototype-of/shim\\\")),e.exports=n?1!==n.level?s:(i={},a={},o={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){a[t]=\\\"__proto__\\\"!==t?o:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(i,a),Object.defineProperty(n,\\\"nullPolyfill\\\",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},{\\\"./set-prototype-of/is-implemented\\\":186,\\\"./set-prototype-of/shim\\\":187}],176:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./_iterate\\\")(\\\"forEach\\\")},{\\\"./_iterate\\\":170}],177:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return\\\"function\\\"==typeof t}},{}],178:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-value\\\"),i={function:!0,object:!0};e.exports=function(t){return n(t)&&i[typeof t]||!1}},{\\\"./is-value\\\":179}],179:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../function/noop\\\")();e.exports=function(t){return t!==n&&null!==t}},{\\\"../function/noop\\\":164}],180:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Object.keys:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":181,\\\"./shim\\\":182}],181:[function(t,e,r){\\\"use strict\\\";e.exports=function(){try{return Object.keys(\\\"primitive\\\"),!0}catch(t){return!1}}},{}],182:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../is-value\\\"),i=Object.keys;e.exports=function(t){return i(n(t)?Object(t):t)}},{\\\"../is-value\\\":179}],183:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./valid-callable\\\"),i=t(\\\"./for-each\\\"),a=Function.prototype.call;e.exports=function(t,e){var r={},o=arguments[2];return n(e),i(t,function(t,n,i,s){r[n]=a.call(e,o,t,n,i,s)}),r}},{\\\"./for-each\\\":176,\\\"./valid-callable\\\":188}],184:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-value\\\"),i=Array.prototype.forEach,a=Object.create;e.exports=function(t){var e=a(null);return i.call(arguments,function(t){n(t)&&function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)}),e}},{\\\"./is-value\\\":179}],185:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Object.setPrototypeOf:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":186,\\\"./shim\\\":187}],186:[function(t,e,r){\\\"use strict\\\";var n=Object.create,i=Object.getPrototypeOf,a={};e.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||n;return\\\"function\\\"==typeof t&&i(t(e(null),a))===a}},{}],187:[function(t,e,r){\\\"use strict\\\";var n,i,a,o,s=t(\\\"../is-object\\\"),l=t(\\\"../valid-value\\\"),c=Object.prototype.isPrototypeOf,u=Object.defineProperty,f={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError(\\\"Prototype must be null or an object\\\")},e.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,\\\"__proto__\\\");if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}())?(2===i.level?i.set?(o=i.set,a=function(t,e){return o.call(n(t,e),e),t}):a=function(t,e){return n(t,e).__proto__=e,t}:a=function t(e,r){var i;return n(e,r),(i=c.call(t.nullPolyfill,e))&&delete t.nullPolyfill.__proto__,null===r&&(r=t.nullPolyfill),e.__proto__=r,i&&u(t.nullPolyfill,\\\"__proto__\\\",f),e},Object.defineProperty(a,\\\"level\\\",{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null,t(\\\"../create\\\")},{\\\"../create\\\":175,\\\"../is-object\\\":178,\\\"../valid-value\\\":190}],188:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){if(\\\"function\\\"!=typeof t)throw new TypeError(t+\\\" is not a function\\\");return t}},{}],189:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-object\\\");e.exports=function(t){if(!n(t))throw new TypeError(t+\\\" is not an Object\\\");return t}},{\\\"./is-object\\\":178}],190:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-value\\\");e.exports=function(t){if(!n(t))throw new TypeError(\\\"Cannot use null or undefined\\\");return t}},{\\\"./is-value\\\":179}],191:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?String.prototype.contains:t(\\\"./shim\\\")},{\\\"./is-implemented\\\":192,\\\"./shim\\\":193}],192:[function(t,e,r){\\\"use strict\\\";var n=\\\"razdwatrzy\\\";e.exports=function(){return\\\"function\\\"==typeof n.contains&&(!0===n.contains(\\\"dwa\\\")&&!1===n.contains(\\\"foo\\\"))}},{}],193:[function(t,e,r){\\\"use strict\\\";var n=String.prototype.indexOf;e.exports=function(t){return n.call(this,t,arguments[1])>-1}},{}],194:[function(t,e,r){\\\"use strict\\\";var n=Object.prototype.toString,i=n.call(\\\"\\\");e.exports=function(t){return\\\"string\\\"==typeof t||t&&\\\"object\\\"==typeof t&&(t instanceof String||n.call(t)===i)||!1}},{}],195:[function(t,e,r){\\\"use strict\\\";var n=Object.create(null),i=Math.random;e.exports=function(){var t;do{t=i().toString(36).slice(2)}while(n[t]);return t}},{}],196:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/object/set-prototype-of\\\"),a=t(\\\"es5-ext/string/#/contains\\\"),o=t(\\\"d\\\"),s=t(\\\"es6-symbol\\\"),l=t(\\\"./\\\"),c=Object.defineProperty;n=e.exports=function(t,e){if(!(this instanceof n))throw new TypeError(\\\"Constructor requires 'new'\\\");l.call(this,t),e=e?a.call(e,\\\"key+value\\\")?\\\"key+value\\\":a.call(e,\\\"key\\\")?\\\"key\\\":\\\"value\\\":\\\"value\\\",c(this,\\\"__kind__\\\",o(\\\"\\\",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o(function(t){return\\\"value\\\"===this.__kind__?this.__list__[t]:\\\"key+value\\\"===this.__kind__?[t,this.__list__[t]]:t})}),c(n.prototype,s.toStringTag,o(\\\"c\\\",\\\"Array Iterator\\\"))},{\\\"./\\\":199,d:139,\\\"es5-ext/object/set-prototype-of\\\":185,\\\"es5-ext/string/#/contains\\\":191,\\\"es6-symbol\\\":204}],197:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es5-ext/function/is-arguments\\\"),i=t(\\\"es5-ext/object/valid-callable\\\"),a=t(\\\"es5-ext/string/is-string\\\"),o=t(\\\"./get\\\"),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(t,e){var r,u,f,h,p,d,g,v,m=arguments[2];if(s(t)||n(t)?r=\\\"array\\\":a(t)?r=\\\"string\\\":t=o(t),i(e),f=function(){h=!0},\\\"array\\\"!==r)if(\\\"string\\\"!==r)for(u=t.next();!u.done;){if(l.call(e,m,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p<d&&(g=t[p],p+1<d&&(v=g.charCodeAt(0))>=55296&&v<=56319&&(g+=t[++p]),l.call(e,m,g,f),!h);++p);else c.call(t,function(t){return l.call(e,m,t,f),h})}},{\\\"./get\\\":198,\\\"es5-ext/function/is-arguments\\\":162,\\\"es5-ext/object/valid-callable\\\":188,\\\"es5-ext/string/is-string\\\":194}],198:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es5-ext/function/is-arguments\\\"),i=t(\\\"es5-ext/string/is-string\\\"),a=t(\\\"./array\\\"),o=t(\\\"./string\\\"),s=t(\\\"./valid-iterable\\\"),l=t(\\\"es6-symbol\\\").iterator;e.exports=function(t){return\\\"function\\\"==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},{\\\"./array\\\":196,\\\"./string\\\":201,\\\"./valid-iterable\\\":202,\\\"es5-ext/function/is-arguments\\\":162,\\\"es5-ext/string/is-string\\\":194,\\\"es6-symbol\\\":204}],199:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/array/#/clear\\\"),a=t(\\\"es5-ext/object/assign\\\"),o=t(\\\"es5-ext/object/valid-callable\\\"),s=t(\\\"es5-ext/object/valid-value\\\"),l=t(\\\"d\\\"),c=t(\\\"d/auto-bind\\\"),u=t(\\\"es6-symbol\\\"),f=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError(\\\"Constructor requires 'new'\\\");h(this,{__list__:l(\\\"w\\\",s(t)),__context__:l(\\\"w\\\",e),__nextIndex__:l(\\\"w\\\",0)}),e&&(o(e.on),e.on(\\\"_add\\\",this._onAdd),e.on(\\\"_delete\\\",this._onDelete),e.on(\\\"_clear\\\",this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l(function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:l(function(){return this._createResult(this._next())}),_createResult:l(function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}}),_resolve:l(function(t){return this.__list__[t]}),_unBind:l(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off(\\\"_add\\\",this._onAdd),this.__context__.off(\\\"_delete\\\",this._onDelete),this.__context__.off(\\\"_clear\\\",this._onClear),this.__context__=null)}),toString:l(function(){return\\\"[object \\\"+(this[u.toStringTag]||\\\"Object\\\")+\\\"]\\\"})},c({_onAdd:l(function(t){t>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(e,r){e>=t&&(this.__redo__[r]=++e)},this),this.__redo__.push(t)):f(this,\\\"__redo__\\\",l(\\\"c\\\",[t])))}),_onDelete:l(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,r){e>t&&(this.__redo__[r]=--e)},this)))}),_onClear:l(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),f(n.prototype,u.iterator,l(function(){return this}))},{d:139,\\\"d/auto-bind\\\":138,\\\"es5-ext/array/#/clear\\\":158,\\\"es5-ext/object/assign\\\":171,\\\"es5-ext/object/valid-callable\\\":188,\\\"es5-ext/object/valid-value\\\":190,\\\"es6-symbol\\\":204}],200:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"es5-ext/function/is-arguments\\\"),i=t(\\\"es5-ext/object/is-value\\\"),a=t(\\\"es5-ext/string/is-string\\\"),o=t(\\\"es6-symbol\\\").iterator,s=Array.isArray;e.exports=function(t){return!!i(t)&&(!!s(t)||(!!a(t)||(!!n(t)||\\\"function\\\"==typeof t[o])))}},{\\\"es5-ext/function/is-arguments\\\":162,\\\"es5-ext/object/is-value\\\":179,\\\"es5-ext/string/is-string\\\":194,\\\"es6-symbol\\\":204}],201:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/object/set-prototype-of\\\"),a=t(\\\"d\\\"),o=t(\\\"es6-symbol\\\"),s=t(\\\"./\\\"),l=Object.defineProperty;n=e.exports=function(t){if(!(this instanceof n))throw new TypeError(\\\"Constructor requires 'new'\\\");t=String(t),s.call(this,t),l(this,\\\"__length__\\\",a(\\\"\\\",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:a(function(t){var e,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(e=r.charCodeAt(0))>=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r})}),l(n.prototype,o.toStringTag,a(\\\"c\\\",\\\"String Iterator\\\"))},{\\\"./\\\":199,d:139,\\\"es5-ext/object/set-prototype-of\\\":185,\\\"es6-symbol\\\":204}],202:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-iterable\\\");e.exports=function(t){if(!n(t))throw new TypeError(t+\\\" is not iterable\\\");return t}},{\\\"./is-iterable\\\":200}],203:[function(t,e,r){(function(n,i){!function(t,n){\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?e.exports=n():t.ES6Promise=n()}(this,function(){\\\"use strict\\\";function e(t){return\\\"function\\\"==typeof t}var r=Array.isArray?Array.isArray:function(t){return\\\"[object Array]\\\"===Object.prototype.toString.call(t)},a=0,o=void 0,s=void 0,l=function(t,e){g[a]=t,g[a+1]=e,2===(a+=2)&&(s?s(v):_())};var c=\\\"undefined\\\"!=typeof window?window:void 0,u=c||{},f=u.MutationObserver||u.WebKitMutationObserver,h=\\\"undefined\\\"==typeof self&&\\\"undefined\\\"!=typeof n&&\\\"[object process]\\\"==={}.toString.call(n),p=\\\"undefined\\\"!=typeof Uint8ClampedArray&&\\\"undefined\\\"!=typeof importScripts&&\\\"undefined\\\"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(v,1)}}var g=new Array(1e3);function v(){for(var t=0;t<a;t+=2){(0,g[t])(g[t+1]),g[t]=void 0,g[t+1]=void 0}a=0}var m,y,x,b,_=void 0;function w(t,e){var r=arguments,n=this,i=new this.constructor(A);void 0===i[M]&&U(i);var a,o=n._state;return o?(a=r[o-1],l(function(){return j(o,i,a,n._result)})):R(n,i,t,e),i}function k(t){if(t&&\\\"object\\\"==typeof t&&t.constructor===this)return t;var e=new this(A);return O(e,t),e}h?_=function(){return n.nextTick(v)}:f?(y=0,x=new f(v),b=document.createTextNode(\\\"\\\"),x.observe(b,{characterData:!0}),_=function(){b.data=y=++y%2}):p?((m=new MessageChannel).port1.onmessage=v,_=function(){return m.port2.postMessage(0)}):_=void 0===c&&\\\"function\\\"==typeof t?function(){try{var e=t(\\\"vertx\\\");return o=e.runOnLoop||e.runOnContext,function(){o(v)}}catch(t){return d()}}():d();var M=Math.random().toString(36).substring(16);function A(){}var T=void 0,S=1,C=2,E=new F;function L(t){try{return t.then}catch(t){return E.error=t,E}}function z(t,r,n){r.constructor===t.constructor&&n===w&&r.constructor.resolve===k?function(t,e){e._state===S?P(t,e._result):e._state===C?D(t,e._result):R(e,void 0,function(e){return O(t,e)},function(e){return D(t,e)})}(t,r):n===E?D(t,E.error):void 0===n?P(t,r):e(n)?function(t,e,r){l(function(t){var n=!1,i=function(t,e,r,n){try{t.call(e,r,n)}catch(t){return t}}(r,e,function(r){n||(n=!0,e!==r?O(t,r):P(t,r))},function(e){n||(n=!0,D(t,e))},t._label);!n&&i&&(n=!0,D(t,i))},t)}(t,r,n):P(t,r)}function O(t,e){var r;t===e?D(t,new TypeError(\\\"You cannot resolve a promise with itself\\\")):\\\"function\\\"==typeof(r=e)||\\\"object\\\"==typeof r&&null!==r?z(t,e,L(e)):P(t,e)}function I(t){t._onerror&&t._onerror(t._result),B(t)}function P(t,e){t._state===T&&(t._result=e,t._state=S,0!==t._subscribers.length&&l(B,t))}function D(t,e){t._state===T&&(t._state=C,t._result=e,l(I,t))}function R(t,e,r,n){var i=t._subscribers,a=i.length;t._onerror=null,i[a]=e,i[a+S]=r,i[a+C]=n,0===a&&t._state&&l(B,t)}function B(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n=void 0,i=void 0,a=t._result,o=0;o<e.length;o+=3)n=e[o],i=e[o+r],n?j(r,n,i,a):i(a);t._subscribers.length=0}}function F(){this.error=null}var N=new F;function j(t,r,n,i){var a=e(n),o=void 0,s=void 0,l=void 0,c=void 0;if(a){if((o=function(t,e){try{return t(e)}catch(t){return N.error=t,N}}(n,i))===N?(c=!0,s=o.error,o=null):l=!0,r===o)return void D(r,new TypeError(\\\"A promises callback cannot return that same promise.\\\"))}else o=i,l=!0;r._state!==T||(a&&l?O(r,o):c?D(r,s):t===S?P(r,o):t===C&&D(r,o))}var V=0;function U(t){t[M]=V++,t._state=void 0,t._result=void 0,t._subscribers=[]}function q(t,e){this._instanceConstructor=t,this.promise=new t(A),this.promise[M]||U(this.promise),r(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?P(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&P(this.promise,this._result))):D(this.promise,new Error(\\\"Array Methods must be provided an Array\\\"))}function H(t){this[M]=V++,this._result=this._state=void 0,this._subscribers=[],A!==t&&(\\\"function\\\"!=typeof t&&function(){throw new TypeError(\\\"You must pass a resolver function as the first argument to the promise constructor\\\")}(),this instanceof H?function(t,e){try{e(function(e){O(t,e)},function(e){D(t,e)})}catch(e){D(t,e)}}(this,t):function(){throw new TypeError(\\\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\\\")}())}function G(){var t=void 0;if(\\\"undefined\\\"!=typeof i)t=i;else if(\\\"undefined\\\"!=typeof self)t=self;else try{t=Function(\\\"return this\\\")()}catch(t){throw new Error(\\\"polyfill failed because global object is unavailable in this environment\\\")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if(\\\"[object Promise]\\\"===r&&!e.cast)return}t.Promise=H}return q.prototype._enumerate=function(){for(var t=this.length,e=this._input,r=0;this._state===T&&r<t;r++)this._eachEntry(e[r],r)},q.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===k){var i=L(t);if(i===w&&t._state!==T)this._settledAt(t._state,e,t._result);else if(\\\"function\\\"!=typeof i)this._remaining--,this._result[e]=t;else if(r===H){var a=new r(A);z(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},q.prototype._settledAt=function(t,e,r){var n=this.promise;n._state===T&&(this._remaining--,t===C?D(n,r):this._result[e]=r),0===this._remaining&&P(n,this._result)},q.prototype._willSettleAt=function(t,e){var r=this;R(t,void 0,function(t){return r._settledAt(S,e,t)},function(t){return r._settledAt(C,e,t)})},H.all=function(t){return new q(this,t).promise},H.race=function(t){var e=this;return r(t)?new e(function(r,n){for(var i=t.length,a=0;a<i;a++)e.resolve(t[a]).then(r,n)}):new e(function(t,e){return e(new TypeError(\\\"You must pass an array to race.\\\"))})},H.resolve=k,H.reject=function(t){var e=new this(A);return D(e,t),e},H._setScheduler=function(t){s=t},H._setAsap=function(t){l=t},H._asap=l,H.prototype={constructor:H,then:w,catch:function(t){return this.then(null,t)}},G(),H.polyfill=G,H.Promise=H,H})}).call(this,t(\\\"_process\\\"),\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{_process:465}],204:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?Symbol:t(\\\"./polyfill\\\")},{\\\"./is-implemented\\\":205,\\\"./polyfill\\\":207}],205:[function(t,e,r){\\\"use strict\\\";var n={object:!0,symbol:!0};e.exports=function(){var t;if(\\\"function\\\"!=typeof Symbol)return!1;t=Symbol(\\\"test symbol\\\");try{String(t)}catch(t){return!1}return!!n[typeof Symbol.iterator]&&(!!n[typeof Symbol.toPrimitive]&&!!n[typeof Symbol.toStringTag])}},{}],206:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return!!t&&(\\\"symbol\\\"==typeof t||!!t.constructor&&(\\\"Symbol\\\"===t.constructor.name&&\\\"Symbol\\\"===t[t.constructor.toStringTag]))}},{}],207:[function(t,e,r){\\\"use strict\\\";var n,i,a,o,s=t(\\\"d\\\"),l=t(\\\"./validate-symbol\\\"),c=Object.create,u=Object.defineProperties,f=Object.defineProperty,h=Object.prototype,p=c(null);if(\\\"function\\\"==typeof Symbol){n=Symbol;try{String(n()),o=!0}catch(t){}}var d,g=(d=c(null),function(t){for(var e,r,n=0;d[t+(n||\\\"\\\")];)++n;return d[t+=n||\\\"\\\"]=!0,f(h,e=\\\"@@\\\"+t,s.gs(null,function(t){r||(r=!0,f(this,e,s(t)),r=!1)})),e});a=function(t){if(this instanceof a)throw new TypeError(\\\"Symbol is not a constructor\\\");return i(t)},e.exports=i=function t(e){var r;if(this instanceof t)throw new TypeError(\\\"Symbol is not a constructor\\\");return o?n(e):(r=c(a.prototype),e=void 0===e?\\\"\\\":String(e),u(r,{__description__:s(\\\"\\\",e),__name__:s(\\\"\\\",g(e))}))},u(i,{for:s(function(t){return p[t]?p[t]:p[t]=i(String(t))}),keyFor:s(function(t){var e;for(e in l(t),p)if(p[e]===t)return e}),hasInstance:s(\\\"\\\",n&&n.hasInstance||i(\\\"hasInstance\\\")),isConcatSpreadable:s(\\\"\\\",n&&n.isConcatSpreadable||i(\\\"isConcatSpreadable\\\")),iterator:s(\\\"\\\",n&&n.iterator||i(\\\"iterator\\\")),match:s(\\\"\\\",n&&n.match||i(\\\"match\\\")),replace:s(\\\"\\\",n&&n.replace||i(\\\"replace\\\")),search:s(\\\"\\\",n&&n.search||i(\\\"search\\\")),species:s(\\\"\\\",n&&n.species||i(\\\"species\\\")),split:s(\\\"\\\",n&&n.split||i(\\\"split\\\")),toPrimitive:s(\\\"\\\",n&&n.toPrimitive||i(\\\"toPrimitive\\\")),toStringTag:s(\\\"\\\",n&&n.toStringTag||i(\\\"toStringTag\\\")),unscopables:s(\\\"\\\",n&&n.unscopables||i(\\\"unscopables\\\"))}),u(a.prototype,{constructor:s(i),toString:s(\\\"\\\",function(){return this.__name__})}),u(i.prototype,{toString:s(function(){return\\\"Symbol (\\\"+l(this).__description__+\\\")\\\"}),valueOf:s(function(){return l(this)})}),f(i.prototype,i.toPrimitive,s(\\\"\\\",function(){var t=l(this);return\\\"symbol\\\"==typeof t?t:t.toString()})),f(i.prototype,i.toStringTag,s(\\\"c\\\",\\\"Symbol\\\")),f(a.prototype,i.toStringTag,s(\\\"c\\\",i.prototype[i.toStringTag])),f(a.prototype,i.toPrimitive,s(\\\"c\\\",i.prototype[i.toPrimitive]))},{\\\"./validate-symbol\\\":208,d:139}],208:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is-symbol\\\");e.exports=function(t){if(!n(t))throw new TypeError(t+\\\" is not a symbol\\\");return t}},{\\\"./is-symbol\\\":206}],209:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./is-implemented\\\")()?WeakMap:t(\\\"./polyfill\\\")},{\\\"./is-implemented\\\":210,\\\"./polyfill\\\":212}],210:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t,e;if(\\\"function\\\"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},\\\"one\\\"],[{},\\\"two\\\"],[{},\\\"three\\\"]])}catch(t){return!1}return\\\"[object WeakMap]\\\"===String(t)&&(\\\"function\\\"==typeof t.set&&(t.set({},1)===t&&(\\\"function\\\"==typeof t.delete&&(\\\"function\\\"==typeof t.has&&\\\"one\\\"===t.get(e)))))}},{}],211:[function(t,e,r){\\\"use strict\\\";e.exports=\\\"function\\\"==typeof WeakMap&&\\\"[object WeakMap]\\\"===Object.prototype.toString.call(new WeakMap)},{}],212:[function(t,e,r){\\\"use strict\\\";var n,i=t(\\\"es5-ext/object/set-prototype-of\\\"),a=t(\\\"es5-ext/object/valid-object\\\"),o=t(\\\"es5-ext/object/valid-value\\\"),s=t(\\\"es5-ext/string/random-uniq\\\"),l=t(\\\"d\\\"),c=t(\\\"es6-iterator/get\\\"),u=t(\\\"es6-iterator/for-of\\\"),f=t(\\\"es6-symbol\\\").toStringTag,h=t(\\\"./is-native-implemented\\\"),p=Array.isArray,d=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError(\\\"Constructor requires 'new'\\\");return t=h&&i&&WeakMap!==n?i(new WeakMap,v(this)):this,null!=e&&(p(e)||(e=c(e))),d(t,\\\"__weakMapData__\\\",l(\\\"c\\\",\\\"$weakMap$\\\"+s())),e?(u(e,function(e){o(e),t.set(e[0],e[1])}),t):t},h&&(i&&i(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:l(n)})),Object.defineProperties(n.prototype,{delete:l(function(t){return!!g.call(a(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:l(function(t){if(g.call(a(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:l(function(t){return g.call(a(t),this.__weakMapData__)}),set:l(function(t,e){return d(a(t),this.__weakMapData__,l(\\\"c\\\",e)),this}),toString:l(function(){return\\\"[object WeakMap]\\\"})}),d(n.prototype,f,l(\\\"c\\\",\\\"WeakMap\\\"))},{\\\"./is-native-implemented\\\":211,d:139,\\\"es5-ext/object/set-prototype-of\\\":185,\\\"es5-ext/object/valid-object\\\":189,\\\"es5-ext/object/valid-value\\\":190,\\\"es5-ext/string/random-uniq\\\":195,\\\"es6-iterator/for-of\\\":197,\\\"es6-iterator/get\\\":198,\\\"es6-symbol\\\":204}],213:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}},{}],214:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"is-string-blank\\\");e.exports=function(t){var e=typeof t;if(\\\"string\\\"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if(\\\"number\\\"!==e)return!1;return t-t<1}},{\\\"is-string-blank\\\":406}],215:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){switch(arguments.length){case 0:return new o([0],[0],0);case 1:if(\\\"number\\\"==typeof t){var n=l(t);return new o(n,n,0)}return new o(t,l(t.length),0);case 2:if(\\\"number\\\"==typeof e){var n=l(t.length);return new o(t,n,+e)}r=0;case 3:if(t.length!==e.length)throw new Error(\\\"state and velocity lengths must match\\\");return new o(t,e,r)}};var n=t(\\\"cubic-hermite\\\"),i=t(\\\"binary-search-bounds\\\");function a(t,e,r){return Math.min(e,Math.max(t,r))}function o(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n<this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=t.slice().reverse(),this._velocity=e.slice().reverse(),this._time=[r],this._scratch=[t.slice(),t.slice(),t.slice(),t.slice(),t.slice()]}var s=o.prototype;function l(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=0;return e}s.flush=function(t){var e=i.gt(this._time,t)-1;e<=0||(this._time.splice(0,e),this._state.splice(0,e*this.dimension),this._velocity.splice(0,e*this.dimension))},s.curve=function(t){var e=this._time,r=e.length,o=i.le(e,t),s=this._scratch[0],l=this._state,c=this._velocity,u=this.dimension,f=this.bounds;if(o<0)for(var h=u-1,p=0;p<u;++p,--h)s[p]=l[h];else if(o>=r-1){h=l.length-1;var d=t-e[r-1];for(p=0;p<u;++p,--h)s[p]=l[h]+d*c[h]}else{h=u*(o+1)-1;var g=e[o],v=e[o+1]-g||1,m=this._scratch[1],y=this._scratch[2],x=this._scratch[3],b=this._scratch[4],_=!0;for(p=0;p<u;++p,--h)m[p]=l[h],x[p]=c[h]*v,y[p]=l[h+u],b[p]=c[h+u]*v,_=_&&m[p]===y[p]&&x[p]===b[p]&&0===x[p];if(_)for(p=0;p<u;++p)s[p]=m[p];else n(m,x,y,b,(t-g)/v,s)}var w=f[0],k=f[1];for(p=0;p<u;++p)s[p]=a(w[p],k[p],s[p]);return s},s.dcurve=function(t){var e=this._time,r=e.length,a=i.le(e,t),o=this._scratch[0],s=this._state,l=this._velocity,c=this.dimension;if(a>=r-1)for(var u=s.length-1,f=(e[r-1],0);f<c;++f,--u)o[f]=l[u];else{u=c*(a+1)-1;var h=e[a],p=e[a+1]-h||1,d=this._scratch[1],g=this._scratch[2],v=this._scratch[3],m=this._scratch[4],y=!0;for(f=0;f<c;++f,--u)d[f]=s[u],v[f]=l[u]*p,g[f]=s[u+c],m[f]=l[u+c]*p,y=y&&d[f]===g[f]&&v[f]===m[f]&&0===v[f];if(y)for(f=0;f<c;++f)o[f]=0;else{n.derivative(d,v,g,m,(t-h)/p,o);for(f=0;f<c;++f)o[f]/=p}}return o},s.lastT=function(){var t=this._time;return t[t.length-1]},s.stable=function(){for(var t=this._velocity,e=t.length,r=this.dimension-1;r>=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t<e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1];this._time.push(e,t);for(var u=0;u<2;++u)for(var f=0;f<r;++f)n.push(n[o++]),i.push(0);this._time.push(t);for(f=r;f>0;--f)n.push(a(l[f-1],c[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t<e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=t-e,l=this.bounds,c=l[0],u=l[1],f=s>1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var p=a(c[h-1],u[h-1],arguments[h]);n.push(p),i.push((p-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t<this.lastT()||arguments.length!==e+1)){var r=this._state,n=this._velocity,i=this.bounds,o=i[0],s=i[1];this._time.push(t);for(var l=e;l>0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,f=u>1e-6?1/u:0;this._time.push(t);for(var h=r;h>0;--h){var p=arguments[h];n.push(a(l[h-1],c[h-1],n[o++]+p)),i.push(p*f)}}},s.idle=function(t){var e=this.lastT();if(!(t<e)){var r=this.dimension,n=this._state,i=this._velocity,o=n.length-r,s=this.bounds,l=s[0],c=s[1],u=t-e;this._time.push(t);for(var f=r-1;f>=0;--f)n.push(a(l[f],c[f],n[o]+u*i[o])),i.push(0),o+=1}}},{\\\"binary-search-bounds\\\":79,\\\"cubic-hermite\\\":133}],216:[function(t,e,r){var n=t(\\\"dtype\\\");e.exports=function(t,e,r){if(!t)throw new TypeError(\\\"must specify data as first parameter\\\");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&\\\"number\\\"==typeof t[0][0]){var i,a,o,s,l=t[0].length,c=t.length*l;e&&\\\"string\\\"!=typeof e||(e=new(n(e||\\\"float32\\\"))(c+r));var u=e.length-r;if(c!==u)throw new Error(\\\"source length \\\"+c+\\\" (\\\"+l+\\\"x\\\"+t.length+\\\") does not match destination length \\\"+u);for(i=0,o=r;i<t.length;i++)for(a=0;a<l;a++)e[o++]=null===t[i][a]?NaN:t[i][a]}else if(e&&\\\"string\\\"!=typeof e)e.set(t,r);else{var f=n(e||\\\"float32\\\");if(Array.isArray(t)||\\\"array\\\"===e)for(e=new f(t.length+r),i=0,o=r,s=e.length;o<s;o++,i++)e[o]=null===t[i]?NaN:t[i];else 0===r?e=new f(t):(e=new f(t.length+r)).set(t,r)}return e}},{dtype:154}],217:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"css-font/stringify\\\"),i=[32,126];e.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement(\\\"canvas\\\"),a=t.font,o=\\\"number\\\"==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;a&&\\\"string\\\"!=typeof a&&(a=n(a));if(Array.isArray(s)){if(2===s.length&&\\\"number\\\"==typeof s[0]&&\\\"number\\\"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split(\\\"\\\");e=e.slice(),r.width=e[0],r.height=e[1];var f=r.getContext(\\\"2d\\\");f.fillStyle=\\\"#000\\\",f.fillRect(0,0,r.width,r.height),f.font=a,f.textAlign=\\\"center\\\",f.textBaseline=\\\"middle\\\",f.fillStyle=\\\"#fff\\\";for(var h=o[0]/2,p=o[1]/2,c=0;c<s.length;c++)f.fillText(s[c],h,p),(h+=o[0])>e[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{\\\"css-font/stringify\\\":130}],218:[function(t,e,r){\\\"use strict\\\";function n(t,e){e||(e={}),(\\\"string\\\"==typeof t||Array.isArray(t))&&(e.family=t);var r=Array.isArray(e.family)?e.family.join(\\\", \\\"):e.family;if(!r)throw Error(\\\"`family` must be defined\\\");var s=e.size||e.fontSize||e.em||48,l=e.weight||e.fontWeight||\\\"\\\",c=(t=[e.style||e.fontStyle||\\\"\\\",l,s].join(\\\" \\\")+\\\"px \\\"+r,e.origin||\\\"top\\\");if(n.cache[r]&&s<=n.cache[r].em)return i(n.cache[r],c);var u=e.canvas||n.canvas,f=u.getContext(\\\"2d\\\"),h={upper:void 0!==e.upper?e.upper:\\\"H\\\",lower:void 0!==e.lower?e.lower:\\\"x\\\",descent:void 0!==e.descent?e.descent:\\\"p\\\",ascent:void 0!==e.ascent?e.ascent:\\\"h\\\",tittle:void 0!==e.tittle?e.tittle:\\\"i\\\",overshoot:void 0!==e.overshoot?e.overshoot:\\\"O\\\"},p=Math.ceil(1.5*s);u.height=p,u.width=.5*p,f.font=t;var d={top:0};f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillStyle=\\\"black\\\",f.fillText(\\\"H\\\",0,0);var g=a(f.getImageData(0,0,p,p));f.clearRect(0,0,p,p),f.textBaseline=\\\"bottom\\\",f.fillText(\\\"H\\\",0,p);var v=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-v+g,f.clearRect(0,0,p,p),f.textBaseline=\\\"alphabetic\\\",f.fillText(\\\"H\\\",0,p);var m=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=m,f.clearRect(0,0,p,p),f.textBaseline=\\\"middle\\\",f.fillText(\\\"H\\\",0,.5*p);var y=a(f.getImageData(0,0,p,p));d.median=d.middle=p-y-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline=\\\"hanging\\\",f.fillText(\\\"H\\\",0,.5*p);var x=a(f.getImageData(0,0,p,p));d.hanging=p-x-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline=\\\"ideographic\\\",f.fillText(\\\"H\\\",0,p);var b=a(f.getImageData(0,0,p,p));if(d.ideographic=p-b-1+g,h.upper&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.upper,0,0),d.upper=a(f.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),h.lower&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.lower,0,0),d.lower=a(f.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),h.tittle&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.tittle,0,0),d.tittle=a(f.getImageData(0,0,p,p))),h.ascent&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.ascent,0,0),d.ascent=a(f.getImageData(0,0,p,p))),h.descent&&(f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.descent,0,0),d.descent=o(f.getImageData(0,0,p,p))),h.overshoot){f.clearRect(0,0,p,p),f.textBaseline=\\\"top\\\",f.fillText(h.overshoot,0,0);var _=o(f.getImageData(0,0,p,p));d.overshoot=_-m}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,i(d,c)}function i(t,e){var r={};for(var n in\\\"string\\\"==typeof e&&(e=t[e]),t)\\\"em\\\"!==n&&(r[n]=t[n]-e);return r}function a(t){for(var e=t.height,r=t.data,n=3;n<r.length;n+=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}function o(t){for(var e=t.height,r=t.data,n=r.length-1;n>0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(\\\"canvas\\\"),n.cache={}},{}],219:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return new c(t||d,null)};var n=0,i=1;function a(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function o(t){return new a(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new a(t,e.key,e.value,e.left,e.right,e._count)}function l(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function c(t,e){this._compare=t,this.root=e}var u=c.prototype;function f(t,e){this.tree=t,this._stack=e}Object.defineProperty(u,\\\"keys\\\",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(u,\\\"values\\\",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(u,\\\"length\\\",{get:function(){return this.root?this.root._count:0}}),u.insert=function(t,e){for(var r=this._compare,o=this.root,u=[],f=[];o;){var h=r(t,o.key);u.push(o),f.push(h),o=h<=0?o.left:o.right}u.push(new a(n,t,e,null,null,1));for(var p=u.length-2;p>=0;--p){o=u[p];f[p]<=0?u[p]=new a(o._color,o.key,o.value,u[p+1],o.right,o._count+1):u[p]=new a(o._color,o.key,o.value,o.left,u[p+1],o._count+1)}for(p=u.length-1;p>1;--p){var d=u[p-1];o=u[p];if(d._color===i||o._color===i)break;var g=u[p-2];if(g.left===d)if(d.left===o){if(!(v=g.right)||v._color!==n){if(g._color=n,g.left=d.right,d._color=i,d.right=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).left===g?m.left=d:m.right=d;break}d._color=i,g.right=s(i,v),g._color=n,p-=1}else{if(!(v=g.right)||v._color!==n){if(d.right=o.left,g._color=n,g.left=o.right,o._color=i,o.left=d,o.right=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).left===g?m.left=o:m.right=o;break}d._color=i,g.right=s(i,v),g._color=n,p-=1}else if(d.right===o){if(!(v=g.left)||v._color!==n){if(g._color=n,g.right=d.left,d._color=i,d.left=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).right===g?m.right=d:m.left=d;break}d._color=i,g.left=s(i,v),g._color=n,p-=1}else{var v;if(!(v=g.left)||v._color!==n){var m;if(d.left=o.right,g._color=n,g.right=o.left,o._color=i,o.right=d,o.left=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).right===g?m.right=o:m.left=o;break}d._color=i,g.left=s(i,v),g._color=n,p-=1}}return u[0]._color=i,new c(r,u[0])},u.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return function t(e,r){var n;if(r.left&&(n=t(e,r.left)))return n;return(n=e(r.key,r.value))||(r.right?t(e,r.right):void 0)}(t,this.root);case 2:return function t(e,r,n,i){if(r(e,i.key)<=0){var a;if(i.left&&(a=t(e,r,n,i.left)))return a;if(a=n(i.key,i.value))return a}if(i.right)return t(e,r,n,i.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return function t(e,r,n,i,a){var o,s=n(e,a.key),l=n(r,a.key);if(s<=0){if(a.left&&(o=t(e,r,n,i,a.left)))return o;if(l>0&&(o=i(a.key,a.value)))return o}if(l>0&&a.right)return t(e,r,n,i,a.right)}(e,r,this._compare,t,this.root)}},Object.defineProperty(u,\\\"begin\\\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new f(this,t)}}),Object.defineProperty(u,\\\"end\\\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new f(this,t)}}),u.at=function(t){if(t<0)return new f(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t<e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new f(this,r);if(t-=1,!e.right)break;if(t>=e.right._count)break;e=e.right}return new f(this,[])},u.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new f(this,n)},u.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new f(this,n)},u.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new f(this,n)},u.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new f(this,n)},u.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new f(this,n);r=i<=0?r.left:r.right}return new f(this,[])},u.remove=function(t){var e=this.find(t);return e?e.remove():this},u.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var h=f.prototype;function p(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return t<e?-1:t>e?1:0}Object.defineProperty(h,\\\"valid\\\",{get:function(){return this._stack.length>0}}),Object.defineProperty(h,\\\"node\\\",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new f(this.tree,this._stack.slice())},h.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new a(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=t.length-2;u>=0;--u){(r=t[u]).left===t[u+1]?e[u]=new a(r._color,r.key,r.value,e[u+1],r.right,r._count):e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count)}if((r=e[e.length-1]).left&&r.right){var f=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var h=e[f-1];e.push(new a(r._color,h.key,h.value,r.left,r.right,r._count)),e[f-1].key=r.key,e[f-1].value=r.value;for(u=e.length-2;u>=f;--u)r=e[u],e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count);e[f-1].left=e[f]}if((r=e[e.length-1])._color===n){var d=e[e.length-2];d.left===r?d.left=null:d.right===r&&(d.right=null),e.pop();for(u=0;u<e.length;++u)e[u]._count--;return new c(this.tree._compare,e[0])}if(r.left||r.right){r.left?p(r,r.left):r.right&&p(r,r.right),r._color=i;for(u=0;u<e.length-1;++u)e[u]._count--;return new c(this.tree._compare,e[0])}if(1===e.length)return new c(this.tree._compare,null);for(u=0;u<e.length;++u)e[u]._count--;var g=e[e.length-2];return function(t){for(var e,r,a,c,u=t.length-1;u>=0;--u){if(e=t[u],0===u)return void(e._color=i);if((r=t[u-1]).left===e){if((a=r.right).right&&a.right._color===n)return c=(a=r.right=o(a)).right=o(a.right),r.right=a.left,a.left=r,a.right=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u>1&&((f=t[u-2]).left===r?f.left=a:f.right=a),void(t[u-1]=a);if(a.left&&a.left._color===n)return c=(a=r.right=o(a)).left=o(a.left),r.right=c.left,a.left=c.right,c.left=r,c.right=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u>1&&((f=t[u-2]).left===r?f.left=c:f.right=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.right=s(n,a));r.right=s(n,a);continue}a=o(a),r.right=a.left,a.left=r,a._color=r._color,r._color=n,l(r),l(a),u>1&&((f=t[u-2]).left===r?f.left=a:f.right=a),t[u-1]=a,t[u]=r,u+1<t.length?t[u+1]=e:t.push(e),u+=2}else{if((a=r.left).left&&a.left._color===n)return c=(a=r.left=o(a)).left=o(a.left),r.left=a.right,a.right=r,a.left=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u>1&&((f=t[u-2]).right===r?f.right=a:f.left=a),void(t[u-1]=a);if(a.right&&a.right._color===n)return c=(a=r.left=o(a)).right=o(a.right),r.left=c.right,a.right=c.left,c.right=r,c.left=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u>1&&((f=t[u-2]).right===r?f.right=c:f.left=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.left=s(n,a));r.left=s(n,a);continue}var f;a=o(a),r.left=a.right,a.right=r,a._color=r._color,r._color=n,l(r),l(a),u>1&&((f=t[u-2]).right===r?f.right=a:f.left=a),t[u-1]=a,t[u]=r,u+1<t.length?t[u+1]=e:t.push(e),u+=2}}}(e),g.left===r?g.left=null:g.right=null,new c(this.tree._compare,e[0])},Object.defineProperty(h,\\\"key\\\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,\\\"value\\\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,\\\"index\\\",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),h.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,\\\"hasNext\\\",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),h.update=function(t){var e=this._stack;if(0===e.length)throw new Error(\\\"Can't update empty node!\\\");var r=new Array(e.length),n=e[e.length-1];r[r.length-1]=new a(n._color,n.key,t,n.left,n.right,n._count);for(var i=e.length-2;i>=0;--i)(n=e[i]).left===e[i+1]?r[i]=new a(n._color,n.key,n.value,r[i+1],n.right,n._count):r[i]=new a(n._color,n.key,n.value,n.left,r[i+1],n._count);return new c(this.tree._compare,r[0])},h.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,\\\"hasPrev\\\",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],220:[function(t,e,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],i=607/128,a=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t<0)return Number(\\\"0/0\\\");for(var e=a[0],r=a.length-1;r>0;--r)e+=a[r]/(t+r);var n=t+i+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(o(e));e-=1;for(var r=n[0],i=1;i<9;i++)r+=n[i]/(e+i);var a=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(a,e+.5)*Math.exp(-a)*r},e.exports.log=o},{}],221:[function(t,e,r){e.exports=function(t,e){if(\\\"string\\\"!=typeof t)throw new TypeError(\\\"must specify type string\\\");if(e=e||{},\\\"undefined\\\"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement(\\\"canvas\\\");\\\"number\\\"==typeof e.width&&(r.width=e.width);\\\"number\\\"==typeof e.height&&(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf(\\\"webgl\\\")&&a.push(\\\"experimental-\\\"+t);for(var o=0;o<a.length;o++)if(n=r.getContext(a[o],i))return n}catch(t){n=null}return n||null}},{}],222:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=new u(t);return r.update(e),r};var n=t(\\\"./lib/text.js\\\"),i=t(\\\"./lib/lines.js\\\"),a=t(\\\"./lib/background.js\\\"),o=t(\\\"./lib/cube.js\\\"),s=t(\\\"./lib/ticks.js\\\"),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=[\\\"sans-serif\\\",\\\"sans-serif\\\",\\\"sans-serif\\\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this._tickAlign=[\\\"auto\\\",\\\"auto\\\",\\\"auto\\\"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=[\\\"x\\\",\\\"y\\\",\\\"z\\\"],this.labelEnable=[!0,!0,!0],this.labelFont=\\\"sans-serif\\\",this.labelSize=[20,20,20],this._labelAngle=[0,0,0],this._labelAlign=[\\\"auto\\\",\\\"auto\\\",\\\"auto\\\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(t)}var f=u.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,a=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),c=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),u=!1,f=!1;if(\\\"bounds\\\"in t)for(var h=t.bounds,p=0;p<2;++p)for(var d=0;d<3;++d)h[p][d]!==this.bounds[p][d]&&(f=!0),this.bounds[p][d]=h[p][d];if(\\\"ticks\\\"in t){r=t.ticks,u=!0,this.autoTicks=!1;for(p=0;p<3;++p)this.tickSpacing[p]=0}else a(\\\"tickSpacing\\\")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&(\\\"ticks\\\"in t||\\\"tickSpacing\\\"in t||(this.autoTicks=!0),f=!0,u=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(p=0;p<3;++p)r[p].sort(function(t,e){return t.x-e.x});s.equal(r,this.ticks)?u=!1:this.ticks=r}o(\\\"tickEnable\\\"),l(\\\"tickFont\\\")&&(u=!0),a(\\\"tickSize\\\"),a(\\\"tickAngle\\\"),a(\\\"tickPad\\\"),c(\\\"tickColor\\\");var g=l(\\\"labels\\\");l(\\\"labelFont\\\")&&(g=!0),o(\\\"labelEnable\\\"),a(\\\"labelSize\\\"),a(\\\"labelPad\\\"),c(\\\"labelColor\\\"),o(\\\"lineEnable\\\"),o(\\\"lineMirror\\\"),a(\\\"lineWidth\\\"),c(\\\"lineColor\\\"),o(\\\"lineTickEnable\\\"),o(\\\"lineTickMirror\\\"),a(\\\"lineTickLength\\\"),a(\\\"lineTickWidth\\\"),c(\\\"lineTickColor\\\"),o(\\\"gridEnable\\\"),a(\\\"gridWidth\\\"),c(\\\"gridColor\\\"),o(\\\"zeroEnable\\\"),c(\\\"zeroLineColor\\\"),a(\\\"zeroLineWidth\\\"),o(\\\"backgroundEnable\\\"),c(\\\"backgroundColor\\\"),this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var p=[new h,new h,new h];function d(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],u=0;u<3;++u)if(e!==u){var f=a,h=s,p=o,d=l;c&1<<u&&(f=s,h=a,p=l,d=o),f[u]=r[0][u],h[u]=r[1][u],i[u]>0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var g=[0,0,0],v={model:l,view:l,projection:l};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var m=[0,0,0],y=[0,0,0],x=[0,0,0];f.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=o(r,n,i,a),u=s.cubeEdges,f=s.axis,h=n[12],b=n[13],_=n[14],w=n[15],k=this.pixelRatio*(i[3]*h+i[7]*b+i[11]*_+i[15]*w)/e.drawingBufferHeight,M=0;M<3;++M)this.lastCubeProps.cubeEdges[M]=u[M],this.lastCubeProps.axis[M]=f[M];var A=p;for(M=0;M<3;++M)d(p[M],M,this.bounds,u,f);e=this.gl;var T,S=g;for(M=0;M<3;++M)this.backgroundEnable[M]?S[M]=f[M]:S[M]=0;this._background.draw(r,n,i,a,S,this.backgroundColor),this._lines.bind(r,n,i,this);for(M=0;M<3;++M){var C=[0,0,0];f[M]>0?C[M]=a[1][M]:C[M]=a[0][M];for(var E=0;E<2;++E){var L=(M+1+E)%3,z=(M+1+(1^E))%3;this.gridEnable[L]&&this._lines.drawGrid(L,z,this.bounds,C,this.gridColor[L],this.gridWidth[L]*this.pixelRatio)}for(E=0;E<2;++E){L=(M+1+E)%3,z=(M+1+(1^E))%3;this.zeroEnable[z]&&Math.min(a[0][z],a[1][z])<=0&&Math.max(a[0][z],a[1][z])>=0&&this._lines.drawZero(L,z,this.bounds,C,this.zeroLineColor[z],this.zeroLineWidth[z]*this.pixelRatio)}}for(M=0;M<3;++M){this.lineEnable[M]&&this._lines.drawAxisLine(M,this.bounds,A[M].primalOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio),this.lineMirror[M]&&this._lines.drawAxisLine(M,this.bounds,A[M].mirrorOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio);var O=c(m,A[M].primalMinor),I=c(y,A[M].mirrorMinor),P=this.lineTickLength;for(E=0;E<3;++E){var D=k/r[5*E];O[E]*=P[E]*D,I[E]*=P[E]*D}this.lineTickEnable[M]&&this._lines.drawAxisTicks(M,A[M].primalOffset,O,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio),this.lineTickMirror[M]&&this._lines.drawAxisTicks(M,A[M].mirrorOffset,I,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio);var R,B;function F(t){(B=[0,0,0])[t]=1}function N(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];a>0&&l>0?F(n):a>0&&l<0?F(n):a<0&&l>0?F(n):a<0&&l<0?F(n):o>0&&s>0?F(i):o>0&&s<0?F(i):o<0&&s>0?F(i):o<0&&s<0&&F(i)}for(M=0;M<3;++M){var j=A[M].primalMinor,V=A[M].mirrorMinor,U=c(x,A[M].primalOffset);for(E=0;E<3;++E)this.lineTickEnable[M]&&(U[E]+=k*j[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);var q=[0,0,0];if(q[M]=1,this.tickEnable[M]){-3600===this.tickAngle[M]?(this.tickAngle[M]=0,this._tickAlign[M]=\\\"auto\\\"):this._tickAlign[M]=-1,R=1,\\\"auto\\\"===(T=[this._tickAlign[M],.5,R])[0]?T[0]=0:T[0]=parseInt(\\\"\\\"+T[0]),B=[0,0,0],N(M,j,V);for(E=0;E<3;++E)U[E]+=k*j[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(M,this.tickSize[M],this.tickAngle[M],U,this.tickColor[M],q,B,T)}if(this.labelEnable[M]){R=0,B=[0,0,0],this.labels[M].length>4&&(F(M),R=1),\\\"auto\\\"===(T=[this._labelAlign[M],.5,R])[0]?T[0]=0:T[0]=parseInt(\\\"\\\"+T[0]);for(E=0;E<3;++E)U[E]+=k*j[E]*this.labelPad[E]/r[5*E];U[M]+=.5*(a[0][M]+a[1][M]),this._text.drawLabel(M,this.labelSize[M],this._labelAngle[M],U,this.labelColor[M],[0,0,0],B,T)}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{\\\"./lib/background.js\\\":223,\\\"./lib/cube.js\\\":224,\\\"./lib/lines.js\\\":225,\\\"./lib/text.js\\\":227,\\\"./lib/ticks.js\\\":228}],223:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,f=[0,0,0],h=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=p,h[l]=p;for(var d=-1;d<=1;d+=2){f[c]=d;for(var g=-1;g<=1;g+=2)f[u]=g,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var v=c;c=u,u=v}var m=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:m,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:m,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,m,x,b)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"./shaders\\\").bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":226,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310}],224:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,a){i(s,e,t),i(s,r,s);for(var p=0,y=0;y<2;++y){u[2]=a[y][2];for(var x=0;x<2;++x){u[1]=a[x][1];for(var b=0;b<2;++b)u[0]=a[b][0],h(l[p],u,s),p+=1}}for(var _=-1,y=0;y<8;++y){for(var w=l[y][3],k=0;k<3;++k)c[y][k]=l[y][k]/w;w<0&&(_<0?_=y:c[y][2]<c[_][2]&&(_=y))}if(_<0){_=0;for(var M=0;M<3;++M){for(var A=(M+2)%3,T=(M+1)%3,S=-1,C=-1,E=0;E<2;++E){var L=E<<M,z=L+(E<<A)+(1-E<<T),O=L+(1-E<<A)+(E<<T);o(c[L],c[z],c[O],f)<0||(E?S=1:C=1)}if(S<0||C<0)C>S&&(_|=1<<M);else{for(var E=0;E<2;++E){var L=E<<M,z=L+(E<<A)+(1-E<<T),O=L+(1-E<<A)+(E<<T),I=d([l[L],l[z],l[O],l[L+(1<<A)+(1<<T)]]);E?S=I:C=I}C>S&&(_|=1<<M)}}}for(var P=7^_,D=-1,y=0;y<8;++y)y!==_&&y!==P&&(D<0?D=y:c[D][1]>c[y][1]&&(D=y));for(var R=-1,y=0;y<3;++y){var B=D^1<<y;if(B!==_&&B!==P){R<0&&(R=B);var T=c[B];T[0]<c[R][0]&&(R=B)}}for(var F=-1,y=0;y<3;++y){var B=D^1<<y;if(B!==_&&B!==P&&B!==R){F<0&&(F=B);var T=c[B];T[0]>c[F][0]&&(F=B)}}var N=g;N[0]=N[1]=N[2]=0,N[n.log2(R^D)]=D&R,N[n.log2(D^F)]=D&F;var j=7^F;j===_||j===P?(j=7^R,N[n.log2(F^j)]=j&F):N[n.log2(R^j)]=j&R;for(var V=v,U=_,M=0;M<3;++M)V[M]=U&1<<M?-1:1;return m};var n=t(\\\"bit-twiddle\\\"),i=t(\\\"gl-mat4/multiply\\\"),a=(t(\\\"gl-mat4/invert\\\"),t(\\\"split-polygon\\\")),o=t(\\\"robust-orientation\\\"),s=new Array(16),l=(new Array(16),new Array(8)),c=new Array(8),u=new Array(3),f=[0,0,0];function h(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}!function(){for(var t=0;t<8;++t)l[t]=[1,1,1,1],c[t]=[1,1,1]}();var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(t){for(var e=0;e<p.length;++e)if((t=a.positive(t,p[e])).length<3)return 0;var r=t[0],n=r[0]/r[3],i=r[1]/r[3],o=0;for(e=1;e+1<t.length;++e){var s=t[e],l=t[e+1],c=s[0]/s[3]-n,u=s[1]/s[3]-i,f=l[0]/l[3]-n,h=l[1]/l[3]-i;o+=Math.abs(c*h-u*f)}return o}var g=[1,1,1],v=[0,0,0],m={cubeEdges:g,axis:v}},{\\\"bit-twiddle\\\":80,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"robust-orientation\\\":486,\\\"split-polygon\\\":503}],225:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var o=[],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[0,0,0];o.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var f=0;f<3;++f){for(var h=o.length/3|0,d=0;d<r[f].length;++d){var g=+r[f][d].x;o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var v=o.length/3|0;s[f]=h,l[f]=v-h;for(var h=o.length/3|0,m=0;m<r[f].length;++m){var g=+r[f][m].x;o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var v=o.length/3|0;c[f]=h,u[f]=v-h}var y=n(t,new Float32Array(o)),x=i(t,[{buffer:y,type:t.FLOAT,size:3,stride:0,offset:0}]),b=a(t);return b.attributes.position.location=0,new p(t,y,x,b,l,s,u,c)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"./shaders\\\").line,o=[0,0,0],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[1,1];function f(t){return t[0]=t[1]=t[2]=0,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function p(t,e,r,n,i,a,o,s){this.gl=t,this.vertBuffer=e,this.vao=r,this.shader=n,this.tickCount=i,this.tickOffset=a,this.gridCount=o,this.gridOffset=s}var d=p.prototype;d.bind=function(t,e,r){this.shader.bind(),this.shader.uniforms.model=t,this.shader.uniforms.view=e,this.shader.uniforms.projection=r,u[0]=this.gl.drawingBufferWidth,u[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=u,this.vao.bind()},d.unbind=function(){this.vao.unbind()},d.drawAxisLine=function(t,e,r,n,i){var a=f(s);this.shader.uniforms.majorAxis=s,a[t]=e[1][t]-e[0][t],this.shader.uniforms.minorAxis=a;var o,u=h(c,r);u[t]+=e[0][t],this.shader.uniforms.offset=u,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=n,(o=f(l))[(t+2)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6),(o=f(l))[(t+1)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6)},d.drawAxisTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=f(o);a[t]=1,this.shader.uniforms.majorAxis=a,this.shader.uniforms.offset=e,this.shader.uniforms.minorAxis=r,this.shader.uniforms.color=n,this.shader.uniforms.lineWidth=i;var s=f(l);s[t]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}},d.drawGrid=function(t,e,r,n,i,a){if(this.gridCount[t]){var u=f(s);u[e]=r[1][e]-r[0][e],this.shader.uniforms.minorAxis=u;var p=h(c,n);p[e]+=r[0][e],this.shader.uniforms.offset=p;var d=f(o);d[t]=1,this.shader.uniforms.majorAxis=d;var g=f(l);g[t]=1,this.shader.uniforms.screenAxis=g,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,this.gridCount[t],this.gridOffset[t])}},d.drawZero=function(t,e,r,n,i,a){var o=f(s);this.shader.uniforms.majorAxis=o,o[t]=r[1][t]-r[0][t],this.shader.uniforms.minorAxis=o;var u=h(c,n);u[t]+=r[0][t],this.shader.uniforms.offset=u;var p=f(l);p[e]=1,this.shader.uniforms.screenAxis=p,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,6)},d.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":226,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310}],226:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"#define GLSLIFY 1\\\\nattribute vec3 position;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\\\\nuniform float lineWidth;\\\\nuniform vec2 screenShape;\\\\n\\\\nvec3 project(vec3 p) {\\\\n  vec4 pp = projection * view * model * vec4(p, 1.0);\\\\n  return pp.xyz / max(pp.w, 0.0001);\\\\n}\\\\n\\\\nvoid main() {\\\\n  vec3 major = position.x * majorAxis;\\\\n  vec3 minor = position.y * minorAxis;\\\\n\\\\n  vec3 vPosition = major + minor + offset;\\\\n  vec3 pPosition = project(vPosition);\\\\n  vec3 offset = project(vPosition + screenAxis * position.z);\\\\n\\\\n  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\\\\n\\\\n  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\\\\n}\\\\n\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\nuniform vec4 color;\\\\nvoid main() {\\\\n  gl_FragColor = color;\\\\n}\\\"]);r.line=function(t){return i(t,a,o,null,[{name:\\\"position\\\",type:\\\"vec3\\\"}])};var s=n([\\\"#define GLSLIFY 1\\\\nattribute vec3 position;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 offset, axis, alignDir, alignOpt;\\\\nuniform float scale, angle, pixelScale;\\\\nuniform vec2 resolution;\\\\n\\\\nvec3 project(vec3 p) {\\\\n  vec4 pp = projection * view * model * vec4(p, 1.0);\\\\n  return pp.xyz / max(pp.w, 0.0001);\\\\n}\\\\n\\\\nfloat computeViewAngle(vec3 a, vec3 b) {\\\\n  vec3 A = project(a);\\\\n  vec3 B = project(b);\\\\n\\\\n  return atan(\\\\n    (B.y - A.y) * resolution.y,\\\\n    (B.x - A.x) * resolution.x\\\\n  );\\\\n}\\\\n\\\\nconst float PI = 3.141592;\\\\nconst float TWO_PI = 2.0 * PI;\\\\nconst float HALF_PI = 0.5 * PI;\\\\nconst float ONE_AND_HALF_PI = 1.5 * PI;\\\\n\\\\nint option = int(floor(alignOpt.x + 0.001));\\\\nfloat hv_ratio =       alignOpt.y;\\\\nbool enableAlign =    (alignOpt.z != 0.0);\\\\n\\\\nfloat mod_angle(float a) {\\\\n  return mod(a, PI);\\\\n}\\\\n\\\\nfloat positive_angle(float a) {\\\\n  return mod_angle((a < 0.0) ?\\\\n    a + TWO_PI :\\\\n    a\\\\n  );\\\\n}\\\\n\\\\nfloat look_upwards(float a) {\\\\n  float b = positive_angle(a);\\\\n  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\\\\n    b - PI :\\\\n    b;\\\\n}\\\\n\\\\nfloat look_horizontal_or_vertical(float a, float ratio) {\\\\n  // ratio controls the ratio between being horizontal to (vertical + horizontal)\\\\n  // if ratio is set to 0.5 then it is 50%, 50%.\\\\n  // when using a higher ratio e.g. 0.75 the result would\\\\n  // likely be more horizontal than vertical.\\\\n\\\\n  float b = positive_angle(a);\\\\n\\\\n  return\\\\n    (b < (      ratio) * HALF_PI) ? 0.0 :\\\\n    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\\\\n    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\\\\n    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\\\\n                                    0.0;\\\\n}\\\\n\\\\nfloat roundTo(float a, float b) {\\\\n  return float(b * floor((a + 0.5 * b) / b));\\\\n}\\\\n\\\\nfloat look_round_n_directions(float a, int n) {\\\\n  float b = positive_angle(a);\\\\n  float div = TWO_PI / float(n);\\\\n  float c = roundTo(b, div);\\\\n  return look_upwards(c);\\\\n}\\\\n\\\\nfloat applyAlignOption(float rawAngle, float delta) {\\\\n  return\\\\n    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions\\\\n    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\\\\n    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis\\\\n    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\\\\n    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal\\\\n                    rawAngle;                // otherwise return back raw input angle\\\\n}\\\\n\\\\nbool isAxisTitle = (axis.x == 0.0) &&\\\\n                   (axis.y == 0.0) &&\\\\n                   (axis.z == 0.0);\\\\n\\\\nvoid main() {\\\\n  //Compute world offset\\\\n  float axisDistance = position.z;\\\\n  vec3 dataPosition = axisDistance * axis + offset;\\\\n\\\\n  float beta = angle; // i.e. user defined attributes for each tick\\\\n\\\\n  float axisAngle;\\\\n  float clipAngle;\\\\n  float flip;\\\\n\\\\n  if (enableAlign) {\\\\n    axisAngle = (isAxisTitle) ? HALF_PI :\\\\n                      computeViewAngle(dataPosition, dataPosition + axis);\\\\n    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\\\\n\\\\n    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\\\\n    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\\\\n\\\\n    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\\\\n                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\\\\n\\\\n    beta += applyAlignOption(clipAngle, flip * PI);\\\\n  }\\\\n\\\\n  //Compute plane offset\\\\n  vec2 planeCoord = position.xy * pixelScale;\\\\n\\\\n  mat2 planeXform = scale * mat2(\\\\n     cos(beta), sin(beta),\\\\n    -sin(beta), cos(beta)\\\\n  );\\\\n\\\\n  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\\\\n\\\\n  //Compute clip position\\\\n  vec3 clipPosition = project(dataPosition);\\\\n\\\\n  //Apply text offset in clip coordinates\\\\n  clipPosition += vec3(viewOffset, 0.0);\\\\n\\\\n  //Done\\\\n  gl_Position = vec4(clipPosition, 1.0);\\\\n}\\\"]),l=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\nuniform vec4 color;\\\\nvoid main() {\\\\n  gl_FragColor = color;\\\\n}\\\"]);r.text=function(t){return i(t,s,l,null,[{name:\\\"position\\\",type:\\\"vec3\\\"}])};var c=n([\\\"#define GLSLIFY 1\\\\nattribute vec3 position;\\\\nattribute vec3 normal;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 enable;\\\\nuniform vec3 bounds[2];\\\\n\\\\nvarying vec3 colorChannel;\\\\n\\\\nvoid main() {\\\\n\\\\n  vec3 signAxis = sign(bounds[1] - bounds[0]);\\\\n\\\\n  vec3 realNormal = signAxis * normal;\\\\n\\\\n  if(dot(realNormal, enable) > 0.0) {\\\\n    vec3 minRange = min(bounds[0], bounds[1]);\\\\n    vec3 maxRange = max(bounds[0], bounds[1]);\\\\n    vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\\\\n    gl_Position = projection * view * model * vec4(nPosition, 1.0);\\\\n  } else {\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  }\\\\n\\\\n  colorChannel = abs(realNormal);\\\\n}\\\"]),u=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform vec4 colors[3];\\\\n\\\\nvarying vec3 colorChannel;\\\\n\\\\nvoid main() {\\\\n  gl_FragColor = colorChannel.x * colors[0] +\\\\n                 colorChannel.y * colors[1] +\\\\n                 colorChannel.z * colors[2];\\\\n}\\\"]);r.bg=function(t){return i(t,c,u,null,[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"}])}},{\\\"gl-shader\\\":288,glslify:392}],227:[function(t,e,r){(function(r){\\\"use strict\\\";e.exports=function(t,e,r,a,s,l){var u=n(t),f=i(t,[{buffer:u,size:3}]),h=o(t);h.attributes.position.location=0;var p=new c(t,h,u,f);return p.update(e,r,a,s,l),p};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"vectorize-text\\\"),o=t(\\\"./shaders\\\").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,f=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){this.gl;var o=[];function s(t,e,r,n){var i=l[r];i||(i=l[r]={});var s=i[e];s||(s=i[e]=function(t,e){try{return a(t,e)}catch(t){return console.warn(\\\"error vectorizing text:\\\",t),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:\\\"center\\\",textBaseline:\\\"middle\\\"}));for(var c=(n||12)/12,u=s.positions,f=s.cells,h=0,p=f.length;h<p;++h)for(var d=f[h],g=2;g>=0;--g){var v=u[d[g]];o.push(c*v[0],-c*v[1],t)}}for(var c=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],p=0;p<3;++p){f[p]=o.length/3|0,s(.5*(t[0][p]+t[1][p]),e[p],r),h[p]=(o.length/3|0)-f[p],c[p]=o.length/3|0;for(var d=0;d<n[p].length;++d)n[p][d].text&&s(n[p][d].x,n[p][d].text,n[p][d].font||i,n[p][d].fontSize||12);u[p]=(o.length/3|0)-c[p]}this.buffer.update(o),this.tickOffset=c,this.tickCount=u,this.labelOffset=f,this.labelCount=h},u.drawTicks=function(t,e,r,n,i,a,o,s){this.tickCount[t]&&(this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t]))},u.drawLabel=function(t,e,r,n,i,a,o,s){this.labelCount[t]&&(this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.labelCount[t],this.labelOffset[t]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this,t(\\\"_process\\\"))},{\\\"./shaders\\\":226,_process:465,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310,\\\"vectorize-text\\\":527}],228:[function(t,e,r){\\\"use strict\\\";function n(t,e){var r=t+\\\"\\\",n=r.indexOf(\\\".\\\"),i=0;n>=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+\\\"\\\";if(s.indexOf(\\\"e\\\")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=\\\"\\\"+l;if(o<0&&(u=\\\"-\\\"+u),i){for(var f=\\\"\\\"+c;f.length<i;)f=\\\"0\\\"+f;return u+\\\".\\\"+f}return u}r.create=function(t,e){for(var r=[],i=0;i<3;++i){for(var a=[],o=(t[0][i],t[1][i],0);o*e[i]<=t[1][i];++o)a.push({x:o*e[i],text:n(e[i],o)});for(var o=-1;o*e[i]>=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;++n){var i=t[r][n],a=e[r][n];if(i.x!==a.x||i.text!==a.text||i.font!==a.font||i.fontColor!==a.fontColor||i.fontSize!==a.fontSize||i.dx!==a.dx||i.dy!==a.dy)return!1}}return!0}},{}],229:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,l,f){var h=e.model||c,p=e.view||c,m=e.projection||c,y=t.bounds,x=(f=f||a(h,p,m,y)).axis;f.edges;o(u,p,h),o(u,m,u);for(var b=g,_=0;_<3;++_)b[_].lo=1/0,b[_].hi=-1/0,b[_].pixelsPerDataUnit=1/0;var w=n(s(u,u));s(u,u);for(var k=0;k<3;++k){var M=(k+1)%3,A=(k+2)%3,T=v;t:for(var _=0;_<2;++_){var S=[];if(x[k]<0!=!!_){T[k]=y[_][k];for(var C=0;C<2;++C){T[M]=y[C^_][M];for(var E=0;E<2;++E)T[A]=y[E^C^_][A],S.push(T.slice())}for(var C=0;C<w.length;++C){if(0===S.length)continue t;S=i.positive(S,w[C])}for(var C=0;C<S.length;++C)for(var A=S[C],L=d(v,u,A,r,l),E=0;E<3;++E)b[E].lo=Math.min(b[E].lo,A[E]),b[E].hi=Math.max(b[E].hi,A[E]),E!==k&&(b[E].pixelsPerDataUnit=Math.min(b[E].pixelsPerDataUnit,Math.abs(L[E])))}}}return b};var n=t(\\\"extract-frustum-planes\\\"),i=t(\\\"split-polygon\\\"),a=t(\\\"./lib/cube.js\\\"),o=t(\\\"gl-mat4/multiply\\\"),s=t(\\\"gl-mat4/transpose\\\"),l=t(\\\"gl-vec4/transformMat4\\\"),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),u=new Float32Array(16);function f(t,e,r){this.lo=t,this.hi=e,this.pixelsPerDataUnit=r}var h=[0,0,0,1],p=[0,0,0,1];function d(t,e,r,n,i){for(var a=0;a<3;++a){for(var o=h,s=p,c=0;c<3;++c)s[c]=o[c]=r[c];s[3]=o[3]=1,s[a]+=1,l(s,s,e),s[3]<0&&(t[a]=1/0),o[a]-=1,l(o,o,e),o[3]<0&&(t[a]=1/0);var u=(o[0]/o[3]-s[0]/s[3])*n,f=(o[1]/o[3]-s[1]/s[3])*i;t[a]=.25*Math.sqrt(u*u+f*f)}return t}var g=[new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0)],v=[0,0,0]},{\\\"./lib/cube.js\\\":224,\\\"extract-frustum-planes\\\":213,\\\"gl-mat4/multiply\\\":256,\\\"gl-mat4/transpose\\\":264,\\\"gl-vec4/transformMat4\\\":381,\\\"split-polygon\\\":503}],230:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"typedarray-pool\\\"),i=t(\\\"ndarray-ops\\\"),a=t(\\\"ndarray\\\"),o=[\\\"uint8\\\",\\\"uint8_clamped\\\",\\\"uint16\\\",\\\"uint32\\\",\\\"int8\\\",\\\"int16\\\",\\\"int32\\\",\\\"float32\\\"];function s(t,e,r,n,i){this.gl=t,this.type=e,this.handle=r,this.length=n,this.usage=i}var l=s.prototype;function c(t,e,r,n,i,a){var o=i.length*i.BYTES_PER_ELEMENT;if(a<0)return t.bufferData(e,i,n),o;if(o+a>r)throw new Error(\\\"gl-buffer: If resizing buffer, must not specify offset\\\");return t.bufferSubData(e,a,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a<i;++a)r[a]=t[a];return r}l.bind=function(){this.gl.bindBuffer(this.type,this.handle)},l.unbind=function(){this.gl.bindBuffer(this.type,null)},l.dispose=function(){this.gl.deleteBuffer(this.handle)},l.update=function(t,e){if(\\\"number\\\"!=typeof e&&(e=-1),this.bind(),\\\"object\\\"==typeof t&&\\\"undefined\\\"!=typeof t.shape){var r=t.dtype;if(o.indexOf(r)<0&&(r=\\\"float32\\\"),this.type===this.gl.ELEMENT_ARRAY_BUFFER)r=gl.getExtension(\\\"OES_element_index_uint\\\")&&\\\"uint16\\\"!==r?\\\"uint32\\\":\\\"uint16\\\";if(r===t.dtype&&function(t,e){for(var r=1,n=e.length-1;n>=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,\\\"uint16\\\"):u(t,\\\"float32\\\"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?f:f.subarray(0,t.length),e),n.free(f)}else if(\\\"object\\\"==typeof t&&\\\"number\\\"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if(\\\"number\\\"!=typeof t&&void 0!==t)throw new Error(\\\"gl-buffer: Invalid data type\\\");if(e>=0)throw new Error(\\\"gl-buffer: Cannot specify offset when resizing buffer\\\");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error(\\\"gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER\\\");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error(\\\"gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW\\\");var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},{ndarray:433,\\\"ndarray-ops\\\":427,\\\"typedarray-pool\\\":522}],231:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-vec3\\\"),i=(t(\\\"gl-vec4\\\"),function(t,e){for(var r=0;r<t.length;r++)if(t[r]>=e)return r-1;return r}),a=n.create(),o=n.create(),s=function(t,e,r){return t<e?e:t>r?r:t},l=function(t,e,r,l){var c=t[0],u=t[1],f=t[2],h=r[0].length,p=r[1].length,d=r[2].length,g=i(r[0],c),v=i(r[1],u),m=i(r[2],f),y=g+1,x=v+1,b=m+1;if(l&&(g=s(g,0,h-1),y=s(y,0,h-1),v=s(v,0,p-1),x=s(x,0,p-1),m=s(m,0,d-1),b=s(b,0,d-1)),g<0||v<0||m<0||y>=h||x>=p||b>=d)return n.create();var _=(c-r[0][g])/(r[0][y]-r[0][g]),w=(u-r[1][v])/(r[1][x]-r[1][v]),k=(f-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var M=m*h*p,A=b*h*p,T=v*h,S=x*h,C=g,E=y,L=e[T+M+C],z=e[T+M+E],O=e[S+M+C],I=e[S+M+E],P=e[T+A+C],D=e[T+A+E],R=e[S+A+C],B=e[S+A+E],F=n.create();return n.lerp(F,L,z,_),n.lerp(a,O,I,_),n.lerp(F,F,a,w),n.lerp(a,P,D,_),n.lerp(o,R,B,_),n.lerp(a,a,o,w),n.lerp(F,F,a,k),F};e.exports=function(t,e){var r;r=t.positions?t.positions:function(t){for(var e=t[0],r=t[1],n=t[2],i=[],a=0;a<n.length;a++)for(var o=0;o<r.length;o++)for(var s=0;s<e.length;s++)i.push([n[a],r[o],e[s]]);return i}(t.meshgrid);var i=t.meshgrid,a=t.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vertexNormals:[],vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),o;for(var s=0,c=1/0,u=-1/0,f=1/0,h=-1/0,p=1/0,d=-1/0,g=null,v=null,m=[],y=1/0,x=0;x<r.length;x++){var b,_=r[x];c=Math.min(_[0],c),u=Math.max(_[0],u),f=Math.min(_[1],f),h=Math.max(_[1],h),p=Math.min(_[2],p),d=Math.max(_[2],d),b=i?l(_,a,i,!0):a[x],n.length(b)>s&&(s=n.length(b)),x&&(y=Math.min(y,2*n.distance(g,_)/(n.length(v)+n.length(b)))),g=_,v=b,m.push(b)}var w=[c,f,p],k=[u,h,d];e&&(e[0]=w,e[1]=k),0===s&&(s=1);var M=1/s;isFinite(y)&&!isNaN(y)||(y=1),o.vectorScale=y;var A=function(t,e,r){var i=n.create();return void 0!==t&&n.set(i,t,e,r),i}(0,1,0),T=t.coneSize||.5;t.absoluteConeSize&&(T=t.absoluteConeSize*M),o.coneScale=T;x=0;for(var S=0;x<r.length;x++)for(var C=(_=r[x])[0],E=_[1],L=_[2],z=m[x],O=n.length(z)*M,I=0;I<8;I++){o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.positions.push([C,E,L,S++]),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vectors.push(z),o.vertexIntensity.push(O,O,O),o.vertexIntensity.push(O,O,O),o.vertexNormals.push(A,A,A),o.vertexNormals.push(A,A,A);var P=o.positions.length;o.cells.push([P-6,P-5,P-4],[P-3,P-2,P-1])}return o},e.exports.createConeMesh=t(\\\"./lib/conemesh\\\")},{\\\"./lib/conemesh\\\":233,\\\"gl-vec3\\\":329,\\\"gl-vec4\\\":365}],232:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"barycentric\\\"),i=t(\\\"polytope-closest-point/lib/closest_point_2d.js\\\");function a(t,e){for(var r=[0,0,0,0],n=0;n<4;++n)for(var i=0;i<4;++i)r[i]+=t[4*n+i]*e[n];return r}function o(t,e,r,n,i){for(var o=a(n,a(r,a(e,[t[0],t[1],t[2],1]))),s=0;s<3;++s)o[s]/=o[3];return[.5*i[0]*(1+o[0]),.5*i[1]*(1-o[1])]}e.exports=function(t,e,r,a,s,l){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),u=0;u<t.length;++u)c[u]=o(t[u],r,a,s,l);for(var f=0,h=1/0,u=0;u<c.length;++u){for(var p=0,d=0;d<2;++d)p+=Math.pow(c[u][d]-e[d],2);p<h&&(h=p,f=u)}for(var g=function(t,e){if(2===t.length){for(var r=0,a=0,o=0;o<2;++o)r+=Math.pow(e[o]-t[0][o],2),a+=Math.pow(e[o]-t[1][o],2);return r=Math.sqrt(r),a=Math.sqrt(a),r+a<1e-6?[1,0]:[a/(r+a),r/(a+r)]}if(3===t.length){var s=[0,0];return i(t[0],t[1],t[2],e,s),n(t,s)}return[]}(c,e),v=0,u=0;u<3;++u){if(g[u]<-.001||g[u]>1.0001)return null;v+=g[u]}if(Math.abs(v-1)>.001)return null;return[f,function(t,e){for(var r=[0,0,0],n=0;n<t.length;++n)for(var i=t[n],a=e[n],o=0;o<3;++o)r[o]+=a*i[o];return r}(t,g),g]}},{barycentric:61,\\\"polytope-closest-point/lib/closest_point_2d.js\\\":464}],233:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"gl-texture2d\\\"),s=t(\\\"normals\\\"),l=t(\\\"gl-mat4/multiply\\\"),c=t(\\\"gl-mat4/invert\\\"),u=t(\\\"ndarray\\\"),f=t(\\\"colormap\\\"),h=t(\\\"simplicial-complex-contour\\\"),p=t(\\\"typedarray-pool\\\"),d=t(\\\"./shaders\\\"),g=(t(\\\"./closest-point\\\"),d.meshShader),v=d.pickShader,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,v,y,x,b,_,w,k,M,A,T,S,C){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleVectors=c,this.triangleColors=f,this.triangleNormals=p,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=g,this.edgeColors=y,this.edgeUVs=x,this.edgeIds=v,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=_,this.pointColors=k,this.pointUVs=M,this.pointSizes=A,this.pointIds=w,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=C,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1]}var x=y.prototype;function b(t){var e=n(t,v.vertex,v.fragment,null,v.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity>=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var c=r[l],u=0;u<2;++u){var f=c[0];2===c.length&&(f=c[u]);for(var d=n[f][0],g=n[f][1],v=i[f],m=1-v,y=this.positions[d],x=this.positions[g],b=0;b<3;++b)o[s++]=v*y[b]+m*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},x.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\\\"contourEnable\\\"in t&&(this.contourEnable=t.contourEnable),\\\"contourColor\\\"in t&&(this.contourColor=t.contourColor),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"lightPosition\\\"in t&&(this.lightPosition=t.lightPosition),\\\"opacity\\\"in t&&(this.opacity=t.opacity),\\\"ambient\\\"in t&&(this.ambientLight=t.ambient),\\\"diffuse\\\"in t&&(this.diffuseLight=t.diffuse),\\\"specular\\\"in t&&(this.specularLight=t.specular),\\\"roughness\\\"in t&&(this.roughness=t.roughness),\\\"fresnel\\\"in t&&(this.fresnel=t.fresnel),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:\\\"rgba\\\"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var a=[],l=[],c=[],h=[],p=[],d=[],g=[],v=[],m=[],y=[],x=[],b=[],_=[],w=[],k=[];this.cells=r,this.positions=n;var M=t.vertexNormals,A=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,S=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!A&&(A=s.faceNormals(r,n,S)),A||M||(M=s.vertexNormals(r,n,T));var C=t.vertexColors,E=t.cellColors,L=t.meshColor||[1,1,1,1],z=t.vertexUVs,O=t.vertexIntensity,I=t.cellUVs,P=t.cellIntensity,D=1/0,R=-1/0;if(!z&&!I)if(O)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],R=+t.vertexIntensityBounds[1];else for(var B=0;B<O.length;++B){var F=O[B];D=Math.min(D,F),R=Math.max(R,F)}else if(P)for(B=0;B<P.length;++B){F=P[B];D=Math.min(D,F),R=Math.max(R,F)}else for(B=0;B<n.length;++B){F=n[B][2];D=Math.min(D,F),R=Math.max(R,F)}this.intensity=O||(P?function(t,e,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=0;var a=t.length;for(i=0;i<a;++i)for(var o=t[i],s=0;s<o.length;++s)n[o[s]]=r[i];return n}(r,n.length,P):function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n));var N=t.pointSizes,j=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(B=0;B<n.length;++B)for(var V=n[B],U=0;U<3;++U)!isNaN(V[U])&&isFinite(V[U])&&(this.bounds[0][U]=Math.min(this.bounds[0][U],V[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],V[U]));var q=0,H=0,G=0;t:for(B=0;B<r.length;++B){var W=r[B];switch(W.length){case 1:for(V=n[X=W[0]],U=0;U<3;++U)if(isNaN(V[U])||!isFinite(V[U]))continue t;x.push(V[0],V[1],V[2],V[3]),3===(Z=C?C[X]:E?E[B]:L).length?b.push(Z[0],Z[1],Z[2],1):b.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],_.push($[0],$[1]),N?w.push(N[X]):w.push(j),k.push(B),G+=1;break;case 2:for(U=0;U<2;++U){V=n[X=W[U]];for(var Y=0;Y<3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t}for(U=0;U<2;++U){V=n[X=W[U]];g.push(V[0],V[1],V[2]),3===(Z=C?C[X]:E?E[B]:L).length?v.push(Z[0],Z[1],Z[2],1):v.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],m.push($[0],$[1]),y.push(B)}H+=1;break;case 3:for(U=0;U<3;++U)for(V=n[X=W[U]],Y=0;Y<3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t;for(U=0;U<3;++U){var X;V=n[X=W[U]];a.push(V[0],V[1],V[2],V[3]);var Z,$,J,K=i[X];l.push(K[0],K[1],K[2]),3===(Z=C?C[X]:E?E[B]:L).length?c.push(Z[0],Z[1],Z[2],1):c.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],p.push($[0],$[1]),J=M?M[X]:A[B],h.push(J[0],J[1],J[2]),d.push(B)}q+=1}}this.pointCount=G,this.edgeCount=H,this.triangleCount=q,this.pointPositions.update(x),this.pointColors.update(b),this.pointUVs.update(_),this.pointSizes.update(w),this.pointIds.update(new Uint32Array(k)),this.edgePositions.update(g),this.edgeColors.update(v),this.edgeUVs.update(m),this.edgeIds.update(new Uint32Array(y)),this.trianglePositions.update(a),this.triangleVectors.update(l),this.triangleColors.update(c),this.triangleUVs.update(p),this.triangleNormals.update(h),this.triangleIds.update(new Uint32Array(d))}},x.drawTransparent=x.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o<3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o<3;++o){for(var p=u[12+o],d=0;d<3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount>0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:Math.floor(r[1]/48),position:n,dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),f=i(t),h=i(t),p=i(t),d=i(t),v=i(t),m=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:h,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:f,type:t.FLOAT,size:3}]),x=i(t),_=i(t),w=i(t),k=i(t),M=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),T=i(t),S=i(t),C=i(t),E=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:E,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:T,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:C,type:t.FLOAT,size:1}]),z=i(t),O=new y(t,l,r,null,null,s,null,null,c,f,v,h,p,d,m,x,k,_,w,M,A,E,T,S,C,L,z,a(t,[{buffer:z,type:t.FLOAT,size:3}]));return O.update(e),O}},{\\\"./closest-point\\\":232,\\\"./shaders\\\":234,colormap:114,\\\"gl-buffer\\\":230,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"gl-shader\\\":288,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,ndarray:433,normals:436,\\\"simplicial-complex-contour\\\":494,\\\"typedarray-pool\\\":522}],234:[function(t,e,r){var n=t(\\\"glslify\\\"),i=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat inverse(float m) {\\\\n  return 1.0 / m;\\\\n}\\\\n\\\\nmat2 inverse(mat2 m) {\\\\n  return mat2(m[1][1],-m[0][1],\\\\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\\\\n}\\\\n\\\\nmat3 inverse(mat3 m) {\\\\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\\\\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\\\\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\\\\n\\\\n  float b01 = a22 * a11 - a12 * a21;\\\\n  float b11 = -a22 * a10 + a12 * a20;\\\\n  float b21 = a21 * a10 - a11 * a20;\\\\n\\\\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\\\\n\\\\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\\\\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\\\\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\\\\n}\\\\n\\\\nmat4 inverse(mat4 m) {\\\\n  float\\\\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\\\\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\\\\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\\\\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\\\\n\\\\n      b00 = a00 * a11 - a01 * a10,\\\\n      b01 = a00 * a12 - a02 * a10,\\\\n      b02 = a00 * a13 - a03 * a10,\\\\n      b03 = a01 * a12 - a02 * a11,\\\\n      b04 = a01 * a13 - a03 * a11,\\\\n      b05 = a02 * a13 - a03 * a12,\\\\n      b06 = a20 * a31 - a21 * a30,\\\\n      b07 = a20 * a32 - a22 * a30,\\\\n      b08 = a20 * a33 - a23 * a30,\\\\n      b09 = a21 * a32 - a22 * a31,\\\\n      b10 = a21 * a33 - a23 * a31,\\\\n      b11 = a22 * a33 - a23 * a32,\\\\n\\\\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\\\\n\\\\n  return mat4(\\\\n      a11 * b11 - a12 * b10 + a13 * b09,\\\\n      a02 * b10 - a01 * b11 - a03 * b09,\\\\n      a31 * b05 - a32 * b04 + a33 * b03,\\\\n      a22 * b04 - a21 * b05 - a23 * b03,\\\\n      a12 * b08 - a10 * b11 - a13 * b07,\\\\n      a00 * b11 - a02 * b08 + a03 * b07,\\\\n      a32 * b02 - a30 * b05 - a33 * b01,\\\\n      a20 * b05 - a22 * b02 + a23 * b01,\\\\n      a10 * b10 - a11 * b08 + a13 * b06,\\\\n      a01 * b08 - a00 * b10 - a03 * b06,\\\\n      a30 * b04 - a31 * b02 + a33 * b00,\\\\n      a21 * b02 - a20 * b04 - a23 * b00,\\\\n      a11 * b07 - a10 * b09 - a12 * b06,\\\\n      a00 * b09 - a01 * b07 + a02 * b06,\\\\n      a31 * b01 - a30 * b03 - a32 * b00,\\\\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\\\\n}\\\\n\\\\nvec3 getOrthogonalVector(vec3 v) {\\\\n  // Return up-vector for only-z vector.\\\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\\\n  // Assign z = 0, x = -b, y = a:\\\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\\\n    return normalize(vec3(-v.y, v.x, 0.0));\\\\n  } else {\\\\n    return normalize(vec3(0.0, v.z, -v.y));\\\\n  }\\\\n}\\\\n\\\\n// Calculate the cone vertex and normal at the given index.\\\\n//\\\\n// The returned vertex is for a cone with its top at origin and height of 1.0,\\\\n// pointing in the direction of the vector attribute.\\\\n//\\\\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\\\\n// These vertices are used to make up the triangles of the cone by the following:\\\\n//   segment + 0 top vertex\\\\n//   segment + 1 perimeter vertex a+1\\\\n//   segment + 2 perimeter vertex a\\\\n//   segment + 3 center base vertex\\\\n//   segment + 4 perimeter vertex a\\\\n//   segment + 5 perimeter vertex a+1\\\\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\\\\n// To go from index to segment, floor(index / 6)\\\\n// To go from segment to angle, 2*pi * (segment/segmentCount)\\\\n// To go from index to segment index, index - (segment*6)\\\\n//\\\\nvec3 getConePosition(vec3 d, float index, float coneOffset, out vec3 normal) {\\\\n\\\\n  const float segmentCount = 8.0;\\\\n\\\\n  index = mod(index, segmentCount * 6.0);\\\\n\\\\n  float segment = floor(index/6.0);\\\\n  float segmentIndex = index - (segment*6.0);\\\\n\\\\n  normal = -normalize(d);\\\\n\\\\n  if (segmentIndex == 3.0) {\\\\n    return mix(vec3(0.0), -d, coneOffset);\\\\n  }\\\\n\\\\n  // angle = 2pi * ((segment + ((segmentIndex == 1.0 || segmentIndex == 5.0) ? 1.0 : 0.0)) / segmentCount)\\\\n  float nextAngle = float(segmentIndex == 1.0 || segmentIndex == 5.0);\\\\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\\\\n\\\\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\\\\n  vec3 v2 = v1 - d;\\\\n\\\\n  vec3 u = getOrthogonalVector(d);\\\\n  vec3 v = normalize(cross(u, d));\\\\n\\\\n  vec3 x = u * cos(angle) * length(d)*0.25;\\\\n  vec3 y = v * sin(angle) * length(d)*0.25;\\\\n  vec3 v3 = v2 + x + y;\\\\n  if (segmentIndex <= 2.0) {\\\\n    vec3 tx = u * sin(angle);\\\\n    vec3 ty = v * -cos(angle);\\\\n    vec3 tangent = tx + ty;\\\\n    normal = normalize(cross(v3 - v1, tangent));\\\\n  }\\\\n\\\\n  if (segmentIndex == 0.0) {\\\\n    return mix(d, vec3(0.0), coneOffset);\\\\n  }\\\\n  return v3;\\\\n}\\\\n\\\\nattribute vec3 vector;\\\\nattribute vec4 color, position;\\\\nattribute vec2 uv;\\\\nuniform float vectorScale;\\\\nuniform float coneScale;\\\\n\\\\nuniform float coneOffset;\\\\n\\\\nuniform mat4 model\\\\n           , view\\\\n           , projection;\\\\nuniform vec3 eyePosition\\\\n           , lightPosition;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data\\\\n           , f_position;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  // Scale the vector magnitude to stay constant with\\\\n  // model & view changes.\\\\n  vec3 normal;\\\\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\\\\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\\\n  normal = normalize(normal * inverse(mat3(model)));\\\\n\\\\n  // vec4 m_position  = model * vec4(conePosition, 1.0);\\\\n  vec4 t_position  = view * conePosition;\\\\n  gl_Position      = projection * t_position;\\\\n  f_color          = color; //vec4(position.w, color.r, 0, 0);\\\\n  f_normal         = normal;\\\\n  f_data           = conePosition.xyz;\\\\n  f_position       = position.xyz;\\\\n  f_eyeDirection   = eyePosition   - conePosition.xyz;\\\\n  f_lightDirection = lightPosition - conePosition.xyz;\\\\n  f_uv             = uv;\\\\n}\\\\n\\\"]),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat beckmannDistribution(float x, float roughness) {\\\\n  float NdotH = max(x, 0.0001);\\\\n  float cos2Alpha = NdotH * NdotH;\\\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\\\n  float roughness2 = roughness * roughness;\\\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\\\n  return exp(tan2Alpha / roughness2) / denom;\\\\n}\\\\n\\\\nfloat cookTorranceSpecular(\\\\n  vec3 lightDirection,\\\\n  vec3 viewDirection,\\\\n  vec3 surfaceNormal,\\\\n  float roughness,\\\\n  float fresnel) {\\\\n\\\\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\\\\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\\\\n\\\\n  //Half angle vector\\\\n  vec3 H = normalize(lightDirection + viewDirection);\\\\n\\\\n  //Geometric term\\\\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\\\\n  float VdotH = max(dot(viewDirection, H), 0.000001);\\\\n  float LdotH = max(dot(lightDirection, H), 0.000001);\\\\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\\\\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\\\\n  float G = min(1.0, min(G1, G2));\\\\n  \\\\n  //Distribution term\\\\n  float D = beckmannDistribution(NdotH, roughness);\\\\n\\\\n  //Fresnel term\\\\n  float F = pow(1.0 - VdotN, fresnel);\\\\n\\\\n  //Multiply terms and done\\\\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform float roughness\\\\n            , fresnel\\\\n            , kambient\\\\n            , kdiffuse\\\\n            , kspecular\\\\n            , opacity;\\\\nuniform sampler2D texture;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data\\\\n           , f_position;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  vec3 N = normalize(f_normal);\\\\n  vec3 L = normalize(f_lightDirection);\\\\n  vec3 V = normalize(f_eyeDirection);\\\\n\\\\n  if(!gl_FrontFacing) {\\\\n    N = -N;\\\\n  }\\\\n\\\\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\\\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\\\n\\\\n  vec4 surfaceColor =  texture2D(texture, f_uv);\\\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\\\n\\\\n  gl_FragColor = litColor * opacity;\\\\n}\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvec3 getOrthogonalVector(vec3 v) {\\\\n  // Return up-vector for only-z vector.\\\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\\\n  // Assign z = 0, x = -b, y = a:\\\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\\\n    return normalize(vec3(-v.y, v.x, 0.0));\\\\n  } else {\\\\n    return normalize(vec3(0.0, v.z, -v.y));\\\\n  }\\\\n}\\\\n\\\\n// Calculate the cone vertex and normal at the given index.\\\\n//\\\\n// The returned vertex is for a cone with its top at origin and height of 1.0,\\\\n// pointing in the direction of the vector attribute.\\\\n//\\\\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\\\\n// These vertices are used to make up the triangles of the cone by the following:\\\\n//   segment + 0 top vertex\\\\n//   segment + 1 perimeter vertex a+1\\\\n//   segment + 2 perimeter vertex a\\\\n//   segment + 3 center base vertex\\\\n//   segment + 4 perimeter vertex a\\\\n//   segment + 5 perimeter vertex a+1\\\\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\\\\n// To go from index to segment, floor(index / 6)\\\\n// To go from segment to angle, 2*pi * (segment/segmentCount)\\\\n// To go from index to segment index, index - (segment*6)\\\\n//\\\\nvec3 getConePosition(vec3 d, float index, float coneOffset, out vec3 normal) {\\\\n\\\\n  const float segmentCount = 8.0;\\\\n\\\\n  index = mod(index, segmentCount * 6.0);\\\\n\\\\n  float segment = floor(index/6.0);\\\\n  float segmentIndex = index - (segment*6.0);\\\\n\\\\n  normal = -normalize(d);\\\\n\\\\n  if (segmentIndex == 3.0) {\\\\n    return mix(vec3(0.0), -d, coneOffset);\\\\n  }\\\\n\\\\n  // angle = 2pi * ((segment + ((segmentIndex == 1.0 || segmentIndex == 5.0) ? 1.0 : 0.0)) / segmentCount)\\\\n  float nextAngle = float(segmentIndex == 1.0 || segmentIndex == 5.0);\\\\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\\\\n\\\\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\\\\n  vec3 v2 = v1 - d;\\\\n\\\\n  vec3 u = getOrthogonalVector(d);\\\\n  vec3 v = normalize(cross(u, d));\\\\n\\\\n  vec3 x = u * cos(angle) * length(d)*0.25;\\\\n  vec3 y = v * sin(angle) * length(d)*0.25;\\\\n  vec3 v3 = v2 + x + y;\\\\n  if (segmentIndex <= 2.0) {\\\\n    vec3 tx = u * sin(angle);\\\\n    vec3 ty = v * -cos(angle);\\\\n    vec3 tangent = tx + ty;\\\\n    normal = normalize(cross(v3 - v1, tangent));\\\\n  }\\\\n\\\\n  if (segmentIndex == 0.0) {\\\\n    return mix(d, vec3(0.0), coneOffset);\\\\n  }\\\\n  return v3;\\\\n}\\\\n\\\\nattribute vec3 vector;\\\\nattribute vec4 position;\\\\nattribute vec4 id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\n\\\\nuniform float vectorScale;\\\\nuniform float coneScale;\\\\nuniform float coneOffset;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  vec3 normal;\\\\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\\\\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\\\n  gl_Position = projection * view * conePosition;\\\\n  f_id        = id;\\\\n  f_position  = position.xyz;\\\\n}\\\\n\\\"]),s=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3  clipBounds[2];\\\\nuniform float pickId;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\\\n}\\\"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:\\\"position\\\",type:\\\"vec4\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"},{name:\\\"vector\\\",type:\\\"vec3\\\"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:\\\"position\\\",type:\\\"vec4\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"},{name:\\\"vector\\\",type:\\\"vec3\\\"}]}},{glslify:392}],235:[function(t,e,r){e.exports={0:\\\"NONE\\\",1:\\\"ONE\\\",2:\\\"LINE_LOOP\\\",3:\\\"LINE_STRIP\\\",4:\\\"TRIANGLES\\\",5:\\\"TRIANGLE_STRIP\\\",6:\\\"TRIANGLE_FAN\\\",256:\\\"DEPTH_BUFFER_BIT\\\",512:\\\"NEVER\\\",513:\\\"LESS\\\",514:\\\"EQUAL\\\",515:\\\"LEQUAL\\\",516:\\\"GREATER\\\",517:\\\"NOTEQUAL\\\",518:\\\"GEQUAL\\\",519:\\\"ALWAYS\\\",768:\\\"SRC_COLOR\\\",769:\\\"ONE_MINUS_SRC_COLOR\\\",770:\\\"SRC_ALPHA\\\",771:\\\"ONE_MINUS_SRC_ALPHA\\\",772:\\\"DST_ALPHA\\\",773:\\\"ONE_MINUS_DST_ALPHA\\\",774:\\\"DST_COLOR\\\",775:\\\"ONE_MINUS_DST_COLOR\\\",776:\\\"SRC_ALPHA_SATURATE\\\",1024:\\\"STENCIL_BUFFER_BIT\\\",1028:\\\"FRONT\\\",1029:\\\"BACK\\\",1032:\\\"FRONT_AND_BACK\\\",1280:\\\"INVALID_ENUM\\\",1281:\\\"INVALID_VALUE\\\",1282:\\\"INVALID_OPERATION\\\",1285:\\\"OUT_OF_MEMORY\\\",1286:\\\"INVALID_FRAMEBUFFER_OPERATION\\\",2304:\\\"CW\\\",2305:\\\"CCW\\\",2849:\\\"LINE_WIDTH\\\",2884:\\\"CULL_FACE\\\",2885:\\\"CULL_FACE_MODE\\\",2886:\\\"FRONT_FACE\\\",2928:\\\"DEPTH_RANGE\\\",2929:\\\"DEPTH_TEST\\\",2930:\\\"DEPTH_WRITEMASK\\\",2931:\\\"DEPTH_CLEAR_VALUE\\\",2932:\\\"DEPTH_FUNC\\\",2960:\\\"STENCIL_TEST\\\",2961:\\\"STENCIL_CLEAR_VALUE\\\",2962:\\\"STENCIL_FUNC\\\",2963:\\\"STENCIL_VALUE_MASK\\\",2964:\\\"STENCIL_FAIL\\\",2965:\\\"STENCIL_PASS_DEPTH_FAIL\\\",2966:\\\"STENCIL_PASS_DEPTH_PASS\\\",2967:\\\"STENCIL_REF\\\",2968:\\\"STENCIL_WRITEMASK\\\",2978:\\\"VIEWPORT\\\",3024:\\\"DITHER\\\",3042:\\\"BLEND\\\",3088:\\\"SCISSOR_BOX\\\",3089:\\\"SCISSOR_TEST\\\",3106:\\\"COLOR_CLEAR_VALUE\\\",3107:\\\"COLOR_WRITEMASK\\\",3317:\\\"UNPACK_ALIGNMENT\\\",3333:\\\"PACK_ALIGNMENT\\\",3379:\\\"MAX_TEXTURE_SIZE\\\",3386:\\\"MAX_VIEWPORT_DIMS\\\",3408:\\\"SUBPIXEL_BITS\\\",3410:\\\"RED_BITS\\\",3411:\\\"GREEN_BITS\\\",3412:\\\"BLUE_BITS\\\",3413:\\\"ALPHA_BITS\\\",3414:\\\"DEPTH_BITS\\\",3415:\\\"STENCIL_BITS\\\",3553:\\\"TEXTURE_2D\\\",4352:\\\"DONT_CARE\\\",4353:\\\"FASTEST\\\",4354:\\\"NICEST\\\",5120:\\\"BYTE\\\",5121:\\\"UNSIGNED_BYTE\\\",5122:\\\"SHORT\\\",5123:\\\"UNSIGNED_SHORT\\\",5124:\\\"INT\\\",5125:\\\"UNSIGNED_INT\\\",5126:\\\"FLOAT\\\",5386:\\\"INVERT\\\",5890:\\\"TEXTURE\\\",6401:\\\"STENCIL_INDEX\\\",6402:\\\"DEPTH_COMPONENT\\\",6406:\\\"ALPHA\\\",6407:\\\"RGB\\\",6408:\\\"RGBA\\\",6409:\\\"LUMINANCE\\\",6410:\\\"LUMINANCE_ALPHA\\\",7680:\\\"KEEP\\\",7681:\\\"REPLACE\\\",7682:\\\"INCR\\\",7683:\\\"DECR\\\",7936:\\\"VENDOR\\\",7937:\\\"RENDERER\\\",7938:\\\"VERSION\\\",9728:\\\"NEAREST\\\",9729:\\\"LINEAR\\\",9984:\\\"NEAREST_MIPMAP_NEAREST\\\",9985:\\\"LINEAR_MIPMAP_NEAREST\\\",9986:\\\"NEAREST_MIPMAP_LINEAR\\\",9987:\\\"LINEAR_MIPMAP_LINEAR\\\",10240:\\\"TEXTURE_MAG_FILTER\\\",10241:\\\"TEXTURE_MIN_FILTER\\\",10242:\\\"TEXTURE_WRAP_S\\\",10243:\\\"TEXTURE_WRAP_T\\\",10497:\\\"REPEAT\\\",10752:\\\"POLYGON_OFFSET_UNITS\\\",16384:\\\"COLOR_BUFFER_BIT\\\",32769:\\\"CONSTANT_COLOR\\\",32770:\\\"ONE_MINUS_CONSTANT_COLOR\\\",32771:\\\"CONSTANT_ALPHA\\\",32772:\\\"ONE_MINUS_CONSTANT_ALPHA\\\",32773:\\\"BLEND_COLOR\\\",32774:\\\"FUNC_ADD\\\",32777:\\\"BLEND_EQUATION_RGB\\\",32778:\\\"FUNC_SUBTRACT\\\",32779:\\\"FUNC_REVERSE_SUBTRACT\\\",32819:\\\"UNSIGNED_SHORT_4_4_4_4\\\",32820:\\\"UNSIGNED_SHORT_5_5_5_1\\\",32823:\\\"POLYGON_OFFSET_FILL\\\",32824:\\\"POLYGON_OFFSET_FACTOR\\\",32854:\\\"RGBA4\\\",32855:\\\"RGB5_A1\\\",32873:\\\"TEXTURE_BINDING_2D\\\",32926:\\\"SAMPLE_ALPHA_TO_COVERAGE\\\",32928:\\\"SAMPLE_COVERAGE\\\",32936:\\\"SAMPLE_BUFFERS\\\",32937:\\\"SAMPLES\\\",32938:\\\"SAMPLE_COVERAGE_VALUE\\\",32939:\\\"SAMPLE_COVERAGE_INVERT\\\",32968:\\\"BLEND_DST_RGB\\\",32969:\\\"BLEND_SRC_RGB\\\",32970:\\\"BLEND_DST_ALPHA\\\",32971:\\\"BLEND_SRC_ALPHA\\\",33071:\\\"CLAMP_TO_EDGE\\\",33170:\\\"GENERATE_MIPMAP_HINT\\\",33189:\\\"DEPTH_COMPONENT16\\\",33306:\\\"DEPTH_STENCIL_ATTACHMENT\\\",33635:\\\"UNSIGNED_SHORT_5_6_5\\\",33648:\\\"MIRRORED_REPEAT\\\",33901:\\\"ALIASED_POINT_SIZE_RANGE\\\",33902:\\\"ALIASED_LINE_WIDTH_RANGE\\\",33984:\\\"TEXTURE0\\\",33985:\\\"TEXTURE1\\\",33986:\\\"TEXTURE2\\\",33987:\\\"TEXTURE3\\\",33988:\\\"TEXTURE4\\\",33989:\\\"TEXTURE5\\\",33990:\\\"TEXTURE6\\\",33991:\\\"TEXTURE7\\\",33992:\\\"TEXTURE8\\\",33993:\\\"TEXTURE9\\\",33994:\\\"TEXTURE10\\\",33995:\\\"TEXTURE11\\\",33996:\\\"TEXTURE12\\\",33997:\\\"TEXTURE13\\\",33998:\\\"TEXTURE14\\\",33999:\\\"TEXTURE15\\\",34000:\\\"TEXTURE16\\\",34001:\\\"TEXTURE17\\\",34002:\\\"TEXTURE18\\\",34003:\\\"TEXTURE19\\\",34004:\\\"TEXTURE20\\\",34005:\\\"TEXTURE21\\\",34006:\\\"TEXTURE22\\\",34007:\\\"TEXTURE23\\\",34008:\\\"TEXTURE24\\\",34009:\\\"TEXTURE25\\\",34010:\\\"TEXTURE26\\\",34011:\\\"TEXTURE27\\\",34012:\\\"TEXTURE28\\\",34013:\\\"TEXTURE29\\\",34014:\\\"TEXTURE30\\\",34015:\\\"TEXTURE31\\\",34016:\\\"ACTIVE_TEXTURE\\\",34024:\\\"MAX_RENDERBUFFER_SIZE\\\",34041:\\\"DEPTH_STENCIL\\\",34055:\\\"INCR_WRAP\\\",34056:\\\"DECR_WRAP\\\",34067:\\\"TEXTURE_CUBE_MAP\\\",34068:\\\"TEXTURE_BINDING_CUBE_MAP\\\",34069:\\\"TEXTURE_CUBE_MAP_POSITIVE_X\\\",34070:\\\"TEXTURE_CUBE_MAP_NEGATIVE_X\\\",34071:\\\"TEXTURE_CUBE_MAP_POSITIVE_Y\\\",34072:\\\"TEXTURE_CUBE_MAP_NEGATIVE_Y\\\",34073:\\\"TEXTURE_CUBE_MAP_POSITIVE_Z\\\",34074:\\\"TEXTURE_CUBE_MAP_NEGATIVE_Z\\\",34076:\\\"MAX_CUBE_MAP_TEXTURE_SIZE\\\",34338:\\\"VERTEX_ATTRIB_ARRAY_ENABLED\\\",34339:\\\"VERTEX_ATTRIB_ARRAY_SIZE\\\",34340:\\\"VERTEX_ATTRIB_ARRAY_STRIDE\\\",34341:\\\"VERTEX_ATTRIB_ARRAY_TYPE\\\",34342:\\\"CURRENT_VERTEX_ATTRIB\\\",34373:\\\"VERTEX_ATTRIB_ARRAY_POINTER\\\",34466:\\\"NUM_COMPRESSED_TEXTURE_FORMATS\\\",34467:\\\"COMPRESSED_TEXTURE_FORMATS\\\",34660:\\\"BUFFER_SIZE\\\",34661:\\\"BUFFER_USAGE\\\",34816:\\\"STENCIL_BACK_FUNC\\\",34817:\\\"STENCIL_BACK_FAIL\\\",34818:\\\"STENCIL_BACK_PASS_DEPTH_FAIL\\\",34819:\\\"STENCIL_BACK_PASS_DEPTH_PASS\\\",34877:\\\"BLEND_EQUATION_ALPHA\\\",34921:\\\"MAX_VERTEX_ATTRIBS\\\",34922:\\\"VERTEX_ATTRIB_ARRAY_NORMALIZED\\\",34930:\\\"MAX_TEXTURE_IMAGE_UNITS\\\",34962:\\\"ARRAY_BUFFER\\\",34963:\\\"ELEMENT_ARRAY_BUFFER\\\",34964:\\\"ARRAY_BUFFER_BINDING\\\",34965:\\\"ELEMENT_ARRAY_BUFFER_BINDING\\\",34975:\\\"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\\\",35040:\\\"STREAM_DRAW\\\",35044:\\\"STATIC_DRAW\\\",35048:\\\"DYNAMIC_DRAW\\\",35632:\\\"FRAGMENT_SHADER\\\",35633:\\\"VERTEX_SHADER\\\",35660:\\\"MAX_VERTEX_TEXTURE_IMAGE_UNITS\\\",35661:\\\"MAX_COMBINED_TEXTURE_IMAGE_UNITS\\\",35663:\\\"SHADER_TYPE\\\",35664:\\\"FLOAT_VEC2\\\",35665:\\\"FLOAT_VEC3\\\",35666:\\\"FLOAT_VEC4\\\",35667:\\\"INT_VEC2\\\",35668:\\\"INT_VEC3\\\",35669:\\\"INT_VEC4\\\",35670:\\\"BOOL\\\",35671:\\\"BOOL_VEC2\\\",35672:\\\"BOOL_VEC3\\\",35673:\\\"BOOL_VEC4\\\",35674:\\\"FLOAT_MAT2\\\",35675:\\\"FLOAT_MAT3\\\",35676:\\\"FLOAT_MAT4\\\",35678:\\\"SAMPLER_2D\\\",35680:\\\"SAMPLER_CUBE\\\",35712:\\\"DELETE_STATUS\\\",35713:\\\"COMPILE_STATUS\\\",35714:\\\"LINK_STATUS\\\",35715:\\\"VALIDATE_STATUS\\\",35716:\\\"INFO_LOG_LENGTH\\\",35717:\\\"ATTACHED_SHADERS\\\",35718:\\\"ACTIVE_UNIFORMS\\\",35719:\\\"ACTIVE_UNIFORM_MAX_LENGTH\\\",35720:\\\"SHADER_SOURCE_LENGTH\\\",35721:\\\"ACTIVE_ATTRIBUTES\\\",35722:\\\"ACTIVE_ATTRIBUTE_MAX_LENGTH\\\",35724:\\\"SHADING_LANGUAGE_VERSION\\\",35725:\\\"CURRENT_PROGRAM\\\",36003:\\\"STENCIL_BACK_REF\\\",36004:\\\"STENCIL_BACK_VALUE_MASK\\\",36005:\\\"STENCIL_BACK_WRITEMASK\\\",36006:\\\"FRAMEBUFFER_BINDING\\\",36007:\\\"RENDERBUFFER_BINDING\\\",36048:\\\"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\\\",36049:\\\"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\\\",36050:\\\"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\\\",36051:\\\"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\\\",36053:\\\"FRAMEBUFFER_COMPLETE\\\",36054:\\\"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\\\",36055:\\\"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\\\",36057:\\\"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\\\",36061:\\\"FRAMEBUFFER_UNSUPPORTED\\\",36064:\\\"COLOR_ATTACHMENT0\\\",36096:\\\"DEPTH_ATTACHMENT\\\",36128:\\\"STENCIL_ATTACHMENT\\\",36160:\\\"FRAMEBUFFER\\\",36161:\\\"RENDERBUFFER\\\",36162:\\\"RENDERBUFFER_WIDTH\\\",36163:\\\"RENDERBUFFER_HEIGHT\\\",36164:\\\"RENDERBUFFER_INTERNAL_FORMAT\\\",36168:\\\"STENCIL_INDEX8\\\",36176:\\\"RENDERBUFFER_RED_SIZE\\\",36177:\\\"RENDERBUFFER_GREEN_SIZE\\\",36178:\\\"RENDERBUFFER_BLUE_SIZE\\\",36179:\\\"RENDERBUFFER_ALPHA_SIZE\\\",36180:\\\"RENDERBUFFER_DEPTH_SIZE\\\",36181:\\\"RENDERBUFFER_STENCIL_SIZE\\\",36194:\\\"RGB565\\\",36336:\\\"LOW_FLOAT\\\",36337:\\\"MEDIUM_FLOAT\\\",36338:\\\"HIGH_FLOAT\\\",36339:\\\"LOW_INT\\\",36340:\\\"MEDIUM_INT\\\",36341:\\\"HIGH_INT\\\",36346:\\\"SHADER_COMPILER\\\",36347:\\\"MAX_VERTEX_UNIFORM_VECTORS\\\",36348:\\\"MAX_VARYING_VECTORS\\\",36349:\\\"MAX_FRAGMENT_UNIFORM_VECTORS\\\",37440:\\\"UNPACK_FLIP_Y_WEBGL\\\",37441:\\\"UNPACK_PREMULTIPLY_ALPHA_WEBGL\\\",37442:\\\"CONTEXT_LOST_WEBGL\\\",37443:\\\"UNPACK_COLORSPACE_CONVERSION_WEBGL\\\",37444:\\\"BROWSER_DEFAULT_WEBGL\\\"}},{}],236:[function(t,e,r){var n=t(\\\"./1.0/numbers\\\");e.exports=function(t){return n[t]}},{\\\"./1.0/numbers\\\":235}],237:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"./shaders/index\\\"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return this.opacity>=1},l.isTransparent=function(){return this.opacity<1},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f<3;++f)e.lineWidth(this.lineWidth[f]),r.capSize=this.capSize[f]*u,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=u[n],a=0;a<i.length;++a){var o=i[a];t.push(e[0],e[1],e[2],r[0],r[1],r[2],r[3],o[0],o[1],o[2])}return i.length}l.update=function(t){\\\"lineWidth\\\"in(t=t||{})&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),\\\"capSize\\\"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),\\\"opacity\\\"in t&&(this.opacity=t.opacity);var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var i=[],a=r.length,o=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var s=0;s<3;++s){this.lineOffset[s]=o;t:for(var l=0;l<a;++l){for(var u=r[l],h=0;h<3;++h)if(isNaN(u[h])||!isFinite(u[h]))continue t;var p=n[l],d=e[s];if(Array.isArray(d[0])&&(d=e[l]),3===d.length&&(d=[d[0],d[1],d[2],1]),!isNaN(p[0][s])&&!isNaN(p[1][s])){var g;if(p[0][s]<0)(g=u.slice())[s]+=p[0][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+f(i,g,d,s);if(p[1][s]>0)(g=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+f(i,g,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{\\\"./shaders/index\\\":238,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310}],238:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position, offset;\\\\nattribute vec4 color;\\\\nuniform mat4 model, view, projection;\\\\nuniform float capSize;\\\\nvarying vec4 fragColor;\\\\nvarying vec3 fragPosition;\\\\n\\\\nvoid main() {\\\\n  vec4 worldPosition  = model * vec4(position, 1.0);\\\\n  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\\\\n  gl_Position         = projection * view * worldPosition;\\\\n  fragColor           = color;\\\\n  fragPosition        = position;\\\\n}\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform float opacity;\\\\nvarying vec3 fragPosition;\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], fragPosition)) discard;\\\\n\\\\n  gl_FragColor = opacity * fragColor;\\\\n}\\\"]);e.exports=function(t){return i(t,a,o,null,[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"offset\\\",type:\\\"vec3\\\"}])}},{\\\"gl-shader\\\":288,glslify:392}],239:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-texture2d\\\");e.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension(\\\"WEBGL_draw_buffers\\\");!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a<n;++a)i[a]=t.COLOR_ATTACHMENT0+a;for(var a=n;a<r;++a)i[a]=t.NONE;l[n]=i}}(t,c);Array.isArray(e)&&(n=r,r=0|e[1],e=0|e[0]);if(\\\"number\\\"!=typeof e)throw new Error(\\\"gl-fbo: Missing shape parameter\\\");var u=t.getParameter(t.MAX_RENDERBUFFER_SIZE);if(e<0||e>u||r<0||r>u)throw new Error(\\\"gl-fbo: Parameters are too large for FBO\\\");var f=1;if(\\\"color\\\"in(n=n||{})){if((f=Math.max(0|n.color,0))<0)throw new Error(\\\"gl-fbo: Must specify a nonnegative number of colors\\\");if(f>1){if(!c)throw new Error(\\\"gl-fbo: Multiple draw buffer extension not supported\\\");if(f>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error(\\\"gl-fbo: Context does not support \\\"+f+\\\" draw buffers\\\")}}var h=t.UNSIGNED_BYTE,p=t.getExtension(\\\"OES_texture_float\\\");if(n.float&&f>0){if(!p)throw new Error(\\\"gl-fbo: Context does not support floating point textures\\\");h=t.FLOAT}else n.preferFloat&&f>0&&p&&(h=t.FLOAT);var g=!0;\\\"depth\\\"in n&&(g=!!n.depth);var v=!1;\\\"stencil\\\"in n&&(v=!!n.stencil);return new d(t,e,r,h,f,g,v,c)};var i,a,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case i:throw new Error(\\\"gl-fbo: Framebuffer unsupported\\\");case a:throw new Error(\\\"gl-fbo: Framebuffer incomplete attachment\\\");case o:throw new Error(\\\"gl-fbo: Framebuffer incomplete dimensions\\\");case s:throw new Error(\\\"gl-fbo: Framebuffer incomplete missing attachment\\\");default:throw new Error(\\\"gl-fbo: Framebuffer failed for unspecified reason\\\")}}function h(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d<i;++d)this.color[d]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=n,this._useDepth=a,this._useStencil=o;var g=this,v=[0|e,0|r];Object.defineProperties(v,{0:{get:function(){return g._shape[0]},set:function(t){return g.width=t}},1:{get:function(){return g._shape[1]},set:function(t){return g.height=t}}}),this._shapeVector=v,function(t){var e=c(t.gl),r=t.gl,n=t.handle=r.createFramebuffer(),i=t._shape[0],a=t._shape[1],o=t.color.length,s=t._ext,d=t._useStencil,g=t._useDepth,v=t._colorType;r.bindFramebuffer(r.FRAMEBUFFER,n);for(var m=0;m<o;++m)t.color[m]=h(r,i,a,v,r.RGBA,r.COLOR_ATTACHMENT0+m);0===o?(t._color_rb=p(r,i,a,r.RGBA4,r.COLOR_ATTACHMENT0),s&&s.drawBuffersWEBGL(l[0])):o>1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension(\\\"WEBGL_depth_texture\\\");y?d?t.depth=h(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&&(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&&d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),m=0;m<t.color.length;++m)t.color[m].dispose(),t.color[m]=null;t._color_rb&&(r.deleteRenderbuffer(t._color_rb),t._color_rb=null),u(r,e),f(x)}u(r,e)}(this)}var g=d.prototype;function v(t,e,r){if(t._destroyed)throw new Error(\\\"gl-fbo: Can't resize destroyed FBO\\\");if(t._shape[0]!==e||t._shape[1]!==r){var n=t.gl,i=n.getParameter(n.MAX_RENDERBUFFER_SIZE);if(e<0||e>i||r<0||r>i)throw new Error(\\\"gl-fbo: Can't resize FBO, invalid dimensions\\\");t._shape[0]=e,t._shape[1]=r;for(var a=c(n),o=0;o<t.color.length;++o)t.color[o].shape=t._shape;t._color_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,t._color_rb),n.renderbufferStorage(n.RENDERBUFFER,n.RGBA4,t._shape[0],t._shape[1])),t.depth&&(t.depth.shape=t._shape),t._depth_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,t._depth_rb),t._useDepth&&t._useStencil?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t._shape[0],t._shape[1]):t._useDepth?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t._shape[0],t._shape[1]):t._useStencil&&n.renderbufferStorage(n.RENDERBUFFER,n.STENCIL_INDEX,t._shape[0],t._shape[1])),n.bindFramebuffer(n.FRAMEBUFFER,t.handle);var s=n.checkFramebufferStatus(n.FRAMEBUFFER);s!==n.FRAMEBUFFER_COMPLETE&&(t.dispose(),u(n,a),f(s)),u(n,a)}}Object.defineProperties(g,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error(\\\"gl-fbo: Shape vector must be length 2\\\");var e=0|t[0],r=0|t[1];return v(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return v(this,t|=0,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,v(this,this._shape[0],t),t},enumerable:!1}}),g.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},g.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e<this.color.length;++e)this.color[e].dispose(),this.color[e]=null;this._color_rb&&(t.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{\\\"gl-texture2d\\\":305}],240:[function(t,e,r){var n=t(\\\"sprintf-js\\\").sprintf,i=t(\\\"gl-constants/lookup\\\"),a=t(\\\"glsl-shader-name\\\"),o=t(\\\"add-line-numbers\\\");e.exports=function(t,e,r){\\\"use strict\\\";var s=a(e)||\\\"of unknown name (see npm glsl-shader-name)\\\",l=\\\"unknown type\\\";void 0!==r&&(l=r===i.FRAGMENT_SHADER?\\\"fragment\\\":\\\"vertex\\\");for(var c=n(\\\"Error compiling %s shader %s:\\\\n\\\",l,s),u=n(\\\"%s%s\\\",c,t),f=t.split(\\\"\\\\n\\\"),h={},p=0;p<f.length;p++){var d=f[p];if(\\\"\\\"!==d&&\\\"\\\\0\\\"!==d){var g=parseInt(d.split(\\\":\\\")[2]);if(isNaN(g))throw new Error(n(\\\"Could not parse error: %s\\\",d));h[g]=d}}for(var v=o(e).split(\\\"\\\\n\\\"),p=0;p<v.length;p++)if(h[p+3]||h[p+2]||h[p+1]){var m=v[p];if(c+=m+\\\"\\\\n\\\",h[p+1]){var y=h[p+1];y=y.substr(y.split(\\\":\\\",3).join(\\\":\\\").length+1).trim(),c+=n(\\\"^^^ %s\\\\n\\\\n\\\",y)}}return{long:c.trim(),short:u.trim()}}},{\\\"add-line-numbers\\\":49,\\\"gl-constants/lookup\\\":236,\\\"glsl-shader-name\\\":384,\\\"sprintf-js\\\":504}],241:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=t.gl,n=o(r,l.vertex,l.fragment),i=o(r,l.pickVertex,l.pickFragment),a=s(r),u=s(r),f=s(r),h=s(r),p=new c(t,n,i,a,u,f,h);return p.update(e),t.addObject(p),p};var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"iota-array\\\"),a=t(\\\"typedarray-pool\\\"),o=t(\\\"gl-shader\\\"),s=t(\\\"gl-buffer\\\"),l=t(\\\"./lib/shaders\\\");function c(t,e,r,n,i,a,o){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.weightBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var u,f=c.prototype,h=[0,0,1,0,0,1,1,0,1,1,0,1];f.draw=(u=[1,0,0,0,1,0,0,0,1],function(){var t=this.plot,e=this.shader,r=this.bounds,n=this.numVertices;if(!(n<=0)){var i=t.gl,a=t.dataBox,o=r[2]-r[0],s=r[3]-r[1],l=a[2]-a[0],c=a[3]-a[1];u[0]=2*o/l,u[4]=2*s/c,u[6]=2*(r[0]-a[0])/l-1,u[7]=2*(r[1]-a[1])/c-1,e.bind();var f=e.uniforms;f.viewTransform=u,f.shape=this.shape;var h=e.attributes;this.positionBuffer.bind(),h.position.pointer(),this.weightBuffer.bind(),h.weight.pointer(i.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),h.color.pointer(i.UNSIGNED_BYTE,!0),i.drawArrays(i.TRIANGLES,0,n)}}),f.drawPick=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=this.plot,i=this.pickShader,a=this.bounds,o=this.numVertices;if(!(o<=0)){var s=n.gl,l=n.dataBox,c=a[2]-a[0],u=a[3]-a[1],f=l[2]-l[0],h=l[3]-l[1];t[0]=2*c/f,t[4]=2*u/h,t[6]=2*(a[0]-l[0])/f-1,t[7]=2*(a[1]-l[1])/h-1;for(var p=0;p<4;++p)e[p]=r>>8*p&255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=i.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r<n||r>=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},f.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=o;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,f=this.bounds,p=f[0]=r[0],d=f[1]=o[0],g=1/((f[2]=r[r.length-1])-p),v=1/((f[3]=o[o.length-1])-d),m=e[0],y=e[1];this.shape=[m,y];var x=(m-1)*(y-1)*(h.length>>>1);this.numVertices=x;for(var b=a.mallocUint8(4*x),_=a.mallocFloat32(2*x),w=a.mallocUint8(2*x),k=a.mallocUint32(x),M=0,A=0;A<y-1;++A)for(var T=v*(o[A]-d),S=v*(o[A+1]-d),C=0;C<m-1;++C)for(var E=g*(r[C]-p),L=g*(r[C+1]-p),z=0;z<h.length;z+=2){var O,I,P,D,R=h[z],B=h[z+1],F=s[(A+B)*m+(C+R)],N=n.le(l,F);if(N<0)O=c[0],I=c[1],P=c[2],D=c[3];else if(N===u-1)O=c[4*u-4],I=c[4*u-3],P=c[4*u-2],D=c[4*u-1];else{var j=(F-l[N])/(l[N+1]-l[N]),V=1-j,U=4*N,q=4*(N+1);O=V*c[U]+j*c[q],I=V*c[U+1]+j*c[q+1],P=V*c[U+2]+j*c[q+2],D=V*c[U+3]+j*c[q+3]}b[4*M]=255*O,b[4*M+1]=255*I,b[4*M+2]=255*P,b[4*M+3]=255*D,_[2*M]=.5*E+.5*L,_[2*M+1]=.5*T+.5*S,w[2*M]=R,w[2*M+1]=B,k[M]=A*m+C,M+=1}this.positionBuffer.update(_),this.weightBuffer.update(w),this.colorBuffer.update(b),this.idBuffer.update(k),a.free(_),a.free(b),a.free(w),a.free(k)},f.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},{\\\"./lib/shaders\\\":242,\\\"binary-search-bounds\\\":243,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288,\\\"iota-array\\\":399,\\\"typedarray-pool\\\":522}],242:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\");e.exports={fragment:n([\\\"precision lowp float;\\\\n#define GLSLIFY 1\\\\nvarying vec4 fragColor;\\\\nvoid main() {\\\\n  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\\\\n}\\\\n\\\"]),vertex:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position;\\\\nattribute vec4 color;\\\\nattribute vec2 weight;\\\\n\\\\nuniform vec2 shape;\\\\nuniform mat3 viewTransform;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\\\\n  fragColor = color;\\\\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\\\\n}\\\\n\\\"]),pickFragment:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragId;\\\\nvarying vec2 vWeight;\\\\n\\\\nuniform vec2 shape;\\\\nuniform vec4 pickOffset;\\\\n\\\\nvoid main() {\\\\n  vec2 d = step(.5, vWeight);\\\\n  vec4 id = fragId + pickOffset;\\\\n  id.x += d.x + d.y*shape.x;\\\\n\\\\n  id.y += floor(id.x / 256.0);\\\\n  id.x -= floor(id.x / 256.0) * 256.0;\\\\n\\\\n  id.z += floor(id.y / 256.0);\\\\n  id.y -= floor(id.y / 256.0) * 256.0;\\\\n\\\\n  id.w += floor(id.z / 256.0);\\\\n  id.z -= floor(id.z / 256.0) * 256.0;\\\\n\\\\n  gl_FragColor = id/255.;\\\\n}\\\\n\\\"]),pickVertex:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position;\\\\nattribute vec4 pickId;\\\\nattribute vec2 weight;\\\\n\\\\nuniform vec2 shape;\\\\nuniform mat3 viewTransform;\\\\n\\\\nvarying vec4 fragId;\\\\nvarying vec2 vWeight;\\\\n\\\\nvoid main() {\\\\n  vWeight = weight;\\\\n\\\\n  fragId = pickId;\\\\n\\\\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\\\\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\\\\n}\\\\n\\\"])}},{glslify:392}],243:[function(t,e,r){arguments[4][99][0].apply(r,arguments)},{dup:99}],244:[function(t,e,r){var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position, nextPosition;\\\\nattribute float arcLength, lineWidth;\\\\nattribute vec4 color;\\\\n\\\\nuniform vec2 screenShape;\\\\nuniform float pixelRatio;\\\\nuniform mat4 model, view, projection;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec3 worldPosition;\\\\nvarying float pixelArcLength;\\\\n\\\\nvec4 project(vec3 p) {\\\\n  return projection * view * model * vec4(p, 1.0);\\\\n}\\\\n\\\\nvoid main() {\\\\n  vec4 startPoint = project(position);\\\\n  vec4 endPoint   = project(nextPosition);\\\\n\\\\n  vec2 A = startPoint.xy / startPoint.w;\\\\n  vec2 B =   endPoint.xy /   endPoint.w;\\\\n\\\\n  float clipAngle = atan(\\\\n    (B.y - A.y) * screenShape.y,\\\\n    (B.x - A.x) * screenShape.x\\\\n  );\\\\n\\\\n  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(\\\\n    sin(clipAngle),\\\\n    -cos(clipAngle)\\\\n  ) / screenShape;\\\\n\\\\n  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);\\\\n\\\\n  worldPosition = position;\\\\n  pixelArcLength = arcLength;\\\\n  fragColor = color;\\\\n}\\\\n\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3      clipBounds[2];\\\\nuniform sampler2D dashTexture;\\\\nuniform float     dashScale;\\\\nuniform float     opacity;\\\\n\\\\nvarying vec3    worldPosition;\\\\nvarying float   pixelArcLength;\\\\nvarying vec4    fragColor;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\\\\n\\\\n  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\\\\n  if(dashWeight < 0.5) {\\\\n    discard;\\\\n  }\\\\n  gl_FragColor = fragColor * opacity;\\\\n}\\\\n\\\"]),s=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\n#define FLOAT_MAX  1.70141184e38\\\\n#define FLOAT_MIN  1.17549435e-38\\\\n\\\\nlowp vec4 encode_float_1540259130(highp float v) {\\\\n  highp float av = abs(v);\\\\n\\\\n  //Handle special cases\\\\n  if(av < FLOAT_MIN) {\\\\n    return vec4(0.0, 0.0, 0.0, 0.0);\\\\n  } else if(v > FLOAT_MAX) {\\\\n    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\\\\n  } else if(v < -FLOAT_MAX) {\\\\n    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\\\\n  }\\\\n\\\\n  highp vec4 c = vec4(0,0,0,0);\\\\n\\\\n  //Compute exponent and mantissa\\\\n  highp float e = floor(log2(av));\\\\n  highp float m = av * pow(2.0, -e) - 1.0;\\\\n  \\\\n  //Unpack mantissa\\\\n  c[1] = floor(128.0 * m);\\\\n  m -= c[1] / 128.0;\\\\n  c[2] = floor(32768.0 * m);\\\\n  m -= c[2] / 32768.0;\\\\n  c[3] = floor(8388608.0 * m);\\\\n  \\\\n  //Unpack exponent\\\\n  highp float ebias = e + 127.0;\\\\n  c[0] = floor(ebias / 2.0);\\\\n  ebias -= c[0] * 2.0;\\\\n  c[1] += floor(ebias) * 128.0; \\\\n\\\\n  //Unpack sign bit\\\\n  c[0] += 128.0 * step(0.0, -v);\\\\n\\\\n  //Scale back to range\\\\n  return c / 255.0;\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform float pickId;\\\\nuniform vec3 clipBounds[2];\\\\n\\\\nvarying vec3 worldPosition;\\\\nvarying float pixelArcLength;\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickId/255.0, encode_float_1540259130(pixelArcLength).xyz);\\\\n}\\\"]),l=[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"nextPosition\\\",type:\\\"vec3\\\"},{name:\\\"arcLength\\\",type:\\\"float\\\"},{name:\\\"lineWidth\\\",type:\\\"float\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"}];r.createShader=function(t){return i(t,a,o,null,l)},r.createPickShader=function(t){return i(t,a,s,null,l)}},{\\\"gl-shader\\\":288,glslify:392}],245:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=f(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),c=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),h=l(new Array(1024),[256,1,4]),p=0;p<1024;++p)h.data[p]=255;var d=a(e,h);d.wrap=e.REPEAT;var g=new v(e,r,o,s,c,d);return g.update(t),g};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"gl-texture2d\\\"),o=t(\\\"glsl-read-float\\\"),s=t(\\\"binary-search-bounds\\\"),l=t(\\\"ndarray\\\"),c=t(\\\"./lib/shaders\\\"),u=c.createShader,f=c.createPickShader,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function d(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.dirty=!0,this.pixelRatio=1}var m=v.prototype;m.isTransparent=function(){return this.opacity<1},m.isOpaque=function(){return this.opacity>=1},m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.drawTransparent=m.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||h,view:t.view||h,projection:t.projection||h,clipBounds:d(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||h,view:t.view||h,projection:t.projection||h,pickId:this.pickId,clipBounds:d(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;\\\"dashScale\\\"in t&&(this.dashScale=t.dashScale),\\\"opacity\\\"in t&&(this.opacity=+t.opacity);var i=[],a=[],o=[],c=0,u=0,f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=t.position||t.positions;if(h){var d=t.color||t.colors||[0,0,0,1],g=t.lineWidth||1,v=!1;t:for(e=1;e<h.length;++e){var m,y,x,b=h[e-1],_=h[e];for(a.push(c),o.push(b.slice()),r=0;r<3;++r){if(isNaN(b[r])||isNaN(_[r])||!isFinite(b[r])||!isFinite(_[r])){if(!n&&i.length>0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,v=!0}continue t}f[0][r]=Math.min(f[0][r],b[r],_[r]),f[1][r]=Math.max(f[1][r],b[r],_[r])}Array.isArray(d[0])?(m=d.length>e-1?d[e-1]:d.length>0?d[d.length-1]:[0,0,0,1],y=d.length>e?d[e]:d.length>0?d[d.length-1]:[0,0,0,1]):m=y=d,3===m.length&&(m=[m[0],m[1],m[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),x=Array.isArray(g)?g.length>e-1?g[e-1]:g.length>0?g[g.length-1]:[0,0,0,1]:g;var k=c;if(c+=p(b,_),v){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3]);u+=2,v=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],c,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],c,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),a.push(c),o.push(h[h.length-1].slice()),this.bounds=f,this.vertexCount=u,this.points=o,this.arcLength=a,\\\"dashes\\\"in t){var M=t.dashes.slice();for(M.unshift(0),e=1;e<M.length;++e)M[e]=M[e-1]+M[e];var A=l(new Array(1024),[256,1,4]);for(e=0;e<256;++e){for(r=0;r<4;++r)A.set(e,0,r,0);1&s.le(M,M[M.length-1]*e/255)?A.set(e,0,0,0):A.set(e,0,0,255)}this.texture.setPixels(A)}},m.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},m.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=o(t.value[0],t.value[1],t.value[2],0),r=s.le(this.arcLength,e);if(r<0)return null;if(r===this.arcLength.length-1)return new g(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),r);for(var n=this.points[r],i=this.points[Math.min(r+1,this.points.length-1)],a=(e-this.arcLength[r])/(this.arcLength[r+1]-this.arcLength[r]),l=1-a,c=[0,0,0],u=0;u<3;++u)c[u]=l*n[u]+a*i[u];var f=Math.min(a<.5?r:r+1,this.points.length-1);return new g(e,c,f,this.points[f])}},{\\\"./lib/shaders\\\":244,\\\"binary-search-bounds\\\":79,\\\"gl-buffer\\\":230,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,\\\"glsl-read-float\\\":383,ndarray:433}],246:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*a-i*n;return o?(o=1/o,t[0]=a*o,t[1]=-n*o,t[2]=-i*o,t[3]=r*o,t):null}},{}],247:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=u*o-s*c,h=-u*a+s*l,p=c*a-o*l,d=r*f+n*h+i*p;return d?(d=1/d,t[0]=f*d,t[1]=(-u*n+i*c)*d,t[2]=(s*n-i*o)*d,t[3]=h*d,t[4]=(u*r-i*l)*d,t[5]=(-s*r+i*a)*d,t[6]=p*d,t[7]=(-c*r+n*l)*d,t[8]=(o*r-n*a)*d,t):null}},{}],248:[function(t,e,r){e.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],249:[function(t,e,r){e.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],250:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],p=t[12],d=t[13],g=t[14],v=t[15];return(e*o-r*a)*(f*v-h*g)-(e*s-n*a)*(u*v-h*d)+(e*l-i*a)*(u*g-f*d)+(r*s-n*o)*(c*v-h*p)-(r*l-i*o)*(c*g-f*p)+(n*l-i*s)*(c*d-u*p)}},{}],251:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,c=r*o,u=n*o,f=n*s,h=i*o,p=i*s,d=i*l,g=a*o,v=a*s,m=a*l;return t[0]=1-f-d,t[1]=u+m,t[2]=h-v,t[3]=0,t[4]=u-m,t[5]=1-c-d,t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],252:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,c=a+a,u=n*s,f=n*l,h=n*c,p=i*l,d=i*c,g=a*c,v=o*s,m=o*l,y=o*c;return t[0]=1-(p+g),t[1]=f+y,t[2]=h-m,t[3]=0,t[4]=f-y,t[5]=1-(u+g),t[6]=d+v,t[7]=0,t[8]=h+m,t[9]=d-v,t[10]=1-(u+p),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},{}],253:[function(t,e,r){e.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],254:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],v=e[14],m=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,k=i*c-a*l,M=u*g-f*d,A=u*v-h*d,T=u*m-p*d,S=f*v-h*g,C=f*m-p*g,E=h*m-p*v,L=y*E-x*C+b*S+_*T-w*A+k*M;if(!L)return null;return L=1/L,t[0]=(s*E-l*C+c*S)*L,t[1]=(i*C-n*E-a*S)*L,t[2]=(g*k-v*w+m*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*T-o*E-c*A)*L,t[5]=(r*E-i*T+a*A)*L,t[6]=(v*b-d*k-m*x)*L,t[7]=(u*k-h*b+p*x)*L,t[8]=(o*C-s*T+c*M)*L,t[9]=(n*T-r*C-a*M)*L,t[10]=(d*w-g*b+m*y)*L,t[11]=(f*b-u*w-p*y)*L,t[12]=(s*A-o*S-l*M)*L,t[13]=(r*S-n*A+i*M)*L,t[14]=(g*x-d*_-v*y)*L,t[15]=(u*_-f*x+h*y)*L,t}},{}],255:[function(t,e,r){var n=t(\\\"./identity\\\");e.exports=function(t,e,r,i){var a,o,s,l,c,u,f,h,p,d,g=e[0],v=e[1],m=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],k=r[2];if(Math.abs(g-_)<1e-6&&Math.abs(v-w)<1e-6&&Math.abs(m-k)<1e-6)return n(t);f=g-_,h=v-w,p=m-k,d=1/Math.sqrt(f*f+h*h+p*p),a=x*(p*=d)-b*(h*=d),o=b*(f*=d)-y*p,s=y*h-x*f,(d=Math.sqrt(a*a+o*o+s*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0);l=h*s-p*o,c=p*a-f*s,u=f*o-h*a,(d=Math.sqrt(l*l+c*c+u*u))?(l*=d=1/d,c*=d,u*=d):(l=0,c=0,u=0);return t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=u,t[10]=p,t[11]=0,t[12]=-(a*g+o*v+s*m),t[13]=-(l*g+c*v+u*m),t[14]=-(f*g+h*v+p*m),t[15]=1,t}},{\\\"./identity\\\":253}],256:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*v,t[2]=x*a+b*c+_*p+w*m,t[3]=x*o+b*u+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*v,t[6]=x*a+b*c+_*p+w*m,t[7]=x*o+b*u+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*v,t[10]=x*a+b*c+_*p+w*m,t[11]=x*o+b*u+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*v,t[14]=x*a+b*c+_*p+w*m,t[15]=x*o+b*u+_*d+w*y,t}},{}],257:[function(t,e,r){e.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},{}],258:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c,u,f,h,p,d,g,v,m,y,x,b,_,w,k,M,A,T,S,C=n[0],E=n[1],L=n[2],z=Math.sqrt(C*C+E*E+L*L);if(Math.abs(z)<1e-6)return null;C*=z=1/z,E*=z,L*=z,i=Math.sin(r),a=Math.cos(r),o=1-a,s=e[0],l=e[1],c=e[2],u=e[3],f=e[4],h=e[5],p=e[6],d=e[7],g=e[8],v=e[9],m=e[10],y=e[11],x=C*C*o+a,b=E*C*o+L*i,_=L*C*o-E*i,w=C*E*o-L*i,k=E*E*o+a,M=L*E*o+C*i,A=C*L*o+E*i,T=E*L*o-C*i,S=L*L*o+a,t[0]=s*x+f*b+g*_,t[1]=l*x+h*b+v*_,t[2]=c*x+p*b+m*_,t[3]=u*x+d*b+y*_,t[4]=s*w+f*k+g*M,t[5]=l*w+h*k+v*M,t[6]=c*w+p*k+m*M,t[7]=u*w+d*k+y*M,t[8]=s*A+f*T+g*S,t[9]=l*A+h*T+v*S,t[10]=c*A+p*T+m*S,t[11]=u*A+d*T+y*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},{}],259:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},{}],260:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[8],u=e[9],f=e[10],h=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=a*i-c*n,t[1]=o*i-u*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+c*i,t[9]=o*n+u*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},{}],261:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},{}],262:[function(t,e,r){e.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],263:[function(t,e,r){e.exports=function(t,e,r){var n,i,a,o,s,l,c,u,f,h,p,d,g=r[0],v=r[1],m=r[2];e===t?(t[12]=e[0]*g+e[4]*v+e[8]*m+e[12],t[13]=e[1]*g+e[5]*v+e[9]*m+e[13],t[14]=e[2]*g+e[6]*v+e[10]*m+e[14],t[15]=e[3]*g+e[7]*v+e[11]*m+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*v+f*m+e[12],t[13]=i*g+l*v+h*m+e[13],t[14]=a*g+c*v+p*m+e[14],t[15]=o*g+u*v+d*m+e[15]);return t}},{}],264:[function(t,e,r){e.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},{}],265:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){switch(e.length){case 0:break;case 1:t[0]=1/e[0];break;case 4:n(t,e);break;case 9:i(t,e);break;case 16:a(t,e);break;default:throw new Error(\\\"currently supports matrices up to 4x4\\\")}return t};var n=t(\\\"gl-mat2/invert\\\"),i=t(\\\"gl-mat3/invert\\\"),a=t(\\\"gl-mat4/invert\\\")},{\\\"gl-mat2/invert\\\":246,\\\"gl-mat3/invert\\\":247,\\\"gl-mat4/invert\\\":254}],266:[function(t,e,r){arguments[4][232][0].apply(r,arguments)},{barycentric:61,dup:232,\\\"polytope-closest-point/lib/closest_point_2d.js\\\":464}],267:[function(t,e,r){var n=t(\\\"glslify\\\"),i=n([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position, normal;\\\\nattribute vec4 color;\\\\nattribute vec2 uv;\\\\n\\\\nuniform mat4 model\\\\n           , view\\\\n           , projection;\\\\nuniform vec3 eyePosition\\\\n           , lightPosition;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  vec4 m_position  = model * vec4(position, 1.0);\\\\n  vec4 t_position  = view * m_position;\\\\n  gl_Position      = projection * t_position;\\\\n  f_color          = color;\\\\n  f_normal         = normal;\\\\n  f_data           = position;\\\\n  f_eyeDirection   = eyePosition   - position;\\\\n  f_lightDirection = lightPosition - position;\\\\n  f_uv             = uv;\\\\n}\\\\n\\\"]),a=n([\\\"#extension GL_OES_standard_derivatives : enable\\\\n\\\\nprecision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat beckmannDistribution(float x, float roughness) {\\\\n  float NdotH = max(x, 0.0001);\\\\n  float cos2Alpha = NdotH * NdotH;\\\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\\\n  float roughness2 = roughness * roughness;\\\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\\\n  return exp(tan2Alpha / roughness2) / denom;\\\\n}\\\\n\\\\nfloat cookTorranceSpecular(\\\\n  vec3 lightDirection,\\\\n  vec3 viewDirection,\\\\n  vec3 surfaceNormal,\\\\n  float roughness,\\\\n  float fresnel) {\\\\n\\\\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\\\\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\\\\n\\\\n  //Half angle vector\\\\n  vec3 H = normalize(lightDirection + viewDirection);\\\\n\\\\n  //Geometric term\\\\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\\\\n  float VdotH = max(dot(viewDirection, H), 0.000001);\\\\n  float LdotH = max(dot(lightDirection, H), 0.000001);\\\\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\\\\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\\\\n  float G = min(1.0, min(G1, G2));\\\\n  \\\\n  //Distribution term\\\\n  float D = beckmannDistribution(NdotH, roughness);\\\\n\\\\n  //Fresnel term\\\\n  float F = pow(1.0 - VdotN, fresnel);\\\\n\\\\n  //Multiply terms and done\\\\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\\\\n}\\\\n\\\\nvec3 normals(vec3 pos) {\\\\n  vec3 fdx = dFdx(pos);\\\\n  vec3 fdy = dFdy(pos);\\\\n  return normalize(cross(fdx, fdy));\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform float roughness\\\\n            , fresnel\\\\n            , kambient\\\\n            , kdiffuse\\\\n            , kspecular\\\\n            , opacity;\\\\nuniform sampler2D texture;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\\\\n\\\\n  vec3 N = normalize(f_normal);\\\\n  vec3 L = normalize(f_lightDirection);\\\\n  vec3 V = normalize(f_eyeDirection);\\\\n\\\\n  vec3 normal = normals(f_data);\\\\n\\\\n  if (dot(N, normal) < 0.0) {\\\\n    N = -N;\\\\n  }\\\\n\\\\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\\\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\\\n\\\\n  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\\\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\\\n\\\\n  gl_FragColor = litColor * opacity;\\\\n}\\\\n\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 uv;\\\\n\\\\nuniform mat4 model, view, projection;\\\\n\\\\nvarying vec4 f_color;\\\\nvarying vec3 f_data;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  gl_Position = projection * view * model * vec4(position, 1.0);\\\\n  f_color = color;\\\\n  f_data  = position;\\\\n  f_uv    = uv;\\\\n}\\\"]),s=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform sampler2D texture;\\\\nuniform float opacity;\\\\n\\\\nvarying vec4 f_color;\\\\nvarying vec3 f_data;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\\\\n\\\\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\\\\n}\\\"]),l=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 uv;\\\\nattribute float pointSize;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 clipBounds[2];\\\\n\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    gl_Position = projection * view * model * vec4(position, 1.0);\\\\n  }\\\\n  gl_PointSize = pointSize;\\\\n  f_color = color;\\\\n  f_uv = uv;\\\\n}\\\"]),c=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform sampler2D texture;\\\\nuniform float opacity;\\\\n\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  vec2 pointR = gl_PointCoord.xy - vec2(0.5,0.5);\\\\n  if(dot(pointR, pointR) > 0.25) {\\\\n    discard;\\\\n  }\\\\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\\\\n}\\\"]),u=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  gl_Position = projection * view * model * vec4(position, 1.0);\\\\n  f_id        = id;\\\\n  f_position  = position;\\\\n}\\\"]),f=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3  clipBounds[2];\\\\nuniform float pickId;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\\\n}\\\"]),h=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3  position;\\\\nattribute float pointSize;\\\\nattribute vec4  id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 clipBounds[2];\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    gl_Position  = projection * view * model * vec4(position, 1.0);\\\\n    gl_PointSize = pointSize;\\\\n  }\\\\n  f_id         = id;\\\\n  f_position   = position;\\\\n}\\\"]),p=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position;\\\\n\\\\nuniform mat4 model, view, projection;\\\\n\\\\nvoid main() {\\\\n  gl_Position = projection * view * model * vec4(position, 1.0);\\\\n}\\\"]),d=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform vec3 contourColor;\\\\n\\\\nvoid main() {\\\\n  gl_FragColor = vec4(contourColor,1);\\\\n}\\\\n\\\"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"},{name:\\\"pointSize\\\",type:\\\"float\\\"}]},r.pickShader={vertex:u,fragment:f,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"}]},r.pointPickShader={vertex:h,fragment:f,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"pointSize\\\",type:\\\"float\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:\\\"position\\\",type:\\\"vec3\\\"}]}},{glslify:392}],268:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"gl-texture2d\\\"),s=t(\\\"normals\\\"),l=t(\\\"gl-mat4/multiply\\\"),c=t(\\\"gl-mat4/invert\\\"),u=t(\\\"ndarray\\\"),f=t(\\\"colormap\\\"),h=t(\\\"simplicial-complex-contour\\\"),p=t(\\\"typedarray-pool\\\"),d=t(\\\"./lib/shaders\\\"),g=t(\\\"./lib/closest-point\\\"),v=d.meshShader,m=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,v,m,y,x,b,_,k,M,A,T,S){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=v,this.edgeUVs=m,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=M,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=T,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var M=k.prototype;function A(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function T(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function S(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function C(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}M.isOpaque=function(){return this.opacity>=1},M.isTransparent=function(){return this.opacity<1},M.pickSlots=1,M.setPickBase=function(t){this.pickId=t},M.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var c=r[l],u=0;u<2;++u){var f=c[0];2===c.length&&(f=c[u]);for(var d=n[f][0],g=n[f][1],v=i[f],m=1-v,y=this.positions[d],x=this.positions[g],b=0;b<3;++b)o[s++]=v*y[b]+m*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},M.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\\\"contourEnable\\\"in t&&(this.contourEnable=t.contourEnable),\\\"contourColor\\\"in t&&(this.contourColor=t.contourColor),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"lightPosition\\\"in t&&(this.lightPosition=t.lightPosition),\\\"opacity\\\"in t&&(this.opacity=t.opacity),\\\"ambient\\\"in t&&(this.ambientLight=t.ambient),\\\"diffuse\\\"in t&&(this.diffuseLight=t.diffuse),\\\"specular\\\"in t&&(this.specularLight=t.specular),\\\"roughness\\\"in t&&(this.roughness=t.roughness),\\\"fresnel\\\"in t&&(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:\\\"rgba\\\"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions;if(n&&r){var i=[],a=[],l=[],c=[],h=[],p=[],d=[],g=[],v=[],m=[],y=[],x=[],b=[],_=[];this.cells=r,this.positions=n;var w=t.vertexNormals,k=t.cellNormals,M=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,A=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!k&&(k=s.faceNormals(r,n,A)),k||w||(w=s.vertexNormals(r,n,M));var T=t.vertexColors,S=t.cellColors,C=t.meshColor||[1,1,1,1],E=t.vertexUVs,L=t.vertexIntensity,z=t.cellUVs,O=t.cellIntensity,I=1/0,P=-1/0;if(!E&&!z)if(L)if(t.vertexIntensityBounds)I=+t.vertexIntensityBounds[0],P=+t.vertexIntensityBounds[1];else for(var D=0;D<L.length;++D){var R=L[D];I=Math.min(I,R),P=Math.max(P,R)}else if(O)for(D=0;D<O.length;++D){R=O[D];I=Math.min(I,R),P=Math.max(P,R)}else for(D=0;D<n.length;++D){R=n[D][2];I=Math.min(I,R),P=Math.max(P,R)}this.intensity=L||(O?function(t,e,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=0;var a=t.length;for(i=0;i<a;++i)for(var o=t[i],s=0;s<o.length;++s)n[o[s]]=r[i];return n}(r,n.length,O):function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n));var B=t.pointSizes,F=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(D=0;D<n.length;++D)for(var N=n[D],j=0;j<3;++j)!isNaN(N[j])&&isFinite(N[j])&&(this.bounds[0][j]=Math.min(this.bounds[0][j],N[j]),this.bounds[1][j]=Math.max(this.bounds[1][j],N[j]));var V=0,U=0,q=0;t:for(D=0;D<r.length;++D){var H=r[D];switch(H.length){case 1:for(N=n[W=H[0]],j=0;j<3;++j)if(isNaN(N[j])||!isFinite(N[j]))continue t;m.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:C).length?y.push(Y[0],Y[1],Y[2],1):y.push(Y[0],Y[1],Y[2],Y[3]),X=E?E[W]:L?[(L[W]-I)/(P-I),0]:z?z[D]:O?[(O[D]-I)/(P-I),0]:[(N[2]-I)/(P-I),0],x.push(X[0],X[1]),B?b.push(B[W]):b.push(F),_.push(D),q+=1;break;case 2:for(j=0;j<2;++j){N=n[W=H[j]];for(var G=0;G<3;++G)if(isNaN(N[G])||!isFinite(N[G]))continue t}for(j=0;j<2;++j){N=n[W=H[j]];p.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:C).length?d.push(Y[0],Y[1],Y[2],1):d.push(Y[0],Y[1],Y[2],Y[3]),X=E?E[W]:L?[(L[W]-I)/(P-I),0]:z?z[D]:O?[(O[D]-I)/(P-I),0]:[(N[2]-I)/(P-I),0],g.push(X[0],X[1]),v.push(D)}U+=1;break;case 3:for(j=0;j<3;++j)for(N=n[W=H[j]],G=0;G<3;++G)if(isNaN(N[G])||!isFinite(N[G]))continue t;for(j=0;j<3;++j){var W,Y,X,Z;N=n[W=H[j]];i.push(N[0],N[1],N[2]),3===(Y=T?T[W]:S?S[D]:C).length?a.push(Y[0],Y[1],Y[2],1):a.push(Y[0],Y[1],Y[2],Y[3]),X=E?E[W]:L?[(L[W]-I)/(P-I),0]:z?z[D]:O?[(O[D]-I)/(P-I),0]:[(N[2]-I)/(P-I),0],c.push(X[0],X[1]),Z=w?w[W]:k[D],l.push(Z[0],Z[1],Z[2]),h.push(D)}V+=1}}this.pointCount=q,this.edgeCount=U,this.triangleCount=V,this.pointPositions.update(m),this.pointColors.update(y),this.pointUVs.update(x),this.pointSizes.update(b),this.pointIds.update(new Uint32Array(_)),this.edgePositions.update(p),this.edgeColors.update(d),this.edgeUVs.update(g),this.edgeIds.update(new Uint32Array(v)),this.trianglePositions.update(i),this.triangleColors.update(a),this.triangleUVs.update(c),this.triangleNormals.update(l),this.triangleIds.update(new Uint32Array(h))}},M.drawTransparent=M.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o<3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o<3;++o){for(var p=u[12+o],d=0;d<3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount>0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},M.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},M.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;a<r.length;++a)i[a]=n[r[a]];var o=g(i,[t.coord[0],this._resolution[1]-t.coord[1]],this._model,this._view,this._projection,this._resolution);if(!o)return null;var s=o[2],l=0;for(a=0;a<r.length;++a)l+=s[a]*this.intensity[r[a]];return{position:o[1],index:r[o[0]],cell:r,cellId:e,intensity:l,dataCoordinate:this.positions[r[o[0]]]}},M.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},e.exports=function(t,e){if(1===arguments.length&&(t=(e=t).gl),!(t.getExtension(\\\"OES_standard_derivatives\\\")||t.getExtension(\\\"MOZ_OES_standard_derivatives\\\")||t.getExtension(\\\"WEBKIT_OES_standard_derivatives\\\")))throw new Error(\\\"derivatives not supported\\\");var r=function(t){var e=n(t,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}(t),s=function(t){var e=n(t,m.vertex,m.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}(t),l=A(t),c=T(t),f=S(t),h=C(t),p=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=t.LINEAR_MIPMAP_LINEAR,p.magFilter=t.LINEAR;var d=i(t),g=i(t),y=i(t),x=i(t),b=i(t),_=a(t,[{buffer:d,type:t.FLOAT,size:3},{buffer:b,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:g,type:t.FLOAT,size:4},{buffer:y,type:t.FLOAT,size:2},{buffer:x,type:t.FLOAT,size:3}]),w=i(t),M=i(t),E=i(t),L=i(t),z=a(t,[{buffer:w,type:t.FLOAT,size:3},{buffer:L,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:E,type:t.FLOAT,size:2}]),O=i(t),I=i(t),P=i(t),D=i(t),R=i(t),B=a(t,[{buffer:O,type:t.FLOAT,size:3},{buffer:R,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:I,type:t.FLOAT,size:4},{buffer:P,type:t.FLOAT,size:2},{buffer:D,type:t.FLOAT,size:1}]),F=i(t),N=new k(t,p,r,s,l,c,f,h,d,b,g,y,x,_,w,L,M,E,z,O,R,I,P,D,B,F,a(t,[{buffer:F,type:t.FLOAT,size:3}]));return N.update(e),N}},{\\\"./lib/closest-point\\\":266,\\\"./lib/shaders\\\":267,colormap:114,\\\"gl-buffer\\\":230,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"gl-shader\\\":288,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,ndarray:433,normals:436,\\\"simplicial-complex-contour\\\":494,\\\"typedarray-pool\\\":522}],269:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e,[0,0,0,1,1,0,1,1]),s=i(e,a.boxVert,a.lineFrag);return new o(t,r,s)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-shader\\\"),a=t(\\\"./shaders\\\");function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},c.drawBox=(s=[0,0],l=[0,0],function(t,e,r,n,i){var a=this.plot,o=this.shader,c=a.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,o.uniforms.lo=s,o.uniforms.hi=l,o.uniforms.color=i,c.drawArrays(c.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":272,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288}],270:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e),a=i(e,o.gridVert,o.gridFrag),l=i(e,o.tickVert,o.gridFrag);return new s(t,r,a,l)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-shader\\\"),a=t(\\\"binary-search-bounds\\\"),o=t(\\\"./shaders\\\");function s(t,e,r,n){this.plot=t,this.vbo=e,this.shader=r,this.tickShader=n,this.ticks=[[],[]]}function l(t,e){return t-e}var c,u,f,h,p,d=s.prototype;d.draw=(c=[0,0],u=[0,0],f=[0,0],function(){for(var t=this.plot,e=this.vbo,r=this.shader,n=this.ticks,i=t.gl,a=t._tickBounds,o=t.dataBox,s=t.viewBox,l=t.gridLineWidth,h=t.gridLineColor,p=t.gridLineEnable,d=t.pixelRatio,g=0;g<2;++g){var v=a[g],m=a[g+2]-v,y=.5*(o[g+2]+o[g]),x=o[g+2]-o[g];u[g]=2*m/x,c[g]=2*(v-y)/x}r.bind(),e.bind(),r.attributes.dataCoord.pointer(),r.uniforms.dataShift=c,r.uniforms.dataScale=u;var b=0;for(g=0;g<2;++g){f[0]=f[1]=0,f[g]=1,r.uniforms.dataAxis=f,r.uniforms.lineWidth=l[g]/(s[g+2]-s[g])*d,r.uniforms.color=h[g];var _=6*n[g].length;p[g]&&_&&i.drawArrays(i.TRIANGLES,b,_),b+=_}}),d.drawTickMarks=function(){var t=[0,0],e=[0,0],r=[1,0],n=[0,1],i=[0,0],o=[0,0];return function(){for(var s=this.plot,c=this.vbo,u=this.tickShader,f=this.ticks,h=s.gl,p=s._tickBounds,d=s.dataBox,g=s.viewBox,v=s.pixelRatio,m=s.screenBox,y=m[2]-m[0],x=m[3]-m[1],b=g[2]-g[0],_=g[3]-g[1],w=0;w<2;++w){var k=p[w],M=p[w+2]-k,A=.5*(d[w+2]+d[w]),T=d[w+2]-d[w];e[w]=2*M/T,t[w]=2*(k-A)/T}e[0]*=b/y,t[0]*=b/y,e[1]*=_/x,t[1]*=_/x,u.bind(),c.bind(),u.attributes.dataCoord.pointer();var S=u.uniforms;S.dataShift=t,S.dataScale=e;var C=s.tickMarkLength,E=s.tickMarkWidth,L=s.tickMarkColor,z=6*f[0].length,O=Math.min(a.ge(f[0],(d[0]-p[0])/(p[2]-p[0]),l),f[0].length),I=Math.min(a.gt(f[0],(d[2]-p[0])/(p[2]-p[0]),l),f[0].length),P=0+6*O,D=6*Math.max(0,I-O),R=Math.min(a.ge(f[1],(d[1]-p[1])/(p[3]-p[1]),l),f[1].length),B=Math.min(a.gt(f[1],(d[3]-p[1])/(p[3]-p[1]),l),f[1].length),F=z+6*R,N=6*Math.max(0,B-R);i[0]=2*(g[0]-C[1])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=C[1]*v/y,o[1]=E[1]*v/x,N&&(S.color=L[1],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,F,N)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[1]-C[0])/x-1,o[0]=E[0]*v/y,o[1]=C[0]*v/x,D&&(S.color=L[0],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,P,D)),i[0]=2*(g[2]+C[3])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=C[3]*v/y,o[1]=E[3]*v/x,N&&(S.color=L[3],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,F,N)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[3]+C[2])/x-1,o[0]=E[2]*v/y,o[1]=C[2]*v/x,D&&(S.color=L[2],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,P,D))}}(),d.update=(h=[1,1,-1,-1,1,-1],p=[1,-1,1,1,-1,-1],function(t){for(var e=t.ticks,r=t.bounds,n=new Float32Array(18*(e[0].length+e[1].length)),i=(this.plot.zeroLineEnable,0),a=[[],[]],o=0;o<2;++o)for(var s=a[o],l=e[o],c=r[o],u=r[o+2],f=0;f<l.length;++f){var d=(l[f].x-c)/(u-c);s.push(d);for(var g=0;g<6;++g)n[i++]=d,n[i++]=h[g],n[i++]=p[g]}this.ticks=a,this.vbo.update(n)}),d.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{\\\"./shaders\\\":272,\\\"binary-search-bounds\\\":274,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288}],271:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e,[-1,-1,-1,1,1,-1,1,1]),s=i(e,a.lineVert,a.lineFrag);return new o(t,r,s)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-shader\\\"),a=t(\\\"./shaders\\\");function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},c.drawLine=(s=[0,0],l=[0,0],function(t,e,r,n,i,a){var o=this.plot,c=this.shader,u=o.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,c.uniforms.start=s,c.uniforms.end=l,c.uniforms.width=i*o.pixelRatio,c.uniforms.color=a,u.drawArrays(u.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":272,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288}],272:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=n([\\\"precision lowp float;\\\\n#define GLSLIFY 1\\\\nuniform vec4 color;\\\\nvoid main() {\\\\n  gl_FragColor = vec4(color.xyz * color.w, color.w);\\\\n}\\\\n\\\"]);e.exports={lineVert:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 coord;\\\\n\\\\nuniform vec4 screenBox;\\\\nuniform vec2 start, end;\\\\nuniform float width;\\\\n\\\\nvec2 perp(vec2 v) {\\\\n  return vec2(v.y, -v.x);\\\\n}\\\\n\\\\nvec2 screen(vec2 v) {\\\\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\\\n}\\\\n\\\\nvoid main() {\\\\n  vec2 delta = normalize(perp(start - end));\\\\n  vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\\\\n  gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\\\\n}\\\\n\\\"]),lineFrag:i,textVert:n([\\\"#define GLSLIFY 1\\\\nattribute vec3 textCoordinate;\\\\n\\\\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\\\\nuniform float angle;\\\\n\\\\nvoid main() {\\\\n  float dataOffset  = textCoordinate.z;\\\\n  vec2 glyphOffset  = textCoordinate.xy;\\\\n  mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\\\\n  vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\\\\n    glyphMatrix * glyphOffset * textScale + screenOffset;\\\\n  gl_Position = vec4(screenCoordinate, 0, 1);\\\\n}\\\\n\\\"]),textFrag:i,gridVert:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 dataCoord;\\\\n\\\\nuniform vec2 dataAxis, dataShift, dataScale;\\\\nuniform float lineWidth;\\\\n\\\\nvoid main() {\\\\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\\\\n  pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\\\\n  gl_Position = vec4(pos, 0, 1);\\\\n}\\\\n\\\"]),gridFrag:i,boxVert:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 coord;\\\\n\\\\nuniform vec4 screenBox;\\\\nuniform vec2 lo, hi;\\\\n\\\\nvec2 screen(vec2 v) {\\\\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\\\n}\\\\n\\\\nvoid main() {\\\\n  gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\\\\n}\\\\n\\\"]),tickVert:n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 dataCoord;\\\\n\\\\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\\\\n\\\\nvoid main() {\\\\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\\\\n  gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\\\\n}\\\\n\\\"])}},{glslify:392}],273:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e),a=i(e,s.textVert,s.textFrag);return new l(t,r,a)};var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-shader\\\"),a=t(\\\"text-cache\\\"),o=t(\\\"binary-search-bounds\\\"),s=t(\\\"./shaders\\\");function l(t,e,r){this.plot=t,this.vbo=e,this.shader=r,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var c,u,f,h,p,d,g=l.prototype;g.drawTicks=(c=[0,0],u=[0,0],f=[0,0],function(t){var e=this.plot,r=this.shader,n=this.tickX[t],i=this.tickOffset[t],a=e.gl,s=e.viewBox,l=e.dataBox,h=e.screenBox,p=e.pixelRatio,d=e.tickEnable,g=e.tickPad,v=e.tickColor,m=e.tickAngle,y=e.labelEnable,x=e.labelPad,b=e.labelColor,_=e.labelAngle,w=this.labelOffset[t],k=this.labelCount[t],M=o.lt(n,l[t]),A=o.le(n,l[t+2]);c[0]=c[1]=0,c[t]=1,u[t]=(s[2+t]+s[t])/(h[2+t]-h[t])-1;var T=2/h[2+(1^t)]-h[1^t];u[1^t]=T*s[1^t]-1,d[t]&&(u[1^t]-=T*p*g[t],M<A&&i[A]>i[M]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t],r.uniforms.angle=m[t],a.drawArrays(a.TRIANGLES,i[M],i[A]-i[M]))),y[t]&&k&&(u[1^t]-=T*p*x[t],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,k)),u[1^t]=T*s[2+(1^t)]-1,d[t+2]&&(u[1^t]+=T*p*g[t+2],M<A&&i[A]>i[M]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t+2],r.uniforms.angle=m[t+2],a.drawArrays(a.TRIANGLES,i[M],i[A]-i[M]))),y[t+2]&&k&&(u[1^t]+=T*p*x[t+2],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,k))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(h=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],f=a[o],g=a[o+2]-f,v=i[o],m=i[o+2]-v;p[o]=2*l/u*g/m,h[o]=2*(s-c)/u*g/m}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=h,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],f=[-1/0],h=l[o];for(e=0;e<h.length;++e){var p=h[e],d=p.x,g=p.text,v=p.font||\\\"sans-serif\\\";i=p.fontSize||12;for(var m=1/(c[o+2]-c[o]),y=c[o],x=g.split(\\\"\\\\n\\\"),b=0;b<x.length;b++)for(n=a(v,x[b]).data,r=0;r<n.length;r+=2)s.push(n[r]*i,-n[r+1]*i-b*i*1.2,(d-y)*m);u.push(Math.floor(s.length/3)),f.push(d)}this.tickOffset[o]=u,this.tickX[o]=f}for(o=0;o<2;++o){for(this.labelOffset[o]=Math.floor(s.length/3),n=a(t.labelFont[o],t.labels[o],{textAlign:\\\"center\\\"}).data,i=t.labelSize[o],e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.labelCount[o]=Math.floor(s.length/3)-this.labelOffset[o]}for(this.titleOffset=Math.floor(s.length/3),n=a(t.titleFont,t.title).data,i=t.titleSize,e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},g.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\\\"./shaders\\\":272,\\\"binary-search-bounds\\\":274,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288,\\\"text-cache\\\":513}],274:[function(t,e,r){arguments[4][99][0].apply(r,arguments)},{dup:99}],275:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=n(e,[e.drawingBufferWidth,e.drawingBufferHeight]),c=new l(e,r);return c.grid=i(c),c.text=a(c),c.line=o(c),c.box=s(c),c.update(t),c};var n=t(\\\"gl-select-static\\\"),i=t(\\\"./lib/grid\\\"),a=t(\\\"./lib/text\\\"),o=t(\\\"./lib/line\\\"),s=t(\\\"./lib/box\\\");function l(t,e){this.gl=t,this.pickBuffer=e,this.screenBox=[0,0,t.drawingBufferWidth,t.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var c=l.prototype;function u(t){for(var e=t.slice(),r=0;r<e.length;++r)e[r]=e[r].slice();return e}function f(t,e){return t.x-e.x}c.setDirty=function(){this.dirty=this.pickDirty=!0},c.setOverlayDirty=function(){this.dirty=!0},c.nextDepthValue=function(){return this._depthCounter++/65536},c.draw=function(){var t=this.gl,e=this.screenBox,r=this.viewBox,n=this.dataBox,i=this.pixelRatio,a=this.grid,o=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,t.bindFramebuffer(t.FRAMEBUFFER,null),t.enable(t.SCISSOR_TEST),t.disable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.depthMask(!1),t.enable(t.BLEND),t.blendEquation(t.FUNC_ADD,t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.borderColor){t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]);var c=this.borderColor;t.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}t.scissor(r[0],r[1],r[2]-r[0],r[3]-r[1]),t.viewport(r[0],r[1],r[2]-r[0],r[3]-r[1]);var u=this.backgroundColor;t.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),t.clear(t.COLOR_BUFFER_BIT),a.draw();var f=this.zeroLineEnable,h=this.zeroLineColor,p=this.zeroLineWidth;if(f[0]||f[1]){o.bind();for(var d=0;d<2;++d)if(f[d]&&n[d]<=0&&n[d+2]>=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],h[d]):o.drawLine(e[0],g,e[2],g,p[d],h[d])}}for(d=0;d<l.length;++d)l[d].draw();t.viewport(e[0],e[1],e[2]-e[0],e[3]-e[1]),t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.grid.drawTickMarks(),o.bind();var v=this.borderLineEnable,m=this.borderLineWidth,y=this.borderLineColor;for(v[1]&&o.drawLine(r[0],r[1]-.5*m[1]*i,r[0],r[3]+.5*m[3]*i,m[1],y[1]),v[0]&&o.drawLine(r[0]-.5*m[0]*i,r[1],r[2]+.5*m[2]*i,r[1],m[0],y[0]),v[3]&&o.drawLine(r[2],r[1]-.5*m[1]*i,r[2],r[3]+.5*m[3]*i,m[3],y[3]),v[2]&&o.drawLine(r[0]-.5*m[0]*i,r[3],r[2]+.5*m[2]*i,r[3],m[2],y[2]),s.bind(),d=0;d<2;++d)s.drawTicks(d);this.titleEnable&&s.drawTitle();var x=this.overlays;for(d=0;d<x.length;++d)x[d].draw();t.disable(t.SCISSOR_TEST),t.disable(t.BLEND),t.depthMask(!0)}},c.drawPick=function(){if(!this.static){var t=this.pickBuffer;this.gl;this._pickTimeout=null,t.begin();for(var e=1,r=this.objects,n=0;n<r.length;++n)e=r[n].drawPick(e);t.end()}},c.pick=function(t,e){if(!this.static){var r=this.pixelRatio,n=this.pickPixelRatio,i=this.viewBox,a=0|Math.round((t-i[0]/r)*n),o=0|Math.round((e-i[1]/r)*n),s=this.pickBuffer.query(a,o,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]<<8)+(s.value[1]<<16)+(s.value[2]<<24),c=this.objects,u=0;u<c.length;++u){var f=c[u].pick(a,o,l);if(f)return f}return null}},c.setScreenBox=function(t){var e=this.screenBox,r=this.pixelRatio;e[0]=0|Math.round(t[0]*r),e[1]=0|Math.round(t[1]*r),e[2]=0|Math.round(t[2]*r),e[3]=0|Math.round(t[3]*r),this.setDirty()},c.setDataBox=function(t){var e=this.dataBox;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3])&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this.setDirty())},c.setViewBox=function(t){var e=this.pixelRatio,r=this.viewBox;r[0]=0|Math.round(t[0]*e),r[1]=0|Math.round(t[1]*e),r[2]=0|Math.round(t[2]*e),r[3]=0|Math.round(t[3]*e);var n=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((t[2]-t[0])*n),0|Math.round((t[3]-t[1])*n)],this.setDirty()},c.update=function(t){t=t||{};var e=this.gl;this.pixelRatio=t.pixelRatio||1;var r=this.pixelRatio;this.pickPixelRatio=Math.max(r,1),this.setScreenBox(t.screenBox||[0,0,e.drawingBufferWidth/r,e.drawingBufferHeight/r]);this.screenBox;this.setViewBox(t.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/r,.125*(this.screenBox[3]-this.screenBox[1])/r,.875*(this.screenBox[2]-this.screenBox[0])/r,.875*(this.screenBox[3]-this.screenBox[1])/r]);var n=this.viewBox,i=(n[2]-n[0])/(n[3]-n[1]);this.setDataBox(t.dataBox||[-10,-10/i,10,10/i]),this.borderColor=!1!==t.borderColor&&(t.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(t.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(t.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(t.gridLineWidth||[1,1]).slice(),this.gridLineColor=u(t.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(t.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(t.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=u(t.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(t.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(t.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=u(t.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(t.titleCenter||[.5*(n[0]+n[2])/r,(n[3]+120)/r]).slice(),this.titleEnable=!(\\\"titleEnable\\\"in t&&!t.titleEnable),this.titleAngle=t.titleAngle||0,this.titleColor=(t.titleColor||[0,0,0,1]).slice(),this.labelPad=(t.labelPad||[15,15,15,15]).slice(),this.labelAngle=(t.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(t.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=u(t.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(t.tickPad||[15,15,15,15]).slice(),this.tickAngle=(t.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(t.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=u(t.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(t.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(t.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=u(t.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var a=t.ticks||[[],[]],o=this._tickBounds;o[0]=o[1]=1/0,o[2]=o[3]=-1/0;for(var s=0;s<2;++s){var l=a[s].slice(0);0!==l.length&&(l.sort(f),o[s]=Math.min(o[s],l[0].x),o[s+2]=Math.max(o[s+2],l[l.length-1].x))}this.grid.update({bounds:o,ticks:a}),this.text.update({bounds:o,ticks:a,labels:t.labels||[\\\"x\\\",\\\"y\\\"],labelSize:t.labelSize||[12,12],labelFont:t.labelFont||[\\\"sans-serif\\\",\\\"sans-serif\\\"],title:t.title||\\\"\\\",titleSize:t.titleSize||18,titleFont:t.titleFont||\\\"sans-serif\\\"}),this.static=!!t.static,this.setDirty()},c.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var t=this.objects.length-1;t>=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setDirty();break}},c.addOverlay=function(t){this.overlays.indexOf(t)<0&&(this.overlays.push(t),this.setOverlayDirty())},c.removeOverlay=function(t){for(var e=this.overlays,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setOverlayDirty();break}}},{\\\"./lib/box\\\":269,\\\"./lib/grid\\\":270,\\\"./lib/line\\\":271,\\\"./lib/text\\\":273,\\\"gl-select-static\\\":287}],276:[function(t,e,r){var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\nattribute vec2 position;\\\\nvarying vec2 uv;\\\\nvoid main() {\\\\n  uv = position;\\\\n  gl_Position = vec4(position, 0, 1);\\\\n}\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform sampler2D accumBuffer;\\\\nvarying vec2 uv;\\\\n\\\\nvoid main() {\\\\n  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\\\\n  gl_FragColor = min(vec4(1,1,1,1), accum);\\\\n}\\\"]);e.exports=function(t){return i(t,a,o,null,[{name:\\\"position\\\",type:\\\"vec2\\\"}])}},{\\\"gl-shader\\\":288,glslify:392}],277:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=!1,r=((t=t||{}).pixelRatio||parseFloat(window.devicePixelRatio),t.canvas);if(!r)if(r=document.createElement(\\\"canvas\\\"),t.container){var m=t.container;m.appendChild(r)}else document.body.appendChild(r);var y=t.gl;y||(y=function(t,e){var r=null;try{(r=t.getContext(\\\"webgl\\\",e))||(r=t.getContext(\\\"experimental-webgl\\\",e))}catch(t){return null}return r}(r,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p}));if(!y)throw new Error(\\\"webgl not supported\\\");var x=t.bounds||[[-10,-10,-10],[10,10,10]],b=new d,_=l(y,[y.drawingBufferWidth,y.drawingBufferHeight],{preferFloat:!p}),w=h(y),k=t.camera||{eye:[2,0,0],center:[0,0,0],up:[0,1,0],zoomMin:.1,zoomMax:100,mode:\\\"turntable\\\"},M=t.axes||{},A=i(y,M);A.enable=!M.disable;var T=t.spikes||{},S=o(y,T),C=[],E=[],L=[],z=[],O=!0,I=!0,P=new Array(16),D=new Array(16),R={view:null,projection:P,model:D},I=!0,B=[y.drawingBufferWidth,y.drawingBufferHeight],F={gl:y,contextLost:!1,pixelRatio:t.pixelRatio||parseFloat(window.devicePixelRatio),canvas:r,selection:b,camera:n(r,k),axes:A,axesPixels:null,spikes:S,bounds:x,objects:C,shape:B,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:v(t.autoResize),autoBounds:v(t.autoBounds),autoScale:!!t.autoScale,autoCenter:v(t.autoCenter),clipToBounds:v(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:R,oncontextloss:null,mouseListener:null},N=[y.drawingBufferWidth/F.pixelRatio|0,y.drawingBufferHeight/F.pixelRatio|0];function j(){if(!e&&F.autoResize){var t=r.parentNode,n=1,i=1;t&&t!==document.body?(n=t.clientWidth,i=t.clientHeight):(n=window.innerWidth,i=window.innerHeight);var a=0|Math.ceil(n*F.pixelRatio),o=0|Math.ceil(i*F.pixelRatio);if(a!==r.width||o!==r.height){r.width=a,r.height=o;var s=r.style;s.position=s.position||\\\"absolute\\\",s.left=\\\"0px\\\",s.top=\\\"0px\\\",s.width=n+\\\"px\\\",s.height=i+\\\"px\\\",O=!0}}}F.autoResize&&j();function V(){for(var t=C.length,e=z.length,r=0;r<e;++r)L[r]=0;t:for(var r=0;r<t;++r){var n=C[r],i=n.pickSlots;if(i){for(var a=0;a<e;++a)if(L[a]+i<255){E[r]=a,n.setPickBase(L[a]+1),L[a]+=i;continue t}var o=s(y,B);E[r]=e,z.push(o),L.push(i),n.setPickBase(1),e+=1}else E[r]=-1}for(;e>0&&0===L[e-1];)L.pop(),z.pop().dispose()}window.addEventListener(\\\"resize\\\",j),F.update=function(t){e||(t=t||{},O=!0,I=!0)},F.add=function(t){e||(t.axes=A,C.push(t),E.push(-1),O=!0,I=!0,V())},F.remove=function(t){if(!e){var r=C.indexOf(t);r<0||(C.splice(r,1),E.pop(),O=!0,I=!0,V())}},F.dispose=function(){if(!e&&(e=!0,window.removeEventListener(\\\"resize\\\",j),r.removeEventListener(\\\"webglcontextlost\\\",H),F.mouseListener.enabled=!1,!F.contextLost)){A.dispose(),S.dispose();for(var t=0;t<C.length;++t)C[t].dispose();_.dispose();for(var t=0;t<z.length;++t)z[t].dispose();w.dispose(),y=null,A=null,S=null,C=[]}};var U=!1,q=0;function H(){if(F.contextLost)return!0;y.isContextLost()&&(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&&F.oncontextloss())}F.mouseListener=u(r,function(t,r,n){if(!e){var i=z.length,a=C.length,o=b.object;b.distance=1/0,b.mouse[0]=r,b.mouse[1]=n,b.object=null,b.screen=null,b.dataCoordinate=b.dataPosition=null;var s=!1;if(t&&q)U=!0;else{U&&(I=!0),U=!1;for(var l=0;l<i;++l){var c=z[l].query(r,N[1]-n-1,F.pickRadius);if(c){if(c.distance>b.distance)continue;for(var u=0;u<a;++u){var f=C[u];if(E[u]===l){var h=f.pick(c);h&&(b.buttons=t,b.screen=c.coord,b.distance=c.distance,b.object=f,b.index=h.distance,b.dataPosition=h.position,b.dataCoordinate=h.dataCoordinate,b.data=h,s=!0)}}}}}o&&o!==b.object&&(o.highlight&&o.highlight(null),O=!0),b.object&&(b.object.highlight&&b.object.highlight(b.data),O=!0),(s=s||b.object!==o)&&F.onselect&&F.onselect(b),1&t&&!(1&q)&&F.onclick&&F.onclick(b),q=t}}),r.addEventListener(\\\"webglcontextlost\\\",H);var G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],W=[G[0].slice(),G[1].slice()];function Y(){if(!H()){j();var t=F.camera.tick();R.view=F.camera.matrix,O=O||t,I=I||t,A.pixelRatio=F.pixelRatio,S.pixelRatio=F.pixelRatio;var e=C.length,r=G[0],n=G[1];r[0]=r[1]=r[2]=1/0,n[0]=n[1]=n[2]=-1/0;for(var i=0;i<e;++i){var o=C[i];o.pixelRatio=F.pixelRatio,o.axes=F.axes,O=O||!!o.dirty,I=I||!!o.dirty;var s=o.bounds;if(s)for(var l=s[0],u=s[1],h=0;h<3;++h)r[h]=Math.min(r[h],l[h]),n[h]=Math.max(n[h],u[h])}var p=F.bounds;if(F.autoBounds)for(var h=0;h<3;++h){if(n[h]<r[h])r[h]=-1,n[h]=1;else{r[h]===n[h]&&(r[h]-=1,n[h]+=1);var d=.05*(n[h]-r[h]);r[h]=r[h]-d,n[h]=n[h]+d}p[0][h]=r[h],p[1][h]=n[h]}for(var v=!1,h=0;h<3;++h)v=v||W[0][h]!==p[0][h]||W[1][h]!==p[1][h],W[0][h]=p[0][h],W[1][h]=p[1][h];if(I=I||v,O=O||v){if(v){for(var m=[0,0,0],i=0;i<3;++i)m[i]=g((p[1][i]-p[0][i])/10);A.autoTicks?A.update({bounds:p,tickSpacing:m}):A.update({bounds:p})}var x=y.drawingBufferWidth,k=y.drawingBufferHeight;B[0]=x,B[1]=k,N[0]=0|Math.max(x/F.pixelRatio,1),N[1]=0|Math.max(k/F.pixelRatio,1),f(P,F.fovy,x/k,F.zNear,F.zFar);for(var i=0;i<16;++i)D[i]=0;D[15]=1;for(var M=0,i=0;i<3;++i)M=Math.max(M,p[1][i]-p[0][i]);for(var i=0;i<3;++i)F.autoScale?D[5*i]=F.aspect[i]/(p[1][i]-p[0][i]):D[5*i]=1/M,F.autoCenter&&(D[12+i]=.5*-D[5*i]*(p[0][i]+p[1][i]));for(var i=0;i<e;++i){var o=C[i];o.axesBounds=p,F.clipToBounds&&(o.clipBounds=p)}b.object&&(F.snapToData?S.position=b.dataCoordinate:S.position=b.dataPosition,S.bounds=p),I&&(I=!1,function(){if(H())return;y.colorMask(!0,!0,!0,!0),y.depthMask(!0),y.disable(y.BLEND),y.enable(y.DEPTH_TEST);for(var t=C.length,e=z.length,r=0;r<e;++r){var n=z[r];n.shape=N,n.begin();for(var i=0;i<t;++i)if(E[i]===r){var a=C[i];a.drawPick&&(a.pixelRatio=1,a.drawPick(R))}n.end()}}()),F.axesPixels=a(F.axes,R,x,k),F.onrender&&F.onrender(),y.bindFramebuffer(y.FRAMEBUFFER,null),y.viewport(0,0,x,k);var T=F.clearColor;y.clearColor(T[0],T[1],T[2],T[3]),y.clear(y.COLOR_BUFFER_BIT|y.DEPTH_BUFFER_BIT),y.depthMask(!0),y.colorMask(!0,!0,!0,!0),y.enable(y.DEPTH_TEST),y.depthFunc(y.LEQUAL),y.disable(y.BLEND),y.disable(y.CULL_FACE);var L=!1;A.enable&&(L=L||A.isTransparent(),A.draw(R)),S.axes=A,b.object&&S.draw(R),y.disable(y.CULL_FACE);for(var i=0;i<e;++i){var o=C[i];o.axes=A,o.pixelRatio=F.pixelRatio,o.isOpaque&&o.isOpaque()&&o.draw(R),o.isTransparent&&o.isTransparent()&&(L=!0)}if(L){_.shape=B,_.bind(),y.clear(y.DEPTH_BUFFER_BIT),y.colorMask(!1,!1,!1,!1),y.depthMask(!0),y.depthFunc(y.LESS),A.enable&&A.isTransparent()&&A.drawTransparent(R);for(var i=0;i<e;++i){var o=C[i];o.isOpaque&&o.isOpaque()&&o.draw(R)}y.enable(y.BLEND),y.blendEquation(y.FUNC_ADD),y.blendFunc(y.ONE,y.ONE_MINUS_SRC_ALPHA),y.colorMask(!0,!0,!0,!0),y.depthMask(!1),y.clearColor(0,0,0,0),y.clear(y.COLOR_BUFFER_BIT),A.isTransparent()&&A.drawTransparent(R);for(var i=0;i<e;++i){var o=C[i];o.isTransparent&&o.isTransparent()&&o.drawTransparent(R)}y.bindFramebuffer(y.FRAMEBUFFER,null),y.blendFunc(y.ONE,y.ONE_MINUS_SRC_ALPHA),y.disable(y.DEPTH_TEST),w.bind(),_.color[0].bind(0),w.uniforms.accumBuffer=0,c(y),y.disable(y.BLEND)}O=!1;for(var i=0;i<e;++i)C[i].dirty=!1}}}return function t(){e||F.contextLost||(Y(),requestAnimationFrame(t))}(),F.redraw=function(){e||(O=!0,Y())},F};var n=t(\\\"3d-view-controls\\\"),i=t(\\\"gl-axes3d\\\"),a=t(\\\"gl-axes3d/properties\\\"),o=t(\\\"gl-spikes3d\\\"),s=t(\\\"gl-select-static\\\"),l=t(\\\"gl-fbo\\\"),c=t(\\\"a-big-triangle\\\"),u=t(\\\"mouse-change\\\"),f=t(\\\"gl-mat4/perspective\\\"),h=t(\\\"./lib/shader\\\"),p=t(\\\"is-mobile\\\")({tablet:!0});function d(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function v(t){return\\\"boolean\\\"!=typeof t||t}},{\\\"./lib/shader\\\":276,\\\"3d-view-controls\\\":44,\\\"a-big-triangle\\\":47,\\\"gl-axes3d\\\":222,\\\"gl-axes3d/properties\\\":229,\\\"gl-fbo\\\":239,\\\"gl-mat4/perspective\\\":257,\\\"gl-select-static\\\":287,\\\"gl-spikes3d\\\":297,\\\"is-mobile\\\":403,\\\"mouse-change\\\":418}],278:[function(t,e,r){var n=t(\\\"glslify\\\");r.pointVertex=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position;\\\\n\\\\nuniform mat3 matrix;\\\\nuniform float pointSize;\\\\nuniform float pointCloud;\\\\n\\\\nhighp float rand(vec2 co) {\\\\n  highp float a = 12.9898;\\\\n  highp float b = 78.233;\\\\n  highp float c = 43758.5453;\\\\n  highp float d = dot(co.xy, vec2(a, b));\\\\n  highp float e = mod(d, 3.14);\\\\n  return fract(sin(e) * c);\\\\n}\\\\n\\\\nvoid main() {\\\\n  vec3 hgPosition = matrix * vec3(position, 1);\\\\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\\\\n    // if we don't jitter the point size a bit, overall point cloud\\\\n    // saturation 'jumps' on zooming, which is disturbing and confusing\\\\n  gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\\\\n  if(pointCloud != 0.0) { // pointCloud is truthy\\\\n    // get the same square surface as circle would be\\\\n    gl_PointSize *= 0.886;\\\\n  }\\\\n}\\\"]),r.pointFragment=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform vec4 color, borderColor;\\\\nuniform float centerFraction;\\\\nuniform float pointCloud;\\\\n\\\\nvoid main() {\\\\n  float radius;\\\\n  vec4 baseColor;\\\\n  if(pointCloud != 0.0) { // pointCloud is truthy\\\\n    if(centerFraction == 1.0) {\\\\n      gl_FragColor = color;\\\\n    } else {\\\\n      gl_FragColor = mix(borderColor, color, centerFraction);\\\\n    }\\\\n  } else {\\\\n    radius = length(2.0 * gl_PointCoord.xy - 1.0);\\\\n    if(radius > 1.0) {\\\\n      discard;\\\\n    }\\\\n    baseColor = mix(borderColor, color, step(radius, centerFraction));\\\\n    gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\\\\n  }\\\\n}\\\\n\\\"]),r.pickVertex=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position;\\\\nattribute vec4 pickId;\\\\n\\\\nuniform mat3 matrix;\\\\nuniform float pointSize;\\\\nuniform vec4 pickOffset;\\\\n\\\\nvarying vec4 fragId;\\\\n\\\\nvoid main() {\\\\n  vec3 hgPosition = matrix * vec3(position, 1);\\\\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\\\\n  gl_PointSize = pointSize;\\\\n\\\\n  vec4 id = pickId + pickOffset;\\\\n  id.y += floor(id.x / 256.0);\\\\n  id.x -= floor(id.x / 256.0) * 256.0;\\\\n\\\\n  id.z += floor(id.y / 256.0);\\\\n  id.y -= floor(id.y / 256.0) * 256.0;\\\\n\\\\n  id.w += floor(id.z / 256.0);\\\\n  id.z -= floor(id.z / 256.0) * 256.0;\\\\n\\\\n  fragId = id;\\\\n}\\\\n\\\"]),r.pickFragment=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragId;\\\\n\\\\nvoid main() {\\\\n  float radius = length(2.0 * gl_PointCoord.xy - 1.0);\\\\n  if(radius > 1.0) {\\\\n    discard;\\\\n  }\\\\n  gl_FragColor = fragId / 255.0;\\\\n}\\\\n\\\"])},{glslify:392}],279:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"typedarray-pool\\\"),o=t(\\\"./lib/shader\\\");function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,a=i(r),l=i(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),f=new s(t,a,l,c,u);return f.update(e),t.addObject(f),f};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r(\\\"sizeMin\\\",.5),this.sizeMax=r(\\\"sizeMax\\\",20),this.color=r(\\\"color\\\",[1,0,0,1]).slice(),this.areaRatio=r(\\\"areaRatio\\\",1),this.borderColor=r(\\\"borderColor\\\",[0,0,0,1]).slice(),this.blend=r(\\\"blend\\\",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),c=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e<n;e++)c[e]=e;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(c),i||a.free(l),o||a.free(c),this.pointCount=n,this.pickOffset=0},u.unifiedDraw=(l=[1,0,0,0,1,0,0,0,1],c=[0,0,0,0],function(t){var e=void 0!==t,r=e?this.pickShader:this.shader,n=this.plot.gl,i=this.plot.dataBox;if(0===this.pointCount)return t;var a=i[2]-i[0],o=i[3]-i[1],s=function(t,e){var r,n=0,i=t.length>>>1;for(r=0;r<i;r++){var a=t[2*r],o=t[2*r+1];a>=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var f=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return f&&!this.blend&&n.disable(n.BLEND),h&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),f&&!this.blend&&n.enable(n.BLEND),h&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r<n||r>=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{\\\"./lib/shader\\\":278,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288,\\\"typedarray-pool\\\":522}],280:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],f=e[2],h=e[3],p=r[0],d=r[1],g=r[2],v=r[3];(a=c*p+u*d+f*g+h*v)<0&&(a=-a,p=-p,d=-d,g=-g,v=-v);1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*f+l*g,t[3]=s*h+l*v,t}},{}],281:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t||0===t?t.toString():\\\"\\\"}},{}],282:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"vectorize-text\\\");e.exports=function(t,e){var r=i[e];r||(r=i[e]={});if(t in r)return r[t];for(var a=n(t,{textAlign:\\\"center\\\",textBaseline:\\\"middle\\\",lineHeight:1,font:e}),o=n(t,{triangles:!0,textAlign:\\\"center\\\",textBaseline:\\\"middle\\\",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;l<a.positions.length;++l)for(var c=a.positions[l],u=0;u<2;++u)s[0][u]=Math.min(s[0][u],c[u]),s[1][u]=Math.max(s[1][u],c[u]);return r[t]=[o,a,s]};var i={}},{\\\"vectorize-text\\\":527}],283:[function(t,e,r){var n=t(\\\"gl-shader\\\"),i=t(\\\"glslify\\\"),a=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 glyph;\\\\nattribute vec4 id;\\\\n\\\\nuniform vec4 highlightId;\\\\nuniform float highlightScale;\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 clipBounds[2];\\\\n\\\\nvarying vec4 interpColor;\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    float scale = 1.0;\\\\n    if(distance(highlightId, id) < 0.0001) {\\\\n      scale = highlightScale;\\\\n    }\\\\n\\\\n    vec4 worldPosition = model * vec4(position, 1);\\\\n    vec4 viewPosition = view * worldPosition;\\\\n    viewPosition = viewPosition / viewPosition.w;\\\\n    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\\\\n\\\\n    gl_Position = clipPosition;\\\\n    interpColor = color;\\\\n    pickId = id;\\\\n    dataCoordinate = position;\\\\n  }\\\\n}\\\"]),o=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 glyph;\\\\nattribute vec4 id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec2 screenSize;\\\\nuniform vec3 clipBounds[2];\\\\nuniform float highlightScale, pixelRatio;\\\\nuniform vec4 highlightId;\\\\n\\\\nvarying vec4 interpColor;\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    float scale = pixelRatio;\\\\n    if(distance(highlightId.bgr, id.bgr) < 0.001) {\\\\n      scale *= highlightScale;\\\\n    }\\\\n\\\\n    vec4 worldPosition = model * vec4(position, 1.0);\\\\n    vec4 viewPosition = view * worldPosition;\\\\n    vec4 clipPosition = projection * viewPosition;\\\\n    clipPosition /= clipPosition.w;\\\\n\\\\n    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\\\\n    interpColor = color;\\\\n    pickId = id;\\\\n    dataCoordinate = position;\\\\n  }\\\\n}\\\"]),s=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nattribute vec3 position;\\\\nattribute vec4 color;\\\\nattribute vec2 glyph;\\\\nattribute vec4 id;\\\\n\\\\nuniform float highlightScale;\\\\nuniform vec4 highlightId;\\\\nuniform vec3 axes[2];\\\\nuniform mat4 model, view, projection;\\\\nuniform vec2 screenSize;\\\\nuniform vec3 clipBounds[2];\\\\nuniform float scale, pixelRatio;\\\\n\\\\nvarying vec4 interpColor;\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\\\n\\\\n    gl_Position = vec4(0,0,0,0);\\\\n  } else {\\\\n    float lscale = pixelRatio * scale;\\\\n    if(distance(highlightId, id) < 0.0001) {\\\\n      lscale *= highlightScale;\\\\n    }\\\\n\\\\n    vec4 clipCenter   = projection * view * model * vec4(position, 1);\\\\n    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\\\\n    vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\\\\n\\\\n    gl_Position = clipPosition;\\\\n    interpColor = color;\\\\n    pickId = id;\\\\n    dataCoordinate = dataPosition;\\\\n  }\\\\n}\\\\n\\\"]),l=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 fragClipBounds[2];\\\\nuniform float opacity;\\\\n\\\\nvarying vec4 interpColor;\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\\\\n\\\\n  gl_FragColor = interpColor * opacity;\\\\n}\\\\n\\\"]),c=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 fragClipBounds[2];\\\\nuniform float pickGroup;\\\\n\\\\nvarying vec4 pickId;\\\\nvarying vec3 dataCoordinate;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickGroup, pickId.bgr);\\\\n}\\\"]),u=[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"glyph\\\",type:\\\"vec2\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"}],f={vertex:a,fragment:l,attributes:u},h={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},g={vertex:o,fragment:c,attributes:u},v={vertex:s,fragment:c,attributes:u};function m(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}r.createPerspective=function(t){return m(t,f)},r.createOrtho=function(t){return m(t,h)},r.createProject=function(t){return m(t,p)},r.createPickPerspective=function(t){return m(t,d)},r.createPickOrtho=function(t){return m(t,g)},r.createPickProject=function(t){return m(t,v)}},{\\\"gl-shader\\\":288,glslify:392}],284:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"is-string-blank\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"typedarray-pool\\\"),s=t(\\\"gl-mat4/multiply\\\"),l=t(\\\"./lib/shaders\\\"),c=t(\\\"./lib/glyphs\\\"),u=t(\\\"./lib/get-simple-string\\\"),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function p(t,e,r,n){return h(n,n),h(n,n),h(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function g(t,e,r,n,i,a,o,s,l,c,u,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=f,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),f=i(e),h=i(e),p=i(e),d=i(e),v=a(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),m=new g(e,r,n,o,f,h,p,d,v,s,c,u);return m.update(t),m};var v=g.prototype;v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.isTransparent=function(){if(this.opacity<1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]<1)return!0;return!1},v.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectOpacity[t]>=1)return!0;return!1};var m=[0,0],y=[0,0,0],x=[0,0,0],b=[0,0,0,1],_=[0,0,0,1],w=f.slice(),k=[0,0,0],M=[[0,0,0],[0,0,0]];function A(t){return t[0]=t[1]=t[2]=0,t}function T(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function S(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function C(t,e,r,n,i){var a,o=e.axesProject,l=e.gl,c=t.uniforms,u=r.model||f,h=r.view||f,d=r.projection||f,g=e.axesBounds,v=function(t){for(var e=M,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);a=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],m[0]=2/l.drawingBufferWidth,m[1]=2/l.drawingBufferHeight,t.bind(),c.view=h,c.projection=d,c.screenSize=m,c.highlightId=e.highlightId,c.highlightScale=e.highlightScale,c.clipBounds=v,c.pickGroup=e.pickId/255,c.pixelRatio=e.pixelRatio;for(var C=0;C<3;++C)if(o[C]&&e.projectOpacity[C]<1===n){c.scale=e.projectScale[C],c.opacity=e.projectOpacity[C];for(var E=w,L=0;L<16;++L)E[L]=0;for(L=0;L<4;++L)E[5*L]=1;E[5*C]=0,a[C]<0?E[12+C]=g[0][C]:E[12+C]=g[1][C],s(E,u,E),c.model=E;var z=(C+1)%3,O=(C+2)%3,I=A(y),P=A(x);I[z]=1,P[O]=1;var D=p(0,0,0,T(b,I)),R=p(0,0,0,T(_,P));if(Math.abs(D[1])>Math.abs(R[1])){var B=D;D=R,R=B,B=I,I=P,P=B;var F=z;z=O,O=F}D[0]<0&&(I[z]=-1),R[1]>0&&(P[O]=-1);var N=0,j=0;for(L=0;L<4;++L)N+=Math.pow(u[4*z+L],2),j+=Math.pow(u[4*O+L],2);I[z]/=Math.sqrt(N),P[O]/=Math.sqrt(j),c.axes[0]=I,c.axes[1]=P,c.fragClipBounds[0]=S(k,v[0],C,-1e8),c.fragClipBounds[1]=S(k,v[1],C,1e8),e.vao.draw(l.TRIANGLES,e.vertexCount),e.lineWidth>0&&(l.lineWidth(e.lineWidth),e.vao.draw(l.LINES,e.lineVertexCount,e.vertexCount))}}var E=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function L(t,e,r,n,i,a){var o=r.gl;if(r.vao.bind(),i===r.opacity<1||a){t.bind();var s=t.uniforms;s.model=n.model||f,s.view=n.view||f,s.projection=n.projection||f,m[0]=2/o.drawingBufferWidth,m[1]=2/o.drawingBufferHeight,s.screenSize=m,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=E,s.clipBounds=r.axes.bounds,s.opacity=r.opacity,s.pickGroup=r.pickId/255,s.pixelRatio=r.pixelRatio,r.vao.draw(o.TRIANGLES,r.vertexCount),r.lineWidth>0&&(o.lineWidth(r.lineWidth),r.vao.draw(o.LINES,r.lineVertexCount,r.vertexCount))}C(e,r,n,i),r.vao.unbind()}function z(t,e,r){var i;i=Array.isArray(t)?e<t.length?t[e]:void 0:t,i=u(i);var a=!0;n(i)&&(i=\\\"\\\\u25bc\\\",a=!1);var o=c(i,r);return{mesh:o[0],lines:o[1],bounds:o[2],visible:a}}v.draw=function(t){L(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},v.drawTransparent=function(t){L(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},v.drawPick=function(t){L(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},v.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},v.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(t){if(\\\"perspective\\\"in(t=t||{})&&(this.useOrtho=!t.perspective),\\\"orthographic\\\"in t&&(this.useOrtho=!!t.orthographic),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"project\\\"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if(\\\"projectScale\\\"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(\\\"projectOpacity\\\"in t)if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}\\\"opacity\\\"in t&&(this.opacity=t.opacity),this.dirty=!0;var n=t.position,i=t.font||\\\"normal\\\",a=t.alignment||[0,0],s=[1/0,1/0,1/0],l=[-1/0,-1/0,-1/0],c=t.glyph,u=t.color,f=t.size,h=t.angle,p=t.lineColor,d=-1,g=0,v=0,m=0;if(n.length){m=n.length;t:for(var y=0;y<m;++y){for(var x=n[y],b=0;b<3;++b)if(isNaN(x[b])||!isFinite(x[b]))continue t;var _=(R=z(c,y,i)).mesh,w=R.lines,k=R.bounds;g+=3*_.cells.length,v+=2*w.edges.length}}var M=g+v,A=o.mallocFloat(3*M),T=o.mallocFloat(4*M),S=o.mallocFloat(2*M),C=o.mallocUint32(M);if(M>0){var E=0,L=g,O=[0,0,0,1],I=[0,0,0,1],P=Array.isArray(u)&&Array.isArray(u[0]),D=Array.isArray(p)&&Array.isArray(p[0]);t:for(y=0;y<m;++y){d+=1;for(x=n[y],b=0;b<3;++b){if(isNaN(x[b])||!isFinite(x[b]))continue t;l[b]=Math.max(l[b],x[b]),s[b]=Math.min(s[b],x[b])}_=(R=z(c,y,i)).mesh,w=R.lines,k=R.bounds;var R,B=R.visible;if(B)if(Array.isArray(u)){if(3===(F=P?y<u.length?u[y]:[0,0,0,0]:u).length){for(b=0;b<3;++b)O[b]=F[b];O[3]=1}else if(4===F.length)for(b=0;b<4;++b)O[b]=F[b]}else O[0]=O[1]=O[2]=0,O[3]=1;else O=[1,1,1,0];if(B)if(Array.isArray(p)){var F;if(3===(F=D?y<p.length?p[y]:[0,0,0,0]:p).length){for(b=0;b<3;++b)I[b]=F[b];I[b]=1}else if(4===F.length)for(b=0;b<4;++b)I[b]=F[b]}else I[0]=I[1]=I[2]=0,I[3]=1;else I=[1,1,1,0];var N=.5;B?Array.isArray(f)?N=y<f.length?+f[y]:12:f?N=+f:this.useOrtho&&(N=12):N=0;var j=0;Array.isArray(h)?j=y<h.length?+h[y]:0:h&&(j=+h);var V=Math.cos(j),U=Math.sin(j);for(x=n[y],b=0;b<3;++b)l[b]=Math.max(l[b],x[b]),s[b]=Math.min(s[b],x[b]);var q=[a[0],a[1]];for(b=0;b<2;++b)a[b]>0?q[b]*=1-k[0][b]:a[b]<0&&(q[b]*=1+k[1][b]);var H=_.cells||[],G=_.positions||[];for(b=0;b<H.length;++b)for(var W=H[b],Y=0;Y<3;++Y){for(var X=0;X<3;++X)A[3*E+X]=x[X];for(X=0;X<4;++X)T[4*E+X]=O[X];C[E]=d;var Z=G[W[Y]];S[2*E]=N*(V*Z[0]-U*Z[1]+q[0]),S[2*E+1]=N*(U*Z[0]+V*Z[1]+q[1]),E+=1}for(H=w.edges,G=w.positions,b=0;b<H.length;++b)for(W=H[b],Y=0;Y<2;++Y){for(X=0;X<3;++X)A[3*L+X]=x[X];for(X=0;X<4;++X)T[4*L+X]=I[X];C[L]=d;Z=G[W[Y]];S[2*L]=N*(V*Z[0]-U*Z[1]+q[0]),S[2*L+1]=N*(U*Z[0]+V*Z[1]+q[1]),L+=1}}}this.bounds=[s,l],this.points=n,this.pointCount=n.length,this.vertexCount=g,this.lineVertexCount=v,this.pointBuffer.update(A),this.colorBuffer.update(T),this.glyphBuffer.update(S),this.idBuffer.update(C),o.free(A),o.free(T),o.free(S),o.free(C)},v.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{\\\"./lib/get-simple-string\\\":281,\\\"./lib/glyphs\\\":282,\\\"./lib/shaders\\\":283,\\\"gl-buffer\\\":230,\\\"gl-mat4/multiply\\\":256,\\\"gl-vao\\\":310,\\\"is-string-blank\\\":406,\\\"typedarray-pool\\\":522}],285:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\");r.boxVertex=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 vertex;\\\\n\\\\nuniform vec2 cornerA, cornerB;\\\\n\\\\nvoid main() {\\\\n  gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\\\\n}\\\\n\\\"]),r.boxFragment=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform vec4 color;\\\\n\\\\nvoid main() {\\\\n  gl_FragColor = color;\\\\n}\\\\n\\\"])},{glslify:392}],286:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"./lib/shaders\\\");function o(t,e,r){this.plot=t,this.boxBuffer=e,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}e.exports=function(t,e){var r=t.gl,s=i(r,[0,0,0,1,1,0,1,1]),l=n(r,a.boxVertex,a.boxFragment),c=new o(t,s,l);return c.update(e),t.addOverlay(c),c};var s=o.prototype;s.draw=function(){if(this.enabled){var t=this.plot,e=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),a=this.borderColor,o=t.box,s=t.screenBox,l=t.dataBox,c=t.viewBox,u=t.pixelRatio,f=(e[0]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],h=(e[1]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1],p=(e[2]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],d=(e[3]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1];if(f=Math.max(f,c[0]),h=Math.max(h,c[1]),p=Math.min(p,c[2]),d=Math.min(d,c[3]),!(p<f||d<h)){o.bind();var g=s[2]-s[0],v=s[3]-s[1];if(this.outerFill&&(o.drawBox(0,0,g,h,i),o.drawBox(0,h,f,d,i),o.drawBox(0,d,g,v,i),o.drawBox(p,h,g,d,i)),this.innerFill&&o.drawBox(f,h,p,d,n),r>0){var m=r*u;o.drawBox(f-m,h-m,p+m,h+m,a),o.drawBox(f-m,d-m,p+m,d+m,a),o.drawBox(f-m,h-m,f+m,d+m,a),o.drawBox(p-m,h-m,p+m,d+m,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{\\\"./lib/shaders\\\":285,\\\"gl-buffer\\\":230,\\\"gl-shader\\\":288}],287:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=n(t,e),a=i.mallocUint8(e[0]*e[1]*4);return new c(t,r,a)};var n=t(\\\"gl-fbo\\\"),i=t(\\\"typedarray-pool\\\"),a=t(\\\"ndarray\\\"),o=t(\\\"bit-twiddle\\\").nextPow2,s=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"array\\\",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},\\\"scalar\\\",\\\"scalar\\\",\\\"index\\\"],pre:{body:\\\"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}\\\",args:[],thisVars:[\\\"this_closestD2\\\",\\\"this_closestX\\\",\\\"this_closestY\\\"],localVars:[]},body:{body:\\\"{if(_inline_16_arg0_<255||_inline_16_arg1_<255||_inline_16_arg2_<255||_inline_16_arg3_<255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_f<this_closestD2&&(this_closestD2=_inline_16_f,this_closestX=_inline_16_arg6_[0],this_closestY=_inline_16_arg6_[1])}}\\\",args:[{name:\\\"_inline_16_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg1_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg4_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg5_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_16_arg6_\\\",lvalue:!1,rvalue:!0,count:4}],thisVars:[\\\"this_closestD2\\\",\\\"this_closestX\\\",\\\"this_closestY\\\"],localVars:[\\\"_inline_16_a\\\",\\\"_inline_16_f\\\",\\\"_inline_16_l\\\"]},post:{body:\\\"{return[this_closestX,this_closestY,this_closestD2]}\\\",args:[],thisVars:[\\\"this_closestD2\\\",\\\"this_closestX\\\",\\\"this_closestY\\\"],localVars:[]},debug:!1,funcName:\\\"cwise\\\",blockSize:64});function l(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function c(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var u=c.prototype;Object.defineProperty(u,\\\"shape\\\",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;a<r*e*4;++a)n[a]=255}return t}}}),u.begin=function(){var t=this.gl;this.shape;t&&(this.fbo.bind(),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT))},u.end=function(){var t=this.gl;t&&(t.bindFramebuffer(t.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},u.query=function(t,e,r){if(!this.gl)return null;var n=this.fbo.shape.slice();t|=0,e|=0,\\\"number\\\"!=typeof r&&(r=1);var i=0|Math.min(Math.max(t-r,0),n[0]),o=0|Math.min(Math.max(t+r,0),n[0]),c=0|Math.min(Math.max(e-r,0),n[1]),u=0|Math.min(Math.max(e+r,0),n[1]);if(o<=i||u<=c)return null;var f=[o-i,u-c],h=a(this.buffer,[f[0],f[1],4],[4,4*n[0],1],4*(i+n[0]*c)),p=s(h.hi(f[0],f[1],1),r,r),d=p[0],g=p[1];return d<0||Math.pow(this.radius,2)<p[2]?null:new l(d+i|0,g+c|0,h.get(d,g,0),[h.get(d,g,1),h.get(d,g,2),h.get(d,g,3)],Math.sqrt(p[2]))},u.dispose=function(){this.gl&&(this.fbo.dispose(),i.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},{\\\"bit-twiddle\\\":80,\\\"cwise/lib/wrapper\\\":137,\\\"gl-fbo\\\":239,ndarray:433,\\\"typedarray-pool\\\":522}],288:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/create-uniforms\\\"),i=t(\\\"./lib/create-attributes\\\"),a=t(\\\"./lib/reflect\\\"),o=t(\\\"./lib/shader-cache\\\"),s=t(\\\"./lib/runtime-reflect\\\"),l=t(\\\"./lib/GLError\\\");function c(t){this.gl=t,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var u=c.prototype;function f(t,e){return t.name<e.name?-1:1}u.bind=function(){var t;this.program||this._relink();var e=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(e>r)for(t=r;t<e;t++)this.gl.enableVertexAttribArray(t);else if(r>e)for(t=e;t<r;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=e,this.gl.useProgram(this.program)},u.dispose=function(){for(var t=this.gl.lastAttribCount,e=0;e<t;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},u.update=function(t,e,r,c){if(!e||1===arguments.length){var u=t;t=u.vertex,e=u.fragment,r=u.uniforms,c=u.attributes}var h=this,p=h.gl,d=h._vref;h._vref=o.shader(p,p.VERTEX_SHADER,t),d&&d.dispose(),h.vertShader=h._vref.shader;var g=this._fref;if(h._fref=o.shader(p,p.FRAGMENT_SHADER,e),g&&g.dispose(),h.fragShader=h._fref.shader,!r||!c){var v=p.createProgram();if(p.attachShader(v,h.fragShader),p.attachShader(v,h.vertShader),p.linkProgram(v),!p.getProgramParameter(v,p.LINK_STATUS)){var m=p.getProgramInfoLog(v);throw new l(m,\\\"Error linking program:\\\"+m)}r=r||s.uniforms(p,v),c=c||s.attributes(p,v),p.deleteProgram(v)}(c=c.slice()).sort(f);var y,x=[],b=[],_=[];for(y=0;y<c.length;++y){var w=c[y];if(w.type.indexOf(\\\"mat\\\")>=0){for(var k=0|w.type.charAt(w.type.length-1),M=new Array(k),A=0;A<k;++A)M[A]=_.length,b.push(w.name+\\\"[\\\"+A+\\\"]\\\"),\\\"number\\\"==typeof w.location?_.push(w.location+A):Array.isArray(w.location)&&w.location.length===k&&\\\"number\\\"==typeof w.location[A]?_.push(0|w.location[A]):_.push(-1);x.push({name:w.name,type:w.type,locations:M})}else x.push({name:w.name,type:w.type,locations:[_.length]}),b.push(w.name),\\\"number\\\"==typeof w.location?_.push(0|w.location):_.push(-1)}var T=0;for(y=0;y<_.length;++y)if(_[y]<0){for(;_.indexOf(T)>=0;)T+=1;_[y]=T}var S=new Array(r.length);function C(){h.program=o.program(p,h._vref,h._fref,b,_);for(var t=0;t<r.length;++t)S[t]=p.getUniformLocation(h.program,r[t].name)}C(),h._relink=C,h.types={uniforms:a(r),attributes:a(c)},h.attributes=i(p,h,x,_),Object.defineProperty(h,\\\"uniforms\\\",n(p,h,r,S))},e.exports=function(t,e,r,n,i){var a=new c(t);return a.update(e,r,n,i),a}},{\\\"./lib/GLError\\\":289,\\\"./lib/create-attributes\\\":290,\\\"./lib/create-uniforms\\\":291,\\\"./lib/reflect\\\":292,\\\"./lib/runtime-reflect\\\":293,\\\"./lib/shader-cache\\\":294}],289:[function(t,e,r){function n(t,e,r){this.shortMessage=e||\\\"\\\",this.longMessage=r||\\\"\\\",this.rawError=t||\\\"\\\",this.message=\\\"gl-shader: \\\"+(e||t||\\\"\\\")+(r?\\\"\\\\n\\\"+r:\\\"\\\"),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name=\\\"GLError\\\",n.prototype.constructor=n,e.exports=n},{}],290:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,i){for(var a={},l=0,c=r.length;l<c;++l){var u=r[l],f=u.name,h=u.type,p=u.locations;switch(h){case\\\"bool\\\":case\\\"int\\\":case\\\"float\\\":o(t,e,p[0],i,1,a,f);break;default:if(h.indexOf(\\\"vec\\\")>=0){var d=h.charCodeAt(h.length-1)-48;if(d<2||d>4)throw new n(\\\"\\\",\\\"Invalid data type for attribute \\\"+f+\\\": \\\"+h);o(t,e,p[0],i,d,a,f)}else{if(!(h.indexOf(\\\"mat\\\")>=0))throw new n(\\\"\\\",\\\"Unknown data type for attribute \\\"+f+\\\": \\\"+h);var d=h.charCodeAt(h.length-1)-48;if(d<2||d>4)throw new n(\\\"\\\",\\\"Invalid data type for attribute \\\"+f+\\\": \\\"+h);s(t,e,p,i,d,a,f)}}}return a};var n=t(\\\"./GLError\\\");function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;function o(t,e,r,n,a,o,s){for(var l=[\\\"gl\\\",\\\"v\\\"],c=[],u=0;u<a;++u)l.push(\\\"x\\\"+u),c.push(\\\"x\\\"+u);l.push(\\\"if(x0.length===void 0){return gl.vertexAttrib\\\"+a+\\\"f(v,\\\"+c.join()+\\\")}else{return gl.vertexAttrib\\\"+a+\\\"fv(v,x0)}\\\");var f=Function.apply(null,l),h=new i(t,e,r,n,a,f);Object.defineProperty(o,s,{set:function(e){return t.disableVertexAttribArray(n[r]),f(t,n[r],e),e},get:function(){return h},enumerable:!0})}function s(t,e,r,n,i,a,s){for(var l=new Array(i),c=new Array(i),u=0;u<i;++u)o(t,e,r[u],n,i,l,u),c[u]=l[u];Object.defineProperty(l,\\\"location\\\",{set:function(t){if(Array.isArray(t))for(var e=0;e<i;++e)c[e].location=t[e];else for(e=0;e<i;++e)c[e].location=t+e;return t},get:function(){for(var t=new Array(i),e=0;e<i;++e)t[e]=n[r[e]];return t},enumerable:!0}),l.pointer=function(e,a,o,s){e=e||t.FLOAT,a=!!a,o=o||i*i,s=s||0;for(var l=0;l<i;++l){var c=n[r[l]];t.vertexAttribPointer(c,i,e,a,o,s+l*i),t.enableVertexAttribArray(c)}};var f=new Array(i),h=t[\\\"vertexAttrib\\\"+i+\\\"fv\\\"];Object.defineProperty(a,s,{set:function(e){for(var a=0;a<i;++a){var o=n[r[a]];if(t.disableVertexAttribArray(o),Array.isArray(e[0]))h.call(t,o,e[a]);else{for(var s=0;s<i;++s)f[s]=e[i*a+s];h.call(t,o,f)}}return e},get:function(){return l},enumerable:!0})}a.pointer=function(t,e,r,n){var i=this._gl,a=this._locations[this._index];i.vertexAttribPointer(a,this._dimension,t||i.FLOAT,!!e,r||0,n||0),i.enableVertexAttribArray(a)},a.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(a,\\\"location\\\",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}})},{\\\"./GLError\\\":289}],291:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./reflect\\\"),i=t(\\\"./GLError\\\");function a(t){return new Function(\\\"y\\\",\\\"return function(){return y}\\\")(t)}function o(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}e.exports=function(t,e,r,s){function l(t,e,r){switch(r){case\\\"bool\\\":case\\\"int\\\":case\\\"sampler2D\\\":case\\\"samplerCube\\\":return\\\"gl.uniform1i(locations[\\\"+e+\\\"],obj\\\"+t+\\\")\\\";case\\\"float\\\":return\\\"gl.uniform1f(locations[\\\"+e+\\\"],obj\\\"+t+\\\")\\\";default:var n=r.indexOf(\\\"vec\\\");if(!(0<=n&&n<=1&&r.length===4+n)){if(0===r.indexOf(\\\"mat\\\")&&4===r.length){var a=r.charCodeAt(r.length-1)-48;if(a<2||a>4)throw new i(\\\"\\\",\\\"Invalid uniform dimension type for matrix \\\"+name+\\\": \\\"+r);return\\\"gl.uniformMatrix\\\"+a+\\\"fv(locations[\\\"+e+\\\"],false,obj\\\"+t+\\\")\\\"}throw new i(\\\"\\\",\\\"Unknown uniform data type for \\\"+name+\\\": \\\"+r)}var a=r.charCodeAt(r.length-1)-48;if(a<2||a>4)throw new i(\\\"\\\",\\\"Invalid data type\\\");switch(r.charAt(0)){case\\\"b\\\":case\\\"i\\\":return\\\"gl.uniform\\\"+a+\\\"iv(locations[\\\"+e+\\\"],obj\\\"+t+\\\")\\\";case\\\"v\\\":return\\\"gl.uniform\\\"+a+\\\"fv(locations[\\\"+e+\\\"],obj\\\"+t+\\\")\\\";default:throw new i(\\\"\\\",\\\"Unrecognized data type for vector \\\"+name+\\\": \\\"+r)}}}function c(e){for(var n=[\\\"return function updateProperty(obj){\\\"],i=function t(e,r){if(\\\"object\\\"!=typeof r)return[[e,r]];var n=[];for(var i in r){var a=r[i],o=e;parseInt(i)+\\\"\\\"===i?o+=\\\"[\\\"+i+\\\"]\\\":o+=\\\".\\\"+i,\\\"object\\\"==typeof a?n.push.apply(n,t(o,a)):n.push([o,a])}return n}(\\\"\\\",e),a=0;a<i.length;++a){var o=i[a],c=o[0],u=o[1];s[u]&&n.push(l(c,u,r[u].type))}n.push(\\\"return obj}\\\");var f=new Function(\\\"gl\\\",\\\"locations\\\",n.join(\\\"\\\\n\\\"));return f(t,s)}function u(n,l,u){if(\\\"object\\\"==typeof u){var h=f(u);Object.defineProperty(n,l,{get:a(h),set:c(u),enumerable:!0,configurable:!1})}else s[u]?Object.defineProperty(n,l,{get:(p=u,new Function(\\\"gl\\\",\\\"wrapper\\\",\\\"locations\\\",\\\"return function(){return gl.getUniform(wrapper.program,locations[\\\"+p+\\\"])}\\\")(t,e,s)),set:c(u),enumerable:!0,configurable:!1}):n[l]=function(t){switch(t){case\\\"bool\\\":return!1;case\\\"int\\\":case\\\"sampler2D\\\":case\\\"samplerCube\\\":case\\\"float\\\":return 0;default:var e=t.indexOf(\\\"vec\\\");if(0<=e&&e<=1&&t.length===4+e){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new i(\\\"\\\",\\\"Invalid data type\\\");return\\\"b\\\"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf(\\\"mat\\\")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new i(\\\"\\\",\\\"Invalid uniform dimension type for matrix \\\"+name+\\\": \\\"+t);return o(r*r,0)}throw new i(\\\"\\\",\\\"Unknown uniform data type for \\\"+name+\\\": \\\"+t)}}(r[u].type);var p}function f(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r<t.length;++r)u(e,r,t[r])}else for(var n in e={},t)u(e,n,t[n]);return e}var h=n(r,!0);return{get:a(f(h)),set:c(h),enumerable:!0,configurable:!0}}},{\\\"./GLError\\\":289,\\\"./reflect\\\":292}],292:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r={},n=0;n<t.length;++n)for(var i=t[n].name,a=i.split(\\\".\\\"),o=r,s=0;s<a.length;++s){var l=a[s].split(\\\"[\\\");if(l.length>1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c<l.length;++c){var u=parseInt(l[c]);c<l.length-1||s<a.length-1?(u in o||(c<l.length-1?o[u]=[]:o[u]={}),o=o[u]):o[u]=e?n:t[n].type}}else s<a.length-1?(l[0]in o||(o[l[0]]={}),o=o[l[0]]):o[l[0]]=e?n:t[n].type}return r}},{}],293:[function(t,e,r){\\\"use strict\\\";r.uniforms=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),n=[],i=0;i<r;++i){var o=t.getActiveUniform(e,i);if(o){var s=a(t,o.type);if(o.size>1)for(var l=0;l<o.size;++l)n.push({name:o.name.replace(\\\"[0]\\\",\\\"[\\\"+l+\\\"]\\\"),type:s});else n.push({name:o.name,type:s})}}return n},r.attributes=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),n=[],i=0;i<r;++i){var o=t.getActiveAttrib(e,i);o&&n.push({name:o.name,type:a(t,o.type)})}return n};var n={FLOAT:\\\"float\\\",FLOAT_VEC2:\\\"vec2\\\",FLOAT_VEC3:\\\"vec3\\\",FLOAT_VEC4:\\\"vec4\\\",INT:\\\"int\\\",INT_VEC2:\\\"ivec2\\\",INT_VEC3:\\\"ivec3\\\",INT_VEC4:\\\"ivec4\\\",BOOL:\\\"bool\\\",BOOL_VEC2:\\\"bvec2\\\",BOOL_VEC3:\\\"bvec3\\\",BOOL_VEC4:\\\"bvec4\\\",FLOAT_MAT2:\\\"mat2\\\",FLOAT_MAT3:\\\"mat3\\\",FLOAT_MAT4:\\\"mat4\\\",SAMPLER_2D:\\\"sampler2D\\\",SAMPLER_CUBE:\\\"samplerCube\\\"},i=null;function a(t,e){if(!i){var r=Object.keys(n);i={};for(var a=0;a<r.length;++a){var o=r[a];i[t[o]]=n[o]}}return i[e]}},{}],294:[function(t,e,r){\\\"use strict\\\";r.shader=function(t,e,r){return u(t).getShaderReference(e,r)},r.program=function(t,e,r,n,i){return u(t).getProgram(e,r,n,i)};var n=t(\\\"./GLError\\\"),i=t(\\\"gl-format-compiler-error\\\"),a=new(\\\"undefined\\\"==typeof WeakMap?t(\\\"weakmap-shim\\\"):WeakMap),o=0;function s(t,e,r,n,i,a,o){this.id=t,this.src=e,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function l(t){this.gl=t,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var t=this.cache,e=t.gl,r=this.programs,n=0,i=r.length;n<i;++n){var a=t.programs[r[n]];a&&(delete t.programs[n],e.deleteProgram(a))}e.deleteShader(this.shader),delete t.shaders[this.type===e.FRAGMENT_SHADER|0][this.src]}};var c=l.prototype;function u(t){var e=a.get(t);return e||(e=new l(t),a.set(t,e)),e}c.getShaderReference=function(t,e){var r=this.gl,a=this.shaders[t===r.FRAGMENT_SHADER|0],l=a[e];if(l&&r.isShader(l.shader))l.count+=1;else{var c=function(t,e,r){var a=t.createShader(e);if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(a);try{var s=i(o,r,e)}catch(t){throw console.warn(\\\"Failed to format compiler error: \\\"+t),new n(o,\\\"Error compiling shader:\\\\n\\\"+o)}throw new n(o,s.short,s.long)}return a}(r,t,e);l=a[e]=new s(o++,e,t,c,[],1,this)}return l},c.getProgram=function(t,e,r,i){var a=[t.id,e.id,r.join(\\\":\\\"),i.join(\\\":\\\")].join(\\\"@\\\"),o=this.programs[a];return o&&this.gl.isProgram(o)||(this.programs[a]=o=function(t,e,r,i,a){var o=t.createProgram();t.attachShader(o,e),t.attachShader(o,r);for(var s=0;s<i.length;++s)t.bindAttribLocation(o,a[s],i[s]);if(t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS)){var l=t.getProgramInfoLog(o);throw new n(l,\\\"Error linking program: \\\"+l)}return o}(this.gl,t.shader,e.shader,r,i),t.programs.push(a),e.programs.push(a)),o}},{\\\"./GLError\\\":289,\\\"gl-format-compiler-error\\\":240,\\\"weakmap-shim\\\":532}],295:[function(t,e,r){\\\"use strict\\\";function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}e.exports=function(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r};var i=n.prototype;i.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(t){return t.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},i.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),c=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,c,s[0],c,e[0],r[0]),t[1]&&a.drawLine(l,c,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,c,s[2],c,e[2],r[2]),t[3]&&a.drawLine(l,c,l,s[3],e[3],r[3])}},i.dispose=function(){this.plot.removeOverlay(this)}},{}],296:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=t(\\\"gl-shader\\\"),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec3 position, color;\\\\nattribute float weight;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform vec3 coordinates[3];\\\\nuniform vec4 colors[3];\\\\nuniform vec2 screenShape;\\\\nuniform float lineWidth;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  vec3 vertexPosition = mix(coordinates[0],\\\\n    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\\\\n\\\\n  vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\\\\n  vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\\\\n  vec2 delta = weight * clipOffset * screenShape;\\\\n  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\\\\n\\\\n  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\\\\n  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\\\\n}\\\\n\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n  gl_FragColor = fragColor;\\\\n}\\\"]);e.exports=function(t){return i(t,a,o,null,[{name:\\\"position\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec3\\\"},{name:\\\"weight\\\",type:\\\"float\\\"}])}},{\\\"gl-shader\\\":288,glslify:392}],297:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-buffer\\\"),i=t(\\\"gl-vao\\\"),a=t(\\\"./shaders/index\\\");e.exports=function(t,e){var r=[];function o(t,e,n,i,a,o){var s=[t,e,n,0,0,0,1];s[i+3]=1,s[i]=a,r.push.apply(r,s),s[6]=-1,r.push.apply(r,s),s[i]=o,r.push.apply(r,s),r.push.apply(r,s),s[6]=1,r.push.apply(r,s),s[i]=a,r.push.apply(r,s)}o(0,0,0,0,0,1),o(0,0,0,1,0,1),o(0,0,0,2,0,1),o(1,0,0,1,-1,1),o(1,0,0,2,-1,1),o(0,1,0,0,-1,1),o(0,1,0,2,-1,1),o(0,0,1,0,-1,1),o(0,0,1,1,-1,1);var l=n(t,r),c=i(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),u=a(t);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var f=new s(t,l,c,u);return f.update(e),f};var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var l=s.prototype,c=[0,0,0],u=[0,0,0],f=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(t){},l.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||o,s=t.view||o,l=t.projection||o;this.axes&&(i=this.axes.lastCubeProps.axis);for(var h=c,p=u,d=0;d<3;++d)i&&i[d]<0?(h[d]=this.bounds[0][d],p[d]=this.bounds[1][d]):(h[d]=this.bounds[1][d],p[d]=this.bounds[0][d]);f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=s,n.uniforms.projection=l,n.uniforms.coordinates=[this.position,h,p],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(d=0;d<3;++d)n.uniforms.lineWidth=this.lineWidth[d]*this.pixelRatio,this.enabled[d]&&(r.draw(e.TRIANGLES,6,6*d),this.drawSides[d]&&r.draw(e.TRIANGLES,12,18+12*d));r.unbind()},l.update=function(t){t&&(\\\"bounds\\\"in t&&(this.bounds=t.bounds),\\\"position\\\"in t&&(this.position=t.position),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"colors\\\"in t&&(this.colors=t.colors),\\\"enabled\\\"in t&&(this.enabled=t.enabled),\\\"drawSides\\\"in t&&(this.drawSides=t.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\\\"./shaders/index\\\":296,\\\"gl-buffer\\\":230,\\\"gl-vao\\\":310}],298:[function(t,e,r){arguments[4][232][0].apply(r,arguments)},{barycentric:61,dup:232,\\\"polytope-closest-point/lib/closest_point_2d.js\\\":464}],299:[function(t,e,r){var n=t(\\\"glslify\\\"),i=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat inverse(float m) {\\\\n  return 1.0 / m;\\\\n}\\\\n\\\\nmat2 inverse(mat2 m) {\\\\n  return mat2(m[1][1],-m[0][1],\\\\n             -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\\\\n}\\\\n\\\\nmat3 inverse(mat3 m) {\\\\n  float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\\\\n  float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\\\\n  float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\\\\n\\\\n  float b01 = a22 * a11 - a12 * a21;\\\\n  float b11 = -a22 * a10 + a12 * a20;\\\\n  float b21 = a21 * a10 - a11 * a20;\\\\n\\\\n  float det = a00 * b01 + a01 * b11 + a02 * b21;\\\\n\\\\n  return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\\\\n              b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\\\\n              b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\\\\n}\\\\n\\\\nmat4 inverse(mat4 m) {\\\\n  float\\\\n      a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\\\\n      a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\\\\n      a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\\\\n      a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\\\\n\\\\n      b00 = a00 * a11 - a01 * a10,\\\\n      b01 = a00 * a12 - a02 * a10,\\\\n      b02 = a00 * a13 - a03 * a10,\\\\n      b03 = a01 * a12 - a02 * a11,\\\\n      b04 = a01 * a13 - a03 * a11,\\\\n      b05 = a02 * a13 - a03 * a12,\\\\n      b06 = a20 * a31 - a21 * a30,\\\\n      b07 = a20 * a32 - a22 * a30,\\\\n      b08 = a20 * a33 - a23 * a30,\\\\n      b09 = a21 * a32 - a22 * a31,\\\\n      b10 = a21 * a33 - a23 * a31,\\\\n      b11 = a22 * a33 - a23 * a32,\\\\n\\\\n      det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\\\\n\\\\n  return mat4(\\\\n      a11 * b11 - a12 * b10 + a13 * b09,\\\\n      a02 * b10 - a01 * b11 - a03 * b09,\\\\n      a31 * b05 - a32 * b04 + a33 * b03,\\\\n      a22 * b04 - a21 * b05 - a23 * b03,\\\\n      a12 * b08 - a10 * b11 - a13 * b07,\\\\n      a00 * b11 - a02 * b08 + a03 * b07,\\\\n      a32 * b02 - a30 * b05 - a33 * b01,\\\\n      a20 * b05 - a22 * b02 + a23 * b01,\\\\n      a10 * b10 - a11 * b08 + a13 * b06,\\\\n      a01 * b08 - a00 * b10 - a03 * b06,\\\\n      a30 * b04 - a31 * b02 + a33 * b00,\\\\n      a21 * b02 - a20 * b04 - a23 * b00,\\\\n      a11 * b07 - a10 * b09 - a12 * b06,\\\\n      a00 * b09 - a01 * b07 + a02 * b06,\\\\n      a31 * b01 - a30 * b03 - a32 * b00,\\\\n      a20 * b03 - a21 * b01 + a22 * b00) / det;\\\\n}\\\\n\\\\nvec3 getOrthogonalVector(vec3 v) {\\\\n  // Return up-vector for only-z vector.\\\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\\\n  // Assign z = 0, x = -b, y = a:\\\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\\\n    return normalize(vec3(-v.y, v.x, 0.0));\\\\n  } else {\\\\n    return normalize(vec3(0.0, v.z, -v.y));\\\\n  }\\\\n}\\\\n\\\\n// Calculate the tube vertex and normal at the given index.\\\\n//\\\\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\\\\n//\\\\n// Each tube segment is made up of a ring of vertices.\\\\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\\\\n// The indexes of tube segments run from 0 to 8.\\\\n//\\\\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\\\\n  float segmentCount = 8.0;\\\\n\\\\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\\\\n\\\\n  vec3 u = getOrthogonalVector(d);\\\\n  vec3 v = normalize(cross(u, d));\\\\n\\\\n  vec3 x = u * cos(angle) * length(d);\\\\n  vec3 y = v * sin(angle) * length(d);\\\\n  vec3 v3 = x + y;\\\\n\\\\n  normal = normalize(v3);\\\\n\\\\n  return v3;\\\\n}\\\\n\\\\nattribute vec4 vector;\\\\nattribute vec4 color, position;\\\\nattribute vec2 uv;\\\\nuniform float tubeScale;\\\\n\\\\nuniform mat4 model\\\\n           , view\\\\n           , projection;\\\\nuniform vec3 eyePosition\\\\n           , lightPosition;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data\\\\n           , f_position;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n  // Scale the vector magnitude to stay constant with\\\\n  // model & view changes.\\\\n  vec3 normal;\\\\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\\\\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\\\n  normal = normalize(normal * inverse(mat3(model)));\\\\n\\\\n  gl_Position      = projection * view * tubePosition;\\\\n  f_color          = color;\\\\n  f_normal         = normal;\\\\n  f_data           = tubePosition.xyz;\\\\n  f_position       = position.xyz;\\\\n  f_eyeDirection   = eyePosition   - tubePosition.xyz;\\\\n  f_lightDirection = lightPosition - tubePosition.xyz;\\\\n  f_uv             = uv;\\\\n}\\\\n\\\"]),a=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat beckmannDistribution(float x, float roughness) {\\\\n  float NdotH = max(x, 0.0001);\\\\n  float cos2Alpha = NdotH * NdotH;\\\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\\\n  float roughness2 = roughness * roughness;\\\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\\\n  return exp(tan2Alpha / roughness2) / denom;\\\\n}\\\\n\\\\nfloat cookTorranceSpecular(\\\\n  vec3 lightDirection,\\\\n  vec3 viewDirection,\\\\n  vec3 surfaceNormal,\\\\n  float roughness,\\\\n  float fresnel) {\\\\n\\\\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\\\\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\\\\n\\\\n  //Half angle vector\\\\n  vec3 H = normalize(lightDirection + viewDirection);\\\\n\\\\n  //Geometric term\\\\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\\\\n  float VdotH = max(dot(viewDirection, H), 0.000001);\\\\n  float LdotH = max(dot(lightDirection, H), 0.000001);\\\\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\\\\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\\\\n  float G = min(1.0, min(G1, G2));\\\\n  \\\\n  //Distribution term\\\\n  float D = beckmannDistribution(NdotH, roughness);\\\\n\\\\n  //Fresnel term\\\\n  float F = pow(1.0 - VdotN, fresnel);\\\\n\\\\n  //Multiply terms and done\\\\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 clipBounds[2];\\\\nuniform float roughness\\\\n            , fresnel\\\\n            , kambient\\\\n            , kdiffuse\\\\n            , kspecular\\\\n            , opacity;\\\\nuniform sampler2D texture;\\\\n\\\\nvarying vec3 f_normal\\\\n           , f_lightDirection\\\\n           , f_eyeDirection\\\\n           , f_data\\\\n           , f_position;\\\\nvarying vec4 f_color;\\\\nvarying vec2 f_uv;\\\\n\\\\nvoid main() {\\\\n\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  vec3 N = normalize(f_normal);\\\\n  vec3 L = normalize(f_lightDirection);\\\\n  vec3 V = normalize(f_eyeDirection);\\\\n\\\\n  if(!gl_FrontFacing) {\\\\n    N = -N;\\\\n  }\\\\n\\\\n  float specular = cookTorranceSpecular(L, V, N, roughness, fresnel);\\\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\\\n\\\\n  vec4 surfaceColor =  texture2D(texture, f_uv);\\\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\\\n\\\\n  gl_FragColor = litColor * opacity;\\\\n}\\\"]),o=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvec3 getOrthogonalVector(vec3 v) {\\\\n  // Return up-vector for only-z vector.\\\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\\\n  // Assign z = 0, x = -b, y = a:\\\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\\\n    return normalize(vec3(-v.y, v.x, 0.0));\\\\n  } else {\\\\n    return normalize(vec3(0.0, v.z, -v.y));\\\\n  }\\\\n}\\\\n\\\\n// Calculate the tube vertex and normal at the given index.\\\\n//\\\\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\\\\n//\\\\n// Each tube segment is made up of a ring of vertices.\\\\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\\\\n// The indexes of tube segments run from 0 to 8.\\\\n//\\\\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\\\\n  float segmentCount = 8.0;\\\\n\\\\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\\\\n\\\\n  vec3 u = getOrthogonalVector(d);\\\\n  vec3 v = normalize(cross(u, d));\\\\n\\\\n  vec3 x = u * cos(angle) * length(d);\\\\n  vec3 y = v * sin(angle) * length(d);\\\\n  vec3 v3 = x + y;\\\\n\\\\n  normal = normalize(v3);\\\\n\\\\n  return v3;\\\\n}\\\\n\\\\nattribute vec4 vector;\\\\nattribute vec4 position;\\\\nattribute vec4 id;\\\\n\\\\nuniform mat4 model, view, projection;\\\\nuniform float tubeScale;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  vec3 normal;\\\\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\\\\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\\\n\\\\n  gl_Position = projection * view * tubePosition;\\\\n  f_id        = id;\\\\n  f_position  = position.xyz;\\\\n}\\\\n\\\"]),s=n([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3  clipBounds[2];\\\\nuniform float pickId;\\\\n\\\\nvarying vec3 f_position;\\\\nvarying vec4 f_id;\\\\n\\\\nvoid main() {\\\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\\\n\\\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\\\n}\\\"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:\\\"position\\\",type:\\\"vec4\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"},{name:\\\"color\\\",type:\\\"vec4\\\"},{name:\\\"uv\\\",type:\\\"vec2\\\"},{name:\\\"vector\\\",type:\\\"vec4\\\"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:\\\"position\\\",type:\\\"vec4\\\"},{name:\\\"id\\\",type:\\\"vec4\\\"},{name:\\\"vector\\\",type:\\\"vec4\\\"}]}},{glslify:392}],300:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-shader\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"gl-texture2d\\\"),s=t(\\\"normals\\\"),l=t(\\\"gl-mat4/multiply\\\"),c=t(\\\"gl-mat4/invert\\\"),u=t(\\\"ndarray\\\"),f=t(\\\"colormap\\\"),h=t(\\\"simplicial-complex-contour\\\"),p=t(\\\"typedarray-pool\\\"),d=t(\\\"./shaders\\\"),g=(t(\\\"./closest-point\\\"),d.meshShader),v=d.pickShader,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,v,y,x,b,_,w,k,M,A,T,S,C){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleVectors=c,this.triangleColors=f,this.triangleNormals=p,this.triangleUVs=h,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=g,this.edgeColors=y,this.edgeUVs=x,this.edgeIds=v,this.edgeVAO=b,this.edgeCount=0,this.pointPositions=_,this.pointColors=k,this.pointUVs=M,this.pointSizes=A,this.pointIds=w,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=C,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!1,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.tubeScale=1,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1]}var x=y.prototype;function b(t){var e=n(t,v.vertex,v.fragment,null,v.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity>=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var c=r[l],u=0;u<2;++u){var f=c[0];2===c.length&&(f=c[u]);for(var d=n[f][0],g=n[f][1],v=i[f],m=1-v,y=this.positions[d],x=this.positions[g],b=0;b<3;++b)o[s++]=v*y[b]+m*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},x.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\\\"contourEnable\\\"in t&&(this.contourEnable=t.contourEnable),\\\"contourColor\\\"in t&&(this.contourColor=t.contourColor),\\\"lineWidth\\\"in t&&(this.lineWidth=t.lineWidth),\\\"lightPosition\\\"in t&&(this.lightPosition=t.lightPosition),\\\"opacity\\\"in t&&(this.opacity=t.opacity),\\\"ambient\\\"in t&&(this.ambientLight=t.ambient),\\\"diffuse\\\"in t&&(this.diffuseLight=t.diffuse),\\\"specular\\\"in t&&(this.specularLight=t.specular),\\\"roughness\\\"in t&&(this.roughness=t.roughness),\\\"fresnel\\\"in t&&(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=f({colormap:t,nshades:256,format:\\\"rgba\\\"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale);var a=[],l=[],c=[],h=[],p=[],d=[],g=[],v=[],m=[],y=[],x=[],b=[],_=[],w=[],k=[];this.cells=r,this.positions=n,this.vectors=i;var M=t.vertexNormals,A=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,S=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!A&&(A=s.faceNormals(r,n,S)),A||M||(M=s.vertexNormals(r,n,T));var C=t.vertexColors,E=t.cellColors,L=t.meshColor||[1,1,1,1],z=t.vertexUVs,O=t.vertexIntensity,I=t.cellUVs,P=t.cellIntensity,D=1/0,R=-1/0;if(!z&&!I)if(O)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],R=+t.vertexIntensityBounds[1];else for(var B=0;B<O.length;++B){var F=O[B];D=Math.min(D,F),R=Math.max(R,F)}else if(P)for(B=0;B<P.length;++B){F=P[B];D=Math.min(D,F),R=Math.max(R,F)}else for(B=0;B<n.length;++B){F=n[B][2];D=Math.min(D,F),R=Math.max(R,F)}this.intensity=O||(P?function(t,e,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=0;var a=t.length;for(i=0;i<a;++i)for(var o=t[i],s=0;s<o.length;++s)n[o[s]]=r[i];return n}(r,n.length,P):function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n));var N=t.pointSizes,j=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(B=0;B<n.length;++B)for(var V=n[B],U=0;U<3;++U)!isNaN(V[U])&&isFinite(V[U])&&(this.bounds[0][U]=Math.min(this.bounds[0][U],V[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],V[U]));var q=0,H=0,G=0;t:for(B=0;B<r.length;++B){var W=r[B];switch(W.length){case 1:for(V=n[X=W[0]],U=0;U<3;++U)if(isNaN(V[U])||!isFinite(V[U]))continue t;x.push(V[0],V[1],V[2],V[3]),3===(Z=C?C[X]:E?E[B]:L).length?b.push(Z[0],Z[1],Z[2],1):b.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],_.push($[0],$[1]),N?w.push(N[X]):w.push(j),k.push(B),G+=1;break;case 2:for(U=0;U<2;++U){V=n[X=W[U]];for(var Y=0;Y<3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t}for(U=0;U<2;++U){V=n[X=W[U]];g.push(V[0],V[1],V[2]),3===(Z=C?C[X]:E?E[B]:L).length?v.push(Z[0],Z[1],Z[2],1):v.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],m.push($[0],$[1]),y.push(B)}H+=1;break;case 3:for(U=0;U<3;++U)for(V=n[X=W[U]],Y=0;Y<3;++Y)if(isNaN(V[Y])||!isFinite(V[Y]))continue t;for(U=0;U<3;++U){var X;V=n[X=W[U]];a.push(V[0],V[1],V[2],V[3]);var Z,$,J,K=i[X];l.push(K[0],K[1],K[2],K[3]),3===(Z=C?C[X]:E?E[B]:L).length?c.push(Z[0],Z[1],Z[2],1):c.push(Z[0],Z[1],Z[2],Z[3]),$=z?z[X]:O?[(O[X]-D)/(R-D),0]:I?I[B]:P?[(P[B]-D)/(R-D),0]:[(V[2]-D)/(R-D),0],p.push($[0],$[1]),J=M?M[X]:A[B],h.push(J[0],J[1],J[2]),d.push(B)}q+=1}}this.pointCount=G,this.edgeCount=H,this.triangleCount=q,this.pointPositions.update(x),this.pointColors.update(b),this.pointUVs.update(_),this.pointSizes.update(w),this.pointIds.update(new Uint32Array(k)),this.edgePositions.update(g),this.edgeColors.update(v),this.edgeUVs.update(m),this.edgeIds.update(new Uint32Array(y)),this.trianglePositions.update(a),this.triangleVectors.update(l),this.triangleColors.update(c),this.triangleUVs.update(p),this.triangleNormals.update(h),this.triangleIds.update(new Uint32Array(d))}},x.drawTransparent=x.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,contourColor:this.contourColor,texture:0};this.texture.bind(0);var u=new Array(16);l(u,s.view,s.model),l(u,s.projection,u),c(u,u);for(o=0;o<3;++o)s.eyePosition[o]=u[12+o]/u[15];var f,h=u[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*u[4*o+3];for(o=0;o<3;++o){for(var p=u[12+o],d=0;d<3;++d)p+=u[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount>0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:e,position:n,intensity:this.intensity[r[1]],velocity:this.vectors[r[1]].slice(0,3),divergence:this.vectors[r[1]][3],dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),f=i(t),h=i(t),p=i(t),d=i(t),v=i(t),m=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:h,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:f,type:t.FLOAT,size:4}]),x=i(t),_=i(t),w=i(t),k=i(t),M=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),T=i(t),S=i(t),C=i(t),E=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:E,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:T,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:C,type:t.FLOAT,size:1}]),z=i(t),O=new y(t,l,r,null,null,s,null,null,c,f,v,h,p,d,m,x,k,_,w,M,A,E,T,S,C,L,z,a(t,[{buffer:z,type:t.FLOAT,size:3}]));return O.update(e),O}},{\\\"./closest-point\\\":298,\\\"./shaders\\\":299,colormap:114,\\\"gl-buffer\\\":230,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"gl-shader\\\":288,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,ndarray:433,normals:436,\\\"simplicial-complex-contour\\\":494,\\\"typedarray-pool\\\":522}],301:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-vec3\\\"),i=t(\\\"gl-vec4\\\"),a=function(t,e,r,a){for(var o=0,s=0;s<t.length;s++)for(var l=t[s].velocities,c=0;c<l.length;c++){var u=n.length(l[c]);u>o&&(o=u)}var f=t.map(function(t){return function(t,e,r,a){var o,s,l,c=t.points,u=t.velocities,f=t.divergences;n.set(n.create(),0,1,0),n.create(),n.create();n.create();for(var h=[],p=[],d=[],g=[],v=[],m=[],y=0,x=0,b=i.create(),_=i.create(),w=0;w<c.length;w++){o=c[w],s=u[w],l=f[w],0===e&&(l=.05*r),x=n.length(s)/a,b=i.create(),n.copy(b,s),b[3]=l;for(var k=0;k<8;k++)v[k]=[o[0],o[1],o[2],k];if(g.length>0)for(k=0;k<8;k++){var M=(k+1)%8;h.push(g[k],v[k],v[M],v[M],g[M],g[k]),d.push(_,b,b,b,_,_),m.push(y,x,x,x,y,y),p.push([h.length-6,h.length-5,h.length-4],[h.length-3,h.length-2,h.length-1])}var A=g;g=v,v=A,A=_,_=b,b=A,A=y,y=x,x=A}return{positions:h,cells:p,vectors:d,vertexIntensity:m}}(t,r,a,o)}),h=[],p=[],d=[],g=[];for(s=0;s<f.length;s++){var v=f[s],m=h.length;h=h.concat(v.positions),d=d.concat(v.vectors),g=g.concat(v.vertexIntensity);for(c=0;c<v.cells.length;c++){var y=v.cells[c],x=[];p.push(x);for(var b=0;b<y.length;b++)x.push(y[b]+m)}}return{positions:h,cells:p,vectors:d,vertexIntensity:g,colormap:e}},o=function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var a=this.getVelocity(r);n.subtract(a,a,e),n.scale(a,a,1e4),n.add(r,t,[0,i,0]);var o=this.getVelocity(r);n.subtract(o,o,e),n.scale(o,o,1e4),n.add(r,t,[0,0,i]);var s=this.getVelocity(r);return n.subtract(s,s,e),n.scale(s,s,1e4),n.add(r,a,o),n.add(r,r,s),r},s=function(t){return h(t,this.vectors,this.meshgrid,this.clampBorders)},l=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(n===e)return r;if(n>e)return r-1}return r},c=n.create(),u=n.create(),f=function(t,e,r){return t<e?e:t>r?r:t},h=function(t,e,r,i){var a=t[0],o=t[1],s=t[2],h=r[0].length,p=r[1].length,d=r[2].length,g=l(r[0],a),v=l(r[1],o),m=l(r[2],s),y=g+1,x=v+1,b=m+1;if(r[0][g]===a&&(y=g),r[1][v]===o&&(x=v),r[2][m]===s&&(b=m),i&&(g=f(g,0,h-1),y=f(y,0,h-1),v=f(v,0,p-1),x=f(x,0,p-1),m=f(m,0,d-1),b=f(b,0,d-1)),g<0||v<0||m<0||y>=h||x>=p||b>=d)return n.create();var _=(a-r[0][g])/(r[0][y]-r[0][g]),w=(o-r[1][v])/(r[1][x]-r[1][v]),k=(s-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var M=m*h*p,A=b*h*p,T=v*h,S=x*h,C=g,E=y,L=e[T+M+C],z=e[T+M+E],O=e[S+M+C],I=e[S+M+E],P=e[T+A+C],D=e[T+A+E],R=e[S+A+C],B=e[S+A+E],F=n.create();return n.lerp(F,L,z,_),n.lerp(c,O,I,_),n.lerp(F,F,c,w),n.lerp(c,P,D,_),n.lerp(u,R,B,_),n.lerp(c,c,u,w),n.lerp(F,F,c,k),F},p=function(t){var e=1/0;t.sort(function(t,e){return t-e});for(var r=1;r<t.length;r++){var n=Math.abs(t[r]-t[r-1]);n<e&&(e=n)}return e};e.exports=function(t,e){var r=t.startingPositions,i=t.maxLength||1e3,l=t.tubeSize||1,c=t.absoluteTubeSize;t.getDivergence||(t.getDivergence=o),t.getVelocity||(t.getVelocity=s),void 0===t.clampBorders&&(t.clampBorders=!0);var u=[],f=e[0][0],h=e[0][1],d=e[0][2],g=e[1][0],v=e[1][1],m=e[1][2],y=function(t,e){var r=e[0],n=e[1],i=e[2];return r>=f&&r<=g&&n>=h&&n<=v&&i>=d&&i<=m},x=10*n.distance(e[0],e[1])/i,b=x*x,_=1,w=0;n.create();r.length>=2&&(_=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=0;s<t.length;s++){var l=t[s],c=l[0],u=l[1],f=l[2];i[c]||(e.push(c),i[c]=!0),a[u]||(r.push(u),a[u]=!0),o[f]||(n.push(f),o[f]=!0)}var h=p(e),d=p(r),g=p(n),v=Math.min(h,d,g);return isFinite(v)?v:1}(r));for(var k=0;k<r.length;k++){var M=n.create();n.copy(M,r[k]);var A=[M],T=[],S=t.getVelocity(M),C=M;T.push(S);var E=[],L=t.getDivergence(M,S);(P=n.length(L))>w&&!isNaN(P)&&isFinite(P)&&(w=P),E.push(P),u.push({points:A,velocities:T,divergences:E});for(var z=0;z<100*i&&A.length<i&&y(0,M);){z++;var O=n.clone(S),I=n.squaredLength(O);if(0===I)break;if(I>b&&n.scale(O,O,x/Math.sqrt(I)),n.add(O,O,M),S=t.getVelocity(O),n.squaredDistance(C,O)-b>-1e-4*b){A.push(O),C=O,T.push(S);L=t.getDivergence(O,S);(P=n.length(L))>w&&!isNaN(P)&&isFinite(P)&&(w=P),E.push(P)}M=O}}for(k=0;k<E.length;k++){var P=E[k];!isNaN(P)&&isFinite(P)||(E[k]=w)}var D=a(u,t.colormap,w,_);return c?D.tubeScale=c:(0===w&&(w=1),D.tubeScale=.5*l*_/w),D},e.exports.createTubeMesh=t(\\\"./lib/tubemesh\\\")},{\\\"./lib/tubemesh\\\":300,\\\"gl-vec3\\\":329,\\\"gl-vec4\\\":365}],302:[function(t,e,r){var n=t(\\\"gl-shader\\\"),i=t(\\\"glslify\\\"),a=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 uv;\\\\nattribute vec3 f;\\\\nattribute vec3 normal;\\\\n\\\\nuniform mat4 model, view, projection, inverseModel;\\\\nuniform vec3 lightPosition, eyePosition;\\\\nuniform sampler2D colormap;\\\\n\\\\nvarying float value, kill;\\\\nvarying vec3 worldCoordinate;\\\\nvarying vec2 planeCoordinate;\\\\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\\\\nvarying vec4 vColor;\\\\n\\\\nvoid main() {\\\\n  worldCoordinate = vec3(uv.zw, f.x);\\\\n  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\\\\n  vec4 clipPosition = projection * view * worldPosition;\\\\n  gl_Position = clipPosition;\\\\n  kill = f.y;\\\\n  value = f.z;\\\\n  planeCoordinate = uv.xy;\\\\n\\\\n  vColor = texture2D(colormap, vec2(value, value));\\\\n\\\\n  //Lighting geometry parameters\\\\n  vec4 cameraCoordinate = view * worldPosition;\\\\n  cameraCoordinate.xyz /= cameraCoordinate.w;\\\\n  lightDirection = lightPosition - cameraCoordinate.xyz;\\\\n  eyeDirection   = eyePosition - cameraCoordinate.xyz;\\\\n  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);\\\\n}\\\\n\\\"]),o=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nfloat beckmannDistribution(float x, float roughness) {\\\\n  float NdotH = max(x, 0.0001);\\\\n  float cos2Alpha = NdotH * NdotH;\\\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\\\n  float roughness2 = roughness * roughness;\\\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\\\n  return exp(tan2Alpha / roughness2) / denom;\\\\n}\\\\n\\\\nfloat beckmannSpecular(\\\\n  vec3 lightDirection,\\\\n  vec3 viewDirection,\\\\n  vec3 surfaceNormal,\\\\n  float roughness) {\\\\n  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\\\\n}\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec3 lowerBound, upperBound;\\\\nuniform float contourTint;\\\\nuniform vec4 contourColor;\\\\nuniform sampler2D colormap;\\\\nuniform vec3 clipBounds[2];\\\\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\\\\nuniform float vertexColor;\\\\n\\\\nvarying float value, kill;\\\\nvarying vec3 worldCoordinate;\\\\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\\\\nvarying vec4 vColor;\\\\n\\\\nvoid main() {\\\\n  if ((kill > 0.0) ||\\\\n      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\\\\n\\\\n  vec3 N = normalize(surfaceNormal);\\\\n  vec3 V = normalize(eyeDirection);\\\\n  vec3 L = normalize(lightDirection);\\\\n\\\\n  if(gl_FrontFacing) {\\\\n    N = -N;\\\\n  }\\\\n\\\\n  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\\\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\\\n\\\\n  //decide how to interpolate color \\\\u2014 in vertex or in fragment\\\\n  vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor;\\\\n\\\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\\\n\\\\n  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\\\\n}\\\\n\\\"]),s=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 uv;\\\\nattribute float f;\\\\n\\\\nuniform mat3 permutation;\\\\nuniform mat4 model, view, projection;\\\\nuniform float height, zOffset;\\\\nuniform sampler2D colormap;\\\\n\\\\nvarying float value, kill;\\\\nvarying vec3 worldCoordinate;\\\\nvarying vec2 planeCoordinate;\\\\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\\\\nvarying vec4 vColor;\\\\n\\\\nvoid main() {\\\\n  vec3 dataCoordinate = permutation * vec3(uv.xy, height);\\\\n  vec4 worldPosition = model * vec4(dataCoordinate, 1.0);\\\\n\\\\n  vec4 clipPosition = projection * view * worldPosition;\\\\n  clipPosition.z = clipPosition.z + zOffset;\\\\n\\\\n  gl_Position = clipPosition;\\\\n  value = f;\\\\n  kill = -1.0;\\\\n  worldCoordinate = dataCoordinate;\\\\n  planeCoordinate = uv.zw;\\\\n\\\\n  vColor = texture2D(colormap, vec2(value, value));\\\\n\\\\n  //Don't do lighting for contours\\\\n  surfaceNormal   = vec3(1,0,0);\\\\n  eyeDirection    = vec3(0,1,0);\\\\n  lightDirection  = vec3(0,0,1);\\\\n}\\\\n\\\"]),l=i([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nbool outOfRange(float a, float b, float p) {\\\\n  return ((p > max(a, b)) || \\\\n          (p < min(a, b)));\\\\n}\\\\n\\\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y));\\\\n}\\\\n\\\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\\\n  return (outOfRange(a.x, b.x, p.x) ||\\\\n          outOfRange(a.y, b.y, p.y) ||\\\\n          outOfRange(a.z, b.z, p.z));\\\\n}\\\\n\\\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\\\n}\\\\n\\\\nuniform vec2 shape;\\\\nuniform vec3 clipBounds[2];\\\\nuniform float pickId;\\\\n\\\\nvarying float value, kill;\\\\nvarying vec3 worldCoordinate;\\\\nvarying vec2 planeCoordinate;\\\\nvarying vec3 surfaceNormal;\\\\n\\\\nvec2 splitFloat(float v) {\\\\n  float vh = 255.0 * v;\\\\n  float upper = floor(vh);\\\\n  float lower = fract(vh);\\\\n  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\\\\n}\\\\n\\\\nvoid main() {\\\\n  if ((kill > 0.0) ||\\\\n      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\\\\n\\\\n  vec2 ux = splitFloat(planeCoordinate.x / shape.x);\\\\n  vec2 uy = splitFloat(planeCoordinate.y / shape.y);\\\\n  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\\\\n}\\\\n\\\"]);r.createShader=function(t){var e=n(t,a,o,null,[{name:\\\"uv\\\",type:\\\"vec4\\\"},{name:\\\"f\\\",type:\\\"vec3\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,a,l,null,[{name:\\\"uv\\\",type:\\\"vec4\\\"},{name:\\\"f\\\",type:\\\"vec3\\\"},{name:\\\"normal\\\",type:\\\"vec3\\\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:\\\"uv\\\",type:\\\"vec4\\\"},{name:\\\"f\\\",type:\\\"float\\\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:\\\"uv\\\",type:\\\"vec4\\\"},{name:\\\"f\\\",type:\\\"float\\\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{\\\"gl-shader\\\":288,glslify:392}],303:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=i(e),u=a(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,S,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var v=new C(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,g,s,l,f,h,p,d),m={levels:[[],[],[]]};for(var k in t)m[k]=t[k];return m.colormap=m.colormap||\\\"jet\\\",v.update(m),v};var n=t(\\\"bit-twiddle\\\"),i=t(\\\"gl-buffer\\\"),a=t(\\\"gl-vao\\\"),o=t(\\\"gl-texture2d\\\"),s=t(\\\"typedarray-pool\\\"),l=t(\\\"colormap\\\"),c=t(\\\"ndarray-ops\\\"),u=t(\\\"ndarray-pack\\\"),f=t(\\\"ndarray\\\"),h=t(\\\"surface-nets\\\"),p=t(\\\"gl-mat4/multiply\\\"),d=t(\\\"gl-mat4/invert\\\"),g=t(\\\"binary-search-bounds\\\"),v=t(\\\"ndarray-gradient\\\"),m=t(\\\"./lib/shaders\\\"),y=m.createShader,x=m.createContourShader,b=m.createPickShader,_=m.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],M=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[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,0,0]];function T(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=A[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function C(t,e,r,n,i,a,o,l,c,u,h,p,d,g){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new T([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var E=C.prototype;E.isTransparent=function(){return this.opacity<1},E.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},E.pickSlots=1,E.setPickBase=function(t){this.pickId=t};var L=[0,0,0],z={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||L,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=z.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],p(l,t.model,l);var c=z.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=o,z.showContour=s,z}var I={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},P=k.slice(),D=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=I;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=D,n.vertexColor=this.vertexColor;var s=P;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(o=0;o<3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=O(n,this);if(u.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour&&!e){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(f.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]),o=0;o<this.contourLevels[i].length;++o)o===this.highlightLevel[i]?(f.uniforms.contourColor=this.highlightColor[i],f.uniforms.contourTint=this.highlightTint[i]):0!==o&&o-1!==this.highlightLevel[i]||(f.uniforms.contourColor=this.contourColor[i],f.uniforms.contourTint=this.contourTint[i]),this._contourCounts[i][o]&&(f.uniforms.height=this.contourLevels[i][o],h.draw(r.LINES,this._contourCounts[i][o],this._contourOffsets[i][o]));for(i=0;i<3;++i)for(f.uniforms.model=u.projections[i],f.uniforms.clipBounds=u.clipBounds[i],o=0;o<3;++o)if(this.contourProject[i][o]){f.uniforms.permutation=A[o],r.lineWidth(this.contourWidth[o]);for(var g=0;g<this.contourLevels[o].length;++g)g===this.highlightLevel[o]?(f.uniforms.contourColor=this.highlightColor[o],f.uniforms.contourTint=this.highlightTint[o]):0!==g&&g-1!==this.highlightLevel[o]||(f.uniforms.contourColor=this.contourColor[o],f.uniforms.contourTint=this.contourTint[o]),f.uniforms.height=this.contourLevels[o][g],h.draw(r.LINES,this._contourCounts[o][g],this._contourOffsets[o][g])}for(h.unbind(),(h=this._dynamicVAO).bind(),i=0;i<3;++i)if(0!==this._dynamicCounts[i])for(f.uniforms.model=n.model,f.uniforms.clipBounds=n.clipBounds,f.uniforms.permutation=A[i],r.lineWidth(this.dynamicWidth[i]),f.uniforms.contourColor=this.dynamicColor[i],f.uniforms.contourTint=this.dynamicTint[i],f.uniforms.height=this.dynamicLevel[i],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]),o=0;o<3;++o)this.contourProject[o][i]&&(f.uniforms.model=u.projections[o],f.uniforms.clipBounds=u.clipBounds[o],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]));h.unbind()}}E.draw=function(t){return R.call(this,t,!1)},E.drawTransparent=function(t){return R.call(this,t,!0)};var B={model:k,view:k,projection:k,inverseModel:k,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};function F(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))}function N(t,e){return Array.isArray(t)?[e(t[0]),e(t[1]),e(t[2])]:[e(t),e(t),e(t)]}function j(t){return Array.isArray(t)?3===t.length?[t[0],t[1],t[2],1]:[t[0],t[1],t[2],t[3]]:[0,0,0,1]}function V(t){if(Array.isArray(t)){if(Array.isArray(t))return[j(t[0]),j(t[1]),j(t[2])];var e=j(t);return[e.slice(),e.slice(),e.slice()]}}E.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=B;r.model=t.model||k,r.view=t.view||k,r.projection=t.projection||k,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=D;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var o=O(r,this);if(o.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=o.projections[n],this._pickShader.uniforms.clipBounds=o.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(o.showContour){var s=this._contourPickShader;s.bind(),s.uniforms=r;var l=this._contourVAO;for(l.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]),s.uniforms.permutation=A[a],n=0;n<this.contourLevels[a].length;++n)this._contourCounts[a][n]&&(s.uniforms.height=this.contourLevels[a][n],l.draw(e.LINES,this._contourCounts[a][n],this._contourOffsets[a][n]));for(n=0;n<3;++n)for(s.uniforms.model=o.projections[n],s.uniforms.clipBounds=o.clipBounds[n],a=0;a<3;++a)if(this.contourProject[n][a]){s.uniforms.permutation=A[a],e.lineWidth(this.contourWidth[a]);for(var c=0;c<this.contourLevels[a].length;++c)this._contourCounts[a][c]&&(s.uniforms.height=this.contourLevels[a][c],l.draw(e.LINES,this._contourCounts[a][c],this._contourOffsets[a][c]))}l.unbind()}},E.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=this._field[2].shape,r=this._pickResult,n=e[0]*(t.value[0]+(t.value[2]>>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var f=u?a:1-a,h=0;h<2;++h)for(var p=i+u,d=s+h,v=f*(h?l:1-l),m=0;m<3;++m)c[m]+=this._field[m].get(p,d)*v;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=g.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]<this.contourLevels[x].length-1){var b=this.contourLevels[x][y[x]],_=this.contourLevels[x][y[x]+1];Math.abs(b-c[x])>Math.abs(_-c[x])&&(y[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],m=0;m<3;++m)r.dataCoordinate[m]=this._field[m].get(r.index[0],r.index[1]);return r},E.update=function(t){t=t||{},this.dirty=!0,\\\"contourWidth\\\"in t&&(this.contourWidth=N(t.contourWidth,Number)),\\\"showContour\\\"in t&&(this.showContour=N(t.showContour,Boolean)),\\\"showSurface\\\"in t&&(this.showSurface=!!t.showSurface),\\\"contourTint\\\"in t&&(this.contourTint=N(t.contourTint,Boolean)),\\\"contourColor\\\"in t&&(this.contourColor=V(t.contourColor)),\\\"contourProject\\\"in t&&(this.contourProject=N(t.contourProject,function(t){return N(t,Boolean)})),\\\"surfaceProject\\\"in t&&(this.surfaceProject=t.surfaceProject),\\\"dynamicColor\\\"in t&&(this.dynamicColor=V(t.dynamicColor)),\\\"dynamicTint\\\"in t&&(this.dynamicTint=N(t.dynamicTint,Number)),\\\"dynamicWidth\\\"in t&&(this.dynamicWidth=N(t.dynamicWidth,Number)),\\\"opacity\\\"in t&&(this.opacity=t.opacity),\\\"colorBounds\\\"in t&&(this.colorBounds=t.colorBounds),\\\"vertexColor\\\"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),\\\"field\\\"in t||\\\"coords\\\"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),F(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var p=t.coords;if(!Array.isArray(p)||3!==p.length)throw new Error(\\\"gl-surface: invalid coordinates for x/y\\\");for(o=0;o<2;++o){var d=p[o];for(b=0;b<2;++b)if(d.shape[b]!==a[b])throw new Error(\\\"gl-surface: coords have incorrect shape\\\");F(this._field[o],d)}}else if(t.ticks){var g=t.ticks;if(!Array.isArray(g)||2!==g.length)throw new Error(\\\"gl-surface: invalid ticks\\\");for(o=0;o<2;++o){var m=g[o];if((Array.isArray(m)||m.length)&&(m=f(m)),m.shape[0]!==a[o])throw new Error(\\\"gl-surface: invalid tick length\\\");var y=f(m.data,a);y.stride[o]=m.stride[0],y.stride[1^o]=0,F(this._field[o],y)}}else{for(o=0;o<2;++o){var x=[0,0];x[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],x,0)}this._field[0].set(0,0,0);for(var b=0;b<a[0];++b)this._field[0].set(b+1,0,b);for(this._field[0].set(a[0]+1,0,a[0]-1),this._field[1].set(0,0,0),b=0;b<a[1];++b)this._field[1].set(0,b+1,b);this._field[1].set(0,a[1]+1,a[1]-1)}var _=this._field,w=f(s.mallocFloat(3*_[2].size*2),[3,a[0]+2,a[1]+2,2]);for(o=0;o<3;++o)v(w.pick(o),_[o],\\\"mirror\\\");var k=f(s.mallocFloat(3*_[2].size),[a[0]+2,a[1]+2,3]);for(o=0;o<a[0]+2;++o)for(b=0;b<a[1]+2;++b){var A=w.get(0,o,b,0),T=w.get(0,o,b,1),C=w.get(1,o,b,0),E=w.get(1,o,b,1),L=w.get(2,o,b,0),z=w.get(2,o,b,1),O=C*z-E*L,I=L*T-z*A,P=A*E-T*C,D=Math.sqrt(O*O+I*I+P*P);D<1e-8?(D=Math.max(Math.abs(O),Math.abs(I),Math.abs(P)))<1e-8?(P=1,I=O=0,D=1):D=1/D:D=1/Math.sqrt(D),k.set(o,b,0,O*D),k.set(o,b,1,I*D),k.set(o,b,2,P*D)}s.free(w.data);var R=[1/0,1/0,1/0],B=[-1/0,-1/0,-1/0],j=1/0,U=-1/0,q=(a[0]-1)*(a[1]-1)*6,H=s.mallocFloat(n.nextPow2(10*q)),G=0,W=0;for(o=0;o<a[0]-1;++o)t:for(b=0;b<a[1]-1;++b){for(var Y=0;Y<2;++Y)for(var X=0;X<2;++X)for(var Z=0;Z<3;++Z){var $=this._field[Z].get(1+o+Y,1+b+X);if(isNaN($)||!isFinite($))continue t}for(Z=0;Z<6;++Z){var J=o+M[Z][0],K=b+M[Z][1],Q=this._field[0].get(J+1,K+1),tt=this._field[1].get(J+1,K+1),et=$=this._field[2].get(J+1,K+1);O=k.get(J+1,K+1,0),I=k.get(J+1,K+1,1),P=k.get(J+1,K+1,2),t.intensity&&(et=t.intensity.get(J,K)),H[G++]=J,H[G++]=K,H[G++]=Q,H[G++]=tt,H[G++]=$,H[G++]=0,H[G++]=et,H[G++]=O,H[G++]=I,H[G++]=P,R[0]=Math.min(R[0],Q),R[1]=Math.min(R[1],tt),R[2]=Math.min(R[2],$),j=Math.min(j,et),B[0]=Math.max(B[0],Q),B[1]=Math.max(B[1],tt),B[2]=Math.max(B[2],$),U=Math.max(U,et),W+=1}}for(t.intensityBounds&&(j=+t.intensityBounds[0],U=+t.intensityBounds[1]),o=6;o<G;o+=10)H[o]=(H[o]-j)/(U-j);this._vertexCount=W,this._coordinateBuffer.update(H.subarray(0,G)),s.freeFloat(H),s.free(k.data),this.bounds=[R,B],this.intensity=t.intensity||this._field[2],this.intensityBounds[0]===j&&this.intensityBounds[1]===U||(r=!0),this.intensityBounds=[j,U]}if(\\\"levels\\\"in t){var rt=t.levels;for(rt=Array.isArray(rt[0])?rt.slice():[[],[],rt],o=0;o<3;++o)rt[o]=rt[o].slice(),rt.sort(function(t,e){return t-e});t:for(o=0;o<3;++o){if(rt[o].length!==this.contourLevels[o].length){r=!0;break}for(b=0;b<rt[o].length;++b)if(rt[o][b]!==this.contourLevels[o][b]){r=!0;break t}}this.contourLevels=rt}if(r){_=this._field,a=this.shape;for(var nt=[],it=0;it<3;++it){rt=this.contourLevels[it];var at=[],ot=[],st=[0,0,0];for(o=0;o<rt.length;++o){var lt=h(this._field[it],rt[o]);at.push(nt.length/5|0),W=0;t:for(b=0;b<lt.cells.length;++b){var ct=lt.cells[b];for(Z=0;Z<2;++Z){var ut=lt.positions[ct[Z]],ft=ut[0],ht=0|Math.floor(ft),pt=ft-ht,dt=ut[1],gt=0|Math.floor(dt),vt=dt-gt,mt=!1;e:for(var yt=0;yt<3;++yt){st[yt]=0;var xt=(it+yt+1)%3;for(Y=0;Y<2;++Y){var bt=Y?pt:1-pt;for(J=0|Math.min(Math.max(ht+Y,0),a[0]),X=0;X<2;++X){var _t=X?vt:1-vt;if(K=0|Math.min(Math.max(gt+X,0),a[1]),$=yt<2?this._field[xt].get(J,K):(this.intensity.get(J,K)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite($)||isNaN($)){mt=!0;break e}var wt=bt*_t;st[yt]+=wt*$}}}if(mt){if(Z>0){for(var kt=0;kt<5;++kt)nt.pop();W-=1}continue t}nt.push(st[0],st[1],ut[0],ut[1],st[2]),W+=1}}ot.push(W)}this._contourOffsets[it]=at,this._contourCounts[it]=ot}var Mt=s.mallocFloat(nt.length);for(o=0;o<nt.length;++o)Mt[o]=nt[o];this._contourBuffer.update(Mt),s.freeFloat(Mt)}t.colormap&&this._colorMap.setPixels(function(t){var e=u([l({colormap:t,nshades:S,format:\\\"rgba\\\"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return c.divseq(e,255),e}(t.colormap))},E.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t<3;++t)s.freeFloat(this._field[t].data)},E.highlight=function(t){if(!t)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(var e=0;e<3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;var r;if(r=this.snapToData?t.dataCoordinate:t.position,this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=s.mallocFloat(12*i[0]*i[1]),o=0;o<3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var l=(o+1)%3,c=(o+2)%3,u=this._field[o],f=this._field[l],p=this._field[c],d=(this.intensity,h(u,r[o])),g=d.cells,v=d.positions;for(this._dynamicOffsets[o]=n,e=0;e<g.length;++e)for(var m=g[e],y=0;y<2;++y){var x=v[m[y]],b=+x[0],_=0|b,w=0|Math.min(_+1,i[0]),k=b-_,M=1-k,A=+x[1],T=0|A,S=0|Math.min(T+1,i[1]),C=A-T,E=1-C,L=M*E,z=M*C,O=k*E,I=k*C,P=L*f.get(_,T)+z*f.get(_,S)+O*f.get(w,T)+I*f.get(w,S),D=L*p.get(_,T)+z*p.get(_,S)+O*p.get(w,T)+I*p.get(w,S);if(isNaN(P)||isNaN(D)){y&&(n-=1);break}a[2*n+0]=P,a[2*n+1]=D,n+=1}this._dynamicCounts[o]=n-this._dynamicOffsets[o]}else this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;this._dynamicBuffer.update(a.subarray(0,2*n)),s.freeFloat(a)}}},{\\\"./lib/shaders\\\":302,\\\"binary-search-bounds\\\":79,\\\"bit-twiddle\\\":80,colormap:114,\\\"gl-buffer\\\":230,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/multiply\\\":256,\\\"gl-texture2d\\\":305,\\\"gl-vao\\\":310,ndarray:433,\\\"ndarray-gradient\\\":424,\\\"ndarray-ops\\\":427,\\\"ndarray-pack\\\":428,\\\"surface-nets\\\":508,\\\"typedarray-pool\\\":522}],304:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"css-font\\\"),i=t(\\\"pick-by-alias\\\"),a=t(\\\"regl\\\"),o=t(\\\"gl-util/context\\\"),s=t(\\\"es6-weak-map\\\"),l=t(\\\"color-normalize\\\"),c=t(\\\"font-atlas\\\"),u=t(\\\"typedarray-pool\\\"),f=t(\\\"parse-rect\\\"),h=t(\\\"is-plain-obj\\\"),p=t(\\\"parse-unit\\\"),d=t(\\\"to-px\\\"),g=t(\\\"detect-kerning\\\"),v=t(\\\"object-assign\\\"),m=t(\\\"font-measure\\\"),y=t(\\\"flatten-vertex-data\\\"),x=t(\\\"bit-twiddle\\\").nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement(\\\"div\\\"));w.style.font=\\\"italic small-caps bold condensed 16px/2 cursive\\\",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var k=function(t){!function(t){return\\\"function\\\"==typeof t&&t._gl&&t.prop&&t.texture&&t.buffer}(t)?this.gl=o(t):(t={regl:t},this.gl=t.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||a({gl:this.gl}),this.charBuffer=this.regl.buffer({type:\\\"uint8\\\",usage:\\\"stream\\\"}),this.sizeBuffer=this.regl.buffer({type:\\\"float\\\",usage:\\\"stream\\\"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(t)?t:{})};k.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:\\\"one minus dst alpha\\\",dstAlpha:\\\"one\\\"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop(\\\"count\\\"),offset:t.prop(\\\"offset\\\"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this(\\\"sizeBuffer\\\")},width:{offset:0,stride:8,buffer:t.this(\\\"sizeBuffer\\\")},char:t.this(\\\"charBuffer\\\"),position:t.this(\\\"position\\\")},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop(\\\"color\\\"),opacity:t.prop(\\\"opacity\\\"),viewport:t.this(\\\"viewportArray\\\"),scale:t.this(\\\"scale\\\"),align:t.prop(\\\"align\\\"),baseline:t.prop(\\\"baseline\\\"),translate:t.this(\\\"translate\\\"),positionOffset:t.prop(\\\"positionOffset\\\")},primitive:\\\"points\\\",viewport:t.this(\\\"viewport\\\"),vert:\\\"\\\\n\\\\t\\\\t\\\\tprecision highp float;\\\\n\\\\t\\\\t\\\\tattribute float width, charOffset, char;\\\\n\\\\t\\\\t\\\\tattribute vec2 position;\\\\n\\\\t\\\\t\\\\tuniform float fontSize, charStep, em, align, baseline;\\\\n\\\\t\\\\t\\\\tuniform vec4 viewport;\\\\n\\\\t\\\\t\\\\tuniform vec4 color;\\\\n\\\\t\\\\t\\\\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\\\\n\\\\t\\\\t\\\\tvarying vec2 charCoord, charId;\\\\n\\\\t\\\\t\\\\tvarying float charWidth;\\\\n\\\\t\\\\t\\\\tvarying vec4 fontColor;\\\\n\\\\t\\\\t\\\\tvoid main () {\\\\n\\\\t\\\\t\\\\t\\\\t\\\"+(k.normalViewport?\\\"\\\":\\\"vec2 positionOffset = vec2(positionOffset.x,- positionOffset.y);\\\")+\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t+ positionOffset))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t/ (viewport.zw * scale.xy);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tvec2 position = (position + translate) * scale;\\\\n\\\\t\\\\t\\\\t\\\\tposition += offset * scale;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\"+(k.normalViewport?\\\"position.y = 1. - position.y;\\\":\\\"\\\")+\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tcharCoord = position * viewport.zw + viewport.xy;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tgl_Position = vec4(position * 2. - 1., 0, 1);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tgl_PointSize = charStep;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tcharId.x = mod(char, atlasDim.x);\\\\n\\\\t\\\\t\\\\t\\\\tcharId.y = floor(char / atlasDim.x);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tcharWidth = width * em;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tfontColor = color / 255.;\\\\n\\\\t\\\\t\\\\t}\\\",frag:\\\"\\\\n\\\\t\\\\t\\\\tprecision highp float;\\\\n\\\\t\\\\t\\\\tuniform sampler2D atlas;\\\\n\\\\t\\\\t\\\\tuniform float fontSize, charStep, opacity;\\\\n\\\\t\\\\t\\\\tuniform vec2 atlasSize;\\\\n\\\\t\\\\t\\\\tuniform vec4 viewport;\\\\n\\\\t\\\\t\\\\tvarying vec4 fontColor;\\\\n\\\\t\\\\t\\\\tvarying vec2 charCoord, charId;\\\\n\\\\t\\\\t\\\\tvarying float charWidth;\\\\n\\\\n\\\\t\\\\t\\\\tfloat lightness(vec4 color) {\\\\n\\\\t\\\\t\\\\t\\\\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\t\\\\tvoid main () {\\\\n\\\\t\\\\t\\\\t\\\\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\\\\n\\\\t\\\\t\\\\t\\\\tfloat halfCharStep = floor(charStep * .5 + .5);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t// invert y and shift by 1px (FF especially needs that)\\\\n\\\\t\\\\t\\\\t\\\\tuv.y = charStep - uv.y;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t// ignore points outside of character bounding box\\\\n\\\\t\\\\t\\\\t\\\\tfloat halfCharWidth = ceil(charWidth * .5);\\\\n\\\\t\\\\t\\\\t\\\\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tuv += charId * charStep;\\\\n\\\\t\\\\t\\\\t\\\\tuv = uv / atlasSize;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tvec4 color = fontColor;\\\\n\\\\t\\\\t\\\\t\\\\tvec4 mask = texture2D(atlas, uv);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tfloat maskY = lightness(mask);\\\\n\\\\t\\\\t\\\\t\\\\t// float colorY = lightness(color);\\\\n\\\\t\\\\t\\\\t\\\\tcolor.a *= maskY;\\\\n\\\\t\\\\t\\\\t\\\\tcolor.a *= opacity;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t// color.a += .1;\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t// antialiasing, see yiq color space y-channel formula\\\\n\\\\t\\\\t\\\\t\\\\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tgl_FragColor = color;\\\\n\\\\t\\\\t\\\\t}\\\"});return{regl:t,draw:e,atlas:{}}},k.prototype.update=function(t){var e=this;if(\\\"string\\\"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:\\\"position positions coord coords coordinates\\\",font:\\\"font fontFace fontface typeface cssFont css-font family fontFamily\\\",fontSize:\\\"fontSize fontsize size font-size\\\",text:\\\"text texts chars characters value values symbols\\\",align:\\\"align alignment textAlign textbaseline\\\",baseline:\\\"baseline textBaseline textbaseline\\\",direction:\\\"dir direction textDirection\\\",color:\\\"color colour fill fill-color fillColor textColor textcolor\\\",kerning:\\\"kerning kern\\\",range:\\\"range dataBox\\\",viewport:\\\"vp viewport viewBox viewbox viewPort\\\",opacity:\\\"opacity alpha transparency visible visibility opaque\\\",offset:\\\"offset positionOffset padding shift indent indentation\\\"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(t){return parseFloat(t)}):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=f(t.viewport),k.normalViewport&&(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&(\\\"number\\\"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+\\\"px sans-serif\\\");var r,a=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(t,r){if(\\\"string\\\"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+\\\"px \\\"+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&i==e.font[r].baseString||(a=!0,e.font[r]=k.fonts[i],e.font[r]))){var c=t.family.join(\\\", \\\"),u=[t.style];t.style!=t.variant&&u.push(t.variant),t.variant!=t.weight&&u.push(t.weight),_&&t.weight!=t.stretch&&u.push(t.stretch),e.font[r]={baseString:i,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:m(c,{origin:\\\"top\\\",fontSize:k.baseFontSize,fontStyle:u.join(\\\" \\\")})},k.fonts[i]=e.font[r]}}),(a||o)&&this.font.forEach(function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)}),\\\"string\\\"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),h=0;h<s.length;h++)s[h]=t.text;t.text=s}if(null!=t.text||a){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var b=1;b<t.text.length;b++)e.textOffsets[b]=e.textOffsets[b-1]+t.text[b-1].length,e.count+=t.text[b].length,e.counts.push(t.text[b].length);this.text=t.text.join(\\\"\\\")}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];r=[],this.font.forEach(function(t,n){k.atlasContext.font=t.baseString;for(var i=e.fontAtlas[n],a=0;a<e.text.length;a++){var o=e.text.charAt(a);if(null==i.ids[o]&&(i.ids[o]=i.chars.length,i.chars.push(o),r.push(o)),null==t.width[o]&&(t.width[o]=k.atlasContext.measureText(o).width/k.baseFontSize,e.kerning)){var s=[];for(var l in t.width)s.push(l+o,o+l);v(t.kerning,g(t.family,{pairs:s}))}}})}if(t.position)if(t.position.length>2){for(var w=!t.position[0].length,M=u.mallocFloat(2*this.count),A=0,T=0;A<this.counts.length;A++){var S=e.counts[A];if(w)for(var C=0;C<S;C++)M[T++]=t.position[2*A],M[T++]=t.position[2*A+1];else for(var E=0;E<S;E++)M[T++]=t.position[A][0],M[T++]=t.position[A][1]}this.position.call?this.position({type:\\\"float\\\",data:M}):this.position=this.regl.buffer({type:\\\"float\\\",data:M}),u.freeFloat(M)}else this.position.destroy&&this.position.destroy(),this.position={constant:t.position};if(t.text||a){var L=u.mallocUint8(this.count),z=u.mallocFloat(2*this.count);this.textWidth=[];for(var O=0,I=0;O<this.counts.length;O++){for(var P=e.counts[O],D=e.font[O]||e.font[0],R=e.fontAtlas[O]||e.fontAtlas[0],B=0;B<P;B++){var F=e.text.charAt(I),N=e.text.charAt(I-1);if(L[I]=R.ids[F],z[2*I]=D.width[F],B){var j=z[2*I-2],V=z[2*I],U=z[2*I-1]+.5*j+.5*V;if(e.kerning){var q=D.kerning[N+F];q&&(U+=.001*q)}z[2*I+1]=U}else z[2*I+1]=.5*z[2*I];I++}e.textWidth.push(z.length?.5*z[2*I-2]+z[2*I-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:L,type:\\\"uint8\\\",usage:\\\"stream\\\"}),this.sizeBuffer({data:z,type:\\\"float\\\",usage:\\\"stream\\\"}),u.freeUint8(L),u.freeFloat(z),r.length&&this.font.forEach(function(t,r){var n=e.fontAtlas[r],i=n.step,a=Math.floor(k.maxAtlasSize/i),o=Math.min(a,n.chars.length),s=Math.ceil(n.chars.length/o),l=x(o*i),u=x(s*i);n.width=l,n.height=u,n.rows=s,n.cols=o,n.em&&n.texture({data:c({canvas:k.atlasCanvas,font:n.fontString,chars:n.chars,shape:[l,u],step:[i,i]})})})}if(t.align&&(this.align=t.align,this.alignOffset=this.textWidth.map(function(t,r){var n=Array.isArray(e.align)?e.align.length>1?e.align[r]:e.align[0]:e.align;if(\\\"number\\\"==typeof n)return n;switch(n){case\\\"right\\\":case\\\"end\\\":return-t;case\\\"center\\\":case\\\"centre\\\":case\\\"middle\\\":return.5*-t}return 0})),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,i+=\\\"number\\\"==typeof t?t-n.baseline:-n[t],k.normalViewport||(i*=-1),i})),null!=t.color)if(t.color||(t.color=\\\"transparent\\\"),\\\"string\\\"!=typeof t.color&&isNaN(t.color)){var H;if(\\\"number\\\"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;H=u.mallocUint8(G);for(var W=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y<G;Y+=4)H.set(l(W(Y,Y+4),\\\"uint8\\\"),Y)}else{var X=t.color.length;H=u.mallocUint8(4*X);for(var Z=0;Z<X;Z++)H.set(l(t.color[Z]||0,\\\"uint8\\\"),4*Z)}this.color=H}else this.color=l(t.color,\\\"uint8\\\");if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity)if(this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var J=0;J<this.batch.length;J++)e.batch[J]={count:e.counts.length>1?e.counts[J]:e.counts[0],offset:e.textOffsets.length>1?e.textOffsets[J]:e.textOffsets[0],color:e.color?e.color.length<=4?e.color:e.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(e.opacity)?e.opacity[J]:e.opacity,baseline:null!=e.baselineOffset[J]?e.baselineOffset[J]:e.baselineOffset[0],align:e.align?null!=e.alignOffset[J]?e.alignOffset[J]:e.alignOffset[0]:0,atlas:e.fontAtlas[J]||e.fontAtlas[0],positionOffset:e.positionOffset.length>2?e.positionOffset.subarray(2*J,2*J+2):e.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text=\\\"\\\",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement(\\\"canvas\\\"),k.atlasContext=k.atlasCanvas.getContext(\\\"2d\\\",{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},{\\\"bit-twiddle\\\":80,\\\"color-normalize\\\":108,\\\"css-font\\\":127,\\\"detect-kerning\\\":151,\\\"es6-weak-map\\\":209,\\\"flatten-vertex-data\\\":216,\\\"font-atlas\\\":217,\\\"font-measure\\\":218,\\\"gl-util/context\\\":306,\\\"is-plain-obj\\\":405,\\\"object-assign\\\":437,\\\"parse-rect\\\":442,\\\"parse-unit\\\":444,\\\"pick-by-alias\\\":448,regl:478,\\\"to-px\\\":516,\\\"typedarray-pool\\\":522}],305:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"ndarray\\\"),i=t(\\\"ndarray-ops\\\"),a=t(\\\"typedarray-pool\\\");e.exports=function(t){if(arguments.length<=1)throw new Error(\\\"gl-texture2d: Missing arguments for texture2d constructor\\\");o||function(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t);if(\\\"number\\\"==typeof arguments[1])return v(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return v(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(\\\"object\\\"==typeof arguments[1]){var e=arguments[1],r=c(e)?e:e.raw;if(r)return function(t,e,r,n,i,a){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new h(t,o,r,n,i,a)}(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return function(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error(\\\"gl-texture2d: Invalid texture size\\\");var l=d(o,e.stride.slice()),c=0;\\\"float32\\\"===r?c=t.FLOAT:\\\"float64\\\"===r?(c=t.FLOAT,l=!1,r=\\\"float32\\\"):\\\"uint8\\\"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r=\\\"uint8\\\");var f,p,v=0;if(2===o.length)v=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error(\\\"gl-texture2d: Invalid shape for texture\\\");if(1===o[2])v=t.ALPHA;else if(2===o[2])v=t.LUMINANCE_ALPHA;else if(3===o[2])v=t.RGB;else{if(4!==o[2])throw new Error(\\\"gl-texture2d: Invalid shape for pixel coords\\\");v=t.RGBA}}c!==t.FLOAT||t.getExtension(\\\"OES_texture_float\\\")||(c=t.UNSIGNED_BYTE,l=!1);var m=e.size;if(l)f=0===e.offset&&e.data.length===m?e.data:e.data.subarray(e.offset,e.offset+m);else{var y=[o[2],o[2]*o[0],1];p=a.malloc(m,r);var x=n(p,o,y,0);\\\"float32\\\"!==r&&\\\"float64\\\"!==r||c!==t.UNSIGNED_BYTE?i.assign(x,e):u(x,e),f=p.subarray(0,m)}var b=g(t);t.texImage2D(t.TEXTURE_2D,0,v,o[0],o[1],0,v,c,f),l||a.free(p);return new h(t,b,o[0],o[1],v,c)}(t,e)}throw new Error(\\\"gl-texture2d: Invalid arguments for texture2d constructor\\\")};var o=null,s=null,l=null;function c(t){return\\\"undefined\\\"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||\\\"undefined\\\"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||\\\"undefined\\\"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||\\\"undefined\\\"!=typeof ImageData&&t instanceof ImageData}var u=function(t,e){i.muls(t,e,255)};function f(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error(\\\"gl-texture2d: Invalid texture size\\\");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function h(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var p=h.prototype;function d(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function v(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error(\\\"gl-texture2d: Invalid texture shape\\\");if(i===t.FLOAT&&!t.getExtension(\\\"OES_texture_float\\\"))throw new Error(\\\"gl-texture2d: Floating point textures not supported on this platform\\\");var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new h(t,o,e,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension(\\\"OES_texture_float_linear\\\")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error(\\\"gl-texture2d: Unknown filter mode \\\"+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension(\\\"OES_texture_float_linear\\\")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error(\\\"gl-texture2d: Unknown filter mode \\\"+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension(\\\"EXT_texture_filter_anisotropic\\\");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error(\\\"gl-texture2d: Unknown wrap mode \\\"+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error(\\\"gl-texture2d: Unknown wrap mode \\\"+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error(\\\"gl-texture2d: Must specify wrap mode for rows and columns\\\");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error(\\\"gl-texture2d: Unknown wrap mode \\\"+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error(\\\"gl-texture2d: Invalid texture shape\\\")}else t=[0|t,0|t];return f(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return f(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,f(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},p.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&&t.stride&&t.data))throw new Error(\\\"gl-texture2d: Unsupported data type\\\");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error(\\\"gl-texture2d: Texture dimensions are out of bounds\\\");!function(t,e,r,o,s,l,c,f){var h=f.dtype,p=f.shape.slice();if(p.length<2||p.length>3)throw new Error(\\\"gl-texture2d: Invalid ndarray, must be 2d or 3d\\\");var g=0,v=0,m=d(p,f.stride.slice());\\\"float32\\\"===h?g=t.FLOAT:\\\"float64\\\"===h?(g=t.FLOAT,m=!1,h=\\\"float32\\\"):\\\"uint8\\\"===h?g=t.UNSIGNED_BYTE:(g=t.UNSIGNED_BYTE,m=!1,h=\\\"uint8\\\");if(2===p.length)v=t.LUMINANCE,p=[p[0],p[1],1],f=n(f.data,p,[f.stride[0],f.stride[1],1],f.offset);else{if(3!==p.length)throw new Error(\\\"gl-texture2d: Invalid shape for texture\\\");if(1===p[2])v=t.ALPHA;else if(2===p[2])v=t.LUMINANCE_ALPHA;else if(3===p[2])v=t.RGB;else{if(4!==p[2])throw new Error(\\\"gl-texture2d: Invalid shape for pixel coords\\\");v=t.RGBA}p[2]}v!==t.LUMINANCE&&v!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(v=s);if(v!==s)throw new Error(\\\"gl-texture2d: Incompatible texture format for setPixels\\\");var y=f.size,x=c.indexOf(o)<0;x&&c.push(o);if(g===l&&m)0===f.offset&&f.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data.subarray(f.offset,f.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data.subarray(f.offset,f.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);g===t.FLOAT&&l===t.UNSIGNED_BYTE?u(_,f):i.assign(_,f),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:433,\\\"ndarray-ops\\\":427,\\\"typedarray-pool\\\":522}],306:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"pick-by-alias\\\");function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function a(t){return\\\"function\\\"==typeof t.getContext&&\\\"width\\\"in t&&\\\"height\\\"in t}e.exports=function(t){var e;if(t?\\\"string\\\"==typeof t&&(t={container:t}):t={},a(t)?t={container:t}:t=\\\"string\\\"==typeof(e=t).nodeName&&\\\"function\\\"==typeof e.appendChild&&\\\"function\\\"==typeof e.getBoundingClientRect?{container:t}:function(t){return\\\"function\\\"==typeof t.drawArrays||\\\"function\\\"==typeof t.drawElements}(t)?{gl:t}:n(t,{container:\\\"container target element el canvas holder parent parentNode wrapper use ref root node\\\",gl:\\\"gl context webgl glContext\\\",attrs:\\\"attributes attrs contextAttributes\\\",pixelRatio:\\\"pixelRatio pxRatio px ratio pxratio pixelratio\\\"},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(\\\"string\\\"==typeof t.container){var r=document.querySelector(t.container);if(!r)throw Error(\\\"Element \\\"+t.container+\\\" is not found\\\");t.container=r}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=document.createElement(\\\"canvas\\\"),t.container.appendChild(t.canvas),i(t))}else t.canvas||(t.container=document.body||document.documentElement,t.canvas=document.createElement(\\\"canvas\\\"),t.canvas.style.position=\\\"absolute\\\",t.canvas.style.top=0,t.canvas.style.left=0,t.container.appendChild(t.canvas),i(t));if(!t.gl)try{t.gl=t.canvas.getContext(\\\"webgl\\\",t.attrs)}catch(e){try{t.gl=t.canvas.getContext(\\\"experimental-webgl\\\",t.attrs)}catch(e){t.gl=t.canvas.getContext(\\\"webgl-experimental\\\",t.attrs)}}return t.gl}},{\\\"pick-by-alias\\\":448}],307:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error(\\\"gl-vao: Too many vertex attributes\\\");for(var i=0;i<r.length;++i){var a=r[i];if(a.buffer){var o=a.buffer,s=a.size||4,l=a.type||t.FLOAT,c=!!a.normalized,u=a.stride||0,f=a.offset||0;o.bind(),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,s,l,c,u,f)}else{if(\\\"number\\\"==typeof a)t.vertexAttrib1f(i,a);else if(1===a.length)t.vertexAttrib1f(i,a[0]);else if(2===a.length)t.vertexAttrib2f(i,a[0],a[1]);else if(3===a.length)t.vertexAttrib3f(i,a[0],a[1],a[2]);else{if(4!==a.length)throw new Error(\\\"gl-vao: Invalid vertex attribute\\\");t.vertexAttrib4f(i,a[0],a[1],a[2],a[3])}t.disableVertexAttribArray(i)}}for(;i<n;++i)t.disableVertexAttribArray(i)}else for(t.bindBuffer(t.ARRAY_BUFFER,null),i=0;i<n;++i)t.disableVertexAttribArray(i)}},{}],308:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./do-bind.js\\\");function i(t){this.gl=t,this._elements=null,this._attributes=null,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(){n(this.gl,this._elements,this._attributes)},i.prototype.update=function(t,e,r){this._elements=e,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},i.prototype.dispose=function(){},i.prototype.unbind=function(){},i.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._elements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t){return new i(t)}},{\\\"./do-bind.js\\\":307}],309:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./do-bind.js\\\");function i(t,e,r,n,i,a){this.location=t,this.dimension=e,this.a=r,this.b=n,this.c=i,this.d=a}function a(t,e,r){this.gl=t,this._ext=e,this.handle=r,this._attribs=[],this._useElements=!1,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(t){switch(this.dimension){case 1:t.vertexAttrib1f(this.location,this.a);break;case 2:t.vertexAttrib2f(this.location,this.a,this.b);break;case 3:t.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:t.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},a.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var t=0;t<this._attribs.length;++t)this._attribs[t].bind(this.gl)},a.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},a.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},a.prototype.update=function(t,e,r){if(this.bind(),n(this.gl,e,t),this.unbind(),this._attribs.length=0,t)for(var a=0;a<t.length;++a){var o=t[a];\\\"number\\\"==typeof o?this._attribs.push(new i(a,1,o)):Array.isArray(o)&&this._attribs.push(new i(a,o.length,o[0],o[1],o[2],o[3]))}this._useElements=!!e,this._elementsType=r||this.gl.UNSIGNED_SHORT},a.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._useElements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t,e){return new a(t,e,e.createVertexArrayOES())}},{\\\"./do-bind.js\\\":307}],310:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/vao-native.js\\\"),i=t(\\\"./lib/vao-emulated.js\\\");function a(t){this.bindVertexArrayOES=t.bindVertexArray.bind(t),this.createVertexArrayOES=t.createVertexArray.bind(t),this.deleteVertexArrayOES=t.deleteVertexArray.bind(t)}e.exports=function(t,e,r,o){var s,l=t.createVertexArray?new a(t):t.getExtension(\\\"OES_vertex_array_object\\\");return(s=l?n(t,l):i(t)).update(e,r,o),s}},{\\\"./lib/vao-emulated.js\\\":308,\\\"./lib/vao-native.js\\\":309}],311:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}},{}],312:[function(t,e,r){e.exports=function(t,e){var r=n(t[0],t[1],t[2]),o=n(e[0],e[1],e[2]);i(r,r),i(o,o);var s=a(r,o);return s>1?0:Math.acos(s)};var n=t(\\\"./fromValues\\\"),i=t(\\\"./normalize\\\"),a=t(\\\"./dot\\\")},{\\\"./dot\\\":322,\\\"./fromValues\\\":328,\\\"./normalize\\\":339}],313:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],314:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],315:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],316:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],317:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},{}],318:[function(t,e,r){e.exports=t(\\\"./distance\\\")},{\\\"./distance\\\":319}],319:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},{}],320:[function(t,e,r){e.exports=t(\\\"./divide\\\")},{\\\"./divide\\\":321}],321:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],322:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],323:[function(t,e,r){e.exports=1e-6},{}],324:[function(t,e,r){e.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=t(\\\"./epsilon\\\")},{\\\"./epsilon\\\":323}],325:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},{}],326:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],327:[function(t,e,r){e.exports=function(t,e,r,i,a,o){var s,l;e||(e=3);r||(r=0);l=i?Math.min(i*e+r,t.length):t.length;for(s=r;s<l;s+=e)n[0]=t[s],n[1]=t[s+1],n[2]=t[s+2],a(n,n,o),t[s]=n[0],t[s+1]=n[1],t[s+2]=n[2];return t};var n=t(\\\"./create\\\")()},{\\\"./create\\\":316}],328:[function(t,e,r){e.exports=function(t,e,r){var n=new Float32Array(3);return n[0]=t,n[1]=e,n[2]=r,n}},{}],329:[function(t,e,r){e.exports={EPSILON:t(\\\"./epsilon\\\"),create:t(\\\"./create\\\"),clone:t(\\\"./clone\\\"),angle:t(\\\"./angle\\\"),fromValues:t(\\\"./fromValues\\\"),copy:t(\\\"./copy\\\"),set:t(\\\"./set\\\"),equals:t(\\\"./equals\\\"),exactEquals:t(\\\"./exactEquals\\\"),add:t(\\\"./add\\\"),subtract:t(\\\"./subtract\\\"),sub:t(\\\"./sub\\\"),multiply:t(\\\"./multiply\\\"),mul:t(\\\"./mul\\\"),divide:t(\\\"./divide\\\"),div:t(\\\"./div\\\"),min:t(\\\"./min\\\"),max:t(\\\"./max\\\"),floor:t(\\\"./floor\\\"),ceil:t(\\\"./ceil\\\"),round:t(\\\"./round\\\"),scale:t(\\\"./scale\\\"),scaleAndAdd:t(\\\"./scaleAndAdd\\\"),distance:t(\\\"./distance\\\"),dist:t(\\\"./dist\\\"),squaredDistance:t(\\\"./squaredDistance\\\"),sqrDist:t(\\\"./sqrDist\\\"),length:t(\\\"./length\\\"),len:t(\\\"./len\\\"),squaredLength:t(\\\"./squaredLength\\\"),sqrLen:t(\\\"./sqrLen\\\"),negate:t(\\\"./negate\\\"),inverse:t(\\\"./inverse\\\"),normalize:t(\\\"./normalize\\\"),dot:t(\\\"./dot\\\"),cross:t(\\\"./cross\\\"),lerp:t(\\\"./lerp\\\"),random:t(\\\"./random\\\"),transformMat4:t(\\\"./transformMat4\\\"),transformMat3:t(\\\"./transformMat3\\\"),transformQuat:t(\\\"./transformQuat\\\"),rotateX:t(\\\"./rotateX\\\"),rotateY:t(\\\"./rotateY\\\"),rotateZ:t(\\\"./rotateZ\\\"),forEach:t(\\\"./forEach\\\")}},{\\\"./add\\\":311,\\\"./angle\\\":312,\\\"./ceil\\\":313,\\\"./clone\\\":314,\\\"./copy\\\":315,\\\"./create\\\":316,\\\"./cross\\\":317,\\\"./dist\\\":318,\\\"./distance\\\":319,\\\"./div\\\":320,\\\"./divide\\\":321,\\\"./dot\\\":322,\\\"./epsilon\\\":323,\\\"./equals\\\":324,\\\"./exactEquals\\\":325,\\\"./floor\\\":326,\\\"./forEach\\\":327,\\\"./fromValues\\\":328,\\\"./inverse\\\":330,\\\"./len\\\":331,\\\"./length\\\":332,\\\"./lerp\\\":333,\\\"./max\\\":334,\\\"./min\\\":335,\\\"./mul\\\":336,\\\"./multiply\\\":337,\\\"./negate\\\":338,\\\"./normalize\\\":339,\\\"./random\\\":340,\\\"./rotateX\\\":341,\\\"./rotateY\\\":342,\\\"./rotateZ\\\":343,\\\"./round\\\":344,\\\"./scale\\\":345,\\\"./scaleAndAdd\\\":346,\\\"./set\\\":347,\\\"./sqrDist\\\":348,\\\"./sqrLen\\\":349,\\\"./squaredDistance\\\":350,\\\"./squaredLength\\\":351,\\\"./sub\\\":352,\\\"./subtract\\\":353,\\\"./transformMat3\\\":354,\\\"./transformMat4\\\":355,\\\"./transformQuat\\\":356}],330:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},{}],331:[function(t,e,r){e.exports=t(\\\"./length\\\")},{\\\"./length\\\":332}],332:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}},{}],333:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t}},{}],334:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}},{}],335:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}},{}],336:[function(t,e,r){e.exports=t(\\\"./multiply\\\")},{\\\"./multiply\\\":337}],337:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}},{}],338:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},{}],339:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a);return t}},{}],340:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},{}],341:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+o*c-s*l,t[2]=a+o*l+s*c,t}},{}],342:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+o*c,t[1]=e[1],t[2]=a+s*c-o*l,t}},{}],343:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+o*c-s*l,t[1]=a+o*l+s*c,t[2]=e[2],t}},{}],344:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],345:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],346:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],347:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],348:[function(t,e,r){e.exports=t(\\\"./squaredDistance\\\")},{\\\"./squaredDistance\\\":350}],349:[function(t,e,r){e.exports=t(\\\"./squaredLength\\\")},{\\\"./squaredLength\\\":351}],350:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},{}],351:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],352:[function(t,e,r){e.exports=t(\\\"./subtract\\\")},{\\\"./subtract\\\":353}],353:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],354:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},{}],355:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},{}],356:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t}},{}],357:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],358:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],359:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],360:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],361:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},{}],362:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],363:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],364:[function(t,e,r){e.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},{}],365:[function(t,e,r){e.exports={create:t(\\\"./create\\\"),clone:t(\\\"./clone\\\"),fromValues:t(\\\"./fromValues\\\"),copy:t(\\\"./copy\\\"),set:t(\\\"./set\\\"),add:t(\\\"./add\\\"),subtract:t(\\\"./subtract\\\"),multiply:t(\\\"./multiply\\\"),divide:t(\\\"./divide\\\"),min:t(\\\"./min\\\"),max:t(\\\"./max\\\"),scale:t(\\\"./scale\\\"),scaleAndAdd:t(\\\"./scaleAndAdd\\\"),distance:t(\\\"./distance\\\"),squaredDistance:t(\\\"./squaredDistance\\\"),length:t(\\\"./length\\\"),squaredLength:t(\\\"./squaredLength\\\"),negate:t(\\\"./negate\\\"),inverse:t(\\\"./inverse\\\"),normalize:t(\\\"./normalize\\\"),dot:t(\\\"./dot\\\"),lerp:t(\\\"./lerp\\\"),random:t(\\\"./random\\\"),transformMat4:t(\\\"./transformMat4\\\"),transformQuat:t(\\\"./transformQuat\\\")}},{\\\"./add\\\":357,\\\"./clone\\\":358,\\\"./copy\\\":359,\\\"./create\\\":360,\\\"./distance\\\":361,\\\"./divide\\\":362,\\\"./dot\\\":363,\\\"./fromValues\\\":364,\\\"./inverse\\\":366,\\\"./length\\\":367,\\\"./lerp\\\":368,\\\"./max\\\":369,\\\"./min\\\":370,\\\"./multiply\\\":371,\\\"./negate\\\":372,\\\"./normalize\\\":373,\\\"./random\\\":374,\\\"./scale\\\":375,\\\"./scaleAndAdd\\\":376,\\\"./set\\\":377,\\\"./squaredDistance\\\":378,\\\"./squaredLength\\\":379,\\\"./subtract\\\":380,\\\"./transformMat4\\\":381,\\\"./transformQuat\\\":382}],366:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],367:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},{}],368:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],369:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],370:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],371:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],372:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],373:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o);return t}},{}],374:[function(t,e,r){var n=t(\\\"./normalize\\\"),i=t(\\\"./scale\\\");e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},{\\\"./normalize\\\":373,\\\"./scale\\\":375}],375:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],376:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],377:[function(t,e,r){e.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},{}],378:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},{}],379:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},{}],380:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],381:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},{}],382:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t[3]=e[3],t}},{}],383:[function(t,e,r){e.exports=function(t,e,r,a){return n[0]=a,n[1]=r,n[2]=e,n[3]=t,i[0]};var n=new Uint8Array(4),i=new Float32Array(n.buffer)},{}],384:[function(t,e,r){var n=t(\\\"glsl-tokenizer\\\"),i=t(\\\"atob-lite\\\");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r<e.length;r++){var a=e[r];if(\\\"preprocessor\\\"===a.type){var o=a.data.match(/\\\\#define\\\\s+SHADER_NAME(_B64)?\\\\s+(.+)$/);if(o&&o[2]){var s=o[1],l=o[2];return(s?i(l):l).trim()}}}}},{\\\"atob-lite\\\":60,\\\"glsl-tokenizer\\\":391}],385:[function(t,e,r){e.exports=function(t){var e,r,k,M=0,A=0,T=l,S=[],C=[],E=1,L=0,z=0,O=!1,I=!1,P=\\\"\\\",D=a,R=n;\\\"300 es\\\"===(t=t||{}).version&&(D=s,R=o);return function(t){return C=[],null!==t?function(t){var r;M=0,k=(P+=t).length;for(;e=P[M],M<k;){switch(r=M,T){case u:M=V();break;case f:case h:M=j();break;case p:M=U();break;case d:M=G();break;case _:M=H();break;case g:M=W();break;case c:M=Y();break;case x:M=N();break;case l:M=F()}if(r!==M)switch(P[r]){case\\\"\\\\n\\\":L=0,++E;break;default:++L}}return A+=M,P=P.slice(M),C}(t.replace?t.replace(/\\\\r\\\\n/g,\\\"\\\\n\\\"):t):function(t){S.length&&B(S.join(\\\"\\\"));return T=b,B(\\\"(eof)\\\"),C}()};function B(t){t.length&&C.push({type:w[T],data:t,position:z,line:E,column:L})}function F(){return S=S.length?[]:S,\\\"/\\\"===r&&\\\"*\\\"===e?(z=A+M-1,T=u,r=e,M+1):\\\"/\\\"===r&&\\\"/\\\"===e?(z=A+M-1,T=f,r=e,M+1):\\\"#\\\"===e?(T=h,z=A+M,M):/\\\\s/.test(e)?(T=x,z=A+M,M):(O=/\\\\d/.test(e),I=/[^\\\\w_]/.test(e),z=A+M,T=O?d:I?p:c,M)}function N(){return/[^\\\\s]/g.test(e)?(B(S.join(\\\"\\\")),T=l,M):(S.push(e),r=e,M+1)}function j(){return\\\"\\\\r\\\"!==e&&\\\"\\\\n\\\"!==e||\\\"\\\\\\\\\\\"===r?(S.push(e),r=e,M+1):(B(S.join(\\\"\\\")),T=l,M)}function V(){return\\\"/\\\"===e&&\\\"*\\\"===r?(S.push(e),B(S.join(\\\"\\\")),T=l,M+1):(S.push(e),r=e,M+1)}function U(){if(\\\".\\\"===r&&/\\\\d/.test(e))return T=g,M;if(\\\"/\\\"===r&&\\\"*\\\"===e)return T=u,M;if(\\\"/\\\"===r&&\\\"/\\\"===e)return T=f,M;if(\\\".\\\"===e&&S.length){for(;q(S););return T=g,M}if(\\\";\\\"===e||\\\")\\\"===e||\\\"(\\\"===e){if(S.length)for(;q(S););return B(e),T=l,M+1}var t=2===S.length&&\\\"=\\\"!==e;if(/[\\\\w_\\\\d\\\\s]/.test(e)||t){for(;q(S););return T=l,M}return S.push(e),r=e,M+1}function q(t){for(var e,r,n=0;;){if(e=i.indexOf(t.slice(0,t.length+n).join(\\\"\\\")),r=i[e],-1===e){if(n--+t.length>0)continue;r=t.slice(0,1).join(\\\"\\\")}return B(r),z+=r.length,(S=S.slice(r.length)).length}}function H(){return/[^a-fA-F0-9]/.test(e)?(B(S.join(\\\"\\\")),T=l,M):(S.push(e),r=e,M+1)}function G(){return\\\".\\\"===e?(S.push(e),T=g,r=e,M+1):/[eE]/.test(e)?(S.push(e),T=g,r=e,M+1):\\\"x\\\"===e&&1===S.length&&\\\"0\\\"===S[0]?(T=_,S.push(e),r=e,M+1):/[^\\\\d]/.test(e)?(B(S.join(\\\"\\\")),T=l,M):(S.push(e),r=e,M+1)}function W(){return\\\"f\\\"===e&&(S.push(e),r=e,M+=1),/[eE]/.test(e)?(S.push(e),r=e,M+1):\\\"-\\\"===e&&/[eE]/.test(r)?(S.push(e),r=e,M+1):/[^\\\\d]/.test(e)?(B(S.join(\\\"\\\")),T=l,M):(S.push(e),r=e,M+1)}function Y(){if(/[^\\\\d\\\\w_]/.test(e)){var t=S.join(\\\"\\\");return T=R.indexOf(t)>-1?y:D.indexOf(t)>-1?m:v,B(S.join(\\\"\\\")),T=l,M}return S.push(e),r=e,M+1}};var n=t(\\\"./lib/literals\\\"),i=t(\\\"./lib/operators\\\"),a=t(\\\"./lib/builtins\\\"),o=t(\\\"./lib/literals-300es\\\"),s=t(\\\"./lib/builtins-300es\\\"),l=999,c=9999,u=0,f=1,h=2,p=3,d=4,g=5,v=6,m=7,y=8,x=9,b=10,_=11,w=[\\\"block-comment\\\",\\\"line-comment\\\",\\\"preprocessor\\\",\\\"operator\\\",\\\"integer\\\",\\\"float\\\",\\\"ident\\\",\\\"builtin\\\",\\\"keyword\\\",\\\"whitespace\\\",\\\"eof\\\",\\\"integer\\\"]},{\\\"./lib/builtins\\\":387,\\\"./lib/builtins-300es\\\":386,\\\"./lib/literals\\\":389,\\\"./lib/literals-300es\\\":388,\\\"./lib/operators\\\":390}],386:[function(t,e,r){var n=t(\\\"./builtins\\\");n=n.slice().filter(function(t){return!/^(gl\\\\_|texture)/.test(t)}),e.exports=n.concat([\\\"gl_VertexID\\\",\\\"gl_InstanceID\\\",\\\"gl_Position\\\",\\\"gl_PointSize\\\",\\\"gl_FragCoord\\\",\\\"gl_FrontFacing\\\",\\\"gl_FragDepth\\\",\\\"gl_PointCoord\\\",\\\"gl_MaxVertexAttribs\\\",\\\"gl_MaxVertexUniformVectors\\\",\\\"gl_MaxVertexOutputVectors\\\",\\\"gl_MaxFragmentInputVectors\\\",\\\"gl_MaxVertexTextureImageUnits\\\",\\\"gl_MaxCombinedTextureImageUnits\\\",\\\"gl_MaxTextureImageUnits\\\",\\\"gl_MaxFragmentUniformVectors\\\",\\\"gl_MaxDrawBuffers\\\",\\\"gl_MinProgramTexelOffset\\\",\\\"gl_MaxProgramTexelOffset\\\",\\\"gl_DepthRangeParameters\\\",\\\"gl_DepthRange\\\",\\\"trunc\\\",\\\"round\\\",\\\"roundEven\\\",\\\"isnan\\\",\\\"isinf\\\",\\\"floatBitsToInt\\\",\\\"floatBitsToUint\\\",\\\"intBitsToFloat\\\",\\\"uintBitsToFloat\\\",\\\"packSnorm2x16\\\",\\\"unpackSnorm2x16\\\",\\\"packUnorm2x16\\\",\\\"unpackUnorm2x16\\\",\\\"packHalf2x16\\\",\\\"unpackHalf2x16\\\",\\\"outerProduct\\\",\\\"transpose\\\",\\\"determinant\\\",\\\"inverse\\\",\\\"texture\\\",\\\"textureSize\\\",\\\"textureProj\\\",\\\"textureLod\\\",\\\"textureOffset\\\",\\\"texelFetch\\\",\\\"texelFetchOffset\\\",\\\"textureProjOffset\\\",\\\"textureLodOffset\\\",\\\"textureProjLod\\\",\\\"textureProjLodOffset\\\",\\\"textureGrad\\\",\\\"textureGradOffset\\\",\\\"textureProjGrad\\\",\\\"textureProjGradOffset\\\"])},{\\\"./builtins\\\":387}],387:[function(t,e,r){e.exports=[\\\"abs\\\",\\\"acos\\\",\\\"all\\\",\\\"any\\\",\\\"asin\\\",\\\"atan\\\",\\\"ceil\\\",\\\"clamp\\\",\\\"cos\\\",\\\"cross\\\",\\\"dFdx\\\",\\\"dFdy\\\",\\\"degrees\\\",\\\"distance\\\",\\\"dot\\\",\\\"equal\\\",\\\"exp\\\",\\\"exp2\\\",\\\"faceforward\\\",\\\"floor\\\",\\\"fract\\\",\\\"gl_BackColor\\\",\\\"gl_BackLightModelProduct\\\",\\\"gl_BackLightProduct\\\",\\\"gl_BackMaterial\\\",\\\"gl_BackSecondaryColor\\\",\\\"gl_ClipPlane\\\",\\\"gl_ClipVertex\\\",\\\"gl_Color\\\",\\\"gl_DepthRange\\\",\\\"gl_DepthRangeParameters\\\",\\\"gl_EyePlaneQ\\\",\\\"gl_EyePlaneR\\\",\\\"gl_EyePlaneS\\\",\\\"gl_EyePlaneT\\\",\\\"gl_Fog\\\",\\\"gl_FogCoord\\\",\\\"gl_FogFragCoord\\\",\\\"gl_FogParameters\\\",\\\"gl_FragColor\\\",\\\"gl_FragCoord\\\",\\\"gl_FragData\\\",\\\"gl_FragDepth\\\",\\\"gl_FragDepthEXT\\\",\\\"gl_FrontColor\\\",\\\"gl_FrontFacing\\\",\\\"gl_FrontLightModelProduct\\\",\\\"gl_FrontLightProduct\\\",\\\"gl_FrontMaterial\\\",\\\"gl_FrontSecondaryColor\\\",\\\"gl_LightModel\\\",\\\"gl_LightModelParameters\\\",\\\"gl_LightModelProducts\\\",\\\"gl_LightProducts\\\",\\\"gl_LightSource\\\",\\\"gl_LightSourceParameters\\\",\\\"gl_MaterialParameters\\\",\\\"gl_MaxClipPlanes\\\",\\\"gl_MaxCombinedTextureImageUnits\\\",\\\"gl_MaxDrawBuffers\\\",\\\"gl_MaxFragmentUniformComponents\\\",\\\"gl_MaxLights\\\",\\\"gl_MaxTextureCoords\\\",\\\"gl_MaxTextureImageUnits\\\",\\\"gl_MaxTextureUnits\\\",\\\"gl_MaxVaryingFloats\\\",\\\"gl_MaxVertexAttribs\\\",\\\"gl_MaxVertexTextureImageUnits\\\",\\\"gl_MaxVertexUniformComponents\\\",\\\"gl_ModelViewMatrix\\\",\\\"gl_ModelViewMatrixInverse\\\",\\\"gl_ModelViewMatrixInverseTranspose\\\",\\\"gl_ModelViewMatrixTranspose\\\",\\\"gl_ModelViewProjectionMatrix\\\",\\\"gl_ModelViewProjectionMatrixInverse\\\",\\\"gl_ModelViewProjectionMatrixInverseTranspose\\\",\\\"gl_ModelViewProjectionMatrixTranspose\\\",\\\"gl_MultiTexCoord0\\\",\\\"gl_MultiTexCoord1\\\",\\\"gl_MultiTexCoord2\\\",\\\"gl_MultiTexCoord3\\\",\\\"gl_MultiTexCoord4\\\",\\\"gl_MultiTexCoord5\\\",\\\"gl_MultiTexCoord6\\\",\\\"gl_MultiTexCoord7\\\",\\\"gl_Normal\\\",\\\"gl_NormalMatrix\\\",\\\"gl_NormalScale\\\",\\\"gl_ObjectPlaneQ\\\",\\\"gl_ObjectPlaneR\\\",\\\"gl_ObjectPlaneS\\\",\\\"gl_ObjectPlaneT\\\",\\\"gl_Point\\\",\\\"gl_PointCoord\\\",\\\"gl_PointParameters\\\",\\\"gl_PointSize\\\",\\\"gl_Position\\\",\\\"gl_ProjectionMatrix\\\",\\\"gl_ProjectionMatrixInverse\\\",\\\"gl_ProjectionMatrixInverseTranspose\\\",\\\"gl_ProjectionMatrixTranspose\\\",\\\"gl_SecondaryColor\\\",\\\"gl_TexCoord\\\",\\\"gl_TextureEnvColor\\\",\\\"gl_TextureMatrix\\\",\\\"gl_TextureMatrixInverse\\\",\\\"gl_TextureMatrixInverseTranspose\\\",\\\"gl_TextureMatrixTranspose\\\",\\\"gl_Vertex\\\",\\\"greaterThan\\\",\\\"greaterThanEqual\\\",\\\"inversesqrt\\\",\\\"length\\\",\\\"lessThan\\\",\\\"lessThanEqual\\\",\\\"log\\\",\\\"log2\\\",\\\"matrixCompMult\\\",\\\"max\\\",\\\"min\\\",\\\"mix\\\",\\\"mod\\\",\\\"normalize\\\",\\\"not\\\",\\\"notEqual\\\",\\\"pow\\\",\\\"radians\\\",\\\"reflect\\\",\\\"refract\\\",\\\"sign\\\",\\\"sin\\\",\\\"smoothstep\\\",\\\"sqrt\\\",\\\"step\\\",\\\"tan\\\",\\\"texture2D\\\",\\\"texture2DLod\\\",\\\"texture2DProj\\\",\\\"texture2DProjLod\\\",\\\"textureCube\\\",\\\"textureCubeLod\\\",\\\"texture2DLodEXT\\\",\\\"texture2DProjLodEXT\\\",\\\"textureCubeLodEXT\\\",\\\"texture2DGradEXT\\\",\\\"texture2DProjGradEXT\\\",\\\"textureCubeGradEXT\\\"]},{}],388:[function(t,e,r){var n=t(\\\"./literals\\\");e.exports=n.slice().concat([\\\"layout\\\",\\\"centroid\\\",\\\"smooth\\\",\\\"case\\\",\\\"mat2x2\\\",\\\"mat2x3\\\",\\\"mat2x4\\\",\\\"mat3x2\\\",\\\"mat3x3\\\",\\\"mat3x4\\\",\\\"mat4x2\\\",\\\"mat4x3\\\",\\\"mat4x4\\\",\\\"uint\\\",\\\"uvec2\\\",\\\"uvec3\\\",\\\"uvec4\\\",\\\"samplerCubeShadow\\\",\\\"sampler2DArray\\\",\\\"sampler2DArrayShadow\\\",\\\"isampler2D\\\",\\\"isampler3D\\\",\\\"isamplerCube\\\",\\\"isampler2DArray\\\",\\\"usampler2D\\\",\\\"usampler3D\\\",\\\"usamplerCube\\\",\\\"usampler2DArray\\\",\\\"coherent\\\",\\\"restrict\\\",\\\"readonly\\\",\\\"writeonly\\\",\\\"resource\\\",\\\"atomic_uint\\\",\\\"noperspective\\\",\\\"patch\\\",\\\"sample\\\",\\\"subroutine\\\",\\\"common\\\",\\\"partition\\\",\\\"active\\\",\\\"filter\\\",\\\"image1D\\\",\\\"image2D\\\",\\\"image3D\\\",\\\"imageCube\\\",\\\"iimage1D\\\",\\\"iimage2D\\\",\\\"iimage3D\\\",\\\"iimageCube\\\",\\\"uimage1D\\\",\\\"uimage2D\\\",\\\"uimage3D\\\",\\\"uimageCube\\\",\\\"image1DArray\\\",\\\"image2DArray\\\",\\\"iimage1DArray\\\",\\\"iimage2DArray\\\",\\\"uimage1DArray\\\",\\\"uimage2DArray\\\",\\\"image1DShadow\\\",\\\"image2DShadow\\\",\\\"image1DArrayShadow\\\",\\\"image2DArrayShadow\\\",\\\"imageBuffer\\\",\\\"iimageBuffer\\\",\\\"uimageBuffer\\\",\\\"sampler1DArray\\\",\\\"sampler1DArrayShadow\\\",\\\"isampler1D\\\",\\\"isampler1DArray\\\",\\\"usampler1D\\\",\\\"usampler1DArray\\\",\\\"isampler2DRect\\\",\\\"usampler2DRect\\\",\\\"samplerBuffer\\\",\\\"isamplerBuffer\\\",\\\"usamplerBuffer\\\",\\\"sampler2DMS\\\",\\\"isampler2DMS\\\",\\\"usampler2DMS\\\",\\\"sampler2DMSArray\\\",\\\"isampler2DMSArray\\\",\\\"usampler2DMSArray\\\"])},{\\\"./literals\\\":389}],389:[function(t,e,r){e.exports=[\\\"precision\\\",\\\"highp\\\",\\\"mediump\\\",\\\"lowp\\\",\\\"attribute\\\",\\\"const\\\",\\\"uniform\\\",\\\"varying\\\",\\\"break\\\",\\\"continue\\\",\\\"do\\\",\\\"for\\\",\\\"while\\\",\\\"if\\\",\\\"else\\\",\\\"in\\\",\\\"out\\\",\\\"inout\\\",\\\"float\\\",\\\"int\\\",\\\"void\\\",\\\"bool\\\",\\\"true\\\",\\\"false\\\",\\\"discard\\\",\\\"return\\\",\\\"mat2\\\",\\\"mat3\\\",\\\"mat4\\\",\\\"vec2\\\",\\\"vec3\\\",\\\"vec4\\\",\\\"ivec2\\\",\\\"ivec3\\\",\\\"ivec4\\\",\\\"bvec2\\\",\\\"bvec3\\\",\\\"bvec4\\\",\\\"sampler1D\\\",\\\"sampler2D\\\",\\\"sampler3D\\\",\\\"samplerCube\\\",\\\"sampler1DShadow\\\",\\\"sampler2DShadow\\\",\\\"struct\\\",\\\"asm\\\",\\\"class\\\",\\\"union\\\",\\\"enum\\\",\\\"typedef\\\",\\\"template\\\",\\\"this\\\",\\\"packed\\\",\\\"goto\\\",\\\"switch\\\",\\\"default\\\",\\\"inline\\\",\\\"noinline\\\",\\\"volatile\\\",\\\"public\\\",\\\"static\\\",\\\"extern\\\",\\\"external\\\",\\\"interface\\\",\\\"long\\\",\\\"short\\\",\\\"double\\\",\\\"half\\\",\\\"fixed\\\",\\\"unsigned\\\",\\\"input\\\",\\\"output\\\",\\\"hvec2\\\",\\\"hvec3\\\",\\\"hvec4\\\",\\\"dvec2\\\",\\\"dvec3\\\",\\\"dvec4\\\",\\\"fvec2\\\",\\\"fvec3\\\",\\\"fvec4\\\",\\\"sampler2DRect\\\",\\\"sampler3DRect\\\",\\\"sampler2DRectShadow\\\",\\\"sizeof\\\",\\\"cast\\\",\\\"namespace\\\",\\\"using\\\"]},{}],390:[function(t,e,r){e.exports=[\\\"<<=\\\",\\\">>=\\\",\\\"++\\\",\\\"--\\\",\\\"<<\\\",\\\">>\\\",\\\"<=\\\",\\\">=\\\",\\\"==\\\",\\\"!=\\\",\\\"&&\\\",\\\"||\\\",\\\"+=\\\",\\\"-=\\\",\\\"*=\\\",\\\"/=\\\",\\\"%=\\\",\\\"&=\\\",\\\"^^\\\",\\\"^=\\\",\\\"|=\\\",\\\"(\\\",\\\")\\\",\\\"[\\\",\\\"]\\\",\\\".\\\",\\\"!\\\",\\\"~\\\",\\\"*\\\",\\\"/\\\",\\\"%\\\",\\\"+\\\",\\\"-\\\",\\\"<\\\",\\\">\\\",\\\"&\\\",\\\"^\\\",\\\"|\\\",\\\"?\\\",\\\":\\\",\\\"=\\\",\\\",\\\",\\\";\\\",\\\"{\\\",\\\"}\\\"]},{}],391:[function(t,e,r){var n=t(\\\"./index\\\");e.exports=function(t,e){var r=n(e),i=[];return i=(i=i.concat(r(t))).concat(r(null))}},{\\\"./index\\\":385}],392:[function(t,e,r){e.exports=function(t){\\\"string\\\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n<t.length-1;n++)r.push(t[n],e[n]||\\\"\\\");return r.push(t[n]),r.join(\\\"\\\")}},{}],393:[function(t,e,r){(function(r){\\\"use strict\\\";var n,i=t(\\\"is-browser\\\");n=\\\"function\\\"==typeof r.matchMedia?!r.matchMedia(\\\"(hover: none)\\\").matches:i,e.exports=n}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"is-browser\\\":400}],394:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"is-browser\\\");e.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},\\\"passive\\\",{get:function(){t=!0}});window.addEventListener(\\\"test\\\",null,e),window.removeEventListener(\\\"test\\\",null,e)}catch(e){t=!1}return t}()},{\\\"is-browser\\\":400}],395:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,c=l>>1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<<c)-1,f=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],396:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=t.length;if(0===r)throw new Error(\\\"Must have at least d+1 points\\\");var i=t[0].length;if(r<=i)throw new Error(\\\"Must input at least d+1 points\\\");var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error(\\\"Input not in general position\\\");for(var l=new Array(i+1),u=0;u<=i;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);for(var f=new a(l,new Array(i+1),!1),h=f.adjacent,p=new Array(i+2),u=0;u<=i;++u){for(var d=l.slice(),g=0;g<=i;++g)g===u&&(d[g]=-1);var v=d[0];d[0]=d[1],d[1]=v;var m=new a(d,new Array(i+1),!0);h[u]=m,p[u]=m}p[i+1]=f;for(var u=0;u<=i;++u)for(var d=h[u].vertices,y=h[u].adjacent,g=0;g<=i;++g){var x=d[g];if(x<0)y[g]=f;else for(var b=0;b<=i;++b)h[b].vertices.indexOf(x)<0&&(y[g]=h[b])}for(var _=new c(i,o,p),w=!!e,u=i+1;u<r;++u)_.insert(t[u],w);return _.boundary()};var n=t(\\\"robust-orientation\\\"),i=t(\\\"simplicial-complex\\\").compareCells;function a(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function o(t,e,r){this.vertices=t,this.cell=e,this.index=r}function s(t,e){return i(t.vertices,e.vertices)}a.prototype.flip=function(){var t=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=t;var e=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=e};var l=[];function c(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter(function(t){return!t.boundary}),this.tuple=new Array(t+1);for(var i=0;i<=t;++i)this.tuple[i]=this.vertices[i];var a=l[t];a||(a=l[t]=function(t){for(var e=[\\\"function orient(){var tuple=this.tuple;return test(\\\"],r=0;r<=t;++r)r>0&&e.push(\\\",\\\"),e.push(\\\"tuple[\\\",r,\\\"]\\\");e.push(\\\")}return orient\\\");var i=new Function(\\\"test\\\",e.join(\\\"\\\")),a=n[t+1];return a||(a=n),i(a)}(t)),this.orient=a}var u=c.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,f=0;f<=r;++f){var h=u[f];i[f]=h<0?e:a[h]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var f=c[u];if(!(f.lastVisited>=r)){var h=a[u];a[u]=t;var p=this.orient();if(a[u]=h,p<0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];f.length>0;){var p=(e=f.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g<0))for(var v=0;v<=n;++v)if(v!==g){var m=d[v];if(m.boundary&&!(m.lastVisited>=r)){var y=m.vertices;if(m.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,m.boundary=!1,c.push(m),f.push(m),m.lastVisited=r;continue}m.lastVisited=-r}var _=m.adjacent,w=p.slice(),k=d.slice(),M=new a(w,k,!0);u.push(M);var A=_.indexOf(e);if(!(A<0)){_[A]=M,k[g]=m,w[v]=-1,k[v]=e,d[v]=M,M.flip();for(b=0;b<=n;++b){var T=w[b];if(!(T<0||T===r)){for(var S=new Array(n-1),C=0,E=0;E<=n;++E){var L=w[E];L<0||E===b||(S[C++]=L)}h.push(new o(S,M,b))}}}}}}h.sort(s);for(v=0;v+1<h.length;v+=2){var z=h[v],O=h[v+1],I=z.index,P=O.index;I<0||P<0||(z.cell.adjacent[z.index]=O.cell,O.cell.adjacent[O.index]=z.cell)}},u.insert=function(t,e){var r=this.vertices;r.push(t);var n=this.walk(t,e);if(n){for(var i=this.dimension,a=this.tuple,o=0;o<=i;++o){var s=n.vertices[o];a[o]=s<0?t:r[s]}var l=this.orient(a);l<0||(0!==l||(n=this.handleBoundaryDegeneracy(n,t)))&&this.addPeaks(t,n)}},u.boundary=function(){for(var t=this.dimension,e=[],r=this.simplices,n=r.length,i=0;i<n;++i){var a=r[i];if(a.boundary){for(var o=new Array(t),s=a.vertices,l=0,c=0,u=0;u<=t;++u)s[u]>=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},{\\\"robust-orientation\\\":486,\\\"simplicial-complex\\\":496}],397:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\"),i=0,a=1;function o(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new x(null);return new x(y(t))};var s=o.prototype;function l(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function c(t,e){var r=y(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function u(t,e){var r=t.intervals([]);r.push(e),c(t,r)}function f(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?i:(r.splice(n,1),c(t,r),a)}function h(t,e,r){for(var n=0;n<t.length&&t[n][0]<=e;++n){var i=r(t[n]);if(i)return i}}function p(t,e,r){for(var n=t.length-1;n>=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function d(t,e){for(var r=0;r<t.length;++r){var n=e(t[r]);if(n)return n}}function g(t,e){return t-e}function v(t,e){var r=t[0]-e[0];return r||t[1]-e[1]}function m(t,e){var r=t[1]-e[1];return r||t[0]-e[0]}function y(t){if(0===t.length)return null;for(var e=[],r=0;r<t.length;++r)e.push(t[r][0],t[r][1]);e.sort(g);var n=e[e.length>>1],i=[],a=[],s=[];for(r=0;r<t.length;++r){var l=t[r];l[1]<n?i.push(l):n<l[0]?a.push(l):s.push(l)}var c=s,u=s.slice();return c.sort(v),u.sort(m),new o(n,y(i),y(a),c,u)}function x(t){this.root=t}s.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},s.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(e+1)?u(this,t):this.left.insert(t):this.left=y([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?u(this,t):this.right.insert(t):this.right=y([t]);else{var r=n.ge(this.leftPoints,t,v),i=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(e-1)?f(this,t):2===(c=this.left.remove(t))?(this.left=null,this.count-=1,a):(c===a&&(this.count-=1),c):i;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?f(this,t):2===(c=this.right.remove(t))?(this.right=null,this.count-=1,a):(c===a&&(this.count-=1),c):i;if(1===this.count)return this.leftPoints[0]===t?2:i;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,c=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=c}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return a}for(s=n.ge(this.leftPoints,t,v);s<this.leftPoints.length&&this.leftPoints[s][0]===t[0];++s)if(this.leftPoints[s]===t){this.count-=1,this.leftPoints.splice(s,1);for(c=n.ge(this.rightPoints,t,m);c<this.rightPoints.length&&this.rightPoints[c][1]===t[1];++c)if(this.rightPoints[c]===t)return this.rightPoints.splice(c,1),a}return i},s.queryPoint=function(t,e){if(t<this.mid){if(this.left)if(r=this.left.queryPoint(t,e))return r;return h(this.leftPoints,t,e)}if(t>this.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return p(this.rightPoints,t,e)}return d(this.leftPoints,e)},s.queryInterval=function(t,e,r){var n;if(t<this.mid&&this.left&&(n=this.left.queryInterval(t,e,r)))return n;if(e>this.mid&&this.right&&(n=this.right.queryInterval(t,e,r)))return n;return e<this.mid?h(this.leftPoints,e,r):t>this.mid?p(this.rightPoints,t,r):d(this.leftPoints,r)};var b=x.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new o(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==i}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,\\\"count\\\",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,\\\"intervals\\\",{get:function(){return this.root?this.root.intervals([]):[]}})},{\\\"binary-search-bounds\\\":79}],398:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r<t.length;++r)e[t[r]]=r;return e}},{}],399:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=r;return e}},{}],400:[function(t,e,r){e.exports=!0},{}],401:[function(t,e,r){function n(t){return!!t.constructor&&\\\"function\\\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||function(t){return\\\"function\\\"==typeof t.readFloatLE&&\\\"function\\\"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],402:[function(t,e,r){\\\"use strict\\\";e.exports=\\\"undefined\\\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\\\//.test(navigator.appVersion))},{}],403:[function(t,e,r){\\\"use strict\\\";e.exports=a,e.exports.isMobile=a;var n=/(android|bb\\\\d+|meego).+mobile|avantgo|bada\\\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/(android|bb\\\\d+|meego).+mobile|avantgo|bada\\\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function a(t){t||(t={});var e=t.ua;return e||\\\"undefined\\\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\\\"string\\\"==typeof e.headers[\\\"user-agent\\\"]&&(e=e.headers[\\\"user-agent\\\"]),\\\"string\\\"==typeof e&&(t.tablet?i.test(e):n.test(e))}},{}],404:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=typeof t;return null!==t&&(\\\"object\\\"===e||\\\"function\\\"===e)}},{}],405:[function(t,e,r){\\\"use strict\\\";var n=Object.prototype.toString;e.exports=function(t){var e;return\\\"[object Object]\\\"===n.call(t)&&(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},{}],406:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e,r=t.length,n=0;n<r;n++)if(((e=t.charCodeAt(n))<9||e>13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},{}],407:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return\\\"string\\\"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\\\\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\\\\dz]$/i.test(t)&&t.length>4))}},{}],408:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],409:[function(t,e,r){(function(t){!function(t,n){\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?e.exports=n():t.mapboxgl=n()}(this,function(){\\\"use strict\\\";var e,r,n;function i(t,i){if(e)if(r){var a=\\\"var sharedChunk = {}; (\\\"+e+\\\")(sharedChunk); (\\\"+r+\\\")(sharedChunk);\\\",o={};e(o),(n=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:\\\"text/javascript\\\"}))}else r=i;else e=i}return i(0,function(e){var r=\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof t?t:\\\"undefined\\\"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,\\\"default\\\")?t.default:t}function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a=o;function o(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}o.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},o.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},o.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},o.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&&(e=1e-6),i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=a/s}if((i=t)<(r=0))return r;if(i>(n=1))return n;for(;r<n;){if(a=this.sampleCurveX(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i},o.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var s=function(t,e,r){this.column=t,this.row=e,this.zoom=r};s.prototype.clone=function(){return new s(this.column,this.row,this.zoom)},s.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},s.prototype.sub=function(t){return this.clone()._sub(t)},s.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},s.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var l=c;function c(t,e){this.x=t,this.y=e}function u(t,e,r,n){var i=new a(t,e,r,n);return function(t){return i.solve(t)}}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(t){return t instanceof c?t:Array.isArray(t)?new c(t[0],t[1]):t};var f=u(.25,.1,.25,1);function h(t,e,r){return Math.min(r,Math.max(e,t))}function p(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}var d=1;function g(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function v(t,e){return-1!==t.indexOf(e,t.length-e.length)}function m(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function y(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function x(t){return Array.isArray(t)?t.map(x):\\\"object\\\"==typeof t&&t?m(t,x):t}var b={};function _(t){b[t]||(\\\"undefined\\\"!=typeof console&&console.warn(t),b[t]=!0)}function w(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function k(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r<n;i=r++)a=t[r],e+=((o=t[i]).x-a.x)*(a.y+o.y);return e}var M={Unknown:\\\"Unknown\\\",Style:\\\"Style\\\",Source:\\\"Source\\\",Tile:\\\"Tile\\\",Glyphs:\\\"Glyphs\\\",SpriteImage:\\\"SpriteImage\\\",SpriteJSON:\\\"SpriteJSON\\\",Image:\\\"Image\\\"};\\\"function\\\"==typeof Object.freeze&&Object.freeze(M);var A=function(t){function e(e,r,n){t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+\\\": \\\"+this.message+\\\" (\\\"+this.status+\\\"): \\\"+this.url},e}(Error);function T(t){var e=new self.XMLHttpRequest;for(var r in e.open(\\\"GET\\\",t.url,!0),t.headers)e.setRequestHeader(r,t.headers[r]);return e.withCredentials=\\\"include\\\"===t.credentials,e}var S=function(t,e){var r=T(t);return r.responseType=\\\"arraybuffer\\\",r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){var n=r.response;if(0===n.byteLength&&200===r.status)return e(new Error(\\\"http status 200 returned without content.\\\"));r.status>=200&&r.status<300&&r.response?e(null,{data:n,cacheControl:r.getResponseHeader(\\\"Cache-Control\\\"),expires:r.getResponseHeader(\\\"Expires\\\")}):e(new A(r.statusText,r.status,t.url))},r.send(),r};function C(t,e,r){r[t]=r[t]||[],r[t].push(e)}function E(t,e,r){if(r&&r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}var L=function(t,e){void 0===e&&(e={}),p(this,e),this.type=t},z=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,\\\"error\\\",p({error:e},r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(L),O=function(){};O.prototype.on=function(t,e){return this._listeners=this._listeners||{},C(t,e,this._listeners),this},O.prototype.off=function(t,e){return E(t,e,this._listeners),E(t,e,this._oneTimeListeners),this},O.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},C(t,e,this._oneTimeListeners),this},O.prototype.fire=function(t){\\\"string\\\"==typeof t&&(t=new L(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var r=0,n=this._listeners&&this._listeners[e]?this._listeners[e].slice():[];r<n.length;r+=1)n[r].call(this,t);for(var i=0,a=this._oneTimeListeners&&this._oneTimeListeners[e]?this._oneTimeListeners[e].slice():[];i<a.length;i+=1){var o=a[i];E(e,o,this._oneTimeListeners),o.call(this,t)}var s=this._eventedParent;s&&(p(t,\\\"function\\\"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),s.fire(t))}else v(e,\\\"error\\\")?console.error(t&&t.error||t||\\\"Empty error event\\\"):v(e,\\\"warning\\\")&&console.warn(t&&t.warning||t||\\\"Empty warning event\\\");return this},O.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},O.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var I={$version:8,$root:{version:{required:!0,type:\\\"enum\\\",values:[8]},name:{type:\\\"string\\\"},metadata:{type:\\\"*\\\"},center:{type:\\\"array\\\",value:\\\"number\\\"},zoom:{type:\\\"number\\\"},bearing:{type:\\\"number\\\",default:0,period:360,units:\\\"degrees\\\"},pitch:{type:\\\"number\\\",default:0,units:\\\"degrees\\\"},light:{type:\\\"light\\\"},sources:{required:!0,type:\\\"sources\\\"},sprite:{type:\\\"string\\\"},glyphs:{type:\\\"string\\\"},transition:{type:\\\"transition\\\"},layers:{required:!0,type:\\\"array\\\",value:\\\"layer\\\"}},sources:{\\\"*\\\":{type:\\\"source\\\"}},source:[\\\"source_vector\\\",\\\"source_raster\\\",\\\"source_raster_dem\\\",\\\"source_geojson\\\",\\\"source_video\\\",\\\"source_image\\\"],source_vector:{type:{required:!0,type:\\\"enum\\\",values:{vector:{}}},url:{type:\\\"string\\\"},tiles:{type:\\\"array\\\",value:\\\"string\\\"},bounds:{type:\\\"array\\\",value:\\\"number\\\",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:\\\"number\\\",default:0},maxzoom:{type:\\\"number\\\",default:22},attribution:{type:\\\"string\\\"},\\\"*\\\":{type:\\\"*\\\"}},source_raster:{type:{required:!0,type:\\\"enum\\\",values:{raster:{}}},url:{type:\\\"string\\\"},tiles:{type:\\\"array\\\",value:\\\"string\\\"},bounds:{type:\\\"array\\\",value:\\\"number\\\",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:\\\"number\\\",default:0},maxzoom:{type:\\\"number\\\",default:22},tileSize:{type:\\\"number\\\",default:512,units:\\\"pixels\\\"},scheme:{type:\\\"enum\\\",values:{xyz:{},tms:{}},default:\\\"xyz\\\"},attribution:{type:\\\"string\\\"},\\\"*\\\":{type:\\\"*\\\"}},source_raster_dem:{type:{required:!0,type:\\\"enum\\\",values:{\\\"raster-dem\\\":{}}},url:{type:\\\"string\\\"},tiles:{type:\\\"array\\\",value:\\\"string\\\"},bounds:{type:\\\"array\\\",value:\\\"number\\\",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:\\\"number\\\",default:0},maxzoom:{type:\\\"number\\\",default:22},tileSize:{type:\\\"number\\\",default:512,units:\\\"pixels\\\"},attribution:{type:\\\"string\\\"},encoding:{type:\\\"enum\\\",values:{terrarium:{},mapbox:{}},default:\\\"mapbox\\\"},\\\"*\\\":{type:\\\"*\\\"}},source_geojson:{type:{required:!0,type:\\\"enum\\\",values:{geojson:{}}},data:{type:\\\"*\\\"},maxzoom:{type:\\\"number\\\",default:18},buffer:{type:\\\"number\\\",default:128,maximum:512,minimum:0},tolerance:{type:\\\"number\\\",default:.375},cluster:{type:\\\"boolean\\\",default:!1},clusterRadius:{type:\\\"number\\\",default:50,minimum:0},clusterMaxZoom:{type:\\\"number\\\"},lineMetrics:{type:\\\"boolean\\\",default:!1}},source_video:{type:{required:!0,type:\\\"enum\\\",values:{video:{}}},urls:{required:!0,type:\\\"array\\\",value:\\\"string\\\"},coordinates:{required:!0,type:\\\"array\\\",length:4,value:{type:\\\"array\\\",length:2,value:\\\"number\\\"}}},source_image:{type:{required:!0,type:\\\"enum\\\",values:{image:{}}},url:{required:!0,type:\\\"string\\\"},coordinates:{required:!0,type:\\\"array\\\",length:4,value:{type:\\\"array\\\",length:2,value:\\\"number\\\"}}},layer:{id:{type:\\\"string\\\",required:!0},type:{type:\\\"enum\\\",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},\\\"fill-extrusion\\\":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:\\\"*\\\"},source:{type:\\\"string\\\"},\\\"source-layer\\\":{type:\\\"string\\\"},minzoom:{type:\\\"number\\\",minimum:0,maximum:24},maxzoom:{type:\\\"number\\\",minimum:0,maximum:24},filter:{type:\\\"filter\\\"},layout:{type:\\\"layout\\\"},paint:{type:\\\"paint\\\"}},layout:[\\\"layout_fill\\\",\\\"layout_line\\\",\\\"layout_circle\\\",\\\"layout_heatmap\\\",\\\"layout_fill-extrusion\\\",\\\"layout_symbol\\\",\\\"layout_raster\\\",\\\"layout_hillshade\\\",\\\"layout_background\\\"],layout_background:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_fill:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_circle:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_heatmap:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_line:{\\\"line-cap\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{butt:{},round:{},square:{}},default:\\\"butt\\\"},\\\"line-join\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{bevel:{},round:{},miter:{}},default:\\\"miter\\\"},\\\"line-miter-limit\\\":{type:\\\"number\\\",default:2,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[{\\\"line-join\\\":\\\"miter\\\"}]},\\\"line-round-limit\\\":{type:\\\"number\\\",default:1.05,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[{\\\"line-join\\\":\\\"round\\\"}]},visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_symbol:{\\\"symbol-placement\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{point:{},line:{}},default:\\\"point\\\"},\\\"symbol-spacing\\\":{type:\\\"number\\\",default:250,minimum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,units:\\\"pixels\\\",requires:[{\\\"symbol-placement\\\":\\\"line\\\"}]},\\\"symbol-avoid-edges\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1},\\\"icon-allow-overlap\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"icon-image\\\"]},\\\"icon-ignore-placement\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"icon-image\\\"]},\\\"icon-optional\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"icon-image\\\",\\\"text-field\\\"]},\\\"icon-rotation-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{},auto:{}},default:\\\"auto\\\",requires:[\\\"icon-image\\\"]},\\\"icon-size\\\":{type:\\\"number\\\",default:1,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,units:\\\"factor of the original icon size\\\",requires:[\\\"icon-image\\\"]},\\\"icon-text-fit\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{none:{},width:{},height:{},both:{}},default:\\\"none\\\",requires:[\\\"icon-image\\\",\\\"text-field\\\"]},\\\"icon-text-fit-padding\\\":{type:\\\"array\\\",value:\\\"number\\\",length:4,default:[0,0,0,0],units:\\\"pixels\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[\\\"icon-image\\\",\\\"text-field\\\",{\\\"icon-text-fit\\\":[\\\"both\\\",\\\"width\\\",\\\"height\\\"]}]},\\\"icon-image\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,tokens:!0},\\\"icon-rotate\\\":{type:\\\"number\\\",default:0,period:360,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,units:\\\"degrees\\\",requires:[\\\"icon-image\\\"]},\\\"icon-padding\\\":{type:\\\"number\\\",default:2,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,units:\\\"pixels\\\",requires:[\\\"icon-image\\\"]},\\\"icon-keep-upright\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"icon-image\\\",{\\\"icon-rotation-alignment\\\":\\\"map\\\"},{\\\"symbol-placement\\\":\\\"line\\\"}]},\\\"icon-offset\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"icon-image\\\"]},\\\"icon-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{center:{},left:{},right:{},top:{},bottom:{},\\\"top-left\\\":{},\\\"top-right\\\":{},\\\"bottom-left\\\":{},\\\"bottom-right\\\":{}},default:\\\"center\\\",requires:[\\\"icon-image\\\"]},\\\"icon-pitch-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{},auto:{}},default:\\\"auto\\\",requires:[\\\"icon-image\\\"]},\\\"text-pitch-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{},auto:{}},default:\\\"auto\\\",requires:[\\\"text-field\\\"]},\\\"text-rotation-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{},auto:{}},default:\\\"auto\\\",requires:[\\\"text-field\\\"]},\\\"text-field\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:\\\"\\\",tokens:!0},\\\"text-font\\\":{type:\\\"array\\\",value:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:[\\\"Open Sans Regular\\\",\\\"Arial Unicode MS Regular\\\"],requires:[\\\"text-field\\\"]},\\\"text-size\\\":{type:\\\"number\\\",default:16,minimum:0,units:\\\"pixels\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-max-width\\\":{type:\\\"number\\\",default:10,minimum:0,units:\\\"ems\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-line-height\\\":{type:\\\"number\\\",default:1.2,units:\\\"ems\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-letter-spacing\\\":{type:\\\"number\\\",default:0,units:\\\"ems\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-justify\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{left:{},center:{},right:{}},default:\\\"center\\\",requires:[\\\"text-field\\\"]},\\\"text-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{center:{},left:{},right:{},top:{},bottom:{},\\\"top-left\\\":{},\\\"top-right\\\":{},\\\"bottom-left\\\":{},\\\"bottom-right\\\":{}},default:\\\"center\\\",requires:[\\\"text-field\\\"]},\\\"text-max-angle\\\":{type:\\\"number\\\",default:45,units:\\\"degrees\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[\\\"text-field\\\",{\\\"symbol-placement\\\":\\\"line\\\"}]},\\\"text-rotate\\\":{type:\\\"number\\\",default:0,period:360,units:\\\"degrees\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-padding\\\":{type:\\\"number\\\",default:2,minimum:0,units:\\\"pixels\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,requires:[\\\"text-field\\\"]},\\\"text-keep-upright\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!0,requires:[\\\"text-field\\\",{\\\"text-rotation-alignment\\\":\\\"map\\\"},{\\\"symbol-placement\\\":\\\"line\\\"}]},\\\"text-transform\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,values:{none:{},uppercase:{},lowercase:{}},default:\\\"none\\\",requires:[\\\"text-field\\\"]},\\\"text-offset\\\":{type:\\\"array\\\",value:\\\"number\\\",units:\\\"ems\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,length:2,default:[0,0],requires:[\\\"text-field\\\"]},\\\"text-allow-overlap\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"text-field\\\"]},\\\"text-ignore-placement\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"text-field\\\"]},\\\"text-optional\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!1,requires:[\\\"text-field\\\",\\\"icon-image\\\"]},visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_raster:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},layout_hillshade:{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},filter:{type:\\\"array\\\",value:\\\"*\\\"},filter_operator:{type:\\\"enum\\\",values:{\\\"==\\\":{},\\\"!=\\\":{},\\\">\\\":{},\\\">=\\\":{},\\\"<\\\":{},\\\"<=\\\":{},in:{},\\\"!in\\\":{},all:{},any:{},none:{},has:{},\\\"!has\\\":{}}},geometry_type:{type:\\\"enum\\\",values:{Point:{},LineString:{},Polygon:{}}},function_stop:{type:\\\"array\\\",minimum:0,maximum:22,value:[\\\"number\\\",\\\"color\\\"],length:2},expression:{type:\\\"array\\\",value:\\\"*\\\",minimum:1},expression_name:{type:\\\"enum\\\",values:{let:{group:\\\"Variable binding\\\"},var:{group:\\\"Variable binding\\\"},literal:{group:\\\"Types\\\"},array:{group:\\\"Types\\\"},at:{group:\\\"Lookup\\\"},case:{group:\\\"Decision\\\"},match:{group:\\\"Decision\\\"},coalesce:{group:\\\"Decision\\\"},step:{group:\\\"Ramps, scales, curves\\\"},interpolate:{group:\\\"Ramps, scales, curves\\\"},ln2:{group:\\\"Math\\\"},pi:{group:\\\"Math\\\"},e:{group:\\\"Math\\\"},typeof:{group:\\\"Types\\\"},string:{group:\\\"Types\\\"},number:{group:\\\"Types\\\"},boolean:{group:\\\"Types\\\"},object:{group:\\\"Types\\\"},collator:{group:\\\"Types\\\"},\\\"to-string\\\":{group:\\\"Types\\\"},\\\"to-number\\\":{group:\\\"Types\\\"},\\\"to-boolean\\\":{group:\\\"Types\\\"},\\\"to-rgba\\\":{group:\\\"Color\\\"},\\\"to-color\\\":{group:\\\"Types\\\"},rgb:{group:\\\"Color\\\"},rgba:{group:\\\"Color\\\"},get:{group:\\\"Lookup\\\"},has:{group:\\\"Lookup\\\"},length:{group:\\\"Lookup\\\"},properties:{group:\\\"Feature data\\\"},\\\"geometry-type\\\":{group:\\\"Feature data\\\"},id:{group:\\\"Feature data\\\"},zoom:{group:\\\"Zoom\\\"},\\\"heatmap-density\\\":{group:\\\"Heatmap\\\"},\\\"line-progress\\\":{group:\\\"Heatmap\\\"},\\\"+\\\":{group:\\\"Math\\\"},\\\"*\\\":{group:\\\"Math\\\"},\\\"-\\\":{group:\\\"Math\\\"},\\\"/\\\":{group:\\\"Math\\\"},\\\"%\\\":{group:\\\"Math\\\"},\\\"^\\\":{group:\\\"Math\\\"},sqrt:{group:\\\"Math\\\"},log10:{group:\\\"Math\\\"},ln:{group:\\\"Math\\\"},log2:{group:\\\"Math\\\"},sin:{group:\\\"Math\\\"},cos:{group:\\\"Math\\\"},tan:{group:\\\"Math\\\"},asin:{group:\\\"Math\\\"},acos:{group:\\\"Math\\\"},atan:{group:\\\"Math\\\"},min:{group:\\\"Math\\\"},max:{group:\\\"Math\\\"},round:{group:\\\"Math\\\"},abs:{group:\\\"Math\\\"},ceil:{group:\\\"Math\\\"},floor:{group:\\\"Math\\\"},\\\"==\\\":{group:\\\"Decision\\\"},\\\"!=\\\":{group:\\\"Decision\\\"},\\\">\\\":{group:\\\"Decision\\\"},\\\"<\\\":{group:\\\"Decision\\\"},\\\">=\\\":{group:\\\"Decision\\\"},\\\"<=\\\":{group:\\\"Decision\\\"},all:{group:\\\"Decision\\\"},any:{group:\\\"Decision\\\"},\\\"!\\\":{group:\\\"Decision\\\"},\\\"is-supported-script\\\":{group:\\\"String\\\"},upcase:{group:\\\"String\\\"},downcase:{group:\\\"String\\\"},concat:{group:\\\"String\\\"},\\\"resolved-locale\\\":{group:\\\"String\\\"}}},light:{anchor:{type:\\\"enum\\\",default:\\\"viewport\\\",values:{map:{},viewport:{}},transition:!1,\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,function:\\\"piecewise-constant\\\"},position:{type:\\\"array\\\",default:[1.15,210,30],length:3,value:\\\"number\\\",transition:!0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1},color:{type:\\\"color\\\",default:\\\"#ffffff\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,transition:!0},intensity:{type:\\\"number\\\",default:.5,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,transition:!0}},paint:[\\\"paint_fill\\\",\\\"paint_line\\\",\\\"paint_circle\\\",\\\"paint_heatmap\\\",\\\"paint_fill-extrusion\\\",\\\"paint_symbol\\\",\\\"paint_raster\\\",\\\"paint_hillshade\\\",\\\"paint_background\\\"],paint_fill:{\\\"fill-antialias\\\":{type:\\\"boolean\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,default:!0},\\\"fill-opacity\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:1,minimum:0,maximum:1,transition:!0},\\\"fill-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"fill-pattern\\\"}]},\\\"fill-outline-color\\\":{type:\\\"color\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"fill-pattern\\\"},{\\\"fill-antialias\\\":!0}]},\\\"fill-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"fill-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"fill-translate\\\"]},\\\"fill-pattern\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,transition:!0}},paint_line:{\\\"line-opacity\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:1,minimum:0,maximum:1,transition:!0},\\\"line-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"line-pattern\\\"}]},\\\"line-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"line-translate\\\"]},\\\"line-width\\\":{type:\\\"number\\\",default:1,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-gap-width\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-offset\\\":{type:\\\"number\\\",default:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-blur\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"line-dasharray\\\":{type:\\\"array\\\",value:\\\"number\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,minimum:0,transition:!0,units:\\\"line widths\\\",requires:[{\\\"!\\\":\\\"line-pattern\\\"}]},\\\"line-pattern\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"line-gradient\\\":{type:\\\"color\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!1,\\\"property-function\\\":!1,transition:!1,requires:[{\\\"!\\\":\\\"line-dasharray\\\"},{\\\"!\\\":\\\"line-pattern\\\"},{source:\\\"geojson\\\",has:{lineMetrics:!0}}]}},paint_circle:{\\\"circle-radius\\\":{type:\\\"number\\\",default:5,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"circle-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0},\\\"circle-blur\\\":{type:\\\"number\\\",default:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0},\\\"circle-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0},\\\"circle-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"circle-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"circle-translate\\\"]},\\\"circle-pitch-scale\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\"},\\\"circle-pitch-alignment\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"viewport\\\"},\\\"circle-stroke-width\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"circle-stroke-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0},\\\"circle-stroke-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0}},paint_heatmap:{\\\"heatmap-radius\\\":{type:\\\"number\\\",default:30,minimum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"heatmap-weight\\\":{type:\\\"number\\\",default:1,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!1},\\\"heatmap-intensity\\\":{type:\\\"number\\\",default:1,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,transition:!0},\\\"heatmap-color\\\":{type:\\\"color\\\",default:[\\\"interpolate\\\",[\\\"linear\\\"],[\\\"heatmap-density\\\"],0,\\\"rgba(0, 0, 255, 0)\\\",.1,\\\"royalblue\\\",.3,\\\"cyan\\\",.5,\\\"lime\\\",.7,\\\"yellow\\\",1,\\\"red\\\"],function:\\\"interpolated\\\",\\\"zoom-function\\\":!1,\\\"property-function\\\":!1,transition:!1},\\\"heatmap-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,transition:!0}},paint_symbol:{\\\"icon-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"icon-image\\\"]},\\\"icon-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"icon-image\\\"]},\\\"icon-halo-color\\\":{type:\\\"color\\\",default:\\\"rgba(0, 0, 0, 0)\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"icon-image\\\"]},\\\"icon-halo-width\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"icon-image\\\"]},\\\"icon-halo-blur\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"icon-image\\\"]},\\\"icon-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"icon-image\\\"]},\\\"icon-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"icon-image\\\",\\\"icon-translate\\\"]},\\\"text-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"text-field\\\"]},\\\"text-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"text-field\\\"]},\\\"text-halo-color\\\":{type:\\\"color\\\",default:\\\"rgba(0, 0, 0, 0)\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[\\\"text-field\\\"]},\\\"text-halo-width\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"text-field\\\"]},\\\"text-halo-blur\\\":{type:\\\"number\\\",default:0,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"text-field\\\"]},\\\"text-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\",requires:[\\\"text-field\\\"]},\\\"text-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"text-field\\\",\\\"text-translate\\\"]}},paint_raster:{\\\"raster-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"raster-hue-rotate\\\":{type:\\\"number\\\",default:0,period:360,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"degrees\\\"},\\\"raster-brightness-min\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,default:0,minimum:0,maximum:1,transition:!0},\\\"raster-brightness-max\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,default:1,minimum:0,maximum:1,transition:!0},\\\"raster-saturation\\\":{type:\\\"number\\\",default:0,minimum:-1,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"raster-contrast\\\":{type:\\\"number\\\",default:0,minimum:-1,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"raster-fade-duration\\\":{type:\\\"number\\\",default:300,minimum:0,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!1,units:\\\"milliseconds\\\"}},paint_hillshade:{\\\"hillshade-illumination-direction\\\":{type:\\\"number\\\",default:335,minimum:0,maximum:359,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!1},\\\"hillshade-illumination-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"viewport\\\"},\\\"hillshade-exaggeration\\\":{type:\\\"number\\\",default:.5,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"hillshade-shadow-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"hillshade-highlight-color\\\":{type:\\\"color\\\",default:\\\"#FFFFFF\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"hillshade-accent-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0}},paint_background:{\\\"background-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"background-pattern\\\"}]},\\\"background-pattern\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"background-opacity\\\":{type:\\\"number\\\",default:1,minimum:0,maximum:1,function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0}},transition:{duration:{type:\\\"number\\\",default:300,minimum:0,units:\\\"milliseconds\\\"},delay:{type:\\\"number\\\",default:0,minimum:0,units:\\\"milliseconds\\\"}},\\\"layout_fill-extrusion\\\":{visibility:{type:\\\"enum\\\",values:{visible:{},none:{}},default:\\\"visible\\\"}},function:{expression:{type:\\\"expression\\\"},stops:{type:\\\"array\\\",value:\\\"function_stop\\\"},base:{type:\\\"number\\\",default:1,minimum:0},property:{type:\\\"string\\\",default:\\\"$zoom\\\"},type:{type:\\\"enum\\\",values:{identity:{},exponential:{},interval:{},categorical:{}},default:\\\"exponential\\\"},colorSpace:{type:\\\"enum\\\",values:{rgb:{},lab:{},hcl:{}},default:\\\"rgb\\\"},default:{type:\\\"*\\\",required:!1}},\\\"paint_fill-extrusion\\\":{\\\"fill-extrusion-opacity\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!1,default:1,minimum:0,maximum:1,transition:!0},\\\"fill-extrusion-color\\\":{type:\\\"color\\\",default:\\\"#000000\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,transition:!0,requires:[{\\\"!\\\":\\\"fill-extrusion-pattern\\\"}]},\\\"fill-extrusion-translate\\\":{type:\\\"array\\\",value:\\\"number\\\",length:2,default:[0,0],function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,transition:!0,units:\\\"pixels\\\"},\\\"fill-extrusion-translate-anchor\\\":{type:\\\"enum\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,values:{map:{},viewport:{}},default:\\\"map\\\",requires:[\\\"fill-extrusion-translate\\\"]},\\\"fill-extrusion-pattern\\\":{type:\\\"string\\\",function:\\\"piecewise-constant\\\",\\\"zoom-function\\\":!0,transition:!0},\\\"fill-extrusion-height\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:0,minimum:0,units:\\\"meters\\\",transition:!0},\\\"fill-extrusion-base\\\":{type:\\\"number\\\",function:\\\"interpolated\\\",\\\"zoom-function\\\":!0,\\\"property-function\\\":!0,default:0,minimum:0,units:\\\"meters\\\",transition:!0,requires:[\\\"fill-extrusion-height\\\"]}}},P=function(t,e,r,n){this.message=(t?t+\\\": \\\":\\\"\\\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function D(t){var e=t.key,r=t.value;return r?[new P(e,r,\\\"constants have been deprecated as of v8\\\")]:[]}function R(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}function B(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function F(t){return Array.isArray(t)?t.map(F):B(t)}var N=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),j=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r<n.length;r+=1){var i=n[r],a=i[0],o=i[1];this.bindings[a]=o}};j.prototype.concat=function(t){return new j(this,t)},j.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+\\\" not found in scope.\\\")},j.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var V={kind:\\\"null\\\"},U={kind:\\\"number\\\"},q={kind:\\\"string\\\"},H={kind:\\\"boolean\\\"},G={kind:\\\"color\\\"},W={kind:\\\"object\\\"},Y={kind:\\\"value\\\"},X={kind:\\\"collator\\\"};function Z(t,e){return{kind:\\\"array\\\",itemType:t,N:e}}function $(t){if(\\\"array\\\"===t.kind){var e=$(t.itemType);return\\\"number\\\"==typeof t.N?\\\"array<\\\"+e+\\\", \\\"+t.N+\\\">\\\":\\\"value\\\"===t.itemType.kind?\\\"array\\\":\\\"array<\\\"+e+\\\">\\\"}return t.kind}var J=[V,U,q,H,G,W,Z(Y)];function K(t,e){if(\\\"error\\\"===e.kind)return null;if(\\\"array\\\"===t.kind){if(\\\"array\\\"===e.kind&&!K(t.itemType,e.itemType)&&(\\\"number\\\"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(\\\"value\\\"===t.kind)for(var r=0,n=J;r<n.length;r+=1)if(!K(n[r],e))return null}return\\\"Expected \\\"+$(t)+\\\" but found \\\"+$(e)+\\\" instead.\\\"}var Q=i(function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return\\\"%\\\"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return\\\"%\\\"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,\\\"\\\").toLowerCase();if(i in r)return r[i].slice();if(\\\"#\\\"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=i.indexOf(\\\"(\\\"),c=i.indexOf(\\\")\\\");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),f=i.substr(l+1,c-(l+1)).split(\\\",\\\"),h=1;switch(u){case\\\"rgba\\\":if(4!==f.length)return null;h=o(f.pop());case\\\"rgb\\\":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case\\\"hsla\\\":if(4!==f.length)return null;h=o(f.pop());case\\\"hsl\\\":if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,d=o(f[1]),g=o(f[2]),v=g<=.5?g*(d+1):g+d-g*d,m=2*g-v;return[n(255*s(m,v,p+1/3)),n(255*s(m,v,p)),n(255*s(m,v,p-1/3)),h];default:return null}}return null}}catch(t){}}).parseCSSColor,tt=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};tt.parse=function(t){if(t){if(t instanceof tt)return t;if(\\\"string\\\"==typeof t){var e=Q(t);if(e)return new tt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},tt.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return\\\"rgba(\\\"+Math.round(e)+\\\",\\\"+Math.round(r)+\\\",\\\"+Math.round(n)+\\\",\\\"+i+\\\")\\\"},tt.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},tt.black=new tt(0,0,0,1),tt.white=new tt(1,1,1,1),tt.transparent=new tt(0,0,0,0);var et=function(t,e,r){this.sensitivity=t?e?\\\"variant\\\":\\\"case\\\":e?\\\"accent\\\":\\\"base\\\",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:\\\"search\\\"})};et.prototype.compare=function(t,e){return this.collator.compare(t,e)},et.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var rt=function(t,e,r){this.type=X,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function nt(t,e,r,n){return\\\"number\\\"==typeof t&&t>=0&&t<=255&&\\\"number\\\"==typeof e&&e>=0&&e<=255&&\\\"number\\\"==typeof r&&r>=0&&r<=255?void 0===n||\\\"number\\\"==typeof n&&n>=0&&n<=1?null:\\\"Invalid rgba value [\\\"+[t,e,r,n].join(\\\", \\\")+\\\"]: 'a' must be between 0 and 1.\\\":\\\"Invalid rgba value [\\\"+(\\\"number\\\"==typeof n?[t,e,r,n]:[t,e,r]).join(\\\", \\\")+\\\"]: 'r', 'g', and 'b' must be between 0 and 255.\\\"}function it(t){if(null===t)return V;if(\\\"string\\\"==typeof t)return q;if(\\\"boolean\\\"==typeof t)return H;if(\\\"number\\\"==typeof t)return U;if(t instanceof tt)return G;if(t instanceof et)return X;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n<i.length;n+=1){var a=it(i[n]);if(e){if(e===a)continue;e=Y;break}e=a}return Z(e||Y,r)}return W}rt.parse=function(t,e){if(2!==t.length)return e.error(\\\"Expected one argument.\\\");var r=t[1];if(\\\"object\\\"!=typeof r||Array.isArray(r))return e.error(\\\"Collator options argument must be an object.\\\");var n=e.parse(void 0!==r[\\\"case-sensitive\\\"]&&r[\\\"case-sensitive\\\"],1,H);if(!n)return null;var i=e.parse(void 0!==r[\\\"diacritic-sensitive\\\"]&&r[\\\"diacritic-sensitive\\\"],1,H);if(!i)return null;var a=null;return r.locale&&!(a=e.parse(r.locale,1,q))?null:new rt(n,i,a)},rt.prototype.evaluate=function(t){return new et(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},rt.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},rt.prototype.possibleOutputs=function(){return[void 0]},rt.prototype.serialize=function(){var t={};return t[\\\"case-sensitive\\\"]=this.caseSensitive.serialize(),t[\\\"diacritic-sensitive\\\"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),[\\\"collator\\\",t]};var at=function(t,e){this.type=t,this.value=e};at.parse=function(t,e){if(2!==t.length)return e.error(\\\"'literal' expression requires exactly one argument, but found \\\"+(t.length-1)+\\\" instead.\\\");if(!function t(e){if(null===e)return!0;if(\\\"string\\\"==typeof e)return!0;if(\\\"boolean\\\"==typeof e)return!0;if(\\\"number\\\"==typeof e)return!0;if(e instanceof tt)return!0;if(e instanceof et)return!0;if(Array.isArray(e)){for(var r=0,n=e;r<n.length;r+=1)if(!t(n[r]))return!1;return!0}if(\\\"object\\\"==typeof e){for(var i in e)if(!t(e[i]))return!1;return!0}return!1}(t[1]))return e.error(\\\"invalid value\\\");var r=t[1],n=it(r),i=e.expectedType;return\\\"array\\\"!==n.kind||0!==n.N||!i||\\\"array\\\"!==i.kind||\\\"number\\\"==typeof i.N&&0!==i.N||(n=i),new at(n,r)},at.prototype.evaluate=function(){return this.value},at.prototype.eachChild=function(){},at.prototype.possibleOutputs=function(){return[this.value]},at.prototype.serialize=function(){return\\\"array\\\"===this.type.kind||\\\"object\\\"===this.type.kind?[\\\"literal\\\",this.value]:this.value instanceof tt?[\\\"rgba\\\"].concat(this.value.toArray()):this.value};var ot=function(t){this.name=\\\"ExpressionEvaluationError\\\",this.message=t};ot.prototype.toJSON=function(){return this.message};var st={string:q,number:U,boolean:H,object:W},lt=function(t,e){this.type=t,this.args=e};lt.parse=function(t,e){if(t.length<2)return e.error(\\\"Expected at least one argument.\\\");for(var r=t[0],n=st[r],i=[],a=1;a<t.length;a++){var o=e.parse(t[a],a,Y);if(!o)return null;i.push(o)}return new lt(n,i)},lt.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!K(this.type,it(r)))return r;if(e===this.args.length-1)throw new ot(\\\"Expected value to be of type \\\"+$(this.type)+\\\", but found \\\"+$(it(r))+\\\" instead.\\\")}return null},lt.prototype.eachChild=function(t){this.args.forEach(t)},lt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},lt.prototype.serialize=function(){return[this.type.kind].concat(this.args.map(function(t){return t.serialize()}))};var ct={string:q,number:U,boolean:H},ut=function(t,e){this.type=t,this.input=e};ut.parse=function(t,e){if(t.length<2||t.length>4)return e.error(\\\"Expected 1, 2, or 3 arguments, but found \\\"+(t.length-1)+\\\" instead.\\\");var r,n;if(t.length>2){var i=t[1];if(\\\"string\\\"!=typeof i||!(i in ct))return e.error('The item type argument of \\\"array\\\" must be one of string, number, boolean',1);r=ct[i]}else r=Y;if(t.length>3){if(\\\"number\\\"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2]))return e.error('The length argument to \\\"array\\\" must be a positive integer literal',2);n=t[2]}var a=Z(r,n),o=e.parse(t[t.length-1],t.length-1,Y);return o?new ut(a,o):null},ut.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(K(this.type,it(e)))throw new ot(\\\"Expected value to be of type \\\"+$(this.type)+\\\", but found \\\"+$(it(e))+\\\" instead.\\\");return e},ut.prototype.eachChild=function(t){t(this.input)},ut.prototype.possibleOutputs=function(){return this.input.possibleOutputs()},ut.prototype.serialize=function(){var t=[\\\"array\\\"],e=this.type.itemType;if(\\\"string\\\"===e.kind||\\\"number\\\"===e.kind||\\\"boolean\\\"===e.kind){t.push(e.kind);var r=this.type.N;\\\"number\\\"==typeof r&&t.push(r)}return t.push(this.input.serialize()),t};var ft={\\\"to-number\\\":U,\\\"to-color\\\":G},ht=function(t,e){this.type=t,this.args=e};ht.parse=function(t,e){if(t.length<2)return e.error(\\\"Expected at least one argument.\\\");for(var r=t[0],n=ft[r],i=[],a=1;a<t.length;a++){var o=e.parse(t[a],a,Y);if(!o)return null;i.push(o)}return new ht(n,i)},ht.prototype.evaluate=function(t){if(\\\"color\\\"===this.type.kind){for(var e,r,n=0,i=this.args;n<i.length;n+=1)if(r=null,\\\"string\\\"==typeof(e=i[n].evaluate(t))){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?\\\"Invalid rbga value \\\"+JSON.stringify(e)+\\\": expected an array containing either three or four numeric values.\\\":nt(e[0],e[1],e[2],e[3])))return new tt(e[0]/255,e[1]/255,e[2]/255,e[3]);throw new ot(r||\\\"Could not parse color from value '\\\"+(\\\"string\\\"==typeof e?e:JSON.stringify(e))+\\\"'\\\")}for(var o=null,s=0,l=this.args;s<l.length;s+=1)if(null!==(o=l[s].evaluate(t))){var c=Number(o);if(!isNaN(c))return c}throw new ot(\\\"Could not convert \\\"+JSON.stringify(o)+\\\" to number.\\\")},ht.prototype.eachChild=function(t){this.args.forEach(t)},ht.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},ht.prototype.serialize=function(){var t=[\\\"to-\\\"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var pt=[\\\"Unknown\\\",\\\"Point\\\",\\\"LineString\\\",\\\"Polygon\\\"],dt=function(){this._parseColorCache={}};dt.prototype.id=function(){return this.feature&&\\\"id\\\"in this.feature?this.feature.id:null},dt.prototype.geometryType=function(){return this.feature?\\\"number\\\"==typeof this.feature.type?pt[this.feature.type]:this.feature.type:null},dt.prototype.properties=function(){return this.feature&&this.feature.properties||{}},dt.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=tt.parse(t)),e};var gt=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};function vt(t){if(t instanceof gt){if(\\\"get\\\"===t.name&&1===t.args.length)return!1;if(\\\"has\\\"===t.name&&1===t.args.length)return!1;if(\\\"properties\\\"===t.name||\\\"geometry-type\\\"===t.name||\\\"id\\\"===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild(function(t){e&&!vt(t)&&(e=!1)}),e}function mt(t,e){if(t instanceof gt&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild(function(t){r&&!mt(t,e)&&(r=!1)}),r}gt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},gt.prototype.eachChild=function(t){this.args.forEach(t)},gt.prototype.possibleOutputs=function(){return[void 0]},gt.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},gt.parse=function(t,e){var r=t[0],n=gt.definitions[r];if(!n)return e.error('Unknown expression \\\"'+r+'\\\". If you wanted a literal array, use [\\\"literal\\\", [...]].',0);for(var i=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=a.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),s=[],l=1;l<t.length;l++){var c=t[l],u=void 0;if(1===o.length){var f=o[0][0];u=Array.isArray(f)?f[l-1]:f.type}var h=e.parse(c,1+s.length,u);if(!h)return null;s.push(h)}for(var p=null,d=0,g=o;d<g.length;d+=1){var v=g[d],m=v[0],y=v[1];if(p=new xt(e.registry,e.path,null,e.scope),Array.isArray(m)&&m.length!==s.length)p.error(\\\"Expected \\\"+m.length+\\\" arguments, but found \\\"+s.length+\\\" instead.\\\");else{for(var x=0;x<s.length;x++){var b=Array.isArray(m)?m[x]:m.type,_=s[x];p.concat(x+1).checkSubtype(b,_.type)}if(0===p.errors.length)return new gt(r,i,y,s)}}if(1===o.length)e.errors.push.apply(e.errors,p.errors);else{var w=(o.length?o:a).map(function(t){var e;return e=t[0],Array.isArray(e)?\\\"(\\\"+e.map($).join(\\\", \\\")+\\\")\\\":\\\"(\\\"+$(e.type)+\\\"...)\\\"}).join(\\\" | \\\"),k=s.map(function(t){return $(t.type)}).join(\\\", \\\");e.error(\\\"Expected arguments of type \\\"+w+\\\", but found (\\\"+k+\\\") instead.\\\")}return null},gt.register=function(t,e){for(var r in gt.definitions=e,e)t[r]=gt};var yt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};yt.parse=function(t,e){if(2!==t.length||\\\"string\\\"!=typeof t[1])return e.error(\\\"'var' expression requires exactly one string literal argument.\\\");var r=t[1];return e.scope.has(r)?new yt(r,e.scope.get(r)):e.error('Unknown variable \\\"'+r+'\\\". Make sure \\\"'+r+'\\\" has been bound in an enclosing \\\"let\\\" expression before using it.',1)},yt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},yt.prototype.eachChild=function(){},yt.prototype.possibleOutputs=function(){return[void 0]},yt.prototype.serialize=function(){return[\\\"var\\\",this.name]};var xt=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new j),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return\\\"[\\\"+t+\\\"]\\\"}).join(\\\"\\\"),this.scope=n,this.errors=i,this.expectedType=r};function bt(t,e){for(var r,n,i=0,a=t.length-1,o=0;i<=a;){if(r=t[o=Math.floor((i+a)/2)],n=t[o+1],e===r||e>r&&e<n)return o;if(r<e)i=o+1;else{if(!(r>e))throw new ot(\\\"Input is not a number.\\\");a=o-1}}return Math.max(o-1,0)}xt.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},xt.prototype._parse=function(t,e){if(null!==t&&\\\"string\\\"!=typeof t&&\\\"boolean\\\"!=typeof t&&\\\"number\\\"!=typeof t||(t=[\\\"literal\\\",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use [\\\"literal\\\", []].');var r=t[0];if(\\\"string\\\"!=typeof r)return this.error(\\\"Expression name must be a string, but found \\\"+typeof r+' instead. If you wanted a literal array, use [\\\"literal\\\", [...]].',0),null;var n=this.registry[r];if(n){var i=n.parse(t,this);if(!i)return null;if(this.expectedType){var a=this.expectedType,o=i.type;if(\\\"string\\\"!==a.kind&&\\\"number\\\"!==a.kind&&\\\"boolean\\\"!==a.kind&&\\\"object\\\"!==a.kind||\\\"value\\\"!==o.kind)if(\\\"array\\\"===a.kind&&\\\"value\\\"===o.kind)e.omitTypeAnnotations||(i=new ut(a,i));else if(\\\"color\\\"!==a.kind||\\\"value\\\"!==o.kind&&\\\"string\\\"!==o.kind){if(this.checkSubtype(this.expectedType,i.type))return null}else e.omitTypeAnnotations||(i=new ht(a,[i]));else e.omitTypeAnnotations||(i=new lt(a,[i]))}if(!(i instanceof at)&&function t(e){if(e instanceof yt)return t(e.boundExpression);if(e instanceof gt&&\\\"error\\\"===e.name)return!1;if(e instanceof rt)return!1;var r=e instanceof ht||e instanceof lt||e instanceof ut,n=!0;return e.eachChild(function(e){n=r?n&&t(e):n&&e instanceof at}),!!n&&(vt(e)&&mt(e,[\\\"zoom\\\",\\\"heatmap-density\\\",\\\"line-progress\\\",\\\"is-supported-script\\\"]))}(i)){var s=new dt;try{i=new at(i.type,i.evaluate(s))}catch(t){return this.error(t.message),null}}return i}return this.error('Unknown expression \\\"'+r+'\\\". If you wanted a literal array, use [\\\"literal\\\", [...]].',0)}return void 0===t?this.error(\\\"'undefined' value invalid. Use null instead.\\\"):\\\"object\\\"==typeof t?this.error('Bare objects invalid. Use [\\\"literal\\\", {...}] instead.'):this.error(\\\"Expected an array, but found \\\"+typeof t+\\\" instead.\\\")},xt.prototype.concat=function(t,e,r){var n=\\\"number\\\"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new xt(this.registry,n,e||null,i,this.errors)},xt.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=\\\"\\\"+this.key+e.map(function(t){return\\\"[\\\"+t+\\\"]\\\"}).join(\\\"\\\");this.errors.push(new N(n,t))},xt.prototype.checkSubtype=function(t,e){var r=K(t,e);return r&&this.error(r),r};var _t=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n<i.length;n+=1){var a=i[n],o=a[0],s=a[1];this.labels.push(o),this.outputs.push(s)}};function wt(t,e,r){return t*(1-r)+e*r}_t.parse=function(t,e){var r=t[1],n=t.slice(2);if(t.length-1<4)return e.error(\\\"Expected at least 4 arguments, but found only \\\"+(t.length-1)+\\\".\\\");if((t.length-1)%2!=0)return e.error(\\\"Expected an even number of arguments.\\\");if(!(r=e.parse(r,1,U)))return null;var i=[],a=null;e.expectedType&&\\\"value\\\"!==e.expectedType.kind&&(a=e.expectedType),n.unshift(-1/0);for(var o=0;o<n.length;o+=2){var s=n[o],l=n[o+1],c=o+1,u=o+2;if(\\\"number\\\"!=typeof s)return e.error('Input/output pairs for \\\"step\\\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(i.length&&i[i.length-1][0]>=s)return e.error('Input/output pairs for \\\"step\\\" expressions must be arranged with input values in strictly ascending order.',c);var f=e.parse(l,u,a);if(!f)return null;a=a||f.type,i.push([s,f])}return new _t(a,r,i)},_t.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[bt(e,n)].evaluate(t)},_t.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},_t.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},_t.prototype.serialize=function(){for(var t=[\\\"step\\\",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var kt=Object.freeze({number:wt,color:function(t,e,r){return new tt(wt(t.r,e.r,r),wt(t.g,e.g,r),wt(t.b,e.b,r),wt(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return wt(t,e[n],r)})}}),Mt=function(t,e,r,n){this.type=t,this.interpolation=e,this.input=r,this.labels=[],this.outputs=[];for(var i=0,a=n;i<a.length;i+=1){var o=a[i],s=o[0],l=o[1];this.labels.push(s),this.outputs.push(l)}};function At(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}Mt.interpolationFactor=function(t,e,r,n){var i=0;if(\\\"exponential\\\"===t.name)i=At(e,t.base,r,n);else if(\\\"linear\\\"===t.name)i=At(e,1,r,n);else if(\\\"cubic-bezier\\\"===t.name){var o=t.controlPoints;i=new a(o[0],o[1],o[2],o[3]).solve(At(e,1,r,n))}return i},Mt.parse=function(t,e){var r=t[1],n=t[2],i=t.slice(3);if(!Array.isArray(r)||0===r.length)return e.error(\\\"Expected an interpolation type expression.\\\",1);if(\\\"linear\\\"===r[0])r={name:\\\"linear\\\"};else if(\\\"exponential\\\"===r[0]){var a=r[1];if(\\\"number\\\"!=typeof a)return e.error(\\\"Exponential interpolation requires a numeric base.\\\",1,1);r={name:\\\"exponential\\\",base:a}}else{if(\\\"cubic-bezier\\\"!==r[0])return e.error(\\\"Unknown interpolation type \\\"+String(r[0]),1,0);var o=r.slice(1);if(4!==o.length||o.some(function(t){return\\\"number\\\"!=typeof t||t<0||t>1}))return e.error(\\\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\\\",1);r={name:\\\"cubic-bezier\\\",controlPoints:o}}if(t.length-1<4)return e.error(\\\"Expected at least 4 arguments, but found only \\\"+(t.length-1)+\\\".\\\");if((t.length-1)%2!=0)return e.error(\\\"Expected an even number of arguments.\\\");if(!(n=e.parse(n,2,U)))return null;var s=[],l=null;e.expectedType&&\\\"value\\\"!==e.expectedType.kind&&(l=e.expectedType);for(var c=0;c<i.length;c+=2){var u=i[c],f=i[c+1],h=c+3,p=c+4;if(\\\"number\\\"!=typeof u)return e.error('Input/output pairs for \\\"interpolate\\\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(s.length&&s[s.length-1][0]>=u)return e.error('Input/output pairs for \\\"interpolate\\\" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(f,p,l);if(!d)return null;l=l||d.type,s.push([u,d])}return\\\"number\\\"===l.kind||\\\"color\\\"===l.kind||\\\"array\\\"===l.kind&&\\\"number\\\"===l.itemType.kind&&\\\"number\\\"==typeof l.N?new Mt(l,r,n,s):e.error(\\\"Type \\\"+$(l)+\\\" is not interpolatable.\\\")},Mt.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var a=bt(e,n),o=e[a],s=e[a+1],l=Mt.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return kt[this.type.kind.toLowerCase()](c,u,l)},Mt.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},Mt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}));var t},Mt.prototype.serialize=function(){for(var t=[\\\"interpolate\\\",\\\"linear\\\"===this.interpolation.name?[\\\"linear\\\"]:\\\"exponential\\\"===this.interpolation.name?1===this.interpolation.base?[\\\"linear\\\"]:[\\\"exponential\\\",this.interpolation.base]:[\\\"cubic-bezier\\\"].concat(this.interpolation.controlPoints),this.input.serialize()],e=0;e<this.labels.length;e++)t.push(this.labels[e],this.outputs[e].serialize());return t};var Tt=function(t,e){this.type=t,this.args=e};Tt.parse=function(t,e){if(t.length<2)return e.error(\\\"Expectected at least one argument.\\\");var r=null,n=e.expectedType;n&&\\\"value\\\"!==n.kind&&(r=n);for(var i=[],a=0,o=t.slice(1);a<o.length;a+=1){var s=o[a],l=e.parse(s,1+i.length,r,void 0,{omitTypeAnnotations:!0});if(!l)return null;r=r||l.type,i.push(l)}var c=n&&i.some(function(t){return K(n,t.type)});return new Tt(c?Y:r,i)},Tt.prototype.evaluate=function(t){for(var e=null,r=0,n=this.args;r<n.length&&null===(e=n[r].evaluate(t));r+=1);return e},Tt.prototype.eachChild=function(t){this.args.forEach(t)},Tt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}));var t},Tt.prototype.serialize=function(){var t=[\\\"coalesce\\\"];return this.eachChild(function(e){t.push(e.serialize())}),t};var St=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};St.prototype.evaluate=function(t){return this.result.evaluate(t)},St.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},St.parse=function(t,e){if(t.length<4)return e.error(\\\"Expected at least 3 arguments, but found \\\"+(t.length-1)+\\\" instead.\\\");for(var r=[],n=1;n<t.length-1;n+=2){var i=t[n];if(\\\"string\\\"!=typeof i)return e.error(\\\"Expected string, but found \\\"+typeof i+\\\" instead.\\\",n);if(/[^a-zA-Z0-9_]/.test(i))return e.error(\\\"Variable names must contain only alphanumeric characters or '_'.\\\",n);var a=e.parse(t[n+1],n+1);if(!a)return null;r.push([i,a])}var o=e.parse(t[t.length-1],t.length-1,void 0,r);return o?new St(r,o):null},St.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},St.prototype.serialize=function(){for(var t=[\\\"let\\\"],e=0,r=this.bindings;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];t.push(i,a.serialize())}return t.push(this.result.serialize()),t};var Ct=function(t,e,r){this.type=t,this.index=e,this.input=r};Ct.parse=function(t,e){if(3!==t.length)return e.error(\\\"Expected 2 arguments, but found \\\"+(t.length-1)+\\\" instead.\\\");var r=e.parse(t[1],1,U),n=e.parse(t[2],2,Z(e.expectedType||Y));if(!r||!n)return null;var i=n.type;return new Ct(i.itemType,r,n)},Ct.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new ot(\\\"Array index out of bounds: \\\"+e+\\\" < 0.\\\");if(e>=r.length)throw new ot(\\\"Array index out of bounds: \\\"+e+\\\" > \\\"+(r.length-1)+\\\".\\\");if(e!==Math.floor(e))throw new ot(\\\"Array index must be an integer, but found \\\"+e+\\\" instead.\\\");return r[e]},Ct.prototype.eachChild=function(t){t(this.index),t(this.input)},Ct.prototype.possibleOutputs=function(){return[void 0]},Ct.prototype.serialize=function(){return[\\\"at\\\",this.index.serialize(),this.input.serialize()]};var Et=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};Et.parse=function(t,e){if(t.length<5)return e.error(\\\"Expected at least 4 arguments, but found only \\\"+(t.length-1)+\\\".\\\");if(t.length%2!=1)return e.error(\\\"Expected an even number of arguments.\\\");var r,n;e.expectedType&&\\\"value\\\"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},a=[],o=2;o<t.length-1;o+=2){var s=t[o],l=t[o+1];Array.isArray(s)||(s=[s]);var c=e.concat(o);if(0===s.length)return c.error(\\\"Expected at least one branch label.\\\");for(var u=0,f=s;u<f.length;u+=1){var h=f[u];if(\\\"number\\\"!=typeof h&&\\\"string\\\"!=typeof h)return c.error(\\\"Branch labels must be numbers or strings.\\\");if(\\\"number\\\"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return c.error(\\\"Branch labels must be integers no larger than \\\"+Number.MAX_SAFE_INTEGER+\\\".\\\");if(\\\"number\\\"==typeof h&&Math.floor(h)!==h)return c.error(\\\"Numeric branch labels must be integer values.\\\");if(r){if(c.checkSubtype(r,it(h)))return null}else r=it(h);if(void 0!==i[String(h)])return c.error(\\\"Branch labels must be unique.\\\");i[String(h)]=a.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=e.parse(t[1],1,r);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?new Et(r,n,d,i,a,g):null},Et.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Et.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Et.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Et.prototype.serialize=function(){for(var t=this,e=[\\\"match\\\",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i<a.length;i+=1){var o=a[i],s=n[t.cases[o]];void 0===s?(n[t.cases[o]]=r.length,r.push([t.cases[o],[o]])):r[s][1].push(o)}for(var l=function(e){return\\\"number\\\"===t.input.type.kind?Number(e):e},c=0,u=r;c<u.length;c+=1){var f=u[c],h=f[0],p=f[1];1===p.length?e.push(l(p[0])):e.push(p.map(l)),e.push(t.outputs[h].serialize())}return e.push(this.otherwise.serialize()),e};var Lt=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};function zt(t){return\\\"string\\\"===t.kind||\\\"number\\\"===t.kind||\\\"boolean\\\"===t.kind||\\\"null\\\"===t.kind}function Ot(t,e){return function(){function r(t,e,r){this.type=H,this.lhs=t,this.rhs=e,this.collator=r}return r.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error(\\\"Expected two or three arguments.\\\");var n=e.parse(t[1],1,Y);if(!n)return null;var i=e.parse(t[2],2,Y);if(!i)return null;if(!zt(n.type)&&!zt(i.type))return e.error(\\\"Expected at least one argument to be a string, number, boolean, or null, but found (\\\"+$(n.type)+\\\", \\\"+$(i.type)+\\\") instead.\\\");if(n.type.kind!==i.type.kind&&\\\"value\\\"!==n.type.kind&&\\\"value\\\"!==i.type.kind)return e.error(\\\"Cannot compare \\\"+$(n.type)+\\\" and \\\"+$(i.type)+\\\".\\\");var a=null;if(4===t.length){if(\\\"string\\\"!==n.type.kind&&\\\"string\\\"!==i.type.kind)return e.error(\\\"Cannot use collator to compare non-string types.\\\");if(!(a=e.parse(t[3],3,X)))return null}return new r(n,i,a)},r.prototype.evaluate=function(t){var r=this.collator?0===this.collator.evaluate(t).compare(this.lhs.evaluate(t),this.rhs.evaluate(t)):this.lhs.evaluate(t)===this.rhs.evaluate(t);return e?!r:r},r.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},r.prototype.possibleOutputs=function(){return[!0,!1]},r.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},r}()}Lt.parse=function(t,e){if(t.length<4)return e.error(\\\"Expected at least 3 arguments, but found only \\\"+(t.length-1)+\\\".\\\");if(t.length%2!=0)return e.error(\\\"Expected an odd number of arguments.\\\");var r;e.expectedType&&\\\"value\\\"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i<t.length-1;i+=2){var a=e.parse(t[i],i,H);if(!a)return null;var o=e.parse(t[i+1],i+1,r);if(!o)return null;n.push([a,o]),r=r||o.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Lt(r,n,s):null},Lt.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];if(i.evaluate(t))return a.evaluate(t)}return this.otherwise.evaluate(t)},Lt.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];t(i),t(a)}t(this.otherwise)},Lt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.branches.map(function(t){return t[0],t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs());var t},Lt.prototype.serialize=function(){var t=[\\\"case\\\"];return this.eachChild(function(e){t.push(e.serialize())}),t};var It=Ot(\\\"==\\\",!1),Pt=Ot(\\\"!=\\\",!0),Dt=function(t){this.type=U,this.input=t};Dt.parse=function(t,e){if(2!==t.length)return e.error(\\\"Expected 1 argument, but found \\\"+(t.length-1)+\\\" instead.\\\");var r=e.parse(t[1],1);return r?\\\"array\\\"!==r.type.kind&&\\\"string\\\"!==r.type.kind&&\\\"value\\\"!==r.type.kind?e.error(\\\"Expected argument of type string or array, but found \\\"+$(r.type)+\\\" instead.\\\"):new Dt(r):null},Dt.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(\\\"string\\\"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ot(\\\"Expected value to be of type string or array, but found \\\"+$(it(e))+\\\" instead.\\\")},Dt.prototype.eachChild=function(t){t(this.input)},Dt.prototype.possibleOutputs=function(){return[void 0]},Dt.prototype.serialize=function(){var t=[\\\"length\\\"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Rt={\\\"==\\\":It,\\\"!=\\\":Pt,array:ut,at:Ct,boolean:lt,case:Lt,coalesce:Tt,collator:rt,interpolate:Mt,length:Dt,let:St,literal:at,match:Et,number:lt,object:lt,step:_t,string:lt,\\\"to-color\\\":ht,\\\"to-number\\\":ht,var:yt};function Bt(t,e){var r=e[0],n=e[1],i=e[2],a=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var o=a?a.evaluate(t):1,s=nt(r,n,i,o);if(s)throw new ot(s);return new tt(r/255*o,n/255*o,i/255*o,o)}function Ft(t,e){return t in e}function Nt(t,e){var r=e[t];return void 0===r?null:r}function jt(t,e){var r=e[0],n=e[1];return r.evaluate(t)<n.evaluate(t)}function Vt(t,e){var r=e[0],n=e[1];return r.evaluate(t)>n.evaluate(t)}function Ut(t,e){var r=e[0],n=e[1];return r.evaluate(t)<=n.evaluate(t)}function qt(t,e){var r=e[0],n=e[1];return r.evaluate(t)>=n.evaluate(t)}function Ht(t){return{type:t}}function Gt(t){return{result:\\\"success\\\",value:t}}function Wt(t){return{result:\\\"error\\\",value:t}}gt.register(Rt,{error:[{kind:\\\"error\\\"},[q],function(t,e){var r=e[0];throw new ot(r.evaluate(t))}],typeof:[q,[Y],function(t,e){return $(it(e[0].evaluate(t)))}],\\\"to-string\\\":[q,[Y],function(t,e){var r=e[0],n=typeof(r=r.evaluate(t));return null===r?\\\"\\\":\\\"string\\\"===n||\\\"number\\\"===n||\\\"boolean\\\"===n?String(r):r instanceof tt?r.toString():JSON.stringify(r)}],\\\"to-boolean\\\":[H,[Y],function(t,e){var r=e[0];return Boolean(r.evaluate(t))}],\\\"to-rgba\\\":[Z(U,4),[G],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[G,[U,U,U],Bt],rgba:[G,[U,U,U,U],Bt],has:{type:H,overloads:[[[q],function(t,e){return Ft(e[0].evaluate(t),t.properties())}],[[q,W],function(t,e){var r=e[0],n=e[1];return Ft(r.evaluate(t),n.evaluate(t))}]]},get:{type:Y,overloads:[[[q],function(t,e){return Nt(e[0].evaluate(t),t.properties())}],[[q,W],function(t,e){var r=e[0],n=e[1];return Nt(r.evaluate(t),n.evaluate(t))}]]},properties:[W,[],function(t){return t.properties()}],\\\"geometry-type\\\":[q,[],function(t){return t.geometryType()}],id:[Y,[],function(t){return t.id()}],zoom:[U,[],function(t){return t.globals.zoom}],\\\"heatmap-density\\\":[U,[],function(t){return t.globals.heatmapDensity||0}],\\\"line-progress\\\":[U,[],function(t){return t.globals.lineProgress||0}],\\\"+\\\":[U,Ht(U),function(t,e){for(var r=0,n=0,i=e;n<i.length;n+=1)r+=i[n].evaluate(t);return r}],\\\"*\\\":[U,Ht(U),function(t,e){for(var r=1,n=0,i=e;n<i.length;n+=1)r*=i[n].evaluate(t);return r}],\\\"-\\\":{type:U,overloads:[[[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[U],function(t,e){return-e[0].evaluate(t)}]]},\\\"/\\\":[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],\\\"%\\\":[U,[U,U],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[U,[],function(){return Math.LN2}],pi:[U,[],function(){return Math.PI}],e:[U,[],function(){return Math.E}],\\\"^\\\":[U,[U,U],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[U,[U],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[U,[U],function(t,e){var r=e[0];return Math.log10(r.evaluate(t))}],ln:[U,[U],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[U,[U],function(t,e){var r=e[0];return Math.log2(r.evaluate(t))}],sin:[U,[U],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[U,[U],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[U,[U],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[U,[U],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[U,[U],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[U,[U],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[U,Ht(U),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[U,Ht(U),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[U,[U],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[U,[U],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[U,[U],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[U,[U],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],\\\"filter-==\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],\\\"filter-id-==\\\":[H,[Y],function(t,e){var r=e[0];return t.id()===r.value}],\\\"filter-type-==\\\":[H,[q],function(t,e){var r=e[0];return t.geometryType()===r.value}],\\\"filter-<\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<a}],\\\"filter-id-<\\\":[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<i}],\\\"filter->\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>a}],\\\"filter-id->\\\":[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\\\"filter-<=\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<=a}],\\\"filter-id-<=\\\":[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\\\"filter->=\\\":[H,[q,Y],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>=a}],\\\"filter-id->=\\\":[H,[Y],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\\\"filter-has\\\":[H,[Y],function(t,e){return e[0].value in t.properties()}],\\\"filter-has-id\\\":[H,[],function(t){return null!==t.id()}],\\\"filter-type-in\\\":[H,[Z(q)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\\\"filter-id-in\\\":[H,[Z(Y)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\\\"filter-in-small\\\":[H,[q,Z(Y)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\\\"filter-in-large\\\":[H,[q,Z(Y)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],\\\">\\\":{type:H,overloads:[[[U,U],Vt],[[q,q],Vt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))>0}]]},\\\"<\\\":{type:H,overloads:[[[U,U],jt],[[q,q],jt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))<0}]]},\\\">=\\\":{type:H,overloads:[[[U,U],qt],[[q,q],qt],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))>=0}]]},\\\"<=\\\":{type:H,overloads:[[[U,U],Ut],[[q,q],Ut],[[q,q,X],function(t,e){var r=e[0],n=e[1];return e[2].evaluate(t).compare(r.evaluate(t),n.evaluate(t))<=0}]]},all:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Ht(H),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(!n[r].evaluate(t))return!1;return!0}]]},any:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Ht(H),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(n[r].evaluate(t))return!0;return!1}]]},\\\"!\\\":[H,[H],function(t,e){return!e[0].evaluate(t)}],\\\"is-supported-script\\\":[H,[q],function(t,e){var r=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[q,[q],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[q,[q],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[q,Ht(q),function(t,e){return e.map(function(e){return e.evaluate(t)}).join(\\\"\\\")}],\\\"resolved-locale\\\":[q,[X],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Yt=.95047,Xt=1,Zt=1.08883,$t=4/29,Jt=6/29,Kt=3*Jt*Jt,Qt=Jt*Jt*Jt,te=Math.PI/180,ee=180/Math.PI;function re(t){return t>Qt?Math.pow(t,1/3):t/Kt+$t}function ne(t){return t>Jt?t*t*t:Kt*(t-$t)}function ie(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ae(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function oe(t){var e=ae(t.r),r=ae(t.g),n=ae(t.b),i=re((.4124564*e+.3575761*r+.1804375*n)/Yt),a=re((.2126729*e+.7151522*r+.072175*n)/Xt);return{l:116*a-16,a:500*(i-a),b:200*(a-re((.0193339*e+.119192*r+.9503041*n)/Zt)),alpha:t.a}}function se(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=Xt*ne(e),r=Yt*ne(r),n=Zt*ne(n),new tt(ie(3.2404542*r-1.5371385*e-.4985314*n),ie(-.969266*r+1.8760108*e+.041556*n),ie(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var le={forward:oe,reverse:se,interpolate:function(t,e,r){return{l:wt(t.l,e.l,r),a:wt(t.a,e.a,r),b:wt(t.b,e.b,r),alpha:wt(t.alpha,e.alpha,r)}}},ce={forward:function(t){var e=oe(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*ee;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*te,r=t.c;return se({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:wt(t.c,e.c,r),l:wt(t.l,e.l,r),alpha:wt(t.alpha,e.alpha,r)}}},ue=Object.freeze({lab:le,hcl:ce});function fe(t){return t instanceof Number?\\\"number\\\":t instanceof String?\\\"string\\\":t instanceof Boolean?\\\"boolean\\\":Array.isArray(t)?\\\"array\\\":null===t?\\\"null\\\":typeof t}function he(t){return\\\"object\\\"==typeof t&&null!==t&&!Array.isArray(t)}function pe(t){return t}function de(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function ge(t,e,r,n,i){return de(typeof r===i?n[r]:void 0,t.default,e.default)}function ve(t,e,r){if(\\\"number\\\"!==fe(r))return de(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=xe(t.stops,r);return t.stops[i][1]}function me(t,e,r){var n=void 0!==t.base?t.base:1;if(\\\"number\\\"!==fe(r))return de(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var a=xe(t.stops,r),o=function(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1],c=kt[e.type]||pe;if(t.colorSpace&&\\\"rgb\\\"!==t.colorSpace){var u=ue[t.colorSpace];c=function(t,e){return u.reverse(u.interpolate(u.forward(t),u.forward(e),o))}}return\\\"function\\\"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return c(r,n,o)}}:c(s,l,o)}function ye(t,e,r){return\\\"color\\\"===e.type?r=tt.parse(r):fe(r)===e.type||\\\"enum\\\"===e.type&&e.values[r]||(r=void 0),de(r,t.default,e.default)}function xe(t,e){for(var r,n,i=0,a=t.length-1,o=0;i<=a;){if(r=t[o=Math.floor((i+a)/2)][0],n=t[o+1][0],e===r||e>r&&e<n)return o;r<e?i=o+1:r>e&&(a=o-1)}return Math.max(o-1,0)}var be=function(t,e){var r;this.expression=t,this._warningHistory={},this._defaultValue=\\\"color\\\"===(r=e).type&&he(r.default)?new tt(0,0,0,0):\\\"color\\\"===r.type?tt.parse(r.default)||null:void 0===r.default?null:r.default,\\\"enum\\\"===e.type&&(this._enumValues=e.values)};function _e(t){return Array.isArray(t)&&t.length>0&&\\\"string\\\"==typeof t[0]&&t[0]in Rt}function we(t,e){var r=new xt(Rt,[],function(t){var e={color:G,string:q,number:U,enum:q,boolean:H};return\\\"array\\\"===t.type?Z(e[t.value]||Y,t.length):e[t.type]||null}(e)),n=r.parse(t);return n?Gt(new be(n,e)):Wt(r.errors)}be.prototype.evaluateWithoutErrorHandling=function(t,e){return this._evaluator||(this._evaluator=new dt),this._evaluator.globals=t,this._evaluator.feature=e,this.expression.evaluate(this._evaluator)},be.prototype.evaluate=function(t,e){this._evaluator||(this._evaluator=new dt),this._evaluator.globals=t,this._evaluator.feature=e;try{var r=this.expression.evaluate(this._evaluator);if(null==r)return this._defaultValue;if(this._enumValues&&!(r in this._enumValues))throw new ot(\\\"Expected value to be one of \\\"+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(\\\", \\\")+\\\", but found \\\"+JSON.stringify(r)+\\\" instead.\\\");return r}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\\\"undefined\\\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var ke=function(t,e){this.kind=t,this._styleExpression=e};ke.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},ke.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)};var Me=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,r instanceof Mt&&(this._interpolationType=r.interpolation)};function Ae(t,e){if(\\\"error\\\"===(t=we(t,e)).result)return t;var r=t.value.expression,n=vt(r);if(!n&&!e[\\\"property-function\\\"])return Wt([new N(\\\"\\\",\\\"property expressions not supported\\\")]);var i=mt(r,[\\\"zoom\\\"]);if(!i&&!1===e[\\\"zoom-function\\\"])return Wt([new N(\\\"\\\",\\\"zoom expressions not supported\\\")]);var a=function t(e){var r=null;if(e instanceof St)r=t(e.result);else if(e instanceof Tt)for(var n=0,i=e.args;n<i.length;n+=1){var a=i[n];if(r=t(a))break}else(e instanceof _t||e instanceof Mt)&&e.input instanceof gt&&\\\"zoom\\\"===e.input.name&&(r=e);return r instanceof N?r:(e.eachChild(function(e){var n=t(e);n instanceof N?r=n:!r&&n?r=new N(\\\"\\\",'\\\"zoom\\\" expression may only be used as input to a top-level \\\"step\\\" or \\\"interpolate\\\" expression.'):r&&n&&r!==n&&(r=new N(\\\"\\\",'Only one zoom-based \\\"step\\\" or \\\"interpolate\\\" subexpression may be used in an expression.'))}),r)}(r);return a||i?a instanceof N?Wt([a]):a instanceof Mt&&\\\"piecewise-constant\\\"===e.function?Wt([new N(\\\"\\\",'\\\"interpolate\\\" expressions cannot be used with this property')]):Gt(a?new Me(n?\\\"camera\\\":\\\"composite\\\",t.value,a):new ke(n?\\\"constant\\\":\\\"source\\\",t.value)):Wt([new N(\\\"\\\",'\\\"zoom\\\" expression may only be used as input to a top-level \\\"step\\\" or \\\"interpolate\\\" expression.')])}Me.prototype.evaluateWithoutErrorHandling=function(t,e){return this._styleExpression.evaluateWithoutErrorHandling(t,e)},Me.prototype.evaluate=function(t,e){return this._styleExpression.evaluate(t,e)},Me.prototype.interpolationFactor=function(t,e,r){return this._interpolationType?Mt.interpolationFactor(this._interpolationType,t,e,r):0};var Te=function(t,e){this._parameters=t,this._specification=e,R(this,function t(e,r){var n,i,a,o=\\\"color\\\"===r.type,s=e.stops&&\\\"object\\\"==typeof e.stops[0][0],l=s||void 0!==e.property,c=s||!l,u=e.type||(\\\"interpolated\\\"===r.function?\\\"exponential\\\":\\\"interval\\\");if(o&&((e=R({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],tt.parse(t[1])]})),e.default?e.default=tt.parse(e.default):e.default=tt.parse(r.default)),e.colorSpace&&\\\"rgb\\\"!==e.colorSpace&&!ue[e.colorSpace])throw new Error(\\\"Unknown color space: \\\"+e.colorSpace);if(\\\"exponential\\\"===u)n=me;else if(\\\"interval\\\"===u)n=ve;else if(\\\"categorical\\\"===u){n=ge,i=Object.create(null);for(var f=0,h=e.stops;f<h.length;f+=1){var p=h[f];i[p[0]]=p[1]}a=typeof e.stops[0][0]}else{if(\\\"identity\\\"!==u)throw new Error('Unknown function type \\\"'+u+'\\\"');n=ye}if(s){for(var d={},g=[],v=0;v<e.stops.length;v++){var m=e.stops[v],y=m[0].zoom;void 0===d[y]&&(d[y]={zoom:y,type:e.type,property:e.property,default:e.default,stops:[]},g.push(y)),d[y].stops.push([m[0].value,m[1]])}for(var x=[],b=0,_=g;b<_.length;b+=1){var w=_[b];x.push([d[w].zoom,t(d[w],r)])}return{kind:\\\"composite\\\",interpolationFactor:Mt.interpolationFactor.bind(void 0,{name:\\\"linear\\\"}),zoomStops:x.map(function(t){return t[0]}),evaluate:function(t,n){var i=t.zoom;return me({stops:x,base:e.base},r,i).evaluate(i,n)}}}return c?{kind:\\\"camera\\\",interpolationFactor:\\\"exponential\\\"===u?Mt.interpolationFactor.bind(void 0,{name:\\\"exponential\\\",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var o=t.zoom;return n(e,r,o,i,a)}}:{kind:\\\"source\\\",evaluate:function(t,o){var s=o&&o.properties?o.properties[e.property]:void 0;return void 0===s?de(e.default,r.default):n(e,r,s,i,a)}}}(this._parameters,this._specification))};function Se(t,e){if(he(t))return new Te(t,e);if(_e(t)){var r=Ae(t,e);if(\\\"error\\\"===r.result)throw new Error(r.value.map(function(t){return t.key+\\\": \\\"+t.message}).join(\\\", \\\"));return r.value}var n=t;return\\\"string\\\"==typeof t&&\\\"color\\\"===e.type&&(n=tt.parse(t)),{kind:\\\"constant\\\",evaluate:function(){return n}}}function Ce(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},a=t.style,o=t.styleSpec,s=[],l=fe(r);if(\\\"object\\\"!==l)return[new P(e,r,\\\"object expected, \\\"+l+\\\" found\\\")];for(var c in r){var u=c.split(\\\".\\\")[0],f=n[u]||n[\\\"*\\\"],h=void 0;if(i[u])h=i[u];else if(n[u])h=Ke;else if(i[\\\"*\\\"])h=i[\\\"*\\\"];else{if(!n[\\\"*\\\"]){s.push(new P(e,r[c],'unknown property \\\"'+c+'\\\"'));continue}h=Ke}s=s.concat(h({key:(e?e+\\\".\\\":e)+c,value:r[c],valueSpec:f,style:a,styleSpec:o,object:r,objectKey:c},r))}for(var p in n)i[p]||n[p].required&&void 0===n[p].default&&void 0===r[p]&&s.push(new P(e,r,'missing required property \\\"'+p+'\\\"'));return s}function Ee(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,a=t.key,o=t.arrayElementValidator||Ke;if(\\\"array\\\"!==fe(e))return[new P(a,e,\\\"array expected, \\\"+fe(e)+\\\" found\\\")];if(r.length&&e.length!==r.length)return[new P(a,e,\\\"array length \\\"+r.length+\\\" expected, length \\\"+e.length+\\\" found\\\")];if(r[\\\"min-length\\\"]&&e.length<r[\\\"min-length\\\"])return[new P(a,e,\\\"array length at least \\\"+r[\\\"min-length\\\"]+\\\" expected, length \\\"+e.length+\\\" found\\\")];var s={type:r.value};i.$version<7&&(s.function=r.function),\\\"object\\\"===fe(r.value)&&(s=r.value);for(var l=[],c=0;c<e.length;c++)l=l.concat(o({array:e,arrayIndex:c,value:e[c],valueSpec:s,style:n,styleSpec:i,key:a+\\\"[\\\"+c+\\\"]\\\"}));return l}function Le(t){var e=t.key,r=t.value,n=t.valueSpec,i=fe(r);return\\\"number\\\"!==i?[new P(e,r,\\\"number expected, \\\"+i+\\\" found\\\")]:\\\"minimum\\\"in n&&r<n.minimum?[new P(e,r,r+\\\" is less than the minimum value \\\"+n.minimum)]:\\\"maximum\\\"in n&&r>n.maximum?[new P(e,r,r+\\\" is greater than the maximum value \\\"+n.maximum)]:[]}function ze(t){var e,r,n,i=t.valueSpec,a=B(t.value.type),o={},s=\\\"categorical\\\"!==a&&void 0===t.value.property,l=!s,c=\\\"array\\\"===fe(t.value.stops)&&\\\"array\\\"===fe(t.value.stops[0])&&\\\"object\\\"===fe(t.value.stops[0][0]),u=Ce({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if(\\\"identity\\\"===a)return[new P(t.key,t.value,'identity function may not have a \\\"stops\\\" property')];var e=[],r=t.value;return e=e.concat(Ee({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),\\\"array\\\"===fe(r)&&0===r.length&&e.push(new P(t.key,r,\\\"array must have at least one stop\\\")),e},default:function(t){return Ke({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\\\"identity\\\"===a&&s&&u.push(new P(t.key,t.value,'missing required property \\\"property\\\"')),\\\"identity\\\"===a||t.value.stops||u.push(new P(t.key,t.value,'missing required property \\\"stops\\\"')),\\\"exponential\\\"===a&&\\\"piecewise-constant\\\"===t.valueSpec.function&&u.push(new P(t.key,t.value,\\\"exponential functions not supported\\\")),t.styleSpec.$version>=8&&(l&&!t.valueSpec[\\\"property-function\\\"]?u.push(new P(t.key,t.value,\\\"property functions not supported\\\")):s&&!t.valueSpec[\\\"zoom-function\\\"]&&\\\"heatmap-color\\\"!==t.objectKey&&\\\"line-gradient\\\"!==t.objectKey&&u.push(new P(t.key,t.value,\\\"zoom functions not supported\\\"))),\\\"categorical\\\"!==a&&!c||void 0!==t.value.property||u.push(new P(t.key,t.value,'\\\"property\\\" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if(\\\"array\\\"!==fe(a))return[new P(s,a,\\\"array expected, \\\"+fe(a)+\\\" found\\\")];if(2!==a.length)return[new P(s,a,\\\"array length 2 expected, length \\\"+a.length+\\\" found\\\")];if(c){if(\\\"object\\\"!==fe(a[0]))return[new P(s,a,\\\"object expected, \\\"+fe(a[0])+\\\" found\\\")];if(void 0===a[0].zoom)return[new P(s,a,\\\"object stop key must have zoom\\\")];if(void 0===a[0].value)return[new P(s,a,\\\"object stop key must have value\\\")];if(n&&n>B(a[0].zoom))return[new P(s,a[0].zoom,\\\"stop zoom values must appear in ascending order\\\")];B(a[0].zoom)!==n&&(n=B(a[0].zoom),r=void 0,o={}),e=e.concat(Ce({key:s+\\\"[0]\\\",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Le,value:h}}))}else e=e.concat(h({key:s+\\\"[0]\\\",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return e.concat(Ke({key:s+\\\"[1]\\\",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=fe(t.value),l=B(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new P(t.key,c,s+\\\" stop domain type must match previous stop domain type \\\"+e)]}else e=s;if(\\\"number\\\"!==s&&\\\"string\\\"!==s&&\\\"boolean\\\"!==s)return[new P(t.key,c,\\\"stop domain value must be a number, string, or boolean\\\")];if(\\\"number\\\"!==s&&\\\"categorical\\\"!==a){var u=\\\"number expected, \\\"+s+\\\" found\\\";return i[\\\"property-function\\\"]&&void 0===a&&(u+='\\\\nIf you intended to use a categorical function, specify `\\\"type\\\": \\\"categorical\\\"`.'),[new P(t.key,c,u)]}return\\\"categorical\\\"!==a||\\\"number\\\"!==s||isFinite(l)&&Math.floor(l)===l?\\\"categorical\\\"!==a&&\\\"number\\\"===s&&void 0!==r&&l<r?[new P(t.key,c,\\\"stop domain values must appear in ascending order\\\")]:(r=l,\\\"categorical\\\"===a&&l in o?[new P(t.key,c,\\\"stop domain values must be unique\\\")]:(o[l]=!0,[])):[new P(t.key,c,\\\"integer expected, found \\\"+l)]}}function Oe(t){var e=(\\\"property\\\"===t.expressionContext?Ae:we)(F(t.value),t.valueSpec);return\\\"error\\\"===e.result?e.value.map(function(e){return new P(\\\"\\\"+t.key+e.key,t.value,e.message)}):\\\"property\\\"===t.expressionContext&&\\\"text-font\\\"===t.propertyKey&&-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new P(t.key,t.value,'Invalid data expression for \\\"text-font\\\". Output values must be contained as literals within the expression.')]:[]}function Ie(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(B(r))&&i.push(new P(e,r,\\\"expected one of [\\\"+n.values.join(\\\", \\\")+\\\"], \\\"+JSON.stringify(r)+\\\" found\\\")):-1===Object.keys(n.values).indexOf(B(r))&&i.push(new P(e,r,\\\"expected one of [\\\"+Object.keys(n.values).join(\\\", \\\")+\\\"], \\\"+JSON.stringify(r)+\\\" found\\\")),i}function Pe(t){if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case\\\"has\\\":return t.length>=2&&\\\"$id\\\"!==t[1]&&\\\"$type\\\"!==t[1];case\\\"in\\\":case\\\"!in\\\":case\\\"!has\\\":case\\\"none\\\":return!1;case\\\"==\\\":case\\\"!=\\\":case\\\">\\\":case\\\">=\\\":case\\\"<\\\":case\\\"<=\\\":return 3===t.length&&(Array.isArray(t[1])||Array.isArray(t[2]));case\\\"any\\\":case\\\"all\\\":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!Pe(n)&&\\\"boolean\\\"!=typeof n)return!1}return!0;default:return!0}}Te.deserialize=function(t){return new Te(t._parameters,t._specification)},Te.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var De={type:\\\"boolean\\\",default:!1,function:!0,\\\"property-function\\\":!0,\\\"zoom-function\\\":!0};function Re(t){if(!t)return function(){return!0};Pe(t)||(t=Fe(t));var e=we(t,De);if(\\\"error\\\"===e.result)throw new Error(e.value.map(function(t){return t.key+\\\": \\\"+t.message}).join(\\\", \\\"));return function(t,r){return e.value.evaluate(t,r)}}function Be(t,e){return t<e?-1:t>e?1:0}function Fe(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\\\"any\\\"!==r:\\\"==\\\"===r?Ne(t[1],t[2],\\\"==\\\"):\\\"!=\\\"===r?Ue(Ne(t[1],t[2],\\\"==\\\")):\\\"<\\\"===r||\\\">\\\"===r||\\\"<=\\\"===r||\\\">=\\\"===r?Ne(t[1],t[2],r):\\\"any\\\"===r?(e=t.slice(1),[\\\"any\\\"].concat(e.map(Fe))):\\\"all\\\"===r?[\\\"all\\\"].concat(t.slice(1).map(Fe)):\\\"none\\\"===r?[\\\"all\\\"].concat(t.slice(1).map(Fe).map(Ue)):\\\"in\\\"===r?je(t[1],t.slice(2)):\\\"!in\\\"===r?Ue(je(t[1],t.slice(2))):\\\"has\\\"===r?Ve(t[1]):\\\"!has\\\"!==r||Ue(Ve(t[1]))}function Ne(t,e,r){switch(t){case\\\"$type\\\":return[\\\"filter-type-\\\"+r,e];case\\\"$id\\\":return[\\\"filter-id-\\\"+r,e];default:return[\\\"filter-\\\"+r,t,e]}}function je(t,e){if(0===e.length)return!1;switch(t){case\\\"$type\\\":return[\\\"filter-type-in\\\",[\\\"literal\\\",e]];case\\\"$id\\\":return[\\\"filter-id-in\\\",[\\\"literal\\\",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?[\\\"filter-in-large\\\",t,[\\\"literal\\\",e.sort(Be)]]:[\\\"filter-in-small\\\",t,[\\\"literal\\\",e]]}}function Ve(t){switch(t){case\\\"$type\\\":return!0;case\\\"$id\\\":return[\\\"filter-has-id\\\"];default:return[\\\"filter-has\\\",t]}}function Ue(t){return[\\\"!\\\",t]}function qe(t){return Pe(F(t.value))?Oe(R({},t,{expressionContext:\\\"filter\\\",valueSpec:{value:\\\"boolean\\\"}})):function t(e){var r=e.value,n=e.key;if(\\\"array\\\"!==fe(r))return[new P(n,r,\\\"array expected, \\\"+fe(r)+\\\" found\\\")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new P(n,r,\\\"filter array must have at least 1 element\\\")];switch(o=o.concat(Ie({key:n+\\\"[0]\\\",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),B(r[0])){case\\\"<\\\":case\\\"<=\\\":case\\\">\\\":case\\\">=\\\":r.length>=2&&\\\"$type\\\"===B(r[1])&&o.push(new P(n,r,'\\\"$type\\\" cannot be use with operator \\\"'+r[0]+'\\\"'));case\\\"==\\\":case\\\"!=\\\":3!==r.length&&o.push(new P(n,r,'filter array for operator \\\"'+r[0]+'\\\" must have 3 elements'));case\\\"in\\\":case\\\"!in\\\":r.length>=2&&\\\"string\\\"!==(i=fe(r[1]))&&o.push(new P(n+\\\"[1]\\\",r[1],\\\"string expected, \\\"+i+\\\" found\\\"));for(var s=2;s<r.length;s++)i=fe(r[s]),\\\"$type\\\"===B(r[1])?o=o.concat(Ie({key:n+\\\"[\\\"+s+\\\"]\\\",value:r[s],valueSpec:a.geometry_type,style:e.style,styleSpec:e.styleSpec})):\\\"string\\\"!==i&&\\\"number\\\"!==i&&\\\"boolean\\\"!==i&&o.push(new P(n+\\\"[\\\"+s+\\\"]\\\",r[s],\\\"string, number, or boolean expected, \\\"+i+\\\" found\\\"));break;case\\\"any\\\":case\\\"all\\\":case\\\"none\\\":for(var l=1;l<r.length;l++)o=o.concat(t({key:n+\\\"[\\\"+l+\\\"]\\\",value:r[l],style:e.style,styleSpec:e.styleSpec}));break;case\\\"has\\\":case\\\"!has\\\":i=fe(r[1]),2!==r.length?o.push(new P(n,r,'filter array for \\\"'+r[0]+'\\\" operator must have 2 elements')):\\\"string\\\"!==i&&o.push(new P(n+\\\"[1]\\\",r[1],\\\"string expected, \\\"+i+\\\" found\\\"))}return o}(t)}function He(t,e){var r=t.key,n=t.style,i=t.styleSpec,a=t.value,o=t.objectKey,s=i[e+\\\"_\\\"+t.layerType];if(!s)return[];var l=o.match(/^(.*)-transition$/);if(\\\"paint\\\"===e&&l&&s[l[1]]&&s[l[1]].transition)return Ke({key:r,value:a,valueSpec:i.transition,style:n,styleSpec:i});var c,u=t.valueSpec||s[o];if(!u)return[new P(r,a,'unknown property \\\"'+o+'\\\"')];if(\\\"string\\\"===fe(a)&&u[\\\"property-function\\\"]&&!u.tokens&&(c=/^{([^}]+)}$/.exec(a)))return[new P(r,a,'\\\"'+o+'\\\" does not support interpolation syntax\\\\nUse an identity property function instead: `{ \\\"type\\\": \\\"identity\\\", \\\"property\\\": '+JSON.stringify(c[1])+\\\" }`.\\\")];var f=[];return\\\"symbol\\\"===t.layerType&&(\\\"text-field\\\"===o&&n&&!n.glyphs&&f.push(new P(r,a,'use of \\\"text-field\\\" requires a style \\\"glyphs\\\" property')),\\\"text-font\\\"===o&&he(F(a))&&\\\"identity\\\"===B(a.type)&&f.push(new P(r,a,'\\\"text-font\\\" does not support identity functions'))),f.concat(Ke({key:t.key,value:a,valueSpec:u,style:n,styleSpec:i,expressionContext:\\\"property\\\",propertyKey:o}))}function Ge(t){return He(t,\\\"paint\\\")}function We(t){return He(t,\\\"layout\\\")}function Ye(t){var e=[],r=t.value,n=t.key,i=t.style,a=t.styleSpec;r.type||r.ref||e.push(new P(n,r,'either \\\"type\\\" or \\\"ref\\\" is required'));var o,s=B(r.type),l=B(r.ref);if(r.id)for(var c=B(r.id),u=0;u<t.arrayIndex;u++){var f=i.layers[u];B(f.id)===c&&e.push(new P(n,r.id,'duplicate layer id \\\"'+r.id+'\\\", previously used at line '+f.id.__line__))}if(\\\"ref\\\"in r)[\\\"type\\\",\\\"source\\\",\\\"source-layer\\\",\\\"filter\\\",\\\"layout\\\"].forEach(function(t){t in r&&e.push(new P(n,r[t],'\\\"'+t+'\\\" is prohibited for ref layers'))}),i.layers.forEach(function(t){B(t.id)===l&&(o=t)}),o?o.ref?e.push(new P(n,r.ref,\\\"ref cannot reference another ref layer\\\")):s=B(o.type):e.push(new P(n,r.ref,'ref layer \\\"'+l+'\\\" not found'));else if(\\\"background\\\"!==s)if(r.source){var h=i.sources&&i.sources[r.source],p=h&&B(h.type);h?\\\"vector\\\"===p&&\\\"raster\\\"===s?e.push(new P(n,r.source,'layer \\\"'+r.id+'\\\" requires a raster source')):\\\"raster\\\"===p&&\\\"raster\\\"!==s?e.push(new P(n,r.source,'layer \\\"'+r.id+'\\\" requires a vector source')):\\\"vector\\\"!==p||r[\\\"source-layer\\\"]?\\\"raster-dem\\\"===p&&\\\"hillshade\\\"!==s?e.push(new P(n,r.source,\\\"raster-dem source can only be used with layer type 'hillshade'.\\\")):\\\"line\\\"!==s||!r.paint||!r.paint[\\\"line-gradient\\\"]||\\\"geojson\\\"===p&&h.lineMetrics||e.push(new P(n,r,'layer \\\"'+r.id+'\\\" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new P(n,r,'layer \\\"'+r.id+'\\\" must specify a \\\"source-layer\\\"')):e.push(new P(n,r.source,'source \\\"'+r.source+'\\\" not found'))}else e.push(new P(n,r,'missing required property \\\"source\\\"'));return e=e.concat(Ce({key:n,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\\\"*\\\":function(){return[]},type:function(){return Ke({key:n+\\\".type\\\",value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:\\\"type\\\"})},filter:qe,layout:function(t){return Ce({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\\\"*\\\":function(t){return We(R({layerType:s},t))}}})},paint:function(t){return Ce({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\\\"*\\\":function(t){return Ge(R({layerType:s},t))}}})}}}))}function Xe(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new P(r,e,'\\\"type\\\" is required')];var a=B(e.type),o=[];switch(a){case\\\"vector\\\":case\\\"raster\\\":case\\\"raster-dem\\\":if(o=o.concat(Ce({key:r,value:e,valueSpec:n[\\\"source_\\\"+a.replace(\\\"-\\\",\\\"_\\\")],style:t.style,styleSpec:n})),\\\"url\\\"in e)for(var s in e)[\\\"type\\\",\\\"url\\\",\\\"tileSize\\\"].indexOf(s)<0&&o.push(new P(r+\\\".\\\"+s,e[s],'a source with a \\\"url\\\" property may not include a \\\"'+s+'\\\" property'));return o;case\\\"geojson\\\":return Ce({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n});case\\\"video\\\":return Ce({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case\\\"image\\\":return Ce({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case\\\"canvas\\\":return o.push(new P(r,null,\\\"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.\\\",\\\"source.canvas\\\")),o;default:return Ie({key:r+\\\".type\\\",value:e.type,valueSpec:{values:[\\\"vector\\\",\\\"raster\\\",\\\"raster-dem\\\",\\\"geojson\\\",\\\"video\\\",\\\"image\\\"]},style:i,styleSpec:n})}}function Ze(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,a=[],o=fe(e);if(void 0===e)return a;if(\\\"object\\\"!==o)return a.concat([new P(\\\"light\\\",e,\\\"object expected, \\\"+o+\\\" found\\\")]);for(var s in e){var l=s.match(/^(.*)-transition$/);a=l&&n[l[1]]&&n[l[1]].transition?a.concat(Ke({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?a.concat(Ke({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):a.concat([new P(s,e[s],'unknown property \\\"'+s+'\\\"')])}return a}function $e(t){var e=t.value,r=t.key,n=fe(e);return\\\"string\\\"!==n?[new P(r,e,\\\"string expected, \\\"+n+\\\" found\\\")]:[]}var Je={\\\"*\\\":function(){return[]},array:Ee,boolean:function(t){var e=t.value,r=t.key,n=fe(e);return\\\"boolean\\\"!==n?[new P(r,e,\\\"boolean expected, \\\"+n+\\\" found\\\")]:[]},number:Le,color:function(t){var e=t.key,r=t.value,n=fe(r);return\\\"string\\\"!==n?[new P(e,r,\\\"color expected, \\\"+n+\\\" found\\\")]:null===Q(r)?[new P(e,r,'color expected, \\\"'+r+'\\\" found')]:[]},constants:D,enum:Ie,filter:qe,function:ze,layer:Ye,object:Ce,source:Xe,light:Ze,string:$e};function Ke(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.function&&he(B(e))?ze(t):r.function&&_e(F(e))?Oe(t):r.type&&Je[r.type]?Je[r.type](t):Ce(R({},t,{valueSpec:r.type?n[r.type]:r}))}function Qe(t){var e=t.value,r=t.key,n=$e(t);return n.length?n:(-1===e.indexOf(\\\"{fontstack}\\\")&&n.push(new P(r,e,'\\\"glyphs\\\" url must include a \\\"{fontstack}\\\" token')),-1===e.indexOf(\\\"{range}\\\")&&n.push(new P(r,e,'\\\"glyphs\\\" url must include a \\\"{range}\\\" token')),n)}function tr(t,e){e=e||I;var r=[];return r=r.concat(Ke({key:\\\"\\\",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Qe,\\\"*\\\":function(){return[]}}})),t.constants&&(r=r.concat(D({key:\\\"constants\\\",value:t.constants,style:t,styleSpec:e}))),er(r)}function er(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function rr(t){return function(){return er(t.apply(this,arguments))}}tr.source=rr(Xe),tr.light=rr(Ze),tr.layer=rr(Ye),tr.filter=rr(qe),tr.paintProperty=rr(Ge),tr.layoutProperty=rr(We);var nr=tr,ir=tr.light,ar=tr.paintProperty,or=tr.layoutProperty;function sr(t,e){var r=!1;if(e&&e.length)for(var n=0,i=e;n<i.length;n+=1){var a=i[n];t.fire(new z(new Error(a.message))),r=!0}return r}var lr=ur,cr=3;function ur(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var a=0;a<this.d*this.d;a++){var o=i[cr+a],s=i[cr+a+1];n.push(o===s?null:i.subarray(o,s))}var l=i[cr+n.length],c=i[cr+n.length+1];this.keys=i.subarray(l,c),this.bboxes=i.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var u=0;u<this.d*this.d;u++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var f=r/e*t;this.min=-f,this.max=t+f}ur.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},ur.prototype._insertReadonly=function(){throw\\\"Cannot insert into a GridIndex created from an ArrayBuffer.\\\"},ur.prototype._insertCell=function(t,e,r,n,i,a){this.cells[i].push(a)},ur.prototype.query=function(t,e,r,n){var i=this.min,a=this.max;if(t<=i&&e<=i&&a<=r&&a<=n)return Array.prototype.slice.call(this.keys);var o=[];return this._forEachCell(t,e,r,n,this._queryCell,o,{}),o},ur.prototype._queryCell=function(t,e,r,n,i,a,o){var s=this.cells[i];if(null!==s)for(var l=this.keys,c=this.bboxes,u=0;u<s.length;u++){var f=s[u];if(void 0===o[f]){var h=4*f;t<=c[h+2]&&e<=c[h+3]&&r>=c[h+0]&&n>=c[h+1]?(o[f]=!0,a.push(l[f])):o[f]=!1}}},ur.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(r),u=this._convertToCellCoord(n),f=s;f<=c;f++)for(var h=l;h<=u;h++){var p=this.d*h+f;if(i.call(this,t,e,r,n,p,a,o))return}},ur.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ur.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=cr+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var a=e,o=0;o<t.length;o++){var s=t[o];i[cr+o]=a,i.set(s,a),a+=s.length}return i[cr+t.length]=a,i.set(this.keys,a),a+=this.keys.length,i[cr+t.length+1]=a,i.set(this.bboxes,a),a+=this.bboxes.length,i.buffer};var fr=self.ImageData,hr={};function pr(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,\\\"_classRegistryKey\\\",{value:t,writeable:!1}),hr[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var dr in pr(\\\"Object\\\",Object),lr.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),r},lr.deserialize=function(t){return new lr(t)},pr(\\\"Grid\\\",lr),pr(\\\"Color\\\",tt),pr(\\\"Error\\\",Error),pr(\\\"StylePropertyFunction\\\",Te),pr(\\\"StyleExpression\\\",be,{omit:[\\\"_evaluator\\\"]}),pr(\\\"ZoomDependentExpression\\\",Me),pr(\\\"ZoomConstantExpression\\\",ke),pr(\\\"CompoundExpression\\\",gt,{omit:[\\\"_evaluate\\\"]}),Rt)Rt[dr]._classRegistryKey||pr(\\\"Expression_\\\"+dr,Rt[dr]);function gr(t,e){if(null==t||\\\"boolean\\\"==typeof t||\\\"number\\\"==typeof t||\\\"string\\\"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof fr)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,a=t;i<a.length;i+=1){var o=a[i];n.push(gr(o,e))}return n}if(\\\"object\\\"==typeof t){var s=t.constructor,l=s._classRegistryKey;if(!l)throw new Error(\\\"can't serialize object of unregistered class\\\");var c={};if(s.serialize)c._serialized=s.serialize(t,e);else{for(var u in t)if(t.hasOwnProperty(u)&&!(hr[l].omit.indexOf(u)>=0)){var f=t[u];c[u]=hr[l].shallow.indexOf(u)>=0?f:gr(f,e)}t instanceof Error&&(c.message=t.message)}return{name:l,properties:c}}throw new Error(\\\"can't serialize object of type \\\"+typeof t)}function vr(t){if(null==t||\\\"boolean\\\"==typeof t||\\\"number\\\"==typeof t||\\\"string\\\"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof fr)return t;if(Array.isArray(t))return t.map(function(t){return vr(t)});if(\\\"object\\\"==typeof t){var e=t,r=e.name,n=e.properties;if(!r)throw new Error(\\\"can't deserialize object of anonymous class\\\");var i=hr[r].klass;if(!i)throw new Error(\\\"can't deserialize unregistered class \\\"+r);if(i.deserialize)return i.deserialize(n._serialized);for(var a=Object.create(i.prototype),o=0,s=Object.keys(n);o<s.length;o+=1){var l=s[o];a[l]=hr[r].shallow.indexOf(l)>=0?n[l]:vr(n[l])}return a}throw new Error(\\\"can't deserialize object of type \\\"+typeof t)}var mr=function(){this.first=!0};mr.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var yr={\\\"Latin-1 Supplement\\\":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},\\\"Arabic Supplement\\\":function(t){return t>=1872&&t<=1919},\\\"Arabic Extended-A\\\":function(t){return t>=2208&&t<=2303},\\\"Hangul Jamo\\\":function(t){return t>=4352&&t<=4607},\\\"Unified Canadian Aboriginal Syllabics\\\":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},\\\"Unified Canadian Aboriginal Syllabics Extended\\\":function(t){return t>=6320&&t<=6399},\\\"General Punctuation\\\":function(t){return t>=8192&&t<=8303},\\\"Letterlike Symbols\\\":function(t){return t>=8448&&t<=8527},\\\"Number Forms\\\":function(t){return t>=8528&&t<=8591},\\\"Miscellaneous Technical\\\":function(t){return t>=8960&&t<=9215},\\\"Control Pictures\\\":function(t){return t>=9216&&t<=9279},\\\"Optical Character Recognition\\\":function(t){return t>=9280&&t<=9311},\\\"Enclosed Alphanumerics\\\":function(t){return t>=9312&&t<=9471},\\\"Geometric Shapes\\\":function(t){return t>=9632&&t<=9727},\\\"Miscellaneous Symbols\\\":function(t){return t>=9728&&t<=9983},\\\"Miscellaneous Symbols and Arrows\\\":function(t){return t>=11008&&t<=11263},\\\"CJK Radicals Supplement\\\":function(t){return t>=11904&&t<=12031},\\\"Kangxi Radicals\\\":function(t){return t>=12032&&t<=12255},\\\"Ideographic Description Characters\\\":function(t){return t>=12272&&t<=12287},\\\"CJK Symbols and Punctuation\\\":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},\\\"Hangul Compatibility Jamo\\\":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},\\\"Bopomofo Extended\\\":function(t){return t>=12704&&t<=12735},\\\"CJK Strokes\\\":function(t){return t>=12736&&t<=12783},\\\"Katakana Phonetic Extensions\\\":function(t){return t>=12784&&t<=12799},\\\"Enclosed CJK Letters and Months\\\":function(t){return t>=12800&&t<=13055},\\\"CJK Compatibility\\\":function(t){return t>=13056&&t<=13311},\\\"CJK Unified Ideographs Extension A\\\":function(t){return t>=13312&&t<=19903},\\\"Yijing Hexagram Symbols\\\":function(t){return t>=19904&&t<=19967},\\\"CJK Unified Ideographs\\\":function(t){return t>=19968&&t<=40959},\\\"Yi Syllables\\\":function(t){return t>=40960&&t<=42127},\\\"Yi Radicals\\\":function(t){return t>=42128&&t<=42191},\\\"Hangul Jamo Extended-A\\\":function(t){return t>=43360&&t<=43391},\\\"Hangul Syllables\\\":function(t){return t>=44032&&t<=55215},\\\"Hangul Jamo Extended-B\\\":function(t){return t>=55216&&t<=55295},\\\"Private Use Area\\\":function(t){return t>=57344&&t<=63743},\\\"CJK Compatibility Ideographs\\\":function(t){return t>=63744&&t<=64255},\\\"Arabic Presentation Forms-A\\\":function(t){return t>=64336&&t<=65023},\\\"Vertical Forms\\\":function(t){return t>=65040&&t<=65055},\\\"CJK Compatibility Forms\\\":function(t){return t>=65072&&t<=65103},\\\"Small Form Variants\\\":function(t){return t>=65104&&t<=65135},\\\"Arabic Presentation Forms-B\\\":function(t){return t>=65136&&t<=65279},\\\"Halfwidth and Fullwidth Forms\\\":function(t){return t>=65280&&t<=65519}};function xr(t){for(var e=0,r=t;e<r.length;e+=1)if(_r(r[e].charCodeAt(0)))return!0;return!1}function br(t){return!(yr.Arabic(t)||yr[\\\"Arabic Supplement\\\"](t)||yr[\\\"Arabic Extended-A\\\"](t)||yr[\\\"Arabic Presentation Forms-A\\\"](t)||yr[\\\"Arabic Presentation Forms-B\\\"](t))}function _r(t){return!!(746===t||747===t||!(t<4352)&&(yr[\\\"Bopomofo Extended\\\"](t)||yr.Bopomofo(t)||yr[\\\"CJK Compatibility Forms\\\"](t)&&!(t>=65097&&t<=65103)||yr[\\\"CJK Compatibility Ideographs\\\"](t)||yr[\\\"CJK Compatibility\\\"](t)||yr[\\\"CJK Radicals Supplement\\\"](t)||yr[\\\"CJK Strokes\\\"](t)||!(!yr[\\\"CJK Symbols and Punctuation\\\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||yr[\\\"CJK Unified Ideographs Extension A\\\"](t)||yr[\\\"CJK Unified Ideographs\\\"](t)||yr[\\\"Enclosed CJK Letters and Months\\\"](t)||yr[\\\"Hangul Compatibility Jamo\\\"](t)||yr[\\\"Hangul Jamo Extended-A\\\"](t)||yr[\\\"Hangul Jamo Extended-B\\\"](t)||yr[\\\"Hangul Jamo\\\"](t)||yr[\\\"Hangul Syllables\\\"](t)||yr.Hiragana(t)||yr[\\\"Ideographic Description Characters\\\"](t)||yr.Kanbun(t)||yr[\\\"Kangxi Radicals\\\"](t)||yr[\\\"Katakana Phonetic Extensions\\\"](t)||yr.Katakana(t)&&12540!==t||!(!yr[\\\"Halfwidth and Fullwidth Forms\\\"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!yr[\\\"Small Form Variants\\\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||yr[\\\"Unified Canadian Aboriginal Syllabics\\\"](t)||yr[\\\"Unified Canadian Aboriginal Syllabics Extended\\\"](t)||yr[\\\"Vertical Forms\\\"](t)||yr[\\\"Yijing Hexagram Symbols\\\"](t)||yr[\\\"Yi Syllables\\\"](t)||yr[\\\"Yi Radicals\\\"](t)))}function wr(t){return!(_r(t)||function(t){return!!(yr[\\\"Latin-1 Supplement\\\"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||yr[\\\"General Punctuation\\\"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||yr[\\\"Letterlike Symbols\\\"](t)||yr[\\\"Number Forms\\\"](t)||yr[\\\"Miscellaneous Technical\\\"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||yr[\\\"Control Pictures\\\"](t)&&9251!==t||yr[\\\"Optical Character Recognition\\\"](t)||yr[\\\"Enclosed Alphanumerics\\\"](t)||yr[\\\"Geometric Shapes\\\"](t)||yr[\\\"Miscellaneous Symbols\\\"](t)&&!(t>=9754&&t<=9759)||yr[\\\"Miscellaneous Symbols and Arrows\\\"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||yr[\\\"CJK Symbols and Punctuation\\\"](t)||yr.Katakana(t)||yr[\\\"Private Use Area\\\"](t)||yr[\\\"CJK Compatibility Forms\\\"](t)||yr[\\\"Small Form Variants\\\"](t)||yr[\\\"Halfwidth and Fullwidth Forms\\\"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function kr(t,e){return!(!e&&(t>=1424&&t<=2303||yr[\\\"Arabic Presentation Forms-A\\\"](t)||yr[\\\"Arabic Presentation Forms-B\\\"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||yr.Khmer(t))}var Mr,Ar=!1,Tr=null,Sr=!1,Cr=new O,Er={applyArabicShaping:null,processBidirectionalText:null,isLoaded:function(){return Sr||null!=Er.applyArabicShaping}},Lr=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new mr,this.transition={})};Lr.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;r<n.length;r+=1)if(!kr(n[r].charCodeAt(0),e))return!1;return!0}(t,Er.isLoaded())},Lr.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)};var zr=function(t,e){this.property=t,this.value=e,this.expression=Se(void 0===e?t.specification.default:e,t.specification)};zr.prototype.isDataDriven=function(){return\\\"source\\\"===this.expression.kind||\\\"composite\\\"===this.expression.kind},zr.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Or=function(t){this.property=t,this.value=new zr(t,void 0)};Or.prototype.transitioned=function(t,e){return new Pr(this.property,this.value,e,p({},t.transition,this.transition),t.now)},Or.prototype.untransitioned=function(){return new Pr(this.property,this.value,null,{},0)};var Ir=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Ir.prototype.getValue=function(t){return x(this._values[t].value.value)},Ir.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Or(this._values[t].property)),this._values[t].value=new zr(this._values[t].property,null===e?void 0:x(e))},Ir.prototype.getTransition=function(t){return x(this._values[t].transition)},Ir.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Or(this._values[t].property)),this._values[t].transition=x(e)||void 0},Ir.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i);var a=this.getTransition(n);void 0!==a&&(t[n+\\\"-transition\\\"]=a)}return t},Ir.prototype.transitioned=function(t,e){for(var r=new Dr(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var a=i[n];r._values[a]=this._values[a].transitioned(t,e._values[a])}return r},Ir.prototype.untransitioned=function(){for(var t=new Dr(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e];t._values[n]=this._values[n].untransitioned()}return t};var Pr=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r)};Pr.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),n=this.prior;if(n){if(e>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e<this.begin)return n.possiblyEvaluate(t);var i=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(t),r,function(t){if(i<=0)return 0;if(i>=1)return 1;var e=i*i,r=e*i;return 4*(i<.5?r:3*(i-e)+r-.75)}())}return r};var Dr=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Dr.prototype.possiblyEvaluate=function(t){for(var e=new Fr(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e},Dr.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Rr=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Rr.prototype.getValue=function(t){return x(this._values[t].value)},Rr.prototype.setValue=function(t,e){this._values[t]=new zr(this._values[t].property,null===e?void 0:x(e))},Rr.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i)}return t},Rr.prototype.possiblyEvaluate=function(t){for(var e=new Fr(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var i=n[r];e._values[i]=this._values[i].possiblyEvaluate(t)}return e};var Br=function(t,e,r){this.property=t,this.value=e,this.globals=r};Br.prototype.isConstant=function(){return\\\"constant\\\"===this.value.kind},Br.prototype.constantOr=function(t){return\\\"constant\\\"===this.value.kind?this.value.value:t},Br.prototype.evaluate=function(t){return this.property.evaluate(this.value,this.globals,t)};var Fr=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Fr.prototype.get=function(t){return this._values[t]};var Nr=function(t){this.specification=t};Nr.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Nr.prototype.interpolate=function(t,e,r){var n=kt[this.specification.type];return n?n(t,e,r):t};var jr=function(t){this.specification=t};jr.prototype.possiblyEvaluate=function(t,e){return\\\"constant\\\"===t.expression.kind||\\\"camera\\\"===t.expression.kind?new Br(this,{kind:\\\"constant\\\",value:t.expression.evaluate(e)},e):new Br(this,t.expression,e)},jr.prototype.interpolate=function(t,e,r){if(\\\"constant\\\"!==t.value.kind||\\\"constant\\\"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Br(this,{kind:\\\"constant\\\",value:void 0},t.globals);var n=kt[this.specification.type];return n?new Br(this,{kind:\\\"constant\\\",value:n(t.value.value,e.value.value,r)},t.globals):t},jr.prototype.evaluate=function(t,e,r){return\\\"constant\\\"===t.kind?t.value:t.evaluate(e,r)};var Vr=function(t){this.specification=t};Vr.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if(\\\"constant\\\"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Lr(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Lr(Math.floor(e.zoom),e)),t.expression.evaluate(new Lr(Math.floor(e.zoom+1),e)),e)}},Vr.prototype._calculate=function(t,e,r,n){var i=n.zoom,a=i-Math.floor(i),o=n.crossFadingFactor();return i>n.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:a+(1-a)*o}:{from:r,to:e,fromScale:.5,toScale:1,t:1-(1-o)*a}},Vr.prototype.interpolate=function(t){return t};var Ur=function(t){this.specification=t};Ur.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Ur.prototype.interpolate=function(){return!1};var qr=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],n=this.defaultPropertyValues[e]=new zr(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new Or(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};pr(\\\"DataDrivenProperty\\\",jr),pr(\\\"DataConstantProperty\\\",Nr),pr(\\\"CrossFadedProperty\\\",Vr),pr(\\\"ColorRampProperty\\\",Ur);var Hr=function(t){function e(e,r){for(var n in t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.visibility=\\\"visible\\\",\\\"background\\\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\\\"source-layer\\\"],this.filter=e.filter),this._featureFilter=function(){return!0},r.layout&&(this._unevaluatedLayout=new Rr(r.layout)),this._transitionablePaint=new Ir(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayoutProperty=function(t){return\\\"visibility\\\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(null!=e){var n=\\\"layers.\\\"+this.id+\\\".layout.\\\"+t;if(this._validate(or,n,t,e,r))return}\\\"visibility\\\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=\\\"none\\\"===e?e:\\\"visible\\\"},e.prototype.getPaintProperty=function(t){return v(t,\\\"-transition\\\")?this._transitionablePaint.getTransition(t.slice(0,-\\\"-transition\\\".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(null!=e){var n=\\\"layers.\\\"+this.id+\\\".paint.\\\"+t;if(this._validate(ar,n,t,e,r))return}v(t,\\\"-transition\\\")?this._transitionablePaint.setTransition(t.slice(0,-\\\"-transition\\\".length),e||void 0):this._transitionablePaint.setValue(t,e)},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||\\\"none\\\"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,\\\"source-layer\\\":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return\\\"none\\\"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility=\\\"none\\\"),y(t,function(t,e){return!(void 0===t||\\\"layout\\\"===e&&!Object.keys(t).length||\\\"paint\\\"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,n,i){return(!i||!1!==i.validate)&&sr(this,t.call(nr,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:I,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e}(O),Gr={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Wr=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Yr=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Xr(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map(function(t){var i,a=(i=t.type,Gr[i].BYTES_PER_ELEMENT),o=r=Zr(r,Math.max(e,a)),s=t.components||1;return n=Math.max(n,a),r+=a*s,{name:t.name,type:t.type,components:s,offset:o}}),size:Zr(r,Math.max(n,e)),alignment:e}}function Zr(t,e){return Math.ceil(t/e)*e}Yr.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Yr.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Yr.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Yr.prototype.clear=function(){this.length=0},Yr.prototype.resize=function(t){this.reserve(t),this.length=t},Yr.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Yr.prototype._refreshViews=function(){throw new Error(\\\"_refreshViews() must be implemented by each concrete StructArray layout\\\")};var $r=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.int16[n+0]=t,this.int16[n+1]=e,r},e}(Yr);$r.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout2i4\\\",$r);var Jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var a=4*i;return this.int16[a+0]=t,this.int16[a+1]=e,this.int16[a+2]=r,this.int16[a+3]=n,i},e}(Yr);Jr.prototype.bytesPerElement=8,pr(\\\"StructArrayLayout4i8\\\",Jr);var Kr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;this.resize(o+1);var s=6*o;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=a,o},e}(Yr);Kr.prototype.bytesPerElement=12,pr(\\\"StructArrayLayout2i4i12\\\",Kr);var Qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;this.resize(l+1);var c=6*l,u=12*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=r,this.int16[c+3]=n,this.uint8[u+8]=i,this.uint8[u+9]=a,this.uint8[u+10]=o,this.uint8[u+11]=s,l},e}(Yr);Qr.prototype.bytesPerElement=12,pr(\\\"StructArrayLayout4i4ub12\\\",Qr);var tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;this.resize(l+1);var c=8*l;return this.int16[c+0]=t,this.int16[c+1]=e,this.int16[c+2]=r,this.int16[c+3]=n,this.uint16[c+4]=i,this.uint16[c+5]=a,this.uint16[c+6]=o,this.uint16[c+7]=s,l},e}(Yr);tn.prototype.bytesPerElement=16,pr(\\\"StructArrayLayout4i4ui16\\\",tn);var en=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.float32[i+0]=t,this.float32[i+1]=e,this.float32[i+2]=r,n},e}(Yr);en.prototype.bytesPerElement=12,pr(\\\"StructArrayLayout3f12\\\",en);var rn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.uint32[r+0]=t,e},e}(Yr);rn.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout1ul4\\\",rn);var nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u){var f=this.length;this.resize(f+1);var h=12*f,p=6*f;return this.int16[h+0]=t,this.int16[h+1]=e,this.int16[h+2]=r,this.int16[h+3]=n,this.int16[h+4]=i,this.int16[h+5]=a,this.uint32[p+3]=o,this.uint16[h+8]=s,this.uint16[h+9]=l,this.int16[h+10]=c,this.int16[h+11]=u,f},e}(Yr);nn.prototype.bytesPerElement=24,pr(\\\"StructArrayLayout6i1ul2ui2i24\\\",nn);var an=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;this.resize(o+1);var s=6*o;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=i,this.int16[s+5]=a,o},e}(Yr);an.prototype.bytesPerElement=12,pr(\\\"StructArrayLayout2i2i2i12\\\",an);var on=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=4*r;return this.uint8[n+0]=t,this.uint8[n+1]=e,r},e}(Yr);on.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout2ub4\\\",on);var sn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p){var d=this.length;this.resize(d+1);var g=20*d,v=10*d,m=40*d;return this.int16[g+0]=t,this.int16[g+1]=e,this.uint16[g+2]=r,this.uint16[g+3]=n,this.uint32[v+2]=i,this.uint32[v+3]=a,this.uint32[v+4]=o,this.uint16[g+10]=s,this.uint16[g+11]=l,this.uint16[g+12]=c,this.float32[v+7]=u,this.float32[v+8]=f,this.uint8[m+36]=h,this.uint8[m+37]=p,d},e}(Yr);sn.prototype.bytesPerElement=40,pr(\\\"StructArrayLayout2i2ui3ul3ui2f2ub40\\\",sn);var ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.float32[r+0]=t,e},e}(Yr);ln.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout1f4\\\",ln);var cn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.int16[i+0]=t,this.int16[i+1]=e,this.int16[i+2]=r,n},e}(Yr);cn.prototype.bytesPerElement=6,pr(\\\"StructArrayLayout3i6\\\",cn);var un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=2*n,a=4*n;return this.uint32[i+0]=t,this.uint16[a+2]=e,this.uint16[a+3]=r,n},e}(Yr);un.prototype.bytesPerElement=8,pr(\\\"StructArrayLayout1ul2ui8\\\",un);var fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;this.resize(n+1);var i=3*n;return this.uint16[i+0]=t,this.uint16[i+1]=e,this.uint16[i+2]=r,n},e}(Yr);fn.prototype.bytesPerElement=6,pr(\\\"StructArrayLayout3ui6\\\",fn);var hn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.uint16[n+0]=t,this.uint16[n+1]=e,r},e}(Yr);hn.prototype.bytesPerElement=4,pr(\\\"StructArrayLayout2ui4\\\",hn);var pn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var n=2*r;return this.float32[n+0]=t,this.float32[n+1]=e,r},e}(Yr);pn.prototype.bytesPerElement=8,pr(\\\"StructArrayLayout2f8\\\",pn);var dn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;this.resize(i+1);var a=4*i;return this.float32[a+0]=t,this.float32[a+1]=e,this.float32[a+2]=r,this.float32[a+3]=n,i},e}(Yr);dn.prototype.bytesPerElement=16,pr(\\\"StructArrayLayout4f16\\\",dn);var gn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new l(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Wr);gn.prototype.size=24;var vn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new gn(this,t)},e}(nn);pr(\\\"CollisionBoxArray\\\",vn);var mn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,r),e}(Wr);mn.prototype.size=40;var yn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new mn(this,t)},e}(sn);pr(\\\"PlacedSymbolArray\\\",yn);var xn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(Wr);xn.prototype.size=4;var bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new xn(this,t)},e}(ln);pr(\\\"GlyphOffsetArray\\\",bn);var _n=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(Wr);_n.prototype.size=6;var wn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new _n(this,t)},e}(cn);pr(\\\"SymbolLineVertexArray\\\",wn);var kn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(Wr);kn.prototype.size=8;var Mn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new kn(this,t)},e}(un);pr(\\\"FeatureIndexArray\\\",Mn);var An=Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"}],4).members,Tn=function(t){void 0===t&&(t=[]),this.segments=t};Tn.prototype.prepareSegment=function(t,e,r){var n=this.segments[this.segments.length-1];return t>Tn.MAX_VERTEX_ARRAY_LENGTH&&_(\\\"Max vertices per segment is \\\"+Tn.MAX_VERTEX_ARRAY_LENGTH+\\\": bucket requested \\\"+t),(!n||n.vertexLength+t>Tn.MAX_VERTEX_ARRAY_LENGTH)&&(n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(n)),n},Tn.prototype.get=function(){return this.segments},Tn.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var n in r.vaos)r.vaos[n].destroy()}},Tn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,pr(\\\"SegmentVector\\\",Tn);var Sn=function(t,e){return 256*(t=h(Math.floor(t),0,255))+h(Math.floor(e),0,255)};function Cn(t){return[Sn(255*t.r,255*t.g),Sn(255*t.b,255*t.a)]}var En=function(t,e,r){this.value=t,this.name=e,this.type=r,this.statistics={max:-1/0}};En.prototype.defines=function(){return[\\\"#define HAS_UNIFORM_u_\\\"+this.name]},En.prototype.populatePaintArray=function(){},En.prototype.upload=function(){},En.prototype.destroy=function(){},En.prototype.setUniforms=function(t,e,r,n){var i=n.constantOr(this.value),a=t.gl;\\\"color\\\"===this.type?a.uniform4f(e.uniforms[\\\"u_\\\"+this.name],i.r,i.g,i.b,i.a):a.uniform1f(e.uniforms[\\\"u_\\\"+this.name],i)};var Ln=function(t,e,r){this.expression=t,this.name=e,this.type=r,this.statistics={max:-1/0};var n=\\\"color\\\"===r?pn:ln;this.paintVertexAttributes=[{name:\\\"a_\\\"+e,type:\\\"Float32\\\",components:\\\"color\\\"===r?2:1,offset:0}],this.paintVertexArray=new n};Ln.prototype.defines=function(){return[]},Ln.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Lr(0),e);if(\\\"color\\\"===this.type)for(var a=Cn(i),o=n;o<t;o++)r.emplaceBack(a[0],a[1]);else{for(var s=n;s<t;s++)r.emplaceBack(i);this.statistics.max=Math.max(this.statistics.max,i)}},Ln.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},Ln.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Ln.prototype.setUniforms=function(t,e){t.gl.uniform1f(e.uniforms[\\\"a_\\\"+this.name+\\\"_t\\\"],0)};var zn=function(t,e,r,n,i){this.expression=t,this.name=e,this.type=r,this.useIntegerZoom=n,this.zoom=i,this.statistics={max:-1/0};var a=\\\"color\\\"===r?dn:pn;this.paintVertexAttributes=[{name:\\\"a_\\\"+e,type:\\\"Float32\\\",components:\\\"color\\\"===r?4:2,offset:0}],this.paintVertexArray=new a};zn.prototype.defines=function(){return[]},zn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Lr(this.zoom),e),a=this.expression.evaluate(new Lr(this.zoom+1),e);if(\\\"color\\\"===this.type)for(var o=Cn(i),s=Cn(a),l=n;l<t;l++)r.emplaceBack(o[0],o[1],s[0],s[1]);else{for(var c=n;c<t;c++)r.emplaceBack(i,a);this.statistics.max=Math.max(this.statistics.max,i,a)}},zn.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes))},zn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},zn.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},zn.prototype.setUniforms=function(t,e,r){t.gl.uniform1f(e.uniforms[\\\"a_\\\"+this.name+\\\"_t\\\"],this.interpolationFactor(r.zoom))};var On=function(){this.binders={},this.cacheKey=\\\"\\\",this._buffers=[]};On.createDynamic=function(t,e,r){var n=new On,i=[];for(var a in t.paint._values)if(r(a)){var o=t.paint.get(a);if(o instanceof Br&&o.property.specification[\\\"property-function\\\"]){var s=Pn(a,t.type),l=o.property.specification.type,c=o.property.useIntegerZoom;\\\"constant\\\"===o.value.kind?(n.binders[a]=new En(o.value,s,l),i.push(\\\"/u_\\\"+s)):\\\"source\\\"===o.value.kind?(n.binders[a]=new Ln(o.value,s,l),i.push(\\\"/a_\\\"+s)):(n.binders[a]=new zn(o.value,s,l,c,e),i.push(\\\"/z_\\\"+s))}}return n.cacheKey=i.sort().join(\\\"\\\"),n},On.prototype.populatePaintArrays=function(t,e){for(var r in this.binders)this.binders[r].populatePaintArray(t,e)},On.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},On.prototype.setUniforms=function(t,e,r,n){for(var i in this.binders)this.binders[i].setUniforms(t,e,n,r.get(i))},On.prototype.getPaintVertexBuffers=function(){return this._buffers},On.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var r=[];for(var n in this.binders){var i=this.binders[n];(i instanceof Ln||i instanceof zn)&&i.paintVertexBuffer&&r.push(i.paintVertexBuffer)}this._buffers=r},On.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var In=function(t,e,r,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(var i=0,a=e;i<a.length;i+=1){var o=a[i];this.programConfigurations[o.id]=On.createDynamic(o,r,n),this.programConfigurations[o.id].layoutAttributes=t}};function Pn(t,e){return{\\\"text-opacity\\\":\\\"opacity\\\",\\\"icon-opacity\\\":\\\"opacity\\\",\\\"text-color\\\":\\\"fill_color\\\",\\\"icon-color\\\":\\\"fill_color\\\",\\\"text-halo-color\\\":\\\"halo_color\\\",\\\"icon-halo-color\\\":\\\"halo_color\\\",\\\"text-halo-blur\\\":\\\"halo_blur\\\",\\\"icon-halo-blur\\\":\\\"halo_blur\\\",\\\"text-halo-width\\\":\\\"halo_width\\\",\\\"icon-halo-width\\\":\\\"halo_width\\\",\\\"line-gap-width\\\":\\\"gapwidth\\\"}[t]||t.replace(e+\\\"-\\\",\\\"\\\").replace(/-/g,\\\"_\\\")}In.prototype.populatePaintArrays=function(t,e){for(var r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(t,e)},In.prototype.get=function(t){return this.programConfigurations[t]},In.prototype.upload=function(t){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t)},In.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},pr(\\\"ConstantBinder\\\",En),pr(\\\"SourceExpressionBinder\\\",Ln),pr(\\\"CompositeExpressionBinder\\\",zn),pr(\\\"ProgramConfiguration\\\",On,{omit:[\\\"_buffers\\\"]}),pr(\\\"ProgramConfigurationSet\\\",In);var Dn=8192,Rn=(16,{min:-1*Math.pow(2,15),max:Math.pow(2,15)-1});function Bn(t){for(var e=Dn/t.extent,r=t.loadGeometry(),n=0;n<r.length;n++)for(var i=r[n],a=0;a<i.length;a++){var o=i[a];o.x=Math.round(o.x*e),o.y=Math.round(o.y*e),(o.x<Rn.min||o.x>Rn.max||o.y<Rn.min||o.y>Rn.max)&&_(\\\"Geometry exceeds allowed extent, reduce your vector tile buffer size\\\")}return r}function Fn(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Nn=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new $r,this.indexArray=new fn,this.segments=new Tn,this.programConfigurations=new In(An,t.layers,t.zoom)};function jn(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(Zn(i,e))return!0;if(Wn(e,i,r))return!0}return!1}function Vn(t,e){if(1===t.length&&1===t[0].length)return Xn(e,t[0][0]);for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++)if(Xn(t,n[i]))return!0;for(var a=0;a<t.length;a++){for(var o=t[a],s=0;s<o.length;s++)if(Xn(e,o[s]))return!0;for(var l=0;l<e.length;l++)if(Hn(o,e[l]))return!0}return!1}function Un(t,e,r){for(var n=0;n<e.length;n++)for(var i=e[n],a=0;a<t.length;a++){var o=t[a];if(o.length>=3)for(var s=0;s<i.length;s++)if(Zn(o,i[s]))return!0;if(qn(o,i,r))return!0}return!1}function qn(t,e,r){if(t.length>1){if(Hn(t,e))return!0;for(var n=0;n<e.length;n++)if(Wn(e[n],t,r))return!0}for(var i=0;i<t.length;i++)if(Wn(t[i],e,r))return!0;return!1}function Hn(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var n=t[r],i=t[r+1],a=0;a<e.length-1;a++)if(Gn(n,i,e[a],e[a+1]))return!0;return!1}function Gn(t,e,r,n){return w(t,r,n)!==w(e,r,n)&&w(t,e,r)!==w(t,e,n)}function Wn(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(var i=1;i<e.length;i++)if(Yn(t,e[i-1],e[i])<n)return!0;return!1}function Yn(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function Xn(t,e){for(var r,n,i,a=!1,o=0;o<t.length;o++)for(var s=0,l=(r=t[o]).length-1;s<r.length;l=s++)n=r[s],i=r[l],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function Zn(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var a=t[n],o=t[i];a.y>e.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function $n(t,e,r){var n=e.paint.get(t).value;return\\\"constant\\\"===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].statistics.max}function Jn(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Kn(t,e,r,n,i){if(!e[0]&&!e[1])return t;var a=l.convert(e);\\\"viewport\\\"===r&&a._rotate(-n);for(var o=[],s=0;s<t.length;s++){for(var c=t[s],u=[],f=0;f<c.length;f++)u.push(c[f].sub(a._mult(i)));o.push(u)}return o}Nn.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},Nn.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Nn.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,An),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},Nn.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Nn.prototype.addFeature=function(t,e){for(var r=0,n=e;r<n.length;r+=1)for(var i=0,a=n[r];i<a.length;i+=1){var o=a[i],s=o.x,l=o.y;if(!(s<0||s>=Dn||l<0||l>=Dn)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),u=c.vertexLength;Fn(this.layoutVertexArray,s,l,-1,-1),Fn(this.layoutVertexArray,s,l,1,-1),Fn(this.layoutVertexArray,s,l,1,1),Fn(this.layoutVertexArray,s,l,-1,1),this.indexArray.emplaceBack(u,u+1,u+2),this.indexArray.emplaceBack(u,u+3,u+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(\\\"CircleBucket\\\",Nn,{omit:[\\\"layers\\\"]});var Qn={paint:new qr({\\\"circle-radius\\\":new jr(I.paint_circle[\\\"circle-radius\\\"]),\\\"circle-color\\\":new jr(I.paint_circle[\\\"circle-color\\\"]),\\\"circle-blur\\\":new jr(I.paint_circle[\\\"circle-blur\\\"]),\\\"circle-opacity\\\":new jr(I.paint_circle[\\\"circle-opacity\\\"]),\\\"circle-translate\\\":new Nr(I.paint_circle[\\\"circle-translate\\\"]),\\\"circle-translate-anchor\\\":new Nr(I.paint_circle[\\\"circle-translate-anchor\\\"]),\\\"circle-pitch-scale\\\":new Nr(I.paint_circle[\\\"circle-pitch-scale\\\"]),\\\"circle-pitch-alignment\\\":new Nr(I.paint_circle[\\\"circle-pitch-alignment\\\"]),\\\"circle-stroke-width\\\":new jr(I.paint_circle[\\\"circle-stroke-width\\\"]),\\\"circle-stroke-color\\\":new jr(I.paint_circle[\\\"circle-stroke-color\\\"]),\\\"circle-stroke-opacity\\\":new jr(I.paint_circle[\\\"circle-stroke-opacity\\\"])})},ti=i(function(t,e){var r;t.exports=((r=new Float32Array(3))[0]=0,r[1]=0,r[2]=0,function(){var t=new Float32Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=0}(),{vec3:{transformMat3:function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},vec4:{transformMat4:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},mat2:{create:function(){var t=new Float32Array(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},rotate:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+a*s,t[1]=i*l+o*s,t[2]=n*-s+a*l,t[3]=i*-s+o*l,t},scale:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1];return t[0]=n*s,t[1]=i*s,t[2]=a*l,t[3]=o*l,t}},mat3:{create:function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromRotation:function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},mat4:{create:function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},translate:function(t,e,r){var n,i,a,o,s,l,c,u,f,h,p,d,g=r[0],v=r[1],m=r[2];return e===t?(t[12]=e[0]*g+e[4]*v+e[8]*m+e[12],t[13]=e[1]*g+e[5]*v+e[9]*m+e[13],t[14]=e[2]*g+e[6]*v+e[10]*m+e[14],t[15]=e[3]*g+e[7]*v+e[11]*m+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*v+f*m+e[12],t[13]=i*g+l*v+h*m+e[13],t[14]=a*g+c*v+p*m+e[14],t[15]=o*g+u*v+d*m+e[15]),t},scale:function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},multiply:function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*v,t[2]=x*a+b*c+_*p+w*m,t[3]=x*o+b*u+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*v,t[6]=x*a+b*c+_*p+w*m,t[7]=x*o+b*u+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*v,t[10]=x*a+b*c+_*p+w*m,t[11]=x*o+b*u+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*v,t[14]=x*a+b*c+_*p+w*m,t[15]=x*o+b*u+_*d+w*y,t},perspective:function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t},rotateX:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t},rotateZ:function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t},invert:function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],v=e[14],m=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,k=i*c-a*l,M=u*g-f*d,A=u*v-h*d,T=u*m-p*d,S=f*v-h*g,C=f*m-p*g,E=h*m-p*v,L=y*E-x*C+b*S+_*T-w*A+k*M;return L?(L=1/L,t[0]=(s*E-l*C+c*S)*L,t[1]=(i*C-n*E-a*S)*L,t[2]=(g*k-v*w+m*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*T-o*E-c*A)*L,t[5]=(r*E-i*T+a*A)*L,t[6]=(v*b-d*k-m*x)*L,t[7]=(u*k-h*b+p*x)*L,t[8]=(o*C-s*T+c*M)*L,t[9]=(n*T-r*C-a*M)*L,t[10]=(d*w-g*b+m*y)*L,t[11]=(f*b-u*w-p*y)*L,t[12]=(s*A-o*S-l*M)*L,t[13]=(r*S-n*A+i*M)*L,t[14]=(g*x-d*_-v*y)*L,t[15]=(u*_-f*x+h*y)*L,t):null},ortho:function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*c,t[15]=1,t}}})}),ei=(ti.vec3,ti.vec4),ri=(ti.mat2,ti.mat3,ti.mat4),ni=function(t){function e(e){t.call(this,e,Qn)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Nn(t)},e.prototype.queryRadius=function(t){var e=t;return $n(\\\"circle-radius\\\",this,e)+$n(\\\"circle-stroke-width\\\",this,e)+Jn(this.paint.get(\\\"circle-translate\\\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o){for(var s=Kn(t,this.paint.get(\\\"circle-translate\\\"),this.paint.get(\\\"circle-translate-anchor\\\"),i.angle,a),l=this.paint.get(\\\"circle-radius\\\").evaluate(e)+this.paint.get(\\\"circle-stroke-width\\\").evaluate(e),c=\\\"map\\\"===this.paint.get(\\\"circle-pitch-alignment\\\"),u=c?s:function(t,e,r){return s.map(function(t){return t.map(function(t){return ii(t,e,r)})})}(0,o,i),f=c?l*a:l,h=0,p=r;h<p.length;h+=1)for(var d=0,g=p[h];d<g.length;d+=1){var v=g[d],m=c?v:ii(v,o,i),y=f,x=ei.transformMat4([],[v.x,v.y,0,1],o);if(\\\"viewport\\\"===this.paint.get(\\\"circle-pitch-scale\\\")&&\\\"map\\\"===this.paint.get(\\\"circle-pitch-alignment\\\")?y*=x[3]/i.cameraToCenterDistance:\\\"map\\\"===this.paint.get(\\\"circle-pitch-scale\\\")&&\\\"viewport\\\"===this.paint.get(\\\"circle-pitch-alignment\\\")&&(y*=i.cameraToCenterDistance/x[3]),jn(u,m,y))return!0}return!1},e}(Hr);function ii(t,e,r){var n=ei.transformMat4([],[t.x,t.y,0,1],e);return new l((n[0]/n[3]+1)*r.width*.5,(n[1]/n[3]+1)*r.height*.5)}var ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Nn);function oi(t,e,r,n){var i=e.width,a=e.height;if(n){if(n.length!==i*a*r)throw new RangeError(\\\"mismatched image size\\\")}else n=new Uint8Array(i*a*r);return t.width=i,t.height=a,t.data=n,t}function si(t,e,r){var n=e.width,i=e.height;if(n!==t.width||i!==t.height){var a=oi({},{width:n,height:i},r);li(t,a,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=a.data}}function li(t,e,r,n,i,a){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError(\\\"out of range source coordinates for image copy\\\");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError(\\\"out of range destination coordinates for image copy\\\");for(var o=t.data,s=e.data,l=0;l<i.height;l++)for(var c=((r.y+l)*t.width+r.x)*a,u=((n.y+l)*e.width+n.x)*a,f=0;f<i.width*a;f++)s[u+f]=o[c+f];return e}pr(\\\"HeatmapBucket\\\",ai,{omit:[\\\"layers\\\"]});var ci=function(t,e){oi(this,t,1,e)};ci.prototype.resize=function(t){si(this,t,1)},ci.prototype.clone=function(){return new ci({width:this.width,height:this.height},new Uint8Array(this.data))},ci.copy=function(t,e,r,n,i){li(t,e,r,n,i,1)};var ui=function(t,e){oi(this,t,4,e)};ui.prototype.resize=function(t){si(this,t,4)},ui.prototype.clone=function(){return new ui({width:this.width,height:this.height},new Uint8Array(this.data))},ui.copy=function(t,e,r,n,i){li(t,e,r,n,i,4)},pr(\\\"AlphaImage\\\",ci),pr(\\\"RGBAImage\\\",ui);var fi={paint:new qr({\\\"heatmap-radius\\\":new jr(I.paint_heatmap[\\\"heatmap-radius\\\"]),\\\"heatmap-weight\\\":new jr(I.paint_heatmap[\\\"heatmap-weight\\\"]),\\\"heatmap-intensity\\\":new Nr(I.paint_heatmap[\\\"heatmap-intensity\\\"]),\\\"heatmap-color\\\":new Ur(I.paint_heatmap[\\\"heatmap-color\\\"]),\\\"heatmap-opacity\\\":new Nr(I.paint_heatmap[\\\"heatmap-opacity\\\"])})};function hi(t,e){for(var r=new Uint8Array(1024),n={},i=0,a=0;i<256;i++,a+=4){n[e]=i/255;var o=t.evaluate(n);r[a+0]=Math.floor(255*o.r/o.a),r[a+1]=Math.floor(255*o.g/o.a),r[a+2]=Math.floor(255*o.b/o.a),r[a+3]=Math.floor(255*o.a)}return new ui({width:256,height:1},r)}var pi=function(t){function e(e){t.call(this,e,fi),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ai(t)},e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),\\\"heatmap-color\\\"===e&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values[\\\"heatmap-color\\\"].value.expression;this.colorRamp=hi(t,\\\"heatmapDensity\\\"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\\\"heatmap-opacity\\\")&&\\\"none\\\"!==this.visibility},e}(Hr),di={paint:new qr({\\\"hillshade-illumination-direction\\\":new Nr(I.paint_hillshade[\\\"hillshade-illumination-direction\\\"]),\\\"hillshade-illumination-anchor\\\":new Nr(I.paint_hillshade[\\\"hillshade-illumination-anchor\\\"]),\\\"hillshade-exaggeration\\\":new Nr(I.paint_hillshade[\\\"hillshade-exaggeration\\\"]),\\\"hillshade-shadow-color\\\":new Nr(I.paint_hillshade[\\\"hillshade-shadow-color\\\"]),\\\"hillshade-highlight-color\\\":new Nr(I.paint_hillshade[\\\"hillshade-highlight-color\\\"]),\\\"hillshade-accent-color\\\":new Nr(I.paint_hillshade[\\\"hillshade-accent-color\\\"])})},gi=function(t){function e(e){t.call(this,e,di)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\\\"hillshade-exaggeration\\\")&&\\\"none\\\"!==this.visibility},e}(Hr),vi=Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"}],4).members,mi=xi,yi=xi;function xi(t,e,r){r=r||2;var n,i,a,o,s,l,c,u=e&&e.length,f=u?e[0]*r:t.length,h=bi(t,0,f,r,!0),p=[];if(!h)return p;if(u&&(h=function(t,e,r,n){var i,a,o,s=[];for(i=0,a=e.length;i<a;i++)(o=bi(t,e[i]*n,i<a-1?e[i+1]*n:t.length,n,!1))===o.next&&(o.steiner=!0),s.push(Li(o));for(s.sort(Si),i=0;i<s.length;i++)Ci(s[i],r),r=_i(r,r.next);return r}(t,e,h,r)),t.length>80*r){n=a=t[0],i=o=t[1];for(var d=r;d<f;d+=r)(s=t[d])<n&&(n=s),(l=t[d+1])<i&&(i=l),s>a&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return wi(h,p,r,n,i,c),p}function bi(t,e,r,n,i){var a,o;if(i===Vi(t,e,r,n)>0)for(a=e;a<r;a+=n)o=Fi(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=Fi(a,t[a],t[a+1],o);return o&&Pi(o,o.next)&&(Ni(o),o=o.next),o}function _i(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!Pi(n,n.next)&&0!==Ii(n.prev,n,n.next))n=n.next;else{if(Ni(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function wi(t,e,r,n,i,a,o){if(t){!o&&a&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=Ei(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<c&&(s++,n=n.nextZ);e++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,a);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,a?Mi(t,n,i,a):ki(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),Ni(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?wi(t=Ai(t,e,r),e,r,n,i,a,2):2===o&&Ti(t,e,r,n,i,a):wi(_i(t),e,r,n,i,a,1);break}}}function ki(t){var e=t.prev,r=t,n=t.next;if(Ii(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(zi(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Ii(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Mi(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Ii(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,c=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=Ei(s,l,e,r,n),h=Ei(c,u,e,r,n),p=t.prevZ,d=t.nextZ;p&&p.z>=f&&d&&d.z<=h;){if(p!==t.prev&&p!==t.next&&zi(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Ii(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&zi(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ii(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&zi(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Ii(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&zi(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ii(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ai(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!Pi(i,a)&&Di(i,n,n.next,a)&&Ri(i,a)&&Ri(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),Ni(n),Ni(n.next),n=t=a),n=n.next}while(n!==t);return n}function Ti(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Oi(o,s)){var l=Bi(o,s);return o=_i(o,o.next),l=_i(l,l.next),wi(o,e,r,n,i,a),void wi(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Si(t,e){return t.x-e.x}function Ci(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,c=r,u=r.x,f=r.y,h=1/0;for(n=r.next;n!==c;)i>=n.x&&n.x>=u&&i!==n.x&&zi(a<f?i:o,a,u,f,a<f?o:i,a,n.x,n.y)&&((l=Math.abs(a-n.y)/(i-n.x))<h||l===h&&n.x>r.x)&&Ri(n,t)&&(r=n,h=l),n=n.next;return r}(t,e)){var r=Bi(e,t);_i(r,r.next)}}function Ei(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Li(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function zi(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Oi(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Di(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&Ri(t,e)&&Ri(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function Ii(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Pi(t,e){return t.x===e.x&&t.y===e.y}function Di(t,e,r,n){return!!(Pi(t,e)&&Pi(r,n)||Pi(t,n)&&Pi(r,e))||Ii(t,e,r)>0!=Ii(t,e,n)>0&&Ii(r,n,t)>0!=Ii(r,n,e)>0}function Ri(t,e){return Ii(t.prev,t,t.next)<0?Ii(t,e,t.next)>=0&&Ii(t,t.prev,e)>=0:Ii(t,e,t.prev)<0||Ii(t,t.next,e)<0}function Bi(t,e){var r=new ji(t.i,t.x,t.y),n=new ji(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Fi(t,e,r,n){var i=new ji(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ni(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ji(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Vi(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}xi.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(Vi(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var c=e[s]*r,u=s<l-1?e[s+1]*r:t.length;o-=Math.abs(Vi(t,c,u,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},xi.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r},mi.default=yi;var Ui=Hi,qi=Hi;function Hi(t,e,r,n,i){!function t(e,r,n,i,a){for(;i>n;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);t(e,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}var f=e[r],h=n,p=i;for(Gi(e,n,r),a(e[i],f)>0&&Gi(e,n,i);h<p;){for(Gi(e,h,p),h++,p--;a(e[h],f)<0;)h++;for(;a(e[p],f)>0;)p--}0===a(e[n],f)?Gi(e,n,p):Gi(e,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}(t,e,r||0,n||t.length-1,i||Wi)}function Gi(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Wi(t,e){return t<e?-1:t>e?1:0}function Yi(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o<r;o++){var s=k(t[o]);0!==s&&(t[o].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(n&&a.push(n),n=[t[o]]):n.push(t[o]))}if(n&&a.push(n),e>1)for(var l=0;l<a.length;l++)a[l].length<=e||(Ui(a[l],e,1,a[l].length-1,Xi),a[l]=a[l].slice(0,e));return a}function Xi(t,e){return e.area-t.area}Ui.default=qi;var Zi=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new $r,this.indexArray=new fn,this.indexArray2=new hn,this.programConfigurations=new In(vi,t.layers,t.zoom),this.segments=new Tn,this.segments2=new Tn};Zi.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},Zi.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Zi.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,vi),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2),this.programConfigurations.upload(t)},Zi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Zi.prototype.addFeature=function(t,e){for(var r=0,n=Yi(e,500);r<n.length;r+=1){for(var i=n[r],a=0,o=0,s=i;o<s.length;o+=1)a+=s[o].length;for(var l=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray),c=l.vertexLength,u=[],f=[],h=0,p=i;h<p.length;h+=1){var d=p[h];if(0!==d.length){d!==i[0]&&f.push(u.length/2);var g=this.segments2.prepareSegment(d.length,this.layoutVertexArray,this.indexArray2),v=g.vertexLength;this.layoutVertexArray.emplaceBack(d[0].x,d[0].y),this.indexArray2.emplaceBack(v+d.length-1,v),u.push(d[0].x),u.push(d[0].y);for(var m=1;m<d.length;m++)this.layoutVertexArray.emplaceBack(d[m].x,d[m].y),this.indexArray2.emplaceBack(v+m-1,v+m),u.push(d[m].x),u.push(d[m].y);g.vertexLength+=d.length,g.primitiveLength+=d.length}}for(var y=mi(u,f),x=0;x<y.length;x+=3)this.indexArray.emplaceBack(c+y[x],c+y[x+1],c+y[x+2]);l.vertexLength+=a,l.primitiveLength+=y.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(\\\"FillBucket\\\",Zi,{omit:[\\\"layers\\\"]});var $i={paint:new qr({\\\"fill-antialias\\\":new Nr(I.paint_fill[\\\"fill-antialias\\\"]),\\\"fill-opacity\\\":new jr(I.paint_fill[\\\"fill-opacity\\\"]),\\\"fill-color\\\":new jr(I.paint_fill[\\\"fill-color\\\"]),\\\"fill-outline-color\\\":new jr(I.paint_fill[\\\"fill-outline-color\\\"]),\\\"fill-translate\\\":new Nr(I.paint_fill[\\\"fill-translate\\\"]),\\\"fill-translate-anchor\\\":new Nr(I.paint_fill[\\\"fill-translate-anchor\\\"]),\\\"fill-pattern\\\":new Vr(I.paint_fill[\\\"fill-pattern\\\"])})},Ji=function(t){function e(e){t.call(this,e,$i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(t){this.paint=this._transitioningPaint.possiblyEvaluate(t);var e=this.paint._values[\\\"fill-outline-color\\\"];\\\"constant\\\"===e.value.kind&&void 0===e.value.value&&(this.paint._values[\\\"fill-outline-color\\\"]=this.paint._values[\\\"fill-color\\\"])},e.prototype.createBucket=function(t){return new Zi(t)},e.prototype.queryRadius=function(){return Jn(this.paint.get(\\\"fill-translate\\\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){return Vn(Kn(t,this.paint.get(\\\"fill-translate\\\"),this.paint.get(\\\"fill-translate-anchor\\\"),i.angle,a),r)},e}(Hr),Ki=Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_normal_ed\\\",components:4,type:\\\"Int16\\\"}],4).members,Qi=Math.pow(2,13);function ta(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Qi)+o,i*Qi*2,a*Qi*2,Math.round(s))}var ea=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Kr,this.indexArray=new fn,this.programConfigurations=new In(Ki,t.layers,t.zoom),this.segments=new Tn};function ra(t,e){return t.x===e.x&&(t.x<0||t.x>Dn)||t.y===e.y&&(t.y<0||t.y>Dn)}function na(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>Dn})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>Dn})}ea.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},ea.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ea.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ki),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},ea.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ea.prototype.addFeature=function(t,e){for(var r=0,n=Yi(e,500);r<n.length;r+=1){for(var i=n[r],a=0,o=0,s=i;o<s.length;o+=1)a+=s[o].length;for(var l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=0,u=i;c<u.length;c+=1){var f=u[c];if(0!==f.length&&!na(f))for(var h=0,p=0;p<f.length;p++){var d=f[p];if(p>=1){var g=f[p-1];if(!ra(d,g)){l.vertexLength+4>Tn.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var v=d.sub(g)._perp()._unit(),m=g.dist(d);h+m>32768&&(h=0),ta(this.layoutVertexArray,d.x,d.y,v.x,v.y,0,0,h),ta(this.layoutVertexArray,d.x,d.y,v.x,v.y,0,1,h),h+=m,ta(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,0,h),ta(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,1,h);var y=l.vertexLength;this.indexArray.emplaceBack(y,y+1,y+2),this.indexArray.emplaceBack(y+1,y+2,y+3),l.vertexLength+=4,l.primitiveLength+=2}}}}l.vertexLength+a>Tn.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray));for(var x=[],b=[],_=l.vertexLength,w=0,k=i;w<k.length;w+=1){var M=k[w];if(0!==M.length){M!==i[0]&&b.push(x.length/2);for(var A=0;A<M.length;A++){var T=M[A];ta(this.layoutVertexArray,T.x,T.y,0,0,1,1,0),x.push(T.x),x.push(T.y)}}}for(var S=mi(x,b),C=0;C<S.length;C+=3)this.indexArray.emplaceBack(_+S[C],_+S[C+1],_+S[C+2]);l.primitiveLength+=S.length/3,l.vertexLength+=a}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t)},pr(\\\"FillExtrusionBucket\\\",ea,{omit:[\\\"layers\\\"]});var ia={paint:new qr({\\\"fill-extrusion-opacity\\\":new Nr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-opacity\\\"]),\\\"fill-extrusion-color\\\":new jr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-color\\\"]),\\\"fill-extrusion-translate\\\":new Nr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-translate\\\"]),\\\"fill-extrusion-translate-anchor\\\":new Nr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-translate-anchor\\\"]),\\\"fill-extrusion-pattern\\\":new Vr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-pattern\\\"]),\\\"fill-extrusion-height\\\":new jr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-height\\\"]),\\\"fill-extrusion-base\\\":new jr(I[\\\"paint_fill-extrusion\\\"][\\\"fill-extrusion-base\\\"])})},aa=function(t){function e(e){t.call(this,e,ia)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ea(t)},e.prototype.queryRadius=function(){return Jn(this.paint.get(\\\"fill-extrusion-translate\\\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){return Vn(Kn(t,this.paint.get(\\\"fill-extrusion-translate\\\"),this.paint.get(\\\"fill-extrusion-translate-anchor\\\"),i.angle,a),r)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\\\"fill-extrusion-opacity\\\")&&\\\"none\\\"!==this.visibility},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e}(Hr),oa=Xr([{name:\\\"a_pos_normal\\\",components:4,type:\\\"Int16\\\"},{name:\\\"a_data\\\",components:4,type:\\\"Uint8\\\"}],4).members,sa=la;function la(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(ca,this,e)}function ca(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function ua(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],n+=((r=t[o]).x-e.x)*(e.y+r.y);return n}la.types=[\\\"Unknown\\\",\\\"Point\\\",\\\"LineString\\\",\\\"Polygon\\\"],la.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,a=0,o=0,s=[];t.pos<r;){if(i<=0){var c=t.readVarint();n=7&c,i=c>>3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new l(a,o));else{if(7!==n)throw new Error(\\\"unknown command \\\"+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},la.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;t.pos<e;){if(n<=0){var u=t.readVarint();r=7&u,n=u>>3}if(n--,1===r||2===r)(i+=t.readSVarint())<o&&(o=i),i>s&&(s=i),(a+=t.readSVarint())<l&&(l=a),a>c&&(c=a);else if(7!==r)throw new Error(\\\"unknown command \\\"+r)}return[o,l,s,c]},la.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=la.types[this.type];function u(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+s)/a;t[e]=[360*(r.x+o)/a-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var f=[];for(n=0;n<l.length;n++)f[n]=l[n][0];u(l=f);break;case 2:for(n=0;n<l.length;n++)u(l[n]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],a=0;a<e;a++){var o=ua(t[a]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(r&&i.push(r),r=[t[a]]):r.push(t[a]))}return r&&i.push(r),i}(l),n=0;n<l.length;n++)for(i=0;i<l[n].length;i++)u(l[n][i])}1===l.length?l=l[0]:c=\\\"Multi\\\"+c;var h={type:\\\"Feature\\\",geometry:{type:c,coordinates:l},properties:this.properties};return\\\"id\\\"in this&&(h.id=this.id),h};var fa=ha;function ha(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(pa,this,e),this.length=this._features.length}function pa(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function da(t,e,r){if(3===t){var n=new fa(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}ha.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error(\\\"feature index out of bounds\\\");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new sa(this._pbf,e,this.extent,this._keys,this._values)};var ga={VectorTile:function(t,e){this.layers=t.readFields(da,{},e)},VectorTileFeature:sa,VectorTileLayer:fa},va=ga.VectorTileFeature.types,ma=63,ya=Math.cos(Math.PI/180*37.5),xa=.5,ba=Math.pow(2,14)/xa;function _a(t,e,r,n,i,a,o){t.emplaceBack(e.x,e.y,n?1:0,i?1:-1,Math.round(ma*r.x)+128,Math.round(ma*r.y)+128,1+(0===a?0:a<0?-1:1)|(o*xa&63)<<2,o*xa>>6)}var wa=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.layoutVertexArray=new Qr,this.indexArray=new fn,this.programConfigurations=new In(oa,t.layers,t.zoom),this.segments=new Tn};function ka(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(ba-1)}wa.prototype.populate=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.feature,o=i.index,s=i.sourceLayerIndex;if(this.layers[0]._featureFilter(new Lr(this.zoom),a)){var l=Bn(a);this.addFeature(a,l),e.featureIndex.insert(a,l,o,s,this.index)}}},wa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},wa.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,oa),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.programConfigurations.upload(t)},wa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},wa.prototype.addFeature=function(t,e){for(var r=this.layers[0].layout,n=r.get(\\\"line-join\\\").evaluate(t),i=r.get(\\\"line-cap\\\"),a=r.get(\\\"line-miter-limit\\\"),o=r.get(\\\"line-round-limit\\\"),s=0,l=e;s<l.length;s+=1){var c=l[s];this.addLine(c,t,n,i,a,o)}},wa.prototype.addLine=function(t,e,r,n,i,a){var o=null;e.properties&&e.properties.hasOwnProperty(\\\"mapbox_clip_start\\\")&&e.properties.hasOwnProperty(\\\"mapbox_clip_end\\\")&&(o={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var s=\\\"Polygon\\\"===va[e.type],l=t.length;l>=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c<l-1&&t[c].equals(t[c+1]);)c++;if(!(l<(s?3:2))){o&&(o.tileTotal=function(t,e,r){for(var n,i,a=0,o=c;o<r-1;o++)n=t[o],i=t[o+1],a+=n.dist(i);return a}(t,0,l)),\\\"bevel\\\"===r&&(i=1.05);var u=Dn/(512*this.overscaling)*15,f=t[c],h=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray);this.distance=0;var p,d,g,v=n,m=s?\\\"butt\\\":n,y=!0,x=void 0,b=void 0,_=void 0,w=void 0;this.e1=this.e2=this.e3=-1,s&&(p=t[l-2],w=f.sub(p)._unit()._perp());for(var k=c;k<l;k++)if(!(b=s&&k===l-1?t[c+1]:t[k+1])||!t[k].equals(b)){w&&(_=w),p&&(x=p),p=t[k],w=b?b.sub(p)._unit()._perp():_;var M=(_=_||w).add(w);0===M.x&&0===M.y||M._unit();var A=M.x*w.x+M.y*w.y,T=0!==A?1/A:1/0,S=A<ya&&x&&b;if(S&&k>c){var C=p.dist(x);if(C>2*u){var E=p.sub(p.sub(x)._mult(u/C)._round());this.distance+=E.dist(x),this.addCurrentVertex(E,this.distance,_.mult(1),0,0,!1,h,o),x=E}}var L=x&&b,z=L?r:b?v:m;if(L&&\\\"round\\\"===z&&(T<a?z=\\\"miter\\\":T<=2&&(z=\\\"fakeround\\\")),\\\"miter\\\"===z&&T>i&&(z=\\\"bevel\\\"),\\\"bevel\\\"===z&&(T>2&&(z=\\\"flipbevel\\\"),T<i&&(z=\\\"miter\\\")),x&&(this.distance+=p.dist(x)),\\\"miter\\\"===z)M._mult(T),this.addCurrentVertex(p,this.distance,M,0,0,!1,h,o);else if(\\\"flipbevel\\\"===z){if(T>100)M=w.clone().mult(-1);else{var O=_.x*w.y-_.y*w.x>0?-1:1,I=T*_.add(w).mag()/_.sub(w).mag();M._perp()._mult(I*O)}this.addCurrentVertex(p,this.distance,M,0,0,!1,h,o),this.addCurrentVertex(p,this.distance,M.mult(-1),0,0,!1,h,o)}else if(\\\"bevel\\\"===z||\\\"fakeround\\\"===z){var P=_.x*w.y-_.y*w.x>0,D=-Math.sqrt(T*T-1);if(P?(g=0,d=D):(d=0,g=D),y||this.addCurrentVertex(p,this.distance,_,d,g,!1,h,o),\\\"fakeround\\\"===z){for(var R=Math.floor(8*(.5-(A-.5))),B=void 0,F=0;F<R;F++)B=w.mult((F+1)/(R+1))._add(_)._unit(),this.addPieSliceVertex(p,this.distance,B,P,h,o);this.addPieSliceVertex(p,this.distance,M,P,h,o);for(var N=R-1;N>=0;N--)B=_.mult((N+1)/(R+1))._add(w)._unit(),this.addPieSliceVertex(p,this.distance,B,P,h,o)}b&&this.addCurrentVertex(p,this.distance,w,-d,-g,!1,h,o)}else\\\"butt\\\"===z?(y||this.addCurrentVertex(p,this.distance,_,0,0,!1,h,o),b&&this.addCurrentVertex(p,this.distance,w,0,0,!1,h,o)):\\\"square\\\"===z?(y||(this.addCurrentVertex(p,this.distance,_,1,1,!1,h,o),this.e1=this.e2=-1),b&&this.addCurrentVertex(p,this.distance,w,-1,-1,!1,h,o)):\\\"round\\\"===z&&(y||(this.addCurrentVertex(p,this.distance,_,0,0,!1,h,o),this.addCurrentVertex(p,this.distance,_,1,1,!0,h,o),this.e1=this.e2=-1),b&&(this.addCurrentVertex(p,this.distance,w,-1,-1,!0,h,o),this.addCurrentVertex(p,this.distance,w,0,0,!1,h,o)));if(S&&k<l-1){var j=p.dist(b);if(j>2*u){var V=p.add(b.sub(p)._mult(u/j)._round());this.distance+=V.dist(p),this.addCurrentVertex(V,this.distance,w.mult(1),0,0,!1,h,o),p=V}}y=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e)}},wa.prototype.addCurrentVertex=function(t,e,r,n,i,a,o,s){var l,c=this.layoutVertexArray,u=this.indexArray;s&&(e=ka(e,s)),l=r.clone(),n&&l._sub(r.perp()._mult(n)),_a(c,t,l,a,!1,n,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),i&&l._sub(r.perp()._mult(i)),_a(c,t,l,a,!0,-i,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>ba/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a,o))},wa.prototype.addPieSliceVertex=function(t,e,r,n,i,a){r=r.mult(n?-1:1);var o=this.layoutVertexArray,s=this.indexArray;a&&(e=ka(e,a)),_a(o,t,r,!1,n,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},pr(\\\"LineBucket\\\",wa,{omit:[\\\"layers\\\"]});var Ma=new qr({\\\"line-cap\\\":new Nr(I.layout_line[\\\"line-cap\\\"]),\\\"line-join\\\":new jr(I.layout_line[\\\"line-join\\\"]),\\\"line-miter-limit\\\":new Nr(I.layout_line[\\\"line-miter-limit\\\"]),\\\"line-round-limit\\\":new Nr(I.layout_line[\\\"line-round-limit\\\"])}),Aa={paint:new qr({\\\"line-opacity\\\":new jr(I.paint_line[\\\"line-opacity\\\"]),\\\"line-color\\\":new jr(I.paint_line[\\\"line-color\\\"]),\\\"line-translate\\\":new Nr(I.paint_line[\\\"line-translate\\\"]),\\\"line-translate-anchor\\\":new Nr(I.paint_line[\\\"line-translate-anchor\\\"]),\\\"line-width\\\":new jr(I.paint_line[\\\"line-width\\\"]),\\\"line-gap-width\\\":new jr(I.paint_line[\\\"line-gap-width\\\"]),\\\"line-offset\\\":new jr(I.paint_line[\\\"line-offset\\\"]),\\\"line-blur\\\":new jr(I.paint_line[\\\"line-blur\\\"]),\\\"line-dasharray\\\":new Vr(I.paint_line[\\\"line-dasharray\\\"]),\\\"line-pattern\\\":new Vr(I.paint_line[\\\"line-pattern\\\"]),\\\"line-gradient\\\":new Ur(I.paint_line[\\\"line-gradient\\\"])}),layout:Ma},Ta=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Lr(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n){return r=p({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n)},e}(jr))(Aa.paint.properties[\\\"line-width\\\"].specification);Ta.useIntegerZoom=!0;var Sa=function(t){function e(e){t.call(this,e,Aa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setPaintProperty=function(e,r,n){t.prototype.setPaintProperty.call(this,e,r,n),\\\"line-gradient\\\"===e&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\\\"line-gradient\\\"].value.expression;this.gradient=hi(t,\\\"lineProgress\\\"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values[\\\"line-floorwidth\\\"]=Ta.possiblyEvaluate(this._transitioningPaint._values[\\\"line-width\\\"].value,e)},e.prototype.createBucket=function(t){return new wa(t)},e.prototype.queryRadius=function(t){var e=t,r=Ca($n(\\\"line-width\\\",this,e),$n(\\\"line-gap-width\\\",this,e)),n=$n(\\\"line-offset\\\",this,e);return r/2+Math.abs(n)+Jn(this.paint.get(\\\"line-translate\\\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a){var o=Kn(t,this.paint.get(\\\"line-translate\\\"),this.paint.get(\\\"line-translate-anchor\\\"),i.angle,a),s=a/2*Ca(this.paint.get(\\\"line-width\\\").evaluate(e),this.paint.get(\\\"line-gap-width\\\").evaluate(e)),c=this.paint.get(\\\"line-offset\\\").evaluate(e);return c&&(r=function(t,e){for(var r=[],n=new l(0,0),i=0;i<t.length;i++){for(var a=t[i],o=[],s=0;s<a.length;s++){var c=a[s-1],u=a[s],f=a[s+1],h=0===s?n:u.sub(c)._unit()._perp(),p=s===a.length-1?n:f.sub(u)._unit()._perp(),d=h._add(p)._unit(),g=d.x*p.x+d.y*p.y;d._mult(1/g),o.push(d._mult(e)._add(u))}r.push(o)}return r}(r,c*a)),Un(o,r,s)},e}(Hr);function Ca(t,e){return e>0?e+2*t:t}var Ea=Xr([{name:\\\"a_pos_offset\\\",components:4,type:\\\"Int16\\\"},{name:\\\"a_data\\\",components:4,type:\\\"Uint16\\\"}]),La=Xr([{name:\\\"a_projected_pos\\\",components:3,type:\\\"Float32\\\"}],4),za=(Xr([{name:\\\"a_fade_opacity\\\",components:1,type:\\\"Uint32\\\"}],4),Xr([{name:\\\"a_placed\\\",components:2,type:\\\"Uint8\\\"}],4)),Oa=(Xr([{type:\\\"Int16\\\",name:\\\"anchorPointX\\\"},{type:\\\"Int16\\\",name:\\\"anchorPointY\\\"},{type:\\\"Int16\\\",name:\\\"x1\\\"},{type:\\\"Int16\\\",name:\\\"y1\\\"},{type:\\\"Int16\\\",name:\\\"x2\\\"},{type:\\\"Int16\\\",name:\\\"y2\\\"},{type:\\\"Uint32\\\",name:\\\"featureIndex\\\"},{type:\\\"Uint16\\\",name:\\\"sourceLayerIndex\\\"},{type:\\\"Uint16\\\",name:\\\"bucketIndex\\\"},{type:\\\"Int16\\\",name:\\\"radius\\\"},{type:\\\"Int16\\\",name:\\\"signedDistanceFromAnchor\\\"}]),Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_anchor_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_extrude\\\",components:2,type:\\\"Int16\\\"}],4)),Ia=Xr([{name:\\\"a_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_anchor_pos\\\",components:2,type:\\\"Int16\\\"},{name:\\\"a_extrude\\\",components:2,type:\\\"Int16\\\"}],4);function Pa(t,e,r){var n=e.layout.get(\\\"text-transform\\\").evaluate(r);return\\\"uppercase\\\"===n?t=t.toLocaleUpperCase():\\\"lowercase\\\"===n&&(t=t.toLocaleLowerCase()),Er.applyArabicShaping&&(t=Er.applyArabicShaping(t)),t}Xr([{type:\\\"Int16\\\",name:\\\"anchorX\\\"},{type:\\\"Int16\\\",name:\\\"anchorY\\\"},{type:\\\"Uint16\\\",name:\\\"glyphStartIndex\\\"},{type:\\\"Uint16\\\",name:\\\"numGlyphs\\\"},{type:\\\"Uint32\\\",name:\\\"vertexStartIndex\\\"},{type:\\\"Uint32\\\",name:\\\"lineStartIndex\\\"},{type:\\\"Uint32\\\",name:\\\"lineLength\\\"},{type:\\\"Uint16\\\",name:\\\"segment\\\"},{type:\\\"Uint16\\\",name:\\\"lowerSize\\\"},{type:\\\"Uint16\\\",name:\\\"upperSize\\\"},{type:\\\"Float32\\\",name:\\\"lineOffsetX\\\"},{type:\\\"Float32\\\",name:\\\"lineOffsetY\\\"},{type:\\\"Uint8\\\",name:\\\"writingMode\\\"},{type:\\\"Uint8\\\",name:\\\"hidden\\\"}]),Xr([{type:\\\"Float32\\\",name:\\\"offsetX\\\"}]),Xr([{type:\\\"Int16\\\",name:\\\"x\\\"},{type:\\\"Int16\\\",name:\\\"y\\\"},{type:\\\"Int16\\\",name:\\\"tileUnitDistanceFromAnchor\\\"}]);var Da={\\\"!\\\":\\\"\\\\ufe15\\\",\\\"#\\\":\\\"\\\\uff03\\\",$:\\\"\\\\uff04\\\",\\\"%\\\":\\\"\\\\uff05\\\",\\\"&\\\":\\\"\\\\uff06\\\",\\\"(\\\":\\\"\\\\ufe35\\\",\\\")\\\":\\\"\\\\ufe36\\\",\\\"*\\\":\\\"\\\\uff0a\\\",\\\"+\\\":\\\"\\\\uff0b\\\",\\\",\\\":\\\"\\\\ufe10\\\",\\\"-\\\":\\\"\\\\ufe32\\\",\\\".\\\":\\\"\\\\u30fb\\\",\\\"/\\\":\\\"\\\\uff0f\\\",\\\":\\\":\\\"\\\\ufe13\\\",\\\";\\\":\\\"\\\\ufe14\\\",\\\"<\\\":\\\"\\\\ufe3f\\\",\\\"=\\\":\\\"\\\\uff1d\\\",\\\">\\\":\\\"\\\\ufe40\\\",\\\"?\\\":\\\"\\\\ufe16\\\",\\\"@\\\":\\\"\\\\uff20\\\",\\\"[\\\":\\\"\\\\ufe47\\\",\\\"\\\\\\\\\\\":\\\"\\\\uff3c\\\",\\\"]\\\":\\\"\\\\ufe48\\\",\\\"^\\\":\\\"\\\\uff3e\\\",_:\\\"\\\\ufe33\\\",\\\"`\\\":\\\"\\\\uff40\\\",\\\"{\\\":\\\"\\\\ufe37\\\",\\\"|\\\":\\\"\\\\u2015\\\",\\\"}\\\":\\\"\\\\ufe38\\\",\\\"~\\\":\\\"\\\\uff5e\\\",\\\"\\\\xa2\\\":\\\"\\\\uffe0\\\",\\\"\\\\xa3\\\":\\\"\\\\uffe1\\\",\\\"\\\\xa5\\\":\\\"\\\\uffe5\\\",\\\"\\\\xa6\\\":\\\"\\\\uffe4\\\",\\\"\\\\xac\\\":\\\"\\\\uffe2\\\",\\\"\\\\xaf\\\":\\\"\\\\uffe3\\\",\\\"\\\\u2013\\\":\\\"\\\\ufe32\\\",\\\"\\\\u2014\\\":\\\"\\\\ufe31\\\",\\\"\\\\u2018\\\":\\\"\\\\ufe43\\\",\\\"\\\\u2019\\\":\\\"\\\\ufe44\\\",\\\"\\\\u201c\\\":\\\"\\\\ufe41\\\",\\\"\\\\u201d\\\":\\\"\\\\ufe42\\\",\\\"\\\\u2026\\\":\\\"\\\\ufe19\\\",\\\"\\\\u2027\\\":\\\"\\\\u30fb\\\",\\\"\\\\u20a9\\\":\\\"\\\\uffe6\\\",\\\"\\\\u3001\\\":\\\"\\\\ufe11\\\",\\\"\\\\u3002\\\":\\\"\\\\ufe12\\\",\\\"\\\\u3008\\\":\\\"\\\\ufe3f\\\",\\\"\\\\u3009\\\":\\\"\\\\ufe40\\\",\\\"\\\\u300a\\\":\\\"\\\\ufe3d\\\",\\\"\\\\u300b\\\":\\\"\\\\ufe3e\\\",\\\"\\\\u300c\\\":\\\"\\\\ufe41\\\",\\\"\\\\u300d\\\":\\\"\\\\ufe42\\\",\\\"\\\\u300e\\\":\\\"\\\\ufe43\\\",\\\"\\\\u300f\\\":\\\"\\\\ufe44\\\",\\\"\\\\u3010\\\":\\\"\\\\ufe3b\\\",\\\"\\\\u3011\\\":\\\"\\\\ufe3c\\\",\\\"\\\\u3014\\\":\\\"\\\\ufe39\\\",\\\"\\\\u3015\\\":\\\"\\\\ufe3a\\\",\\\"\\\\u3016\\\":\\\"\\\\ufe17\\\",\\\"\\\\u3017\\\":\\\"\\\\ufe18\\\",\\\"\\\\uff01\\\":\\\"\\\\ufe15\\\",\\\"\\\\uff08\\\":\\\"\\\\ufe35\\\",\\\"\\\\uff09\\\":\\\"\\\\ufe36\\\",\\\"\\\\uff0c\\\":\\\"\\\\ufe10\\\",\\\"\\\\uff0d\\\":\\\"\\\\ufe32\\\",\\\"\\\\uff0e\\\":\\\"\\\\u30fb\\\",\\\"\\\\uff1a\\\":\\\"\\\\ufe13\\\",\\\"\\\\uff1b\\\":\\\"\\\\ufe14\\\",\\\"\\\\uff1c\\\":\\\"\\\\ufe3f\\\",\\\"\\\\uff1e\\\":\\\"\\\\ufe40\\\",\\\"\\\\uff1f\\\":\\\"\\\\ufe16\\\",\\\"\\\\uff3b\\\":\\\"\\\\ufe47\\\",\\\"\\\\uff3d\\\":\\\"\\\\ufe48\\\",\\\"\\\\uff3f\\\":\\\"\\\\ufe33\\\",\\\"\\\\uff5b\\\":\\\"\\\\ufe37\\\",\\\"\\\\uff5c\\\":\\\"\\\\u2015\\\",\\\"\\\\uff5d\\\":\\\"\\\\ufe38\\\",\\\"\\\\uff5f\\\":\\\"\\\\ufe35\\\",\\\"\\\\uff60\\\":\\\"\\\\ufe36\\\",\\\"\\\\uff61\\\":\\\"\\\\ufe12\\\",\\\"\\\\uff62\\\":\\\"\\\\ufe41\\\",\\\"\\\\uff63\\\":\\\"\\\\ufe42\\\"},Ra=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(l);function Ba(t,e){var r=e.expression;if(\\\"constant\\\"===r.kind)return{functionType:\\\"constant\\\",layoutSize:r.evaluate(new Lr(t+1))};if(\\\"source\\\"===r.kind)return{functionType:\\\"source\\\"};for(var n=r.zoomStops,i=0;i<n.length&&n[i]<=t;)i++;for(var a=i=Math.max(0,i-1);a<n.length&&n[a]<t+1;)a++;a=Math.min(n.length-1,a);var o={min:n[i],max:n[a]};return\\\"composite\\\"===r.kind?{functionType:\\\"composite\\\",zoomRange:o,propertyValue:e.value}:{functionType:\\\"camera\\\",layoutSize:r.evaluate(new Lr(t+1)),zoomRange:o,sizeRange:{min:r.evaluate(new Lr(o.min)),max:r.evaluate(new Lr(o.max))},propertyValue:e.value}}pr(\\\"Anchor\\\",Ra);var Fa=ga.VectorTileFeature.types,Na=[{name:\\\"a_fade_opacity\\\",components:1,type:\\\"Uint8\\\",offset:0}];function ja(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),a,o,s?s[0]:0,s?s[1]:0)}function Va(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}var Ua=function(t){this.layoutVertexArray=new tn,this.indexArray=new fn,this.programConfigurations=t,this.segments=new Tn,this.dynamicLayoutVertexArray=new en,this.opacityVertexArray=new rn,this.placedSymbolArray=new yn};Ua.prototype.upload=function(t,e){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ea.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.programConfigurations.upload(t),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,La.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Na,!0),this.opacityVertexBuffer.itemSize=1},Ua.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},pr(\\\"SymbolBuffers\\\",Ua);var qa=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Tn,this.collisionVertexArray=new on};qa.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,za.members,!0)},qa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},pr(\\\"CollisionBuffers\\\",qa);var Ha=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Ba(this.zoom,e[\\\"text-size\\\"]),this.iconSizeData=Ba(this.zoom,e[\\\"icon-size\\\"]);var r=this.layers[0].layout;this.sortFeaturesByY=r.get(\\\"text-allow-overlap\\\")||r.get(\\\"icon-allow-overlap\\\")||r.get(\\\"text-ignore-placement\\\")||r.get(\\\"icon-ignore-placement\\\")};Ha.prototype.createArrays=function(){this.text=new Ua(new In(Ea.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new Ua(new In(Ea.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new qa(an,Oa.members,hn),this.collisionCircle=new qa(an,Ia.members,fn),this.glyphOffsetArray=new bn,this.lineVertexArray=new wn},Ha.prototype.populate=function(t,e){var r=this.layers[0],n=r.layout,i=n.get(\\\"text-font\\\"),a=n.get(\\\"text-field\\\"),o=n.get(\\\"icon-image\\\"),s=(\\\"constant\\\"!==a.value.kind||a.value.value.length>0)&&(\\\"constant\\\"!==i.value.kind||i.value.value.length>0),l=\\\"constant\\\"!==o.value.kind||o.value.value&&o.value.value.length>0;if(this.features=[],s||l){for(var c=e.iconDependencies,u=e.glyphDependencies,f=new Lr(this.zoom),h=0,p=t;h<p.length;h+=1){var d=p[h],g=d.feature,v=d.index,m=d.sourceLayerIndex;if(r._featureFilter(f,g)){var y=void 0;s&&(y=Pa(y=r.getValueAndResolveTokens(\\\"text-field\\\",g),r,g));var x=void 0;if(l&&(x=r.getValueAndResolveTokens(\\\"icon-image\\\",g)),y||x){var b={text:y,icon:x,index:v,sourceLayerIndex:m,geometry:Bn(g),properties:g.properties,type:Fa[g.type]};if(void 0!==g.id&&(b.id=g.id),this.features.push(b),x&&(c[x]=!0),y)for(var _=i.evaluate(g).join(\\\",\\\"),w=u[_]=u[_]||{},k=\\\"map\\\"===n.get(\\\"text-rotation-alignment\\\")&&\\\"line\\\"===n.get(\\\"symbol-placement\\\"),M=xr(y),A=0;A<y.length;A++)if(w[y.charCodeAt(A)]=!0,k&&M){var T=Da[y.charAt(A)];T&&(w[T.charCodeAt(0)]=!0)}}}}\\\"line\\\"===n.get(\\\"symbol-placement\\\")&&(this.features=function(t){var e={},r={},n=[],i=0;function a(e){n.push(t[e]),i++}function o(t,e,i){var a=r[t];return delete r[t],r[e]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function s(t,r,i){var a=e[r];return delete e[r],e[t]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+\\\":\\\"+n.x+\\\":\\\"+n.y}for(var c=0;c<t.length;c++){var u=t[c],f=u.geometry,h=u.text;if(h){var p=l(h,f),d=l(h,f,!0);if(p in r&&d in e&&r[p]!==e[d]){var g=s(p,d,f),v=o(p,d,n[g].geometry);delete e[p],delete r[d],r[l(h,n[v].geometry,!0)]=v,n[g].geometry=null}else p in r?o(p,d,f):d in e?s(p,d,f):(a(c),e[p]=i-1,r[d]=i-1)}else a(c)}return n.filter(function(t){return t.geometry})}(this.features))}},Ha.prototype.isEmpty=function(){return 0===this.symbolInstances.length},Ha.prototype.upload=function(t){this.text.upload(t,this.sortFeaturesByY),this.icon.upload(t,this.sortFeaturesByY),this.collisionBox.upload(t),this.collisionCircle.upload(t)},Ha.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},Ha.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),a={},o=t.segment+1;o<e.length;o++)a[o]={x:e[o].x,y:e[o].y,tileUnitDistanceFromAnchor:n},o<e.length-1&&(n+=e[o+1].dist(e[o]));for(var s=t.segment||0;s>=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var l=0;l<e.length;l++){var c=a[l];this.lineVertexArray.emplaceBack(c.x,c.y,c.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},Ha.prototype.addSymbols=function(t,e,r,n,i,a,o,s,l,c){for(var u=t.indexArray,f=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,p=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),d=this.glyphOffsetArray.length,g=p.vertexLength,v=0,m=e;v<m.length;v+=1){var y=m[v],x=y.tl,b=y.tr,_=y.bl,w=y.br,k=y.tex,M=p.vertexLength,A=y.glyphOffset[1];ja(f,s.x,s.y,x.x,A+x.y,k.x,k.y,r),ja(f,s.x,s.y,b.x,A+b.y,k.x+k.w,k.y,r),ja(f,s.x,s.y,_.x,A+_.y,k.x,k.y+k.h,r),ja(f,s.x,s.y,w.x,A+w.y,k.x+k.w,k.y+k.h,r),Va(h,s,0),u.emplaceBack(M,M+1,M+2),u.emplaceBack(M+1,M+2,M+3),p.vertexLength+=4,p.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(y.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,g,l,c,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],o,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,a)},Ha.prototype._addCollisionDebugVertex=function(t,e,r,n,i){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,n.x,n.y,Math.round(i.x),Math.round(i.y))},Ha.prototype.addCollisionDebugVertices=function(t,e,r,n,i,a,o,s){var c=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),u=c.vertexLength,f=i.layoutVertexArray,h=i.collisionVertexArray;if(this._addCollisionDebugVertex(f,h,a,o.anchor,new l(t,e)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(r,e)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(r,n)),this._addCollisionDebugVertex(f,h,a,o.anchor,new l(t,n)),c.vertexLength+=4,s){var p=i.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),c.primitiveLength+=2}else{var d=i.indexArray;d.emplaceBack(u,u+1),d.emplaceBack(u+1,u+2),d.emplaceBack(u+2,u+3),d.emplaceBack(u+3,u),c.primitiveLength+=4}},Ha.prototype.generateCollisionDebugBuffers=function(){for(var t=0,e=this.symbolInstances;t<e.length;t+=1){var r=e[t];r.textCollisionFeature={boxStartIndex:r.textBoxStartIndex,boxEndIndex:r.textBoxEndIndex},r.iconCollisionFeature={boxStartIndex:r.iconBoxStartIndex,boxEndIndex:r.iconBoxEndIndex};for(var n=0;n<2;n++){var i=r[0===n?\\\"textCollisionFeature\\\":\\\"iconCollisionFeature\\\"];if(i)for(var a=i.boxStartIndex;a<i.boxEndIndex;a++){var o=this.collisionBoxArray.get(a),s=o.x1,l=o.y1,c=o.x2,u=o.y2,f=o.radius>0;this.addCollisionDebugVertices(s,l,c,u,f?this.collisionCircle:this.collisionBox,o.anchorPoint,r,f)}}}},Ha.prototype.deserializeCollisionBoxes=function(t,e,r,n,i){for(var a={},o=e;o<r;o++){var s=t.get(o);if(0===s.radius){a.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},a.textFeatureIndex=s.featureIndex;break}a.textCircles||(a.textCircles=[],a.textFeatureIndex=s.featureIndex),a.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var l=n;l<i;l++){var c=t.get(l);if(0===c.radius){a.iconBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},a.iconFeatureIndex=c.featureIndex;break}}return a},Ha.prototype.hasTextData=function(){return this.text.segments.get().length>0},Ha.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Ha.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Ha.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Ha.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var r=[],n=0;n<this.symbolInstances.length;n++)r.push(n);var i=Math.sin(t),a=Math.cos(t);r.sort(function(t,r){var n=e.symbolInstances[t],o=e.symbolInstances[r];return(i*n.anchor.x+a*n.anchor.y|0)-(i*o.anchor.x+a*o.anchor.y|0)||o.featureIndex-n.featureIndex}),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var o=0,s=r;o<s.length;o+=1){var l=s[o],c=e.symbolInstances[l];e.featureSortOrder.push(c.featureIndex);for(var u=0,f=c.placedTextSymbolIndices;u<f.length;u+=1)for(var h=f[u],p=e.text.placedSymbolArray.get(h),d=p.vertexStartIndex+4*p.numGlyphs,g=p.vertexStartIndex;g<d;g+=4)e.text.indexArray.emplaceBack(g,g+1,g+2),e.text.indexArray.emplaceBack(g+1,g+2,g+3);var v=e.icon.placedSymbolArray.get(l);if(v.numGlyphs){var m=v.vertexStartIndex;e.icon.indexArray.emplaceBack(m,m+1,m+2),e.icon.indexArray.emplaceBack(m+1,m+2,m+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},pr(\\\"SymbolBucket\\\",Ha,{omit:[\\\"layers\\\",\\\"collisionBoxArray\\\",\\\"features\\\",\\\"compareText\\\"],shallow:[\\\"symbolInstances\\\"]}),Ha.MAX_GLYPHS=65535,Ha.addDynamicAttributes=Va;var Ga=new qr({\\\"symbol-placement\\\":new Nr(I.layout_symbol[\\\"symbol-placement\\\"]),\\\"symbol-spacing\\\":new Nr(I.layout_symbol[\\\"symbol-spacing\\\"]),\\\"symbol-avoid-edges\\\":new Nr(I.layout_symbol[\\\"symbol-avoid-edges\\\"]),\\\"icon-allow-overlap\\\":new Nr(I.layout_symbol[\\\"icon-allow-overlap\\\"]),\\\"icon-ignore-placement\\\":new Nr(I.layout_symbol[\\\"icon-ignore-placement\\\"]),\\\"icon-optional\\\":new Nr(I.layout_symbol[\\\"icon-optional\\\"]),\\\"icon-rotation-alignment\\\":new Nr(I.layout_symbol[\\\"icon-rotation-alignment\\\"]),\\\"icon-size\\\":new jr(I.layout_symbol[\\\"icon-size\\\"]),\\\"icon-text-fit\\\":new Nr(I.layout_symbol[\\\"icon-text-fit\\\"]),\\\"icon-text-fit-padding\\\":new Nr(I.layout_symbol[\\\"icon-text-fit-padding\\\"]),\\\"icon-image\\\":new jr(I.layout_symbol[\\\"icon-image\\\"]),\\\"icon-rotate\\\":new jr(I.layout_symbol[\\\"icon-rotate\\\"]),\\\"icon-padding\\\":new Nr(I.layout_symbol[\\\"icon-padding\\\"]),\\\"icon-keep-upright\\\":new Nr(I.layout_symbol[\\\"icon-keep-upright\\\"]),\\\"icon-offset\\\":new jr(I.layout_symbol[\\\"icon-offset\\\"]),\\\"icon-anchor\\\":new jr(I.layout_symbol[\\\"icon-anchor\\\"]),\\\"icon-pitch-alignment\\\":new Nr(I.layout_symbol[\\\"icon-pitch-alignment\\\"]),\\\"text-pitch-alignment\\\":new Nr(I.layout_symbol[\\\"text-pitch-alignment\\\"]),\\\"text-rotation-alignment\\\":new Nr(I.layout_symbol[\\\"text-rotation-alignment\\\"]),\\\"text-field\\\":new jr(I.layout_symbol[\\\"text-field\\\"]),\\\"text-font\\\":new jr(I.layout_symbol[\\\"text-font\\\"]),\\\"text-size\\\":new jr(I.layout_symbol[\\\"text-size\\\"]),\\\"text-max-width\\\":new jr(I.layout_symbol[\\\"text-max-width\\\"]),\\\"text-line-height\\\":new Nr(I.layout_symbol[\\\"text-line-height\\\"]),\\\"text-letter-spacing\\\":new jr(I.layout_symbol[\\\"text-letter-spacing\\\"]),\\\"text-justify\\\":new jr(I.layout_symbol[\\\"text-justify\\\"]),\\\"text-anchor\\\":new jr(I.layout_symbol[\\\"text-anchor\\\"]),\\\"text-max-angle\\\":new Nr(I.layout_symbol[\\\"text-max-angle\\\"]),\\\"text-rotate\\\":new jr(I.layout_symbol[\\\"text-rotate\\\"]),\\\"text-padding\\\":new Nr(I.layout_symbol[\\\"text-padding\\\"]),\\\"text-keep-upright\\\":new Nr(I.layout_symbol[\\\"text-keep-upright\\\"]),\\\"text-transform\\\":new jr(I.layout_symbol[\\\"text-transform\\\"]),\\\"text-offset\\\":new jr(I.layout_symbol[\\\"text-offset\\\"]),\\\"text-allow-overlap\\\":new Nr(I.layout_symbol[\\\"text-allow-overlap\\\"]),\\\"text-ignore-placement\\\":new Nr(I.layout_symbol[\\\"text-ignore-placement\\\"]),\\\"text-optional\\\":new Nr(I.layout_symbol[\\\"text-optional\\\"])}),Wa={paint:new qr({\\\"icon-opacity\\\":new jr(I.paint_symbol[\\\"icon-opacity\\\"]),\\\"icon-color\\\":new jr(I.paint_symbol[\\\"icon-color\\\"]),\\\"icon-halo-color\\\":new jr(I.paint_symbol[\\\"icon-halo-color\\\"]),\\\"icon-halo-width\\\":new jr(I.paint_symbol[\\\"icon-halo-width\\\"]),\\\"icon-halo-blur\\\":new jr(I.paint_symbol[\\\"icon-halo-blur\\\"]),\\\"icon-translate\\\":new Nr(I.paint_symbol[\\\"icon-translate\\\"]),\\\"icon-translate-anchor\\\":new Nr(I.paint_symbol[\\\"icon-translate-anchor\\\"]),\\\"text-opacity\\\":new jr(I.paint_symbol[\\\"text-opacity\\\"]),\\\"text-color\\\":new jr(I.paint_symbol[\\\"text-color\\\"]),\\\"text-halo-color\\\":new jr(I.paint_symbol[\\\"text-halo-color\\\"]),\\\"text-halo-width\\\":new jr(I.paint_symbol[\\\"text-halo-width\\\"]),\\\"text-halo-blur\\\":new jr(I.paint_symbol[\\\"text-halo-blur\\\"]),\\\"text-translate\\\":new Nr(I.paint_symbol[\\\"text-translate\\\"]),\\\"text-translate-anchor\\\":new Nr(I.paint_symbol[\\\"text-translate-anchor\\\"])}),layout:Ga},Ya=function(t){function e(e){t.call(this,e,Wa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),\\\"auto\\\"===this.layout.get(\\\"icon-rotation-alignment\\\")&&(\\\"line\\\"===this.layout.get(\\\"symbol-placement\\\")?this.layout._values[\\\"icon-rotation-alignment\\\"]=\\\"map\\\":this.layout._values[\\\"icon-rotation-alignment\\\"]=\\\"viewport\\\"),\\\"auto\\\"===this.layout.get(\\\"text-rotation-alignment\\\")&&(\\\"line\\\"===this.layout.get(\\\"symbol-placement\\\")?this.layout._values[\\\"text-rotation-alignment\\\"]=\\\"map\\\":this.layout._values[\\\"text-rotation-alignment\\\"]=\\\"viewport\\\"),\\\"auto\\\"===this.layout.get(\\\"text-pitch-alignment\\\")&&(this.layout._values[\\\"text-pitch-alignment\\\"]=this.layout.get(\\\"text-rotation-alignment\\\")),\\\"auto\\\"===this.layout.get(\\\"icon-pitch-alignment\\\")&&(this.layout._values[\\\"icon-pitch-alignment\\\"]=this.layout.get(\\\"icon-rotation-alignment\\\"))},e.prototype.getValueAndResolveTokens=function(t,e){var r,n=this.layout.get(t).evaluate(e),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||_e(i.value)?n:(r=e.properties,n.replace(/{([^{}]+)}/g,function(t,e){return e in r?String(r[e]):\\\"\\\"}))},e.prototype.createBucket=function(t){return new Ha(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Hr),Xa={paint:new qr({\\\"background-color\\\":new Nr(I.paint_background[\\\"background-color\\\"]),\\\"background-pattern\\\":new Vr(I.paint_background[\\\"background-pattern\\\"]),\\\"background-opacity\\\":new Nr(I.paint_background[\\\"background-opacity\\\"])})},Za=function(t){function e(e){t.call(this,e,Xa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Hr),$a={paint:new qr({\\\"raster-opacity\\\":new Nr(I.paint_raster[\\\"raster-opacity\\\"]),\\\"raster-hue-rotate\\\":new Nr(I.paint_raster[\\\"raster-hue-rotate\\\"]),\\\"raster-brightness-min\\\":new Nr(I.paint_raster[\\\"raster-brightness-min\\\"]),\\\"raster-brightness-max\\\":new Nr(I.paint_raster[\\\"raster-brightness-max\\\"]),\\\"raster-saturation\\\":new Nr(I.paint_raster[\\\"raster-saturation\\\"]),\\\"raster-contrast\\\":new Nr(I.paint_raster[\\\"raster-contrast\\\"]),\\\"raster-fade-duration\\\":new Nr(I.paint_raster[\\\"raster-fade-duration\\\"])})},Ja={circle:ni,heatmap:pi,hillshade:gi,fill:Ji,\\\"fill-extrusion\\\":aa,line:Sa,symbol:Ya,background:Za,raster:function(t){function e(e){t.call(this,e,$a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Hr)},Ka=i(function(t,e){t.exports=function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,n,i,a,o=[],s=0;s<t.length;s++)if(r=t[s].w||t[s].width,n=t[s].h||t[s].height,i=t[s].id,r&&n){if(!(a=this.packOne(r,n,i)))continue;e.inPlace&&(t[s].x=a.x,t[s].y=a.y,t[s].id=a.id),o.push(a)}return this.shrink(),o},t.prototype.packOne=function(t,r,n){var i,a,o,s,l,c,u,f,h={freebin:-1,shelf:-1,waste:1/0},p=0;if(\\\"string\\\"==typeof n||\\\"number\\\"==typeof n){if(i=this.getBin(n))return this.ref(i),i;\\\"number\\\"==typeof n&&(this.maxId=Math.max(n,this.maxId))}else n=++this.maxId;for(s=0;s<this.freebins.length;s++){if(r===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,r,n);r>i.maxh||t>i.maxw||r<=i.maxh&&t<=i.maxw&&(o=i.maxw*i.maxh-t*r)<h.waste&&(h.waste=o,h.freebin=s)}for(s=0;s<this.shelves.length;s++)if(p+=(a=this.shelves[s]).h,!(t>a.free)){if(r===a.h)return this.allocShelf(s,t,r,n);r>a.h||r<a.h&&(o=(a.h-r)*t)<h.waste&&(h.freebin=-1,h.waste=o,h.shelf=s)}return-1!==h.freebin?this.allocFreebin(h.freebin,t,r,n):-1!==h.shelf?this.allocShelf(h.shelf,t,r,n):r<=this.h-p&&t<=this.w?(a=new e(p,this.w,r),this.allocShelf(this.shelves.push(a)-1,t,r,n)):this.autoResize?(l=c=this.h,((u=f=this.w)<=l||t>u)&&(f=2*Math.max(t,u)),(l<u||r>l)&&(c=2*Math.max(r,l)),this.resize(f,c),this.packOne(t,r,n)):null},t.prototype.allocFreebin=function(t,e,r,n){var i=this.freebins.splice(t,1)[0];return i.id=n,i.w=e,i.h=r,i.refcount=0,this.bins[n]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,r,n){var i=this.shelves[t].alloc(e,r,n);return this.bins[n]=i,this.ref(i),i},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,r=0;r<this.shelves.length;r++){var n=this.shelves[r];e+=n.h,t=Math.max(n.w-n.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;r<this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e,r){if(t>this.free||e>this.h)return null;var n=this.x;return this.x+=t,this.free-=t,new function(t,e,r,n,i,a,o){this.id=t,this.x=e,this.y=r,this.w=n,this.h=i,this.maxw=a||n,this.maxh=o||i,this.refcount=0}(r,n,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}()}),Qa=function(t,e){var r=e.pixelRatio;this.paddedRect=t,this.pixelRatio=r},to={tl:{configurable:!0},br:{configurable:!0},displaySize:{configurable:!0}};to.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},to.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},to.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Qa.prototype,to);var eo=function(t){var e=new ui({width:0,height:0}),r={},n=new Ka(0,0,{autoResize:!0});for(var i in t){var a=t[i],o=n.packOne(a.data.width+2,a.data.height+2);e.resize({width:n.w,height:n.h}),ui.copy(a.data,e,{x:0,y:0},{x:o.x+1,y:o.y+1},a.data),r[i]=new Qa(o,a)}n.shrink(),e.resize({width:n.w,height:n.h}),this.image=e,this.positions=r};pr(\\\"ImagePosition\\\",Qa),pr(\\\"ImageAtlas\\\",eo);var ro=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,c=l>>1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},no=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<<c)-1,f=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},io=ao;function ao(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function oo(t){return t.type===ao.Bytes?t.readVarint()+t.pos:t.pos+1}function so(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function lo(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function co(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function uo(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function fo(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function ho(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function po(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function go(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function vo(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function mo(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function yo(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function xo(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function bo(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function _o(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}ao.Varint=0,ao.Fixed64=1,ao.Bytes=2,ao.Fixed32=5,ao.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=xo(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=_o(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=xo(this.buf,this.pos)+4294967296*xo(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=xo(this.buf,this.pos)+4294967296*_o(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=ro(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=ro(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return so(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return so(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return so(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return so(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return so(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return so(t,n,e);throw new Error(\\\"Expected varint not more than 10 bytes\\\")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n=\\\"\\\",i=e;i<r;){var a,o,s,l=t[i],c=null,u=l>239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(a=t[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=oo(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=oo(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===ao.Varint)for(;this.buf[this.pos++]>127;);else if(e===ao.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ao.Fixed32)this.pos+=4;else{if(e!==ao.Fixed64)throw new Error(\\\"Unimplemented type: \\\"+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),bo(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),bo(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),bo(this.buf,-1&t,this.pos),bo(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),bo(this.buf,-1&t,this.pos),bo(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error(\\\"Given varint doesn't fit into 10 bytes\\\");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a<e.length;a++){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&lo(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),no(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),no(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&lo(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ao.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,co,e)},writePackedSVarint:function(t,e){this.writeMessage(t,uo,e)},writePackedBoolean:function(t,e){this.writeMessage(t,po,e)},writePackedFloat:function(t,e){this.writeMessage(t,fo,e)},writePackedDouble:function(t,e){this.writeMessage(t,ho,e)},writePackedFixed32:function(t,e){this.writeMessage(t,go,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,vo,e)},writePackedFixed64:function(t,e){this.writeMessage(t,mo,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,yo,e)},writeBytesField:function(t,e){this.writeTag(t,ao.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ao.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ao.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ao.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ao.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ao.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ao.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ao.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ao.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ao.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var wo=3;function ko(t,e,r){1===t&&r.readMessage(Mo,e)}function Mo(t,e,r){if(3===t){var n=r.readMessage(Ao,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;e.push({id:i,bitmap:new ci({width:o+2*wo,height:s+2*wo},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Ao(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var To=wo,So=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,g([\\\"receive\\\"],this),this.target.addEventListener(\\\"message\\\",this.receive,!1)};So.prototype.send=function(t,e,r,n){var i=r?this.mapId+\\\":\\\"+this.callbackID++:null;r&&(this.callbacks[i]=r);var a=[];this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(i),data:gr(e,a)},a)},So.prototype.receive=function(t){var e,r=this,n=t.data,i=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var a=function(t,e){var n=[];r.target.postMessage({sourceMapId:r.mapId,type:\\\"<response>\\\",id:String(i),error:t?gr(t):null,data:gr(e,n)},n)};if(\\\"<response>\\\"===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&&n.error?e(vr(n.error)):e&&e(null,vr(n.data));else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.sourceMapId,vr(n.data),a);else if(void 0!==n.id&&this.parent.getWorkerSource){var o=n.type.split(\\\".\\\");this.parent.getWorkerSource(n.sourceMapId,o[0],o[1])[o[2]](vr(n.data),a)}else this.parent[n.type](vr(n.data))}},So.prototype.remove=function(){this.target.removeEventListener(\\\"message\\\",this.receive,!1)};var Co=n(i(function(t,e){!function(t){function e(t,e,n){var i=r(256*t,256*(e=Math.pow(2,n)-e-1),n),a=r(256*(t+1),256*(e+1),n);return i[0]+\\\",\\\"+i[1]+\\\",\\\"+a[0]+\\\",\\\"+a[1]}function r(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}t.getURL=function(t,r,n,i,a,o){return o=o||{},t+\\\"?\\\"+[\\\"bbox=\\\"+e(n,i,a),\\\"format=\\\"+(o.format||\\\"image/png\\\"),\\\"service=\\\"+(o.service||\\\"WMS\\\"),\\\"version=\\\"+(o.version||\\\"1.1.1\\\"),\\\"request=\\\"+(o.request||\\\"GetMap\\\"),\\\"srs=\\\"+(o.srs||\\\"EPSG:3857\\\"),\\\"width=\\\"+(o.width||256),\\\"height=\\\"+(o.height||256),\\\"layers=\\\"+r].join(\\\"&\\\")},t.getTileBBox=e,t.getMercCoords=r,Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(e)})),Eo=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Oo(0,t,e,r)};Eo.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Eo.prototype.url=function(t,e){var r=Co.getTileBBox(this.x,this.y,this.z),n=function(t,e,r){for(var n,i=\\\"\\\",a=t;a>0;a--)i+=(e&(n=1<<a-1)?1:0)+(r&n?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(\\\"{prefix}\\\",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(\\\"{z}\\\",String(this.z)).replace(\\\"{x}\\\",String(this.x)).replace(\\\"{y}\\\",String(\\\"tms\\\"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace(\\\"{quadkey}\\\",n).replace(\\\"{bbox-epsg-3857}\\\",r)};var Lo=function(t,e){this.wrap=t,this.canonical=e,this.key=Oo(t,e.z,e.x,e.y)},zo=function(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Eo(r,+n,+i),this.key=Oo(e,t,n,i)};function Oo(t,e,r,n){(t*=2)<0&&(t=-1*t-1);var i=1<<e;return 32*(i*i*t+i*n+r)+e}zo.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},zo.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new zo(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new zo(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},zo.prototype.isChildOf=function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},zo.prototype.children=function(t){if(this.overscaledZ>=t)return[new zo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new zo(e,this.wrap,e,r,n),new zo(e,this.wrap,e,r+1,n),new zo(e,this.wrap,e,r,n+1),new zo(e,this.wrap,e,r+1,n+1)]},zo.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},zo.prototype.wrapped=function(){return new zo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},zo.prototype.unwrapTo=function(t){return new zo(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},zo.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},zo.prototype.toUnwrapped=function(){return new Lo(this.wrap,this.canonical)},zo.prototype.toString=function(){return this.overscaledZ+\\\"/\\\"+this.canonical.x+\\\"/\\\"+this.canonical.y},zo.prototype.toCoordinate=function(){return new s(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)},pr(\\\"CanonicalTileID\\\",Eo),pr(\\\"OverscaledTileID\\\",zo,{omit:[\\\"posMatrix\\\"]});var Io=function(t,e,r){if(t<=0)throw new RangeError(\\\"Level must have positive dimension\\\");this.dim=t,this.border=e,this.stride=this.dim+2*this.border,this.data=r||new Int32Array((this.dim+2*this.border)*(this.dim+2*this.border))};Io.prototype.set=function(t,e,r){this.data[this._idx(t,e)]=r+65536},Io.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},Io.prototype._idx=function(t,e){if(t<-this.border||t>=this.dim+this.border||e<-this.border||e>=this.dim+this.border)throw new RangeError(\\\"out of range source coordinates for DEM data\\\");return(e+this.border)*this.stride+(t+this.border)},pr(\\\"Level\\\",Io);var Po=function(t,e,r){this.uid=t,this.scale=e||1,this.level=r||new Io(256,512),this.loaded=!!r};Po.prototype.loadFromImage=function(t,e){if(t.height!==t.width)throw new RangeError(\\\"DEM tiles must be square\\\");if(e&&\\\"mapbox\\\"!==e&&\\\"terrarium\\\"!==e)return _('\\\"'+e+'\\\" is not a valid encoding type. Valid types include \\\"mapbox\\\" and \\\"terrarium\\\".');var r=this.level=new Io(t.width,t.width/2),n=t.data;this._unpackData(r,n,e||\\\"mapbox\\\");for(var i=0;i<r.dim;i++)r.set(-1,i,r.get(0,i)),r.set(r.dim,i,r.get(r.dim-1,i)),r.set(i,-1,r.get(i,0)),r.set(i,r.dim,r.get(i,r.dim-1));r.set(-1,-1,r.get(0,0)),r.set(r.dim,-1,r.get(r.dim-1,0)),r.set(-1,r.dim,r.get(0,r.dim-1)),r.set(r.dim,r.dim,r.get(r.dim-1,r.dim-1)),this.loaded=!0},Po.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Po.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Po.prototype._unpackData=function(t,e,r){for(var n={mapbox:this._unpackMapbox,terrarium:this._unpackTerrarium}[r],i=0;i<t.dim;i++)for(var a=0;a<t.dim;a++){var o=4*(i*t.dim+a);t.set(a,i,this.scale*n(e[o],e[o+1],e[o+2]))}},Po.prototype.getPixels=function(){return new ui({width:this.level.dim+2*this.level.border,height:this.level.dim+2*this.level.border},new Uint8Array(this.level.data.buffer))},Po.prototype.backfillBorder=function(t,e,r){var n=this.level,i=t.level;if(n.dim!==i.dim)throw new Error(\\\"level mismatch (dem dimension)\\\");var a=e*n.dim,o=e*n.dim+n.dim,s=r*n.dim,l=r*n.dim+n.dim;switch(e){case-1:a=o-1;break;case 1:o=a+1}switch(r){case-1:s=l-1;break;case 1:l=s+1}for(var c=h(a,-n.border,n.dim+n.border),u=h(o,-n.border,n.dim+n.border),f=h(s,-n.border,n.dim+n.border),p=h(l,-n.border,n.dim+n.border),d=-e*n.dim,g=-r*n.dim,v=f;v<p;v++)for(var m=c;m<u;m++)n.set(m,v,i.get(m+d,v+g))},pr(\\\"DEMData\\\",Po);var Do=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};Do.prototype.encode=function(t){return this._stringToNumber[t]},Do.prototype.decode=function(t){return this._numberToString[t]};var Ro=function(t,e,r,n){this.type=\\\"Feature\\\",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)},Bo={geometry:{configurable:!0}};Bo.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Bo.geometry.set=function(t){this._geometry=t},Ro.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)\\\"_geometry\\\"!==e&&\\\"_vectorTileFeature\\\"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Ro.prototype,Bo);var Fo=function(t,e,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new lr(Dn,16,0),this.featureIndexArray=r||new Mn};function No(t,e){return e-t}Fo.prototype.insert=function(t,e,r,n,i){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);for(var o=0;o<e.length;o++){for(var s=e[o],l=[1/0,1/0,-1/0,-1/0],c=0;c<s.length;c++){var u=s[c];l[0]=Math.min(l[0],u.x),l[1]=Math.min(l[1],u.y),l[2]=Math.max(l[2],u.x),l[3]=Math.max(l[3],u.y)}l[0]<Dn&&l[1]<Dn&&l[2]>=0&&l[3]>=0&&this.grid.insert(a,l[0],l[1],l[2],l[3])}},Fo.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ga.VectorTile(new io(this.rawTileData)).layers,this.sourceLayerCoder=new Do(this.vtLayers?Object.keys(this.vtLayers).sort():[\\\"_geojsonTileLayer\\\"])),this.vtLayers},Fo.prototype.query=function(t,e){var r=this;this.loadVTLayers();for(var n=t.params||{},i=Dn/t.tileSize/t.scale,a=Re(n.filter),o=t.queryGeometry,s=t.queryPadding*i,l=1/0,c=1/0,u=-1/0,f=-1/0,h=0;h<o.length;h++)for(var p=o[h],d=0;d<p.length;d++){var g=p[d];l=Math.min(l,g.x),c=Math.min(c,g.y),u=Math.max(u,g.x),f=Math.max(f,g.y)}var v=this.grid.query(l-s,c-s,u+s,f+s);v.sort(No);for(var m,y={},x=function(s){var l=v[s];if(l!==m){m=l;var c=r.featureIndexArray.get(l),u=null;r.loadMatchingFeature(y,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,a,n.layers,e,function(e,n){return u||(u=Bn(e)),n.queryIntersectsFeature(o,e,u,r.z,t.transform,i,t.posMatrix)})}},b=0;b<v.length;b++)x(b);return y},Fo.prototype.loadMatchingFeature=function(t,e,r,n,i,a,o,s){var l=this.bucketLayerIDs[e];if(!a||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(a,l)){var c=this.sourceLayerCoder.decode(r),u=this.vtLayers[c].feature(n);if(i(new Lr(this.tileID.overscaledZ),u))for(var f=0;f<l.length;f++){var h=l[f];if(!(a&&a.indexOf(h)<0)){var p=o[h];if(p&&(!s||s(u,p))){var d=new Ro(u,this.z,this.x,this.y);d.layer=p.serialize();var g=t[h];void 0===g&&(g=t[h]=[]),g.push({featureIndex:n,feature:d})}}}}},Fo.prototype.lookupSymbolFeatures=function(t,e,r,n,i,a){var o={};this.loadVTLayers();for(var s=Re(n),l=0,c=t;l<c.length;l+=1){var u=c[l];this.loadMatchingFeature(o,e,r,u,s,i,a)}return o},Fo.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var n=0,i=r[e];n<i.length;n+=1)if(t===i[n])return!0;return!1},pr(\\\"FeatureIndex\\\",Fo,{omit:[\\\"rawTileData\\\",\\\"sourceLayerCoder\\\"]});var jo={horizontal:1,vertical:2,horizontalOnly:3},Vo={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Uo={};function qo(t,e,r,n){var i=Math.pow(t-e,2);return n?t<e?i/2:2*i:i+Math.abs(r)*r}function Ho(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Go(t,e,r,n,i,a){for(var o=null,s=qo(e,r,i,a),l=0,c=n;l<c.length;l+=1){var u=c[l],f=qo(e-u.x,r,i,a)+u.badness;f<=s&&(o=u,s=f)}return{index:t,x:e,priorBreak:o,badness:s}}function Wo(t,e,r,n){if(!r)return[];if(!t)return[];for(var i,a=[],o=function(t,e,r,n){for(var i=0,a=0;a<t.length;a++){var o=n[t.charCodeAt(a)];o&&(i+=o.metrics.advance+e)}return i/Math.max(1,Math.ceil(i/r))}(t,e,r,n),s=0,l=0;l<t.length;l++){var c=t.charCodeAt(l),u=n[c];u&&!Vo[c]&&(s+=u.metrics.advance+e),l<t.length-1&&(Uo[c]||!((i=c)<11904)&&(yr[\\\"Bopomofo Extended\\\"](i)||yr.Bopomofo(i)||yr[\\\"CJK Compatibility Forms\\\"](i)||yr[\\\"CJK Compatibility Ideographs\\\"](i)||yr[\\\"CJK Compatibility\\\"](i)||yr[\\\"CJK Radicals Supplement\\\"](i)||yr[\\\"CJK Strokes\\\"](i)||yr[\\\"CJK Symbols and Punctuation\\\"](i)||yr[\\\"CJK Unified Ideographs Extension A\\\"](i)||yr[\\\"CJK Unified Ideographs\\\"](i)||yr[\\\"Enclosed CJK Letters and Months\\\"](i)||yr[\\\"Halfwidth and Fullwidth Forms\\\"](i)||yr.Hiragana(i)||yr[\\\"Ideographic Description Characters\\\"](i)||yr[\\\"Kangxi Radicals\\\"](i)||yr[\\\"Katakana Phonetic Extensions\\\"](i)||yr.Katakana(i)||yr[\\\"Vertical Forms\\\"](i)||yr[\\\"Yi Radicals\\\"](i)||yr[\\\"Yi Syllables\\\"](i)))&&a.push(Go(l+1,s,o,a,Ho(c,t.charCodeAt(l+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Go(t.length,s,o,a,0,!0))}function Yo(t){var e=.5,r=.5;switch(t){case\\\"right\\\":case\\\"top-right\\\":case\\\"bottom-right\\\":e=1;break;case\\\"left\\\":case\\\"top-left\\\":case\\\"bottom-left\\\":e=0}switch(t){case\\\"bottom\\\":case\\\"bottom-right\\\":case\\\"bottom-left\\\":r=1;break;case\\\"top\\\":case\\\"top-right\\\":case\\\"top-left\\\":r=0}return{horizontalAlign:e,verticalAlign:r}}function Xo(t,e,r,n,i){if(i){var a=e[t[n].glyph];if(a)for(var o=a.metrics.advance,s=(t[n].x+o)*i,l=r;l<=n;l++)t[l].x-=s}}Uo[10]=!0,Uo[32]=!0,Uo[38]=!0,Uo[40]=!0,Uo[41]=!0,Uo[43]=!0,Uo[45]=!0,Uo[47]=!0,Uo[173]=!0,Uo[183]=!0,Uo[8203]=!0,Uo[8208]=!0,Uo[8211]=!0,Uo[8231]=!0,e.commonjsGlobal=r,e.unwrapExports=n,e.createCommonjsModule=i,e.default=self,e.default$1=l,e.getJSON=function(t,e){var r=T(t);return r.setRequestHeader(\\\"Accept\\\",\\\"application/json\\\"),r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var n;try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n)}else 401===r.status&&t.url.match(/mapbox.com/)?e(new A(r.statusText+\\\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens\\\",r.status,t.url)):e(new A(r.statusText,r.status,t.url))},r.send(),r},e.getImage=function(t,e){return S(t,function(t,r){if(t)e(t);else if(r){var n=new self.Image,i=self.URL||self.webkitURL;n.onload=function(){e(null,n),i.revokeObjectURL(n.src)};var a=new self.Blob([new Uint8Array(r.data)],{type:\\\"image/png\\\"});n.cacheControl=r.cacheControl,n.expires=r.expires,n.src=r.data.byteLength?i.createObjectURL(a):\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\\\"}})},e.ResourceType=M,e.RGBAImage=ui,e.default$2=Ka,e.ImagePosition=Qa,e.getArrayBuffer=S,e.default$3=function(t){return new io(t).readFields(ko,[])},e.default$4=yr,e.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),a=null;t.forEach(function(t,o){e(t,function(t,e){t&&(a=t),i[o]=e,0==--n&&r(a,i)})})},e.AlphaImage=ci,e.default$5=I,e.endsWith=v,e.extend=p,e.sphericalToCartesian=function(t){var e=t[0],r=t[1],n=t[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(n),y:e*Math.sin(r)*Math.sin(n),z:e*Math.cos(n)}},e.Evented=O,e.validateStyle=nr,e.validateLight=ir,e.emitValidationErrors=sr,e.default$6=tt,e.number=wt,e.Properties=qr,e.Transitionable=Ir,e.Transitioning=Dr,e.PossiblyEvaluated=Fr,e.DataConstantProperty=Nr,e.warnOnce=_,e.uniqueId=function(){return d++},e.default$7=So,e.pick=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n];i in t&&(r[i]=t[i])}return r},e.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},e.clamp=h,e.Event=L,e.ErrorEvent=z,e.OverscaledTileID=zo,e.default$8=Dn,e.createLayout=Xr,e.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;a++)e=Math.min(e,t[a].column),r=Math.min(r,t[a].row),n=Math.max(n,t[a].column),i=Math.max(i,t[a].row);var o=n-e,l=i-r,c=Math.max(o,l),u=Math.max(0,Math.floor(-Math.log(c)/Math.LN2));return new s((e+n)/2,(r+i)/2,0).zoomTo(u)},e.CanonicalTileID=Eo,e.RasterBoundsArray=Jr,e.getVideo=function(t,e){var r,n,i=self.document.createElement(\\\"video\\\");i.onloadstart=function(){e(null,i)};for(var a=0;a<t.length;a++){var o=self.document.createElement(\\\"source\\\");r=t[a],n=void 0,(n=self.document.createElement(\\\"a\\\")).href=r,(n.protocol!==self.document.location.protocol||n.host!==self.document.location.host)&&(i.crossOrigin=\\\"Anonymous\\\"),o.src=t[a],i.appendChild(o)}return i},e.default$9=P,e.bindAll=g,e.default$10=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(!t(e[n],r[n]))return!1;return!0}if(\\\"object\\\"==typeof e&&null!==e&&null!==r){if(\\\"object\\\"!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var i in e)if(!t(e[i],r[i]))return!1;return!0}return e===r},e.parseCacheControl=function(t){var e={};if(t.replace(/(?:^|(?:\\\\s*\\\\,\\\\s*))([^\\\\x00-\\\\x20\\\\(\\\\)<>@\\\\,;\\\\:\\\\\\\\\\\"\\\\/\\\\[\\\\]\\\\?\\\\=\\\\{\\\\}\\\\x7F]+)(?:\\\\=(?:([^\\\\x00-\\\\x20\\\\(\\\\)<>@\\\\,;\\\\:\\\\\\\\\\\"\\\\/\\\\[\\\\]\\\\?\\\\=\\\\{\\\\}\\\\x7F]+)|(?:\\\\\\\"((?:[^\\\"\\\\\\\\]|\\\\\\\\.)*)\\\\\\\")))?/g,function(t,r,n,i){var a=n||i;return e[r]=!a||a.toLowerCase(),\\\"\\\"}),e[\\\"max-age\\\"]){var r=parseInt(e[\\\"max-age\\\"],10);isNaN(r)?delete e[\\\"max-age\\\"]:e[\\\"max-age\\\"]=r}return e},e.default$11=Fo,e.default$12=Ro,e.default$13=Re,e.default$14=Ha,e.CollisionBoxArray=vn,e.default$15=Tn,e.TriangleIndexArray=fn,e.default$16=Lr,e.default$17=s,e.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},e.default$18=[\\\"type\\\",\\\"source\\\",\\\"source-layer\\\",\\\"minzoom\\\",\\\"maxzoom\\\",\\\"filter\\\",\\\"layout\\\"],e.mat4=ri,e.vec4=ei,e.getSizeData=Ba,e.evaluateSizeForFeature=function(t,e,r){var n=e;return\\\"source\\\"===t.functionType?r.lowerSize/10:\\\"composite\\\"===t.functionType?wt(r.lowerSize/10,r.upperSize/10,n.uSizeT):n.uSize},e.evaluateSizeForZoom=function(t,e,r){if(\\\"constant\\\"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if(\\\"source\\\"===t.functionType)return{uSizeT:0,uSize:0};if(\\\"camera\\\"===t.functionType){var n=t.propertyValue,i=t.zoomRange,a=t.sizeRange,o=h(Se(n,r.specification).interpolationFactor(e,i.min,i.max),0,1);return{uSizeT:0,uSize:a.min+o*(a.max-a.min)}}var s=t.propertyValue,l=t.zoomRange;return{uSizeT:h(Se(s,r.specification).interpolationFactor(e,l.min,l.max),0,1),uSize:0}},e.addDynamicAttributes=Va,e.default$19=Wa,e.WritingMode=jo,e.multiPolygonIntersectsBufferedPoint=jn,e.multiPolygonIntersectsMultiPolygon=Vn,e.multiPolygonIntersectsBufferedMultiLine=Un,e.polygonIntersectsPolygon=function(t,e){for(var r=0;r<t.length;r++)if(Zn(e,t[r]))return!0;for(var n=0;n<e.length;n++)if(Zn(t,e[n]))return!0;return!!Hn(t,e)},e.distToSegmentSquared=Yn,e.default$20=ti,e.default$21=Hr,e.default$22=function(t){return new Ja[t.type](t)},e.clone=x,e.filterObject=y,e.mapObject=m,e.registerForPluginAvailability=function(t){return Tr?t({pluginURL:Tr,completionCallback:Mr}):Cr.once(\\\"pluginAvailable\\\",t),t},e.evented=Cr,e.default$23=mr,e.default$24=On,e.PosArray=$r,e.UnwrappedTileID=Lo,e.ease=f,e.bezier=u,e.setRTLTextPlugin=function(t,e){if(Ar)throw new Error(\\\"setRTLTextPlugin cannot be called multiple times.\\\");Ar=!0,Tr=t,Mr=function(t){t?(Ar=!1,Tr=null,e&&e(t)):Sr=!0},Cr.fire(new L(\\\"pluginAvailable\\\",{pluginURL:Tr,completionCallback:Mr}))},e.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},e.default$25=Ra,e.register=pr,e.GLYPH_PBF_BORDER=To,e.shapeText=function(t,e,r,n,i,a,o,s,l,c){var u=t.trim();c===jo.vertical&&(u=function(t){for(var e=\\\"\\\",r=0;r<t.length;r++){var n=t.charCodeAt(r+1)||null,i=t.charCodeAt(r-1)||null;n&&wr(n)&&!Da[t[r+1]]||i&&wr(i)&&!Da[t[r-1]]||!Da[t[r]]?e+=t[r]:e+=Da[t[r]]}return e}(u));var f=[],h={positionedGlyphs:f,text:u,top:s[1],bottom:s[1],left:s[0],right:s[0],writingMode:c},p=Er.processBidirectionalText;return function(t,e,r,n,i,a,o,s,l){for(var c=0,u=-17,f=0,h=t.positionedGlyphs,p=\\\"right\\\"===a?1:\\\"left\\\"===a?0:.5,d=0,g=r;d<g.length;d+=1){var v=g[d];if((v=v.trim()).length){for(var m=h.length,y=0;y<v.length;y++){var x=v.charCodeAt(y),b=e[x];b&&(_r(x)&&o!==jo.horizontal?(h.push({glyph:x,x:c,y:0,vertical:!0}),c+=l+s):(h.push({glyph:x,x:c,y:u,vertical:!1}),c+=b.metrics.advance+s))}if(h.length!==m){var _=c-s;f=Math.max(_,f),Xo(h,e,m,h.length-1,p)}c=0,u+=n}else u+=n}var w=Yo(i),k=w.horizontalAlign,M=w.verticalAlign;!function(t,e,r,n,i,a,o){for(var s=(e-r)*i,l=(-n*o+.5)*a,c=0;c<t.length;c++)t[c].x+=s,t[c].y+=l}(h,p,k,M,f,n,r.length);var A=r.length*n;t.top+=-M*A,t.bottom=t.top+A,t.left+=-k*f,t.right=t.left+f}(h,e,p?p(u,Wo(u,o,r,e)):function(t,e){for(var r=[],n=0,i=0,a=e;i<a.length;i+=1){var o=a[i];r.push(t.substring(n,o)),n=o}return n<t.length&&r.push(t.substring(n,t.length)),r}(u,Wo(u,o,r,e)),n,i,a,c,o,l),!!f.length&&h},e.shapeIcon=function(t,e,r){var n=Yo(r),i=n.horizontalAlign,a=n.verticalAlign,o=e[0],s=e[1],l=o-t.displaySize[0]*i,c=l+t.displaySize[0],u=s-t.displaySize[1]*a;return{image:t,top:u,bottom:u+t.displaySize[1],left:l,right:c}},e.allowsVerticalWritingMode=xr,e.allowsLetterSpacing=function(t){for(var e=0,r=t;e<r.length;e+=1)if(!br(r[e].charCodeAt(0)))return!1;return!0},e.default$26=Yi,e.default$27=Do,e.default$28=eo,e.default$29=ga,e.default$30=io,e.default$31=Po,e.__moduleExports=ga,e.default$32=l,e.__moduleExports$1=io,e.plugin=Er}),i(0,function(t){function e(t){var r=typeof t;if(\\\"number\\\"===r||\\\"boolean\\\"===r||\\\"string\\\"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var n=\\\"[\\\",i=0,a=t;i<a.length;i+=1)n+=e(a[i])+\\\",\\\";return n+\\\"]\\\"}for(var o=Object.keys(t).sort(),s=\\\"{\\\",l=0;l<o.length;l++)s+=JSON.stringify(o[l])+\\\":\\\"+e(t[o[l]])+\\\",\\\";return s+\\\"}\\\"}function r(r){for(var n=\\\"\\\",i=0,a=t.default$18;i<a.length;i+=1)n+=\\\"/\\\"+e(r[a[i]]);return n}var n=function(t){t&&this.replace(t)};function i(t,e,r,n,i){if(void 0===e.segment)return!0;for(var a=e,o=e.segment+1,s=0;s>-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],c=0;s<r/2;){var u=t[o-1],f=t[o],h=t[o+1];if(!h)return!1;var p=u.angleTo(f)-f.angleTo(h);for(p=Math.abs((p+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:p}),c+=p;s-l[0].distance>n;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}function a(e,r,n,a,o,s,l,c,u){var f=a?.6*s*l:0,h=Math.max(a?a.right-a.left:0,o?o.right-o.left:0),p=0===e[0].x||e[0].x===u||0===e[0].y||e[0].y===u;return r-h*l<r/4&&(r=h*l+r/4),function e(r,n,a,o,s,l,c,u,f){for(var h=l/2,p=0,d=0;d<r.length-1;d++)p+=r[d].dist(r[d+1]);for(var g=0,v=n-a,m=[],y=0;y<r.length-1;y++){for(var x=r[y],b=r[y+1],_=x.dist(b),w=b.angleTo(x);v+a<g+_;){var k=((v+=a)-g)/_,M=t.number(x.x,b.x,k),A=t.number(x.y,b.y,k);if(M>=0&&M<f&&A>=0&&A<f&&v-h>=0&&v+h<=p){var T=new t.default$25(M,A,w,y);T._round(),o&&!i(r,T,l,o,s)||m.push(T)}}g+=_}return u||m.length||c||(m=e(r,g/2,a,o,s,l,c,!0,f)),m}(e,p?r/2*c%r:(h/2+2*s)*l*c%r,r,f,n,h*l,p,!1,u)}n.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},n.prototype.update=function(e,n){for(var i=this,a=0,o=e;a<o.length;a+=1){var s=o[a];i._layerConfigs[s.id]=s;var l=i._layers[s.id]=t.default$22(s);l._featureFilter=t.default$13(l.filter)}for(var c=0,u=n;c<u.length;c+=1){var f=u[c];delete i._layerConfigs[f],delete i._layers[f]}this.familiesBySource={};for(var h=0,p=function(t){for(var e={},n=0;n<t.length;n++){var i=r(t[n]),a=e[i];a||(a=e[i]=[]),a.push(t[n])}var o=[];for(var s in e)o.push(e[s]);return o}(t.values(this._layerConfigs));h<p.length;h+=1){var d=p[h].map(function(t){return i._layers[t.id]}),g=d[0];if(\\\"none\\\"!==g.visibility){var v=g.source||\\\"\\\",m=i.familiesBySource[v];m||(m=i.familiesBySource[v]={});var y=g.sourceLayer||\\\"_geojsonTileLayer\\\",x=m[y];x||(x=m[y]=[]),x.push(d)}}};var o=function(){this.opacity=0,this.targetOpacity=0,this.time=0};o.prototype.clone=function(){var t=new o;return t.opacity=this.opacity,t.targetOpacity=this.targetOpacity,t.time=this.time,t},t.register(\\\"OpacityState\\\",o);var s=function(t,e,r,n,i,a,o,s,l,c,u){var f=o.top*s-l,h=o.bottom*s+l,p=o.left*s-l,d=o.right*s+l;if(this.boxStartIndex=t.length,c){var g=h-f,v=d-p;g>0&&(g=Math.max(10*s,g),this._addLineCollisionCircles(t,e,r,r.segment,v,g,n,i,a,u))}else t.emplaceBack(r.x,r.y,p,f,d,h,n,i,a,0,0);this.boxEndIndex=t.length};s.prototype._addLineCollisionCircles=function(t,e,r,n,i,a,o,s,l,c){var u=a/2,f=Math.floor(i/u),h=1+.4*Math.log(c)/Math.LN2,p=Math.floor(f*h/2),d=-a/2,g=r,v=n+1,m=d,y=-i/2,x=y-i/4;do{if(--v<0){if(m>y)return;v=0;break}m-=e[v].dist(g),g=e[v]}while(m>x);for(var b=e[v].dist(e[v+1]),_=-p;_<f+p;_++){var w=_*u,k=y+w;if(w<0&&(k+=w),w>i&&(k+=w-i),!(k<m)){for(;m+b<k;){if(m+=b,++v+1>=e.length)return;b=e[v].dist(e[v+1])}var M=k-m,A=e[v],T=e[v+1].sub(A)._unit()._mult(M)._add(A)._round(),S=Math.abs(k-d)<u?0:.8*(k-d);t.emplaceBack(T.x,T.y,-a/2,-a/2,a/2,a/2,o,s,l,a/2,S)}}};var l=u,c=u;function u(t,e){if(!(this instanceof u))return new u(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||f,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)}function f(t,e){return t<e?-1:t>e?1:0}function h(e,r,n){void 0===r&&(r=1),void 0===n&&(n=!1);for(var i=1/0,a=1/0,o=-1/0,s=-1/0,c=e[0],u=0;u<c.length;u++){var f=c[u];(!u||f.x<i)&&(i=f.x),(!u||f.y<a)&&(a=f.y),(!u||f.x>o)&&(o=f.x),(!u||f.y>s)&&(s=f.y)}var h=o-i,g=s-a,v=Math.min(h,g),m=v/2,y=new l(null,p);if(0===v)return new t.default$1(i,a);for(var x=i;x<o;x+=v)for(var b=a;b<s;b+=v)y.push(new d(x+m,b+m,m,e));for(var _=function(t){for(var e=0,r=0,n=0,i=t[0],a=0,o=i.length,s=o-1;a<o;s=a++){var l=i[a],c=i[s],u=l.x*c.y-c.x*l.y;r+=(l.x+c.x)*u,n+=(l.y+c.y)*u,e+=3*u}return new d(r/e,n/e,0,t)}(e),w=y.length;y.length;){var k=y.pop();(k.d>_.d||!_.d)&&(_=k,n&&console.log(\\\"found best %d after %d probes\\\",Math.round(1e4*k.d)/1e4,w)),k.max-_.d<=r||(m=k.h/2,y.push(new d(k.p.x-m,k.p.y-m,m,e)),y.push(new d(k.p.x+m,k.p.y-m,m,e)),y.push(new d(k.p.x-m,k.p.y+m,m,e)),y.push(new d(k.p.x+m,k.p.y+m,m,e)),w+=4)}return n&&(console.log(\\\"num probes: \\\"+w),console.log(\\\"best distance: \\\"+_.d)),_.p}function p(t,e){return e.max-t.max}function d(e,r,n,i){this.p=new t.default$1(e,r),this.h=n,this.d=function(e,r){for(var n=!1,i=1/0,a=0;a<r.length;a++)for(var o=r[a],s=0,l=o.length,c=l-1;s<l;c=s++){var u=o[s],f=o[c];u.y>e.y!=f.y>e.y&&e.x<(f.x-u.x)*(e.y-u.y)/(f.y-u.y)+u.x&&(n=!n),i=Math.min(i,t.distToSegmentSquared(e,u,f))}return(n?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}function g(e,r,n,i,a,o){e.createArrays(),e.symbolInstances=[];var s=512*e.overscaling;e.tilePixelRatio=t.default$8/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if(\\\"composite\\\"===e.textSizeData.functionType){var f=e.textSizeData.zoomRange,h=f.min,p=f.max;u.compositeTextSizes=[c[\\\"text-size\\\"].possiblyEvaluate(new t.default$16(h)),c[\\\"text-size\\\"].possiblyEvaluate(new t.default$16(p))]}if(\\\"composite\\\"===e.iconSizeData.functionType){var d=e.iconSizeData.zoomRange,g=d.min,m=d.max;u.compositeIconSizes=[c[\\\"icon-size\\\"].possiblyEvaluate(new t.default$16(g)),c[\\\"icon-size\\\"].possiblyEvaluate(new t.default$16(m))]}u.layoutTextSize=c[\\\"text-size\\\"].possiblyEvaluate(new t.default$16(e.zoom+1)),u.layoutIconSize=c[\\\"icon-size\\\"].possiblyEvaluate(new t.default$16(e.zoom+1)),u.textMaxSize=c[\\\"text-size\\\"].possiblyEvaluate(new t.default$16(18));for(var y=24*l.get(\\\"text-line-height\\\"),x=\\\"map\\\"===l.get(\\\"text-rotation-alignment\\\")&&\\\"line\\\"===l.get(\\\"symbol-placement\\\"),b=l.get(\\\"text-keep-upright\\\"),_=0,w=e.features;_<w.length;_+=1){var k=w[_],M=l.get(\\\"text-font\\\").evaluate(k).join(\\\",\\\"),A=r[M]||{},T=n[M]||{},S={},C=k.text;if(C){var E=l.get(\\\"text-offset\\\").evaluate(k).map(function(t){return 24*t}),L=24*l.get(\\\"text-letter-spacing\\\").evaluate(k),z=t.allowsLetterSpacing(C)?L:0,O=l.get(\\\"text-anchor\\\").evaluate(k),I=l.get(\\\"text-justify\\\").evaluate(k),P=\\\"line\\\"!==l.get(\\\"symbol-placement\\\")?24*l.get(\\\"text-max-width\\\").evaluate(k):0;S.horizontal=t.shapeText(C,A,P,y,O,I,z,E,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(C)&&x&&b&&(S.vertical=t.shapeText(C,A,P,y,O,I,z,E,24,t.WritingMode.vertical))}var D=void 0;if(k.icon){var R=i[k.icon];R&&(D=t.shapeIcon(a[k.icon],l.get(\\\"icon-offset\\\").evaluate(k),l.get(\\\"icon-anchor\\\").evaluate(k)),void 0===e.sdfIcons?e.sdfIcons=R.sdf:e.sdfIcons!==R.sdf&&t.warnOnce(\\\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\\\"),R.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==l.get(\\\"icon-rotate\\\").constantOr(1)&&(e.iconsNeedLinear=!0))}(S.horizontal||D)&&v(e,k,S,D,T,u)}o&&e.generateCollisionDebugBuffers()}function v(e,r,n,i,l,c){var u=c.layoutTextSize.evaluate(r),f=c.layoutIconSize.evaluate(r),p=c.textMaxSize.evaluate(r);void 0===p&&(p=u);var d=e.layers[0].layout,g=d.get(\\\"text-offset\\\").evaluate(r),v=d.get(\\\"icon-offset\\\").evaluate(r),x=u/24,b=e.tilePixelRatio*x,_=e.tilePixelRatio*p/24,w=e.tilePixelRatio*f,k=e.tilePixelRatio*d.get(\\\"symbol-spacing\\\"),M=d.get(\\\"text-padding\\\")*e.tilePixelRatio,A=d.get(\\\"icon-padding\\\")*e.tilePixelRatio,T=d.get(\\\"text-max-angle\\\")/180*Math.PI,S=\\\"map\\\"===d.get(\\\"text-rotation-alignment\\\")&&\\\"line\\\"===d.get(\\\"symbol-placement\\\"),C=\\\"map\\\"===d.get(\\\"icon-rotation-alignment\\\")&&\\\"line\\\"===d.get(\\\"symbol-placement\\\"),E=k/2,L=function(a,u){u.x<0||u.x>=t.default$8||u.y<0||u.y>=t.default$8||e.symbolInstances.push(function(e,r,n,i,a,l,c,u,f,h,p,d,g,v,y,x,b,_,w,k,M){var A,T,S=e.addToLineVertexArray(r,n),C=0,E=0,L=0,z=i.horizontal?i.horizontal.text:\\\"\\\",O=[];i.horizontal&&(A=new s(c,n,r,u,f,h,i.horizontal,p,d,g,e.overscaling),E+=m(e,r,i.horizontal,l,g,w,v,S,i.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,O,k,M),i.vertical&&(L+=m(e,r,i.vertical,l,g,w,v,S,t.WritingMode.vertical,O,k,M)));var I=A?A.boxStartIndex:e.collisionBoxArray.length,P=A?A.boxEndIndex:e.collisionBoxArray.length;if(a){var D=function(e,r,n,i,a,o){var s,l,c,u,f=r.image,h=n.layout,p=r.top-1/f.pixelRatio,d=r.left-1/f.pixelRatio,g=r.bottom+1/f.pixelRatio,v=r.right+1/f.pixelRatio;if(\\\"none\\\"!==h.get(\\\"icon-text-fit\\\")&&a){var m=v-d,y=g-p,x=h.get(\\\"text-size\\\").evaluate(o)/24,b=a.left*x,_=a.right*x,w=a.top*x,k=_-b,M=a.bottom*x-w,A=h.get(\\\"icon-text-fit-padding\\\")[0],T=h.get(\\\"icon-text-fit-padding\\\")[1],S=h.get(\\\"icon-text-fit-padding\\\")[2],C=h.get(\\\"icon-text-fit-padding\\\")[3],E=\\\"width\\\"===h.get(\\\"icon-text-fit\\\")?.5*(M-y):0,L=\\\"height\\\"===h.get(\\\"icon-text-fit\\\")?.5*(k-m):0,z=\\\"width\\\"===h.get(\\\"icon-text-fit\\\")||\\\"both\\\"===h.get(\\\"icon-text-fit\\\")?k:m,O=\\\"height\\\"===h.get(\\\"icon-text-fit\\\")||\\\"both\\\"===h.get(\\\"icon-text-fit\\\")?M:y;s=new t.default$1(b+L-C,w+E-A),l=new t.default$1(b+L+T+z,w+E-A),c=new t.default$1(b+L+T+z,w+E+S+O),u=new t.default$1(b+L-C,w+E+S+O)}else s=new t.default$1(d,p),l=new t.default$1(v,p),c=new t.default$1(v,g),u=new t.default$1(d,g);var I=n.layout.get(\\\"icon-rotate\\\").evaluate(o)*Math.PI/180;if(I){var P=Math.sin(I),D=Math.cos(I),R=[D,-P,P,D];s._matMult(R),l._matMult(R),u._matMult(R),c._matMult(R)}return[{tl:s,tr:l,bl:u,br:c,tex:f.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,a,l,0,i.horizontal,w);T=new s(c,n,r,u,f,h,a,y,x,!1,e.overscaling),C=4*D.length;var R=e.iconSizeData,B=null;\\\"source\\\"===R.functionType?B=[10*l.layout.get(\\\"icon-size\\\").evaluate(w)]:\\\"composite\\\"===R.functionType&&(B=[10*M.compositeIconSizes[0].evaluate(w),10*M.compositeIconSizes[1].evaluate(w)]),e.addSymbols(e.icon,D,B,_,b,w,!1,r,S.lineStartIndex,S.lineLength)}var F=T?T.boxStartIndex:e.collisionBoxArray.length,N=T?T.boxEndIndex:e.collisionBoxArray.length;return e.glyphOffsetArray.length>=t.default$14.MAX_GLYPHS&&t.warnOnce(\\\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\\\"),{key:z,textBoxStartIndex:I,textBoxEndIndex:P,iconBoxStartIndex:F,iconBoxEndIndex:N,textOffset:v,iconOffset:_,anchor:r,line:n,featureIndex:u,feature:w,numGlyphVertices:E,numVerticalGlyphVertices:L,numIconVertices:C,textOpacityState:new o,iconOpacityState:new o,isDuplicate:!1,placedTextSymbolIndices:O,crossTileID:0}}(e,u,a,n,i,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,b,M,S,g,w,A,C,v,r,l,c))};if(\\\"line\\\"===d.get(\\\"symbol-placement\\\"))for(var z=0,O=function(e,r,n,i,a){for(var o=[],s=0;s<e.length;s++)for(var l=e[s],c=void 0,u=0;u<l.length-1;u++){var f=l[u],h=l[u+1];f.x<0&&h.x<0||(f.x<0?f=new t.default$1(0,f.y+(h.y-f.y)*((0-f.x)/(h.x-f.x)))._round():h.x<0&&(h=new t.default$1(0,f.y+(h.y-f.y)*((0-f.x)/(h.x-f.x)))._round()),f.y<0&&h.y<0||(f.y<0?f=new t.default$1(f.x+(h.x-f.x)*((0-f.y)/(h.y-f.y)),0)._round():h.y<0&&(h=new t.default$1(f.x+(h.x-f.x)*((0-f.y)/(h.y-f.y)),0)._round()),f.x>=i&&h.x>=i||(f.x>=i?f=new t.default$1(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round():h.x>=i&&(h=new t.default$1(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new t.default$1(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new t.default$1(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round()),c&&f.equals(c[c.length-1])||(c=[f],o.push(c)),c.push(h)))))}return o}(r.geometry,0,0,t.default$8,t.default$8);z<O.length;z+=1)for(var I=O[z],P=0,D=a(I,k,T,n.vertical||n.horizontal,i,24,_,e.overscaling,t.default$8);P<D.length;P+=1){var R=D[P],B=n.horizontal;B&&y(e,B.text,E,R)||L(I,R)}else if(\\\"Polygon\\\"===r.type)for(var F=0,N=t.default$26(r.geometry,0);F<N.length;F+=1){var j=N[F],V=h(j,16);L(j[0],new t.default$25(V.x,V.y,0))}else if(\\\"LineString\\\"===r.type)for(var U=0,q=r.geometry;U<q.length;U+=1){var H=q[U];L(H,new t.default$25(H[0].x,H[0].y,0))}else if(\\\"Point\\\"===r.type)for(var G=0,W=r.geometry;G<W.length;G+=1)for(var Y=0,X=W[G];Y<X.length;Y+=1){var Z=X[Y];L([Z],new t.default$25(Z.x,Z.y,0))}}function m(e,r,n,i,a,o,s,l,c,u,f,h){var p=function(e,r,n,i,a,o){for(var s=n.layout.get(\\\"text-rotate\\\").evaluate(a)*Math.PI/180,l=n.layout.get(\\\"text-offset\\\").evaluate(a).map(function(t){return 24*t}),c=r.positionedGlyphs,u=[],f=0;f<c.length;f++){var h=c[f],p=o[h.glyph];if(p){var d=p.rect;if(d){var g=t.GLYPH_PBF_BORDER+1,v=p.metrics.advance/2,m=i?[h.x+v,h.y]:[0,0],y=i?[0,0]:[h.x+v+l[0],h.y+l[1]],x=p.metrics.left-g-v+y[0],b=-p.metrics.top-g+y[1],_=x+d.w,w=b+d.h,k=new t.default$1(x,b),M=new t.default$1(_,b),A=new t.default$1(x,w),T=new t.default$1(_,w);if(i&&h.vertical){var S=new t.default$1(-v,v),C=-Math.PI/2,E=new t.default$1(5,0);k._rotateAround(C,S)._add(E),M._rotateAround(C,S)._add(E),A._rotateAround(C,S)._add(E),T._rotateAround(C,S)._add(E)}if(s){var L=Math.sin(s),z=Math.cos(s),O=[z,-L,L,z];k._matMult(O),M._matMult(O),A._matMult(O),T._matMult(O)}u.push({tl:k,tr:M,bl:A,br:T,tex:d,writingMode:r.writingMode,glyphOffset:m})}}}return u}(0,n,i,a,o,f),d=e.textSizeData,g=null;return\\\"source\\\"===d.functionType?g=[10*i.layout.get(\\\"text-size\\\").evaluate(o)]:\\\"composite\\\"===d.functionType&&(g=[10*h.compositeTextSizes[0].evaluate(o),10*h.compositeTextSizes[1].evaluate(o)]),e.addSymbols(e.text,p,g,s,a,o,c,r,l.lineStartIndex,l.lineLength),u.push(e.text.placedSymbolArray.length-1),4*p.length}function y(t,e,r,n){var i=t.compareText;if(e in i){for(var a=i[e],o=a.length-1;o>=0;o--)if(n.dist(a[o])<r)return!0}else i[e]=[];return i[e].push(n),!1}u.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,a=e[i];if(r(n,a)>=0)break;e[t]=a,t=i}e[t]=n},_down:function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t<n;){var a=1+(t<<1),o=a+1,s=e[a];if(o<this.length&&r(e[o],s)<0&&(a=o,s=e[o]),r(s,i)>=0)break;e[t]=s,t=a}e[t]=i}},l.default=c;var x=function(e){var r=new t.AlphaImage({width:0,height:0}),n={},i=new t.default$2(0,0,{autoResize:!0});for(var a in e){var o=e[a],s=n[a]={};for(var l in o){var c=o[+l];if(c&&0!==c.bitmap.width&&0!==c.bitmap.height){var u=i.packOne(c.bitmap.width+2,c.bitmap.height+2);r.resize({width:i.w,height:i.h}),t.AlphaImage.copy(c.bitmap,r,{x:0,y:0},{x:u.x+1,y:u.y+1},c.bitmap),s[l]={rect:u,metrics:c.metrics}}}}i.shrink(),r.resize({width:i.w,height:i.h}),this.image=r,this.positions=n};t.register(\\\"GlyphAtlas\\\",x);var b=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming};function _(e,r){for(var n=new t.default$16(r),i=0,a=e;i<a.length;i+=1)a[i].recalculate(n)}b.prototype.parse=function(e,r,n,i){var a=this;this.status=\\\"parsing\\\",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var o=new t.default$27(Object.keys(e.layers).sort()),s=new t.default$11(this.tileID);s.bucketLayerIDs=[];var l,c,u,f={},h={featureIndex:s,iconDependencies:{},glyphDependencies:{}},p=r.familiesBySource[this.source];for(var d in p){var v=e.layers[d];if(v){1===v.version&&t.warnOnce('Vector tile source \\\"'+a.source+'\\\" layer \\\"'+d+'\\\" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var m=o.encode(d),y=[],b=0;b<v.length;b++){var w=v.feature(b);y.push({feature:w,index:b,sourceLayerIndex:m})}for(var k=0,M=p[d];k<M.length;k+=1){var A=M[k],T=A[0];T.minzoom&&a.zoom<Math.floor(T.minzoom)||T.maxzoom&&a.zoom>=T.maxzoom||\\\"none\\\"!==T.visibility&&(_(A,a.zoom),(f[T.id]=T.createBucket({index:s.bucketLayerIDs.length,layers:A,zoom:a.zoom,pixelRatio:a.pixelRatio,overscaling:a.overscaling,collisionBoxArray:a.collisionBoxArray,sourceLayerIndex:m})).populate(y,h),s.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var S=t.mapObject(h.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(S).length?n.send(\\\"getGlyphs\\\",{uid:this.uid,stacks:S},function(t,e){l||(l=t,c=e,E.call(a))}):c={};var C=Object.keys(h.iconDependencies);function E(){if(l)return i(l);if(c&&u){var e=new x(c),r=new t.default$28(u);for(var n in f){var a=f[n];a instanceof t.default$14&&(_(a.layers,this.zoom),g(a,c,e.positions,u,r.positions,this.showCollisionBoxes))}this.status=\\\"done\\\",i(null,{buckets:t.values(f).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,iconAtlasImage:r.image})}}C.length?n.send(\\\"getImages\\\",{icons:C},function(t,e){l||(l=t,u=e,E.call(a))}):u={},E.call(this)};var w=function(t){return!(!performance||!performance.getEntriesByName)&&performance.getEntriesByName(t)};function k(e,r){var n=t.getArrayBuffer(e.request,function(e,n){e?r(e):n&&r(null,{vectorTile:new t.default$29.VectorTile(new t.default$30(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires})});return function(){n.abort(),r()}}var M=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||k,this.loading={},this.loaded={}};M.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var a=this.loading[i]=new b(e);a.abort=this.loadVectorData(e,function(o,s){if(delete n.loading[i],o||!s)return r(o);var l=s.rawData,c={};s.expires&&(c.expires=s.expires),s.cacheControl&&(c.cacheControl=s.cacheControl);var u={};if(e.request&&e.request.collectResourceTiming){var f=w(e.request.url);f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))}),n.loaded=n.loaded||{},n.loaded[i]=a})},M.prototype.reloadTile=function(t,e){var r=this.loaded,n=t.uid,i=this;if(r&&r[n]){var a=r[n];a.showCollisionBoxes=t.showCollisionBoxes;var o=function(t,r){var n=a.reloadCallback;n&&(delete a.reloadCallback,a.parse(a.vectorTile,i.layerIndex,i.actor,n)),e(t,r)};\\\"parsing\\\"===a.status?a.reloadCallback=o:\\\"done\\\"===a.status&&a.parse(a.vectorTile,this.layerIndex,this.actor,o)}},M.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),e()},M.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var A=function(){this.loading={},this.loaded={}};A.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=new t.default$31(n);this.loading[n]=a,a.loadFromImage(e.rawImageData,i),delete this.loading[n],this.loaded=this.loaded||{},this.loaded[n]=a,r(null,a)},A.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var T={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function S(t){var e=0;if(t&&t.length>0){e+=Math.abs(C(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(C(t[r]))}return e}function C(t){var e,r,n,i,a,o,s=0,l=t.length;if(l>2){for(o=0;o<l;o++)o===l-2?(n=l-2,i=l-1,a=0):o===l-1?(n=l-1,i=0,a=1):(n=o,i=o+1,a=o+2),e=t[n],r=t[i],s+=(E(t[a][0])-E(e[0]))*Math.sin(E(r[1]));s=s*T.RADIUS*T.RADIUS/2}return s}function E(t){return t*Math.PI/180}var L={geometry:function t(e){var r,n=0;switch(e.type){case\\\"Polygon\\\":return S(e.coordinates);case\\\"MultiPolygon\\\":for(r=0;r<e.coordinates.length;r++)n+=S(e.coordinates[r]);return n;case\\\"Point\\\":case\\\"MultiPoint\\\":case\\\"LineString\\\":case\\\"MultiLineString\\\":return 0;case\\\"GeometryCollection\\\":for(r=0;r<e.geometries.length;r++)n+=t(e.geometries[r]);return n}},ring:C};function z(t,e){return function(r){return t(r,e)}}function O(t,e){e=!!e,t[0]=I(t[0],e);for(var r=1;r<t.length;r++)t[r]=I(t[r],!e);return t}function I(t,e){return function(t){return L.ring(t)>=0}(t)===e?t:t.reverse()}var P=t.default$29.VectorTileFeature.prototype.toGeoJSON,D=function(e){this._feature=e,this.extent=t.default$8,this.type=e.type,this.properties=e.tags,\\\"id\\\"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};D.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r<n.length;r+=1){var i=n[r];e.push([new t.default$1(i[0],i[1])])}return e}for(var a=[],o=0,s=this._feature.geometry;o<s.length;o+=1){for(var l=[],c=0,u=s[o];c<u.length;c+=1){var f=u[c];l.push(new t.default$1(f[0],f[1]))}a.push(l)}return a},D.prototype.toGeoJSON=function(t,e,r){return P.call(this,t,e,r)};var R=function(e){this.layers={_geojsonTileLayer:this},this.name=\\\"_geojsonTileLayer\\\",this.extent=t.default$8,this.length=e.length,this._features=e};R.prototype.feature=function(t){return new D(this._features[t])};var B=t.__moduleExports.VectorTileFeature,F=N;function N(t,e){this.options=e||{},this.features=t,this.length=t.length}function j(t,e){this.id=\\\"number\\\"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}N.prototype.feature=function(t){return new j(this.features[t],this.options.extent)},j.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var n=e[r],i=[],a=0;a<n.length;a++)i.push(new t.default$32(n[a][0],n[a][1]));this.geometry.push(i)}return this.geometry},j.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},j.prototype.toGeoJSON=B.prototype.toGeoJSON;var V=H,U=H,q=F;function H(e){var r=new t.__moduleExports$1;return function(t,e){for(var r in t.layers)e.writeMessage(3,G,t.layers[r])}(e,r),r.finish()}function G(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||\\\"\\\"),e.writeVarintField(5,t.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)n.feature=t.feature(r),e.writeMessage(2,W,n);var i=n.keys;for(r=0;r<i.length;r++)e.writeStringField(3,i[r]);var a=n.values;for(r=0;r<a.length;r++)e.writeMessage(4,J,a[r])}function W(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,Y,t),e.writeVarintField(3,r.type),e.writeMessage(4,$,r)}function Y(t,e){var r=t.feature,n=t.keys,i=t.values,a=t.keycache,o=t.valuecache;for(var s in r.properties){var l=a[s];void 0===l&&(n.push(s),l=n.length-1,a[s]=l),e.writeVarint(l);var c=r.properties[s],u=typeof c;\\\"string\\\"!==u&&\\\"boolean\\\"!==u&&\\\"number\\\"!==u&&(c=JSON.stringify(c));var f=u+\\\":\\\"+c,h=o[f];void 0===h&&(i.push(c),h=i.length-1,o[f]=h),e.writeVarint(h)}}function X(t,e){return(e<<3)+(7&t)}function Z(t){return t<<1^t>>31}function $(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s<o;s++){var l=r[s],c=1;1===n&&(c=l.length),e.writeVarint(X(1,c));for(var u=3===n?l.length-1:l.length,f=0;f<u;f++){1===f&&1!==n&&e.writeVarint(X(2,u-1));var h=l[f].x-i,p=l[f].y-a;e.writeVarint(Z(h)),e.writeVarint(Z(p)),i+=h,a+=p}3===n&&e.writeVarint(X(7,0))}}function J(t,e){var r=typeof t;\\\"string\\\"===r?e.writeStringField(1,t):\\\"boolean\\\"===r?e.writeBooleanField(7,t):\\\"number\\\"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}V.fromVectorTileJs=U,V.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var n in t)r[n]=new F(t[n].features,e),r[n].name=n,r[n].version=e.version,r[n].extent=e.extent;return H({layers:r})},V.GeoJSONWrapper=q;var K=function t(e,r,n,i,a,o){if(!(a-i<=n)){var s=Math.floor((i+a)/2);!function t(e,r,n,i,a,o){for(;a>i;){if(a-i>600){var s=a-i+1,l=n-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(e,r,n,Math.max(i,Math.floor(n-l*u/s+f)),Math.min(a,Math.floor(n+(s-l)*u/s+f)),o)}var h=r[2*n+o],p=i,d=a;for(Q(e,r,i,n),r[2*a+o]>h&&Q(e,r,i,a);p<d;){for(Q(e,r,p,d),p++,d--;r[2*p+o]<h;)p++;for(;r[2*d+o]>h;)d--}r[2*i+o]===h?Q(e,r,i,d):Q(e,r,++d,a),d<=n&&(i=d+1),n<=d&&(a=d-1)}}(e,r,s,i,a,o%2),t(e,r,n,i,s-1,o+1),t(e,r,n,s+1,a,o+1)}};function Q(t,e,r,n){tt(t,r,n),tt(e,2*r,2*n),tt(e,2*r+1,2*n+1)}function tt(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function et(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}var rt=function(t,e,r,n,i){return new nt(t,e,r,n,i)};function nt(t,e,r,n,i){e=e||it,r=r||at,i=i||Array,this.nodeSize=n||64,this.points=t,this.ids=new i(t.length),this.coords=new i(2*t.length);for(var a=0;a<t.length;a++)this.ids[a]=a,this.coords[2*a]=e(t[a]),this.coords[2*a+1]=r(t[a]);K(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function it(t){return t[0]}function at(t){return t[1]}nt.prototype={range:function(t,e,r,n){return function(t,e,r,n,i,a,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var f=c.pop(),h=c.pop(),p=c.pop();if(h-p<=o)for(var d=p;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[d]);else{var g=Math.floor((p+h)/2);s=e[2*g],l=e[2*g+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[g]);var v=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(v)),(0===f?i>=s:a>=l)&&(c.push(g+1),c.push(h),c.push(v))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},within:function(t,e,r){return function(t,e,r,n,i,a){for(var o=[0,t.length-1,0],s=[],l=i*i;o.length;){var c=o.pop(),u=o.pop(),f=o.pop();if(u-f<=a)for(var h=f;h<=u;h++)et(e[2*h],e[2*h+1],r,n)<=l&&s.push(t[h]);else{var p=Math.floor((f+u)/2),d=e[2*p],g=e[2*p+1];et(d,g,r,n)<=l&&s.push(t[p]);var v=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(v)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(v))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)}};function ot(t){this.options=pt(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function st(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function lt(t,e){var r=t.geometry.coordinates;return{x:ft(r[0]),y:ht(r[1]),zoom:1/0,id:e,parentId:-1}}function ct(t){return{type:\\\"Feature\\\",properties:ut(t),geometry:{type:\\\"Point\\\",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function ut(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\\\"k\\\":e>=1e3?Math.round(e/100)/10+\\\"k\\\":e;return pt(pt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function ft(t){return t/360+.5}function ht(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function pt(t,e){for(var r in e)t[r]=e[r];return t}function dt(t){return t.x}function gt(t){return t.y}function vt(t,e,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function mt(t,e,r,n){var i={id:t||null,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if(\\\"Point\\\"===r||\\\"MultiPoint\\\"===r||\\\"LineString\\\"===r)yt(t,e);else if(\\\"Polygon\\\"===r||\\\"MultiLineString\\\"===r)for(var n=0;n<e.length;n++)yt(t,e[n]);else if(\\\"MultiPolygon\\\"===r)for(n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)yt(t,e[n][i])}(i),i}function yt(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function xt(t,e,r){if(e.geometry){var n=e.geometry.coordinates,i=e.geometry.type,a=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),o=[];if(\\\"Point\\\"===i)bt(n,o);else if(\\\"MultiPoint\\\"===i)for(var s=0;s<n.length;s++)bt(n[s],o);else if(\\\"LineString\\\"===i)_t(n,o,a,!1);else if(\\\"MultiLineString\\\"===i)if(r.lineMetrics)for(s=0;s<n.length;s++)return o=[],_t(n[s],o,a,!1),void t.push(mt(e.id,\\\"LineString\\\",o,e.properties));else wt(n,o,a,!1);else if(\\\"Polygon\\\"===i)wt(n,o,a,!0);else{if(\\\"MultiPolygon\\\"!==i){if(\\\"GeometryCollection\\\"===i){for(s=0;s<e.geometry.geometries.length;s++)xt(t,{id:e.id,geometry:e.geometry.geometries[s],properties:e.properties},r);return}throw new Error(\\\"Input data is not a valid GeoJSON object.\\\")}for(s=0;s<n.length;s++){var l=[];wt(n[s],l,a,!0),o.push(l)}}t.push(mt(e.id,i,o,e.properties))}}function bt(t,e){e.push(kt(t[0])),e.push(Mt(t[1])),e.push(0)}function _t(t,e,r,n){for(var i,a,o=0,s=0;s<t.length;s++){var l=kt(t[s][0]),c=Mt(t[s][1]);e.push(l),e.push(c),e.push(0),s>0&&(o+=n?(i*c-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-a,2))),i=l,a=c}var u=e.length-3;e[2]=1,function t(e,r,n,i){for(var a,o=i,s=e[r],l=e[r+1],c=e[n],u=e[n+1],f=r+3;f<n;f+=3){var h=vt(e[f],e[f+1],s,l,c,u);h>o&&(a=f,o=h)}o>i&&(a-r>3&&t(e,r,a,i),e[a+2]=o,n-a>3&&t(e,a,n,i))}(e,0,u,r),e[u+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function wt(t,e,r,n){for(var i=0;i<t.length;i++){var a=[];_t(t[i],a,r,n),e.push(a)}}function kt(t){return t/360+.5}function Mt(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function At(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o<=n)return t;if(a>n||o<r)return null;for(var l=[],c=0;c<t.length;c++){var u=t[c],f=u.geometry,h=u.type,p=0===i?u.minX:u.minY,d=0===i?u.maxX:u.maxY;if(p>=r&&d<=n)l.push(u);else if(!(p>n||d<r)){var g=[];if(\\\"Point\\\"===h||\\\"MultiPoint\\\"===h)Tt(f,g,r,n,i);else if(\\\"LineString\\\"===h)St(f,g,r,n,i,!1,s.lineMetrics);else if(\\\"MultiLineString\\\"===h)Et(f,g,r,n,i,!1);else if(\\\"Polygon\\\"===h)Et(f,g,r,n,i,!0);else if(\\\"MultiPolygon\\\"===h)for(var v=0;v<f.length;v++){var m=[];Et(f[v],m,r,n,i,!0),m.length&&g.push(m)}if(g.length){if(s.lineMetrics&&\\\"LineString\\\"===h){for(v=0;v<g.length;v++)l.push(mt(u.id,h,g[v],u.tags));continue}\\\"LineString\\\"!==h&&\\\"MultiLineString\\\"!==h||(1===g.length?(h=\\\"LineString\\\",g=g[0]):h=\\\"MultiLineString\\\"),\\\"Point\\\"!==h&&\\\"MultiPoint\\\"!==h||(h=3===g.length?\\\"Point\\\":\\\"MultiPoint\\\"),l.push(mt(u.id,h,g,u.tags))}}}return l.length?l:null}function Tt(t,e,r,n,i){for(var a=0;a<t.length;a+=3){var o=t[a+i];o>=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function St(t,e,r,n,i,a,o){for(var s,l,c=Ct(t),u=0===i?zt:Ot,f=t.start,h=0;h<t.length-3;h+=3){var p=t[h],d=t[h+1],g=t[h+2],v=t[h+3],m=t[h+4],y=0===i?p:d,x=0===i?v:m,b=!1;o&&(s=Math.sqrt(Math.pow(p-v,2)+Math.pow(d-m,2))),y<r?x>=r&&(l=u(c,p,d,v,m,r),o&&(c.start=f+s*l)):y>n?x<=n&&(l=u(c,p,d,v,m,n),o&&(c.start=f+s*l)):Lt(c,p,d,g),x<r&&y>=r&&(l=u(c,p,d,v,m,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,v,m,n),b=!0),!a&&b&&(o&&(c.end=f+s*l),e.push(c),c=Ct(t)),o&&(f+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===i?p:d)>=r&&y<=n&&Lt(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&Lt(c,c[0],c[1],c[2]),c.length&&e.push(c)}function Ct(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Et(t,e,r,n,i,a){for(var o=0;o<t.length;o++)St(t[o],e,r,n,i,a,!1)}function Lt(t,e,r,n){t.push(e),t.push(r),t.push(n)}function zt(t,e,r,n,i,a){var o=(a-e)/(n-e);return t.push(a),t.push(r+(i-r)*o),t.push(1),o}function Ot(t,e,r,n,i,a){var o=(a-r)/(i-r);return t.push(e+(n-e)*o),t.push(a),t.push(1),o}function It(t,e){for(var r=[],n=0;n<t.length;n++){var i,a=t[n],o=a.type;if(\\\"Point\\\"===o||\\\"MultiPoint\\\"===o||\\\"LineString\\\"===o)i=Pt(a.geometry,e);else if(\\\"MultiLineString\\\"===o||\\\"Polygon\\\"===o){i=[];for(var s=0;s<a.geometry.length;s++)i.push(Pt(a.geometry[s],e))}else if(\\\"MultiPolygon\\\"===o)for(i=[],s=0;s<a.geometry.length;s++){for(var l=[],c=0;c<a.geometry[s].length;c++)l.push(Pt(a.geometry[s][c],e));i.push(l)}r.push(mt(a.id,o,i,a.tags))}return r}function Pt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var n=0;n<t.length;n+=3)r.push(t[n]+e,t[n+1],t[n+2]);return r}function Dt(t,e){if(t.transformed)return t;var r,n,i,a=1<<t.z,o=t.x,s=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(n=0;n<c.length;n+=2)l.geometry.push(Rt(c[n],c[n+1],e,a,o,s));else for(n=0;n<c.length;n++){var f=[];for(i=0;i<c[n].length;i+=2)f.push(Rt(c[n][i],c[n][i+1],e,a,o,s));l.geometry.push(f)}}return t.transformed=!0,t}function Rt(t,e,r,n,i,a){return[Math.round(r*(t*n-i)),Math.round(r*(e*n-a))]}function Bt(t,e,r,n,i){for(var a=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){o.numFeatures++,Ft(o,t[s],a,i);var l=t[s].minX,c=t[s].minY,u=t[s].maxX,f=t[s].maxY;l<o.minX&&(o.minX=l),c<o.minY&&(o.minY=c),u>o.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function Ft(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(\\\"Point\\\"===a||\\\"MultiPoint\\\"===a)for(var s=0;s<i.length;s+=3)o.push(i[s]),o.push(i[s+1]),t.numPoints++,t.numSimplified++;else if(\\\"LineString\\\"===a)Nt(o,i,t,r,!1,!1);else if(\\\"MultiLineString\\\"===a||\\\"Polygon\\\"===a)for(s=0;s<i.length;s++)Nt(o,i[s],t,r,\\\"Polygon\\\"===a,0===s);else if(\\\"MultiPolygon\\\"===a)for(var l=0;l<i.length;l++){var c=i[l];for(s=0;s<c.length;s++)Nt(o,c[s],t,r,!0,0===s)}if(o.length){var u=e.tags||null;if(\\\"LineString\\\"===a&&n.lineMetrics){for(var f in u={},e.tags)u[f]=e.tags[f];u.mapbox_clip_start=i.start/i.size,u.mapbox_clip_end=i.end/i.size}var h={geometry:o,type:\\\"Polygon\\\"===a||\\\"MultiPolygon\\\"===a?3:\\\"LineString\\\"===a||\\\"MultiLineString\\\"===a?2:1,tags:u};null!==e.id&&(h.id=e.id),t.features.push(h)}}function Nt(t,e,r,n,i,a){var o=n*n;if(n>0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===n||e[l+2]>o)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&&function(t,e){for(var r=0,n=0,i=t.length,a=i-2;n<i;a=n,n+=2)r+=(t[n]-t[a])*(t[n+1]+t[a+1]);if(r>0===e)for(n=0,i=t.length;n<i/2;n+=2){var o=t[n],s=t[n+1];t[n]=t[i-2-n],t[n+1]=t[i-1-n],t[i-2-n]=o,t[i-1-n]=s}}(s,a),t.push(s)}}function jt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&&console.time(\\\"preprocess data\\\"),e.maxZoom<0||e.maxZoom>24)throw new Error(\\\"maxZoom should be in the 0-24 range\\\");var n=function(t,e){var r=[];if(\\\"FeatureCollection\\\"===t.type)for(var n=0;n<t.features.length;n++)xt(r,t.features[n],e);else\\\"Feature\\\"===t.type?xt(r,t,e):xt(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd(\\\"preprocess data\\\"),console.log(\\\"index: maxZoom: %d, maxPoints: %d\\\",e.indexMaxZoom,e.indexMaxPoints),console.time(\\\"generate tiles\\\"),this.stats={},this.total=0),(n=function(t,e){var r=e.buffer/e.extent,n=t,i=At(t,1,-1-r,r,0,-1,2,e),a=At(t,1,1-r,2+r,0,-1,2,e);return(i||a)&&(n=At(t,1,-r,1+r,0,-1,2,e)||[],i&&(n=It(i,1).concat(n)),a&&(n=n.concat(It(a,-1)))),n}(n,e)).length&&this.splitTile(n,0,0,0),r&&(n.length&&console.log(\\\"features: %d, points: %d\\\",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(\\\"generate tiles\\\"),console.log(\\\"tiles generated:\\\",this.total,JSON.stringify(this.stats)))}function Vt(t,e,r){return 32*((1<<t)*r+e)+t}function Ut(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var n=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!n)return e(null,null);var i=new R(n.features),a=V(i);0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),e(null,{vectorTile:i,rawData:a.buffer})}ot.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time(\\\"total time\\\");var r=\\\"prepare \\\"+t.length+\\\" points\\\";e&&console.time(r),this.points=t;var n=t.map(lt);e&&console.timeEnd(r);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var a=+Date.now();this.trees[i+1]=rt(n,dt,gt,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&&console.log(\\\"z%d: %d clusters in %dms\\\",i,n.length,+Date.now()-a)}return this.trees[this.options.minZoom]=rt(n,dt,gt,this.options.nodeSize,Float32Array),e&&console.timeEnd(\\\"total time\\\"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(ft(t[0]),ht(t[3]),ft(t[2]),ht(t[1])),i=[],a=0;a<n.length;a++){var o=r.points[n[a]];i.push(o.numPoints?ct(o):this.points[o.id])}return i},getChildren:function(t,e){for(var r=this.trees[e+1].points[t],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(r.x,r.y,n),a=[],o=0;o<i.length;o++){var s=this.trees[e+1].points[i[o]];s.parentId===t&&a.push(s.numPoints?ct(s):this.points[s.id])}return a},getLeaves:function(t,e,r,n){r=r||10,n=n||0;var i=[];return this._appendLeaves(i,t,e,r,n,0),i},getTile:function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),a=this.options.extent,o=this.options.radius/a,s=(r-o)/i,l=(r+1+o)/i,c={features:[]};return this._addTileFeatures(n.range((e-o)/i,s,(e+1+o)/i,l),n.points,e,r,i,c),0===e&&this._addTileFeatures(n.range(1-o/i,s,1,l),n.points,i,r,i,c),e===i-1&&this._addTileFeatures(n.range(0,s,o/i,l),n.points,-1,r,i,c),c.features.length?c:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var r=this.getChildren(t,e);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,n,i,a){for(var o=this.getChildren(e,r),s=0;s<o.length;s++){var l=o[s].properties;if(l.cluster?a+l.point_count<=i?a+=l.point_count:a=this._appendLeaves(t,l.cluster_id,r+1,n,i,a):a<i?a++:t.push(o[s]),t.length===n)break}return a},_addTileFeatures:function(t,e,r,n,i,a){for(var o=0;o<t.length;o++){var s=e[t[o]];a.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*i-r)),Math.round(this.options.extent*(s.y*i-n))]],tags:s.numPoints?ut(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i<t.length;i++){var a=t[i];if(!(a.zoom<=e)){a.zoom=e;var o=this.trees[e+1],s=o.within(a.x,a.y,n),l=a.numPoints||1,c=a.x*l,u=a.y*l,f=null;this.options.reduce&&(f=this.options.initial(),this._accumulate(f,a));for(var h=0;h<s.length;h++){var p=o.points[s[h]];if(e<p.zoom){var d=p.numPoints||1;p.zoom=e,c+=p.x*d,u+=p.y*d,l+=d,p.parentId=i,this.options.reduce&&this._accumulate(f,p)}}1===l?r.push(a):(a.parentId=i,r.push(st(c/l,u/l,l,i,f)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}},jt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,debug:0},jt.prototype.splitTile=function(t,e,r,n,i,a,o){for(var s=[t,e,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var u=1<<e,f=Vt(e,r,n),h=this.tiles[f];if(!h&&(c>1&&console.time(\\\"creation\\\"),h=this.tiles[f]=Bt(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),c)){c>1&&(console.log(\\\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\\\",e,r,n,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd(\\\"creation\\\"));var p=\\\"z\\\"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<<i-e;if(r!==Math.floor(a/d)||n!==Math.floor(o/d))continue}else if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){c>1&&console.time(\\\"clipping\\\");var g,v,m,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,M=1+_;g=v=m=y=null,x=At(t,u,r-_,r+k,0,h.minX,h.maxX,l),b=At(t,u,r+w,r+M,0,h.minX,h.maxX,l),t=null,x&&(g=At(x,u,n-_,n+k,1,h.minY,h.maxY,l),v=At(x,u,n+w,n+M,1,h.minY,h.maxY,l),x=null),b&&(m=At(b,u,n-_,n+k,1,h.minY,h.maxY,l),y=At(b,u,n+w,n+M,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd(\\\"clipping\\\"),s.push(g||[],e+1,2*r,2*n),s.push(v||[],e+1,2*r,2*n+1),s.push(m||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},jt.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug;if(t<0||t>24)return null;var o=1<<t,s=Vt(t,e=(e%o+o)%o,r);if(this.tiles[s])return Dt(this.tiles[s],i);a>1&&console.log(\\\"drilling down to z%d-%d-%d\\\",t,e,r);for(var l,c=t,u=e,f=r;!l&&c>0;)c--,u=Math.floor(u/2),f=Math.floor(f/2),l=this.tiles[Vt(c,u,f)];return l&&l.source?(a>1&&console.log(\\\"found parent tile z%d-%d-%d\\\",c,u,f),a>1&&console.time(\\\"drilling down\\\"),this.splitTile(l.source,c,u,f,t,e,r),a>1&&console.timeEnd(\\\"drilling down\\\"),this.tiles[s]?Dt(this.tiles[s],i):null):null};var qt=function(e){function r(t,r,n){e.call(this,t,r,Ut),n&&(this.loadGeoJSON=n)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&\\\"Idle\\\"!==this._state?this._state=\\\"NeedsLoadData\\\":(this._state=\\\"Coalescing\\\",this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var e=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams,this.loadGeoJSON(r,function(n,i){if(n||!i)return e(n);if(\\\"object\\\"!=typeof i)return e(new Error(\\\"Input data is not a valid GeoJSON object.\\\"));!function t(e,r){switch(e&&e.type||null){case\\\"FeatureCollection\\\":return e.features=e.features.map(z(t,r)),e;case\\\"Feature\\\":return e.geometry=t(e.geometry,r),e;case\\\"Polygon\\\":case\\\"MultiPolygon\\\":return function(t,e){return\\\"Polygon\\\"===t.type?t.coordinates=O(t.coordinates,e):\\\"MultiPolygon\\\"===t.type&&(t.coordinates=t.coordinates.map(z(O,e))),t}(e,r);default:return e}}(i,!0);try{t._geoJSONIndex=r.cluster?function(t){return new ot(t)}(r.superclusterOptions).load(i.features):new jt(i,r.geojsonVtOptions)}catch(n){return e(n)}t.loaded={};var a={};if(r.request&&r.request.collectResourceTiming){var o=w(r.request.url);o&&(a.resourceTiming={},a.resourceTiming[r.source]=JSON.parse(JSON.stringify(o)))}e(null,a)})}},r.prototype.coalesce=function(){\\\"Coalescing\\\"===this._state?this._state=\\\"Idle\\\":\\\"NeedsLoadData\\\"===this._state&&(this._state=\\\"Coalescing\\\",this._loadData())},r.prototype.reloadTile=function(t,r){var n=this.loaded,i=t.uid;return n&&n[i]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if(\\\"string\\\"!=typeof e.data)return r(new Error(\\\"Input data is not a valid GeoJSON object.\\\"));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error(\\\"Input data is not a valid GeoJSON object.\\\"))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r}(M),Ht=function(e){var r=this;this.self=e,this.actor=new t.default$7(e,this),this.layerIndexes={},this.workerSourceTypes={vector:M,geojson:qt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name \\\"'+t+'\\\" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error(\\\"RTL text plugin already registered.\\\");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText}};return Ht.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},Ht.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},Ht.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},Ht.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},Ht.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},Ht.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},Ht.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},Ht.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},Ht.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var n=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==n.removeSource?n.removeSource(e,r):r()}},Ht.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},Ht.prototype.loadRTLTextPlugin=function(e,r,n){try{t.plugin.isLoaded()||(this.self.importScripts(r),n(t.plugin.isLoaded()?null:new Error(\\\"RTL Text Plugin failed to import scripts from \\\"+r)))}catch(t){n(t.toString())}},Ht.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new n),e},Ht.prototype.getWorkerSource=function(t,e,r){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var i={send:function(e,r,i){n.actor.send(e,r,i,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](i,this.getLayerIndex(t))}return this.workerSources[t][e][r]},Ht.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new A),this.demWorkerSources[t][e]},\\\"undefined\\\"!=typeof WorkerGlobalScope&&\\\"undefined\\\"!=typeof self&&self instanceof WorkerGlobalScope&&new Ht(self),Ht}),i(0,function(t){var e=t.createCommonjsModule(function(t){function e(t){return!!(\\\"undefined\\\"!=typeof window&&\\\"undefined\\\"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&\\\"JSON\\\"in window&&\\\"parse\\\"in JSON&&\\\"stringify\\\"in JSON&&function(){if(!(\\\"Worker\\\"in window&&\\\"Blob\\\"in window&&\\\"URL\\\"in window))return!1;var t,e,r=new Blob([\\\"\\\"],{type:\\\"text/javascript\\\"}),n=URL.createObjectURL(r);try{e=new Worker(n),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(n),t}()&&\\\"Uint8ClampedArray\\\"in window&&function(t){return void 0===r[t]&&(r[t]=function(t){var r=document.createElement(\\\"canvas\\\"),n=Object.create(e.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext(\\\"webgl\\\",n)||r.probablySupportsContext(\\\"experimental-webgl\\\",n):r.supportsContext?r.supportsContext(\\\"webgl\\\",n)||r.supportsContext(\\\"experimental-webgl\\\",n):r.getContext(\\\"webgl\\\",n)||r.getContext(\\\"experimental-webgl\\\",n)}(t)),r[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),r=t.default.performance&&t.default.performance.now?t.default.performance.now.bind(t.default.performance):Date.now.bind(Date),n=t.default.requestAnimationFrame||t.default.mozRequestAnimationFrame||t.default.webkitRequestAnimationFrame||t.default.msRequestAnimationFrame,i=t.default.cancelAnimationFrame||t.default.mozCancelAnimationFrame||t.default.webkitCancelAnimationFrame||t.default.msCancelAnimationFrame,a={now:r,frame:function(t){return n(t)},cancelFrame:function(t){return i(t)},getImageData:function(e){var r=t.default.document.createElement(\\\"canvas\\\"),n=r.getContext(\\\"2d\\\");if(!n)throw new Error(\\\"failed to create canvas 2d context\\\");return r.width=e.width,r.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(0,0,e.width,e.height)},hardwareConcurrency:t.default.navigator.hardwareConcurrency||4,get devicePixelRatio(){return t.default.devicePixelRatio},supportsWebp:!1};if(t.default.document){var o=t.default.document.createElement(\\\"img\\\");o.onload=function(){a.supportsWebp=!0},o.src=\\\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\\\"}var s={create:function(e,r,n){var i=t.default.document.createElement(e);return r&&(i.className=r),n&&n.appendChild(i),i},createNS:function(e,r){return t.default.document.createElementNS(e,r)}},l=t.default.document?t.default.document.documentElement.style:null;function c(t){if(!l)return null;for(var e=0;e<t.length;e++)if(t[e]in l)return t[e];return t[0]}var u,f=c([\\\"userSelect\\\",\\\"MozUserSelect\\\",\\\"WebkitUserSelect\\\",\\\"msUserSelect\\\"]);s.disableDrag=function(){l&&f&&(u=l[f],l[f]=\\\"none\\\")},s.enableDrag=function(){l&&f&&(l[f]=u)};var h=c([\\\"transform\\\",\\\"WebkitTransform\\\"]);s.setTransform=function(t,e){t.style[h]=e};var p=!1;try{var d=Object.defineProperty({},\\\"passive\\\",{get:function(){p=!0}});t.default.addEventListener(\\\"test\\\",d,d),t.default.removeEventListener(\\\"test\\\",d,d)}catch(t){p=!1}s.addEventListener=function(t,e,r,n){void 0===n&&(n={}),\\\"passive\\\"in n&&p?t.addEventListener(e,r,n):t.addEventListener(e,r,n.capture)},s.removeEventListener=function(t,e,r,n){void 0===n&&(n={}),\\\"passive\\\"in n&&p?t.removeEventListener(e,r,n):t.removeEventListener(e,r,n.capture)};var g=function(e){e.preventDefault(),e.stopPropagation(),t.default.removeEventListener(\\\"click\\\",g,!0)};s.suppressClick=function(){t.default.addEventListener(\\\"click\\\",g,!0),t.default.setTimeout(function(){t.default.removeEventListener(\\\"click\\\",g,!0)},0)},s.mousePos=function(e,r){var n=e.getBoundingClientRect();return r=r.touches?r.touches[0]:r,new t.default$1(r.clientX-n.left-e.clientLeft,r.clientY-n.top-e.clientTop)},s.touchPos=function(e,r){for(var n=e.getBoundingClientRect(),i=[],a=\\\"touchend\\\"===r.type?r.changedTouches:r.touches,o=0;o<a.length;o++)i.push(new t.default$1(a[o].clientX-n.left-e.clientLeft,a[o].clientY-n.top-e.clientTop));return i},s.mouseButton=function(e){return void 0!==t.default.InstallTrigger&&2===e.button&&e.ctrlKey&&t.default.navigator.platform.toUpperCase().indexOf(\\\"MAC\\\")>=0?0:e.button},s.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var v={API_URL:\\\"https://api.mapbox.com\\\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null},m=\\\"See https://www.mapbox.com/api-documentation/#access-tokens\\\";function y(t,e){var r=A(v.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,\\\"/\\\"!==r.path&&(t.path=\\\"\\\"+r.path+t.path),!v.REQUIRE_ACCESS_TOKEN)return T(t);if(!(e=e||v.ACCESS_TOKEN))throw new Error(\\\"An API access token is required to use Mapbox GL. \\\"+m);if(\\\"s\\\"===e[0])throw new Error(\\\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \\\"+m);return t.params.push(\\\"access_token=\\\"+e),T(t)}function x(t){return 0===t.indexOf(\\\"mapbox:\\\")}var b=function(t,e){if(!x(t))return t;var r=A(t);return r.path=\\\"/v4/\\\"+r.authority+\\\".json\\\",r.params.push(\\\"secure\\\"),y(r,e)},_=function(t,e,r,n){var i=A(t);return x(t)?(i.path=\\\"/styles/v1\\\"+i.path+\\\"/sprite\\\"+e+r,y(i,n)):(i.path+=\\\"\\\"+e+r,T(i))},w=/(\\\\.(png|jpg)\\\\d*)(?=$)/,k=function(t,e,r){if(!e||!x(e))return t;var n=A(t),i=a.devicePixelRatio>=2||512===r?\\\"@2x\\\":\\\"\\\",o=a.supportsWebp?\\\".webp\\\":\\\"$1\\\";return n.path=n.path.replace(w,\\\"\\\"+i+o),function(t){for(var e=0;e<t.length;e++)0===t[e].indexOf(\\\"access_token=tk.\\\")&&(t[e]=\\\"access_token=\\\"+(v.ACCESS_TOKEN||\\\"\\\"))}(n.params),T(n)},M=/^(\\\\w+):\\\\/\\\\/([^\\\\/?]*)(\\\\/[^?]+)?\\\\??(.+)?/;function A(t){var e=t.match(M);if(!e)throw new Error(\\\"Unable to parse URL object\\\");return{protocol:e[1],authority:e[2],path:e[3]||\\\"/\\\",params:e[4]?e[4].split(\\\"&\\\"):[]}}function T(t){var e=t.params.length?\\\"?\\\"+t.params.join(\\\"&\\\"):\\\"\\\";return t.protocol+\\\"://\\\"+t.authority+t.path+e}var S=t.default.HTMLImageElement,C=t.default.HTMLCanvasElement,E=t.default.HTMLVideoElement,L=t.default.ImageData,z=function(t,e,r,n){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,n)};z.prototype.update=function(t,e){var r=t.width,n=t.height,i=!this.size||this.size[0]!==r||this.size[1]!==n,a=this.context,o=a.gl;this.useMipmap=Boolean(e&&e.useMipmap),o.bindTexture(o.TEXTURE_2D,this.texture),i?(this.size=[r,n],a.pixelStoreUnpack.set(1),this.format!==o.RGBA||e&&!1===e.premultiply||a.pixelStoreUnpackPremultiplyAlpha.set(!0),t instanceof S||t instanceof C||t instanceof E||t instanceof L?o.texImage2D(o.TEXTURE_2D,0,this.format,this.format,o.UNSIGNED_BYTE,t):o.texImage2D(o.TEXTURE_2D,0,this.format,r,n,0,this.format,o.UNSIGNED_BYTE,t.data)):t instanceof S||t instanceof C||t instanceof E||t instanceof L?o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,t):o.texSubImage2D(o.TEXTURE_2D,0,0,0,r,n,o.RGBA,o.UNSIGNED_BYTE,t.data),this.useMipmap&&this.isSizePowerOfTwo()&&o.generateMipmap(o.TEXTURE_2D)},z.prototype.bind=function(t,e,r){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),r!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=n.LINEAR),t!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)},z.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},z.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var O=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new t.default$2(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=new t.RGBAImage({width:64,height:64}),this.dirty=!0};O.prototype.isLoaded=function(){return this.loaded},O.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var n=r[e],i=n.ids,a=n.callback;this._notify(i,a)}this.requestors=[]}},O.prototype.getImage=function(t){return this.images[t]},O.prototype.addImage=function(t,e){this.images[t]=e},O.prototype.removeImage=function(t){delete this.images[t];var e=this.patterns[t];e&&(this.shelfPack.unref(e.bin),delete this.patterns[t])},O.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var n=0,i=t;n<i.length;n+=1){var a=i[n];this.images[a]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},O.prototype._notify=function(t,e){for(var r={},n=0,i=t;n<i.length;n+=1){var a=i[n],o=this.images[a];o&&(r[a]={data:o.data.clone(),pixelRatio:o.pixelRatio,sdf:o.sdf})}e(null,r)},O.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},O.prototype.getPattern=function(e){var r=this.patterns[e];if(r)return r.position;var n=this.getImage(e);if(!n)return null;var i=n.data.width+2,a=n.data.height+2,o=this.shelfPack.packOne(i,a);if(!o)return null;this.atlasImage.resize(this.getPixelSize());var s=n.data,l=this.atlasImage,c=o.x+1,u=o.y+1,f=s.width,h=s.height;t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u},{width:f,height:h}),t.RGBAImage.copy(s,l,{x:0,y:h-1},{x:c,y:u-1},{width:f,height:1}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c,y:u+h},{width:f,height:1}),t.RGBAImage.copy(s,l,{x:f-1,y:0},{x:c-1,y:u},{width:1,height:h}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:c+f,y:u},{width:1,height:h}),this.dirty=!0;var p=new t.ImagePosition(o,n);return this.patterns[e]={bin:o,position:p},p},O.prototype.bind=function(t){var e=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new z(t,this.atlasImage,e.RGBA),this.atlasTexture.bind(e.LINEAR,e.CLAMP_TO_EDGE)};var I=D,P=1e20;function D(t,e,r,n,i,a){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=i||\\\"sans-serif\\\",this.fontWeight=a||\\\"normal\\\",this.radius=r||8;var o=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement(\\\"canvas\\\"),this.canvas.width=this.canvas.height=o,this.ctx=this.canvas.getContext(\\\"2d\\\"),this.ctx.font=this.fontWeight+\\\" \\\"+this.fontSize+\\\"px \\\"+this.fontFamily,this.ctx.textBaseline=\\\"middle\\\",this.ctx.fillStyle=\\\"black\\\",this.gridOuter=new Float64Array(o*o),this.gridInner=new Float64Array(o*o),this.f=new Float64Array(o),this.d=new Float64Array(o),this.z=new Float64Array(o+1),this.v=new Int16Array(o),this.middle=Math.round(o/2*(navigator.userAgent.indexOf(\\\"Gecko/\\\")>=0?1.2:1))}function R(t,e,r,n,i,a,o){for(var s=0;s<e;s++){for(var l=0;l<r;l++)n[l]=t[l*e+s];for(B(n,i,a,o,r),l=0;l<r;l++)t[l*e+s]=i[l]}for(l=0;l<r;l++){for(s=0;s<e;s++)n[s]=t[l*e+s];for(B(n,i,a,o,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(i[s])}}function B(t,e,r,n,i){r[0]=0,n[0]=-P,n[1]=+P;for(var a=1,o=0;a<i;a++){for(var s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=n[o];)o--,s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);r[++o]=a,n[o]=s,n[o+1]=+P}for(a=0,o=0;a<i;a++){for(;n[o+1]<a;)o++;e[a]=(a-r[o])*(a-r[o])+t[r[o]]}}D.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var i=e.data[4*n+3]/255;this.gridOuter[n]=1===i?0:0===i?P:Math.pow(Math.max(0,.5-i),2),this.gridInner[n]=1===i?P:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(R(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),R(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var a=this.gridOuter[n]-this.gridInner[n];r[n]=Math.max(0,Math.min(255,Math.round(255-255*(a/this.radius+this.cutoff))))}return r};var F=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};F.prototype.setURL=function(t){this.url=t},F.prototype.getGlyphs=function(e,r){var n=this,i=[];for(var a in e)for(var o=0,s=e[a];o<s.length;o+=1){var l=s[o];i.push({stack:a,id:l})}t.asyncAll(i,function(t,e){var r=t.stack,i=t.id,a=n.entries[r];a||(a=n.entries[r]={glyphs:{},requests:{}});var o=a.glyphs[i];if(void 0===o)if(o=n._tinySDF(a,r,i))e(null,{stack:r,id:i,glyph:o});else{var s=Math.floor(i/256);if(256*s>65535)e(new Error(\\\"glyphs > 65535 not supported\\\"));else{var l=a.requests[s];l||(l=a.requests[s]=[],F.loadGlyphRange(r,s,n.url,n.requestTransform,function(t,e){if(e)for(var r in e)a.glyphs[+r]=e[+r];for(var n=0,i=l;n<i.length;n+=1)(0,i[n])(t,e);delete a.requests[s]})),l.push(function(t,n){t?e(t):n&&e(null,{stack:r,id:i,glyph:n[i]||null})})}}else e(null,{stack:r,id:i,glyph:o})},function(t,e){if(t)r(t);else if(e){for(var n={},i=0,a=e;i<a.length;i+=1){var o=a[i],s=o.stack,l=o.id,c=o.glyph;(n[s]||(n[s]={}))[l]=c&&{id:c.id,bitmap:c.bitmap.clone(),metrics:c.metrics}}r(null,n)}})},F.prototype._tinySDF=function(e,r,n){var i=this.localIdeographFontFamily;if(i&&(t.default$4[\\\"CJK Unified Ideographs\\\"](n)||t.default$4[\\\"Hangul Syllables\\\"](n))){var a=e.tinySDF;if(!a){var o=\\\"400\\\";/bold/i.test(r)?o=\\\"900\\\":/medium/i.test(r)?o=\\\"500\\\":/light/i.test(r)&&(o=\\\"200\\\"),a=e.tinySDF=new F.TinySDF(24,3,8,.25,i,o)}return{id:n,bitmap:new t.AlphaImage({width:30,height:30},a.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},F.loadGlyphRange=function(e,r,n,i,a){var o=256*r,s=o+255,l=i(function(t,e){if(!x(t))return t;var r=A(t);return r.path=\\\"/fonts/v1\\\"+r.path,y(r,e)}(n).replace(\\\"{fontstack}\\\",e).replace(\\\"{range}\\\",o+\\\"-\\\"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,function(e,r){if(e)a(e);else if(r){for(var n={},i=0,o=t.default$3(r.data);i<o.length;i+=1){var s=o[i];n[s.id]=s}a(null,n)}})},F.TinySDF=I;var N=function(){this.specification=t.default$5.light.position};N.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},N.prototype.interpolate=function(e,r,n){return{x:t.number(e.x,r.x,n),y:t.number(e.y,r.y,n),z:t.number(e.z,r.z,n)}};var j=new t.Properties({anchor:new t.DataConstantProperty(t.default$5.light.anchor),position:new N,color:new t.DataConstantProperty(t.default$5.light.color),intensity:new t.DataConstantProperty(t.default$5.light.intensity)}),V=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(j),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e){if(!this._validate(t.validateLight,e))for(var r in e){var n=e[r];t.endsWith(r,\\\"-transition\\\")?this._transitionable.setTransition(r.slice(0,-\\\"-transition\\\".length),n):this._transitionable.setValue(r,n)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r){return t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.default$5})))},r}(t.Evented),U=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};U.prototype.getDash=function(t,e){var r=t.join(\\\",\\\")+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},U.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.warnOnce(\\\"LineAtlas out of space\\\"),null;for(var a=0,o=0;o<e.length;o++)a+=e[o];for(var s=this.width/a,l=s/2,c=e.length%2==1,u=-n;u<=n;u++)for(var f=this.nextRow+n+u,h=this.width*f,p=c?-e[e.length-1]:0,d=e[0],g=1,v=0;v<this.width;v++){for(;d<v/s;)p=d,d+=e[g],c&&g===e.length-1&&(d+=e[0]),g++;var m=Math.abs(v-p*s),y=Math.abs(v-d*s),x=Math.min(m,y),b=g%2==1,_=void 0;if(r){var w=n?u/n*(l+1):0;if(b){var k=l-Math.abs(w);_=Math.sqrt(x*x+k*k)}else _=l-Math.sqrt(x*x+w*w)}else _=(b?1:-1)*x;this.data[3+4*(h+v)]=Math.max(0,Math.min(255,_+128))}var M={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:a};return this.nextRow+=i,this.dirty=!0,M},U.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var q=function e(r,n){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),a=0;a<i.length;a++){var o=i[a],s=new e.Actor(o,n,this.id);s.name=\\\"Worker \\\"+a,this.actors.push(s)}};function H(e,r,n){var i=function(e,r){if(e)return n(e);if(r){var i=t.pick(r,[\\\"tiles\\\",\\\"minzoom\\\",\\\"maxzoom\\\",\\\"attribution\\\",\\\"mapbox_logo\\\",\\\"bounds\\\"]);r.vector_layers&&(i.vectorLayers=r.vector_layers,i.vectorLayerIds=i.vectorLayers.map(function(t){return t.id})),n(null,i)}};e.url?t.getJSON(r(b(e.url),t.ResourceType.Source),i):a.frame(function(){return i(null,e)})}q.prototype.broadcast=function(e,r,n){n=n||function(){},t.asyncAll(this.actors,function(t,n){t.send(e,r,n)},n)},q.prototype.send=function(t,e,r,n){return(\\\"number\\\"!=typeof n||isNaN(n))&&(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,r),n},q.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},q.Actor=t.default$7;var G=function(t,e){if(isNaN(t)||isNaN(e))throw new Error(\\\"Invalid LngLat object: (\\\"+t+\\\", \\\"+e+\\\")\\\");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error(\\\"Invalid LngLat latitude value: must be between -90 and 90\\\")};G.prototype.wrap=function(){return new G(t.wrap(this.lng,-180,180),this.lat)},G.prototype.toArray=function(){return[this.lng,this.lat]},G.prototype.toString=function(){return\\\"LngLat(\\\"+this.lng+\\\", \\\"+this.lat+\\\")\\\"},G.prototype.toBounds=function(t){var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new W(new G(this.lng-r,this.lat-e),new G(this.lng+r,this.lat+e))},G.convert=function(t){if(t instanceof G)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new G(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\\\"object\\\"==typeof t&&null!==t)return new G(Number(t.lng),Number(t.lat));throw new Error(\\\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\\\")};var W=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};W.prototype.setNorthEast=function(t){return this._ne=t instanceof G?new G(t.lng,t.lat):G.convert(t),this},W.prototype.setSouthWest=function(t){return this._sw=t instanceof G?new G(t.lng,t.lat):G.convert(t),this},W.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof G)e=t,r=t;else{if(!(t instanceof W))return Array.isArray(t)?t.every(Array.isArray)?this.extend(W.convert(t)):this.extend(G.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new G(e.lng,e.lat),this._ne=new G(r.lng,r.lat)),this},W.prototype.getCenter=function(){return new G((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},W.prototype.getSouthWest=function(){return this._sw},W.prototype.getNorthEast=function(){return this._ne},W.prototype.getNorthWest=function(){return new G(this.getWest(),this.getNorth())},W.prototype.getSouthEast=function(){return new G(this.getEast(),this.getSouth())},W.prototype.getWest=function(){return this._sw.lng},W.prototype.getSouth=function(){return this._sw.lat},W.prototype.getEast=function(){return this._ne.lng},W.prototype.getNorth=function(){return this._ne.lat},W.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},W.prototype.toString=function(){return\\\"LngLatBounds(\\\"+this._sw.toString()+\\\", \\\"+this._ne.toString()+\\\")\\\"},W.prototype.isEmpty=function(){return!(this._sw&&this._ne)},W.convert=function(t){return!t||t instanceof W?t:new W(t)};var Y=function(t,e,r){this.bounds=W.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=r||24};Y.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},Y.prototype.contains=function(t){var e=Math.floor(this.lngX(this.bounds.getWest(),t.z)),r=Math.floor(this.latY(this.bounds.getNorth(),t.z)),n=Math.ceil(this.lngX(this.bounds.getEast(),t.z)),i=Math.ceil(this.latY(this.bounds.getSouth(),t.z));return t.x>=e&&t.x<n&&t.y>=r&&t.y<i},Y.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},Y.prototype.latY=function(e,r){var n=t.clamp(Math.sin(Math.PI/180*e),-.9999,.9999),i=Math.pow(2,r)/(2*Math.PI);return Math.pow(2,r-1)+.5*Math.log((1+n)/(1-n))*-i};var X=function(e){function r(r,n,i,a){if(e.call(this),this.id=r,this.dispatcher=i,this.type=\\\"vector\\\",this.minzoom=0,this.maxzoom=22,this.scheme=\\\"xyz\\\",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(n,[\\\"url\\\",\\\"scheme\\\",\\\"tileSize\\\"])),this._options=t.extend({type:\\\"vector\\\"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error(\\\"vector tile sources must have a tileSize of 512\\\");this.setEventedParent(a)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),H(this._options,this.map._transformRequest,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new Y(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"metadata\\\"})),e.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"content\\\"})))})},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var n=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url),i={request:this.map._transformRequest(n,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:a.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function o(t,n){return e.aborted?r(null):t?r(t):(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||\\\"expired\\\"===e.state?e.workerID=this.dispatcher.send(\\\"loadTile\\\",i,o.bind(this)):\\\"loading\\\"===e.state?e.reloadCallback=r:this.dispatcher.send(\\\"reloadTile\\\",i,o.bind(this),e.workerID)},r.prototype.abortTile=function(t){this.dispatcher.send(\\\"abortTile\\\",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\\\"removeTile\\\",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),Z=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.dispatcher=i,this.setEventedParent(a),this.type=\\\"raster\\\",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=\\\"xyz\\\",this.tileSize=512,this._loaded=!1,this._options=t.extend({},n),t.extend(this,t.pick(n,[\\\"url\\\",\\\"scheme\\\",\\\"tileSize\\\"]))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),H(this._options,this.map._transformRequest,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new Y(n.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"metadata\\\"})),e.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"content\\\"})))})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var n=this,i=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(t,i){if(delete e.request,e.aborted)e.state=\\\"unloaded\\\",r(null);else if(t)e.state=\\\"errored\\\",r(t);else if(i){n.map._refreshExpiredTiles&&e.setExpiryData(i),delete i.cacheControl,delete i.expires;var a=n.map.painter.context,o=a.gl;e.texture=n.map.painter.getTileTexture(i.width),e.texture?e.texture.update(i,{useMipmap:!0}):(e.texture=new z(a,i,o.RGBA,{useMipmap:!0}),e.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&o.texParameterf(o.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state=\\\"loaded\\\",r(null)}})},r.prototype.abortTile=function(t,e){t.request&&(t.request.abort(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),$=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),this.type=\\\"raster-dem\\\",this.maxzoom=22,this._options=t.extend({},n),this.encoding=n.encoding||\\\"mapbox\\\"}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:\\\"raster-dem\\\",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var n=k(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),function(t,n){if(delete e.request,e.aborted)e.state=\\\"unloaded\\\",r(null);else if(t)e.state=\\\"errored\\\",r(t);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var i=a.getImageData(n),o={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:i,encoding:this.encoding};e.workerID&&\\\"expired\\\"!==e.state||(e.workerID=this.dispatcher.send(\\\"loadDEMTile\\\",o,function(t,n){t&&(e.state=\\\"errored\\\",r(t)),n&&(e.dem=n,e.needsHillshadePrepare=!0,e.state=\\\"loaded\\\",r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1<n&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state=\\\"unloaded\\\",this.dispatcher.send(\\\"removeDEMTile\\\",{uid:t.uid,source:this.id},void 0,t.workerID)},r}(Z),J=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.type=\\\"geojson\\\",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=i,this.setEventedParent(a),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type);var o=t.default$8/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:t.default$8,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.default$8,radius:(n.clusterRadius||50)*o,log:!1}},n.workerOptions)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),this._updateWorkerData(function(r){if(r)e.fire(new t.ErrorEvent(r));else{var n={dataType:\\\"source\\\",sourceDataType:\\\"metadata\\\"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event(\\\"data\\\",n))}})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),this._updateWorkerData(function(e){if(e)return r.fire(new t.ErrorEvent(e));var n={dataType:\\\"source\\\",sourceDataType:\\\"content\\\"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event(\\\"data\\\",n))}),this},r.prototype._updateWorkerData=function(e){var r,n,i=this,a=t.extend({},this.workerOptions),o=this._data;\\\"string\\\"==typeof o?(a.request=this.map._transformRequest((r=o,(n=t.default.document.createElement(\\\"a\\\")).href=r,n.href),t.ResourceType.Source),a.request.collectResourceTiming=this._collectResourceTiming):a.data=JSON.stringify(o),this.workerID=this.dispatcher.send(this.type+\\\".\\\"+a.source+\\\".loadData\\\",a,function(t,r){i._removed||r&&r.abandoned||(i._loaded=!0,r&&r.resourceTiming&&r.resourceTiming[i.id]&&(i._resourceTiming=r.resourceTiming[i.id].slice(0)),i.dispatcher.send(i.type+\\\".\\\"+a.source+\\\".coalesce\\\",null,null,i.workerID),e(t))},this.workerID)},r.prototype.loadTile=function(t,e){var r=this,n=void 0===t.workerID?\\\"loadTile\\\":\\\"reloadTile\\\",i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(n,i,function(i,a){return t.unloadVectorData(),t.aborted?e(null):i?e(i):(t.loadVectorData(a,r.map.painter,\\\"reloadTile\\\"===n),e(null))},this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\\\"removeTile\\\",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send(\\\"removeSource\\\",{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),K=t.createLayout([{name:\\\"a_pos\\\",type:\\\"Int16\\\",components:2},{name:\\\"a_texture_pos\\\",type:\\\"Int16\\\",components:2}]),Q=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Q.prototype.bind=function(t,e,r,n,i,a,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c<n.length;c++)this.boundPaintVertexBuffers[c]!==n[c]&&(l=!0);var u=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||l||this.boundIndexBuffer!==i||this.boundVertexOffset!==a||this.boundDynamicVertexBuffer!==o||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||u?this.freshBind(e,r,n,i,a,o,s):(t.bindVertexArrayOES.set(this.vao),o&&o.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind())},Q.prototype.freshBind=function(t,e,r,n,i,a,o){var s,l=t.numAttributes,c=this.context,u=c.gl;if(c.extVertexArrayObject)this.vao&&this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=n,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=a,this.boundDynamicVertexBuffer2=o;else{s=c.currentNumAttributes||0;for(var f=l;f<s;f++)u.disableVertexAttribArray(f)}e.enableAttributes(u,t);for(var h=0,p=r;h<p.length;h+=1)p[h].enableAttributes(u,t);a&&a.enableAttributes(u,t),o&&o.enableAttributes(u,t),e.bind(),e.setVertexAttribPointers(u,t,i);for(var d=0,g=r;d<g.length;d+=1){var v=g[d];v.bind(),v.setVertexAttribPointers(u,t,i)}a&&(a.bind(),a.setVertexAttribPointers(u,t,i)),n&&n.bind(),o&&(o.bind(),o.setVertexAttribPointers(u,t,i)),c.currentNumAttributes=l},Q.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var tt=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type=\\\"image\\\",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"source\\\"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(r,n){r?e.fire(new t.ErrorEvent(r)):n&&(e.image=a.getImageData(n),e._finishLoading())})},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"metadata\\\"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){this.coordinates=e;var r=this.map,n=e.map(function(t){return r.transform.locationCoordinate(G.convert(t)).zoomTo(0)}),i=this.centerCoord=t.getCoordinatesCenter(n);i.column=Math.floor(i.column),i.row=Math.floor(i.row),this.tileID=new t.CanonicalTileID(i.zoom,i.column,i.row),this.minzoom=this.maxzoom=i.zoom;var a=n.map(function(e){var r=e.zoomTo(i.zoom);return new t.default$1(Math.round((r.column-i.column)*t.default$8),Math.round((r.row-i.row)*t.default$8))});return this._boundsArray=new t.RasterBoundsArray,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,t.default$8,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,t.default$8),this._boundsArray.emplaceBack(a[2].x,a[2].y,t.default$8,t.default$8),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",sourceDataType:\\\"content\\\"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,e=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture||(this.texture=new z(t,this.image,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];\\\"loaded\\\"!==n.state&&(n.state=\\\"loaded\\\",n.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state=\\\"errored\\\",e(null))},r.prototype.serialize=function(){return{type:\\\"image\\\",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),et=function(e){function r(t,r,n,i){e.call(this,t,r,n,i),this.roundZoom=!0,this.type=\\\"video\\\",this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this,r=this.options;this.urls=[];for(var n=0,i=r.urls;n<i.length;n+=1){var a=i[n];e.urls.push(e.map._transformRequest(a,t.ResourceType.Source).url)}t.getVideo(this.urls,function(r,n){r?e.fire(new t.ErrorEvent(r)):n&&(e.video=n,e.video.loop=!0,e.video.addEventListener(\\\"playing\\\",function(){e.map._rerender()}),e.map&&e.video.play(),e._finishLoading())})},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,e=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture?this.video.paused||(this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,this.video)):(this.texture=new z(t,this.video,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[r];\\\"loaded\\\"!==n.state&&(n.state=\\\"loaded\\\",n.texture=this.texture)}}},r.prototype.serialize=function(){return{type:\\\"video\\\",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(tt),rt=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return\\\"number\\\"!=typeof t})})||this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'\\\"coordinates\\\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'missing required property \\\"coordinates\\\"'))),n.animate&&\\\"boolean\\\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'optional \\\"animate\\\" property must be a boolean value'))),n.canvas?\\\"string\\\"==typeof n.canvas||n.canvas instanceof t.default.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'\\\"canvas\\\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.default$9(\\\"sources.\\\"+r,null,'missing required property \\\"canvas\\\"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.default.HTMLCanvasElement?this.options.canvas:t.default.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error(\\\"Canvas dimensions cannot be less than or equal to zero.\\\"))):(this.play=function(){this._playing=!0,this.map._rerender()},this.pause=function(){this._playing=!1},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,K.members)),this.boundsVAO||(this.boundsVAO=new Q),this.texture?t?this.texture.update(this.canvas):this._playing&&(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.canvas)):(this.texture=new z(e,this.canvas,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];\\\"loaded\\\"!==i.state&&(i.state=\\\"loaded\\\",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:\\\"canvas\\\",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}(tt),nt={vector:X,raster:Z,\\\"raster-dem\\\":$,geojson:J,video:et,image:tt,canvas:rt},it=function(e,r,n,i){var a=new nt[r.type](e,r,n,i);if(a.id!==e)throw new Error(\\\"Expected Source id to be \\\"+e+\\\" instead of \\\"+a.id);return t.bindAll([\\\"load\\\",\\\"abort\\\",\\\"unload\\\",\\\"serialize\\\",\\\"prepare\\\"],a),a};function at(t,e,r,n,i){var a=i.maxPitchScaleFactor(),o=t.tilesIn(r,a);o.sort(ot);for(var s=[],l=0,c=o;l<c.length;l+=1){var u=c[l];s.push({wrappedTileID:u.tileID.wrapped().key,queryResults:u.tile.queryRenderedFeatures(e,u.queryGeometry,u.scale,n,i,a,t.transform.calculatePosMatrix(u.tileID.toUnwrapped()))})}return function(t){for(var e={},r={},n=0,i=t;n<i.length;n+=1){var a=i[n],o=a.queryResults,s=a.wrappedTileID,l=r[s]=r[s]||{};for(var c in o)for(var u=o[c],f=l[c]=l[c]||{},h=e[c]=e[c]||[],p=0,d=u;p<d.length;p+=1){var g=d[p];f[g.featureIndex]||(f[g.featureIndex]=!0,h.push(g.feature))}}return e}(s)}function ot(t,e){var r=t.tileID,n=e.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}var st=function(e,r){this.tileID=e,this.uid=t.uniqueId(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.expiredRequestCount=0,this.state=\\\"loading\\\"};st.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<a.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},st.prototype.wasRequested=function(){return\\\"errored\\\"===this.state||\\\"loaded\\\"===this.state||\\\"reloading\\\"===this.state},st.prototype.loadVectorData=function(e,r,n){if(this.hasData()&&this.unloadVectorData(),this.state=\\\"loaded\\\",e){if(e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var n=0,i=t;n<i.length;n+=1){var a=i[n],o=a.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==o.length){a.layers=o;for(var s=0,l=o;s<l.length;s+=1)r[l[s].id]=a}}return r}(e.buckets,r.style),n)for(var i in this.buckets){var a=this.buckets[i];a instanceof t.default$14&&(a.justReloaded=!0)}for(var o in this.queryPadding=0,this.buckets){var s=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(s.layerIds[0]).queryRadius(s))}e.iconAtlasImage&&(this.iconAtlasImage=e.iconAtlasImage),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.CollisionBoxArray},st.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=\\\"unloaded\\\"},st.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state=\\\"unloaded\\\"},st.prototype.getBucket=function(t){return this.buckets[t.id]},st.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploaded||(r.upload(t),r.uploaded=!0)}var n=t.gl;this.iconAtlasImage&&(this.iconAtlasTexture=new z(t,this.iconAtlasImage,n.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new z(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)},st.prototype.queryRenderedFeatures=function(t,e,r,n,i,a,o){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:e,scale:r,tileSize:this.tileSize,posMatrix:o,transform:i,params:n,queryPadding:this.queryPadding*a},t):{}},st.prototype.querySourceFeatures=function(e,r){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var n=this.latestFeatureIndex.loadVTLayers(),i=r?r.sourceLayer:\\\"\\\",a=n._geojsonTileLayer||n[i];if(a)for(var o=t.default$13(r&&r.filter),s={z:this.tileID.overscaledZ,x:this.tileID.canonical.x,y:this.tileID.canonical.y},l=0;l<a.length;l++){var c=a.feature(l);if(o(new t.default$16(this.tileID.overscaledZ),c)){var u=new t.default$12(c,s.z,s.x,s.y);u.tile=s,e.push(u)}}}},st.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},st.prototype.setMask=function(e,r){if(!t.default$10(this.mask,e)&&(this.mask=e,this.clearMask(),!t.default$10(e,{0:!0}))){var n=new t.RasterBoundsArray,i=new t.TriangleIndexArray;this.segments=new t.default$15,this.segments.prepareSegment(0,n,i);for(var a=Object.keys(e),o=0;o<a.length;o++){var s=e[a[o]],l=t.default$8>>s.z,c=new t.default$1(s.x*l,s.y*l),u=new t.default$1(c.x+l,c.y+l),f=this.segments.prepareSegment(4,n,i);n.emplaceBack(c.x,c.y,c.x,c.y),n.emplaceBack(u.x,c.y,u.x,c.y),n.emplaceBack(c.x,u.y,c.x,u.y),n.emplaceBack(u.x,u.y,u.x,u.y);var h=f.vertexLength;i.emplaceBack(h,h+1,h+2),i.emplaceBack(h+1,h+2,h+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=r.createVertexBuffer(n,K.members),this.maskedIndexBuffer=r.createIndexBuffer(i)}},st.prototype.hasData=function(){return\\\"loaded\\\"===this.state||\\\"reloading\\\"===this.state||\\\"expired\\\"===this.state},st.prototype.setExpiryData=function(e){var r=this.expirationTime;if(e.cacheControl){var n=t.parseCacheControl(e.cacheControl);n[\\\"max-age\\\"]&&(this.expirationTime=Date.now()+1e3*n[\\\"max-age\\\"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var i=Date.now(),a=!1;if(this.expirationTime>i)a=!1;else if(r)if(this.expirationTime<r)a=!0;else{var o=this.expirationTime-r;o?this.expirationTime=i+Math.max(o,3e4):a=!0}else a=!0;a?(this.expiredRequestCount++,this.state=\\\"expired\\\"):this.expiredRequestCount=0}},st.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)};var lt=function(t,e){this.max=t,this.onRemove=e,this.reset()};lt.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var n=r[e];n.timeout&&clearTimeout(n.timeout),this.onRemove(n.value)}return this.data={},this.order=[],this},lt.prototype.add=function(t,e,r){var n=this,i=t.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);var a={value:e,timeout:void 0};if(void 0!==r&&(a.timeout=setTimeout(function(){n.remove(t,a)},r)),this.data[i].push(a),this.order.push(i),this.order.length>this.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},lt.prototype.has=function(t){return t.wrapped().key in this.data},lt.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},lt.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},lt.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},lt.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},lt.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var ct=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ct.prototype.unbindVAO=function(){this.context.extVertexArrayObject&&this.context.bindVertexArrayOES.set(null)},ct.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},ct.prototype.updateData=function(t){var e=this.context.gl;this.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},ct.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var ut={Int8:\\\"BYTE\\\",Uint8:\\\"UNSIGNED_BYTE\\\",Int16:\\\"SHORT\\\",Uint16:\\\"UNSIGNED_SHORT\\\",Int32:\\\"INT\\\",Uint32:\\\"UNSIGNED_INT\\\",Float32:\\\"FLOAT\\\"},ft=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};ft.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},ft.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},ft.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var n=this.attributes[r],i=e.attributes[n.name];void 0!==i&&t.enableVertexAttribArray(i)}},ft.prototype.setVertexAttribPointers=function(t,e,r){for(var n=0;n<this.attributes.length;n++){var i=this.attributes[n],a=e.attributes[i.name];void 0!==a&&t.vertexAttribPointer(a,i.components,t[ut[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}},ft.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var ht=function(e){this.context=e,this.current=t.default$6.transparent};ht.prototype.get=function(){return this.current},ht.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t)};var pt=function(t){this.context=t,this.current=1};pt.prototype.get=function(){return this.current},pt.prototype.set=function(t){this.current!==t&&(this.context.gl.clearDepth(t),this.current=t)};var dt=function(t){this.context=t,this.current=0};dt.prototype.get=function(){return this.current},dt.prototype.set=function(t){this.current!==t&&(this.context.gl.clearStencil(t),this.current=t)};var gt=function(t){this.context=t,this.current=[!0,!0,!0,!0]};gt.prototype.get=function(){return this.current},gt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t)};var vt=function(t){this.context=t,this.current=!0};vt.prototype.get=function(){return this.current},vt.prototype.set=function(t){this.current!==t&&(this.context.gl.depthMask(t),this.current=t)};var mt=function(t){this.context=t,this.current=255};mt.prototype.get=function(){return this.current},mt.prototype.set=function(t){this.current!==t&&(this.context.gl.stencilMask(t),this.current=t)};var yt=function(t){this.context=t,this.current={func:t.gl.ALWAYS,ref:0,mask:255}};yt.prototype.get=function(){return this.current},yt.prototype.set=function(t){var e=this.current;t.func===e.func&&t.ref===e.ref&&t.mask===e.mask||(this.context.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t)};var xt=function(t){this.context=t;var e=this.context.gl;this.current=[e.KEEP,e.KEEP,e.KEEP]};xt.prototype.get=function(){return this.current},xt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]||(this.context.gl.stencilOp(t[0],t[1],t[2]),this.current=t)};var bt=function(t){this.context=t,this.current=!1};bt.prototype.get=function(){return this.current},bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t}};var _t=function(t){this.context=t,this.current=[0,1]};_t.prototype.get=function(){return this.current},_t.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.depthRange(t[0],t[1]),this.current=t)};var wt=function(t){this.context=t,this.current=!1};wt.prototype.get=function(){return this.current},wt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t}};var kt=function(t){this.context=t,this.current=t.gl.LESS};kt.prototype.get=function(){return this.current},kt.prototype.set=function(t){this.current!==t&&(this.context.gl.depthFunc(t),this.current=t)};var Mt=function(t){this.context=t,this.current=!1};Mt.prototype.get=function(){return this.current},Mt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t}};var At=function(t){this.context=t;var e=this.context.gl;this.current=[e.ONE,e.ZERO]};At.prototype.get=function(){return this.current},At.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.blendFunc(t[0],t[1]),this.current=t)};var Tt=function(e){this.context=e,this.current=t.default$6.transparent};Tt.prototype.get=function(){return this.current},Tt.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t)};var St=function(t){this.context=t,this.current=null};St.prototype.get=function(){return this.current},St.prototype.set=function(t){this.current!==t&&(this.context.gl.useProgram(t),this.current=t)};var Ct=function(t){this.context=t,this.current=1};Ct.prototype.get=function(){return this.current},Ct.prototype.set=function(e){var r=this.context.lineWidthRange,n=t.clamp(e,r[0],r[1]);this.current!==n&&(this.context.gl.lineWidth(n),this.current=e)};var Et=function(t){this.context=t,this.current=t.gl.TEXTURE0};Et.prototype.get=function(){return this.current},Et.prototype.set=function(t){this.current!==t&&(this.context.gl.activeTexture(t),this.current=t)};var Lt=function(t){this.context=t;var e=this.context.gl;this.current=[0,0,e.drawingBufferWidth,e.drawingBufferHeight]};Lt.prototype.get=function(){return this.current},Lt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t)};var zt=function(t){this.context=t,this.current=null};zt.prototype.get=function(){return this.current},zt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t}};var Ot=function(t){this.context=t,this.current=null};Ot.prototype.get=function(){return this.current},Ot.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t}};var It=function(t){this.context=t,this.current=null};It.prototype.get=function(){return this.current},It.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t}};var Pt=function(t){this.context=t,this.current=null};Pt.prototype.get=function(){return this.current},Pt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t}};var Dt=function(t){this.context=t,this.current=null};Dt.prototype.get=function(){return this.current},Dt.prototype.set=function(t){var e=this.context.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t};var Rt=function(t){this.context=t,this.current=null};Rt.prototype.get=function(){return this.current},Rt.prototype.set=function(t){this.current!==t&&this.context.extVertexArrayObject&&(this.context.extVertexArrayObject.bindVertexArrayOES(t),this.current=t)};var Bt=function(t){this.context=t,this.current=4};Bt.prototype.get=function(){return this.current},Bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t}};var Ft=function(t){this.context=t,this.current=!1};Ft.prototype.get=function(){return this.current},Ft.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t}};var Nt=function(t,e){this.context=t,this.current=null,this.parent=e};Nt.prototype.get=function(){return this.current};var jt=function(t){function e(e,r){t.call(this,e,r),this.dirty=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.dirty||this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e.prototype.setDirty=function(){this.dirty=!0},e}(Nt),Vt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t}},e}(Nt),Ut=function(t,e,r){this.context=t,this.width=e,this.height=r;var n=t.gl,i=this.framebuffer=n.createFramebuffer();this.colorAttachment=new jt(t,i),this.depthAttachment=new Vt(t,i)};Ut.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r),t.deleteFramebuffer(this.framebuffer)};var qt=function(t,e,r){this.func=t,this.mask=e,this.range=r};qt.ReadOnly=!1,qt.ReadWrite=!0,qt.disabled=new qt(519,qt.ReadOnly,[0,1]);var Ht=function(t,e,r,n,i,a){this.test=t,this.ref=e,this.mask=r,this.fail=n,this.depthFail=i,this.pass=a};Ht.disabled=new Ht({func:519,mask:0},0,0,7680,7680,7680);var Gt=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};Gt.disabled=new Gt(Gt.Replace=[1,0],t.default$6.transparent,[!1,!1,!1,!1]),Gt.unblended=new Gt(Gt.Replace,t.default$6.transparent,[!0,!0,!0,!0]),Gt.alphaBlended=new Gt([1,771],t.default$6.transparent,[!0,!0,!0,!0]);var Wt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension(\\\"OES_vertex_array_object\\\"),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE),this.clearColor=new ht(this),this.clearDepth=new pt(this),this.clearStencil=new dt(this),this.colorMask=new gt(this),this.depthMask=new vt(this),this.stencilMask=new mt(this),this.stencilFunc=new yt(this),this.stencilOp=new xt(this),this.stencilTest=new bt(this),this.depthRange=new _t(this),this.depthTest=new wt(this),this.depthFunc=new kt(this),this.blend=new Mt(this),this.blendFunc=new At(this),this.blendColor=new Tt(this),this.program=new St(this),this.lineWidth=new Ct(this),this.activeTexture=new Et(this),this.viewport=new Lt(this),this.bindFramebuffer=new zt(this),this.bindRenderbuffer=new Ot(this),this.bindTexture=new It(this),this.bindVertexBuffer=new Pt(this),this.bindElementBuffer=new Dt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Rt(this),this.pixelStoreUnpack=new Bt(this),this.pixelStoreUnpackPremultiplyAlpha=new Ft(this),this.extTextureFilterAnisotropic=t.getExtension(\\\"EXT_texture_filter_anisotropic\\\")||t.getExtension(\\\"MOZ_EXT_texture_filter_anisotropic\\\")||t.getExtension(\\\"WEBKIT_EXT_texture_filter_anisotropic\\\"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension(\\\"OES_texture_half_float\\\"),this.extTextureHalfFloat&&t.getExtension(\\\"OES_texture_half_float_linear\\\")};Wt.prototype.createIndexBuffer=function(t,e){return new ct(this,t,e)},Wt.prototype.createVertexBuffer=function(t,e,r){return new ft(this,t,e,r)},Wt.prototype.createRenderbuffer=function(t,e,r){var n=this.gl,i=n.createRenderbuffer();return this.bindRenderbuffer.set(i),n.renderbufferStorage(n.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),i},Wt.prototype.createFramebuffer=function(t,e){return new Ut(this,t,e)},Wt.prototype.clear=function(t){var e=t.color,r=t.depth,n=this.gl,i=0;e&&(i|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(i|=n.DEPTH_BUFFER_BIT,this.clearDepth.set(r),this.depthMask.set(!0)),n.clear(i)},Wt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Wt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Wt.prototype.setColorMode=function(e){t.default$10(e.blendFunction,Gt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)};var Yt=function(e){function r(t,r,n){var i=this;e.call(this),this.id=t,this.dispatcher=n,this.on(\\\"data\\\",function(t){\\\"source\\\"===t.dataType&&\\\"metadata\\\"===t.sourceDataType&&(i._sourceLoaded=!0),i._sourceLoaded&&!i._paused&&\\\"source\\\"===t.dataType&&\\\"content\\\"===t.sourceDataType&&(i.reload(),i.transform&&i.update(i.transform))}),this.on(\\\"error\\\",function(){i._sourceErrored=!0}),this._source=it(t,r,n,this),this._tiles={},this._cache=new lt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this),this._coveredTiles={}}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if(\\\"loaded\\\"!==e.state&&\\\"errored\\\"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._tiles)this._tiles[e].upload(t)},r.prototype.getIds=function(){var e=this;return Object.keys(this._tiles).map(Number).sort(function(r,n){var i=e._tiles[r].tileID,a=e._tiles[n].tileID,o=new t.default$1(i.canonical.x,i.canonical.y).rotate(e.transform.angle),s=new t.default$1(a.canonical.x,a.canonical.y).rotate(e.transform.angle);return i.overscaledZ-a.overscaledZ||s.y-o.y||s.x-o.x})},r.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0,{});return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)this._reloadTile(t,\\\"reloading\\\")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&(\\\"loading\\\"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,n,i){if(i)return e.state=\\\"errored\\\",void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform));e.timeAdded=a.now(),\\\"expired\\\"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),\\\"raster-dem\\\"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._source.fire(new t.Event(\\\"data\\\",{dataType:\\\"source\\\",tile:e,coord:e.tileID})),this.map&&(this.map.painter.tileExtentVAO.vao=null)},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var n=e[r];if(t.neighboringTiles&&t.neighboringTiles[n]){var i=this.getTileByID(n);a(t,i),a(i,t)}}function a(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,n=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),a=e.tileID.key;0===r&&0===n||Math.abs(n)>1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[a]&&(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._findLoadedChildren=function(t,e,r){var n=!1;for(var i in this._tiles){var a=this._tiles[i];if(!(r[i]||!a.hasData()||a.tileID.overscaledZ<=t.overscaledZ||a.tileID.overscaledZ>e)){var o=Math.pow(2,a.tileID.canonical.z-t.canonical.z);if(Math.floor(a.tileID.canonical.x/o)===t.canonical.x&&Math.floor(a.tileID.canonical.y/o)===t.canonical.y)for(r[i]=a.tileID,n=!0;a&&a.tileID.overscaledZ-1>t.overscaledZ;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);if(!s)break;(a=this._tiles[s.key])&&a.hasData()&&(delete r[i],r[s.key]=s)}}}return n},r.prototype.findLoadedParent=function(t,e,r){for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n);if(!i)return;var a=String(i.key),o=this._tiles[a];if(o&&o.hasData())return r[a]=i,o;if(this._cache.has(i))return r[a]=i,this._cache.get(i)}},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),n=\\\"number\\\"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter(function(t){return n._source.hasTile(t)}))):i=[];var o,s=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),l=Math.max(s-r.maxOverzooming,this._source.minzoom),c=Math.max(s+r.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(i,s),f={};if(Zt(this._source.type))for(var h=Object.keys(u),p=0;p<h.length;p++){var d=h[p],g=u[d],v=n._tiles[d];if(v&&(void 0===v.fadeEndTime||v.fadeEndTime>=a.now())){n._findLoadedChildren(g,c,u)&&(u[d]=g);var m=n.findLoadedParent(g,l,f);m&&n._addTile(m.tileID)}}for(o in f)u[o]||(n._coveredTiles[o]=!0);for(o in f)u[o]=f[o];for(var y=t.keysDifference(this._tiles,u),x=0;x<y.length;x++)n._removeTile(y[x])}},r.prototype._updateRetainedTiles=function(t,e){for(var n={},i={},a=Math.max(e-r.maxOverzooming,this._source.minzoom),o=Math.max(e+r.maxUnderzooming,this._source.minzoom),s=0;s<t.length;s++){var l=t[s],c=this._addTile(l),u=!1;if(c.hasData())n[l.key]=l;else{u=c.wasRequested(),n[l.key]=l;var f=!0;if(e+1>this._source.maxzoom){var h=l.children(this._source.maxzoom)[0],p=this.getTile(h);p&&p.hasData()?n[h.key]=h:f=!1}else{this._findLoadedChildren(l,o,n);for(var d=l.children(this._source.maxzoom),g=0;g<d.length;g++)if(!n[d[g].key]){f=!1;break}}if(!f)for(var v=l.overscaledZ-1;v>=a;--v){var m=l.scaledTo(v);if(i[m.key])break;if(i[m.key]=!0,!(c=this.getTile(m))&&u&&(c=this._addTile(m)),c&&(n[m.key]=m,u=c.wasRequested(),c.hasData()))break}}}return n},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e);var n=Boolean(r);return n||(r=new st(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event(\\\"dataloading\\\",{tile:r,coord:r.tileID,dataType:\\\"source\\\"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,\\\"expired\\\"),delete r._timers[t]},n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r){for(var n=[],i=this.getIds(),a=1/0,o=1/0,s=-1/0,l=-1/0,c=e[0].zoom,u=0;u<e.length;u++){var f=e[u];a=Math.min(a,f.column),o=Math.min(o,f.row),s=Math.max(s,f.column),l=Math.max(l,f.row)}for(var h=0;h<i.length;h++){var p=this._tiles[i[h]],d=p.tileID,g=Math.pow(2,this.transform.zoom-p.tileID.overscaledZ),v=r*p.queryPadding*t.default$8/p.tileSize/g,m=[Xt(d,new t.default$17(a,o,c)),Xt(d,new t.default$17(s,l,c))];if(m[0].x-v<t.default$8&&m[0].y-v<t.default$8&&m[1].x+v>=0&&m[1].y+v>=0){for(var y=[],x=0;x<e.length;x++)y.push(Xt(d,e[x]));n.push({tile:p,tileID:d,queryGeometry:[y],scale:g})}}return n},r.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(function(e){return t._tiles[e].tileID}),r=0,n=e;r<n.length;r+=1){var i=n[r];i.posMatrix=t.transform.calculatePosMatrix(i.toUnwrapped())}return e},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Zt(this._source.type))for(var t in this._tiles){var e=this._tiles[t];if(void 0!==e.fadeEndTime&&e.fadeEndTime>=a.now())return!0}return!1},r}(t.Evented);function Xt(e,r){var n=r.zoomTo(e.canonical.z);return new t.default$1((n.column-(e.canonical.x+e.wrap*Math.pow(2,e.canonical.z)))*t.default$8,(n.row-e.canonical.y)*t.default$8)}function Zt(t){return\\\"raster\\\"===t||\\\"image\\\"===t||\\\"video\\\"===t}function $t(){return new t.default.Worker(Cn.workerUrl)}Yt.maxOverzooming=10,Yt.maxUnderzooming=3;var Jt,Kt=function(){this.active={}};function Qt(e,r){var n={};for(var i in e)\\\"ref\\\"!==i&&(n[i]=e[i]);return t.default$18.forEach(function(t){t in r&&(n[t]=r[t])}),n}function te(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var n=0;n<t.length;n++)\\\"ref\\\"in t[n]&&(t[n]=Qt(t[n],e[t[n].ref]));return t}Kt.prototype.acquire=function(t){if(!this.workers){var e=Cn.workerCount;for(this.workers=[];this.workers.length<e;)this.workers.push(new $t)}return this.active[t]=!0,this.workers.slice()},Kt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)};var ee={setStyle:\\\"setStyle\\\",addLayer:\\\"addLayer\\\",removeLayer:\\\"removeLayer\\\",setPaintProperty:\\\"setPaintProperty\\\",setLayoutProperty:\\\"setLayoutProperty\\\",setFilter:\\\"setFilter\\\",addSource:\\\"addSource\\\",removeSource:\\\"removeSource\\\",setGeoJSONSourceData:\\\"setGeoJSONSourceData\\\",setLayerZoomRange:\\\"setLayerZoomRange\\\",setLayerProperty:\\\"setLayerProperty\\\",setCenter:\\\"setCenter\\\",setZoom:\\\"setZoom\\\",setBearing:\\\"setBearing\\\",setPitch:\\\"setPitch\\\",setSprite:\\\"setSprite\\\",setGlyphs:\\\"setGlyphs\\\",setTransition:\\\"setTransition\\\",setLight:\\\"setLight\\\"};function re(t,e,r){r.push({command:ee.addSource,args:[t,e[t]]})}function ne(t,e,r){e.push({command:ee.removeSource,args:[t]}),r[t]=!0}function ie(t,e,r,n){ne(t,r,n),re(t,e,r)}function ae(e,r,n){var i;for(i in e[n])if(e[n].hasOwnProperty(i)&&\\\"data\\\"!==i&&!t.default$10(e[n][i],r[n][i]))return!1;for(i in r[n])if(r[n].hasOwnProperty(i)&&\\\"data\\\"!==i&&!t.default$10(e[n][i],r[n][i]))return!1;return!0}function oe(e,r,n,i,a,o){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.default$10(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.default$10(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}))}function se(t){return t.id}function le(t,e){return t[e.id]=e,t}var ce=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var a=0;a<this.xCellCount*this.yCellCount;a++)n.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};ce.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},ce.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},ce.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},ce.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},ce.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},ce.prototype._query=function(t,e,r,n,i){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var a=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var o=0;o<this.boxKeys.length;o++)a.push({key:this.boxKeys[o],x1:this.bboxes[4*o],y1:this.bboxes[4*o+1],x2:this.bboxes[4*o+2],y2:this.bboxes[4*o+3]});for(var s=0;s<this.circleKeys.length;s++){var l=this.circles[3*s],c=this.circles[3*s+1],u=this.circles[3*s+2];a.push({key:this.circleKeys[s],x1:l-u,y1:c-u,x2:l+u,y2:c+u})}}else{var f={hitTest:i,seenUids:{box:{},circle:{}}};this._forEachCell(t,e,r,n,this._queryCell,a,f)}return i?a.length>0:a},ce.prototype._queryCircle=function(t,e,r,n){var i=t-r,a=t+r,o=e-r,s=e+r;if(a<0||i>this.width||s<0||o>this.height)return!n&&[];var l=[],c={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(i,o,a,s,this._queryCellCircle,l,c),n?l.length>0:l},ce.prototype.query=function(t,e,r,n){return this._query(t,e,r,n,!1)},ce.prototype.hitTest=function(t,e,r,n){return this._query(t,e,r,n,!0)},ce.prototype.hitTestCircle=function(t,e,r){return this._queryCircle(t,e,r,!0)},ce.prototype._queryCell=function(t,e,r,n,i,a,o){var s=o.seenUids,l=this.boxCells[i];if(null!==l)for(var c=this.bboxes,u=0,f=l;u<f.length;u+=1){var h=f[u];if(!s.box[h]){s.box[h]=!0;var p=4*h;if(t<=c[p+2]&&e<=c[p+3]&&r>=c[p+0]&&n>=c[p+1]){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[h],x1:c[p],y1:c[p+1],x2:c[p+2],y2:c[p+3]})}}}var d=this.circleCells[i];if(null!==d)for(var g=this.circles,v=0,m=d;v<m.length;v+=1){var y=m[v];if(!s.circle[y]){s.circle[y]=!0;var x=3*y;if(this._circleAndRectCollide(g[x],g[x+1],g[x+2],t,e,r,n)){if(o.hitTest)return a.push(!0),!0;var b=g[x],_=g[x+1],w=g[x+2];a.push({key:this.circleKeys[y],x1:b-w,y1:_-w,x2:b+w,y2:_+w})}}}},ce.prototype._queryCellCircle=function(t,e,r,n,i,a,o){var s=o.circle,l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f<h.length;f+=1){var p=h[f];if(!l.box[p]){l.box[p]=!0;var d=4*p;if(this._circleAndRectCollide(s.x,s.y,s.radius,u[d+0],u[d+1],u[d+2],u[d+3]))return a.push(!0),!0}}var g=this.circleCells[i];if(null!==g)for(var v=this.circles,m=0,y=g;m<y.length;m+=1){var x=y[m];if(!l.circle[x]){l.circle[x]=!0;var b=3*x;if(this._circlesCollide(v[b],v[b+1],v[b+2],s.x,s.y,s.radius))return a.push(!0),!0}}},ce.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToXCellCoord(t),l=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),u=this._convertToYCellCoord(n),f=s;f<=c;f++)for(var h=l;h<=u;h++){var p=this.xCellCount*h+f;if(i.call(this,t,e,r,n,p,a,o))return}},ce.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},ce.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},ce.prototype._circlesCollide=function(t,e,r,n,i,a){var o=n-t,s=i-e,l=r+a;return l*l>o*o+s*s},ce.prototype._circleAndRectCollide=function(t,e,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var c=(o-i)/2,u=Math.abs(e-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var f=l-s,h=u-c;return f*f+h*h<=r*r};var ue=t.default$19.layout;function fe(e,r,n,i,a){var o=t.mat4.identity(new Float32Array(16));return r?(t.mat4.identity(o),t.mat4.scale(o,o,[1/a,1/a,1]),n||t.mat4.rotateZ(o,o,i.angle)):(t.mat4.scale(o,o,[i.width/2,-i.height/2,1]),t.mat4.translate(o,o,[1,-1,0]),t.mat4.multiply(o,o,e)),o}function he(e,r,n,i,a){var o=t.mat4.identity(new Float32Array(16));return r?(t.mat4.multiply(o,o,e),t.mat4.scale(o,o,[a,a,1]),n||t.mat4.rotateZ(o,o,-i.angle)):(t.mat4.scale(o,o,[1,-1,1]),t.mat4.translate(o,o,[-1,-1,0]),t.mat4.scale(o,o,[2/i.width,2/i.height,1])),o}function pe(e,r){var n=[e.x,e.y,0,1];ke(n,n,r);var i=n[3];return{point:new t.default$1(n[0]/i,n[1]/i),signedDistanceFromCamera:i}}function de(t,e){var r=t[0]/t[3],n=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ge(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom,ue.properties[i?\\\"text-size\\\":\\\"icon-size\\\"]),f=[256/n.width*2+1,256/n.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,v=!1,m=0;m<d.length;m++){var y=d.get(m);if(y.hidden||y.writingMode===t.WritingMode.vertical&&!v)we(y.numGlyphs,h);else{v=!1;var x=[y.anchorX,y.anchorY,0,1];if(t.vec4.transformMat4(x,x,r),de(x,f)){var b=.5+x[3]/n.transform.cameraToCenterDistance*.5,_=t.evaluateSizeForFeature(c,u,y),w=s?_*b:_/b,k=new t.default$1(y.anchorX,y.anchorY),M=pe(k,a).point,A={},T=ye(y,w,!1,l,r,a,o,e.glyphOffsetArray,p,h,M,k,A,g);v=T.useVertical,(T.notEnoughRoom||v||T.needsFlipping&&ye(y,w,!0,l,r,a,o,e.glyphOffsetArray,p,h,M,k,A,g).notEnoughRoom)&&we(y.numGlyphs,h)}else we(y.numGlyphs,h)}}i?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function ve(t,e,r,n,i,a,o,s,l,c,u,f){var h=s.glyphStartIndex+s.numGlyphs,p=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,g=e.getoffsetX(s.glyphStartIndex),v=e.getoffsetX(h-1),m=be(t*g,r,n,i,a,o,s.segment,p,d,l,c,u,f);if(!m)return null;var y=be(t*v,r,n,i,a,o,s.segment,p,d,l,c,u,f);return y?{first:m,last:y}:null}function me(e,r,n,i){return e===t.WritingMode.horizontal&&Math.abs(n.y-r.y)>Math.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.y<n.y:r.x>n.x)?{needsFlipping:!0}:null}function ye(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,v=r/24,m=e.lineOffsetX*r,y=e.lineOffsetY*r;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ve(v,l,m,y,n,f,h,e,c,o,p,!1);if(!w)return{notEnoughRoom:!0};var k=pe(w.first.point,s).point,M=pe(w.last.point,s).point;if(i&&!n){var A=me(e.writingMode,k,M,d);if(A)return A}g=[w.first];for(var T=e.glyphStartIndex+1;T<x-1;T++)g.push(be(v*l.getoffsetX(T),m,y,n,f,h,e.segment,b,_,c,o,p,!1));g.push(w.last)}else{if(i&&!n){var S=pe(h,a).point,C=e.lineStartIndex+e.segment+1,E=new t.default$1(c.getx(C),c.gety(C)),L=pe(E,a),z=L.signedDistanceFromCamera>0?L.point:xe(h,E,S,1,a),O=me(e.writingMode,S,z,d);if(O)return O}var I=be(v*l.getoffsetX(e.glyphStartIndex),m,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p,!1);if(!I)return{notEnoughRoom:!0};g=[I]}for(var P=0,D=g;P<D.length;P+=1){var R=D[P];t.addDynamicAttributes(u,R.point,R.angle)}return{}}function xe(t,e,r,n,i){var a=pe(t.add(t.sub(e)._unit()),i).point,o=r.sub(a);return r.add(o._mult(n/o.mag()))}function be(e,r,n,i,a,o,s,l,c,u,f,h,p){var d=i?e-r:e+r,g=d>0?1:-1,v=0;i&&(g*=-1,v=Math.PI),g<0&&(v+=Math.PI);for(var m=g>0?l+s:l+s+1,y=m,x=a,b=a,_=0,w=0,k=Math.abs(d);_+w<=k;){if((m+=g)<l||m>=c)return null;if(b=x,void 0===(x=h[m])){var M=new t.default$1(u.getx(m),u.gety(m)),A=pe(M,f);if(A.signedDistanceFromCamera>0)x=h[m]=A.point;else{var T=m-g;x=xe(0===_?o:new t.default$1(u.getx(T),u.gety(T)),M,b,k-_+1,f)}}_+=w,w=b.dist(x)}var S=(k-_)/w,C=x.sub(b),E=C.mult(S)._add(b);return E._add(C._unit()._perp()._mult(n*g)),{point:E,angle:v+Math.atan2(x.y-b.y,x.x-b.x),tileDistance:p?{prevTileDistance:m-g===y?0:u.gettileUnitDistanceFromAnchor(m-g),lastSegmentViewportDistance:k-_}:null}}var _e=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function we(t,e){for(var r=0;r<t;r++){var n=e.length;e.resize(n+4),e.float32.set(_e,3*n)}}function ke(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t[3]=r[3]*n+r[7]*i+r[15],t}t.default$20.mat4;var Me=function(t,e,r){void 0===e&&(e=new ce(t.width+200,t.height+200,25)),void 0===r&&(r=new ce(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100};function Ae(t,e,r){t[e+4]=r?1:0}function Te(e,r,n){return r*(t.default$8/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}Me.prototype.placeCollisionBox=function(t,e,r,n){var i=this.projectAndGetPerspectiveRatio(n,t.anchorPointX,t.anchorPointY),a=r*i.perspectiveRatio,o=t.x1*a+i.point.x,s=t.y1*a+i.point.y,l=t.x2*a+i.point.x,c=t.y2*a+i.point.y;return!e&&this.grid.hitTest(o,s,l,c)?{box:[],offscreen:!1}:{box:[o,s,l,c],offscreen:this.isOffscreen(o,s,l,c)}},Me.prototype.approximateTileDistance=function(t,e,r,n,i){var a=i?1:n/this.pitchfactor,o=t.lastSegmentViewportDistance*r;return t.prevTileDistance+o+(a-1)*o*Math.abs(Math.sin(e))},Me.prototype.placeCollisionCircles=function(e,r,n,i,a,o,s,l,c,u,f,h,p){var d=[],g=this.projectAnchor(u,o.anchorX,o.anchorY),v=c/24,m=o.lineOffsetX*c,y=o.lineOffsetY*c,x=new t.default$1(o.anchorX,o.anchorY),b=ve(v,l,m,y,!1,pe(x,f).point,x,o,s,f,{},!0),_=!1,w=!0,k=g.perspectiveRatio*i,M=1/(i*n),A=0,T=0;b&&(A=this.approximateTileDistance(b.first.tileDistance,b.first.angle,M,g.cameraDistance,p),T=this.approximateTileDistance(b.last.tileDistance,b.last.angle,M,g.cameraDistance,p));for(var S=0;S<e.length;S+=5){var C=e[S],E=e[S+1],L=e[S+2],z=e[S+3];if(!b||z<-A||z>T)Ae(e,S,!1);else{var O=this.projectPoint(u,C,E),I=L*k;if(d.length>0){var P=O.x-d[d.length-4],D=O.y-d[d.length-3];if(I*I*2>P*P+D*D&&S+8<e.length){var R=e[S+8];if(R>-A&&R<T){Ae(e,S,!1);continue}}}var B=S/5;if(d.push(O.x,O.y,I,B),Ae(e,S,!0),w=w&&this.isOffscreen(O.x-I,O.y-I,O.x+I,O.y+I),!r&&this.grid.hitTestCircle(O.x,O.y,I)){if(!h)return{circles:[],offscreen:!1};_=!0}}}return{circles:_?[]:d,offscreen:w}},Me.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],n=1/0,i=1/0,a=-1/0,o=-1/0,s=0,l=e;s<l.length;s+=1){var c=l[s],u=new t.default$1(c.x+100,c.y+100);n=Math.min(n,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),o=Math.max(o,u.y),r.push(u)}for(var f={},h={},p=0,d=this.grid.query(n,i,a,o).concat(this.ignoredGrid.query(n,i,a,o));p<d.length;p+=1){var g=d[p],v=g.key;if(void 0===f[v.bucketInstanceId]&&(f[v.bucketInstanceId]={}),!f[v.bucketInstanceId][v.featureIndex]){var m=[new t.default$1(g.x1,g.y1),new t.default$1(g.x2,g.y1),new t.default$1(g.x2,g.y2),new t.default$1(g.x1,g.y2)];t.polygonIntersectsPolygon(r,m)&&(f[v.bucketInstanceId][v.featureIndex]=!0,void 0===h[v.bucketInstanceId]&&(h[v.bucketInstanceId]=[]),h[v.bucketInstanceId].push(v.featureIndex))}}return h},Me.prototype.insertCollisionBox=function(t,e,r,n){var i={bucketInstanceId:r,featureIndex:n};(e?this.ignoredGrid:this.grid).insert(i,t[0],t[1],t[2],t[3])},Me.prototype.insertCollisionCircles=function(t,e,r,n){for(var i=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:n},o=0;o<t.length;o+=4)i.insertCircle(a,t[o],t[o+1],t[o+2])},Me.prototype.projectAnchor=function(t,e,r){var n=[e,r,0,1];return ke(n,n,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}},Me.prototype.projectPoint=function(e,r,n){var i=[r,n,0,1];return ke(i,i,e),new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100)},Me.prototype.projectAndGetPerspectiveRatio=function(e,r,n){var i=[r,n,0,1];return ke(i,i,e),{point:new t.default$1((i[0]/i[3]+1)/2*this.transform.width+100,(-i[1]/i[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},Me.prototype.isOffscreen=function(t,e,r,n){return r<100||t>=this.screenRightBoundary||n<100||e>this.screenBottomBoundary};var Se=t.default$19.layout,Ce=function(t,e,r,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&&r?1:0,this.placed=r};Ce.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var Ee=function(t,e,r,n,i){this.text=new Ce(t?t.text:null,e,r,i),this.icon=new Ce(t?t.icon:null,e,n,i)};Ee.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Le=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},ze=function(t,e){this.transform=t.clone(),this.collisionIndex=new Me(this.transform),this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=e,this.retainedQueryData={}};function Oe(t,e,r){t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0)}ze.prototype.placeLayerTile=function(e,r,n,i){var a=r.getBucket(e),o=r.latestFeatureIndex;if(a&&o&&e.id===a.layerIds[0]){var s=r.collisionBoxArray,l=a.layers[0].layout,c=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),u=r.tileSize/t.default$8,f=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h=fe(f,\\\"map\\\"===l.get(\\\"text-pitch-alignment\\\"),\\\"map\\\"===l.get(\\\"text-rotation-alignment\\\"),this.transform,Te(r,1,this.transform.zoom)),p=fe(f,\\\"map\\\"===l.get(\\\"icon-pitch-alignment\\\"),\\\"map\\\"===l.get(\\\"icon-rotation-alignment\\\"),this.transform,Te(r,1,this.transform.zoom));this.retainedQueryData[a.bucketInstanceId]=new function(t,e,r,n,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i}(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,r.tileID),this.placeLayerBucket(a,f,h,p,c,u,n,i,s)}},ze.prototype.placeLayerBucket=function(e,r,n,i,a,o,s,l,c){for(var u=e.layers[0].layout,f=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,Se.properties[\\\"text-size\\\"]),h=!e.hasTextData()||u.get(\\\"text-optional\\\"),p=!e.hasIconData()||u.get(\\\"icon-optional\\\"),d=0,g=e.symbolInstances;d<g.length;d+=1){var v=g[d];if(!l[v.crossTileID]){var m=void 0!==v.feature.text,y=void 0!==v.feature.icon,x=!0,b=null,_=null,w=null,k=0,M=0;v.collisionArrays||(v.collisionArrays=e.deserializeCollisionBoxes(c,v.textBoxStartIndex,v.textBoxEndIndex,v.iconBoxStartIndex,v.iconBoxEndIndex)),v.collisionArrays.textFeatureIndex&&(k=v.collisionArrays.textFeatureIndex),v.collisionArrays.textBox&&(m=(b=this.collisionIndex.placeCollisionBox(v.collisionArrays.textBox,u.get(\\\"text-allow-overlap\\\"),o,r)).box.length>0,x=x&&b.offscreen);var A=v.collisionArrays.textCircles;if(A){var T=e.text.placedSymbolArray.get(v.placedTextSymbolIndices[0]),S=t.evaluateSizeForFeature(e.textSizeData,f,T);_=this.collisionIndex.placeCollisionCircles(A,u.get(\\\"text-allow-overlap\\\"),a,o,v.key,T,e.lineVertexArray,e.glyphOffsetArray,S,r,n,s,\\\"map\\\"===u.get(\\\"text-pitch-alignment\\\")),m=u.get(\\\"text-allow-overlap\\\")||_.circles.length>0,x=x&&_.offscreen}v.collisionArrays.iconFeatureIndex&&(M=v.collisionArrays.iconFeatureIndex),v.collisionArrays.iconBox&&(y=(w=this.collisionIndex.placeCollisionBox(v.collisionArrays.iconBox,u.get(\\\"icon-allow-overlap\\\"),o,r)).box.length>0,x=x&&w.offscreen),h||p?p?h||(y=y&&m):m=y&&m:y=m=y&&m,m&&b&&this.collisionIndex.insertCollisionBox(b.box,u.get(\\\"text-ignore-placement\\\"),e.bucketInstanceId,k),y&&w&&this.collisionIndex.insertCollisionBox(w.box,u.get(\\\"icon-ignore-placement\\\"),e.bucketInstanceId,M),m&&_&&this.collisionIndex.insertCollisionCircles(_.circles,u.get(\\\"text-ignore-placement\\\"),e.bucketInstanceId,k),this.placements[v.crossTileID]=new Le(m,y,x||e.justReloaded),l[v.crossTileID]=!0}}e.justReloaded=!1},ze.prototype.commit=function(t,e){this.commitTime=e;var r=!1,n=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,i=t?t.opacities:{};for(var a in this.placements){var o=this.placements[a],s=i[a];s?(this.opacities[a]=new Ee(s,n,o.text,o.icon),r=r||o.text!==s.text.placed||o.icon!==s.icon.placed):(this.opacities[a]=new Ee(null,n,o.text,o.icon,o.skipFade),r=r||o.text||o.icon)}for(var l in i){var c=i[l];if(!this.opacities[l]){var u=new Ee(c,n,!1,!1);u.isHidden()||(this.opacities[l]=u,r=r||c.text.placed||c.icon.placed)}}r?this.lastPlacementChangeTime=e:\\\"number\\\"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},ze.prototype.updateLayerOpacities=function(t,e){for(var r={},n=0,i=e;n<i.length;n+=1){var a=i[n],o=a.getBucket(t);o&&a.latestFeatureIndex&&t.id===o.layerIds[0]&&this.updateBucketOpacities(o,r,a.collisionBoxArray)}},ze.prototype.updateBucketOpacities=function(t,e,r){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();for(var n=t.layers[0].layout,i=new Ee(null,0,!1,!1,!0),a=new Ee(null,0,n.get(\\\"text-allow-overlap\\\"),n.get(\\\"icon-allow-overlap\\\"),!0),o=0;o<t.symbolInstances.length;o++){var s=t.symbolInstances[o],l=e[s.crossTileID],c=this.opacities[s.crossTileID];l?c=i:c||(c=a,this.opacities[s.crossTileID]=c),e[s.crossTileID]=!0;var u=s.numGlyphVertices>0||s.numVerticalGlyphVertices>0,f=s.numIconVertices>0;if(u){for(var h=je(c.text),p=(s.numGlyphVertices+s.numVerticalGlyphVertices)/4,d=0;d<p;d++)t.text.opacityVertexArray.emplaceBack(h);for(var g=0,v=s.placedTextSymbolIndices;g<v.length;g+=1){var m=v[g];t.text.placedSymbolArray.get(m).hidden=c.text.isHidden()}}if(f){for(var y=je(c.icon),x=0;x<s.numIconVertices/4;x++)t.icon.opacityVertexArray.emplaceBack(y);t.icon.placedSymbolArray.get(o).hidden=c.icon.isHidden()}s.collisionArrays||(s.collisionArrays=t.deserializeCollisionBoxes(r,s.textBoxStartIndex,s.textBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex));var b=s.collisionArrays;if(b){b.textBox&&t.hasCollisionBoxData()&&Oe(t.collisionBox.collisionVertexArray,c.text.placed,!1),b.iconBox&&t.hasCollisionBoxData()&&Oe(t.collisionBox.collisionVertexArray,c.icon.placed,!1);var _=b.textCircles;if(_&&t.hasCollisionCircleData())for(var w=0;w<_.length;w+=5){var k=l||0===_[w+4];Oe(t.collisionCircle.collisionVertexArray,c.text.placed,k)}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},ze.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},ze.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},ze.prototype.stillRecent=function(t){return\\\"undefined\\\"!==this.commitTime&&this.commitTime+this.fadeDuration>t},ze.prototype.setStale=function(){this.stale=!0};var Ie=Math.pow(2,25),Pe=Math.pow(2,24),De=Math.pow(2,17),Re=Math.pow(2,16),Be=Math.pow(2,9),Fe=Math.pow(2,8),Ne=Math.pow(2,1);function je(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Ie+e*Pe+r*De+e*Re+r*Be+e*Fe+r*Ne+e}var Ve=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Ve.prototype.continuePlacement=function(t,e,r,n,i){for(;this._currentTileIndex<t.length;){var a=t[this._currentTileIndex];if(e.placeLayerTile(n,a,r,this._seenCrossTileIDs),this._currentTileIndex++,i())return!0}};var Ue=function(t,e,r,n,i){this.placement=new ze(t,i),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=n,this._done=!1};Ue.prototype.isDone=function(){return this._done},Ue.prototype.continuePlacement=function(t,e,r){for(var n=this,i=a.now(),o=function(){var t=a.now()-i;return!n._forceFullPlacement&&t>2};this._currentPlacementIndex>=0;){var s=e[t[n._currentPlacementIndex]],l=n.placement.collisionIndex.transform.zoom;if(\\\"symbol\\\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(n._inProgressLayer||(n._inProgressLayer=new Ve),n._inProgressLayer.continuePlacement(r[s.source],n.placement,n._showCollisionBoxes,s,o))return;delete n._inProgressLayer}n._currentPlacementIndex--}this._done=!0},Ue.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var qe=512/t.default$8/2,He=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0,i=e;n<i.length;n+=1){var a=i[n],o=a.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:a.crossTileID,coord:this.getScaledCoordinates(a,t)})}};He.prototype.getScaledCoordinates=function(e,r){var n=r.canonical.z-this.tileID.canonical.z,i=qe/Math.pow(2,n),a=e.anchor;return{x:Math.floor((r.canonical.x*t.default$8+a.x)*i),y:Math.floor((r.canonical.y*t.default$8+a.y)*i)}},He.prototype.findMatches=function(t,e,r){for(var n=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=0,a=t;i<a.length;i+=1){var o=a[i];if(!o.crossTileID){var s=this.indexedSymbolInstances[o.key];if(s)for(var l=this.getScaledCoordinates(o,e),c=0,u=s;c<u.length;c+=1){var f=u[c];if(Math.abs(f.coord.x-l.x)<=n&&Math.abs(f.coord.y-l.y)<=n&&!r[f.crossTileID]){r[f.crossTileID]=!0,o.crossTileID=f.crossTileID;break}}}}};var Ge=function(){this.maxCrossTileID=0};Ge.prototype.generate=function(){return++this.maxCrossTileID};var We=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};We.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var n=this.indexes[r],i={};for(var a in n){var o=n[a];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+e),i[o.tileID.key]=o}this.indexes[r]=i}this.lng=t},We.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var n=0,i=e.symbolInstances;n<i.length;n+=1)i[n].crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var a=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var s=this.indexes[o];if(Number(o)>t.overscaledZ)for(var l in s){var c=s[l];c.tileID.isChildOf(t)&&c.findMatches(e.symbolInstances,t,a)}else{var u=s[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,a)}}for(var f=0,h=e.symbolInstances;f<h.length;f+=1){var p=h[f];p.crossTileID||(p.crossTileID=r.generate(),a[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new He(t,e.symbolInstances,e.bucketInstanceId),!0},We.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var n=0,i=e.indexedSymbolInstances[r];n<i.length;n+=1){var a=i[n];delete this.usedCrossTileIDs[t][a.crossTileID]}},We.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var n=this.indexes[r];for(var i in n)t[n[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,n[i]),delete n[i],e=!0)}return e};var Ye=function(){this.layerIndexes={},this.crossTileIDs=new Ge,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Ye.prototype.addLayer=function(t,e,r){var n=this.layerIndexes[t.id];void 0===n&&(n=this.layerIndexes[t.id]=new We);var i=!1,a={};n.handleWrapJump(r);for(var o=0,s=e;o<s.length;o+=1){var l=s[o],c=l.getBucket(t);c&&t.id===c.layerIds[0]&&(c.bucketInstanceId||(c.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(l.tileID,c,this.crossTileIDs)&&(i=!0),a[c.bucketInstanceId]=!0)}return n.removeStaleBuckets(a)&&(i=!0),i},Ye.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Xe=function(e,r){return t.emitValidationErrors(e,r&&r.filter(function(t){return\\\"source.canvas\\\"!==t.identifier}))},Ze=t.pick(ee,[\\\"addLayer\\\",\\\"removeLayer\\\",\\\"setPaintProperty\\\",\\\"setLayoutProperty\\\",\\\"setFilter\\\",\\\"addSource\\\",\\\"removeSource\\\",\\\"setLayerZoomRange\\\",\\\"setLight\\\",\\\"setTransition\\\",\\\"setGeoJSONSourceData\\\"]),$e=t.pick(ee,[\\\"setCenter\\\",\\\"setZoom\\\",\\\"setBearing\\\",\\\"setPitch\\\"]),Je=function(e){function r(n,i){var a=this;void 0===i&&(i={}),e.call(this),this.map=n,this.dispatcher=new q((Jt||(Jt=new Kt),Jt),this),this.imageManager=new O,this.glyphManager=new F(n._transformRequest,i.localIdeographFontFamily),this.lineAtlas=new U(256,512),this.crossTileSymbolIndex=new Ye,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.default$23,this._loaded=!1,this._resetUpdates();var o=this;this._rtlTextPluginCallback=r.registerForPluginAvailability(function(t){for(var e in o.dispatcher.broadcast(\\\"loadRTLTextPlugin\\\",t.pluginURL,t.completionCallback),o.sourceCaches)o.sourceCaches[e].reload()}),this.on(\\\"data\\\",function(t){if(\\\"source\\\"===t.dataType&&\\\"metadata\\\"===t.sourceDataType){var e=a.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var n in a._layers){var i=a._layers[n];i.source===r.id&&a._validateLayer(i)}}}})}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"style\\\"}));var i=\\\"boolean\\\"==typeof r.validate?r.validate:!x(e);e=function(t,e){if(!x(t))return t;var r=A(t);return r.path=\\\"/styles/v1\\\"+r.path,y(r,e)}(e,r.accessToken);var a=this.map._transformRequest(e,t.ResourceType.Style);t.getJSON(a,function(e,r){e?n.fire(new t.ErrorEvent(e)):r&&n._load(r,i)})},r.prototype.loadJSON=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event(\\\"dataloading\\\",{dataType:\\\"style\\\"})),a.frame(function(){n._load(e,!1!==r.validate)})},r.prototype._load=function(e,r){var n=this;if(!r||!Xe(this,t.validateStyle(e))){for(var i in this._loaded=!0,this.stylesheet=e,e.sources)n.addSource(i,e.sources[i],{validate:!1});e.sprite?function(e,r,n){var i,o,s,l=a.devicePixelRatio>1?\\\"@2x\\\":\\\"\\\";function c(){if(s)n(s);else if(i&&o){var e=a.getImageData(o),r={};for(var l in i){var c=i[l],u=c.width,f=c.height,h=c.x,p=c.y,d=c.sdf,g=c.pixelRatio,v=new t.RGBAImage({width:u,height:f});t.RGBAImage.copy(e,v,{x:h,y:p},{x:0,y:0},{width:u,height:f}),r[l]={data:v,pixelRatio:g,sdf:d}}n(null,r)}}t.getJSON(r(_(e,l,\\\".json\\\"),t.ResourceType.SpriteJSON),function(t,e){s||(s=t,i=e,c())}),t.getImage(r(_(e,l,\\\".png\\\"),t.ResourceType.SpriteImage),function(t,e){s||(s=t,o=e,c())})}(e.sprite,this.map._transformRequest,function(e,r){if(e)n.fire(new t.ErrorEvent(e));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=te(this.stylesheet.layers);this._order=o.map(function(t){return t.id}),this._layers={};for(var s=0,l=o;s<l.length;s+=1){var c=l[s];(c=t.default$22(c)).setEventedParent(n,{layer:{id:c.id}}),n._layers[c.id]=c}this.dispatcher.broadcast(\\\"setLayers\\\",this._serializeLayers(this._order)),this.light=new V(this.stylesheet.light),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"})),this.fire(new t.Event(\\\"style.load\\\"))}},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();(\\\"geojson\\\"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer \\\"'+n+'\\\" does not exist on source \\\"'+i.id+'\\\" as specified by style layer \\\"'+e.id+'\\\"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\\\"Style is not done loading\\\")},r.prototype.update=function(e){if(this._loaded){if(this._changed){var r=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var i in(r.length||n.length)&&this._updateWorkerLayers(r,n),this._updatedSources){var a=this._updatedSources[i];\\\"reload\\\"===a?this._reloadSource(i):\\\"clear\\\"===a&&this._clearSource(i)}for(var o in this._updatedPaintProps)this._layers[o].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates(),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"}))}for(var s in this.sourceCaches)this.sourceCaches[s].used=!1;for(var l=0,c=this._order;l<c.length;l+=1){var u=c[l],f=this._layers[u];f.recalculate(e),!f.isHidden(e.zoom)&&f.source&&(this.sourceCaches[f.source].used=!0)}this.light.recalculate(e),this.z=e.zoom}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast(\\\"updateLayers\\\",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Xe(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=te(e.layers);var n=function(e,r){if(!e)return[{command:ee.setStyle,args:[r]}];var n=[];try{if(!t.default$10(e.version,r.version))return[{command:ee.setStyle,args:[r]}];t.default$10(e.center,r.center)||n.push({command:ee.setCenter,args:[r.center]}),t.default$10(e.zoom,r.zoom)||n.push({command:ee.setZoom,args:[r.zoom]}),t.default$10(e.bearing,r.bearing)||n.push({command:ee.setBearing,args:[r.bearing]}),t.default$10(e.pitch,r.pitch)||n.push({command:ee.setPitch,args:[r.pitch]}),t.default$10(e.sprite,r.sprite)||n.push({command:ee.setSprite,args:[r.sprite]}),t.default$10(e.glyphs,r.glyphs)||n.push({command:ee.setGlyphs,args:[r.glyphs]}),t.default$10(e.transition,r.transition)||n.push({command:ee.setTransition,args:[r.transition]}),t.default$10(e.light,r.light)||n.push({command:ee.setLight,args:[r.light]});var i={},a=[];!function(e,r,n,i){var a;for(a in r=r||{},e=e||{})e.hasOwnProperty(a)&&(r.hasOwnProperty(a)||ne(a,n,i));for(a in r)r.hasOwnProperty(a)&&(e.hasOwnProperty(a)?t.default$10(e[a],r[a])||(\\\"geojson\\\"===e[a].type&&\\\"geojson\\\"===r[a].type&&ae(e,r,a)?n.push({command:ee.setGeoJSONSourceData,args:[a,r[a].data]}):ie(a,r,n,i)):re(a,r,n))}(e.sources,r.sources,a,i);var o=[];e.layers&&e.layers.forEach(function(t){i[t.source]?n.push({command:ee.removeLayer,args:[t.id]}):o.push(t)}),n=n.concat(a),function(e,r,n){r=r||[];var i,a,o,s,l,c,u,f=(e=e||[]).map(se),h=r.map(se),p=e.reduce(le,{}),d=r.reduce(le,{}),g=f.slice(),v=Object.create(null);for(i=0,a=0;i<f.length;i++)o=f[i],d.hasOwnProperty(o)?a++:(n.push({command:ee.removeLayer,args:[o]}),g.splice(g.indexOf(o,a),1));for(i=0,a=0;i<h.length;i++)o=h[h.length-1-i],g[g.length-1-i]!==o&&(p.hasOwnProperty(o)?(n.push({command:ee.removeLayer,args:[o]}),g.splice(g.lastIndexOf(o,g.length-a),1)):a++,c=g[g.length-i],n.push({command:ee.addLayer,args:[d[o],c]}),g.splice(g.length-i,0,o),v[o]=!0);for(i=0;i<h.length;i++)if(s=p[o=h[i]],l=d[o],!v[o]&&!t.default$10(s,l))if(t.default$10(s.source,l.source)&&t.default$10(s[\\\"source-layer\\\"],l[\\\"source-layer\\\"])&&t.default$10(s.type,l.type)){for(u in oe(s.layout,l.layout,n,o,null,ee.setLayoutProperty),oe(s.paint,l.paint,n,o,null,ee.setPaintProperty),t.default$10(s.filter,l.filter)||n.push({command:ee.setFilter,args:[o,l.filter]}),t.default$10(s.minzoom,l.minzoom)&&t.default$10(s.maxzoom,l.maxzoom)||n.push({command:ee.setLayerZoomRange,args:[o,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(u)&&\\\"layout\\\"!==u&&\\\"paint\\\"!==u&&\\\"filter\\\"!==u&&\\\"metadata\\\"!==u&&\\\"minzoom\\\"!==u&&\\\"maxzoom\\\"!==u&&(0===u.indexOf(\\\"paint.\\\")?oe(s[u],l[u],n,o,u.slice(6),ee.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ee.setLayerProperty,args:[o,u,l[u]]}));for(u in l)l.hasOwnProperty(u)&&!s.hasOwnProperty(u)&&\\\"layout\\\"!==u&&\\\"paint\\\"!==u&&\\\"filter\\\"!==u&&\\\"metadata\\\"!==u&&\\\"minzoom\\\"!==u&&\\\"maxzoom\\\"!==u&&(0===u.indexOf(\\\"paint.\\\")?oe(s[u],l[u],n,o,u.slice(6),ee.setPaintProperty):t.default$10(s[u],l[u])||n.push({command:ee.setLayerProperty,args:[o,u,l[u]]}))}else n.push({command:ee.removeLayer,args:[o]}),c=g[g.lastIndexOf(o)+1],n.push({command:ee.addLayer,args:[l,c]})}(o,r.layers,n)}catch(t){console.warn(\\\"Unable to compute style diff:\\\",t),n=[{command:ee.setStyle,args:[r]}]}return n}(this.serialize(),e).filter(function(t){return!(t.command in $e)});if(0===n.length)return!1;var i=n.filter(function(t){return!(t.command in Ze)});if(i.length>0)throw new Error(\\\"Unimplemented: \\\"+i.map(function(t){return t.command}).join(\\\", \\\")+\\\".\\\");return n.forEach(function(t){\\\"setTransition\\\"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error(\\\"An image with this name already exists.\\\")));this.imageManager.addImage(e,r),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"}))},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error(\\\"No image with this name exists.\\\")));this.imageManager.removeImage(e),this.fire(new t.Event(\\\"data\\\",{dataType:\\\"style\\\"}))},r.prototype.addSource=function(e,r,n){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(\\\"There is already a source with this ID\\\");if(!r.type)throw new Error(\\\"The type property must be defined, but the only the following properties were given: \\\"+Object.keys(r).join(\\\", \\\")+\\\".\\\");if(!([\\\"vector\\\",\\\"raster\\\",\\\"geojson\\\",\\\"video\\\",\\\"image\\\"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,\\\"sources.\\\"+e,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[e]=new Yt(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}}),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(\\\"There is no source with this ID\\\");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source \\\"'+e+'\\\" cannot be removed while layer \\\"'+r+'\\\" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event(\\\"data\\\",{sourceDataType:\\\"metadata\\\",dataType:\\\"source\\\",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id \\\"'+i+'\\\" already exists on this map')));else if(\\\"object\\\"==typeof e.source&&(this.addSource(i,e.source),e=t.clone(e),e=t.extend(e,{source:i})),!this._validate(t.validateStyle.layer,\\\"layers.\\\"+i,e,{arrayIndex:-1},n)){var a=t.default$22(e);this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}});var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.ErrorEvent(new Error('Layer with id \\\"'+r+'\\\" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]=\\\"clear\\\":(this._updatedSources[a.source]=\\\"reload\\\",this.sourceCaches[a.source].pause())}this._updateLayer(a)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id \\\"'+r+'\\\" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be moved.\\\")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]}else this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be removed.\\\")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot have zoom extent.\\\")))},r.prototype.setFilter=function(e,r){this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.default$10(n.filter,r))return null==r?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,\\\"layers.\\\"+n.id+\\\".filter\\\",r)||(n.filter=t.clone(r),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be filtered.\\\")))},r.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?t.default$10(i.getLayoutProperty(r),n)||(i.setLayoutProperty(r,n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be styled.\\\")))},r.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},r.prototype.setPaintProperty=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.default$10(i.getPaintProperty(r),n)){var a=i._transitionablePaint._values[r].value.isDataDriven();i.setPaintProperty(r,n),(i._transitionablePaint._values[r].value.isDataDriven()||a)&&this._updateLayer(i),this._changed=!0,this._updatedPaintProps[e]=!0}}else this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+e+\\\"' does not exist in the map's style and cannot be styled.\\\")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){var e=this;return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(t){return void 0!==t})},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]=\\\"reload\\\",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenRenderedFeatures=function(t){for(var e=[],r=this._order.length-1;r>=0;r--)for(var n=this._order[r],i=0,a=t;i<a.length;i+=1){var o=a[i][n];if(o)for(var s=0,l=o;s<l.length;s+=1){var c=l[s];e.push(c)}}return e},r.prototype.queryRenderedFeatures=function(e,r,n){r&&r.filter&&this._validate(t.validateStyle.filter,\\\"queryRenderedFeatures.filter\\\",r.filter);var i={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error(\\\"parameters.layers must be an Array.\\\"))),[];for(var a=0,o=r.layers;a<o.length;a+=1){var s=o[a],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error(\\\"The layer '\\\"+s+\\\"' does not exist in the map's style and cannot be queried for features.\\\"))),[];i[l.source]=!0}}var c=[];for(var u in this.sourceCaches)r.layers&&!i[u]||c.push(at(this.sourceCaches[u],this._layers,e.worldCoordinate,r,n));return this.placement&&c.push(function(t,e,r,n,i){for(var a={},o=n.queryRenderedSymbols(e),s=[],l=0,c=Object.keys(o).map(Number);l<c.length;l+=1){var u=c[l];s.push(i[u])}s.sort(ot);for(var f=function(){var e=p[h],n=e.featureIndex.lookupSymbolFeatures(o[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,r.filter,r.layers,t);for(var i in n){var s=a[i]=a[i]||[],l=n[i];l.sort(function(t,r){var n=e.featureSortOrder;if(n){var i=n.indexOf(t.featureIndex);return n.indexOf(r.featureIndex)-i}return r.featureIndex-t.featureIndex});for(var c=0,u=l;c<u.length;c+=1){var f=u[c];s.push(f.feature)}}},h=0,p=s;h<p.length;h+=1)f();return a}(this._layers,e.viewport,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenRenderedFeatures(c)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,\\\"querySourceFeatures.filter\\\",r.filter);var n=this.sourceCaches[e];return n?function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],i={},a=0;a<r.length;a++){var o=r[a],s=o.tileID.canonical.key;i[s]||(i[s]=!0,o.querySourceFeatures(n,e))}return n}(n,r):[]},r.prototype.addSourceType=function(t,e,n){return r.getSourceType(t)?n(new Error('A source type called \\\"'+t+'\\\" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast(\\\"loadWorkerSource\\\",{name:t,url:e.workerSourceURL},n):n(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e){this._checkLoaded();var r=this.light.getLight(),n=!1;for(var i in e)if(!t.default$10(e[i],r[i])){n=!0;break}if(n){var o={now:a.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e),this.light.updateTransitions(o)}},r.prototype._validate=function(e,r,n,i,a){return(!a||!1!==a.validate)&&Xe(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:n,styleSpec:t.default$5},i)))},r.prototype._remove=function(){for(var e in t.evented.off(\\\"pluginAvailable\\\",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(t,e,r){for(var n=!1,i=!1,o={},s=0,l=this._order;s<l.length;s+=1){var c=l[s],u=this._layers[c];if(\\\"symbol\\\"===u.type){if(!o[u.source]){var f=this.sourceCaches[u.source];o[u.source]=f.getRenderableIds().map(function(t){return f.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var h=this.crossTileSymbolIndex.addLayer(u,o[u.source],t.center.lng);n=n||h}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var p=this._layerOrderChanged;if((p||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(a.now()))&&(this.pauseablePlacement=new Ue(t,this._order,p,e,r),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(this.placement,a.now()),i=!0),n&&this.pauseablePlacement.placement.setStale()),i||n)for(var d=0,g=this._order;d<g.length;d+=1){var v=g[d],m=this._layers[v];\\\"symbol\\\"===m.type&&this.placement.updateLayerOpacities(m,o[m.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.now())},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r}(t.Evented);Je.getSourceType=function(t){return nt[t]},Je.setSourceType=function(t,e){nt[t]=e},Je.registerForPluginAvailability=t.registerForPluginAvailability;var Ke=t.createLayout([{name:\\\"a_pos\\\",type:\\\"Int16\\\",components:2}]),Qe={prelude:{fragmentSource:\\\"#ifdef GL_ES\\\\nprecision mediump float;\\\\n#else\\\\n\\\\n#if !defined(lowp)\\\\n#define lowp\\\\n#endif\\\\n\\\\n#if !defined(mediump)\\\\n#define mediump\\\\n#endif\\\\n\\\\n#if !defined(highp)\\\\n#define highp\\\\n#endif\\\\n\\\\n#endif\\\\n\\\",vertexSource:\\\"#ifdef GL_ES\\\\nprecision highp float;\\\\n#else\\\\n\\\\n#if !defined(lowp)\\\\n#define lowp\\\\n#endif\\\\n\\\\n#if !defined(mediump)\\\\n#define mediump\\\\n#endif\\\\n\\\\n#if !defined(highp)\\\\n#define highp\\\\n#endif\\\\n\\\\n#endif\\\\n\\\\n// Unpack a pair of values that have been packed into a single float.\\\\n// The packed values are assumed to be 8-bit unsigned integers, and are\\\\n// packed like so:\\\\n// packedValue = floor(input[0]) * 256 + input[1],\\\\nvec2 unpack_float(const float packedValue) {\\\\n    int packedIntValue = int(packedValue);\\\\n    int v0 = packedIntValue / 256;\\\\n    return vec2(v0, packedIntValue - v0 * 256);\\\\n}\\\\n\\\\nvec2 unpack_opacity(const float packedOpacity) {\\\\n    int intOpacity = int(packedOpacity) / 2;\\\\n    return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\\\\n}\\\\n\\\\n// To minimize the number of attributes needed, we encode a 4-component\\\\n// color into a pair of floats (i.e. a vec2) as follows:\\\\n// [ floor(color.r * 255) * 256 + color.g * 255,\\\\n//   floor(color.b * 255) * 256 + color.g * 255 ]\\\\nvec4 decode_color(const vec2 encodedColor) {\\\\n    return vec4(\\\\n        unpack_float(encodedColor[0]) / 255.0,\\\\n        unpack_float(encodedColor[1]) / 255.0\\\\n    );\\\\n}\\\\n\\\\n// Unpack a pair of paint values and interpolate between them.\\\\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\\\\n    return mix(packedValue[0], packedValue[1], t);\\\\n}\\\\n\\\\n// Unpack a pair of paint values and interpolate between them.\\\\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\\\\n    vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\\\\n    vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\\\\n    return mix(minColor, maxColor, t);\\\\n}\\\\n\\\\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\\\\n// vec2 offset = mod(pixel_coord, size)\\\\n//\\\\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\\\\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\\\\n//\\\\n// The pixel_coord is passed in as two 16 bit values:\\\\n// pixel_coord_upper = floor(pixel_coord / 2^16)\\\\n// pixel_coord_lower = mod(pixel_coord, 2^16)\\\\n//\\\\n// The offset is calculated in a series of steps that should preserve this precision:\\\\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\\\\n    const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\\\\n\\\\n    vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\\\\n    return (tile_units_to_pixels * pos + offset) / pattern_size;\\\\n}\\\\n\\\"},background:{fragmentSource:\\\"uniform vec4 u_color;\\\\nuniform float u_opacity;\\\\n\\\\nvoid main() {\\\\n    gl_FragColor = u_color * u_opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n}\\\\n\\\"},backgroundPattern:{fragmentSource:\\\"uniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_mix;\\\\nuniform float u_opacity;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\n\\\\nvoid main() {\\\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\\\\n    vec4 color1 = texture2D(u_image, pos);\\\\n\\\\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\\\\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\\\n    vec4 color2 = texture2D(u_image, pos2);\\\\n\\\\n    gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pixel_coord_upper;\\\\nuniform vec2 u_pixel_coord_lower;\\\\nuniform float u_scale_a;\\\\nuniform float u_scale_b;\\\\nuniform float u_tile_units_to_pixels;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n\\\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\\\n}\\\\n\\\"},circle:{fragmentSource:\\\"#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define mediump float radius\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define highp vec4 stroke_color\\\\n#pragma mapbox: define mediump float stroke_width\\\\n#pragma mapbox: define lowp float stroke_opacity\\\\n\\\\nvarying vec3 v_data;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize mediump float radius\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize highp vec4 stroke_color\\\\n    #pragma mapbox: initialize mediump float stroke_width\\\\n    #pragma mapbox: initialize lowp float stroke_opacity\\\\n\\\\n    vec2 extrude = v_data.xy;\\\\n    float extrude_length = length(extrude);\\\\n\\\\n    lowp float antialiasblur = v_data.z;\\\\n    float antialiased_blur = -max(blur, antialiasblur);\\\\n\\\\n    float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\\\\n\\\\n    float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\\\\n        antialiased_blur,\\\\n        0.0,\\\\n        extrude_length - radius / (radius + stroke_width)\\\\n    );\\\\n\\\\n    gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform bool u_scale_with_map;\\\\nuniform bool u_pitch_with_map;\\\\nuniform vec2 u_extrude_scale;\\\\nuniform highp float u_camera_to_center_distance;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define mediump float radius\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define highp vec4 stroke_color\\\\n#pragma mapbox: define mediump float stroke_width\\\\n#pragma mapbox: define lowp float stroke_opacity\\\\n\\\\nvarying vec3 v_data;\\\\n\\\\nvoid main(void) {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize mediump float radius\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize highp vec4 stroke_color\\\\n    #pragma mapbox: initialize mediump float stroke_width\\\\n    #pragma mapbox: initialize lowp float stroke_opacity\\\\n\\\\n    // unencode the extrusion vector that we snuck into the a_pos vector\\\\n    vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\\\n\\\\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\\\n    // in extrusion data\\\\n    vec2 circle_center = floor(a_pos * 0.5);\\\\n    if (u_pitch_with_map) {\\\\n        vec2 corner_position = circle_center;\\\\n        if (u_scale_with_map) {\\\\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\\\\n        } else {\\\\n            // Pitching the circle with the map effectively scales it with the map\\\\n            // To counteract the effect for pitch-scale: viewport, we rescale the\\\\n            // whole circle based on the pitch scaling effect at its central point\\\\n            vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\\\\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\\\\n        }\\\\n\\\\n        gl_Position = u_matrix * vec4(corner_position, 0, 1);\\\\n    } else {\\\\n        gl_Position = u_matrix * vec4(circle_center, 0, 1);\\\\n\\\\n        if (u_scale_with_map) {\\\\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\\\\n        } else {\\\\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\\\\n        }\\\\n    }\\\\n\\\\n    // This is a minimum blur distance that serves as a faux-antialiasing for\\\\n    // the circle. since blur is a ratio of the circle's size and the intent is\\\\n    // to keep the blur at roughly 1px, the two are inversely related.\\\\n    lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\\\\n\\\\n    v_data = vec3(extrude.x, extrude.y, antialiasblur);\\\\n}\\\\n\\\"},clippingMask:{fragmentSource:\\\"void main() {\\\\n    gl_FragColor = vec4(1.0);\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n}\\\\n\\\"},heatmap:{fragmentSource:\\\"#pragma mapbox: define highp float weight\\\\n\\\\nuniform highp float u_intensity;\\\\nvarying vec2 v_extrude;\\\\n\\\\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\\\\n#define GAUSS_COEF 0.3989422804014327\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp float weight\\\\n\\\\n    // Kernel density estimation with a Gaussian kernel of size 5x5\\\\n    float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\\\\n    float val = weight * u_intensity * GAUSS_COEF * exp(d);\\\\n\\\\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"#pragma mapbox: define highp float weight\\\\n#pragma mapbox: define mediump float radius\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform float u_extrude_scale;\\\\nuniform float u_opacity;\\\\nuniform float u_intensity;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\nvarying vec2 v_extrude;\\\\n\\\\n// Effective \\\\\\\"0\\\\\\\" in the kernel density texture to adjust the kernel size to;\\\\n// this empirically chosen number minimizes artifacts on overlapping kernels\\\\n// for typical heatmap cases (assuming clustered source)\\\\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\\\\n\\\\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\\\\n#define GAUSS_COEF 0.3989422804014327\\\\n\\\\nvoid main(void) {\\\\n    #pragma mapbox: initialize highp float weight\\\\n    #pragma mapbox: initialize mediump float radius\\\\n\\\\n    // unencode the extrusion vector that we snuck into the a_pos vector\\\\n    vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\\\n\\\\n    // This 'extrude' comes in ranging from [-1, -1], to [1, 1].  We'll use\\\\n    // it to produce the vertices of a square mesh framing the point feature\\\\n    // we're adding to the kernel density texture.  We'll also pass it as\\\\n    // a varying, so that the fragment shader can determine the distance of\\\\n    // each fragment from the point feature.\\\\n    // Before we do so, we need to scale it up sufficiently so that the\\\\n    // kernel falls effectively to zero at the edge of the mesh.\\\\n    // That is, we want to know S such that\\\\n    // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\\\\n    // Which solves to:\\\\n    // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\\\\n    float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\\\\n\\\\n    // Pass the varying in units of radius\\\\n    v_extrude = S * unscaled_extrude;\\\\n\\\\n    // Scale by radius and the zoom-based scale factor to produce actual\\\\n    // mesh position\\\\n    vec2 extrude = v_extrude * radius * u_extrude_scale;\\\\n\\\\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\\\n    // in extrusion data\\\\n    vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\\\\n\\\\n    gl_Position = u_matrix * pos;\\\\n}\\\\n\\\"},heatmapTexture:{fragmentSource:\\\"uniform sampler2D u_image;\\\\nuniform sampler2D u_color_ramp;\\\\nuniform float u_opacity;\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    float t = texture2D(u_image, v_pos).r;\\\\n    vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\\\\n    gl_FragColor = color * u_opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(0.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_world;\\\\nattribute vec2 a_pos;\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\\\\n\\\\n    v_pos.x = a_pos.x;\\\\n    v_pos.y = 1.0 - a_pos.y;\\\\n}\\\\n\\\"},collisionBox:{fragmentSource:\\\"\\\\nvarying float v_placed;\\\\nvarying float v_notUsed;\\\\n\\\\nvoid main() {\\\\n\\\\n    float alpha = 0.5;\\\\n\\\\n    // Red = collision, hide label\\\\n    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\\\n\\\\n    // Blue = no collision, label is showing\\\\n    if (v_placed > 0.5) {\\\\n        gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\\\\n    }\\\\n\\\\n    if (v_notUsed > 0.5) {\\\\n        // This box not used, fade it out\\\\n        gl_FragColor *= .1;\\\\n    }\\\\n}\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\nattribute vec2 a_anchor_pos;\\\\nattribute vec2 a_extrude;\\\\nattribute vec2 a_placed;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform vec2 u_extrude_scale;\\\\nuniform float u_camera_to_center_distance;\\\\n\\\\nvarying float v_placed;\\\\nvarying float v_notUsed;\\\\n\\\\nvoid main() {\\\\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\\\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\\\n    highp float collision_perspective_ratio = clamp(\\\\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\\\\n        0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\\\\n        4.0);\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\\\\n    gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\\\\n\\\\n    v_placed = a_placed.x;\\\\n    v_notUsed = a_placed.y;\\\\n}\\\\n\\\"},collisionCircle:{fragmentSource:\\\"uniform float u_overscale_factor;\\\\n\\\\nvarying float v_placed;\\\\nvarying float v_notUsed;\\\\nvarying float v_radius;\\\\nvarying vec2 v_extrude;\\\\nvarying vec2 v_extrude_scale;\\\\n\\\\nvoid main() {\\\\n    float alpha = 0.5;\\\\n\\\\n    // Red = collision, hide label\\\\n    vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\\\n\\\\n    // Blue = no collision, label is showing\\\\n    if (v_placed > 0.5) {\\\\n        color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\\\\n    }\\\\n\\\\n    if (v_notUsed > 0.5) {\\\\n        // This box not used, fade it out\\\\n        color *= .2;\\\\n    }\\\\n\\\\n    float extrude_scale_length = length(v_extrude_scale);\\\\n    float extrude_length = length(v_extrude) * extrude_scale_length;\\\\n    float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\\\\n    float radius = v_radius * extrude_scale_length;\\\\n\\\\n    float distance_to_edge = abs(extrude_length - radius);\\\\n    float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\\\\n\\\\n    gl_FragColor = opacity_t * color;\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\nattribute vec2 a_anchor_pos;\\\\nattribute vec2 a_extrude;\\\\nattribute vec2 a_placed;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform vec2 u_extrude_scale;\\\\nuniform float u_camera_to_center_distance;\\\\n\\\\nvarying float v_placed;\\\\nvarying float v_notUsed;\\\\nvarying float v_radius;\\\\n\\\\nvarying vec2 v_extrude;\\\\nvarying vec2 v_extrude_scale;\\\\n\\\\nvoid main() {\\\\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\\\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\\\n    highp float collision_perspective_ratio = clamp(\\\\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\\\\n        0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\\\\n        4.0);\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\\\\n\\\\n    highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\\\\n    gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\\\\n\\\\n    v_placed = a_placed.x;\\\\n    v_notUsed = a_placed.y;\\\\n    v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\\\\n\\\\n    v_extrude = a_extrude * padding_factor;\\\\n    v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\\\\n}\\\\n\\\"},debug:{fragmentSource:\\\"uniform highp vec4 u_color;\\\\n\\\\nvoid main() {\\\\n    gl_FragColor = u_color;\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n}\\\\n\\\"},fill:{fragmentSource:\\\"#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_FragColor = color * opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n}\\\\n\\\"},fillOutline:{fragmentSource:\\\"#pragma mapbox: define highp vec4 outline_color\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 outline_color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    float dist = length(v_pos - gl_FragCoord.xy);\\\\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\\\\n    gl_FragColor = outline_color * (alpha * opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"attribute vec2 a_pos;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform vec2 u_world;\\\\n\\\\nvarying vec2 v_pos;\\\\n\\\\n#pragma mapbox: define highp vec4 outline_color\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 outline_color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\\\n}\\\\n\\\"},fillOutlinePattern:{fragmentSource:\\\"uniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_mix;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\nvarying vec2 v_pos;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\\\\n    vec4 color1 = texture2D(u_image, pos);\\\\n\\\\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\\\\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\\\n    vec4 color2 = texture2D(u_image, pos2);\\\\n\\\\n    // find distance to outline for alpha interpolation\\\\n\\\\n    float dist = length(v_pos - gl_FragCoord.xy);\\\\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\\\\n\\\\n\\\\n    gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_world;\\\\nuniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pixel_coord_upper;\\\\nuniform vec2 u_pixel_coord_lower;\\\\nuniform float u_scale_a;\\\\nuniform float u_scale_b;\\\\nuniform float u_tile_units_to_pixels;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\nvarying vec2 v_pos;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n\\\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\\\n\\\\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\\\n}\\\\n\\\"},fillPattern:{fragmentSource:\\\"uniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_mix;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\\\\n    vec4 color1 = texture2D(u_image, pos);\\\\n\\\\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\\\\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\\\n    vec4 color2 = texture2D(u_image, pos2);\\\\n\\\\n    gl_FragColor = mix(color1, color2, u_mix) * opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pixel_coord_upper;\\\\nuniform vec2 u_pixel_coord_lower;\\\\nuniform float u_scale_a;\\\\nuniform float u_scale_b;\\\\nuniform float u_tile_units_to_pixels;\\\\n\\\\nattribute vec2 a_pos;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n\\\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\\\n}\\\\n\\\"},fillExtrusion:{fragmentSource:\\\"varying vec4 v_color;\\\\n#pragma mapbox: define lowp float base\\\\n#pragma mapbox: define lowp float height\\\\n#pragma mapbox: define highp vec4 color\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float base\\\\n    #pragma mapbox: initialize lowp float height\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n\\\\n    gl_FragColor = v_color;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec3 u_lightcolor;\\\\nuniform lowp vec3 u_lightpos;\\\\nuniform lowp float u_lightintensity;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec4 a_normal_ed;\\\\n\\\\nvarying vec4 v_color;\\\\n\\\\n#pragma mapbox: define lowp float base\\\\n#pragma mapbox: define lowp float height\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float base\\\\n    #pragma mapbox: initialize lowp float height\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n\\\\n    vec3 normal = a_normal_ed.xyz;\\\\n\\\\n    base = max(0.0, base);\\\\n    height = max(0.0, height);\\\\n\\\\n    float t = mod(normal.x, 2.0);\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\\\\n\\\\n    // Relative luminance (how dark/bright is the surface color?)\\\\n    float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\\\\n\\\\n    v_color = vec4(0.0, 0.0, 0.0, 1.0);\\\\n\\\\n    // Add slight ambient lighting so no extrusions are totally black\\\\n    vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\\\\n    color += ambientlight;\\\\n\\\\n    // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\\\\n    float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\\\\n\\\\n    // Adjust directional so that\\\\n    // the range of values for highlight/shading is narrower\\\\n    // with lower light intensity\\\\n    // and with lighter/brighter surface colors\\\\n    directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\\\\n\\\\n    // Add gradient along z axis of side surfaces\\\\n    if (normal.y != 0.0) {\\\\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\\\n    }\\\\n\\\\n    // Assign final color based on surface + ambient light color, diffuse light directional, and light color\\\\n    // with lower bounds adjusted to hue of light\\\\n    // so that shading is tinted with the complementary (opposite) color to the light color\\\\n    v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\\\\n    v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\\\\n    v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\\\\n}\\\\n\\\"},fillExtrusionPattern:{fragmentSource:\\\"uniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_mix;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\nvarying vec4 v_lighting;\\\\n\\\\n#pragma mapbox: define lowp float base\\\\n#pragma mapbox: define lowp float height\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float base\\\\n    #pragma mapbox: initialize lowp float height\\\\n\\\\n    vec2 imagecoord = mod(v_pos_a, 1.0);\\\\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\\\\n    vec4 color1 = texture2D(u_image, pos);\\\\n\\\\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\\\\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\\\\n    vec4 color2 = texture2D(u_image, pos2);\\\\n\\\\n    vec4 mixedColor = mix(color1, color2, u_mix);\\\\n\\\\n    gl_FragColor = mixedColor * v_lighting;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pixel_coord_upper;\\\\nuniform vec2 u_pixel_coord_lower;\\\\nuniform float u_scale_a;\\\\nuniform float u_scale_b;\\\\nuniform float u_tile_units_to_pixels;\\\\nuniform float u_height_factor;\\\\n\\\\nuniform vec3 u_lightcolor;\\\\nuniform lowp vec3 u_lightpos;\\\\nuniform lowp float u_lightintensity;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec4 a_normal_ed;\\\\n\\\\nvarying vec2 v_pos_a;\\\\nvarying vec2 v_pos_b;\\\\nvarying vec4 v_lighting;\\\\nvarying float v_directional;\\\\n\\\\n#pragma mapbox: define lowp float base\\\\n#pragma mapbox: define lowp float height\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float base\\\\n    #pragma mapbox: initialize lowp float height\\\\n\\\\n    vec3 normal = a_normal_ed.xyz;\\\\n    float edgedistance = a_normal_ed.w;\\\\n\\\\n    base = max(0.0, base);\\\\n    height = max(0.0, height);\\\\n\\\\n    float t = mod(normal.x, 2.0);\\\\n    float z = t > 0.0 ? height : base;\\\\n\\\\n    gl_Position = u_matrix * vec4(a_pos, z, 1);\\\\n\\\\n    vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\\\\n        ? a_pos // extrusion top\\\\n        : vec2(edgedistance, z * u_height_factor); // extrusion side\\\\n\\\\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\\\\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\\\\n\\\\n    v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\\\\n    float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\\\\n    directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\\\\n\\\\n    if (normal.y != 0.0) {\\\\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\\\n    }\\\\n\\\\n    v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\\\\n}\\\\n\\\"},extrusionTexture:{fragmentSource:\\\"uniform sampler2D u_image;\\\\nuniform float u_opacity;\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(0.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_world;\\\\nattribute vec2 a_pos;\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\\\\n\\\\n    v_pos.x = a_pos.x;\\\\n    v_pos.y = 1.0 - a_pos.y;\\\\n}\\\\n\\\"},hillshadePrepare:{fragmentSource:\\\"#ifdef GL_ES\\\\nprecision highp float;\\\\n#endif\\\\n\\\\nuniform sampler2D u_image;\\\\nvarying vec2 v_pos;\\\\nuniform vec2 u_dimension;\\\\nuniform float u_zoom;\\\\nuniform float u_maxzoom;\\\\n\\\\nfloat getElevation(vec2 coord, float bias) {\\\\n    // Convert encoded elevation value to meters\\\\n    vec4 data = texture2D(u_image, coord) * 255.0;\\\\n    return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;\\\\n}\\\\n\\\\nvoid main() {\\\\n    vec2 epsilon = 1.0 / u_dimension;\\\\n\\\\n    // queried pixels:\\\\n    // +-----------+\\\\n    // |   |   |   |\\\\n    // | a | b | c |\\\\n    // |   |   |   |\\\\n    // +-----------+\\\\n    // |   |   |   |\\\\n    // | d | e | f |\\\\n    // |   |   |   |\\\\n    // +-----------+\\\\n    // |   |   |   |\\\\n    // | g | h | i |\\\\n    // |   |   |   |\\\\n    // +-----------+\\\\n\\\\n    float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\\\\n    float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\\\\n    float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\\\\n    float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\\\\n    float e = getElevation(v_pos, 0.0);\\\\n    float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\\\\n    float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\\\\n    float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\\\\n    float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\\\\n\\\\n    // here we divide the x and y slopes by 8 * pixel size\\\\n    // where pixel size (aka meters/pixel) is:\\\\n    // circumference of the world / (pixels per tile * number of tiles)\\\\n    // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\\\\n    // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\\\\n    // we want to vertically exaggerate the hillshading though, because otherwise\\\\n    // it is barely noticeable at low zooms. to do this, we multiply this by some\\\\n    // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\\\\n    // Here we use a=0.3 which works out to the expression below. see \\\\n    // nickidlugash's awesome breakdown for more info\\\\n    // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\\\\n    float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\\\\n\\\\n    vec2 deriv = vec2(\\\\n        (c + f + f + i) - (a + d + d + g),\\\\n        (g + h + h + i) - (a + b + b + c)\\\\n    ) /  pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\\\\n\\\\n    gl_FragColor = clamp(vec4(\\\\n        deriv.x / 2.0 + 0.5,\\\\n        deriv.y / 2.0 + 0.5,\\\\n        1.0,\\\\n        1.0), 0.0, 1.0);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec2 a_texture_pos;\\\\n\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n    v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;\\\\n}\\\\n\\\"},hillshade:{fragmentSource:\\\"uniform sampler2D u_image;\\\\nvarying vec2 v_pos;\\\\n\\\\nuniform vec2 u_latrange;\\\\nuniform vec2 u_light;\\\\nuniform vec4 u_shadow;\\\\nuniform vec4 u_highlight;\\\\nuniform vec4 u_accent;\\\\n\\\\n#define PI 3.141592653589793\\\\n\\\\nvoid main() {\\\\n    vec4 pixel = texture2D(u_image, v_pos);\\\\n\\\\n    vec2 deriv = ((pixel.rg * 2.0) - 1.0);\\\\n\\\\n    // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\\\\n    // to account for mercator projection distortion. see #4807 for details\\\\n    float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\\\\n    // We also multiply the slope by an arbitrary z-factor of 1.25\\\\n    float slope = atan(1.25 * length(deriv) / scaleFactor);\\\\n    float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\\\\n\\\\n    float intensity = u_light.x;\\\\n    // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\\\\n    // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\\\\n    // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\\\\n    float azimuth = u_light.y + PI;\\\\n\\\\n    // We scale the slope exponentially based on intensity, using a calculation similar to\\\\n    // the exponential interpolation function in the style spec:\\\\n    // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\\\\n    // so that higher intensity values create more opaque hillshading.\\\\n    float base = 1.875 - intensity * 1.75;\\\\n    float maxValue = 0.5 * PI;\\\\n    float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\\\\n\\\\n    // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\\\\n    // so that the accent color's rate of change eases in while the shade color's eases out.\\\\n    float accent = cos(scaledSlope);\\\\n    // We multiply both the accent and shade color by a clamped intensity value\\\\n    // so that intensities >= 0.5 do not additionally affect the color values\\\\n    // while intensity values < 0.5 make the overall color more transparent.\\\\n    vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\\\\n    float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\\\\n    vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\\\\n    gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec2 a_texture_pos;\\\\n\\\\nvarying vec2 v_pos;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n    v_pos = a_texture_pos / 8192.0;\\\\n}\\\\n\\\"},line:{fragmentSource:\\\"#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvarying vec2 v_width2;\\\\nvarying vec2 v_normal;\\\\nvarying float v_gamma_scale;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    // Calculate the distance of the pixel from the line in pixels.\\\\n    float dist = length(v_normal) * v_width2.s;\\\\n\\\\n    // Calculate the antialiasing fade factor. This is either when fading in\\\\n    // the line in case of an offset line (v_width2.t) or when fading out\\\\n    // (v_width2.s)\\\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\\\n\\\\n    gl_FragColor = color * (alpha * opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"\\\\n\\\\n// the distance over which the line edge fades out.\\\\n// Retina devices need a smaller distance to avoid aliasing.\\\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\\\n\\\\n// floor(127 / 2) == 63.0\\\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\\\n// there are also \\\\\\\"special\\\\\\\" normals that have a bigger length (of up to 126 in\\\\n// this case).\\\\n// #define scale 63.0\\\\n#define scale 0.015873016\\\\n\\\\nattribute vec4 a_pos_normal;\\\\nattribute vec4 a_data;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mediump float u_ratio;\\\\nuniform vec2 u_gl_units_to_pixels;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying float v_gamma_scale;\\\\nvarying highp float v_linesofar;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define mediump float gapwidth\\\\n#pragma mapbox: define lowp float offset\\\\n#pragma mapbox: define mediump float width\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize mediump float gapwidth\\\\n    #pragma mapbox: initialize lowp float offset\\\\n    #pragma mapbox: initialize mediump float width\\\\n\\\\n    vec2 a_extrude = a_data.xy - 128.0;\\\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\\\n\\\\n    v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0;\\\\n\\\\n    vec2 pos = a_pos_normal.xy;\\\\n\\\\n    // x is 1 if it's a round cap, 0 otherwise\\\\n    // y is 1 if the normal points up, and -1 if it points down\\\\n    mediump vec2 normal = a_pos_normal.zw;\\\\n    v_normal = normal;\\\\n\\\\n    // these transformations used to be applied in the JS and native code bases.\\\\n    // moved them into the shader for clarity and simplicity.\\\\n    gapwidth = gapwidth / 2.0;\\\\n    float halfwidth = width / 2.0;\\\\n    offset = -1.0 * offset;\\\\n\\\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\\\n\\\\n    // Scale the extrusion vector down to a normal and then up by the line width\\\\n    // of this vertex.\\\\n    mediump vec2 dist = outset * a_extrude * scale;\\\\n\\\\n    // Calculate the offset when drawing a line that is to the side of the actual line.\\\\n    // We do this by creating a vector that points towards the extrude, but rotate\\\\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\\\\n    // extrude vector points in another direction.\\\\n    mediump float u = 0.5 * a_direction;\\\\n    mediump float t = 1.0 - abs(u);\\\\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\\\n\\\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\\\n\\\\n    // calculate how much the perspective view squishes or stretches the extrude\\\\n    float extrude_length_without_perspective = length(dist);\\\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\\\n\\\\n    v_width2 = vec2(outset, inset);\\\\n}\\\\n\\\"},lineGradient:{fragmentSource:\\\"\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_width2;\\\\nvarying vec2 v_normal;\\\\nvarying float v_gamma_scale;\\\\nvarying highp float v_lineprogress;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    // Calculate the distance of the pixel from the line in pixels.\\\\n    float dist = length(v_normal) * v_width2.s;\\\\n\\\\n    // Calculate the antialiasing fade factor. This is either when fading in\\\\n    // the line in case of an offset line (v_width2.t) or when fading out\\\\n    // (v_width2.s)\\\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\\\n\\\\n    // For gradient lines, v_lineprogress is the ratio along the entire line,\\\\n    // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\\\\n    vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\\\\n\\\\n    gl_FragColor = color * (alpha * opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"\\\\n// the attribute conveying progress along a line is scaled to [0, 2^15)\\\\n#define MAX_LINE_DISTANCE 32767.0\\\\n\\\\n// the distance over which the line edge fades out.\\\\n// Retina devices need a smaller distance to avoid aliasing.\\\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\\\n\\\\n// floor(127 / 2) == 63.0\\\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\\\n// there are also \\\\\\\"special\\\\\\\" normals that have a bigger length (of up to 126 in\\\\n// this case).\\\\n// #define scale 63.0\\\\n#define scale 0.015873016\\\\n\\\\nattribute vec4 a_pos_normal;\\\\nattribute vec4 a_data;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mediump float u_ratio;\\\\nuniform vec2 u_gl_units_to_pixels;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying float v_gamma_scale;\\\\nvarying highp float v_lineprogress;\\\\n\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define mediump float gapwidth\\\\n#pragma mapbox: define lowp float offset\\\\n#pragma mapbox: define mediump float width\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize mediump float gapwidth\\\\n    #pragma mapbox: initialize lowp float offset\\\\n    #pragma mapbox: initialize mediump float width\\\\n\\\\n    vec2 a_extrude = a_data.xy - 128.0;\\\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\\\n\\\\n    v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\\\\n\\\\n    vec2 pos = a_pos_normal.xy;\\\\n\\\\n    // x is 1 if it's a round cap, 0 otherwise\\\\n    // y is 1 if the normal points up, and -1 if it points down\\\\n    mediump vec2 normal = a_pos_normal.zw;\\\\n    v_normal = normal;\\\\n\\\\n    // these transformations used to be applied in the JS and native code bases.\\\\n    // moved them into the shader for clarity and simplicity.\\\\n    gapwidth = gapwidth / 2.0;\\\\n    float halfwidth = width / 2.0;\\\\n    offset = -1.0 * offset;\\\\n\\\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\\\n\\\\n    // Scale the extrusion vector down to a normal and then up by the line width\\\\n    // of this vertex.\\\\n    mediump vec2 dist = outset * a_extrude * scale;\\\\n\\\\n    // Calculate the offset when drawing a line that is to the side of the actual line.\\\\n    // We do this by creating a vector that points towards the extrude, but rotate\\\\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\\\\n    // extrude vector points in another direction.\\\\n    mediump float u = 0.5 * a_direction;\\\\n    mediump float t = 1.0 - abs(u);\\\\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\\\n\\\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\\\n\\\\n    // calculate how much the perspective view squishes or stretches the extrude\\\\n    float extrude_length_without_perspective = length(dist);\\\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\\\n\\\\n    v_width2 = vec2(outset, inset);\\\\n}\\\\n\\\"},linePattern:{fragmentSource:\\\"uniform vec2 u_pattern_size_a;\\\\nuniform vec2 u_pattern_size_b;\\\\nuniform vec2 u_pattern_tl_a;\\\\nuniform vec2 u_pattern_br_a;\\\\nuniform vec2 u_pattern_tl_b;\\\\nuniform vec2 u_pattern_br_b;\\\\nuniform vec2 u_texsize;\\\\nuniform float u_fade;\\\\n\\\\nuniform sampler2D u_image;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying float v_linesofar;\\\\nvarying float v_gamma_scale;\\\\n\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    // Calculate the distance of the pixel from the line in pixels.\\\\n    float dist = length(v_normal) * v_width2.s;\\\\n\\\\n    // Calculate the antialiasing fade factor. This is either when fading in\\\\n    // the line in case of an offset line (v_width2.t) or when fading out\\\\n    // (v_width2.s)\\\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\\\n\\\\n    float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\\\\n    float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\\\\n\\\\n    // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\\\\n    // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\\\\n    // to ensure we don't sample outside the designated symbol on the sprite sheet.\\\\n    // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\\\\n    // the texture coordinate\\\\n    float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_a.y + 2.0) / 2.0) / u_pattern_size_a.y);\\\\n    float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_b.y + 2.0) / 2.0) / u_pattern_size_b.y);\\\\n    vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\\\\n    vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\\\\n\\\\n    vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\\\\n\\\\n    gl_FragColor = color * alpha * opacity;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"// floor(127 / 2) == 63.0\\\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\\\n// there are also \\\\\\\"special\\\\\\\" normals that have a bigger length (of up to 126 in\\\\n// this case).\\\\n// #define scale 63.0\\\\n#define scale 0.015873016\\\\n\\\\n// We scale the distance before adding it to the buffers so that we can store\\\\n// long distances for long segments. Use this value to unscale the distance.\\\\n#define LINE_DISTANCE_SCALE 2.0\\\\n\\\\n// the distance over which the line edge fades out.\\\\n// Retina devices need a smaller distance to avoid aliasing.\\\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\\\n\\\\nattribute vec4 a_pos_normal;\\\\nattribute vec4 a_data;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mediump float u_ratio;\\\\nuniform vec2 u_gl_units_to_pixels;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying float v_linesofar;\\\\nvarying float v_gamma_scale;\\\\n\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define lowp float offset\\\\n#pragma mapbox: define mediump float gapwidth\\\\n#pragma mapbox: define mediump float width\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize lowp float offset\\\\n    #pragma mapbox: initialize mediump float gapwidth\\\\n    #pragma mapbox: initialize mediump float width\\\\n\\\\n    vec2 a_extrude = a_data.xy - 128.0;\\\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\\\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\\\n\\\\n    vec2 pos = a_pos_normal.xy;\\\\n\\\\n    // x is 1 if it's a round cap, 0 otherwise\\\\n    // y is 1 if the normal points up, and -1 if it points down\\\\n    mediump vec2 normal = a_pos_normal.zw;\\\\n    v_normal = normal;\\\\n\\\\n    // these transformations used to be applied in the JS and native code bases.\\\\n    // moved them into the shader for clarity and simplicity.\\\\n    gapwidth = gapwidth / 2.0;\\\\n    float halfwidth = width / 2.0;\\\\n    offset = -1.0 * offset;\\\\n\\\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\\\n\\\\n    // Scale the extrusion vector down to a normal and then up by the line width\\\\n    // of this vertex.\\\\n    mediump vec2 dist = outset * a_extrude * scale;\\\\n\\\\n    // Calculate the offset when drawing a line that is to the side of the actual line.\\\\n    // We do this by creating a vector that points towards the extrude, but rotate\\\\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\\\\n    // extrude vector points in another direction.\\\\n    mediump float u = 0.5 * a_direction;\\\\n    mediump float t = 1.0 - abs(u);\\\\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\\\n\\\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\\\n\\\\n    // calculate how much the perspective view squishes or stretches the extrude\\\\n    float extrude_length_without_perspective = length(dist);\\\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\\\n\\\\n    v_linesofar = a_linesofar;\\\\n    v_width2 = vec2(outset, inset);\\\\n}\\\\n\\\"},lineSDF:{fragmentSource:\\\"\\\\nuniform sampler2D u_image;\\\\nuniform float u_sdfgamma;\\\\nuniform float u_mix;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying vec2 v_tex_a;\\\\nvarying vec2 v_tex_b;\\\\nvarying float v_gamma_scale;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define mediump float width\\\\n#pragma mapbox: define lowp float floorwidth\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize mediump float width\\\\n    #pragma mapbox: initialize lowp float floorwidth\\\\n\\\\n    // Calculate the distance of the pixel from the line in pixels.\\\\n    float dist = length(v_normal) * v_width2.s;\\\\n\\\\n    // Calculate the antialiasing fade factor. This is either when fading in\\\\n    // the line in case of an offset line (v_width2.t) or when fading out\\\\n    // (v_width2.s)\\\\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\\\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\\\n\\\\n    float sdfdist_a = texture2D(u_image, v_tex_a).a;\\\\n    float sdfdist_b = texture2D(u_image, v_tex_b).a;\\\\n    float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\\\\n    alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\\\\n\\\\n    gl_FragColor = color * (alpha * opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"// floor(127 / 2) == 63.0\\\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\\\n// there are also \\\\\\\"special\\\\\\\" normals that have a bigger length (of up to 126 in\\\\n// this case).\\\\n// #define scale 63.0\\\\n#define scale 0.015873016\\\\n\\\\n// We scale the distance before adding it to the buffers so that we can store\\\\n// long distances for long segments. Use this value to unscale the distance.\\\\n#define LINE_DISTANCE_SCALE 2.0\\\\n\\\\n// the distance over which the line edge fades out.\\\\n// Retina devices need a smaller distance to avoid aliasing.\\\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\\\n\\\\nattribute vec4 a_pos_normal;\\\\nattribute vec4 a_data;\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mediump float u_ratio;\\\\nuniform vec2 u_patternscale_a;\\\\nuniform float u_tex_y_a;\\\\nuniform vec2 u_patternscale_b;\\\\nuniform float u_tex_y_b;\\\\nuniform vec2 u_gl_units_to_pixels;\\\\n\\\\nvarying vec2 v_normal;\\\\nvarying vec2 v_width2;\\\\nvarying vec2 v_tex_a;\\\\nvarying vec2 v_tex_b;\\\\nvarying float v_gamma_scale;\\\\n\\\\n#pragma mapbox: define highp vec4 color\\\\n#pragma mapbox: define lowp float blur\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define mediump float gapwidth\\\\n#pragma mapbox: define lowp float offset\\\\n#pragma mapbox: define mediump float width\\\\n#pragma mapbox: define lowp float floorwidth\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 color\\\\n    #pragma mapbox: initialize lowp float blur\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize mediump float gapwidth\\\\n    #pragma mapbox: initialize lowp float offset\\\\n    #pragma mapbox: initialize mediump float width\\\\n    #pragma mapbox: initialize lowp float floorwidth\\\\n\\\\n    vec2 a_extrude = a_data.xy - 128.0;\\\\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\\\\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\\\n\\\\n    vec2 pos = a_pos_normal.xy;\\\\n\\\\n    // x is 1 if it's a round cap, 0 otherwise\\\\n    // y is 1 if the normal points up, and -1 if it points down\\\\n    mediump vec2 normal = a_pos_normal.zw;\\\\n    v_normal = normal;\\\\n\\\\n    // these transformations used to be applied in the JS and native code bases.\\\\n    // moved them into the shader for clarity and simplicity.\\\\n    gapwidth = gapwidth / 2.0;\\\\n    float halfwidth = width / 2.0;\\\\n    offset = -1.0 * offset;\\\\n\\\\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\\\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\\\n\\\\n    // Scale the extrusion vector down to a normal and then up by the line width\\\\n    // of this vertex.\\\\n    mediump vec2 dist =outset * a_extrude * scale;\\\\n\\\\n    // Calculate the offset when drawing a line that is to the side of the actual line.\\\\n    // We do this by creating a vector that points towards the extrude, but rotate\\\\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\\\\n    // extrude vector points in another direction.\\\\n    mediump float u = 0.5 * a_direction;\\\\n    mediump float t = 1.0 - abs(u);\\\\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\\\n\\\\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\\\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\\\n\\\\n    // calculate how much the perspective view squishes or stretches the extrude\\\\n    float extrude_length_without_perspective = length(dist);\\\\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\\\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\\\n\\\\n    v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\\\\n    v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\\\\n\\\\n    v_width2 = vec2(outset, inset);\\\\n}\\\\n\\\"},raster:{fragmentSource:\\\"uniform float u_fade_t;\\\\nuniform float u_opacity;\\\\nuniform sampler2D u_image0;\\\\nuniform sampler2D u_image1;\\\\nvarying vec2 v_pos0;\\\\nvarying vec2 v_pos1;\\\\n\\\\nuniform float u_brightness_low;\\\\nuniform float u_brightness_high;\\\\n\\\\nuniform float u_saturation_factor;\\\\nuniform float u_contrast_factor;\\\\nuniform vec3 u_spin_weights;\\\\n\\\\nvoid main() {\\\\n\\\\n    // read and cross-fade colors from the main and parent tiles\\\\n    vec4 color0 = texture2D(u_image0, v_pos0);\\\\n    vec4 color1 = texture2D(u_image1, v_pos1);\\\\n    if (color0.a > 0.0) {\\\\n        color0.rgb = color0.rgb / color0.a;\\\\n    }\\\\n    if (color1.a > 0.0) {\\\\n        color1.rgb = color1.rgb / color1.a;\\\\n    }\\\\n    vec4 color = mix(color0, color1, u_fade_t);\\\\n    color.a *= u_opacity;\\\\n    vec3 rgb = color.rgb;\\\\n\\\\n    // spin\\\\n    rgb = vec3(\\\\n        dot(rgb, u_spin_weights.xyz),\\\\n        dot(rgb, u_spin_weights.zxy),\\\\n        dot(rgb, u_spin_weights.yzx));\\\\n\\\\n    // saturation\\\\n    float average = (color.r + color.g + color.b) / 3.0;\\\\n    rgb += (average - rgb) * u_saturation_factor;\\\\n\\\\n    // contrast\\\\n    rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\\\\n\\\\n    // brightness\\\\n    vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\\\\n    vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\\\\n\\\\n    gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"uniform mat4 u_matrix;\\\\nuniform vec2 u_tl_parent;\\\\nuniform float u_scale_parent;\\\\nuniform float u_buffer_scale;\\\\n\\\\nattribute vec2 a_pos;\\\\nattribute vec2 a_texture_pos;\\\\n\\\\nvarying vec2 v_pos0;\\\\nvarying vec2 v_pos1;\\\\n\\\\nvoid main() {\\\\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\\\\n    // We are using Int16 for texture position coordinates to give us enough precision for\\\\n    // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\\\\n    // as an arbitrarily high number to preserve adequate precision when rendering.\\\\n    // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\\\\n    // so math for modifying either is consistent.\\\\n    v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\\\\n    v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\\\\n}\\\\n\\\"},symbolIcon:{fragmentSource:\\\"uniform sampler2D u_texture;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nvarying vec2 v_tex;\\\\nvarying float v_fade_opacity;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    lowp float alpha = opacity * v_fade_opacity;\\\\n    gl_FragColor = texture2D(u_texture, v_tex) * alpha;\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"const float PI = 3.141592653589793;\\\\n\\\\nattribute vec4 a_pos_offset;\\\\nattribute vec4 a_data;\\\\nattribute vec3 a_projected_pos;\\\\nattribute float a_fade_opacity;\\\\n\\\\nuniform bool u_is_size_zoom_constant;\\\\nuniform bool u_is_size_feature_constant;\\\\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\\\\nuniform highp float u_size; // used when size is both zoom and feature constant\\\\nuniform highp float u_camera_to_center_distance;\\\\nuniform highp float u_pitch;\\\\nuniform bool u_rotate_symbol;\\\\nuniform highp float u_aspect_ratio;\\\\nuniform float u_fade_change;\\\\n\\\\n#pragma mapbox: define lowp float opacity\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mat4 u_label_plane_matrix;\\\\nuniform mat4 u_gl_coord_matrix;\\\\n\\\\nuniform bool u_is_text;\\\\nuniform bool u_pitch_with_map;\\\\n\\\\nuniform vec2 u_texsize;\\\\n\\\\nvarying vec2 v_tex;\\\\nvarying float v_fade_opacity;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n\\\\n    vec2 a_pos = a_pos_offset.xy;\\\\n    vec2 a_offset = a_pos_offset.zw;\\\\n\\\\n    vec2 a_tex = a_data.xy;\\\\n    vec2 a_size = a_data.zw;\\\\n\\\\n    highp float segment_angle = -a_projected_pos[2];\\\\n\\\\n    float size;\\\\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\\\\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\\\\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\\\\n        size = a_size[0] / 10.0;\\\\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\\\\n        size = u_size;\\\\n    } else {\\\\n        size = u_size;\\\\n    }\\\\n\\\\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\\\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\\\n    // See comments in symbol_sdf.vertex\\\\n    highp float distance_ratio = u_pitch_with_map ?\\\\n        camera_to_anchor_distance / u_camera_to_center_distance :\\\\n        u_camera_to_center_distance / camera_to_anchor_distance;\\\\n    highp float perspective_ratio = clamp(\\\\n            0.5 + 0.5 * distance_ratio,\\\\n            0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\\\\n            4.0);\\\\n\\\\n    size *= perspective_ratio;\\\\n\\\\n    float fontScale = u_is_text ? size / 24.0 : size;\\\\n\\\\n    highp float symbol_rotation = 0.0;\\\\n    if (u_rotate_symbol) {\\\\n        // See comments in symbol_sdf.vertex\\\\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\\\\n\\\\n        vec2 a = projectedPoint.xy / projectedPoint.w;\\\\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\\\\n\\\\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\\\\n    }\\\\n\\\\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\\\\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\\\\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\\\\n\\\\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\\\\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\\\\n\\\\n    v_tex = a_tex / u_texsize;\\\\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\\\\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\\\\n    v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\\\\n}\\\\n\\\"},symbolSDF:{fragmentSource:\\\"#define SDF_PX 8.0\\\\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\\\\n\\\\nuniform bool u_is_halo;\\\\n#pragma mapbox: define highp vec4 fill_color\\\\n#pragma mapbox: define highp vec4 halo_color\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define lowp float halo_width\\\\n#pragma mapbox: define lowp float halo_blur\\\\n\\\\nuniform sampler2D u_texture;\\\\nuniform highp float u_gamma_scale;\\\\nuniform bool u_is_text;\\\\n\\\\nvarying vec2 v_data0;\\\\nvarying vec3 v_data1;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 fill_color\\\\n    #pragma mapbox: initialize highp vec4 halo_color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize lowp float halo_width\\\\n    #pragma mapbox: initialize lowp float halo_blur\\\\n\\\\n    vec2 tex = v_data0.xy;\\\\n    float gamma_scale = v_data1.x;\\\\n    float size = v_data1.y;\\\\n    float fade_opacity = v_data1[2];\\\\n\\\\n    float fontScale = u_is_text ? size / 24.0 : size;\\\\n\\\\n    lowp vec4 color = fill_color;\\\\n    highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\\\\n    lowp float buff = (256.0 - 64.0) / 256.0;\\\\n    if (u_is_halo) {\\\\n        color = halo_color;\\\\n        gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\\\\n        buff = (6.0 - halo_width / fontScale) / SDF_PX;\\\\n    }\\\\n\\\\n    lowp float dist = texture2D(u_texture, tex).a;\\\\n    highp float gamma_scaled = gamma * gamma_scale;\\\\n    highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\\\\n\\\\n    gl_FragColor = color * (alpha * opacity * fade_opacity);\\\\n\\\\n#ifdef OVERDRAW_INSPECTOR\\\\n    gl_FragColor = vec4(1.0);\\\\n#endif\\\\n}\\\\n\\\",vertexSource:\\\"const float PI = 3.141592653589793;\\\\n\\\\nattribute vec4 a_pos_offset;\\\\nattribute vec4 a_data;\\\\nattribute vec3 a_projected_pos;\\\\nattribute float a_fade_opacity;\\\\n\\\\n// contents of a_size vary based on the type of property value\\\\n// used for {text,icon}-size.\\\\n// For constants, a_size is disabled.\\\\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\\\\n// For composite functions:\\\\n// [ text-size(lowerZoomStop, feature),\\\\n//   text-size(upperZoomStop, feature) ]\\\\nuniform bool u_is_size_zoom_constant;\\\\nuniform bool u_is_size_feature_constant;\\\\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\\\\nuniform highp float u_size; // used when size is both zoom and feature constant\\\\n\\\\n#pragma mapbox: define highp vec4 fill_color\\\\n#pragma mapbox: define highp vec4 halo_color\\\\n#pragma mapbox: define lowp float opacity\\\\n#pragma mapbox: define lowp float halo_width\\\\n#pragma mapbox: define lowp float halo_blur\\\\n\\\\nuniform mat4 u_matrix;\\\\nuniform mat4 u_label_plane_matrix;\\\\nuniform mat4 u_gl_coord_matrix;\\\\n\\\\nuniform bool u_is_text;\\\\nuniform bool u_pitch_with_map;\\\\nuniform highp float u_pitch;\\\\nuniform bool u_rotate_symbol;\\\\nuniform highp float u_aspect_ratio;\\\\nuniform highp float u_camera_to_center_distance;\\\\nuniform float u_fade_change;\\\\n\\\\nuniform vec2 u_texsize;\\\\n\\\\nvarying vec2 v_data0;\\\\nvarying vec3 v_data1;\\\\n\\\\nvoid main() {\\\\n    #pragma mapbox: initialize highp vec4 fill_color\\\\n    #pragma mapbox: initialize highp vec4 halo_color\\\\n    #pragma mapbox: initialize lowp float opacity\\\\n    #pragma mapbox: initialize lowp float halo_width\\\\n    #pragma mapbox: initialize lowp float halo_blur\\\\n\\\\n    vec2 a_pos = a_pos_offset.xy;\\\\n    vec2 a_offset = a_pos_offset.zw;\\\\n\\\\n    vec2 a_tex = a_data.xy;\\\\n    vec2 a_size = a_data.zw;\\\\n\\\\n    highp float segment_angle = -a_projected_pos[2];\\\\n    float size;\\\\n\\\\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\\\\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\\\\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\\\\n        size = a_size[0] / 10.0;\\\\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\\\\n        size = u_size;\\\\n    } else {\\\\n        size = u_size;\\\\n    }\\\\n\\\\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\\\\n    highp float camera_to_anchor_distance = projectedPoint.w;\\\\n    // If the label is pitched with the map, layout is done in pitched space,\\\\n    // which makes labels in the distance smaller relative to viewport space.\\\\n    // We counteract part of that effect by multiplying by the perspective ratio.\\\\n    // If the label isn't pitched with the map, we do layout in viewport space,\\\\n    // which makes labels in the distance larger relative to the features around\\\\n    // them. We counteract part of that effect by dividing by the perspective ratio.\\\\n    highp float distance_ratio = u_pitch_with_map ?\\\\n        camera_to_anchor_distance / u_camera_to_center_distance :\\\\n        u_camera_to_center_distance / camera_to_anchor_distance;\\\\n    highp float perspective_ratio = clamp(\\\\n        0.5 + 0.5 * distance_ratio,\\\\n        0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\\\\n        4.0);\\\\n\\\\n    size *= perspective_ratio;\\\\n\\\\n    float fontScale = u_is_text ? size / 24.0 : size;\\\\n\\\\n    highp float symbol_rotation = 0.0;\\\\n    if (u_rotate_symbol) {\\\\n        // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\\\\n        // To figure out that angle in projected space, we draw a short horizontal line in tile\\\\n        // space, project it, and measure its angle in projected space.\\\\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\\\\n\\\\n        vec2 a = projectedPoint.xy / projectedPoint.w;\\\\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\\\\n\\\\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\\\\n    }\\\\n\\\\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\\\\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\\\\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\\\\n\\\\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\\\\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\\\\n    float gamma_scale = gl_Position.w;\\\\n\\\\n    vec2 tex = a_tex / u_texsize;\\\\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\\\\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\\\\n    float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\\\\n\\\\n    v_data0 = vec2(tex.x, tex.y);\\\\n    v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\\\\n}\\\\n\\\"}},tr=/#pragma mapbox: ([\\\\w]+) ([\\\\w]+) ([\\\\w]+) ([\\\\w]+)/g,er=function(t){var e=Qe[t],r={};e.fragmentSource=e.fragmentSource.replace(tr,function(t,e,n,i,a){return r[a]=!0,\\\"define\\\"===e?\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\nvarying \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\";\\\\n#else\\\\nuniform \\\"+n+\\\" \\\"+i+\\\" u_\\\"+a+\\\";\\\\n#endif\\\\n\\\":\\\"\\\\n#ifdef HAS_UNIFORM_u_\\\"+a+\\\"\\\\n    \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\" = u_\\\"+a+\\\";\\\\n#endif\\\\n\\\"}),e.vertexSource=e.vertexSource.replace(tr,function(t,e,n,i,a){var o=\\\"float\\\"===i?\\\"vec2\\\":\\\"vec4\\\";return r[a]?\\\"define\\\"===e?\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\nuniform lowp float a_\\\"+a+\\\"_t;\\\\nattribute \\\"+n+\\\" \\\"+o+\\\" a_\\\"+a+\\\";\\\\nvarying \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\";\\\\n#else\\\\nuniform \\\"+n+\\\" \\\"+i+\\\" u_\\\"+a+\\\";\\\\n#endif\\\\n\\\":\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\n    \\\"+a+\\\" = unpack_mix_\\\"+o+\\\"(a_\\\"+a+\\\", a_\\\"+a+\\\"_t);\\\\n#else\\\\n    \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\" = u_\\\"+a+\\\";\\\\n#endif\\\\n\\\":\\\"define\\\"===e?\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\nuniform lowp float a_\\\"+a+\\\"_t;\\\\nattribute \\\"+n+\\\" \\\"+o+\\\" a_\\\"+a+\\\";\\\\n#else\\\\nuniform \\\"+n+\\\" \\\"+i+\\\" u_\\\"+a+\\\";\\\\n#endif\\\\n\\\":\\\"\\\\n#ifndef HAS_UNIFORM_u_\\\"+a+\\\"\\\\n    \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\" = unpack_mix_\\\"+o+\\\"(a_\\\"+a+\\\", a_\\\"+a+\\\"_t);\\\\n#else\\\\n    \\\"+n+\\\" \\\"+i+\\\" \\\"+a+\\\" = u_\\\"+a+\\\";\\\\n#endif\\\\n\\\"})};for(var rr in Qe)er(rr);var nr=Qe,ir=function(t,e,r,n){var i=t.gl;this.program=i.createProgram();var o=r.defines().concat(\\\"#define DEVICE_PIXEL_RATIO \\\"+a.devicePixelRatio.toFixed(1));n&&o.push(\\\"#define OVERDRAW_INSPECTOR;\\\");var s=o.concat(nr.prelude.fragmentSource,e.fragmentSource).join(\\\"\\\\n\\\"),l=o.concat(nr.prelude.vertexSource,e.vertexSource).join(\\\"\\\\n\\\"),c=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(c,s),i.compileShader(c),i.attachShader(this.program,c);var u=i.createShader(i.VERTEX_SHADER);i.shaderSource(u,l),i.compileShader(u),i.attachShader(this.program,u);for(var f=r.layoutAttributes||[],h=0;h<f.length;h++)i.bindAttribLocation(this.program,h,f[h].name);i.linkProgram(this.program),this.numAttributes=i.getProgramParameter(this.program,i.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var p=0;p<this.numAttributes;p++){var d=i.getActiveAttrib(this.program,p);d&&(this.attributes[d.name]=i.getAttribLocation(this.program,d.name))}for(var g=i.getProgramParameter(this.program,i.ACTIVE_UNIFORMS),v=0;v<g;v++){var m=i.getActiveUniform(this.program,v);m&&(this.uniforms[m.name]=i.getUniformLocation(this.program,m.name))}};function ar(e,r,n,i,a){for(var o=0;o<n.length;o++){var s=n[o];if(i.isLessThan(s.tileID))break;if(r.key===s.tileID.key)return;if(s.tileID.isChildOf(r)){for(var l=r.children(1/0),c=0;c<l.length;c++)ar(e,l[c],n.slice(o),i,a);return}}var u=r.overscaledZ-e.overscaledZ,f=new t.CanonicalTileID(u,r.canonical.x-(e.canonical.x<<u),r.canonical.y-(e.canonical.y<<u));a[f.key]=a[f.key]||f}function or(t,e,r,n,i){var a=t.context,o=a.gl,s=i?t.useProgram(\\\"collisionCircle\\\"):t.useProgram(\\\"collisionBox\\\");a.setDepthMode(qt.disabled),a.setStencilMode(Ht.disabled),a.setColorMode(t.colorModeForRenderPass());for(var l=0;l<n.length;l++){var c=n[l],u=e.getTile(c),f=u.getBucket(r);if(f){var h=i?f.collisionCircle:f.collisionBox;if(h){o.uniformMatrix4fv(s.uniforms.u_matrix,!1,c.posMatrix),i||a.lineWidth.set(1),o.uniform1f(s.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance);var p=Te(u,1,t.transform.zoom),d=Math.pow(2,t.transform.zoom-u.tileID.overscaledZ);o.uniform1f(s.uniforms.u_pixels_to_tile_units,p),o.uniform2f(s.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits[0]/(p*d),t.transform.pixelsToGLUnits[1]/(p*d)),o.uniform1f(s.uniforms.u_overscale_factor,u.tileID.overscaleFactor()),s.draw(a,i?o.TRIANGLES:o.LINES,r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,h.collisionVertexBuffer,null)}}}}ir.prototype.draw=function(t,e,r,n,i,a,o,s,l){for(var c,u=t.gl,f=(c={},c[u.LINES]=2,c[u.TRIANGLES]=3,c)[e],h=0,p=a.get();h<p.length;h+=1){var d=p[h],g=d.vaos||(d.vaos={});(g[r]||(g[r]=new Q)).bind(t,this,n,o?o.getPaintVertexBuffers():[],i,d.vertexOffset,s,l),u.drawElements(e,d.primitiveLength*f,u.UNSIGNED_SHORT,d.primitiveOffset*f*2)}};var sr=t.mat4.identity(new Float32Array(16)),lr=t.default$19.layout;function cr(t,e,r,n,i,a,o,s,l,c){var u,f=t.context,h=f.gl,p=t.transform,d=\\\"map\\\"===s,g=\\\"map\\\"===l,v=d&&\\\"line\\\"===r.layout.get(\\\"symbol-placement\\\"),m=d&&!g&&!v,y=g;f.setDepthMode(y?t.depthModeForSublayer(0,qt.ReadOnly):qt.disabled);for(var x=0,b=n;x<b.length;x+=1){var _=b[x],w=e.getTile(_),k=w.getBucket(r);if(k){var M=i?k.text:k.icon;if(M&&M.segments.get().length){var A=M.programConfigurations.get(r.id),T=i||k.sdfIcons,S=i?k.textSizeData:k.iconSizeData;if(u||(u=t.useProgram(T?\\\"symbolSDF\\\":\\\"symbolIcon\\\",A),A.setUniforms(t.context,u,r.paint,{zoom:t.transform.zoom}),ur(u,t,r,i,m,g,S)),f.activeTexture.set(h.TEXTURE0),h.uniform1i(u.uniforms.u_texture,0),i)w.glyphAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),h.uniform2fv(u.uniforms.u_texsize,w.glyphAtlasTexture.size);else{var C=1!==r.layout.get(\\\"icon-size\\\").constantOr(0)||k.iconsNeedLinear,E=g||0!==p.pitch;w.iconAtlasTexture.bind(T||t.options.rotating||t.options.zooming||C||E?h.LINEAR:h.NEAREST,h.CLAMP_TO_EDGE),h.uniform2fv(u.uniforms.u_texsize,w.iconAtlasTexture.size)}h.uniformMatrix4fv(u.uniforms.u_matrix,!1,t.translatePosMatrix(_.posMatrix,w,a,o));var L=Te(w,1,t.transform.zoom),z=fe(_.posMatrix,g,d,t.transform,L),O=he(_.posMatrix,g,d,t.transform,L);h.uniformMatrix4fv(u.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(O,w,a,o,!0)),v?(h.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,sr),ge(k,_.posMatrix,t,i,z,O,g,c)):h.uniformMatrix4fv(u.uniforms.u_label_plane_matrix,!1,z),h.uniform1f(u.uniforms.u_fade_change,t.options.fadeDuration?t.symbolFadeChange:1),fr(u,A,t,r,w,M,i,T,g)}}}}function ur(e,r,n,i,a,o,s){var l=r.context.gl,c=r.transform;l.uniform1i(e.uniforms.u_pitch_with_map,o?1:0),l.uniform1f(e.uniforms.u_is_text,i?1:0),l.uniform1f(e.uniforms.u_pitch,c.pitch/360*2*Math.PI);var u=\\\"constant\\\"===s.functionType||\\\"source\\\"===s.functionType,f=\\\"constant\\\"===s.functionType||\\\"camera\\\"===s.functionType;l.uniform1i(e.uniforms.u_is_size_zoom_constant,u?1:0),l.uniform1i(e.uniforms.u_is_size_feature_constant,f?1:0),l.uniform1f(e.uniforms.u_camera_to_center_distance,c.cameraToCenterDistance);var h=t.evaluateSizeForZoom(s,c.zoom,lr.properties[i?\\\"text-size\\\":\\\"icon-size\\\"]);void 0!==h.uSizeT&&l.uniform1f(e.uniforms.u_size_t,h.uSizeT),void 0!==h.uSize&&l.uniform1f(e.uniforms.u_size,h.uSize),l.uniform1f(e.uniforms.u_aspect_ratio,c.width/c.height),l.uniform1i(e.uniforms.u_rotate_symbol,a?1:0)}function fr(t,e,r,n,i,a,o,s,l){var c=r.context,u=c.gl,f=r.transform;if(s){var h=0!==n.paint.get(o?\\\"text-halo-width\\\":\\\"icon-halo-width\\\").constantOr(1),p=l?Math.cos(f._pitch)*f.cameraToCenterDistance:1;u.uniform1f(t.uniforms.u_gamma_scale,p),h&&(u.uniform1f(t.uniforms.u_is_halo,1),hr(a,n,c,t)),u.uniform1f(t.uniforms.u_is_halo,0)}hr(a,n,c,t)}function hr(t,e,r,n){n.draw(r,r.gl.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function pr(t,e,r,n,i,o,s,l,c){var u,f,h,p,d=e.context,g=d.gl,v=i.paint.get(\\\"line-dasharray\\\"),m=i.paint.get(\\\"line-pattern\\\");if(l||c){var y=1/Te(r,1,e.transform.tileZoom);if(v){u=e.lineAtlas.getDash(v.from,\\\"round\\\"===i.layout.get(\\\"line-cap\\\")),f=e.lineAtlas.getDash(v.to,\\\"round\\\"===i.layout.get(\\\"line-cap\\\"));var x=u.width*v.fromScale,b=f.width*v.toScale;g.uniform2f(t.uniforms.u_patternscale_a,y/x,-u.height/2),g.uniform2f(t.uniforms.u_patternscale_b,y/b,-f.height/2),g.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(x,b)*a.devicePixelRatio)/2)}else if(m){if(h=e.imageManager.getPattern(m.from),p=e.imageManager.getPattern(m.to),!h||!p)return;g.uniform2f(t.uniforms.u_pattern_size_a,h.displaySize[0]*m.fromScale/y,h.displaySize[1]),g.uniform2f(t.uniforms.u_pattern_size_b,p.displaySize[0]*m.toScale/y,p.displaySize[1]);var _=e.imageManager.getPixelSize(),w=_.width,k=_.height;g.uniform2fv(t.uniforms.u_texsize,[w,k])}g.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1])}l&&(v?(g.uniform1i(t.uniforms.u_image,0),d.activeTexture.set(g.TEXTURE0),e.lineAtlas.bind(d),g.uniform1f(t.uniforms.u_tex_y_a,u.y),g.uniform1f(t.uniforms.u_tex_y_b,f.y),g.uniform1f(t.uniforms.u_mix,v.t)):m&&(g.uniform1i(t.uniforms.u_image,0),d.activeTexture.set(g.TEXTURE0),e.imageManager.bind(d),g.uniform2fv(t.uniforms.u_pattern_tl_a,h.tl),g.uniform2fv(t.uniforms.u_pattern_br_a,h.br),g.uniform2fv(t.uniforms.u_pattern_tl_b,p.tl),g.uniform2fv(t.uniforms.u_pattern_br_b,p.br),g.uniform1f(t.uniforms.u_fade,m.t))),d.setStencilMode(e.stencilModeForClipping(o));var M=e.translatePosMatrix(o.posMatrix,r,i.paint.get(\\\"line-translate\\\"),i.paint.get(\\\"line-translate-anchor\\\"));if(g.uniformMatrix4fv(t.uniforms.u_matrix,!1,M),g.uniform1f(t.uniforms.u_ratio,1/Te(r,1,e.transform.zoom)),i.paint.get(\\\"line-gradient\\\")){d.activeTexture.set(g.TEXTURE0);var A=i.gradientTexture;if(!i.gradient)return;A||(A=i.gradientTexture=new z(d,i.gradient,g.RGBA)),A.bind(g.LINEAR,g.CLAMP_TO_EDGE),g.uniform1i(t.uniforms.u_image,0)}t.draw(d,g.TRIANGLES,i.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,s)}var dr=function(t,e){if(!t)return!1;var r=e.imageManager.getPattern(t.from),n=e.imageManager.getPattern(t.to);return!r||!n},gr=function(t,e,r){var n=e.context,i=n.gl,a=e.imageManager.getPattern(t.from),o=e.imageManager.getPattern(t.to);i.uniform1i(r.uniforms.u_image,0),i.uniform2fv(r.uniforms.u_pattern_tl_a,a.tl),i.uniform2fv(r.uniforms.u_pattern_br_a,a.br),i.uniform2fv(r.uniforms.u_pattern_tl_b,o.tl),i.uniform2fv(r.uniforms.u_pattern_br_b,o.br);var s=e.imageManager.getPixelSize(),l=s.width,c=s.height;i.uniform2fv(r.uniforms.u_texsize,[l,c]),i.uniform1f(r.uniforms.u_mix,t.t),i.uniform2fv(r.uniforms.u_pattern_size_a,a.displaySize),i.uniform2fv(r.uniforms.u_pattern_size_b,o.displaySize),i.uniform1f(r.uniforms.u_scale_a,t.fromScale),i.uniform1f(r.uniforms.u_scale_b,t.toScale),n.activeTexture.set(i.TEXTURE0),e.imageManager.bind(e.context)},vr=function(t,e,r){var n=e.context.gl;n.uniform1f(r.uniforms.u_tile_units_to_pixels,1/Te(t,1,e.transform.tileZoom));var i=Math.pow(2,t.tileID.overscaledZ),a=t.tileSize*Math.pow(2,e.transform.tileZoom)/i,o=a*(t.tileID.canonical.x+t.tileID.wrap*i),s=a*t.tileID.canonical.y;n.uniform2f(r.uniforms.u_pixel_coord_upper,o>>16,s>>16),n.uniform2f(r.uniforms.u_pixel_coord_lower,65535&o,65535&s)};function mr(t,e,r,n,i){if(!dr(r.paint.get(\\\"fill-pattern\\\"),t))for(var a=!0,o=0,s=n;o<s.length;o+=1){var l=s[o],c=e.getTile(l),u=c.getBucket(r);u&&(t.context.setStencilMode(t.stencilModeForClipping(l)),i(t,e,r,c,l,u,a),a=!1)}}function yr(t,e,r,n,i,a,o){var s=t.context.gl,l=a.programConfigurations.get(r.id);br(\\\"fill\\\",r.paint.get(\\\"fill-pattern\\\"),t,l,r,n,i,o).draw(t.context,s.TRIANGLES,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,l)}function xr(t,e,r,n,i,a,o){var s=t.context.gl,l=a.programConfigurations.get(r.id),c=br(\\\"fillOutline\\\",r.getPaintProperty(\\\"fill-outline-color\\\")?null:r.paint.get(\\\"fill-pattern\\\"),t,l,r,n,i,o);s.uniform2f(c.uniforms.u_world,s.drawingBufferWidth,s.drawingBufferHeight),c.draw(t.context,s.LINES,r.id,a.layoutVertexBuffer,a.indexBuffer2,a.segments2,l)}function br(t,e,r,n,i,a,o,s){var l,c=r.context.program.get();return e?(l=r.useProgram(t+\\\"Pattern\\\",n),(s||l.program!==c)&&(n.setUniforms(r.context,l,i.paint,{zoom:r.transform.zoom}),gr(e,r,l)),vr(a,r,l)):(l=r.useProgram(t,n),(s||l.program!==c)&&n.setUniforms(r.context,l,i.paint,{zoom:r.transform.zoom})),r.context.gl.uniformMatrix4fv(l.uniforms.u_matrix,!1,r.translatePosMatrix(o.posMatrix,a,i.paint.get(\\\"fill-translate\\\"),i.paint.get(\\\"fill-translate-anchor\\\"))),l}var _r=t.default$20.mat3,wr=t.default$20.mat4,kr=t.default$20.vec3;function Mr(t,e,r,n,i,a,o){var s=t.context,l=s.gl,c=r.paint.get(\\\"fill-extrusion-pattern\\\"),u=t.context.program.get(),f=a.programConfigurations.get(r.id),h=t.useProgram(c?\\\"fillExtrusionPattern\\\":\\\"fillExtrusion\\\",f);if((o||h.program!==u)&&f.setUniforms(s,h,r.paint,{zoom:t.transform.zoom}),c){if(dr(c,t))return;gr(c,t,h),vr(n,t,h),l.uniform1f(h.uniforms.u_height_factor,-Math.pow(2,i.overscaledZ)/n.tileSize/8)}t.context.gl.uniformMatrix4fv(h.uniforms.u_matrix,!1,t.translatePosMatrix(i.posMatrix,n,r.paint.get(\\\"fill-extrusion-translate\\\"),r.paint.get(\\\"fill-extrusion-translate-anchor\\\"))),function(t,e){var r=e.context.gl,n=e.style.light,i=n.properties.get(\\\"position\\\"),a=[i.x,i.y,i.z],o=_r.create();\\\"viewport\\\"===n.properties.get(\\\"anchor\\\")&&_r.fromRotation(o,-e.transform.angle),kr.transformMat3(a,a,o);var s=n.properties.get(\\\"color\\\");r.uniform3fv(t.uniforms.u_lightpos,a),r.uniform1f(t.uniforms.u_lightintensity,n.properties.get(\\\"intensity\\\")),r.uniform3f(t.uniforms.u_lightcolor,s.r,s.g,s.b)}(h,t),h.draw(s,l.TRIANGLES,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,f)}function Ar(e,r,n){var i=e.context,a=i.gl,o=r.fbo;if(o){var s=e.useProgram(\\\"hillshade\\\"),l=e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),!0);!function(t,e,r){var n=r.paint.get(\\\"hillshade-illumination-direction\\\")*(Math.PI/180);\\\"viewport\\\"===r.paint.get(\\\"hillshade-illumination-anchor\\\")&&(n-=e.transform.angle),e.context.gl.uniform2f(t.uniforms.u_light,r.paint.get(\\\"hillshade-exaggeration\\\"),n)}(s,e,n);var c=function(e,r){var n=r.toCoordinate(),i=new t.default$17(n.column,n.row+1,n.zoom);return[e.transform.coordinateLocation(n).lat,e.transform.coordinateLocation(i).lat]}(e,r.tileID);i.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,o.colorAttachment.get()),a.uniformMatrix4fv(s.uniforms.u_matrix,!1,l),a.uniform2fv(s.uniforms.u_latrange,c),a.uniform1i(s.uniforms.u_image,0);var u=n.paint.get(\\\"hillshade-shadow-color\\\");a.uniform4f(s.uniforms.u_shadow,u.r,u.g,u.b,u.a);var f=n.paint.get(\\\"hillshade-highlight-color\\\");a.uniform4f(s.uniforms.u_highlight,f.r,f.g,f.b,f.a);var h=n.paint.get(\\\"hillshade-accent-color\\\");if(a.uniform4f(s.uniforms.u_accent,h.r,h.g,h.b,h.a),r.maskedBoundsBuffer&&r.maskedIndexBuffer&&r.segments)s.draw(i,a.TRIANGLES,n.id,r.maskedBoundsBuffer,r.maskedIndexBuffer,r.segments);else{var p=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,s,p,[]),a.drawArrays(a.TRIANGLE_STRIP,0,p.length)}}}function Tr(e,r,n){var i=e.context,a=i.gl;if(r.dem&&r.dem.level){var o=r.dem.level.dim,s=r.dem.getPixels();if(i.activeTexture.set(a.TEXTURE1),i.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(r.tileSize),r.demTexture){var l=r.demTexture;l.update(s,{premultiply:!1}),l.bind(a.NEAREST,a.CLAMP_TO_EDGE)}else r.demTexture=new z(i,s,a.RGBA,{premultiply:!1}),r.demTexture.bind(a.NEAREST,a.CLAMP_TO_EDGE);i.activeTexture.set(a.TEXTURE0);var c=r.fbo;if(!c){var u=new z(i,{width:o,height:o,data:null},a.RGBA);u.bind(a.LINEAR,a.CLAMP_TO_EDGE),(c=r.fbo=i.createFramebuffer(o,o)).colorAttachment.set(u.texture)}i.bindFramebuffer.set(c.framebuffer),i.viewport.set([0,0,o,o]);var f=t.mat4.create();t.mat4.ortho(f,0,t.default$8,-t.default$8,0,0,1),t.mat4.translate(f,f,[0,-t.default$8,0]);var h=e.useProgram(\\\"hillshadePrepare\\\");a.uniformMatrix4fv(h.uniforms.u_matrix,!1,f),a.uniform1f(h.uniforms.u_zoom,r.tileID.overscaledZ),a.uniform2fv(h.uniforms.u_dimension,[2*o,2*o]),a.uniform1i(h.uniforms.u_image,1),a.uniform1f(h.uniforms.u_maxzoom,n);var p=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(i,h,p,[]),a.drawArrays(a.TRIANGLE_STRIP,0,p.length),r.needsHillshadePrepare=!1}}function Sr(e,r,n,i,o){var s=i.paint.get(\\\"raster-fade-duration\\\");if(s>0){var l=a.now(),c=(l-e.timeAdded)/s,u=r?(l-r.timeAdded)/s:-1,f=n.getSource(),h=o.coveringZoomLevel({tileSize:f.tileSize,roundZoom:f.roundZoom}),p=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),d=p&&e.refreshedUponExpiration?1:t.clamp(p?c:1-u,0,1);return e.refreshedUponExpiration&&c>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}function Cr(e,r,n){var i=e.context,o=i.gl;i.lineWidth.set(1*a.devicePixelRatio);var s=n.posMatrix,l=e.useProgram(\\\"debug\\\");i.setDepthMode(qt.disabled),i.setStencilMode(Ht.disabled),i.setColorMode(e.colorModeForRenderPass()),o.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),o.uniform4f(l.uniforms.u_color,1,0,0,1),e.debugVAO.bind(i,l,e.debugBuffer,[]),o.drawArrays(o.LINE_STRIP,0,e.debugBuffer.length);for(var c=function(t,e,r,n){n=n||1;var i,a,o,s,l,c,u,f,h=[];for(i=0,a=t.length;i<a;i++)if(l=Er[t[i]]){for(f=null,o=0,s=l[1].length;o<s;o+=2)-1===l[1][o]&&-1===l[1][o+1]?f=null:(c=e+l[1][o]*n,u=200-l[1][o+1]*n,f&&h.push(f.x,f.y,c,u),f={x:c,y:u});e+=l[0]*n}return h}(n.toString(),50,0,5),u=new t.PosArray,f=0;f<c.length;f+=2)u.emplaceBack(c[f],c[f+1]);var h=i.createVertexBuffer(u,Ke.members);(new Q).bind(i,l,h,[]),o.uniform4f(l.uniforms.u_color,1,1,1,1);for(var p=r.getTile(n).tileSize,d=t.default$8/(Math.pow(2,e.transform.zoom-n.overscaledZ)*p),g=[[-1,-1],[-1,1],[1,-1],[1,1]],v=0;v<g.length;v++){var m=g[v];o.uniformMatrix4fv(l.uniforms.u_matrix,!1,t.mat4.translate([],s,[d*m[0],d*m[1],0])),o.drawArrays(o.LINES,0,h.length)}o.uniform4f(l.uniforms.u_color,0,0,0,1),o.uniformMatrix4fv(l.uniforms.u_matrix,!1,s),o.drawArrays(o.LINES,0,h.length)}var Er={\\\" \\\":[16,[]],\\\"!\\\":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'\\\"':[16,[4,21,4,14,-1,-1,12,21,12,14]],\\\"#\\\":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],\\\"%\\\":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],\\\"&\\\":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],\\\"'\\\":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],\\\"(\\\":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],\\\")\\\":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],\\\"*\\\":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],\\\"+\\\":[26,[13,18,13,0,-1,-1,4,9,22,9]],\\\",\\\":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],\\\"-\\\":[26,[4,9,22,9]],\\\".\\\":[10,[5,2,4,1,5,0,6,1,5,2]],\\\"/\\\":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],\\\":\\\":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],\\\";\\\":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],\\\"<\\\":[24,[20,18,4,9,20,0]],\\\"=\\\":[26,[4,12,22,12,-1,-1,4,6,22,6]],\\\">\\\":[24,[4,18,20,9,4,0]],\\\"?\\\":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],\\\"@\\\":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],\\\"[\\\":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],\\\"\\\\\\\\\\\":[14,[0,21,14,-3]],\\\"]\\\":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],\\\"^\\\":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],\\\"`\\\":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],\\\"{\\\":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],\\\"|\\\":[8,[4,25,4,-7]],\\\"}\\\":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],\\\"~\\\":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},Lr={symbol:function(t,e,r,n){if(\\\"translucent\\\"===t.renderPass){var i=t.context;i.setStencilMode(Ht.disabled),i.setColorMode(t.colorModeForRenderPass()),0!==r.paint.get(\\\"icon-opacity\\\").constantOr(1)&&cr(t,e,r,n,!1,r.paint.get(\\\"icon-translate\\\"),r.paint.get(\\\"icon-translate-anchor\\\"),r.layout.get(\\\"icon-rotation-alignment\\\"),r.layout.get(\\\"icon-pitch-alignment\\\"),r.layout.get(\\\"icon-keep-upright\\\")),0!==r.paint.get(\\\"text-opacity\\\").constantOr(1)&&cr(t,e,r,n,!0,r.paint.get(\\\"text-translate\\\"),r.paint.get(\\\"text-translate-anchor\\\"),r.layout.get(\\\"text-rotation-alignment\\\"),r.layout.get(\\\"text-pitch-alignment\\\"),r.layout.get(\\\"text-keep-upright\\\")),e.map.showCollisionBoxes&&function(t,e,r,n){or(t,e,r,n,!1),or(t,e,r,n,!0)}(t,e,r,n)}},circle:function(t,e,r,n){if(\\\"translucent\\\"===t.renderPass){var i=r.paint.get(\\\"circle-opacity\\\"),a=r.paint.get(\\\"circle-stroke-width\\\"),o=r.paint.get(\\\"circle-stroke-opacity\\\");if(0!==i.constantOr(1)||0!==a.constantOr(1)&&0!==o.constantOr(1)){var s=t.context,l=s.gl;s.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),s.setStencilMode(Ht.disabled),s.setColorMode(t.colorModeForRenderPass());for(var c=!0,u=0;u<n.length;u++){var f=n[u],h=e.getTile(f),p=h.getBucket(r);if(p){var d=t.context.program.get(),g=p.programConfigurations.get(r.id),v=t.useProgram(\\\"circle\\\",g);if((c||v.program!==d)&&(g.setUniforms(s,v,r.paint,{zoom:t.transform.zoom}),c=!1),l.uniform1f(v.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),l.uniform1i(v.uniforms.u_scale_with_map,\\\"map\\\"===r.paint.get(\\\"circle-pitch-scale\\\")?1:0),\\\"map\\\"===r.paint.get(\\\"circle-pitch-alignment\\\")){l.uniform1i(v.uniforms.u_pitch_with_map,1);var m=Te(h,1,t.transform.zoom);l.uniform2f(v.uniforms.u_extrude_scale,m,m)}else l.uniform1i(v.uniforms.u_pitch_with_map,0),l.uniform2fv(v.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);l.uniformMatrix4fv(v.uniforms.u_matrix,!1,t.translatePosMatrix(f.posMatrix,h,r.paint.get(\\\"circle-translate\\\"),r.paint.get(\\\"circle-translate-anchor\\\"))),v.draw(s,l.TRIANGLES,r.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,g)}}}}},heatmap:function(e,r,n,i){if(0!==n.paint.get(\\\"heatmap-opacity\\\"))if(\\\"offscreen\\\"===e.renderPass){var a=e.context,o=a.gl;a.setDepthMode(e.depthModeForSublayer(0,qt.ReadOnly)),a.setStencilMode(Ht.disabled),function(t,e,r){var n=t.gl;t.activeTexture.set(n.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=r.heatmapFbo;if(i)n.bindTexture(n.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var a=n.createTexture();n.bindTexture(n.TEXTURE_2D,a),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),i=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,r,n,i){var a=e.gl;a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r.width/4,r.height/4,0,a.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:a.UNSIGNED_BYTE,null),i.colorAttachment.set(n),e.extTextureHalfFloat&&a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,i.colorAttachment.setDirty(),t(e,r,n,i))}(t,e,a,i)}}(a,e,n),a.clear({color:t.default$6.transparent}),a.setColorMode(new Gt([o.ONE,o.ONE],t.default$6.transparent,[!0,!0,!0,!0]));for(var s=!0,l=0;l<i.length;l++){var c=i[l];if(!r.hasRenderableParent(c)){var u=r.getTile(c),f=u.getBucket(n);if(f){var h=e.context.program.get(),p=f.programConfigurations.get(n.id),d=e.useProgram(\\\"heatmap\\\",p),g=e.transform.zoom;(s||d.program!==h)&&(p.setUniforms(e.context,d,n.paint,{zoom:g}),s=!1),o.uniform1f(d.uniforms.u_extrude_scale,Te(u,1,g)),o.uniform1f(d.uniforms.u_intensity,n.paint.get(\\\"heatmap-intensity\\\")),o.uniformMatrix4fv(d.uniforms.u_matrix,!1,c.posMatrix),d.draw(a,o.TRIANGLES,n.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,p)}}}a.viewport.set([0,0,e.width,e.height])}else\\\"translucent\\\"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var n=e.context,i=n.gl,a=r.heatmapFbo;if(a){n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,a.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1);var o=r.colorRampTexture;o||(o=r.colorRampTexture=new z(n,r.colorRamp,i.RGBA)),o.bind(i.LINEAR,i.CLAMP_TO_EDGE),n.setDepthMode(qt.disabled);var s=e.useProgram(\\\"heatmapTexture\\\"),l=r.paint.get(\\\"heatmap-opacity\\\");i.uniform1f(s.uniforms.u_opacity,l),i.uniform1i(s.uniforms.u_image,0),i.uniform1i(s.uniforms.u_color_ramp,1);var c=t.mat4.create();t.mat4.ortho(c,0,e.width,e.height,0,0,1),i.uniformMatrix4fv(s.uniforms.u_matrix,!1,c),i.uniform2f(s.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),e.viewportVAO.bind(e.context,s,e.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,n))},line:function(t,e,r,n){if(\\\"translucent\\\"===t.renderPass&&0!==r.paint.get(\\\"line-opacity\\\").constantOr(1)){var i=t.context;i.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),i.setColorMode(t.colorModeForRenderPass());for(var a,o=r.paint.get(\\\"line-dasharray\\\")?\\\"lineSDF\\\":r.paint.get(\\\"line-pattern\\\")?\\\"linePattern\\\":r.paint.get(\\\"line-gradient\\\")?\\\"lineGradient\\\":\\\"line\\\",s=!0,l=0,c=n;l<c.length;l+=1){var u=c[l],f=e.getTile(u),h=f.getBucket(r);if(h){var p=h.programConfigurations.get(r.id),d=t.context.program.get(),g=t.useProgram(o,p),v=s||g.program!==d,m=a!==f.tileID.overscaledZ;v&&p.setUniforms(t.context,g,r.paint,{zoom:t.transform.zoom}),pr(g,t,f,h,r,u,p,v,m),a=f.tileID.overscaledZ,s=!1}}}},fill:function(e,r,n,i){var a=n.paint.get(\\\"fill-color\\\"),o=n.paint.get(\\\"fill-opacity\\\");if(0!==o.constantOr(1)){var s=e.context;s.setColorMode(e.colorModeForRenderPass());var l=n.paint.get(\\\"fill-pattern\\\")||1!==a.constantOr(t.default$6.transparent).a||1!==o.constantOr(0)?\\\"translucent\\\":\\\"opaque\\\";e.renderPass===l&&(s.setDepthMode(e.depthModeForSublayer(1,\\\"opaque\\\"===e.renderPass?qt.ReadWrite:qt.ReadOnly)),mr(e,r,n,i,yr)),\\\"translucent\\\"===e.renderPass&&n.paint.get(\\\"fill-antialias\\\")&&(s.lineWidth.set(2),s.setDepthMode(e.depthModeForSublayer(n.getPaintProperty(\\\"fill-outline-color\\\")?2:0,qt.ReadOnly)),mr(e,r,n,i,xr))}},\\\"fill-extrusion\\\":function(e,r,n,i){if(0!==n.paint.get(\\\"fill-extrusion-opacity\\\"))if(\\\"offscreen\\\"===e.renderPass){!function(e,r){var n=e.context,i=n.gl,a=r.viewportFrame;if(e.depthRboNeedsClear&&e.setupOffscreenDepthRenderbuffer(),!a){var o=new z(n,{width:e.width,height:e.height,data:null},i.RGBA);o.bind(i.LINEAR,i.CLAMP_TO_EDGE),(a=r.viewportFrame=n.createFramebuffer(e.width,e.height)).colorAttachment.set(o.texture)}n.bindFramebuffer.set(a.framebuffer),a.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&&(n.clear({depth:1}),e.depthRboNeedsClear=!1),n.clear({color:t.default$6.transparent}),n.setStencilMode(Ht.disabled),n.setDepthMode(new qt(i.LEQUAL,qt.ReadWrite,[0,1])),n.setColorMode(e.colorModeForRenderPass())}(e,n);for(var a=!0,o=0,s=i;o<s.length;o+=1){var l=s[o],c=r.getTile(l),u=c.getBucket(n);u&&(Mr(e,0,n,c,l,u,a),a=!1)}}else\\\"translucent\\\"===e.renderPass&&function(t,e){var r=e.viewportFrame;if(r){var n=t.context,i=n.gl,a=t.useProgram(\\\"extrusionTexture\\\");n.setStencilMode(Ht.disabled),n.setDepthMode(qt.disabled),n.setColorMode(t.colorModeForRenderPass()),n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,r.colorAttachment.get()),i.uniform1f(a.uniforms.u_opacity,e.paint.get(\\\"fill-extrusion-opacity\\\")),i.uniform1i(a.uniforms.u_image,0);var o=wr.create();wr.ortho(o,0,t.width,t.height,0,0,1),i.uniformMatrix4fv(a.uniforms.u_matrix,!1,o),i.uniform2f(a.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),t.viewportVAO.bind(n,a,t.viewportBuffer,[]),i.drawArrays(i.TRIANGLE_STRIP,0,4)}}(e,n)},hillshade:function(t,e,r,n){if(\\\"offscreen\\\"===t.renderPass||\\\"translucent\\\"===t.renderPass){var i=t.context,a=e.getSource().maxzoom;i.setDepthMode(t.depthModeForSublayer(0,qt.ReadOnly)),i.setStencilMode(Ht.disabled),i.setColorMode(t.colorModeForRenderPass());for(var o=0,s=n;o<s.length;o+=1){var l=s[o],c=e.getTile(l);c.needsHillshadePrepare&&\\\"offscreen\\\"===t.renderPass?Tr(t,c,a):\\\"translucent\\\"===t.renderPass&&Ar(t,c,r)}i.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,n){if(\\\"translucent\\\"===t.renderPass&&0!==r.paint.get(\\\"raster-opacity\\\")){var i,a,o=t.context,s=o.gl,l=e.getSource(),c=t.useProgram(\\\"raster\\\");o.setStencilMode(Ht.disabled),o.setColorMode(t.colorModeForRenderPass()),s.uniform1f(c.uniforms.u_brightness_low,r.paint.get(\\\"raster-brightness-min\\\")),s.uniform1f(c.uniforms.u_brightness_high,r.paint.get(\\\"raster-brightness-max\\\")),s.uniform1f(c.uniforms.u_saturation_factor,(i=r.paint.get(\\\"raster-saturation\\\"))>0?1-1/(1.001-i):-i),s.uniform1f(c.uniforms.u_contrast_factor,(a=r.paint.get(\\\"raster-contrast\\\"))>0?1/(1-a):1+a),s.uniform3fv(c.uniforms.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(r.paint.get(\\\"raster-hue-rotate\\\"))),s.uniform1f(c.uniforms.u_buffer_scale,1),s.uniform1i(c.uniforms.u_image0,0),s.uniform1i(c.uniforms.u_image1,1);for(var u=n.length&&n[0].overscaledZ,f=0,h=n;f<h.length;f+=1){var p=h[f];o.setDepthMode(t.depthModeForSublayer(p.overscaledZ-u,1===r.paint.get(\\\"raster-opacity\\\")?qt.ReadWrite:qt.ReadOnly,s.LESS));var d=e.getTile(p),g=t.transform.calculatePosMatrix(p.toUnwrapped(),!0);d.registerFadeDuration(r.paint.get(\\\"raster-fade-duration\\\")),s.uniformMatrix4fv(c.uniforms.u_matrix,!1,g);var v=e.findLoadedParent(p,0,{}),m=Sr(d,v,e,r,t.transform),y=void 0,x=void 0;if(o.activeTexture.set(s.TEXTURE0),d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),o.activeTexture.set(s.TEXTURE1),v?(v.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),y=Math.pow(2,v.tileID.overscaledZ-d.tileID.overscaledZ),x=[d.tileID.canonical.x*y%1,d.tileID.canonical.y*y%1]):d.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),s.uniform2fv(c.uniforms.u_tl_parent,x||[0,0]),s.uniform1f(c.uniforms.u_scale_parent,y||1),s.uniform1f(c.uniforms.u_fade_t,m.mix),s.uniform1f(c.uniforms.u_opacity,m.opacity*r.paint.get(\\\"raster-opacity\\\")),l instanceof tt){var b=l.boundsBuffer;l.boundsVAO.bind(o,c,b,[]),s.drawArrays(s.TRIANGLE_STRIP,0,b.length)}else if(d.maskedBoundsBuffer&&d.maskedIndexBuffer&&d.segments)c.draw(o,s.TRIANGLES,r.id,d.maskedBoundsBuffer,d.maskedIndexBuffer,d.segments);else{var _=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(o,c,_,[]),s.drawArrays(s.TRIANGLE_STRIP,0,_.length)}}}},background:function(t,e,r){var n=r.paint.get(\\\"background-color\\\"),i=r.paint.get(\\\"background-opacity\\\");if(0!==i){var a=t.context,o=a.gl,s=t.transform,l=s.tileSize,c=r.paint.get(\\\"background-pattern\\\"),u=c||1!==n.a||1!==i?\\\"translucent\\\":\\\"opaque\\\";if(t.renderPass===u){var f;if(a.setStencilMode(Ht.disabled),a.setDepthMode(t.depthModeForSublayer(0,\\\"opaque\\\"===u?qt.ReadWrite:qt.ReadOnly)),a.setColorMode(t.colorModeForRenderPass()),c){if(dr(c,t))return;f=t.useProgram(\\\"backgroundPattern\\\"),gr(c,t,f),t.tileExtentPatternVAO.bind(a,f,t.tileExtentBuffer,[])}else f=t.useProgram(\\\"background\\\"),o.uniform4fv(f.uniforms.u_color,[n.r,n.g,n.b,n.a]),t.tileExtentVAO.bind(a,f,t.tileExtentBuffer,[]);o.uniform1f(f.uniforms.u_opacity,i);for(var h=0,p=s.coveringTiles({tileSize:l});h<p.length;h+=1){var d=p[h];c&&vr({tileID:d,tileSize:l},t,f),o.uniformMatrix4fv(f.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(d.toUnwrapped())),o.drawArrays(o.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}}},debug:function(t,e,r){for(var n=0;n<r.length;n++)Cr(t,e,r[n])}},zr=function(e,r){this.context=new Wt(e),this.transform=r,this._tileTextures={},this.setup(),this.numSublayers=Yt.maxUnderzooming+Yt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.default$24,this.crossTileSymbolIndex=new Ye};function Or(t,e){if(t.row>e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function Ir(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,c=e.dx/e.dy,u=t.dx>0,f=e.dx<0,h=a;h<o;h++){var p=l*Math.max(0,Math.min(t.dy,h+u-t.y0))+t.x0,d=c*Math.max(0,Math.min(e.dy,h+f-e.y0))+e.x0;i(Math.floor(d),Math.ceil(p),h)}}function Pr(t,e,r,n,i,a){var o,s=Or(t,e),l=Or(e,r),c=Or(r,t);s.dy>l.dy&&(o=s,s=l,l=o),s.dy>c.dy&&(o=s,s=c,c=o),l.dy>c.dy&&(o=l,l=c,c=o),s.dy&&Ir(c,s,n,i,a),l.dy&&Ir(c,l,n,i,a)}zr.prototype.resize=function(t,e){var r=this.context.gl;if(this.width=t*a.devicePixelRatio,this.height=e*a.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,i=this.style._order;n<i.length;n+=1){var o=i[n];this.style._layers[o].resize()}this.depthRbo&&(r.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},zr.prototype.setup=function(){var e=this.context,r=new t.PosArray;r.emplaceBack(0,0),r.emplaceBack(t.default$8,0),r.emplaceBack(0,t.default$8),r.emplaceBack(t.default$8,t.default$8),this.tileExtentBuffer=e.createVertexBuffer(r,Ke.members),this.tileExtentVAO=new Q,this.tileExtentPatternVAO=new Q;var n=new t.PosArray;n.emplaceBack(0,0),n.emplaceBack(t.default$8,0),n.emplaceBack(t.default$8,t.default$8),n.emplaceBack(0,t.default$8),n.emplaceBack(0,0),this.debugBuffer=e.createVertexBuffer(n,Ke.members),this.debugVAO=new Q;var i=new t.RasterBoundsArray;i.emplaceBack(0,0,0,0),i.emplaceBack(t.default$8,0,t.default$8,0),i.emplaceBack(0,t.default$8,0,t.default$8),i.emplaceBack(t.default$8,t.default$8,t.default$8,t.default$8),this.rasterBoundsBuffer=e.createVertexBuffer(i,K.members),this.rasterBoundsVAO=new Q;var a=new t.PosArray;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,Ke.members),this.viewportVAO=new Q},zr.prototype.clearStencil=function(){var e=this.context,r=e.gl;e.setColorMode(Gt.disabled),e.setDepthMode(qt.disabled),e.setStencilMode(new Ht({func:r.ALWAYS,mask:0},0,255,r.ZERO,r.ZERO,r.ZERO));var n=t.mat4.create();t.mat4.ortho(n,0,this.width,this.height,0,0,1),t.mat4.scale(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]);var i=this.useProgram(\\\"clippingMask\\\");r.uniformMatrix4fv(i.uniforms.u_matrix,!1,n),this.viewportVAO.bind(e,i,this.viewportBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,4)},zr.prototype._renderTileClippingMasks=function(t){var e=this.context,r=e.gl;e.setColorMode(Gt.disabled),e.setDepthMode(qt.disabled);var n=1;this._tileClippingMaskIDs={};for(var i=0,a=t;i<a.length;i+=1){var o=a[i],s=this._tileClippingMaskIDs[o.key]=n++;e.setStencilMode(new Ht({func:r.ALWAYS,mask:0},s,255,r.KEEP,r.KEEP,r.REPLACE));var l=this.useProgram(\\\"clippingMask\\\");r.uniformMatrix4fv(l.uniforms.u_matrix,!1,o.posMatrix),this.tileExtentVAO.bind(this.context,l,this.tileExtentBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}},zr.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Ht({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},zr.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Gt([e.CONSTANT_COLOR,e.ONE],new t.default$6(1/8,1/8,1/8,0),[!0,!0,!0,!0]):\\\"opaque\\\"===this.renderPass?Gt.unblended:Gt.alphaBlended},zr.prototype.depthModeForSublayer=function(t,e,r){var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,i=n-1+this.depthRange;return new qt(r||this.context.gl.LEQUAL,e,[i,n])},zr.prototype.render=function(e,r){var n=this;for(var i in this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(a.now()),e.sourceCaches){var o=n.style.sourceCaches[i];o.used&&o.prepare(n.context)}var s=this.style._order,l=t.filterObject(this.style.sourceCaches,function(t){return\\\"raster\\\"===t.getSource().type||\\\"raster-dem\\\"===t.getSource().type}),c=function(e){var r=l[e];!function(e,r){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),i=0;i<n.length;i++){var a={},o=n[i],s=n.slice(i+1);ar(o.tileID.wrapped(),o.tileID,s,new t.OverscaledTileID(0,o.tileID.wrap+1,0,0,0),a),o.setMask(a,r)}}(r.getVisibleCoordinates().map(function(t){return r.getTile(t)}),n.context)};for(var u in l)c(u);this.renderPass=\\\"offscreen\\\";var f,h=[];this.depthRboNeedsClear=!0;for(var p=0;p<s.length;p++){var d=n.style._layers[s[p]];d.hasOffscreenPass()&&!d.isHidden(n.transform.zoom)&&(d.source!==(f&&f.id)&&(h=[],(f=n.style.sourceCaches[d.source])&&(h=f.getVisibleCoordinates()).reverse()),h.length&&n.renderLayer(n,f,d,h))}this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.default$6.black:t.default$6.transparent,depth:1}),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass=\\\"opaque\\\";var g,v=[];for(this.currentLayer=s.length-1,this.currentLayer;this.currentLayer>=0;this.currentLayer--){var m=n.style._layers[s[n.currentLayer]];m.source!==(g&&g.id)&&(v=[],(g=n.style.sourceCaches[m.source])&&(n.clearStencil(),v=g.getVisibleCoordinates(),g.getSource().isTileClipped&&n._renderTileClippingMasks(v))),n.renderLayer(n,g,m,v)}this.renderPass=\\\"translucent\\\";var y,x=[];for(this.currentLayer=0,this.currentLayer;this.currentLayer<s.length;this.currentLayer++){var b=n.style._layers[s[n.currentLayer]];b.source!==(y&&y.id)&&(x=[],(y=n.style.sourceCaches[b.source])&&(n.clearStencil(),x=y.getVisibleCoordinates(),y.getSource().isTileClipped&&n._renderTileClippingMasks(x)),x.reverse()),n.renderLayer(n,y,b,x)}if(this.options.showTileBoundaries){var _=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];_&&Lr.debug(this,_,_.getVisibleCoordinates())}},zr.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},zr.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||(\\\"background\\\"===r.type||n.length)&&(this.id=r.id,Lr[r.type](t,e,r,n))},zr.prototype.translatePosMatrix=function(e,r,n,i,a){if(!n[0]&&!n[1])return e;var o=a?\\\"map\\\"===i?this.transform.angle:0:\\\"viewport\\\"===i?-this.transform.angle:0;if(o){var s=Math.sin(o),l=Math.cos(o);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l]}var c=[a?n[0]:Te(r,n[0],this.transform.zoom),a?n[1]:Te(r,n[1],this.transform.zoom),0],u=new Float32Array(16);return t.mat4.translate(u,e,c),u},zr.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},zr.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},zr.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var r=\\\"\\\"+t+(e.cacheKey||\\\"\\\")+(this._showOverdrawInspector?\\\"/overdraw\\\":\\\"\\\");return this.cache[r]||(this.cache[r]=new ir(this.context,nr[t],e,this._showOverdrawInspector)),this.cache[r]},zr.prototype.useProgram=function(t,e){var r=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.context.program.set(r.program),r};var Dr=t.default$20.vec4,Rr=t.default$20.mat4,Br=t.default$20.mat2,Fr=function(t,e,r){this.tileSize=512,this._renderWorldCopies=void 0===r||r,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new G(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},Nr={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},x:{configurable:!0},y:{configurable:!0},point:{configurable:!0}};Fr.prototype.clone=function(){var t=new Fr(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},Nr.minZoom.get=function(){return this._minZoom},Nr.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Nr.maxZoom.get=function(){return this._maxZoom},Nr.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Nr.renderWorldCopies.get=function(){return this._renderWorldCopies},Nr.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Nr.worldSize.get=function(){return this.tileSize*this.scale},Nr.centerPoint.get=function(){return this.size._div(2)},Nr.size.get=function(){return new t.default$1(this.width,this.height)},Nr.bearing.get=function(){return-this.angle/Math.PI*180},Nr.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=Br.create(),Br.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Nr.pitch.get=function(){return this._pitch/Math.PI*180},Nr.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Nr.fov.get=function(){return this._fov/Math.PI*180},Nr.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Nr.zoom.get=function(){return this._zoom},Nr.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Nr.center.get=function(){return this._center},Nr.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Fr.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Fr.prototype.getVisibleUnwrappedCoordinates=function(e){var r=this.pointCoordinate(new t.default$1(0,0),0),n=this.pointCoordinate(new t.default$1(this.width,0),0),i=Math.floor(r.column),a=Math.floor(n.column),o=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var s=i;s<=a;s++)0!==s&&o.push(new t.UnwrappedTileID(s,e));return o},Fr.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var i=this.pointCoordinate(this.centerPoint,r),a=new t.default$1(i.column-.5,i.row-.5);return function(e,r,n,i){void 0===i&&(i=!0);var a=1<<e,o={};function s(r,s,l){var c,u,f,h;if(l>=0&&l<=a)for(c=r;c<s;c++)u=Math.floor(c/a),f=(c%a+a)%a,0!==u&&!0!==i||(h=new t.OverscaledTileID(n,u,e,f,l),o[h.key]=h)}return Pr(r[0],r[1],r[2],0,a,s),Pr(r[2],r[3],r[0],0,a,s),Object.keys(o).map(function(t){return o[t]})}(r,[this.pointCoordinate(new t.default$1(0,0),r),this.pointCoordinate(new t.default$1(this.width,0),r),this.pointCoordinate(new t.default$1(this.width,this.height),r),this.pointCoordinate(new t.default$1(0,this.height),r)],e.reparseOverscaled?n:r,this._renderWorldCopies).sort(function(t,e){return a.dist(t.canonical)-a.dist(e.canonical)})},Fr.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Nr.unmodified.get=function(){return this._unmodified},Fr.prototype.zoomScale=function(t){return Math.pow(2,t)},Fr.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Fr.prototype.project=function(e){return new t.default$1(this.lngX(e.lng),this.latY(e.lat))},Fr.prototype.unproject=function(t){return new G(this.xLng(t.x),this.yLat(t.y))},Nr.x.get=function(){return this.lngX(this.center.lng)},Nr.y.get=function(){return this.latY(this.center.lat)},Nr.point.get=function(){return new t.default$1(this.x,this.y)},Fr.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Fr.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},Fr.prototype.xLng=function(t){return 360*t/this.worldSize-180},Fr.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},Fr.prototype.setLocationAtPoint=function(t,e){var r=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(r)),this._renderWorldCopies&&(this.center=this.center.wrap())},Fr.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Fr.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Fr.prototype.locationCoordinate=function(e){return new t.default$17(this.lngX(e.lng)/this.tileSize,this.latY(e.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Fr.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new G(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},Fr.prototype.pointCoordinate=function(e,r){void 0===r&&(r=this.tileZoom);var n=[e.x,e.y,0,1],i=[e.x,e.y,1,1];Dr.transformMat4(n,n,this.pixelMatrixInverse),Dr.transformMat4(i,i,this.pixelMatrixInverse);var a=n[3],o=i[3],s=n[0]/a,l=i[0]/o,c=n[1]/a,u=i[1]/o,f=n[2]/a,h=i[2]/o,p=f===h?0:(0-f)/(h-f);return new t.default$17(t.number(s,l,p)/this.tileSize,t.number(c,u,p)/this.tileSize,this.zoom)._zoomTo(r)},Fr.prototype.coordinatePoint=function(e){var r=e.zoomTo(this.zoom),n=[r.column*this.tileSize,r.row*this.tileSize,0,1];return Dr.transformMat4(n,n,this.pixelMatrix),new t.default$1(n[0]/n[3],n[1]/n[3])},Fr.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=e.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*e.wrap,l=Rr.identity(new Float64Array(16));return Rr.translate(l,l,[s*o,a.y*o,0]),Rr.scale(l,l,[o/t.default$8,o/t.default$8,1]),Rr.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},Fr.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,n,i,a=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var f=this.latRange;a=this.latY(f[1]),e=(o=this.latY(f[0]))-a<c.y?c.y/(o-a):0}if(this.lngRange){var h=this.lngRange;s=this.lngX(h[0]),r=(l=this.lngX(h[1]))-s<c.x?c.x/(l-s):0}var p=Math.max(r||0,e||0);if(p)return this.center=this.unproject(new t.default$1(r?(l+s)/2:this.x,e?(o+a)/2:this.y)),this.zoom+=this.scaleZoom(p),this._unmodified=u,void(this._constraining=!1);if(this.latRange){var d=this.y,g=c.y/2;d-g<a&&(i=a+g),d+g>o&&(i=o-g)}if(this.lngRange){var v=this.x,m=c.x/2;v-m<s&&(n=s+m),v+m>l&&(n=l-m)}void 0===n&&void 0===i||(this.center=this.unproject(new t.default$1(void 0!==n?n:this.x,void 0!==i?i:this.y))),this._unmodified=u,this._constraining=!1}},Fr.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,e=Math.PI/2+this._pitch,r=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),n=this.x,i=this.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance),o=new Float64Array(16);Rr.perspective(o,this._fov,this.width/this.height,1,a),Rr.scale(o,o,[1,-1,1]),Rr.translate(o,o,[0,0,-this.cameraToCenterDistance]),Rr.rotateX(o,o,this._pitch),Rr.rotateZ(o,o,this.angle),Rr.translate(o,o,[-n,-i,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));Rr.scale(o,o,[1,1,s,1]),this.projMatrix=o;var l=this.width%2/2,c=this.height%2/2,u=Math.cos(this.angle),f=Math.sin(this.angle),h=n-Math.round(n)+u*l+f*c,p=i-Math.round(i)+u*c+f*l,d=new Float64Array(o);if(Rr.translate(d,d,[h>.5?h-1:h,p>.5?p-1:p,0]),this.alignedProjMatrix=d,o=Rr.create(),Rr.scale(o,o,[this.width/2,-this.height/2,1]),Rr.translate(o,o,[1,-1,0]),this.pixelMatrix=Rr.multiply(new Float64Array(16),o,this.projMatrix),!(o=Rr.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\\\"failed to invert matrix\\\");this.pixelMatrixInverse=o,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Fr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.default$1(0,0)).zoomTo(this.zoom),r=[e.column*this.tileSize,e.row*this.tileSize,0,1];return Dr.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},Object.defineProperties(Fr.prototype,Nr);var jr=function(){var e,r,n,i;t.bindAll([\\\"_onHashChange\\\",\\\"_updateHash\\\"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),300,r=!1,n=0,i=function(){n=0,r&&(e(),n=setTimeout(i,300),r=!1)},function(){return r=!0,n||i(),n})};jr.prototype.addTo=function(e){return this._map=e,t.default.addEventListener(\\\"hashchange\\\",this._onHashChange,!1),this._map.on(\\\"moveend\\\",this._updateHash),this},jr.prototype.remove=function(){return t.default.removeEventListener(\\\"hashchange\\\",this._onHashChange,!1),this._map.off(\\\"moveend\\\",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},jr.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,n),a=Math.round(e.lng*i)/i,o=Math.round(e.lat*i)/i,s=this._map.getBearing(),l=this._map.getPitch(),c=\\\"\\\";return c+=t?\\\"#/\\\"+a+\\\"/\\\"+o+\\\"/\\\"+r:\\\"#\\\"+r+\\\"/\\\"+o+\\\"/\\\"+a,(s||l)&&(c+=\\\"/\\\"+Math.round(10*s)/10),l&&(c+=\\\"/\\\"+Math.round(l)),c},jr.prototype._onHashChange=function(){var e=t.default.location.hash.replace(\\\"#\\\",\\\"\\\").split(\\\"/\\\");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},jr.prototype._updateHashUnthrottled=function(){var e=this.getHashString();t.default.history.replaceState(t.default.history.state,\\\"\\\",e)};var Vr=function(e){function r(r,n,i,a){void 0===a&&(a={});var o=s.mousePos(n.getCanvasContainer(),i),l=n.unproject(o);e.call(this,r,t.extend({point:o,lngLat:l,originalEvent:i},a)),this._defaultPrevented=!1,this.target=n}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var n={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),Ur=function(e){function r(r,n,i){var a=s.touchPos(n.getCanvasContainer(),i),o=a.map(function(t){return n.unproject(t)}),l=a.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new t.default$1(0,0)),c=n.unproject(l);e.call(this,r,{points:a,point:l,lngLats:o,lngLat:c,originalEvent:i}),this._defaultPrevented=!1}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var n={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,n),r}(t.Event),qr=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),Hr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll([\\\"_onWheel\\\",\\\"_onTimeout\\\",\\\"_onScrollFrame\\\",\\\"_onScrollFinished\\\"],this)};Hr.prototype.isEnabled=function(){return!!this._enabled},Hr.prototype.isActive=function(){return!!this._active},Hr.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\\\"center\\\"===t.around)},Hr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Hr.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.default.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=a.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%4.000244140625==0?this._type=\\\"wheel\\\":0!==r&&Math.abs(r)<4?this._type=\\\"trackpad\\\":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)<200?\\\"trackpad\\\":\\\"wheel\\\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}},Hr.prototype._onTimeout=function(t){this._type=\\\"wheel\\\",this._delta-=this._lastValue,this.isActive()||this._start(t)},Hr.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._map.fire(new t.Event(\\\"movestart\\\",{originalEvent:e})),this._map.fire(new t.Event(\\\"zoomstart\\\",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var r=s.mousePos(this._el,e);this._around=G.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},Hr.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n=\\\"wheel\\\"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var o=\\\"number\\\"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*i))),\\\"wheel\\\"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var s=!1;if(\\\"wheel\\\"===this._type){var l=Math.min((a.now()-this._lastWheelEventTime)/200,1),c=this._easing(l);r.zoom=t.number(this._startZoom,this._targetZoom,c),l<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):s=!0}else r.zoom=this._targetZoom,s=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event(\\\"move\\\",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event(\\\"zoom\\\",{originalEvent:this._lastWheelEvent})),s&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._map.fire(new t.Event(\\\"zoomend\\\",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event(\\\"moveend\\\",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},Hr.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(a.now()-n.start)/n.duration,o=n.easing(i+.01)-n.easing(i),s=.27/Math.sqrt(o*o+1e-4)*.01,l=Math.sqrt(.0729-s*s);r=t.bezier(s,l,.25,1)}return this._prevEase={start:a.now(),duration:e,easing:r},r};var Gr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),t.bindAll([\\\"_onMouseMove\\\",\\\"_onMouseUp\\\",\\\"_onKeyDown\\\"],this)};Gr.prototype.isEnabled=function(){return!!this._enabled},Gr.prototype.isActive=function(){return!!this._active},Gr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Gr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Gr.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.default.document.addEventListener(\\\"mousemove\\\",this._onMouseMove,!1),t.default.document.addEventListener(\\\"keydown\\\",this._onKeyDown,!1),t.default.document.addEventListener(\\\"mouseup\\\",this._onMouseUp,!1),s.disableDrag(),this._startPos=s.mousePos(this._el,e),this._active=!0)},Gr.prototype._onMouseMove=function(t){var e=this._startPos,r=s.mousePos(this._el,t);this._box||(this._box=s.create(\\\"div\\\",\\\"mapboxgl-boxzoom\\\",this._container),this._container.classList.add(\\\"mapboxgl-crosshair\\\"),this._fireEvent(\\\"boxzoomstart\\\",t));var n=Math.min(e.x,r.x),i=Math.max(e.x,r.x),a=Math.min(e.y,r.y),o=Math.max(e.y,r.y);s.setTransform(this._box,\\\"translate(\\\"+n+\\\"px,\\\"+a+\\\"px)\\\"),this._box.style.width=i-n+\\\"px\\\",this._box.style.height=o-a+\\\"px\\\"},Gr.prototype._onMouseUp=function(e){if(0===e.button){var r=this._startPos,n=s.mousePos(this._el,e),i=(new W).extend(this._map.unproject(r)).extend(this._map.unproject(n));this._finish(),s.suppressClick(),r.x===n.x&&r.y===n.y?this._fireEvent(\\\"boxzoomcancel\\\",e):this._map.fitBounds(i,{linear:!0}).fire(new t.Event(\\\"boxzoomend\\\",{originalEvent:e,boxZoomBounds:i}))}},Gr.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent(\\\"boxzoomcancel\\\",t))},Gr.prototype._finish=function(){this._active=!1,t.default.document.removeEventListener(\\\"mousemove\\\",this._onMouseMove,!1),t.default.document.removeEventListener(\\\"keydown\\\",this._onKeyDown,!1),t.default.document.removeEventListener(\\\"mouseup\\\",this._onMouseUp,!1),this._container.classList.remove(\\\"mapboxgl-crosshair\\\"),this._box&&(s.remove(this._box),this._box=null),s.enableDrag()},Gr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var Wr=t.bezier(0,0,.25,1),Yr=function(e,r){this._map=e,this._el=r.element||e.getCanvasContainer(),this._state=\\\"disabled\\\",this._button=r.button||\\\"right\\\",this._bearingSnap=r.bearingSnap||0,this._pitchWithRotate=!1!==r.pitchWithRotate,t.bindAll([\\\"_onMouseMove\\\",\\\"_onMouseUp\\\",\\\"_onBlur\\\",\\\"_onDragFrame\\\"],this)};Yr.prototype.isEnabled=function(){return\\\"disabled\\\"!==this._state},Yr.prototype.isActive=function(){return\\\"active\\\"===this._state},Yr.prototype.enable=function(){this.isEnabled()||(this._state=\\\"enabled\\\")},Yr.prototype.disable=function(){if(this.isEnabled())switch(this._state){case\\\"active\\\":this._state=\\\"disabled\\\",this._unbind(),this._deactivate(),this._fireEvent(\\\"rotateend\\\"),this._pitchWithRotate&&this._fireEvent(\\\"pitchend\\\"),this._fireEvent(\\\"moveend\\\");break;case\\\"pending\\\":this._state=\\\"disabled\\\",this._unbind();break;default:this._state=\\\"disabled\\\"}},Yr.prototype.onMouseDown=function(e){if(\\\"enabled\\\"===this._state){if(\\\"right\\\"===this._button){if(this._eventButton=s.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==s.mouseButton(e))return;this._eventButton=0}s.disableDrag(),t.default.document.addEventListener(\\\"mousemove\\\",this._onMouseMove,{capture:!0}),t.default.document.addEventListener(\\\"mouseup\\\",this._onMouseUp),t.default.addEventListener(\\\"blur\\\",this._onBlur),this._state=\\\"pending\\\",this._inertia=[[a.now(),this._map.getBearing()]],this._previousPos=s.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},Yr.prototype._onMouseMove=function(t){this._lastMoveEvent=t,this._pos=s.mousePos(this._el,t),\\\"pending\\\"===this._state&&(this._state=\\\"active\\\",this._fireEvent(\\\"rotatestart\\\",t),this._fireEvent(\\\"movestart\\\",t),this._pitchWithRotate&&this._fireEvent(\\\"pitchstart\\\",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},Yr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform,r=this._previousPos,n=this._pos,i=.8*(r.x-n.x),o=-.5*(r.y-n.y),s=e.bearing-i,l=e.pitch-o,c=this._inertia,u=c[c.length-1];this._drainInertiaBuffer(),c.push([a.now(),this._map._normalizeBearing(s,u[1])]),e.bearing=s,this._pitchWithRotate&&(this._fireEvent(\\\"pitch\\\",t),e.pitch=l),this._fireEvent(\\\"rotate\\\",t),this._fireEvent(\\\"move\\\",t),delete this._lastMoveEvent,this._previousPos=this._pos}},Yr.prototype._onMouseUp=function(t){if(s.mouseButton(t)===this._eventButton)switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",s.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Yr.prototype._onBlur=function(t){switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",this._unbind(),this._deactivate(),this._fireEvent(\\\"rotateend\\\",t),this._pitchWithRotate&&this._fireEvent(\\\"pitchend\\\",t),this._fireEvent(\\\"moveend\\\",t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Yr.prototype._unbind=function(){t.default.document.removeEventListener(\\\"mousemove\\\",this._onMouseMove,{capture:!0}),t.default.document.removeEventListener(\\\"mouseup\\\",this._onMouseUp),t.default.removeEventListener(\\\"blur\\\",this._onBlur),s.enableDrag()},Yr.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos},Yr.prototype._inertialRotate=function(t){var e=this;this._fireEvent(\\\"rotateend\\\",t),this._drainInertiaBuffer();var r=this._map,n=r.getBearing(),i=this._inertia,a=function(){Math.abs(n)<e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent(\\\"moveend\\\",t),e._pitchWithRotate&&e._fireEvent(\\\"pitchend\\\",t)};if(i.length<2)a();else{var o=i[0],s=i[i.length-1],l=i[i.length-2],c=r._normalizeBearing(n,l[1]),u=s[1]-o[1],f=u<0?-1:1,h=(s[0]-o[0])/1e3;if(0!==u&&0!==h){var p=Math.abs(u*(.25/h));p>180&&(p=180);var d=p/180;c+=f*p*(d/2),Math.abs(r._normalizeBearing(c,0))<this._bearingSnap&&(c=r._normalizeBearing(0,c)),r.rotateTo(c,{duration:1e3*d,easing:Wr,noMoveStart:!0},{originalEvent:t})}else a()}},Yr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Yr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length>0&&e-t[0][0]>160;)t.shift()};var Xr=t.bezier(0,0,.3,1),Zr=function(e){this._map=e,this._el=e.getCanvasContainer(),this._state=\\\"disabled\\\",t.bindAll([\\\"_onMove\\\",\\\"_onMouseUp\\\",\\\"_onTouchEnd\\\",\\\"_onBlur\\\",\\\"_onDragFrame\\\"],this)};Zr.prototype.isEnabled=function(){return\\\"disabled\\\"!==this._state},Zr.prototype.isActive=function(){return\\\"active\\\"===this._state},Zr.prototype.enable=function(){this.isEnabled()||(this._el.classList.add(\\\"mapboxgl-touch-drag-pan\\\"),this._state=\\\"enabled\\\")},Zr.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove(\\\"mapboxgl-touch-drag-pan\\\"),this._state){case\\\"active\\\":this._state=\\\"disabled\\\",this._unbind(),this._deactivate(),this._fireEvent(\\\"dragend\\\"),this._fireEvent(\\\"moveend\\\");break;case\\\"pending\\\":this._state=\\\"disabled\\\",this._unbind();break;default:this._state=\\\"disabled\\\"}},Zr.prototype.onMouseDown=function(e){\\\"enabled\\\"===this._state&&(e.ctrlKey||0!==s.mouseButton(e)||(s.addEventListener(t.default.document,\\\"mousemove\\\",this._onMove,{capture:!0}),s.addEventListener(t.default.document,\\\"mouseup\\\",this._onMouseUp),this._start(e)))},Zr.prototype.onTouchStart=function(e){\\\"enabled\\\"===this._state&&(e.touches.length>1||(s.addEventListener(t.default.document,\\\"touchmove\\\",this._onMove,{capture:!0,passive:!1}),s.addEventListener(t.default.document,\\\"touchend\\\",this._onTouchEnd),this._start(e)))},Zr.prototype._start=function(e){t.default.addEventListener(\\\"blur\\\",this._onBlur),this._state=\\\"pending\\\",this._previousPos=s.mousePos(this._el,e),this._inertia=[[a.now(),this._previousPos]]},Zr.prototype._onMove=function(t){this._lastMoveEvent=t,t.preventDefault(),this._pos=s.mousePos(this._el,t),this._drainInertiaBuffer(),this._inertia.push([a.now(),this._pos]),\\\"pending\\\"===this._state&&(this._state=\\\"active\\\",this._fireEvent(\\\"dragstart\\\",t),this._fireEvent(\\\"movestart\\\",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame))},Zr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._previousPos),this._pos),this._fireEvent(\\\"drag\\\",t),this._fireEvent(\\\"move\\\",t),this._previousPos=this._pos,delete this._lastMoveEvent}},Zr.prototype._onMouseUp=function(t){if(0===s.mouseButton(t))switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",s.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Zr.prototype._onTouchEnd=function(t){switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",this._unbind(),this._deactivate(),this._inertialPan(t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Zr.prototype._onBlur=function(t){switch(this._state){case\\\"active\\\":this._state=\\\"enabled\\\",this._unbind(),this._deactivate(),this._fireEvent(\\\"dragend\\\",t),this._fireEvent(\\\"moveend\\\",t);break;case\\\"pending\\\":this._state=\\\"enabled\\\",this._unbind()}},Zr.prototype._unbind=function(){s.removeEventListener(t.default.document,\\\"touchmove\\\",this._onMove,{capture:!0,passive:!1}),s.removeEventListener(t.default.document,\\\"touchend\\\",this._onTouchEnd),s.removeEventListener(t.default.document,\\\"mousemove\\\",this._onMove,{capture:!0}),s.removeEventListener(t.default.document,\\\"mouseup\\\",this._onMouseUp),s.removeEventListener(t.default,\\\"blur\\\",this._onBlur)},Zr.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._previousPos,delete this._pos},Zr.prototype._inertialPan=function(t){this._fireEvent(\\\"dragend\\\",t),this._drainInertiaBuffer();var e=this._inertia;if(e.length<2)this._fireEvent(\\\"moveend\\\",t);else{var r=e[e.length-1],n=e[0],i=r[1].sub(n[1]),a=(r[0]-n[0])/1e3;if(0===a||r[1].equals(n[1]))this._fireEvent(\\\"moveend\\\",t);else{var o=i.mult(.3/a),s=o.mag();s>1400&&(s=1400,o._unit()._mult(s));var l=s/750,c=o.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:Xr,noMoveStart:!0},{originalEvent:t})}}},Zr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Zr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length>0&&e-t[0][0]>160;)t.shift()};var $r=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([\\\"_onKeyDown\\\"],this)};function Jr(t){return t*(2-t)}$r.prototype.isEnabled=function(){return!!this._enabled},$r.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\\\"keydown\\\",this._onKeyDown,!1),this._enabled=!0)},$r.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\\\"keydown\\\",this._onKeyDown),this._enabled=!1)},$r.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,i=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(a=1,t.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:Jr,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-i,100*-a],center:o.getCenter()};o.easeTo(l,{originalEvent:t})}};var Kr=function(e){this._map=e,t.bindAll([\\\"_onDblClick\\\",\\\"_onZoomEnd\\\"],this)};Kr.prototype.isEnabled=function(){return!!this._enabled},Kr.prototype.isActive=function(){return!!this._active},Kr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Kr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Kr.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null},300)))},Kr.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},Kr.prototype._zoom=function(t){this._active=!0,this._map.on(\\\"zoomend\\\",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},Kr.prototype._onZoomEnd=function(){this._active=!1,this._map.off(\\\"zoomend\\\",this._onZoomEnd)};var Qr=t.bezier(0,0,.15,1),tn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll([\\\"_onMove\\\",\\\"_onEnd\\\",\\\"_onTouchFrame\\\"],this)};tn.prototype.isEnabled=function(){return!!this._enabled},tn.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add(\\\"mapboxgl-touch-zoom-rotate\\\"),this._enabled=!0,this._aroundCenter=!!t&&\\\"center\\\"===t.around)},tn.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove(\\\"mapboxgl-touch-zoom-rotate\\\"),this._enabled=!1)},tn.prototype.disableRotation=function(){this._rotationDisabled=!0},tn.prototype.enableRotation=function(){this._rotationDisabled=!1},tn.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var r=s.mousePos(this._el,e.touches[0]),n=s.mousePos(this._el,e.touches[1]);this._startVec=r.sub(n),this._gestureIntent=void 0,this._inertia=[],s.addEventListener(t.default.document,\\\"touchmove\\\",this._onMove,{passive:!1}),s.addEventListener(t.default.document,\\\"touchend\\\",this._onEnd)}},tn.prototype._getTouchEventData=function(t){var e=s.mousePos(this._el,t.touches[0]),r=s.mousePos(this._el,t.touches[1]),n=e.sub(r);return{vec:n,center:e.add(r).div(2),scale:n.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI}},tn.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),n=r.vec,i=r.scale,a=r.bearing;if(!this._gestureIntent){var o=Math.abs(1-i)>.15;Math.abs(a)>10?this._gestureIntent=\\\"rotate\\\":o&&(this._gestureIntent=\\\"zoom\\\"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+\\\"start\\\",{originalEvent:e})),this._map.fire(new t.Event(\\\"movestart\\\",{originalEvent:e})),this._startVec=n)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},tn.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),i=n.center,o=n.bearing,s=n.scale,l=r.pointLocation(i),c=r.locationPoint(l);\\\"rotate\\\"===e&&(r.bearing=this._startBearing+o),r.zoom=r.scaleZoom(this._startScale*s),r.setLocationAtPoint(l,c),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event(\\\"move\\\",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([a.now(),s,i])}},tn.prototype._onEnd=function(e){s.removeEventListener(t.default.document,\\\"touchmove\\\",this._onMove,{passive:!1}),s.removeEventListener(t.default.document,\\\"touchend\\\",this._onEnd);var r=this._gestureIntent,n=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,r){this._map.fire(new t.Event(r+\\\"end\\\",{originalEvent:e})),this._drainInertiaBuffer();var i=this._inertia,a=this._map;if(i.length<2)a.snapToNorth({},{originalEvent:e});else{var o=i[i.length-1],l=i[0],c=a.transform.scaleZoom(n*o[1]),u=a.transform.scaleZoom(n*l[1]),f=c-u,h=(o[0]-l[0])/1e3,p=o[2];if(0!==h&&c!==u){var d=.15*f/h;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var g=1e3*Math.abs(d/(12*.15)),v=c+d*g/2e3;v<0&&(v=0),a.easeTo({zoom:v,duration:g,easing:Qr,around:this._aroundCenter?a.getCenter():a.unproject(p),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},tn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=a.now();t.length>2&&e-t[0][0]>160;)t.shift()};var en={scrollZoom:Hr,boxZoom:Gr,dragRotate:Yr,dragPan:Zr,keyboard:$r,doubleClickZoom:Kr,touchZoomRotate:tn},rn=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll([\\\"_renderFrameCallback\\\"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return this.transform.center},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.default$1.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.fitBounds=function(e,r,n){if(\\\"number\\\"==typeof(r=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},r)).padding){var i=r.padding;r.padding={top:i,bottom:i,right:i,left:i}}if(!t.default$10(Object.keys(r.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),[\\\"bottom\\\",\\\"left\\\",\\\"right\\\",\\\"top\\\"]))return t.warnOnce(\\\"options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'\\\"),this;e=W.convert(e);var a=[(r.padding.left-r.padding.right)/2,(r.padding.top-r.padding.bottom)/2],o=Math.min(r.padding.right,r.padding.left),s=Math.min(r.padding.top,r.padding.bottom);r.offset=[r.offset[0]+a[0],r.offset[1]+a[1]];var l=t.default$1.convert(r.offset),c=this.transform,u=c.project(e.getNorthWest()),f=c.project(e.getSouthEast()),h=f.sub(u),p=(c.width-2*o-2*Math.abs(l.x))/h.x,d=(c.height-2*s-2*Math.abs(l.y))/h.y;return d<0||p<0?(t.warnOnce(\\\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\\\"),this):(r.center=c.unproject(u.add(f).div(2)),r.zoom=Math.min(c.scaleZoom(c.scale*Math.min(p,d)),r.maxZoom),r.bearing=0,r.linear?this.easeTo(r,n):this.flyTo(r,n))},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,i=!1,a=!1,o=!1;return\\\"zoom\\\"in e&&n.zoom!==+e.zoom&&(i=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=G.convert(e.center)),\\\"bearing\\\"in e&&n.bearing!==+e.bearing&&(a=!0,n.bearing=+e.bearing),\\\"pitch\\\"in e&&n.pitch!==+e.pitch&&(o=!0,n.pitch=+e.pitch),this.fire(new t.Event(\\\"movestart\\\",r)).fire(new t.Event(\\\"move\\\",r)),i&&this.fire(new t.Event(\\\"zoomstart\\\",r)).fire(new t.Event(\\\"zoom\\\",r)).fire(new t.Event(\\\"zoomend\\\",r)),a&&this.fire(new t.Event(\\\"rotatestart\\\",r)).fire(new t.Event(\\\"rotate\\\",r)).fire(new t.Event(\\\"rotateend\\\",r)),o&&this.fire(new t.Event(\\\"pitchstart\\\",r)).fire(new t.Event(\\\"pitch\\\",r)).fire(new t.Event(\\\"pitchend\\\",r)),this.fire(new t.Event(\\\"moveend\\\",r))},r.prototype.easeTo=function(e,r){var n=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=\\\"zoom\\\"in e?+e.zoom:a,c=\\\"bearing\\\"in e?this._normalizeBearing(e.bearing,o):o,u=\\\"pitch\\\"in e?+e.pitch:s,f=i.centerPoint.add(t.default$1.convert(e.offset)),h=i.pointLocation(f),p=G.convert(e.center||h);this._normalizeCenter(p);var d,g,v=i.project(h),m=i.project(p).sub(v),y=i.zoomScale(l-a);return e.around&&(d=G.convert(e.around),g=i.locationPoint(d)),this._zooming=l!==a,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&&(i.zoom=t.number(a,l,e)),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,u,e)),d)i.setLocationAtPoint(d,g);else{var h=i.zoomScale(i.zoom-a),p=l>a?Math.min(2,y):Math.max(.5,y),x=Math.pow(p,1-e),b=i.unproject(v.add(m.mult(e*x)).mult(h));i.setLocationAtPoint(i.renderWorldCopies?b.wrap():b,f)}n._fireMoveEvents(r)},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(r)},e.delayEndEvents):n._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event(\\\"movestart\\\",e)),this._zooming&&this.fire(new t.Event(\\\"zoomstart\\\",e)),this._rotating&&this.fire(new t.Event(\\\"rotatestart\\\",e)),this._pitching&&this.fire(new t.Event(\\\"pitchstart\\\",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event(\\\"move\\\",e)),this._zooming&&this.fire(new t.Event(\\\"zoom\\\",e)),this._rotating&&this.fire(new t.Event(\\\"rotate\\\",e)),this._pitching&&this.fire(new t.Event(\\\"pitch\\\",e))},r.prototype._afterEase=function(e){var r=this._zooming,n=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event(\\\"zoomend\\\",e)),n&&this.fire(new t.Event(\\\"rotateend\\\",e)),i&&this.fire(new t.Event(\\\"pitchend\\\",e)),this.fire(new t.Event(\\\"moveend\\\",e))},r.prototype.flyTo=function(e,r){var n=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=\\\"zoom\\\"in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):a,c=\\\"bearing\\\"in e?this._normalizeBearing(e.bearing,o):o,u=\\\"pitch\\\"in e?+e.pitch:s,f=i.zoomScale(l-a),h=i.centerPoint.add(t.default$1.convert(e.offset)),p=i.pointLocation(h),d=G.convert(e.center||p);this._normalizeCenter(d);var g=i.project(p),v=i.project(d).sub(g),m=e.curve,y=Math.max(i.width,i.height),x=y/f,b=v.mag();if(\\\"minZoom\\\"in e){var _=t.clamp(Math.min(e.minZoom,a,l),i.minZoom,i.maxZoom),w=y/i.zoomScale(_-a);m=Math.sqrt(w/b*2)}var k=m*m;function M(t){var e=(x*x-y*y+(t?-1:1)*k*k*b*b)/(2*(t?x:y)*k*b);return Math.log(Math.sqrt(e*e+1)-e)}function A(t){return(Math.exp(t)-Math.exp(-t))/2}function T(t){return(Math.exp(t)+Math.exp(-t))/2}var S=M(0),C=function(t){return T(S)/T(S+m*t)},E=function(t){return y*((T(S)*(A(e=S+m*t)/T(e))-A(S))/k)/b;var e},L=(M(1)-S)/m;if(Math.abs(b)<1e-6||!isFinite(L)){if(Math.abs(y-x)<1e-6)return this.easeTo(e,r);var z=x<y?-1:1;L=Math.abs(Math.log(x/y))/m,E=function(){return 0},C=function(t){return Math.exp(z*m*t)}}if(\\\"duration\\\"in e)e.duration=+e.duration;else{var O=\\\"screenSpeed\\\"in e?+e.screenSpeed/m:+e.speed;e.duration=1e3*L/O}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,!1),this._ease(function(e){var l=e*L,f=1/C(l);i.zoom=a+i.scaleZoom(f),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,u,e));var p=i.unproject(g.add(v.mult(E(l))).mult(f));i.setLocationAtPoint(i.renderWorldCopies?p.wrap():p,h),n._fireMoveEvents(r)},function(){return n._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(t,e,r){!1===r.animate||0===r.duration?(t(1),e()):(this._easeStart=a.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((a.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)<n&&(e-=360),Math.abs(e+360-r)<n&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),nn=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\\\"_updateEditLink\\\",\\\"_updateData\\\",\\\"_updateCompact\\\"],this)};nn.prototype.getDefaultPosition=function(){return\\\"bottom-right\\\"},nn.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl mapboxgl-ctrl-attrib\\\"),e&&this._container.classList.add(\\\"mapboxgl-compact\\\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\\\"sourcedata\\\",this._updateData),this._map.on(\\\"moveend\\\",this._updateEditLink),void 0===e&&(this._map.on(\\\"resize\\\",this._updateCompact),this._updateCompact()),this._container},nn.prototype.onRemove=function(){s.remove(this._container),this._map.off(\\\"sourcedata\\\",this._updateData),this._map.off(\\\"moveend\\\",this._updateEditLink),this._map.off(\\\"resize\\\",this._updateCompact),this._map=void 0},nn.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(\\\".mapbox-improve-map\\\"));var e=[{key:\\\"owner\\\",value:this.styleOwner},{key:\\\"id\\\",value:this.styleId},{key:\\\"access_token\\\",value:v.ACCESS_TOKEN}];if(t){var r=e.reduce(function(t,r,n){return r.value&&(t+=r.key+\\\"=\\\"+r.value+(n<e.length-1?\\\"&\\\":\\\"\\\")),t},\\\"?\\\");t.href=\\\"https://www.mapbox.com/feedback/\\\"+r+(this._map._hash?this._map._hash.getHashString(!0):\\\"\\\")}},nn.prototype._updateData=function(t){t&&\\\"metadata\\\"===t.sourceDataType&&(this._updateAttributions(),this._updateEditLink())},nn.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var n in r){var i=r[n].getSource();i.attribution&&t.indexOf(i.attribution)<0&&t.push(i.attribution)}t.sort(function(t,e){return t.length-e.length}),(t=t.filter(function(e,r){for(var n=r+1;n<t.length;n++)if(t[n].indexOf(e)>=0)return!1;return!0})).length?(this._container.innerHTML=t.join(\\\" | \\\"),this._container.classList.remove(\\\"mapboxgl-attrib-empty\\\")):this._container.classList.add(\\\"mapboxgl-attrib-empty\\\"),this._editLink=null}},nn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\\\"mapboxgl-compact\\\"):this._container.classList.remove(\\\"mapboxgl-compact\\\")};var an=function(){t.bindAll([\\\"_updateLogo\\\"],this)};an.prototype.onAdd=function(t){this._map=t,this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl\\\");var e=s.create(\\\"a\\\",\\\"mapboxgl-ctrl-logo\\\");return e.target=\\\"_blank\\\",e.href=\\\"https://www.mapbox.com/\\\",e.setAttribute(\\\"aria-label\\\",\\\"Mapbox logo\\\"),this._container.appendChild(e),this._container.style.display=\\\"none\\\",this._map.on(\\\"sourcedata\\\",this._updateLogo),this._updateLogo(),this._container},an.prototype.onRemove=function(){s.remove(this._container),this._map.off(\\\"sourcedata\\\",this._updateLogo)},an.prototype.getDefaultPosition=function(){return\\\"bottom-left\\\"},an.prototype._updateLogo=function(t){t&&\\\"metadata\\\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\\\"block\\\":\\\"none\\\")},an.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}};var on=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};on.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},on.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;r<n.length;r+=1){var i=n[r];if(i.id===t)return void(i.cancelled=!0)}},on.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,r=t;e<r.length;e+=1){var n=r[e];if(!n.cancelled&&(n.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},on.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var sn=t.default.HTMLImageElement,ln=t.default.HTMLElement,cn={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300},un=function(r){function n(e){if(null!=(e=t.extend({},cn,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error(\\\"maxZoom must be greater than minZoom\\\");var n=new Fr(e.minZoom,e.maxZoom,e.renderWorldCopies);r.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new on;var i=e.transformRequest;if(this._transformRequest=i?function(t,e){return i(t,e)||{url:t}}:function(t){return{url:t}},\\\"string\\\"==typeof e.container){var a=t.default.document.getElementById(e.container);if(!a)throw new Error(\\\"Container '\\\"+e.container+\\\"' not found.\\\");this._container=a}else{if(!(e.container instanceof ln))throw new Error(\\\"Invalid type: 'container' must be a String or HTMLElement.\\\");this._container=e.container}e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\\\"_onWindowOnline\\\",\\\"_onWindowResize\\\",\\\"_contextLost\\\",\\\"_contextRestored\\\",\\\"_update\\\",\\\"_render\\\",\\\"_onData\\\",\\\"_onDataLoading\\\"],this),this._setupContainer(),this._setupPainter(),this.on(\\\"move\\\",this._update.bind(this,!1)),this.on(\\\"zoom\\\",this._update.bind(this,!0)),void 0!==t.default&&(t.default.addEventListener(\\\"online\\\",this._onWindowOnline,!1),t.default.addEventListener(\\\"resize\\\",this._onWindowResize,!1)),function(t,e){var r=t.getCanvasContainer(),n=null,i=!1;for(var a in en)t[a]=new en[a](t,e),e.interactive&&e[a]&&t[a].enable(e[a]);s.addEventListener(r,\\\"mouseout\\\",function(e){t.fire(new Vr(\\\"mouseout\\\",t,e))}),s.addEventListener(r,\\\"mousedown\\\",function(r){i=!0;var n=new Vr(\\\"mousedown\\\",t,r);t.fire(n),n.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(r),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(r),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(r))}),s.addEventListener(r,\\\"mouseup\\\",function(e){var r=t.dragRotate.isActive();n&&!r&&t.fire(new Vr(\\\"contextmenu\\\",t,n)),n=null,i=!1,t.fire(new Vr(\\\"mouseup\\\",t,e))}),s.addEventListener(r,\\\"mousemove\\\",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var n=e.toElement||e.target;n&&n!==r;)n=n.parentNode;n===r&&t.fire(new Vr(\\\"mousemove\\\",t,e))}}),s.addEventListener(r,\\\"mouseover\\\",function(e){for(var n=e.toElement||e.target;n&&n!==r;)n=n.parentNode;n===r&&t.fire(new Vr(\\\"mouseover\\\",t,e))}),s.addEventListener(r,\\\"touchstart\\\",function(r){var n=new Ur(\\\"touchstart\\\",t,r);t.fire(n),n.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(n))},{passive:!1}),s.addEventListener(r,\\\"touchmove\\\",function(e){t.fire(new Ur(\\\"touchmove\\\",t,e))},{passive:!1}),s.addEventListener(r,\\\"touchend\\\",function(e){t.fire(new Ur(\\\"touchend\\\",t,e))}),s.addEventListener(r,\\\"touchcancel\\\",function(e){t.fire(new Ur(\\\"touchcancel\\\",t,e))}),s.addEventListener(r,\\\"click\\\",function(e){t.fire(new Vr(\\\"click\\\",t,e))}),s.addEventListener(r,\\\"dblclick\\\",function(e){var r=new Vr(\\\"dblclick\\\",t,e);t.fire(r),r.defaultPrevented||t.doubleClickZoom.onDblClick(r)}),s.addEventListener(r,\\\"contextmenu\\\",function(e){var r=t.dragRotate.isActive();i||r?i&&(n=e):t.fire(new Vr(\\\"contextmenu\\\",t,e)),e.preventDefault()}),s.addEventListener(r,\\\"wheel\\\",function(e){var r=new qr(\\\"wheel\\\",t,e);t.fire(r),r.defaultPrevented||t.scrollZoom.onWheel(e)},{passive:!1})}(this,e),this._hash=e.hash&&(new jr).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this.resize(),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new nn),this.addControl(new an,e.logoPosition),this.on(\\\"style.load\\\",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on(\\\"data\\\",this._onData),this.on(\\\"dataloading\\\",this._onDataLoading)}r&&(n.__proto__=r),n.prototype=Object.create(r&&r.prototype),n.prototype.constructor=n;var i={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return n.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e=\\\"top-right\\\");var r=t.onAdd(this),n=this._controlPositions[e];return-1!==e.indexOf(\\\"bottom\\\")?n.insertBefore(r,n.firstChild):n.appendChild(r),this},n.prototype.removeControl=function(t){return t.onRemove(this),this},n.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];return this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i),this.fire(new t.Event(\\\"movestart\\\",e)).fire(new t.Event(\\\"move\\\",e)).fire(new t.Event(\\\"resize\\\",e)).fire(new t.Event(\\\"moveend\\\",e))},n.prototype.getBounds=function(){var e=new W(this.transform.pointLocation(new t.default$1(0,this.transform.height)),this.transform.pointLocation(new t.default$1(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(e.extend(this.transform.pointLocation(new t.default$1(this.transform.size.x,0))),e.extend(this.transform.pointLocation(new t.default$1(0,this.transform.size.y)))),e},n.prototype.getMaxBounds=function(){return this.transform.latRange&&2===this.transform.latRange.length&&this.transform.lngRange&&2===this.transform.lngRange.length?new W([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},n.prototype.setMaxBounds=function(t){if(t){var e=W.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null==t&&(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},n.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error(\\\"minZoom must be between 0 and the current maxZoom, inclusive\\\")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error(\\\"maxZoom must be greater than the current minZoom\\\")},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update(),this},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.project=function(t){return this.transform.locationPoint(G.convert(t))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.default$1.convert(e))},n.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},n.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isActive()},n.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},n.prototype.on=function(t,e,n){var i,a=this;if(void 0===n)return r.prototype.on.call(this,t,e);var o=function(){if(\\\"mouseenter\\\"===t||\\\"mouseover\\\"===t){var r=!1;return{layer:e,listener:n,delegates:{mousemove:function(i){var o=a.getLayer(e)?a.queryRenderedFeatures(i.point,{layers:[e]}):[];o.length?r||(r=!0,n.call(a,new Vr(t,a,i.originalEvent,{features:o}))):r=!1},mouseout:function(){r=!1}}}}if(\\\"mouseleave\\\"===t||\\\"mouseout\\\"===t){var o=!1;return{layer:e,listener:n,delegates:{mousemove:function(r){(a.getLayer(e)?a.queryRenderedFeatures(r.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,n.call(a,new Vr(t,a,r.originalEvent)))},mouseout:function(e){o&&(o=!1,n.call(a,new Vr(t,a,e.originalEvent)))}}}}return{layer:e,listener:n,delegates:(i={},i[t]=function(t){var r=a.getLayer(e)?a.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&&(t.features=r,n.call(a,t),delete t.features)},i)}}();for(var s in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(o),o.delegates)a.on(s,o.delegates[s]);return this},n.prototype.off=function(t,e,n){if(void 0===n)return r.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var i=this._delegatedListeners[t],a=0;a<i.length;a++){var o=i[a];if(o.layer===e&&o.listener===n){for(var s in o.delegates)this.off(s,o.delegates[s]);return i.splice(a,1),this}}return this},n.prototype.queryRenderedFeatures=function(e,r){var n;return 2===arguments.length?(e=arguments[0],r=arguments[1]):1===arguments.length&&((n=arguments[0])instanceof t.default$1||Array.isArray(n))?(e=arguments[0],r={}):1===arguments.length?(e=void 0,r=arguments[0]):(e=void 0,r={}),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(e),r,this.transform):[]},n.prototype._makeQueryGeometry=function(e){var r,n=this;if(void 0===e&&(e=[t.default$1.convert([0,0]),t.default$1.convert([this.transform.width,this.transform.height])]),e instanceof t.default$1||\\\"number\\\"==typeof e[0])r=[t.default$1.convert(e)];else{var i=[t.default$1.convert(e[0]),t.default$1.convert(e[1])];r=[i[0],new t.default$1(i[1].x,i[0].y),i[1],new t.default$1(i[0].x,i[1].y),i[0]]}return{viewport:r,worldCoordinate:r.map(function(t){return n.transform.pointCoordinate(t)})}},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,r){if((!r||!1!==r.diff&&!r.localIdeographFontFamily)&&this.style&&e&&\\\"object\\\"==typeof e)try{return this.style.setState(e)&&this._update(!0),this}catch(e){t.warnOnce(\\\"Unable to perform style diff: \\\"+(e.message||e.error||e)+\\\".  Rebuilding the style from scratch.\\\")}return this.style&&(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new Je(this,r||{}),this.style.setEventedParent(this,{style:this.style}),\\\"string\\\"==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce(\\\"There is no style added to the map.\\\")},n.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},n.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error(\\\"There is no source with ID '\\\"+e+\\\"'\\\")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var n in r){var i=r[n];if(\\\"loaded\\\"!==i.state&&\\\"errored\\\"!==i.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,r,n){void 0===n&&(n={});var i=n.pixelRatio;void 0===i&&(i=1);var o=n.sdf;if(void 0===o&&(o=!1),r instanceof sn){var s=a.getImageData(r),l=s.width,c=s.height,u=s.data;this.style.addImage(e,{data:new t.RGBAImage({width:l,height:c},u),pixelRatio:i,sdf:o})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error(\\\"Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\\\")));var f=r.width,h=r.height,p=r.data;this.style.addImage(e,{data:new t.RGBAImage({width:f,height:h},p.slice(0)),pixelRatio:i,sdf:o})}},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error(\\\"Missing required image id\\\"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,r){t.getImage(this._transformRequest(e,t.ResourceType.Image),r)},n.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},n.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,r){return this.style.setPaintProperty(t,e,r),this._update(!0),this},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},n.prototype._setupContainer=function(){var t=this._container;t.classList.add(\\\"mapboxgl-map\\\"),(this._missingCSSContainer=s.create(\\\"div\\\",\\\"mapboxgl-missing-css\\\",t)).innerHTML=\\\"Missing Mapbox GL JS CSS\\\";var e=this._canvasContainer=s.create(\\\"div\\\",\\\"mapboxgl-canvas-container\\\",t);this._interactive&&e.classList.add(\\\"mapboxgl-interactive\\\"),this._canvas=s.create(\\\"canvas\\\",\\\"mapboxgl-canvas\\\",e),this._canvas.style.position=\\\"absolute\\\",this._canvas.addEventListener(\\\"webglcontextlost\\\",this._contextLost,!1),this._canvas.addEventListener(\\\"webglcontextrestored\\\",this._contextRestored,!1),this._canvas.setAttribute(\\\"tabindex\\\",\\\"0\\\"),this._canvas.setAttribute(\\\"aria-label\\\",\\\"Map\\\");var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var n=this._controlContainer=s.create(\\\"div\\\",\\\"mapboxgl-control-container\\\",t),i=this._controlPositions={};[\\\"top-left\\\",\\\"top-right\\\",\\\"bottom-left\\\",\\\"bottom-right\\\"].forEach(function(t){i[t]=s.create(\\\"div\\\",\\\"mapboxgl-ctrl-\\\"+t,n)})},n.prototype._resizeCanvas=function(e,r){var n=t.default.devicePixelRatio||1;this._canvas.width=n*e,this._canvas.height=n*r,this._canvas.style.width=e+\\\"px\\\",this._canvas.style.height=r+\\\"px\\\"},n.prototype._setupPainter=function(){var r=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},e.webGLContextAttributes),n=this._canvas.getContext(\\\"webgl\\\",r)||this._canvas.getContext(\\\"experimental-webgl\\\",r);n?this.painter=new zr(n,this.transform):this.fire(new t.ErrorEvent(new Error(\\\"Failed to initialize WebGL\\\")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frameId&&(a.cancelFrame(this._frameId),this._frameId=null),this.fire(new t.Event(\\\"webglcontextlost\\\",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event(\\\"webglcontextrestored\\\",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},n.prototype._update=function(t){this.style&&(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender())},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(){this._renderTaskQueue.run();var e=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var r=this.transform.zoom,n=a.now();this.style.zoomHistory.update(r,n);var i=new t.default$16(r,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=i.crossFadingFactor();1===o&&o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(i)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),fadeDuration:this._fadeDuration}),this.fire(new t.Event(\\\"render\\\")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event(\\\"load\\\"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty)&&this._rerender(),this},n.prototype.remove=function(){this._hash&&this._hash.remove(),a.cancelFrame(this._frameId),this._renderTaskQueue.clear(),this._frameId=null,this.setStyle(null),void 0!==t.default&&(t.default.removeEventListener(\\\"resize\\\",this._onWindowResize,!1),t.default.removeEventListener(\\\"online\\\",this._onWindowOnline,!1));var e=this.painter.context.gl.getExtension(\\\"WEBGL_lose_context\\\");e&&e.loseContext(),fn(this._canvasContainer),fn(this._controlContainer),fn(this._missingCSSContainer),this._container.classList.remove(\\\"mapboxgl-map\\\"),this.fire(new t.Event(\\\"remove\\\"))},n.prototype._rerender=function(){var t=this;this.style&&!this._frameId&&(this._frameId=a.frame(function(){t._frameId=null,t._render()}))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},i.showTileBoundaries.get=function(){return!!this._showTileBoundaries},i.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},i.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},i.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},i.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},i.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},i.repaint.get=function(){return!!this._repaint},i.repaint.set=function(t){this._repaint=t,this._update()},i.vertices.get=function(){return!!this._vertices},i.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._onData=function(e){this._update(\\\"style\\\"===e.dataType),this.fire(new t.Event(e.dataType+\\\"data\\\",e))},n.prototype._onDataLoading=function(e){this.fire(new t.Event(e.dataType+\\\"dataloading\\\",e))},Object.defineProperties(n.prototype,i),n}(rn);function fn(t){t.parentNode&&t.parentNode.removeChild(t)}var hn={showCompass:!0,showZoom:!0},pn=function(e){var r=this;this.options=t.extend({},hn,e),this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl mapboxgl-ctrl-group\\\"),this._container.addEventListener(\\\"contextmenu\\\",function(t){return t.preventDefault()}),this.options.showZoom&&(this._zoomInButton=this._createButton(\\\"mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in\\\",\\\"Zoom In\\\",function(){return r._map.zoomIn()}),this._zoomOutButton=this._createButton(\\\"mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out\\\",\\\"Zoom Out\\\",function(){return r._map.zoomOut()})),this.options.showCompass&&(t.bindAll([\\\"_rotateCompassArrow\\\"],this),this._compass=this._createButton(\\\"mapboxgl-ctrl-icon mapboxgl-ctrl-compass\\\",\\\"Reset North\\\",function(){return r._map.resetNorth()}),this._compassArrow=s.create(\\\"span\\\",\\\"mapboxgl-ctrl-compass-arrow\\\",this._compass))};function dn(t,e,r){if(t=new G(t.lng,t.lat),e){var n=new G(t.lng-360,t.lat),i=new G(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(e);r.locationPoint(n).distSqr(e)<a?t=n:r.locationPoint(i).distSqr(e)<a&&(t=i)}for(;Math.abs(t.lng-r.center.lng)>180;){var o=r.locationPoint(t);if(o.x>=0&&o.y>=0&&o.x<=r.width&&o.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}pn.prototype._rotateCompassArrow=function(){var t=\\\"rotate(\\\"+this._map.transform.angle*(180/Math.PI)+\\\"deg)\\\";this._compassArrow.style.transform=t},pn.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&&(this._map.on(\\\"rotate\\\",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Yr(t,{button:\\\"left\\\",element:this._compass}),this._handler.enable()),this._container},pn.prototype.onRemove=function(){s.remove(this._container),this.options.showCompass&&(this._map.off(\\\"rotate\\\",this._rotateCompassArrow),this._handler.disable(),delete this._handler),delete this._map},pn.prototype._createButton=function(t,e,r){var n=s.create(\\\"button\\\",t,this._container);return n.type=\\\"button\\\",n.setAttribute(\\\"aria-label\\\",e),n.addEventListener(\\\"click\\\",r),n};var gn={center:\\\"translate(-50%,-50%)\\\",top:\\\"translate(-50%,0)\\\",\\\"top-left\\\":\\\"translate(0,0)\\\",\\\"top-right\\\":\\\"translate(-100%,0)\\\",bottom:\\\"translate(-50%,-100%)\\\",\\\"bottom-left\\\":\\\"translate(0,-100%)\\\",\\\"bottom-right\\\":\\\"translate(-100%,-100%)\\\",left:\\\"translate(0,-50%)\\\",right:\\\"translate(-100%,-50%)\\\"};function vn(t,e,r){var n=t.classList;for(var i in gn)n.remove(\\\"mapboxgl-\\\"+r+\\\"-anchor-\\\"+i);n.add(\\\"mapboxgl-\\\"+r+\\\"-anchor-\\\"+e)}var mn=function(e){if((arguments[0]instanceof t.default.HTMLElement||2===arguments.length)&&(e=t.extend({element:e},arguments[1])),t.bindAll([\\\"_update\\\",\\\"_onMapClick\\\"],this),this._anchor=e&&e.anchor||\\\"center\\\",this._color=e&&e.color||\\\"#3FB1CE\\\",e&&e.element)this._element=e.element,this._offset=t.default$1.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=s.create(\\\"div\\\");var r=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"svg\\\");r.setAttributeNS(null,\\\"height\\\",\\\"41px\\\"),r.setAttributeNS(null,\\\"width\\\",\\\"27px\\\"),r.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 27 41\\\");var n=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");n.setAttributeNS(null,\\\"stroke\\\",\\\"none\\\"),n.setAttributeNS(null,\\\"stroke-width\\\",\\\"1\\\"),n.setAttributeNS(null,\\\"fill\\\",\\\"none\\\"),n.setAttributeNS(null,\\\"fill-rule\\\",\\\"evenodd\\\");var i=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");i.setAttributeNS(null,\\\"fill-rule\\\",\\\"nonzero\\\");var a=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");a.setAttributeNS(null,\\\"transform\\\",\\\"translate(3.0, 29.0)\\\"),a.setAttributeNS(null,\\\"fill\\\",\\\"#000000\\\");for(var o=0,l=[{rx:\\\"10.5\\\",ry:\\\"5.25002273\\\"},{rx:\\\"10.5\\\",ry:\\\"5.25002273\\\"},{rx:\\\"9.5\\\",ry:\\\"4.77275007\\\"},{rx:\\\"8.5\\\",ry:\\\"4.29549936\\\"},{rx:\\\"7.5\\\",ry:\\\"3.81822308\\\"},{rx:\\\"6.5\\\",ry:\\\"3.34094679\\\"},{rx:\\\"5.5\\\",ry:\\\"2.86367051\\\"},{rx:\\\"4.5\\\",ry:\\\"2.38636864\\\"}];o<l.length;o+=1){var c=l[o],u=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"ellipse\\\");u.setAttributeNS(null,\\\"opacity\\\",\\\"0.04\\\"),u.setAttributeNS(null,\\\"cx\\\",\\\"10.5\\\"),u.setAttributeNS(null,\\\"cy\\\",\\\"5.80029008\\\"),u.setAttributeNS(null,\\\"rx\\\",c.rx),u.setAttributeNS(null,\\\"ry\\\",c.ry),a.appendChild(u)}var f=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");f.setAttributeNS(null,\\\"fill\\\",this._color);var h=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"path\\\");h.setAttributeNS(null,\\\"d\\\",\\\"M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z\\\"),f.appendChild(h);var p=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");p.setAttributeNS(null,\\\"opacity\\\",\\\"0.25\\\"),p.setAttributeNS(null,\\\"fill\\\",\\\"#000000\\\");var d=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"path\\\");d.setAttributeNS(null,\\\"d\\\",\\\"M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z\\\"),p.appendChild(d);var g=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");g.setAttributeNS(null,\\\"transform\\\",\\\"translate(6.0, 7.0)\\\"),g.setAttributeNS(null,\\\"fill\\\",\\\"#FFFFFF\\\");var v=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"g\\\");v.setAttributeNS(null,\\\"transform\\\",\\\"translate(8.0, 8.0)\\\");var m=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"circle\\\");m.setAttributeNS(null,\\\"fill\\\",\\\"#000000\\\"),m.setAttributeNS(null,\\\"opacity\\\",\\\"0.25\\\"),m.setAttributeNS(null,\\\"cx\\\",\\\"5.5\\\"),m.setAttributeNS(null,\\\"cy\\\",\\\"5.5\\\"),m.setAttributeNS(null,\\\"r\\\",\\\"5.4999962\\\");var y=s.createNS(\\\"http://www.w3.org/2000/svg\\\",\\\"circle\\\");y.setAttributeNS(null,\\\"fill\\\",\\\"#FFFFFF\\\"),y.setAttributeNS(null,\\\"cx\\\",\\\"5.5\\\"),y.setAttributeNS(null,\\\"cy\\\",\\\"5.5\\\"),y.setAttributeNS(null,\\\"r\\\",\\\"5.4999962\\\"),v.appendChild(m),v.appendChild(y),i.appendChild(a),i.appendChild(f),i.appendChild(p),i.appendChild(g),i.appendChild(v),r.appendChild(i),this._element.appendChild(r),this._offset=t.default$1.convert(e&&e.offset||[0,-14])}this._element.classList.add(\\\"mapboxgl-marker\\\"),this._popup=null};mn.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(\\\"move\\\",this._update),t.on(\\\"moveend\\\",this._update),this._update(),this._map.on(\\\"click\\\",this._onMapClick),this},mn.prototype.remove=function(){return this._map&&(this._map.off(\\\"click\\\",this._onMapClick),this._map.off(\\\"move\\\",this._update),this._map.off(\\\"moveend\\\",this._update),delete this._map),s.remove(this._element),this._popup&&this._popup.remove(),this},mn.prototype.getLngLat=function(){return this._lngLat},mn.prototype.setLngLat=function(t){return this._lngLat=G.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},mn.prototype.getElement=function(){return this._element},mn.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null),t){if(!(\\\"offset\\\"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],\\\"top-left\\\":[0,0],\\\"top-right\\\":[0,0],bottom:[0,-38.1],\\\"bottom-left\\\":[e,-1*(24.6+e)],\\\"bottom-right\\\":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat)}return this},mn.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},mn.prototype.getPopup=function(){return this._popup},mn.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},mn.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=dn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&\\\"moveend\\\"!==t.type||(this._pos=this._pos.round()),s.setTransform(this._element,gn[this._anchor]+\\\" translate(\\\"+this._pos.x+\\\"px, \\\"+this._pos.y+\\\"px)\\\"),vn(this._element,this._anchor,\\\"marker\\\"))},mn.prototype.getOffset=function(){return this._offset},mn.prototype.setOffset=function(e){return this._offset=t.default$1.convert(e),this._update(),this};var yn,xn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},bn=function(e){function r(r){e.call(this),this.options=t.extend({},xn,r),t.bindAll([\\\"_onSuccess\\\",\\\"_onError\\\",\\\"_finish\\\",\\\"_setupUI\\\",\\\"_updateCamera\\\",\\\"_updateMarker\\\"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(e){var r;return this._map=e,this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl mapboxgl-ctrl-group\\\"),r=this._setupUI,void 0!==yn?r(yn):void 0!==t.default.navigator.permissions?t.default.navigator.permissions.query({name:\\\"geolocation\\\"}).then(function(t){yn=\\\"denied\\\"!==t.state,r(yn)}):(yn=!!t.default.navigator.geolocation,r(yn)),this._container},r.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),s.remove(this._container),this._map=void 0},r.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case\\\"WAITING_ACTIVE\\\":case\\\"ACTIVE_LOCK\\\":case\\\"ACTIVE_ERROR\\\":this._watchState=\\\"ACTIVE_LOCK\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active-error\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active\\\");break;case\\\"BACKGROUND\\\":case\\\"BACKGROUND_ERROR\\\":this._watchState=\\\"BACKGROUND\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background-error\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background\\\")}this.options.showUserLocation&&\\\"OFF\\\"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&\\\"ACTIVE_LOCK\\\"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove(\\\"mapboxgl-user-location-dot-stale\\\"),this.fire(new t.Event(\\\"geolocate\\\",e)),this._finish()},r.prototype._updateCamera=function(t){var e=new G(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy;this._map.fitBounds(e.toBounds(r),this.options.fitBoundsOptions,{geolocateSource:!0})},r.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},r.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState=\\\"OFF\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active-error\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background-error\\\"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case\\\"WAITING_ACTIVE\\\":this._watchState=\\\"ACTIVE_ERROR\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active-error\\\");break;case\\\"ACTIVE_LOCK\\\":this._watchState=\\\"ACTIVE_ERROR\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active-error\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\");break;case\\\"BACKGROUND\\\":this._watchState=\\\"BACKGROUND_ERROR\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background-error\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\")}\\\"OFF\\\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\\\"mapboxgl-user-location-dot-stale\\\"),this.fire(new t.Event(\\\"error\\\",e)),this._finish()},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(e){var r=this;!1!==e&&(this._container.addEventListener(\\\"contextmenu\\\",function(t){return t.preventDefault()}),this._geolocateButton=s.create(\\\"button\\\",\\\"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate\\\",this._container),this._geolocateButton.type=\\\"button\\\",this._geolocateButton.setAttribute(\\\"aria-label\\\",\\\"Geolocate\\\"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\\\"aria-pressed\\\",\\\"false\\\"),this._watchState=\\\"OFF\\\"),this.options.showUserLocation&&(this._dotElement=s.create(\\\"div\\\",\\\"mapboxgl-user-location-dot\\\"),this._userLocationDotMarker=new mn(this._dotElement),this.options.trackUserLocation&&(this._watchState=\\\"OFF\\\")),this._geolocateButton.addEventListener(\\\"click\\\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\\\"movestart\\\",function(e){e.geolocateSource||\\\"ACTIVE_LOCK\\\"!==r._watchState||(r._watchState=\\\"BACKGROUND\\\",r._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background\\\"),r._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),r.fire(new t.Event(\\\"trackuserlocationend\\\")))}))},r.prototype.trigger=function(){if(!this._setup)return t.warnOnce(\\\"Geolocate control triggered before added to a map\\\"),!1;if(this.options.trackUserLocation){switch(this._watchState){case\\\"OFF\\\":this._watchState=\\\"WAITING_ACTIVE\\\",this.fire(new t.Event(\\\"trackuserlocationstart\\\"));break;case\\\"WAITING_ACTIVE\\\":case\\\"ACTIVE_LOCK\\\":case\\\"ACTIVE_ERROR\\\":case\\\"BACKGROUND_ERROR\\\":this._watchState=\\\"OFF\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-active-error\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background\\\"),this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background-error\\\"),this.fire(new t.Event(\\\"trackuserlocationend\\\"));break;case\\\"BACKGROUND\\\":this._watchState=\\\"ACTIVE_LOCK\\\",this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-background\\\"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event(\\\"trackuserlocationstart\\\"))}switch(this._watchState){case\\\"WAITING_ACTIVE\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active\\\");break;case\\\"ACTIVE_LOCK\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active\\\");break;case\\\"ACTIVE_ERROR\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-active-error\\\");break;case\\\"BACKGROUND\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background\\\");break;case\\\"BACKGROUND_ERROR\\\":this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-background-error\\\")}\\\"OFF\\\"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.setAttribute(\\\"aria-pressed\\\",\\\"true\\\"),this._geolocationWatchID=t.default.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.default.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){t.default.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(\\\"mapboxgl-ctrl-geolocate-waiting\\\"),this._geolocateButton.setAttribute(\\\"aria-pressed\\\",\\\"false\\\"),this.options.showUserLocation&&this._updateMarker(null)},r}(t.Evented),_n={maxWidth:100,unit:\\\"metric\\\"},wn=function(e){this.options=t.extend({},_n,e),t.bindAll([\\\"_onMove\\\",\\\"setUnit\\\"],this)};function kn(t,e,r){var n,i,a,o,s,l,c=r&&r.maxWidth||100,u=t._container.clientHeight/2,f=(n=t.unproject([0,u]),i=t.unproject([c,u]),a=Math.PI/180,o=n.lat*a,s=i.lat*a,l=Math.sin(o)*Math.sin(s)+Math.cos(o)*Math.cos(s)*Math.cos((i.lng-n.lng)*a),6371e3*Math.acos(Math.min(l,1)));if(r&&\\\"imperial\\\"===r.unit){var h=3.2808*f;h>5280?Mn(e,c,h/5280,\\\"mi\\\"):Mn(e,c,h,\\\"ft\\\")}else r&&\\\"nautical\\\"===r.unit?Mn(e,c,f/1852,\\\"nm\\\"):Mn(e,c,f,\\\"m\\\")}function Mn(t,e,r,n){var i,a,o,s=(i=r,(a=Math.pow(10,(\\\"\\\"+Math.floor(i)).length-1))*(o=(o=i/a)>=10?10:o>=5?5:o>=3?3:o>=2?2:1)),l=s/r;\\\"m\\\"===n&&s>=1e3&&(s/=1e3,n=\\\"km\\\"),t.style.width=e*l+\\\"px\\\",t.innerHTML=s+n}wn.prototype.getDefaultPosition=function(){return\\\"bottom-left\\\"},wn.prototype._onMove=function(){kn(this._map,this._container,this.options)},wn.prototype.onAdd=function(t){return this._map=t,this._container=s.create(\\\"div\\\",\\\"mapboxgl-ctrl mapboxgl-ctrl-scale\\\",t.getContainer()),this._map.on(\\\"move\\\",this._onMove),this._onMove(),this._container},wn.prototype.onRemove=function(){s.remove(this._container),this._map.off(\\\"move\\\",this._onMove),this._map=void 0},wn.prototype.setUnit=function(t){this.options.unit=t,kn(this._map,this._container,this.options)};var An=function(){this._fullscreen=!1,t.bindAll([\\\"_onClickFullscreen\\\",\\\"_changeIcon\\\"],this),\\\"onfullscreenchange\\\"in t.default.document?this._fullscreenchange=\\\"fullscreenchange\\\":\\\"onmozfullscreenchange\\\"in t.default.document?this._fullscreenchange=\\\"mozfullscreenchange\\\":\\\"onwebkitfullscreenchange\\\"in t.default.document?this._fullscreenchange=\\\"webkitfullscreenchange\\\":\\\"onmsfullscreenchange\\\"in t.default.document&&(this._fullscreenchange=\\\"MSFullscreenChange\\\"),this._className=\\\"mapboxgl-ctrl\\\"};An.prototype.onAdd=function(e){return this._map=e,this._mapContainer=this._map.getContainer(),this._container=s.create(\\\"div\\\",this._className+\\\" mapboxgl-ctrl-group\\\"),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display=\\\"none\\\",t.warnOnce(\\\"This device does not support fullscreen mode.\\\")),this._container},An.prototype.onRemove=function(){s.remove(this._container),this._map=null,t.default.document.removeEventListener(this._fullscreenchange,this._changeIcon)},An.prototype._checkFullscreenSupport=function(){return!!(t.default.document.fullscreenEnabled||t.default.document.mozFullScreenEnabled||t.default.document.msFullscreenEnabled||t.default.document.webkitFullscreenEnabled)},An.prototype._setupUI=function(){var e=this._fullscreenButton=s.create(\\\"button\\\",this._className+\\\"-icon \\\"+this._className+\\\"-fullscreen\\\",this._container);e.setAttribute(\\\"aria-label\\\",\\\"Toggle fullscreen\\\"),e.type=\\\"button\\\",this._fullscreenButton.addEventListener(\\\"click\\\",this._onClickFullscreen),t.default.document.addEventListener(this._fullscreenchange,this._changeIcon)},An.prototype._isFullscreen=function(){return this._fullscreen},An.prototype._changeIcon=function(){(t.default.document.fullscreenElement||t.default.document.mozFullScreenElement||t.default.document.webkitFullscreenElement||t.default.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+\\\"-shrink\\\"),this._fullscreenButton.classList.toggle(this._className+\\\"-fullscreen\\\"))},An.prototype._onClickFullscreen=function(){this._isFullscreen()?t.default.document.exitFullscreen?t.default.document.exitFullscreen():t.default.document.mozCancelFullScreen?t.default.document.mozCancelFullScreen():t.default.document.msExitFullscreen?t.default.document.msExitFullscreen():t.default.document.webkitCancelFullScreen&&t.default.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()};var Tn={closeButton:!0,closeOnClick:!0},Sn=function(e){function r(r){e.call(this),this.options=t.extend(Object.create(Tn),r),t.bindAll([\\\"_update\\\",\\\"_onClickClose\\\"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addTo=function(e){return this._map=e,this._map.on(\\\"move\\\",this._update),this.options.closeOnClick&&this._map.on(\\\"click\\\",this._onClickClose),this._update(),this.fire(new t.Event(\\\"open\\\")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&s.remove(this._content),this._container&&(s.remove(this._container),delete this._container),this._map&&(this._map.off(\\\"move\\\",this._update),this._map.off(\\\"click\\\",this._onClickClose),delete this._map),this.fire(new t.Event(\\\"close\\\")),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=G.convert(t),this._pos=null,this._update(),this},r.prototype.setText=function(e){return this.setDOMContent(t.default.document.createTextNode(e))},r.prototype.setHTML=function(e){var r,n=t.default.document.createDocumentFragment(),i=t.default.document.createElement(\\\"body\\\");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},r.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},r.prototype._createContent=function(){this._content&&s.remove(this._content),this._content=s.create(\\\"div\\\",\\\"mapboxgl-popup-content\\\",this._container),this.options.closeButton&&(this._closeButton=s.create(\\\"button\\\",\\\"mapboxgl-popup-close-button\\\",this._content),this._closeButton.type=\\\"button\\\",this._closeButton.setAttribute(\\\"aria-label\\\",\\\"Close popup\\\"),this._closeButton.innerHTML=\\\"&#215;\\\",this._closeButton.addEventListener(\\\"click\\\",this._onClickClose))},r.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=s.create(\\\"div\\\",\\\"mapboxgl-popup\\\",this._map.getContainer()),this._tip=s.create(\\\"div\\\",\\\"mapboxgl-popup-tip\\\",this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&&(this._lngLat=dn(this._lngLat,this._pos,this._map.transform));var e=this._pos=this._map.project(this._lngLat),r=this.options.anchor,n=function e(r){if(r){if(\\\"number\\\"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.default$1(0,0),top:new t.default$1(0,r),\\\"top-left\\\":new t.default$1(n,n),\\\"top-right\\\":new t.default$1(-n,n),bottom:new t.default$1(0,-r),\\\"bottom-left\\\":new t.default$1(n,-n),\\\"bottom-right\\\":new t.default$1(-n,-n),left:new t.default$1(r,0),right:new t.default$1(-r,0)}}if(r instanceof t.default$1||Array.isArray(r)){var i=t.default$1.convert(r);return{center:i,top:i,\\\"top-left\\\":i,\\\"top-right\\\":i,bottom:i,\\\"bottom-left\\\":i,\\\"bottom-right\\\":i,left:i,right:i}}return{center:t.default$1.convert(r.center||[0,0]),top:t.default$1.convert(r.top||[0,0]),\\\"top-left\\\":t.default$1.convert(r[\\\"top-left\\\"]||[0,0]),\\\"top-right\\\":t.default$1.convert(r[\\\"top-right\\\"]||[0,0]),bottom:t.default$1.convert(r.bottom||[0,0]),\\\"bottom-left\\\":t.default$1.convert(r[\\\"bottom-left\\\"]||[0,0]),\\\"bottom-right\\\":t.default$1.convert(r[\\\"bottom-right\\\"]||[0,0]),left:t.default$1.convert(r.left||[0,0]),right:t.default$1.convert(r.right||[0,0])}}return e(new t.default$1(0,0))}(this.options.offset);if(!r){var i,a=this._container.offsetWidth,o=this._container.offsetHeight;i=e.y+n.bottom.y<o?[\\\"top\\\"]:e.y>this._map.transform.height-o?[\\\"bottom\\\"]:[],e.x<a/2?i.push(\\\"left\\\"):e.x>this._map.transform.width-a/2&&i.push(\\\"right\\\"),r=0===i.length?\\\"bottom\\\":i.join(\\\"-\\\")}var l=e.add(n[r]).round();s.setTransform(this._container,gn[r]+\\\" translate(\\\"+l.x+\\\"px,\\\"+l.y+\\\"px)\\\"),vn(this._container,r,\\\"popup\\\")}},r.prototype._onClickClose=function(){this.remove()},r}(t.Evented),Cn={version:\\\"0.45.0\\\",supported:e,workerCount:Math.max(Math.floor(a.hardwareConcurrency/2),1),setRTLTextPlugin:t.setRTLTextPlugin,Map:un,NavigationControl:pn,GeolocateControl:bn,AttributionControl:nn,ScaleControl:wn,FullscreenControl:An,Popup:Sn,Marker:mn,Style:Je,LngLat:G,LngLatBounds:W,Point:t.default$1,Evented:t.Evented,config:v,get accessToken(){return v.ACCESS_TOKEN},set accessToken(t){v.ACCESS_TOKEN=t},workerUrl:\\\"\\\"};return Cn}),n})}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{}],410:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=1<<t+1,r=new Array(e),n=0;n<e;++n)r[n]=a(t,n);return r};var n=t(\\\"convex-hull\\\");function i(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=0,i===e&&(n[i]+=.5),i===r&&(n[i]+=.5);return n}function a(t,e){if(0===e||e===(1<<t+1)-1)return[];for(var r=[],a=[],o=0;o<=t;++o)if(e&1<<o){r.push(i(t,o-1,o-1)),a.push(null);for(var s=0;s<=t;++s)~e&1<<s&&(r.push(i(t,o-1,s-1)),a.push([o,s]))}var l=n(r),c=[];t:for(o=0;o<l.length;++o){var u=l[o],f=[];for(s=0;s<u.length;++s){if(!a[u[s]])continue t;f.push(a[u[s]].slice())}c.push(f)}return c}},{\\\"convex-hull\\\":118}],411:[function(t,e,r){var n=t(\\\"./normalize\\\"),i=t(\\\"gl-mat4/create\\\"),a=t(\\\"gl-mat4/clone\\\"),o=t(\\\"gl-mat4/determinant\\\"),s=t(\\\"gl-mat4/invert\\\"),l=t(\\\"gl-mat4/transpose\\\"),c={length:t(\\\"gl-vec3/length\\\"),normalize:t(\\\"gl-vec3/normalize\\\"),dot:t(\\\"gl-vec3/dot\\\"),cross:t(\\\"gl-vec3/cross\\\")},u=i(),f=i(),h=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];function g(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}e.exports=function(t,e,r,i,v,m){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),v||(v=[0,0,0,1]),m||(m=[0,0,0,1]),!n(u,t))return!1;if(a(f,u),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(o(f)<1e-8))return!1;var y,x,b,_,w,k,M,A=u[3],T=u[7],S=u[11],C=u[12],E=u[13],L=u[14],z=u[15];if(0!==A||0!==T||0!==S){if(h[0]=A,h[1]=T,h[2]=S,h[3]=z,!s(f,f))return!1;l(f,f),y=v,b=f,_=(x=h)[0],w=x[1],k=x[2],M=x[3],y[0]=b[0]*_+b[4]*w+b[8]*k+b[12]*M,y[1]=b[1]*_+b[5]*w+b[9]*k+b[13]*M,y[2]=b[2]*_+b[6]*w+b[10]*k+b[14]*M,y[3]=b[3]*_+b[7]*w+b[11]*k+b[15]*M}else v[0]=v[1]=v[2]=0,v[3]=1;if(e[0]=C,e[1]=E,e[2]=L,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,u),r[0]=c.length(p[0]),c.normalize(p[0],p[0]),i[0]=c.dot(p[0],p[1]),g(p[1],p[1],p[0],1,-i[0]),r[1]=c.length(p[1]),c.normalize(p[1],p[1]),i[0]/=r[1],i[1]=c.dot(p[0],p[2]),g(p[2],p[2],p[0],1,-i[1]),i[2]=c.dot(p[1],p[2]),g(p[2],p[2],p[1],1,-i[2]),r[2]=c.length(p[2]),c.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],c.cross(d,p[1],p[2]),c.dot(p[0],d)<0)for(var O=0;O<3;O++)r[O]*=-1,p[O][0]*=-1,p[O][1]*=-1,p[O][2]*=-1;return m[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),m[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),m[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),m[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(m[0]=-m[0]),p[0][2]>p[2][0]&&(m[1]=-m[1]),p[1][0]>p[0][1]&&(m[2]=-m[2]),!0}},{\\\"./normalize\\\":412,\\\"gl-mat4/clone\\\":248,\\\"gl-mat4/create\\\":249,\\\"gl-mat4/determinant\\\":250,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/transpose\\\":264,\\\"gl-vec3/cross\\\":317,\\\"gl-vec3/dot\\\":322,\\\"gl-vec3/length\\\":332,\\\"gl-vec3/normalize\\\":339}],412:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],413:[function(t,e,r){var n=t(\\\"gl-vec3/lerp\\\"),i=t(\\\"mat4-recompose\\\"),a=t(\\\"mat4-decompose\\\"),o=t(\\\"gl-mat4/determinant\\\"),s=t(\\\"quat-slerp\\\"),l=f(),c=f(),u=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!h||!p||(n(u.translate,l.translate,c.translate,f),n(u.skew,l.skew,c.skew,f),n(u.scale,l.scale,c.scale,f),n(u.perspective,l.perspective,c.perspective,f),s(u.quaternion,l.quaternion,c.quaternion,f),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{\\\"gl-mat4/determinant\\\":250,\\\"gl-vec3/lerp\\\":333,\\\"mat4-decompose\\\":411,\\\"mat4-recompose\\\":414,\\\"quat-slerp\\\":466}],414:[function(t,e,r){var n={identity:t(\\\"gl-mat4/identity\\\"),translate:t(\\\"gl-mat4/translate\\\"),multiply:t(\\\"gl-mat4/multiply\\\"),create:t(\\\"gl-mat4/create\\\"),scale:t(\\\"gl-mat4/scale\\\"),fromRotationTranslation:t(\\\"gl-mat4/fromRotationTranslation\\\")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{\\\"gl-mat4/create\\\":249,\\\"gl-mat4/fromRotationTranslation\\\":252,\\\"gl-mat4/identity\\\":253,\\\"gl-mat4/multiply\\\":256,\\\"gl-mat4/scale\\\":262,\\\"gl-mat4/translate\\\":263}],415:[function(t,e,r){\\\"use strict\\\";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],416:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"mat4-interpolate\\\"),a=t(\\\"gl-mat4/invert\\\"),o=t(\\\"gl-mat4/rotateX\\\"),s=t(\\\"gl-mat4/rotateY\\\"),l=t(\\\"gl-mat4/rotateZ\\\"),c=t(\\\"gl-mat4/lookAt\\\"),u=t(\\\"gl-mat4/translate\\\"),f=(t(\\\"gl-mat4/scale\\\"),t(\\\"gl-vec3/normalize\\\")),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)h[c]=s[l++];var d=this.nextMatrix;for(c=0;c<16;++c)d[c]=s[l++],p=p&&h[c]===d[c];if(u<1e-6||p)for(c=0;c<16;++c)o[c]=h[c];else i(o,h,d,(t-e[r])/u)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],f(g,g);var v=this.computedInverse;a(v,o);var m=this.computedEye,y=v[15];m[0]=v[12]/y,m[1]=v[13]/y,m[2]=v[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=m[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t<this.lastT())){for(var e=this._components,r=e.length-16,n=0;n<16;++n)e.push(e[r++]);this._time.push(t)}},d.flush=function(t){var e=n.gt(this._time,t)-2;e<0||(this._time.splice(0,e),this._components.splice(0,16*e))},d.lastT=function(){return this._time[this._time.length-1]},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||h,n=n||this.computedUp,this.setMatrix(t,c(this.computedMatrix,e,r,n));for(var i=0,a=0;a<3;++a)i+=Math.pow(r[a]-e[a],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},d.rotate=function(t,e,r,n){this.recalcMatrix(t);var i=this.computedInverse;e&&s(i,i,e),r&&o(i,i,r),n&&l(i,i,n),this.setMatrix(t,a(this.computedMatrix,i))};var g=[0,0,0];d.pan=function(t,e,r,n){g[0]=-(e||0),g[1]=-(r||0),g[2]=-(n||0),this.recalcMatrix(t);var i=this.computedInverse;u(i,i,g),this.setMatrix(t,a(i,i))},d.translate=function(t,e,r,n){g[0]=e||0,g[1]=r||0,g[2]=n||0,this.recalcMatrix(t);var i=this.computedMatrix;u(i,i,g),this.setMatrix(t,i)},d.setMatrix=function(t,e){if(!(t<this.lastT())){this._time.push(t);for(var r=0;r<16;++r)this._components.push(e[r])}},d.setDistance=function(t,e){this.computedRadius[0]=e},d.setDistanceLimits=function(t,e){var r=this._limits;r[0]=t,r[1]=e},d.getDistanceLimits=function(t){var e=this._limits;return t?(t[0]=e[0],t[1]=e[1],t):e}},{\\\"binary-search-bounds\\\":79,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/lookAt\\\":255,\\\"gl-mat4/rotateX\\\":259,\\\"gl-mat4/rotateY\\\":260,\\\"gl-mat4/rotateZ\\\":261,\\\"gl-mat4/scale\\\":262,\\\"gl-mat4/translate\\\":263,\\\"gl-vec3/normalize\\\":339,\\\"mat4-interpolate\\\":413}],417:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.length;if(e<3){for(var r=new Array(e),i=0;i<e;++i)r[i]=i;return 2===e&&t[0][0]===t[1][0]&&t[0][1]===t[1][1]?[0]:r}for(var a=new Array(e),i=0;i<e;++i)a[i]=i;a.sort(function(e,r){var n=t[e][0]-t[r][0];return n||t[e][1]-t[r][1]});for(var o=[a[0],a[1]],s=[a[0],a[1]],i=2;i<e;++i){for(var l=a[i],c=t[l],u=o.length;u>1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),f=0,i=0,h=o.length;i<h;++i)r[f++]=o[i];for(var p=s.length-2;p>0;--p)r[f++]=s[p];return r};var n=t(\\\"robust-orientation\\\")[3]},{\\\"robust-orientation\\\":486}],418:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return\\\"altKey\\\"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),\\\"shiftKey\\\"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),\\\"ctrlKey\\\"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),\\\"metaKey\\\"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),u=n.y(s);\\\"buttons\\\"in s&&(t=0|s.buttons),(t!==r||c!==i||u!==a||l(s))&&(r=0|t,i=c||0,a=u||0,e&&e(r,i,a,o))}function u(t){c(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function g(t){c(r&~n.buttons(t),t)}function v(){s||(s=!0,t.addEventListener(\\\"mousemove\\\",p),t.addEventListener(\\\"mousedown\\\",d),t.addEventListener(\\\"mouseup\\\",g),t.addEventListener(\\\"mouseleave\\\",u),t.addEventListener(\\\"mouseenter\\\",u),t.addEventListener(\\\"mouseout\\\",u),t.addEventListener(\\\"mouseover\\\",u),t.addEventListener(\\\"blur\\\",f),t.addEventListener(\\\"keyup\\\",h),t.addEventListener(\\\"keydown\\\",h),t.addEventListener(\\\"keypress\\\",h),t!==window&&(window.addEventListener(\\\"blur\\\",f),window.addEventListener(\\\"keyup\\\",h),window.addEventListener(\\\"keydown\\\",h),window.addEventListener(\\\"keypress\\\",h)))}v();var m={element:t};return Object.defineProperties(m,{enabled:{get:function(){return s},set:function(e){e?v():s&&(s=!1,t.removeEventListener(\\\"mousemove\\\",p),t.removeEventListener(\\\"mousedown\\\",d),t.removeEventListener(\\\"mouseup\\\",g),t.removeEventListener(\\\"mouseleave\\\",u),t.removeEventListener(\\\"mouseenter\\\",u),t.removeEventListener(\\\"mouseout\\\",u),t.removeEventListener(\\\"mouseover\\\",u),t.removeEventListener(\\\"blur\\\",f),t.removeEventListener(\\\"keyup\\\",h),t.removeEventListener(\\\"keydown\\\",h),t.removeEventListener(\\\"keypress\\\",h),t!==window&&(window.removeEventListener(\\\"blur\\\",f),window.removeEventListener(\\\"keyup\\\",h),window.removeEventListener(\\\"keydown\\\",h),window.removeEventListener(\\\"keypress\\\",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),m};var n=t(\\\"mouse-event\\\")},{\\\"mouse-event\\\":420}],419:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,a=t.clientY||0,o=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=i-o.left,r[1]=a-o.top,r}},{}],420:[function(t,e,r){\\\"use strict\\\";function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if(\\\"object\\\"==typeof t){if(\\\"buttons\\\"in t)return t.buttons;if(\\\"which\\\"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<<e-1}else if(\\\"button\\\"in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e>=0)return 1<<e}}return 0},r.element=n,r.x=function(t){if(\\\"object\\\"==typeof t){if(\\\"offsetX\\\"in t)return t.offsetX;var e=n(t).getBoundingClientRect();return t.clientX-e.left}return 0},r.y=function(t){if(\\\"object\\\"==typeof t){if(\\\"offsetY\\\"in t)return t.offsetY;var e=n(t).getBoundingClientRect();return t.clientY-e.top}return 0}},{}],421:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"to-px\\\");e.exports=function(t,e,r){\\\"function\\\"==typeof t&&(r=!!e,e=t,t=window);var i=n(\\\"ex\\\",t),a=function(t){r&&t.preventDefault();var n=t.deltaX||0,a=t.deltaY||0,o=t.deltaZ||0,s=t.deltaMode,l=1;switch(s){case 1:l=i;break;case 2:l=window.innerHeight}if(a*=l,o*=l,(n*=l)||a||o)return e(n,a,o,t)};return t.addEventListener(\\\"wheel\\\",a),a}},{\\\"to-px\\\":516}],422:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"typedarray-pool\\\");function i(t){return\\\"a\\\"+t}function a(t){return\\\"d\\\"+t}function o(t,e){return\\\"c\\\"+t+\\\"_\\\"+e}function s(t){return\\\"s\\\"+t}function l(t,e){return\\\"t\\\"+t+\\\"_\\\"+e}function c(t){return\\\"o\\\"+t}function u(t){return\\\"x\\\"+t}function f(t){return\\\"p\\\"+t}function h(t,e){return\\\"d\\\"+t+\\\"_\\\"+e}function p(t){return\\\"i\\\"+t}function d(t,e){return\\\"u\\\"+t+\\\"_\\\"+e}function g(t){return\\\"b\\\"+t}function v(t){return\\\"y\\\"+t}function m(t){return\\\"e\\\"+t}function y(t){return\\\"v\\\"+t}e.exports=function(t){function e(t){throw new Error(\\\"ndarray-extract-contour: \\\"+t)}\\\"object\\\"!=typeof t&&e(\\\"Must specify arguments\\\");var r=t.order;Array.isArray(r)||e(\\\"Must specify order\\\");var T=t.arrayArguments||1;T<1&&e(\\\"Must have at least one array argument\\\");var S=t.scalarArguments||0;S<0&&e(\\\"Scalar arg count must be > 0\\\");\\\"function\\\"!=typeof t.vertex&&e(\\\"Must specify vertex creation function\\\");\\\"function\\\"!=typeof t.cell&&e(\\\"Must specify cell creation function\\\");\\\"function\\\"!=typeof t.phase&&e(\\\"Must specify phase function\\\");for(var C=t.getters||[],E=new Array(T),L=0;L<T;++L)C.indexOf(L)>=0?E[L]=!0:E[L]=!1;return function(t,e,r,T,S,C){var E=C.length,L=S.length;if(L<2)throw new Error(\\\"ndarray-extract-contour: Dimension must be at least 2\\\");for(var z=\\\"extractContour\\\"+S.join(\\\"_\\\"),O=[],I=[],P=[],D=0;D<E;++D)P.push(i(D));for(var D=0;D<T;++D)P.push(u(D));for(var D=0;D<L;++D)I.push(s(D)+\\\"=\\\"+i(0)+\\\".shape[\\\"+D+\\\"]|0\\\");for(var D=0;D<E;++D){I.push(a(D)+\\\"=\\\"+i(D)+\\\".data\\\",c(D)+\\\"=\\\"+i(D)+\\\".offset|0\\\");for(var R=0;R<L;++R)I.push(l(D,R)+\\\"=\\\"+i(D)+\\\".stride[\\\"+R+\\\"]|0\\\")}for(var D=0;D<E;++D){I.push(f(D)+\\\"=\\\"+c(D)),I.push(o(D,0));for(var R=1;R<1<<L;++R){for(var B=[],F=0;F<L;++F)R&1<<F&&B.push(\\\"-\\\"+l(D,F));I.push(h(D,R)+\\\"=(\\\"+B.join(\\\"\\\")+\\\")|0\\\"),I.push(o(D,R)+\\\"=0\\\")}}for(var D=0;D<E;++D)for(var R=0;R<L;++R){var N=[l(D,S[R])];R>0&&N.push(l(D,S[R-1])+\\\"*\\\"+s(S[R-1])),I.push(d(D,S[R])+\\\"=(\\\"+N.join(\\\"-\\\")+\\\")|0\\\")}for(var D=0;D<L;++D)I.push(p(D)+\\\"=0\\\");I.push(_+\\\"=0\\\");for(var j=[\\\"2\\\"],D=L-2;D>=0;--D)j.push(s(S[D]));I.push(w+\\\"=(\\\"+j.join(\\\"*\\\")+\\\")|0\\\",b+\\\"=mallocUint32(\\\"+w+\\\")\\\",x+\\\"=mallocUint32(\\\"+w+\\\")\\\",k+\\\"=0\\\"),I.push(g(0)+\\\"=0\\\");for(var R=1;R<1<<L;++R){for(var V=[],U=[],F=0;F<L;++F)R&1<<F&&(0===U.length?V.push(\\\"1\\\"):V.unshift(U.join(\\\"*\\\"))),U.push(s(S[F]));var q=\\\"\\\";V[0].indexOf(s(S[L-2]))<0&&(q=\\\"-\\\");var H=A(L,R,S);I.push(m(H)+\\\"=(-\\\"+V.join(\\\"-\\\")+\\\")|0\\\",v(H)+\\\"=(\\\"+q+V.join(\\\"-\\\")+\\\")|0\\\",g(H)+\\\"=0\\\")}function G(t,e){O.push(\\\"for(\\\",p(S[t]),\\\"=\\\",e,\\\";\\\",p(S[t]),\\\"<\\\",s(S[t]),\\\";\\\",\\\"++\\\",p(S[t]),\\\"){\\\")}function W(t){for(var e=0;e<E;++e)O.push(f(e),\\\"+=\\\",d(e,S[t]),\\\";\\\");O.push(\\\"}\\\")}function Y(){for(var t=1;t<1<<L;++t)O.push(M,\\\"=\\\",m(t),\\\";\\\",m(t),\\\"=\\\",v(t),\\\";\\\",v(t),\\\"=\\\",M,\\\";\\\")}I.push(y(0)+\\\"=0\\\",M+\\\"=0\\\"),function t(e,r){if(e<0)return void function(t){for(var e=0;e<E;++e)C[e]?O.push(o(e,0),\\\"=\\\",a(e),\\\".get(\\\",f(e),\\\");\\\"):O.push(o(e,0),\\\"=\\\",a(e),\\\"[\\\",f(e),\\\"];\\\");for(var r=[],e=0;e<E;++e)r.push(o(e,0));for(var e=0;e<T;++e)r.push(u(e));O.push(g(0),\\\"=\\\",b,\\\"[\\\",k,\\\"]=phase(\\\",r.join(),\\\");\\\");for(var n=1;n<1<<L;++n)O.push(g(n),\\\"=\\\",b,\\\"[\\\",k,\\\"+\\\",m(n),\\\"];\\\");for(var i=[],n=1;n<1<<L;++n)i.push(\\\"(\\\"+g(0)+\\\"!==\\\"+g(n)+\\\")\\\");O.push(\\\"if(\\\",i.join(\\\"||\\\"),\\\"){\\\");for(var s=[],e=0;e<L;++e)s.push(p(e));for(var e=0;e<E;++e){s.push(o(e,0));for(var n=1;n<1<<L;++n)C[e]?O.push(o(e,n),\\\"=\\\",a(e),\\\".get(\\\",f(e),\\\"+\\\",h(e,n),\\\");\\\"):O.push(o(e,n),\\\"=\\\",a(e),\\\"[\\\",f(e),\\\"+\\\",h(e,n),\\\"];\\\"),s.push(o(e,n))}for(var e=0;e<1<<L;++e)s.push(g(e));for(var e=0;e<T;++e)s.push(u(e));O.push(\\\"vertex(\\\",s.join(),\\\");\\\",y(0),\\\"=\\\",x,\\\"[\\\",k,\\\"]=\\\",_,\\\"++;\\\");for(var l=(1<<L)-1,c=g(l),n=0;n<L;++n)if(0==(t&~(1<<n))){for(var d=l^1<<n,v=g(d),w=[],M=d;M>0;M=M-1&d)w.push(x+\\\"[\\\"+k+\\\"+\\\"+m(M)+\\\"]\\\");w.push(y(0));for(var M=0;M<E;++M)1&n?w.push(o(M,l),o(M,d)):w.push(o(M,d),o(M,l));1&n?w.push(c,v):w.push(v,c);for(var M=0;M<T;++M)w.push(u(M));O.push(\\\"if(\\\",c,\\\"!==\\\",v,\\\"){\\\",\\\"face(\\\",w.join(),\\\")}\\\")}O.push(\\\"}\\\",k,\\\"+=1;\\\")}(r);!function(t){for(var e=t-1;e>=0;--e)G(e,0);for(var r=[],e=0;e<E;++e)C[e]?r.push(a(e)+\\\".get(\\\"+f(e)+\\\")\\\"):r.push(a(e)+\\\"[\\\"+f(e)+\\\"]\\\");for(var e=0;e<T;++e)r.push(u(e));O.push(b,\\\"[\\\",k,\\\"++]=phase(\\\",r.join(),\\\");\\\");for(var e=0;e<t;++e)W(e);for(var n=0;n<E;++n)O.push(f(n),\\\"+=\\\",d(n,S[t]),\\\";\\\")}(e);O.push(\\\"if(\\\",s(S[e]),\\\">0){\\\",p(S[e]),\\\"=1;\\\");t(e-1,r|1<<S[e]);for(var n=0;n<E;++n)O.push(f(n),\\\"+=\\\",d(n,S[e]),\\\";\\\");e===L-1&&(O.push(k,\\\"=0;\\\"),Y());G(e,2);t(e-1,r);e===L-1&&(O.push(\\\"if(\\\",p(S[L-1]),\\\"&1){\\\",k,\\\"=0;}\\\"),Y());W(e);O.push(\\\"}\\\")}(L-1,0),O.push(\\\"freeUint32(\\\",x,\\\");freeUint32(\\\",b,\\\");\\\");var X=[\\\"'use strict';\\\",\\\"function \\\",z,\\\"(\\\",P.join(),\\\"){\\\",\\\"var \\\",I.join(),\\\";\\\",O.join(\\\"\\\"),\\\"}\\\",\\\"return \\\",z].join(\\\"\\\");return new Function(\\\"vertex\\\",\\\"face\\\",\\\"phase\\\",\\\"mallocUint32\\\",\\\"freeUint32\\\",X)(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,S,r,E)};var x=\\\"V\\\",b=\\\"P\\\",_=\\\"N\\\",w=\\\"Q\\\",k=\\\"X\\\",M=\\\"T\\\";function A(t,e,r){for(var n=0,i=0;i<t;++i)e&1<<i&&(n|=1<<r[i]);return n}},{\\\"typedarray-pool\\\":522}],423:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\"],pre:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},body:{body:\\\"{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_1_arg2_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"cwise\\\",blockSize:64});e.exports=function(t,e){return n(t,e),t}},{\\\"cwise/lib/wrapper\\\":137}],424:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){if(Array.isArray(r)){if(r.length!==e.dimension)throw new Error(\\\"ndarray-gradient: invalid boundary conditions\\\")}else r=n(e.dimension,\\\"string\\\"==typeof r?r:\\\"clamp\\\");if(t.dimension!==e.dimension+1)throw new Error(\\\"ndarray-gradient: output dimension must be +1 input dimension\\\");if(t.shape[e.dimension]!==e.dimension)throw new Error(\\\"ndarray-gradient: output shape must match input shape\\\");for(var i=0;i<e.dimension;++i)if(t.shape[i]!==e.shape[i])throw new Error(\\\"ndarray-gradient: shape mismatch\\\");if(0===e.size)return t;if(e.dimension<=0)return t.set(0),t;return function(t){var e=t.join();if(m=o[e])return m;var r=t.length,n=[\\\"function gradient(dst,src){var s=src.shape.slice();\\\"];function i(e){for(var i=r-e.length,a=[],o=[],s=[],l=0;l<r;++l)e.indexOf(l+1)>=0?s.push(\\\"0\\\"):e.indexOf(-(l+1))>=0?s.push(\\\"s[\\\"+l+\\\"]-1\\\"):(s.push(\\\"-1\\\"),a.push(\\\"1\\\"),o.push(\\\"s[\\\"+l+\\\"]-2\\\"));var c=\\\".lo(\\\"+a.join()+\\\").hi(\\\"+o.join()+\\\")\\\";if(0===a.length&&(c=\\\"\\\"),i>0){n.push(\\\"if(1\\\");for(var l=0;l<r;++l)e.indexOf(l+1)>=0||e.indexOf(-(l+1))>=0||n.push(\\\"&&s[\\\",l,\\\"]>2\\\");n.push(\\\"){grad\\\",i,\\\"(src.pick(\\\",s.join(),\\\")\\\",c);for(var l=0;l<r;++l)e.indexOf(l+1)>=0||e.indexOf(-(l+1))>=0||n.push(\\\",dst.pick(\\\",s.join(),\\\",\\\",l,\\\")\\\",c);n.push(\\\");\\\")}for(var l=0;l<e.length;++l){var u=Math.abs(e[l])-1,f=\\\"dst.pick(\\\"+s.join()+\\\",\\\"+u+\\\")\\\"+c;switch(t[u]){case\\\"clamp\\\":var h=s.slice(),p=s.slice();e[l]<0?h[u]=\\\"s[\\\"+u+\\\"]-2\\\":p[u]=\\\"1\\\",0===i?n.push(\\\"if(s[\\\",u,\\\"]>1){dst.set(\\\",s.join(),\\\",\\\",u,\\\",0.5*(src.get(\\\",h.join(),\\\")-src.get(\\\",p.join(),\\\")))}else{dst.set(\\\",s.join(),\\\",\\\",u,\\\",0)};\\\"):n.push(\\\"if(s[\\\",u,\\\"]>1){diff(\\\",f,\\\",src.pick(\\\",h.join(),\\\")\\\",c,\\\",src.pick(\\\",p.join(),\\\")\\\",c,\\\");}else{zero(\\\",f,\\\");};\\\");break;case\\\"mirror\\\":0===i?n.push(\\\"dst.set(\\\",s.join(),\\\",\\\",u,\\\",0);\\\"):n.push(\\\"zero(\\\",f,\\\");\\\");break;case\\\"wrap\\\":var d=s.slice(),g=s.slice();e[l]<0?(d[u]=\\\"s[\\\"+u+\\\"]-2\\\",g[u]=\\\"0\\\"):(d[u]=\\\"s[\\\"+u+\\\"]-1\\\",g[u]=\\\"1\\\"),0===i?n.push(\\\"if(s[\\\",u,\\\"]>2){dst.set(\\\",s.join(),\\\",\\\",u,\\\",0.5*(src.get(\\\",d.join(),\\\")-src.get(\\\",g.join(),\\\")))}else{dst.set(\\\",s.join(),\\\",\\\",u,\\\",0)};\\\"):n.push(\\\"if(s[\\\",u,\\\"]>2){diff(\\\",f,\\\",src.pick(\\\",d.join(),\\\")\\\",c,\\\",src.pick(\\\",g.join(),\\\")\\\",c,\\\");}else{zero(\\\",f,\\\");};\\\");break;default:throw new Error(\\\"ndarray-gradient: Invalid boundary condition\\\")}}i>0&&n.push(\\\"};\\\")}for(var s=0;s<1<<r;++s){for(var f=[],h=0;h<r;++h)s&1<<h&&f.push(h+1);for(var p=0;p<1<<f.length;++p){for(var d=f.slice(),h=0;h<f.length;++h)p&1<<h&&(d[h]=-d[h]);i(d)}}n.push(\\\"return dst;};return gradient\\\");for(var g=[\\\"diff\\\",\\\"zero\\\"],v=[l,c],s=1;s<=r;++s)g.push(\\\"grad\\\"+s),v.push(u(s));g.push(n.join(\\\"\\\"));var m=Function.apply(void 0,g).apply(void 0,v);return a[e]=m,m}(r)(t,e)};var n=t(\\\"dup\\\"),i=t(\\\"cwise-compiler\\\"),a={},o={},s={body:\\\"\\\",args:[],thisVars:[],localVars:[]},l=i({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],pre:s,post:s,body:{args:[{name:\\\"out\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"left\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"right\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"out=0.5*(left-right)\\\",thisVars:[],localVars:[]},funcName:\\\"cdiff\\\"}),c=i({args:[\\\"array\\\"],pre:s,post:s,body:{args:[{name:\\\"out\\\",lvalue:!0,rvalue:!1,count:1}],body:\\\"out=0\\\",thisVars:[],localVars:[]},funcName:\\\"zero\\\"});function u(t){if(t in a)return a[t];for(var e=[],r=0;r<t;++r)e.push(\\\"out\\\",r,\\\"s=0.5*(inp\\\",r,\\\"l-inp\\\",r,\\\"r);\\\");var o=[\\\"array\\\"],l=[\\\"junk\\\"];for(r=0;r<t;++r){o.push(\\\"array\\\"),l.push(\\\"out\\\"+r+\\\"s\\\");var c=n(t);c[r]=-1,o.push({array:0,offset:c.slice()}),c[r]=1,o.push({array:0,offset:c.slice()}),l.push(\\\"inp\\\"+r+\\\"l\\\",\\\"inp\\\"+r+\\\"r\\\")}return a[t]=i({args:o,pre:s,post:s,body:{body:e.join(\\\"\\\"),args:l.map(function(t){return{name:t,lvalue:0===t.indexOf(\\\"out\\\"),rvalue:0===t.indexOf(\\\"inp\\\"),count:\\\"junk\\\"!==t|0}}),thisVars:[],localVars:[]},funcName:\\\"fdTemplate\\\"+t})}},{\\\"cwise-compiler\\\":134,dup:155}],425:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"ndarray-warp\\\"),i=t(\\\"gl-matrix-invert\\\");e.exports=function(t,e,r){var a=e.dimension,o=i([],r);return n(t,e,function(t,e){for(var r=0;r<a;++r){t[r]=o[(a+1)*a+r];for(var n=0;n<a;++n)t[r]+=o[(a+1)*n+r]*e[n]}var i=o[(a+1)*(a+1)-1];for(n=0;n<a;++n)i+=o[(a+1)*n+a]*e[n];var s=1/i;for(r=0;r<a;++r)t[r]*=s;return t}),t}},{\\\"gl-matrix-invert\\\":265,\\\"ndarray-warp\\\":432}],426:[function(t,e,r){\\\"use strict\\\";function n(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r<t.shape[0],a=0<=r+1&&r+1<t.shape[0];return(1-n)*(i?+t.get(r):0)+n*(a?+t.get(r+1):0)}function i(t,e,r){var n=Math.floor(e),i=e-n,a=0<=n&&n<t.shape[0],o=0<=n+1&&n+1<t.shape[0],s=Math.floor(r),l=r-s,c=0<=s&&s<t.shape[1],u=0<=s+1&&s+1<t.shape[1],f=a&&c?t.get(n,s):0,h=a&&u?t.get(n,s+1):0;return(1-l)*((1-i)*f+i*(o&&c?t.get(n+1,s):0))+l*((1-i)*h+i*(o&&u?t.get(n+1,s+1):0))}function a(t,e,r,n){var i=Math.floor(e),a=e-i,o=0<=i&&i<t.shape[0],s=0<=i+1&&i+1<t.shape[0],l=Math.floor(r),c=r-l,u=0<=l&&l<t.shape[1],f=0<=l+1&&l+1<t.shape[1],h=Math.floor(n),p=n-h,d=0<=h&&h<t.shape[2],g=0<=h+1&&h+1<t.shape[2],v=o&&u&&d?t.get(i,l,h):0,m=o&&f&&d?t.get(i,l+1,h):0,y=s&&u&&d?t.get(i+1,l,h):0,x=s&&f&&d?t.get(i+1,l+1,h):0,b=o&&u&&g?t.get(i,l,h+1):0,_=o&&f&&g?t.get(i,l+1,h+1):0;return(1-p)*((1-c)*((1-a)*v+a*y)+c*((1-a)*m+a*x))+p*((1-c)*((1-a)*b+a*(s&&u&&g?t.get(i+1,l,h+1):0))+c*((1-a)*_+a*(s&&f&&g?t.get(i+1,l+1,h+1):0)))}e.exports=function(t,e,r,o){switch(t.shape.length){case 0:return 0;case 1:return n(t,e);case 2:return i(t,e,r);case 3:return a(t,e,r,o);default:return function(t){var e,r,n=0|t.shape.length,i=new Array(n),a=new Array(n),o=new Array(n),s=new Array(n);for(e=0;e<n;++e)r=+arguments[e+1],i[e]=Math.floor(r),a[e]=r-i[e],o[e]=0<=i[e]&&i[e]<t.shape[e],s[e]=0<=i[e]+1&&i[e]+1<t.shape[e];var l,c,u,f=0;t:for(e=0;e<1<<n;++e){for(c=1,u=t.offset,l=0;l<n;++l)if(e&1<<l){if(!s[l])continue t;c*=a[l],u+=t.stride[l]*(i[l]+1)}else{if(!o[l])continue t;c*=1-a[l],u+=t.stride[l]*i[l]}f+=c*t.data[u]}return f}.apply(void 0,arguments)}},e.exports.d1=n,e.exports.d2=i,e.exports.d3=a},{}],427:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"cwise-compiler\\\"),i={body:\\\"\\\",args:[],thisVars:[],localVars:[]};function a(t){if(!t)return i;for(var e=0;e<t.args.length;++e){var r=t.args[e];t.args[e]=0===e?{name:r,lvalue:!0,rvalue:!!t.rvalue,count:t.count||1}:{name:r,lvalue:!1,rvalue:!0,count:1}}return t.thisVars||(t.thisVars=[]),t.localVars||(t.localVars=[]),t}function o(t){for(var e=[],r=0;r<t.args.length;++r)e.push(\\\"a\\\"+r);return new Function(\\\"P\\\",[\\\"return function \\\",t.funcName,\\\"_ndarrayops(\\\",e.join(\\\",\\\"),\\\") {P(\\\",e.join(\\\",\\\"),\\\");return a0}\\\"].join(\\\"\\\"))(function(t){return n({args:t.args,pre:a(t.pre),body:a(t.body),post:a(t.proc),funcName:t.funcName})}(t))}var s={add:\\\"+\\\",sub:\\\"-\\\",mul:\\\"*\\\",div:\\\"/\\\",mod:\\\"%\\\",band:\\\"&\\\",bor:\\\"|\\\",bxor:\\\"^\\\",lshift:\\\"<<\\\",rshift:\\\">>\\\",rrshift:\\\">>>\\\"};!function(){for(var t in s){var e=s[t];r[t]=o({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=b\\\"+e+\\\"c\\\"},funcName:t}),r[t+\\\"eq\\\"]=o({args:[\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a\\\"+e+\\\"=b\\\"},rvalue:!0,funcName:t+\\\"eq\\\"}),r[t+\\\"s\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"b\\\",\\\"s\\\"],body:\\\"a=b\\\"+e+\\\"s\\\"},funcName:t+\\\"s\\\"}),r[t+\\\"seq\\\"]=o({args:[\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"s\\\"],body:\\\"a\\\"+e+\\\"=s\\\"},rvalue:!0,funcName:t+\\\"seq\\\"})}}();var l={not:\\\"!\\\",bnot:\\\"~\\\",neg:\\\"-\\\",recip:\\\"1.0/\\\"};!function(){for(var t in l){var e=l[t];r[t]=o({args:[\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=\\\"+e+\\\"b\\\"},funcName:t}),r[t+\\\"eq\\\"]=o({args:[\\\"array\\\"],body:{args:[\\\"a\\\"],body:\\\"a=\\\"+e+\\\"a\\\"},rvalue:!0,count:2,funcName:t+\\\"eq\\\"})}}();var c={and:\\\"&&\\\",or:\\\"||\\\",eq:\\\"===\\\",neq:\\\"!==\\\",lt:\\\"<\\\",gt:\\\">\\\",leq:\\\"<=\\\",geq:\\\">=\\\"};!function(){for(var t in c){var e=c[t];r[t]=o({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=b\\\"+e+\\\"c\\\"},funcName:t}),r[t+\\\"s\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"b\\\",\\\"s\\\"],body:\\\"a=b\\\"+e+\\\"s\\\"},funcName:t+\\\"s\\\"}),r[t+\\\"eq\\\"]=o({args:[\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=a\\\"+e+\\\"b\\\"},rvalue:!0,count:2,funcName:t+\\\"eq\\\"}),r[t+\\\"seq\\\"]=o({args:[\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"s\\\"],body:\\\"a=a\\\"+e+\\\"s\\\"},rvalue:!0,count:2,funcName:t+\\\"seq\\\"})}}();var u=[\\\"abs\\\",\\\"acos\\\",\\\"asin\\\",\\\"atan\\\",\\\"ceil\\\",\\\"cos\\\",\\\"exp\\\",\\\"floor\\\",\\\"log\\\",\\\"round\\\",\\\"sin\\\",\\\"sqrt\\\",\\\"tan\\\"];!function(){for(var t=0;t<u.length;++t){var e=u[t];r[e]=o({args:[\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(b)\\\",thisVars:[\\\"this_f\\\"]},funcName:e}),r[e+\\\"eq\\\"]=o({args:[\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\"],body:\\\"a=this_f(a)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"eq\\\"})}}();var f=[\\\"max\\\",\\\"min\\\",\\\"atan2\\\",\\\"pow\\\"];!function(){for(var t=0;t<f.length;++t){var e=f[t];r[e]=o({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=this_f(b,c)\\\",thisVars:[\\\"this_f\\\"]},funcName:e}),r[e+\\\"s\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"scalar\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=this_f(b,c)\\\",thisVars:[\\\"this_f\\\"]},funcName:e+\\\"s\\\"}),r[e+\\\"eq\\\"]=o({args:[\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(a,b)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"eq\\\"}),r[e+\\\"seq\\\"]=o({args:[\\\"array\\\",\\\"scalar\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(a,b)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"seq\\\"})}}();var h=[\\\"atan2\\\",\\\"pow\\\"];!function(){for(var t=0;t<h.length;++t){var e=h[t];r[e+\\\"op\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=this_f(c,b)\\\",thisVars:[\\\"this_f\\\"]},funcName:e+\\\"op\\\"}),r[e+\\\"ops\\\"]=o({args:[\\\"array\\\",\\\"array\\\",\\\"scalar\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],body:\\\"a=this_f(c,b)\\\",thisVars:[\\\"this_f\\\"]},funcName:e+\\\"ops\\\"}),r[e+\\\"opeq\\\"]=o({args:[\\\"array\\\",\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(b,a)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"opeq\\\"}),r[e+\\\"opseq\\\"]=o({args:[\\\"array\\\",\\\"scalar\\\"],pre:{args:[],body:\\\"this_f=Math.\\\"+e,thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=this_f(b,a)\\\",thisVars:[\\\"this_f\\\"]},rvalue:!0,count:2,funcName:e+\\\"opseq\\\"})}}(),r.any=n({args:[\\\"array\\\"],pre:i,body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"if(a){return true}\\\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\\\"return false\\\"},funcName:\\\"any\\\"}),r.all=n({args:[\\\"array\\\"],pre:i,body:{args:[{name:\\\"x\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"if(!x){return false}\\\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\\\"return true\\\"},funcName:\\\"all\\\"}),r.sum=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"this_s+=a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"sum\\\"}),r.prod=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=1\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"this_s*=a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"prod\\\"}),r.norm2squared=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:2}],body:\\\"this_s+=a*a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"norm2squared\\\"}),r.norm2=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:2}],body:\\\"this_s+=a*a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return Math.sqrt(this_s)\\\"},funcName:\\\"norm2\\\"}),r.norminf=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:4}],body:\\\"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"norminf\\\"}),r.norm1=n({args:[\\\"array\\\"],pre:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"this_s=0\\\"},body:{args:[{name:\\\"a\\\",lvalue:!1,rvalue:!0,count:3}],body:\\\"this_s+=a<0?-a:a\\\",localVars:[],thisVars:[\\\"this_s\\\"]},post:{args:[],localVars:[],thisVars:[\\\"this_s\\\"],body:\\\"return this_s\\\"},funcName:\\\"norm1\\\"}),r.sup=n({args:[\\\"array\\\"],pre:{body:\\\"this_h=-Infinity\\\",args:[],thisVars:[\\\"this_h\\\"],localVars:[]},body:{body:\\\"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:2}],thisVars:[\\\"this_h\\\"],localVars:[]},post:{body:\\\"return this_h\\\",args:[],thisVars:[\\\"this_h\\\"],localVars:[]}}),r.inf=n({args:[\\\"array\\\"],pre:{body:\\\"this_h=Infinity\\\",args:[],thisVars:[\\\"this_h\\\"],localVars:[]},body:{body:\\\"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:2}],thisVars:[\\\"this_h\\\"],localVars:[]},post:{body:\\\"return this_h\\\",args:[],thisVars:[\\\"this_h\\\"],localVars:[]}}),r.argmin=n({args:[\\\"index\\\",\\\"array\\\",\\\"shape\\\"],pre:{body:\\\"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}\\\",args:[{name:\\\"_inline_0_arg0_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_0_arg1_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_0_arg2_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_i\\\",\\\"this_v\\\"],localVars:[]},body:{body:\\\"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:2},{name:\\\"_inline_1_arg1_\\\",lvalue:!1,rvalue:!0,count:2}],thisVars:[\\\"this_i\\\",\\\"this_v\\\"],localVars:[\\\"_inline_1_k\\\"]},post:{body:\\\"{return this_i}\\\",args:[],thisVars:[\\\"this_i\\\"],localVars:[]}}),r.argmax=n({args:[\\\"index\\\",\\\"array\\\",\\\"shape\\\"],pre:{body:\\\"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}\\\",args:[{name:\\\"_inline_0_arg0_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_0_arg1_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_0_arg2_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_i\\\",\\\"this_v\\\"],localVars:[]},body:{body:\\\"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:2},{name:\\\"_inline_1_arg1_\\\",lvalue:!1,rvalue:!0,count:2}],thisVars:[\\\"this_i\\\",\\\"this_v\\\"],localVars:[\\\"_inline_1_k\\\"]},post:{body:\\\"{return this_i}\\\",args:[],thisVars:[\\\"this_i\\\"],localVars:[]}}),r.random=o({args:[\\\"array\\\"],pre:{args:[],body:\\\"this_f=Math.random\\\",thisVars:[\\\"this_f\\\"]},body:{args:[\\\"a\\\"],body:\\\"a=this_f()\\\",thisVars:[\\\"this_f\\\"]},funcName:\\\"random\\\"}),r.assign=o({args:[\\\"array\\\",\\\"array\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=b\\\"},funcName:\\\"assign\\\"}),r.assigns=o({args:[\\\"array\\\",\\\"scalar\\\"],body:{args:[\\\"a\\\",\\\"b\\\"],body:\\\"a=b\\\"},funcName:\\\"assigns\\\"}),r.equals=n({args:[\\\"array\\\",\\\"array\\\"],pre:i,body:{args:[{name:\\\"x\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"y\\\",lvalue:!1,rvalue:!0,count:1}],body:\\\"if(x!==y){return false}\\\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\\\"return true\\\"},funcName:\\\"equals\\\"})},{\\\"cwise-compiler\\\":134}],428:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"ndarray\\\"),i=t(\\\"./doConvert.js\\\");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{\\\"./doConvert.js\\\":429,ndarray:433}],429:[function(t,e,r){e.exports=t(\\\"cwise-compiler\\\")({args:[\\\"array\\\",\\\"scalar\\\",\\\"index\\\"],pre:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},body:{body:\\\"{\\\\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\\\\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\\\\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\\\\n}\\\\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\\\\n}\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_1_arg1_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg2_\\\",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:[\\\"_inline_1_i\\\",\\\"_inline_1_v\\\"]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},funcName:\\\"convert\\\",blockSize:64})},{\\\"cwise-compiler\\\":134}],430:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"typedarray-pool\\\"),i=32;function a(t){switch(t){case\\\"uint8\\\":return[n.mallocUint8,n.freeUint8];case\\\"uint16\\\":return[n.mallocUint16,n.freeUint16];case\\\"uint32\\\":return[n.mallocUint32,n.freeUint32];case\\\"int8\\\":return[n.mallocInt8,n.freeInt8];case\\\"int16\\\":return[n.mallocInt16,n.freeInt16];case\\\"int32\\\":return[n.mallocInt32,n.freeInt32];case\\\"float32\\\":return[n.mallocFloat,n.freeFloat];case\\\"float64\\\":return[n.mallocDouble,n.freeDouble];default:return null}}function o(t){for(var e=[],r=0;r<t;++r)e.push(\\\"s\\\"+r);for(r=0;r<t;++r)e.push(\\\"n\\\"+r);for(r=1;r<t;++r)e.push(\\\"d\\\"+r);for(r=1;r<t;++r)e.push(\\\"e\\\"+r);for(r=1;r<t;++r)e.push(\\\"f\\\"+r);return e}e.exports=function(t,e){var r=[\\\"'use strict'\\\"],n=[\\\"ndarraySortWrapper\\\",t.join(\\\"d\\\"),e].join(\\\"\\\");r.push([\\\"function \\\",n,\\\"(\\\",[\\\"array\\\"].join(\\\",\\\"),\\\"){\\\"].join(\\\"\\\"));for(var s=[\\\"data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride\\\"],l=0;l<t.length;++l)s.push([\\\"s\\\",l,\\\"=stride[\\\",l,\\\"]|0,n\\\",l,\\\"=shape[\\\",l,\\\"]|0\\\"].join(\\\"\\\"));var c=new Array(t.length),u=[];for(l=0;l<t.length;++l)0!==(p=t[l])&&(0===u.length?c[p]=\\\"1\\\":c[p]=u.join(\\\"*\\\"),u.push(\\\"n\\\"+p));var f=-1,h=-1;for(l=0;l<t.length;++l){var p,d=t[l];0!==d&&(f>0?s.push([\\\"d\\\",d,\\\"=s\\\",d,\\\"-d\\\",f,\\\"*n\\\",f].join(\\\"\\\")):s.push([\\\"d\\\",d,\\\"=s\\\",d].join(\\\"\\\")),f=d),0!=(p=t.length-1-l)&&(h>0?s.push([\\\"e\\\",p,\\\"=s\\\",p,\\\"-e\\\",h,\\\"*n\\\",h,\\\",f\\\",p,\\\"=\\\",c[p],\\\"-f\\\",h,\\\"*n\\\",h].join(\\\"\\\")):s.push([\\\"e\\\",p,\\\"=s\\\",p,\\\",f\\\",p,\\\"=\\\",c[p]].join(\\\"\\\")),h=p)}r.push(\\\"var \\\"+s.join(\\\",\\\"));var g=[\\\"0\\\",\\\"n0-1\\\",\\\"data\\\",\\\"offset\\\"].concat(o(t.length));r.push([\\\"if(n0<=\\\",i,\\\"){\\\",\\\"insertionSort(\\\",g.join(\\\",\\\"),\\\")}else{\\\",\\\"quickSort(\\\",g.join(\\\",\\\"),\\\")}\\\"].join(\\\"\\\")),r.push(\\\"}return \\\"+n);var v=new Function(\\\"insertionSort\\\",\\\"quickSort\\\",r.join(\\\"\\\\n\\\")),m=function(t,e){var r=[\\\"'use strict'\\\"],n=[\\\"ndarrayInsertionSort\\\",t.join(\\\"d\\\"),e].join(\\\"\\\"),i=[\\\"left\\\",\\\"right\\\",\\\"data\\\",\\\"offset\\\"].concat(o(t.length)),s=a(e),l=[\\\"i,j,cptr,ptr=left*s0+offset\\\"];if(t.length>1){for(var c=[],u=1;u<t.length;++u)l.push(\\\"i\\\"+u),c.push(\\\"n\\\"+u);s?l.push(\\\"scratch=malloc(\\\"+c.join(\\\"*\\\")+\\\")\\\"):l.push(\\\"scratch=new Array(\\\"+c.join(\\\"*\\\")+\\\")\\\"),l.push(\\\"dptr\\\",\\\"sptr\\\",\\\"a\\\",\\\"b\\\")}else l.push(\\\"scratch\\\");function f(t){return\\\"generic\\\"===e?[\\\"data.get(\\\",t,\\\")\\\"].join(\\\"\\\"):[\\\"data[\\\",t,\\\"]\\\"].join(\\\"\\\")}function h(t,r){return\\\"generic\\\"===e?[\\\"data.set(\\\",t,\\\",\\\",r,\\\")\\\"].join(\\\"\\\"):[\\\"data[\\\",t,\\\"]=\\\",r].join(\\\"\\\")}if(r.push([\\\"function \\\",n,\\\"(\\\",i.join(\\\",\\\"),\\\"){var \\\",l.join(\\\",\\\")].join(\\\"\\\"),\\\"for(i=left+1;i<=right;++i){\\\",\\\"j=i;ptr+=s0\\\",\\\"cptr=ptr\\\"),t.length>1){for(r.push(\\\"dptr=0;sptr=ptr\\\"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push([\\\"for(i\\\",p,\\\"=0;i\\\",p,\\\"<n\\\",p,\\\";++i\\\",p,\\\"){\\\"].join(\\\"\\\"));for(r.push(\\\"scratch[dptr++]=\\\",f(\\\"sptr\\\")),u=0;u<t.length;++u)0!==(p=t[u])&&r.push(\\\"sptr+=d\\\"+p,\\\"}\\\");for(r.push(\\\"__g:while(j--\\\\x3eleft){\\\",\\\"dptr=0\\\",\\\"sptr=cptr-s0\\\"),u=1;u<t.length;++u)1===u&&r.push(\\\"__l:\\\"),r.push([\\\"for(i\\\",u,\\\"=0;i\\\",u,\\\"<n\\\",u,\\\";++i\\\",u,\\\"){\\\"].join(\\\"\\\"));for(r.push([\\\"a=\\\",f(\\\"sptr\\\"),\\\"\\\\nb=scratch[dptr]\\\\nif(a<b){break __g}\\\\nif(a>b){break __l}\\\"].join(\\\"\\\")),u=t.length-1;u>=1;--u)r.push(\\\"sptr+=e\\\"+u,\\\"dptr+=f\\\"+u,\\\"}\\\");for(r.push(\\\"dptr=cptr;sptr=cptr-s0\\\"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push([\\\"for(i\\\",p,\\\"=0;i\\\",p,\\\"<n\\\",p,\\\";++i\\\",p,\\\"){\\\"].join(\\\"\\\"));for(r.push(h(\\\"dptr\\\",f(\\\"sptr\\\"))),u=0;u<t.length;++u)0!==(p=t[u])&&r.push([\\\"dptr+=d\\\",p,\\\";sptr+=d\\\",p].join(\\\"\\\"),\\\"}\\\");for(r.push(\\\"cptr-=s0\\\\n}\\\"),r.push(\\\"dptr=cptr;sptr=0\\\"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push([\\\"for(i\\\",p,\\\"=0;i\\\",p,\\\"<n\\\",p,\\\";++i\\\",p,\\\"){\\\"].join(\\\"\\\"));for(r.push(h(\\\"dptr\\\",\\\"scratch[sptr++]\\\")),u=0;u<t.length;++u){var p;0!==(p=t[u])&&r.push(\\\"dptr+=d\\\"+p,\\\"}\\\")}}else r.push(\\\"scratch=\\\"+f(\\\"ptr\\\"),\\\"while((j--\\\\x3eleft)&&(\\\"+f(\\\"cptr-s0\\\")+\\\">scratch)){\\\",h(\\\"cptr\\\",f(\\\"cptr-s0\\\")),\\\"cptr-=s0\\\",\\\"}\\\",h(\\\"cptr\\\",\\\"scratch\\\"));return r.push(\\\"}\\\"),t.length>1&&s&&r.push(\\\"free(scratch)\\\"),r.push(\\\"} return \\\"+n),s?new Function(\\\"malloc\\\",\\\"free\\\",r.join(\\\"\\\\n\\\"))(s[0],s[1]):new Function(r.join(\\\"\\\\n\\\"))()}(t,e),y=function(t,e,r){var n=[\\\"'use strict'\\\"],s=[\\\"ndarrayQuickSort\\\",t.join(\\\"d\\\"),e].join(\\\"\\\"),l=[\\\"left\\\",\\\"right\\\",\\\"data\\\",\\\"offset\\\"].concat(o(t.length)),c=a(e),u=0;n.push([\\\"function \\\",s,\\\"(\\\",l.join(\\\",\\\"),\\\"){\\\"].join(\\\"\\\"));var f=[\\\"sixth=((right-left+1)/6)|0\\\",\\\"index1=left+sixth\\\",\\\"index5=right-sixth\\\",\\\"index3=(left+right)>>1\\\",\\\"index2=index3-sixth\\\",\\\"index4=index3+sixth\\\",\\\"el1=index1\\\",\\\"el2=index2\\\",\\\"el3=index3\\\",\\\"el4=index4\\\",\\\"el5=index5\\\",\\\"less=left+1\\\",\\\"great=right-1\\\",\\\"pivots_are_equal=true\\\",\\\"tmp\\\",\\\"tmp0\\\",\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"k\\\",\\\"ptr0\\\",\\\"ptr1\\\",\\\"ptr2\\\",\\\"comp_pivot1=0\\\",\\\"comp_pivot2=0\\\",\\\"comp=0\\\"];if(t.length>1){for(var h=[],p=1;p<t.length;++p)h.push(\\\"n\\\"+p),f.push(\\\"i\\\"+p);for(p=0;p<8;++p)f.push(\\\"b_ptr\\\"+p);f.push(\\\"ptr3\\\",\\\"ptr4\\\",\\\"ptr5\\\",\\\"ptr6\\\",\\\"ptr7\\\",\\\"pivot_ptr\\\",\\\"ptr_shift\\\",\\\"elementSize=\\\"+h.join(\\\"*\\\")),c?f.push(\\\"pivot1=malloc(elementSize)\\\",\\\"pivot2=malloc(elementSize)\\\"):f.push(\\\"pivot1=new Array(elementSize),pivot2=new Array(elementSize)\\\")}else f.push(\\\"pivot1\\\",\\\"pivot2\\\");function d(t){return[\\\"(offset+\\\",t,\\\"*s0)\\\"].join(\\\"\\\")}function g(t){return\\\"generic\\\"===e?[\\\"data.get(\\\",t,\\\")\\\"].join(\\\"\\\"):[\\\"data[\\\",t,\\\"]\\\"].join(\\\"\\\")}function v(t,r){return\\\"generic\\\"===e?[\\\"data.set(\\\",t,\\\",\\\",r,\\\")\\\"].join(\\\"\\\"):[\\\"data[\\\",t,\\\"]=\\\",r].join(\\\"\\\")}function m(e,r,i){if(1===e.length)n.push(\\\"ptr0=\\\"+d(e[0]));else for(var a=0;a<e.length;++a)n.push([\\\"b_ptr\\\",a,\\\"=s0*\\\",e[a]].join(\\\"\\\"));for(r&&n.push(\\\"pivot_ptr=0\\\"),n.push(\\\"ptr_shift=offset\\\"),a=t.length-1;a>=0;--a)0!==(o=t[a])&&n.push([\\\"for(i\\\",o,\\\"=0;i\\\",o,\\\"<n\\\",o,\\\";++i\\\",o,\\\"){\\\"].join(\\\"\\\"));if(e.length>1)for(a=0;a<e.length;++a)n.push([\\\"ptr\\\",a,\\\"=b_ptr\\\",a,\\\"+ptr_shift\\\"].join(\\\"\\\"));for(n.push(i),r&&n.push(\\\"++pivot_ptr\\\"),a=0;a<t.length;++a){var o;0!==(o=t[a])&&(e.length>1?n.push(\\\"ptr_shift+=d\\\"+o):n.push(\\\"ptr0+=d\\\"+o),n.push(\\\"}\\\"))}}function y(e,r,i,a){if(1===r.length)n.push(\\\"ptr0=\\\"+d(r[0]));else{for(var o=0;o<r.length;++o)n.push([\\\"b_ptr\\\",o,\\\"=s0*\\\",r[o]].join(\\\"\\\"));n.push(\\\"ptr_shift=offset\\\")}for(i&&n.push(\\\"pivot_ptr=0\\\"),e&&n.push(e+\\\":\\\"),o=1;o<t.length;++o)n.push([\\\"for(i\\\",o,\\\"=0;i\\\",o,\\\"<n\\\",o,\\\";++i\\\",o,\\\"){\\\"].join(\\\"\\\"));if(r.length>1)for(o=0;o<r.length;++o)n.push([\\\"ptr\\\",o,\\\"=b_ptr\\\",o,\\\"+ptr_shift\\\"].join(\\\"\\\"));for(n.push(a),o=t.length-1;o>=1;--o)i&&n.push(\\\"pivot_ptr+=f\\\"+o),r.length>1?n.push(\\\"ptr_shift+=e\\\"+o):n.push(\\\"ptr0+=e\\\"+o),n.push(\\\"}\\\")}function x(){t.length>1&&c&&n.push(\\\"free(pivot1)\\\",\\\"free(pivot2)\\\")}function b(e,r){var i=\\\"el\\\"+e,a=\\\"el\\\"+r;if(t.length>1){var o=\\\"__l\\\"+ ++u;y(o,[i,a],!1,[\\\"comp=\\\",g(\\\"ptr0\\\"),\\\"-\\\",g(\\\"ptr1\\\"),\\\"\\\\n\\\",\\\"if(comp>0){tmp0=\\\",i,\\\";\\\",i,\\\"=\\\",a,\\\";\\\",a,\\\"=tmp0;break \\\",o,\\\"}\\\\n\\\",\\\"if(comp<0){break \\\",o,\\\"}\\\"].join(\\\"\\\"))}else n.push([\\\"if(\\\",g(d(i)),\\\">\\\",g(d(a)),\\\"){tmp0=\\\",i,\\\";\\\",i,\\\"=\\\",a,\\\";\\\",a,\\\"=tmp0}\\\"].join(\\\"\\\"))}function _(e,r){t.length>1?m([e,r],!1,v(\\\"ptr0\\\",g(\\\"ptr1\\\"))):n.push(v(d(e),g(d(r))))}function w(e,r,i){if(t.length>1){var a=\\\"__l\\\"+ ++u;y(a,[r],!0,[e,\\\"=\\\",g(\\\"ptr0\\\"),\\\"-pivot\\\",i,\\\"[pivot_ptr]\\\\n\\\",\\\"if(\\\",e,\\\"!==0){break \\\",a,\\\"}\\\"].join(\\\"\\\"))}else n.push([e,\\\"=\\\",g(d(r)),\\\"-pivot\\\",i].join(\\\"\\\"))}function k(e,r){t.length>1?m([e,r],!1,[\\\"tmp=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",\\\"tmp\\\")].join(\\\"\\\")):n.push([\\\"ptr0=\\\",d(e),\\\"\\\\n\\\",\\\"ptr1=\\\",d(r),\\\"\\\\n\\\",\\\"tmp=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",\\\"tmp\\\")].join(\\\"\\\"))}function M(e,r,i){t.length>1?(m([e,r,i],!1,[\\\"tmp=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",g(\\\"ptr2\\\")),\\\"\\\\n\\\",v(\\\"ptr2\\\",\\\"tmp\\\")].join(\\\"\\\")),n.push(\\\"++\\\"+r,\\\"--\\\"+i)):n.push([\\\"ptr0=\\\",d(e),\\\"\\\\n\\\",\\\"ptr1=\\\",d(r),\\\"\\\\n\\\",\\\"ptr2=\\\",d(i),\\\"\\\\n\\\",\\\"++\\\",r,\\\"\\\\n\\\",\\\"--\\\",i,\\\"\\\\n\\\",\\\"tmp=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",g(\\\"ptr2\\\")),\\\"\\\\n\\\",v(\\\"ptr2\\\",\\\"tmp\\\")].join(\\\"\\\"))}function A(t,e){k(t,e),n.push(\\\"--\\\"+e)}function T(e,r,i){t.length>1?m([e,r],!0,[v(\\\"ptr0\\\",g(\\\"ptr1\\\")),\\\"\\\\n\\\",v(\\\"ptr1\\\",[\\\"pivot\\\",i,\\\"[pivot_ptr]\\\"].join(\\\"\\\"))].join(\\\"\\\")):n.push(v(d(e),g(d(r))),v(d(r),\\\"pivot\\\"+i))}function S(e,r){n.push([\\\"if((\\\",r,\\\"-\\\",e,\\\")<=\\\",i,\\\"){\\\\n\\\",\\\"insertionSort(\\\",e,\\\",\\\",r,\\\",data,offset,\\\",o(t.length).join(\\\",\\\"),\\\")\\\\n\\\",\\\"}else{\\\\n\\\",s,\\\"(\\\",e,\\\",\\\",r,\\\",data,offset,\\\",o(t.length).join(\\\",\\\"),\\\")\\\\n\\\",\\\"}\\\"].join(\\\"\\\"))}function C(e,r,i){t.length>1?(n.push([\\\"__l\\\",++u,\\\":while(true){\\\"].join(\\\"\\\")),m([e],!0,[\\\"if(\\\",g(\\\"ptr0\\\"),\\\"!==pivot\\\",r,\\\"[pivot_ptr]){break __l\\\",u,\\\"}\\\"].join(\\\"\\\")),n.push(i,\\\"}\\\")):n.push([\\\"while(\\\",g(d(e)),\\\"===pivot\\\",r,\\\"){\\\",i,\\\"}\\\"].join(\\\"\\\"))}return n.push(\\\"var \\\"+f.join(\\\",\\\")),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),t.length>1?m([\\\"el1\\\",\\\"el2\\\",\\\"el3\\\",\\\"el4\\\",\\\"el5\\\",\\\"index1\\\",\\\"index3\\\",\\\"index5\\\"],!0,[\\\"pivot1[pivot_ptr]=\\\",g(\\\"ptr1\\\"),\\\"\\\\n\\\",\\\"pivot2[pivot_ptr]=\\\",g(\\\"ptr3\\\"),\\\"\\\\n\\\",\\\"pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\\\\n\\\",\\\"x=\\\",g(\\\"ptr0\\\"),\\\"\\\\n\\\",\\\"y=\\\",g(\\\"ptr2\\\"),\\\"\\\\n\\\",\\\"z=\\\",g(\\\"ptr4\\\"),\\\"\\\\n\\\",v(\\\"ptr5\\\",\\\"x\\\"),\\\"\\\\n\\\",v(\\\"ptr6\\\",\\\"y\\\"),\\\"\\\\n\\\",v(\\\"ptr7\\\",\\\"z\\\")].join(\\\"\\\")):n.push([\\\"pivot1=\\\",g(d(\\\"el2\\\")),\\\"\\\\n\\\",\\\"pivot2=\\\",g(d(\\\"el4\\\")),\\\"\\\\n\\\",\\\"pivots_are_equal=pivot1===pivot2\\\\n\\\",\\\"x=\\\",g(d(\\\"el1\\\")),\\\"\\\\n\\\",\\\"y=\\\",g(d(\\\"el3\\\")),\\\"\\\\n\\\",\\\"z=\\\",g(d(\\\"el5\\\")),\\\"\\\\n\\\",v(d(\\\"index1\\\"),\\\"x\\\"),\\\"\\\\n\\\",v(d(\\\"index3\\\"),\\\"y\\\"),\\\"\\\\n\\\",v(d(\\\"index5\\\"),\\\"z\\\")].join(\\\"\\\")),_(\\\"index2\\\",\\\"left\\\"),_(\\\"index4\\\",\\\"right\\\"),n.push(\\\"if(pivots_are_equal){\\\"),n.push(\\\"for(k=less;k<=great;++k){\\\"),w(\\\"comp\\\",\\\"k\\\",1),n.push(\\\"if(comp===0){continue}\\\"),n.push(\\\"if(comp<0){\\\"),n.push(\\\"if(k!==less){\\\"),k(\\\"k\\\",\\\"less\\\"),n.push(\\\"}\\\"),n.push(\\\"++less\\\"),n.push(\\\"}else{\\\"),n.push(\\\"while(true){\\\"),w(\\\"comp\\\",\\\"great\\\",1),n.push(\\\"if(comp>0){\\\"),n.push(\\\"great--\\\"),n.push(\\\"}else if(comp<0){\\\"),M(\\\"k\\\",\\\"less\\\",\\\"great\\\"),n.push(\\\"break\\\"),n.push(\\\"}else{\\\"),A(\\\"k\\\",\\\"great\\\"),n.push(\\\"break\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}else{\\\"),n.push(\\\"for(k=less;k<=great;++k){\\\"),w(\\\"comp_pivot1\\\",\\\"k\\\",1),n.push(\\\"if(comp_pivot1<0){\\\"),n.push(\\\"if(k!==less){\\\"),k(\\\"k\\\",\\\"less\\\"),n.push(\\\"}\\\"),n.push(\\\"++less\\\"),n.push(\\\"}else{\\\"),w(\\\"comp_pivot2\\\",\\\"k\\\",2),n.push(\\\"if(comp_pivot2>0){\\\"),n.push(\\\"while(true){\\\"),w(\\\"comp\\\",\\\"great\\\",2),n.push(\\\"if(comp>0){\\\"),n.push(\\\"if(--great<k){break}\\\"),n.push(\\\"continue\\\"),n.push(\\\"}else{\\\"),w(\\\"comp\\\",\\\"great\\\",1),n.push(\\\"if(comp<0){\\\"),M(\\\"k\\\",\\\"less\\\",\\\"great\\\"),n.push(\\\"}else{\\\"),A(\\\"k\\\",\\\"great\\\"),n.push(\\\"}\\\"),n.push(\\\"break\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),T(\\\"left\\\",\\\"(less-1)\\\",1),T(\\\"right\\\",\\\"(great+1)\\\",2),S(\\\"left\\\",\\\"(less-2)\\\"),S(\\\"(great+2)\\\",\\\"right\\\"),n.push(\\\"if(pivots_are_equal){\\\"),x(),n.push(\\\"return\\\"),n.push(\\\"}\\\"),n.push(\\\"if(less<index1&&great>index5){\\\"),C(\\\"less\\\",1,\\\"++less\\\"),C(\\\"great\\\",2,\\\"--great\\\"),n.push(\\\"for(k=less;k<=great;++k){\\\"),w(\\\"comp_pivot1\\\",\\\"k\\\",1),n.push(\\\"if(comp_pivot1===0){\\\"),n.push(\\\"if(k!==less){\\\"),k(\\\"k\\\",\\\"less\\\"),n.push(\\\"}\\\"),n.push(\\\"++less\\\"),n.push(\\\"}else{\\\"),w(\\\"comp_pivot2\\\",\\\"k\\\",2),n.push(\\\"if(comp_pivot2===0){\\\"),n.push(\\\"while(true){\\\"),w(\\\"comp\\\",\\\"great\\\",2),n.push(\\\"if(comp===0){\\\"),n.push(\\\"if(--great<k){break}\\\"),n.push(\\\"continue\\\"),n.push(\\\"}else{\\\"),w(\\\"comp\\\",\\\"great\\\",1),n.push(\\\"if(comp<0){\\\"),M(\\\"k\\\",\\\"less\\\",\\\"great\\\"),n.push(\\\"}else{\\\"),A(\\\"k\\\",\\\"great\\\"),n.push(\\\"}\\\"),n.push(\\\"break\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),n.push(\\\"}\\\"),x(),S(\\\"less\\\",\\\"great\\\"),n.push(\\\"}return \\\"+s),t.length>1&&c?new Function(\\\"insertionSort\\\",\\\"malloc\\\",\\\"free\\\",n.join(\\\"\\\\n\\\"))(r,c[0],c[1]):new Function(\\\"insertionSort\\\",n.join(\\\"\\\\n\\\"))(r)}(t,e,m);return v(m,y)}},{\\\"typedarray-pool\\\":522}],431:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/compile_sort.js\\\"),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(\\\":\\\"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{\\\"./lib/compile_sort.js\\\":430}],432:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"ndarray-linear-interpolate\\\"),i=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\",\\\"scalar\\\",\\\"scalar\\\"],pre:{body:\\\"{this_warped=new Array(_inline_3_arg4_)}\\\",args:[{name:\\\"_inline_3_arg0_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_3_arg1_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_3_arg2_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_3_arg3_\\\",lvalue:!1,rvalue:!1,count:0},{name:\\\"_inline_3_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_warped\\\"],localVars:[]},body:{body:\\\"{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}\\\",args:[{name:\\\"_inline_4_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_4_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_4_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_4_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_4_arg4_\\\",lvalue:!1,rvalue:!1,count:0}],thisVars:[\\\"this_warped\\\"],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"warpND\\\",blockSize:64}),a=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\",\\\"scalar\\\",\\\"scalar\\\"],pre:{body:\\\"{this_warped=[0]}\\\",args:[],thisVars:[\\\"this_warped\\\"],localVars:[]},body:{body:\\\"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}\\\",args:[{name:\\\"_inline_7_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_7_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_7_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_7_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_7_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_warped\\\"],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"warp1D\\\",blockSize:64}),o=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\",\\\"scalar\\\",\\\"scalar\\\"],pre:{body:\\\"{this_warped=[0,0]}\\\",args:[],thisVars:[\\\"this_warped\\\"],localVars:[]},body:{body:\\\"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}\\\",args:[{name:\\\"_inline_10_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_10_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_10_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_10_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_10_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_warped\\\"],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"warp2D\\\",blockSize:64}),s=t(\\\"cwise/lib/wrapper\\\")({args:[\\\"index\\\",\\\"array\\\",\\\"scalar\\\",\\\"scalar\\\",\\\"scalar\\\"],pre:{body:\\\"{this_warped=[0,0,0]}\\\",args:[],thisVars:[\\\"this_warped\\\"],localVars:[]},body:{body:\\\"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}\\\",args:[{name:\\\"_inline_13_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_13_arg1_\\\",lvalue:!0,rvalue:!1,count:1},{name:\\\"_inline_13_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_13_arg3_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_13_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\\\"this_warped\\\"],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},debug:!1,funcName:\\\"warp3D\\\",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{\\\"cwise/lib/wrapper\\\":137,\\\"ndarray-linear-interpolate\\\":426}],433:[function(t,e,r){var n=t(\\\"iota-array\\\"),i=t(\\\"is-buffer\\\"),a=\\\"undefined\\\"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,r=new Array(e.length);for(t=0;t<r.length;++t)r[t]=[Math.abs(e[t]),t];r.sort(o);var n=new Array(r.length);for(t=0;t<n.length;++t)n[t]=r[t][1];return n}function l(t,e){var r=[\\\"View\\\",e,\\\"d\\\",t].join(\\\"\\\");e<0&&(r=\\\"View_Nil\\\"+t);var i=\\\"generic\\\"===t;if(-1===e){var a=\\\"function \\\"+r+\\\"(a){this.data=a;};var proto=\\\"+r+\\\".prototype;proto.dtype='\\\"+t+\\\"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new \\\"+r+\\\"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_\\\"+r+\\\"(a){return new \\\"+r+\\\"(a);}\\\";return new Function(a)()}if(0===e){a=\\\"function \\\"+r+\\\"(a,d) {this.data = a;this.offset = d};var proto=\\\"+r+\\\".prototype;proto.dtype='\\\"+t+\\\"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function \\\"+r+\\\"_copy() {return new \\\"+r+\\\"(this.data,this.offset)};proto.pick=function \\\"+r+\\\"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function \\\"+r+\\\"_get(){return \\\"+(i?\\\"this.data.get(this.offset)\\\":\\\"this.data[this.offset]\\\")+\\\"};proto.set=function \\\"+r+\\\"_set(v){return \\\"+(i?\\\"this.data.set(this.offset,v)\\\":\\\"this.data[this.offset]=v\\\")+\\\"};return function construct_\\\"+r+\\\"(a,b,c,d){return new \\\"+r+\\\"(a,d)}\\\";return new Function(\\\"TrivialArray\\\",a)(c[t][0])}a=[\\\"'use strict'\\\"];var o=n(e),l=o.map(function(t){return\\\"i\\\"+t}),u=\\\"this.offset+\\\"+o.map(function(t){return\\\"this.stride[\\\"+t+\\\"]*i\\\"+t}).join(\\\"+\\\"),f=o.map(function(t){return\\\"b\\\"+t}).join(\\\",\\\"),h=o.map(function(t){return\\\"c\\\"+t}).join(\\\",\\\");a.push(\\\"function \\\"+r+\\\"(a,\\\"+f+\\\",\\\"+h+\\\",d){this.data=a\\\",\\\"this.shape=[\\\"+f+\\\"]\\\",\\\"this.stride=[\\\"+h+\\\"]\\\",\\\"this.offset=d|0}\\\",\\\"var proto=\\\"+r+\\\".prototype\\\",\\\"proto.dtype='\\\"+t+\\\"'\\\",\\\"proto.dimension=\\\"+e),a.push(\\\"Object.defineProperty(proto,'size',{get:function \\\"+r+\\\"_size(){return \\\"+o.map(function(t){return\\\"this.shape[\\\"+t+\\\"]\\\"}).join(\\\"*\\\"),\\\"}})\\\"),1===e?a.push(\\\"proto.order=[0]\\\"):(a.push(\\\"Object.defineProperty(proto,'order',{get:\\\"),e<4?(a.push(\\\"function \\\"+r+\\\"_order(){\\\"),2===e?a.push(\\\"return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})\\\"):3===e&&a.push(\\\"var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})\\\")):a.push(\\\"ORDER})\\\")),a.push(\\\"proto.set=function \\\"+r+\\\"_set(\\\"+l.join(\\\",\\\")+\\\",v){\\\"),i?a.push(\\\"return this.data.set(\\\"+u+\\\",v)}\\\"):a.push(\\\"return this.data[\\\"+u+\\\"]=v}\\\"),a.push(\\\"proto.get=function \\\"+r+\\\"_get(\\\"+l.join(\\\",\\\")+\\\"){\\\"),i?a.push(\\\"return this.data.get(\\\"+u+\\\")}\\\"):a.push(\\\"return this.data[\\\"+u+\\\"]}\\\"),a.push(\\\"proto.index=function \\\"+r+\\\"_index(\\\",l.join(),\\\"){return \\\"+u+\\\"}\\\"),a.push(\\\"proto.hi=function \\\"+r+\\\"_hi(\\\"+l.join(\\\",\\\")+\\\"){return new \\\"+r+\\\"(this.data,\\\"+o.map(function(t){return[\\\"(typeof i\\\",t,\\\"!=='number'||i\\\",t,\\\"<0)?this.shape[\\\",t,\\\"]:i\\\",t,\\\"|0\\\"].join(\\\"\\\")}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"this.stride[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",this.offset)}\\\");var p=o.map(function(t){return\\\"a\\\"+t+\\\"=this.shape[\\\"+t+\\\"]\\\"}),d=o.map(function(t){return\\\"c\\\"+t+\\\"=this.stride[\\\"+t+\\\"]\\\"});a.push(\\\"proto.lo=function \\\"+r+\\\"_lo(\\\"+l.join(\\\",\\\")+\\\"){var b=this.offset,d=0,\\\"+p.join(\\\",\\\")+\\\",\\\"+d.join(\\\",\\\"));for(var g=0;g<e;++g)a.push(\\\"if(typeof i\\\"+g+\\\"==='number'&&i\\\"+g+\\\">=0){d=i\\\"+g+\\\"|0;b+=c\\\"+g+\\\"*d;a\\\"+g+\\\"-=d}\\\");a.push(\\\"return new \\\"+r+\\\"(this.data,\\\"+o.map(function(t){return\\\"a\\\"+t}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"c\\\"+t}).join(\\\",\\\")+\\\",b)}\\\"),a.push(\\\"proto.step=function \\\"+r+\\\"_step(\\\"+l.join(\\\",\\\")+\\\"){var \\\"+o.map(function(t){return\\\"a\\\"+t+\\\"=this.shape[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"b\\\"+t+\\\"=this.stride[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",c=this.offset,d=0,ceil=Math.ceil\\\");for(g=0;g<e;++g)a.push(\\\"if(typeof i\\\"+g+\\\"==='number'){d=i\\\"+g+\\\"|0;if(d<0){c+=b\\\"+g+\\\"*(a\\\"+g+\\\"-1);a\\\"+g+\\\"=ceil(-a\\\"+g+\\\"/d)}else{a\\\"+g+\\\"=ceil(a\\\"+g+\\\"/d)}b\\\"+g+\\\"*=d}\\\");a.push(\\\"return new \\\"+r+\\\"(this.data,\\\"+o.map(function(t){return\\\"a\\\"+t}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"b\\\"+t}).join(\\\",\\\")+\\\",c)}\\\");var v=new Array(e),m=new Array(e);for(g=0;g<e;++g)v[g]=\\\"a[i\\\"+g+\\\"]\\\",m[g]=\\\"b[i\\\"+g+\\\"]\\\";a.push(\\\"proto.transpose=function \\\"+r+\\\"_transpose(\\\"+l+\\\"){\\\"+l.map(function(t,e){return t+\\\"=(\\\"+t+\\\"===undefined?\\\"+e+\\\":\\\"+t+\\\"|0)\\\"}).join(\\\";\\\"),\\\"var a=this.shape,b=this.stride;return new \\\"+r+\\\"(this.data,\\\"+v.join(\\\",\\\")+\\\",\\\"+m.join(\\\",\\\")+\\\",this.offset)}\\\"),a.push(\\\"proto.pick=function \\\"+r+\\\"_pick(\\\"+l+\\\"){var a=[],b=[],c=this.offset\\\");for(g=0;g<e;++g)a.push(\\\"if(typeof i\\\"+g+\\\"==='number'&&i\\\"+g+\\\">=0){c=(c+this.stride[\\\"+g+\\\"]*i\\\"+g+\\\")|0}else{a.push(this.shape[\\\"+g+\\\"]);b.push(this.stride[\\\"+g+\\\"])}\\\");return a.push(\\\"var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}\\\"),a.push(\\\"return function construct_\\\"+r+\\\"(data,shape,stride,offset){return new \\\"+r+\\\"(data,\\\"+o.map(function(t){return\\\"shape[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",\\\"+o.map(function(t){return\\\"stride[\\\"+t+\\\"]\\\"}).join(\\\",\\\")+\\\",offset)}\\\"),new Function(\\\"CTOR_LIST\\\",\\\"ORDER\\\",a.join(\\\"\\\\n\\\"))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);\\\"number\\\"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===n)for(n=0,s=0;s<o;++s)r[s]<0&&(n-=(e[s]-1)*r[s]);for(var f=function(t){if(i(t))return\\\"buffer\\\";if(a)switch(Object.prototype.toString.call(t)){case\\\"[object Float64Array]\\\":return\\\"float64\\\";case\\\"[object Float32Array]\\\":return\\\"float32\\\";case\\\"[object Int8Array]\\\":return\\\"int8\\\";case\\\"[object Int16Array]\\\":return\\\"int16\\\";case\\\"[object Int32Array]\\\":return\\\"int32\\\";case\\\"[object Uint8Array]\\\":return\\\"uint8\\\";case\\\"[object Uint16Array]\\\":return\\\"uint16\\\";case\\\"[object Uint32Array]\\\":return\\\"uint32\\\";case\\\"[object Uint8ClampedArray]\\\":return\\\"uint8_clamped\\\"}return Array.isArray(t)?\\\"array\\\":\\\"generic\\\"}(t),h=c[f];h.length<=o+1;)h.push(l(f,h.length-1));return(0,h[o+1])(t,e,r,n)}},{\\\"iota-array\\\":399,\\\"is-buffer\\\":401}],434:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"double-bits\\\"),i=Math.pow(2,-1074),a=-1>>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),o=n.lo(t);e>t==t>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1;return n.pack(o,r)}},{\\\"double-bits\\\":152}],435:[function(t,e,r){var n=Math.PI,i=c(120);function a(t,e,r,n){return[\\\"C\\\",t,e,r,n,r,n]}function o(t,e,r,n,i,a){return[\\\"C\\\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function s(t,e,r,a,o,c,u,f,h,p){if(p)k=p[0],M=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(f=(d=l(f,h,-o)).x))/2,v=(e-(h=d.y))/2,m=g*g/(r*r)+v*v/(a*a);m>1&&(r*=m=Math.sqrt(m),a*=m);var y=r*r,x=a*a,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*v*v-x*g*g)/(y*v*v+x*g*g)));b==1/0&&(b=1);var _=b*r*v/a+(t+f)/2,w=b*-a*g/r+(e+h)/2,k=Math.asin(((e-w)/a).toFixed(9)),M=Math.asin(((h-w)/a).toFixed(9));(k=t<_?n-k:k)<0&&(k=2*n+k),(M=f<_?n-M:M)<0&&(M=2*n+M),u&&k>M&&(k-=2*n),!u&&M>k&&(M-=2*n)}if(Math.abs(M-k)>i){var A=M,T=f,S=h;M=k+i*(u&&M>k?1:-1);var C=s(f=_+r*Math.cos(M),h=w+a*Math.sin(M),r,a,o,0,u,T,S,[M,A,_,w])}var E=Math.tan((M-k)/4),L=4/3*r*E,z=4/3*a*E,O=[2*t-(t+L*Math.sin(k)),2*e-(e-z*Math.cos(k)),f+L*Math.sin(M),h-z*Math.cos(M),f,h];if(p)return O;C&&(O=O.concat(C));for(var I=0;I<O.length;){var P=l(O[I],O[I+1],o);O[I++]=P.x,O[I++]=P.y}return O}function l(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function c(t){return t*(n/180)}e.exports=function(t){for(var e,r=[],n=0,i=0,l=0,u=0,f=null,h=null,p=0,d=0,g=0,v=t.length;g<v;g++){var m=t[g],y=m[0];switch(y){case\\\"M\\\":l=m[1],u=m[2];break;case\\\"A\\\":(m=s(p,d,m[1],m[2],c(m[3]),m[4],m[5],m[6],m[7])).unshift(\\\"C\\\"),m.length>7&&(r.push(m.splice(0,7)),m.unshift(\\\"C\\\"));break;case\\\"S\\\":var x=p,b=d;\\\"C\\\"!=e&&\\\"S\\\"!=e||(x+=x-n,b+=b-i),m=[\\\"C\\\",x,b,m[1],m[2],m[3],m[4]];break;case\\\"T\\\":\\\"Q\\\"==e||\\\"T\\\"==e?(f=2*p-f,h=2*d-h):(f=p,h=d),m=o(p,d,f,h,m[1],m[2]);break;case\\\"Q\\\":f=m[1],h=m[2],m=o(p,d,m[1],m[2],m[3],m[4]);break;case\\\"L\\\":m=a(p,d,m[1],m[2]);break;case\\\"H\\\":m=a(p,d,m[1],d);break;case\\\"V\\\":m=a(p,d,p,m[1]);break;case\\\"Z\\\":m=a(p,d,l,u)}e=y,p=m[m.length-2],d=m[m.length-1],m.length>4?(n=m[m.length-4],i=m[m.length-3]):(n=p,i=d),r.push(m)}return r}},{}],436:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o<n;++o)i[o]=[0,0,0];for(o=0;o<t.length;++o)for(var s=t[o],l=0,c=s[s.length-1],u=s[0],f=0;f<s.length;++f){l=c,c=u,u=s[(f+1)%s.length];for(var h=e[l],p=e[c],d=e[u],g=new Array(3),v=0,m=new Array(3),y=0,x=0;x<3;++x)g[x]=h[x]-p[x],v+=g[x]*g[x],m[x]=d[x]-p[x],y+=m[x]*m[x];if(v*y>a){var b=i[c],_=1/Math.sqrt(v*y);for(x=0;x<3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(m[w]*g[k]-m[k]*g[w])}}}for(o=0;o<n;++o){b=i[o];var M=0;for(x=0;x<3;++x)M+=b[x]*b[x];if(M>a)for(_=1/Math.sqrt(M),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o<n;++o){for(var s=t[o],l=new Array(3),c=0;c<3;++c)l[c]=e[s[c]];var u=new Array(3),f=new Array(3);for(c=0;c<3;++c)u[c]=l[1][c]-l[0][c],f[c]=l[2][c]-l[0][c];var h=new Array(3),p=0;for(c=0;c<3;++c){var d=(c+1)%3,g=(c+2)%3;h[c]=u[d]*f[g]-u[g]*f[d],p+=h[c]*h[c]}p=p>a?1/Math.sqrt(p):0;for(c=0;c<3;++c)h[c]*=p;i[o]=h}return i}},{}],437:[function(t,e,r){\\\"use strict\\\";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String(\\\"abc\\\");if(t[5]=\\\"de\\\",\\\"5\\\"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e[\\\"_\\\"+String.fromCharCode(r)]=r;if(\\\"0123456789\\\"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(\\\"\\\"))return!1;var n={};return\\\"abcdefghijklmnopqrst\\\".split(\\\"\\\").forEach(function(t){n[t]=t}),\\\"abcdefghijklmnopqrst\\\"===Object.keys(Object.assign({},n)).join(\\\"\\\")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,s=function(t){if(null==t)throw new TypeError(\\\"Object.assign cannot be called with null or undefined\\\");return Object(t)}(t),l=1;l<arguments.length;l++){for(var c in r=Object(arguments[l]))i.call(r,c)&&(s[c]=r[c]);if(n){o=n(r);for(var u=0;u<o.length;u++)a.call(r,o[u])&&(s[o[u]]=r[o[u]])}}return s}},{}],438:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i,a,o,s,l,c){var u=e+a+c;if(f>0){var f=Math.sqrt(u+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,c),f=Math.sqrt(2*h-u+1);e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},{}],439:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));i.setDistanceLimits(t.zoomMin,t.zoomMax),(\\\"eye\\\"in t||\\\"up\\\"in t)&&i.lookAt(0,t.eye,t.center,t.up);return i};var n=t(\\\"filtered-vector\\\"),i=t(\\\"gl-mat4/lookAt\\\"),a=t(\\\"gl-mat4/fromQuat\\\"),o=t(\\\"gl-mat4/invert\\\"),s=t(\\\"./lib/quatFromFrame\\\");function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=c(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,f=0;f<3;++f)c+=r[l+4*f]*i[f];r[12+l]=-c}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=l(u-=a*p,f-=o*p,h-=s*p);u/=d,f/=d,h/=d;var g=i[2],v=i[6],m=i[10],y=g*a+v*o+m*s,x=g*u+v*f+m*h,b=l(g-=y*a+x*u,v-=y*o+x*f,m-=y*s+x*h);g/=b,v/=b,m/=b;var _=u*e+a*r,w=f*e+o*r,k=h*e+s*r;this.center.move(t,_,w,k);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+n),this.radius.set(t,Math.log(M))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],f=i[5],h=i[9],p=i[2],d=i[6],g=i[10],v=e*a+r*u,m=e*o+r*f,y=e*s+r*h,x=-(d*y-g*m),b=-(g*v-p*y),_=-(p*m-d*v),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=c(x,b,_,w);k>1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var M=this.computedRotation,A=M[0],T=M[1],S=M[2],C=M[3],E=A*w+C*x+T*_-S*b,L=T*w+C*b+S*x-A*_,z=S*w+C*_+A*b-T*x,O=C*w-A*x-T*b-S*_;if(n){x=p,b=d,_=g;var I=Math.sin(n)/l(x,b,_);x*=I,b*=I,_*=I,O=O*(w=Math.cos(e))-(E=E*w+O*x+L*_-z*b)*x-(L=L*w+O*b+z*x-E*_)*b-(z=z*w+O*_+E*b-L*x)*_}var P=c(E,L,z,O);P>1e-6?(E/=P,L/=P,z/=P,O/=P):(E=L=z=0,O=1),this.rotation.set(t,E,L,z,O)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,c-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{\\\"./lib/quatFromFrame\\\":438,\\\"filtered-vector\\\":215,\\\"gl-mat4/fromQuat\\\":251,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/lookAt\\\":255}],440:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"repeat-string\\\");e.exports=function(t,e,r){return n(r=\\\"undefined\\\"!=typeof r?r+\\\"\\\":\\\" \\\",e)+t}},{\\\"repeat-string\\\":479}],441:[function(t,e,r){\\\"use strict\\\";function n(t,e){if(\\\"string\\\"!=typeof t)return[t];var r=[t];\\\"string\\\"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:[\\\"{}\\\",\\\"[]\\\",\\\"()\\\"],i=e.escape||\\\"___\\\",a=!!e.flat;n.forEach(function(t){var e=new RegExp([\\\"\\\\\\\\\\\",t[0],\\\"[^\\\\\\\\\\\",t[0],\\\"\\\\\\\\\\\",t[1],\\\"]*\\\\\\\\\\\",t[1]].join(\\\"\\\")),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s}r.forEach(function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++>1e4)throw Error(\\\"References have circular dependency. Please, check them.\\\");r[n]=t}),n=n.reverse(),r=r.map(function(e){return n.forEach(function(r){e=e.replace(new RegExp(\\\"(\\\\\\\\\\\"+i+r+\\\"(?![0-9]))\\\",\\\"g\\\"),t[0]+\\\"$1\\\"+t[1])}),e})});var o=new RegExp(\\\"\\\\\\\\\\\"+i+\\\"([0-9]+)\\\");return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error(\\\"Circular references in parenthesis\\\");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function i(t,e){if(e&&e.flat){var r,n=e&&e.escape||\\\"___\\\",i=t[0];if(!i)return\\\"\\\";for(var a=new RegExp(\\\"\\\\\\\\\\\"+n+\\\"([0-9]+)\\\"),o=0;i!=r;){if(o++>1e4)throw Error(\\\"Circular references in \\\"+t);r=i,i=i.replace(a,s)}return i}return t.reduce(function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,\\\"\\\")),e+r},\\\"\\\");function s(e,r){if(null==t[r])throw Error(\\\"Reference \\\"+r+\\\"is undefined\\\");return t[r]}}function a(t,e){return Array.isArray(t)?i(t,e):n(t,e)}a.parse=n,a.stringify=i,e.exports=a},{}],442:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"pick-by-alias\\\");e.exports=function(t){var e;arguments.length>1&&(t=arguments);\\\"string\\\"==typeof t?t=t.split(/\\\\s/).map(parseFloat):\\\"number\\\"==typeof t&&(t=[t]);t.length&&\\\"number\\\"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(t=n(t,{left:\\\"x l left Left\\\",top:\\\"y t top Top\\\",width:\\\"w width W Width\\\",height:\\\"h height W Width\\\",bottom:\\\"b bottom Bottom\\\",right:\\\"r right Right\\\"}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{\\\"pick-by-alias\\\":448}],443:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),\\\"m\\\"==o&&i.length>2&&(e.push([r].concat(i.splice(0,2))),o=\\\"l\\\",r=\\\"m\\\"==r?\\\"l\\\":\\\"L\\\");;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length<n[o])throw new Error(\\\"malformed path data\\\");e.push([r].concat(i.splice(0,n[o])))}}),e};var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=/([astvzqmhlc])([^astvzqmhlc]*)/gi;var a=/-?[0-9]*\\\\.?[0-9]+(?:e[-+]?\\\\d+)?/gi},{}],444:[function(t,e,r){e.exports=function(t,e){e||(e=[0,\\\"\\\"]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\\\\d.\\\\-\\\\+]*\\\\s*(.*)/)[1]||\\\"\\\",e}},{}],445:[function(t,e,r){(function(t){(function(){var r,n,i,a,o,s;\\\"undefined\\\"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:\\\"undefined\\\"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(r()-o)/1e6},n=t.hrtime,a=(r=function(){var t;return 1e9*(t=n())[0]+t[1]})(),s=1e9*t.uptime(),o=a-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,t(\\\"_process\\\"))},{_process:465}],446:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.length;if(e<n){for(var r=1,a=0;a<e;++a)for(var o=0;o<a;++o)if(t[a]<t[o])r=-r;else if(t[a]===t[o])return 0;return r}for(var s=i.mallocUint8(e),a=0;a<e;++a)s[a]=0;for(var r=1,a=0;a<e;++a)if(!s[a]){var l=1;s[a]=1;for(var o=t[a];o!==a;o=t[o]){if(s[o])return i.freeUint8(s),0;l+=1,s[o]=1}1&l||(r=-r)}return i.freeUint8(s),r};var n=32,i=t(\\\"typedarray-pool\\\")},{\\\"typedarray-pool\\\":522}],447:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"typedarray-pool\\\"),i=t(\\\"invert-permutation\\\");r.rank=function(t){var e=t.length;switch(e){case 0:case 1:return 0;case 2:return t[1]}var r,a,o,s=n.mallocUint32(e),l=n.mallocUint32(e),c=0;for(i(t,l),o=0;o<e;++o)s[o]=t[o];for(o=e-1;o>0;--o)a=l[o],r=s[o],s[o]=s[a],s[a]=r,l[o]=l[r],l[r]=a,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}var n,i,a,o=1;for((r=r||new Array(t))[0]=0,a=1;a<t;++a)r[a]=a,o=o*a|0;for(a=t-1;a>0;--a)e=e-(n=e/o|0)*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}},{\\\"invert-permutation\\\":398,\\\"typedarray-pool\\\":522}],448:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n,a,o={};if(\\\"string\\\"==typeof e&&(e=i(e)),Array.isArray(e)){var s={};for(a=0;a<e.length;a++)s[e[a]]=!0;e=s}for(n in e)e[n]=i(e[n]);var l={};for(n in e){var c=e[n];if(Array.isArray(c))for(a=0;a<c.length;a++){var u=c[a];if(r&&(l[u]=!0),u in t){if(o[n]=t[u],r)for(var f=a;f<c.length;f++)l[c[f]]=!0;break}}else n in t&&(e[n]&&(o[n]=t[n]),r&&(l[n]=!0))}if(r)for(n in t)l[n]||(o[n]=t[n]);return o};var n={};function i(t){return n[t]?n[t]:(\\\"string\\\"==typeof t&&(t=n[t]=t.split(/\\\\s*,\\\\s*|\\\\s+/)),t)}},{}],449:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r=0|e.length,i=t.length,a=[new Array(r),new Array(r)],o=0;o<r;++o)a[0][o]=[],a[1][o]=[];for(var o=0;o<i;++o){var s=t[o];a[0][s[0]].push(s),a[1][s[1]].push(s)}for(var l=[],o=0;o<r;++o)a[0][o].length+a[1][o].length===0&&l.push([o]);function c(t,e){var r=a[e][t[e]];r.splice(r.indexOf(t),1)}function u(t,r,i){for(var o,s,l,u=0;u<2;++u)if(a[u][r].length>0){o=a[u][r][0],l=u;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=a[f][r],p=0;p<h.length;++p){var d=h[p],g=d[1^f],v=n(e[t],e[r],e[s],e[g]);v>0&&(o=d,s=g,l=f)}return i?s:(o&&c(o,l),s)}function f(t,r){var i=a[r][t][0],o=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=t,h=o[1],p=u(l,f,!0);if(n(e[l],e[f],e[h],e[p])<0)break;o.push(t),s=u(l,f)}return o}function h(t,e){return e[1]===e[e.length-1]}for(var o=0;o<r;++o)for(var p=0;p<2;++p){for(var d=[];a[p][o].length>0;){a[0][o].length;var g=f(o,p);h(d,g)?d.push.apply(d,g):(d.length>0&&l.push(d),d=g)}d.length>0&&l.push(d)}return l};var n=t(\\\"compare-angle\\\")},{\\\"compare-angle\\\":115}],450:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s<e.length;++s){var l=r[s].length;a[s]=l,i[s]=!0,l<=1&&o.push(s)}for(;o.length>0;){var c=o.pop();i[c]=!1;for(var u=r[c],s=0;s<u.length;++s){var f=u[s];0==--a[f]&&o.push(f)}}for(var h=new Array(e.length),p=[],s=0;s<e.length;++s)if(i[s]){var c=p.length;h[s]=c,p.push(e[s])}else h[s]=-1;for(var d=[],s=0;s<t.length;++s){var g=t[s];i[g[0]]&&i[g[1]]&&d.push([h[g[0]],h[g[1]]])}return[d,p]};var n=t(\\\"edges-to-adjacency-list\\\")},{\\\"edges-to-adjacency-list\\\":157}],451:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=c(t,e);t=r[0];for(var f=(e=r[1]).length,h=(t.length,n(t,e.length)),p=0;p<f;++p)if(h[p].length%2==1)throw new Error(\\\"planar-graph-to-polyline: graph must be manifold\\\");var d=i(t,e);for(var g=(d=d.filter(function(t){for(var r=t.length,n=[0],i=0;i<r;++i){var a=e[t[i]],l=e[t[(i+1)%r]],c=o(-a[0],a[1]),u=o(-a[0],l[1]),f=o(l[0],a[1]),h=o(l[0],l[1]);n=s(n,s(s(c,u),s(f,h)))}return n[n.length-1]>0})).length,v=new Array(g),m=new Array(g),p=0;p<g;++p){v[p]=p;var y=new Array(g),x=d[p].map(function(t){return e[t]}),b=a([x]),_=0;t:for(var w=0;w<g;++w)if(y[w]=0,p!==w){for(var k=d[w],M=k.length,A=0;A<M;++A){var T=b(e[k[A]]);if(0!==T){T<0&&(y[w]=1,_+=1);continue t}}y[w]=1,_+=1}m[p]=[_,p,y]}m.sort(function(t,e){return e[0]-t[0]});for(var p=0;p<g;++p)for(var y=m[p],S=y[1],C=y[2],w=0;w<g;++w)C[w]&&(v[w]=S);for(var E=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=[];return e}(g),p=0;p<g;++p)E[p].push(v[p]),E[v[p]].push(p);for(var L={},z=u(f,!1),p=0;p<g;++p)for(var k=d[p],M=k.length,w=0;w<M;++w){var O=k[w],I=k[(w+1)%M],P=Math.min(O,I)+\\\":\\\"+Math.max(O,I);if(P in L){var D=L[P];E[D].push(p),E[p].push(D),z[O]=z[I]=!0}else L[P]=p}function R(t){for(var e=t.length,r=0;r<e;++r)if(!z[t[r]])return!1;return!0}for(var B=[],F=u(g,-1),p=0;p<g;++p)v[p]!==p||R(d[p])?F[p]=-1:(B.push(p),F[p]=0);var r=[];for(;B.length>0;){var N=B.pop(),j=E[N];l(j,function(t,e){return t-e});var V,U=j.length,q=F[N];if(0===q){var k=d[N];V=[k]}for(var p=0;p<U;++p){var H=j[p];if(!(F[H]>=0)&&(F[H]=1^q,B.push(H),0===q)){var k=d[H];R(k)||(k.reverse(),V.push(k))}}0===q&&r.push(V)}return r};var n=t(\\\"edges-to-adjacency-list\\\"),i=t(\\\"planar-dual\\\"),a=t(\\\"point-in-big-polygon\\\"),o=t(\\\"two-product\\\"),s=t(\\\"robust-sum\\\"),l=t(\\\"uniq\\\"),c=t(\\\"./lib/trim-leaves\\\");function u(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}},{\\\"./lib/trim-leaves\\\":450,\\\"edges-to-adjacency-list\\\":157,\\\"planar-dual\\\":449,\\\"point-in-big-polygon\\\":455,\\\"robust-sum\\\":491,\\\"two-product\\\":520,uniq:524}],452:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"./quad\\\")},{\\\"./quad\\\":454}],453:[function(t,e,r){arguments[4][99][0].apply(r,arguments)},{dup:99}],454:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"clamp\\\"),a=t(\\\"parse-rect\\\"),o=t(\\\"array-bounds\\\"),s=t(\\\"pick-by-alias\\\"),l=t(\\\"defined\\\"),c=t(\\\"flatten-vertex-data\\\"),u=t(\\\"is-obj\\\"),f=t(\\\"dtype\\\"),h=t(\\\"math-log2\\\");function p(t,e){for(var r=e[0],n=e[1],a=1/(e[2]-r),o=1/(e[3]-n),s=new Array(t.length),l=0,c=t.length/2;l<c;l++)s[2*l]=i((t[2*l]-r)*a,0,1),s[2*l+1]=i((t[2*l+1]-n)*o,0,1);return s}e.exports=function(t,e){e||(e={}),t=c(t,\\\"float64\\\"),e=s(e,{bounds:\\\"range bounds dataBox databox\\\",maxDepth:\\\"depth maxDepth maxdepth level maxLevel maxlevel levels\\\",dtype:\\\"type dtype format out dst output destination\\\"});var r=l(e.maxDepth,255),i=l(e.bounds,o(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;var d,g=p(t,i),v=t.length>>>1;e.dtype||(e.dtype=\\\"array\\\"),\\\"string\\\"==typeof e.dtype?d=new(f(e.dtype))(v):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=v));for(var m=0;m<v;++m)d[m]=m;var y=[],x=[],b=[],_=[];!function t(e,n,i,a,o,s){if(!a.length)return null;var l=y[o]||(y[o]=[]);var c=b[o]||(b[o]=[]);var u=x[o]||(x[o]=[]);var f=l.length;o++;if(o>r){for(var h=0;h<a.length;h++)l.push(a[h]),c.push(s),u.push(null,null,null,null);return f}l.push(a[0]);c.push(s);if(a.length<=1)return u.push(null,null,null,null),f;var p=.5*i;var d=e+p,v=n+p;var m=[],_=[],w=[],k=[];for(var M=1,A=a.length;M<A;M++){var T=a[M],S=g[2*T],C=g[2*T+1];S<d?C<v?m.push(T):_.push(T):C<v?w.push(T):k.push(T)}s<<=2;u.push(t(e,n,p,m,o,s),t(e,v,p,_,o,s+1),t(d,n,p,w,o,s+2),t(d,v,p,k,o,s+3));return f}(0,0,1,d,0,1);for(var w=0,k=0;k<y.length;k++){var M=y[k];if(d.set)d.set(M,w);else for(var A=0,T=M.length;A<T;A++)d[A+w]=M[A];var S=w+y[k].length;_[k]=[w,S],w=S}return d.range=function(){var e,r=[],o=arguments.length;for(;o--;)r[o]=arguments[o];if(u(r[r.length-1])){var c=r.pop();r.length||null==c.x&&null==c.l&&null==c.left||(r=[c],e={}),e=s(c,{level:\\\"level maxLevel\\\",d:\\\"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize\\\",lod:\\\"lod details ranges offsets\\\"})}else e={};r.length||(r=i);var f=a.apply(void 0,r),d=[Math.min(f.x,f.x+f.width),Math.min(f.y,f.y+f.height),Math.max(f.x,f.x+f.width),Math.max(f.y,f.y+f.height)],g=d[0],v=d[1],m=d[2],w=d[3],k=p([g,v,m,w],i),M=k[0],A=k[1],T=k[2],S=k[3],E=l(e.level,y.length);if(null!=e.d){var L;\\\"number\\\"==typeof e.d?L=[e.d,e.d]:e.d.length&&(L=e.d),E=Math.min(Math.max(Math.ceil(-h(Math.abs(L[0])/(i[2]-i[0]))),Math.ceil(-h(Math.abs(L[1])/(i[3]-i[1])))),E)}if(E=Math.min(E,y.length),e.lod)return function(t,e,r,i,a){for(var o=[],s=0;s<a;s++){var l=b[s],c=_[s][0],u=C(t,e,s),f=C(r,i,s),h=n.ge(l,u),p=n.gt(l,f,h,l.length-1);o[s]=[h+c,p+c]}return o}(M,A,T,S,E);var z=[];return function e(r,n,i,a,o,s){if(null!==o&&null!==s){var l=r+i,c=n+i;if(!(M>l||A>c||T<r||S<n||a>=E||o===s)){var u=y[a];void 0===s&&(s=u.length);for(var f=o;f<s;f++){var h=u[f],p=t[2*h],d=t[2*h+1];p>=g&&p<=m&&d>=v&&d<=w&&z.push(h)}var b=x[a],_=b[4*o+0],k=b[4*o+1],C=b[4*o+2],L=b[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(b,o+1),I=.5*i,P=a+1;e(r,n,I,P,_,k||C||L||O),e(r,n+I,I,P,k,C||L||O),e(r+I,n,I,P,C,L||O),e(r+I,n+I,I,P,L,O)}}}(0,0,1,0,0,1),z},d;function C(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s<r;s++)n<<=2,n+=t<i?e<a?0:1:e<a?2:3,o*=.5,i+=t<i?-o:o,a+=e<a?-o:o;return n}}},{\\\"array-bounds\\\":53,\\\"binary-search-bounds\\\":453,clamp:103,defined:149,dtype:154,\\\"flatten-vertex-data\\\":216,\\\"is-obj\\\":404,\\\"math-log2\\\":415,\\\"parse-rect\\\":442,\\\"pick-by-alias\\\":448}],455:[function(t,e,r){e.exports=function(t){for(var e=t.length,r=[],a=[],s=0;s<e;++s)for(var u=t[s],f=u.length,h=f-1,p=0;p<f;h=p++){var d=u[h],g=u[p];d[0]===g[0]?a.push([d,g]):r.push([d,g])}if(0===r.length)return 0===a.length?c:(v=l(a),function(t){return v(t[0],t[1])?0:1});var v;var m=i(r),y=function(t,e){return function(r){var i=o.le(e,r[0]);if(i<0)return 1;var a=t[i];if(!a){if(!(i>0&&e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]<l[1][0])if(c<0)a=a.left;else{if(!(c>0))return 0;s=-1,a=a.right}else if(c>0)a=a.left;else{if(!(c<0))return 0;s=1,a=a.right}}return s}}(m.slabs,m.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=t(\\\"robust-orientation\\\")[3],i=t(\\\"slab-decomposition\\\"),a=t(\\\"interval-tree-1d\\\"),o=t(\\\"binary-search-bounds\\\");function s(){return!0}function l(t){for(var e={},r=0;r<t.length;++r){var n=t[r],i=n[0][0],o=n[0][1],l=n[1][1],c=[Math.min(o,l),Math.max(o,l)];i in e?e[i].push(c):e[i]=[c]}var u={},f=Object.keys(e);for(r=0;r<f.length;++r){var h=e[f[r]];u[f[r]]=a(h)}return function(t){return function(e,r){var n=t[e];return!!n&&!!n.queryPoint(r,s)}}(u)}function c(t){return 1}},{\\\"binary-search-bounds\\\":79,\\\"interval-tree-1d\\\":397,\\\"robust-orientation\\\":486,\\\"slab-decomposition\\\":502}],456:[function(t,e,r){var n,i=t(\\\"./lib/build-log\\\"),a=t(\\\"./lib/epsilon\\\"),o=t(\\\"./lib/intersecter\\\"),s=t(\\\"./lib/segment-chainer\\\"),l=t(\\\"./lib/segment-selector\\\"),c=t(\\\"./lib/geojson\\\"),u=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(t){return!0===t?u=i():!1===t&&(u=!1),!1!==u&&u.list},epsilon:function(t){return f.epsilon(t)},segments:function(t){var e=o(!0,f,u);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,f,u).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,u),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,u),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,u),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,u),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,u),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,f,u),inverted:t.inverted}},polygonFromGeoJSON:function(t){return c.toPolygon(n,t)},polygonToGeoJSON:function(t){return c.fromPolygon(n,f,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},\\\"object\\\"==typeof window&&(window.PolyBool=n),e.exports=n},{\\\"./lib/build-log\\\":457,\\\"./lib/epsilon\\\":458,\\\"./lib/geojson\\\":459,\\\"./lib/intersecter\\\":460,\\\"./lib/segment-chainer\\\":462,\\\"./lib/segment-selector\\\":463}],457:[function(t,e,r){e.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n(\\\"check\\\",{seg1:t,seg2:e})},segmentChop:function(t,e){return n(\\\"div_seg\\\",{seg:t,pt:e}),n(\\\"chop\\\",{seg:t,pt:e})},statusRemove:function(t){return n(\\\"pop_seg\\\",{seg:t})},segmentUpdate:function(t){return n(\\\"seg_update\\\",{seg:t})},segmentNew:function(t,e){return n(\\\"new_seg\\\",{seg:t,primary:e})},segmentRemove:function(t){return n(\\\"rem_seg\\\",{seg:t})},tempStatus:function(t,e,r){return n(\\\"temp_status\\\",{seg:t,above:e,below:r})},rewind:function(t){return n(\\\"rewind\\\",{seg:t})},status:function(t,e,r){return n(\\\"status\\\",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n(\\\"vert\\\",{x:e}))},log:function(t){return\\\"string\\\"!=typeof t&&(t=JSON.stringify(t,!1,\\\"  \\\")),n(\\\"log\\\",{txt:t})},reset:function(){return n(\\\"reset\\\")},selected:function(t){return n(\\\"selected\\\",{segs:t})},chainStart:function(t){return n(\\\"chain_start\\\",{seg:t})},chainRemoveHead:function(t,e){return n(\\\"chain_rem_head\\\",{index:t,pt:e})},chainRemoveTail:function(t,e){return n(\\\"chain_rem_tail\\\",{index:t,pt:e})},chainNew:function(t,e){return n(\\\"chain_new\\\",{pt1:t,pt2:e})},chainMatch:function(t){return n(\\\"chain_match\\\",{index:t})},chainClose:function(t){return n(\\\"chain_close\\\",{index:t})},chainAddHead:function(t,e){return n(\\\"chain_add_head\\\",{index:t,pt:e})},chainAddTail:function(t,e){return n(\\\"chain_add_tail\\\",{index:t,pt:e})},chainConnect:function(t,e){return n(\\\"chain_con\\\",{index1:t,index2:e})},chainReverse:function(t){return n(\\\"chain_rev\\\",{index:t})},chainJoin:function(t,e){return n(\\\"chain_join\\\",{index1:t,index2:e})},done:function(){return n(\\\"done\\\")}}}},{}],458:[function(t,e,r){e.exports=function(t){\\\"number\\\"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return\\\"number\\\"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l<t||l-(a*a+s*s)>-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])<t},pointsSameY:function(e,r){return Math.abs(e[1]-r[1])<t},pointsSame:function(t,r){return e.pointsSameX(t,r)&&e.pointsSameY(t,r)},pointsCompare:function(t,r){return e.pointsSameX(t,r)?e.pointsSameY(t,r)?0:t[1]<r[1]?-1:1:t[0]<r[0]?-1:1},pointsCollinear:function(e,r,n){var i=e[0]-r[0],a=e[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(i*s-o*a)<t},linesIntersect:function(e,r,n,i){var a=r[0]-e[0],o=r[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],c=a*l-o*s;if(Math.abs(c)<t)return!1;var u=e[0]-n[0],f=e[1]-n[1],h=(s*f-l*u)/c,p=(a*f-o*u)/c,d={alongA:0,alongB:0,pt:[e[0]+h*a,e[1]+h*o]};return d.alongA=h<=-t?-2:h<t?-1:h-1<=-t?0:h-1<t?1:2,d.alongB=p<=-t?-2:p<t?-1:p-1<=-t?0:p-1<t?1:2,d},pointInsideRegion:function(e,r){for(var n=e[0],i=e[1],a=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l<r.length;l++){var c=r[l][0],u=r[l][1];u-i>t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],459:[function(t,e,r){var n={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i<e.length;i++)n=t.selectDifference(t.combine(n,r(e[i])));return n}if(\\\"Polygon\\\"===e.type)return t.polygon(r(e.coordinates));if(\\\"MultiPolygon\\\"===e.type){for(var n=t.segments({inverted:!1,regions:[]}),i=0;i<e.coordinates.length;i++)n=t.selectUnion(t.combine(n,r(e.coordinates[i])));return t.polygon(n)}throw new Error(\\\"PolyBool: Cannot convert GeoJSON object to PolyBool polygon\\\")},fromPolygon:function(t,e,r){function n(t,r){return e.pointInsideRegion([.5*(t[0][0]+t[1][0]),.5*(t[0][1]+t[1][1])],r)}function i(t){return{region:t,children:[]}}r=t.polygon(t.segments(r));var a=i(null);function o(t,e){for(var r=0;r<t.children.length;r++){if(n(e,(s=t.children[r]).region))return void o(s,e)}var a=i(e);for(r=0;r<t.children.length;r++){var s;n((s=t.children[r]).region,e)&&(a.children.push(s),t.children.splice(r,1),r--)}t.children.push(a)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(a,l)}function c(t,e){for(var r=0,n=t[t.length-1][0],i=t[t.length-1][1],a=[],o=0;o<t.length;o++){var s=t[o][0],l=t[o][1];a.push([s,l]),r+=l*n-s*i,n=s,i=l}return r<0!==e&&a.reverse(),a.push([a[0][0],a[0][1]]),a}var u=[];function f(t){var e=[c(t.region,!1)];u.push(e);for(var r=0;r<t.children.length;r++)e.push(h(t.children[r]))}function h(t){for(var e=0;e<t.children.length;e++)f(t.children[e]);return c(t.region,!0)}for(s=0;s<a.children.length;s++)f(a.children[s]);return u.length<=0?{type:\\\"Polygon\\\",coordinates:[]}:1==u.length?{type:\\\"Polygon\\\",coordinates:u[0]}:{type:\\\"MultiPolygon\\\",coordinates:u}}};e.exports=n},{}],460:[function(t,e,r){var n=t(\\\"./linked-list\\\");e.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var a=n.create();function o(t,r){a.insertBefore(t,function(n){return function(t,r,n,i,a,o){var s=e.pointsCompare(r,a);return 0!==s?s:e.pointsSame(n,o)?0:t!==i?t?1:-1:e.pointAboveOrOnLine(n,i?a:o,i?o:a)?1:-1}(t.isStart,t.pt,r,n.isStart,n.pt,n.other.pt)<0})}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return o(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,o(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,o(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,o){var s=n.create();function c(t){return s.findTransition(function(r){var n,i,a,o,s,l;return n=t,i=r.ev,a=n.seg.start,o=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(a,s,l)?e.pointsCollinear(o,s,l)?1:e.pointAboveOrOnLine(o,s,l)?1:-1:e.pointAboveOrOnLine(a,s,l)?1:-1)>0})}function u(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,c=a.start,u=a.end;r&&r.checkIntersection(i,a);var f=e.linesIntersect(o,s,c,u);if(!1===f){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var h=e.pointsSame(o,c),p=e.pointsSame(s,u);if(h&&p)return n;var d=!h&&e.pointBetween(o,c,u),g=!p&&e.pointBetween(s,c,u);if(h)return g?l(n,s):l(t,u),n;d&&(p||(g?l(n,s):l(t,u)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(t,c):0===f.alongB?l(t,f.pt):1===f.alongB&&l(t,u)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var f=[];!a.isEmpty();){var h=a.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var p=c(h),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function v(){if(d){var t=u(h,d);if(t)return t}return!!g&&u(h,g)}r&&r.tempStatus(h.seg,!!d&&d.seg,!!g&&g.seg);var m,y,x=v();if(x)t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=h.seg.myFill,r&&r.segmentUpdate(x.seg),h.other.remove(),h.remove();if(a.getHead()!==h){r&&r.rewind(h.seg);continue}t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=g?g.seg.myFill.above:i,h.seg.myFill.above=y?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&&(m=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:m,below:m}),r&&r.status(h.seg,!!d&&d.seg,!!g&&g.seg),h.other.status=p.insert(n.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error(\\\"PolyBool: Zero-length segment detected; your epsilon is probably too small or too large\\\");if(s.exists(b.prev)&&s.exists(b.next)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}f.push(h.seg)}a.getHead().remove()}return r&&r.done(),f}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l<t.length;l++){n=o,o=t[l];var c=e.pointsCompare(n,o);0!==c&&s((i=c<0?n:o,a=c<0?o:n,{id:r?r.segmentId():-1,start:i,end:a,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(t){return c(t,!1)}}:{calculate:function(t,e,r,n){return t.forEach(function(t){s(i(t.start,t.end,t),!0)}),r.forEach(function(t){s(i(t.start,t.end,t),!1)}),c(e,n)}}}},{\\\"./linked-list\\\":461}],461:[function(t,e,r){e.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},{}],462:[function(t,e,r){e.exports=function(t,e,r){var n=[],i=[];return t.forEach(function(t){var a=t.start,o=t.end;if(e.pointsSame(a,o))console.warn(\\\"PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large\\\");else{r&&r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u<n.length;u++){var f=(v=n[u])[0],h=(v[1],v[v.length-1]);if(v[v.length-2],e.pointsSame(f,a)){if(M(u,!0,!0))break}else if(e.pointsSame(f,o)){if(M(u,!0,!1))break}else if(e.pointsSame(h,a)){if(M(u,!1,!0))break}else if(e.pointsSame(h,o)&&M(u,!1,!1))break}if(c===s)return n.push([a,o]),void(r&&r.chainNew(a,o));if(c===l){r&&r.chainMatch(s.index);var p=s.index,d=s.matches_pt1?o:a,g=s.matches_head,v=n[p],m=g?v[0]:v[v.length-1],y=g?v[1]:v[v.length-2],x=g?v[v.length-1]:v[0],b=g?v[v.length-2]:v[1];return e.pointsCollinear(y,m,d)&&(g?(r&&r.chainRemoveHead(s.index,d),v.shift()):(r&&r.chainRemoveTail(s.index,d),v.pop()),m=y),e.pointsSame(x,d)?(n.splice(p,1),e.pointsCollinear(b,x,m)&&(g?(r&&r.chainRemoveTail(s.index,m),v.pop()):(r&&r.chainRemoveHead(s.index,m),v.shift())),r&&r.chainClose(s.index),void i.push(v)):void(g?(r&&r.chainAddHead(s.index,d),v.unshift(d)):(r&&r.chainAddTail(s.index,d),v.push(d)))}var _=s.index,w=l.index;r&&r.chainConnect(_,w);var k=n[_].length<n[w].length;s.matches_head?l.matches_head?k?(A(_),T(_,w)):(A(w),T(w,_)):T(w,_):l.matches_head?T(_,w):k?(A(_),T(w,_)):(A(w),T(_,w))}function M(t,e,r){return c.index=t,c.matches_head=e,c.matches_pt1=r,c===s?(c=l,!1):(c=null,!0)}function A(t){r&&r.chainReverse(t),n[t].reverse()}function T(t,i){var a=n[t],o=n[i],s=a[a.length-1],l=a[a.length-2],c=o[0],u=o[1];e.pointsCollinear(l,s,c)&&(r&&r.chainRemoveTail(t,s),a.pop(),s=l),e.pointsCollinear(s,c,u)&&(r&&r.chainRemoveHead(i,c),o.shift()),r&&r.chainJoin(t,i),n[t]=a.concat(o),n.splice(i,1)}}),i}},{}],463:[function(t,e,r){function n(t,e,r){var n=[];return t.forEach(function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})}),r&&r.selected(n),n}var i={union:function(t,e){return n(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],e)},intersect:function(t,e){return n(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],e)},difference:function(t,e){return n(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],e)},differenceRev:function(t,e){return n(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],e)},xor:function(t,e){return n(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],e)}};e.exports=i},{}],464:[function(t,e,r){\\\"use strict\\\";var n=new Float64Array(4),i=new Float64Array(4),a=new Float64Array(4);e.exports=function(t,e,r,o,s){n.length<o.length&&(n=new Float64Array(o.length),i=new Float64Array(o.length),a=new Float64Array(o.length));for(var l=0;l<o.length;++l)n[l]=t[l]-o[l],i[l]=e[l]-t[l],a[l]=r[l]-t[l];var c=0,u=0,f=0,h=0,p=0,d=0;for(l=0;l<o.length;++l){var g=i[l],v=a[l],m=n[l];c+=g*g,u+=g*v,f+=v*v,h+=m*g,p+=m*v,d+=m*m}var y,x,b,_,w,k=Math.abs(c*f-u*u),M=u*p-f*h,A=u*h-c*p;if(M+A<=k)if(M<0)A<0&&h<0?(A=0,-h>=c?(M=1,y=c+2*h+d):y=h*(M=-h/c)+d):(M=0,p>=0?(A=0,y=d):-p>=f?(A=1,y=f+2*p+d):y=p*(A=-p/f)+d);else if(A<0)A=0,h>=0?(M=0,y=d):-h>=c?(M=1,y=c+2*h+d):y=h*(M=-h/c)+d;else{var T=1/k;y=(M*=T)*(c*M+u*(A*=T)+2*h)+A*(u*M+f*A+2*p)+d}else M<0?(b=f+p)>(x=u+h)?(_=b-x)>=(w=c-2*u+f)?(M=1,A=0,y=c+2*h+d):y=(M=_/w)*(c*M+u*(A=1-M)+2*h)+A*(u*M+f*A+2*p)+d:(M=0,b<=0?(A=1,y=f+2*p+d):p>=0?(A=0,y=d):y=p*(A=-p/f)+d):A<0?(b=c+h)>(x=u+p)?(_=b-x)>=(w=c-2*u+f)?(A=1,M=0,y=f+2*p+d):y=(M=1-(A=_/w))*(c*M+u*A+2*h)+A*(u*M+f*A+2*p)+d:(A=0,b<=0?(M=1,y=c+2*h+d):h>=0?(M=0,y=d):y=h*(M=-h/c)+d):(_=f+p-u-h)<=0?(M=0,A=1,y=f+2*p+d):_>=(w=c-2*u+f)?(M=1,A=0,y=c+2*h+d):y=(M=_/w)*(c*M+u*(A=1-M)+2*h)+A*(u*M+f*A+2*p)+d;var S=1-M-A;for(l=0;l<o.length;++l)s[l]=S*t[l]+M*e[l]+A*r[l];return y<0?0:y}},{}],465:[function(t,e,r){var n,i,a=e.exports={};function o(){throw new Error(\\\"setTimeout has not been defined\\\")}function s(){throw new Error(\\\"clearTimeout has not been defined\\\")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n=\\\"function\\\"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i=\\\"function\\\"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var c,u=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!f){var t=l(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function v(){}a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new g(t,e)),1!==u.length||f||l(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title=\\\"browser\\\",a.browser=!0,a.env={},a.argv=[],a.version=\\\"\\\",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(t){return[]},a.binding=function(t){throw new Error(\\\"process.binding is not supported\\\")},a.cwd=function(){return\\\"/\\\"},a.chdir=function(t){throw new Error(\\\"process.chdir is not supported\\\")},a.umask=function(){return 0}},{}],466:[function(t,e,r){e.exports=t(\\\"gl-quat/slerp\\\")},{\\\"gl-quat/slerp\\\":280}],467:[function(t,e,r){(function(r){for(var n=t(\\\"performance-now\\\"),i=\\\"undefined\\\"==typeof window?r:window,a=[\\\"moz\\\",\\\"webkit\\\"],o=\\\"AnimationFrame\\\",s=i[\\\"request\\\"+o],l=i[\\\"cancel\\\"+o]||i[\\\"cancelRequest\\\"+o],c=0;!s&&c<a.length;c++)s=i[a[c]+\\\"Request\\\"+o],l=i[a[c]+\\\"Cancel\\\"+o]||i[a[c]+\\\"CancelRequest\\\"+o];if(!s||!l){var u=0,f=0,h=[];s=function(t){if(0===h.length){var e=n(),r=Math.max(0,1e3/60-(e-u));u=r+e,setTimeout(function(){var t=h.slice(0);h.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(u)}catch(t){setTimeout(function(){throw t},0)}},Math.round(r))}return h.push({handle:++f,callback:t,cancelled:!1}),f},l=function(t){for(var e=0;e<h.length;e++)h[e].handle===t&&(h[e].cancelled=!0)}}e.exports=function(t){return s.call(i,t)},e.exports.cancel=function(){l.apply(i,arguments)},e.exports.polyfill=function(t){t||(t=i),t.requestAnimationFrame=s,t.cancelAnimationFrame=l}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"performance-now\\\":445}],468:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"big-rat/add\\\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\\\"big-rat/add\\\":63}],469:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=new Array(t.length),r=0;r<t.length;++r)e[r]=n(t[r]);return e};var n=t(\\\"big-rat\\\")},{\\\"big-rat\\\":66}],470:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"big-rat\\\"),i=t(\\\"big-rat/mul\\\");e.exports=function(t,e){for(var r=n(e),a=t.length,o=new Array(a),s=0;s<a;++s)o[s]=i(t[s],r);return o}},{\\\"big-rat\\\":66,\\\"big-rat/mul\\\":75}],471:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"big-rat/sub\\\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\\\"big-rat/sub\\\":77}],472:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"compare-cell\\\"),i=t(\\\"compare-oriented-cell\\\"),a=t(\\\"cell-orientation\\\");e.exports=function(t){t.sort(i);for(var e=t.length,r=0,o=0;o<e;++o){var s=t[o],l=a(s);if(0!==l){if(r>0){var c=t[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{\\\"cell-orientation\\\":100,\\\"compare-cell\\\":116,\\\"compare-oriented-cell\\\":117}],473:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"array-bounds\\\"),i=t(\\\"color-normalize\\\"),a=t(\\\"update-diff\\\"),o=t(\\\"pick-by-alias\\\"),s=t(\\\"object-assign\\\"),l=t(\\\"flatten-vertex-data\\\"),c=t(\\\"to-float32\\\"),u=c.float32,f=c.fract32;e.exports=function(t,e){\\\"function\\\"==typeof t?(e||(e={}),e.regl=t):e=t;e.length&&(e.positions=e);if(!(t=e.regl).hasExtension(\\\"ANGLE_instanced_arrays\\\"))throw Error(\\\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\\\");var r,c,p,d,g,v,m=t._gl,y={color:\\\"black\\\",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:\\\"dynamic\\\",type:\\\"uint8\\\",data:new Uint8Array(0)}),c=t.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array(0)}),p=t.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array(0)}),g=t.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array(0)}),v=t.buffer({usage:\\\"static\\\",type:\\\"float\\\",data:h}),k(e),r=t({vert:\\\"\\\\n\\\\t\\\\tprecision highp float;\\\\n\\\\n\\\\t\\\\tattribute vec2 position, positionFract;\\\\n\\\\t\\\\tattribute vec4 error;\\\\n\\\\t\\\\tattribute vec4 color;\\\\n\\\\n\\\\t\\\\tattribute vec2 direction, lineOffset, capOffset;\\\\n\\\\n\\\\t\\\\tuniform vec4 viewport;\\\\n\\\\t\\\\tuniform float lineWidth, capSize;\\\\n\\\\t\\\\tuniform vec2 scale, scaleFract, translate, translateFract;\\\\n\\\\n\\\\t\\\\tvarying vec4 fragColor;\\\\n\\\\n\\\\t\\\\tvoid main() {\\\\n\\\\t\\\\t\\\\tfragColor = color / 255.;\\\\n\\\\n\\\\t\\\\t\\\\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\\\\n\\\\n\\\\t\\\\t\\\\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\\\\n\\\\n\\\\t\\\\t\\\\tvec2 position = position + dxy;\\\\n\\\\n\\\\t\\\\t\\\\tvec2 pos = (position + translate) * scale\\\\n\\\\t\\\\t\\\\t\\\\t+ (positionFract + translateFract) * scale\\\\n\\\\t\\\\t\\\\t\\\\t+ (position + translate) * scaleFract\\\\n\\\\t\\\\t\\\\t\\\\t+ (positionFract + translateFract) * scaleFract;\\\\n\\\\n\\\\t\\\\t\\\\tpos += pixelOffset / viewport.zw;\\\\n\\\\n\\\\t\\\\t\\\\tgl_Position = vec4(pos * 2. - 1., 0, 1);\\\\n\\\\t\\\\t}\\\\n\\\\t\\\\t\\\",frag:\\\"\\\\n\\\\t\\\\tprecision mediump float;\\\\n\\\\n\\\\t\\\\tvarying vec4 fragColor;\\\\n\\\\n\\\\t\\\\tuniform float opacity;\\\\n\\\\n\\\\t\\\\tvoid main() {\\\\n\\\\t\\\\t\\\\tgl_FragColor = fragColor;\\\\n\\\\t\\\\t\\\\tgl_FragColor.a *= opacity;\\\\n\\\\t\\\\t}\\\\n\\\\t\\\\t\\\",uniforms:{range:t.prop(\\\"range\\\"),lineWidth:t.prop(\\\"lineWidth\\\"),capSize:t.prop(\\\"capSize\\\"),opacity:t.prop(\\\"opacity\\\"),scale:t.prop(\\\"scale\\\"),translate:t.prop(\\\"translate\\\"),scaleFract:t.prop(\\\"scaleFract\\\"),translateFract:t.prop(\\\"translateFract\\\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:v,stride:24,offset:0},lineOffset:{buffer:v,stride:24,offset:8},capOffset:{buffer:v,stride:24,offset:16}},primitive:\\\"triangles\\\",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\\\"add\\\",alpha:\\\"add\\\"},func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:\\\"one minus dst alpha\\\",dstAlpha:\\\"one\\\"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop(\\\"viewport\\\")},viewport:t.prop(\\\"viewport\\\"),stencil:!1,instances:t.prop(\\\"count\\\"),count:h.length}),s(b,{update:k,draw:_,destroy:M,regl:t,gl:m,canvas:m.canvas,groups:x}),b;function b(t){t?k(t):null===t&&M(),_()}function _(e){if(\\\"number\\\"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),x.forEach(function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)})}function w(t){\\\"number\\\"==typeof t&&(t=x[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?\\\"number\\\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map(function(t,c){var u=x[c];return t?(\\\"function\\\"==typeof t?t={after:t}:\\\"number\\\"==typeof t[0]&&(t={positions:t}),t=o(t,{color:\\\"color colors fill\\\",capSize:\\\"capSize cap capsize cap-size\\\",lineWidth:\\\"lineWidth line-width width line thickness\\\",opacity:\\\"opacity alpha\\\",range:\\\"range dataBox\\\",viewport:\\\"viewport viewBox\\\",errors:\\\"errors error\\\",positions:\\\"positions position data points\\\"}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,\\\"float64\\\"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t=\\\"transparent\\\"),!Array.isArray(t)||\\\"number\\\"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a<r;a++)t[a]=n}if(t.length<r)throw Error(\\\"Not enough colors\\\");for(var o=new Uint8Array(4*r),s=0;s<r;s++){var l=i(t[s],\\\"uint8\\\");o.set(l,4*s)}return o},range:function(t,e,r){var n=e.bounds;return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=f(e.scale),e.translateFract=f(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:m.drawingBufferWidth,height:m.drawingBufferHeight},e}}]),u):u}),e||r){var h=x.reduce(function(t,e,r){return t+(e?e.count:0)},0),v=new Float64Array(2*h),_=new Uint8Array(4*h),w=new Float32Array(4*h);x.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset,a=t.color,o=t.errors;n&&(_.set(a,4*i),w.set(o,4*i),v.set(r,2*i))}}),c(u(v)),p(f(v)),d(_),g(w)}}}function M(){c.destroy(),p.destroy(),d.destroy(),g.destroy(),v.destroy()}};var h=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]},{\\\"array-bounds\\\":53,\\\"color-normalize\\\":108,\\\"flatten-vertex-data\\\":216,\\\"object-assign\\\":437,\\\"pick-by-alias\\\":448,\\\"to-float32\\\":515,\\\"update-diff\\\":526}],474:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-normalize\\\"),i=t(\\\"array-bounds\\\"),a=t(\\\"object-assign\\\"),o=t(\\\"glslify\\\"),s=t(\\\"pick-by-alias\\\"),l=t(\\\"flatten-vertex-data\\\"),c=t(\\\"earcut\\\"),u=t(\\\"array-normalize\\\"),f=t(\\\"to-float32\\\"),h=f.float32,p=f.fract32,d=t(\\\"es6-weak-map\\\"),g=t(\\\"parse-rect\\\");function v(t,e){if(!(this instanceof v))return new v(t,e);if(\\\"function\\\"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension(\\\"ANGLE_instanced_arrays\\\"))throw Error(\\\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\\\");this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=v.shaders.has(t)?v.shaders.get(t):v.shaders.set(t,v.createShaders(t)).get(t),this.update(e)}e.exports=v,v.dashMult=2,v.maxPatternLength=256,v.precisionThreshold=3e6,v.maxPoints=1e4,v.maxLines=2048,v.shaders=new d,v.createShaders=function(t){var e,r=t.buffer({usage:\\\"static\\\",type:\\\"float\\\",data:[0,1,0,0,1,1,1,0]}),n={primitive:\\\"triangle strip\\\",instances:t.prop(\\\"count\\\"),count:4,offset:0,uniforms:{miterMode:function(t,e){return\\\"round\\\"===e.join?2:1},miterLimit:t.prop(\\\"miterLimit\\\"),scale:t.prop(\\\"scale\\\"),scaleFract:t.prop(\\\"scaleFract\\\"),translateFract:t.prop(\\\"translateFract\\\"),translate:t.prop(\\\"translate\\\"),thickness:t.prop(\\\"thickness\\\"),dashPattern:t.prop(\\\"dashTexture\\\"),opacity:t.prop(\\\"opacity\\\"),pixelRatio:t.context(\\\"pixelRatio\\\"),id:t.prop(\\\"id\\\"),dashSize:t.prop(\\\"dashLength\\\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop(\\\"depth\\\")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\\\"add\\\",alpha:\\\"add\\\"},func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:\\\"one minus dst alpha\\\",dstAlpha:\\\"one\\\"}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop(\\\"viewport\\\")},viewport:t.prop(\\\"viewport\\\")},i=t(a({vert:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\\\\nattribute vec4 color;\\\\nattribute float lineEnd, lineTop;\\\\n\\\\nuniform vec2 scale, scaleFract, translate, translateFract;\\\\nuniform float thickness, pixelRatio, id, depth;\\\\nuniform vec4 viewport;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec2 tangent;\\\\n\\\\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\\\\n\\\\t// the order is important\\\\n\\\\treturn position * scale + translate\\\\n       + positionFract * scale + translateFract\\\\n       + position * scaleFract\\\\n       + positionFract * scaleFract;\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\tfloat lineStart = 1. - lineEnd;\\\\n\\\\tfloat lineOffset = lineTop * 2. - 1.;\\\\n\\\\n\\\\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\\\\n\\\\ttangent = normalize(diff * scale * viewport.zw);\\\\n\\\\tvec2 normal = vec2(-tangent.y, tangent.x);\\\\n\\\\n\\\\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\\\\n\\\\t\\\\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\\\\n\\\\n\\\\t\\\\t+ thickness * normal * .5 * lineOffset / viewport.zw;\\\\n\\\\n\\\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\\\n\\\\n\\\\tfragColor = color / 255.;\\\\n}\\\\n\\\"]),frag:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform sampler2D dashPattern;\\\\n\\\\nuniform float dashSize, pixelRatio, thickness, opacity, id;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec2 tangent;\\\\n\\\\nvoid main() {\\\\n\\\\tfloat alpha = 1.;\\\\n\\\\n\\\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\\\\n\\\\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\\\\n\\\\n\\\\tgl_FragColor = fragColor;\\\\n\\\\tgl_FragColor.a *= alpha * opacity * dash;\\\\n}\\\\n\\\"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop(\\\"positionFractBuffer\\\"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop(\\\"positionFractBuffer\\\"),stride:8,offset:16,divisor:1},color:{buffer:t.prop(\\\"colorBuffer\\\"),stride:4,offset:0,divisor:1}}},n));try{e=t(a({cull:{enable:!0,face:\\\"back\\\"},vert:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\\\\nattribute vec4 aColor, bColor;\\\\nattribute float lineEnd, lineTop;\\\\n\\\\nuniform vec2 scale, translate;\\\\nuniform float thickness, pixelRatio, id, depth;\\\\nuniform vec4 viewport;\\\\nuniform float miterLimit, miterMode;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec4 startCutoff, endCutoff;\\\\nvarying vec2 tangent;\\\\nvarying vec2 startCoord, endCoord;\\\\nvarying float enableStartMiter, enableEndMiter;\\\\n\\\\nconst float REVERSE_THRESHOLD = -.875;\\\\nconst float MIN_DIFF = 1e-6;\\\\n\\\\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\\\\n// TODO: precalculate dot products, normalize things beforehead etc.\\\\n// TODO: refactor to rectangular algorithm\\\\n\\\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\\\n\\\\tvec2 diff = b - a;\\\\n\\\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\\\n\\\\treturn dot(p - a, perp);\\\\n}\\\\n\\\\nbool isNaN( float val ){\\\\n  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\\\\n\\\\n  vec2 adjustedScale;\\\\n  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\\\\n  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\\\\n\\\\n  vec2 scaleRatio = adjustedScale * viewport.zw;\\\\n\\\\tvec2 normalWidth = thickness / scaleRatio;\\\\n\\\\n\\\\tfloat lineStart = 1. - lineEnd;\\\\n\\\\tfloat lineBot = 1. - lineTop;\\\\n\\\\n\\\\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\\\\n\\\\n\\\\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\\\\n\\\\n\\\\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\\\\n\\\\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\\\\n\\\\n\\\\tvec2 prevDiff = aCoord - prevCoord;\\\\n\\\\tvec2 currDiff = bCoord - aCoord;\\\\n\\\\tvec2 nextDiff = nextCoord - bCoord;\\\\n\\\\n\\\\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\\\\n\\\\tvec2 currTangent = normalize(currDiff * scaleRatio);\\\\n\\\\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\\\\n\\\\n\\\\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\\\\n\\\\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\\\\n\\\\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\\\\n\\\\n\\\\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\\\\n\\\\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\\\\n\\\\n\\\\t// collapsed/unidirectional segment cases\\\\n\\\\t// FIXME: there should be more elegant solution\\\\n\\\\tvec2 prevTanDiff = abs(prevTangent - currTangent);\\\\n\\\\tvec2 nextTanDiff = abs(nextTangent - currTangent);\\\\n\\\\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\\\\n\\\\t\\\\tstartJoinDirection = currNormal;\\\\n\\\\t}\\\\n\\\\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\\\\n\\\\t\\\\tendJoinDirection = currNormal;\\\\n\\\\t}\\\\n\\\\tif (aCoord == bCoord) {\\\\n\\\\t\\\\tendJoinDirection = startJoinDirection;\\\\n\\\\t\\\\tcurrNormal = prevNormal;\\\\n\\\\t\\\\tcurrTangent = prevTangent;\\\\n\\\\t}\\\\n\\\\n\\\\ttangent = currTangent;\\\\n\\\\n\\\\t//calculate join shifts relative to normals\\\\n\\\\tfloat startJoinShift = dot(currNormal, startJoinDirection);\\\\n\\\\tfloat endJoinShift = dot(currNormal, endJoinDirection);\\\\n\\\\n\\\\tfloat startMiterRatio = abs(1. / startJoinShift);\\\\n\\\\tfloat endMiterRatio = abs(1. / endJoinShift);\\\\n\\\\n\\\\tvec2 startJoin = startJoinDirection * startMiterRatio;\\\\n\\\\tvec2 endJoin = endJoinDirection * endMiterRatio;\\\\n\\\\n\\\\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\\\\n\\\\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\\\\n\\\\tstartBotJoin = -startTopJoin;\\\\n\\\\n\\\\tendTopJoin = sign(endJoinShift) * endJoin * .5;\\\\n\\\\tendBotJoin = -endTopJoin;\\\\n\\\\n\\\\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\\\\n\\\\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\\\\n\\\\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\\\\n\\\\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\\\\n\\\\n\\\\t//miter anti-clipping\\\\n\\\\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\\\\n\\\\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\\\\n\\\\n\\\\t//prevent close to reverse direction switch\\\\n\\\\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);\\\\n\\\\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);\\\\n\\\\n\\\\tif (prevReverse) {\\\\n\\\\t\\\\t//make join rectangular\\\\n\\\\t\\\\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\\\\n\\\\t\\\\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\\\\n\\\\t\\\\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\\\n\\\\t\\\\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\\\n\\\\t}\\\\n\\\\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\\\\n\\\\t\\\\t//handle miter clipping\\\\n\\\\t\\\\tbTopCoord -= normalWidth * endTopJoin;\\\\n\\\\t\\\\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\\\\n\\\\t}\\\\n\\\\n\\\\tif (nextReverse) {\\\\n\\\\t\\\\t//make join rectangular\\\\n\\\\t\\\\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\\\\n\\\\t\\\\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\\\\n\\\\t\\\\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\\\n\\\\t\\\\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\\\n\\\\t}\\\\n\\\\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\\\\n\\\\t\\\\t//handle miter clipping\\\\n\\\\t\\\\taBotCoord -= normalWidth * startBotJoin;\\\\n\\\\t\\\\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\\\\n\\\\t}\\\\n\\\\n\\\\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\\\\n\\\\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\\\\n\\\\n\\\\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\\\\n\\\\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\\\\n\\\\n\\\\t//position is normalized 0..1 coord on the screen\\\\n\\\\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\\\\n\\\\n\\\\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\\\\n\\\\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\\\\n\\\\n\\\\tgl_Position = vec4(position  * 2.0 - 1.0, depth, 1);\\\\n\\\\n\\\\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\\\\n\\\\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\\\\n\\\\n\\\\t//bevel miter cutoffs\\\\n\\\\tif (miterMode == 1.) {\\\\n\\\\t\\\\tif (enableStartMiter == 1.) {\\\\n\\\\t\\\\t\\\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\\\\n\\\\t\\\\t\\\\tstartCutoff = vec4(aCoord, aCoord);\\\\n\\\\t\\\\t\\\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\\\n\\\\t\\\\t\\\\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\\\n\\\\t\\\\t\\\\tstartCutoff += viewport.xyxy;\\\\n\\\\t\\\\t\\\\tstartCutoff += startMiterWidth.xyxy;\\\\n\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\tif (enableEndMiter == 1.) {\\\\n\\\\t\\\\t\\\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\\\\n\\\\t\\\\t\\\\tendCutoff = vec4(bCoord, bCoord);\\\\n\\\\t\\\\t\\\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\\\\n\\\\t\\\\t\\\\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\\\n\\\\t\\\\t\\\\tendCutoff += viewport.xyxy;\\\\n\\\\t\\\\t\\\\tendCutoff += endMiterWidth.xyxy;\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n\\\\n\\\\t//round miter cutoffs\\\\n\\\\telse if (miterMode == 2.) {\\\\n\\\\t\\\\tif (enableStartMiter == 1.) {\\\\n\\\\t\\\\t\\\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\\\\n\\\\t\\\\t\\\\tstartCutoff = vec4(aCoord, aCoord);\\\\n\\\\t\\\\t\\\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\\\n\\\\t\\\\t\\\\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\\\n\\\\t\\\\t\\\\tstartCutoff += viewport.xyxy;\\\\n\\\\t\\\\t\\\\tstartCutoff += startMiterWidth.xyxy;\\\\n\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\tif (enableEndMiter == 1.) {\\\\n\\\\t\\\\t\\\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\\\\n\\\\t\\\\t\\\\tendCutoff = vec4(bCoord, bCoord);\\\\n\\\\t\\\\t\\\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\\\\n\\\\t\\\\t\\\\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\\\n\\\\t\\\\t\\\\tendCutoff += viewport.xyxy;\\\\n\\\\t\\\\t\\\\tendCutoff += endMiterWidth.xyxy;\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n}\\\\n\\\"]),frag:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nuniform sampler2D dashPattern;\\\\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\\\\n\\\\nvarying vec4 fragColor;\\\\nvarying vec2 tangent;\\\\nvarying vec4 startCutoff, endCutoff;\\\\nvarying vec2 startCoord, endCoord;\\\\nvarying float enableStartMiter, enableEndMiter;\\\\n\\\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\\\n\\\\tvec2 diff = b - a;\\\\n\\\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\\\n\\\\treturn dot(p - a, perp);\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\tfloat alpha = 1., distToStart, distToEnd;\\\\n\\\\tfloat cutoff = thickness * .5;\\\\n\\\\n\\\\t//bevel miter\\\\n\\\\tif (miterMode == 1.) {\\\\n\\\\t\\\\tif (enableStartMiter == 1.) {\\\\n\\\\t\\\\t\\\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\\\n\\\\t\\\\t\\\\tif (distToStart < -1.) {\\\\n\\\\t\\\\t\\\\t\\\\tdiscard;\\\\n\\\\t\\\\t\\\\t\\\\treturn;\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t\\\\talpha *= min(max(distToStart + 1., 0.), 1.);\\\\n\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\tif (enableEndMiter == 1.) {\\\\n\\\\t\\\\t\\\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\\\n\\\\t\\\\t\\\\tif (distToEnd < -1.) {\\\\n\\\\t\\\\t\\\\t\\\\tdiscard;\\\\n\\\\t\\\\t\\\\t\\\\treturn;\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t\\\\talpha *= min(max(distToEnd + 1., 0.), 1.);\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n\\\\n\\\\t// round miter\\\\n\\\\telse if (miterMode == 2.) {\\\\n\\\\t\\\\tif (enableStartMiter == 1.) {\\\\n\\\\t\\\\t\\\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\\\n\\\\t\\\\t\\\\tif (distToStart < 0.) {\\\\n\\\\t\\\\t\\\\t\\\\tfloat radius = length(gl_FragCoord.xy - startCoord);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tif(radius > cutoff + .5) {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdiscard;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treturn;\\\\n\\\\t\\\\t\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\t\\\\t\\\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\tif (enableEndMiter == 1.) {\\\\n\\\\t\\\\t\\\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\\\n\\\\t\\\\t\\\\tif (distToEnd < 0.) {\\\\n\\\\t\\\\t\\\\t\\\\tfloat radius = length(gl_FragCoord.xy - endCoord);\\\\n\\\\n\\\\t\\\\t\\\\t\\\\tif(radius > cutoff + .5) {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdiscard;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treturn;\\\\n\\\\t\\\\t\\\\t\\\\t}\\\\n\\\\n\\\\t\\\\t\\\\t\\\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n\\\\n\\\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\\\\n\\\\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\\\\n\\\\n\\\\tgl_FragColor = fragColor;\\\\n\\\\tgl_FragColor.a *= alpha * opacity * dash;\\\\n}\\\\n\\\"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop(\\\"colorBuffer\\\"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop(\\\"colorBuffer\\\"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:\\\"triangle\\\",elements:function(t,e){return e.triangles},offset:0,vert:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec2 position, positionFract;\\\\n\\\\nuniform vec4 color;\\\\nuniform vec2 scale, scaleFract, translate, translateFract;\\\\nuniform float pixelRatio, id;\\\\nuniform vec4 viewport;\\\\nuniform float opacity;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nconst float MAX_LINES = 256.;\\\\n\\\\nvoid main() {\\\\n\\\\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\\\\n\\\\n\\\\tvec2 position = position * scale + translate\\\\n       + positionFract * scale + translateFract\\\\n       + position * scaleFract\\\\n       + positionFract * scaleFract;\\\\n\\\\n\\\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\\\n\\\\n\\\\tfragColor = color / 255.;\\\\n\\\\tfragColor.a *= opacity;\\\\n}\\\\n\\\"]),frag:o([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n\\\\tgl_FragColor = fragColor;\\\\n}\\\\n\\\"]),uniforms:{scale:t.prop(\\\"scale\\\"),color:t.prop(\\\"fill\\\"),scaleFract:t.prop(\\\"scaleFract\\\"),translateFract:t.prop(\\\"translateFract\\\"),translate:t.prop(\\\"translate\\\"),opacity:t.prop(\\\"opacity\\\"),pixelRatio:t.context(\\\"pixelRatio\\\"),id:t.prop(\\\"id\\\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop(\\\"positionBuffer\\\"),stride:8,offset:8},positionFract:{buffer:t.prop(\\\"positionFractBuffer\\\"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},v.defaults={dashes:null,join:\\\"miter\\\",miterLimit:1,thickness:10,cap:\\\"square\\\",color:\\\"black\\\",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},v.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},v.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach(function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);\\\"number\\\"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>v.precisionThreshold||e.scale[1]*e.viewport.height>v.precisionThreshold?t.shaders.rect(e):\\\"rect\\\"===e.join||!e.join&&(e.thickness<=2||e.count>=v.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))}),this},v.prototype.update=function(t){var e=this;if(t){null!=t.length?\\\"number\\\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach(function(t,f){var d=e.passes[f];if(void 0!==t)if(null!==t){if(\\\"number\\\"==typeof t[0]&&(t={positions:t}),t=s(t,{positions:\\\"positions points data coords\\\",thickness:\\\"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth\\\",join:\\\"lineJoin linejoin join type mode\\\",miterLimit:\\\"miterlimit miterLimit\\\",dashes:\\\"dash dashes dasharray dash-array dashArray\\\",color:\\\"color colour stroke colors colours stroke-color strokeColor\\\",fill:\\\"fill fill-color fillColor\\\",opacity:\\\"alpha opacity\\\",overlay:\\\"overlay crease overlap intersect\\\",close:\\\"closed close closed-path closePath\\\",range:\\\"range dataBox\\\",viewport:\\\"viewport viewBox\\\",hole:\\\"holes hole hollow\\\"}),d||(e.passes[f]=d={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:\\\"linear\\\",min:\\\"linear\\\"}),colorBuffer:r.buffer({usage:\\\"dynamic\\\",type:\\\"uint8\\\",data:new Uint8Array}),positionBuffer:r.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array})},t=a({},v.defaults,t)),null!=t.thickness&&(d.thickness=parseFloat(t.thickness)),null!=t.opacity&&(d.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(d.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(d.overlay=!!t.overlay,f<v.maxLines&&(d.depth=2*(v.maxLines-1-f%v.maxLines)/v.maxLines-1)),null!=t.join&&(d.join=t.join),null!=t.hole&&(d.hole=t.hole),null!=t.fill&&(d.fill=t.fill?n(t.fill,\\\"uint8\\\"):null),null!=t.viewport&&(d.viewport=g(t.viewport)),d.viewport||(d.viewport=g([o.drawingBufferWidth,o.drawingBufferHeight])),null!=t.close&&(d.close=t.close),null===t.positions&&(t.positions=[]),t.positions){var m,y;if(t.positions.x&&t.positions.y){var x=t.positions.x,b=t.positions.y;y=d.count=Math.max(x.length,b.length),m=new Float64Array(2*y);for(var _=0;_<y;_++)m[2*_]=x[_],m[2*_+1]=b[_]}else m=l(t.positions,\\\"float64\\\"),y=d.count=Math.floor(m.length/2);var w=d.bounds=i(m,2);if(d.fill){for(var k=[],M={},A=0,T=0,S=0,C=d.count;T<C;T++){var E=m[2*T],L=m[2*T+1];isNaN(E)||isNaN(L)||null==E||null==L?(E=m[2*A],L=m[2*A+1],M[T]=A):A=T,k[S++]=E,k[S++]=L}for(var z=c(k,d.hole||[]),O=0,I=z.length;O<I;O++)null!=M[z[O]]&&(z[O]=M[z[O]]);d.triangles=z}var P=new Float64Array(m);u(P,2,w);var D=new Float64Array(2*y+6);d.close?m[0]===m[2*y-2]&&m[1]===m[2*y-1]?(D[0]=P[2*y-4],D[1]=P[2*y-3]):(D[0]=P[2*y-2],D[1]=P[2*y-1]):(D[0]=P[0],D[1]=P[1]),D.set(P,2),d.close?m[0]===m[2*y-2]&&m[1]===m[2*y-1]?(D[2*y+2]=P[2],D[2*y+3]=P[3],d.count-=1):(D[2*y+2]=P[0],D[2*y+3]=P[1],D[2*y+4]=P[2],D[2*y+5]=P[3]):(D[2*y+2]=P[2*y-2],D[2*y+3]=P[2*y-1],D[2*y+4]=P[2*y-2],D[2*y+5]=P[2*y-1]),d.positionBuffer(h(D)),d.positionFractBuffer(p(D))}if(t.range?d.range=t.range:d.range||(d.range=d.bounds),(t.range||t.positions)&&d.count){var R=d.bounds,B=R[2]-R[0],F=R[3]-R[1],N=d.range[2]-d.range[0],j=d.range[3]-d.range[1];d.scale=[B/N,F/j],d.translate=[-d.range[0]/N+R[0]/N||0,-d.range[1]/j+R[1]/j||0],d.scaleFract=p(d.scale),d.translateFract=p(d.translate)}if(t.dashes){var V,U=0;if(!t.dashes||t.dashes.length<2)U=1,V=new Uint8Array([255,255,255,255,255,255,255,255]);else{U=0;for(var q=0;q<t.dashes.length;++q)U+=t.dashes[q];V=new Uint8Array(U*v.dashMult);for(var H=0,G=255,W=0;W<2;W++)for(var Y=0;Y<t.dashes.length;++Y){for(var X=0,Z=t.dashes[Y]*v.dashMult*.5;X<Z;++X)V[H++]=G;G^=255}}d.dashLength=U,d.dashTexture({channels:1,data:V,width:V.length,height:1,mag:\\\"linear\\\",min:\\\"linear\\\"},0,0)}if(t.color){var $=d.count,J=t.color;J||(J=\\\"transparent\\\");var K=new Uint8Array(4*$+4);if(Array.isArray(J)&&\\\"number\\\"!=typeof J[0]){for(var Q=0;Q<$;Q++){var tt=n(J[Q],\\\"uint8\\\");K.set(tt,4*Q)}K.set(n(J[0],\\\"uint8\\\"),4*$)}else for(var et=n(J,\\\"uint8\\\"),rt=0;rt<$+1;rt++)K.set(et,4*rt);d.colorBuffer({usage:\\\"dynamic\\\",type:\\\"uint8\\\",data:K})}}else e.passes[f]=null}),t.length<this.passes.length){for(var f=t.length;f<this.passes.length;f++){var d=e.passes[f];d&&(d.colorBuffer.destroy(),d.positionBuffer.destroy(),d.dashTexture.destroy())}this.passes.length=t.length}for(var m=[],y=0;y<this.passes.length;y++)null!==e.passes[y]&&m.push(e.passes[y]);return this.passes=m,this}},v.prototype.destroy=function(){return this.passes.forEach(function(t){t.colorBuffer.destroy(),t.positionBuffer.destroy(),t.dashTexture.destroy()}),this.passes.length=0,this}},{\\\"array-bounds\\\":53,\\\"array-normalize\\\":54,\\\"color-normalize\\\":108,earcut:156,\\\"es6-weak-map\\\":209,\\\"flatten-vertex-data\\\":216,glslify:392,\\\"object-assign\\\":437,\\\"parse-rect\\\":442,\\\"pick-by-alias\\\":448,\\\"to-float32\\\":515}],475:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scatter\\\"),i=t(\\\"object-assign\\\");e.exports=function(t,e){var r=new n(t,e),a=r.render.bind(r);return i(a,{render:a,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),a}},{\\\"./scatter\\\":476,\\\"object-assign\\\":437}],476:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-normalize\\\"),i=t(\\\"array-bounds\\\"),a=t(\\\"color-id\\\"),o=t(\\\"point-cluster\\\"),s=t(\\\"object-assign\\\"),l=t(\\\"glslify\\\"),c=t(\\\"pick-by-alias\\\"),u=t(\\\"update-diff\\\"),f=t(\\\"flatten-vertex-data\\\"),h=t(\\\"is-iexplorer\\\"),p=t(\\\"to-float32\\\"),d=t(\\\"parse-rect\\\");function g(t,e){var r=this;if(!(this instanceof g))return new g(t,e);\\\"function\\\"==typeof t?(e||(e={}),e.regl=t):(e=t,t=null),e&&e.length&&(e.positions=e);var n,i=(t=e.regl)._gl,a=[];this.tooManyColors=h,n=t.texture({data:new Uint8Array(1020),width:255,height:1,type:\\\"uint8\\\",format:\\\"rgba\\\",wrapS:\\\"clamp\\\",wrapT:\\\"clamp\\\",mag:\\\"nearest\\\",min:\\\"nearest\\\"}),s(this,{regl:t,gl:i,groups:[],markerCache:[null],markerTextures:[null],palette:a,paletteIds:{},paletteTexture:n,maxColors:255,maxSize:100,canvas:i.canvas}),this.update(e);var o={uniforms:{pixelRatio:t.context(\\\"pixelRatio\\\"),palette:n,paletteSize:function(t,e){return[r.tooManyColors?0:255,n.height]},scale:t.prop(\\\"scale\\\"),scaleFract:t.prop(\\\"scaleFract\\\"),translate:t.prop(\\\"translate\\\"),translateFract:t.prop(\\\"translateFract\\\"),opacity:t.prop(\\\"opacity\\\"),marker:t.prop(\\\"markerTexture\\\")},attributes:{x:function(t,e){return e.xAttr||{buffer:e.positionBuffer,stride:8,offset:0}},y:function(t,e){return e.yAttr||{buffer:e.positionBuffer,stride:8,offset:4}},xFract:function(t,e){return e.xAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:0}},yFract:function(t,e){return e.yAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:4}},size:function(t,e){return e.size.length?{buffer:e.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*e.size/r.maxSize)]}},borderSize:function(t,e){return e.borderSize.length?{buffer:e.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*e.borderSize/r.maxSize)]}},colorId:function(t,e){return e.color.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(4*e.color,4*e.color+4):[e.color]}},borderColorId:function(t,e){return e.borderColor.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(4*e.borderColor,4*e.borderColor+4):[e.borderColor]}},isActive:function(t,e){return!0===e.activation?{constant:[1]}:e.activation?e.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:\\\"one minus dst alpha\\\",dstAlpha:\\\"one\\\"}},scissor:{enable:!0,box:t.prop(\\\"viewport\\\")},viewport:t.prop(\\\"viewport\\\"),stencil:{enable:!1},depth:{enable:!1},elements:t.prop(\\\"elements\\\"),count:t.prop(\\\"count\\\"),offset:t.prop(\\\"offset\\\"),primitive:\\\"points\\\"},c=s({},o);c.frag=l([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor, fragBorderColor;\\\\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\\\\n\\\\nuniform sampler2D marker;\\\\nuniform float pixelRatio, opacity;\\\\n\\\\nfloat smoothStep(float x, float y) {\\\\n  return 1.0 / (1.0 + exp(50.0*(x - y)));\\\\n}\\\\n\\\\nvoid main() {\\\\n  float dist = texture2D(marker, gl_PointCoord).r, delta = fragWidth;\\\\n\\\\n  // max-distance alpha\\\\n  if (dist < 0.003) discard;\\\\n\\\\n  // null-border case\\\\n  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\\\\n    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\\\\n    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);\\\\n  }\\\\n  else {\\\\n    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\\\\n    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\\\\n\\\\n    vec4 color = fragBorderColor;\\\\n    color.a *= borderColorAmt;\\\\n    color = mix(color, fragColor, colorAmt);\\\\n    color.a *= opacity;\\\\n\\\\n    gl_FragColor = color;\\\\n  }\\\\n\\\\n}\\\\n\\\"]),c.vert=l([\\\"precision mediump float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute float x, y, xFract, yFract;\\\\nattribute float size, borderSize;\\\\nattribute vec4 colorId, borderColorId;\\\\nattribute float isActive;\\\\n\\\\nuniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\\\\nuniform float pixelRatio;\\\\nuniform sampler2D palette;\\\\n\\\\nconst float maxSize = 100.;\\\\nconst float borderLevel = .5;\\\\n\\\\nvarying vec4 fragColor, fragBorderColor;\\\\nvarying float fragPointSize, fragBorderRadius,\\\\n    fragWidth, fragBorderColorLevel, fragColorLevel;\\\\n\\\\nvec2 paletteCoord(float id) {\\\\n  return vec2(\\\\n    (mod(id, paletteSize.x) + .5) / paletteSize.x,\\\\n    (floor(id / paletteSize.x) + .5) / paletteSize.y\\\\n  );\\\\n}\\\\nvec2 paletteCoord(vec2 id) {\\\\n  return vec2(\\\\n    (id.x + .5) / paletteSize.x,\\\\n    (id.y + .5) / paletteSize.y\\\\n  );\\\\n}\\\\nvec4 getColor(vec4 id) {\\\\n  // zero-palette means we deal with direct buffer\\\\n  if (paletteSize.x == 0.) return id / 255.;\\\\n  return texture2D(palette, paletteCoord(id.xy));\\\\n}\\\\n\\\\nvoid main() {\\\\n  if (isActive == 0.) return;\\\\n\\\\n  vec2 position = vec2(x, y);\\\\n  vec2 positionFract = vec2(xFract, yFract);\\\\n\\\\n  vec4 color = getColor(colorId);\\\\n  vec4 borderColor = getColor(borderColorId);\\\\n\\\\n  float size = size * maxSize / 255.;\\\\n  float borderSize = borderSize * maxSize / 255.;\\\\n\\\\n  gl_PointSize = 2. * size * pixelRatio;\\\\n  fragPointSize = size * pixelRatio;\\\\n\\\\n  vec2 pos = (position + translate) * scale\\\\n      + (positionFract + translateFract) * scale\\\\n      + (position + translate) * scaleFract\\\\n      + (positionFract + translateFract) * scaleFract;\\\\n\\\\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\\\\n\\\\n  fragColor = color;\\\\n  fragBorderColor = borderColor;\\\\n  fragWidth = 1. / gl_PointSize;\\\\n\\\\n  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\\\\n  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\\\\n}\\\\n\\\"]),this.drawMarker=t(c);var u=s({},o);u.frag=l([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor, fragBorderColor;\\\\n\\\\nuniform float opacity;\\\\nvarying float fragBorderRadius, fragWidth;\\\\n\\\\nfloat smoothStep(float edge0, float edge1, float x) {\\\\n\\\\tfloat t;\\\\n\\\\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\\\\n\\\\treturn t * t * (3.0 - 2.0 * t);\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\tfloat radius, alpha = 1.0, delta = fragWidth;\\\\n\\\\n\\\\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\\\\n\\\\n\\\\tif (radius > 1.0 + delta) {\\\\n\\\\t\\\\tdiscard;\\\\n\\\\t}\\\\n\\\\n\\\\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\\\\n\\\\n\\\\tfloat borderRadius = fragBorderRadius;\\\\n\\\\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\\\\n\\\\tvec4 color = mix(fragColor, fragBorderColor, ratio);\\\\n\\\\tcolor.a *= alpha * opacity;\\\\n\\\\tgl_FragColor = color;\\\\n}\\\\n\\\"]),u.vert=l([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute float x, y, xFract, yFract;\\\\nattribute float size, borderSize;\\\\nattribute vec4 colorId, borderColorId;\\\\nattribute float isActive;\\\\n\\\\nuniform vec2 scale, scaleFract, translate, translateFract;\\\\nuniform float pixelRatio;\\\\nuniform sampler2D palette;\\\\nuniform vec2 paletteSize;\\\\n\\\\nconst float maxSize = 100.;\\\\n\\\\nvarying vec4 fragColor, fragBorderColor;\\\\nvarying float fragBorderRadius, fragWidth;\\\\n\\\\nvec2 paletteCoord(float id) {\\\\n  return vec2(\\\\n    (mod(id, paletteSize.x) + .5) / paletteSize.x,\\\\n    (floor(id / paletteSize.x) + .5) / paletteSize.y\\\\n  );\\\\n}\\\\nvec2 paletteCoord(vec2 id) {\\\\n  return vec2(\\\\n    (id.x + .5) / paletteSize.x,\\\\n    (id.y + .5) / paletteSize.y\\\\n  );\\\\n}\\\\n\\\\nvec4 getColor(vec4 id) {\\\\n  // zero-palette means we deal with direct buffer\\\\n  if (paletteSize.x == 0.) return id / 255.;\\\\n  return texture2D(palette, paletteCoord(id.xy));\\\\n}\\\\n\\\\nvoid main() {\\\\n  // ignore inactive points\\\\n  if (isActive == 0.) return;\\\\n\\\\n  vec2 position = vec2(x, y);\\\\n  vec2 positionFract = vec2(xFract, yFract);\\\\n\\\\n  vec4 color = getColor(colorId);\\\\n  vec4 borderColor = getColor(borderColorId);\\\\n\\\\n  float size = size * maxSize / 255.;\\\\n  float borderSize = borderSize * maxSize / 255.;\\\\n\\\\n  gl_PointSize = (size + borderSize) * pixelRatio;\\\\n\\\\n  vec2 pos = (position + translate) * scale\\\\n      + (positionFract + translateFract) * scale\\\\n      + (position + translate) * scaleFract\\\\n      + (positionFract + translateFract) * scaleFract;\\\\n\\\\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\\\\n\\\\n  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\\\\n  fragColor = color;\\\\n  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\\\\n  fragWidth = 1. / gl_PointSize;\\\\n}\\\\n\\\"]),h&&(u.frag=u.frag.replace(\\\"smoothstep\\\",\\\"smoothStep\\\"),c.frag=c.frag.replace(\\\"smoothstep\\\",\\\"smoothStep\\\")),this.drawCircle=t(u)}e.exports=g,g.defaults={color:\\\"black\\\",borderColor:\\\"transparent\\\",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},g.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];return e.length&&(t=this).update.apply(t,e),this.draw(),this},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=this.groups;if(1===e.length&&Array.isArray(e[0])&&(null===e[0][0]||Array.isArray(e[0][0]))&&(e=e[0]),this.regl._refresh(),e.length)for(var i=0;i<e.length;i++)t.drawItem(i,e[i]);else n.forEach(function(e,r){t.drawItem(r)});return this},g.prototype.drawItem=function(t,e){var r=this.groups,n=r[t];if(\\\"number\\\"==typeof e&&(t=e,n=r[e],e=null),n&&n.count&&n.opacity){n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,e));for(var i=[],a=1;a<n.activation.length;a++)n.activation[a]&&(!0===n.activation[a]||n.activation[a].data.length)&&i.push.apply(i,this.getMarkerDrawOptions(a,n,e));i.length&&this.drawMarker(i)}},g.prototype.getMarkerDrawOptions=function(t,e,r){var n=e.range,i=e.tree,a=e.viewport,o=e.activation,l=e.selectionBuffer,c=e.count;this.regl;if(!i)return r?[s({},e,{markerTexture:this.markerTextures[t],activation:o[t],count:r.length,elements:r,offset:0})]:[s({},e,{markerTexture:this.markerTextures[t],activation:o[t],offset:0})];var u=[],f=i.range(n,{lod:!0,px:[(n[2]-n[0])/a.width,(n[3]-n[1])/a.height]});if(r){for(var h=o[t].data,p=new Uint8Array(c),d=0;d<r.length;d++){var g=r[d];p[g]=h?h[g]:1}l.subdata(p)}for(var v=f.length;v--;){var m=f[v],y=m[0],x=m[1];u.push(s({},e,{markerTexture:this.markerTextures[t],activation:r?l:o[t],offset:y,count:x-y}))}return u},g.prototype.update=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){1===e.length&&Array.isArray(e[0])&&(e=e[0]);var n=this.groups,a=this.gl,l=this.regl,h=this.maxSize,v=this.maxColors,m=this.palette;this.groups=n=e.map(function(e,r){var y=n[r];if(void 0===e)return y;null===e?e={positions:null}:\\\"function\\\"==typeof e?e={ondraw:e}:\\\"number\\\"==typeof e[0]&&(e={positions:e}),null===(e=c(e,{positions:\\\"positions data points\\\",snap:\\\"snap cluster lod tree\\\",size:\\\"sizes size radius\\\",borderSize:\\\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\\\",color:\\\"colors color fill fill-color fillColor\\\",borderColor:\\\"borderColors borderColor stroke stroke-color strokeColor\\\",marker:\\\"markers marker shape\\\",range:\\\"range dataBox databox\\\",viewport:\\\"viewport viewPort viewBox viewbox\\\",opacity:\\\"opacity alpha transparency\\\",bounds:\\\"bound bounds boundaries limits\\\"})).positions&&(e.positions=[]),y||(n[r]=y={id:r,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"stream\\\",type:\\\"uint8\\\"}),sizeBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"dynamic\\\",type:\\\"uint8\\\"}),colorBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"dynamic\\\",type:\\\"uint8\\\"}),positionBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"dynamic\\\",type:\\\"float\\\"}),positionFractBuffer:l.buffer({data:new Uint8Array(0),usage:\\\"dynamic\\\",type:\\\"float\\\"})},e=s({},g.defaults,e)),!e.positions||\\\"marker\\\"in e||(e.marker=y.marker,delete y.marker),!e.marker||\\\"positions\\\"in e||(e.positions=y.positions,delete y.positions);var x=0,b=0;if(u(y,e,[{snap:!0,size:function(t,e){return null==t&&(t=g.defaults.size),x+=t&&t.length?1:0,t},borderSize:function(t,e){return null==t&&(t=g.defaults.borderSize),x+=t&&t.length?1:0,t},opacity:parseFloat,color:function(e,r){return null==e&&(e=g.defaults.color),e=t.updateColor(e),b++,e},borderColor:function(e,r){return null==e&&(e=g.defaults.borderColor),e=t.updateColor(e),b++,e},bounds:function(t,e,r){return\\\"range\\\"in r||(r.range=null),t},positions:function(t,e,r){var n=e.snap,a=e.positionBuffer,s=e.positionFractBuffer,c=e.selectionBuffer;if(t.x||t.y)return t.x.length?e.xAttr={buffer:l.buffer(t.x),offset:0,stride:4,count:t.x.length}:e.xAttr={buffer:t.x.buffer,offset:4*t.x.offset||0,stride:4*(t.x.stride||1),count:t.x.count},t.y.length?e.yAttr={buffer:l.buffer(t.y),offset:0,stride:4,count:t.y.length}:e.yAttr={buffer:t.y.buffer,offset:4*t.y.offset||0,stride:4*(t.y.stride||1),count:t.y.count},e.count=Math.max(e.xAttr.count,e.yAttr.count),t;t=f(t,\\\"float64\\\");var u=e.count=Math.floor(t.length/2),h=e.bounds=u?i(t,2):null;if(r.range||e.range||(delete e.range,r.range=h),r.marker||e.marker||(delete e.marker,r.marker=null),n&&(!0===n||u>n)?e.tree=o(t,{bounds:h}):n&&n.length&&(e.tree=n),e.tree){var d={primitive:\\\"points\\\",usage:\\\"static\\\",data:e.tree,type:\\\"uint32\\\"};e.elements?e.elements(d):e.elements=l.elements(d)}return a({data:p.float(t),usage:\\\"dynamic\\\"}),s({data:p.fract(t),usage:\\\"dynamic\\\"}),c({data:new Uint8Array(u),type:\\\"uint8\\\",usage:\\\"stream\\\"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach(function(t){return t&&t.destroy&&t.destroy()}),i.length=0,e&&\\\"number\\\"!=typeof e[0]){for(var a=[],o=0,s=Math.min(e.length,r.count);o<s;o++){var c=t.addMarker(e[o]);a[c]||(a[c]=new Uint8Array(r.count)),a[c][o]=1}for(var u=0;u<a.length;u++)if(a[u]){var f={data:a[u],type:\\\"uint8\\\",usage:\\\"static\\\"};i[u]?i[u](f):i[u]=l.buffer(f),i[u].data=a[u]}}else{i[t.addMarker(e)]=!0}return e},range:function(t,e,r){var n=e.bounds;if(n)return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=p.fract(e.scale),e.translateFract=p.fract(e.translate),t},viewport:function(t){return d(t||[a.drawingBufferWidth,a.drawingBufferHeight])}}]),x){var _=y.count,w=y.size,k=y.borderSize,M=y.sizeBuffer,A=new Uint8Array(2*_);if(w.length||k.length)for(var T=0;T<_;T++)A[2*T]=Math.round(255*(null==w[T]?w:w[T])/h),A[2*T+1]=Math.round(255*(null==k[T]?k:k[T])/h);M({data:A,usage:\\\"dynamic\\\"})}if(b){var S,C=y.count,E=y.color,L=y.borderColor,z=y.colorBuffer;if(t.tooManyColors){if(E.length||L.length){S=new Uint8Array(8*C);for(var O=0;O<C;O++){var I=E[O];S[8*O]=m[4*I],S[8*O+1]=m[4*I+1],S[8*O+2]=m[4*I+2],S[8*O+3]=m[4*I+3];var P=L[O];S[8*O+4]=m[4*P],S[8*O+5]=m[4*P+1],S[8*O+6]=m[4*P+2],S[8*O+7]=m[4*P+3]}}}else if(E.length||L.length){S=new Uint8Array(4*C+2);for(var D=0;D<C;D++)null!=E[D]&&(S[4*D]=E[D]%v,S[4*D+1]=Math.floor(E[D]/v)),null!=L[D]&&(S[4*D+2]=L[D]%v,S[4*D+3]=Math.floor(L[D]/v))}z({data:S||new Uint8Array(0),type:\\\"uint8\\\",usage:\\\"dynamic\\\"})}return y})}},g.prototype.addMarker=function(t){var e,r=this.markerTextures,n=this.regl,i=this.markerCache,a=null==t?0:i.indexOf(t);if(a>=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o<s;o++)e[o]=255*t[o]}var l=Math.floor(Math.sqrt(e.length));return a=r.length,i.push(t),r.push(n.texture({channels:1,data:e,radius:l,mag:\\\"linear\\\",min:\\\"linear\\\"})),a},g.prototype.updateColor=function(t){var e=this.paletteIds,r=this.palette,i=this.maxColors;Array.isArray(t)||(t=[t]);var o=[];if(\\\"number\\\"==typeof t[0]){var s=[];if(Array.isArray(t))for(var l=0;l<t.length;l+=4)s.push(t.slice(l,l+4));else for(var c=0;c<t.length;c+=4)s.push(t.subarray(c,c+4));t=s}for(var u=0;u<t.length;u++){var f=t[u];f=n(f,\\\"uint8\\\");var h=a(f,!1);if(null==e[h]){var p=r.length;e[h]=Math.floor(p/4),r[p]=f[0],r[p+1]=f[1],r[p+2]=f[2],r[p+3]=f[3]}o[u]=e[h]}return!this.tooManyColors&&r.length>i*i*4&&(this.tooManyColors=!0),this.updatePalette(r),1===o.length?o[0]:o},g.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i<n*e;i++)t.push(0,0,0,0);r.height<n&&r.resize(e,n),r.subimage({width:Math.min(.25*t.length,e),height:n,data:t},0,0)}},g.prototype.destroy=function(){return this.groups.forEach(function(t){t.sizeBuffer.destroy(),t.positionBuffer.destroy(),t.positionFractBuffer.destroy(),t.colorBuffer.destroy(),t.activation.forEach(function(t){return t&&t.destroy&&t.destroy()}),t.selectionBuffer.destroy(),t.elements&&t.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(t){return t&&t.destroy&&t.destroy()}),this}},{\\\"array-bounds\\\":53,\\\"color-id\\\":106,\\\"color-normalize\\\":108,\\\"flatten-vertex-data\\\":216,glslify:392,\\\"is-iexplorer\\\":402,\\\"object-assign\\\":437,\\\"parse-rect\\\":442,\\\"pick-by-alias\\\":448,\\\"point-cluster\\\":452,\\\"to-float32\\\":515,\\\"update-diff\\\":526}],477:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"regl-scatter2d/scatter\\\"),i=t(\\\"pick-by-alias\\\"),a=t(\\\"array-bounds\\\"),o=t(\\\"raf\\\"),s=t(\\\"array-range\\\"),l=t(\\\"parse-rect\\\"),c=t(\\\"flatten-vertex-data\\\");function u(t,e){if(!(this instanceof u))return new u(t,e);this.traces=[],this.passes={},this.regl=t,this.scatter=n(t),this.canvas=this.scatter.canvas}function f(t,e,r){return(null!=t.id?t.id:t)<<16|(255&e)<<8|255&r}function h(t,e,r){var n,i,a,o,s=t[e],l=t[r];return s.length>2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x+s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y+l.height),[a,n,o,i]}function p(t){if(\\\"number\\\"==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}e.exports=u,u.prototype.render=function(){for(var t,e=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(t=this).update.apply(t,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o(function(){e.draw(),e.dirty=!0,e.planned=null})):(this.draw(),this.dirty=!0,o(function(){e.dirty=!1})),this)},u.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;n<e.length;n++)this.updateItem(n,e[n]);this.traces=this.traces.filter(Boolean);for(var i=[],a=0,o=0;o<this.traces.length;o++){for(var s=this.traces[o],l=this.traces[o].passes,c=0;c<l.length;c++)i.push(this.passes[l[c]]);s.passOffset=a,a+=s.passes.length}return(t=this.scatter).update.apply(t,i),this}},u.prototype.updateItem=function(t,e){var r=this.regl;if(null===e)return this.traces[t]=null,this;if(!e)return this;var n,o=i(e,{data:\\\"data items columns rows values dimensions samples x\\\",snap:\\\"snap cluster\\\",size:\\\"sizes size radius\\\",color:\\\"colors color fill fill-color fillColor\\\",opacity:\\\"opacity alpha transparency opaque\\\",borderSize:\\\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\\\",borderColor:\\\"borderColors borderColor bordercolor stroke stroke-color strokeColor\\\",marker:\\\"markers marker shape\\\",range:\\\"range ranges databox dataBox\\\",viewport:\\\"viewport viewBox viewbox\\\",domain:\\\"domain domains area areas\\\",padding:\\\"pad padding paddings pads margin margins\\\",transpose:\\\"transpose transposed\\\",diagonal:\\\"diagonal diag showDiagonal\\\",upper:\\\"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf\\\",lower:\\\"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower\\\"}),s=this.traces[t]||(this.traces[t]={id:t,buffer:r.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array}),color:\\\"black\\\",marker:null,size:12,borderColor:\\\"transparent\\\",borderSize:1,viewport:l([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(null!=o.color&&(s.color=o.color),null!=o.size&&(s.size=o.size),null!=o.marker&&(s.marker=o.marker),null!=o.borderColor&&(s.borderColor=o.borderColor),null!=o.borderSize&&(s.borderSize=o.borderSize),null!=o.opacity&&(s.opacity=o.opacity),o.viewport&&(s.viewport=l(o.viewport)),null!=o.diagonal&&(s.diagonal=o.diagonal),null!=o.upper&&(s.upper=o.upper),null!=o.lower&&(s.lower=o.lower),o.data){s.buffer(c(o.data)),s.columns=o.data.length,s.count=o.data[0].length,s.bounds=[];for(var u=0;u<s.columns;u++)s.bounds[u]=a(o.data[u],1)}o.range&&(s.range=o.range,n=s.range&&\\\"number\\\"!=typeof s.range[0]),o.domain&&(s.domain=o.domain);var d=!1;null!=o.padding&&(Array.isArray(o.padding)&&o.padding.length===s.columns&&\\\"number\\\"==typeof o.padding[o.padding.length-1]?(s.padding=o.padding.map(p),d=!0):s.padding=p(o.padding));var g=s.columns,v=s.count,m=s.viewport.width,y=s.viewport.height,x=s.viewport.x,b=s.viewport.y,_=m/g,w=y/g;s.passes=[];for(var k=0;k<g;k++)for(var M=0;M<g;M++)if((s.diagonal||M!==k)&&(s.upper||!(k>M))&&(s.lower||!(k<M))){var A=f(s.id,k,M),T=this.passes[A]||(this.passes[A]={});if(o.data&&(o.transpose?T.positions={x:{buffer:s.buffer,offset:M,count:v,stride:g},y:{buffer:s.buffer,offset:k,count:v,stride:g}}:T.positions={x:{buffer:s.buffer,offset:M*v,count:v},y:{buffer:s.buffer,offset:k*v,count:v}},T.bounds=h(s.bounds,k,M)),o.domain||o.viewport||o.data){var S=d?h(s.padding,k,M):s.padding;if(s.domain){var C=h(s.domain,k,M),E=C[0],L=C[1],z=C[2],O=C[3];T.viewport=[x+E*m+S[0],b+L*y+S[1],x+z*m-S[2],b+O*y-S[3]]}else T.viewport=[x+M*_+_*S[0],b+k*w+w*S[1],x+(M+1)*_-_*S[2],b+(k+1)*w-w*S[3]]}o.color&&(T.color=s.color),o.size&&(T.size=s.size),o.marker&&(T.marker=s.marker),o.borderSize&&(T.borderSize=s.borderSize),o.borderColor&&(T.borderColor=s.borderColor),o.opacity&&(T.opacity=s.opacity),o.range&&(T.range=n?h(s.range,k,M):s.range||T.bounds),s.passes.push(A)}return this},u.prototype.draw=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=[],i=0;i<e.length;i++)if(\\\"number\\\"==typeof e[i]){var a=this.traces[e[i]],o=a.passes,l=a.passOffset;n.push.apply(n,s(l,l+o.length))}else if(e[i].length){var c=e[i],u=this.traces[i],f=u.passes,h=u.passOffset;f=f.map(function(t,e){n[h+e]=c})}(t=this.scatter).draw.apply(t,n)}else this.scatter.draw();return this},u.prototype.destroy=function(){return this.traces.forEach(function(t){t.buffer&&t.buffer.destroy&&t.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}},{\\\"array-bounds\\\":53,\\\"array-range\\\":55,\\\"flatten-vertex-data\\\":216,\\\"parse-rect\\\":442,\\\"pick-by-alias\\\":448,raf:467,\\\"regl-scatter2d/scatter\\\":476}],478:[function(t,e,r){var n,i;n=this,i=function(){function t(t,e){this.id=V++,this.type=t,this.data=e}function e(t){return\\\"[\\\"+function t(e){if(0===e.length)return[];var r=e.charAt(0),n=e.charAt(e.length-1);if(1<e.length&&r===n&&('\\\"'===r||\\\"'\\\"===r))return['\\\"'+e.substr(1,e.length-2).replace(/\\\\\\\\/g,\\\"\\\\\\\\\\\\\\\\\\\").replace(/\\\"/g,'\\\\\\\\\\\"')+'\\\"'];if(r=/\\\\[(false|true|null|\\\\d+|'[^']*'|\\\"[^\\\"]*\\\")\\\\]/.exec(e))return t(e.substr(0,r.index)).concat(t(r[1])).concat(t(e.substr(r.index+r[0].length)));if(1===(r=e.split(\\\".\\\")).length)return['\\\"'+e.replace(/\\\\\\\\/g,\\\"\\\\\\\\\\\\\\\\\\\").replace(/\\\"/g,'\\\\\\\\\\\"')+'\\\"'];for(e=[],n=0;n<r.length;++n)e=e.concat(t(r[n]));return e}(t).join(\\\"][\\\")+\\\"]\\\"}function r(t){return\\\"string\\\"==typeof t?t.split():t}function n(t){return\\\"string\\\"==typeof t?document.querySelector(t):t}function i(t){var e,i,a,o,s=t||{};t={};var l=[],c=[],u=\\\"undefined\\\"==typeof window?1:window.devicePixelRatio,f=!1,h=function(t){},p=function(){};if(\\\"string\\\"==typeof s?e=document.querySelector(s):\\\"object\\\"==typeof s&&(\\\"string\\\"==typeof s.nodeName&&\\\"function\\\"==typeof s.appendChild&&\\\"function\\\"==typeof s.getBoundingClientRect?e=s:\\\"function\\\"==typeof s.drawArrays||\\\"function\\\"==typeof s.drawElements?a=(o=s).canvas:(\\\"gl\\\"in s?o=s.gl:\\\"canvas\\\"in s?a=n(s.canvas):\\\"container\\\"in s&&(i=n(s.container)),\\\"attributes\\\"in s&&(t=s.attributes),\\\"extensions\\\"in s&&(l=r(s.extensions)),\\\"optionalExtensions\\\"in s&&(c=r(s.optionalExtensions)),\\\"onDone\\\"in s&&(h=s.onDone),\\\"profile\\\"in s&&(f=!!s.profile),\\\"pixelRatio\\\"in s&&(u=+s.pixelRatio))),e&&(\\\"canvas\\\"===e.nodeName.toLowerCase()?a=e:i=e),!o){if(!a){if(!(e=function(t,e,r){function n(){var e=window.innerWidth,n=window.innerHeight;t!==document.body&&(e=(n=t.getBoundingClientRect()).right-n.left,n=n.bottom-n.top),i.width=r*e,i.height=r*n,j(i.style,{width:e+\\\"px\\\",height:n+\\\"px\\\"})}var i=document.createElement(\\\"canvas\\\");return j(i.style,{border:0,margin:0,padding:0,top:0,left:0}),t.appendChild(i),t===document.body&&(i.style.position=\\\"absolute\\\",j(t.style,{margin:0,padding:0})),window.addEventListener(\\\"resize\\\",n,!1),n(),{canvas:i,onDestroy:function(){window.removeEventListener(\\\"resize\\\",n),t.removeChild(i)}}}(i||document.body,0,u)))return null;a=e.canvas,p=e.onDestroy}o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r(\\\"webgl\\\")||r(\\\"experimental-webgl\\\")||r(\\\"webgl-experimental\\\")}(a,t)}return o?{gl:o,canvas:a,container:i,extensions:l,optionalExtensions:c,pixelRatio:u,profile:f,onDone:h,onDestroy:p}:(p(),h(\\\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\\\"),null)}function a(t,e){for(var r=Array(t),n=0;n<t;++n)r[n]=e(n);return r}function o(t){var e,r;return e=(65535<t)<<4,e|=r=(255<(t>>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function s(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[o(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[o(t.byteLength)>>2].push(t)}var r=a(8,function(){return[]});return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function l(t){return!!t&&\\\"object\\\"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&\\\"number\\\"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||Y(t.data))}function c(t,e,r,n,i,a){for(var o=0;o<e;++o)for(var s=t[o],l=0;l<r;++l)for(var c=s[l],u=0;u<n;++u)i[a++]=c[u]}function u(t){return 0|$[Object.prototype.toString.call(t)]}function f(t,e){for(var r=0;r<e.length;++r)t[r]=e[r]}function h(t,e,r,n,i,a,o){for(var s=0,l=0;l<r;++l)for(var c=0;c<n;++c)t[s++]=e[i*l+a*c+o]}function p(t,e,r,n){function i(e){this.id=c++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&&(this.stats={size:0})}function a(e,r,n){e.byteLength=r.byteLength,t.bufferData(e.type,r,n)}function o(t,e,r,n,i,o){if(t.usage=r,Array.isArray(e)){if(t.dtype=n||5126,0<e.length)if(Array.isArray(e[0])){i=tt(e);for(var s=n=1;s<i.length;++s)n*=i[s];t.dimension=n,a(t,e=Q(e,i,t.dtype),r),o?t.persistentData=e:G.freeType(e)}else\\\"number\\\"==typeof e[0]?(t.dimension=i,f(i=G.allocType(t.dtype,e.length),e),a(t,i,r),o?t.persistentData=i:G.freeType(i)):Y(e[0])&&(t.dimension=e[0].length,t.dtype=n||u(e[0])||5126,a(t,e=Q(e,[e.length,e[0].length],t.dtype),r),o?t.persistentData=e:G.freeType(e))}else if(Y(e))t.dtype=n||u(e),t.dimension=i,a(t,e,r),o&&(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(l(e)){i=e.shape;var c=e.stride,p=(s=e.offset,0),d=0,g=0,v=0;1===i.length?(p=i[0],d=1,g=c[0],v=0):2===i.length&&(p=i[0],d=i[1],g=c[0],v=c[1]),t.dtype=n||u(e.data)||5126,t.dimension=d,h(i=G.allocType(t.dtype,p*d),e.data,p,d,g,v,s),a(t,i,r),o?t.persistentData=i:G.freeType(i)}}function s(r){e.bufferCount--;for(var i=0;i<n.state.length;++i){var a=n.state[i];a.buffer===r&&(t.disableVertexAttribArray(i),a.buffer=null)}t.deleteBuffer(r.buffer),r.buffer=null,delete p[r.id]}var c=0,p={};i.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},i.prototype.destroy=function(){s(this)};var d=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(p).forEach(function(e){t+=p[e].stats.size}),t}),{create:function(n,a,c,d){function g(e){var n=35044,i=null,a=0,s=0,c=1;return Array.isArray(e)||Y(e)||l(e)?i=e:\\\"number\\\"==typeof e?a=0|e:e&&(\\\"data\\\"in e&&(i=e.data),\\\"usage\\\"in e&&(n=K[e.usage]),\\\"type\\\"in e&&(s=J[e.type]),\\\"dimension\\\"in e&&(c=0|e.dimension),\\\"length\\\"in e&&(a=0|e.length)),v.bind(),i?o(v,i,n,s,c,d):(a&&t.bufferData(v.type,a,n),v.dtype=s||5121,v.usage=n,v.dimension=c,v.byteLength=a),r.profile&&(v.stats.size=v.byteLength*et[v.dtype]),g}e.bufferCount++;var v=new i(a);return p[v.id]=v,c||g(n),g._reglType=\\\"buffer\\\",g._buffer=v,g.subdata=function(e,r){var n,i=0|(r||0);if(v.bind(),Y(e))t.bufferSubData(v.type,i,e);else if(Array.isArray(e)){if(0<e.length)if(\\\"number\\\"==typeof e[0]){var a=G.allocType(v.dtype,e.length);f(a,e),t.bufferSubData(v.type,i,a),G.freeType(a)}else(Array.isArray(e[0])||Y(e[0]))&&(n=tt(e),a=Q(e,n,v.dtype),t.bufferSubData(v.type,i,a),G.freeType(a))}else if(l(e)){n=e.shape;var o=e.stride,s=a=0,c=0,p=0;1===n.length?(a=n[0],s=1,c=o[0],p=0):2===n.length&&(a=n[0],s=n[1],c=o[0],p=o[1]),n=Array.isArray(e.data)?v.dtype:u(e.data),h(n=G.allocType(n,a*s),e.data,a,s,c,p,e.offset),t.bufferSubData(v.type,i,n),G.freeType(n)}return g},r.profile&&(g.stats=v.stats),g.destroy=function(){s(v)},g},createStream:function(t,e){var r=d.pop();return r||(r=new i(t)),r.bind(),o(r,e,35040,0,1,!1),r},destroyStream:function(t){d.push(t)},clear:function(){X(p).forEach(s),d.forEach(s)},getBuffer:function(t){return t&&t._buffer instanceof i?t._buffer:null},restore:function(){X(p).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})},_initBuffer:o}}function d(t,e,r,n){function i(t){this.id=c++,s[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function a(n,i,a,o,s,c,u){if(n.buffer.bind(),i){var f=u;u||Y(i)&&(!l(i)||Y(i.data))||(f=e.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,f,3)}else t.bufferData(34963,c,a),n.buffer.dtype=f||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=c;if(f=u,!u){switch(n.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}n.buffer.dtype=f}n.type=f,0>(i=s)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=o,0>o&&(i=4,1===(o=n.buffer.dimension)&&(i=0),2===o&&(i=1),3===o&&(i=4)),n.primType=i}function o(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},c=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if(\\\"number\\\"==typeof t)c(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,h=0;Array.isArray(t)||Y(t)||l(t)?e=t:(\\\"data\\\"in t&&(e=t.data),\\\"usage\\\"in t&&(r=K[t.usage]),\\\"primitive\\\"in t&&(n=rt[t.primitive]),\\\"count\\\"in t&&(i=0|t.count),\\\"type\\\"in t&&(h=u[t.type]),\\\"length\\\"in t?o=0|t.length:(o=i,5123===h||5122===h?o*=2:5125!==h&&5124!==h||(o*=4))),a(f,e,r,n,i,o,h)}else c(),f.primType=4,f.vertCount=0,f.type=5121;return s}var c=r.create(null,34963,!0),f=new i(c._buffer);return n.elementsCount++,s(t),s._reglType=\\\"elements\\\",s._elements=f,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return\\\"function\\\"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){X(s).forEach(o)}}}function g(t){for(var e=G.allocType(5123,t.length),r=0;r<t.length;++r)if(isNaN(t[r]))e[r]=65535;else if(1/0===t[r])e[r]=31744;else if(-1/0===t[r])e[r]=64512;else{nt[0]=t[r];var n=(a=it[0])>>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;e[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15<i?n+31744:n+(i+15<<10)+a}return e}function v(t){return Array.isArray(t)||Y(t)}function m(t){return\\\"[object \\\"+t+\\\"]\\\"}function y(t){return Array.isArray(t)&&(0===t.length||\\\"number\\\"==typeof t[0])}function x(t){return!(!Array.isArray(t)||0===t.length||!v(t[0]))}function b(t){return Object.prototype.toString.call(t)}function _(t){if(!t)return!1;var e=b(t);return 0<=pt.indexOf(e)||(y(t)||x(t)||l(t))}function w(t,e){36193===t.type?(t.data=g(e),G.freeType(e)):t.data=e}function k(t,e,r,n,i,a){if(t=\\\"undefined\\\"!=typeof gt[t]?gt[t]:st[t]*dt[e],a&&(t*=6),i){for(n=0;1<=r;)n+=t*r*r,r/=2;return n}return t*r*n}function M(t,e,r,n,i,a,o){function s(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function c(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function u(t,e){if(\\\"object\\\"==typeof e&&e){\\\"premultiplyAlpha\\\"in e&&(t.premultiplyAlpha=e.premultiplyAlpha),\\\"flipY\\\"in e&&(t.flipY=e.flipY),\\\"alignment\\\"in e&&(t.unpackAlignment=e.alignment),\\\"colorSpace\\\"in e&&(t.colorSpace=q[e.colorSpace]),\\\"type\\\"in e&&(t.type=H[e.type]);var r=t.width,n=t.height,i=t.channels,a=!1;\\\"shape\\\"in e?(r=e.shape[0],n=e.shape[1],3===e.shape.length&&(i=e.shape[2],a=!0)):(\\\"radius\\\"in e&&(r=n=e.radius),\\\"width\\\"in e&&(r=e.width),\\\"height\\\"in e&&(n=e.height),\\\"channels\\\"in e&&(i=e.channels,a=!0)),t.width=0|r,t.height=0|n,t.channels=0|i,r=!1,\\\"format\\\"in e&&(r=e.format,n=t.internalformat=W[r],t.format=pt[n],r in H&&!(\\\"type\\\"in e)&&(t.type=H[r]),r in J&&(t.compressed=!0),r=!0),!a&&r?t.channels=st[t.format]:a&&!r&&t.channels!==ot[t.format]&&(t.format=t.internalformat=ot[t.channels])}}function f(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function p(t,e){var r=null;if(_(e)?r=e:e&&(u(t,e),\\\"x\\\"in e&&(t.xOffset=0|e.x),\\\"y\\\"in e&&(t.yOffset=0|e.y),_(e.data)&&(r=e.data)),e.copy){var n=i.viewportWidth,a=i.viewportHeight;t.width=t.width||n-t.xOffset,t.height=t.height||a-t.yOffset,t.needsCopy=!0}else if(r){if(Y(r))t.channels=t.channels||4,t.data=r,\\\"type\\\"in e||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(r)]);else if(y(r)){switch(t.channels=t.channels||4,a=(n=r).length,t.type){case 5121:case 5123:case 5125:case 5126:(a=G.allocType(t.type,a)).set(n),t.data=a;break;case 36193:t.data=g(n)}t.alignment=1,t.needsFree=!0}else if(l(r)){n=r.data,Array.isArray(n)||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(n)]);a=r.shape;var o,s,c,f,h=r.stride;3===a.length?(c=a[2],f=h[2]):f=c=1,o=a[0],s=a[1],a=h[0],h=h[1],t.alignment=1,t.width=o,t.height=s,t.channels=c,t.format=t.internalformat=ot[c],t.needsFree=!0,o=f,r=r.offset,c=t.width,f=t.height,s=t.channels;for(var p=G.allocType(36193===t.type?5126:t.type,c*f*s),d=0,m=0;m<f;++m)for(var k=0;k<c;++k)for(var M=0;M<s;++M)p[d++]=n[a*k+h*m+o*M+r];w(t,p)}else if(b(r)===lt||b(r)===ct)b(r)===lt?t.element=r:t.element=r.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(b(r)===ut)t.element=r,t.width=r.width,t.height=r.height,t.channels=4;else if(b(r)===ft)t.element=r,t.width=r.naturalWidth,t.height=r.naturalHeight,t.channels=4;else if(b(r)===ht)t.element=r,t.width=r.videoWidth,t.height=r.videoHeight,t.channels=4;else if(x(r)){for(n=t.width||r[0].length,a=t.height||r.length,h=t.channels,h=v(r[0][0])?h||r[0][0].length:h||1,o=Z.shape(r),c=1,f=0;f<o.length;++f)c*=o[f];c=G.allocType(36193===t.type?5126:t.type,c),Z.flatten(r,o,\\\"\\\",c),w(t,c),t.alignment=1,t.width=n,t.height=a,t.channels=h,t.format=t.internalformat=ot[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function d(e,r,i,a,o){var s=e.element,l=e.data,c=e.internalformat,u=e.format,h=e.type,p=e.width,d=e.height;f(e),s?t.texSubImage2D(r,o,i,a,u,h,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,c,p,d,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,p,d)):t.texSubImage2D(r,o,i,a,p,d,u,h,l)}function m(){return dt.pop()||new h}function M(t){t.needsFree&&G.freeType(t.data),h.call(t),dt.push(t)}function A(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function T(t,e,r){var n=t.images[0]=m();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function S(t,e){var r=null;if(_(e))c(r=t.images[0]=m(),t),p(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i<n.length;++i)c(r=t.images[i]=m(),t),r.width>>=i,r.height>>=i,p(r,n[i]),t.mipmask|=1<<i;else c(r=t.images[0]=m(),t),p(r,e),t.mipmask=1;c(t,t.images[0])}function C(e,r){for(var i=e.images,a=0;a<i.length&&i[a];++a){var o=i[a],s=r,l=a,c=o.element,u=o.data,h=o.internalformat,p=o.format,d=o.type,g=o.width,v=o.height,m=o.channels;f(o),c?t.texImage2D(s,l,p,p,d,c):o.compressed?t.compressedTexImage2D(s,l,h,g,v,0,u):o.needsCopy?(n(),t.copyTexImage2D(s,l,p,o.xOffset,o.yOffset,g,v,0)):((o=!u)&&(u=G.zero.allocType(d,g*v*m)),t.texImage2D(s,l,p,g,v,0,p,d,u),o&&u&&G.zero.freeType(u))}}function E(){var t=gt.pop()||new A;s.call(t);for(var e=t.mipmask=0;16>e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;r<e.length;++r)e[r]&&M(e[r]),e[r]=null;gt.push(t)}function z(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function O(t,e){\\\"min\\\"in e&&(t.minFilter=U[e.min],0<=at.indexOf(t.minFilter)&&!(\\\"faces\\\"in e)&&(t.genMipmaps=!0)),\\\"mag\\\"in e&&(t.magFilter=V[e.mag]);var r=t.wrapS,n=t.wrapT;if(\\\"wrap\\\"in e){var i=e.wrap;\\\"string\\\"==typeof i?r=n=N[i]:Array.isArray(i)&&(r=N[i[0]],n=N[i[1]])}else\\\"wrapS\\\"in e&&(r=N[e.wrapS]),\\\"wrapT\\\"in e&&(n=N[e.wrapT]);if(t.wrapS=r,t.wrapT=n,\\\"anisotropic\\\"in e&&(t.anisotropic=e.anisotropic),\\\"mipmap\\\"in e){switch(r=!1,typeof e.mipmap){case\\\"string\\\":t.mipmapHint=F[e.mipmap],r=t.genMipmaps=!0;break;case\\\"boolean\\\":r=t.genMipmaps=e.mipmap;break;case\\\"object\\\":t.genMipmaps=!1,r=!0}!r||\\\"min\\\"in e||(t.minFilter=9984)}}function I(r,n){t.texParameteri(n,10241,r.minFilter),t.texParameteri(n,10240,r.magFilter),t.texParameteri(n,10242,r.wrapS),t.texParameteri(n,10243,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,r.anisotropic),r.genMipmaps&&(t.hint(33170,r.mipmapHint),t.generateMipmap(n))}function P(e){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=vt++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new z,o.profile&&(this.stats={size:0})}function D(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function R(){var e=xt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function B(e){var r=e.texture,n=e.unit,i=e.target;0<=n&&(t.activeTexture(33984+n),t.bindTexture(i,null),xt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete mt[e.id],a.textureCount--}var F={\\\"don't care\\\":4352,\\\"dont care\\\":4352,nice:4354,fast:4353},N={repeat:10497,clamp:33071,mirror:33648},V={nearest:9728,linear:9729},U=j({mipmap:9987,\\\"nearest mipmap nearest\\\":9984,\\\"linear mipmap nearest\\\":9985,\\\"nearest mipmap linear\\\":9986,\\\"linear mipmap linear\\\":9987},V),q={none:0,browser:37444},H={uint8:5121,rgba4:32819,rgb565:33635,\\\"rgb5 a1\\\":32820},W={alpha:6406,luminance:6409,\\\"luminance alpha\\\":6410,rgb:6407,rgba:6408,rgba4:32854,\\\"rgb5 a1\\\":32855,rgb565:36194},J={};e.ext_srgb&&(W.srgb=35904,W.srgba=35906),e.oes_texture_float&&(H.float32=H.float=5126),e.oes_texture_half_float&&(H.float16=H[\\\"half float\\\"]=36193),e.webgl_depth_texture&&(j(W,{depth:6402,\\\"depth stencil\\\":34041}),j(H,{uint16:5123,uint32:5125,\\\"depth stencil\\\":34042})),e.webgl_compressed_texture_s3tc&&j(J,{\\\"rgb s3tc dxt1\\\":33776,\\\"rgba s3tc dxt1\\\":33777,\\\"rgba s3tc dxt3\\\":33778,\\\"rgba s3tc dxt5\\\":33779}),e.webgl_compressed_texture_atc&&j(J,{\\\"rgb atc\\\":35986,\\\"rgba atc explicit alpha\\\":35987,\\\"rgba atc interpolated alpha\\\":34798}),e.webgl_compressed_texture_pvrtc&&j(J,{\\\"rgb pvrtc 4bppv1\\\":35840,\\\"rgb pvrtc 2bppv1\\\":35841,\\\"rgba pvrtc 4bppv1\\\":35842,\\\"rgba pvrtc 2bppv1\\\":35843}),e.webgl_compressed_texture_etc1&&(J[\\\"rgb etc1\\\"]=36196);var K=Array.prototype.slice.call(t.getParameter(34467));Object.keys(J).forEach(function(t){var e=J[t];0<=K.indexOf(e)&&(W[t]=e)});var Q=Object.keys(W);r.textureFormats=Q;var tt=[];Object.keys(W).forEach(function(t){tt[W[t]]=t});var et=[];Object.keys(H).forEach(function(t){et[H[t]]=t});var rt=[];Object.keys(V).forEach(function(t){rt[V[t]]=t});var nt=[];Object.keys(U).forEach(function(t){nt[U[t]]=t});var it=[];Object.keys(N).forEach(function(t){it[N[t]]=t});var pt=Q.reduce(function(t,e){var r=W[e];return 6409===r||6406===r||6409===r||6410===r||6402===r||34041===r?t[r]=r:32855===r||0<=e.indexOf(\\\"rgba\\\")?t[r]=6408:t[r]=6407,t},{}),dt=[],gt=[],vt=0,mt={},yt=r.maxTextureUnits,xt=Array(yt).map(function(){return null});return j(P.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0>e){for(var r=0;r<yt;++r){var n=xt[r];if(n){if(0<n.bindCount)continue;n.unit=-1}xt[r]=this,e=r;break}o.profile&&a.maxTextureUnits<e+1&&(a.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&B(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(mt).forEach(function(e){t+=mt[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;z.call(r);var a=E();return\\\"number\\\"==typeof t?T(a,0|t,\\\"number\\\"==typeof e?0|e:0|t):t?(O(r,t),S(a,t)):T(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,c(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,D(i),C(a,3553),I(r,3553),R(),L(a),o.profile&&(i.stats.size=k(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=tt[i.internalformat],n.type=et[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new P(3553);return mt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=m();return c(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,D(i),d(o,3553,e,r,a),R(),M(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,D(i);for(var l,c=i.channels,u=i.type,f=0;i.mipmask>>f;++f){var h=a>>f,p=s>>f;if(!h||!p)break;l=G.zero.allocType(u,h*p*c),t.texImage2D(3553,f,i.format,h,p,0,i.format,i.type,l),l&&G.zero.freeType(l)}return R(),o.profile&&(i.stats.size=k(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType=\\\"texture2d\\\",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,l){function f(t,e,r,n,i,a){var s,l=h.texInfo;for(z.call(l),s=0;6>s;++s)g[s]=E();if(\\\"number\\\"!=typeof t&&t){if(\\\"object\\\"==typeof t)if(e)S(g[0],t),S(g[1],e),S(g[2],r),S(g[3],n),S(g[4],i),S(g[5],a);else if(O(l,t),u(h,t),\\\"faces\\\"in t)for(t=t.faces,s=0;6>s;++s)c(g[s],h),S(g[s],t[s]);else for(s=0;6>s;++s)S(g[s],t)}else for(t=0|t||1,s=0;6>s;++s)T(g[s],t,t);for(c(h,g[0]),h.mipmask=l.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,h.internalformat=g[0].internalformat,f.width=g[0].width,f.height=g[0].height,D(h),s=0;6>s;++s)C(g[s],34069+s);for(I(l,34067),R(),o.profile&&(h.stats.size=k(h.internalformat,h.type,f.width,f.height,l.genMipmaps,!0)),f.format=tt[h.internalformat],f.type=et[h.type],f.mag=rt[l.magFilter],f.min=nt[l.minFilter],f.wrapS=it[l.wrapS],f.wrapT=it[l.wrapT],s=0;6>s;++s)L(g[s]);return f}var h=new P(34067);mt[h.id]=h,a.cubeCount++;var g=Array(6);return f(e,r,n,i,s,l),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=m();return c(a,h),a.width=0,a.height=0,p(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,D(h),d(a,34069+t,r,n,i),R(),M(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,D(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return R(),o.profile&&(h.stats.size=k(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType=\\\"textureCube\\\",f._texture=h,o.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;e<yt;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),xt[e]=null;X(mt).forEach(B),a.cubeCount=0,a.textureCount=0},getTexture:function(t){return null},restore:function(){X(mt).forEach(function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var r=0;32>r;++r)if(0!=(e.mipmask&1<<r))if(3553===e.target)t.texImage2D(3553,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);I(e.texInfo,e.target)})}}}function A(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,i=t;return\\\"object\\\"==typeof t&&(i=t.data,\\\"target\\\"in t&&(e=0|t.target)),\\\"texture2d\\\"===(t=i._reglType)?r=i:\\\"textureCube\\\"===t?r=i:\\\"renderbuffer\\\"===t&&(n=i,e=36161),new o(e,r,n)}function f(t,e,r,a,s){return r?((t=n.create2D({width:t,height:e,format:a,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=i.create({width:t,height:e,format:a}))._renderbuffer.refCount=0,new o(36161,null,t))}function h(t){return t&&(t.texture||t.renderbuffer)}function p(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r))}function d(){this.id=k++,M[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function v(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete M[e.id]}function m(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;n<i.length;++n)c(36064+n,i[n]);for(n=i.length;n<r.maxColorAttachments;++n)t.framebufferTexture2D(36160,36064+n,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),c(36096,e.depthAttachment),c(36128,e.stencilAttachment),c(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.bindFramebuffer(36160,x.next?x.next.framebuffer:null),x.cur=x.next,t.getError()}function y(t,e){function r(t,e){var i,a=0,o=0,s=!0,c=!0;i=null;var p=!0,d=\\\"rgba\\\",v=\\\"uint8\\\",y=1,x=null,w=null,k=null,M=!1;\\\"number\\\"==typeof t?(a=0|t,o=0|e||a):t?(\\\"shape\\\"in t?(a=(o=t.shape)[0],o=o[1]):(\\\"radius\\\"in t&&(a=o=t.radius),\\\"width\\\"in t&&(a=t.width),\\\"height\\\"in t&&(o=t.height)),(\\\"color\\\"in t||\\\"colors\\\"in t)&&(i=t.color||t.colors,Array.isArray(i)),i||(\\\"colorCount\\\"in t&&(y=0|t.colorCount),\\\"colorTexture\\\"in t&&(p=!!t.colorTexture,d=\\\"rgba4\\\"),\\\"colorType\\\"in t&&(v=t.colorType,!p)&&(\\\"half float\\\"===v||\\\"float16\\\"===v?d=\\\"rgba16f\\\":\\\"float\\\"!==v&&\\\"float32\\\"!==v||(d=\\\"rgba32f\\\")),\\\"colorFormat\\\"in t&&(d=t.colorFormat,0<=b.indexOf(d)?p=!0:0<=_.indexOf(d)&&(p=!1))),(\\\"depthTexture\\\"in t||\\\"depthStencilTexture\\\"in t)&&(M=!(!t.depthTexture&&!t.depthStencilTexture)),\\\"depth\\\"in t&&(\\\"boolean\\\"==typeof t.depth?s=t.depth:(x=t.depth,c=!1)),\\\"stencil\\\"in t&&(\\\"boolean\\\"==typeof t.stencil?c=t.stencil:(w=t.stencil,s=!1)),\\\"depthStencil\\\"in t&&(\\\"boolean\\\"==typeof t.depthStencil?s=c=t.depthStencil:(k=t.depthStencil,c=s=!1))):a=o=1;var A=null,T=null,S=null,C=null;if(Array.isArray(i))A=i.map(u);else if(i)A=[u(i)];else for(A=Array(y),i=0;i<y;++i)A[i]=f(a,o,p,d,v);for(a=a||A[0].width,o=o||A[0].height,x?T=u(x):s&&!c&&(T=f(a,o,M,\\\"depth\\\",\\\"uint32\\\")),w?S=u(w):c&&!s&&(S=f(a,o,!1,\\\"stencil\\\",\\\"uint8\\\")),k?C=u(k):!x&&!w&&c&&s&&(C=f(a,o,M,\\\"depth stencil\\\",\\\"depth stencil\\\")),s=null,i=0;i<A.length;++i)l(A[i]),A[i]&&A[i].texture&&(c=yt[A[i].texture._texture.format]*xt[A[i].texture._texture.type],null===s&&(s=c));return l(T),l(S),l(C),g(n),n.width=a,n.height=o,n.colorAttachments=A,n.depthAttachment=T,n.stencilAttachment=S,n.depthStencilAttachment=C,r.color=A.map(h),r.depth=h(T),r.stencil=h(S),r.depthStencil=h(C),r.width=n.width,r.height=n.height,m(n),r}var n=new d;return a.framebufferCount++,r(t,e),j(r,{resize:function(t,e){var i=0|t,a=0|e||i;if(i===n.width&&a===n.height)return r;for(var o=n.colorAttachments,s=0;s<o.length;++s)p(o[s],i,a);return p(n.depthAttachment,i,a),p(n.stencilAttachment,i,a),p(n.depthStencilAttachment,i,a),n.width=r.width=i,n.height=r.height=a,m(n),r},_reglType:\\\"framebuffer\\\",_framebuffer:n,destroy:function(){v(n),g(n)},use:function(t){x.setFBO({framebuffer:r},t)}})}var x={cur:null,next:null,dirty:!1,setFBO:null},b=[\\\"rgba\\\"],_=[\\\"rgba4\\\",\\\"rgb565\\\",\\\"rgb5 a1\\\"];e.ext_srgb&&_.push(\\\"srgba\\\"),e.ext_color_buffer_half_float&&_.push(\\\"rgba16f\\\",\\\"rgb16f\\\"),e.webgl_color_buffer_float&&_.push(\\\"rgba32f\\\");var w=[\\\"uint8\\\"];e.oes_texture_half_float&&w.push(\\\"half float\\\",\\\"float16\\\"),e.oes_texture_float&&w.push(\\\"float\\\",\\\"float32\\\");var k=0,M={};return j(x,{getFramebuffer:function(t){return\\\"function\\\"==typeof t&&\\\"framebuffer\\\"===t._reglType&&(t=t._framebuffer)instanceof d?t:null},create:y,createCube:function(t){function e(t){var i,a={color:null},o=0,s=null;i=\\\"rgba\\\";var l=\\\"uint8\\\",c=1;if(\\\"number\\\"==typeof t?o=0|t:t?(\\\"shape\\\"in t?o=t.shape[0]:(\\\"radius\\\"in t&&(o=0|t.radius),\\\"width\\\"in t?o=0|t.width:\\\"height\\\"in t&&(o=0|t.height)),(\\\"color\\\"in t||\\\"colors\\\"in t)&&(s=t.color||t.colors,Array.isArray(s)),s||(\\\"colorCount\\\"in t&&(c=0|t.colorCount),\\\"colorType\\\"in t&&(l=t.colorType),\\\"colorFormat\\\"in t&&(i=t.colorFormat)),\\\"depth\\\"in t&&(a.depth=t.depth),\\\"stencil\\\"in t&&(a.stencil=t.stencil),\\\"depthStencil\\\"in t&&(a.depthStencil=t.depthStencil)):o=1,s)if(Array.isArray(s))for(t=[],i=0;i<s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(c),s={radius:o,format:i,type:l},i=0;i<c;++i)t[i]=n.createCube(s);for(a.color=Array(t.length),i=0;i<t.length;++i)c=t[i],o=o||c.width,a.color[i]={target:34069,data:t[i]};for(i=0;6>i;++i){for(c=0;c<t.length;++c)a.color[c].target=34069+i;0<i&&(a.depth=r[0].depth,a.stencil=r[0].stencil,a.depthStencil=r[0].depthStencil),r[i]?r[i](a):r[i]=y(a)}return j(e,{width:o,height:o,color:t})}var r=Array(6);return e(t),j(e,{faces:r,resize:function(t){var n=0|t;if(n===e.width)return e;var i=e.color;for(t=0;t<i.length;++t)i[t].resize(n);for(t=0;6>t;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:\\\"framebufferCube\\\",destroy:function(){r.forEach(function(t){t.destroy()})}})},clear:function(){X(M).forEach(v)},restore:function(){X(M).forEach(function(e){e.framebuffer=t.createFramebuffer(),m(e)})}})}function T(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function S(t,e,r,n){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;r<t.length;++r)if(t[r].id===e.id)return void(t[r].location=e.location);t.push(e)}function o(r,n,i){if(!(o=(i=35632===r?c:u)[n])){var a=e.str(n),o=t.createShader(r);t.shaderSource(o,a),t.compileShader(o),i[n]=o}return o}function s(t,e){this.id=p++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],n.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function l(r,s){var l,c;l=o(35632,r.fragId),c=o(35633,r.vertId);var u=r.program=t.createProgram();t.attachShader(u,l),t.attachShader(u,c),t.linkProgram(u);var f=t.getProgramParameter(u,35718);n.profile&&(r.stats.uniformsCount=f);var h=r.uniforms;for(l=0;l<f;++l)if(c=t.getActiveUniform(u,l))if(1<c.size)for(var p=0;p<c.size;++p){var d=c.name.replace(\\\"[0]\\\",\\\"[\\\"+p+\\\"]\\\");a(h,new i(d,e.id(d),t.getUniformLocation(u,d),c))}else a(h,new i(c.name,e.id(c.name),t.getUniformLocation(u,c.name),c));for(f=t.getProgramParameter(u,35721),n.profile&&(r.stats.attributesCount=f),h=r.attributes,l=0;l<f;++l)(c=t.getActiveAttrib(u,l))&&a(h,new i(c.name,e.id(c.name),t.getAttribLocation(u,c.name),c))}var c={},u={},f={},h=[],p=0;return n.profile&&(r.getMaxUniformsCount=function(){var t=0;return h.forEach(function(e){e.stats.uniformsCount>t&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);X(c).forEach(e),c={},X(u).forEach(e),u={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,f={},r.shaderCount=0},program:function(t,e,n){var i=f[e];i||(i=f[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a),i[t]=a,h.push(a)),a},restore:function(){c={},u={};for(var t=0;t<h.length;++t)l(h[t])},shader:o,frag:-1,vert:-1}}function C(t,e,r,n,i,a,o){function s(i){var a;a=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var o=0,s=0,l=n.framebufferWidth,c=n.framebufferHeight,u=null;return Y(i)?u=i:i&&(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),c=0|(i.height||n.framebufferHeight-s),u=i.data||null),r(),i=l*c*4,u||(5121===a?u=new Uint8Array(i):5126===a&&(u=u||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(o,s,l,c,6408,a,u),u}return function(t){return t&&\\\"framebuffer\\\"in t?function(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=s(t)}),r}(t):s(t)}}function E(t){return Array.prototype.slice.call(t)}function L(t){return E(t).join(\\\"\\\")}function z(){function t(){var t=[],e=[];return j(function(){t.push.apply(t,E(arguments))},{def:function(){var n=\\\"v\\\"+r++;return e.push(n),0<arguments.length&&(t.push(n,\\\"=\\\"),t.push.apply(t,E(arguments)),t.push(\\\";\\\")),n},toString:function(){return L([0<e.length?\\\"var \\\"+e+\\\";\\\":\\\"\\\",L(t)])}})}function e(){function e(t,e){n(t,e,\\\"=\\\",r.def(t,e),\\\";\\\")}var r=t(),n=t(),i=r.toString,a=n.toString;return j(function(){r.apply(r,E(arguments))},{def:r.def,entry:r,exit:n,save:e,set:function(t,n,i){e(t,n),r(t,n,\\\"=\\\",i,\\\";\\\")},toString:function(){return i()+a()}})}var r=0,n=[],i=[],a=t(),o={};return{global:a,link:function(t){for(var e=0;e<i.length;++e)if(i[e]===t)return n[e];return e=\\\"g\\\"+r++,n.push(e),i.push(t),e},block:t,proc:function(t,r){function n(){var t=\\\"a\\\"+i.length;return i.push(t),t}var i=[];r=r||0;for(var a=0;a<r;++a)n();var s=(a=e()).toString;return o[t]=j(a,{arg:n,toString:function(){return L([\\\"function(\\\",i.join(),\\\"){\\\",s(),\\\"}\\\"])}})},scope:e,cond:function(){var t=L(arguments),r=e(),n=e(),i=r.toString,a=n.toString;return j(r,{then:function(){return r.apply(r,E(arguments)),this},else:function(){return n.apply(n,E(arguments)),this},toString:function(){var e=a();return e&&(e=\\\"else{\\\"+e+\\\"}\\\"),L([\\\"if(\\\",t,\\\"){\\\",i(),\\\"}\\\",e])}})},compile:function(){var t=['\\\"use strict\\\";',a,\\\"return {\\\"];Object.keys(o).forEach(function(e){t.push('\\\"',e,'\\\":',o[e].toString(),\\\",\\\")}),t.push(\\\"}\\\");var e=L(t).replace(/;/g,\\\";\\\\n\\\").replace(/}/g,\\\"}\\\\n\\\").replace(/{/g,\\\"{\\\\n\\\");return Function.apply(null,n.concat(e)).apply(null,i)}}}function O(t){return Array.isArray(t)||Y(t)||l(t)}function I(t){return t.sort(function(t,e){return\\\"viewport\\\"===t?-1:\\\"viewport\\\"===e?1:t<e?-1:1})}function P(t,e,r,n){this.thisDep=t,this.contextDep=e,this.propDep=r,this.append=n}function D(t){return t&&!(t.thisDep||t.contextDep||t.propDep)}function R(t){return new P(!1,!1,!1,t)}function B(t,e){var r=t.type;return 0===r?new P(!0,1<=(r=t.data.length),2<=r,e):4===r?new P((r=t.data).thisDep,r.contextDep,r.propDep,e):new P(3===r,2===r,1===r,e)}function F(t,e,r,n,i,o,s,l,c,u,f,h,p,d,g){function m(t){return t.replace(\\\".\\\",\\\"_\\\")}function y(t,e,r){var n=m(t);nt.push(t),et[n]=tt[n]=!!r,it[n]=e}function x(t,e,r){var n=m(t);nt.push(t),Array.isArray(r)?(tt[n]=r.slice(),et[n]=r.slice()):tt[n]=et[n]=r,at[n]=e}function b(){var t=z(),r=t.link,n=t.global;t.id=lt++,t.batchId=\\\"0\\\";var i=r(ot),a=t.shared={props:\\\"a0\\\"};Object.keys(ot).forEach(function(t){a[t]=n.def(i,\\\".\\\",t)});var o=t.next={},s=t.current={};Object.keys(at).forEach(function(t){Array.isArray(tt[t])&&(o[t]=n.def(a.next,\\\".\\\",t),s[t]=n.def(a.current,\\\".\\\",t))});var l=t.constants={};Object.keys(st).forEach(function(t){l[t]=n.def(JSON.stringify(st[t]))}),t.invoke=function(e,n){switch(n.type){case 0:var i=[\\\"this\\\",a.context,a.props,t.batchId];return e.def(r(n.data),\\\".call(\\\",i.slice(0,Math.max(n.data.length+1,4)),\\\")\\\");case 1:return e.def(a.props,n.data);case 2:return e.def(a.context,n.data);case 3:return e.def(\\\"this\\\",n.data);case 4:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){if((t=e.id(t))in c)return c[t];var n=u.scope[t];return n||(n=u.scope[t]=new Z),c[t]=r(n)},t}function _(t,e){var r=t.static,n=t.dynamic;if(\\\"framebuffer\\\"in r){var i=r.framebuffer;return i?(i=l.getFramebuffer(i),R(function(t,e){var r=t.link(i),n=t.shared;return e.set(n.framebuffer,\\\".next\\\",r),n=n.context,e.set(n,\\\".framebufferWidth\\\",r+\\\".width\\\"),e.set(n,\\\".framebufferHeight\\\",r+\\\".height\\\"),r})):R(function(t,e){var r=t.shared;return e.set(r.framebuffer,\\\".next\\\",\\\"null\\\"),r=r.context,e.set(r,\\\".framebufferWidth\\\",r+\\\".drawingBufferWidth\\\"),e.set(r,\\\".framebufferHeight\\\",r+\\\".drawingBufferHeight\\\"),\\\"null\\\"})}if(\\\"framebuffer\\\"in n){var a=n.framebuffer;return B(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer;r=e.def(i,\\\".getFramebuffer(\\\",r,\\\")\\\");return e.set(i,\\\".next\\\",r),n=n.context,e.set(n,\\\".framebufferWidth\\\",r+\\\"?\\\"+r+\\\".width:\\\"+n+\\\".drawingBufferWidth\\\"),e.set(n,\\\".framebufferHeight\\\",r+\\\"?\\\"+r+\\\".height:\\\"+n+\\\".drawingBufferHeight\\\"),r})}return null}function w(t){function r(t){if(t in n){var r=e.id(n[t]);return(t=R(function(){return r})).id=r,t}if(t in i){var a=i[t];return B(a,function(t,e){var r=t.invoke(e,a);return e.def(t.shared.strings,\\\".id(\\\",r,\\\")\\\")})}return null}var n=t.static,i=t.dynamic,a=r(\\\"frag\\\"),o=r(\\\"vert\\\"),s=null;return D(a)&&D(o)?(s=f.program(o.id,a.id),t=R(function(t,e){return t.link(s)})):t=new P(a&&a.thisDep||o&&o.thisDep,a&&a.contextDep||o&&o.contextDep,a&&a.propDep||o&&o.propDep,function(t,e){var r,n,i=t.shared.shader;return r=a?a.append(t,e):e.def(i,\\\".\\\",\\\"frag\\\"),n=o?o.append(t,e):e.def(i,\\\".\\\",\\\"vert\\\"),e.def(i+\\\".program(\\\"+n+\\\",\\\"+r+\\\")\\\")}),{frag:a,vert:o,progVar:t,program:s}}function k(t,e){function r(t,e){if(t in n){var r=0|n[t];return R(function(t,n){return e&&(t.OFFSET=r),r})}if(t in i){var o=i[t];return B(o,function(t,r){var n=t.invoke(r,o);return e&&(t.OFFSET=n),n})}return e&&a?R(function(t,e){return t.OFFSET=\\\"0\\\",0}):null}var n=t.static,i=t.dynamic,a=function(){if(\\\"elements\\\"in n){var t=n.elements;O(t)?t=o.getElements(o.create(t,!0)):t&&(t=o.getElements(t));var e=R(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n}return e.ELEMENTS=null});return e.value=t,e}if(\\\"elements\\\"in i){var r=i.elements;return B(r,function(t,e){var n=(i=t.shared).isBufferArgs,i=i.elements,a=t.invoke(e,r),o=e.def(\\\"null\\\");n=e.def(n,\\\"(\\\",a,\\\")\\\"),a=t.cond(n).then(o,\\\"=\\\",i,\\\".createStream(\\\",a,\\\");\\\").else(o,\\\"=\\\",i,\\\".getElements(\\\",a,\\\");\\\");return e.entry(a),e.exit(t.cond(n).then(i,\\\".destroyStream(\\\",o,\\\");\\\")),t.ELEMENTS=o})}return null}(),s=r(\\\"offset\\\",!0);return{elements:a,primitive:function(){if(\\\"primitive\\\"in n){var t=n.primitive;return R(function(e,r){return rt[t]})}if(\\\"primitive\\\"in i){var e=i.primitive;return B(e,function(t,r){var n=t.constants.primTypes,i=t.invoke(r,e);return r.def(n,\\\"[\\\",i,\\\"]\\\")})}return a?D(a)?a.value?R(function(t,e){return e.def(t.ELEMENTS,\\\".primType\\\")}):R(function(){return 4}):new P(a.thisDep,a.contextDep,a.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,\\\"?\\\",r,\\\".primType:\\\",4)}):null}(),count:function(){if(\\\"count\\\"in n){var t=0|n.count;return R(function(){return t})}if(\\\"count\\\"in i){var e=i.count;return B(e,function(t,r){return t.invoke(r,e)})}return a?D(a)?a?s?new P(s.thisDep,s.contextDep,s.propDep,function(t,e){return e.def(t.ELEMENTS,\\\".vertCount-\\\",t.OFFSET)}):R(function(t,e){return e.def(t.ELEMENTS,\\\".vertCount\\\")}):R(function(){return-1}):new P(a.thisDep||s.thisDep,a.contextDep||s.contextDep,a.propDep||s.propDep,function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,\\\"?\\\",r,\\\".vertCount-\\\",t.OFFSET,\\\":-1\\\"):e.def(r,\\\"?\\\",r,\\\".vertCount:-1\\\")}):null}(),instances:r(\\\"instances\\\",!1),offset:s}}function M(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var r=n[t],a=e.id(t),s=new Z;if(O(r))s.state=1,s.buffer=i.getBuffer(i.create(r,34962,!1,!0)),s.type=0;else if(c=i.getBuffer(r))s.state=1,s.buffer=c,s.type=0;else if(\\\"constant\\\"in r){var l=r.constant;s.buffer=\\\"null\\\",s.state=2,\\\"number\\\"==typeof l?s.x=l:bt.forEach(function(t,e){e<l.length&&(s[t]=l[e])})}else{var c=O(r.buffer)?i.getBuffer(i.create(r.buffer,34962,!1,!0)):i.getBuffer(r.buffer),u=0|r.offset,f=0|r.stride,h=0|r.size,p=!!r.normalized,d=0;\\\"type\\\"in r&&(d=J[r.type]),r=0|r.divisor,s.buffer=c,s.state=1,s.size=h,s.normalized=p,s.type=d||c.dtype,s.offset=u,s.stride=f,s.divisor=r}o[t]=R(function(t,e){var r=t.attribCache;if(a in r)return r[a];var n={isStream:!1};return Object.keys(s).forEach(function(t){n[t]=s[t]}),s.buffer&&(n.buffer=t.link(s.buffer),n.type=n.type||n.buffer+\\\".dtype\\\"),r[a]=n})}),Object.keys(a).forEach(function(t){var e=a[t];o[t]=B(e,function(t,r){function n(t){r(l[t],\\\"=\\\",i,\\\".\\\",t,\\\"|0;\\\")}var i=t.invoke(r,e),a=t.shared,o=a.isBufferArgs,s=a.buffer,l={isStream:r.def(!1)},c=new Z;c.state=1,Object.keys(c).forEach(function(t){l[t]=r.def(\\\"\\\"+c[t])});var u=l.buffer,f=l.type;return r(\\\"if(\\\",o,\\\"(\\\",i,\\\")){\\\",l.isStream,\\\"=true;\\\",u,\\\"=\\\",s,\\\".createStream(\\\",34962,\\\",\\\",i,\\\");\\\",f,\\\"=\\\",u,\\\".dtype;\\\",\\\"}else{\\\",u,\\\"=\\\",s,\\\".getBuffer(\\\",i,\\\");\\\",\\\"if(\\\",u,\\\"){\\\",f,\\\"=\\\",u,\\\".dtype;\\\",'}else if(\\\"constant\\\" in ',i,\\\"){\\\",l.state,\\\"=\\\",2,\\\";\\\",\\\"if(typeof \\\"+i+'.constant === \\\"number\\\"){',l[bt[0]],\\\"=\\\",i,\\\".constant;\\\",bt.slice(1).map(function(t){return l[t]}).join(\\\"=\\\"),\\\"=0;\\\",\\\"}else{\\\",bt.map(function(t,e){return l[t]+\\\"=\\\"+i+\\\".constant.length>\\\"+e+\\\"?\\\"+i+\\\".constant[\\\"+e+\\\"]:0;\\\"}).join(\\\"\\\"),\\\"}}else{\\\",\\\"if(\\\",o,\\\"(\\\",i,\\\".buffer)){\\\",u,\\\"=\\\",s,\\\".createStream(\\\",34962,\\\",\\\",i,\\\".buffer);\\\",\\\"}else{\\\",u,\\\"=\\\",s,\\\".getBuffer(\\\",i,\\\".buffer);\\\",\\\"}\\\",f,'=\\\"type\\\" in ',i,\\\"?\\\",a.glTypes,\\\"[\\\",i,\\\".type]:\\\",u,\\\".dtype;\\\",l.normalized,\\\"=!!\\\",i,\\\".normalized;\\\"),n(\\\"size\\\"),n(\\\"offset\\\"),n(\\\"stride\\\"),n(\\\"divisor\\\"),r(\\\"}}\\\"),r.exit(\\\"if(\\\",l.isStream,\\\"){\\\",s,\\\".destroyStream(\\\",u,\\\");\\\",\\\"}\\\"),l})}),o}function A(t,e,r,n,i){var o=_(t),s=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return\\\"width\\\"in r?n=0|r.width:t=!1,\\\"height\\\"in r?o=0|r.height:t=!1,new P(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var i=t.shared.context,a=n;\\\"width\\\"in r||(a=e.def(i,\\\".\\\",\\\"framebufferWidth\\\",\\\"-\\\",s));var c=o;return\\\"height\\\"in r||(c=e.def(i,\\\".\\\",\\\"framebufferHeight\\\",\\\"-\\\",l)),[s,l,a,c]})}if(t in a){var c=a[t];return t=B(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,i=e.def(r,\\\".x|0\\\"),a=e.def(r,\\\".y|0\\\");return[i,a,e.def('\\\"width\\\" in ',r,\\\"?\\\",r,\\\".width|0:\\\",\\\"(\\\",n,\\\".\\\",\\\"framebufferWidth\\\",\\\"-\\\",i,\\\")\\\"),r=e.def('\\\"height\\\" in ',r,\\\"?\\\",r,\\\".height|0:\\\",\\\"(\\\",n,\\\".\\\",\\\"framebufferHeight\\\",\\\"-\\\",a,\\\")\\\")]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new P(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,\\\".\\\",\\\"framebufferWidth\\\"),e.def(r,\\\".\\\",\\\"framebufferHeight\\\")]}):null}var i=t.static,a=t.dynamic;if(t=n(\\\"viewport\\\")){var o=t;t=new P(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,\\\".viewportWidth\\\",r[2]),e.set(n,\\\".viewportHeight\\\",r[3]),r})}return{viewport:t,scissor_box:n(\\\"scissor.box\\\")}}(t,o),l=k(t),c=function(t,e){var r=t.static,n=t.dynamic,i={};return nt.forEach(function(t){function e(e,a){if(t in r){var s=e(r[t]);i[o]=R(function(){return s})}else if(t in n){var l=n[t];i[o]=B(l,function(t,e){return a(t,e,t.invoke(e,l))})}}var o=m(t);switch(t){case\\\"cull.enable\\\":case\\\"blend.enable\\\":case\\\"dither\\\":case\\\"stencil.enable\\\":case\\\"depth.enable\\\":case\\\"scissor.enable\\\":case\\\"polygonOffset.enable\\\":case\\\"sample.alpha\\\":case\\\"sample.enable\\\":case\\\"depth.mask\\\":return e(function(t){return t},function(t,e,r){return r});case\\\"depth.func\\\":return e(function(t){return kt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,\\\"[\\\",r,\\\"]\\\")});case\\\"depth.range\\\":return e(function(t){return t},function(t,e,r){return[e.def(\\\"+\\\",r,\\\"[0]\\\"),e=e.def(\\\"+\\\",r,\\\"[1]\\\")]});case\\\"blend.func\\\":return e(function(t){return[wt[\\\"srcRGB\\\"in t?t.srcRGB:t.src],wt[\\\"dstRGB\\\"in t?t.dstRGB:t.dst],wt[\\\"srcAlpha\\\"in t?t.srcAlpha:t.src],wt[\\\"dstAlpha\\\"in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('\\\"',t,n,'\\\" in ',r,\\\"?\\\",r,\\\".\\\",t,n,\\\":\\\",r,\\\".\\\",t)}t=t.constants.blendFuncs;var i=n(\\\"src\\\",\\\"RGB\\\"),a=n(\\\"dst\\\",\\\"RGB\\\"),o=(i=e.def(t,\\\"[\\\",i,\\\"]\\\"),e.def(t,\\\"[\\\",n(\\\"src\\\",\\\"Alpha\\\"),\\\"]\\\"));return[i,a=e.def(t,\\\"[\\\",a,\\\"]\\\"),o,t=e.def(t,\\\"[\\\",n(\\\"dst\\\",\\\"Alpha\\\"),\\\"]\\\")]});case\\\"blend.equation\\\":return e(function(t){return\\\"string\\\"==typeof t?[$[t],$[t]]:\\\"object\\\"==typeof t?[$[t.rgb],$[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond(\\\"typeof \\\",r,'===\\\"string\\\"')).then(i,\\\"=\\\",a,\\\"=\\\",n,\\\"[\\\",r,\\\"];\\\"),t.else(i,\\\"=\\\",n,\\\"[\\\",r,\\\".rgb];\\\",a,\\\"=\\\",n,\\\"[\\\",r,\\\".alpha];\\\"),e(t),[i,a]});case\\\"blend.color\\\":return e(function(t){return a(4,function(e){return+t[e]})},function(t,e,r){return a(4,function(t){return e.def(\\\"+\\\",r,\\\"[\\\",t,\\\"]\\\")})});case\\\"stencil.mask\\\":return e(function(t){return 0|t},function(t,e,r){return e.def(r,\\\"|0\\\")});case\\\"stencil.func\\\":return e(function(t){return[kt[t.cmp||\\\"keep\\\"],t.ref||0,\\\"mask\\\"in t?t.mask:-1]},function(t,e,r){return[t=e.def('\\\"cmp\\\" in ',r,\\\"?\\\",t.constants.compareFuncs,\\\"[\\\",r,\\\".cmp]\\\",\\\":\\\",7680),e.def(r,\\\".ref|0\\\"),e=e.def('\\\"mask\\\" in ',r,\\\"?\\\",r,\\\".mask|0:-1\\\")]});case\\\"stencil.opFront\\\":case\\\"stencil.opBack\\\":return e(function(e){return[\\\"stencil.opBack\\\"===t?1029:1028,Mt[e.fail||\\\"keep\\\"],Mt[e.zfail||\\\"keep\\\"],Mt[e.zpass||\\\"keep\\\"]]},function(e,r,n){function i(t){return r.def('\\\"',t,'\\\" in ',n,\\\"?\\\",a,\\\"[\\\",n,\\\".\\\",t,\\\"]:\\\",7680)}var a=e.constants.stencilOps;return[\\\"stencil.opBack\\\"===t?1029:1028,i(\\\"fail\\\"),i(\\\"zfail\\\"),i(\\\"zpass\\\")]});case\\\"polygonOffset.offset\\\":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return[e.def(r,\\\".factor|0\\\"),e=e.def(r,\\\".units|0\\\")]});case\\\"cull.face\\\":return e(function(t){var e=0;return\\\"front\\\"===t?e=1028:\\\"back\\\"===t&&(e=1029),e},function(t,e,r){return e.def(r,'===\\\"front\\\"?',1028,\\\":\\\",1029)});case\\\"lineWidth\\\":return e(function(t){return t},function(t,e,r){return r});case\\\"frontFace\\\":return e(function(t){return At[t]},function(t,e,r){return e.def(r+'===\\\"cw\\\"?2304:2305')});case\\\"colorMask\\\":return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return a(4,function(t){return\\\"!!\\\"+r+\\\"[\\\"+t+\\\"]\\\"})});case\\\"sample.coverage\\\":return e(function(t){return[\\\"value\\\"in t?t.value:1,!!t.invert]},function(t,e,r){return[e.def('\\\"value\\\" in ',r,\\\"?+\\\",r,\\\".value:1\\\"),e=e.def(\\\"!!\\\",r,\\\".invert\\\")]})}}),i}(t),u=w(t),f=s.viewport;return f&&(c.viewport=f),(s=s[f=m(\\\"scissor.box\\\")])&&(c[f]=s),(o={framebuffer:o,draw:l,shader:u,state:c,dirty:s=0<Object.keys(c).length}).profile=function(t){var e,r=t.static;if(t=t.dynamic,\\\"profile\\\"in r){var n=!!r.profile;(e=R(function(t,e){return n})).enable=n}else if(\\\"profile\\\"in t){var i=t.profile;e=B(i,function(t,e){return t.invoke(e,i)})}return e}(t),o.uniforms=function(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var e,n=r[t];if(\\\"number\\\"==typeof n||\\\"boolean\\\"==typeof n)e=R(function(){return n});else if(\\\"function\\\"==typeof n){var o=n._reglType;\\\"texture2d\\\"===o||\\\"textureCube\\\"===o?e=R(function(t){return t.link(n)}):\\\"framebuffer\\\"!==o&&\\\"framebufferCube\\\"!==o||(e=R(function(t){return t.link(n.color[0])}))}else v(n)&&(e=R(function(t){return t.global.def(\\\"[\\\",a(n.length,function(t){return n[t]}),\\\"]\\\")}));e.value=n,i[t]=e}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=B(e,function(t,r){return t.invoke(r,e)})}),i}(r),o.attributes=M(e),o.context=function(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=R(function(t,e){return\\\"number\\\"==typeof r||\\\"boolean\\\"==typeof r?\\\"\\\"+r:t.link(r)})}),Object.keys(r).forEach(function(t){var e=r[t];n[t]=B(e,function(t,r){return t.invoke(r,e)})}),n}(n),o}function T(t,e,r){var n=t.shared.context,i=t.scope();Object.keys(r).forEach(function(a){e.save(n,\\\".\\\"+a),i(n,\\\".\\\",a,\\\"=\\\",r[a].append(t,e),\\\";\\\")}),e(i)}function S(t,e,r,n){var i,a=(s=t.shared).gl,o=s.framebuffer;Q&&(i=e.def(s.extensions,\\\".webgl_draw_buffers\\\"));var s=(l=t.constants).drawBuffer,l=l.backBuffer;t=r?r.append(t,e):e.def(o,\\\".next\\\"),n||e(\\\"if(\\\",t,\\\"!==\\\",o,\\\".cur){\\\"),e(\\\"if(\\\",t,\\\"){\\\",a,\\\".bindFramebuffer(\\\",36160,\\\",\\\",t,\\\".framebuffer);\\\"),Q&&e(i,\\\".drawBuffersWEBGL(\\\",s,\\\"[\\\",t,\\\".colorAttachments.length]);\\\"),e(\\\"}else{\\\",a,\\\".bindFramebuffer(\\\",36160,\\\",null);\\\"),Q&&e(i,\\\".drawBuffersWEBGL(\\\",l,\\\");\\\"),e(\\\"}\\\",o,\\\".cur=\\\",t,\\\";\\\"),n||e(\\\"}\\\")}function C(t,e,r){var n=t.shared,i=n.gl,o=t.current,s=t.next,l=n.current,c=n.next,u=t.cond(l,\\\".dirty\\\");nt.forEach(function(e){var n,f;if(!((e=m(e))in r.state))if(e in s){n=s[e],f=o[e];var h=a(tt[e].length,function(t){return u.def(n,\\\"[\\\",t,\\\"]\\\")});u(t.cond(h.map(function(t,e){return t+\\\"!==\\\"+f+\\\"[\\\"+e+\\\"]\\\"}).join(\\\"||\\\")).then(i,\\\".\\\",at[e],\\\"(\\\",h,\\\");\\\",h.map(function(t,e){return f+\\\"[\\\"+e+\\\"]=\\\"+t}).join(\\\";\\\"),\\\";\\\"))}else n=u.def(c,\\\".\\\",e),h=t.cond(n,\\\"!==\\\",l,\\\".\\\",e),u(h),e in it?h(t.cond(n).then(i,\\\".enable(\\\",it[e],\\\");\\\").else(i,\\\".disable(\\\",it[e],\\\");\\\"),l,\\\".\\\",e,\\\"=\\\",n,\\\";\\\"):h(i,\\\".\\\",at[e],\\\"(\\\",n,\\\");\\\",l,\\\".\\\",e,\\\"=\\\",n,\\\";\\\")}),0===Object.keys(r.state).length&&u(l,\\\".dirty=false;\\\"),e(u)}function E(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;I(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var c=l.append(t,e);if(it[i]){var u=it[i];D(l)?e(s,c?\\\".enable(\\\":\\\".disable(\\\",u,\\\");\\\"):e(t.cond(c).then(s,\\\".enable(\\\",u,\\\");\\\").else(s,\\\".disable(\\\",u,\\\");\\\")),e(o,\\\".\\\",i,\\\"=\\\",c,\\\";\\\")}else if(v(c)){var f=a[i];e(s,\\\".\\\",at[i],\\\"(\\\",c,\\\");\\\",c.map(function(t,e){return f+\\\"[\\\"+e+\\\"]=\\\"+t}).join(\\\";\\\"),\\\";\\\")}else e(s,\\\".\\\",at[i],\\\"(\\\",c,\\\");\\\",o,\\\".\\\",i,\\\"=\\\",c,\\\";\\\")}})}function L(t,e){K&&(t.instancing=e.def(t.shared.extensions,\\\".angle_instanced_arrays\\\"))}function F(t,e,r,n,i){function a(){return\\\"undefined\\\"==typeof performance?\\\"Date.now()\\\":\\\"performance.now()\\\"}function o(t){t(c=e.def(),\\\"=\\\",a(),\\\";\\\"),\\\"string\\\"==typeof i?t(h,\\\".count+=\\\",i,\\\";\\\"):t(h,\\\".count++;\\\"),d&&(n?t(u=e.def(),\\\"=\\\",g,\\\".getNumPendingQueries();\\\"):t(g,\\\".beginQuery(\\\",h,\\\");\\\"))}function s(t){t(h,\\\".cpuTime+=\\\",a(),\\\"-\\\",c,\\\";\\\"),d&&(n?t(g,\\\".pushScopeStats(\\\",u,\\\",\\\",g,\\\".getNumPendingQueries(),\\\",h,\\\");\\\"):t(g,\\\".endQuery();\\\"))}function l(t){var r=e.def(p,\\\".profile\\\");e(p,\\\".profile=\\\",t,\\\";\\\"),e.exit(p,\\\".profile=\\\",r,\\\";\\\")}var c,u,f=t.shared,h=t.stats,p=f.current,g=f.timer;if(r=r.profile){if(D(r))return void(r.enable?(o(e),s(e.exit),l(\\\"true\\\")):l(\\\"false\\\"));l(r=r.append(t,e))}else r=e.def(p,\\\".profile\\\");o(f=t.block()),e(\\\"if(\\\",r,\\\"){\\\",f,\\\"}\\\"),s(t=t.block()),e.exit(\\\"if(\\\",r,\\\"){\\\",t,\\\"}\\\")}function N(t,e,r,n,i){function a(r,n,i){function a(){e(\\\"if(!\\\",u,\\\".buffer){\\\",l,\\\".enableVertexAttribArray(\\\",c,\\\");}\\\");var r,a=i.type;r=i.size?e.def(i.size,\\\"||\\\",n):n,e(\\\"if(\\\",u,\\\".type!==\\\",a,\\\"||\\\",u,\\\".size!==\\\",r,\\\"||\\\",p.map(function(t){return u+\\\".\\\"+t+\\\"!==\\\"+i[t]}).join(\\\"||\\\"),\\\"){\\\",l,\\\".bindBuffer(\\\",34962,\\\",\\\",f,\\\".buffer);\\\",l,\\\".vertexAttribPointer(\\\",[c,r,a,i.normalized,i.stride,i.offset],\\\");\\\",u,\\\".type=\\\",a,\\\";\\\",u,\\\".size=\\\",r,\\\";\\\",p.map(function(t){return u+\\\".\\\"+t+\\\"=\\\"+i[t]+\\\";\\\"}).join(\\\"\\\"),\\\"}\\\"),K&&(a=i.divisor,e(\\\"if(\\\",u,\\\".divisor!==\\\",a,\\\"){\\\",t.instancing,\\\".vertexAttribDivisorANGLE(\\\",[c,a],\\\");\\\",u,\\\".divisor=\\\",a,\\\";}\\\"))}function s(){e(\\\"if(\\\",u,\\\".buffer){\\\",l,\\\".disableVertexAttribArray(\\\",c,\\\");\\\",\\\"}if(\\\",bt.map(function(t,e){return u+\\\".\\\"+t+\\\"!==\\\"+h[e]}).join(\\\"||\\\"),\\\"){\\\",l,\\\".vertexAttrib4f(\\\",c,\\\",\\\",h,\\\");\\\",bt.map(function(t,e){return u+\\\".\\\"+t+\\\"=\\\"+h[e]+\\\";\\\"}).join(\\\"\\\"),\\\"}\\\")}var l=o.gl,c=e.def(r,\\\".location\\\"),u=e.def(o.attributes,\\\"[\\\",c,\\\"]\\\");r=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],p=[\\\"buffer\\\",\\\"normalized\\\",\\\"offset\\\",\\\"stride\\\"];1===r?a():2===r?s():(e(\\\"if(\\\",r,\\\"===\\\",1,\\\"){\\\"),a(),e(\\\"}else{\\\"),s(),e(\\\"}\\\"))}var o=t.shared;n.forEach(function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(t,e)}else{if(!i(Tt))return;var c=t.scopeAttrib(s);o={},Object.keys(new Z).forEach(function(t){o[t]=e.def(c,\\\".\\\",t)})}a(t.link(n),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)})}function j(t,r,n,i,o){for(var s,l=t.shared,c=l.gl,u=0;u<i.length;++u){var f,h=(g=i[u]).name,p=g.info.type,d=n.uniforms[h],g=t.link(g)+\\\".location\\\";if(d){if(!o(d))continue;if(D(d)){if(h=d.value,35678===p||35680===p)r(c,\\\".uniform1i(\\\",g,\\\",\\\",(p=t.link(h._texture||h.color[0]._texture))+\\\".bind());\\\"),r.exit(p,\\\".unbind();\\\");else if(35674===p||35675===p||35676===p)d=2,35675===p?d=3:35676===p&&(d=4),r(c,\\\".uniformMatrix\\\",d,\\\"fv(\\\",g,\\\",false,\\\",h=t.global.def(\\\"new Float32Array([\\\"+Array.prototype.slice.call(h)+\\\"])\\\"),\\\");\\\");else{switch(p){case 5126:s=\\\"1f\\\";break;case 35664:s=\\\"2f\\\";break;case 35665:s=\\\"3f\\\";break;case 35666:s=\\\"4f\\\";break;case 35670:case 5124:s=\\\"1i\\\";break;case 35671:case 35667:s=\\\"2i\\\";break;case 35672:case 35668:s=\\\"3i\\\";break;case 35673:s=\\\"4i\\\";break;case 35669:s=\\\"4i\\\"}r(c,\\\".uniform\\\",s,\\\"(\\\",g,\\\",\\\",v(h)?Array.prototype.slice.call(h):h,\\\");\\\")}continue}f=d.append(t,r)}else{if(!o(Tt))continue;f=r.def(l.uniforms,\\\"[\\\",e.id(h),\\\"]\\\")}switch(35678===p?r(\\\"if(\\\",f,\\\"&&\\\",f,'._reglType===\\\"framebuffer\\\"){',f,\\\"=\\\",f,\\\".color[0];\\\",\\\"}\\\"):35680===p&&r(\\\"if(\\\",f,\\\"&&\\\",f,'._reglType===\\\"framebufferCube\\\"){',f,\\\"=\\\",f,\\\".color[0];\\\",\\\"}\\\"),h=1,p){case 35678:case 35680:p=r.def(f,\\\"._texture\\\"),r(c,\\\".uniform1i(\\\",g,\\\",\\\",p,\\\".bind());\\\"),r.exit(p,\\\".unbind();\\\");continue;case 5124:case 35670:s=\\\"1i\\\";break;case 35667:case 35671:s=\\\"2i\\\",h=2;break;case 35668:case 35672:s=\\\"3i\\\",h=3;break;case 35669:case 35673:s=\\\"4i\\\",h=4;break;case 5126:s=\\\"1f\\\";break;case 35664:s=\\\"2f\\\",h=2;break;case 35665:s=\\\"3f\\\",h=3;break;case 35666:s=\\\"4f\\\",h=4;break;case 35674:s=\\\"Matrix2fv\\\";break;case 35675:s=\\\"Matrix3fv\\\";break;case 35676:s=\\\"Matrix4fv\\\"}if(r(c,\\\".uniform\\\",s,\\\"(\\\",g,\\\",\\\"),\\\"M\\\"===s.charAt(0)){g=Math.pow(p-35674+2,2);var m=t.global.def(\\\"new Float32Array(\\\",g,\\\")\\\");r(\\\"false,(Array.isArray(\\\",f,\\\")||\\\",f,\\\" instanceof Float32Array)?\\\",f,\\\":(\\\",a(g,function(t){return m+\\\"[\\\"+t+\\\"]=\\\"+f+\\\"[\\\"+t+\\\"]\\\"}),\\\",\\\",m,\\\")\\\")}else r(1<h?a(h,function(t){return f+\\\"[\\\"+t+\\\"]\\\"}):f);r(\\\");\\\")}}function V(t,e,r,n){function i(i){var a=h[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(f,\\\".\\\",i)}function a(){function t(){r(l,\\\".drawElementsInstancedANGLE(\\\",[d,v,m,g+\\\"<<((\\\"+m+\\\"-5121)>>1)\\\",s],\\\");\\\")}function e(){r(l,\\\".drawArraysInstancedANGLE(\\\",[d,g,v,s],\\\");\\\")}p?y?t():(r(\\\"if(\\\",p,\\\"){\\\"),t(),r(\\\"}else{\\\"),e(),r(\\\"}\\\")):e()}function o(){function t(){r(u+\\\".drawElements(\\\"+[d,v,m,g+\\\"<<((\\\"+m+\\\"-5121)>>1)\\\"]+\\\");\\\")}function e(){r(u+\\\".drawArrays(\\\"+[d,g,v]+\\\");\\\")}p?y?t():(r(\\\"if(\\\",p,\\\"){\\\"),t(),r(\\\"}else{\\\"),e(),r(\\\"}\\\")):e()}var s,l,c=t.shared,u=c.gl,f=c.draw,h=n.draw,p=function(){var i=h.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,\\\".\\\",\\\"elements\\\"),i&&a(\\\"if(\\\"+i+\\\")\\\"+u+\\\".bindBuffer(34963,\\\"+i+\\\".buffer.buffer);\\\"),i}(),d=i(\\\"primitive\\\"),g=i(\\\"offset\\\"),v=function(){var i=h.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,\\\".\\\",\\\"count\\\"),i}();if(\\\"number\\\"==typeof v){if(0===v)return}else r(\\\"if(\\\",v,\\\"){\\\"),r.exit(\\\"}\\\");K&&(s=i(\\\"instances\\\"),l=t.instancing);var m=p+\\\".type\\\",y=h.elements&&D(h.elements);K&&(\\\"number\\\"!=typeof s||0<=s)?\\\"string\\\"==typeof s?(r(\\\"if(\\\",s,\\\">0){\\\"),a(),r(\\\"}else if(\\\",s,\\\"<0){\\\"),o(),r(\\\"}\\\")):a():o()}function q(t,e,r,n,i){return i=(e=b()).proc(\\\"body\\\",i),K&&(e.instancing=i.def(e.shared.extensions,\\\".angle_instanced_arrays\\\")),t(e,i,r,n),e.compile().body}function H(t,e,r,n){L(t,e),N(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),V(t,e,e,r)}function G(t,e,r,n){function i(){return!0}t.batchId=\\\"a1\\\",L(t,e),N(t,e,r,n.attributes,i),j(t,e,r,n.uniforms,i),V(t,e,e,r)}function W(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,\\\"for(\\\",s,\\\"=0;\\\",s,\\\"<\\\",\\\"a1\\\",\\\";++\\\",s,\\\"){\\\",l,\\\"=\\\",\\\"a0\\\",\\\"[\\\",s,\\\"];\\\",u,\\\"}\\\",c.exit),r.needsContext&&T(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),E(t,u,r.state,i),r.profile&&i(r.profile)&&F(t,u,r,!1,!0),n?(N(t,c,r,n.attributes,a),N(t,u,r,n.attributes,i),j(t,c,r,n.uniforms,a),j(t,u,r,n.uniforms,i),V(t,c,u,r)):(e=t.global.def(\\\"{}\\\"),n=r.shader.progVar.append(t,u),l=u.def(n,\\\".id\\\"),c=u.def(e,\\\"[\\\",l,\\\"]\\\"),u(t.shared.gl,\\\".useProgram(\\\",n,\\\".program);\\\",\\\"if(!\\\",c,\\\"){\\\",c,\\\"=\\\",e,\\\"[\\\",l,\\\"]=\\\",t.link(function(e){return q(G,t,r,e,2)}),\\\"(\\\",n,\\\");}\\\",c,\\\".call(this,a0[\\\",s,\\\"],\\\",s,\\\");\\\"))}function Y(t,r){function n(e){var n=r.shader[e];n&&i.set(a.shader,\\\".\\\"+e,n.append(t,i))}var i=t.proc(\\\"scope\\\",3);t.batchId=\\\"a2\\\";var a=t.shared,o=a.current;T(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),I(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,i);v(n)?n.forEach(function(r,n){i.set(t.next[e],\\\"[\\\"+n+\\\"]\\\",r)}):i.set(a.next,\\\".\\\"+e,n)}),F(t,i,r,!0,!0),[\\\"elements\\\",\\\"offset\\\",\\\"count\\\",\\\"instances\\\",\\\"primitive\\\"].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,\\\".\\\"+e,\\\"\\\"+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,\\\"[\\\"+e.id(n)+\\\"]\\\",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Z).forEach(function(t){i.set(a,\\\".\\\"+t,n[t])})}),n(\\\"vert\\\"),n(\\\"frag\\\"),0<Object.keys(r.state).length&&(i(o,\\\".dirty=true;\\\"),i.exit(o,\\\".dirty=true;\\\")),i(\\\"a1(\\\",t.shared.context,\\\",a0,\\\",t.batchId,\\\");\\\")}function X(t,e,r){var n=e.static[r];if(n&&function(t){if(\\\"object\\\"==typeof t&&!v(t)){for(var e=Object.keys(t),r=0;r<e.length;++r)if(U.isDynamic(t[e[r]]))return!0;return!1}}(n)){var i=t.global,a=Object.keys(n),o=!1,s=!1,l=!1,c=t.global.def(\\\"{}\\\");a.forEach(function(e){var r=n[e];if(U.isDynamic(r))\\\"function\\\"==typeof r&&(r=n[e]=U.unbox(r)),e=B(r,null),o=o||e.thisDep,l=l||e.propDep,s=s||e.contextDep;else{switch(i(c,\\\".\\\",e,\\\"=\\\"),typeof r){case\\\"number\\\":i(r);break;case\\\"string\\\":i('\\\"',r,'\\\"');break;case\\\"object\\\":Array.isArray(r)&&i(\\\"[\\\",r.join(),\\\"]\\\");break;default:i(t.link(r))}i(\\\";\\\")}}),e.dynamic[r]=new U.DynamicVariable(4,{thisDep:o,contextDep:s,propDep:l,ref:c,append:function(t,e){a.forEach(function(r){var i=n[r];U.isDynamic(i)&&(i=t.invoke(e,i),e(c,\\\".\\\",r,\\\"=\\\",i,\\\";\\\"))})}}),delete e.static[r]}}var Z=u.Record,$={add:32774,subtract:32778,\\\"reverse subtract\\\":32779};r.ext_blend_minmax&&($.min=32775,$.max=32776);var K=r.angle_instanced_arrays,Q=r.webgl_draw_buffers,tt={dirty:!0,profile:g.profile},et={},nt=[],it={},at={};y(\\\"dither\\\",3024),y(\\\"blend.enable\\\",3042),x(\\\"blend.color\\\",\\\"blendColor\\\",[0,0,0,0]),x(\\\"blend.equation\\\",\\\"blendEquationSeparate\\\",[32774,32774]),x(\\\"blend.func\\\",\\\"blendFuncSeparate\\\",[1,0,1,0]),y(\\\"depth.enable\\\",2929,!0),x(\\\"depth.func\\\",\\\"depthFunc\\\",513),x(\\\"depth.range\\\",\\\"depthRange\\\",[0,1]),x(\\\"depth.mask\\\",\\\"depthMask\\\",!0),x(\\\"colorMask\\\",\\\"colorMask\\\",[!0,!0,!0,!0]),y(\\\"cull.enable\\\",2884),x(\\\"cull.face\\\",\\\"cullFace\\\",1029),x(\\\"frontFace\\\",\\\"frontFace\\\",2305),x(\\\"lineWidth\\\",\\\"lineWidth\\\",1),y(\\\"polygonOffset.enable\\\",32823),x(\\\"polygonOffset.offset\\\",\\\"polygonOffset\\\",[0,0]),y(\\\"sample.alpha\\\",32926),y(\\\"sample.enable\\\",32928),x(\\\"sample.coverage\\\",\\\"sampleCoverage\\\",[1,!1]),y(\\\"stencil.enable\\\",2960),x(\\\"stencil.mask\\\",\\\"stencilMask\\\",-1),x(\\\"stencil.func\\\",\\\"stencilFunc\\\",[519,0,-1]),x(\\\"stencil.opFront\\\",\\\"stencilOpSeparate\\\",[1028,7680,7680,7680]),x(\\\"stencil.opBack\\\",\\\"stencilOpSeparate\\\",[1029,7680,7680,7680]),y(\\\"scissor.enable\\\",3089),x(\\\"scissor.box\\\",\\\"scissor\\\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),x(\\\"viewport\\\",\\\"viewport\\\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var ot={gl:t,context:p,strings:e,next:et,current:tt,draw:h,elements:o,buffer:i,shader:f,attributes:u.state,uniforms:c,framebuffer:l,extensions:r,timer:d,isBufferArgs:O},st={primTypes:rt,compareFuncs:kt,blendFuncs:wt,blendEquations:$,stencilOps:Mt,glTypes:J,orientationType:At};Q&&(st.backBuffer=[1029],st.drawBuffer=a(n.maxDrawbuffers,function(t){return 0===t?[0]:a(t,function(t){return 36064+t})}));var lt=0;return{next:et,current:tt,procs:function(){var t=b(),e=t.proc(\\\"poll\\\"),r=t.proc(\\\"refresh\\\"),i=t.block();e(i),r(i);var o,s=t.shared,l=s.gl,c=s.next,u=s.current;i(u,\\\".dirty=false;\\\"),S(t,e),S(t,r,null,!0),K&&(o=t.link(K));for(var f=0;f<n.maxAttributes;++f){var h=r.def(s.attributes,\\\"[\\\",f,\\\"]\\\"),p=t.cond(h,\\\".buffer\\\");p.then(l,\\\".enableVertexAttribArray(\\\",f,\\\");\\\",l,\\\".bindBuffer(\\\",34962,\\\",\\\",h,\\\".buffer.buffer);\\\",l,\\\".vertexAttribPointer(\\\",f,\\\",\\\",h,\\\".size,\\\",h,\\\".type,\\\",h,\\\".normalized,\\\",h,\\\".stride,\\\",h,\\\".offset);\\\").else(l,\\\".disableVertexAttribArray(\\\",f,\\\");\\\",l,\\\".vertexAttrib4f(\\\",f,\\\",\\\",h,\\\".x,\\\",h,\\\".y,\\\",h,\\\".z,\\\",h,\\\".w);\\\",h,\\\".buffer=null;\\\"),r(p),K&&r(o,\\\".vertexAttribDivisorANGLE(\\\",f,\\\",\\\",h,\\\".divisor);\\\")}return Object.keys(it).forEach(function(n){var a=it[n],o=i.def(c,\\\".\\\",n),s=t.block();s(\\\"if(\\\",o,\\\"){\\\",l,\\\".enable(\\\",a,\\\")}else{\\\",l,\\\".disable(\\\",a,\\\")}\\\",u,\\\".\\\",n,\\\"=\\\",o,\\\";\\\"),r(s),e(\\\"if(\\\",o,\\\"!==\\\",u,\\\".\\\",n,\\\"){\\\",s,\\\"}\\\")}),Object.keys(at).forEach(function(n){var o,s,f=at[n],h=tt[n],p=t.block();p(l,\\\".\\\",f,\\\"(\\\"),v(h)?(f=h.length,o=t.global.def(c,\\\".\\\",n),s=t.global.def(u,\\\".\\\",n),p(a(f,function(t){return o+\\\"[\\\"+t+\\\"]\\\"}),\\\");\\\",a(f,function(t){return s+\\\"[\\\"+t+\\\"]=\\\"+o+\\\"[\\\"+t+\\\"];\\\"}).join(\\\"\\\")),e(\\\"if(\\\",a(f,function(t){return o+\\\"[\\\"+t+\\\"]!==\\\"+s+\\\"[\\\"+t+\\\"]\\\"}).join(\\\"||\\\"),\\\"){\\\",p,\\\"}\\\")):(o=i.def(c,\\\".\\\",n),s=i.def(u,\\\".\\\",n),p(o,\\\");\\\",u,\\\".\\\",n,\\\"=\\\",o,\\\";\\\"),e(\\\"if(\\\",o,\\\"!==\\\",s,\\\"){\\\",p,\\\"}\\\")),r(p)}),t.compile()}(),compile:function(t,e,r,n,i){var a=b();return a.stats=a.link(i),Object.keys(e.static).forEach(function(t){X(a,e,t)}),_t.forEach(function(e){X(a,t,e)}),r=A(t,e,r,n),function(t,e){var r=t.proc(\\\"draw\\\",1);L(t,r),T(t,r,e.context),S(t,r,e.framebuffer),C(t,r,e),E(t,r,e.state),F(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,\\\".useProgram(\\\",n,\\\".program);\\\"),e.shader.program)H(t,r,e,e.shader.program);else{var i=t.global.def(\\\"{}\\\"),a=r.def(n,\\\".id\\\"),o=r.def(i,\\\"[\\\",a,\\\"]\\\");r(t.cond(o).then(o,\\\".call(this,a0);\\\").else(o,\\\"=\\\",i,\\\"[\\\",a,\\\"]=\\\",t.link(function(r){return q(H,t,e,r,1)}),\\\"(\\\",n,\\\");\\\",o,\\\".call(this,a0);\\\"))}0<Object.keys(e.state).length&&r(t.shared.current,\\\".dirty=true;\\\")}(a,r),Y(a,r),function(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc(\\\"batch\\\",2);t.batchId=\\\"0\\\",L(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(T(t,n,e.context),a=!1);var o=!1;if((s=e.framebuffer)?(s.propDep?i=o=!0:s.contextDep&&i&&(o=!0),o||S(t,n,s)):S(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),C(t,n,e),E(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||F(t,n,e,!1,\\\"a1\\\"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=o,(a=e.shader.progVar).contextDep&&i||a.propDep)W(t,n,e,null);else if(a=a.append(t,n),n(t.shared.gl,\\\".useProgram(\\\",a,\\\".program);\\\"),e.shader.program)W(t,n,e,e.shader.program);else{var s=t.global.def(\\\"{}\\\"),l=(o=n.def(a,\\\".id\\\"),n.def(s,\\\"[\\\",o,\\\"]\\\"));n(t.cond(l).then(l,\\\".call(this,a0,a1);\\\").else(l,\\\"=\\\",s,\\\"[\\\",o,\\\"]=\\\",t.link(function(r){return q(W,t,e,r,2)}),\\\"(\\\",a,\\\");\\\",l,\\\".call(this,a0,a1);\\\"))}0<Object.keys(e.state).length&&n(t.shared.current,\\\".dirty=true;\\\")}(a,r),a.compile()}}}function N(t,e){for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}var j=function(t,e){for(var r=Object.keys(e),n=0;n<r.length;++n)t[r[n]]=e[r[n]];return t},V=0,U={DynamicVariable:t,define:function(r,n){return new t(r,e(n+\\\"\\\"))},isDynamic:function(e){return\\\"function\\\"==typeof e&&!e._reglType||e instanceof t},unbox:function(e,r){return\\\"function\\\"==typeof e?new t(0,e):e},accessor:e},q={next:\\\"function\\\"==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,16)},cancel:\\\"function\\\"==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:clearTimeout},H=\\\"undefined\\\"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},G=s();G.zero=s();var W=function(t,e){var r=1;e.ext_texture_filter_anisotropic&&(r=t.getParameter(34047));var n=1,i=1;e.webgl_draw_buffers&&(n=t.getParameter(34852),i=t.getParameter(36063));var a=!!e.oes_texture_float;if(a){a=t.createTexture(),t.bindTexture(3553,a),t.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var o=t.createFramebuffer();if(t.bindFramebuffer(36160,o),t.framebufferTexture2D(36160,36064,3553,a,0),t.bindTexture(3553,null),36053!==t.checkFramebufferStatus(36160))a=!1;else{t.viewport(0,0,1,1),t.clearColor(1,0,0,1),t.clear(16384);var s=G.allocType(5126,4);t.readPixels(0,0,1,1,6408,5126,s),t.getError()?a=!1:(t.deleteFramebuffer(o),t.deleteTexture(a),a=1===s[0]),G.freeType(s)}}return s=!0,s=t.createTexture(),o=G.allocType(5121,36),t.activeTexture(33984),t.bindTexture(34067,s),t.texImage2D(34069,0,6408,3,3,0,6408,5121,o),G.freeType(o),t.bindTexture(34067,null),t.deleteTexture(s),s=!t.getError(),{colorBits:[t.getParameter(3410),t.getParameter(3411),t.getParameter(3412),t.getParameter(3413)],depthBits:t.getParameter(3414),stencilBits:t.getParameter(3415),subpixelBits:t.getParameter(3408),extensions:Object.keys(e).filter(function(t){return!!e[t]}),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938),readFloat:a,npotTextureCube:s}},Y=function(t){return t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Uint8ClampedArray},X=function(t){return Object.keys(t).map(function(e){return t[e]})},Z={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,r,n){var i=1;if(e.length)for(var a=0;a<e.length;++a)i*=e[a];else i=0;switch(r=n||G.allocType(r,i),e.length){case 0:break;case 1:for(n=e[0],e=0;e<n;++e)r[e]=t[e];break;case 2:for(n=e[0],e=e[1],a=i=0;a<n;++a)for(var o=t[a],s=0;s<e;++s)r[i++]=o[s];break;case 3:c(t,e[0],e[1],e[2],r,0);break;default:!function t(e,r,n,i,a){for(var o=1,s=n+1;s<r.length;++s)o*=r[s];var l=r[n];if(4==r.length-n){var u=r[n+1],f=r[n+2];for(r=r[n+3],s=0;s<l;++s)c(e[s],u,f,r,i,a),a+=o}else for(s=0;s<l;++s)t(e[s],r,n+1,i,a),a+=o}(t,e,0,r,0)}return r}},$={\\\"[object Int8Array]\\\":5120,\\\"[object Int16Array]\\\":5122,\\\"[object Int32Array]\\\":5124,\\\"[object Uint8Array]\\\":5121,\\\"[object Uint8ClampedArray]\\\":5121,\\\"[object Uint16Array]\\\":5123,\\\"[object Uint32Array]\\\":5125,\\\"[object Float32Array]\\\":5126,\\\"[object Float64Array]\\\":5121,\\\"[object ArrayBuffer]\\\":5121},J={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},K={dynamic:35048,stream:35040,static:35044},Q=Z.flatten,tt=Z.shape,et=[];et[5120]=1,et[5122]=2,et[5124]=4,et[5121]=1,et[5123]=2,et[5125]=4,et[5126]=4;var rt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,\\\"line loop\\\":2,\\\"line strip\\\":3,\\\"triangle strip\\\":5,\\\"triangle fan\\\":6},nt=new Float32Array(1),it=new Uint32Array(nt.buffer),at=[9984,9986,9985,9987],ot=[0,6409,6410,6407,6408],st={};st[6409]=st[6406]=st[6402]=1,st[34041]=st[6410]=2,st[6407]=st[35904]=3,st[6408]=st[35906]=4;var lt=m(\\\"HTMLCanvasElement\\\"),ct=m(\\\"CanvasRenderingContext2D\\\"),ut=m(\\\"ImageBitmap\\\"),ft=m(\\\"HTMLImageElement\\\"),ht=m(\\\"HTMLVideoElement\\\"),pt=Object.keys($).concat([lt,ct,ut,ft,ht]),dt=[];dt[5121]=1,dt[5126]=4,dt[36193]=2,dt[5123]=2,dt[5125]=4;var gt=[];gt[32854]=2,gt[32855]=2,gt[36194]=2,gt[34041]=4,gt[33776]=.5,gt[33777]=.5,gt[33778]=1,gt[33779]=1,gt[35986]=.5,gt[35987]=1,gt[34798]=1,gt[35840]=.5,gt[35841]=.25,gt[35842]=.5,gt[35843]=.25,gt[36196]=.5;var vt=[];vt[32854]=2,vt[32855]=2,vt[36194]=2,vt[33189]=2,vt[36168]=1,vt[34041]=4,vt[35907]=4,vt[34836]=16,vt[34842]=8,vt[34843]=6;var mt=function(t,e,r,n,i){function a(t){this.id=c++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&&(this.stats={size:0})}function o(e){var r=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(r),e.renderbuffer=null,e.refCount=0,delete u[e.id],n.renderbufferCount--}var s={rgba4:32854,rgb565:36194,\\\"rgb5 a1\\\":32855,depth:33189,stencil:36168,\\\"depth stencil\\\":34041};e.ext_srgb&&(s.srgba=35907),e.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&&(s.rgba32f=34836);var l=[];Object.keys(s).forEach(function(t){l[s[t]]=t});var c=0,u={};return a.prototype.decRef=function(){0>=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach(function(e){t+=u[e].stats.size}),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if(\\\"object\\\"==typeof e&&e?(\\\"shape\\\"in e?(n=0|(a=e.shape)[0],a=0|a[1]):(\\\"radius\\\"in e&&(n=a=0|e.radius),\\\"width\\\"in e&&(n=0|e.width),\\\"height\\\"in e&&(a=0|e.height)),\\\"format\\\"in e&&(u=s[e.format])):\\\"number\\\"==typeof e?(n=0|e,a=\\\"number\\\"==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&&a===c.height?o:(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o)},o._reglType=\\\"renderbuffer\\\",o._renderbuffer=c,i.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){X(u).forEach(o)},restore:function(){X(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},yt=[];yt[6408]=4,yt[6407]=3;var xt=[];xt[5121]=1,xt[5126]=4,xt[36193]=2;var bt=[\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"w\\\"],_t=\\\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\\\".split(\\\" \\\"),wt={0:0,1:1,zero:0,one:1,\\\"src color\\\":768,\\\"one minus src color\\\":769,\\\"src alpha\\\":770,\\\"one minus src alpha\\\":771,\\\"dst color\\\":774,\\\"one minus dst color\\\":775,\\\"dst alpha\\\":772,\\\"one minus dst alpha\\\":773,\\\"constant color\\\":32769,\\\"one minus constant color\\\":32770,\\\"constant alpha\\\":32771,\\\"one minus constant alpha\\\":32772,\\\"src alpha saturate\\\":776},kt={never:512,less:513,\\\"<\\\":513,equal:514,\\\"=\\\":514,\\\"==\\\":514,\\\"===\\\":514,lequal:515,\\\"<=\\\":515,greater:516,\\\">\\\":516,notequal:517,\\\"!=\\\":517,\\\"!==\\\":517,gequal:518,\\\">=\\\":518,always:519},Mt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\\\"increment wrap\\\":34055,\\\"decrement wrap\\\":34056,invert:5386},At={cw:2304,ccw:2305},Tt=new P(!1,!1,!1,function(){});return function(t){function e(){if(0===Z.length)w&&w.update(),Q=null;else{Q=q.next(e),f();for(var t=Z.length-1;0<=t;--t){var r=Z[t];r&&r(z,null,0)}v.flush(),w&&w.update()}}function r(){!Q&&0<Z.length&&(Q=q.next(e))}function n(){Q&&(q.cancel(e),Q=null)}function a(t){t.preventDefault(),n(),$.forEach(function(t){t()})}function o(t){v.getError(),y.restore(),D.restore(),I.restore(),R.restore(),B.restore(),V.restore(),w&&w.restore(),G.procs.refresh(),r(),J.forEach(function(t){t()})}function s(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];U.isDynamic(i)?r[n]=U.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}var r=e(t.context||{}),n=e(t.uniforms||{}),i=e(t.attributes||{}),a=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach(function(n){r[t+\\\".\\\"+n]=e[n]})}}var r=j({},t);return delete r.uniforms,delete r.attributes,delete r.context,\\\"stencil\\\"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e(\\\"blend\\\"),e(\\\"depth\\\"),e(\\\"cull\\\"),e(\\\"stencil\\\"),e(\\\"polygonOffset\\\"),e(\\\"scissor\\\"),e(\\\"sample\\\"),r}(t));t={gpuTime:0,cpuTime:0,count:0};var o=(r=G.compile(a,i,n,r,t)).draw,s=r.batch,l=r.scope,c=[];return j(function(t,e){var r;if(\\\"function\\\"==typeof t)return l.call(this,null,t,0);if(\\\"function\\\"==typeof e)if(\\\"number\\\"==typeof t)for(r=0;r<t;++r)l.call(this,null,e,r);else{if(!Array.isArray(t))return l.call(this,t,e,0);for(r=0;r<t.length;++r)l.call(this,t[r],e,r)}else if(\\\"number\\\"==typeof t){if(0<t)return s.call(this,function(t){for(;c.length<t;)c.push(null);return c}(0|t),0|t)}else{if(!Array.isArray(t))return o.call(this,t);if(t.length)return s.call(this,t,t.length)}},{stats:t})}function l(t,e){var r=0;G.procs.poll();var n=e.color;n&&(v.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),\\\"depth\\\"in e&&(v.clearDepth(+e.depth),r|=256),\\\"stencil\\\"in e&&(v.clearStencil(0|e.stencil),r|=1024),v.clear(r)}function c(t){return Z.push(t),r(),{cancel:function(){var e=N(Z,t);Z[e]=function t(){var e=N(Z,t);Z[e]=Z[Z.length-1],--Z.length,0>=Z.length&&n()}}}}function u(){var t=Y.viewport,e=Y.scissor_box;t[0]=t[1]=e[0]=e[1]=0,z.viewportWidth=z.framebufferWidth=z.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,z.viewportHeight=z.framebufferHeight=z.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function f(){z.tick+=1,z.time=g(),u(),G.procs.poll()}function h(){u(),G.procs.refresh(),w&&w.update()}function g(){return(H()-k)/1e3}if(!(t=i(t)))return null;var v=t.gl,m=v.getContextAttributes();v.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;i<e.extensions.length;++i){var a=e.extensions[i];if(!r(a))return e.onDestroy(),e.onDone('\\\"'+a+'\\\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(r),{extensions:n,restore:function(){Object.keys(n).forEach(function(t){if(!r(t))throw Error(\\\"(regl): error restoring extension \\\"+t)})}}}(v,t);if(!y)return null;var x=function(){var t={\\\"\\\":0},e=[\\\"\\\"];return{id:function(r){var n=t[r];return n||(n=t[r]=e.length,e.push(r),n)},str:function(t){return e[t]}}}(),b={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},_=y.extensions,w=function(t,e){function r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function n(t,e,n){var i=s.pop()||new r;i.startQueryIndex=t,i.endQueryIndex=e,i.sum=0,i.stats=n,l.push(i)}var i=e.ext_disjoint_timer_query;if(!i)return null;var a=[],o=[],s=[],l=[],c=[],u=[];return{beginQuery:function(t){var e=a.pop()||i.createQueryEXT();i.beginQueryEXT(35007,e),o.push(e),n(o.length-1,o.length,t)},endQuery:function(){i.endQueryEXT(35007)},pushScopeStats:n,update:function(){var t,e;if(0!==(t=o.length)){u.length=Math.max(u.length,t+1),c.length=Math.max(c.length,t+1),c[0]=0;var r=u[0]=0;for(e=t=0;e<o.length;++e){var n=o[e];i.getQueryObjectEXT(n,34919)?(r+=i.getQueryObjectEXT(n,34918),a.push(n)):o[t++]=n,c[e+1]=r,u[e+1]=t}for(o.length=t,e=t=0;e<l.length;++e){var f=(r=l[e]).startQueryIndex;n=r.endQueryIndex,r.sum+=c[n]-c[f],f=u[f],(n=u[n])===f?(r.stats.gpuTime+=r.sum/1e6,s.push(r)):(r.startQueryIndex=f,r.endQueryIndex=n,l[t++]=r)}l.length=t}},getNumPendingQueries:function(){return o.length},clear:function(){a.push.apply(a,o);for(var t=0;t<a.length;t++)i.deleteQueryEXT(a[t]);o.length=0,a.length=0},restore:function(){o.length=0,a.length=0}}}(0,_),k=H(),E=v.drawingBufferWidth,L=v.drawingBufferHeight,z={tick:0,time:0,viewportWidth:E,viewportHeight:L,framebufferWidth:E,framebufferHeight:L,drawingBufferWidth:E,drawingBufferHeight:L,pixelRatio:t.pixelRatio},O=W(v,_),I=(E=function(t,e,r,n){for(t=r.maxAttributes,e=Array(t),r=0;r<t;++r)e[r]=new T;return{Record:T,scope:{},state:e}}(v,_,O),p(v,b,t,E)),P=d(v,_,I,b),D=S(v,x,b,t),R=M(v,_,O,function(){G.procs.poll()},z,b,t),B=mt(v,_,0,b,t),V=A(v,_,O,R,B,b),G=F(v,x,_,O,I,P,0,V,{},E,D,{elements:null,primitive:4,count:-1,offset:0,instances:-1},z,w,t),Y=(x=C(v,V,G.procs.poll,z),G.next),X=v.canvas,Z=[],$=[],J=[],K=[t.onDestroy],Q=null;X&&(X.addEventListener(\\\"webglcontextlost\\\",a,!1),X.addEventListener(\\\"webglcontextrestored\\\",o,!1));var tt=V.setFBO=s({framebuffer:U.define.call(null,1,\\\"framebuffer\\\")});return h(),m=j(s,{clear:function(t){if(\\\"framebuffer\\\"in t)if(t.framebuffer&&\\\"framebufferCube\\\"===t.framebuffer_reglType)for(var e=0;6>e;++e)tt(j({framebuffer:t.framebuffer.faces[e]},t),l);else tt(t,l);else l(0,t)},prop:U.define.bind(null,1),context:U.define.bind(null,2),this:U.define.bind(null,3),draw:s({}),buffer:function(t){return I.create(t,34962,!1,!1)},elements:function(t){return P.create(t,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:B.create,framebuffer:V.create,framebufferCube:V.createCube,attributes:m,frame:c,on:function(t,e){var r;switch(t){case\\\"frame\\\":return c(e);case\\\"lost\\\":r=$;break;case\\\"restore\\\":r=J;break;case\\\"destroy\\\":r=K}return r.push(e),{cancel:function(){for(var t=0;t<r.length;++t)if(r[t]===e){r[t]=r[r.length-1],r.pop();break}}}},limits:O,hasExtension:function(t){return 0<=O.extensions.indexOf(t.toLowerCase())},read:x,destroy:function(){Z.length=0,n(),X&&(X.removeEventListener(\\\"webglcontextlost\\\",a),X.removeEventListener(\\\"webglcontextrestored\\\",o)),D.clear(),V.clear(),B.clear(),R.clear(),P.clear(),I.clear(),w&&w.clear(),K.forEach(function(t){t()})},_gl:v,_refresh:h,poll:function(){f(),w&&w.update()},now:g,stats:b}),t.onDone(null,m),m}},\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?e.exports=i():n.createREGL=i()},{}],479:[function(t,e,r){\\\"use strict\\\";var n,i=\\\"\\\";e.exports=function(t,e){if(\\\"string\\\"!=typeof t)throw new TypeError(\\\"expected a string\\\");if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||\\\"undefined\\\"==typeof n)n=t,i=\\\"\\\";else if(i.length>=r)return i.substr(0,r);for(;r>i.length&&e>1;)1&e&&(i+=t),e>>=1,t+=t;return i=(i+=t).substr(0,r)}},{}],480:[function(t,e,r){(function(t){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{}],481:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r,o=t[i],s=(r=a+o)-a,l=o-s;l&&(t[--n]=r,r=l)}for(var c=0,i=n;i<e;++i){var a=t[i],o=r,s=(r=a+o)-a,l=o-s;l&&(t[c++]=l)}return t[c++]=r,t.length=c,t}},{}],482:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"robust-sum\\\"),a=t(\\\"robust-scale\\\"),o=t(\\\"robust-compress\\\"),s=6;function l(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function c(t){if(2===t.length)return[\\\"sum(prod(\\\",t[0][0],\\\",\\\",t[1][1],\\\"),prod(-\\\",t[0][1],\\\",\\\",t[1][0],\\\"))\\\"].join(\\\"\\\");for(var e=[],r=0;r<t.length;++r)e.push([\\\"scale(\\\",c(l(t,r)),\\\",\\\",(n=r,1&n?\\\"-\\\":\\\"\\\"),t[0][r],\\\")\\\"].join(\\\"\\\"));return function t(e){if(1===e.length)return e[0];if(2===e.length)return[\\\"sum(\\\",e[0],\\\",\\\",e[1],\\\")\\\"].join(\\\"\\\");var r=e.length>>1;return[\\\"sum(\\\",t(e.slice(0,r)),\\\",\\\",t(e.slice(r)),\\\")\\\"].join(\\\"\\\")}(e);var n}function u(t){return new Function(\\\"sum\\\",\\\"scale\\\",\\\"prod\\\",\\\"compress\\\",[\\\"function robustDeterminant\\\",t,\\\"(m){return compress(\\\",c(function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\\\"m[\\\",r,\\\"][\\\",n,\\\"]\\\"].join(\\\"\\\")}return e}(t)),\\\")};return robustDeterminant\\\",t].join(\\\"\\\"))(i,a,n,o)}var f=[function(){return[0]},function(t){return[t[0][0]]}];!function(){for(;f.length<s;)f.push(u(f.length));for(var t=[],r=[\\\"function robustDeterminant(m){switch(m.length){\\\"],n=0;n<s;++n)t.push(\\\"det\\\"+n),r.push(\\\"case \\\",n,\\\":return det\\\",n,\\\"(m);\\\");r.push(\\\"}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant\\\"),t.push(\\\"CACHE\\\",\\\"gen\\\",r.join(\\\"\\\"));var i=Function.apply(void 0,t);for(e.exports=i.apply(void 0,f.concat([f,u])),n=0;n<f.length;++n)e.exports[n]=f[n]}()},{\\\"robust-compress\\\":481,\\\"robust-scale\\\":488,\\\"robust-sum\\\":491,\\\"two-product\\\":520}],483:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"robust-sum\\\");e.exports=function(t,e){for(var r=n(t[0],e[0]),a=1;a<t.length;++a)r=i(r,n(t[a],e[a]));return r}},{\\\"robust-sum\\\":491,\\\"two-product\\\":520}],484:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"robust-sum\\\"),a=t(\\\"robust-subtract\\\"),o=t(\\\"robust-scale\\\"),s=6;function l(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function c(t){if(1===t.length)return t[0];if(2===t.length)return[\\\"sum(\\\",t[0],\\\",\\\",t[1],\\\")\\\"].join(\\\"\\\");var e=t.length>>1;return[\\\"sum(\\\",c(t.slice(0,e)),\\\",\\\",c(t.slice(e)),\\\")\\\"].join(\\\"\\\")}function u(t,e){if(\\\"m\\\"===t.charAt(0)){if(\\\"w\\\"===e.charAt(0)){var r=t.split(\\\"[\\\");return[\\\"w\\\",e.substr(1),\\\"m\\\",r[0].substr(1)].join(\\\"\\\")}return[\\\"prod(\\\",t,\\\",\\\",e,\\\")\\\"].join(\\\"\\\")}return u(e,t)}function f(t){if(2===t.length)return[[\\\"diff(\\\",u(t[0][0],t[1][1]),\\\",\\\",u(t[1][0],t[0][1]),\\\")\\\"].join(\\\"\\\")];for(var e=[],r=0;r<t.length;++r)e.push([\\\"scale(\\\",c(f(l(t,r))),\\\",\\\",(n=r,!0&n?\\\"-\\\":\\\"\\\"),t[0][r],\\\")\\\"].join(\\\"\\\"));return e;var n}function h(t,e){for(var r=[],n=0;n<e-2;++n)r.push([\\\"prod(m\\\",t,\\\"[\\\",n,\\\"],m\\\",t,\\\"[\\\",n,\\\"])\\\"].join(\\\"\\\"));return c(r)}function p(t){for(var e=[],r=[],s=function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\\\"m\\\",n,\\\"[\\\",t-r-2,\\\"]\\\"].join(\\\"\\\")}return e}(t),u=0;u<t;++u)s[0][u]=\\\"1\\\",s[t-1][u]=\\\"w\\\"+u;for(u=0;u<t;++u)0==(1&u)?e.push.apply(e,f(l(s,u))):r.push.apply(r,f(l(s,u)));var p=c(e),d=c(r),g=\\\"exactInSphere\\\"+t,v=[];for(u=0;u<t;++u)v.push(\\\"m\\\"+u);var m=[\\\"function \\\",g,\\\"(\\\",v.join(),\\\"){\\\"];for(u=0;u<t;++u){m.push(\\\"var w\\\",u,\\\"=\\\",h(u,t),\\\";\\\");for(var y=0;y<t;++y)y!==u&&m.push(\\\"var w\\\",u,\\\"m\\\",y,\\\"=scale(w\\\",u,\\\",m\\\",y,\\\"[0]);\\\")}return m.push(\\\"var p=\\\",p,\\\",n=\\\",d,\\\",d=diff(p,n);return d[d.length-1];}return \\\",g),new Function(\\\"sum\\\",\\\"diff\\\",\\\"prod\\\",\\\"scale\\\",m.join(\\\"\\\"))(i,a,n,o)}var d=[function(){return 0},function(){return 0},function(){return 0}];!function(){for(;d.length<=s;)d.push(p(d.length));for(var t=[],r=[\\\"slow\\\"],n=0;n<=s;++n)t.push(\\\"a\\\"+n),r.push(\\\"o\\\"+n);var i=[\\\"function testInSphere(\\\",t.join(),\\\"){switch(arguments.length){case 0:case 1:return 0;\\\"];for(n=2;n<=s;++n)i.push(\\\"case \\\",n,\\\":return o\\\",n,\\\"(\\\",t.slice(0,n).join(),\\\");\\\");i.push(\\\"}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere\\\"),r.push(i.join(\\\"\\\"));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=d[t.length];return e||(e=d[t.length]=p(t.length)),e.apply(void 0,t)}].concat(d)),n=0;n<=s;++n)e.exports[n]=d[n]}()},{\\\"robust-scale\\\":488,\\\"robust-subtract\\\":490,\\\"robust-sum\\\":491,\\\"two-product\\\":520}],485:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"robust-determinant\\\"),i=6;function a(t){for(var e=\\\"robustLinearSolve\\\"+t+\\\"d\\\",r=[\\\"function \\\",e,\\\"(A,b){return [\\\"],i=0;i<t;++i){r.push(\\\"det([\\\");for(var a=0;a<t;++a){a>0&&r.push(\\\",\\\"),r.push(\\\"[\\\");for(var o=0;o<t;++o)o>0&&r.push(\\\",\\\"),o===i?r.push(\\\"+b[\\\",a,\\\"]\\\"):r.push(\\\"+A[\\\",a,\\\"][\\\",o,\\\"]\\\");r.push(\\\"]\\\")}r.push(\\\"]),\\\")}r.push(\\\"det(A)]}return \\\",e);var s=new Function(\\\"det\\\",r.join(\\\"\\\"));return s(t<6?n[t]:n)}var o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length<i;)o.push(a(o.length));for(var t=[],r=[\\\"function dispatchLinearSolve(A,b){switch(A.length){\\\"],n=0;n<i;++n)t.push(\\\"s\\\"+n),r.push(\\\"case \\\",n,\\\":return s\\\",n,\\\"(A,b);\\\");r.push(\\\"}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve\\\"),t.push(\\\"CACHE\\\",\\\"g\\\",r.join(\\\"\\\"));var s=Function.apply(void 0,t);for(e.exports=s.apply(void 0,o.concat([o,a])),n=0;n<i;++n)e.exports[n]=o[n]}()},{\\\"robust-determinant\\\":482}],486:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"robust-sum\\\"),a=t(\\\"robust-scale\\\"),o=t(\\\"robust-subtract\\\"),s=5;function l(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function c(t){if(1===t.length)return t[0];if(2===t.length)return[\\\"sum(\\\",t[0],\\\",\\\",t[1],\\\")\\\"].join(\\\"\\\");var e=t.length>>1;return[\\\"sum(\\\",c(t.slice(0,e)),\\\",\\\",c(t.slice(e)),\\\")\\\"].join(\\\"\\\")}function u(t){if(2===t.length)return[[\\\"sum(prod(\\\",t[0][0],\\\",\\\",t[1][1],\\\"),prod(-\\\",t[0][1],\\\",\\\",t[1][0],\\\"))\\\"].join(\\\"\\\")];for(var e=[],r=0;r<t.length;++r)e.push([\\\"scale(\\\",c(u(l(t,r))),\\\",\\\",(n=r,1&n?\\\"-\\\":\\\"\\\"),t[0][r],\\\")\\\"].join(\\\"\\\"));return e;var n}function f(t){for(var e=[],r=[],s=function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\\\"m\\\",n,\\\"[\\\",t-r-1,\\\"]\\\"].join(\\\"\\\")}return e}(t),f=[],h=0;h<t;++h)0==(1&h)?e.push.apply(e,u(l(s,h))):r.push.apply(r,u(l(s,h))),f.push(\\\"m\\\"+h);var p=c(e),d=c(r),g=\\\"orientation\\\"+t+\\\"Exact\\\",v=[\\\"function \\\",g,\\\"(\\\",f.join(),\\\"){var p=\\\",p,\\\",n=\\\",d,\\\",d=sub(p,n);return d[d.length-1];};return \\\",g].join(\\\"\\\");return new Function(\\\"sum\\\",\\\"prod\\\",\\\"scale\\\",\\\"sub\\\",v)(i,n,a,o)}var h=f(3),p=f(4),d=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,r){var n,i=(t[1]-r[1])*(e[0]-r[0]),a=(t[0]-r[0])*(e[1]-r[1]),o=i-a;if(i>0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:h(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],h=r[2]-n[2],d=a*c,g=o*l,v=o*s,m=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(v-m)+h*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(m))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b>_||-b>_?b:p(t,e,r,n)}];!function(){for(;d.length<=s;)d.push(f(d.length));for(var t=[],r=[\\\"slow\\\"],n=0;n<=s;++n)t.push(\\\"a\\\"+n),r.push(\\\"o\\\"+n);var i=[\\\"function getOrientation(\\\",t.join(),\\\"){switch(arguments.length){case 0:case 1:return 0;\\\"];for(n=2;n<=s;++n)i.push(\\\"case \\\",n,\\\":return o\\\",n,\\\"(\\\",t.slice(0,n).join(),\\\");\\\");i.push(\\\"}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation\\\"),r.push(i.join(\\\"\\\"));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=d[t.length];return e||(e=d[t.length]=f(t.length)),e.apply(void 0,t)}].concat(d)),n=0;n<=s;++n)e.exports[n]=d[n]}()},{\\\"robust-scale\\\":488,\\\"robust-subtract\\\":490,\\\"robust-sum\\\":491,\\\"two-product\\\":520}],487:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"robust-sum\\\"),i=t(\\\"robust-scale\\\");e.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var r=[0];if(t.length<e.length)for(var a=0;a<t.length;++a)r=n(r,i(e,t[a]));else for(var a=0;a<e.length;++a)r=n(r,i(t,e[a]));return r}},{\\\"robust-scale\\\":488,\\\"robust-sum\\\":491}],488:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"two-product\\\"),i=t(\\\"two-sum\\\");e.exports=function(t,e){var r=t.length;if(1===r){var a=n(t[0],e);return a[0]?a:[a[1]]}var o=new Array(2*r),s=[.1,.1],l=[.1,.1],c=0;n(t[0],e,s),s[0]&&(o[c++]=s[0]);for(var u=1;u<r;++u){n(t[u],e,l);var f=s[1];i(f,l[0],s),s[0]&&(o[c++]=s[0]);var h=l[1],p=s[1],d=h+p,g=d-h,v=p-g;s[1]=d,v&&(o[c++]=v)}s[1]&&(o[c++]=s[1]);0===c&&(o[c++]=0);return o.length=c,o}},{\\\"two-product\\\":520,\\\"two-sum\\\":521}],489:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,i){var a=n(t,r,i),o=n(e,r,i);if(a>0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);if(s>0&&l>0||s<0&&l<0)return!1;if(0===a&&0===o&&0===s&&0===l)return function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],f=Math.min(c,u),h=Math.max(c,u);if(h<s||l<f)return!1}return!0}(t,e,r,i);return!0};var n=t(\\\"robust-orientation\\\")[3]},{\\\"robust-orientation\\\":486}],490:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);if(i)return[i,r];return[r]}(t[0],-e[0]);var i,a,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,f=t[l],h=u(f),p=-e[c],d=u(p);h<d?(a=f,(l+=1)<r&&(f=t[l],h=u(f))):(a=p,(c+=1)<n&&(p=-e[c],d=u(p)));l<r&&h<d||c>=n?(i=f,(l+=1)<r&&(f=t[l],h=u(f))):(i=p,(c+=1)<n&&(p=-e[c],d=u(p)));var g,v,m=i+a,y=m-i,x=a-y,b=x,_=m;for(;l<r&&c<n;)h<d?(i=f,(l+=1)<r&&(f=t[l],h=u(f))):(i=p,(c+=1)<n&&(p=-e[c],d=u(p))),(x=(a=b)-(y=(m=i+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g;for(;l<r;)(x=(a=b)-(y=(m=(i=f)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(l+=1)<r&&(f=t[l]);for(;c<n;)(x=(a=b)-(y=(m=(i=p)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(c+=1)<n&&(p=-e[c]);b&&(o[s++]=b);_&&(o[s++]=_);s||(o[s++]=0);return o.length=s,o}},{}],491:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);if(i)return[i,r];return[r]}(t[0],e[0]);var i,a,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,f=t[l],h=u(f),p=e[c],d=u(p);h<d?(a=f,(l+=1)<r&&(f=t[l],h=u(f))):(a=p,(c+=1)<n&&(p=e[c],d=u(p)));l<r&&h<d||c>=n?(i=f,(l+=1)<r&&(f=t[l],h=u(f))):(i=p,(c+=1)<n&&(p=e[c],d=u(p)));var g,v,m=i+a,y=m-i,x=a-y,b=x,_=m;for(;l<r&&c<n;)h<d?(i=f,(l+=1)<r&&(f=t[l],h=u(f))):(i=p,(c+=1)<n&&(p=e[c],d=u(p))),(x=(a=b)-(y=(m=i+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g;for(;l<r;)(x=(a=b)-(y=(m=(i=f)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(l+=1)<r&&(f=t[l]);for(;c<n;)(x=(a=b)-(y=(m=(i=p)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(c+=1)<n&&(p=e[c]);b&&(o[s++]=b);_&&(o[s++]=_);s||(o[s++]=0);return o.length=s,o}},{}],492:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],493:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return i(n(t))};var n=t(\\\"boundary-cells\\\"),i=t(\\\"reduce-simplicial-complex\\\")},{\\\"boundary-cells\\\":83,\\\"reduce-simplicial-complex\\\":472}],494:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,s){r=r||0,\\\"undefined\\\"==typeof s&&(s=function(t){for(var e=t.length,r=0,n=0;n<e;++n)r=0|Math.max(r,t[n].length);return r-1}(t));if(0===t.length||s<1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(t,e){for(var r=t.length,n=i.mallocUint8(r),a=0;a<r;++a)n[a]=t[a]<e|0;return n}(e,+r),c=function(t,e){for(var r=t.length,o=e*(e+1)/2*r|0,s=i.mallocUint32(2*o),l=0,c=0;c<r;++c)for(var u=t[c],e=u.length,f=0;f<e;++f)for(var h=0;h<f;++h){var p=u[h],d=u[f];s[l++]=0|Math.min(p,d),s[l++]=0|Math.max(p,d)}a(n(s,[l/2|0,2]));for(var g=2,c=2;c<l;c+=2)s[c-2]===s[c]&&s[c-1]===s[c+1]||(s[g++]=s[c],s[g++]=s[c+1]);return n(s,[g/2|0,2])}(t,s),u=function(t,e,r,a){for(var o=t.data,s=t.shape[0],l=i.mallocDouble(s),c=0,u=0;u<s;++u){var f=o[2*u],h=o[2*u+1];if(r[f]!==r[h]){var p=e[f],d=e[h];o[2*c]=f,o[2*c+1]=h,l[c++]=(d-a)/(d-p)}}return t.shape[0]=c,n(l,[c])}(c,e,l,+r),f=function(t,e){var r=i.mallocInt32(2*e),n=t.shape[0],a=t.data;r[0]=0;for(var o=0,s=0;s<n;++s){var l=a[2*s];if(l!==o){for(r[2*o+1]=s;++o<l;)r[2*o]=s,r[2*o+1]=s;r[2*o]=s}}r[2*o+1]=n;for(;++o<e;)r[2*o]=r[2*o+1]=n;return r}(c,0|e.length),h=o(s)(t,c.data,f,l),p=function(t){for(var e=0|t.shape[0],r=t.data,n=new Array(e),i=0;i<e;++i)n[i]=[r[2*i],r[2*i+1]];return n}(c),d=[].slice.call(u.data,0,u.shape[0]);return i.free(l),i.free(c.data),i.free(u.data),i.free(f),{cells:h,vertexIds:p,vertexWeights:d}};var n=t(\\\"ndarray\\\"),i=t(\\\"typedarray-pool\\\"),a=t(\\\"ndarray-sort\\\"),o=t(\\\"./lib/codegen\\\")},{\\\"./lib/codegen\\\":495,ndarray:433,\\\"ndarray-sort\\\":431,\\\"typedarray-pool\\\":522}],495:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=a[t];e||(e=a[t]=function(t){var e=0,r=new Array(t+1);r[0]=[[]];for(var a=1;a<=t;++a)for(var o=r[a]=i(a),s=0;s<o.length;++s)e=Math.max(e,o[a].length);var l=[\\\"function B(C,E,i,j){\\\",\\\"var a=Math.min(i,j)|0,b=Math.max(i,j)|0,l=C[2*a],h=C[2*a+1];\\\",\\\"while(l<h){\\\",\\\"var m=(l+h)>>1,v=E[2*m+1];\\\",\\\"if(v===b){return m}\\\",\\\"if(b<v){h=m}else{l=m+1}\\\",\\\"}\\\",\\\"return l;\\\",\\\"};\\\",\\\"function getContour\\\",t,\\\"d(F,E,C,S){\\\",\\\"var n=F.length,R=[];\\\",\\\"for(var i=0;i<n;++i){var c=F[i],l=c.length;\\\"];function c(t){if(!(t.length<=0)){l.push(\\\"R.push(\\\");for(var e=0;e<t.length;++e){var r=t[e];e>0&&l.push(\\\",\\\"),l.push(\\\"[\\\");for(var n=0;n<r.length;++n){var i=r[n];n>0&&l.push(\\\",\\\"),l.push(\\\"B(C,E,c[\\\",i[0],\\\"],c[\\\",i[1],\\\"])\\\")}l.push(\\\"]\\\")}l.push(\\\");\\\")}}for(var a=t+1;a>1;--a){a<t+1&&l.push(\\\"else \\\"),l.push(\\\"if(l===\\\",a,\\\"){\\\");for(var u=[],s=0;s<a;++s)u.push(\\\"(S[c[\\\"+s+\\\"]]<<\\\"+s+\\\")\\\");l.push(\\\"var M=\\\",u.join(\\\"+\\\"),\\\";if(M===0||M===\\\",(1<<a)-1,\\\"){continue}switch(M){\\\");for(var o=r[a-1],s=0;s<o.length;++s)l.push(\\\"case \\\",s,\\\":\\\"),c(o[s]),l.push(\\\"break;\\\");l.push(\\\"}}\\\")}return l.push(\\\"}return R;};return getContour\\\",t,\\\"d\\\"),new Function(\\\"pool\\\",l.join(\\\"\\\"))(n)}(t));return e};var n=t(\\\"typedarray-pool\\\"),i=t(\\\"marching-simplex-table\\\"),a={}},{\\\"marching-simplex-table\\\":410,\\\"typedarray-pool\\\":522}],496:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"bit-twiddle\\\"),i=t(\\\"union-find\\\");function a(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],a)-i(c+e[2],o);default:var u=t.slice(0);u.sort();var f=e.slice(0);f.sort();for(var h=0;h<r;++h)if(n=u[h]-f[h])return n;return 0}}function o(t,e){return a(t[0],e[0])}function s(t,e){if(e){for(var r=t.length,n=new Array(r),i=0;i<r;++i)n[i]=[t[i],e[i]];n.sort(o);for(i=0;i<r;++i)t[i]=n[i][0],e[i]=n[i][1];return t}return t.sort(a),t}function l(t){if(0===t.length)return[];for(var e=1,r=t.length,n=1;n<r;++n){var i=t[n];if(a(i,t[n-1])){if(n===e){e++;continue}t[e++]=i}}return t.length=e,t}function c(t,e){for(var r=0,n=t.length-1,i=-1;r<=n;){var o=r+n>>1,s=a(t[o],e);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function u(t,e){for(var r=new Array(t.length),i=0,o=r.length;i<o;++i)r[i]=[];for(var s=[],l=(i=0,e.length);i<l;++i)for(var u=e[i],f=u.length,h=1,p=1<<f;h<p;++h){s.length=n.popCount(h);for(var d=0,g=0;g<f;++g)h&1<<g&&(s[d++]=u[g]);var v=c(t,s);if(!(v<0))for(;r[v++].push(i),!(v>=t.length||0!==a(t[v],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<<e+1)-1,a=0;a<t.length;++a)for(var o=t[a],l=i;l<1<<o.length;l=n.nextCombination(l)){for(var c=new Array(e+1),u=0,f=0;f<o.length;++f)l&1<<f&&(c[u++]=o[f]);r.push(c)}return s(r)}r.dimension=function(t){for(var e=0,r=Math.max,n=0,i=t.length;n<i;++n)e=r(e,t[n].length);return e-1},r.countVertices=function(t){for(var e=-1,r=Math.max,n=0,i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)e=r(e,a[o]);return e+1},r.cloneCells=function(t){for(var e=new Array(t.length),r=0,n=t.length;r<n;++r)e[r]=t[r].slice(0);return e},r.compareCells=a,r.normalize=s,r.unique=l,r.findCell=c,r.incidence=u,r.dual=function(t,e){if(!e)return u(l(f(t,0)),t);for(var r=new Array(e),n=0;n<e;++n)r[n]=[];n=0;for(var i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)r[a[o]].push(n);return r},r.explode=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0|i.length,o=1,l=1<<a;o<l;++o){for(var c=[],u=0;u<a;++u)o>>>u&1&&c.push(i[u]);e.push(c)}return s(e)},r.skeleton=f,r.boundary=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;++a){for(var l=new Array(i.length-1),c=0,u=0;c<o;++c)c!==a&&(l[u++]=i[c]);e.push(l)}return s(e)},r.connectedComponents=function(t,e){return e?function(t,e){for(var r=new i(e),n=0;n<t.length;++n)for(var a=t[n],o=0;o<a.length;++o)for(var s=o+1;s<a.length;++s)r.link(a[o],a[s]);var l=[],c=r.ranks;for(n=0;n<c.length;++n)c[n]=-1;for(n=0;n<t.length;++n){var u=r.find(t[n][0]);c[u]<0?(c[u]=l.length,l.push([t[n].slice(0)])):l[c[u]].push(t[n].slice(0))}return l}(t,e):function(t){for(var e=l(s(f(t,0))),r=new i(e.length),n=0;n<t.length;++n)for(var a=t[n],o=0;o<a.length;++o)for(var u=c(e,[a[o]]),h=o+1;h<a.length;++h)r.link(u,c(e,[a[h]]));var p=[],d=r.ranks;for(n=0;n<d.length;++n)d[n]=-1;for(n=0;n<t.length;++n){var g=r.find(c(e,[t[n][0]]));d[g]<0?(d[g]=p.length,p.push([t[n].slice(0)])):p[d[g]].push(t[n].slice(0))}return p}(t)}},{\\\"bit-twiddle\\\":80,\\\"union-find\\\":523}],497:[function(t,e,r){arguments[4][80][0].apply(r,arguments)},{dup:80}],498:[function(t,e,r){arguments[4][496][0].apply(r,arguments)},{\\\"bit-twiddle\\\":497,dup:496,\\\"union-find\\\":499}],499:[function(t,e,r){\\\"use strict\\\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n,n.prototype.length=function(){return this.roots.length},n.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},n.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var r=e[t];e[t]=e[r],t=r}return t},n.prototype.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],500:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){for(var a=e.length,o=t.length,s=new Array(a),l=new Array(a),c=new Array(a),u=new Array(a),f=0;f<a;++f)s[f]=l[f]=-1,c[f]=1/0,u[f]=!1;for(var f=0;f<o;++f){var h=t[f];if(2!==h.length)throw new Error(\\\"Input must be a graph\\\");var p=h[1],d=h[0];-1!==l[d]?l[d]=-2:l[d]=p,-1!==s[p]?s[p]=-2:s[p]=d}function g(t){if(u[t])return 1/0;var r,i,a,o,c,f=s[t],h=l[t];return f<0||h<0?1/0:(r=e[t],i=e[f],a=e[h],o=Math.abs(n(r,i,a)),c=Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)),o/c)}function v(t,e){var r=M[t],n=M[e];M[t]=n,M[e]=r,A[r]=e,A[n]=t}function m(t){return c[M[t]]}function y(t){return 1&t?t-1>>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n<S){var o=m(n);o<r&&(a=n,r=o)}if(i<S){var s=m(i);s<r&&(a=i)}if(a===t)return t;v(t,a),t=a}}function b(t){for(var e=m(t);t>0;){var r=y(t);if(r>=0){var n=m(r);if(e<n){v(t,r),t=r;continue}}return t}}function _(){if(S>0){var t=M[0];return v(0,S-1),S-=1,x(0),t}return-1}function w(t,e){var r=M[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((S+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],g(e)),A[r]>=0&&w(A[r],g(r))}}for(var M=[],A=new Array(a),f=0;f<a;++f){var T=c[f]=g(f);T<1/0?(A[f]=M.length,M.push(f)):A[f]=-1}for(var S=M.length,f=S>>1;f>=0;--f)x(f);for(;;){var C=_();if(C<0||c[C]>r)break;k(C)}for(var E=[],f=0;f<a;++f)u[f]||(A[f]=E.length,E.push(e[f].slice()));E.length;function L(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!u[n]||i<0||i===n)break;if(i=t[n=i],!u[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}var z=[];return t.forEach(function(t){var e=L(s,t[0]),r=L(l,t[1]);if(e>=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&z.push([n,i])}}),i.unique(i.normalize(z)),{positions:E,edges:z}};var n=t(\\\"robust-orientation\\\"),i=t(\\\"simplicial-complex\\\")},{\\\"robust-orientation\\\":486,\\\"simplicial-complex\\\":498}],501:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,a,o,s;if(e[0][0]<e[1][0])r=e[0],a=e[1];else{if(!(e[0][0]>e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]<t[1][0])o=t[0],s=t[1];else{if(!(t[0][0]>t[1][0]))return-i(t,e);o=t[1],s=t[0]}var l=n(r,a,s),c=n(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,o,a),c=n(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var n=t(\\\"robust-orientation\\\");function i(t,e){var r,i,a,o;if(e[0][0]<e[1][0])r=e[0],i=e[1];else{if(!(e[0][0]>e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return l<c?l-c:s>u?s-u:l-u}r=e[1],i=e[0]}t[0][1]<t[1][1]?(a=t[0],o=t[1]):(a=t[1],o=t[0]);var f=n(i,r,a);return f||((f=n(i,r,o))||o-i)}},{\\\"robust-orientation\\\":486}],502:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=t.length,r=2*e,n=new Array(r),a=0;a<e;++a){var l=t[a],c=l[0][0]<l[1][0];n[2*a]=new f(l[0][0],l,c,a),n[2*a+1]=new f(l[1][0],l,!c,a)}n.sort(function(t,e){var r=t.x-e.x;return r||((r=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1]))});for(var h=i(o),p=[],d=[],g=[],a=0;a<r;){for(var v=n[a].x,m=[];a<r;){var y=n[a];if(y.x!==v)break;a+=1,y.segment[0][0]===y.x&&y.segment[1][0]===y.x?y.create&&(y.segment[0][1]<y.segment[1][1]?(m.push(new u(y.segment[0][1],y.index,!0,!0)),m.push(new u(y.segment[1][1],y.index,!1,!1))):(m.push(new u(y.segment[1][1],y.index,!0,!1)),m.push(new u(y.segment[0][1],y.index,!1,!0)))):h=y.create?h.insert(y.segment,y.index):h.remove(y.segment)}p.push(h.root),d.push(v),g.push(m)}return new s(p,d,g)};var n=t(\\\"binary-search-bounds\\\"),i=t(\\\"functional-red-black-tree\\\"),a=t(\\\"robust-orientation\\\"),o=t(\\\"./lib/order-segments\\\");function s(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function l(t,e){return t.y-e}function c(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]<o[1][0]?(n=o[0],i=o[1]):(n=o[1],i=o[0]);var s=a(n,i,e);if(s<0)t=t.left;else if(s>0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var u=c(this.slabs[e-1],t);u&&(s?o(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var f=this.horizontal[e];if(f.length>0){var h=n.ge(f,t[1],l);if(h<f.length){var p=f[h];if(t[1]===p.y){if(p.closed)return p.index;for(;h<f.length-1&&f[h+1].y===t[1];)if((p=f[h+=1]).closed)return p.index;if(p.y===t[1]&&!p.start){if((h+=1)>=f.length)return i;p=f[h]}}if(p.start)if(s){var d=a(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index;else p.y!==t[1]&&(i=p.index)}}}return i}},{\\\"./lib/order-segments\\\":501,\\\"binary-search-bounds\\\":79,\\\"functional-red-black-tree\\\":219,\\\"robust-orientation\\\":486}],503:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"robust-dot-product\\\"),i=t(\\\"robust-sum\\\");function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l<o;++l)s[l]=i*t[l]+a*r[l];return s}e.exports=function(t,e){for(var r=[],n=[],i=a(t[t.length-1],e),s=t[t.length-1],l=t[0],c=0;c<t.length;++c,s=l){var u=a(l=t[c],e);if(i<0&&u>0||i>0&&u<0){var f=o(s,u,l,i);r.push(f),n.push(f.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l<t.length;++l,i=s){var c=a(s=t[l],e);(n<0&&c>0||n>0&&c<0)&&r.push(o(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l<t.length;++l,i=s){var c=a(s=t[l],e);(n<0&&c>0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{\\\"robust-dot-product\\\":483,\\\"robust-sum\\\":491}],504:[function(t,e,r){!function(){\\\"use strict\\\";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\\\x25]+/,modulo:/^\\\\x25{2}/,placeholder:/^\\\\x25(?:([1-9]\\\\d*)\\\\$|\\\\(([^\\\\)]+)\\\\))?(\\\\+)?(0|'[^$])?(-)?(\\\\d+)?(?:\\\\.(\\\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\\\d]*)/i,key_access:/^\\\\.([a-z_][a-z_\\\\d]*)/i,index_access:/^\\\\[(\\\\d+)\\\\]/,sign:/^[\\\\+\\\\-]/};function e(r){return function(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g=\\\"\\\";for(a=0;a<d;a++)if(\\\"string\\\"==typeof r[a])g+=r[a];else if(Array.isArray(r[a])){if((s=r[a])[2])for(i=n[p],o=0;o<s[2].length;o++){if(!i.hasOwnProperty(s[2][o]))throw new Error(e('[sprintf] property \\\"%s\\\" does not exist',s[2][o]));i=i[s[2][o]]}else i=s[1]?n[s[1]]:n[p++];if(t.not_type.test(s[8])&&t.not_primitive.test(s[8])&&i instanceof Function&&(i=i()),t.numeric_arg.test(s[8])&&\\\"number\\\"!=typeof i&&isNaN(i))throw new TypeError(e(\\\"[sprintf] expecting number but found %T\\\",i));switch(t.number.test(s[8])&&(f=i>=0),s[8]){case\\\"b\\\":i=parseInt(i,10).toString(2);break;case\\\"c\\\":i=String.fromCharCode(parseInt(i,10));break;case\\\"d\\\":case\\\"i\\\":i=parseInt(i,10);break;case\\\"j\\\":i=JSON.stringify(i,null,s[6]?parseInt(s[6]):0);break;case\\\"e\\\":i=s[7]?parseFloat(i).toExponential(s[7]):parseFloat(i).toExponential();break;case\\\"f\\\":i=s[7]?parseFloat(i).toFixed(s[7]):parseFloat(i);break;case\\\"g\\\":i=s[7]?String(Number(i.toPrecision(s[7]))):parseFloat(i);break;case\\\"o\\\":i=(parseInt(i,10)>>>0).toString(8);break;case\\\"s\\\":i=String(i),i=s[7]?i.substring(0,s[7]):i;break;case\\\"t\\\":i=String(!!i),i=s[7]?i.substring(0,s[7]):i;break;case\\\"T\\\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s[7]?i.substring(0,s[7]):i;break;case\\\"u\\\":i=parseInt(i,10)>>>0;break;case\\\"v\\\":i=i.valueOf(),i=s[7]?i.substring(0,s[7]):i;break;case\\\"x\\\":i=(parseInt(i,10)>>>0).toString(16);break;case\\\"X\\\":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(s[8])?g+=i:(!t.number.test(s[8])||f&&!s[3]?h=\\\"\\\":(h=f?\\\"+\\\":\\\"-\\\",i=i.toString().replace(t.sign,\\\"\\\")),c=s[4]?\\\"0\\\"===s[4]?\\\"0\\\":s[4].charAt(1):\\\" \\\",u=s[6]-(h+i).length,l=s[6]&&u>0?c.repeat(u):\\\"\\\",g+=s[5]?h+i+l:\\\"0\\\"===c?h+l+i:l+h+i)}return g}(function(e){if(i[e])return i[e];var r,n=e,a=[],o=0;for(;n;){if(null!==(r=t.text.exec(n)))a.push(r[0]);else if(null!==(r=t.modulo.exec(n)))a.push(\\\"%\\\");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError(\\\"[sprintf] unexpected placeholder\\\");if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError(\\\"[sprintf] failed to parse named argument key\\\");for(s.push(c[1]);\\\"\\\"!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError(\\\"[sprintf] failed to parse named argument key\\\");s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error(\\\"[sprintf] mixing positional and named placeholders is not (yet) supported\\\");a.push(r)}n=n.substring(r[0].length)}return i[e]=a}(r),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}var i=Object.create(null);\\\"undefined\\\"!=typeof r&&(r.sprintf=e,r.vsprintf=n),\\\"undefined\\\"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],505:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"parenthesis\\\");e.exports=function(t,e,r){if(null==t)throw Error(\\\"First argument should be a string\\\");if(null==e)throw Error(\\\"Separator should be a string or a RegExp\\\");r?(\\\"string\\\"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=[\\\"[]\\\",\\\"()\\\",\\\"{}\\\",\\\"<>\\\",'\\\"\\\"',\\\"''\\\",\\\"``\\\",\\\"\\\\u201c\\\\u201d\\\",\\\"\\\\xab\\\\xbb\\\"]:(\\\"string\\\"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map(function(t){return 1===t.length&&(t+=t),t}));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s<a.length;s++){var l=a[s],c=a[s+1];\\\"\\\\\\\\\\\"===l[l.length-1]&&\\\"\\\\\\\\\\\"!==l[l.length-2]?(o.push(l+e+c),s++):o.push(l)}a=o}for(s=0;s<a.length;s++)i[0]=a[s],a[s]=n.stringify(i,{flat:!0});return a}},{parenthesis:441}],506:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=t.length,r=new Array(e),n=new Array(e),i=new Array(e),a=new Array(e),o=new Array(e),s=new Array(e),l=0;l<e;++l)r[l]=-1,n[l]=0,i[l]=!1,a[l]=0,o[l]=-1,s[l]=[];var c,u=0,f=[],h=[];function p(e){var l=[e],c=[e];for(r[e]=n[e]=u,i[e]=!0,u+=1;c.length>0;){e=c[c.length-1];var p=t[e];if(a[e]<p.length){for(var d=a[e];d<p.length;++d){var g=p[d];if(r[g]<0){r[g]=n[g]=u,i[g]=!0,u+=1,l.push(g),c.push(g);break}i[g]&&(n[e]=0|Math.min(n[e],n[g])),o[g]>=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){for(var v=[],m=[],y=0,d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,v.push(x),m.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(v);for(var b=new Array(y),d=0;d<m.length;d++)for(var _=0;_<m[d].length;_++)b[--y]=m[d][_];h.push(b)}c.pop()}}}for(var l=0;l<e;++l)r[l]<0&&p(l);for(var l=0;l<h.length;l++){var d=h[l];if(0!==d.length){d.sort(function(t,e){return t-e}),c=[d[0]];for(var g=1;g<d.length;g++)d[g]!==d[g-1]&&c.push(d[g]);h[l]=c}}return{components:f,adjacencyList:h}}},{}],507:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t.split(\\\"\\\").map(function(t){return t in n?n[t]:\\\"\\\"}).join(\\\"\\\")};var n={\\\" \\\":\\\" \\\",0:\\\"\\\\u2070\\\",1:\\\"\\\\xb9\\\",2:\\\"\\\\xb2\\\",3:\\\"\\\\xb3\\\",4:\\\"\\\\u2074\\\",5:\\\"\\\\u2075\\\",6:\\\"\\\\u2076\\\",7:\\\"\\\\u2077\\\",8:\\\"\\\\u2078\\\",9:\\\"\\\\u2079\\\",\\\"+\\\":\\\"\\\\u207a\\\",\\\"-\\\":\\\"\\\\u207b\\\",a:\\\"\\\\u1d43\\\",b:\\\"\\\\u1d47\\\",c:\\\"\\\\u1d9c\\\",d:\\\"\\\\u1d48\\\",e:\\\"\\\\u1d49\\\",f:\\\"\\\\u1da0\\\",g:\\\"\\\\u1d4d\\\",h:\\\"\\\\u02b0\\\",i:\\\"\\\\u2071\\\",j:\\\"\\\\u02b2\\\",k:\\\"\\\\u1d4f\\\",l:\\\"\\\\u02e1\\\",m:\\\"\\\\u1d50\\\",n:\\\"\\\\u207f\\\",o:\\\"\\\\u1d52\\\",p:\\\"\\\\u1d56\\\",r:\\\"\\\\u02b3\\\",s:\\\"\\\\u02e2\\\",t:\\\"\\\\u1d57\\\",u:\\\"\\\\u1d58\\\",v:\\\"\\\\u1d5b\\\",w:\\\"\\\\u02b7\\\",x:\\\"\\\\u02e3\\\",y:\\\"\\\\u02b8\\\",z:\\\"\\\\u1dbb\\\"}},{}],508:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=a(t,e),n=r.length,i=new Array(n),o=new Array(n),s=0;s<n;++s)i[s]=[r[s]],o[s]=[s];return{positions:i,cells:o}}(t,e);var r=t.order.join()+\\\"-\\\"+t.dtype,s=o[r],e=+e||0;s||(s=o[r]=function(t,e){var r=t.length,a=[\\\"'use strict';\\\"],o=\\\"surfaceNets\\\"+t.join(\\\"_\\\")+\\\"d\\\"+e;a.push(\\\"var contour=genContour({\\\",\\\"order:[\\\",t.join(),\\\"],\\\",\\\"scalarArguments: 3,\\\",\\\"phase:function phaseFunc(p,a,b,c) { return (p > c)|0 },\\\"),\\\"generic\\\"===e&&a.push(\\\"getters:[0],\\\");for(var s=[],l=[],c=0;c<r;++c)s.push(\\\"d\\\"+c),l.push(\\\"d\\\"+c);for(var c=0;c<1<<r;++c)s.push(\\\"v\\\"+c),l.push(\\\"v\\\"+c);for(var c=0;c<1<<r;++c)s.push(\\\"p\\\"+c),l.push(\\\"p\\\"+c);s.push(\\\"a\\\",\\\"b\\\",\\\"c\\\"),l.push(\\\"a\\\",\\\"c\\\"),a.push(\\\"vertex:function vertexFunc(\\\",s.join(),\\\"){\\\");for(var u=[],c=0;c<1<<r;++c)u.push(\\\"(p\\\"+c+\\\"<<\\\"+c+\\\")\\\");a.push(\\\"var m=(\\\",u.join(\\\"+\\\"),\\\")|0;if(m===0||m===\\\",(1<<(1<<r))-1,\\\"){return}\\\");var f=[],h=[];1<<(1<<r)<=128?(a.push(\\\"switch(m){\\\"),h=a):a.push(\\\"switch(m>>>7){\\\");for(var c=0;c<1<<(1<<r);++c){if(1<<(1<<r)>128&&c%128==0){f.length>0&&h.push(\\\"}}\\\");var p=\\\"vExtra\\\"+f.length;a.push(\\\"case \\\",c>>>7,\\\":\\\",p,\\\"(m&0x7f,\\\",l.join(),\\\");break;\\\"),h=[\\\"function \\\",p,\\\"(m,\\\",l.join(),\\\"){switch(m){\\\"],f.push(h)}h.push(\\\"case \\\",127&c,\\\":\\\");for(var d=new Array(r),g=new Array(r),v=new Array(r),m=new Array(r),y=0,x=0;x<r;++x)d[x]=[],g[x]=[],v[x]=0,m[x]=0;for(var x=0;x<1<<r;++x)for(var b=0;b<r;++b){var _=x^1<<b;if(!(_>x)&&!(c&1<<_)!=!(c&1<<x)){var w=1;c&1<<_?g[b].push(\\\"v\\\"+_+\\\"-v\\\"+x):(g[b].push(\\\"v\\\"+x+\\\"-v\\\"+_),w=-w),w<0?(d[b].push(\\\"-v\\\"+x+\\\"-v\\\"+_),v[b]+=2):(d[b].push(\\\"v\\\"+x+\\\"+v\\\"+_),v[b]-=2),y+=1;for(var k=0;k<r;++k)k!==b&&(_&1<<k?m[k]+=1:m[k]-=1)}}for(var M=[],b=0;b<r;++b)if(0===d[b].length)M.push(\\\"d\\\"+b+\\\"-0.5\\\");else{var A=\\\"\\\";v[b]<0?A=v[b]+\\\"*c\\\":v[b]>0&&(A=\\\"+\\\"+v[b]+\\\"*c\\\");var T=d[b].length/y*.5,S=.5+m[b]/y*.5;M.push(\\\"d\\\"+b+\\\"-\\\"+S+\\\"-\\\"+T+\\\"*(\\\"+d[b].join(\\\"+\\\")+A+\\\")/(\\\"+g[b].join(\\\"+\\\")+\\\")\\\")}h.push(\\\"a.push([\\\",M.join(),\\\"]);\\\",\\\"break;\\\")}a.push(\\\"}},\\\"),f.length>0&&h.push(\\\"}}\\\");for(var C=[],c=0;c<1<<r-1;++c)C.push(\\\"v\\\"+c);C.push(\\\"c0\\\",\\\"c1\\\",\\\"p0\\\",\\\"p1\\\",\\\"a\\\",\\\"b\\\",\\\"c\\\"),a.push(\\\"cell:function cellFunc(\\\",C.join(),\\\"){\\\");var E=i(r-1);a.push(\\\"if(p0){b.push(\\\",E.map(function(t){return\\\"[\\\"+t.map(function(t){return\\\"v\\\"+t})+\\\"]\\\"}).join(),\\\")}else{b.push(\\\",E.map(function(t){var e=t.slice();return e.reverse(),\\\"[\\\"+e.map(function(t){return\\\"v\\\"+t})+\\\"]\\\"}).join(),\\\")}}});function \\\",o,\\\"(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return \\\",o,\\\";\\\");for(var c=0;c<f.length;++c)a.push(f[c].join(\\\"\\\"));return new Function(\\\"genContour\\\",a.join(\\\"\\\"))(n)}(t.order,t.dtype));return s(t,e)};var n=t(\\\"ndarray-extract-contour\\\"),i=t(\\\"triangulate-hypercube\\\"),a=t(\\\"zero-crossings\\\");var o={}},{\\\"ndarray-extract-contour\\\":422,\\\"triangulate-hypercube\\\":518,\\\"zero-crossings\\\":551}],509:[function(t,e,r){\\\"use strict\\\";Object.defineProperty(r,\\\"__esModule\\\",{value:!0});var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError(\\\"Invalid attempt to destructure non-iterable instance\\\")}}(),i=2*Math.PI,a=function(t,e,r,n,i,a,o){var s=t.x,l=t.y;return{x:n*(s*=e)-i*(l*=r)+a,y:i*s+n*l+o}},o=function(t,e){var r=.551915024494,n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:n-i*r,y:i+n*r},{x:a+o*r,y:o-a*r},{x:a,y:o}]},s=function(t,e,r,n){var i=t*n-e*r<0?-1:1,a=(t*r+e*n)/(Math.sqrt(t*t+e*e)*Math.sqrt(t*t+e*e));return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,h=t.xAxisRotation,p=void 0===h?0:h,d=t.largeArcFlag,g=void 0===d?0:d,v=t.sweepFlag,m=void 0===v?0:v,y=[];if(0===u||0===f)return[];var x=Math.sin(p*i/360),b=Math.cos(p*i/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&&0===w)return[];u=Math.abs(u),f=Math.abs(f);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);k>1&&(u*=Math.sqrt(k),f*=Math.sqrt(k));var M=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),v=Math.pow(h,2),m=Math.pow(p,2),y=d*g-d*m-g*v;y<0&&(y=0),y/=d*m+g*v;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*p,b=y*-o/a*h,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,k=(h-x)/a,M=(p-b)/o,A=(-h-x)/a,T=(-p-b)/o,S=s(1,0,k,M),C=s(k,M,A,T);return 0===c&&C>0&&(C-=i),1===c&&C<0&&(C+=i),[_,w,S,C]}(e,r,l,c,u,f,g,m,x,b,_,w),A=n(M,4),T=A[0],S=A[1],C=A[2],E=A[3],L=Math.abs(E)/(i/4);Math.abs(1-L)<1e-7&&(L=1);var z=Math.max(Math.ceil(L),1);E/=z;for(var O=0;O<z;O++)y.push(o(C,E)),C+=E;return y.map(function(t){var e=a(t[0],u,f,b,x,T,S),r=e.x,n=e.y,i=a(t[1],u,f,b,x,T,S),o=i.x,s=i.y,l=a(t[2],u,f,b,x,T,S);return{x1:r,y1:n,x2:o,y2:s,x:l.x,y:l.y}})},e.exports=r.default},{}],510:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"parse-svg-path\\\"),i=t(\\\"abs-svg-path\\\"),a=t(\\\"normalize-svg-path\\\"),o=t(\\\"is-svg-path\\\"),s=t(\\\"assert\\\");e.exports=function(t){Array.isArray(t)&&1===t.length&&\\\"string\\\"==typeof t[0]&&(t=t[0]);\\\"string\\\"==typeof t&&(s(o(t),\\\"String is not an SVG path.\\\"),t=n(t));if(s(Array.isArray(t),\\\"Argument should be a string or an array of path segments.\\\"),t=i(t),!(t=a(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,l=t.length;r<l;r++)for(var c=t[r].slice(1),u=0;u<c.length;u+=2)c[u+0]<e[0]&&(e[0]=c[u+0]),c[u+1]<e[1]&&(e[1]=c[u+1]),c[u+0]>e[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\\\"abs-svg-path\\\":48,assert:56,\\\"is-svg-path\\\":407,\\\"normalize-svg-path\\\":511,\\\"parse-svg-path\\\":443}],511:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,h=0,p=0,d=0,g=t.length;d<g;d++){var v=t[d],m=v[0];switch(m){case\\\"M\\\":l=v[1],c=v[2];break;case\\\"A\\\":var y=n({px:h,py:p,cx:v[6],cy:v[7],rx:v[1],ry:v[2],xAxisRotation:v[3],largeArcFlag:v[4],sweepFlag:v[5]});if(!y.length)continue;for(var x,b=0;b<y.length;b++)x=y[b],v=[\\\"C\\\",x.x1,x.y1,x.x2,x.y2,x.x,x.y],b<y.length-1&&r.push(v);break;case\\\"S\\\":var _=h,w=p;\\\"C\\\"!=e&&\\\"S\\\"!=e||(_+=_-o,w+=w-s),v=[\\\"C\\\",_,w,v[1],v[2],v[3],v[4]];break;case\\\"T\\\":\\\"Q\\\"==e||\\\"T\\\"==e?(u=2*h-u,f=2*p-f):(u=h,f=p),v=a(h,p,u,f,v[1],v[2]);break;case\\\"Q\\\":u=v[1],f=v[2],v=a(h,p,v[1],v[2],v[3],v[4]);break;case\\\"L\\\":v=i(h,p,v[1],v[2]);break;case\\\"H\\\":v=i(h,p,v[1],p);break;case\\\"V\\\":v=i(h,p,h,v[1]);break;case\\\"Z\\\":v=i(h,p,l,c)}e=m,h=v[v.length-2],p=v[v.length-1],v.length>4?(o=v[v.length-4],s=v[v.length-3]):(o=h,s=p),r.push(v)}return r};var n=t(\\\"svg-arc-to-cubic-bezier\\\");function i(t,e,r,n){return[\\\"C\\\",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return[\\\"C\\\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},{\\\"svg-arc-to-cubic-bezier\\\":509}],512:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"svg-path-bounds\\\"),i=t(\\\"parse-svg-path\\\"),a=t(\\\"draw-svg-path\\\"),o=t(\\\"is-svg-path\\\"),s=t(\\\"bitmap-sdf\\\"),l=document.createElement(\\\"canvas\\\"),c=l.getContext(\\\"2d\\\");e.exports=function(t,e){if(!o(t))throw Error(\\\"Argument should be valid svg path string\\\");e||(e={});var r,u;e.shape?(r=e.shape[0],u=e.shape[1]):(r=l.width=e.w||e.width||200,u=l.height=e.h||e.height||200);var f=Math.min(r,u),h=e.stroke||0,p=e.viewbox||e.viewBox||n(t),d=[r/(p[2]-p[0]),u/(p[3]-p[1])],g=Math.min(d[0]||0,d[1]||0)/2;c.fillStyle=\\\"black\\\",c.fillRect(0,0,r,u),c.fillStyle=\\\"white\\\",h&&(\\\"number\\\"!=typeof h&&(h=1),c.strokeStyle=h>0?\\\"white\\\":\\\"black\\\",c.lineWidth=Math.abs(h));if(c.translate(.5*r,.5*u),c.scale(g,g),function(){var t=document.createElement(\\\"canvas\\\").getContext(\\\"2d\\\");t.canvas.width=t.canvas.height=1;var e=new Path2D(\\\"M0,0h1v1h-1v-1Z\\\");t.fillStyle=\\\"black\\\",t.fill(e);var r=t.getImageData(0,0,1,1);return r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);c.fill(v),h&&c.stroke(v)}else{var m=i(t);a(c,m),c.fill(),h&&c.stroke()}return c.setTransform(1,0,0,1,0,0),s(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*f})}},{\\\"bitmap-sdf\\\":81,\\\"draw-svg-path\\\":153,\\\"is-svg-path\\\":407,\\\"parse-svg-path\\\":443,\\\"svg-path-bounds\\\":510}],513:[function(t,e,r){(function(r){\\\"use strict\\\";e.exports=function t(e,r,i){var i=i||{};var o=a[e];o||(o=a[e]={\\\" \\\":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\\\\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o<e.length;++o)for(var s=e[o],l=0;l<3;++l){var c=r[s[l]];n[i++]=c[0],n[i++]=c[1]+1.4,a=Math.max(c[0],a)}return{data:n,shape:a}}(n(r,{triangles:!0,font:e,textAlign:i.textAlign||\\\"left\\\",textBaseline:\\\"alphabetic\\\"}));else{for(var l=r.split(/(\\\\d|\\\\s)/),c=new Array(l.length),u=0,f=0,h=0;h<l.length;++h)c[h]=t(e,l[h]),u+=c[h].data.length,f+=c[h].shape,h>0&&(f+=.02);for(var p=new Float32Array(u),d=0,g=-.5*f,h=0;h<c.length;++h){for(var v=c[h].data,m=0;m<v.length;m+=2)p[d++]=v[m]+g,p[d++]=v[m+1];g+=c[h].shape+.02}s=o[r]={data:p,shape:f}}return s};var n=t(\\\"vectorize-text\\\"),i=window||r.global||{},a=i.__TEXT_CACHE||{};i.__TEXT_CACHE={}}).call(this,t(\\\"_process\\\"))},{_process:465,\\\"vectorize-text\\\":527}],514:[function(t,e,r){!function(t){var r=/^\\\\s+/,n=/\\\\s+$/,i=0,a=t.round,o=t.min,s=t.max,l=t.random;function c(e,l){if(l=l||{},(e=e||\\\"\\\")instanceof c)return e;if(!(this instanceof c))return new c(e,l);var u=function(e){var i={r:0,g:0,b:0},a=1,l=null,c=null,u=null,f=!1,h=!1;\\\"string\\\"==typeof e&&(e=function(t){t=t.replace(r,\\\"\\\").replace(n,\\\"\\\").toLowerCase();var e,i=!1;if(S[t])t=S[t],i=!0;else if(\\\"transparent\\\"==t)return{r:0,g:0,b:0,a:0,format:\\\"name\\\"};if(e=j.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=j.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=j.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=j.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=j.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=j.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=j.hex8.exec(t))return{r:O(e[1]),g:O(e[2]),b:O(e[3]),a:R(e[4]),format:i?\\\"name\\\":\\\"hex8\\\"};if(e=j.hex6.exec(t))return{r:O(e[1]),g:O(e[2]),b:O(e[3]),format:i?\\\"name\\\":\\\"hex\\\"};if(e=j.hex4.exec(t))return{r:O(e[1]+\\\"\\\"+e[1]),g:O(e[2]+\\\"\\\"+e[2]),b:O(e[3]+\\\"\\\"+e[3]),a:R(e[4]+\\\"\\\"+e[4]),format:i?\\\"name\\\":\\\"hex8\\\"};if(e=j.hex3.exec(t))return{r:O(e[1]+\\\"\\\"+e[1]),g:O(e[2]+\\\"\\\"+e[2]),b:O(e[3]+\\\"\\\"+e[3]),format:i?\\\"name\\\":\\\"hex\\\"};return!1}(e));\\\"object\\\"==typeof e&&(V(e.r)&&V(e.g)&&V(e.b)?(p=e.r,d=e.g,g=e.b,i={r:255*L(p,255),g:255*L(d,255),b:255*L(g,255)},f=!0,h=\\\"%\\\"===String(e.r).substr(-1)?\\\"prgb\\\":\\\"rgb\\\"):V(e.h)&&V(e.s)&&V(e.v)?(l=P(e.s),c=P(e.v),i=function(e,r,n){e=6*L(e,360),r=L(r,100),n=L(n,100);var i=t.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,l,c),f=!0,h=\\\"hsv\\\"):V(e.h)&&V(e.s)&&V(e.l)&&(l=P(e.s),u=P(e.l),i=function(t,e,r){var n,i,a;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,l,u),f=!0,h=\\\"hsl\\\"),e.hasOwnProperty(\\\"a\\\")&&(a=e.a));var p,d,g;return a=E(a),{ok:f,format:e.format||h,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c>.5?u/(2-a-l):u/(a+l),a){case t:n=(e-r)/u+(e<r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,l:c}}function f(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=a,u=a-l;if(i=0===a?0:u/a,a==l)n=0;else{switch(a){case t:n=(e-r)/u+(e<r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,v:c}}function h(t,e,r,n){var i=[I(a(t).toString(16)),I(a(e).toString(16)),I(a(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(\\\"\\\")}function p(t,e,r,n){return[I(D(n)),I(a(t).toString(16)),I(a(e).toString(16)),I(a(r).toString(16))].join(\\\"\\\")}function d(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s-=e/100,r.s=z(r.s),c(r)}function g(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s+=e/100,r.s=z(r.s),c(r)}function v(t){return c(t).desaturate(100)}function m(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l+=e/100,r.l=z(r.l),c(r)}function y(t,e){e=0===e?0:e||10;var r=c(t).toRgb();return r.r=s(0,o(255,r.r-a(-e/100*255))),r.g=s(0,o(255,r.g-a(-e/100*255))),r.b=s(0,o(255,r.b-a(-e/100*255))),c(r)}function x(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l-=e/100,r.l=z(r.l),c(r)}function b(t,e){var r=c(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,c(r)}function _(t){var e=c(t).toHsl();return e.h=(e.h+180)%360,c(e)}function w(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+120)%360,s:e.s,l:e.l}),c({h:(r+240)%360,s:e.s,l:e.l})]}function k(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+90)%360,s:e.s,l:e.l}),c({h:(r+180)%360,s:e.s,l:e.l}),c({h:(r+270)%360,s:e.s,l:e.l})]}function M(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+72)%360,s:e.s,l:e.l}),c({h:(r+216)%360,s:e.s,l:e.l})]}function A(t,e,r){e=e||6,r=r||30;var n=c(t).toHsl(),i=360/r,a=[c(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function T(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:i,v:a})),a=(a+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,i=this.toRgb();return e=i.r/255,r=i.g/255,n=i.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=E(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.v);return 1==this._a?\\\"hsv(\\\"+e+\\\", \\\"+r+\\\"%, \\\"+n+\\\"%)\\\":\\\"hsva(\\\"+e+\\\", \\\"+r+\\\"%, \\\"+n+\\\"%, \\\"+this._roundA+\\\")\\\"},toHsl:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=u(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.l);return 1==this._a?\\\"hsl(\\\"+e+\\\", \\\"+r+\\\"%, \\\"+n+\\\"%)\\\":\\\"hsla(\\\"+e+\\\", \\\"+r+\\\"%, \\\"+n+\\\"%, \\\"+this._roundA+\\\")\\\"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return\\\"#\\\"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[I(a(t).toString(16)),I(a(e).toString(16)),I(a(r).toString(16)),I(D(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join(\\\"\\\")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return\\\"#\\\"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?\\\"rgb(\\\"+a(this._r)+\\\", \\\"+a(this._g)+\\\", \\\"+a(this._b)+\\\")\\\":\\\"rgba(\\\"+a(this._r)+\\\", \\\"+a(this._g)+\\\", \\\"+a(this._b)+\\\", \\\"+this._roundA+\\\")\\\"},toPercentageRgb:function(){return{r:a(100*L(this._r,255))+\\\"%\\\",g:a(100*L(this._g,255))+\\\"%\\\",b:a(100*L(this._b,255))+\\\"%\\\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\\\"rgb(\\\"+a(100*L(this._r,255))+\\\"%, \\\"+a(100*L(this._g,255))+\\\"%, \\\"+a(100*L(this._b,255))+\\\"%)\\\":\\\"rgba(\\\"+a(100*L(this._r,255))+\\\"%, \\\"+a(100*L(this._g,255))+\\\"%, \\\"+a(100*L(this._b,255))+\\\"%, \\\"+this._roundA+\\\")\\\"},toName:function(){return 0===this._a?\\\"transparent\\\":!(this._a<1)&&(C[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e=\\\"#\\\"+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?\\\"GradientType = 1, \\\":\\\"\\\";if(t){var i=c(t);r=\\\"#\\\"+p(i._r,i._g,i._b,i._a)}return\\\"progid:DXImageTransform.Microsoft.gradient(\\\"+n+\\\"startColorstr=\\\"+e+\\\",endColorstr=\\\"+r+\\\")\\\"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||\\\"hex\\\"!==t&&\\\"hex6\\\"!==t&&\\\"hex3\\\"!==t&&\\\"hex4\\\"!==t&&\\\"hex8\\\"!==t&&\\\"name\\\"!==t?(\\\"rgb\\\"===t&&(r=this.toRgbString()),\\\"prgb\\\"===t&&(r=this.toPercentageRgbString()),\\\"hex\\\"!==t&&\\\"hex6\\\"!==t||(r=this.toHexString()),\\\"hex3\\\"===t&&(r=this.toHexString(!0)),\\\"hex4\\\"===t&&(r=this.toHex8String(!0)),\\\"hex8\\\"===t&&(r=this.toHex8String()),\\\"name\\\"===t&&(r=this.toName()),\\\"hsl\\\"===t&&(r=this.toHslString()),\\\"hsv\\\"===t&&(r=this.toHsvString()),r||this.toHexString()):\\\"name\\\"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if(\\\"object\\\"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=\\\"a\\\"===n?t[n]:P(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),i=c(e).toRgb(),a=r/100;return c({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},c.readability=function(e,r){var n=c(e),i=c(r);return(t.max(n.getLuminance(),i.getLuminance())+.05)/(t.min(n.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,i,a=c.readability(t,e);switch(i=!1,(n=function(t){var e,r;e=((t=t||{level:\\\"AA\\\",size:\\\"small\\\"}).level||\\\"AA\\\").toUpperCase(),r=(t.size||\\\"small\\\").toLowerCase(),\\\"AA\\\"!==e&&\\\"AAA\\\"!==e&&(e=\\\"AA\\\");\\\"small\\\"!==r&&\\\"large\\\"!==r&&(r=\\\"small\\\");return{level:e,size:r}}(r)).level+n.size){case\\\"AAsmall\\\":case\\\"AAAlarge\\\":i=a>=4.5;break;case\\\"AAlarge\\\":i=a>=3;break;case\\\"AAAsmall\\\":i=a>=7}return i},c.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;u<e.length;u++)(n=c.readability(t,e[u]))>l&&(l=n,s=c(e[u]));return c.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,c.mostReadable(t,[\\\"#fff\\\",\\\"#000\\\"],r))};var S=c.names={aliceblue:\\\"f0f8ff\\\",antiquewhite:\\\"faebd7\\\",aqua:\\\"0ff\\\",aquamarine:\\\"7fffd4\\\",azure:\\\"f0ffff\\\",beige:\\\"f5f5dc\\\",bisque:\\\"ffe4c4\\\",black:\\\"000\\\",blanchedalmond:\\\"ffebcd\\\",blue:\\\"00f\\\",blueviolet:\\\"8a2be2\\\",brown:\\\"a52a2a\\\",burlywood:\\\"deb887\\\",burntsienna:\\\"ea7e5d\\\",cadetblue:\\\"5f9ea0\\\",chartreuse:\\\"7fff00\\\",chocolate:\\\"d2691e\\\",coral:\\\"ff7f50\\\",cornflowerblue:\\\"6495ed\\\",cornsilk:\\\"fff8dc\\\",crimson:\\\"dc143c\\\",cyan:\\\"0ff\\\",darkblue:\\\"00008b\\\",darkcyan:\\\"008b8b\\\",darkgoldenrod:\\\"b8860b\\\",darkgray:\\\"a9a9a9\\\",darkgreen:\\\"006400\\\",darkgrey:\\\"a9a9a9\\\",darkkhaki:\\\"bdb76b\\\",darkmagenta:\\\"8b008b\\\",darkolivegreen:\\\"556b2f\\\",darkorange:\\\"ff8c00\\\",darkorchid:\\\"9932cc\\\",darkred:\\\"8b0000\\\",darksalmon:\\\"e9967a\\\",darkseagreen:\\\"8fbc8f\\\",darkslateblue:\\\"483d8b\\\",darkslategray:\\\"2f4f4f\\\",darkslategrey:\\\"2f4f4f\\\",darkturquoise:\\\"00ced1\\\",darkviolet:\\\"9400d3\\\",deeppink:\\\"ff1493\\\",deepskyblue:\\\"00bfff\\\",dimgray:\\\"696969\\\",dimgrey:\\\"696969\\\",dodgerblue:\\\"1e90ff\\\",firebrick:\\\"b22222\\\",floralwhite:\\\"fffaf0\\\",forestgreen:\\\"228b22\\\",fuchsia:\\\"f0f\\\",gainsboro:\\\"dcdcdc\\\",ghostwhite:\\\"f8f8ff\\\",gold:\\\"ffd700\\\",goldenrod:\\\"daa520\\\",gray:\\\"808080\\\",green:\\\"008000\\\",greenyellow:\\\"adff2f\\\",grey:\\\"808080\\\",honeydew:\\\"f0fff0\\\",hotpink:\\\"ff69b4\\\",indianred:\\\"cd5c5c\\\",indigo:\\\"4b0082\\\",ivory:\\\"fffff0\\\",khaki:\\\"f0e68c\\\",lavender:\\\"e6e6fa\\\",lavenderblush:\\\"fff0f5\\\",lawngreen:\\\"7cfc00\\\",lemonchiffon:\\\"fffacd\\\",lightblue:\\\"add8e6\\\",lightcoral:\\\"f08080\\\",lightcyan:\\\"e0ffff\\\",lightgoldenrodyellow:\\\"fafad2\\\",lightgray:\\\"d3d3d3\\\",lightgreen:\\\"90ee90\\\",lightgrey:\\\"d3d3d3\\\",lightpink:\\\"ffb6c1\\\",lightsalmon:\\\"ffa07a\\\",lightseagreen:\\\"20b2aa\\\",lightskyblue:\\\"87cefa\\\",lightslategray:\\\"789\\\",lightslategrey:\\\"789\\\",lightsteelblue:\\\"b0c4de\\\",lightyellow:\\\"ffffe0\\\",lime:\\\"0f0\\\",limegreen:\\\"32cd32\\\",linen:\\\"faf0e6\\\",magenta:\\\"f0f\\\",maroon:\\\"800000\\\",mediumaquamarine:\\\"66cdaa\\\",mediumblue:\\\"0000cd\\\",mediumorchid:\\\"ba55d3\\\",mediumpurple:\\\"9370db\\\",mediumseagreen:\\\"3cb371\\\",mediumslateblue:\\\"7b68ee\\\",mediumspringgreen:\\\"00fa9a\\\",mediumturquoise:\\\"48d1cc\\\",mediumvioletred:\\\"c71585\\\",midnightblue:\\\"191970\\\",mintcream:\\\"f5fffa\\\",mistyrose:\\\"ffe4e1\\\",moccasin:\\\"ffe4b5\\\",navajowhite:\\\"ffdead\\\",navy:\\\"000080\\\",oldlace:\\\"fdf5e6\\\",olive:\\\"808000\\\",olivedrab:\\\"6b8e23\\\",orange:\\\"ffa500\\\",orangered:\\\"ff4500\\\",orchid:\\\"da70d6\\\",palegoldenrod:\\\"eee8aa\\\",palegreen:\\\"98fb98\\\",paleturquoise:\\\"afeeee\\\",palevioletred:\\\"db7093\\\",papayawhip:\\\"ffefd5\\\",peachpuff:\\\"ffdab9\\\",peru:\\\"cd853f\\\",pink:\\\"ffc0cb\\\",plum:\\\"dda0dd\\\",powderblue:\\\"b0e0e6\\\",purple:\\\"800080\\\",rebeccapurple:\\\"663399\\\",red:\\\"f00\\\",rosybrown:\\\"bc8f8f\\\",royalblue:\\\"4169e1\\\",saddlebrown:\\\"8b4513\\\",salmon:\\\"fa8072\\\",sandybrown:\\\"f4a460\\\",seagreen:\\\"2e8b57\\\",seashell:\\\"fff5ee\\\",sienna:\\\"a0522d\\\",silver:\\\"c0c0c0\\\",skyblue:\\\"87ceeb\\\",slateblue:\\\"6a5acd\\\",slategray:\\\"708090\\\",slategrey:\\\"708090\\\",snow:\\\"fffafa\\\",springgreen:\\\"00ff7f\\\",steelblue:\\\"4682b4\\\",tan:\\\"d2b48c\\\",teal:\\\"008080\\\",thistle:\\\"d8bfd8\\\",tomato:\\\"ff6347\\\",turquoise:\\\"40e0d0\\\",violet:\\\"ee82ee\\\",wheat:\\\"f5deb3\\\",white:\\\"fff\\\",whitesmoke:\\\"f5f5f5\\\",yellow:\\\"ff0\\\",yellowgreen:\\\"9acd32\\\"},C=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function E(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return\\\"string\\\"==typeof t&&-1!=t.indexOf(\\\".\\\")&&1===parseFloat(t)})(e)&&(e=\\\"100%\\\");var n=function(t){return\\\"string\\\"==typeof t&&-1!=t.indexOf(\\\"%\\\")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function z(t){return o(1,s(0,t))}function O(t){return parseInt(t,16)}function I(t){return 1==t.length?\\\"0\\\"+t:\\\"\\\"+t}function P(t){return t<=1&&(t=100*t+\\\"%\\\"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return O(t)/255}var B,F,N,j=(F=\\\"[\\\\\\\\s|\\\\\\\\(]+(\\\"+(B=\\\"(?:[-\\\\\\\\+]?\\\\\\\\d*\\\\\\\\.\\\\\\\\d+%?)|(?:[-\\\\\\\\+]?\\\\\\\\d+%?)\\\")+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")\\\\\\\\s*\\\\\\\\)?\\\",N=\\\"[\\\\\\\\s|\\\\\\\\(]+(\\\"+B+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")[,|\\\\\\\\s]+(\\\"+B+\\\")\\\\\\\\s*\\\\\\\\)?\\\",{CSS_UNIT:new RegExp(B),rgb:new RegExp(\\\"rgb\\\"+F),rgba:new RegExp(\\\"rgba\\\"+N),hsl:new RegExp(\\\"hsl\\\"+F),hsla:new RegExp(\\\"hsla\\\"+N),hsv:new RegExp(\\\"hsv\\\"+F),hsva:new RegExp(\\\"hsva\\\"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(t){return!!j.CSS_UNIT.exec(t)}\\\"undefined\\\"!=typeof e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],515:[function(t,e,r){\\\"use strict\\\";function n(t){if(t instanceof Float32Array)return t;if(\\\"number\\\"==typeof t)return new Float32Array([t])[0];var e=new Float32Array(t);return e.set(t),e}e.exports=n,e.exports.float32=e.exports.float=n,e.exports.fract32=e.exports.fract=function(t){if(\\\"number\\\"==typeof t)return n(t-n(t));for(var e=n(t),r=0,i=e.length;r<i;r++)e[r]=t[r]-e[r];return e}},{}],516:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"parse-unit\\\");e.exports=o;var i=96;function a(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*o(r[1],t)}function o(t,e){switch(e=e||document.body,t=(t||\\\"px\\\").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case\\\"%\\\":return e.clientHeight/100;case\\\"ch\\\":case\\\"ex\\\":return function(t,e){var r=document.createElement(\\\"div\\\");r.style[\\\"font-size\\\"]=\\\"128\\\"+t,e.appendChild(r);var n=a(r,\\\"font-size\\\")/128;return e.removeChild(r),n}(t,e);case\\\"em\\\":return a(e,\\\"font-size\\\");case\\\"rem\\\":return a(document.body,\\\"font-size\\\");case\\\"vw\\\":return window.innerWidth/100;case\\\"vh\\\":return window.innerHeight/100;case\\\"vmin\\\":return Math.min(window.innerWidth,window.innerHeight)/100;case\\\"vmax\\\":return Math.max(window.innerWidth,window.innerHeight)/100;case\\\"in\\\":return i;case\\\"cm\\\":return i/2.54;case\\\"mm\\\":return i/25.4;case\\\"pt\\\":return i/72;case\\\"pc\\\":return i/6}return 1}},{\\\"parse-unit\\\":444}],517:[function(t,e,r){var n;n=this,function(t){\\\"use strict\\\";var e=function(t){return t},r=function(t){if(null==(r=t.transform))return e;var r,n,i,a=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(t,e){return e||(n=i=0),t[0]=(n+=t[0])*a+s,t[1]=(i+=t[1])*o+l,t}},n=function(t){var e=t.bbox;function n(t){l[0]=t[0],l[1]=t[1],s(l),l[0]<c&&(c=l[0]),l[0]>f&&(f=l[0]),l[1]<u&&(u=l[1]),l[1]>h&&(h=l[1])}function i(t){switch(t.type){case\\\"GeometryCollection\\\":t.geometries.forEach(i);break;case\\\"Point\\\":n(t.coordinates);break;case\\\"MultiPoint\\\":t.coordinates.forEach(n)}}if(!e){var a,o,s=r(t),l=new Array(2),c=1/0,u=c,f=-c,h=-c;for(o in t.arcs.forEach(function(t){for(var e=-1,r=t.length;++e<r;)a=t[e],l[0]=a[0],l[1]=a[1],s(l,e),l[0]<c&&(c=l[0]),l[0]>f&&(f=l[0]),l[1]<u&&(u=l[1]),l[1]>h&&(h=l[1])}),t.objects)i(t.objects[o]);e=t.bbox=[c,u,f,h]}return e},i=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r};function a(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,a=o(t,e);return null==r&&null==n?{type:\\\"Feature\\\",properties:i,geometry:a}:null==n?{type:\\\"Feature\\\",id:r,properties:i,geometry:a}:{type:\\\"Feature\\\",id:r,bbox:n,properties:i,geometry:a}}function o(t,e){var n=r(t),a=t.arcs;function o(t,e){e.length&&e.pop();for(var r=a[t<0?~t:t],o=0,s=r.length;o<s;++o)e.push(n(r[o].slice(),o));t<0&&i(e,s)}function s(t){return n(t.slice())}function l(t){for(var e=[],r=0,n=t.length;r<n;++r)o(t[r],e);return e.length<2&&e.push(e[0].slice()),e}function c(t){for(var e=l(t);e.length<4;)e.push(e[0].slice());return e}function u(t){return t.map(c)}return function t(e){var r,n=e.type;switch(n){case\\\"GeometryCollection\\\":return{type:n,geometries:e.geometries.map(t)};case\\\"Point\\\":r=s(e.coordinates);break;case\\\"MultiPoint\\\":r=e.coordinates.map(s);break;case\\\"LineString\\\":r=l(e.arcs);break;case\\\"MultiLineString\\\":r=e.arcs.map(l);break;case\\\"Polygon\\\":r=u(e.arcs);break;case\\\"MultiPolygon\\\":r=e.arcs.map(u);break;default:return null}return{type:n,coordinates:r}}(e)}var s=function(t,e){var r={},n={},i={},a=[],o=-1;function s(t,e){for(var n in t){var i=t[n];delete e[i.start],delete i.start,delete i.end,i.forEach(function(t){r[t<0?~t:t]=1}),a.push(i)}}return e.forEach(function(r,n){var i,a=t.arcs[r<0?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=e[++o],e[o]=r,e[n]=i)}),e.forEach(function(e){var r,a,o=function(e){var r,n=t.arcs[e<0?~e:e],i=n[0];t.transform?(r=[0,0],n.forEach(function(t){r[0]+=t[0],r[1]+=t[1]})):r=n[n.length-1];return e<0?[r,i]:[i,r]}(e),s=o[0],l=o[1];if(r=i[s])if(delete i[r.end],r.push(e),r.end=l,a=n[l]){delete n[a.start];var c=a===r?r:r.concat(a);n[c.start=r.start]=i[c.end=a.end]=c}else n[r.start]=i[r.end]=r;else if(r=n[l])if(delete n[r.start],r.unshift(e),r.start=s,a=i[s]){delete i[a.end];var u=a===r?r:a.concat(r);n[u.start=a.start]=i[u.end=r.end]=u}else n[r.start]=i[r.end]=r;else n[(r=[e]).start=s]=i[r.end=l]=r}),s(i,n),s(n,i),e.forEach(function(t){r[t<0?~t:t]||a.push([t])}),a};function l(t,e,r){var n,i,a;if(arguments.length>1)n=function(t,e,r){var n,i=[],a=[];function o(t){var e=t<0?~t:t;(a[e]||(a[e]=[])).push({i:t,g:n})}function s(t){t.forEach(o)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case\\\"GeometryCollection\\\":e.geometries.forEach(t);break;case\\\"LineString\\\":s(e.arcs);break;case\\\"MultiLineString\\\":case\\\"Polygon\\\":l(e.arcs);break;case\\\"MultiPolygon\\\":e.arcs.forEach(l)}}(e),a.forEach(null==r?function(t){i.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&&i.push(t[0].i)}),i}(0,e,r);else for(i=0,n=new Array(a=t.arcs.length);i<a;++i)n[i]=i;return{type:\\\"MultiLineString\\\",arcs:s(t,n)}}function c(t,e){var r={},n=[],i=[];function a(t){t.forEach(function(e){e.forEach(function(e){(r[e=e<0?~e:e]||(r[e]=[])).push(t)})}),n.push(t)}function l(e){return function(t){for(var e,r=-1,n=t.length,i=t[n-1],a=0;++r<n;)e=i,i=t[r],a+=e[0]*i[1]-e[1]*i[0];return Math.abs(a)}(o(t,{type:\\\"Polygon\\\",arcs:[e]}).coordinates[0])}return e.forEach(function t(e){switch(e.type){case\\\"GeometryCollection\\\":e.geometries.forEach(t);break;case\\\"Polygon\\\":a(e.arcs);break;case\\\"MultiPolygon\\\":e.arcs.forEach(a)}}),n.forEach(function(t){if(!t._){var e=[],n=[t];for(t._=1,i.push(e);t=n.pop();)e.push(t),t.forEach(function(t){t.forEach(function(t){r[t<0?~t:t].forEach(function(t){t._||(t._=1,n.push(t))})})})}}),n.forEach(function(t){delete t._}),{type:\\\"MultiPolygon\\\",arcs:i.map(function(e){var n,i=[];if(e.forEach(function(t){t.forEach(function(t){t.forEach(function(t){r[t<0?~t:t].length<2&&i.push(t)})})}),(n=(i=s(t,i)).length)>1)for(var a,o,c=1,u=l(i[0]);c<n;++c)(a=l(i[c]))>u&&(o=i[0],i[0]=i[c],i[c]=o,u=a);return i})}}var u=function(t,e){for(var r=0,n=t.length;r<n;){var i=r+n>>>1;t[i]<e?r=i+1:n=i}return r};t.bbox=n,t.feature=function(t,e){return\\\"GeometryCollection\\\"===e.type?{type:\\\"FeatureCollection\\\",features:e.geometries.map(function(e){return a(t,e)})}:a(t,e)},t.mesh=function(t){return o(t,l.apply(this,arguments))},t.meshArcs=l,t.merge=function(t){return o(t,c.apply(this,arguments))},t.mergeArcs=c,t.neighbors=function(t){var e={},r=t.map(function(){return[]});function n(t,r){t.forEach(function(t){t<0&&(t=~t);var n=e[t];n?n.push(r):e[t]=[r]})}function i(t,e){t.forEach(function(t){n(t,e)})}var a={LineString:n,MultiLineString:i,Polygon:i,MultiPolygon:function(t,e){t.forEach(function(t){i(t,e)})}};for(var o in t.forEach(function t(e,r){\\\"GeometryCollection\\\"===e.type?e.geometries.forEach(function(e){t(e,r)}):e.type in a&&a[e.type](e.arcs,r)}),e)for(var s=e[o],l=s.length,c=0;c<l;++c)for(var f=c+1;f<l;++f){var h,p=s[c],d=s[f];(h=r[p])[o=u(h,d)]!==d&&h.splice(o,0,d),(h=r[d])[o=u(h,p)]!==p&&h.splice(o,0,p)}return r},t.quantize=function(t,e){if(!((e=Math.floor(e))>=2))throw new Error(\\\"n must be \\\\u22652\\\");if(t.transform)throw new Error(\\\"already quantized\\\");var r,i=n(t),a=i[0],o=(i[2]-a)/(e-1)||1,s=i[1],l=(i[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-a)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case\\\"GeometryCollection\\\":t.geometries.forEach(u);break;case\\\"Point\\\":c(t.coordinates);break;case\\\"MultiPoint\\\":t.coordinates.forEach(c)}}for(r in t.arcs.forEach(function(t){for(var e,r,n,i=1,c=1,u=t.length,f=t[0],h=f[0]=Math.round((f[0]-a)/o),p=f[1]=Math.round((f[1]-s)/l);i<u;++i)f=t[i],r=Math.round((f[0]-a)/o),n=Math.round((f[1]-s)/l),r===h&&n===p||((e=t[c++])[0]=r-h,h=r,e[1]=n-p,p=n);c<2&&((e=t[c++])[0]=0,e[1]=0),t.length=c}),t.objects)u(t.objects[r]);return t.transform={scale:[o,l],translate:[a,s]},t},t.transform=r,t.untransform=function(t){if(null==(r=t.transform))return e;var r,n,i,a=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(t,e){e||(n=i=0);var r=Math.round((t[0]-s)/a),c=Math.round((t[1]-l)/o);return t[0]=r-n,n=r,t[1]=c-i,i=c,t}},Object.defineProperty(t,\\\"__esModule\\\",{value:!0})}(\\\"object\\\"==typeof r&&\\\"undefined\\\"!=typeof e?r:n.topojson=n.topojson||{})},{}],518:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){if(t<0)return[];if(0===t)return[[0]];for(var e=0|Math.round(a(t+1)),r=[],o=0;o<e;++o){for(var s=n.unrank(t,o),l=[0],c=0,u=0;u<s.length;++u)c+=1<<s[u],l.push(c);i(s)<1&&(l[0]=c,l[t]=0),r.push(l)}return r};var n=t(\\\"permutation-rank\\\"),i=t(\\\"permutation-parity\\\"),a=t(\\\"gamma\\\")},{gamma:220,\\\"permutation-parity\\\":446,\\\"permutation-rank\\\":447}],519:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.up||[0,1,0],n=t.right||f(r),i=t.radius||1,a=t.theta||0,u=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),s(r,r),n=[].slice.call(n,0,3),s(n,n),\\\"eye\\\"in t){var p=t.eye,d=[p[0]-e[0],p[1]-e[1],p[2]-e[2]];o(n,d,r),c(n[0],n[1],n[2])<1e-6?n=f(r):s(n,n),i=c(d[0],d[1],d[2]);var g=l(r,d)/i,v=l(n,d)/i;u=Math.acos(g),a=Math.acos(v)}return i=Math.log(i),new h(t.zoomMin,t.zoomMax,e,r,n,i,a,u)};var n=t(\\\"filtered-vector\\\"),i=t(\\\"gl-mat4/invert\\\"),a=t(\\\"gl-mat4/rotate\\\"),o=t(\\\"gl-vec3/cross\\\"),s=t(\\\"gl-vec3/normalize\\\"),l=t(\\\"gl-vec3/dot\\\");function c(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function u(t){return Math.min(1,Math.max(-1,t))}function f(t){var e=Math.abs(t[0]),r=Math.abs(t[1]),n=Math.abs(t[2]),i=[0,0,0];e>Math.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=e[a]*r[a],n+=e[a]*e[a];var l=Math.sqrt(n),u=0;for(a=0;a<3;++a)r[a]-=e[a]*i/n,u+=r[a]*r[a],e[a]/=l;var f=Math.sqrt(u);for(a=0;a<3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],v=Math.cos(d),m=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=v*y,w=m*y,k=x,M=-v*x,A=-m*x,T=y,S=this.computedEye,C=this.computedMatrix;for(a=0;a<3;++a){var E=_*r[a]+w*h[a]+k*e[a];C[4*a+1]=M*r[a]+A*h[a]+T*e[a],C[4*a+2]=E,C[4*a+3]=0}var L=C[1],z=C[5],O=C[9],I=C[2],P=C[6],D=C[10],R=z*D-O*P,B=O*I-L*D,F=L*P-z*I,N=c(R,B,F);R/=N,B/=N,F/=N,C[0]=R,C[4]=B,C[8]=F;for(a=0;a<3;++a)S[a]=b[a]+C[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=C[a+4*j]*S[j];C[12+a]=-u}C[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=o[c],i[4*c+1]=s[c],i[4*c+2]=l[c];a(i,i,n,d);for(c=0;c<3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=c(u-=a*p,f-=o*p,h-=s*p),g=(u/=d)*e+a*r,v=(f/=d)*e+o*r,m=(h/=d)*e+s*r;this.center.move(t,g,v,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;\\\"number\\\"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],f=e[a+8];if(n){var h=Math.abs(s),p=Math.abs(l),d=Math.abs(f),g=Math.max(h,p,d);h===g?(s=s<0?-1:1,l=f=0):d===g?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var v=c(s,l,f);s/=v,l/=v,f/=v}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,k=c(x-=s*w,b-=l*w,_-=f*w),M=l*(_/=k)-f*(b/=k),A=f*(x/=k)-s*_,T=s*b-l*x,S=c(M,A,T);if(M/=S,A/=S,T/=S,this.center.jump(t,H,G,W),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var C=e[1],E=e[5],L=e[9],z=C*x+E*b+L*_,O=C*M+E*A+L*T;m=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(O,z)}else{var I=e[2],P=e[6],D=e[10],R=I*s+P*l+D*f,B=I*x+P*b+D*_,F=I*M+P*A+D*T;m=Math.asin(u(R)),y=Math.atan2(F,B)}this.angle.jump(t,y,m),this.recalcMatrix(t);var N=e[2],j=e[6],V=e[10],U=this.computedMatrix;i(U,e);var q=U[15],H=U[12]/q,G=U[13]/q,W=U[14]/q,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*Y,G-j*Y,W-V*Y)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=c(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],p=c(l,f,h);if(!(p<1e-6)){l/=p,f/=p,h/=p;var d=this.computedRight,g=d[0],v=d[1],m=d[2],y=i*g+a*v+o*m,x=c(g-=y*i,v-=y*a,m-=y*o);if(!(x<.01&&(x=c(g=a*h-o*f,v=o*l-i*h,m=i*f-a*l))<1e-6)){g/=x,v/=x,m/=x,this.up.set(t,i,a,o),this.right.set(t,g,v,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*m-o*v,_=o*g-i*m,w=i*v-a*g,k=c(b,_,w),M=i*l+a*f+o*h,A=g*l+v*f+m*h,T=(b/=k)*l+(_/=k)*f+(w/=k)*h,S=Math.asin(u(M)),C=Math.atan2(T,A),E=this.angle._state,L=E[E.length-1],z=E[E.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-C),I=Math.abs(L-C),P=Math.abs(L-2*Math.PI-C);O<I&&(L+=2*Math.PI),P<I&&(L-=2*Math.PI),this.angle.jump(this.angle.lastT(),L,z),this.angle.set(t,C,S)}}}}},{\\\"filtered-vector\\\":215,\\\"gl-mat4/invert\\\":254,\\\"gl-mat4/rotate\\\":258,\\\"gl-vec3/cross\\\":317,\\\"gl-vec3/dot\\\":322,\\\"gl-vec3/normalize\\\":339}],520:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var i=t*e,a=n*t,o=a-(a-t),s=t-o,l=n*e,c=l-(l-e),u=e-c,f=s*u-(i-o*c-s*c-o*u);if(r)return r[0]=f,r[1]=i,r;return[f,i]};var n=+(Math.pow(2,27)+1)},{}],521:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n=t+e,i=n-t,a=e-i,o=t-(n-i);if(r)return r[0]=o+a,r[1]=n,r;return[o+a,n]}},{}],522:[function(t,e,r){(function(e,n){\\\"use strict\\\";var i=t(\\\"bit-twiddle\\\"),a=t(\\\"dup\\\");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var o=\\\"undefined\\\"!=typeof Uint8ClampedArray,s=e.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=a([32,0])),s.BUFFER||(s.BUFFER=a([32,0]));var l=s.DATA,c=s.BUFFER;function u(t){if(t){var e=t.length||t.byteLength,r=i.log2(e);l[r].push(t)}}function f(t){t=i.nextPow2(t);var e=i.log2(t),r=l[e];return r.length>0?r.pop():new ArrayBuffer(t)}function h(t){return new Uint8Array(f(t),0,t)}function p(t){return new Uint16Array(f(2*t),0,t)}function d(t){return new Uint32Array(f(4*t),0,t)}function g(t){return new Int8Array(f(t),0,t)}function v(t){return new Int16Array(f(2*t),0,t)}function m(t){return new Int32Array(f(4*t),0,t)}function y(t){return new Float32Array(f(4*t),0,t)}function x(t){return new Float64Array(f(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(f(t),0,t):h(t)}function _(t){return new DataView(f(t),0,t)}function w(t){t=i.nextPow2(t);var e=i.log2(t),r=c[e];return r.length>0?r.pop():new n(t)}r.free=function(t){if(n.isBuffer(t))c[i.log2(t.length)].push(t);else{if(\\\"[object ArrayBuffer]\\\"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|i.log2(e);l[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){u(t.buffer)},r.freeArrayBuffer=u,r.freeBuffer=function(t){c[i.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\\\"arraybuffer\\\"===e)return f(t);switch(e){case\\\"uint8\\\":return h(t);case\\\"uint16\\\":return p(t);case\\\"uint32\\\":return d(t);case\\\"int8\\\":return g(t);case\\\"int16\\\":return v(t);case\\\"int32\\\":return m(t);case\\\"float\\\":case\\\"float32\\\":return y(t);case\\\"double\\\":case\\\"float64\\\":return x(t);case\\\"uint8_clamped\\\":return b(t);case\\\"buffer\\\":return w(t);case\\\"data\\\":case\\\"dataview\\\":return _(t);default:return null}return null},r.mallocArrayBuffer=f,r.mallocUint8=h,r.mallocUint16=p,r.mallocUint32=d,r.mallocInt8=g,r.mallocInt16=v,r.mallocInt32=m,r.mallocFloat32=r.mallocFloat=y,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=b,r.mallocDataView=_,r.mallocBuffer=w,r.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{},t(\\\"buffer\\\").Buffer)},{\\\"bit-twiddle\\\":80,buffer:93,dup:155}],523:[function(t,e,r){\\\"use strict\\\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n;var i=n.prototype;Object.defineProperty(i,\\\"length\\\",{get:function(){return this.roots.length}}),i.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},i.find=function(t){for(var e=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[e]!==t;){var n=r[e];r[e]=t,e=n}return t},i.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],524:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){return 0===t.length?t:e?(r||t.sort(e),function(t,e){for(var r=1,n=t.length,i=t[0],a=t[0],o=1;o<n;++o)if(a=i,e(i=t[o],a)){if(o===r){r++;continue}t[r++]=i}return t.length=r,t}(t,e)):(r||t.sort(),function(t){for(var e=1,r=t.length,n=t[0],i=t[0],a=1;a<r;++a,i=n)if(i=n,(n=t[a])!==i){if(a===e){e++;continue}t[e++]=n}return t.length=e,t}(t))}},{}],525:[function(t,e,r){var n=/[\\\\'\\\\\\\"]/;e.exports=function(t){return t?(n.test(t.charAt(0))&&(t=t.substr(1)),n.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):\\\"\\\"}},{}],526:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n<i;n++){var a=r[n];for(var o in a)if((void 0===e[o]||Array.isArray(e[o])||t[o]!==e[o])&&o in e){var s;if(!0===a[o])s=e[o];else{if(!1===a[o])continue;if(\\\"function\\\"==typeof a[o]&&void 0===(s=a[o](e[o],t,e)))continue}t[o]=s}}return t}},{}],527:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){\\\"object\\\"==typeof e&&null!==e||(e={});return n(t,e.canvas||i,e.context||a,e)};var n=t(\\\"./lib/vtext\\\"),i=null,a=null;\\\"undefined\\\"!=typeof document&&((i=document.createElement(\\\"canvas\\\")).width=8192,i.height=1024,a=i.getContext(\\\"2d\\\"))},{\\\"./lib/vtext\\\":528}],528:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var a=n.size||64,o=n.font||\\\"normal\\\";return r.font=a+\\\"px \\\"+o,r.textAlign=\\\"start\\\",r.textBaseline=\\\"alphabetic\\\",r.direction=\\\"ltr\\\",f(function(t,e,r,n){var a=0|Math.ceil(e.measureText(r).width+2*n);if(a>8192)throw new Error(\\\"vectorize-text: String too long (sorry, this will get fixed later)\\\");var o=3*n;t.height<o&&(t.height=o),e.fillStyle=\\\"#000\\\",e.fillRect(0,0,t.width,t.height),e.fillStyle=\\\"#fff\\\",e.fillText(r,n,2*n);var s=e.getImageData(0,0,a,o);return i(s.data,[o,a,4]).pick(-1,-1,0).transpose(1,0)}(e,r,t,a),n,a)},e.exports.processPixels=f;var n=t(\\\"surface-nets\\\"),i=t(\\\"ndarray\\\"),a=t(\\\"simplify-planar-graph\\\"),o=t(\\\"clean-pslg\\\"),s=t(\\\"cdt2d\\\"),l=t(\\\"planar-graph-to-polyline\\\");function c(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function u(t,e,r,n){var i=c(t,n),a=function(t,e,r){for(var n=e.textAlign||\\\"start\\\",i=e.textBaseline||\\\"alphabetic\\\",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l<s;++l)for(var c=t[l],u=0;u<2;++u)a[u]=0|Math.min(a[u],c[u]),o[u]=0|Math.max(o[u],c[u]);var f=0;switch(n){case\\\"center\\\":f=-.5*(a[0]+o[0]);break;case\\\"right\\\":case\\\"end\\\":f=-o[0];break;case\\\"left\\\":case\\\"start\\\":f=-a[0];break;default:throw new Error(\\\"vectorize-text: Unrecognized textAlign: '\\\"+n+\\\"'\\\")}var h=0;switch(i){case\\\"hanging\\\":case\\\"top\\\":h=-a[1];break;case\\\"middle\\\":h=-.5*(a[1]+o[1]);break;case\\\"alphabetic\\\":case\\\"ideographic\\\":h=-3*r;break;case\\\"bottom\\\":h=-o[1];break;default:throw new Error(\\\"vectorize-text: Unrecognized textBaseline: '\\\"+i+\\\"'\\\")}var p=1/r;return\\\"lineHeight\\\"in e?p*=+e.lineHeight:\\\"width\\\"in e?p=e.width/(o[0]-a[0]):\\\"height\\\"in e&&(p=e.height/(o[1]-a[1])),t.map(function(t){return[p*(t[0]+f),p*(t[1]+h)]})}(i.positions,e,r),u=i.edges,f=\\\"ccw\\\"===e.orientation;if(o(a,u),e.polygons||e.polygon||e.polyline){for(var h=l(u,a),p=new Array(h.length),d=0;d<h.length;++d){for(var g=h[d],v=new Array(g.length),m=0;m<g.length;++m){for(var y=g[m],x=new Array(y.length),b=0;b<y.length;++b)x[b]=a[y[b]].slice();f&&x.reverse(),v[m]=x}p[d]=v}return p}return e.triangles||e.triangulate||e.triangle?{cells:s(a,u,{delaunay:!1,exterior:!1,interior:!0}),positions:a}:{edges:u,positions:a}}function f(t,e,r){try{return u(t,e,r,!0)}catch(t){}try{return u(t,e,r,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},{cdt2d:94,\\\"clean-pslg\\\":104,ndarray:433,\\\"planar-graph-to-polyline\\\":451,\\\"simplify-planar-graph\\\":500,\\\"surface-nets\\\":508}],529:[function(t,e,r){!function(){\\\"use strict\\\";if(\\\"undefined\\\"==typeof ses||!ses.ok||ses.ok()){\\\"undefined\\\"!=typeof ses&&(ses.weakMapPermitHostObjects=v);var t=!1;if(\\\"function\\\"==typeof WeakMap){var r=WeakMap;if(\\\"undefined\\\"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var n=new r,i=Object.freeze({});if(n.set(i,1),1===n.get(i))return void(e.exports=WeakMap);t=!0}}Object.prototype.hasOwnProperty;var a=Object.getOwnPropertyNames,o=Object.defineProperty,s=Object.isExtensible,l=\\\"weakmap:\\\",c=l+\\\"ident:\\\"+Math.random()+\\\"___\\\";if(\\\"undefined\\\"!=typeof crypto&&\\\"function\\\"==typeof crypto.getRandomValues&&\\\"function\\\"==typeof ArrayBuffer&&\\\"function\\\"==typeof Uint8Array){var u=new ArrayBuffer(25),f=new Uint8Array(u);crypto.getRandomValues(f),c=l+\\\"rand:\\\"+Array.prototype.map.call(f,function(t){return(t%36).toString(36)}).join(\\\"\\\")+\\\"___\\\"}if(o(Object,\\\"getOwnPropertyNames\\\",{value:function(t){return a(t).filter(m)}}),\\\"getPropertyNames\\\"in Object){var h=Object.getPropertyNames;o(Object,\\\"getPropertyNames\\\",{value:function(t){return h(t).filter(m)}})}!function(){var t=Object.freeze;o(Object,\\\"freeze\\\",{value:function(e){return y(e),t(e)}});var e=Object.seal;o(Object,\\\"seal\\\",{value:function(t){return y(t),e(t)}});var r=Object.preventExtensions;o(Object,\\\"preventExtensions\\\",{value:function(t){return y(t),r(t)}})}();var p=!1,d=0,g=function(){this instanceof g||b();var t=[],e=[],r=d++;return Object.create(g.prototype,{get___:{value:x(function(n,i){var a,o=y(n);return o?r in o?o[r]:i:(a=t.indexOf(n))>=0?e[a]:i})},has___:{value:x(function(e){var n=y(e);return n?r in n:t.indexOf(e)>=0})},set___:{value:x(function(n,i){var a,o=y(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this})},delete___:{value:x(function(n){var i,a,o=y(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0||(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),\\\"function\\\"==typeof r?function(){function n(){this instanceof g||b();var e,n=new r,i=void 0,a=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new g),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new g),i.set___(t,e)}else n.set(t,e);return this},Object.create(g.prototype,{get___:{value:x(function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)})},has___:{value:x(function(t){return n.has(t)||!!i&&i.has___(t)})},set___:{value:x(e)},delete___:{value:x(function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e})},permitHostObjects___:{value:x(function(t){if(t!==v)throw new Error(\\\"bogus call to permitHostObjects___\\\");a=!0})}})}t&&\\\"undefined\\\"!=typeof Proxy&&(Proxy=void 0),n.prototype=g.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,\\\"constructor\\\",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(\\\"undefined\\\"!=typeof Proxy&&(Proxy=void 0),e.exports=g)}function v(t){t.permitHostObjects___&&t.permitHostObjects___(v)}function m(t){return!(t.substr(0,l.length)==l&&\\\"___\\\"===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError(\\\"Not an object: \\\"+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||\\\"undefined\\\"==typeof console||(p=!0,console.warn(\\\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\\\"))}}()},{}],530:[function(t,e,r){var n=t(\\\"./hidden-store.js\\\");e.exports=function(){var t={};return function(e){if((\\\"object\\\"!=typeof e||null===e)&&\\\"function\\\"!=typeof e)throw new Error(\\\"Weakmap-shim: Key must be object\\\");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},{\\\"./hidden-store.js\\\":531}],531:[function(t,e,r){e.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,\\\"valueOf\\\",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},{}],532:[function(t,e,r){var n=t(\\\"./create-store.js\\\");e.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty(\\\"value\\\")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return\\\"value\\\"in t(e)},delete:function(e){return delete t(e).value}}}},{\\\"./create-store.js\\\":530}],533:[function(t,e,r){var n=t(\\\"get-canvas-context\\\");e.exports=function(t){return n(\\\"webgl\\\",t)}},{\\\"get-canvas-context\\\":221}],534:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\"),a=n.instance();function o(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}o.prototype=new n.baseCalendar,i(o.prototype,{name:\\\"Chinese\\\",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Chinese\\\",epochs:[\\\"BEC\\\",\\\"EC\\\"],monthNumbers:function(t,e){if(\\\"string\\\"==typeof t){var r=t.match(l);return r?r[0]:\\\"\\\"}var n=this._validateYear(t),i=t.month(),a=\\\"\\\"+this.toChineseMonth(n,i);return e&&a.length<2&&(a=\\\"0\\\"+a),this.isIntercalaryMonth(n,i)&&(a+=\\\"i\\\"),a},monthNames:function(t){if(\\\"string\\\"==typeof t){var e=t.match(c);return e?e[0]:\\\"\\\"}var r=this._validateYear(t),n=t.month(),i=[\\\"\\\\u4e00\\\\u6708\\\",\\\"\\\\u4e8c\\\\u6708\\\",\\\"\\\\u4e09\\\\u6708\\\",\\\"\\\\u56db\\\\u6708\\\",\\\"\\\\u4e94\\\\u6708\\\",\\\"\\\\u516d\\\\u6708\\\",\\\"\\\\u4e03\\\\u6708\\\",\\\"\\\\u516b\\\\u6708\\\",\\\"\\\\u4e5d\\\\u6708\\\",\\\"\\\\u5341\\\\u6708\\\",\\\"\\\\u5341\\\\u4e00\\\\u6708\\\",\\\"\\\\u5341\\\\u4e8c\\\\u6708\\\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\\\"\\\\u95f0\\\"+i),i},monthNamesShort:function(t){if(\\\"string\\\"==typeof t){var e=t.match(u);return e?e[0]:\\\"\\\"}var r=this._validateYear(t),n=t.month(),i=[\\\"\\\\u4e00\\\",\\\"\\\\u4e8c\\\",\\\"\\\\u4e09\\\",\\\"\\\\u56db\\\",\\\"\\\\u4e94\\\",\\\"\\\\u516d\\\",\\\"\\\\u4e03\\\",\\\"\\\\u516b\\\",\\\"\\\\u4e5d\\\",\\\"\\\\u5341\\\",\\\"\\\\u5341\\\\u4e00\\\",\\\"\\\\u5341\\\\u4e8c\\\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\\\"\\\\u95f0\\\"+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))\\\"\\\\u95f0\\\"===e[0]&&(r=!0,e=e.substring(1)),\\\"\\\\u6708\\\"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+[\\\"\\\\u4e00\\\",\\\"\\\\u4e8c\\\",\\\"\\\\u4e09\\\",\\\"\\\\u56db\\\",\\\"\\\\u4e94\\\",\\\"\\\\u516d\\\",\\\"\\\\u4e03\\\",\\\"\\\\u516b\\\",\\\"\\\\u4e5d\\\",\\\"\\\\u5341\\\",\\\"\\\\u5341\\\\u4e00\\\",\\\"\\\\u5341\\\\u4e8c\\\"].indexOf(e);else{var i=e[e.length-1];r=\\\"i\\\"===i||\\\"I\\\"===i}return this.toMonthIndex(t,n,r)},dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),\\\"number\\\"!=typeof t||t<1888||t>2111)throw e.replace(/\\\\{0\\\\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\\\\{0\\\\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\\\\{0\\\\}/,this.local.name);return r?e<r?e+1:e:e+1},intercalaryMonth:function(t){return t=this._validateYear(t),f[t-f[0]]>>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=h[o-h[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(i=a.newDate(l,c,u)).add(4-(i.dayOfWeek()||7),\\\"d\\\");var f=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\\\\{0\\\\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if(\\\"object\\\"==typeof t)o=t,a=e||{};else{var l=\\\"number\\\"==typeof t&&t>=1888&&t<=2111;if(!l)throw new Error(\\\"Lunar year outside range 1888-2111\\\");var c=\\\"number\\\"==typeof e&&e>=1&&e<=12;if(!c)throw new Error(\\\"Lunar month outside range 1 - 12\\\");var u,p=\\\"number\\\"==typeof r&&r>=1&&r<=30;if(!p)throw new Error(\\\"Lunar day outside range 1 - 30\\\");\\\"object\\\"==typeof n?(u=!1,a=n):(u=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:u}}s=o.day-1;var d,g=f[o.year-f[0]],v=g>>13;d=v?o.month>v?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var m=0;m<d;m++){var y=g&1<<12-m?30:29;s+=y}var x=h[o.year-h[0]],b=new Date(x>>9&4095,(x>>5&15)-1,(31&x)+s);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if(\\\"object\\\"==typeof t)i=t,a=e||{};else{var o=\\\"number\\\"==typeof t&&t>=1888&&t<=2111;if(!o)throw new Error(\\\"Solar year outside range 1888-2111\\\");var s=\\\"number\\\"==typeof e&&e>=1&&e<=12;if(!s)throw new Error(\\\"Solar month outside range 1 - 12\\\");var l=\\\"number\\\"==typeof r&&r>=1&&r<=31;if(!l)throw new Error(\\\"Solar day outside range 1 - 31\\\");i={year:t,month:e,day:r},a=n||{}}var c=h[i.year-h[0]],u=i.year<<9|i.month<<5|i.day;a.year=u>=c?i.year:i.year-1,c=h[a.year-h[0]];var p,d=new Date(c>>9&4095,(c>>5&15)-1,31&c),g=new Date(i.year,i.month-1,i.day);p=Math.round((g-d)/864e5);var v,m=f[a.year-f[0]];for(v=0;v<13;v++){var y=m&1<<12-v?30:29;if(p<y)break;p-=y}var x=m>>13;!x||v<x?(a.isIntercalary=!1,a.month=1+v):v===x?(a.isIntercalary=!0,a.month=v):(a.isIntercalary=!1,a.month=v);return a.day=1+p,a}(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(s),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var n=t.year(),i=t.month(),a=this.isIntercalaryMonth(n,i),s=this.toChineseMonth(n,i),l=Object.getPrototypeOf(o.prototype).add.call(this,t,e,r);if(\\\"y\\\"===r){var c=l.year(),u=l.month(),f=this.isIntercalaryMonth(c,s),h=a&&f?this.toMonthIndex(c,s,!0):this.toMonthIndex(c,s,!1);h!==u&&l.month(h)}return l}});var s=/^\\\\s*(-?\\\\d\\\\d\\\\d\\\\d|\\\\d\\\\d)[-\\\\/](\\\\d?\\\\d)([iI]?)[-\\\\/](\\\\d?\\\\d)/m,l=/^\\\\d?\\\\d[iI]?/m,c=/^\\\\u95f0?\\\\u5341?[\\\\u4e00\\\\u4e8c\\\\u4e09\\\\u56db\\\\u4e94\\\\u516d\\\\u4e03\\\\u516b\\\\u4e5d]?\\\\u6708/m,u=/^\\\\u95f0?\\\\u5341?[\\\\u4e00\\\\u4e8c\\\\u4e09\\\\u56db\\\\u4e94\\\\u516d\\\\u4e03\\\\u516b\\\\u4e5d]?/m;n.calendars.chinese=o;var f=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],h=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{\\\"../main\\\":548,\\\"object-assign\\\":437}],535:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Coptic\\\",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Coptic\\\",epochs:[\\\"BAM\\\",\\\"AM\\\"],monthNames:[\\\"Thout\\\",\\\"Paopi\\\",\\\"Hathor\\\",\\\"Koiak\\\",\\\"Tobi\\\",\\\"Meshir\\\",\\\"Paremhat\\\",\\\"Paremoude\\\",\\\"Pashons\\\",\\\"Paoni\\\",\\\"Epip\\\",\\\"Mesori\\\",\\\"Pi Kogi Enavot\\\"],monthNamesShort:[\\\"Tho\\\",\\\"Pao\\\",\\\"Hath\\\",\\\"Koi\\\",\\\"Tob\\\",\\\"Mesh\\\",\\\"Pat\\\",\\\"Pad\\\",\\\"Pash\\\",\\\"Pao\\\",\\\"Epi\\\",\\\"Meso\\\",\\\"PiK\\\"],dayNames:[\\\"Tkyriaka\\\",\\\"Pesnau\\\",\\\"Pshoment\\\",\\\"Peftoou\\\",\\\"Ptiou\\\",\\\"Psoou\\\",\\\"Psabbaton\\\"],dayNamesShort:[\\\"Tky\\\",\\\"Pes\\\",\\\"Psh\\\",\\\"Pef\\\",\\\"Pti\\\",\\\"Pso\\\",\\\"Psa\\\"],dayNamesMin:[\\\"Tk\\\",\\\"Pes\\\",\\\"Psh\\\",\\\"Pef\\\",\\\"Pt\\\",\\\"Pso\\\",\\\"Psa\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\\\"\\\"].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.coptic=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],536:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Discworld\\\",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Discworld\\\",epochs:[\\\"BUC\\\",\\\"UC\\\"],monthNames:[\\\"Ick\\\",\\\"Offle\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"Grune\\\",\\\"August\\\",\\\"Spune\\\",\\\"Sektober\\\",\\\"Ember\\\",\\\"December\\\"],monthNamesShort:[\\\"Ick\\\",\\\"Off\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Gru\\\",\\\"Aug\\\",\\\"Spu\\\",\\\"Sek\\\",\\\"Emb\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Octeday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Oct\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Oc\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,n.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||\\\"\\\"}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()<0?1:0),e=i.month(),(r=i.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:\\\"Fruitbat\\\",21:\\\"Anchovy\\\"};n.calendars.discworld=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],537:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Ethiopian\\\",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Ethiopian\\\",epochs:[\\\"BEE\\\",\\\"EE\\\"],monthNames:[\\\"Meskerem\\\",\\\"Tikemet\\\",\\\"Hidar\\\",\\\"Tahesas\\\",\\\"Tir\\\",\\\"Yekatit\\\",\\\"Megabit\\\",\\\"Miazia\\\",\\\"Genbot\\\",\\\"Sene\\\",\\\"Hamle\\\",\\\"Nehase\\\",\\\"Pagume\\\"],monthNamesShort:[\\\"Mes\\\",\\\"Tik\\\",\\\"Hid\\\",\\\"Tah\\\",\\\"Tir\\\",\\\"Yek\\\",\\\"Meg\\\",\\\"Mia\\\",\\\"Gen\\\",\\\"Sen\\\",\\\"Ham\\\",\\\"Neh\\\",\\\"Pag\\\"],dayNames:[\\\"Ehud\\\",\\\"Segno\\\",\\\"Maksegno\\\",\\\"Irob\\\",\\\"Hamus\\\",\\\"Arb\\\",\\\"Kidame\\\"],dayNamesShort:[\\\"Ehu\\\",\\\"Seg\\\",\\\"Mak\\\",\\\"Iro\\\",\\\"Ham\\\",\\\"Arb\\\",\\\"Kid\\\"],dayNamesMin:[\\\"Eh\\\",\\\"Se\\\",\\\"Ma\\\",\\\"Ir\\\",\\\"Ha\\\",\\\"Ar\\\",\\\"Ki\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\\\"\\\"].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],538:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Hebrew\\\",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Hebrew\\\",epochs:[\\\"BAM\\\",\\\"AM\\\"],monthNames:[\\\"Nisan\\\",\\\"Iyar\\\",\\\"Sivan\\\",\\\"Tammuz\\\",\\\"Av\\\",\\\"Elul\\\",\\\"Tishrei\\\",\\\"Cheshvan\\\",\\\"Kislev\\\",\\\"Tevet\\\",\\\"Shevat\\\",\\\"Adar\\\",\\\"Adar II\\\"],monthNamesShort:[\\\"Nis\\\",\\\"Iya\\\",\\\"Siv\\\",\\\"Tam\\\",\\\"Av\\\",\\\"Elu\\\",\\\"Tis\\\",\\\"Che\\\",\\\"Kis\\\",\\\"Tev\\\",\\\"She\\\",\\\"Ada\\\",\\\"Ad2\\\"],dayNames:[\\\"Yom Rishon\\\",\\\"Yom Sheni\\\",\\\"Yom Shlishi\\\",\\\"Yom Revi'i\\\",\\\"Yom Chamishi\\\",\\\"Yom Shishi\\\",\\\"Yom Shabbat\\\"],dayNamesShort:[\\\"Ris\\\",\\\"She\\\",\\\"Shl\\\",\\\"Rev\\\",\\\"Cha\\\",\\\"Shi\\\",\\\"Sha\\\"],dayNamesMin:[\\\"Ri\\\",\\\"She\\\",\\\"Shl\\\",\\\"Re\\\",\\\"Ch\\\",\\\"Shi\\\",\\\"Sha\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?\\\"embolismic\\\":\\\"common\\\")+\\\" \\\"+[\\\"deficient\\\",\\\"regular\\\",\\\"complete\\\"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s<e;s++)o+=this.daysInMonth(t,s)}else for(s=7;s<e;s++)o+=this.daysInMonth(t,s);return o},_delay1:function(t){var e=Math.floor((235*t-234)/19),r=12084+13753*e,n=29*e+Math.floor(r/25920);return o(3*(n+1),7)<3&&n++,n},_delay2:function(t){var e=this._delay1(t-1),r=this._delay1(t);return this._delay1(t+1)-r==356?2:r-e==382?1:0},fromJD:function(t){t=Math.floor(t)+.5;for(var e=Math.floor(98496*(t-this.jdEpoch)/35975351)-1;t>=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=t<this.toJD(e,1,1)?7:1;t>this.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],539:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Islamic\\\",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Islamic\\\",epochs:[\\\"BH\\\",\\\"AH\\\"],monthNames:[\\\"Muharram\\\",\\\"Safar\\\",\\\"Rabi' al-awwal\\\",\\\"Rabi' al-thani\\\",\\\"Jumada al-awwal\\\",\\\"Jumada al-thani\\\",\\\"Rajab\\\",\\\"Sha'aban\\\",\\\"Ramadan\\\",\\\"Shawwal\\\",\\\"Dhu al-Qi'dah\\\",\\\"Dhu al-Hijjah\\\"],monthNamesShort:[\\\"Muh\\\",\\\"Saf\\\",\\\"Rab1\\\",\\\"Rab2\\\",\\\"Jum1\\\",\\\"Jum2\\\",\\\"Raj\\\",\\\"Sha'\\\",\\\"Ram\\\",\\\"Shaw\\\",\\\"DhuQ\\\",\\\"DhuH\\\"],dayNames:[\\\"Yawm al-ahad\\\",\\\"Yawm al-ithnayn\\\",\\\"Yawm ath-thulaathaa'\\\",\\\"Yawm al-arbi'aa'\\\",\\\"Yawm al-kham\\\\u012bs\\\",\\\"Yawm al-jum'a\\\",\\\"Yawm as-sabt\\\"],dayNamesShort:[\\\"Aha\\\",\\\"Ith\\\",\\\"Thu\\\",\\\"Arb\\\",\\\"Kha\\\",\\\"Jum\\\",\\\"Sab\\\"],dayNamesMin:[\\\"Ah\\\",\\\"It\\\",\\\"Th\\\",\\\"Ar\\\",\\\"Kh\\\",\\\"Ju\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t<=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],540:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Julian\\\",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Julian\\\",epochs:[\\\"BC\\\",\\\"AD\\\"],monthNames:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],monthNamesShort:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"mm/dd/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),n.calendars.julian=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],541:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Mayan\\\",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{\\\"\\\":{name:\\\"Mayan\\\",epochs:[\\\"\\\",\\\"\\\"],monthNames:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\"],monthNamesShort:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\"],dayNames:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\",\\\"18\\\",\\\"19\\\"],dayNamesShort:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\",\\\"18\\\",\\\"19\\\"],dayNamesMin:[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"10\\\",\\\"11\\\",\\\"12\\\",\\\"13\\\",\\\"14\\\",\\\"15\\\",\\\"16\\\",\\\"17\\\",\\\"18\\\",\\\"19\\\"],digits:null,dateFormat:\\\"YYYY.m.d\\\",firstDay:0,isRTL:!1,haabMonths:[\\\"Pop\\\",\\\"Uo\\\",\\\"Zip\\\",\\\"Zotz\\\",\\\"Tzec\\\",\\\"Xul\\\",\\\"Yaxkin\\\",\\\"Mol\\\",\\\"Chen\\\",\\\"Yax\\\",\\\"Zac\\\",\\\"Ceh\\\",\\\"Mac\\\",\\\"Kankin\\\",\\\"Muan\\\",\\\"Pax\\\",\\\"Kayab\\\",\\\"Cumku\\\",\\\"Uayeb\\\"],tzolkinMonths:[\\\"Imix\\\",\\\"Ik\\\",\\\"Akbal\\\",\\\"Kan\\\",\\\"Chicchan\\\",\\\"Cimi\\\",\\\"Manik\\\",\\\"Lamat\\\",\\\"Muluc\\\",\\\"Oc\\\",\\\"Chuen\\\",\\\"Eb\\\",\\\"Ben\\\",\\\"Ix\\\",\\\"Men\\\",\\\"Cib\\\",\\\"Caban\\\",\\\"Etznab\\\",\\\"Cauac\\\",\\\"Ahau\\\"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+\\\".\\\"+Math.floor(t/20)+\\\".\\\"+t%20},forYear:function(t){if((t=t.split(\\\".\\\")).length<3)throw\\\"Invalid Mayan year\\\";for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r],10);if(Math.abs(n)>19||r>0&&n<0)throw\\\"Invalid Mayan year\\\";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(t){var e=o((t-=this.jdEpoch)+8+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s((t-=this.jdEpoch)+20,20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],542:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar;var o=n.instance(\\\"gregorian\\\");i(a.prototype,{name:\\\"Nanakshahi\\\",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Nanakshahi\\\",epochs:[\\\"BN\\\",\\\"AN\\\"],monthNames:[\\\"Chet\\\",\\\"Vaisakh\\\",\\\"Jeth\\\",\\\"Harh\\\",\\\"Sawan\\\",\\\"Bhadon\\\",\\\"Assu\\\",\\\"Katak\\\",\\\"Maghar\\\",\\\"Poh\\\",\\\"Magh\\\",\\\"Phagun\\\"],monthNamesShort:[\\\"Che\\\",\\\"Vai\\\",\\\"Jet\\\",\\\"Har\\\",\\\"Saw\\\",\\\"Bha\\\",\\\"Ass\\\",\\\"Kat\\\",\\\"Mgr\\\",\\\"Poh\\\",\\\"Mgh\\\",\\\"Pha\\\"],dayNames:[\\\"Somvaar\\\",\\\"Mangalvar\\\",\\\"Budhvaar\\\",\\\"Veervaar\\\",\\\"Shukarvaar\\\",\\\"Sanicharvaar\\\",\\\"Etvaar\\\"],dayNamesShort:[\\\"Som\\\",\\\"Mangal\\\",\\\"Budh\\\",\\\"Veer\\\",\\\"Shukar\\\",\\\"Sanichar\\\",\\\"Et\\\"],dayNamesMin:[\\\"So\\\",\\\"Ma\\\",\\\"Bu\\\",\\\"Ve\\\",\\\"Sh\\\",\\\"Sa\\\",\\\"Et\\\"],digits:null,dateFormat:\\\"dd-mm-yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\\\"\\\"].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth);(t=i.year())<0&&t++;for(var a=i.day(),s=1;s<i.month();s++)a+=this.daysPerMonth[s-1];return a+o.toJD(t+1468,3,13)},fromJD:function(t){t=Math.floor(t+.5);for(var e=Math.floor((t-(this.jdEpoch-1))/366);t>=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],543:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Nepali\\\",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{\\\"\\\":{name:\\\"Nepali\\\",epochs:[\\\"BBS\\\",\\\"ABS\\\"],monthNames:[\\\"Baisakh\\\",\\\"Jestha\\\",\\\"Ashadh\\\",\\\"Shrawan\\\",\\\"Bhadra\\\",\\\"Ashwin\\\",\\\"Kartik\\\",\\\"Mangsir\\\",\\\"Paush\\\",\\\"Mangh\\\",\\\"Falgun\\\",\\\"Chaitra\\\"],monthNamesShort:[\\\"Bai\\\",\\\"Je\\\",\\\"As\\\",\\\"Shra\\\",\\\"Bha\\\",\\\"Ash\\\",\\\"Kar\\\",\\\"Mang\\\",\\\"Pau\\\",\\\"Ma\\\",\\\"Fal\\\",\\\"Chai\\\"],dayNames:[\\\"Aaitabaar\\\",\\\"Sombaar\\\",\\\"Manglbaar\\\",\\\"Budhabaar\\\",\\\"Bihibaar\\\",\\\"Shukrabaar\\\",\\\"Shanibaar\\\"],dayNamesShort:[\\\"Aaita\\\",\\\"Som\\\",\\\"Mangl\\\",\\\"Budha\\\",\\\"Bihi\\\",\\\"Shukra\\\",\\\"Shani\\\"],dayNamesMin:[\\\"Aai\\\",\\\"So\\\",\\\"Man\\\",\\\"Bu\\\",\\\"Bi\\\",\\\"Shu\\\",\\\"Sha\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),\\\"undefined\\\"==typeof this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),\\\"undefined\\\"==typeof this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,\\\"d\\\").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r<t+2;r++)\\\"undefined\\\"==typeof this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=e)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2000:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),n.calendars.nepali=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],544:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"Persian\\\",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Persian\\\",epochs:[\\\"BP\\\",\\\"AP\\\"],monthNames:[\\\"Farvardin\\\",\\\"Ordibehesht\\\",\\\"Khordad\\\",\\\"Tir\\\",\\\"Mordad\\\",\\\"Shahrivar\\\",\\\"Mehr\\\",\\\"Aban\\\",\\\"Azar\\\",\\\"Day\\\",\\\"Bahman\\\",\\\"Esfand\\\"],monthNamesShort:[\\\"Far\\\",\\\"Ord\\\",\\\"Kho\\\",\\\"Tir\\\",\\\"Mor\\\",\\\"Sha\\\",\\\"Meh\\\",\\\"Aba\\\",\\\"Aza\\\",\\\"Day\\\",\\\"Bah\\\",\\\"Esf\\\"],dayNames:[\\\"Yekshambe\\\",\\\"Doshambe\\\",\\\"Seshambe\\\",\\\"Ch\\\\xe6harshambe\\\",\\\"Panjshambe\\\",\\\"Jom'e\\\",\\\"Shambe\\\"],dayNamesShort:[\\\"Yek\\\",\\\"Do\\\",\\\"Se\\\",\\\"Ch\\\\xe6\\\",\\\"Panj\\\",\\\"Jom\\\",\\\"Sha\\\"],dayNamesMin:[\\\"Ye\\\",\\\"Do\\\",\\\"Se\\\",\\\"Ch\\\",\\\"Pa\\\",\\\"Jo\\\",\\\"Sh\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:6,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 682*((e.year()-(e.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t-(t>=0?474:473),s=474+o(a,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,1029983),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l<=0?l-1:l;var c=t-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=t-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}}),n.calendars.persian=a,n.calendars.jalali=a},{\\\"../main\\\":548,\\\"object-assign\\\":437}],545:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\"),a=n.instance();function o(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}o.prototype=new n.baseCalendar,i(o.prototype,{name:\\\"Taiwan\\\",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Taiwan\\\",epochs:[\\\"BROC\\\",\\\"ROC\\\"],monthNames:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],monthNamesShort:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{\\\"../main\\\":548,\\\"object-assign\\\":437}],546:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\"),a=n.instance();function o(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}o.prototype=new n.baseCalendar,i(o.prototype,{name:\\\"Thai\\\",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Thai\\\",epochs:[\\\"BBE\\\",\\\"BE\\\"],monthNames:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],monthNamesShort:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"dd/mm/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},{\\\"../main\\\":548,\\\"object-assign\\\":437}],547:[function(t,e,r){var n=t(\\\"../main\\\"),i=t(\\\"object-assign\\\");function a(t){this.local=this.regionalOptions[t||\\\"\\\"]||this.regionalOptions[\\\"\\\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\\\"UmmAlQura\\\",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Umm al-Qura\\\",epochs:[\\\"BH\\\",\\\"AH\\\"],monthNames:[\\\"Al-Muharram\\\",\\\"Safar\\\",\\\"Rabi' al-awwal\\\",\\\"Rabi' Al-Thani\\\",\\\"Jumada Al-Awwal\\\",\\\"Jumada Al-Thani\\\",\\\"Rajab\\\",\\\"Sha'aban\\\",\\\"Ramadan\\\",\\\"Shawwal\\\",\\\"Dhu al-Qi'dah\\\",\\\"Dhu al-Hijjah\\\"],monthNamesShort:[\\\"Muh\\\",\\\"Saf\\\",\\\"Rab1\\\",\\\"Rab2\\\",\\\"Jum1\\\",\\\"Jum2\\\",\\\"Raj\\\",\\\"Sha'\\\",\\\"Ram\\\",\\\"Shaw\\\",\\\"DhuQ\\\",\\\"DhuH\\\"],dayNames:[\\\"Yawm al-Ahad\\\",\\\"Yawm al-Ithnain\\\",\\\"Yawm al-Thal\\\\u0101th\\\\u0101\\\\u2019\\\",\\\"Yawm al-Arba\\\\u2018\\\\u0101\\\\u2019\\\",\\\"Yawm al-Kham\\\\u012bs\\\",\\\"Yawm al-Jum\\\\u2018a\\\",\\\"Yawm al-Sabt\\\"],dayNamesMin:[\\\"Ah\\\",\\\"Ith\\\",\\\"Th\\\",\\\"Ar\\\",\\\"Kh\\\",\\\"Ju\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"yyyy/mm/dd\\\",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;a<o.length;a++){if(o[a]>r)return o[i]-o[i-1];i++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;n<o.length&&!(o[n]>e);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,c=e-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,e,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\\\\{0\\\\}/,this.local.name);return a}}),n.calendars.ummalqura=a;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{\\\"../main\\\":548,\\\"object-assign\\\":437}],548:[function(t,e,r){var n=t(\\\"object-assign\\\");function i(){this.regionalOptions=[],this.regionalOptions[\\\"\\\"]={invalidCalendar:\\\"Calendar {0} not found\\\",invalidDate:\\\"Invalid {0} date\\\",invalidMonth:\\\"Invalid {0} month\\\",invalidYear:\\\"Invalid {0} year\\\",differentCalendars:\\\"Cannot mix {0} and {1} dates\\\"},this.local=this.regionalOptions[\\\"\\\"],this.calendars={},this._localCals={}}function a(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate).replace(/\\\\{0\\\\}/,this._calendar.local.name)}function o(t,e){return\\\"000000\\\".substring(0,e-(t=\\\"\\\"+t).length)+t}function s(){this.shortYearCutoff=\\\"+10\\\"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[\\\"\\\"]}n(i.prototype,{instance:function(t,e){t=(t||\\\"gregorian\\\").toLowerCase(),e=e||\\\"\\\";var r=this._localCals[t+\\\"-\\\"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+\\\"-\\\"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[\\\"\\\"].invalidCalendar).replace(/\\\\{0\\\\}/,t);return r},newDate:function(t,e,r,n,i){return(n=(null!=t&&t.year?t.calendar():\\\"string\\\"==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+\\\"\\\").replace(/[0-9]/g,function(e){return t[e]})}},substituteChineseDigits:function(t,e){return function(r){for(var n=\\\"\\\",i=0;r>0;){var a=r%10;n=(0===a?\\\"\\\":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(a.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,\\\"y\\\")},month:function(t){return 0===arguments.length?this._month:this.set(t,\\\"m\\\")},day:function(t){return 0===arguments.length?this._day:this.set(t,\\\"d\\\")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate).replace(/\\\\{0\\\\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[\\\"\\\"].differentCalendars).replace(/\\\\{0\\\\}/,this._calendar.local.name).replace(/\\\\{1\\\\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?\\\"-\\\":\\\"\\\")+o(Math.abs(this.year()),4)+\\\"-\\\"+o(this.month(),2)+\\\"-\\\"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate),r=t.day(),e=t.month(),t=t.year()),new a(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear);return(e.year()<0?\\\"-\\\":\\\"\\\")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[\\\"\\\"].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,c.local.invalidMonth||c.regionalOptions[\\\"\\\"].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,\\\"d\\\"===r||\\\"w\\\"===r){var n=t.toJD()+e*(\\\"w\\\"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+(\\\"y\\\"===r?e:0),o=t.monthOfYear()+(\\\"m\\\"===r?e:0);i=t.day();\\\"y\\\"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):\\\"m\\\"===r&&(!function(t){for(;o<t.minMonth;)a--,o+=t.monthsInYear(a);for(var e=t.monthsInYear(a);o>e-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||\\\"y\\\"!==n&&\\\"m\\\"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,\\\"y\\\"],m:[1,this.monthsInYear(-1),\\\"m\\\"],w:[this.daysInWeek(),this.daysInYear(-1),\\\"d\\\"],d:[1,this.daysInYear(-1),\\\"d\\\"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);var n=\\\"y\\\"===r?e:t.year(),i=\\\"m\\\"===r?e:t.month(),a=\\\"d\\\"===r?e:t.day();return\\\"y\\\"!==r&&\\\"m\\\"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth<this.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);return c.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(c.instance().fromJSDate(t).toJD())},_validate:function(t,e,r,n){if(t.year){if(0===this._validateLevel&&this.name!==t.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[\\\"\\\"].differentCalendars).replace(/\\\\{0\\\\}/,this.local.name).replace(/\\\\{1\\\\}/,t.calendar().local.name);return t}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(t,e,r))throw n.replace(/\\\\{0\\\\}/,this.local.name);var i=this.newDate(t,e,r);return this._validateLevel--,i}catch(t){throw this._validateLevel--,t}}}),l.prototype=new s,n(l.prototype,{name:\\\"Gregorian\\\",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\\\"\\\":{name:\\\"Gregorian\\\",epochs:[\\\"BCE\\\",\\\"CE\\\"],monthNames:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],monthNamesShort:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],dayNames:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],dayNamesShort:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],dayNamesMin:[\\\"Su\\\",\\\"Mo\\\",\\\"Tu\\\",\\\"We\\\",\\\"Th\\\",\\\"Fr\\\",\\\"Sa\\\"],digits:null,dateFormat:\\\"mm/dd/yyyy\\\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\\\"\\\"].invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==0&&(t%100!=0||t%400==0)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),\\\"d\\\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[\\\"\\\"].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate);t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<3&&(e+=12,t--);var i=Math.floor(t/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r+a-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=Math.floor((e-1867216.25)/36524.25),n=(r=e+1+r-Math.floor(r/4))+1524,i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\\\"\\\"].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var c=e.exports=new i;c.cdate=a,c.baseCalendar=s,c.calendars.gregorian=l},{\\\"object-assign\\\":437}],549:[function(t,e,r){var n=t(\\\"object-assign\\\"),i=t(\\\"./main\\\");n(i.regionalOptions[\\\"\\\"],{invalidArguments:\\\"Invalid arguments\\\",invalidFormat:\\\"Cannot format a date from another calendar\\\",missingNumberAt:\\\"Missing number at position {0}\\\",unknownNameAt:\\\"Unknown name at position {0}\\\",unexpectedLiteralAt:\\\"Unexpected literal at position {0}\\\",unexpectedText:\\\"Additional text found at end\\\"}),i.local=i.regionalOptions[\\\"\\\"],n(i.cdate.prototype,{formatDate:function(t,e){return\\\"string\\\"!=typeof t&&(e=t,t=\\\"\\\"),this._calendar.formatDate(t||\\\"\\\",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:\\\"yyyy-mm-dd\\\",COOKIE:\\\"D, dd M yyyy\\\",FULL:\\\"DD, MM d, yyyy\\\",ISO_8601:\\\"yyyy-mm-dd\\\",JULIAN:\\\"J\\\",RFC_822:\\\"D, d M yy\\\",RFC_850:\\\"DD, dd-M-yy\\\",RFC_1036:\\\"D, d M yy\\\",RFC_1123:\\\"D, d M yyyy\\\",RFC_2822:\\\"D, d M yyyy\\\",RSS:\\\"D, d M yy\\\",TICKS:\\\"!\\\",TIMESTAMP:\\\"@\\\",W3C:\\\"yyyy-mm-dd\\\",formatDate:function(t,e,r){if(\\\"string\\\"!=typeof t&&(r=e,e=t,t=\\\"\\\"),!e)return\\\"\\\";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[\\\"\\\"].invalidFormat;t=t||this.local.dateFormat;for(var n,a,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,f=r.monthNamesShort||this.local.monthNamesShort,h=r.monthNames||this.local.monthNames,p=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;w+n<t.length&&t.charAt(w+n)===e;)n++;return w+=n-1,Math.floor(n/(r||1))>1}),d=function(t,e,r,n){var i=\\\"\\\"+e;if(p(t,n))for(;i.length<r;)i=\\\"0\\\"+i;return i},g=this,v=function(t){return\\\"function\\\"==typeof u?u.call(g,t,p(\\\"m\\\")):x(d(\\\"m\\\",t.month(),2))},m=function(t,e){return e?\\\"function\\\"==typeof h?h.call(g,t):h[t.month()-g.minMonth]:\\\"function\\\"==typeof f?f.call(g,t):f[t.month()-g.minMonth]},y=this.local.digits,x=function(t){return r.localNumbers&&y?y(t):t},b=\\\"\\\",_=!1,w=0;w<t.length;w++)if(_)\\\"'\\\"!==t.charAt(w)||p(\\\"'\\\")?b+=t.charAt(w):_=!1;else switch(t.charAt(w)){case\\\"d\\\":b+=x(d(\\\"d\\\",e.day(),2));break;case\\\"D\\\":b+=(n=\\\"D\\\",a=e.dayOfWeek(),o=l,s=c,p(n)?s[a]:o[a]);break;case\\\"o\\\":b+=d(\\\"o\\\",e.dayOfYear(),3);break;case\\\"w\\\":b+=d(\\\"w\\\",e.weekOfYear(),2);break;case\\\"m\\\":b+=v(e);break;case\\\"M\\\":b+=m(e,p(\\\"M\\\"));break;case\\\"y\\\":b+=p(\\\"y\\\",2)?e.year():(e.year()%100<10?\\\"0\\\":\\\"\\\")+e.year()%100;break;case\\\"Y\\\":p(\\\"Y\\\",2),b+=e.formatYear();break;case\\\"J\\\":b+=e.toJD();break;case\\\"@\\\":b+=(e.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case\\\"!\\\":b+=(e.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case\\\"'\\\":p(\\\"'\\\")?b+=\\\"'\\\":_=!0;break;default:b+=t.charAt(w)}return b},parseDate:function(t,e,r){if(null==e)throw i.local.invalidArguments||i.regionalOptions[\\\"\\\"].invalidArguments;if(\\\"\\\"===(e=\\\"object\\\"==typeof e?e.toString():e+\\\"\\\"))return null;t=t||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n=\\\"string\\\"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var a=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,s=r.parseMonth||this.local.parseMonth,l=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,f=-1,h=-1,p=-1,d=-1,g=-1,v=!1,m=!1,y=function(e,r){for(var n=1;T+n<t.length&&t.charAt(T+n)===e;)n++;return T+=n-1,Math.floor(n/(r||1))>1},x=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20][\\\"oyYJ@!\\\".indexOf(t)+1],o=new RegExp(\\\"^-?\\\\\\\\d{1,\\\"+a+\\\"}\\\"),s=e.substring(A).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[\\\"\\\"].missingNumberAt).replace(/\\\\{0\\\\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if(\\\"function\\\"==typeof l){y(\\\"m\\\");var t=l.call(b,e.substring(A));return A+=t.length,t}return x(\\\"m\\\")},w=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s<o.length;s++)if(e.substr(A,o[s].length).toLowerCase()===o[s].toLowerCase())return A+=o[s].length,s+b.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[\\\"\\\"].unknownNameAt).replace(/\\\\{0\\\\}/,A)},k=function(){if(\\\"function\\\"==typeof u){var t=y(\\\"M\\\")?u.call(b,e.substring(A)):c.call(b,e.substring(A));return A+=t.length,t}return w(\\\"M\\\",c,u)},M=function(){if(e.charAt(A)!==t.charAt(T))throw(i.local.unexpectedLiteralAt||i.regionalOptions[\\\"\\\"].unexpectedLiteralAt).replace(/\\\\{0\\\\}/,A);A++},A=0,T=0;T<t.length;T++)if(m)\\\"'\\\"!==t.charAt(T)||y(\\\"'\\\")?M():m=!1;else switch(t.charAt(T)){case\\\"d\\\":d=x(\\\"d\\\");break;case\\\"D\\\":w(\\\"D\\\",a,o);break;case\\\"o\\\":g=x(\\\"o\\\");break;case\\\"w\\\":x(\\\"w\\\");break;case\\\"m\\\":p=_();break;case\\\"M\\\":p=k();break;case\\\"y\\\":var S=T;v=!y(\\\"y\\\",2),T=S,h=x(\\\"y\\\",2);break;case\\\"Y\\\":h=x(\\\"Y\\\",2);break;case\\\"J\\\":f=x(\\\"J\\\")+.5,\\\".\\\"===e.charAt(A)&&(A++,x(\\\"J\\\"));break;case\\\"@\\\":f=x(\\\"@\\\")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case\\\"!\\\":f=x(\\\"!\\\")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case\\\"*\\\":A=e.length;break;case\\\"'\\\":y(\\\"'\\\")?M():m=!0;break;default:M()}if(A<e.length)throw i.local.unexpectedText||i.regionalOptions[\\\"\\\"].unexpectedText;if(-1===h?h=this.today().year():h<100&&v&&(h+=-1===n?1900:this.today().year()-this.today().year()%100-(h<=n?0:100)),\\\"string\\\"==typeof p&&(p=s.call(this,h,p)),g>-1){p=1,d=g;for(var C=this.daysInMonth(h,p);d>C;C=this.daysInMonth(h,p))p++,d-=C}return f>-1?this.fromJD(f):this.newDate(h,p,d)},determineDate:function(t,e,r,n,i){r&&\\\"object\\\"!=typeof r&&(i=n,n=r,r=null),\\\"string\\\"!=typeof n&&(i=n,n=\\\"\\\");var a=this;return e=e?e.newDate():null,t=null==t?e:\\\"string\\\"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\\\\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||\\\"d\\\"),s=o.exec(t);return e}(t):\\\"number\\\"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,\\\"d\\\"):a.newDate(t)}})},{\\\"./main\\\":548,\\\"object-assign\\\":437}],550:[function(t,e,r){e.exports=t(\\\"cwise-compiler\\\")({args:[\\\"array\\\",{offset:[1],array:0},\\\"scalar\\\",\\\"scalar\\\",\\\"index\\\"],pre:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},post:{body:\\\"{}\\\",args:[],thisVars:[],localVars:[]},body:{body:\\\"{\\\\n        var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\\\\n        var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\\\\n        if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\\\\n          _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\\\\n        }\\\\n      }\\\",args:[{name:\\\"_inline_1_arg0_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg1_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg2_\\\",lvalue:!1,rvalue:!0,count:1},{name:\\\"_inline_1_arg3_\\\",lvalue:!1,rvalue:!0,count:2},{name:\\\"_inline_1_arg4_\\\",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[\\\"_inline_1_da\\\",\\\"_inline_1_db\\\"]},funcName:\\\"zeroCrossings\\\"})},{\\\"cwise-compiler\\\":134}],551:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t(\\\"./lib/zc-core\\\")},{\\\"./lib/zc-core\\\":550}],552:[function(t,e,r){\\\"use strict\\\";e.exports=[{path:\\\"\\\",backoff:0},{path:\\\"M-2.4,-3V3L0.6,0Z\\\",backoff:.6},{path:\\\"M-3.7,-2.5V2.5L1.3,0Z\\\",backoff:1.3},{path:\\\"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z\\\",backoff:1.55},{path:\\\"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z\\\",backoff:1.6},{path:\\\"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z\\\",backoff:2},{path:\\\"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z\\\",backoff:0,noRotate:!0},{path:\\\"M2,2V-2H-2V2Z\\\",backoff:0,noRotate:!0}]},{}],553:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./arrow_paths\\\"),i=t(\\\"../../plots/font_attributes\\\"),a=t(\\\"../../plots/cartesian/constants\\\"),o=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports=o(\\\"annotation\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc+arraydraw\\\"},text:{valType:\\\"string\\\",editType:\\\"calc+arraydraw\\\"},textangle:{valType:\\\"angle\\\",dflt:0,editType:\\\"calc+arraydraw\\\"},font:i({editType:\\\"calc+arraydraw\\\",colorEditType:\\\"arraydraw\\\"}),width:{valType:\\\"number\\\",min:1,dflt:null,editType:\\\"calc+arraydraw\\\"},height:{valType:\\\"number\\\",min:1,dflt:null,editType:\\\"calc+arraydraw\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,editType:\\\"arraydraw\\\"},align:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"center\\\",editType:\\\"arraydraw\\\"},valign:{valType:\\\"enumerated\\\",values:[\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"middle\\\",editType:\\\"arraydraw\\\"},bgcolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\",editType:\\\"arraydraw\\\"},bordercolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\",editType:\\\"arraydraw\\\"},borderpad:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc+arraydraw\\\"},borderwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc+arraydraw\\\"},showarrow:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc+arraydraw\\\"},arrowcolor:{valType:\\\"color\\\",editType:\\\"arraydraw\\\"},arrowhead:{valType:\\\"integer\\\",min:0,max:n.length,dflt:1,editType:\\\"arraydraw\\\"},startarrowhead:{valType:\\\"integer\\\",min:0,max:n.length,dflt:1,editType:\\\"arraydraw\\\"},arrowside:{valType:\\\"flaglist\\\",flags:[\\\"end\\\",\\\"start\\\"],extras:[\\\"none\\\"],dflt:\\\"end\\\",editType:\\\"arraydraw\\\"},arrowsize:{valType:\\\"number\\\",min:.3,dflt:1,editType:\\\"calc+arraydraw\\\"},startarrowsize:{valType:\\\"number\\\",min:.3,dflt:1,editType:\\\"calc+arraydraw\\\"},arrowwidth:{valType:\\\"number\\\",min:.1,editType:\\\"calc+arraydraw\\\"},standoff:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"calc+arraydraw\\\"},startstandoff:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"calc+arraydraw\\\"},ax:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},ay:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},axref:{valType:\\\"enumerated\\\",dflt:\\\"pixel\\\",values:[\\\"pixel\\\",a.idRegex.x.toString()],editType:\\\"calc\\\"},ayref:{valType:\\\"enumerated\\\",dflt:\\\"pixel\\\",values:[\\\"pixel\\\",a.idRegex.y.toString()],editType:\\\"calc\\\"},xref:{valType:\\\"enumerated\\\",values:[\\\"paper\\\",a.idRegex.x.toString()],editType:\\\"calc\\\"},x:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"auto\\\",editType:\\\"calc+arraydraw\\\"},xshift:{valType:\\\"number\\\",dflt:0,editType:\\\"calc+arraydraw\\\"},yref:{valType:\\\"enumerated\\\",values:[\\\"paper\\\",a.idRegex.y.toString()],editType:\\\"calc\\\"},y:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"auto\\\",editType:\\\"calc+arraydraw\\\"},yshift:{valType:\\\"number\\\",dflt:0,editType:\\\"calc+arraydraw\\\"},clicktoshow:{valType:\\\"enumerated\\\",values:[!1,\\\"onoff\\\",\\\"onout\\\"],dflt:!1,editType:\\\"arraydraw\\\"},xclick:{valType:\\\"any\\\",editType:\\\"arraydraw\\\"},yclick:{valType:\\\"any\\\",editType:\\\"arraydraw\\\"},hovertext:{valType:\\\"string\\\",editType:\\\"arraydraw\\\"},hoverlabel:{bgcolor:{valType:\\\"color\\\",editType:\\\"arraydraw\\\"},bordercolor:{valType:\\\"color\\\",editType:\\\"arraydraw\\\"},font:i({editType:\\\"arraydraw\\\"}),editType:\\\"arraydraw\\\"},captureevents:{valType:\\\"boolean\\\",editType:\\\"arraydraw\\\"},editType:\\\"calc\\\",_deprecated:{ref:{valType:\\\"string\\\",editType:\\\"calc\\\"}}})},{\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/constants\\\":751,\\\"../../plots/font_attributes\\\":772,\\\"./arrow_paths\\\":552}],554:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"./draw\\\").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach(function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref);e._extremes={},r&&s(e,r),n&&s(e,n)})}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t[\\\"a\\\"+a],l=t[a+\\\"ref\\\"],c=t[\\\"a\\\"+a+\\\"ref\\\"],u=t[\\\"_\\\"+a+\\\"padplus\\\"],f=t[\\\"_\\\"+a+\\\"padminus\\\"],h={x:1,y:-1}[a]*t[a+\\\"shift\\\"],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,g=p-h,v=3*t.startarrowsize*t.arrowwidth||0,m=v+h,y=v-h;if(c===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,m),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,m),ppadminus:Math.max(f,g,y)});t._extremes[n]=r}e.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"./draw\\\":559}],555:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plot_api/plot_template\\\").arrayEditor;function o(t,e){var r,n,i,a,o,l,c,u=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r<u.length;r++)if(a=(i=u[r]).clicktoshow){for(n=0;n<d;n++)if(l=(o=e[n]).xaxis,c=o.yaxis,l._id===i.xref&&c._id===i.yref&&l.d2r(o.x)===s(i._xclick,l)&&c.d2r(o.y)===s(i._yclick,c)){(i.visible?\\\"onout\\\"===a?h:p:f).push(r);break}n===d&&i.visible&&\\\"onout\\\"===a&&h.push(r)}return{on:f,off:h,explicitOff:p}}function s(t,e){return\\\"log\\\"===e.type?e.l2r(t):e.d2r(t)}e.exports={hasClickToShow:function(t,e){var r=o(t,e);return r.on.length>0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),c=l.on,u=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(!c.length&&!u.length)return;for(r=0;r<c.length;r++)(s=a(t.layout,\\\"annotations\\\",h[c[r]])).modifyItem(\\\"visible\\\",!0),n.extendFlat(f,s.getUpdateObj());for(r=0;r<u.length;r++)(s=a(t.layout,\\\"annotations\\\",h[u[r]])).modifyItem(\\\"visible\\\",!1),n.extendFlat(f,s.getUpdateObj());return i.call(\\\"update\\\",t,{},f)}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../registry\\\":828}],556:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../color\\\");e.exports=function(t,e,r,a){a(\\\"opacity\\\");var o=a(\\\"bgcolor\\\"),s=a(\\\"bordercolor\\\"),l=i.opacity(s);a(\\\"borderpad\\\");var c=a(\\\"borderwidth\\\"),u=a(\\\"showarrow\\\");if(a(\\\"text\\\",u?\\\" \\\":r._dfltTitle.annotation),a(\\\"textangle\\\"),n.coerceFont(a,\\\"font\\\",r.font),a(\\\"width\\\"),a(\\\"align\\\"),a(\\\"height\\\")&&a(\\\"valign\\\"),u){var f,h,p=a(\\\"arrowside\\\");-1!==p.indexOf(\\\"end\\\")&&(f=a(\\\"arrowhead\\\"),h=a(\\\"arrowsize\\\")),-1!==p.indexOf(\\\"start\\\")&&(a(\\\"startarrowhead\\\",f),a(\\\"startarrowsize\\\",h)),a(\\\"arrowcolor\\\",l?e.bordercolor:i.defaultLine),a(\\\"arrowwidth\\\",2*(l&&c||1)),a(\\\"standoff\\\"),a(\\\"startstandoff\\\")}var d=a(\\\"hovertext\\\"),g=r.hoverlabel||{};if(d){var v=a(\\\"hoverlabel.bgcolor\\\",g.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),m=a(\\\"hoverlabel.bordercolor\\\",g.bordercolor||i.contrast(v));n.coerceFont(a,\\\"hoverlabel.font\\\",{family:g.font.family,size:g.font.size,color:g.font.color||m})}a(\\\"captureevents\\\",!!d)}},{\\\"../../lib\\\":696,\\\"../color\\\":570}],557:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib/to_log_range\\\");e.exports=function(t,e,r,a){e=e||{};var o=\\\"log\\\"===r&&\\\"linear\\\"===e.type,s=\\\"linear\\\"===r&&\\\"log\\\"===e.type;if(o||s)for(var l,c,u=t._fullLayout.annotations,f=e._id.charAt(0),h=0;h<u.length;h++)l=u[h],c=\\\"annotations[\\\"+h+\\\"].\\\",l[f+\\\"ref\\\"]===e._id&&p(f),l[\\\"a\\\"+f+\\\"ref\\\"]===e._id&&p(\\\"a\\\"+f);function p(t){var r=l[t],s=null;s=o?i(r,e.range):Math.pow(10,r),n(s)||(s=null),a(c+t,s)}}},{\\\"../../lib/to_log_range\\\":723,\\\"fast-isnumeric\\\":214}],558:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../plots/array_container_defaults\\\"),o=t(\\\"./common_defaults\\\"),s=t(\\\"./attributes\\\");function l(t,e,r){function a(r,i){return n.coerce(t,e,s,r,i)}var l=a(\\\"visible\\\"),c=a(\\\"clicktoshow\\\");if(l||c){o(t,e,r,a);for(var u=e.showarrow,f=[\\\"x\\\",\\\"y\\\"],h=[-10,-30],p={_fullLayout:r},d=0;d<2;d++){var g=f[d],v=i.coerceRef(t,e,p,g,\\\"\\\",\\\"paper\\\");if(\\\"paper\\\"!==v)i.getFromId(p,v)._annIndices.push(e._index);if(i.coercePosition(e,p,a,v,g,.5),u){var m=\\\"a\\\"+g,y=i.coerceRef(t,e,p,m,\\\"pixel\\\");\\\"pixel\\\"!==y&&y!==v&&(y=e[m]=\\\"pixel\\\");var x=\\\"pixel\\\"===y?h[d]:.4;i.coercePosition(e,p,a,y,m,x)}a(g+\\\"anchor\\\"),a(g+\\\"shift\\\")}if(n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\"]),u&&n.noneOrAll(t,e,[\\\"ax\\\",\\\"ay\\\"]),c){var b=a(\\\"xclick\\\"),_=a(\\\"yclick\\\");e._xclick=void 0===b?e.x:i.cleanPosition(b,p,e.xref),e._yclick=void 0===_?e.y:i.cleanPosition(_,p,e.yref)}}}e.exports=function(t,e){a(t,e,{name:\\\"annotations\\\",handleItemDefaults:l})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/cartesian/axes\\\":745,\\\"./attributes\\\":553,\\\"./common_defaults\\\":556}],559:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../plots/cartesian/axes\\\"),l=t(\\\"../color\\\"),c=t(\\\"../drawing\\\"),u=t(\\\"../fx\\\"),f=t(\\\"../../lib/svg_text_utils\\\"),h=t(\\\"../../lib/setcursor\\\"),p=t(\\\"../dragelement\\\"),d=t(\\\"../../plot_api/plot_template\\\").arrayEditor,g=t(\\\"./draw_arrow_head\\\");function v(t,e){var r=t._fullLayout.annotations[e]||{};m(t,r,e,!1,s.getFromId(t,r.xref),s.getFromId(t,r.yref))}function m(t,e,r,a,s,v){var m,y,x=t._fullLayout,b=t._fullLayout._size,_=t._context.edits;a?(m=\\\"annotation-\\\"+a,y=a+\\\".annotations\\\"):(m=\\\"annotation\\\",y=\\\"annotations\\\");var w=d(t.layout,y,e),k=w.modifyBase,M=w.modifyItem,A=w.getUpdateObj;x._infolayer.selectAll(\\\".\\\"+m+'[data-index=\\\"'+r+'\\\"]').remove();var T=\\\"clip\\\"+x._uid+\\\"_ann\\\"+r;if(e._input&&!1!==e.visible){var S={x:{},y:{}},C=+e.textangle||0,E=x._infolayer.append(\\\"g\\\").classed(m,!0).attr(\\\"data-index\\\",String(r)).style(\\\"opacity\\\",e.opacity),L=E.append(\\\"g\\\").classed(\\\"annotation-text-g\\\",!0),z=_[e.showarrow?\\\"annotationTail\\\":\\\"annotationPosition\\\"],O=e.captureevents||_.annotationText||z,I=L.append(\\\"g\\\").style(\\\"pointer-events\\\",O?\\\"all\\\":null).call(h,\\\"pointer\\\").on(\\\"click\\\",function(){t._dragging=!1;var i={index:r,annotation:e._input,fullAnnotation:e,event:n.event};a&&(i.subplotId=a),t.emit(\\\"plotly_clickannotation\\\",i)});e.hovertext&&I.on(\\\"mouseover\\\",function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();u.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:t})}).on(\\\"mouseout\\\",function(){u.loneUnhover(x._hoverlayer.node())});var P=e.borderwidth,D=e.borderpad,R=P+D,B=I.append(\\\"rect\\\").attr(\\\"class\\\",\\\"bg\\\").style(\\\"stroke-width\\\",P+\\\"px\\\").call(l.stroke,e.bordercolor).call(l.fill,e.bgcolor),F=e.width||e.height,N=x._topclips.selectAll(\\\"#\\\"+T).data(F?[0]:[]);N.enter().append(\\\"clipPath\\\").classed(\\\"annclip\\\",!0).attr(\\\"id\\\",T).append(\\\"rect\\\"),N.exit().remove();var j=e.font,V=I.append(\\\"text\\\").classed(\\\"annotation-text\\\",!0).text(e.text);_.annotationText?V.call(f.makeEditable,{delegate:I,gd:t}).call(U).on(\\\"edit\\\",function(r){e.text=r,this.call(U),M(\\\"text\\\",r),s&&s.autorange&&k(s._name+\\\".autorange\\\",!0),v&&v.autorange&&k(v._name+\\\".autorange\\\",!0),i.call(\\\"relayout\\\",t,A())}):V.call(U)}else n.selectAll(\\\"#\\\"+T).remove();function U(r){return r.call(c.font,j).attr({\\\"text-anchor\\\":{left:\\\"start\\\",right:\\\"end\\\"}[e.align]||\\\"middle\\\"}),f.convertToTspans(r,t,q),r}function q(){var r=V.selectAll(\\\"a\\\");1===r.size()&&r.text()===V.text()&&I.insert(\\\"a\\\",\\\":first-child\\\").attr({\\\"xlink:xlink:href\\\":r.attr(\\\"xlink:href\\\"),\\\"xlink:xlink:show\\\":r.attr(\\\"xlink:show\\\")}).style({cursor:\\\"pointer\\\"}).node().appendChild(B.node());var n=I.select(\\\".annotation-text-math-group\\\"),u=!n.empty(),d=c.bBox((u?n:V).node()),m=d.width,y=d.height,w=e.width||m,O=e.height||y,D=Math.round(w+2*R),j=Math.round(O+2*R);function U(t,e){return\\\"auto\\\"===e&&(e=t<1/3?\\\"left\\\":t>2/3?\\\"right\\\":\\\"center\\\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var q=!1,H=[\\\"x\\\",\\\"y\\\"],G=0;G<H.length;G++){var W,Y,X,Z,$,J=H[G],K=e[J+\\\"ref\\\"]||J,Q=e[\\\"a\\\"+J+\\\"ref\\\"],tt={x:s,y:v}[J],et=(C+(\\\"x\\\"===J?0:-90))*Math.PI/180,rt=D*Math.cos(et),nt=j*Math.sin(et),it=Math.abs(rt)+Math.abs(nt),at=e[J+\\\"anchor\\\"],ot=e[J+\\\"shift\\\"]*(\\\"x\\\"===J?1:-1),st=S[J];if(tt){var lt=tt.r2fraction(e[J]);(lt<0||lt>1)&&(Q===K?((lt=tt.r2fraction(e[\\\"a\\\"+J]))<0||lt>1)&&(q=!0):q=!0),W=tt._offset+tt.r2p(e[J]),Z=.5}else\\\"x\\\"===J?(X=e[J],W=b.l+b.w*X):(X=1-e[J],W=b.t+b.h*X),Z=e.showarrow?.5:X;if(e.showarrow){st.head=W;var ct=e[\\\"a\\\"+J];$=rt*U(.5,e.xanchor)-nt*U(.5,e.yanchor),Q===K?(st.tail=tt._offset+tt.r2p(ct),Y=$):(st.tail=W+ct,Y=$+ct),st.text=st.tail+$;var ut=x[\\\"x\\\"===J?\\\"width\\\":\\\"height\\\"];if(\\\"paper\\\"===K&&(st.head=o.constrain(st.head,1,ut-1)),\\\"pixel\\\"===Q){var ft=-Math.max(st.tail-3,st.text),ht=Math.min(st.tail+3,st.text)-ut;ft>0?(st.tail+=ft,st.text+=ft):ht>0&&(st.tail-=ht,st.text-=ht)}st.tail+=ot,st.head+=ot}else Y=$=it*U(Z,at),st.text=W+$;st.text+=ot,$+=ot,Y+=ot,e[\\\"_\\\"+J+\\\"padplus\\\"]=it/2+Y,e[\\\"_\\\"+J+\\\"padminus\\\"]=it/2-Y,e[\\\"_\\\"+J+\\\"size\\\"]=it,e[\\\"_\\\"+J+\\\"shift\\\"]=$}if(t._dragging||!q){var pt=0,dt=0;if(\\\"left\\\"!==e.align&&(pt=(w-m)*(\\\"center\\\"===e.align?.5:1)),\\\"top\\\"!==e.valign&&(dt=(O-y)*(\\\"middle\\\"===e.valign?.5:1)),u)n.select(\\\"svg\\\").attr({x:R+pt-1,y:R+dt}).call(c.setClipUrl,F?T:null);else{var gt=R+dt-d.top,vt=R+pt-d.left;V.call(f.positionText,vt,gt).call(c.setClipUrl,F?T:null)}N.select(\\\"rect\\\").call(c.setRect,R,R,w,O),B.call(c.setRect,P/2,P/2,D-P,j-P),I.call(c.setTranslate,Math.round(S.x.text-D/2),Math.round(S.y.text-j/2)),L.attr({transform:\\\"rotate(\\\"+C+\\\",\\\"+S.x.text+\\\",\\\"+S.y.text+\\\")\\\"});var mt,yt=function(r,n){E.selectAll(\\\".annotation-arrow-g\\\").remove();var u=S.x.head,f=S.y.head,h=S.x.tail+r,d=S.y.tail+n,m=S.x.text+r,y=S.y.text+n,x=o.rotationXYMatrix(C,m,y),w=o.apply2DTransform(x),T=o.apply2DTransform2(x),z=+B.attr(\\\"width\\\"),O=+B.attr(\\\"height\\\"),P=m-.5*z,D=P+z,R=y-.5*O,F=R+O,N=[[P,R,P,F],[P,F,D,F],[D,F,D,R],[D,R,P,R]].map(T);if(!N.reduce(function(t,e){return t^!!o.segmentsIntersect(u,f,u+1e6,f+1e6,e[0],e[1],e[2],e[3])},!1)){N.forEach(function(t){var e=o.segmentsIntersect(h,d,u,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,d=e.y)});var j=e.arrowwidth,V=e.arrowcolor,U=e.arrowside,q=E.append(\\\"g\\\").style({opacity:l.opacity(V)}).classed(\\\"annotation-arrow-g\\\",!0),H=q.append(\\\"path\\\").attr(\\\"d\\\",\\\"M\\\"+h+\\\",\\\"+d+\\\"L\\\"+u+\\\",\\\"+f).style(\\\"stroke-width\\\",j+\\\"px\\\").call(l.stroke,l.rgb(V));if(g(H,U,e),_.annotationPosition&&H.node().parentNode&&!a){var G=u,W=f;if(e.standoff){var Y=Math.sqrt(Math.pow(u-h,2)+Math.pow(f-d,2));G+=e.standoff*(h-u)/Y,W+=e.standoff*(d-f)/Y}var X,Z,$=q.append(\\\"path\\\").classed(\\\"annotation-arrow\\\",!0).classed(\\\"anndrag\\\",!0).classed(\\\"cursor-move\\\",!0).attr({d:\\\"M3,3H-3V-3H3ZM0,0L\\\"+(h-G)+\\\",\\\"+(d-W),transform:\\\"translate(\\\"+G+\\\",\\\"+W+\\\")\\\"}).style(\\\"stroke-width\\\",j+6+\\\"px\\\").call(l.stroke,\\\"rgba(0,0,0,0)\\\").call(l.fill,\\\"rgba(0,0,0,0)\\\");p.init({element:$.node(),gd:t,prepFn:function(){var t=c.getTranslate(I);X=t.x,Z=t.y,s&&s.autorange&&k(s._name+\\\".autorange\\\",!0),v&&v.autorange&&k(v._name+\\\".autorange\\\",!0)},moveFn:function(t,r){var n=w(X,Z),i=n[0]+t,a=n[1]+r;I.call(c.setTranslate,i,a),M(\\\"x\\\",s?s.p2r(s.r2p(e.x)+t):e.x+t/b.w),M(\\\"y\\\",v?v.p2r(v.r2p(e.y)+r):e.y-r/b.h),e.axref===e.xref&&M(\\\"ax\\\",s.p2r(s.r2p(e.ax)+t)),e.ayref===e.yref&&M(\\\"ay\\\",v.p2r(v.r2p(e.ay)+r)),q.attr(\\\"transform\\\",\\\"translate(\\\"+t+\\\",\\\"+r+\\\")\\\"),L.attr({transform:\\\"rotate(\\\"+C+\\\",\\\"+i+\\\",\\\"+a+\\\")\\\"})},doneFn:function(){i.call(\\\"relayout\\\",t,A());var e=document.querySelector(\\\".js-notes-box-panel\\\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&yt(0,0),z)p.init({element:I.node(),gd:t,prepFn:function(){mt=L.attr(\\\"transform\\\")},moveFn:function(t,r){var n=\\\"pointer\\\";if(e.showarrow)e.axref===e.xref?M(\\\"ax\\\",s.p2r(s.r2p(e.ax)+t)):M(\\\"ax\\\",e.ax+t),e.ayref===e.yref?M(\\\"ay\\\",v.p2r(v.r2p(e.ay)+r)):M(\\\"ay\\\",e.ay+r),yt(t,r);else{if(a)return;var i,o;if(s)i=s.p2r(s.r2p(e.x)+t);else{var l=e._xsize/b.w,c=e.x+(e._xshift-e.xshift)/b.w-l/2;i=p.align(c+t/b.w,l,0,1,e.xanchor)}if(v)o=v.p2r(v.r2p(e.y)+r);else{var u=e._ysize/b.h,f=e.y-(e._yshift+e.yshift)/b.h-u/2;o=p.align(f-r/b.h,u,0,1,e.yanchor)}M(\\\"x\\\",i),M(\\\"y\\\",o),s&&v||(n=p.getCursor(s?.5:i,v?.5:o,e.xanchor,e.yanchor))}L.attr({transform:\\\"translate(\\\"+t+\\\",\\\"+r+\\\")\\\"+mt}),h(I,n)},doneFn:function(){h(I),i.call(\\\"relayout\\\",t,A());var e=document.querySelector(\\\".js-notes-box-panel\\\");e&&e.redraw(e.selectedObj)}})}else I.remove()}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\\\".annotation\\\").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&v(t,r);return a.previousPromises(t)},drawOne:v,drawRaw:m}},{\\\"../../lib\\\":696,\\\"../../lib/setcursor\\\":717,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"../fx\\\":612,\\\"./draw_arrow_head\\\":560,d3:148}],560:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../color\\\"),a=t(\\\"./arrow_paths\\\");e.exports=function(t,e,r){var o,s,l,c,u=t.node(),f=a[r.arrowhead||0],h=a[r.startarrowhead||0],p=(r.arrowwidth||1)*(r.arrowsize||1),d=(r.arrowwidth||1)*(r.startarrowsize||1),g=e.indexOf(\\\"start\\\")>=0,v=e.indexOf(\\\"end\\\")>=0,m=f.backoff*p+r.standoff,y=h.backoff*d+r.startstandoff;if(\\\"line\\\"===u.nodeName){o={x:+t.attr(\\\"x1\\\"),y:+t.attr(\\\"y1\\\")},s={x:+t.attr(\\\"x2\\\"),y:+t.attr(\\\"y2\\\")};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,m&&y&&m+y>Math.sqrt(x*x+b*b))return void z();if(m){if(m*m>x*x+b*b)return void z();var _=m*Math.cos(l),w=m*Math.sin(l);s.x+=_,s.y+=w,t.attr({x2:s.x,y2:s.y})}if(y){if(y*y>x*x+b*b)return void z();var k=y*Math.cos(l),M=y*Math.sin(l);o.x-=k,o.y-=M,t.attr({x1:o.x,y1:o.y})}}else if(\\\"path\\\"===u.nodeName){var A=u.getTotalLength(),T=\\\"\\\";if(A<m+y)return void z();var S=u.getPointAtLength(0),C=u.getPointAtLength(.1);l=Math.atan2(S.y-C.y,S.x-C.x),o=u.getPointAtLength(Math.min(y,A)),T=\\\"0px,\\\"+y+\\\"px,\\\";var E=u.getPointAtLength(A),L=u.getPointAtLength(A-.1);c=Math.atan2(E.y-L.y,E.x-L.x),s=u.getPointAtLength(Math.max(0,A-m)),T+=A-(T?y+m:m)+\\\"px,\\\"+A+\\\"px\\\",t.style(\\\"stroke-dasharray\\\",T)}function z(){t.style(\\\"stroke-dasharray\\\",\\\"0px,100px\\\")}function O(e,a,o,s){e.path&&(e.noRotate&&(o=0),n.select(u.parentNode).append(\\\"path\\\").attr({class:t.attr(\\\"class\\\"),d:e.path,transform:\\\"translate(\\\"+a.x+\\\",\\\"+a.y+\\\")\\\"+(o?\\\"rotate(\\\"+180*o/Math.PI+\\\")\\\":\\\"\\\")+\\\"scale(\\\"+s+\\\")\\\"}).style({fill:i.rgb(r.arrowcolor),\\\"stroke-width\\\":0}))}g&&O(h,o,l,d),v&&O(f,s,c,p)}},{\\\"../color\\\":570,\\\"./arrow_paths\\\":552,d3:148}],561:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./draw\\\"),i=t(\\\"./click\\\");e.exports={moduleType:\\\"component\\\",name:\\\"annotations\\\",layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),includeBasePlot:t(\\\"../../plots/cartesian/include_components\\\")(\\\"annotations\\\"),calcAutorange:t(\\\"./calc_autorange\\\"),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:t(\\\"./convert_coords\\\")}},{\\\"../../plots/cartesian/include_components\\\":756,\\\"./attributes\\\":553,\\\"./calc_autorange\\\":554,\\\"./click\\\":555,\\\"./convert_coords\\\":557,\\\"./defaults\\\":558,\\\"./draw\\\":559}],562:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../annotations/attributes\\\"),i=t(\\\"../../plot_api/edit_types\\\").overrideAll,a=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports=i(a(\\\"annotation\\\",{visible:n.visible,x:{valType:\\\"any\\\"},y:{valType:\\\"any\\\"},z:{valType:\\\"any\\\"},ax:{valType:\\\"number\\\"},ay:{valType:\\\"number\\\"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),\\\"calc\\\",\\\"from-root\\\")},{\\\"../../plot_api/edit_types\\\":728,\\\"../../plot_api/plot_template\\\":735,\\\"../annotations/attributes\\\":553}],563:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\");function a(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:\\\"linear\\\",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*a.h*(r.y[1]-r.y[0])}}e.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r<e.length;r++)a(e[r],t);t.fullLayout._infolayer.selectAll(\\\".annotation-\\\"+t.id).remove()}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],564:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../plots/array_container_defaults\\\"),o=t(\\\"../annotations/common_defaults\\\"),s=t(\\\"./attributes\\\");function l(t,e,r,a){function l(r,i){return n.coerce(t,e,s,r,i)}function c(t){var n=t+\\\"axis\\\",a={_fullLayout:{}};return a._fullLayout[n]=r[n],i.coercePosition(e,a,l,t,t,.5)}l(\\\"visible\\\")&&(o(t,e,a.fullLayout,l),c(\\\"x\\\"),c(\\\"y\\\"),c(\\\"z\\\"),n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\",\\\"z\\\"]),e.xref=\\\"x\\\",e.yref=\\\"y\\\",e.zref=\\\"z\\\",l(\\\"xanchor\\\"),l(\\\"yanchor\\\"),l(\\\"xshift\\\"),l(\\\"yshift\\\"),e.showarrow&&(e.axref=\\\"pixel\\\",e.ayref=\\\"pixel\\\",l(\\\"ax\\\",-10),l(\\\"ay\\\",-30),n.noneOrAll(t,e,[\\\"ax\\\",\\\"ay\\\"])))}e.exports=function(t,e,r){a(t,e,{name:\\\"annotations\\\",handleItemDefaults:l,fullLayout:r.fullLayout})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/cartesian/axes\\\":745,\\\"../annotations/common_defaults\\\":556,\\\"./attributes\\\":562}],565:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../annotations/draw\\\").drawRaw,i=t(\\\"../../plots/gl3d/project\\\"),a=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];e.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s<o.length;s++){for(var l=o[s],c=!1,u=0;u<3;u++){var f=a[u],h=l[f],p=e[f+\\\"axis\\\"].r2fraction(h);if(p<0||p>1){c=!0;break}}c?t.fullLayout._infolayer.select(\\\".annotation-\\\"+t.id+'[data-index=\\\"'+s+'\\\"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{\\\"../../plots/gl3d/project\\\":797,\\\"../annotations/draw\\\":559}],566:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\");e.exports={moduleType:\\\"component\\\",name:\\\"annotations3d\\\",schema:{subplots:{scene:{annotations:t(\\\"./attributes\\\")}}},layoutAttributes:t(\\\"./attributes\\\"),handleDefaults:t(\\\"./defaults\\\"),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(!r)return;for(var a=r.attrRegex,o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];a.test(l)&&(t[l].annotations||[]).length&&(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:t(\\\"./convert\\\"),draw:t(\\\"./draw\\\")}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":562,\\\"./convert\\\":563,\\\"./defaults\\\":564,\\\"./draw\\\":565}],567:[function(t,e,r){\\\"use strict\\\";e.exports=t(\\\"world-calendars/dist/main\\\"),t(\\\"world-calendars/dist/plus\\\"),t(\\\"world-calendars/dist/calendars/chinese\\\"),t(\\\"world-calendars/dist/calendars/coptic\\\"),t(\\\"world-calendars/dist/calendars/discworld\\\"),t(\\\"world-calendars/dist/calendars/ethiopian\\\"),t(\\\"world-calendars/dist/calendars/hebrew\\\"),t(\\\"world-calendars/dist/calendars/islamic\\\"),t(\\\"world-calendars/dist/calendars/julian\\\"),t(\\\"world-calendars/dist/calendars/mayan\\\"),t(\\\"world-calendars/dist/calendars/nanakshahi\\\"),t(\\\"world-calendars/dist/calendars/nepali\\\"),t(\\\"world-calendars/dist/calendars/persian\\\"),t(\\\"world-calendars/dist/calendars/taiwan\\\"),t(\\\"world-calendars/dist/calendars/thai\\\"),t(\\\"world-calendars/dist/calendars/ummalqura\\\")},{\\\"world-calendars/dist/calendars/chinese\\\":534,\\\"world-calendars/dist/calendars/coptic\\\":535,\\\"world-calendars/dist/calendars/discworld\\\":536,\\\"world-calendars/dist/calendars/ethiopian\\\":537,\\\"world-calendars/dist/calendars/hebrew\\\":538,\\\"world-calendars/dist/calendars/islamic\\\":539,\\\"world-calendars/dist/calendars/julian\\\":540,\\\"world-calendars/dist/calendars/mayan\\\":541,\\\"world-calendars/dist/calendars/nanakshahi\\\":542,\\\"world-calendars/dist/calendars/nepali\\\":543,\\\"world-calendars/dist/calendars/persian\\\":544,\\\"world-calendars/dist/calendars/taiwan\\\":545,\\\"world-calendars/dist/calendars/thai\\\":546,\\\"world-calendars/dist/calendars/ummalqura\\\":547,\\\"world-calendars/dist/main\\\":548,\\\"world-calendars/dist/plus\\\":549}],568:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./calendars\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\"),o=a.EPOCHJD,s=a.ONEDAY,l={valType:\\\"enumerated\\\",values:Object.keys(n.calendars),editType:\\\"calc\\\",dflt:\\\"gregorian\\\"},c=function(t,e,r,n){var a={};return a[r]=l,i.coerce(t,e,a,r,n)},u=\\\"##\\\",f={d:{0:\\\"dd\\\",\\\"-\\\":\\\"d\\\"},e:{0:\\\"d\\\",\\\"-\\\":\\\"d\\\"},a:{0:\\\"D\\\",\\\"-\\\":\\\"D\\\"},A:{0:\\\"DD\\\",\\\"-\\\":\\\"DD\\\"},j:{0:\\\"oo\\\",\\\"-\\\":\\\"o\\\"},W:{0:\\\"ww\\\",\\\"-\\\":\\\"w\\\"},m:{0:\\\"mm\\\",\\\"-\\\":\\\"m\\\"},b:{0:\\\"M\\\",\\\"-\\\":\\\"M\\\"},B:{0:\\\"MM\\\",\\\"-\\\":\\\"MM\\\"},y:{0:\\\"yy\\\",\\\"-\\\":\\\"yy\\\"},Y:{0:\\\"yyyy\\\",\\\"-\\\":\\\"yyyy\\\"},U:u,w:u,c:{0:\\\"D M d %X yyyy\\\",\\\"-\\\":\\\"D M d %X yyyy\\\"},x:{0:\\\"mm/dd/yyyy\\\",\\\"-\\\":\\\"mm/dd/yyyy\\\"}};var h={};function p(t){var e=h[t];return e||(e=h[t]=n.instance(t))}function d(t){return i.extendFlat({},l,{description:t})}function g(t){return\\\"Sets the calendar system to use with `\\\"+t+\\\"` date data.\\\"}var v={xcalendar:d(g(\\\"x\\\"))},m=i.extendFlat({},v,{ycalendar:d(g(\\\"y\\\"))}),y=i.extendFlat({},m,{zcalendar:d(g(\\\"z\\\"))}),x=d([\\\"Sets the calendar system to use for `range` and `tick0`\\\",\\\"if this is a date axis. This does not set the calendar for\\\",\\\"interpreting data on this axis, that's specified in the trace\\\",\\\"or via the global `layout.calendar`\\\"].join(\\\" \\\"));e.exports={moduleType:\\\"component\\\",name:\\\"calendars\\\",schema:{traces:{scatter:m,bar:m,box:m,heatmap:m,contour:m,histogram:m,histogram2d:m,histogram2dcontour:m,scatter3d:y,surface:y,mesh3d:y,scattergl:m,ohlc:v,candlestick:v},layout:{calendar:d([\\\"Sets the default calendar system to use for interpreting and\\\",\\\"displaying dates throughout the plot.\\\"].join(\\\" \\\"))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:d([\\\"Sets the calendar system to use for `value`, if it is a date.\\\"].join(\\\" \\\")),targetcalendar:d([\\\"Sets the calendar system to use for `target`, if it is an\\\",\\\"array of dates. If `target` is a string (eg *x*) we use the\\\",\\\"corresponding trace attribute (eg `xcalendar`) if it exists,\\\",\\\"even if `targetcalendar` is provided.\\\"].join(\\\" \\\"))}}},layoutAttributes:l,handleDefaults:c,handleTraceDefaults:function(t,e,r,n){for(var i=0;i<r.length;i++)c(t,e,r[i]+\\\"calendar\\\",n.calendar)},CANONICAL_SUNDAY:{chinese:\\\"2000-01-02\\\",coptic:\\\"2000-01-03\\\",discworld:\\\"2000-01-03\\\",ethiopian:\\\"2000-01-05\\\",hebrew:\\\"5000-01-01\\\",islamic:\\\"1000-01-02\\\",julian:\\\"2000-01-03\\\",mayan:\\\"5000-01-01\\\",nanakshahi:\\\"1000-01-05\\\",nepali:\\\"2000-01-05\\\",persian:\\\"1000-01-01\\\",jalali:\\\"1000-01-01\\\",taiwan:\\\"1000-01-04\\\",thai:\\\"2000-01-04\\\",ummalqura:\\\"1400-01-06\\\"},CANONICAL_TICK:{chinese:\\\"2000-01-01\\\",coptic:\\\"2000-01-01\\\",discworld:\\\"2000-01-01\\\",ethiopian:\\\"2000-01-01\\\",hebrew:\\\"5000-01-01\\\",islamic:\\\"1000-01-01\\\",julian:\\\"2000-01-01\\\",mayan:\\\"5000-01-01\\\",nanakshahi:\\\"1000-01-01\\\",nepali:\\\"2000-01-01\\\",persian:\\\"1000-01-01\\\",jalali:\\\"1000-01-01\\\",taiwan:\\\"1000-01-01\\\",thai:\\\"2000-01-01\\\",ummalqura:\\\"1400-01-01\\\"},DFLTRANGE:{chinese:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"],coptic:[\\\"1700-01-01\\\",\\\"1701-01-01\\\"],discworld:[\\\"1800-01-01\\\",\\\"1801-01-01\\\"],ethiopian:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"],hebrew:[\\\"5700-01-01\\\",\\\"5701-01-01\\\"],islamic:[\\\"1400-01-01\\\",\\\"1401-01-01\\\"],julian:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"],mayan:[\\\"5200-01-01\\\",\\\"5201-01-01\\\"],nanakshahi:[\\\"0500-01-01\\\",\\\"0501-01-01\\\"],nepali:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"],persian:[\\\"1400-01-01\\\",\\\"1401-01-01\\\"],jalali:[\\\"1400-01-01\\\",\\\"1401-01-01\\\"],taiwan:[\\\"0100-01-01\\\",\\\"0101-01-01\\\"],thai:[\\\"2500-01-01\\\",\\\"2501-01-01\\\"],ummalqura:[\\\"1400-01-01\\\",\\\"1401-01-01\\\"]},getCal:p,worldCalFmt:function(t,e,r){for(var n,i,a,l,c,h=Math.floor((e+.05)/s)+o,d=p(r).fromJD(h),g=0;-1!==(g=t.indexOf(\\\"%\\\",g));)\\\"0\\\"===(n=t.charAt(g+1))||\\\"-\\\"===n||\\\"_\\\"===n?(a=3,i=t.charAt(g+2),\\\"_\\\"===n&&(n=\\\"-\\\")):(i=n,n=\\\"0\\\",a=2),(l=f[i])?(c=l===u?u:d.formatDate(l[n]),t=t.substr(0,g)+c+t.substr(g+a),g+=c.length):g+=a;return t}}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"./calendars\\\":567}],569:[function(t,e,r){\\\"use strict\\\";r.defaults=[\\\"#1f77b4\\\",\\\"#ff7f0e\\\",\\\"#2ca02c\\\",\\\"#d62728\\\",\\\"#9467bd\\\",\\\"#8c564b\\\",\\\"#e377c2\\\",\\\"#7f7f7f\\\",\\\"#bcbd22\\\",\\\"#17becf\\\"],r.defaultLine=\\\"#444\\\",r.lightLine=\\\"#eee\\\",r.background=\\\"#fff\\\",r.borderLine=\\\"#BEC8D9\\\",r.lightFraction=1e3/11},{}],570:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"tinycolor2\\\"),i=t(\\\"fast-isnumeric\\\"),a=e.exports={},o=t(\\\"./attributes\\\");a.defaults=o.defaults;var s=a.defaultLine=o.defaultLine;a.lightLine=o.lightLine;var l=a.background=o.background;function c(t){if(i(t)||\\\"string\\\"!=typeof t)return t;var e=t.trim();if(\\\"rgb\\\"!==e.substr(0,3))return t;var r=e.match(/^rgba?\\\\s*\\\\(([^()]*)\\\\)$/);if(!r)return t;var n=r[1].trim().split(/\\\\s*[\\\\s,]\\\\s*/),a=\\\"a\\\"===e.charAt(3)&&4===n.length;if(!a&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+\\\", \\\"+Math.round(255*n[1])+\\\", \\\"+Math.round(255*n[2]);return a?\\\"rgba(\\\"+s+\\\", \\\"+n[3]+\\\")\\\":\\\"rgb(\\\"+s+\\\")\\\"}a.tinyRGB=function(t){var e=t.toRgb();return\\\"rgb(\\\"+Math.round(e.r)+\\\", \\\"+Math.round(e.g)+\\\", \\\"+Math.round(e.b)+\\\")\\\"},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return\\\"rgba(\\\"+Math.round(r.r)+\\\", \\\"+Math.round(r.g)+\\\", \\\"+Math.round(r.b)+\\\", \\\"+e+\\\")\\\"},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||l).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(a.combine(t,l))),(i.isDark()?e?i.lighten(e):l:r?i.darken(r):s).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),\\\"stroke-opacity\\\":r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),\\\"fill-opacity\\\":r.getAlpha()})},a.clean=function(t){if(t&&\\\"object\\\"==typeof t){var e,r,n,i,o=Object.keys(t);for(e=0;e<o.length;e++)if(i=t[n=o[e]],\\\"color\\\"===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]=c(i[r]);else t[n]=c(i);else if(\\\"colorscale\\\"===n.substr(n.length-10)&&Array.isArray(i))for(r=0;r<i.length;r++)Array.isArray(i[r])&&(i[r][1]=c(i[r][1]));else if(Array.isArray(i)){var s=i[0];if(!Array.isArray(s)&&s&&\\\"object\\\"==typeof s)for(r=0;r<i.length;r++)a.clean(i[r])}else i&&\\\"object\\\"==typeof i&&a.clean(i)}}},{\\\"./attributes\\\":569,\\\"fast-isnumeric\\\":214,tinycolor2:514}],571:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/layout_attributes\\\"),i=t(\\\"../../plots/font_attributes\\\"),a=t(\\\"../../lib/extend\\\").extendFlat,o=t(\\\"../../plot_api/edit_types\\\").overrideAll;e.exports=o({thicknessmode:{valType:\\\"enumerated\\\",values:[\\\"fraction\\\",\\\"pixels\\\"],dflt:\\\"pixels\\\"},thickness:{valType:\\\"number\\\",min:0,dflt:30},lenmode:{valType:\\\"enumerated\\\",values:[\\\"fraction\\\",\\\"pixels\\\"],dflt:\\\"fraction\\\"},len:{valType:\\\"number\\\",min:0,dflt:1},x:{valType:\\\"number\\\",dflt:1.02,min:-2,max:3},xanchor:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\"},xpad:{valType:\\\"number\\\",min:0,dflt:10},y:{valType:\\\"number\\\",dflt:.5,min:-2,max:3},yanchor:{valType:\\\"enumerated\\\",values:[\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"middle\\\"},ypad:{valType:\\\"number\\\",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:\\\"number\\\",min:0,dflt:0},bgcolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\"},tickmode:n.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:\\\"\\\"}),ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,showexponent:n.showexponent,title:{valType:\\\"string\\\"},titlefont:i({}),titleside:{valType:\\\"enumerated\\\",values:[\\\"right\\\",\\\"top\\\",\\\"bottom\\\"],dflt:\\\"top\\\"}},\\\"colorbars\\\",\\\"from-root\\\")},{\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/cartesian/layout_attributes\\\":758,\\\"../../plots/font_attributes\\\":772}],572:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./draw\\\");e.exports=function(t,e,r){if(\\\"function\\\"==typeof r)return r(t,e);var i=e[0].trace,a=\\\"cb\\\"+i.uid,o=r.container,s=o?i[o]:i;(t._fullLayout._infolayer.selectAll(\\\".\\\"+a).remove(),s&&s.showscale)&&(e[0].t.cb=n(t,a)).fillgradient(s.colorscale).zrange([s[r.min],s[r.max]]).options(s.colorbar)()}},{\\\"./draw\\\":575}],573:[function(t,e,r){\\\"use strict\\\";e.exports={cn:{colorbar:\\\"colorbar\\\",cbbg:\\\"cbbg\\\",cbfill:\\\"cbfill\\\",cbfills:\\\"cbfills\\\",cbline:\\\"cbline\\\",cblines:\\\"cblines\\\",cbaxis:\\\"cbaxis\\\",cbtitleunshift:\\\"cbtitleunshift\\\",cbtitle:\\\"cbtitle\\\",cboutline:\\\"cboutline\\\",crisp:\\\"crisp\\\",jsPlaceholder:\\\"js-placeholder\\\"}}},{}],574:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plot_api/plot_template\\\"),a=t(\\\"../../plots/cartesian/tick_value_defaults\\\"),o=t(\\\"../../plots/cartesian/tick_mark_defaults\\\"),s=t(\\\"../../plots/cartesian/tick_label_defaults\\\"),l=t(\\\"./attributes\\\");e.exports=function(t,e,r){var c=i.newContainer(e,\\\"colorbar\\\"),u=t.colorbar||{};function f(t,e){return n.coerce(u,c,l,t,e)}var h=f(\\\"thicknessmode\\\");f(\\\"thickness\\\",\\\"fraction\\\"===h?30/(r.width-r.margin.l-r.margin.r):30);var p=f(\\\"lenmode\\\");f(\\\"len\\\",\\\"fraction\\\"===p?1:r.height-r.margin.t-r.margin.b),f(\\\"x\\\"),f(\\\"xanchor\\\"),f(\\\"xpad\\\"),f(\\\"y\\\"),f(\\\"yanchor\\\"),f(\\\"ypad\\\"),n.noneOrAll(u,c,[\\\"x\\\",\\\"y\\\"]),f(\\\"outlinecolor\\\"),f(\\\"outlinewidth\\\"),f(\\\"bordercolor\\\"),f(\\\"borderwidth\\\"),f(\\\"bgcolor\\\"),a(u,c,f,\\\"linear\\\");var d={outerTicks:!1,font:r.font};s(u,c,f,\\\"linear\\\",d),o(u,c,f,\\\"linear\\\",d),f(\\\"title\\\",r._dfltTitle.colorbar),n.coerceFont(f,\\\"titlefont\\\",r.font),f(\\\"titleside\\\")}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/tick_label_defaults\\\":765,\\\"../../plots/cartesian/tick_mark_defaults\\\":766,\\\"../../plots/cartesian/tick_value_defaults\\\":767,\\\"./attributes\\\":571}],575:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../plots/cartesian/axes\\\"),l=t(\\\"../dragelement\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../lib/extend\\\").extendFlat,f=t(\\\"../../lib/setcursor\\\"),h=t(\\\"../drawing\\\"),p=t(\\\"../color\\\"),d=t(\\\"../titles\\\"),g=t(\\\"../../lib/svg_text_utils\\\"),v=t(\\\"../../constants/alignment\\\"),m=v.LINE_SPACING,y=v.FROM_TL,x=v.FROM_BR,b=t(\\\"../../plots/cartesian/axis_defaults\\\"),_=t(\\\"../../plots/cartesian/position_defaults\\\"),w=t(\\\"../../plots/cartesian/layout_attributes\\\"),k=t(\\\"./attributes\\\"),M=t(\\\"./constants\\\").cn;e.exports=function(t,e){var r={};for(var v in k)r[v]=null;function A(){var v=t._fullLayout,k=v._size;if(\\\"function\\\"==typeof r.fillcolor||\\\"function\\\"==typeof r.line.color||r.fillgradient){var S,C,E=r.zrange||n.extent((\\\"function\\\"==typeof r.fillcolor?r.fillcolor:r.line.color).domain()),L=[],z=[],O=\\\"function\\\"==typeof r.line.color?r.line.color:function(){return r.line.color},I=\\\"function\\\"==typeof r.fillcolor?r.fillcolor:function(){return r.fillcolor},P=r.levels.end+r.levels.size/100,D=r.levels.size,R=1.001*E[0]-.001*E[1],B=1.001*E[1]-.001*E[0];for(C=0;C<1e5&&(S=r.levels.start+C*D,!(D>0?S>=P:S<=P));C++)S>R&&S<B&&L.push(S);if(r.fillgradient)z=[0];else if(\\\"function\\\"==typeof r.fillcolor)if(r.filllevels)for(P=r.filllevels.end+r.filllevels.size/100,D=r.filllevels.size,C=0;C<1e5&&(S=r.filllevels.start+C*D,!(D>0?S>=P:S<=P));C++)S>E[0]&&S<E[1]&&z.push(S);else(z=L.map(function(t){return t-r.levels.size/2})).push(z[z.length-1]+r.levels.size);else r.fillcolor&&\\\"string\\\"==typeof r.fillcolor&&(z=[0]);r.levels.size<0&&(L.reverse(),z.reverse());var F,N=k.h,j=k.w,V=Math.round(r.thickness*(\\\"fraction\\\"===r.thicknessmode?j:1)),U=V/k.w,q=Math.round(r.len*(\\\"fraction\\\"===r.lenmode?N:1)),H=q/k.h,G=r.xpad/k.w,W=(r.borderwidth+r.outlinewidth)/2,Y=r.ypad/k.h,X=Math.round(r.x*k.w+r.xpad),Z=r.x-U*({middle:.5,right:1}[r.xanchor]||0),$=r.y+H*(({top:-.5,bottom:.5}[r.yanchor]||0)-.5),J=Math.round(k.h*(1-$)),K=J-q,Q={type:\\\"linear\\\",range:E,tickmode:r.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:r.ticks,ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,showticklabels:r.showticklabels,tickfont:r.tickfont,tickangle:r.tickangle,tickformat:r.tickformat,exponentformat:r.exponentformat,separatethousands:r.separatethousands,showexponent:r.showexponent,showtickprefix:r.showtickprefix,tickprefix:r.tickprefix,showticksuffix:r.showticksuffix,ticksuffix:r.ticksuffix,title:r.title,titlefont:r.titlefont,showline:!0,anchor:\\\"free\\\",position:1},tt={type:\\\"linear\\\",_id:\\\"y\\\"+e},et={letter:\\\"y\\\",font:v.font,noHover:!0,calendar:v.calendar};if(b(Q,tt,vt,et,v),_(Q,tt,vt,et),tt.position=r.x+G+U,A.axis=tt,-1!==[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)&&(tt.titleside=r.titleside,tt.titlex=r.x+G,tt.titley=$+(\\\"top\\\"===r.titleside?H-Y:Y)),r.line.color&&\\\"auto\\\"===r.tickmode){tt.tickmode=\\\"linear\\\",tt.tick0=r.levels.start;var rt=r.levels.size,nt=c.constrain((J-K)/50,4,15)+1,it=(E[1]-E[0])/((r.nticks||nt)*rt);if(it>1){var at=Math.pow(10,Math.floor(Math.log(it)/Math.LN10));rt*=at*c.roundUp(it/at,[2,5,10]),(Math.abs(r.levels.start)/r.levels.size+1e-6)%1<2e-6&&(tt.tick0=0)}tt.dtick=rt}tt.domain=[$+Y,$+H-Y],tt.setScale();var ot=c.ensureSingle(v._infolayer,\\\"g\\\",e,function(t){t.classed(M.colorbar,!0).each(function(){var t=n.select(this);t.append(\\\"rect\\\").classed(M.cbbg,!0),t.append(\\\"g\\\").classed(M.cbfills,!0),t.append(\\\"g\\\").classed(M.cblines,!0),t.append(\\\"g\\\").classed(M.cbaxis,!0).classed(M.crisp,!0),t.append(\\\"g\\\").classed(M.cbtitleunshift,!0).append(\\\"g\\\").classed(M.cbtitle,!0),t.append(\\\"rect\\\").classed(M.cboutline,!0),t.select(\\\".cbtitle\\\").datum(0)})});ot.attr(\\\"transform\\\",\\\"translate(\\\"+Math.round(k.l)+\\\",\\\"+Math.round(k.t)+\\\")\\\");var st=ot.select(\\\".cbtitleunshift\\\").attr(\\\"transform\\\",\\\"translate(-\\\"+Math.round(k.l)+\\\",-\\\"+Math.round(k.t)+\\\")\\\");tt._axislayer=ot.select(\\\".cbaxis\\\");var lt=0;if(-1!==[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)){var ct,ut=k.l+(r.x+G)*k.w,ft=tt.titlefont.size;ct=\\\"top\\\"===r.titleside?(1-($+H-Y))*k.h+k.t+3+.75*ft:(1-($+Y))*k.h+k.t-3-.25*ft,mt(tt._id+\\\"title\\\",{attributes:{x:ut,y:ct,\\\"text-anchor\\\":\\\"start\\\"}})}var ht,pt,dt,gt=c.syncOrAsync([a.previousPromises,function(){if(-1!==[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)){var a=ot.select(\\\".cbtitle\\\"),o=a.select(\\\"text\\\"),l=[-r.outlinewidth/2,r.outlinewidth/2],u=a.select(\\\".h\\\"+tt._id+\\\"title-math-group\\\").node(),f=15.6;if(o.node()&&(f=parseInt(o.node().style.fontSize,10)*m),u?(lt=h.bBox(u).height)>f&&(l[1]-=(lt-f)/2):o.node()&&!o.classed(M.jsPlaceholder)&&(lt=h.bBox(o.node()).height),lt){if(lt+=5,\\\"top\\\"===r.titleside)tt.domain[1]-=lt/k.h,l[1]*=-1;else{tt.domain[0]+=lt/k.h;var p=g.lineCount(o);l[1]+=(1-p)*f}a.attr(\\\"transform\\\",\\\"translate(\\\"+l+\\\")\\\"),tt.setScale()}}ot.selectAll(\\\".cbfills,.cblines\\\").attr(\\\"transform\\\",\\\"translate(0,\\\"+Math.round(k.h*(1-tt.domain[1]))+\\\")\\\"),tt._axislayer.attr(\\\"transform\\\",\\\"translate(0,\\\"+Math.round(-k.t)+\\\")\\\");var d=ot.select(\\\".cbfills\\\").selectAll(\\\"rect.cbfill\\\").data(z);d.enter().append(\\\"rect\\\").classed(M.cbfill,!0).style(\\\"stroke\\\",\\\"none\\\"),d.exit().remove();var y=E.map(tt.c2p).map(Math.round).sort(function(t,e){return t-e});d.each(function(a,o){var s=[0===o?E[0]:(z[o]+z[o-1])/2,o===z.length-1?E[1]:(z[o]+z[o+1])/2].map(tt.c2p).map(Math.round);s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,y[0],y[1]);var l=n.select(this).attr({x:X,width:Math.max(V,2),y:n.min(s),height:Math.max(n.max(s)-n.min(s),2)});if(r.fillgradient)h.gradient(l,t,e,\\\"vertical\\\",r.fillgradient,\\\"fill\\\");else{var u=I(a).replace(\\\"e-\\\",\\\"\\\");l.attr(\\\"fill\\\",i(u).toHexString())}});var x=ot.select(\\\".cblines\\\").selectAll(\\\"path.cbline\\\").data(r.line.color&&r.line.width?L:[]);return x.enter().append(\\\"path\\\").classed(M.cbline,!0),x.exit().remove(),x.each(function(t){n.select(this).attr(\\\"d\\\",\\\"M\\\"+X+\\\",\\\"+(Math.round(tt.c2p(t))+r.line.width/2%1)+\\\"h\\\"+V).call(h.lineGroupStyle,r.line.width,O(t),r.line.dash)}),tt._axislayer.selectAll(\\\"g.\\\"+tt._id+\\\"tick,path\\\").remove(),tt._pos=X+V+(r.outlinewidth||0)/2-(\\\"outside\\\"===r.ticks?1:0),tt.side=\\\"right\\\",c.syncOrAsync([function(){return s.doTicksSingle(t,tt,!0)},function(){if(-1===[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)){var e=tt.titlefont.size,i=tt._offset+tt._length/2,a=k.l+(tt.position||0)*k.w+(\\\"right\\\"===tt.side?10+e*(tt.showticklabels?1:.5):-10-e*(tt.showticklabels?.5:0));mt(\\\"h\\\"+tt._id+\\\"title\\\",{avoid:{selection:n.select(t).selectAll(\\\"g.\\\"+tt._id+\\\"tick\\\"),side:r.titleside,offsetLeft:k.l,offsetTop:0,maxShift:v.width},attributes:{x:a,y:i,\\\"text-anchor\\\":\\\"middle\\\"},transform:{rotate:\\\"-90\\\",offset:0}})}}])},a.previousPromises,function(){var n=V+r.outlinewidth/2+h.bBox(tt._axislayer.node()).width;if((F=st.select(\\\"text\\\")).node()&&!F.classed(M.jsPlaceholder)){var i,o=st.select(\\\".h\\\"+tt._id+\\\"title-math-group\\\").node();i=o&&-1!==[\\\"top\\\",\\\"bottom\\\"].indexOf(r.titleside)?h.bBox(o).width:h.bBox(st.node()).right-X-k.l,n=Math.max(n,i)}var s=2*r.xpad+n+r.borderwidth+r.outlinewidth/2,l=J-K;ot.select(\\\".cbbg\\\").attr({x:X-r.xpad-(r.borderwidth+r.outlinewidth)/2,y:K-W,width:Math.max(s,2),height:Math.max(l+2*W,2)}).call(p.fill,r.bgcolor).call(p.stroke,r.bordercolor).style({\\\"stroke-width\\\":r.borderwidth}),ot.selectAll(\\\".cboutline\\\").attr({x:X,y:K+r.ypad+(\\\"top\\\"===r.titleside?lt:0),width:Math.max(V,2),height:Math.max(l-2*r.ypad-lt,2)}).call(p.stroke,r.outlinecolor).style({fill:\\\"None\\\",\\\"stroke-width\\\":r.outlinewidth});var c=({center:.5,right:1}[r.xanchor]||0)*s;ot.attr(\\\"transform\\\",\\\"translate(\\\"+(k.l-c)+\\\",\\\"+k.t+\\\")\\\");var u={},f=y[r.yanchor],d=x[r.yanchor];\\\"pixels\\\"===r.lenmode?(u.y=r.y,u.t=l*f,u.b=l*d):(u.t=u.b=0,u.yt=r.y+r.len*f,u.yb=r.y-r.len*d);var g=y[r.xanchor],v=x[r.xanchor];if(\\\"pixels\\\"===r.thicknessmode)u.x=r.x,u.l=s*g,u.r=s*v;else{var m=s-V;u.l=m*g,u.r=m*v,u.xl=r.x-r.thickness*g,u.xr=r.x+r.thickness*v}a.autoMargin(t,e,u)}],t);if(gt&&gt.then&&(t._promises||[]).push(gt),t._context.edits.colorbarPosition)l.init({element:ot.node(),gd:t,prepFn:function(){ht=ot.attr(\\\"transform\\\"),f(ot)},moveFn:function(t,e){ot.attr(\\\"transform\\\",ht+\\\" translate(\\\"+t+\\\",\\\"+e+\\\")\\\"),pt=l.align(Z+t/k.w,U,0,1,r.xanchor),dt=l.align($-e/k.h,H,0,1,r.yanchor);var n=l.getCursor(pt,dt,r.xanchor,r.yanchor);f(ot,n)},doneFn:function(){f(ot),void 0!==pt&&void 0!==dt&&o.call(\\\"restyle\\\",t,{\\\"colorbar.x\\\":pt,\\\"colorbar.y\\\":dt},T().index)}});return gt}function vt(t,e){return c.coerce(Q,tt,w,t,e)}function mt(e,r){var n=T(),i=\\\"colorbar.title\\\",a=n._module.colorbar.container;a&&(i=a+\\\".\\\"+i);var o={propContainer:tt,propName:i,traceIndex:n.index,placeholder:v._dfltTitle.colorbar,containerGroup:ot.select(\\\".cbtitle\\\")},s=\\\"h\\\"===e.charAt(0)?e.substr(1):\\\"h\\\"+e;ot.selectAll(\\\".\\\"+s+\\\",.\\\"+s+\\\"-math-group\\\").remove(),d.draw(t,e,u(o,r||{}))}v._infolayer.selectAll(\\\"g.\\\"+e).remove()}function T(){var r,n,i=e.substr(2);for(r=0;r<t._fullData.length;r++)if((n=t._fullData[r]).uid===i)return n}return r.fillcolor=null,r.line={color:null,width:null,dash:null},r.levels={start:null,end:null,size:null},r.filllevels=null,r.fillgradient=null,r.zrange=null,Object.keys(r).forEach(function(t){A[t]=function(e){return arguments.length?(r[t]=c.isPlainObject(r[t])?c.extendFlat(r[t],e):e,A):r[t]}}),A.options=function(t){for(var e in t)\\\"function\\\"==typeof A[e]&&A[e](t[e]);return A},A._opts=r,A}},{\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/extend\\\":685,\\\"../../lib/setcursor\\\":717,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/cartesian/axis_defaults\\\":747,\\\"../../plots/cartesian/layout_attributes\\\":758,\\\"../../plots/cartesian/position_defaults\\\":761,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"../titles\\\":661,\\\"./attributes\\\":571,\\\"./constants\\\":573,d3:148,tinycolor2:514}],576:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\\\"../../lib\\\":696}],577:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scales.js\\\");Object.keys(n);function i(t){return\\\"`\\\"+t+\\\"`\\\"}e.exports=function(t,e){t=t||\\\"\\\";var r,a=(e=e||{}).cLetter||\\\"c\\\",o=(\\\"onlyIfNumerical\\\"in e?e.onlyIfNumerical:Boolean(t),\\\"noScale\\\"in e?e.noScale:\\\"marker.line\\\"===t),s=\\\"showScaleDflt\\\"in e?e.showScaleDflt:\\\"z\\\"===a,l=\\\"string\\\"==typeof e.colorscaleDflt?n[e.colorscaleDflt]:null,c=e.editTypeOverride||\\\"\\\",u=t?t+\\\".\\\":\\\"\\\";\\\"colorAttr\\\"in e?(r=e.colorAttr,e.colorAttr):i(u+(r={z:\\\"z\\\",c:\\\"color\\\"}[a]));var f=a+\\\"auto\\\",h=a+\\\"min\\\",p=a+\\\"max\\\",d=(i(u+h),i(u+p),{});d[h]=d[p]=void 0;var g={};g[f]=!1;var v={};return\\\"color\\\"===r&&(v.color={valType:\\\"color\\\",arrayOk:!0,editType:c||\\\"style\\\"}),v[f]={valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\",impliedEdits:d},v[h]={valType:\\\"number\\\",dflt:null,editType:c||\\\"plot\\\",impliedEdits:g},v[p]={valType:\\\"number\\\",dflt:null,editType:c||\\\"plot\\\",impliedEdits:g},v.colorscale={valType:\\\"colorscale\\\",editType:\\\"calc\\\",dflt:l,impliedEdits:{autocolorscale:!1}},v.autocolorscale={valType:\\\"boolean\\\",dflt:!1!==e.autoColorDflt,editType:\\\"calc\\\",impliedEdits:{colorscale:void 0}},v.reversescale={valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},o||(v.showscale={valType:\\\"boolean\\\",dflt:s,editType:\\\"calc\\\"}),v}},{\\\"./scales.js\\\":589}],578:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./scales\\\"),a=t(\\\"./flip_scale\\\");e.exports=function(t,e,r,o){var s=t,l=t._input,c=t._fullInput,u=t.updateStyle;function f(e,n,i){void 0===i&&(i=n),u?u(t._input,r?r+\\\".\\\"+e:e,n):l[e]=n,s[e]=i,c&&t!==t._fullInput&&(u?u(t._fullInput,r?r+\\\".\\\"+e:e,i):c[e]=i)}r&&(s=n.nestedProperty(s,r).get(),l=n.nestedProperty(l,r).get(),c=n.nestedProperty(c,r).get()||{});var h=o+\\\"auto\\\",p=o+\\\"min\\\",d=o+\\\"max\\\",g=s[h],v=s[p],m=s[d],y=s.colorscale;!1===g&&void 0!==v||(v=n.aggNums(Math.min,null,e)),!1===g&&void 0!==m||(m=n.aggNums(Math.max,null,e)),v===m&&(v-=.5,m+=.5),f(p,v),f(d,m),f(h,!1!==g||void 0===v&&void 0===m),s.autocolorscale&&(f(\\\"colorscale\\\",y=v*m<0?i.RdBu:v>=0?i.Reds:i.Blues,s.reversescale?a(y):y),l.autocolorscale||f(\\\"autocolorscale\\\",!1))}},{\\\"../../lib\\\":696,\\\"./flip_scale\\\":582,\\\"./scales\\\":589}],579:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scales\\\");e.exports=n.RdBu},{\\\"./scales\\\":589}],580:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../colorbar/has_colorbar\\\"),o=t(\\\"../colorbar/defaults\\\"),s=t(\\\"./is_valid_scale\\\"),l=t(\\\"./flip_scale\\\");e.exports=function(t,e,r,c,u){var f,h=u.prefix,p=u.cLetter,d=h.slice(0,h.length-1),g=h?i.nestedProperty(t,d).get()||{}:t,v=h?i.nestedProperty(e,d).get()||{}:e,m=g[p+\\\"min\\\"],y=g[p+\\\"max\\\"],x=g.colorscale;c(h+p+\\\"auto\\\",!(n(m)&&n(y)&&m<y)),c(h+p+\\\"min\\\"),c(h+p+\\\"max\\\"),void 0!==x&&(f=!s(x)),c(h+\\\"autocolorscale\\\",f);var b,_=c(h+\\\"colorscale\\\");(c(h+\\\"reversescale\\\")&&(v.colorscale=l(_)),\\\"marker.line.\\\"!==h)&&(u.noScale||(h&&(b=a(g)),c(h+\\\"showscale\\\",b)&&o(g,v,r)))}},{\\\"../../lib\\\":696,\\\"../colorbar/defaults\\\":574,\\\"../colorbar/has_colorbar\\\":576,\\\"./flip_scale\\\":582,\\\"./is_valid_scale\\\":586,\\\"fast-isnumeric\\\":214}],581:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){for(var n=t.length,i=new Array(n),a=new Array(n),o=0;o<n;o++){var s=t[o];i[o]=e+s[0]*(r-e),a[o]=s[1]}return{domain:i,range:a}}},{}],582:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e,r=t.length,n=new Array(r),i=r-1,a=0;i>=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],583:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scales\\\"),i=t(\\\"./default_scale\\\"),a=t(\\\"./is_valid_scale_array\\\");e.exports=function(t,e){if(e||(e=i),!t)return e;function r(){try{t=n[t]||JSON.parse(t)}catch(r){t=e}}return\\\"string\\\"==typeof t&&(r(),\\\"string\\\"==typeof t&&r()),a(t)?t:e}},{\\\"./default_scale\\\":579,\\\"./is_valid_scale_array\\\":587,\\\"./scales\\\":589}],584:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"./is_valid_scale\\\");e.exports=function(t,e){var r=e?i.nestedProperty(t,e).get()||{}:t,o=r.color,s=!1;if(i.isArrayOrTypedArray(o))for(var l=0;l<o.length;l++)if(n(o[l])){s=!0;break}return i.isPlainObject(r)&&(s||!0===r.showscale||n(r.cmin)&&n(r.cmax)||a(r.colorscale)||i.isPlainObject(r.colorbar))}},{\\\"../../lib\\\":696,\\\"./is_valid_scale\\\":586,\\\"fast-isnumeric\\\":214}],585:[function(t,e,r){\\\"use strict\\\";r.scales=t(\\\"./scales\\\"),r.defaultScale=t(\\\"./default_scale\\\"),r.attributes=t(\\\"./attributes\\\"),r.handleDefaults=t(\\\"./defaults\\\"),r.calc=t(\\\"./calc\\\"),r.hasColorscale=t(\\\"./has_colorscale\\\"),r.isValidScale=t(\\\"./is_valid_scale\\\"),r.getScale=t(\\\"./get_scale\\\"),r.flipScale=t(\\\"./flip_scale\\\"),r.extractScale=t(\\\"./extract_scale\\\"),r.makeColorScaleFunc=t(\\\"./make_color_scale_func\\\")},{\\\"./attributes\\\":577,\\\"./calc\\\":578,\\\"./default_scale\\\":579,\\\"./defaults\\\":580,\\\"./extract_scale\\\":581,\\\"./flip_scale\\\":582,\\\"./get_scale\\\":583,\\\"./has_colorscale\\\":584,\\\"./is_valid_scale\\\":586,\\\"./make_color_scale_func\\\":588,\\\"./scales\\\":589}],586:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./scales\\\"),i=t(\\\"./is_valid_scale_array\\\");e.exports=function(t){return void 0!==n[t]||i(t)}},{\\\"./is_valid_scale_array\\\":587,\\\"./scales\\\":589}],587:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"tinycolor2\\\");e.exports=function(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var i=t[r];if(2!==i.length||+i[0]<e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}},{tinycolor2:514}],588:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"fast-isnumeric\\\"),o=t(\\\"../color\\\");function s(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return i(e).toRgbString()}e.exports=function(t,e){e=e||{};for(var r=t.domain,l=t.range,c=l.length,u=new Array(c),f=0;f<c;f++){var h=i(l[f]).toRgb();u[f]=[h.r,h.g,h.b,h.a]}var p,d=n.scale.linear().domain(r).range(u).clamp(!0),g=e.noNumericCheck,v=e.returnArray;return(p=g&&v?d:g?function(t){return s(d(t))}:v?function(t){return a(t)?d(t):i(t).isValid()?t:o.defaultLine}:function(t){return a(t)?s(d(t)):i(t).isValid()?t:o.defaultLine}).domain=d.domain,p.range=function(){return l},p}},{\\\"../color\\\":570,d3:148,\\\"fast-isnumeric\\\":214,tinycolor2:514}],589:[function(t,e,r){\\\"use strict\\\";e.exports={Greys:[[0,\\\"rgb(0,0,0)\\\"],[1,\\\"rgb(255,255,255)\\\"]],YlGnBu:[[0,\\\"rgb(8,29,88)\\\"],[.125,\\\"rgb(37,52,148)\\\"],[.25,\\\"rgb(34,94,168)\\\"],[.375,\\\"rgb(29,145,192)\\\"],[.5,\\\"rgb(65,182,196)\\\"],[.625,\\\"rgb(127,205,187)\\\"],[.75,\\\"rgb(199,233,180)\\\"],[.875,\\\"rgb(237,248,217)\\\"],[1,\\\"rgb(255,255,217)\\\"]],Greens:[[0,\\\"rgb(0,68,27)\\\"],[.125,\\\"rgb(0,109,44)\\\"],[.25,\\\"rgb(35,139,69)\\\"],[.375,\\\"rgb(65,171,93)\\\"],[.5,\\\"rgb(116,196,118)\\\"],[.625,\\\"rgb(161,217,155)\\\"],[.75,\\\"rgb(199,233,192)\\\"],[.875,\\\"rgb(229,245,224)\\\"],[1,\\\"rgb(247,252,245)\\\"]],YlOrRd:[[0,\\\"rgb(128,0,38)\\\"],[.125,\\\"rgb(189,0,38)\\\"],[.25,\\\"rgb(227,26,28)\\\"],[.375,\\\"rgb(252,78,42)\\\"],[.5,\\\"rgb(253,141,60)\\\"],[.625,\\\"rgb(254,178,76)\\\"],[.75,\\\"rgb(254,217,118)\\\"],[.875,\\\"rgb(255,237,160)\\\"],[1,\\\"rgb(255,255,204)\\\"]],Bluered:[[0,\\\"rgb(0,0,255)\\\"],[1,\\\"rgb(255,0,0)\\\"]],RdBu:[[0,\\\"rgb(5,10,172)\\\"],[.35,\\\"rgb(106,137,247)\\\"],[.5,\\\"rgb(190,190,190)\\\"],[.6,\\\"rgb(220,170,132)\\\"],[.7,\\\"rgb(230,145,90)\\\"],[1,\\\"rgb(178,10,28)\\\"]],Reds:[[0,\\\"rgb(220,220,220)\\\"],[.2,\\\"rgb(245,195,157)\\\"],[.4,\\\"rgb(245,160,105)\\\"],[1,\\\"rgb(178,10,28)\\\"]],Blues:[[0,\\\"rgb(5,10,172)\\\"],[.35,\\\"rgb(40,60,190)\\\"],[.5,\\\"rgb(70,100,245)\\\"],[.6,\\\"rgb(90,120,245)\\\"],[.7,\\\"rgb(106,137,247)\\\"],[1,\\\"rgb(220,220,220)\\\"]],Picnic:[[0,\\\"rgb(0,0,255)\\\"],[.1,\\\"rgb(51,153,255)\\\"],[.2,\\\"rgb(102,204,255)\\\"],[.3,\\\"rgb(153,204,255)\\\"],[.4,\\\"rgb(204,204,255)\\\"],[.5,\\\"rgb(255,255,255)\\\"],[.6,\\\"rgb(255,204,255)\\\"],[.7,\\\"rgb(255,153,255)\\\"],[.8,\\\"rgb(255,102,204)\\\"],[.9,\\\"rgb(255,102,102)\\\"],[1,\\\"rgb(255,0,0)\\\"]],Rainbow:[[0,\\\"rgb(150,0,90)\\\"],[.125,\\\"rgb(0,0,200)\\\"],[.25,\\\"rgb(0,25,255)\\\"],[.375,\\\"rgb(0,152,255)\\\"],[.5,\\\"rgb(44,255,150)\\\"],[.625,\\\"rgb(151,255,0)\\\"],[.75,\\\"rgb(255,234,0)\\\"],[.875,\\\"rgb(255,111,0)\\\"],[1,\\\"rgb(255,0,0)\\\"]],Portland:[[0,\\\"rgb(12,51,131)\\\"],[.25,\\\"rgb(10,136,186)\\\"],[.5,\\\"rgb(242,211,56)\\\"],[.75,\\\"rgb(242,143,56)\\\"],[1,\\\"rgb(217,30,30)\\\"]],Jet:[[0,\\\"rgb(0,0,131)\\\"],[.125,\\\"rgb(0,60,170)\\\"],[.375,\\\"rgb(5,255,255)\\\"],[.625,\\\"rgb(255,255,0)\\\"],[.875,\\\"rgb(250,0,0)\\\"],[1,\\\"rgb(128,0,0)\\\"]],Hot:[[0,\\\"rgb(0,0,0)\\\"],[.3,\\\"rgb(230,0,0)\\\"],[.6,\\\"rgb(255,210,0)\\\"],[1,\\\"rgb(255,255,255)\\\"]],Blackbody:[[0,\\\"rgb(0,0,0)\\\"],[.2,\\\"rgb(230,0,0)\\\"],[.4,\\\"rgb(230,210,0)\\\"],[.7,\\\"rgb(255,255,255)\\\"],[1,\\\"rgb(160,200,255)\\\"]],Earth:[[0,\\\"rgb(0,0,130)\\\"],[.1,\\\"rgb(0,180,180)\\\"],[.2,\\\"rgb(40,210,40)\\\"],[.4,\\\"rgb(230,230,50)\\\"],[.6,\\\"rgb(120,70,20)\\\"],[1,\\\"rgb(255,255,255)\\\"]],Electric:[[0,\\\"rgb(0,0,0)\\\"],[.15,\\\"rgb(30,0,100)\\\"],[.4,\\\"rgb(120,0,100)\\\"],[.6,\\\"rgb(160,90,0)\\\"],[.8,\\\"rgb(230,200,0)\\\"],[1,\\\"rgb(255,250,220)\\\"]],Viridis:[[0,\\\"#440154\\\"],[.06274509803921569,\\\"#48186a\\\"],[.12549019607843137,\\\"#472d7b\\\"],[.18823529411764706,\\\"#424086\\\"],[.25098039215686274,\\\"#3b528b\\\"],[.3137254901960784,\\\"#33638d\\\"],[.3764705882352941,\\\"#2c728e\\\"],[.4392156862745098,\\\"#26828e\\\"],[.5019607843137255,\\\"#21918c\\\"],[.5647058823529412,\\\"#1fa088\\\"],[.6274509803921569,\\\"#28ae80\\\"],[.6901960784313725,\\\"#3fbc73\\\"],[.7529411764705882,\\\"#5ec962\\\"],[.8156862745098039,\\\"#84d44b\\\"],[.8784313725490196,\\\"#addc30\\\"],[.9411764705882353,\\\"#d8e219\\\"],[1,\\\"#fde725\\\"]],Cividis:[[0,\\\"rgb(0,32,76)\\\"],[.058824,\\\"rgb(0,42,102)\\\"],[.117647,\\\"rgb(0,52,110)\\\"],[.176471,\\\"rgb(39,63,108)\\\"],[.235294,\\\"rgb(60,74,107)\\\"],[.294118,\\\"rgb(76,85,107)\\\"],[.352941,\\\"rgb(91,95,109)\\\"],[.411765,\\\"rgb(104,106,112)\\\"],[.470588,\\\"rgb(117,117,117)\\\"],[.529412,\\\"rgb(131,129,120)\\\"],[.588235,\\\"rgb(146,140,120)\\\"],[.647059,\\\"rgb(161,152,118)\\\"],[.705882,\\\"rgb(176,165,114)\\\"],[.764706,\\\"rgb(192,177,109)\\\"],[.823529,\\\"rgb(209,191,102)\\\"],[.882353,\\\"rgb(225,204,92)\\\"],[.941176,\\\"rgb(243,219,79)\\\"],[1,\\\"rgb(255,233,69)\\\"]]}},{}],590:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return\\\"left\\\"===i||\\\"bottom\\\"===i?a:\\\"center\\\"===i||\\\"middle\\\"===i?s:\\\"right\\\"===i||\\\"top\\\"===i?o:a<2/3-s?a:o>4/3-s?o:s}},{}],591:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=[[\\\"sw-resize\\\",\\\"s-resize\\\",\\\"se-resize\\\"],[\\\"w-resize\\\",\\\"move\\\",\\\"e-resize\\\"],[\\\"nw-resize\\\",\\\"n-resize\\\",\\\"ne-resize\\\"]];e.exports=function(t,e,r,a){return t=\\\"left\\\"===r?0:\\\"center\\\"===r?1:\\\"right\\\"===r?2:n.constrain(Math.floor(3*t),0,2),e=\\\"bottom\\\"===a?0:\\\"middle\\\"===a?1:\\\"top\\\"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{\\\"../../lib\\\":696}],592:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"mouse-event-offset\\\"),i=t(\\\"has-hover\\\"),a=t(\\\"has-passive-events\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../plots/cartesian/constants\\\"),c=t(\\\"../../constants/interactions\\\"),u=e.exports={};u.align=t(\\\"./align\\\"),u.getCursor=t(\\\"./cursor\\\");var f=t(\\\"./unhover\\\");function h(){var t=document.createElement(\\\"div\\\");t.className=\\\"dragcover\\\";var e=t.style;return e.position=\\\"fixed\\\",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background=\\\"none\\\",document.body.appendChild(t),t}function p(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}u.unhover=f.wrapped,u.unhoverRaw=f.raw,u.init=function(t){var e,r,n,f,d,g,v,m,y=t.gd,x=1,b=c.DBLCLICKDELAY,_=t.element;y._mouseDownTime||(y._mouseDownTime=0),_.style.pointerEvents=\\\"all\\\",_.onmousedown=k,a?(_._ontouchstart&&_.removeEventListener(\\\"touchstart\\\",_._ontouchstart),_._ontouchstart=k,_.addEventListener(\\\"touchstart\\\",k,{passive:!1})):_.ontouchstart=k;var w=t.clampFn||function(t,e,r){return Math.abs(t)<r&&(t=0),Math.abs(e)<r&&(e=0),[t,e]};function k(a){a.preventDefault(),y._dragged=!1,y._dragging=!0;var o=p(a);e=o[0],r=o[1],v=a.target,g=a,m=2===a.buttons||a.ctrlKey,\\\"undefined\\\"==typeof a.clientX&&\\\"undefined\\\"==typeof a.clientY&&(a.clientX=e,a.clientY=r),(n=(new Date).getTime())-y._mouseDownTime<b?x+=1:(x=1,y._mouseDownTime=n),t.prepFn&&t.prepFn(a,e,r),i&&!m?(d=h()).style.cursor=window.getComputedStyle(_).cursor:i||(d=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(_).cursor),document.addEventListener(\\\"mousemove\\\",M),document.addEventListener(\\\"mouseup\\\",A),document.addEventListener(\\\"touchmove\\\",M),document.addEventListener(\\\"touchend\\\",A)}function M(n){n.preventDefault();var i=p(n),a=t.minDrag||l.MINDRAG,o=w(i[0]-e,i[1]-r,a),s=o[0],c=o[1];(s||c)&&(y._dragged=!0,u.unhover(y)),y._dragged&&t.moveFn&&!m&&t.moveFn(s,c)}function A(e){if(document.removeEventListener(\\\"mousemove\\\",M),document.removeEventListener(\\\"mouseup\\\",A),document.removeEventListener(\\\"touchmove\\\",M),document.removeEventListener(\\\"touchend\\\",A),e.preventDefault(),i?s.removeElement(d):f&&(d.documentElement.style.cursor=f,f=null),y._dragging){if(y._dragging=!1,(new Date).getTime()-y._mouseDownTime>b&&(x=Math.max(x-1,1)),y._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(x,g),!m){var r;try{r=new MouseEvent(\\\"click\\\",e)}catch(t){var n=p(e);(r=document.createEvent(\\\"MouseEvents\\\")).initMouseEvent(\\\"click\\\",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}v.dispatchEvent(r)}!function(t){t._dragging=!1,t._replotPending&&o.call(\\\"plot\\\",t)}(y),y._dragged=!1}else y._dragged=!1}},u.coverSlip=h},{\\\"../../constants/interactions\\\":672,\\\"../../lib\\\":696,\\\"../../plots/cartesian/constants\\\":751,\\\"../../registry\\\":828,\\\"./align\\\":590,\\\"./cursor\\\":591,\\\"./unhover\\\":593,\\\"has-hover\\\":393,\\\"has-passive-events\\\":394,\\\"mouse-event-offset\\\":419}],593:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/events\\\"),i=t(\\\"../../lib/throttle\\\"),a=t(\\\"../../lib/get_graph_div\\\"),o=t(\\\"../fx/constants\\\"),s=e.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,\\\"plotly_beforehover\\\",e)||(r._hoverlayer.selectAll(\\\"g\\\").remove(),r._hoverlayer.selectAll(\\\"line\\\").remove(),r._hoverlayer.selectAll(\\\"circle\\\").remove(),t._hoverdata=void 0,e.target&&i&&t.emit(\\\"plotly_unhover\\\",{event:e,points:i}))}},{\\\"../../lib/events\\\":684,\\\"../../lib/get_graph_div\\\":691,\\\"../../lib/throttle\\\":722,\\\"../fx/constants\\\":607}],594:[function(t,e,r){\\\"use strict\\\";r.dash={valType:\\\"string\\\",values:[\\\"solid\\\",\\\"dot\\\",\\\"dash\\\",\\\"longdash\\\",\\\"dashdot\\\",\\\"longdashdot\\\"],dflt:\\\"solid\\\",editType:\\\"style\\\"}},{}],595:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"tinycolor2\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../color\\\"),l=t(\\\"../colorscale\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../lib/svg_text_utils\\\"),f=t(\\\"../../constants/xmlns_namespaces\\\"),h=t(\\\"../../constants/alignment\\\").LINE_SPACING,p=t(\\\"../../constants/interactions\\\").DESELECTDIM,d=t(\\\"../../traces/scatter/subtypes\\\"),g=t(\\\"../../traces/scatter/make_bubble_size_func\\\"),v=e.exports={};v.font=function(t,e,r,n){c.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style(\\\"font-family\\\",e),r+1&&t.style(\\\"font-size\\\",r+\\\"px\\\"),n&&t.call(s.fill,n)},v.setPosition=function(t,e,r){t.attr(\\\"x\\\",e).attr(\\\"y\\\",r)},v.setSize=function(t,e,r){t.attr(\\\"width\\\",e).attr(\\\"height\\\",r)},v.setRect=function(t,e,r,n,i){t.call(v.setPosition,e,r).call(v.setSize,n,i)},v.translatePoint=function(t,e,r,n){var a=r.c2p(t.x),o=n.c2p(t.y);return!!(i(a)&&i(o)&&e.node())&&(\\\"text\\\"===e.node().nodeName?e.attr(\\\"x\\\",a).attr(\\\"y\\\",o):e.attr(\\\"transform\\\",\\\"translate(\\\"+a+\\\",\\\"+o+\\\")\\\"),!0)},v.translatePoints=function(t,e,r){t.each(function(t){var i=n.select(this);v.translatePoint(t,i,e,r)})},v.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\\\"display\\\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\\\"none\\\")},v.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each(function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,l=\\\"bar\\\"===a.type?\\\".bartext\\\":\\\".point,.textpoint\\\";t.selectAll(l).each(function(t){v.hideOutsideRangePoint(t,n.select(this),r,i,o,s)})})}},v.crispRound=function(t,e,r){return e&&i(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},v.singleLineStyle=function(t,e,r,n,i){e.style(\\\"fill\\\",\\\"none\\\");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,l=i||a.dash||\\\"\\\";s.stroke(e,n||a.color),v.dashLine(e,l,o)},v.lineGroupStyle=function(t,e,r,i){t.style(\\\"fill\\\",\\\"none\\\").each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,l=i||a.dash||\\\"\\\";n.select(this).call(s.stroke,r||a.color).call(v.dashLine,l,o)})},v.dashLine=function(t,e,r){r=+r||0,e=v.dashStyle(e,r),t.style({\\\"stroke-dasharray\\\":e,\\\"stroke-width\\\":r+\\\"px\\\"})},v.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return\\\"solid\\\"===t?t=\\\"\\\":\\\"dot\\\"===t?t=r+\\\"px,\\\"+r+\\\"px\\\":\\\"dash\\\"===t?t=3*r+\\\"px,\\\"+3*r+\\\"px\\\":\\\"longdash\\\"===t?t=5*r+\\\"px,\\\"+5*r+\\\"px\\\":\\\"dashdot\\\"===t?t=3*r+\\\"px,\\\"+r+\\\"px,\\\"+r+\\\"px,\\\"+r+\\\"px\\\":\\\"longdashdot\\\"===t&&(t=5*r+\\\"px,\\\"+2*r+\\\"px,\\\"+r+\\\"px,\\\"+2*r+\\\"px\\\"),t},v.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(s.fill,e)},v.fillGroupStyle=function(t){t.style(\\\"stroke-width\\\",0).each(function(t){n.select(this).call(s.fill,t[0].trace.fillcolor)})};var m=t(\\\"./symbol_defs\\\");v.symbolNames=[],v.symbolFuncs=[],v.symbolNeedLines={},v.symbolNoDot={},v.symbolNoFill={},v.symbolList=[],Object.keys(m).forEach(function(t){var e=m[t];v.symbolList=v.symbolList.concat([e.n,t,e.n+100,t+\\\"-open\\\"]),v.symbolNames[e.n]=t,v.symbolFuncs[e.n]=e.f,e.needLine&&(v.symbolNeedLines[e.n]=!0),e.noDot?v.symbolNoDot[e.n]=!0:v.symbolList=v.symbolList.concat([e.n+200,t+\\\"-dot\\\",e.n+300,t+\\\"-open-dot\\\"]),e.noFill&&(v.symbolNoFill[e.n]=!0)});var y=v.symbolNames.length,x=\\\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\\\";function b(t,e){var r=t%100;return v.symbolFuncs[r](e)+(t>=200?x:\\\"\\\")}v.symbolNumber=function(t){if(\\\"string\\\"==typeof t){var e=0;t.indexOf(\\\"-open\\\")>0&&(e=100,t=t.replace(\\\"-open\\\",\\\"\\\")),t.indexOf(\\\"-dot\\\")>0&&(e+=200,t=t.replace(\\\"-dot\\\",\\\"\\\")),(t=v.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=y||t>=400?0:Math.floor(Math.max(t,0))};var _={x1:1,x2:0,y1:0,y2:0},w={x1:0,x2:0,y1:1,y2:0},k=n.format(\\\"~.1f\\\"),M={radial:{node:\\\"radialGradient\\\"},radialreversed:{node:\\\"radialGradient\\\",reversed:!0},horizontal:{node:\\\"linearGradient\\\",attrs:_},horizontalreversed:{node:\\\"linearGradient\\\",attrs:_,reversed:!0},vertical:{node:\\\"linearGradient\\\",attrs:w},verticalreversed:{node:\\\"linearGradient\\\",attrs:w,reversed:!0}};v.gradient=function(t,e,r,i,o,l){for(var u=o.length,f=M[i],h=new Array(u),p=0;p<u;p++)f.reversed?h[u-1-p]=[k(100*(1-o[p][0])),o[p][1]]:h[p]=[k(100*o[p][0]),o[p][1]];var d=\\\"g\\\"+e._fullLayout._uid+\\\"-\\\"+r,g=e._fullLayout._defs.select(\\\".gradients\\\").selectAll(\\\"#\\\"+d).data([i+h.join(\\\";\\\")],c.identity);g.exit().remove(),g.enter().append(f.node).each(function(){var t=n.select(this);f.attrs&&t.attr(f.attrs),t.attr(\\\"id\\\",d);var e=t.selectAll(\\\"stop\\\").data(h);e.exit().remove(),e.enter().append(\\\"stop\\\"),e.each(function(t){var e=a(t[1]);n.select(this).attr({offset:t[0]+\\\"%\\\",\\\"stop-color\\\":s.tinyRGB(e),\\\"stop-opacity\\\":e.getAlpha()})})}),t.style(l,\\\"url(#\\\"+d+\\\")\\\").style(l+\\\"-opacity\\\",null)},v.initGradients=function(t){c.ensureSingle(t._fullLayout._defs,\\\"g\\\",\\\"gradients\\\").selectAll(\\\"linearGradient,radialGradient\\\").remove()},v.pointStyle=function(t,e,r){if(t.size()){var i=v.makePointStyleFns(e);t.each(function(t){v.singlePointStyle(t,n.select(this),e,i,r)})}},v.singlePointStyle=function(t,e,r,n,i){var a=r.marker,o=a.line;if(e.style(\\\"opacity\\\",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?a.opacity:t.mo),n.ms2mrc){var l;l=\\\"various\\\"===t.ms||\\\"various\\\"===a.size?3:n.ms2mrc(t.ms),t.mrc=l,n.selectedSizeFn&&(l=t.mrc=n.selectedSizeFn(t));var u=v.symbolNumber(t.mx||a.symbol)||0;t.om=u%200>=100,e.attr(\\\"d\\\",b(u,l))}var f,h,p,d=!1;if(t.so)p=o.outlierwidth,h=o.outliercolor,f=a.outliercolor;else{var g=(o||{}).width;p=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,h=\\\"mlc\\\"in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(a.color)&&(f=s.defaultLine,d=!0),f=\\\"mc\\\"in t?t.mcc=n.markerScale(t.mc):a.color||\\\"rgba(0,0,0,0)\\\",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,f).style({\\\"stroke-width\\\":(p||1)+\\\"px\\\",fill:\\\"none\\\"});else{e.style(\\\"stroke-width\\\",p+\\\"px\\\");var m=a.gradient,y=t.mgt;if(y?d=!0:y=m&&m.type,Array.isArray(y)&&(y=y[0],M[y]||(y=0)),y&&\\\"none\\\"!==y){var x=t.mgc;x?d=!0:x=m.color;var _=r.uid;d&&(_+=\\\"-\\\"+t.i),v.gradient(e,i,_,y,[[0,x],[1,f]],\\\"fill\\\")}else s.fill(e,f);p&&s.stroke(e,h)}},v.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=v.tryColorscale(r,\\\"\\\"),e.lineScale=v.tryColorscale(r,\\\"line\\\"),o.traceIs(t,\\\"symbols\\\")&&(e.ms2mrc=d.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&&c.extendFlat(e,v.makeSelectedPointStyleFns(t)),e},v.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.marker||{},a=r.marker||{},s=n.marker||{},l=i.opacity,u=a.opacity,f=s.opacity,h=void 0!==u,d=void 0!==f;(c.isArrayOrTypedArray(l)||h||d)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?i.opacity:t.mo;return t.selected?h?u:e:d?f:p*e});var g=i.color,v=a.color,m=s.color;(v||m)&&(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?v||e:m||e});var y=i.size,x=a.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,\\\"symbols\\\")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},v.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},l=i.color,c=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,p))},e},v.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push(function(t,e){t.style(\\\"opacity\\\",r.selectedOpacityFn(e))}),r.selectedColorFn&&a.push(function(t,e){s.fill(t,r.selectedColorFn(e))}),r.selectedSizeFn&&a.push(function(t,e){var n=e.mx||i.symbol||0,a=r.selectedSizeFn(e);t.attr(\\\"d\\\",b(v.symbolNumber(n),a)),e.mrc2=a}),a.length&&t.each(function(t){for(var e=n.select(this),r=0;r<a.length;r++)a[r](e,t)})}},v.tryColorscale=function(t,e){var r=e?c.nestedProperty(t,e).get():t;if(r){var n=r.colorscale,i=r.color;if(n&&c.isArrayOrTypedArray(i))return l.makeColorScaleFunc(l.extractScale(n,r.cmin,r.cmax))}return c.identity};var A={start:1,end:-1,middle:0,bottom:1,top:-1};function T(t,e,r,i){var a=n.select(t.node().parentNode),o=-1!==e.indexOf(\\\"top\\\")?\\\"top\\\":-1!==e.indexOf(\\\"bottom\\\")?\\\"bottom\\\":\\\"middle\\\",s=-1!==e.indexOf(\\\"left\\\")?\\\"end\\\":-1!==e.indexOf(\\\"right\\\")?\\\"start\\\":\\\"middle\\\",l=i?i/.8+1:0,c=(u.lineCount(t)-1)*h+1,f=A[s]*l,p=.75*r+A[o]*l+(A[o]-1)*c*r/2;t.attr(\\\"text-anchor\\\",s),a.attr(\\\"transform\\\",\\\"translate(\\\"+f+\\\",\\\"+p+\\\")\\\")}function S(t,e){var r=t.ts||e.textfont.size;return i(r)&&r>0?r:0}v.textPointStyle=function(t,e,r){if(t.size()){var i;if(e.selectedpoints){var a=v.makeSelectedTextStyleFns(e);i=a.selectedTextColorFn}t.each(function(t){var a=n.select(this),o=c.extractOption(t,e,\\\"tx\\\",\\\"text\\\");if(o||0===o){var s=t.tp||e.textposition,l=S(t,e),f=i?i(t):t.tc||e.textfont.color;a.call(v.font,t.tf||e.textfont.family,l,f).text(o).call(u.convertToTspans,r).call(T,s,l,t.mrc)}else a.remove()})}},v.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedTextStyleFns(e);t.each(function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=S(t,e);s.fill(i,a),T(i,o,l,t.mrc2||t.mrc)})}};var C=.5;function E(t,e,r,i){var a=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],c=Math.pow(a*a+o*o,C/2),u=Math.pow(s*s+l*l,C/2),f=(u*u*a-c*c*s)*i,h=(u*u*o-c*c*l)*i,p=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(p&&f/p),2),n.round(e[1]+(p&&h/p),2)],[n.round(e[0]-(d&&f/d),2),n.round(e[1]-(d&&h/d),2)]]}v.smoothopen=function(t,e){if(t.length<3)return\\\"M\\\"+t.join(\\\"L\\\");var r,n=\\\"M\\\"+t[0],i=[];for(r=1;r<t.length-1;r++)i.push(E(t[r-1],t[r],t[r+1],e));for(n+=\\\"Q\\\"+i[0][0]+\\\" \\\"+t[1],r=2;r<t.length-1;r++)n+=\\\"C\\\"+i[r-2][1]+\\\" \\\"+i[r-1][0]+\\\" \\\"+t[r];return n+=\\\"Q\\\"+i[t.length-3][1]+\\\" \\\"+t[t.length-1]},v.smoothclosed=function(t,e){if(t.length<3)return\\\"M\\\"+t.join(\\\"L\\\")+\\\"Z\\\";var r,n=\\\"M\\\"+t[0],i=t.length-1,a=[E(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(E(t[r-1],t[r],t[r+1],e));for(a.push(E(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+=\\\"C\\\"+a[r-1][1]+\\\" \\\"+a[r][0]+\\\" \\\"+t[r];return n+=\\\"C\\\"+a[i][1]+\\\" \\\"+a[0][0]+\\\" \\\"+t[0]+\\\"Z\\\"};var L={hv:function(t,e){return\\\"H\\\"+n.round(e[0],2)+\\\"V\\\"+n.round(e[1],2)},vh:function(t,e){return\\\"V\\\"+n.round(e[1],2)+\\\"H\\\"+n.round(e[0],2)},hvh:function(t,e){return\\\"H\\\"+n.round((t[0]+e[0])/2,2)+\\\"V\\\"+n.round(e[1],2)+\\\"H\\\"+n.round(e[0],2)},vhv:function(t,e){return\\\"V\\\"+n.round((t[1]+e[1])/2,2)+\\\"H\\\"+n.round(e[0],2)+\\\"V\\\"+n.round(e[1],2)}},z=function(t,e){return\\\"L\\\"+n.round(e[0],2)+\\\",\\\"+n.round(e[1],2)};v.steps=function(t){var e=L[t]||z;return function(t){for(var r=\\\"M\\\"+n.round(t[0][0],2)+\\\",\\\"+n.round(t[0][1],2),i=1;i<t.length;i++)r+=e(t[i-1],t[i]);return r}},v.makeTester=function(){var t=c.ensureSingleById(n.select(\\\"body\\\"),\\\"svg\\\",\\\"js-plotly-tester\\\",function(t){t.attr(f.svgAttrs).style({position:\\\"absolute\\\",left:\\\"-10000px\\\",top:\\\"-10000px\\\",width:\\\"9000px\\\",height:\\\"9000px\\\",\\\"z-index\\\":\\\"1\\\"})}),e=c.ensureSingle(t,\\\"path\\\",\\\"js-reference-point\\\",function(t){t.attr(\\\"d\\\",\\\"M0,0H1V1H0Z\\\").style({\\\"stroke-width\\\":0,fill:\\\"black\\\"})});v.tester=t,v.testref=e},v.savedBBoxes={};var O=0;function I(t){var e=t.getAttribute(\\\"data-unformatted\\\");if(null!==e)return e+t.getAttribute(\\\"data-math\\\")+t.getAttribute(\\\"text-anchor\\\")+t.getAttribute(\\\"style\\\")}v.bBox=function(t,e,r){var i,a,o;if(r||(r=I(t)),r){if(i=v.savedBBoxes[r])return c.extendFlat({},i)}else if(1===t.childNodes.length){var s=t.childNodes[0];if(r=I(s)){var l=+s.getAttribute(\\\"x\\\")||0,f=+s.getAttribute(\\\"y\\\")||0,h=s.getAttribute(\\\"transform\\\");if(!h){var p=v.bBox(s,!1,r);return l&&(p.left+=l,p.right+=l),f&&(p.top+=f,p.bottom+=f),p}if(r+=\\\"~\\\"+l+\\\"~\\\"+f+\\\"~\\\"+h,i=v.savedBBoxes[r])return c.extendFlat({},i)}}e?a=t:(o=v.tester.node(),a=t.cloneNode(!0),o.appendChild(a)),n.select(a).attr(\\\"transform\\\",null).call(u.positionText,0,0);var d=a.getBoundingClientRect(),g=v.testref.node().getBoundingClientRect();e||o.removeChild(a);var m={height:d.height,width:d.width,left:d.left-g.left,top:d.top-g.top,right:d.right-g.left,bottom:d.bottom-g.top};return O>=1e4&&(v.savedBBoxes={},O=0),r&&(v.savedBBoxes[r]=m),O++,c.extendFlat({},m)},v.setClipUrl=function(t,e){if(e){if(void 0===v.baseUrl){var r=n.select(\\\"base\\\");r.size()&&r.attr(\\\"href\\\")?v.baseUrl=window.location.href.split(\\\"#\\\")[0]:v.baseUrl=\\\"\\\"}t.attr(\\\"clip-path\\\",\\\"url(\\\"+v.baseUrl+\\\"#\\\"+e+\\\")\\\")}else t.attr(\\\"clip-path\\\",null)},v.getTranslate=function(t){var e=(t[t.attr?\\\"attr\\\":\\\"getAttribute\\\"](\\\"transform\\\")||\\\"\\\").replace(/.*\\\\btranslate\\\\((-?\\\\d*\\\\.?\\\\d*)[^-\\\\d]*(-?\\\\d*\\\\.?\\\\d*)[^\\\\d].*/,function(t,e,r){return[e,r].join(\\\" \\\")}).split(\\\" \\\");return{x:+e[0]||0,y:+e[1]||0}},v.setTranslate=function(t,e,r){var n=t.attr?\\\"attr\\\":\\\"getAttribute\\\",i=t.attr?\\\"attr\\\":\\\"setAttribute\\\",a=t[n](\\\"transform\\\")||\\\"\\\";return e=e||0,r=r||0,a=a.replace(/(\\\\btranslate\\\\(.*?\\\\);?)/,\\\"\\\").trim(),a=(a+=\\\" translate(\\\"+e+\\\", \\\"+r+\\\")\\\").trim(),t[i](\\\"transform\\\",a),a},v.getScale=function(t){var e=(t[t.attr?\\\"attr\\\":\\\"getAttribute\\\"](\\\"transform\\\")||\\\"\\\").replace(/.*\\\\bscale\\\\((\\\\d*\\\\.?\\\\d*)[^\\\\d]*(\\\\d*\\\\.?\\\\d*)[^\\\\d].*/,function(t,e,r){return[e,r].join(\\\" \\\")}).split(\\\" \\\");return{x:+e[0]||1,y:+e[1]||1}},v.setScale=function(t,e,r){var n=t.attr?\\\"attr\\\":\\\"getAttribute\\\",i=t.attr?\\\"attr\\\":\\\"setAttribute\\\",a=t[n](\\\"transform\\\")||\\\"\\\";return e=e||1,r=r||1,a=a.replace(/(\\\\bscale\\\\(.*?\\\\);?)/,\\\"\\\").trim(),a=(a+=\\\" scale(\\\"+e+\\\", \\\"+r+\\\")\\\").trim(),t[i](\\\"transform\\\",a),a};var P=/\\\\s*sc.*/;v.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?\\\"\\\":\\\" scale(\\\"+e+\\\",\\\"+r+\\\")\\\";t.each(function(){var t=(this.getAttribute(\\\"transform\\\")||\\\"\\\").replace(P,\\\"\\\");t=(t+=n).trim(),this.setAttribute(\\\"transform\\\",t)})}};var D=/translate\\\\([^)]*\\\\)\\\\s*$/;v.setTextPointsScale=function(t,e,r){t&&t.each(function(){var t,i=n.select(this),a=i.select(\\\"text\\\");if(a.node()){var o=parseFloat(a.attr(\\\"x\\\")||0),s=parseFloat(a.attr(\\\"y\\\")||0),l=(i.attr(\\\"transform\\\")||\\\"\\\").match(D);t=1===e&&1===r?[]:[\\\"translate(\\\"+o+\\\",\\\"+s+\\\")\\\",\\\"scale(\\\"+e+\\\",\\\"+r+\\\")\\\",\\\"translate(\\\"+-o+\\\",\\\"+-s+\\\")\\\"],l&&t.push(l),i.attr(\\\"transform\\\",t.join(\\\" \\\"))}})}},{\\\"../../constants/alignment\\\":668,\\\"../../constants/interactions\\\":672,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../registry\\\":828,\\\"../../traces/scatter/make_bubble_size_func\\\":1061,\\\"../../traces/scatter/subtypes\\\":1068,\\\"../color\\\":570,\\\"../colorscale\\\":585,\\\"./symbol_defs\\\":596,d3:148,\\\"fast-isnumeric\\\":214,tinycolor2:514}],596:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",0A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,-\\\"+e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 0,1 \\\"+e+\\\",0Z\\\"}},square:{n:1,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+e+\\\"H\\\"+e+\\\"Z\\\"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return\\\"M\\\"+e+\\\",0L0,\\\"+e+\\\"L-\\\"+e+\\\",0L0,-\\\"+e+\\\"Z\\\"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return\\\"M\\\"+r+\\\",\\\"+e+\\\"H\\\"+e+\\\"V\\\"+r+\\\"H-\\\"+e+\\\"V\\\"+e+\\\"H-\\\"+r+\\\"V-\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+r+\\\"H\\\"+e+\\\"V-\\\"+e+\\\"H\\\"+r+\\\"Z\\\"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r=\\\"l\\\"+e+\\\",\\\"+e,i=\\\"l\\\"+e+\\\",-\\\"+e,a=\\\"l-\\\"+e+\\\",-\\\"+e,o=\\\"l-\\\"+e+\\\",\\\"+e;return\\\"M0,\\\"+e+r+i+a+i+a+o+a+o+r+o+r+\\\"Z\\\"}},\\\"triangle-up\\\":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return\\\"M-\\\"+e+\\\",\\\"+n.round(t/2,2)+\\\"H\\\"+e+\\\"L0,-\\\"+n.round(t,2)+\\\"Z\\\"}},\\\"triangle-down\\\":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return\\\"M-\\\"+e+\\\",-\\\"+n.round(t/2,2)+\\\"H\\\"+e+\\\"L0,\\\"+n.round(t,2)+\\\"Z\\\"}},\\\"triangle-left\\\":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return\\\"M\\\"+n.round(t/2,2)+\\\",-\\\"+e+\\\"V\\\"+e+\\\"L-\\\"+n.round(t,2)+\\\",0Z\\\"}},\\\"triangle-right\\\":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return\\\"M-\\\"+n.round(t/2,2)+\\\",-\\\"+e+\\\"V\\\"+e+\\\"L\\\"+n.round(t,2)+\\\",0Z\\\"}},\\\"triangle-ne\\\":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return\\\"M-\\\"+r+\\\",-\\\"+e+\\\"H\\\"+e+\\\"V\\\"+r+\\\"Z\\\"}},\\\"triangle-se\\\":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return\\\"M\\\"+e+\\\",-\\\"+r+\\\"V\\\"+e+\\\"H-\\\"+r+\\\"Z\\\"}},\\\"triangle-sw\\\":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return\\\"M\\\"+r+\\\",\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+r+\\\"Z\\\"}},\\\"triangle-nw\\\":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return\\\"M-\\\"+e+\\\",\\\"+r+\\\"V-\\\"+e+\\\"H\\\"+r+\\\"Z\\\"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(-.309*t,2);return\\\"M\\\"+e+\\\",\\\"+a+\\\"L\\\"+r+\\\",\\\"+n.round(.809*t,2)+\\\"H-\\\"+r+\\\"L-\\\"+e+\\\",\\\"+a+\\\"L0,\\\"+i+\\\"Z\\\"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return\\\"M\\\"+i+\\\",-\\\"+r+\\\"V\\\"+r+\\\"L0,\\\"+e+\\\"L-\\\"+i+\\\",\\\"+r+\\\"V-\\\"+r+\\\"L0,-\\\"+e+\\\"Z\\\"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return\\\"M-\\\"+r+\\\",\\\"+i+\\\"H\\\"+r+\\\"L\\\"+e+\\\",0L\\\"+r+\\\",-\\\"+i+\\\"H-\\\"+r+\\\"L-\\\"+e+\\\",0Z\\\"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return\\\"M-\\\"+r+\\\",-\\\"+e+\\\"H\\\"+r+\\\"L\\\"+e+\\\",-\\\"+r+\\\"V\\\"+r+\\\"L\\\"+r+\\\",\\\"+e+\\\"H-\\\"+r+\\\"L-\\\"+e+\\\",\\\"+r+\\\"V-\\\"+r+\\\"Z\\\"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return\\\"M\\\"+r+\\\",\\\"+l+\\\"H\\\"+i+\\\"L\\\"+a+\\\",\\\"+c+\\\"L\\\"+o+\\\",\\\"+u+\\\"L0,\\\"+n.round(.382*e,2)+\\\"L-\\\"+o+\\\",\\\"+u+\\\"L-\\\"+a+\\\",\\\"+c+\\\"L-\\\"+i+\\\",\\\"+l+\\\"H-\\\"+r+\\\"L0,\\\"+s+\\\"Z\\\"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return\\\"M-\\\"+i+\\\",0l-\\\"+r+\\\",-\\\"+e+\\\"h\\\"+i+\\\"l\\\"+r+\\\",-\\\"+e+\\\"l\\\"+r+\\\",\\\"+e+\\\"h\\\"+i+\\\"l-\\\"+r+\\\",\\\"+e+\\\"l\\\"+r+\\\",\\\"+e+\\\"h-\\\"+i+\\\"l-\\\"+r+\\\",\\\"+e+\\\"l-\\\"+r+\\\",-\\\"+e+\\\"h-\\\"+i+\\\"Z\\\"}},\\\"star-triangle-up\\\":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o=\\\"A \\\"+a+\\\",\\\"+a+\\\" 0 0 1 \\\";return\\\"M-\\\"+e+\\\",\\\"+r+o+e+\\\",\\\"+r+o+\\\"0,-\\\"+i+o+\\\"-\\\"+e+\\\",\\\"+r+\\\"Z\\\"}},\\\"star-triangle-down\\\":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o=\\\"A \\\"+a+\\\",\\\"+a+\\\" 0 0 1 \\\";return\\\"M\\\"+e+\\\",-\\\"+r+o+\\\"-\\\"+e+\\\",-\\\"+r+o+\\\"0,\\\"+i+o+e+\\\",-\\\"+r+\\\"Z\\\"}},\\\"star-square\\\":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i=\\\"A \\\"+r+\\\",\\\"+r+\\\" 0 0 1 \\\";return\\\"M-\\\"+e+\\\",-\\\"+e+i+\\\"-\\\"+e+\\\",\\\"+e+i+e+\\\",\\\"+e+i+e+\\\",-\\\"+e+i+\\\"-\\\"+e+\\\",-\\\"+e+\\\"Z\\\"}},\\\"star-diamond\\\":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i=\\\"A \\\"+r+\\\",\\\"+r+\\\" 0 0 1 \\\";return\\\"M-\\\"+e+\\\",0\\\"+i+\\\"0,\\\"+e+i+e+\\\",0\\\"+i+\\\"0,-\\\"+e+i+\\\"-\\\"+e+\\\",0Z\\\"}},\\\"diamond-tall\\\":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return\\\"M0,\\\"+r+\\\"L\\\"+e+\\\",0L0,-\\\"+r+\\\"L-\\\"+e+\\\",0Z\\\"}},\\\"diamond-wide\\\":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return\\\"M0,\\\"+r+\\\"L\\\"+e+\\\",0L0,-\\\"+r+\\\"L-\\\"+e+\\\",0Z\\\"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"H-\\\"+e+\\\"L\\\"+e+\\\",-\\\"+e+\\\"H-\\\"+e+\\\"Z\\\"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"V-\\\"+e+\\\"L-\\\"+e+\\\",\\\"+e+\\\"V-\\\"+e+\\\"Z\\\"},noDot:!0},\\\"circle-cross\\\":{n:27,f:function(t){var e=n.round(t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e+\\\"M\\\"+e+\\\",0H-\\\"+e+\\\"M\\\"+e+\\\",0A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,-\\\"+e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 0,1 \\\"+e+\\\",0Z\\\"},needLine:!0,noDot:!0},\\\"circle-x\\\":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return\\\"M\\\"+r+\\\",\\\"+r+\\\"L-\\\"+r+\\\",-\\\"+r+\\\"M\\\"+r+\\\",-\\\"+r+\\\"L-\\\"+r+\\\",\\\"+r+\\\"M\\\"+e+\\\",0A\\\"+e+\\\",\\\"+e+\\\" 0 1,1 0,-\\\"+e+\\\"A\\\"+e+\\\",\\\"+e+\\\" 0 0,1 \\\"+e+\\\",0Z\\\"},needLine:!0,noDot:!0},\\\"square-cross\\\":{n:29,f:function(t){var e=n.round(t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e+\\\"M\\\"+e+\\\",0H-\\\"+e+\\\"M\\\"+e+\\\",\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+e+\\\"H\\\"+e+\\\"Z\\\"},needLine:!0,noDot:!0},\\\"square-x\\\":{n:30,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"L-\\\"+e+\\\",-\\\"+e+\\\"M\\\"+e+\\\",-\\\"+e+\\\"L-\\\"+e+\\\",\\\"+e+\\\"M\\\"+e+\\\",\\\"+e+\\\"H-\\\"+e+\\\"V-\\\"+e+\\\"H\\\"+e+\\\"Z\\\"},needLine:!0,noDot:!0},\\\"diamond-cross\\\":{n:31,f:function(t){var e=n.round(1.3*t,2);return\\\"M\\\"+e+\\\",0L0,\\\"+e+\\\"L-\\\"+e+\\\",0L0,-\\\"+e+\\\"ZM0,-\\\"+e+\\\"V\\\"+e+\\\"M-\\\"+e+\\\",0H\\\"+e},needLine:!0,noDot:!0},\\\"diamond-x\\\":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return\\\"M\\\"+e+\\\",0L0,\\\"+e+\\\"L-\\\"+e+\\\",0L0,-\\\"+e+\\\"ZM-\\\"+r+\\\",-\\\"+r+\\\"L\\\"+r+\\\",\\\"+r+\\\"M-\\\"+r+\\\",\\\"+r+\\\"L\\\"+r+\\\",-\\\"+r},needLine:!0,noDot:!0},\\\"cross-thin\\\":{n:33,f:function(t){var e=n.round(1.4*t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e+\\\"M\\\"+e+\\\",0H-\\\"+e},needLine:!0,noDot:!0,noFill:!0},\\\"x-thin\\\":{n:34,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"L-\\\"+e+\\\",-\\\"+e+\\\"M\\\"+e+\\\",-\\\"+e+\\\"L-\\\"+e+\\\",\\\"+e},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e+\\\"M\\\"+e+\\\",0H-\\\"+e+\\\"M\\\"+r+\\\",\\\"+r+\\\"L-\\\"+r+\\\",-\\\"+r+\\\"M\\\"+r+\\\",-\\\"+r+\\\"L-\\\"+r+\\\",\\\"+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+r+\\\"V-\\\"+r+\\\"m-\\\"+r+\\\",0V\\\"+r+\\\"M\\\"+r+\\\",\\\"+e+\\\"H-\\\"+r+\\\"m0,-\\\"+r+\\\"H\\\"+r},needLine:!0,noFill:!0},\\\"y-up\\\":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return\\\"M-\\\"+e+\\\",\\\"+i+\\\"L0,0M\\\"+e+\\\",\\\"+i+\\\"L0,0M0,-\\\"+r+\\\"L0,0\\\"},needLine:!0,noDot:!0,noFill:!0},\\\"y-down\\\":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return\\\"M-\\\"+e+\\\",-\\\"+i+\\\"L0,0M\\\"+e+\\\",-\\\"+i+\\\"L0,0M0,\\\"+r+\\\"L0,0\\\"},needLine:!0,noDot:!0,noFill:!0},\\\"y-left\\\":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return\\\"M\\\"+i+\\\",\\\"+e+\\\"L0,0M\\\"+i+\\\",-\\\"+e+\\\"L0,0M-\\\"+r+\\\",0L0,0\\\"},needLine:!0,noDot:!0,noFill:!0},\\\"y-right\\\":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return\\\"M-\\\"+i+\\\",\\\"+e+\\\"L0,0M-\\\"+i+\\\",-\\\"+e+\\\"L0,0M\\\"+r+\\\",0L0,0\\\"},needLine:!0,noDot:!0,noFill:!0},\\\"line-ew\\\":{n:41,f:function(t){var e=n.round(1.4*t,2);return\\\"M\\\"+e+\\\",0H-\\\"+e},needLine:!0,noDot:!0,noFill:!0},\\\"line-ns\\\":{n:42,f:function(t){var e=n.round(1.4*t,2);return\\\"M0,\\\"+e+\\\"V-\\\"+e},needLine:!0,noDot:!0,noFill:!0},\\\"line-ne\\\":{n:43,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",-\\\"+e+\\\"L-\\\"+e+\\\",\\\"+e},needLine:!0,noDot:!0,noFill:!0},\\\"line-nw\\\":{n:44,f:function(t){var e=n.round(t,2);return\\\"M\\\"+e+\\\",\\\"+e+\\\"L-\\\"+e+\\\",-\\\"+e},needLine:!0,noDot:!0,noFill:!0}}},{d3:148}],597:[function(t,e,r){\\\"use strict\\\";e.exports={visible:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"percent\\\",\\\"constant\\\",\\\"sqrt\\\",\\\"data\\\"],editType:\\\"calc\\\"},symmetric:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},array:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},arrayminus:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},value:{valType:\\\"number\\\",min:0,dflt:10,editType:\\\"calc\\\"},valueminus:{valType:\\\"number\\\",min:0,dflt:10,editType:\\\"calc\\\"},traceref:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"style\\\"},tracerefminus:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"style\\\"},copy_ystyle:{valType:\\\"boolean\\\",editType:\\\"plot\\\"},copy_zstyle:{valType:\\\"boolean\\\",editType:\\\"style\\\"},color:{valType:\\\"color\\\",editType:\\\"style\\\"},thickness:{valType:\\\"number\\\",min:0,dflt:2,editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,editType:\\\"plot\\\"},editType:\\\"calc\\\",_deprecated:{opacity:{valType:\\\"number\\\",editType:\\\"style\\\"}}}},{}],598:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"./compute_error\\\");function s(t,e,r,i){var s=e[\\\"error_\\\"+i]||{},l=[];if(s.visible&&-1!==[\\\"linear\\\",\\\"log\\\"].indexOf(r.type)){for(var c=o(s),u=0;u<t.length;u++){var f=t[u],h=f.i;if(void 0===h)h=u;else if(null===h)continue;var p=f[i];if(n(r.c2l(p))){var d=c(p,h);if(n(d[0])&&n(d[1])){var g=f[i+\\\"s\\\"]=p-d[0],v=f[i+\\\"h\\\"]=p+d[1];l.push(g,v)}}}var m=a.findExtremes(r,l,{padded:!0}),y=r._id;e._extremes[y].min=e._extremes[y].min.concat(m.min),e._extremes[y].max=e._extremes[y].max.concat(m.max)}}e.exports=function(t){for(var e=t.calcdata,r=0;r<e.length;r++){var n=e[r],o=n[0].trace;if(!0===o.visible&&i.traceIs(o,\\\"errorBarsOK\\\")){var l=a.getFromId(t,o.xaxis),c=a.getFromId(t,o.yaxis);s(n,o,l,\\\"x\\\"),s(n,o,c,\\\"y\\\")}}}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"./compute_error\\\":599,\\\"fast-isnumeric\\\":214}],599:[function(t,e,r){\\\"use strict\\\";function n(t,e){return\\\"percent\\\"===t?function(t){return Math.abs(t*e/100)}:\\\"constant\\\"===t?function(){return Math.abs(e)}:\\\"sqrt\\\"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}e.exports=function(t){var e=t.type,r=t.symmetric;if(\\\"data\\\"===e){var i=t.array||[];if(r)return function(t,e){var r=+i[e];return[r,r]};var a=t.arrayminus||[];return function(t,e){var r=+i[e],n=+a[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=n(e,t.value),s=n(e,t.valueminus);return r||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},{}],600:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../plot_api/plot_template\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){var c=\\\"error_\\\"+l.axis,u=o.newContainer(e,c),f=t[c]||{};function h(t,e){return a.coerce(f,u,s,t,e)}if(!1!==h(\\\"visible\\\",void 0!==f.array||void 0!==f.value||\\\"sqrt\\\"===f.type)){var p=h(\\\"type\\\",\\\"array\\\"in f?\\\"data\\\":\\\"percent\\\"),d=!0;\\\"sqrt\\\"!==p&&(d=h(\\\"symmetric\\\",!((\\\"data\\\"===p?\\\"arrayminus\\\":\\\"valueminus\\\")in f))),\\\"data\\\"===p?(h(\\\"array\\\"),h(\\\"traceref\\\"),d||(h(\\\"arrayminus\\\"),h(\\\"tracerefminus\\\"))):\\\"percent\\\"!==p&&\\\"constant\\\"!==p||(h(\\\"value\\\"),d||h(\\\"valueminus\\\"));var g=\\\"copy_\\\"+l.inherit+\\\"style\\\";if(l.inherit)(e[\\\"error_\\\"+l.inherit]||{}).visible&&h(g,!(f.color||n(f.thickness)||n(f.width)));l.inherit&&u[g]||(h(\\\"color\\\",r),h(\\\"thickness\\\"),h(\\\"width\\\",i.traceIs(e,\\\"gl3d\\\")?0:4))}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../registry\\\":828,\\\"./attributes\\\":597,\\\"fast-isnumeric\\\":214}],601:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plot_api/edit_types\\\").overrideAll,a=t(\\\"./attributes\\\"),o={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a),error_z:n.extendFlat({},a)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,e.exports={moduleType:\\\"component\\\",name:\\\"errorbars\\\",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:i(s,\\\"calc\\\",\\\"nested\\\"),scattergl:i(o,\\\"calc\\\",\\\"nested\\\")}},supplyDefaults:t(\\\"./defaults\\\"),calc:t(\\\"./calc\\\"),makeComputeError:t(\\\"./compute_error\\\"),plot:t(\\\"./plot\\\"),style:t(\\\"./style\\\"),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys));(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},{\\\"../../lib\\\":696,\\\"../../plot_api/edit_types\\\":728,\\\"./attributes\\\":597,\\\"./calc\\\":598,\\\"./compute_error\\\":599,\\\"./defaults\\\":600,\\\"./plot\\\":602,\\\"./style\\\":603}],602:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../drawing\\\"),o=t(\\\"../../traces/scatter/subtypes\\\");e.exports=function(t,e,r){var s=e.xaxis,l=e.yaxis,c=r&&r.duration>0;t.each(function(t){var u,f=t[0].trace,h=f.error_x||{},p=f.error_y||{};f.ids&&(u=function(t){return t.id});var d=o.hasMarkers(f)&&f.marker.maxdisplayed>0;p.visible||h.visible||(t=[]);var g=n.select(this).selectAll(\\\"g.errorbar\\\").data(t,u);if(g.exit().remove(),t.length){h.visible||g.selectAll(\\\"path.xerror\\\").remove(),p.visible||g.selectAll(\\\"path.yerror\\\").remove(),g.style(\\\"opacity\\\",1);var v=g.enter().append(\\\"g\\\").classed(\\\"errorbar\\\",!0);c&&v.style(\\\"opacity\\\",0).transition().duration(r.duration).style(\\\"opacity\\\",1),a.setClipUrl(g,e.layerClipId),g.each(function(t){var e=n.select(this),a=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0)));void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0)));return n}(t,s,l);if(!d||t.vis){var o,u=e.select(\\\"path.yerror\\\");if(p.visible&&i(a.x)&&i(a.yh)&&i(a.ys)){var f=p.width;o=\\\"M\\\"+(a.x-f)+\\\",\\\"+a.yh+\\\"h\\\"+2*f+\\\"m-\\\"+f+\\\",0V\\\"+a.ys,a.noYS||(o+=\\\"m-\\\"+f+\\\",0h\\\"+2*f),!u.size()?u=e.append(\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").classed(\\\"yerror\\\",!0):c&&(u=u.transition().duration(r.duration).ease(r.easing)),u.attr(\\\"d\\\",o)}else u.remove();var g=e.select(\\\"path.xerror\\\");if(h.visible&&i(a.y)&&i(a.xh)&&i(a.xs)){var v=(h.copy_ystyle?p:h).width;o=\\\"M\\\"+a.xh+\\\",\\\"+(a.y-v)+\\\"v\\\"+2*v+\\\"m0,-\\\"+v+\\\"H\\\"+a.xs,a.noXS||(o+=\\\"m0,-\\\"+v+\\\"v\\\"+2*v),!g.size()?g=e.append(\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").classed(\\\"xerror\\\",!0):c&&(g=g.transition().duration(r.duration).ease(r.easing)),g.attr(\\\"d\\\",o)}else g.remove()}})}})}},{\\\"../../traces/scatter/subtypes\\\":1068,\\\"../drawing\\\":595,d3:148,\\\"fast-isnumeric\\\":214}],603:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../color\\\");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll(\\\"path.yerror\\\").style(\\\"stroke-width\\\",r.thickness+\\\"px\\\").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll(\\\"path.xerror\\\").style(\\\"stroke-width\\\",a.thickness+\\\"px\\\").call(i.stroke,a.color)})}},{\\\"../color\\\":570,d3:148}],604:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\");e.exports={hoverlabel:{bgcolor:{valType:\\\"color\\\",arrayOk:!0,editType:\\\"none\\\"},bordercolor:{valType:\\\"color\\\",arrayOk:!0,editType:\\\"none\\\"},font:n({arrayOk:!0,editType:\\\"none\\\"}),namelength:{valType:\\\"integer\\\",min:-1,arrayOk:!0,editType:\\\"none\\\"},editType:\\\"calc\\\"}}},{\\\"../../plots/font_attributes\\\":772}],605:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\");function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}e.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s<e.length;s++){var l=e[s],c=l[0].trace;if(!i.traceIs(c,\\\"pie\\\")){var u=i.traceIs(c,\\\"2dMap\\\")?a:n.fillArray;u(c.hoverinfo,l,\\\"hi\\\",o(c)),c.hoverlabel&&(u(c.hoverlabel.bgcolor,l,\\\"hbg\\\"),u(c.hoverlabel.bordercolor,l,\\\"hbc\\\"),u(c.hoverlabel.font.size,l,\\\"hts\\\"),u(c.hoverlabel.font.color,l,\\\"htc\\\"),u(c.hoverlabel.font.family,l,\\\"htf\\\"),u(c.hoverlabel.namelength,l,\\\"hnl\\\"))}}}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828}],606:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"./hover\\\").hover;e.exports=function(t,e,r){var a=n.getComponentMethod(\\\"annotations\\\",\\\"onClick\\\")(t,t._hoverdata);function o(){t.emit(\\\"plotly_click\\\",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(a&&a.then?a.then(o):o(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},{\\\"../../registry\\\":828,\\\"./hover\\\":610}],607:[function(t,e,r){\\\"use strict\\\";e.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:\\\"Arial, sans-serif\\\",HOVERMINTIME:50,HOVERID:\\\"-hover\\\"}},{}],608:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"./hoverlabel_defaults\\\");e.exports=function(t,e,r,o){a(t,e,function(r,a){return n.coerce(t,e,i,r,a)},o.hoverlabel)}},{\\\"../../lib\\\":696,\\\"./attributes\\\":604,\\\"./hoverlabel_defaults\\\":611}],609:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");r.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},r.isTraceInSubplots=function(t,e){if(\\\"splom\\\"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a<n.length;a++)for(var o=0;o<i.length;o++)if(-1!==e.indexOf(n[a]+i[o]))return!0;return!1}return-1!==e.indexOf(r.getSubplot(t))},r.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},r.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},r.getDistanceFunction=function(t,e,n,i){return\\\"closest\\\"===t?i||r.quadrature(e,n):\\\"x\\\"===t?e:n},r.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},r.inbox=function(t,e,r){return t*e<0||0===t?r:1/0},r.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},r.makeEventData=function(t,e,n){var i=\\\"index\\\"in t?t.index:t.pointNumber,a={data:e._input,fullData:e,curveNumber:e.index,pointNumber:i};if(e._indexToPoints){var o=e._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return e._module.eventData?a=e._module.eventData(a,t,e,n,i):(\\\"xVal\\\"in t?a.x=t.xVal:\\\"x\\\"in t&&(a.x=t.x),\\\"yVal\\\"in t?a.y=t.yVal:\\\"y\\\"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),r.appendArrayPointValue(a,e,i),a},r.appendArrayPointValue=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],c=a(l);if(void 0===t[c]){var u=o(n.nestedProperty(e,l).get(),r);void 0!==u&&(t[c]=u)}}},r.appendArrayMultiPointValues=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],c=a(l);if(void 0===t[c]){for(var u=n.nestedProperty(e,l).get(),f=new Array(r.length),h=0;h<r.length;h++)f[h]=o(u,r[h]);t[c]=f}}};var i={ids:\\\"id\\\",locations:\\\"location\\\",labels:\\\"label\\\",values:\\\"value\\\",\\\"marker.colors\\\":\\\"color\\\"};function a(t){return i[t]||t}function o(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}},{\\\"../../lib\\\":696}],610:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"tinycolor2\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../lib/events\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../../lib/override_cursor\\\"),u=t(\\\"../drawing\\\"),f=t(\\\"../color\\\"),h=t(\\\"../dragelement\\\"),p=t(\\\"../../plots/cartesian/axes\\\"),d=t(\\\"../../registry\\\"),g=t(\\\"./helpers\\\"),v=t(\\\"./constants\\\"),m=v.YANGLE,y=Math.PI*m/180,x=1/Math.sin(y),b=Math.cos(y),_=Math.sin(y),w=v.HOVERARROWSIZE,k=v.HOVERTEXTPAD;function M(t,e,r){var i=e.hovermode,a=e.rotateLabels,s=e.bgColor,c=e.container,h=e.outerContainer,p=e.commonLabelOpts||{},d=e.fontFamily||v.HOVERFONT,g=e.fontSize||v.HOVERFONTSIZE,y=t[0],x=y.xa,b=y.ya,_=\\\"y\\\"===i?\\\"yLabel\\\":\\\"xLabel\\\",M=y[_],A=(String(M)||\\\"\\\").split(\\\" \\\")[0],T=h.node().getBoundingClientRect(),S=T.top,C=T.width,E=T.height,L=void 0!==M&&y.distance<=e.hoverdistance&&(\\\"x\\\"===i||\\\"y\\\"===i);if(L){var z,O,I=!0;for(z=0;z<t.length;z++){I&&void 0===t[z].zLabel&&(I=!1),O=t[z].hoverinfo||t[z].trace.hoverinfo;var P=Array.isArray(O)?O:O.split(\\\"+\\\");if(-1===P.indexOf(\\\"all\\\")&&-1===P.indexOf(i)){L=!1;break}}I&&(L=!1)}var D=c.selectAll(\\\"g.axistext\\\").data(L?[0]:[]);D.enter().append(\\\"g\\\").classed(\\\"axistext\\\",!0),D.exit().remove(),D.each(function(){var e=n.select(this),a=o.ensureSingle(e,\\\"path\\\",\\\"\\\",function(t){t.style({\\\"stroke-width\\\":\\\"1px\\\"})}),s=o.ensureSingle(e,\\\"text\\\",\\\"\\\",function(t){t.attr(\\\"data-notex\\\",1)}),c=p.bgcolor||f.defaultLine,h=p.bordercolor||f.contrast(c),v=f.contrast(c);a.style({fill:c,stroke:h}),s.text(M).call(u.font,p.font.family||d,p.font.size||g,p.font.color||v).call(l.positionText,0,0).call(l.convertToTspans,r),e.attr(\\\"transform\\\",\\\"\\\");var m=s.node().getBoundingClientRect();if(\\\"x\\\"===i){s.attr(\\\"text-anchor\\\",\\\"middle\\\").call(l.positionText,0,\\\"top\\\"===x.side?S-m.bottom-w-k:S-m.top+w+k);var T=\\\"top\\\"===x.side?\\\"-\\\":\\\"\\\";a.attr(\\\"d\\\",\\\"M0,0L\\\"+w+\\\",\\\"+T+w+\\\"H\\\"+(k+m.width/2)+\\\"v\\\"+T+(2*k+m.height)+\\\"H-\\\"+(k+m.width/2)+\\\"V\\\"+T+w+\\\"H-\\\"+w+\\\"Z\\\"),e.attr(\\\"transform\\\",\\\"translate(\\\"+(x._offset+(y.x0+y.x1)/2)+\\\",\\\"+(b._offset+(\\\"top\\\"===x.side?0:b._length))+\\\")\\\")}else{s.attr(\\\"text-anchor\\\",\\\"right\\\"===b.side?\\\"start\\\":\\\"end\\\").call(l.positionText,(\\\"right\\\"===b.side?1:-1)*(k+w),S-m.top-m.height/2);var C=\\\"right\\\"===b.side?\\\"\\\":\\\"-\\\";a.attr(\\\"d\\\",\\\"M0,0L\\\"+C+w+\\\",\\\"+w+\\\"V\\\"+(k+m.height/2)+\\\"h\\\"+C+(2*k+m.width)+\\\"V-\\\"+(k+m.height/2)+\\\"H\\\"+C+w+\\\"V-\\\"+w+\\\"Z\\\"),e.attr(\\\"transform\\\",\\\"translate(\\\"+(x._offset+(\\\"right\\\"===b.side?x._length:0))+\\\",\\\"+(b._offset+(y.y0+y.y1)/2)+\\\")\\\")}t=t.filter(function(t){return void 0!==t.zLabelVal||(t[_]||\\\"\\\").split(\\\" \\\")[0]===A})});var R=c.selectAll(\\\"g.hovertext\\\").data(t,function(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa,t.ya||\\\"\\\"].join(\\\",\\\")});return R.enter().append(\\\"g\\\").classed(\\\"hovertext\\\",!0).each(function(){var t=n.select(this);t.append(\\\"rect\\\").call(f.fill,f.addOpacity(s,.8)),t.append(\\\"text\\\").classed(\\\"name\\\",!0),t.append(\\\"path\\\").style(\\\"stroke-width\\\",\\\"1px\\\"),t.append(\\\"text\\\").classed(\\\"nums\\\",!0).call(u.font,d,g)}),R.exit().remove(),R.each(function(t){var e=n.select(this).attr(\\\"transform\\\",\\\"\\\"),o=\\\"\\\",c=\\\"\\\",h=t.bgcolor||t.color,p=f.combine(f.opacity(h)?h:f.defaultLine,s),v=f.combine(f.opacity(t.color)?t.color:f.defaultLine,s),y=t.borderColor||f.contrast(p);if(void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name){o=l.plainText(t.name||\\\"\\\");var x=Math.round(t.nameLength);x>-1&&o.length>x&&(o=x>3?o.substr(0,x-3)+\\\"...\\\":o.substr(0,x))}void 0!==t.zLabel?(void 0!==t.xLabel&&(c+=\\\"x: \\\"+t.xLabel+\\\"<br>\\\"),void 0!==t.yLabel&&(c+=\\\"y: \\\"+t.yLabel+\\\"<br>\\\"),c+=(c?\\\"z: \\\":\\\"\\\")+t.zLabel):L&&t[i+\\\"Label\\\"]===M?c=t[(\\\"x\\\"===i?\\\"y\\\":\\\"x\\\")+\\\"Label\\\"]||\\\"\\\":void 0===t.xLabel?void 0!==t.yLabel&&(c=t.yLabel):c=void 0===t.yLabel?t.xLabel:\\\"(\\\"+t.xLabel+\\\", \\\"+t.yLabel+\\\")\\\",!t.text&&0!==t.text||Array.isArray(t.text)||(c+=(c?\\\"<br>\\\":\\\"\\\")+t.text),void 0!==t.extraText&&(c+=(c?\\\"<br>\\\":\\\"\\\")+t.extraText),\\\"\\\"===c&&(\\\"\\\"===o&&e.remove(),c=o);var b=e.select(\\\"text.nums\\\").call(u.font,t.fontFamily||d,t.fontSize||g,t.fontColor||y).text(c).attr(\\\"data-notex\\\",1).call(l.positionText,0,0).call(l.convertToTspans,r),_=e.select(\\\"text.name\\\"),A=0;o&&o!==c?(_.call(u.font,t.fontFamily||d,t.fontSize||g,v).text(o).attr(\\\"data-notex\\\",1).call(l.positionText,0,0).call(l.convertToTspans,r),A=_.node().getBoundingClientRect().width+2*k):(_.remove(),e.select(\\\"rect\\\").remove()),e.select(\\\"path\\\").style({fill:p,stroke:y});var T,z,O=b.node().getBoundingClientRect(),I=t.xa._offset+(t.x0+t.x1)/2,P=t.ya._offset+(t.y0+t.y1)/2,D=Math.abs(t.x1-t.x0),R=Math.abs(t.y1-t.y0),B=O.width+w+k+A;t.ty0=S-O.top,t.bx=O.width+2*k,t.by=O.height+2*k,t.anchor=\\\"start\\\",t.txwidth=O.width,t.tx2width=A,t.offset=0,a?(t.pos=I,T=P+R/2+B<=E,z=P-R/2-B>=0,\\\"top\\\"!==t.idealAlign&&T||!z?T?(P+=R/2,t.anchor=\\\"start\\\"):t.anchor=\\\"middle\\\":(P-=R/2,t.anchor=\\\"end\\\")):(t.pos=P,T=I+D/2+B<=C,z=I-D/2-B>=0,\\\"left\\\"!==t.idealAlign&&T||!z?T?(I+=D/2,t.anchor=\\\"start\\\"):t.anchor=\\\"middle\\\":(I-=D/2,t.anchor=\\\"end\\\")),b.attr(\\\"text-anchor\\\",t.anchor),A&&_.attr(\\\"text-anchor\\\",t.anchor),e.attr(\\\"transform\\\",\\\"translate(\\\"+I+\\\",\\\"+P+\\\")\\\"+(a?\\\"rotate(\\\"+m+\\\")\\\":\\\"\\\"))}),R}function A(t,e){t.each(function(t){var r=n.select(this);if(t.del)r.remove();else{var i=\\\"end\\\"===t.anchor?-1:1,a=r.select(\\\"text.nums\\\"),o={start:1,end:-1,middle:0}[t.anchor],s=o*(w+k),c=s+o*(t.txwidth+k),f=0,h=t.offset;\\\"middle\\\"===t.anchor&&(s-=t.tx2width/2,c+=t.txwidth/2+k),e&&(h*=-_,f=t.offset*b),r.select(\\\"path\\\").attr(\\\"d\\\",\\\"middle\\\"===t.anchor?\\\"M-\\\"+(t.bx/2+t.tx2width/2)+\\\",\\\"+(h-t.by/2)+\\\"h\\\"+t.bx+\\\"v\\\"+t.by+\\\"h-\\\"+t.bx+\\\"Z\\\":\\\"M0,0L\\\"+(i*w+f)+\\\",\\\"+(w+h)+\\\"v\\\"+(t.by/2-w)+\\\"h\\\"+i*t.bx+\\\"v-\\\"+t.by+\\\"H\\\"+(i*w+f)+\\\"V\\\"+(h-w)+\\\"Z\\\"),a.call(l.positionText,s+f,h+t.ty0-t.by/2+k),t.tx2width&&(r.select(\\\"text.name\\\").call(l.positionText,c+o*k+f,h+t.ty0-t.by/2+k),r.select(\\\"rect\\\").call(u.setRect,c+(o-1)*t.tx2width/2+f,h-t.by/2-1,t.tx2width,t.by+2))}})}function T(t,e){var r=t.index,n=t.trace||{},i=t.cd[0],a=t.cd[r]||{},s=Array.isArray(r)?function(t,e){return o.castOption(i,r,t)||o.extractOption({},n,\\\"\\\",e)}:function(t,e){return o.extractOption(a,n,t,e)};function l(e,r,n){var i=s(r,n);i&&(t[e]=i)}if(l(\\\"hoverinfo\\\",\\\"hi\\\",\\\"hoverinfo\\\"),l(\\\"bgcolor\\\",\\\"hbg\\\",\\\"hoverlabel.bgcolor\\\"),l(\\\"borderColor\\\",\\\"hbc\\\",\\\"hoverlabel.bordercolor\\\"),l(\\\"fontFamily\\\",\\\"htf\\\",\\\"hoverlabel.font.family\\\"),l(\\\"fontSize\\\",\\\"hts\\\",\\\"hoverlabel.font.size\\\"),l(\\\"fontColor\\\",\\\"htc\\\",\\\"hoverlabel.font.color\\\"),l(\\\"nameLength\\\",\\\"hnl\\\",\\\"hoverlabel.namelength\\\"),t.posref=\\\"y\\\"===e?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel=\\\"xLabel\\\"in t?t.xLabel:p.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel=\\\"yLabel\\\"in t?t.yLabel:p.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||\\\"log\\\"===t.xa.type&&t.xerr<=0)){var c=p.tickText(t.xa,t.xa.c2l(t.xerr),\\\"hover\\\").text;void 0!==t.xerrneg?t.xLabel+=\\\" +\\\"+c+\\\" / -\\\"+p.tickText(t.xa,t.xa.c2l(t.xerrneg),\\\"hover\\\").text:t.xLabel+=\\\" \\\\xb1 \\\"+c,\\\"x\\\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\\\"log\\\"===t.ya.type&&t.yerr<=0)){var u=p.tickText(t.ya,t.ya.c2l(t.yerr),\\\"hover\\\").text;void 0!==t.yerrneg?t.yLabel+=\\\" +\\\"+u+\\\" / -\\\"+p.tickText(t.ya,t.ya.c2l(t.yerrneg),\\\"hover\\\").text:t.yLabel+=\\\" \\\\xb1 \\\"+u,\\\"y\\\"===e&&(t.distance+=1)}var f=t.hoverinfo||t.trace.hoverinfo;return\\\"all\\\"!==f&&(-1===(f=Array.isArray(f)?f:f.split(\\\"+\\\")).indexOf(\\\"x\\\")&&(t.xLabel=void 0),-1===f.indexOf(\\\"y\\\")&&(t.yLabel=void 0),-1===f.indexOf(\\\"z\\\")&&(t.zLabel=void 0),-1===f.indexOf(\\\"text\\\")&&(t.text=void 0),-1===f.indexOf(\\\"name\\\")&&(t.name=void 0)),t}function S(t,e){var r,n,i=e.container,o=e.fullLayout,s=e.event,l=!!t.hLinePoint,c=!!t.vLinePoint;if(i.selectAll(\\\".spikeline\\\").remove(),c||l){var h=f.combine(o.plot_bgcolor,o.paper_bgcolor);if(l){var p,d,g=t.hLinePoint;r=g&&g.xa,\\\"cursor\\\"===(n=g&&g.ya).spikesnap?(p=s.pointerX,d=s.pointerY):(p=r._offset+g.x,d=n._offset+g.y);var v,m,y=a.readability(g.color,h)<1.5?f.contrast(h):g.color,x=n.spikemode,b=n.spikethickness,_=n.spikecolor||y,w=n._boundingBox,k=(w.left+w.right)/2<p?w.right:w.left;-1===x.indexOf(\\\"toaxis\\\")&&-1===x.indexOf(\\\"across\\\")||(-1!==x.indexOf(\\\"toaxis\\\")&&(v=k,m=p),-1!==x.indexOf(\\\"across\\\")&&(v=n._counterSpan[0],m=n._counterSpan[1]),i.insert(\\\"line\\\",\\\":first-child\\\").attr({x1:v,x2:m,y1:d,y2:d,\\\"stroke-width\\\":b,stroke:_,\\\"stroke-dasharray\\\":u.dashStyle(n.spikedash,b)}).classed(\\\"spikeline\\\",!0).classed(\\\"crisp\\\",!0),i.insert(\\\"line\\\",\\\":first-child\\\").attr({x1:v,x2:m,y1:d,y2:d,\\\"stroke-width\\\":b+2,stroke:h}).classed(\\\"spikeline\\\",!0).classed(\\\"crisp\\\",!0)),-1!==x.indexOf(\\\"marker\\\")&&i.insert(\\\"circle\\\",\\\":first-child\\\").attr({cx:k+(\\\"right\\\"!==n.side?b:-b),cy:d,r:b,fill:_}).classed(\\\"spikeline\\\",!0)}if(c){var M,A,T=t.vLinePoint;r=T&&T.xa,n=T&&T.ya,\\\"cursor\\\"===r.spikesnap?(M=s.pointerX,A=s.pointerY):(M=r._offset+T.x,A=n._offset+T.y);var S,C,E=a.readability(T.color,h)<1.5?f.contrast(h):T.color,L=r.spikemode,z=r.spikethickness,O=r.spikecolor||E,I=r._boundingBox,P=(I.top+I.bottom)/2<A?I.bottom:I.top;-1===L.indexOf(\\\"toaxis\\\")&&-1===L.indexOf(\\\"across\\\")||(-1!==L.indexOf(\\\"toaxis\\\")&&(S=P,C=A),-1!==L.indexOf(\\\"across\\\")&&(S=r._counterSpan[0],C=r._counterSpan[1]),i.insert(\\\"line\\\",\\\":first-child\\\").attr({x1:M,x2:M,y1:S,y2:C,\\\"stroke-width\\\":z,stroke:O,\\\"stroke-dasharray\\\":u.dashStyle(r.spikedash,z)}).classed(\\\"spikeline\\\",!0).classed(\\\"crisp\\\",!0),i.insert(\\\"line\\\",\\\":first-child\\\").attr({x1:M,x2:M,y1:S,y2:C,\\\"stroke-width\\\":z+2,stroke:h}).classed(\\\"spikeline\\\",!0).classed(\\\"crisp\\\",!0)),-1!==L.indexOf(\\\"marker\\\")&&i.insert(\\\"circle\\\",\\\":first-child\\\").attr({cx:M,cy:P-(\\\"top\\\"!==r.side?z:-z),r:z,fill:O}).classed(\\\"spikeline\\\",!0)}}}function C(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}r.hover=function(t,e,r,a){t=o.getGraphDiv(t),o.throttle(t._fullLayout._uid+v.HOVERID,v.HOVERMINTIME,function(){!function(t,e,r,a){r||(r=\\\"xy\\\");var l=Array.isArray(r)?r:[r],u=t._fullLayout,v=u._plots||[],m=v[r],y=u._has(\\\"cartesian\\\");if(m){var b=m.overlays.map(function(t){return t.id});l=l.concat(b)}for(var _=l.length,w=new Array(_),k=new Array(_),E=!1,L=0;L<_;L++){var z=l[L],O=v[z];if(O)E=!0,w[L]=p.getFromId(t,O.xaxis._id),k[L]=p.getFromId(t,O.yaxis._id);else{var I=u[z]._subplot;w[L]=I.xaxis,k[L]=I.yaxis}}var P=e.hovermode||u.hovermode;P&&!E&&(P=\\\"closest\\\");if(-1===[\\\"x\\\",\\\"y\\\",\\\"closest\\\"].indexOf(P)||!t.calcdata||t.querySelector(\\\".zoombox\\\")||t._dragging)return h.unhoverRaw(t,e);var D,R,B,F,N,j,V,U,q,H,G,W,Y,X=-1===u.hoverdistance?1/0:u.hoverdistance,Z=-1===u.spikedistance?1/0:u.spikedistance,$=[],J=[],K={hLinePoint:null,vLinePoint:null},Q=!1;if(Array.isArray(e))for(P=\\\"array\\\",B=0;B<e.length;B++)N=t.calcdata[e[B].curveNumber||0],j=N[0].trace,\\\"skip\\\"!==N[0].trace.hoverinfo&&(J.push(N),\\\"h\\\"===j.orientation&&(Q=!0));else{for(F=0;F<t.calcdata.length;F++)N=t.calcdata[F],\\\"skip\\\"!==(j=N[0].trace).hoverinfo&&g.isTraceInSubplots(j,l)&&(J.push(N),\\\"h\\\"===j.orientation&&(Q=!0));var tt,et,rt=!e.target;if(rt)tt=\\\"xpx\\\"in e?e.xpx:w[0]._length/2,et=\\\"ypx\\\"in e?e.ypx:k[0]._length/2;else{if(!1===s.triggerHandler(t,\\\"plotly_beforehover\\\",e))return;var nt=e.target.getBoundingClientRect();if(tt=e.clientX-nt.left,et=e.clientY-nt.top,tt<0||tt>w[0]._length||et<0||et>k[0]._length)return h.unhoverRaw(t,e)}if(e.pointerX=tt+w[0]._offset,e.pointerY=et+k[0]._offset,D=\\\"xval\\\"in e?g.flat(l,e.xval):g.p2c(w,tt),R=\\\"yval\\\"in e?g.flat(l,e.yval):g.p2c(k,et),!i(D[0])||!i(R[0]))return o.warn(\\\"Fx.hover failed\\\",e,t),h.unhoverRaw(t,e)}var it=1/0;for(F=0;F<J.length;F++)if((N=J[F])&&N[0]&&N[0].trace&&!0===N[0].trace.visible&&(j=N[0].trace,-1===[\\\"carpet\\\",\\\"contourcarpet\\\"].indexOf(j._module.name))){if(\\\"splom\\\"===j.type?V=l[U=0]:(V=g.getSubplot(j),U=l.indexOf(V)),q=P,W={cd:N,trace:j,xa:w[U],ya:k[U],maxHoverDistance:X,maxSpikeDistance:Z,index:!1,distance:Math.min(it,X),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:f.defaultLine,name:j.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},u[V]&&(W.subplot=u[V]._subplot),u._splomScenes&&u._splomScenes[j.uid]&&(W.scene=u._splomScenes[j.uid]),Y=$.length,\\\"array\\\"===q){var at=e[F];\\\"pointNumber\\\"in at?(W.index=at.pointNumber,q=\\\"closest\\\"):(q=\\\"\\\",\\\"xval\\\"in at&&(H=at.xval,q=\\\"x\\\"),\\\"yval\\\"in at&&(G=at.yval,q=q?\\\"closest\\\":\\\"y\\\"))}else H=D[U],G=R[U];if(0!==X)if(j._module&&j._module.hoverPoints){var ot=j._module.hoverPoints(W,H,G,q,u._hoverlayer);if(ot)for(var st,lt=0;lt<ot.length;lt++)st=ot[lt],i(st.x0)&&i(st.y0)&&$.push(T(st,P))}else o.log(\\\"Unrecognized trace type in hover:\\\",j);if(\\\"closest\\\"===P&&$.length>Y&&($.splice(0,Y),it=$[0].distance),y&&0!==Z&&0===$.length){W.distance=Z,W.index=!1;var ct=j._module.hoverPoints(W,H,G,\\\"closest\\\",u._hoverlayer);if(ct&&(ct=ct.filter(function(t){return t.spikeDistance<=Z})),ct&&ct.length){var ut,ft=ct.filter(function(t){return t.xa.showspikes});if(ft.length){var ht=ft[0];i(ht.x0)&&i(ht.y0)&&(ut=vt(ht),(!K.vLinePoint||K.vLinePoint.spikeDistance>ut.spikeDistance)&&(K.vLinePoint=ut))}var pt=ct.filter(function(t){return t.ya.showspikes});if(pt.length){var dt=pt[0];i(dt.x0)&&i(dt.y0)&&(ut=vt(dt),(!K.hLinePoint||K.hLinePoint.spikeDistance>ut.spikeDistance)&&(K.hLinePoint=ut))}}}}function gt(t,e){for(var r,n=null,i=1/0,a=0;a<t.length;a++)(r=t[a].spikeDistance)<i&&r<=e&&(n=t[a],i=r);return n}function vt(t){return t?{xa:t.xa,ya:t.ya,x:void 0!==t.xSpike?t.xSpike:(t.x0+t.x1)/2,y:void 0!==t.ySpike?t.ySpike:(t.y0+t.y1)/2,distance:t.distance,spikeDistance:t.spikeDistance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}var mt={fullLayout:u,container:u._hoverlayer,outerContainer:u._paperdiv,event:e},yt=t._spikepoints,xt={vLinePoint:K.vLinePoint,hLinePoint:K.hLinePoint};if(t._spikepoints=xt,y&&0!==Z&&0!==$.length){var bt=$.filter(function(t){return t.ya.showspikes}),_t=gt(bt,Z);K.hLinePoint=vt(_t);var wt=$.filter(function(t){return t.xa.showspikes}),kt=gt(wt,Z);K.vLinePoint=vt(kt)}if(0===$.length){var Mt=h.unhoverRaw(t,e);return!y||null===K.hLinePoint&&null===K.vLinePoint||C(yt)&&S(K,mt),Mt}y&&C(yt)&&S(K,mt);$.sort(function(t,e){return t.distance-e.distance});var At=t._hoverdata,Tt=[];for(B=0;B<$.length;B++){var St=$[B];Tt.push(g.makeEventData(St,St.trace,St.cd))}t._hoverdata=Tt;var Ct=\\\"y\\\"===P&&(J.length>1||$.length>1)||\\\"closest\\\"===P&&Q&&$.length>1,Et=f.combine(u.plot_bgcolor||f.background,u.paper_bgcolor),Lt={hovermode:P,rotateLabels:Ct,bgColor:Et,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},zt=M($,Lt,t);if(function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.map(function(t,n){var i=t[e],a=\\\"x\\\"===i._id.charAt(0),o=i.range;return!n&&o&&o[0]>o[1]!==a&&(f=-1),[{i:n,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?x:1)/2,pmin:0,pmax:a?r.width:r.height}]}).sort(function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)});function p(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var c=0;for(o=0;o<t.length;o++)(l=t[o]).pos+l.dp+l.size>e.pmax&&c++;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos>e.pmax-1&&(l.del=!0,c--);for(o=0;o<t.length&&!(c<=0);o++)if((l=t[o]).pos<e.pmin+1)for(l.del=!0,c--,a=2*l.size,s=t.length-1;s>=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,c--)}}}for(;!n&&u<=t.length;){for(u++,n=!0,o=0;o<h.length-1;){var d=h[o],g=h[o+1],v=d[d.length-1],m=g[0];if((i=v.pos+v.dp+v.size-m.pos-m.dp+m.size)>.01&&v.pmin===m.pmin&&v.pmax===m.pmax){for(s=g.length-1;s>=0;s--)g[s].dp+=i;for(d.push.apply(d,g),h.splice(o+1,1),c=0,s=d.length-1;s>=0;s--)c+=d[s].dp;for(a=c/d.length,s=d.length-1;s>=0;s--)d[s].dp-=a;n=!1}else o++}h.forEach(p)}for(o=h.length-1;o>=0;o--){var y=h[o];for(s=y.length-1;s>=0;s--){var b=y[s],_=t[b.i];_.offset=b.dp,_.del=b.del}}}($,Ct?\\\"xa\\\":\\\"ya\\\",u),A(zt,Ct),e.target&&e.target.tagName){var Ot=d.getComponentMethod(\\\"annotations\\\",\\\"hasClickToShow\\\")(t,Tt);c(n.select(e.target),Ot?\\\"pointer\\\":\\\"\\\")}if(!e.target||a||!function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber))return!0}return!1}(t,0,At))return;At&&t.emit(\\\"plotly_unhover\\\",{event:e,points:At});t.emit(\\\"plotly_hover\\\",{event:e,points:t._hoverdata,xaxes:w,yaxes:k,xvals:D,yvals:R})}(t,e,r,a)})},r.loneHover=function(t,e){var r={color:t.color||f.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,trace:{index:0,hoverinfo:\\\"\\\"},xa:{_offset:0},ya:{_offset:0},index:0},i=n.select(e.container),a=e.outerContainer?n.select(e.outerContainer):i,o={hovermode:\\\"closest\\\",rotateLabels:!1,bgColor:e.bgColor||f.background,container:i,outerContainer:a},s=M([r],o,e.gd);return A(s,o.rotateLabels),s.node()},r.multiHovers=function(t,e){Array.isArray(t)||(t=[t]);var r=t.map(function(t){return{color:t.color||f.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,trace:{index:0,hoverinfo:\\\"\\\"},xa:{_offset:0},ya:{_offset:0},index:0}}),i=n.select(e.container),a=e.outerContainer?n.select(e.outerContainer):i,o={hovermode:\\\"closest\\\",rotateLabels:!1,bgColor:e.bgColor||f.background,container:i,outerContainer:a},s=M(r,o,e.gd),l=0;return s.sort(function(t,e){return t.y0-e.y0}).each(function(t){var e=t.y0-t.by/2;t.offset=e-5<l?l-e+5:0,l=e+t.by+t.offset}),A(s,o.rotateLabels),s.node()}},{\\\"../../lib\\\":696,\\\"../../lib/events\\\":684,\\\"../../lib/override_cursor\\\":708,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"./constants\\\":607,\\\"./helpers\\\":609,d3:148,\\\"fast-isnumeric\\\":214,tinycolor2:514}],611:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e,r,i){r(\\\"hoverlabel.bgcolor\\\",(i=i||{}).bgcolor),r(\\\"hoverlabel.bordercolor\\\",i.bordercolor),r(\\\"hoverlabel.namelength\\\",i.namelength),n.coerceFont(r,\\\"hoverlabel.font\\\",i.font)}},{\\\"../../lib\\\":696}],612:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../dragelement\\\"),o=t(\\\"./helpers\\\"),s=t(\\\"./layout_attributes\\\"),l=t(\\\"./hover\\\");e.exports={moduleType:\\\"component\\\",name:\\\"fx\\\",constants:t(\\\"./constants\\\"),schema:{layout:s},attributes:t(\\\"./attributes\\\"),layoutAttributes:s,supplyLayoutGlobalDefaults:t(\\\"./layout_global_defaults\\\"),supplyDefaults:t(\\\"./defaults\\\"),supplyLayoutDefaults:t(\\\"./layout_defaults\\\"),calc:t(\\\"./calc\\\"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,\\\"hoverlabel.\\\"+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,\\\"hoverinfo\\\",function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)})},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,multiHovers:l.multiHovers,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll(\\\"g.hovertext\\\").remove(),e.selectAll(\\\".spikeline\\\").remove()},click:t(\\\"./click\\\")}},{\\\"../../lib\\\":696,\\\"../dragelement\\\":592,\\\"./attributes\\\":604,\\\"./calc\\\":605,\\\"./click\\\":606,\\\"./constants\\\":607,\\\"./defaults\\\":608,\\\"./helpers\\\":609,\\\"./hover\\\":610,\\\"./layout_attributes\\\":613,\\\"./layout_defaults\\\":614,\\\"./layout_global_defaults\\\":615,d3:148}],613:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"../../plots/font_attributes\\\")({editType:\\\"none\\\"});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:\\\"flaglist\\\",flags:[\\\"event\\\",\\\"select\\\"],dflt:\\\"event\\\",editType:\\\"plot\\\",extras:[\\\"none\\\"]},dragmode:{valType:\\\"enumerated\\\",values:[\\\"zoom\\\",\\\"pan\\\",\\\"select\\\",\\\"lasso\\\",\\\"orbit\\\",\\\"turntable\\\"],dflt:\\\"zoom\\\",editType:\\\"modebar\\\"},hovermode:{valType:\\\"enumerated\\\",values:[\\\"x\\\",\\\"y\\\",\\\"closest\\\",!1],editType:\\\"modebar\\\"},hoverdistance:{valType:\\\"integer\\\",min:-1,dflt:20,editType:\\\"none\\\"},spikedistance:{valType:\\\"integer\\\",min:-1,dflt:20,editType:\\\"none\\\"},hoverlabel:{bgcolor:{valType:\\\"color\\\",editType:\\\"none\\\"},bordercolor:{valType:\\\"color\\\",editType:\\\"none\\\"},font:i,namelength:{valType:\\\"integer\\\",min:-1,dflt:15,editType:\\\"none\\\"},editType:\\\"none\\\"},selectdirection:{valType:\\\"enumerated\\\",values:[\\\"h\\\",\\\"v\\\",\\\"d\\\",\\\"any\\\"],dflt:\\\"any\\\",editType:\\\"none\\\"}}},{\\\"../../plots/font_attributes\\\":772,\\\"./constants\\\":607}],614:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}var o,s=a(\\\"clickmode\\\");\\\"select\\\"===a(\\\"dragmode\\\")&&a(\\\"selectdirection\\\"),e._has(\\\"cartesian\\\")?s.indexOf(\\\"select\\\")>-1?o=\\\"closest\\\":(e._isHoriz=function(t){for(var e=!0,r=0;r<t.length;r++){var n=t[r];if(\\\"h\\\"!==n.orientation){e=!1;break}}return e}(r),o=e._isHoriz?\\\"y\\\":\\\"x\\\"):o=\\\"closest\\\",a(\\\"hovermode\\\",o)&&(a(\\\"hoverdistance\\\"),a(\\\"spikedistance\\\"));var l=e._has(\\\"mapbox\\\"),c=e._has(\\\"geo\\\"),u=e._basePlotModules.length;\\\"zoom\\\"===e.dragmode&&((l||c)&&1===u||l&&c&&2===u)&&(e.dragmode=\\\"pan\\\")}},{\\\"../../lib\\\":696,\\\"./layout_attributes\\\":613}],615:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./hoverlabel_defaults\\\"),a=t(\\\"./layout_attributes\\\");e.exports=function(t,e){i(t,e,function(r,i){return n.coerce(t,e,a,r,i)})}},{\\\"../../lib\\\":696,\\\"./hoverlabel_defaults\\\":611,\\\"./layout_attributes\\\":613}],616:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../lib/regex\\\").counter,a=t(\\\"../../plots/domain\\\").attributes,o=t(\\\"../../plots/cartesian/constants\\\").idRegex,s=t(\\\"../../plot_api/plot_template\\\"),l={rows:{valType:\\\"integer\\\",min:1,editType:\\\"plot\\\"},roworder:{valType:\\\"enumerated\\\",values:[\\\"top to bottom\\\",\\\"bottom to top\\\"],dflt:\\\"top to bottom\\\",editType:\\\"plot\\\"},columns:{valType:\\\"integer\\\",min:1,editType:\\\"plot\\\"},subplots:{valType:\\\"info_array\\\",freeLength:!0,dimensions:2,items:{valType:\\\"enumerated\\\",values:[i(\\\"xy\\\").toString(),\\\"\\\"],editType:\\\"plot\\\"},editType:\\\"plot\\\"},xaxes:{valType:\\\"info_array\\\",freeLength:!0,items:{valType:\\\"enumerated\\\",values:[o.x.toString(),\\\"\\\"],editType:\\\"plot\\\"},editType:\\\"plot\\\"},yaxes:{valType:\\\"info_array\\\",freeLength:!0,items:{valType:\\\"enumerated\\\",values:[o.y.toString(),\\\"\\\"],editType:\\\"plot\\\"},editType:\\\"plot\\\"},pattern:{valType:\\\"enumerated\\\",values:[\\\"independent\\\",\\\"coupled\\\"],dflt:\\\"coupled\\\",editType:\\\"plot\\\"},xgap:{valType:\\\"number\\\",min:0,max:1,editType:\\\"plot\\\"},ygap:{valType:\\\"number\\\",min:0,max:1,editType:\\\"plot\\\"},domain:a({name:\\\"grid\\\",editType:\\\"plot\\\",noGridCell:!0},{}),xside:{valType:\\\"enumerated\\\",values:[\\\"bottom\\\",\\\"bottom plot\\\",\\\"top plot\\\",\\\"top\\\"],dflt:\\\"bottom plot\\\",editType:\\\"plot\\\"},yside:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"left plot\\\",\\\"right plot\\\",\\\"right\\\"],dflt:\\\"left plot\\\",editType:\\\"plot\\\"},editType:\\\"plot\\\"};function c(t,e,r){var n=e[r+\\\"axes\\\"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(t,e,r,n,i,a){var o=e(t+\\\"gap\\\",r),s=e(\\\"domain.\\\"+t);e(t+\\\"side\\\",n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-o),f=u*(1-o),h=0;h<i;h++){var p=c+u*h;l[a?i-1-h:h]=[p,p+f]}return l}function f(t,e,r,n,i){var a,o=new Array(r);function s(t,r){-1!==e.indexOf(r)&&void 0===n[r]?(o[t]=r,n[r]=t):o[t]=\\\"\\\"}if(Array.isArray(t))for(a=0;a<r;a++)s(a,t[a]);else for(s(0,i),a=1;a<r;a++)s(a,i+(a+1));return o}e.exports={moduleType:\\\"component\\\",name:\\\"grid\\\",schema:{layout:{grid:l}},layoutAttributes:l,sizeDefaults:function(t,e){var r=t.grid||{},i=c(e,r,\\\"x\\\"),a=c(e,r,\\\"y\\\");if(t.grid||i||a){var o,f,h=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),p=Array.isArray(i),d=Array.isArray(a),g=p&&i!==r.xaxes&&d&&a!==r.yaxes;h?(o=r.subplots.length,f=r.subplots[0].length):(d&&(o=a.length),p&&(f=i.length));var v=s.newContainer(e,\\\"grid\\\"),m=M(\\\"rows\\\",o),y=M(\\\"columns\\\",f);if(m*y>1){h||p||d||\\\"independent\\\"===M(\\\"pattern\\\")&&(h=!0),v._hasSubplotGrid=h;var x,b,_=\\\"top to bottom\\\"===M(\\\"roworder\\\"),w=h?.2:.1,k=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),v._domains={x:u(\\\"x\\\",M,w,x,y),y:u(\\\"y\\\",M,k,b,m,_)}}else delete e.grid}function M(t,e){return n.coerce(r,v,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,u,h=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,g=r.rows,v=r.columns,m=\\\"independent\\\"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n<g;n++){var _=l[n]=new Array(v),w=x[n]||[];for(i=0;i<v;i++)if(m?(s=1===b?\\\"xy\\\":\\\"x\\\"+b+\\\"y\\\"+b,b++):s=w[i],_[i]=\\\"\\\",-1!==p.cartesian.indexOf(s)){if(u=s.indexOf(\\\"y\\\"),a=s.slice(0,u),o=s.slice(u),void 0!==y[a]&&y[a]!==i||void 0!==y[o]&&y[o]!==n)continue;_[i]=s,y[a]=i,y[o]=n}}}else{var k=c(e,h,\\\"x\\\"),M=c(e,h,\\\"y\\\");r.xaxes=f(k,p.xaxis,v,y,\\\"x\\\"),r.yaxes=f(M,p.yaxis,g,y,\\\"y\\\")}var A=r._anchors={},T=\\\"top to bottom\\\"===r.roworder;for(var S in y){var C,E,L,z=S.charAt(0),O=r[z+\\\"side\\\"];if(O.length<8)A[S]=\\\"free\\\";else if(\\\"x\\\"===z){if(\\\"t\\\"===O.charAt(0)===T?(C=0,E=1,L=g):(C=g-1,E=-1,L=-1),d){var I=y[S];for(n=C;n!==L;n+=E)if((s=l[n][I])&&(u=s.indexOf(\\\"y\\\"),s.slice(0,u)===S)){A[S]=s.slice(u);break}}else for(n=C;n!==L;n+=E)if(o=r.yaxes[n],-1!==p.cartesian.indexOf(S+o)){A[S]=o;break}}else if(\\\"l\\\"===O.charAt(0)?(C=0,E=1,L=v):(C=v-1,E=-1,L=-1),d){var P=y[S];for(n=C;n!==L;n+=E)if((s=l[P][n])&&(u=s.indexOf(\\\"y\\\"),s.slice(u)===S)){A[S]=s.slice(0,u);break}}else for(n=C;n!==L;n+=E)if(a=r.xaxes[n],-1!==p.cartesian.indexOf(a+S)){A[S]=a;break}}}}}},{\\\"../../lib\\\":696,\\\"../../lib/regex\\\":713,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/constants\\\":751,\\\"../../plots/domain\\\":771}],617:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/constants\\\"),i=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports=i(\\\"image\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"arraydraw\\\"},source:{valType:\\\"string\\\",editType:\\\"arraydraw\\\"},layer:{valType:\\\"enumerated\\\",values:[\\\"below\\\",\\\"above\\\"],dflt:\\\"above\\\",editType:\\\"arraydraw\\\"},sizex:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},sizey:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},sizing:{valType:\\\"enumerated\\\",values:[\\\"fill\\\",\\\"contain\\\",\\\"stretch\\\"],dflt:\\\"contain\\\",editType:\\\"arraydraw\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,editType:\\\"arraydraw\\\"},x:{valType:\\\"any\\\",dflt:0,editType:\\\"arraydraw\\\"},y:{valType:\\\"any\\\",dflt:0,editType:\\\"arraydraw\\\"},xanchor:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\",editType:\\\"arraydraw\\\"},yanchor:{valType:\\\"enumerated\\\",values:[\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"top\\\",editType:\\\"arraydraw\\\"},xref:{valType:\\\"enumerated\\\",values:[\\\"paper\\\",n.idRegex.x.toString()],dflt:\\\"paper\\\",editType:\\\"arraydraw\\\"},yref:{valType:\\\"enumerated\\\",values:[\\\"paper\\\",n.idRegex.y.toString()],dflt:\\\"paper\\\",editType:\\\"arraydraw\\\"},editType:\\\"arraydraw\\\"})},{\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/constants\\\":751}],618:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib/to_log_range\\\");e.exports=function(t,e,r,a){e=e||{};var o=\\\"log\\\"===r&&\\\"linear\\\"===e.type,s=\\\"linear\\\"===r&&\\\"log\\\"===e.type;if(o||s)for(var l,c,u=t._fullLayout.images,f=e._id.charAt(0),h=0;h<u.length;h++)if(c=\\\"images[\\\"+h+\\\"].\\\",(l=u[h])[f+\\\"ref\\\"]===e._id){var p=l[f],d=l[\\\"size\\\"+f],g=null,v=null;if(o){g=i(p,e.range);var m=d/Math.pow(10,g)/2;v=2*Math.log(m+Math.sqrt(1+m*m))/Math.LN10}else v=(g=Math.pow(10,p))*(Math.pow(10,d/2)-Math.pow(10,-d/2));n(g)?n(v)||(v=null):(g=null,v=null),a(c+f,g),a(c+\\\"size\\\"+f,v)}}},{\\\"../../lib/to_log_range\\\":723,\\\"fast-isnumeric\\\":214}],619:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../plots/array_container_defaults\\\"),o=t(\\\"./attributes\\\");function s(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var s=a(\\\"source\\\");if(!a(\\\"visible\\\",!!s))return e;a(\\\"layer\\\"),a(\\\"xanchor\\\"),a(\\\"yanchor\\\"),a(\\\"sizex\\\"),a(\\\"sizey\\\"),a(\\\"sizing\\\"),a(\\\"opacity\\\");for(var l={_fullLayout:r},c=[\\\"x\\\",\\\"y\\\"],u=0;u<2;u++){var f=c[u],h=i.coerceRef(t,e,l,f,\\\"paper\\\");i.coercePosition(e,l,a,h,f,0)}return e}e.exports=function(t,e){a(t,e,{name:\\\"images\\\",handleItemDefaults:s})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/cartesian/axes\\\":745,\\\"./attributes\\\":617}],620:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../drawing\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../../constants/xmlns_namespaces\\\");e.exports=function(t){var e,r,s=t._fullLayout,l=[],c={},u=[];for(r=0;r<s.images.length;r++){var f=s.images[r];if(f.visible)if(\\\"below\\\"===f.layer&&\\\"paper\\\"!==f.xref&&\\\"paper\\\"!==f.yref){e=f.xref+f.yref;var h=s._plots[e];if(!h){u.push(f);continue}h.mainplot&&(e=h.mainplot.id),c[e]||(c[e]=[]),c[e].push(f)}else\\\"above\\\"===f.layer?l.push(f):u.push(f)}var p={x:{left:{sizing:\\\"xMin\\\",offset:0},center:{sizing:\\\"xMid\\\",offset:-.5},right:{sizing:\\\"xMax\\\",offset:-1}},y:{top:{sizing:\\\"YMin\\\",offset:0},middle:{sizing:\\\"YMid\\\",offset:-.5},bottom:{sizing:\\\"YMax\\\",offset:-1}}};function d(e){var r=n.select(this);if(!this.img||this.img.src!==e.source){r.attr(\\\"xmlns\\\",o.svg);var i=new Promise(function(t){var n=new Image;function i(){r.remove(),t()}this.img=n,n.setAttribute(\\\"crossOrigin\\\",\\\"anonymous\\\"),n.onerror=i,n.onload=function(){var e=document.createElement(\\\"canvas\\\");e.width=this.width,e.height=this.height,e.getContext(\\\"2d\\\").drawImage(this,0,0);var n=e.toDataURL(\\\"image/png\\\");r.attr(\\\"xlink:href\\\",n),t()},r.on(\\\"error\\\",i),n.src=e.source}.bind(this));t._promises.push(i)}}function g(e){var r=n.select(this),o=a.getFromId(t,e.xref),l=a.getFromId(t,e.yref),c=s._size,u=o?Math.abs(o.l2p(e.sizex)-o.l2p(0)):e.sizex*c.w,f=l?Math.abs(l.l2p(e.sizey)-l.l2p(0)):e.sizey*c.h,h=u*p.x[e.xanchor].offset,d=f*p.y[e.yanchor].offset,g=p.x[e.xanchor].sizing+p.y[e.yanchor].sizing,v=(o?o.r2p(e.x)+o._offset:e.x*c.w+c.l)+h,m=(l?l.r2p(e.y)+l._offset:c.h-e.y*c.h+c.t)+d;switch(e.sizing){case\\\"fill\\\":g+=\\\" slice\\\";break;case\\\"stretch\\\":g=\\\"none\\\"}r.attr({x:v,y:m,width:u,height:f,preserveAspectRatio:g,opacity:e.opacity});var y=(o?o._id:\\\"\\\")+(l?l._id:\\\"\\\");r.call(i.setClipUrl,y?\\\"clip\\\"+s._uid+y:null)}var v=s._imageLowerLayer.selectAll(\\\"image\\\").data(u),m=s._imageUpperLayer.selectAll(\\\"image\\\").data(l);v.enter().append(\\\"image\\\"),m.enter().append(\\\"image\\\"),v.exit().remove(),m.exit().remove(),v.each(function(t){d.bind(this)(t),g.bind(this)(t)}),m.each(function(t){d.bind(this)(t),g.bind(this)(t)});var y=Object.keys(s._plots);for(r=0;r<y.length;r++){e=y[r];var x=s._plots[e];if(x.imagelayer){var b=x.imagelayer.selectAll(\\\"image\\\").data(c[e]||[]);b.enter().append(\\\"image\\\"),b.exit().remove(),b.each(function(t){d.bind(this)(t),g.bind(this)(t)})}}}},{\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../plots/cartesian/axes\\\":745,\\\"../drawing\\\":595,d3:148}],621:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"component\\\",name:\\\"images\\\",layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),includeBasePlot:t(\\\"../../plots/cartesian/include_components\\\")(\\\"images\\\"),draw:t(\\\"./draw\\\"),convertCoords:t(\\\"./convert_coords\\\")}},{\\\"../../plots/cartesian/include_components\\\":756,\\\"./attributes\\\":617,\\\"./convert_coords\\\":618,\\\"./defaults\\\":619,\\\"./draw\\\":620}],622:[function(t,e,r){\\\"use strict\\\";r.isRightAnchor=function(t){return\\\"right\\\"===t.xanchor||\\\"auto\\\"===t.xanchor&&t.x>=2/3},r.isCenterAnchor=function(t){return\\\"center\\\"===t.xanchor||\\\"auto\\\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isBottomAnchor=function(t){return\\\"bottom\\\"===t.yanchor||\\\"auto\\\"===t.yanchor&&t.y<=1/3},r.isMiddleAnchor=function(t){return\\\"middle\\\"===t.yanchor||\\\"auto\\\"===t.yanchor&&t.y>1/3&&t.y<2/3}},{}],623:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../color/attributes\\\");e.exports={bgcolor:{valType:\\\"color\\\",editType:\\\"legend\\\"},bordercolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"legend\\\"},borderwidth:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"legend\\\"},font:n({editType:\\\"legend\\\"}),orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],dflt:\\\"v\\\",editType:\\\"legend\\\"},traceorder:{valType:\\\"flaglist\\\",flags:[\\\"reversed\\\",\\\"grouped\\\"],extras:[\\\"normal\\\"],editType:\\\"legend\\\"},tracegroupgap:{valType:\\\"number\\\",min:0,dflt:10,editType:\\\"legend\\\"},x:{valType:\\\"number\\\",min:-2,max:3,dflt:1.02,editType:\\\"legend\\\"},xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\",editType:\\\"legend\\\"},y:{valType:\\\"number\\\",min:-2,max:3,dflt:1,editType:\\\"legend\\\"},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"auto\\\",editType:\\\"legend\\\"},editType:\\\"legend\\\"}},{\\\"../../plots/font_attributes\\\":772,\\\"../color/attributes\\\":569}],624:[function(t,e,r){\\\"use strict\\\";e.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:\\\"#808BA4\\\",scrollBarMargin:4,textOffsetX:40}},{}],625:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plot_api/plot_template\\\"),o=t(\\\"./attributes\\\"),s=t(\\\"../../plots/layout_attributes\\\"),l=t(\\\"./helpers\\\");e.exports=function(t,e,r){for(var c,u,f,h,p=t.legend||{},d=0,g=!1,v=\\\"normal\\\",m=0;m<r.length;m++){var y=r[m];y.visible&&((y.showlegend||y._dfltShowLegend)&&(d++,y.showlegend&&(g=!0,(n.traceIs(y,\\\"pie\\\")||!0===y._input.showlegend)&&d++)),(n.traceIs(y,\\\"bar\\\")&&\\\"stack\\\"===e.barmode||-1!==[\\\"tonextx\\\",\\\"tonexty\\\"].indexOf(y.fill))&&(v=l.isGrouped({traceorder:v})?\\\"grouped+reversed\\\":\\\"reversed\\\"),void 0!==y.legendgroup&&\\\"\\\"!==y.legendgroup&&(v=l.isReversed({traceorder:v})?\\\"reversed+grouped\\\":\\\"grouped\\\"))}if(!1!==i.coerce(t,e,s,\\\"showlegend\\\",g&&d>1)){var x=a.newContainer(e,\\\"legend\\\");if(_(\\\"bgcolor\\\",e.paper_bgcolor),_(\\\"bordercolor\\\"),_(\\\"borderwidth\\\"),i.coerceFont(_,\\\"font\\\",e.font),_(\\\"orientation\\\"),\\\"h\\\"===x.orientation){var b=t.xaxis;b&&b.rangeslider&&b.rangeslider.visible?(c=0,f=\\\"left\\\",u=1.1,h=\\\"bottom\\\"):(c=0,f=\\\"left\\\",u=-.1,h=\\\"top\\\")}_(\\\"traceorder\\\",v),l.isGrouped(e.legend)&&_(\\\"tracegroupgap\\\"),_(\\\"x\\\",c),_(\\\"xanchor\\\",f),_(\\\"y\\\",u),_(\\\"yanchor\\\",h),i.noneOrAll(p,x,[\\\"x\\\",\\\"y\\\"])}function _(t,e){return i.coerce(p,x,o,t,e)}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/layout_attributes\\\":800,\\\"../../registry\\\":828,\\\"./attributes\\\":623,\\\"./helpers\\\":629}],626:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib/events\\\"),l=t(\\\"../dragelement\\\"),c=t(\\\"../drawing\\\"),u=t(\\\"../color\\\"),f=t(\\\"../../lib/svg_text_utils\\\"),h=t(\\\"./handle_click\\\"),p=t(\\\"./constants\\\"),d=t(\\\"../../constants/interactions\\\"),g=t(\\\"../../constants/alignment\\\"),v=g.LINE_SPACING,m=g.FROM_TL,y=g.FROM_BR,x=t(\\\"./get_legend_data\\\"),b=t(\\\"./style\\\"),_=t(\\\"./helpers\\\"),w=t(\\\"./anchor_utils\\\"),k=d.DBLCLICKDELAY;function M(t,e,r,n,i){var a=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};if(a._group&&(o.group=a._group),\\\"pie\\\"===a.type&&(o.label=r.datum()[0].label),!1!==s.triggerHandler(t,\\\"plotly_legendclick\\\",o))if(1===n)e._clickTimeout=setTimeout(function(){h(r,t,n)},k);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,\\\"plotly_legenddoubleclick\\\",o)&&h(r,t,n)}}function A(t,e,r){var n=t.data()[0][0],a=e._fullLayout,s=n.trace,l=o.traceIs(s,\\\"pie\\\"),u=s.index,h=l?n.label:s.name,d=e._context.edits.legendText&&!l,g=i.ensureSingle(t,\\\"text\\\",\\\"legendtext\\\");function m(r){f.convertToTspans(r,e,function(){!function(t,e){var r=t.data()[0][0];if(!r.trace.showlegend)return void t.remove();var n,i,a=t.select(\\\"g[class*=math-group]\\\"),o=a.node(),s=e._fullLayout.legend.font.size*v;if(o){var l=c.bBox(o);n=l.height,i=l.width,c.setTranslate(a,0,n/4)}else{var u=t.select(\\\".legendtext\\\"),h=f.lineCount(u),d=u.node();n=s*h,i=d?c.bBox(d).width:0;var g=s*(.3+(1-h)/2);f.positionText(u,p.textOffsetX,g)}n=Math.max(n,16)+3,r.height=n,r.width=i}(t,e)})}g.attr(\\\"text-anchor\\\",\\\"start\\\").classed(\\\"user-select-none\\\",!0).call(c.font,a.legend.font).text(d?T(h,r):h),f.positionText(g,p.textOffsetX,0),d?g.call(f.makeEditable,{gd:e,text:h}).call(m).on(\\\"edit\\\",function(t){this.text(T(t,r)).call(m);var a=n.trace._fullInput||{},s={};if(o.hasTransform(a,\\\"groupby\\\")){var l=o.getTransformIndices(a,\\\"groupby\\\"),c=l[l.length-1],f=i.keyedContainer(a,\\\"transforms[\\\"+c+\\\"].styles\\\",\\\"target\\\",\\\"value.name\\\");f.set(n.trace._group,t),s=f.constructUpdate()}else s.name=t;return o.call(\\\"restyle\\\",e,s,u)}):m(g)}function T(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||\\\"\\\").length;n>0;n--)t+=\\\" \\\";return t}function S(t,e){var r,a=1,o=i.ensureSingle(t,\\\"rect\\\",\\\"legendtoggle\\\",function(t){t.style(\\\"cursor\\\",\\\"pointer\\\").attr(\\\"pointer-events\\\",\\\"all\\\").call(u.fill,\\\"rgba(0,0,0,0)\\\")});o.on(\\\"mousedown\\\",function(){(r=(new Date).getTime())-e._legendMouseDownTime<k?a+=1:(a=1,e._legendMouseDownTime=r)}),o.on(\\\"mouseup\\\",function(){if(!e._dragged&&!e._editing){var r=e._fullLayout.legend;(new Date).getTime()-e._legendMouseDownTime>k&&(a=Math.max(a-1,1)),M(e,r,t,a,n.event)}})}function C(t,e,r){var i=t._fullLayout,a=i.legend,o=a.borderwidth,s=_.isGrouped(a),l=0;if(a._width=0,a._height=0,_.isVertical(a))s&&e.each(function(t,e){c.setTranslate(this,0,e*a.tracegroupgap)}),r.each(function(t){var e=t[0],r=e.height,n=e.width;c.setTranslate(this,o,5+o+a._height+r/2),a._height+=r,a._width=Math.max(a._width,n)}),a._width+=45+2*o,a._height+=10+2*o,s&&(a._height+=(a._lgroupsLength-1)*a.tracegroupgap),l=40;else if(s){for(var u=[a._width],f=e.data(),h=0,p=f.length;h<p;h++){var d=f[h].map(function(t){return t[0].width}),g=40+Math.max.apply(null,d);a._width+=a.tracegroupgap+g,u.push(a._width)}e.each(function(t,e){c.setTranslate(this,u[e],0)}),e.each(function(){var t=n.select(this).selectAll(\\\"g.traces\\\"),e=0;t.each(function(t){var r=t[0].height;c.setTranslate(this,0,5+o+e+r/2),e+=r}),a._height=Math.max(a._height,e)}),a._height+=10+2*o,a._width+=2*o}else{var v,m=0,y=0,x=0,b=0,w=0,k=a.tracegroupgap||5;r.each(function(t){x=Math.max(40+t[0].width,x),w+=40+t[0].width+k}),v=i._size.w>o+w-k,r.each(function(t){var e=t[0],r=v?40+t[0].width:x;o+b+k+r>i._size.w&&(b=0,m+=y,a._height=a._height+y,y=0),c.setTranslate(this,o+b,5+o+e.height/2+m),a._width+=k+r,a._height=Math.max(a._height,e.height),b+=k+r,y=Math.max(e.height,y)}),a._width+=2*o,a._height+=10+2*o}a._width=Math.ceil(a._width),a._height=Math.ceil(a._height);var M=t._context.edits.legendText||t._context.edits.legendPosition;r.each(function(t){var e=t[0],r=n.select(this).select(\\\".legendtoggle\\\");c.setRect(r,0,-e.height/2,(M?0:a._width)+l,e.height)})}function E(t){var e=t._fullLayout.legend,r=\\\"left\\\";w.isRightAnchor(e)?r=\\\"right\\\":w.isCenterAnchor(e)&&(r=\\\"center\\\");var n=\\\"top\\\";w.isBottomAnchor(e)?n=\\\"bottom\\\":w.isMiddleAnchor(e)&&(n=\\\"middle\\\"),a.autoMargin(t,\\\"legend\\\",{x:e.x,y:e.y,l:e._width*m[r],r:e._width*y[r],b:e._height*y[n],t:e._height*m[n]})}e.exports=function(t){var e=t._fullLayout,r=\\\"legend\\\"+e._uid;if(e._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var s=e.legend,f=e.showlegend&&x(t.calcdata,s),h=e.hiddenlabels||[];if(!e.showlegend||!f.length)return e._infolayer.selectAll(\\\".legend\\\").remove(),e._topdefs.select(\\\"#\\\"+r).remove(),void a.autoMargin(t,\\\"legend\\\");for(var d=0,g=0;g<f.length;g++)for(var v=0;v<f[g].length;v++){var _=f[g][v][0],k=_.trace,T=o.traceIs(k,\\\"pie\\\")?_.label:k.name;d=Math.max(d,T&&T.length||0)}var L=!1,z=i.ensureSingle(e._infolayer,\\\"g\\\",\\\"legend\\\",function(t){t.attr(\\\"pointer-events\\\",\\\"all\\\"),L=!0}),O=i.ensureSingleById(e._topdefs,\\\"clipPath\\\",r,function(t){t.append(\\\"rect\\\")}),I=i.ensureSingle(z,\\\"rect\\\",\\\"bg\\\",function(t){t.attr(\\\"shape-rendering\\\",\\\"crispEdges\\\")});I.call(u.stroke,s.bordercolor).call(u.fill,s.bgcolor).style(\\\"stroke-width\\\",s.borderwidth+\\\"px\\\");var P=i.ensureSingle(z,\\\"g\\\",\\\"scrollbox\\\"),D=i.ensureSingle(z,\\\"rect\\\",\\\"scrollbar\\\",function(t){t.attr({rx:20,ry:3,width:0,height:0}).call(u.fill,\\\"#808BA4\\\")}),R=P.selectAll(\\\"g.groups\\\").data(f);R.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"groups\\\"),R.exit().remove();var B=R.selectAll(\\\"g.traces\\\").data(i.identity);B.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"traces\\\"),B.exit().remove(),B.call(b,t).style(\\\"opacity\\\",function(t){var e=t[0].trace;return o.traceIs(e,\\\"pie\\\")?-1!==h.indexOf(t[0].label)?.5:1:\\\"legendonly\\\"===e.visible?.5:1}).each(function(){n.select(this).call(A,t,d).call(S,t)}),i.syncOrAsync([a.previousPromises,function(){L&&(C(t,R,B),E(t));var u=e.width,f=e.height;C(t,R,B),s._height>f?function(t){var e=t._fullLayout.legend,r=\\\"left\\\";w.isRightAnchor(e)?r=\\\"right\\\":w.isCenterAnchor(e)&&(r=\\\"center\\\");a.autoMargin(t,\\\"legend\\\",{x:e.x,y:.5,l:e._width*m[r],r:e._width*y[r],b:0,t:0})}(t):E(t);var h=e._size,d=h.l+h.w*s.x,g=h.t+h.h*(1-s.y);w.isRightAnchor(s)?d-=s._width:w.isCenterAnchor(s)&&(d-=s._width/2),w.isBottomAnchor(s)?g-=s._height:w.isMiddleAnchor(s)&&(g-=s._height/2);var v=s._width,x=h.w;v>x?(d=h.l,v=x):(d+v>u&&(d=u-v),d<0&&(d=0),v=Math.min(u-d,s._width));var b,_,k,A,T=s._height,S=h.h;if(T>S?(g=h.t,T=S):(g+T>f&&(g=f-T),g<0&&(g=0),T=Math.min(f-g,s._height)),c.setTranslate(z,d,g),D.on(\\\".drag\\\",null),z.on(\\\"wheel\\\",null),s._height<=T||t._context.staticPlot)I.attr({width:v-s.borderwidth,height:T-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),c.setTranslate(P,0,0),O.select(\\\"rect\\\").attr({width:v-2*s.borderwidth,height:T-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth}),c.setClipUrl(P,r),c.setRect(D,0,0,0,0),delete s._scrollY;else{var F,N,j=Math.max(p.scrollBarMinHeight,T*T/s._height),V=T-j-2*p.scrollBarMargin,U=s._height-T,q=V/U,H=Math.min(s._scrollY||0,U);I.attr({width:v-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:T-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),O.select(\\\"rect\\\").attr({width:v-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:T-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth+H}),c.setClipUrl(P,r),W(H,j,q),z.on(\\\"wheel\\\",function(){W(H=i.constrain(s._scrollY+n.event.deltaY/V*U,0,U),j,q),0!==H&&H!==U&&n.event.preventDefault()});var G=n.behavior.drag().on(\\\"dragstart\\\",function(){F=n.event.sourceEvent.clientY,N=H}).on(\\\"drag\\\",function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||W(H=i.constrain((t.clientY-F)/q+N,0,U),j,q)});D.call(G)}function W(e,r,n){s._scrollY=t._fullLayout.legend._scrollY=e,c.setTranslate(P,0,-e),c.setRect(D,v,p.scrollBarMargin+e*n,p.scrollBarWidth,r),O.select(\\\"rect\\\").attr({y:s.borderwidth+e})}t._context.edits.legendPosition&&(z.classed(\\\"cursor-move\\\",!0),l.init({element:z.node(),gd:t,prepFn:function(){var t=c.getTranslate(z);k=t.x,A=t.y},moveFn:function(t,e){var r=k+t,n=A+e;c.setTranslate(z,r,n),b=l.align(r,0,h.l,h.l+h.w,s.xanchor),_=l.align(n,0,h.t+h.h,h.t,s.yanchor)},doneFn:function(){void 0!==b&&void 0!==_&&o.call(\\\"relayout\\\",t,{\\\"legend.x\\\":b,\\\"legend.y\\\":_})},clickFn:function(r,n){var i=e._infolayer.selectAll(\\\"g.traces\\\").filter(function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom});i.size()>0&&M(t,z,i,r,n)}}))}],t)}}},{\\\"../../constants/alignment\\\":668,\\\"../../constants/interactions\\\":672,\\\"../../lib\\\":696,\\\"../../lib/events\\\":684,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"./anchor_utils\\\":622,\\\"./constants\\\":624,\\\"./get_legend_data\\\":627,\\\"./handle_click\\\":628,\\\"./helpers\\\":629,\\\"./style\\\":631,d3:148}],627:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"./helpers\\\");e.exports=function(t,e){var r,a,o={},s=[],l=!1,c={},u=0;function f(t,r){if(\\\"\\\"!==t&&i.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n=\\\"~~i\\\"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r<t.length;r++){var h=t[r],p=h[0],d=p.trace,g=d.legendgroup;if(d.visible&&d.showlegend)if(n.traceIs(d,\\\"pie\\\"))for(c[g]||(c[g]={}),a=0;a<h.length;a++){var v=h[a].label;c[g][v]||(f(g,{label:v,color:h[a].color,i:h[a].i,trace:d,pts:h[a].pts}),c[g][v]=!0)}else f(g,p)}if(!s.length)return[];var m,y,x=s.length;if(l&&i.isGrouped(e))for(y=new Array(x),r=0;r<x;r++)m=o[s[r]],y[r]=i.isReversed(e)?m.reverse():m;else{for(y=[new Array(x)],r=0;r<x;r++)m=o[s[r]][0],y[0][i.isReversed(e)?x-r-1:r]=m;x=1}return e._lgroupsLength=x,y}},{\\\"../../registry\\\":828,\\\"./helpers\\\":629}],628:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=!0;e.exports=function(t,e,r){if(!e._dragged&&!e._editing){var o,s,l,c,u,f=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],h=t.data()[0][0],p=e._fullData,d=h.trace,g=d.legendgroup,v={},m=[],y=[],x=[];if(1===r&&a&&e.data&&e._context.showTips?(n.notifier(n._(e,\\\"Double-click on legend to isolate one trace\\\"),\\\"long\\\"),a=!1):a=!1,i.traceIs(d,\\\"pie\\\")){var b=h.label,_=f.indexOf(b);1===r?-1===_?f.push(b):f.splice(_,1):2===r&&(f=[],e.calcdata[0].forEach(function(t){b!==t.label&&f.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===f.length&&-1===_&&(f=[])),i.call(\\\"relayout\\\",e,\\\"hiddenlabels\\\",f)}else{var w,k=g&&g.length,M=[];if(k)for(o=0;o<p.length;o++)(w=p[o]).visible&&w.legendgroup===g&&M.push(o);if(1===r){var A;switch(d.visible){case!0:A=\\\"legendonly\\\";break;case!1:A=!1;break;case\\\"legendonly\\\":A=!0}if(k)for(o=0;o<p.length;o++)!1!==p[o].visible&&p[o].legendgroup===g&&O(p[o],A);else O(d,A)}else if(2===r){var T,S,C=!0;for(o=0;o<p.length;o++)if(!(p[o]===d)&&!(T=k&&p[o].legendgroup===g)&&!0===p[o].visible&&!i.traceIs(p[o],\\\"notLegendIsolatable\\\")){C=!1;break}for(o=0;o<p.length;o++)if(!1!==p[o].visible&&!i.traceIs(p[o],\\\"notLegendIsolatable\\\"))switch(d.visible){case\\\"legendonly\\\":O(p[o],!0);break;case!0:S=!!C||\\\"legendonly\\\",T=p[o]===d||k&&p[o].legendgroup===g,O(p[o],!!T||S)}}for(o=0;o<y.length;o++)if(l=y[o]){var E=l.constructUpdate(),L=Object.keys(E);for(s=0;s<L.length;s++)c=L[s],(v[c]=v[c]||[])[x[o]]=E[c]}for(u=Object.keys(v),o=0;o<u.length;o++)for(c=u[o],s=0;s<m.length;s++)v[c].hasOwnProperty(s)||(v[c][s]=void 0);i.call(\\\"restyle\\\",e,v,m)}}function z(t,e,r){var n=m.indexOf(t),i=v[e];return i||(i=v[e]=[]),-1===m.indexOf(t)&&(m.push(t),n=m.length-1),i[n]=r,n}function O(t,e){var r=t._fullInput;if(i.hasTransform(r,\\\"groupby\\\")){var a=y[r.index];if(!a){var o=i.getTransformIndices(r,\\\"groupby\\\"),s=o[o.length-1];a=n.keyedContainer(r,\\\"transforms[\\\"+s+\\\"].styles\\\",\\\"target\\\",\\\"value.visible\\\"),y[r.index]=a}var l=a.get(t._group);void 0===l&&(l=!0),!1!==l&&a.set(t._group,e),x[r.index]=z(r.index,\\\"visible\\\",!1!==r.visible)}else{var c=!1!==r.visible&&e;z(r.index,\\\"visible\\\",c)}}}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828}],629:[function(t,e,r){\\\"use strict\\\";r.isGrouped=function(t){return-1!==(t.traceorder||\\\"\\\").indexOf(\\\"grouped\\\")},r.isVertical=function(t){return\\\"h\\\"!==t.orientation},r.isReversed=function(t){return-1!==(t.traceorder||\\\"\\\").indexOf(\\\"reversed\\\")}},{}],630:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"component\\\",name:\\\"legend\\\",layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),draw:t(\\\"./draw\\\"),style:t(\\\"./style\\\")}},{\\\"./attributes\\\":623,\\\"./defaults\\\":625,\\\"./draw\\\":626,\\\"./style\\\":631}],631:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../drawing\\\"),s=t(\\\"../color\\\"),l=t(\\\"../../traces/scatter/subtypes\\\"),c=t(\\\"../../traces/pie/style_one\\\");e.exports=function(t,e){t.each(function(t){var e=n.select(this),r=a.ensureSingle(e,\\\"g\\\",\\\"layers\\\");r.style(\\\"opacity\\\",t[0].trace.opacity),r.selectAll(\\\"g.legendfill\\\").data([t]).enter().append(\\\"g\\\").classed(\\\"legendfill\\\",!0),r.selectAll(\\\"g.legendlines\\\").data([t]).enter().append(\\\"g\\\").classed(\\\"legendlines\\\",!0);var i=r.selectAll(\\\"g.legendsymbols\\\").data([t]);i.enter().append(\\\"g\\\").classed(\\\"legendsymbols\\\",!0),i.selectAll(\\\"g.legendpoints\\\").data([t]).enter().append(\\\"g\\\").classed(\\\"legendpoints\\\",!0)}).each(function(t){var e=t[0].trace,r=e.marker||{},a=r.line||{},o=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendbar\\\").data(i.traceIs(e,\\\"bar\\\")?[t]:[]);o.enter().append(\\\"path\\\").classed(\\\"legendbar\\\",!0).attr(\\\"d\\\",\\\"M6,6H-6V-6H6Z\\\").attr(\\\"transform\\\",\\\"translate(20,0)\\\"),o.exit().remove(),o.each(function(t){var e=n.select(this),i=t[0],o=(i.mlw+1||a.width+1)-1;e.style(\\\"stroke-width\\\",o+\\\"px\\\").call(s.fill,i.mc||r.color),o&&e.call(s.stroke,i.mlc||a.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendbox\\\").data(i.traceIs(e,\\\"box-violin\\\")&&e.visible?[t]:[]);r.enter().append(\\\"path\\\").classed(\\\"legendbox\\\",!0).attr(\\\"d\\\",\\\"M6,6H-6V-6H6Z\\\").attr(\\\"transform\\\",\\\"translate(20,0)\\\"),r.exit().remove(),r.each(function(){var t=e.line.width,r=n.select(this);r.style(\\\"stroke-width\\\",t+\\\"px\\\").call(s.fill,e.fillcolor),t&&s.stroke(r,e.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendpie\\\").data(i.traceIs(e,\\\"pie\\\")&&e.visible?[t]:[]);r.enter().append(\\\"path\\\").classed(\\\"legendpie\\\",!0).attr(\\\"d\\\",\\\"M6,6H-6V-6H6Z\\\").attr(\\\"transform\\\",\\\"translate(20,0)\\\"),r.exit().remove(),r.size()&&r.call(c,t[0],e)}).each(function(t){var r=t[0].trace,i=r.visible&&r.fill&&\\\"none\\\"!==r.fill,a=l.hasLines(r),s=r.contours,c=!1,u=!1;if(s){var f=s.coloring;\\\"lines\\\"===f?c=!0:a=\\\"none\\\"===f||\\\"heatmap\\\"===f||s.showlines,\\\"constraint\\\"===s.type?i=\\\"=\\\"!==s._operation:\\\"fill\\\"!==f&&\\\"heatmap\\\"!==f||(u=!0)}var h=l.hasMarkers(r)||l.hasText(r),p=i||u,d=a||c,g=h||!p?\\\"M5,0\\\":d?\\\"M5,-2\\\":\\\"M5,-3\\\",v=n.select(this),m=v.select(\\\".legendfill\\\").selectAll(\\\"path\\\").data(i||u?[t]:[]);m.enter().append(\\\"path\\\").classed(\\\"js-fill\\\",!0),m.exit().remove(),m.attr(\\\"d\\\",g+\\\"h30v6h-30z\\\").call(i?o.fillGroupStyle:function(t){if(t.size()){var n=\\\"legendfill-\\\"+r.uid;o.gradient(t,e,n,\\\"horizontalreversed\\\",r.colorscale,\\\"fill\\\")}});var y=v.select(\\\".legendlines\\\").selectAll(\\\"path\\\").data(a||c?[t]:[]);y.enter().append(\\\"path\\\").classed(\\\"js-line\\\",!0),y.exit().remove(),y.attr(\\\"d\\\",g+(c?\\\"l30,0.0001\\\":\\\"h30\\\")).call(a?o.lineGroupStyle:function(t){if(t.size()){var n=\\\"legendline-\\\"+r.uid;o.lineGroupStyle(t),o.gradient(t,e,n,\\\"horizontalreversed\\\",r.colorscale,\\\"stroke\\\")}})}).each(function(t){var r,i,s=t[0],c=s.trace,u=l.hasMarkers(c),f=l.hasText(c),h=l.hasLines(c);function p(t,e,r){var n=a.nestedProperty(c,t).get(),i=a.isArrayOrTypedArray(n)&&e?e(n):n;if(r){if(i<r[0])return r[0];if(i>r[1])return r[1]}return i}function d(t){return t[0]}if(u||f||h){var g={},v={};if(u){g.mc=p(\\\"marker.color\\\",d),g.mx=p(\\\"marker.symbol\\\",d),g.mo=p(\\\"marker.opacity\\\",a.mean,[.2,1]),g.mlc=p(\\\"marker.line.color\\\",d),g.mlw=p(\\\"marker.line.width\\\",a.mean,[0,5]),v.marker={sizeref:1,sizemin:1,sizemode:\\\"diameter\\\"};var m=p(\\\"marker.size\\\",a.mean,[2,16]);g.ms=m,v.marker.size=m}h&&(v.line={width:p(\\\"line.width\\\",d,[0,10])}),f&&(g.tx=\\\"Aa\\\",g.tp=p(\\\"textposition\\\",d),g.ts=10,g.tc=p(\\\"textfont.color\\\",d),g.tf=p(\\\"textfont.family\\\",d)),r=[a.minExtend(s,g)],(i=a.minExtend(c,v)).selectedpoints=null}var y=n.select(this).select(\\\"g.legendpoints\\\"),x=y.selectAll(\\\"path.scatterpts\\\").data(u?r:[]);x.enter().insert(\\\"path\\\",\\\":first-child\\\").classed(\\\"scatterpts\\\",!0).attr(\\\"transform\\\",\\\"translate(20,0)\\\"),x.exit().remove(),x.call(o.pointStyle,i,e),u&&(r[0].mrc=3);var b=y.selectAll(\\\"g.pointtext\\\").data(f?r:[]);b.enter().append(\\\"g\\\").classed(\\\"pointtext\\\",!0).append(\\\"text\\\").attr(\\\"transform\\\",\\\"translate(20,0)\\\"),b.exit().remove(),b.selectAll(\\\"text\\\").call(o.textPointStyle,i,e)}).each(function(t){var e=t[0].trace,r=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendcandle\\\").data(\\\"candlestick\\\"===e.type&&e.visible?[t,t]:[]);r.enter().append(\\\"path\\\").classed(\\\"legendcandle\\\",!0).attr(\\\"d\\\",function(t,e){return e?\\\"M-15,0H-8M-8,6V-6H8Z\\\":\\\"M15,0H8M8,-6V6H-8Z\\\"}).attr(\\\"transform\\\",\\\"translate(20,0)\\\").style(\\\"stroke-miterlimit\\\",1),r.exit().remove(),r.each(function(t,r){var i=e[r?\\\"increasing\\\":\\\"decreasing\\\"],a=i.line.width,o=n.select(this);o.style(\\\"stroke-width\\\",a+\\\"px\\\").call(s.fill,i.fillcolor),a&&s.stroke(o,i.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\\\"g.legendpoints\\\").selectAll(\\\"path.legendohlc\\\").data(\\\"ohlc\\\"===e.type&&e.visible?[t,t]:[]);r.enter().append(\\\"path\\\").classed(\\\"legendohlc\\\",!0).attr(\\\"d\\\",function(t,e){return e?\\\"M-15,0H0M-8,-6V0\\\":\\\"M15,0H0M8,6V0\\\"}).attr(\\\"transform\\\",\\\"translate(20,0)\\\").style(\\\"stroke-miterlimit\\\",1),r.exit().remove(),r.each(function(t,r){var i=e[r?\\\"increasing\\\":\\\"decreasing\\\"],a=i.line.width,l=n.select(this);l.style(\\\"fill\\\",\\\"none\\\").call(o.dashLine,i.line.dash,a),a&&s.stroke(l,i.line.color)})})}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../../traces/pie/style_one\\\":1030,\\\"../../traces/scatter/subtypes\\\":1068,\\\"../color\\\":570,\\\"../drawing\\\":595,d3:148}],632:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../plots/plots\\\"),a=t(\\\"../../plots/cartesian/axis_ids\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../../build/ploticon\\\"),l=o._,c=e.exports={};function u(t,e){var r,i,o=e.currentTarget,s=o.getAttribute(\\\"data-attr\\\"),l=o.getAttribute(\\\"data-val\\\")||!0,c=t._fullLayout,u={},f=a.list(t,null,!0),h=\\\"on\\\";if(\\\"zoom\\\"===s){var p,d=\\\"in\\\"===l?.5:2,g=(1+d)/2,v=(1-d)/2;for(i=0;i<f.length;i++)if(!(r=f[i]).fixedrange)if(p=r._name,\\\"auto\\\"===l)u[p+\\\".autorange\\\"]=!0;else if(\\\"reset\\\"===l){if(void 0===r._rangeInitial)u[p+\\\".autorange\\\"]=!0;else{var m=r._rangeInitial.slice();u[p+\\\".range[0]\\\"]=m[0],u[p+\\\".range[1]\\\"]=m[1]}void 0!==r._showSpikeInitial&&(u[p+\\\".showspikes\\\"]=r._showSpikeInitial,\\\"on\\\"!==h||r._showSpikeInitial||(h=\\\"off\\\"))}else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],x=[g*y[0]+v*y[1],g*y[1]+v*y[0]];u[p+\\\".range[0]\\\"]=r.l2r(x[0]),u[p+\\\".range[1]\\\"]=r.l2r(x[1])}c._cartesianSpikesEnabled=h}else{if(\\\"hovermode\\\"!==s||\\\"x\\\"!==l&&\\\"y\\\"!==l){if(\\\"hovermode\\\"===s&&\\\"closest\\\"===l){for(i=0;i<f.length;i++)r=f[i],\\\"on\\\"!==h||r.showspikes||(h=\\\"off\\\");c._cartesianSpikesEnabled=h}}else l=c._isHoriz?\\\"y\\\":\\\"x\\\",o.setAttribute(\\\"data-val\\\",l);u[s]=l}n.call(\\\"relayout\\\",t,u)}function f(t,e){for(var r=e.currentTarget,i=r.getAttribute(\\\"data-attr\\\"),a=r.getAttribute(\\\"data-val\\\")||!0,o=t._fullLayout._subplots.gl3d,s={},l=i.split(\\\".\\\"),c=0;c<o.length;c++)s[o[c]+\\\".\\\"+l[1]]=a;var u=\\\"pan\\\"===a?a:\\\"zoom\\\";s.dragmode=u,n.call(\\\"relayout\\\",t,s)}function h(t,e){for(var r=e.currentTarget.getAttribute(\\\"data-attr\\\"),i=t._fullLayout,a=i._subplots.gl3d,s={},l=0;l<a.length;l++){var c=a[l],u=c+\\\".camera\\\",f=i[c]._scene;\\\"resetDefault\\\"===r?s[u]=null:\\\"resetLastSave\\\"===r&&(s[u]=o.extendDeep({},f.cameraInitial))}n.call(\\\"relayout\\\",t,s)}function p(t,e){var r=e.currentTarget,i=r._previousVal||!1,a=t.layout,s=t._fullLayout,l=s._subplots.gl3d,c=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"],u=[\\\"showspikes\\\",\\\"spikesides\\\",\\\"spikethickness\\\",\\\"spikecolor\\\"],f={},h={},p={};if(i)p=o.extendDeep(a,i),r._previousVal=null;else{p={\\\"allaxes.showspikes\\\":!1};for(var d=0;d<l.length;d++){var g=l[d],v=s[g],m=f[g]={};m.hovermode=v.hovermode,p[g+\\\".hovermode\\\"]=!1;for(var y=0;y<3;y++){var x=c[y];h=m[x]={};for(var b=0;b<u.length;b++){var _=u[b];h[_]=v[x][_]}}}r._previousVal=o.extendDeep({},f)}n.call(\\\"relayout\\\",t,p)}function d(t,e){for(var r=e.currentTarget,i=r.getAttribute(\\\"data-attr\\\"),a=r.getAttribute(\\\"data-val\\\")||!0,o=t._fullLayout,s=o._subplots.geo,l=0;l<s.length;l++){var c=s[l],u=o[c];if(\\\"zoom\\\"===i){var f=u.projection.scale,h=\\\"in\\\"===a?2*f:.5*f;n.call(\\\"relayout\\\",t,c+\\\".projection.scale\\\",h)}else\\\"reset\\\"===i&&v(t,\\\"geo\\\")}}function g(t){var e,r=t._fullLayout;e=r._has(\\\"cartesian\\\")?r._isHoriz?\\\"y\\\":\\\"x\\\":\\\"closest\\\";var i=!t._fullLayout.hovermode&&e;n.call(\\\"relayout\\\",t,\\\"hovermode\\\",i)}function v(t,e){for(var r=t._fullLayout,i=r._subplots[e],a={},o=0;o<i.length;o++)for(var s=i[o],l=r[s]._subplot.viewInitial,c=Object.keys(l),u=0;u<c.length;u++){var f=c[u];a[s+\\\".\\\"+f]=l[f]}n.call(\\\"relayout\\\",t,a)}c.toImage={name:\\\"toImage\\\",title:function(t){var e=(t._context.toImageButtonOptions||{}).format||\\\"png\\\";return l(t,\\\"png\\\"===e?\\\"Download plot as a png\\\":\\\"Download plot\\\")},icon:s.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||\\\"png\\\"};o.notifier(l(t,\\\"Taking snapshot - this may take a few seconds\\\"),\\\"long\\\"),\\\"svg\\\"!==r.format&&o.isIE()&&(o.notifier(l(t,\\\"IE only supports svg.  Changing format to svg.\\\"),\\\"long\\\"),r.format=\\\"svg\\\"),[\\\"filename\\\",\\\"width\\\",\\\"height\\\",\\\"scale\\\"].forEach(function(t){e[t]&&(r[t]=e[t])}),n.call(\\\"downloadImage\\\",t,r).then(function(e){o.notifier(l(t,\\\"Snapshot succeeded\\\")+\\\" - \\\"+e,\\\"long\\\")}).catch(function(){o.notifier(l(t,\\\"Sorry, there was a problem downloading your snapshot!\\\"),\\\"long\\\")})}},c.sendDataToCloud={name:\\\"sendDataToCloud\\\",title:function(t){return l(t,\\\"Edit in Chart Studio\\\")},icon:s.disk,click:function(t){i.sendDataToCloud(t)}},c.zoom2d={name:\\\"zoom2d\\\",title:function(t){return l(t,\\\"Zoom\\\")},attr:\\\"dragmode\\\",val:\\\"zoom\\\",icon:s.zoombox,click:u},c.pan2d={name:\\\"pan2d\\\",title:function(t){return l(t,\\\"Pan\\\")},attr:\\\"dragmode\\\",val:\\\"pan\\\",icon:s.pan,click:u},c.select2d={name:\\\"select2d\\\",title:function(t){return l(t,\\\"Box Select\\\")},attr:\\\"dragmode\\\",val:\\\"select\\\",icon:s.selectbox,click:u},c.lasso2d={name:\\\"lasso2d\\\",title:function(t){return l(t,\\\"Lasso Select\\\")},attr:\\\"dragmode\\\",val:\\\"lasso\\\",icon:s.lasso,click:u},c.zoomIn2d={name:\\\"zoomIn2d\\\",title:function(t){return l(t,\\\"Zoom in\\\")},attr:\\\"zoom\\\",val:\\\"in\\\",icon:s.zoom_plus,click:u},c.zoomOut2d={name:\\\"zoomOut2d\\\",title:function(t){return l(t,\\\"Zoom out\\\")},attr:\\\"zoom\\\",val:\\\"out\\\",icon:s.zoom_minus,click:u},c.autoScale2d={name:\\\"autoScale2d\\\",title:function(t){return l(t,\\\"Autoscale\\\")},attr:\\\"zoom\\\",val:\\\"auto\\\",icon:s.autoscale,click:u},c.resetScale2d={name:\\\"resetScale2d\\\",title:function(t){return l(t,\\\"Reset axes\\\")},attr:\\\"zoom\\\",val:\\\"reset\\\",icon:s.home,click:u},c.hoverClosestCartesian={name:\\\"hoverClosestCartesian\\\",title:function(t){return l(t,\\\"Show closest data on hover\\\")},attr:\\\"hovermode\\\",val:\\\"closest\\\",icon:s.tooltip_basic,gravity:\\\"ne\\\",click:u},c.hoverCompareCartesian={name:\\\"hoverCompareCartesian\\\",title:function(t){return l(t,\\\"Compare data on hover\\\")},attr:\\\"hovermode\\\",val:function(t){return t._fullLayout._isHoriz?\\\"y\\\":\\\"x\\\"},icon:s.tooltip_compare,gravity:\\\"ne\\\",click:u},c.zoom3d={name:\\\"zoom3d\\\",title:function(t){return l(t,\\\"Zoom\\\")},attr:\\\"scene.dragmode\\\",val:\\\"zoom\\\",icon:s.zoombox,click:f},c.pan3d={name:\\\"pan3d\\\",title:function(t){return l(t,\\\"Pan\\\")},attr:\\\"scene.dragmode\\\",val:\\\"pan\\\",icon:s.pan,click:f},c.orbitRotation={name:\\\"orbitRotation\\\",title:function(t){return l(t,\\\"Orbital rotation\\\")},attr:\\\"scene.dragmode\\\",val:\\\"orbit\\\",icon:s[\\\"3d_rotate\\\"],click:f},c.tableRotation={name:\\\"tableRotation\\\",title:function(t){return l(t,\\\"Turntable rotation\\\")},attr:\\\"scene.dragmode\\\",val:\\\"turntable\\\",icon:s[\\\"z-axis\\\"],click:f},c.resetCameraDefault3d={name:\\\"resetCameraDefault3d\\\",title:function(t){return l(t,\\\"Reset camera to default\\\")},attr:\\\"resetDefault\\\",icon:s.home,click:h},c.resetCameraLastSave3d={name:\\\"resetCameraLastSave3d\\\",title:function(t){return l(t,\\\"Reset camera to last save\\\")},attr:\\\"resetLastSave\\\",icon:s.movie,click:h},c.hoverClosest3d={name:\\\"hoverClosest3d\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:null,toggle:!0,icon:s.tooltip_basic,gravity:\\\"ne\\\",click:p},c.zoomInGeo={name:\\\"zoomInGeo\\\",title:function(t){return l(t,\\\"Zoom in\\\")},attr:\\\"zoom\\\",val:\\\"in\\\",icon:s.zoom_plus,click:d},c.zoomOutGeo={name:\\\"zoomOutGeo\\\",title:function(t){return l(t,\\\"Zoom out\\\")},attr:\\\"zoom\\\",val:\\\"out\\\",icon:s.zoom_minus,click:d},c.resetGeo={name:\\\"resetGeo\\\",title:function(t){return l(t,\\\"Reset\\\")},attr:\\\"reset\\\",val:null,icon:s.autoscale,click:d},c.hoverClosestGeo={name:\\\"hoverClosestGeo\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:null,toggle:!0,icon:s.tooltip_basic,gravity:\\\"ne\\\",click:g},c.hoverClosestGl2d={name:\\\"hoverClosestGl2d\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:null,toggle:!0,icon:s.tooltip_basic,gravity:\\\"ne\\\",click:g},c.hoverClosestPie={name:\\\"hoverClosestPie\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:\\\"closest\\\",icon:s.tooltip_basic,gravity:\\\"ne\\\",click:g},c.toggleHover={name:\\\"toggleHover\\\",title:function(t){return l(t,\\\"Toggle show closest data on hover\\\")},attr:\\\"hovermode\\\",val:null,toggle:!0,icon:s.tooltip_basic,gravity:\\\"ne\\\",click:function(t,e){g(t),p(t,e)}},c.resetViews={name:\\\"resetViews\\\",title:function(t){return l(t,\\\"Reset views\\\")},icon:s.home,click:function(t,e){var r=e.currentTarget;r.setAttribute(\\\"data-attr\\\",\\\"zoom\\\"),r.setAttribute(\\\"data-val\\\",\\\"reset\\\"),u(t,e),r.setAttribute(\\\"data-attr\\\",\\\"resetLastSave\\\"),h(t,e),v(t,\\\"geo\\\"),v(t,\\\"mapbox\\\")}},c.toggleSpikelines={name:\\\"toggleSpikelines\\\",title:function(t){return l(t,\\\"Toggle Spike Lines\\\")},icon:s.spikeline,attr:\\\"_cartesianSpikesEnabled\\\",val:\\\"on\\\",click:function(t){var e=t._fullLayout;e._cartesianSpikesEnabled=\\\"on\\\"===e._cartesianSpikesEnabled?\\\"off\\\":\\\"on\\\";var r=function(t){for(var e,r,n=t._fullLayout,i=a.list(t,null,!0),o={},s=0;s<i.length;s++)e=i[s],r=e._name,o[r+\\\".showspikes\\\"]=\\\"on\\\"===n._cartesianSpikesEnabled||e._showSpikeInitial;return o}(t);n.call(\\\"relayout\\\",t,r)}},c.resetViewMapbox={name:\\\"resetViewMapbox\\\",title:function(t){return l(t,\\\"Reset view\\\")},attr:\\\"reset\\\",icon:s.home,click:function(t){v(t,\\\"mapbox\\\")}}},{\\\"../../../build/ploticon\\\":2,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828}],633:[function(t,e,r){\\\"use strict\\\";r.manage=t(\\\"./manage\\\")},{\\\"./manage\\\":634}],634:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axis_ids\\\"),i=t(\\\"../../traces/scatter/subtypes\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"./modebar\\\"),s=t(\\\"./buttons\\\");e.exports=function(t){var e=t._fullLayout,r=t._context,l=e._modeBar;if(r.displayModeBar){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error([\\\"*modeBarButtonsToRemove* configuration options\\\",\\\"must be an array.\\\"].join(\\\" \\\"));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error([\\\"*modeBarButtonsToAdd* configuration options\\\",\\\"must be an array.\\\"].join(\\\" \\\"));var c,u=r.modeBarButtons;c=Array.isArray(u)&&u.length?function(t){for(var e=0;e<t.length;e++)for(var r=t[e],n=0;n<r.length;n++){var i=r[n];if(\\\"string\\\"==typeof i){if(void 0===s[i])throw new Error([\\\"*modeBarButtons* configuration options\\\",\\\"invalid button name\\\"].join(\\\" \\\"));t[e][n]=s[i]}}return t}(u):function(t,e,r){var o=t._fullLayout,l=t._fullData,c=o._has(\\\"cartesian\\\"),u=o._has(\\\"gl3d\\\"),f=o._has(\\\"geo\\\"),h=o._has(\\\"pie\\\"),p=o._has(\\\"gl2d\\\"),d=o._has(\\\"ternary\\\"),g=o._has(\\\"mapbox\\\"),v=o._has(\\\"polar\\\"),m=function(t){for(var e=n.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}(o),y=[];function x(t){if(t.length){for(var r=[],n=0;n<t.length;n++){var i=t[n];-1===e.indexOf(i)&&r.push(s[i])}y.push(r)}}x([\\\"toImage\\\",\\\"sendDataToCloud\\\"]);var b=[],_=[],w=[],k=[];(c||p||h||d)+f+u+g+v>1?(_=[\\\"toggleHover\\\"],w=[\\\"resetViews\\\"]):f?(b=[\\\"zoomInGeo\\\",\\\"zoomOutGeo\\\"],_=[\\\"hoverClosestGeo\\\"],w=[\\\"resetGeo\\\"]):u?(_=[\\\"hoverClosest3d\\\"],w=[\\\"resetCameraDefault3d\\\",\\\"resetCameraLastSave3d\\\"]):g?(_=[\\\"toggleHover\\\"],w=[\\\"resetViewMapbox\\\"]):_=p?[\\\"hoverClosestGl2d\\\"]:h?[\\\"hoverClosestPie\\\"]:[\\\"toggleHover\\\"];c&&(_=[\\\"toggleSpikelines\\\",\\\"hoverClosestCartesian\\\",\\\"hoverCompareCartesian\\\"]);!c&&!p||m||(b=[\\\"zoomIn2d\\\",\\\"zoomOut2d\\\",\\\"autoScale2d\\\"],\\\"resetViews\\\"!==w[0]&&(w=[\\\"resetScale2d\\\"]));u?k=[\\\"zoom3d\\\",\\\"pan3d\\\",\\\"orbitRotation\\\",\\\"tableRotation\\\"]:(c||p)&&!m||d?k=[\\\"zoom2d\\\",\\\"pan2d\\\"]:g||f?k=[\\\"pan2d\\\"]:v&&(k=[\\\"zoom2d\\\"]);(function(t){for(var e=!1,r=0;r<t.length&&!e;r++){var n=t[r];n._module&&n._module.selectPoints&&(a.traceIs(n,\\\"scatter-like\\\")?(i.hasMarkers(n)||i.hasText(n))&&(e=!0):a.traceIs(n,\\\"box-violin\\\")&&\\\"all\\\"!==n.boxpoints&&\\\"all\\\"!==n.points||(e=!0))}return e})(l)&&k.push(\\\"select2d\\\",\\\"lasso2d\\\");return x(k),x(b.concat(w)),x(_),function(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}(y,r)}(t,r.modeBarButtonsToRemove,r.modeBarButtonsToAdd),l?l.update(t,c):e._modeBar=o(t,c)}else l&&(l.destroy(),delete e._modeBar)}},{\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../registry\\\":828,\\\"../../traces/scatter/subtypes\\\":1068,\\\"./buttons\\\":632,\\\"./modebar\\\":635}],635:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../../build/ploticon\\\"),s=new DOMParser;function l(t){this.container=t.container,this.element=document.createElement(\\\"div\\\"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var c=l.prototype;c.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i=\\\"modebar-\\\"+n._uid;this.element.setAttribute(\\\"id\\\",i),this._uid=i,\\\"hover\\\"===r.displayModeBar?this.element.className=\\\"modebar modebar--hover\\\":this.element.className=\\\"modebar\\\",\\\"v\\\"===n.modebar.orientation&&(this.element.className+=\\\" vertical\\\",e=e.reverse()),a.deleteRelatedStyleRule(i),a.addRelatedStyleRule(i,\\\"#\\\"+i,\\\"background-color: \\\"+n.modebar.bgcolor),a.addRelatedStyleRule(i,\\\"#\\\"+i+\\\" .modebar-btn .icon path\\\",\\\"fill: \\\"+n.modebar.color),a.addRelatedStyleRule(i,\\\"#\\\"+i+\\\" .modebar-btn:hover .icon path\\\",\\\"fill: \\\"+n.modebar.activecolor),a.addRelatedStyleRule(i,\\\"#\\\"+i+\\\" .modebar-btn.active .icon path\\\",\\\"fill: \\\"+n.modebar.activecolor);var o=!this.hasButtons(e),s=this.hasLogo!==r.displaylogo,l=this.locale!==r.locale;this.locale=r.locale,(o||s||l)&&(this.removeAllButtons(),this.updateButtons(e),r.displaylogo&&(\\\"v\\\"===n.modebar.orientation?this.element.prepend(this.getLogo()):this.element.appendChild(this.getLogo()),this.hasLogo=!0)),this.updateActiveButton()},c.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var r=e.createGroup();t.forEach(function(t){var n=t.name;if(!n)throw new Error(\\\"must provide button 'name' in button config\\\");if(-1!==e.buttonsNames.indexOf(n))throw new Error(\\\"button name '\\\"+n+\\\"' is taken\\\");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)}),e.element.appendChild(r)})},c.createGroup=function(){var t=document.createElement(\\\"div\\\");return t.className=\\\"modebar-group\\\",t},c.createButton=function(t){var e=this,r=document.createElement(\\\"a\\\");r.setAttribute(\\\"rel\\\",\\\"tooltip\\\"),r.className=\\\"modebar-btn\\\";var i=t.title;void 0===i?i=t.name:\\\"function\\\"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute(\\\"data-title\\\",i),void 0!==t.attr&&r.setAttribute(\\\"data-attr\\\",t.attr);var a=t.val;if(void 0!==a&&(\\\"function\\\"==typeof a&&(a=a(this.graphInfo)),r.setAttribute(\\\"data-val\\\",a)),\\\"function\\\"!=typeof t.click)throw new Error(\\\"must provide button 'click' function in button config\\\");r.addEventListener(\\\"click\\\",function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)}),r.setAttribute(\\\"data-toggle\\\",t.toggle||!1),t.toggle&&n.select(r).classed(\\\"active\\\",!0);var s=t.icon;return\\\"function\\\"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute(\\\"data-gravity\\\",t.gravity||\\\"n\\\"),r},c.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n=\\\"http://www.w3.org/2000/svg\\\";if(t.path){(e=document.createElementNS(n,\\\"svg\\\")).setAttribute(\\\"viewBox\\\",[0,0,t.width,r].join(\\\" \\\")),e.setAttribute(\\\"class\\\",\\\"icon\\\");var a=document.createElementNS(n,\\\"path\\\");a.setAttribute(\\\"d\\\",t.path),t.transform?a.setAttribute(\\\"transform\\\",t.transform):void 0!==t.ascent&&a.setAttribute(\\\"transform\\\",\\\"matrix(1 0 0 -1 0 \\\"+t.ascent+\\\")\\\"),e.appendChild(a)}t.svg&&(e=s.parseFromString(t.svg,\\\"application/xml\\\").childNodes[0]);return e.setAttribute(\\\"height\\\",\\\"1em\\\"),e.setAttribute(\\\"width\\\",\\\"1em\\\"),e},c.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute(\\\"data-attr\\\"):null;this.buttonElements.forEach(function(t){var i=t.getAttribute(\\\"data-val\\\")||!0,o=t.getAttribute(\\\"data-attr\\\"),s=\\\"true\\\"===t.getAttribute(\\\"data-toggle\\\"),l=n.select(t);if(s)o===r&&l.classed(\\\"active\\\",!l.classed(\\\"active\\\"));else{var c=null===o?o:a.nestedProperty(e,o).get();l.classed(\\\"active\\\",c===i)}})},c.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},c.getLogo=function(){var t=this.createGroup(),e=document.createElement(\\\"a\\\");return e.href=\\\"https://plot.ly/\\\",e.target=\\\"_blank\\\",e.setAttribute(\\\"data-title\\\",a._(this.graphInfo,\\\"Produced with Plotly\\\")),e.className=\\\"modebar-btn plotlyjsicon modebar-btn--logo\\\",e.appendChild(this.createIcon(o.newplotlylogo)),t.appendChild(e),t},c.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},c.destroy=function(){a.removeElement(this.container.querySelector(\\\".modebar\\\")),a.deleteRelatedStyleRule(this._uid)},e.exports=function(t,e){var r=t._fullLayout,i=new l({graphInfo:t,container:r._paperdiv.node(),buttons:e});return r._privateplot&&n.select(i.element).append(\\\"span\\\").classed(\\\"badge-private float--left\\\",!0).text(\\\"PRIVATE\\\"),i}},{\\\"../../../build/ploticon\\\":2,\\\"../../lib\\\":696,d3:148,\\\"fast-isnumeric\\\":214}],636:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../color/attributes\\\"),a=(0,t(\\\"../../plot_api/plot_template\\\").templatedArray)(\\\"button\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},step:{valType:\\\"enumerated\\\",values:[\\\"month\\\",\\\"year\\\",\\\"day\\\",\\\"hour\\\",\\\"minute\\\",\\\"second\\\",\\\"all\\\"],dflt:\\\"month\\\",editType:\\\"plot\\\"},stepmode:{valType:\\\"enumerated\\\",values:[\\\"backward\\\",\\\"todate\\\"],dflt:\\\"backward\\\",editType:\\\"plot\\\"},count:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"plot\\\"},label:{valType:\\\"string\\\",editType:\\\"plot\\\"},editType:\\\"plot\\\"});e.exports={visible:{valType:\\\"boolean\\\",editType:\\\"plot\\\"},buttons:a,x:{valType:\\\"number\\\",min:-2,max:3,editType:\\\"plot\\\"},xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\",editType:\\\"plot\\\"},y:{valType:\\\"number\\\",min:-2,max:3,editType:\\\"plot\\\"},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"bottom\\\",editType:\\\"plot\\\"},font:n({editType:\\\"plot\\\"}),bgcolor:{valType:\\\"color\\\",dflt:i.lightLine,editType:\\\"plot\\\"},activecolor:{valType:\\\"color\\\",editType:\\\"plot\\\"},bordercolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"plot\\\"},borderwidth:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"plot\\\"},editType:\\\"plot\\\"}},{\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/font_attributes\\\":772,\\\"../color/attributes\\\":569}],637:[function(t,e,r){\\\"use strict\\\";e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],638:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../color\\\"),a=t(\\\"../../plot_api/plot_template\\\"),o=t(\\\"../../plots/array_container_defaults\\\"),s=t(\\\"./attributes\\\"),l=t(\\\"./constants\\\");function c(t,e,r,i){var a=i.calendar;function o(r,i){return n.coerce(t,e,s.buttons,r,i)}if(o(\\\"visible\\\")){var l=o(\\\"step\\\");\\\"all\\\"!==l&&(!a||\\\"gregorian\\\"===a||\\\"month\\\"!==l&&\\\"year\\\"!==l?o(\\\"stepmode\\\"):e.stepmode=\\\"backward\\\",o(\\\"count\\\")),o(\\\"label\\\")}}e.exports=function(t,e,r,u,f){var h=t.rangeselector||{},p=a.newContainer(e,\\\"rangeselector\\\");function d(t,e){return n.coerce(h,p,s,t,e)}if(d(\\\"visible\\\",o(h,p,{name:\\\"buttons\\\",handleItemDefaults:c,calendar:f}).length>0)){var g=function(t,e,r){for(var n=r.filter(function(r){return e[r].anchor===t._id}),i=0,a=0;a<n.length;a++){var o=e[n[a]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+l.yPad]}(e,r,u);d(\\\"x\\\",g[0]),d(\\\"y\\\",g[1]),n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\"]),d(\\\"xanchor\\\"),d(\\\"yanchor\\\"),n.coerceFont(d,\\\"font\\\",r.font);var v=d(\\\"bgcolor\\\");d(\\\"activecolor\\\",i.contrast(v,l.lightAmount,l.darkAmount)),d(\\\"bordercolor\\\"),d(\\\"borderwidth\\\")}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/array_container_defaults\\\":741,\\\"../color\\\":570,\\\"./attributes\\\":636,\\\"./constants\\\":637}],639:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../color\\\"),s=t(\\\"../drawing\\\"),l=t(\\\"../../lib\\\"),c=t(\\\"../../lib/svg_text_utils\\\"),u=t(\\\"../../plots/cartesian/axis_ids\\\"),f=t(\\\"../legend/anchor_utils\\\"),h=t(\\\"../../constants/alignment\\\"),p=h.LINE_SPACING,d=h.FROM_TL,g=h.FROM_BR,v=t(\\\"./constants\\\"),m=t(\\\"./get_update_object\\\");function y(t){return t._id}function x(t,e,r){var n=l.ensureSingle(t,\\\"rect\\\",\\\"selector-rect\\\",function(t){t.attr(\\\"shape-rendering\\\",\\\"crispEdges\\\")});n.attr({rx:v.rx,ry:v.ry}),n.call(o.stroke,e.bordercolor).call(o.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style(\\\"stroke-width\\\",e.borderwidth+\\\"px\\\")}function b(t,e,r,n){var i;l.ensureSingle(t,\\\"text\\\",\\\"selector-text\\\",function(t){t.classed(\\\"user-select-none\\\",!0).attr(\\\"text-anchor\\\",\\\"middle\\\")}).call(s.font,e.font).text((i=r,i.label?i.label:\\\"all\\\"===i.step?\\\"all\\\":i.count+i.step.charAt(0))).call(function(t){c.convertToTspans(t,n)})}e.exports=function(t){var e=t._fullLayout._infolayer.selectAll(\\\".rangeselector\\\").data(function(t){for(var e=u.list(t,\\\"x\\\",!0),r=[],n=0;n<e.length;n++){var i=e[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}(t),y);e.enter().append(\\\"g\\\").classed(\\\"rangeselector\\\",!0),e.exit().remove(),e.style({cursor:\\\"pointer\\\",\\\"pointer-events\\\":\\\"all\\\"}),e.each(function(e){var r=n.select(this),o=e,u=o.rangeselector,h=r.selectAll(\\\"g.button\\\").data(l.filterVisible(u.buttons));h.enter().append(\\\"g\\\").classed(\\\"button\\\",!0),h.exit().remove(),h.each(function(e){var r=n.select(this),a=m(o,e);e._isActive=function(t,e,r){if(\\\"all\\\"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(o,e,a),r.call(x,u,e),r.call(b,u,e,t),r.on(\\\"click\\\",function(){t._dragged||i.call(\\\"relayout\\\",t,a)}),r.on(\\\"mouseover\\\",function(){e._isHovered=!0,r.call(x,u,e)}),r.on(\\\"mouseout\\\",function(){e._isHovered=!1,r.call(x,u,e)})}),function(t,e,r,i,o){var l=0,u=0,h=r.borderwidth;e.each(function(){var t=n.select(this),e=t.select(\\\".selector-text\\\"),i=r.font.size*p,a=Math.max(i*c.lineCount(e),16)+3;u=Math.max(u,a)}),e.each(function(){var t=n.select(this),e=t.select(\\\".selector-rect\\\"),i=t.select(\\\".selector-text\\\"),a=i.node()&&s.bBox(i.node()).width,o=r.font.size*p,f=c.lineCount(i),d=Math.max(a+10,v.minButtonWidth);t.attr(\\\"transform\\\",\\\"translate(\\\"+(h+l)+\\\",\\\"+h+\\\")\\\"),e.attr({x:0,y:0,width:d,height:u}),c.positionText(i,d/2,u/2-(f-1)*o/2+3),l+=d+5});var m=t._fullLayout._size,y=m.l+m.w*r.x,x=m.t+m.h*(1-r.y),b=\\\"left\\\";f.isRightAnchor(r)&&(y-=l,b=\\\"right\\\");f.isCenterAnchor(r)&&(y-=l/2,b=\\\"center\\\");var _=\\\"top\\\";f.isBottomAnchor(r)&&(x-=u,_=\\\"bottom\\\");f.isMiddleAnchor(r)&&(x-=u/2,_=\\\"middle\\\");l=Math.ceil(l),u=Math.ceil(u),y=Math.round(y),x=Math.round(x),a.autoMargin(t,i+\\\"-range-selector\\\",{x:r.x,y:r.y,l:l*d[b],r:l*g[b],b:u*g[_],t:u*d[_]}),o.attr(\\\"transform\\\",\\\"translate(\\\"+y+\\\",\\\"+x+\\\")\\\")}(t,h,u,o._name,r)})}},{\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../drawing\\\":595,\\\"../legend/anchor_utils\\\":622,\\\"./constants\\\":637,\\\"./get_update_object\\\":640,d3:148}],640:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\");e.exports=function(t,e){var r=t._name,i={};if(\\\"all\\\"===e.step)i[r+\\\".autorange\\\"]=!0;else{var a=function(t,e){var r,i=t.range,a=new Date(t.r2l(i[1])),o=e.step,s=e.count;switch(e.stepmode){case\\\"backward\\\":r=t.l2r(+n.time[o].utc.offset(a,-s));break;case\\\"todate\\\":var l=n.time[o].utc.offset(a,-s);r=t.l2r(+n.time[o].utc.ceil(l))}var c=i[1];return[r,c]}(t,e);i[r+\\\".range[0]\\\"]=a[0],i[r+\\\".range[1]\\\"]=a[1]}return i}},{d3:148}],641:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"component\\\",name:\\\"rangeselector\\\",schema:{subplots:{xaxis:{rangeselector:t(\\\"./attributes\\\")}}},layoutAttributes:t(\\\"./attributes\\\"),handleDefaults:t(\\\"./defaults\\\"),draw:t(\\\"./draw\\\")}},{\\\"./attributes\\\":636,\\\"./defaults\\\":638,\\\"./draw\\\":639}],642:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../color/attributes\\\");e.exports={bgcolor:{valType:\\\"color\\\",dflt:n.background,editType:\\\"plot\\\"},bordercolor:{valType:\\\"color\\\",dflt:n.defaultLine,editType:\\\"plot\\\"},borderwidth:{valType:\\\"integer\\\",dflt:0,min:0,editType:\\\"plot\\\"},autorange:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\",impliedEdits:{\\\"range[0]\\\":void 0,\\\"range[1]\\\":void 0}},range:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"calc\\\",impliedEdits:{\\\"^autorange\\\":!1}},{valType:\\\"any\\\",editType:\\\"calc\\\",impliedEdits:{\\\"^autorange\\\":!1}}],editType:\\\"calc\\\",impliedEdits:{autorange:!1}},thickness:{valType:\\\"number\\\",dflt:.15,min:0,max:1,editType:\\\"plot\\\"},visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},editType:\\\"calc\\\"}},{\\\"../color/attributes\\\":569}],643:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axis_ids\\\").list,i=t(\\\"../../plots/cartesian/autorange\\\").getAutoRange,a=t(\\\"./constants\\\");e.exports=function(t){for(var e=n(t,\\\"x\\\",!0),r=0;r<e.length;r++){var o=e[r],s=o[a.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=i(t,o))}}},{\\\"../../plots/cartesian/autorange\\\":744,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"./constants\\\":644}],644:[function(t,e,r){\\\"use strict\\\";e.exports={name:\\\"rangeslider\\\",containerClassName:\\\"rangeslider-container\\\",bgClassName:\\\"rangeslider-bg\\\",rangePlotClassName:\\\"rangeslider-rangeplot\\\",maskMinClassName:\\\"rangeslider-mask-min\\\",maskMaxClassName:\\\"rangeslider-mask-max\\\",slideBoxClassName:\\\"rangeslider-slidebox\\\",grabberMinClassName:\\\"rangeslider-grabber-min\\\",grabAreaMinClassName:\\\"rangeslider-grabarea-min\\\",handleMinClassName:\\\"rangeslider-handle-min\\\",grabberMaxClassName:\\\"rangeslider-grabber-max\\\",grabAreaMaxClassName:\\\"rangeslider-grabarea-max\\\",handleMaxClassName:\\\"rangeslider-handle-max\\\",maskMinOppAxisClassName:\\\"rangeslider-mask-min-opp-axis\\\",maskMaxOppAxisClassName:\\\"rangeslider-mask-max-opp-axis\\\",maskColor:\\\"rgba(0,0,0,0.4)\\\",maskOppAxisColor:\\\"rgba(0,0,0,0.2)\\\",slideBoxFill:\\\"transparent\\\",slideBoxCursor:\\\"ew-resize\\\",grabAreaFill:\\\"transparent\\\",grabAreaCursor:\\\"col-resize\\\",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],645:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plot_api/plot_template\\\"),a=t(\\\"../../plots/cartesian/axis_ids\\\"),o=t(\\\"./attributes\\\"),s=t(\\\"./oppaxis_attributes\\\");e.exports=function(t,e,r){var l=t[r],c=e[r];if(l.rangeslider||e._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,f,h=l.rangeslider,p=i.newContainer(c,\\\"rangeslider\\\");if(_(\\\"visible\\\")){_(\\\"bgcolor\\\",e.plot_bgcolor),_(\\\"bordercolor\\\"),_(\\\"borderwidth\\\"),_(\\\"thickness\\\"),_(\\\"autorange\\\",!c.isValidRange(h.range)),_(\\\"range\\\");var d=e._subplots;if(d)for(var g=d.cartesian.filter(function(t){return t.substr(0,t.indexOf(\\\"y\\\"))===a.name2id(r)}).map(function(t){return t.substr(t.indexOf(\\\"y\\\"),t.length)}),v=n.simpleMap(g,a.id2name),m=0;m<v.length;m++){var y=v[m];u=h[y]||{},f=i.newContainer(p,y,\\\"yaxis\\\");var x,b=e[y];u.range&&b.isValidRange(u.range)&&(x=\\\"fixed\\\"),\\\"match\\\"!==w(\\\"rangemode\\\",x)&&w(\\\"range\\\",b.range.slice())}p._input=h}}function _(t,e){return n.coerce(h,p,o,t,e)}function w(t,e){return n.coerce(u,f,s,t,e)}}},{\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"./attributes\\\":642,\\\"./oppaxis_attributes\\\":648}],646:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../drawing\\\"),l=t(\\\"../color\\\"),c=t(\\\"../titles\\\"),u=t(\\\"../../plots/cartesian\\\"),f=t(\\\"../../plots/cartesian/axes\\\"),h=t(\\\"../dragelement\\\"),p=t(\\\"../../lib/setcursor\\\"),d=t(\\\"./constants\\\");function g(t,e,r,n){var i=o.ensureSingle(t,\\\"rect\\\",d.bgClassName,function(t){t.attr({x:0,y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}),a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,l=-n._offsetShift,c=s.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:\\\"translate(\\\"+l+\\\",\\\"+l+\\\")\\\",fill:n.bgcolor,stroke:n.bordercolor,\\\"stroke-width\\\":c})}function v(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,\\\"clipPath\\\",n._clipId,function(t){t.append(\\\"rect\\\").attr({x:0,y:0})}).select(\\\"rect\\\").attr({width:n._width,height:n._height})}function m(t,e,r,i){var l,c=f.getSubplots(e,r),h=e.calcdata,p=t.selectAll(\\\"g.\\\"+d.rangePlotClassName).data(c,o.identity);p.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return d.rangePlotClassName+\\\" \\\"+t}).call(s.setClipUrl,i._clipId),p.order(),p.exit().remove(),p.each(function(t,o){var s=n.select(this),c=0===o,p=f.getFromId(e,t,\\\"y\\\"),d=p._name,g=i[d],v={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};v.layout[d]={type:p.type,domain:[0,1],range:\\\"match\\\"!==g.rangemode?g.range.slice():p.range.slice(),calendar:p.calendar},a.supplyDefaults(v);var m={id:t,plotgroup:s,xaxis:v._fullLayout.xaxis,yaxis:v._fullLayout[d],isRangePlot:!0};c?l=m:(m.mainplot=\\\"xy\\\",m.mainplotinfo=l),u.rangePlot(e,m,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(h,t))})}function y(t,e,r,n,i){(o.ensureSingle(t,\\\"rect\\\",d.maskMinClassName,function(t){t.attr({x:0,y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr(\\\"height\\\",n._height).call(l.fill,d.maskColor),o.ensureSingle(t,\\\"rect\\\",d.maskMaxClassName,function(t){t.attr({y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr(\\\"height\\\",n._height).call(l.fill,d.maskColor),\\\"match\\\"!==i.rangemode)&&(o.ensureSingle(t,\\\"rect\\\",d.maskMinOppAxisClassName,function(t){t.attr({y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr(\\\"width\\\",n._width).call(l.fill,d.maskOppAxisColor),o.ensureSingle(t,\\\"rect\\\",d.maskMaxOppAxisClassName,function(t){t.attr({y:0,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr(\\\"width\\\",n._width).style(\\\"border-top\\\",d.maskOppBorder).call(l.fill,d.maskOppAxisColor))}function x(t,e,r,n){e._context.staticPlot||o.ensureSingle(t,\\\"rect\\\",d.slideBoxClassName,function(t){t.attr({y:0,cursor:d.slideBoxCursor,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).attr({height:n._height,fill:d.slideBoxFill})}function b(t,e,r,n){var i=o.ensureSingle(t,\\\"g\\\",d.grabberMinClassName),a=o.ensureSingle(t,\\\"g\\\",d.grabberMaxClassName),s={x:0,width:d.handleWidth,rx:d.handleRadius,fill:l.background,stroke:l.defaultLine,\\\"stroke-width\\\":d.handleStrokeWidth,\\\"shape-rendering\\\":\\\"crispEdges\\\"},c={y:Math.round(n._height/4),height:Math.round(n._height/2)};if(o.ensureSingle(i,\\\"rect\\\",d.handleMinClassName,function(t){t.attr(s)}).attr(c),o.ensureSingle(a,\\\"rect\\\",d.handleMaxClassName,function(t){t.attr(s)}).attr(c),!e._context.staticPlot){var u={width:d.grabAreaWidth,x:0,y:0,fill:d.grabAreaFill,cursor:d.grabAreaCursor};o.ensureSingle(i,\\\"rect\\\",d.grabAreaMinClassName,function(t){t.attr(u)}).attr(\\\"height\\\",n._height),o.ensureSingle(a,\\\"rect\\\",d.grabAreaMaxClassName,function(t){t.attr(u)}).attr(\\\"height\\\",n._height)}}e.exports=function(t){var e=t._fullLayout,r=function(t){var e=f.list({_fullLayout:t},\\\"x\\\",!0),r=d.name,n=[];if(t._has(\\\"gl2d\\\"))return n;for(var i=0;i<e.length;i++){var a=e[i];a[r]&&a[r].visible&&n.push(a)}return n}(e);var s=e._infolayer.selectAll(\\\"g.\\\"+d.containerClassName).data(r,function(t){return t._name});s.enter().append(\\\"g\\\").classed(d.containerClassName,!0).attr(\\\"pointer-events\\\",\\\"all\\\"),s.exit().each(function(t){var r=t[d.name];e._topdefs.select(\\\"#\\\"+r._clipId).remove()}).remove(),0!==r.length&&s.each(function(r){var s=n.select(this),l=r[d.name],u=e[f.id2name(r.anchor)],_=l[f.id2name(r.anchor)];if(l.range){var w=l.range,k=r.range;w[0]=r.l2r(Math.min(r.r2l(w[0]),r.r2l(k[0]))),w[1]=r.l2r(Math.max(r.r2l(w[1]),r.r2l(k[1]))),l._input.range=w.slice()}r.cleanRange(\\\"rangeslider.range\\\");for(var M=e.margin,A=e._size,T=r.domain,S=(r._boundingBox||{}).height||0,C=1/0,E=f.getSubplots(t,r),L=0;L<E.length;L++){var z=f.getFromId(t,E[L].substr(E[L].indexOf(\\\"y\\\")));C=Math.min(C,z.domain[0])}l._id=d.name+r._id,l._clipId=l._id+\\\"-\\\"+e._uid,l._width=A.w*(T[1]-T[0]),l._height=(e.height-M.b-M.t)*l.thickness,l._offsetShift=Math.floor(l.borderwidth/2);var O=Math.round(M.l+A.w*T[0]),I=Math.round(A.t+A.h*(1-C)+S+l._offsetShift+d.extraPad);s.attr(\\\"transform\\\",\\\"translate(\\\"+O+\\\",\\\"+I+\\\")\\\");var P=r.r2l(l.range[0]),D=r.r2l(l.range[1]),R=D-P;if(l.p2d=function(t){return t/l._width*R+P},l.d2p=function(t){return(t-P)/R*l._width},l._rl=[P,D],\\\"match\\\"!==_.rangemode){var B=u.r2l(_.range[0]),F=u.r2l(_.range[1])-B;l.d2pOppAxis=function(t){return(t-B)/F*l._height}}s.call(g,t,r,l).call(v,t,r,l).call(m,t,r,l).call(y,t,r,l,_).call(x,t,r,l).call(b,t,r,l),function(t,e,r,a){var s=t.select(\\\"rect.\\\"+d.slideBoxClassName).node(),l=t.select(\\\"rect.\\\"+d.grabAreaMinClassName).node(),c=t.select(\\\"rect.\\\"+d.grabAreaMaxClassName).node();t.on(\\\"mousedown\\\",function(){var u=n.event,f=u.target,d=u.clientX,g=d-t.node().getBoundingClientRect().left,v=a.d2p(r._rl[0]),m=a.d2p(r._rl[1]),y=h.coverSlip();function x(t){var u,h,x,b=+t.clientX-d;switch(f){case s:x=\\\"ew-resize\\\",u=v+b,h=m+b;break;case l:x=\\\"col-resize\\\",u=v+b,h=m;break;case c:x=\\\"col-resize\\\",u=v,h=m+b;break;default:x=\\\"ew-resize\\\",u=g,h=g+b}if(h<u){var _=h;h=u,u=_}a._pixelMin=u,a._pixelMax=h,p(n.select(y),x),function(t,e,r,n){function a(t){return r.l2r(o.constrain(t,n._rl[0],n._rl[1]))}var s=a(n.p2d(n._pixelMin)),l=a(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){i.call(\\\"relayout\\\",e,r._name+\\\".range\\\",[s,l])})}(0,e,r,a)}y.addEventListener(\\\"mousemove\\\",x),y.addEventListener(\\\"mouseup\\\",function t(){y.removeEventListener(\\\"mousemove\\\",x);y.removeEventListener(\\\"mouseup\\\",t);o.removeElement(y)})})}(s,t,r,l),function(t,e,r,n,i,a){var s=d.handleWidth/2;function l(t){return o.constrain(t,0,n._width)}function c(t){return o.constrain(t,0,n._height)}function u(t){return o.constrain(t,-s,n._width+s)}var f=l(n.d2p(r._rl[0])),h=l(n.d2p(r._rl[1]));if(t.select(\\\"rect.\\\"+d.slideBoxClassName).attr(\\\"x\\\",f).attr(\\\"width\\\",h-f),t.select(\\\"rect.\\\"+d.maskMinClassName).attr(\\\"width\\\",f),t.select(\\\"rect.\\\"+d.maskMaxClassName).attr(\\\"x\\\",h).attr(\\\"width\\\",n._width-h),\\\"match\\\"!==a.rangemode){var p=n._height-c(n.d2pOppAxis(i._rl[1])),g=n._height-c(n.d2pOppAxis(i._rl[0]));t.select(\\\"rect.\\\"+d.maskMinOppAxisClassName).attr(\\\"x\\\",f).attr(\\\"height\\\",p).attr(\\\"width\\\",h-f),t.select(\\\"rect.\\\"+d.maskMaxOppAxisClassName).attr(\\\"x\\\",f).attr(\\\"y\\\",g).attr(\\\"height\\\",n._height-g).attr(\\\"width\\\",h-f),t.select(\\\"rect.\\\"+d.slideBoxClassName).attr(\\\"y\\\",p).attr(\\\"height\\\",g-p)}var v=Math.round(u(f-s))-.5,m=Math.round(u(h-s))+.5;t.select(\\\"g.\\\"+d.grabberMinClassName).attr(\\\"transform\\\",\\\"translate(\\\"+v+\\\",0.5)\\\"),t.select(\\\"g.\\\"+d.grabberMaxClassName).attr(\\\"transform\\\",\\\"translate(\\\"+m+\\\",0.5)\\\")}(s,0,r,l,u,_),\\\"bottom\\\"===r.side&&c.draw(t,r._id+\\\"title\\\",{propContainer:r,propName:r._name+\\\".title\\\",placeholder:e._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:I+l._height+l._offsetShift+10+1.5*r.titlefont.size,\\\"text-anchor\\\":\\\"middle\\\"}}),a.autoMargin(t,l._id,{x:T[0],y:C,l:0,r:0,t:0,b:l._height+M.b+S,pad:d.extraPad+2*l._offsetShift})})}},{\\\"../../lib\\\":696,\\\"../../lib/setcursor\\\":717,\\\"../../plots/cartesian\\\":757,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"../titles\\\":661,\\\"./constants\\\":644,d3:148}],647:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"./oppaxis_attributes\\\");e.exports={moduleType:\\\"component\\\",name:\\\"rangeslider\\\",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:t(\\\"./attributes\\\"),handleDefaults:t(\\\"./defaults\\\"),calcAutorange:t(\\\"./calc_autorange\\\"),draw:t(\\\"./draw\\\")}},{\\\"../../lib\\\":696,\\\"./attributes\\\":642,\\\"./calc_autorange\\\":643,\\\"./defaults\\\":645,\\\"./draw\\\":646,\\\"./oppaxis_attributes\\\":648}],648:[function(t,e,r){\\\"use strict\\\";e.exports={_isSubplotObj:!0,rangemode:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"fixed\\\",\\\"match\\\"],dflt:\\\"match\\\",editType:\\\"calc\\\"},range:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"plot\\\"},{valType:\\\"any\\\",editType:\\\"plot\\\"}],editType:\\\"plot\\\"},editType:\\\"calc\\\"}},{}],649:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../annotations/attributes\\\"),i=t(\\\"../../traces/scatter/attributes\\\").line,a=t(\\\"../drawing/attributes\\\").dash,o=t(\\\"../../lib/extend\\\").extendFlat,s=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports=s(\\\"shape\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc+arraydraw\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"circle\\\",\\\"rect\\\",\\\"path\\\",\\\"line\\\"],editType:\\\"calc+arraydraw\\\"},layer:{valType:\\\"enumerated\\\",values:[\\\"below\\\",\\\"above\\\"],dflt:\\\"above\\\",editType:\\\"arraydraw\\\"},xref:o({},n.xref,{}),xsizemode:{valType:\\\"enumerated\\\",values:[\\\"scaled\\\",\\\"pixel\\\"],dflt:\\\"scaled\\\",editType:\\\"calc+arraydraw\\\"},xanchor:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},x0:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},x1:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},yref:o({},n.yref,{}),ysizemode:{valType:\\\"enumerated\\\",values:[\\\"scaled\\\",\\\"pixel\\\"],dflt:\\\"scaled\\\",editType:\\\"calc+arraydraw\\\"},yanchor:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},y0:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},y1:{valType:\\\"any\\\",editType:\\\"calc+arraydraw\\\"},path:{valType:\\\"string\\\",editType:\\\"calc+arraydraw\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,editType:\\\"arraydraw\\\"},line:{color:o({},i.color,{editType:\\\"arraydraw\\\"}),width:o({},i.width,{editType:\\\"calc+arraydraw\\\"}),dash:o({},a,{editType:\\\"arraydraw\\\"}),editType:\\\"calc+arraydraw\\\"},fillcolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\",editType:\\\"arraydraw\\\"},editType:\\\"arraydraw\\\"})},{\\\"../../lib/extend\\\":685,\\\"../../plot_api/plot_template\\\":735,\\\"../../traces/scatter/attributes\\\":1044,\\\"../annotations/attributes\\\":553,\\\"../drawing/attributes\\\":594}],650:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"./constants\\\"),o=t(\\\"./helpers\\\");function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,u=l;if(\\\"pixel\\\"===e){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],h=n.aggNums(Math.max,null,f),p=n.aggNums(Math.min,null,f),d=p<0?Math.abs(p)+c:c,g=h>0?h+c:c;return{ppad:c,ppadplus:u?d:g,ppadminus:u?g:d}}return{ppad:c}}function u(t,e,r,n,i){var s=\\\"category\\\"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,c,u,f,h=1/0,p=-1/0,d=n.match(a.segmentRE);for(\\\"date\\\"===t.type&&(s=o.decodeDate(s)),l=0;l<d.length;l++)void 0!==(c=i[d[l].charAt(0)].drawn)&&(!(u=d[l].substr(1).match(a.paramRE))||u.length<c||((f=s(u[c]))<h&&(h=f),f>p&&(p=f)));return p>=h?[h,p]:void 0}}e.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o<r.length;o++){var c,f,h=r[o];if(h._extremes={},\\\"paper\\\"!==h.xref){var p=\\\"pixel\\\"===h.xsizemode?h.xanchor:h.x0,d=\\\"pixel\\\"===h.xsizemode?h.xanchor:h.x1;(f=u(c=i.getFromId(t,h.xref),p,d,h.path,a.paramIsX))&&(h._extremes[c._id]=i.findExtremes(c,f,s(h)))}if(\\\"paper\\\"!==h.yref){var g=\\\"pixel\\\"===h.ysizemode?h.yanchor:h.y0,v=\\\"pixel\\\"===h.ysizemode?h.yanchor:h.y1;(f=u(c=i.getFromId(t,h.yref),g,v,h.path,a.paramIsY))&&(h._extremes[c._id]=i.findExtremes(c,f,l(h)))}}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"./constants\\\":651,\\\"./helpers\\\":654}],651:[function(t,e,r){\\\"use strict\\\";e.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\\\\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],652:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../plots/array_container_defaults\\\"),o=t(\\\"./attributes\\\"),s=t(\\\"./helpers\\\");function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(a(\\\"visible\\\")){a(\\\"layer\\\"),a(\\\"opacity\\\"),a(\\\"fillcolor\\\"),a(\\\"line.color\\\"),a(\\\"line.width\\\"),a(\\\"line.dash\\\");for(var l=a(\\\"type\\\",t.path?\\\"path\\\":\\\"rect\\\"),c=a(\\\"xsizemode\\\"),u=a(\\\"ysizemode\\\"),f=[\\\"x\\\",\\\"y\\\"],h=0;h<2;h++){var p,d,g,v=f[h],m=v+\\\"anchor\\\",y=\\\"x\\\"===v?c:u,x={_fullLayout:r},b=i.coerceRef(t,e,x,v,\\\"\\\",\\\"paper\\\");if(\\\"paper\\\"!==b?((p=i.getFromId(x,b))._shapeIndices.push(e._index),g=s.rangeToShapePosition(p),d=s.shapePositionToRange(p)):d=g=n.identity,\\\"path\\\"!==l){var _=v+\\\"0\\\",w=v+\\\"1\\\",k=t[_],M=t[w];t[_]=d(t[_],!0),t[w]=d(t[w],!0),\\\"pixel\\\"===y?(a(_,0),a(w,10)):(i.coercePosition(e,x,a,b,_,.25),i.coercePosition(e,x,a,b,w,.75)),e[_]=g(e[_]),e[w]=g(e[w]),t[_]=k,t[w]=M}if(\\\"pixel\\\"===y){var A=t[m];t[m]=d(t[m],!0),i.coercePosition(e,x,a,b,m,.25),e[m]=g(e[m]),t[m]=A}}\\\"path\\\"===l?a(\\\"path\\\"):n.noneOrAll(t,e,[\\\"x0\\\",\\\"x1\\\",\\\"y0\\\",\\\"y1\\\"])}}e.exports=function(t,e){a(t,e,{name:\\\"shapes\\\",handleItemDefaults:l})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/cartesian/axes\\\":745,\\\"./attributes\\\":649,\\\"./helpers\\\":654}],653:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../color\\\"),s=t(\\\"../drawing\\\"),l=t(\\\"../../plot_api/plot_template\\\").arrayEditor,c=t(\\\"../dragelement\\\"),u=t(\\\"../../lib/setcursor\\\"),f=t(\\\"./constants\\\"),h=t(\\\"./helpers\\\");function p(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index=\\\"'+e+'\\\"]').remove();var r=t._fullLayout.shapes[e]||{};if(r._input&&!1!==r.visible)if(\\\"below\\\"!==r.layer)m(t._fullLayout._shapeUpperLayer);else if(\\\"paper\\\"===r.xref||\\\"paper\\\"===r.yref)m(t._fullLayout._shapeLowerLayer);else{var p=t._fullLayout._plots[r.xref+r.yref];if(p)m((p.mainplotinfo||p).shapelayer);else m(t._fullLayout._shapeLowerLayer)}function m(p){var m={\\\"data-index\\\":e,\\\"fill-rule\\\":\\\"evenodd\\\",d:g(t,r)},y=r.line.width?r.line.color:\\\"rgba(0,0,0,0)\\\",x=p.append(\\\"path\\\").attr(m).style(\\\"opacity\\\",r.opacity).call(o.stroke,y).call(o.fill,r.fillcolor).call(s.dashLine,r.line.dash,r.line.width);d(x,t,r),t._context.edits.shapePosition&&function(t,e,r,o,p){var m,y,x,b,_,w,k,M,A,T,S,C,E,L,z,O,I=10,P=10,D=\\\"pixel\\\"===r.xsizemode,R=\\\"pixel\\\"===r.ysizemode,B=\\\"line\\\"===r.type,F=\\\"path\\\"===r.type,N=l(t.layout,\\\"shapes\\\",r),j=N.modifyItem,V=a.getFromId(t,r.xref),U=a.getFromId(t,r.yref),q=h.getDataToPixel(t,V),H=h.getDataToPixel(t,U,!0),G=h.getPixelToData(t,V),W=h.getPixelToData(t,U,!0),Y=B?function(){var t=Math.max(r.line.width,10),n=p.append(\\\"g\\\").attr(\\\"data-index\\\",o);n.append(\\\"path\\\").attr(\\\"d\\\",e.attr(\\\"d\\\")).style({cursor:\\\"move\\\",\\\"stroke-width\\\":t,\\\"stroke-opacity\\\":\\\"0\\\"});var i={\\\"fill-opacity\\\":\\\"0\\\"},a=t/2>10?t/2:10;return n.append(\\\"circle\\\").attr({\\\"data-line-point\\\":\\\"start-point\\\",cx:D?q(r.xanchor)+r.x0:q(r.x0),cy:R?H(r.yanchor)-r.y0:H(r.y0),r:a}).style(i).classed(\\\"cursor-grab\\\",!0),n.append(\\\"circle\\\").attr({\\\"data-line-point\\\":\\\"end-point\\\",cx:D?q(r.xanchor)+r.x1:q(r.x1),cy:R?H(r.yanchor)-r.y1:H(r.y1),r:a}).style(i).classed(\\\"cursor-grab\\\",!0),n}():e,X={element:Y.node(),gd:t,prepFn:function(n){D&&(_=q(r.xanchor));R&&(w=H(r.yanchor));\\\"path\\\"===r.type?z=r.path:(m=D?r.x0:q(r.x0),y=R?r.y0:H(r.y0),x=D?r.x1:q(r.x1),b=R?r.y1:H(r.y1));m<x?(A=m,E=\\\"x0\\\",T=x,L=\\\"x1\\\"):(A=x,E=\\\"x1\\\",T=m,L=\\\"x0\\\");!R&&y<b||R&&y>b?(k=y,S=\\\"y0\\\",M=b,C=\\\"y1\\\"):(k=b,S=\\\"y1\\\",M=y,C=\\\"y0\\\");Z(n),K(p,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),l=a.getFromId(r,i),c=\\\"\\\";\\\"paper\\\"===n||o.autorange||(c+=n);\\\"paper\\\"===i||l.autorange||(c+=i);t.call(s.setClipUrl,c?\\\"clip\\\"+r._fullLayout._uid+c:null)}(e,r,t),X.moveFn=\\\"move\\\"===O?$:J},doneFn:function(){u(e),Q(p),d(e,t,r),n.call(\\\"relayout\\\",t,N.getUpdateObj())},clickFn:function(){Q(p)}};function Z(t){if(B)O=\\\"path\\\"===t.target.tagName?\\\"move\\\":\\\"start-point\\\"===t.target.attributes[\\\"data-line-point\\\"].value?\\\"resize-over-start-point\\\":\\\"resize-over-end-point\\\";else{var r=X.element.getBoundingClientRect(),n=r.right-r.left,i=r.bottom-r.top,a=t.clientX-r.left,o=t.clientY-r.top,s=!F&&n>I&&i>P&&!t.shiftKey?c.getCursor(a/n,1-o/i):\\\"move\\\";u(e,s),O=s.split(\\\"-\\\")[0]}}function $(n,i){if(\\\"path\\\"===r.type){var a=function(t){return t},o=a,s=a;D?j(\\\"xanchor\\\",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&&\\\"date\\\"===V.type&&(o=h.encodeDate(o))),R?j(\\\"yanchor\\\",r.yanchor=W(w+i)):(s=function(t){return W(H(t)+i)},U&&\\\"date\\\"===U.type&&(s=h.encodeDate(s))),j(\\\"path\\\",r.path=v(z,o,s))}else D?j(\\\"xanchor\\\",r.xanchor=G(_+n)):(j(\\\"x0\\\",r.x0=G(m+n)),j(\\\"x1\\\",r.x1=G(x+n))),R?j(\\\"yanchor\\\",r.yanchor=W(w+i)):(j(\\\"y0\\\",r.y0=W(y+i)),j(\\\"y1\\\",r.y1=W(b+i)));e.attr(\\\"d\\\",g(t,r)),K(p,r)}function J(n,i){if(F){var a=function(t){return t},o=a,s=a;D?j(\\\"xanchor\\\",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&&\\\"date\\\"===V.type&&(o=h.encodeDate(o))),R?j(\\\"yanchor\\\",r.yanchor=W(w+i)):(s=function(t){return W(H(t)+i)},U&&\\\"date\\\"===U.type&&(s=h.encodeDate(s))),j(\\\"path\\\",r.path=v(z,o,s))}else if(B){if(\\\"resize-over-start-point\\\"===O){var l=m+n,c=R?y-i:y+i;j(\\\"x0\\\",r.x0=D?l:G(l)),j(\\\"y0\\\",r.y0=R?c:W(c))}else if(\\\"resize-over-end-point\\\"===O){var u=x+n,f=R?b-i:b+i;j(\\\"x1\\\",r.x1=D?u:G(u)),j(\\\"y1\\\",r.y1=R?f:W(f))}}else{var d=~O.indexOf(\\\"n\\\")?k+i:k,N=~O.indexOf(\\\"s\\\")?M+i:M,Y=~O.indexOf(\\\"w\\\")?A+n:A,X=~O.indexOf(\\\"e\\\")?T+n:T;~O.indexOf(\\\"n\\\")&&R&&(d=k-i),~O.indexOf(\\\"s\\\")&&R&&(N=M-i),(!R&&N-d>P||R&&d-N>P)&&(j(S,r[S]=R?d:W(d)),j(C,r[C]=R?N:W(N))),X-Y>I&&(j(E,r[E]=D?Y:G(Y)),j(L,r[L]=D?X:G(X)))}e.attr(\\\"d\\\",g(t,r)),K(p,r)}function K(t,e){(D||R)&&function(){var r=\\\"path\\\"!==e.type,n=t.selectAll(\\\".visual-cue\\\").data([0]);n.enter().append(\\\"path\\\").attr({fill:\\\"#fff\\\",\\\"fill-rule\\\":\\\"evenodd\\\",stroke:\\\"#000\\\",\\\"stroke-width\\\":1}).classed(\\\"visual-cue\\\",!0);var a=q(D?e.xanchor:i.midRange(r?[e.x0,e.x1]:h.extractPathCoords(e.path,f.paramIsX))),o=H(R?e.yanchor:i.midRange(r?[e.y0,e.y1]:h.extractPathCoords(e.path,f.paramIsY)));if(a=h.roundPositionForSharpStrokeRendering(a,1),o=h.roundPositionForSharpStrokeRendering(o,1),D&&R){var s=\\\"M\\\"+(a-1-1)+\\\",\\\"+(o-1-1)+\\\"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z\\\";n.attr(\\\"d\\\",s)}else if(D){var l=\\\"M\\\"+(a-1-1)+\\\",\\\"+(o-9-1)+\\\"v18 h2 v-18 Z\\\";n.attr(\\\"d\\\",l)}else{var c=\\\"M\\\"+(a-9-1)+\\\",\\\"+(o-1-1)+\\\"h18 v2 h-18 Z\\\";n.attr(\\\"d\\\",c)}}()}function Q(t){t.selectAll(\\\".visual-cue\\\").remove()}c.init(X),Y.node().onmousemove=Z}(t,x,r,e,p)}}function d(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,\\\"\\\");t.call(s.setClipUrl,n?\\\"clip\\\"+e._fullLayout._uid+n:null)}function g(t,e){var r,n,o,s,l,c,u,p,d=e.type,g=a.getFromId(t,e.xref),v=a.getFromId(t,e.yref),m=t._fullLayout._size;if(g?(r=h.shapePositionToRange(g),n=function(t){return g._offset+g.r2p(r(t,!0))}):n=function(t){return m.l+m.w*t},v?(o=h.shapePositionToRange(v),s=function(t){return v._offset+v.r2p(o(t,!0))}):s=function(t){return m.t+m.h*(1-t)},\\\"path\\\"===d)return g&&\\\"date\\\"===g.type&&(n=h.decodeDate(n)),v&&\\\"date\\\"===v.type&&(s=h.decodeDate(s)),function(t,e,r){var n=t.path,a=t.xsizemode,o=t.ysizemode,s=t.xanchor,l=t.yanchor;return n.replace(f.segmentRE,function(t){var n=0,c=t.charAt(0),u=f.paramIsX[c],h=f.paramIsY[c],p=f.numParams[c],d=t.substr(1).replace(f.paramRE,function(t){return u[n]?t=\\\"pixel\\\"===a?e(s)+Number(t):e(t):h[n]&&(t=\\\"pixel\\\"===o?r(l)-Number(t):r(t)),++n>p&&(t=\\\"X\\\"),t});return n>p&&(d=d.replace(/[\\\\s,]*X.*/,\\\"\\\"),i.log(\\\"Ignoring extra params in segment \\\"+t)),c+d})}(e,n,s);if(\\\"pixel\\\"===e.xsizemode){var y=n(e.xanchor);l=y+e.x0,c=y+e.x1}else l=n(e.x0),c=n(e.x1);if(\\\"pixel\\\"===e.ysizemode){var x=s(e.yanchor);u=x-e.y0,p=x-e.y1}else u=s(e.y0),p=s(e.y1);if(\\\"line\\\"===d)return\\\"M\\\"+l+\\\",\\\"+u+\\\"L\\\"+c+\\\",\\\"+p;if(\\\"rect\\\"===d)return\\\"M\\\"+l+\\\",\\\"+u+\\\"H\\\"+c+\\\"V\\\"+p+\\\"H\\\"+l+\\\"Z\\\";var b=(l+c)/2,_=(u+p)/2,w=Math.abs(b-l),k=Math.abs(_-u),M=\\\"A\\\"+w+\\\",\\\"+k,A=b+w+\\\",\\\"+_;return\\\"M\\\"+A+M+\\\" 0 1,1 \\\"+(b+\\\",\\\"+(_-k))+M+\\\" 0 0,1 \\\"+A+\\\"Z\\\"}function v(t,e,r){return t.replace(f.segmentRE,function(t){var n=0,i=t.charAt(0),a=f.paramIsX[i],o=f.paramIsY[i],s=f.numParams[i];return i+t.substr(1).replace(f.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}e.exports={draw:function(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll(\\\"path\\\").remove(),e._shapeLowerLayer.selectAll(\\\"path\\\").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll(\\\"path\\\").remove()}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible&&p(t,i)},drawOne:p}},{\\\"../../lib\\\":696,\\\"../../lib/setcursor\\\":717,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../dragelement\\\":592,\\\"../drawing\\\":595,\\\"./constants\\\":651,\\\"./helpers\\\":654}],654:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"../../lib\\\");r.rangeToShapePosition=function(t){return\\\"log\\\"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return\\\"log\\\"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace(\\\"_\\\",\\\" \\\")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(\\\" \\\",\\\"_\\\")}},r.extractPathCoords=function(t,e){var r=[];return t.match(n.segmentRE).forEach(function(t){var a=e[t.charAt(0)].drawn;if(void 0!==a){var o=t.substr(1).match(n.paramRE);!o||o.length<a||r.push(i.cleanNumber(o[a]))}}),r},r.getDataToPixel=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.shapePositionToRange(e);i=function(t){return e._offset+e.r2p(o(t,!0))},\\\"date\\\"===e.type&&(i=r.decodeDate(i))}else i=n?function(t){return a.t+a.h*(1-t)}:function(t){return a.l+a.w*t};return i},r.getPixelToData=function(t,e,n){var i,a=t._fullLayout._size;if(e){var o=r.rangeToShapePosition(e);i=function(t){return o(e.p2r(t-e._offset))}}else i=n?function(t){return 1-(t-a.t)/a.h}:function(t){return(t-a.l)/a.w};return i},r.roundPositionForSharpStrokeRendering=function(t,e){var r=1===Math.round(e%2),n=Math.round(t);return r?n+.5:n}},{\\\"../../lib\\\":696,\\\"./constants\\\":651}],655:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./draw\\\");e.exports={moduleType:\\\"component\\\",name:\\\"shapes\\\",layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),includeBasePlot:t(\\\"../../plots/cartesian/include_components\\\")(\\\"shapes\\\"),calcAutorange:t(\\\"./calc_autorange\\\"),draw:n.draw,drawOne:n.drawOne}},{\\\"../../plots/cartesian/include_components\\\":756,\\\"./attributes\\\":649,\\\"./calc_autorange\\\":650,\\\"./defaults\\\":652,\\\"./draw\\\":653}],656:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../../plots/pad_attributes\\\"),a=t(\\\"../../lib/extend\\\").extendDeepAll,o=t(\\\"../../plot_api/edit_types\\\").overrideAll,s=t(\\\"../../plots/animation_attributes\\\"),l=t(\\\"../../plot_api/plot_template\\\").templatedArray,c=t(\\\"./constants\\\"),u=l(\\\"step\\\",{visible:{valType:\\\"boolean\\\",dflt:!0},method:{valType:\\\"enumerated\\\",values:[\\\"restyle\\\",\\\"relayout\\\",\\\"animate\\\",\\\"update\\\",\\\"skip\\\"],dflt:\\\"restyle\\\"},args:{valType:\\\"info_array\\\",freeLength:!0,items:[{valType:\\\"any\\\"},{valType:\\\"any\\\"},{valType:\\\"any\\\"}]},label:{valType:\\\"string\\\"},value:{valType:\\\"string\\\"},execute:{valType:\\\"boolean\\\",dflt:!0}});e.exports=o(l(\\\"slider\\\",{visible:{valType:\\\"boolean\\\",dflt:!0},active:{valType:\\\"number\\\",min:0,dflt:0},steps:u,lenmode:{valType:\\\"enumerated\\\",values:[\\\"fraction\\\",\\\"pixels\\\"],dflt:\\\"fraction\\\"},len:{valType:\\\"number\\\",min:0,dflt:1},x:{valType:\\\"number\\\",min:-2,max:3,dflt:0},pad:a({},i,{},{t:{dflt:20}}),xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\"},y:{valType:\\\"number\\\",min:-2,max:3,dflt:0},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"top\\\"},transition:{duration:{valType:\\\"number\\\",min:0,dflt:150},easing:{valType:\\\"enumerated\\\",values:s.transition.easing.values,dflt:\\\"cubic-in-out\\\"}},currentvalue:{visible:{valType:\\\"boolean\\\",dflt:!0},xanchor:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"left\\\"},offset:{valType:\\\"number\\\",dflt:10},prefix:{valType:\\\"string\\\"},suffix:{valType:\\\"string\\\"},font:n({})},font:n({}),activebgcolor:{valType:\\\"color\\\",dflt:c.gripBgActiveColor},bgcolor:{valType:\\\"color\\\",dflt:c.railBgColor},bordercolor:{valType:\\\"color\\\",dflt:c.railBorderColor},borderwidth:{valType:\\\"number\\\",min:0,dflt:c.railBorderWidth},ticklen:{valType:\\\"number\\\",min:0,dflt:c.tickLength},tickcolor:{valType:\\\"color\\\",dflt:c.tickColor},tickwidth:{valType:\\\"number\\\",min:0,dflt:1},minorticklen:{valType:\\\"number\\\",min:0,dflt:c.minorTickLength}}),\\\"arraydraw\\\",\\\"from-root\\\")},{\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/animation_attributes\\\":740,\\\"../../plots/font_attributes\\\":772,\\\"../../plots/pad_attributes\\\":808,\\\"./constants\\\":657}],657:[function(t,e,r){\\\"use strict\\\";e.exports={name:\\\"sliders\\\",containerClassName:\\\"slider-container\\\",groupClassName:\\\"slider-group\\\",inputAreaClass:\\\"slider-input-area\\\",railRectClass:\\\"slider-rail-rect\\\",railTouchRectClass:\\\"slider-rail-touch-rect\\\",gripRectClass:\\\"slider-grip-rect\\\",tickRectClass:\\\"slider-tick-rect\\\",inputProxyClass:\\\"slider-input-proxy\\\",labelsClass:\\\"slider-labels\\\",labelGroupClass:\\\"slider-label-group\\\",labelClass:\\\"slider-label\\\",currentValueClass:\\\"slider-current-value\\\",railHeight:5,menuIndexAttrName:\\\"slider-active-index\\\",autoMarginIdRoot:\\\"slider-\\\",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:\\\"#bec8d9\\\",railBgColor:\\\"#f8fafc\\\",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:\\\"#bec8d9\\\",gripBgColor:\\\"#f6f8fa\\\",gripBgActiveColor:\\\"#dbdde0\\\",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:\\\"#333\\\",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:\\\"#333\\\",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],658:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/array_container_defaults\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"./constants\\\").name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:\\\"steps\\\",handleItemDefaults:c}),l=0,u=0;u<s.length;u++)s[u].visible&&l++;if(l<2?e.visible=!1:o(\\\"visible\\\")){e._stepCount=l;var f=e._visibleSteps=n.filterVisible(s);(s[o(\\\"active\\\")]||{}).visible||(e.active=f[0]._index),o(\\\"x\\\"),o(\\\"y\\\"),n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\"]),o(\\\"xanchor\\\"),o(\\\"yanchor\\\"),o(\\\"len\\\"),o(\\\"lenmode\\\"),o(\\\"pad.t\\\"),o(\\\"pad.r\\\"),o(\\\"pad.b\\\"),o(\\\"pad.l\\\"),n.coerceFont(o,\\\"font\\\",r.font),o(\\\"currentvalue.visible\\\")&&(o(\\\"currentvalue.xanchor\\\"),o(\\\"currentvalue.prefix\\\"),o(\\\"currentvalue.suffix\\\"),o(\\\"currentvalue.offset\\\"),n.coerceFont(o,\\\"currentvalue.font\\\",e.font)),o(\\\"transition.duration\\\"),o(\\\"transition.easing\\\"),o(\\\"bgcolor\\\"),o(\\\"activebgcolor\\\"),o(\\\"bordercolor\\\"),o(\\\"borderwidth\\\"),o(\\\"ticklen\\\"),o(\\\"tickwidth\\\"),o(\\\"tickcolor\\\"),o(\\\"minorticklen\\\")}}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}if(\\\"skip\\\"===t.method||Array.isArray(t.args)?r(\\\"visible\\\"):e.visible=!1){r(\\\"method\\\"),r(\\\"args\\\");var i=r(\\\"label\\\",\\\"step-\\\"+e._index);r(\\\"value\\\",i),r(\\\"execute\\\")}}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"./attributes\\\":656,\\\"./constants\\\":657}],659:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../plots/plots\\\"),a=t(\\\"../color\\\"),o=t(\\\"../drawing\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../legend/anchor_utils\\\"),u=t(\\\"../../plot_api/plot_template\\\").arrayEditor,f=t(\\\"./constants\\\"),h=t(\\\"../../constants/alignment\\\"),p=h.LINE_SPACING,d=h.FROM_TL,g=h.FROM_BR;function v(t){return f.autoMarginIdRoot+t._index}function m(t){return t._index}function y(t,e){var r=o.tester.selectAll(\\\"g.\\\"+f.labelGroupClass).data(e._visibleSteps);r.enter().append(\\\"g\\\").classed(f.labelGroupClass,!0);var a=0,s=0;r.each(function(t){var r=_(n.select(this),{step:t},e).node();if(r){var i=o.bBox(r);s=Math.max(s,i.height),a=Math.max(a,i.width)}}),r.remove();var u=e._dims={};u.inputAreaWidth=Math.max(f.railWidth,f.gripHeight);var h=t._fullLayout._size;u.lx=h.l+h.w*e.x,u.ly=h.t+h.h*(1-e.y),\\\"fraction\\\"===e.lenmode?u.outerLength=Math.round(h.w*e.len):u.outerLength=e.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-e.pad.l-e.pad.r);var p=(u.inputAreaLength-2*f.stepInset)/(e._stepCount-1),m=a+f.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(m/p)),u.labelHeight=s,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,e.currentvalue.visible){var y=o.tester.append(\\\"g\\\");r.each(function(t){var r=x(y,e,t.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},i=l.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,i)}),u.currentValueTotalHeight=u.currentValueHeight+e.currentvalue.offset,y.remove()}u.height=u.currentValueTotalHeight+f.tickOffset+e.ticklen+f.labelOffset+u.labelHeight+e.pad.t+e.pad.b;var b=\\\"left\\\";c.isRightAnchor(e)&&(u.lx-=u.outerLength,b=\\\"right\\\"),c.isCenterAnchor(e)&&(u.lx-=u.outerLength/2,b=\\\"center\\\");var w=\\\"top\\\";c.isBottomAnchor(e)&&(u.ly-=u.height,w=\\\"bottom\\\"),c.isMiddleAnchor(e)&&(u.ly-=u.height/2,w=\\\"middle\\\"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var k={y:e.y,b:u.height*g[w],t:u.height*d[w]};\\\"fraction\\\"===e.lenmode?(k.l=0,k.xl=e.x-e.len*d[b],k.r=0,k.xr=e.x+e.len*g[b]):(k.x=e.x,k.l=u.outerLength*d[b],k.r=u.outerLength*g[b]),i.autoMargin(t,v(e),k)}function x(t,e,r){if(e.currentvalue.visible){var n,i,a=e._dims;switch(e.currentvalue.xanchor){case\\\"right\\\":n=a.inputAreaLength-f.currentValueInset-a.currentValueMaxWidth,i=\\\"left\\\";break;case\\\"center\\\":n=.5*a.inputAreaLength,i=\\\"middle\\\";break;default:n=f.currentValueInset,i=\\\"left\\\"}var c=s.ensureSingle(t,\\\"text\\\",f.labelClass,function(t){t.classed(\\\"user-select-none\\\",!0).attr({\\\"text-anchor\\\":i,\\\"data-notex\\\":1})}),u=e.currentvalue.prefix?e.currentvalue.prefix:\\\"\\\";if(\\\"string\\\"==typeof r)u+=r;else u+=e.steps[e.active].label;e.currentvalue.suffix&&(u+=e.currentvalue.suffix),c.call(o.font,e.currentvalue.font).text(u).call(l.convertToTspans,e._gd);var h=l.lineCount(c),d=(a.currentValueMaxLines+1-h)*e.currentvalue.font.size*p;return l.positionText(c,n,d),c}}function b(t,e,r){s.ensureSingle(t,\\\"rect\\\",f.gripRectClass,function(n){n.call(A,e,t,r).style(\\\"pointer-events\\\",\\\"all\\\")}).attr({width:f.gripWidth,height:f.gripHeight,rx:f.gripRadius,ry:f.gripRadius}).call(a.stroke,r.bordercolor).call(a.fill,r.bgcolor).style(\\\"stroke-width\\\",r.borderwidth+\\\"px\\\")}function _(t,e,r){var n=s.ensureSingle(t,\\\"text\\\",f.labelClass,function(t){t.classed(\\\"user-select-none\\\",!0).attr({\\\"text-anchor\\\":\\\"middle\\\",\\\"data-notex\\\":1})});return n.call(o.font,r.font).text(e.step.label).call(l.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,\\\"g\\\",f.labelsClass),i=e._dims,a=r.selectAll(\\\"g.\\\"+f.labelGroupClass).data(i.labelSteps);a.enter().append(\\\"g\\\").classed(f.labelGroupClass,!0),a.exit().remove(),a.each(function(t){var r=n.select(this);r.call(_,t,e),o.setTranslate(r,C(e,t.fraction),f.tickOffset+e.ticklen+e.font.size*p+f.labelOffset+i.currentValueTotalHeight)})}function k(t,e,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&M(t,e,r,o,!0,i)}function M(t,e,r,n,a,o){var s=r.active;r.active=n,u(t.layout,f.name,r).applyUpdate(\\\"active\\\",n);var l=r.steps[r.active];e.call(S,r,o),e.call(x,r),t.emit(\\\"plotly_sliderchange\\\",{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&&l.method&&a&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function A(t,e,r){var i=r.node(),o=n.select(e);function s(){return r.data()[0]}t.on(\\\"mousedown\\\",function(){var t=s();e.emit(\\\"plotly_sliderstart\\\",{slider:t});var l=r.select(\\\".\\\"+f.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(a.fill,t.activebgcolor);var c=E(t,n.mouse(i)[0]);k(e,r,t,c,!0),t._dragging=!0,o.on(\\\"mousemove\\\",function(){var t=s(),a=E(t,n.mouse(i)[0]);k(e,r,t,a,!1)}),o.on(\\\"mouseup\\\",function(){var t=s();t._dragging=!1,l.call(a.fill,t.bgcolor),o.on(\\\"mouseup\\\",null),o.on(\\\"mousemove\\\",null),e.emit(\\\"plotly_sliderend\\\",{slider:t,step:t.steps[t.active]})})})}function T(t,e){var r=t.selectAll(\\\"rect.\\\"+f.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append(\\\"rect\\\").classed(f.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+\\\"px\\\",\\\"shape-rendering\\\":\\\"crispEdges\\\"}),r.each(function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(a.fill,e.tickcolor),o.setTranslate(l,C(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?f.tickOffset:f.minorTickOffset)+i.currentValueTotalHeight)})}function S(t,e,r){for(var n=t.select(\\\"rect.\\\"+f.gripRectClass),i=0,a=0;a<e._stepCount;a++)if(e._visibleSteps[a]._index===e.active){i=a;break}var o=C(e,i/(e._stepCount-1));if(!e._invokingCommand){var s=n;r&&e.transition.duration>0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(\\\"transform\\\",\\\"translate(\\\"+(o-.5*f.gripWidth)+\\\",\\\"+e._dims.currentValueTotalHeight+\\\")\\\")}}function C(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,\\\"rect\\\",f.railTouchRectClass,function(n){n.call(A,e,t,r).style(\\\"pointer-events\\\",\\\"all\\\")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr(\\\"opacity\\\",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function z(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,\\\"rect\\\",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,\\\"shape-rendering\\\":\\\"crispEdges\\\"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style(\\\"stroke-width\\\",e.borderwidth+\\\"px\\\"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[f.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=e,n.push(a))}return n}(e,t),a=e._infolayer.selectAll(\\\"g.\\\"+f.containerClassName).data(r.length>0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,v(e))}if(a.enter().append(\\\"g\\\").classed(f.containerClassName,!0).style(\\\"cursor\\\",\\\"ew-resize\\\"),a.exit().each(function(){n.select(this).selectAll(\\\"g.\\\"+f.groupClassName).each(s)}).remove(),0!==r.length){var l=a.selectAll(\\\"g.\\\"+f.groupClassName).data(r,m);l.enter().append(\\\"g\\\").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c<r.length;c++){var u=r[c];y(t,u)}l.each(function(e){var r=n.select(this);!function(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,n=0;n<r;n+=e.labelStride)e.labelSteps.push({fraction:n/(r-1),step:t._visibleSteps[n]})}(e),i.manageCommandObserver(t,e,e._visibleSteps,function(e){var n=r.data()[0];n.active!==e.index&&(n._dragging||M(t,r,n,e.index,!1,!0))}),function(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index);e.call(x,r).call(z,r).call(w,r).call(T,r).call(L,t,r).call(b,t,r);var n=r._dims;o.setTranslate(e,n.lx+r.pad.l,n.ly+r.pad.t),e.call(S,r,!1),e.call(x,r)}(t,n.select(this),e)})}}},{\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/plots\\\":809,\\\"../color\\\":570,\\\"../drawing\\\":595,\\\"../legend/anchor_utils\\\":622,\\\"./constants\\\":657,d3:148}],660:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\");e.exports={moduleType:\\\"component\\\",name:n.name,layoutAttributes:t(\\\"./attributes\\\"),supplyLayoutDefaults:t(\\\"./defaults\\\"),draw:t(\\\"./draw\\\")}},{\\\"./attributes\\\":656,\\\"./constants\\\":657,\\\"./defaults\\\":658,\\\"./draw\\\":659}],661:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../drawing\\\"),c=t(\\\"../color\\\"),u=t(\\\"../../lib/svg_text_utils\\\"),f=t(\\\"../../constants/interactions\\\");e.exports={draw:function(t,e,r){var p,d=r.propContainer,g=r.propName,v=r.placeholder,m=r.traceIndex,y=r.avoid||{},x=r.attributes,b=r.transform,_=r.containerGroup,w=t._fullLayout,k=d.titlefont||{},M=k.family,A=k.size,T=k.color,S=1,C=!1,E=(d.title||\\\"\\\").trim();\\\"title\\\"===g?p=\\\"titleText\\\":-1!==g.indexOf(\\\"axis\\\")?p=\\\"axisTitleText\\\":g.indexOf(!0)&&(p=\\\"colorbarTitleText\\\");var L=t._context.edits[p];\\\"\\\"===E?S=0:E.replace(h,\\\" % \\\")===v.replace(h,\\\" % \\\")&&(S=.2,C=!0,L||(E=\\\"\\\"));var z=E||L;_||(_=s.ensureSingle(w._infolayer,\\\"g\\\",\\\"g-\\\"+e));var O=_.selectAll(\\\"text\\\").data(z?[0]:[]);if(O.enter().append(\\\"text\\\"),O.text(E).attr(\\\"class\\\",e),O.exit().remove(),!z)return _;function I(t){s.syncOrAsync([P,D],t)}function P(e){var r;return b?(r=\\\"\\\",b.rotate&&(r+=\\\"rotate(\\\"+[b.rotate,x.x,x.y]+\\\")\\\"),b.offset&&(r+=\\\"translate(0, \\\"+b.offset+\\\")\\\")):r=null,e.attr(\\\"transform\\\",r),e.style({\\\"font-family\\\":M,\\\"font-size\\\":n.round(A,2)+\\\"px\\\",fill:c.rgb(T),opacity:S*c.opacity(T),\\\"font-weight\\\":a.fontWeight}).attr(x).call(u.convertToTspans,t),a.previousPromises(t)}function D(t){var e=n.select(t.node().parentNode);if(y&&y.selection&&y.side&&E){e.attr(\\\"transform\\\",null);var r=0,a={left:\\\"right\\\",right:\\\"left\\\",top:\\\"bottom\\\",bottom:\\\"top\\\"}[y.side],o=-1!==[\\\"left\\\",\\\"top\\\"].indexOf(y.side)?-1:1,c=i(y.pad)?y.pad:2,u=l.bBox(e.node()),f={left:0,top:0,right:w.width,bottom:w.height},h=y.maxShift||(f[y.side]-u[y.side])*(\\\"left\\\"===y.side||\\\"top\\\"===y.side?-1:1);if(h<0)r=h;else{var p=y.offsetLeft||0,d=y.offsetTop||0;u.left-=p,u.right-=p,u.top-=d,u.bottom-=d,y.selection.each(function(){var t=l.bBox(this);s.bBoxIntersect(u,t,c)&&(r=Math.max(r,o*(t[y.side]-u[a])+c))}),r=Math.min(h,r)}if(r>0||h<0){var g={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[y.side];e.attr(\\\"transform\\\",\\\"translate(\\\"+g+\\\")\\\")}}}O.call(I),L&&(E?O.on(\\\".opacity\\\",null):(S=0,C=!0,O.text(v).on(\\\"mouseover.opacity\\\",function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style(\\\"opacity\\\",1)}).on(\\\"mouseout.opacity\\\",function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style(\\\"opacity\\\",0)})),O.call(u.makeEditable,{gd:t}).on(\\\"edit\\\",function(e){void 0!==m?o.call(\\\"restyle\\\",t,g,e,m):o.call(\\\"relayout\\\",t,g,e)}).on(\\\"cancel\\\",function(){this.text(this.attr(\\\"data-unformatted\\\")).call(I)}).on(\\\"input\\\",function(t){this.text(t||\\\" \\\").call(u.positionText,x.x,x.y)}));return O.classed(\\\"js-placeholder\\\",C),_}};var h=/ [XY][0-9]* /},{\\\"../../constants/interactions\\\":672,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"../color\\\":570,\\\"../drawing\\\":595,d3:148,\\\"fast-isnumeric\\\":214}],662:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../color/attributes\\\"),a=t(\\\"../../lib/extend\\\").extendFlat,o=t(\\\"../../plot_api/edit_types\\\").overrideAll,s=t(\\\"../../plots/pad_attributes\\\"),l=t(\\\"../../plot_api/plot_template\\\").templatedArray,c=l(\\\"button\\\",{visible:{valType:\\\"boolean\\\"},method:{valType:\\\"enumerated\\\",values:[\\\"restyle\\\",\\\"relayout\\\",\\\"animate\\\",\\\"update\\\",\\\"skip\\\"],dflt:\\\"restyle\\\"},args:{valType:\\\"info_array\\\",freeLength:!0,items:[{valType:\\\"any\\\"},{valType:\\\"any\\\"},{valType:\\\"any\\\"}]},label:{valType:\\\"string\\\",dflt:\\\"\\\"},execute:{valType:\\\"boolean\\\",dflt:!0}});e.exports=o(l(\\\"updatemenu\\\",{_arrayAttrRegexps:[/^updatemenus\\\\[(0|[1-9][0-9]+)\\\\]\\\\.buttons/],visible:{valType:\\\"boolean\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"dropdown\\\",\\\"buttons\\\"],dflt:\\\"dropdown\\\"},direction:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"right\\\",\\\"up\\\",\\\"down\\\"],dflt:\\\"down\\\"},active:{valType:\\\"integer\\\",min:-1,dflt:0},showactive:{valType:\\\"boolean\\\",dflt:!0},buttons:c,x:{valType:\\\"number\\\",min:-2,max:3,dflt:-.05},xanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"left\\\",\\\"center\\\",\\\"right\\\"],dflt:\\\"right\\\"},y:{valType:\\\"number\\\",min:-2,max:3,dflt:1},yanchor:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],dflt:\\\"top\\\"},pad:a({},s,{}),font:n({}),bgcolor:{valType:\\\"color\\\"},bordercolor:{valType:\\\"color\\\",dflt:i.borderLine},borderwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"arraydraw\\\"}}),\\\"arraydraw\\\",\\\"from-root\\\")},{\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/font_attributes\\\":772,\\\"../../plots/pad_attributes\\\":808,\\\"../color/attributes\\\":569}],663:[function(t,e,r){\\\"use strict\\\";e.exports={name:\\\"updatemenus\\\",containerClassName:\\\"updatemenu-container\\\",headerGroupClassName:\\\"updatemenu-header-group\\\",headerClassName:\\\"updatemenu-header\\\",headerArrowClassName:\\\"updatemenu-header-arrow\\\",dropdownButtonGroupClassName:\\\"updatemenu-dropdown-button-group\\\",dropdownButtonClassName:\\\"updatemenu-dropdown-button\\\",buttonClassName:\\\"updatemenu-button\\\",itemRectClassName:\\\"updatemenu-item-rect\\\",itemTextClassName:\\\"updatemenu-item-text\\\",menuIndexAttrName:\\\"updatemenu-active-index\\\",autoMarginIdRoot:\\\"updatemenu-\\\",blankHeaderOpts:{label:\\\"  \\\"},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:\\\"#F4FAFF\\\",hoverColor:\\\"#F4FAFF\\\",arrowSymbol:{left:\\\"\\\\u25c4\\\",right:\\\"\\\\u25ba\\\",up:\\\"\\\\u25b2\\\",down:\\\"\\\\u25bc\\\"}}},{}],664:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/array_container_defaults\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"./constants\\\").name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o(\\\"visible\\\",i(t,e,{name:\\\"buttons\\\",handleItemDefaults:c}).length>0)&&(o(\\\"active\\\"),o(\\\"direction\\\"),o(\\\"type\\\"),o(\\\"showactive\\\"),o(\\\"x\\\"),o(\\\"y\\\"),n.noneOrAll(t,e,[\\\"x\\\",\\\"y\\\"]),o(\\\"xanchor\\\"),o(\\\"yanchor\\\"),o(\\\"pad.t\\\"),o(\\\"pad.r\\\"),o(\\\"pad.b\\\"),o(\\\"pad.l\\\"),n.coerceFont(o,\\\"font\\\",r.font),o(\\\"bgcolor\\\",r.paper_bgcolor),o(\\\"bordercolor\\\"),o(\\\"borderwidth\\\"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r(\\\"visible\\\",\\\"skip\\\"===t.method||Array.isArray(t.args))&&(r(\\\"method\\\"),r(\\\"args\\\"),r(\\\"label\\\"),r(\\\"execute\\\"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"./attributes\\\":662,\\\"./constants\\\":663}],665:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../plots/plots\\\"),a=t(\\\"../color\\\"),o=t(\\\"../drawing\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../legend/anchor_utils\\\"),u=t(\\\"../../plot_api/plot_template\\\").arrayEditor,f=t(\\\"../../constants/alignment\\\").LINE_SPACING,h=t(\\\"./constants\\\"),p=t(\\\"./scrollbox\\\");function d(t){return t._index}function g(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function v(t,e,r,n,i,a,o,s){e.active=o,u(t.layout,h.name,e).applyUpdate(\\\"active\\\",o),\\\"buttons\\\"===e.type?y(t,n,null,null,e):\\\"dropdown\\\"===e.type&&(i.attr(h.menuIndexAttrName,\\\"-1\\\"),m(t,n,i,a,e),s||y(t,n,i,a,e))}function m(t,e,r,n,i){var a=s.ensureSingle(e,\\\"g\\\",h.headerClassName,function(t){t.style(\\\"pointer-events\\\",\\\"all\\\")}),l=i._dims,c=i.active,u=i.buttons[c]||h.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(x,i,u,t).call(S,i,f,p),s.ensureSingle(e,\\\"text\\\",h.headerArrowClassName,function(t){t.classed(\\\"user-select-none\\\",!0).attr(\\\"text-anchor\\\",\\\"end\\\").call(o.font,i.font).text(h.arrowSymbol[i.direction])}).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),a.on(\\\"click\\\",function(){r.call(C,String(g(r,i)?-1:i._index)),y(t,e,r,n,i)}),a.on(\\\"mouseover\\\",function(){a.call(k)}),a.on(\\\"mouseout\\\",function(){a.call(M,i)}),o.setTranslate(e,l.lx,l.ly)}function y(t,e,r,a,o){r||(r=e).attr(\\\"pointer-events\\\",\\\"all\\\");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&\\\"buttons\\\"!==o.type?[]:o.buttons,c=\\\"dropdown\\\"===o.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll(\\\"g.\\\"+c).data(s.filterVisible(l)),f=u.enter().append(\\\"g\\\").classed(c,!0),p=u.exit();\\\"dropdown\\\"===o.type?(f.attr(\\\"opacity\\\",\\\"0\\\").transition().attr(\\\"opacity\\\",\\\"1\\\"),p.transition().attr(\\\"opacity\\\",\\\"0\\\").remove()):p.remove();var d=0,g=0,m=o._dims,y=-1!==[\\\"up\\\",\\\"down\\\"].indexOf(o.direction);\\\"dropdown\\\"===o.type&&(y?g=m.headerHeight+h.gapButtonHeader:d=m.headerWidth+h.gapButtonHeader),\\\"dropdown\\\"===o.type&&\\\"up\\\"===o.direction&&(g=-h.gapButtonHeader+h.gapButton-m.openHeight),\\\"dropdown\\\"===o.type&&\\\"left\\\"===o.direction&&(d=-h.gapButtonHeader+h.gapButton-m.openWidth);var b={x:m.lx+d+o.pad.l,y:m.ly+g+o.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},_={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each(function(s,l){var c=n.select(this);c.call(x,o,s,t).call(S,o,b),c.on(\\\"click\\\",function(){n.event.defaultPrevented||(v(t,o,0,e,r,a,l),s.execute&&i.executeAPICommand(t,s.method,s.args),t.emit(\\\"plotly_buttonclicked\\\",{menu:o,button:s,active:o.active}))}),c.on(\\\"mouseover\\\",function(){c.call(k)}),c.on(\\\"mouseout\\\",function(){c.call(M,o),u.call(w,o)})}),u.call(w,o),y?(_.w=Math.max(m.openWidth,m.headerWidth),_.h=b.y-_.t):(_.w=b.x-_.l,_.h=Math.max(m.openHeight,m.headerHeight)),_.direction=o.direction,a&&(u.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u=\\\"up\\\"===c||\\\"down\\\"===c,f=i._dims,p=i.active;if(u)for(s=0,l=0;l<p;l++)s+=f.heights[l]+h.gapButton;else for(o=0,l=0;l<p;l++)o+=f.widths[l]+h.gapButton;n.enable(a,o,s),n.hbar&&n.hbar.attr(\\\"opacity\\\",\\\"0\\\").transition().attr(\\\"opacity\\\",\\\"1\\\");n.vbar&&n.vbar.attr(\\\"opacity\\\",\\\"0\\\").transition().attr(\\\"opacity\\\",\\\"1\\\")}(0,0,0,a,o,_):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr(\\\"opacity\\\",\\\"0\\\").each(\\\"end\\\",function(){e=!1,r||t.disable()});r&&t.vbar.transition().attr(\\\"opacity\\\",\\\"0\\\").each(\\\"end\\\",function(){r=!1,e||t.disable()})}(a))}function x(t,e,r,n){t.call(b,e).call(_,e,r,n)}function b(t,e){s.ensureSingle(t,\\\"rect\\\",h.itemRectClassName,function(t){t.attr({rx:h.rx,ry:h.ry,\\\"shape-rendering\\\":\\\"crispEdges\\\"})}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style(\\\"stroke-width\\\",e.borderwidth+\\\"px\\\")}function _(t,e,r,n){s.ensureSingle(t,\\\"text\\\",h.itemTextClassName,function(t){t.classed(\\\"user-select-none\\\",!0).attr({\\\"text-anchor\\\":\\\"start\\\",\\\"data-notex\\\":1})}).call(o.font,e.font).text(r.label).call(l.convertToTspans,n)}function w(t,e){var r=e.active;t.each(function(t,i){var o=n.select(this);i===r&&e.showactive&&o.select(\\\"rect.\\\"+h.itemRectClassName).call(a.fill,h.activeColor)})}function k(t){t.select(\\\"rect.\\\"+h.itemRectClassName).call(a.fill,h.hoverColor)}function M(t,e){t.select(\\\"rect.\\\"+h.itemRectClassName).call(a.fill,e.bgcolor)}function A(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=o.tester.selectAll(\\\"g.\\\"+h.dropdownButtonClassName).data(s.filterVisible(e.buttons));a.enter().append(\\\"g\\\").classed(h.dropdownButtonClassName,!0);var u=-1!==[\\\"up\\\",\\\"down\\\"].indexOf(e.direction);a.each(function(i,a){var s=n.select(this);s.call(x,e,i,t);var c=s.select(\\\".\\\"+h.itemTextClassName),p=c.node()&&o.bBox(c.node()).width,d=Math.max(p+h.textPadX,h.minWidth),g=e.font.size*f,v=l.lineCount(c),m=Math.max(g*v,h.minHeight)+h.textOffsetY;m=Math.ceil(m),d=Math.ceil(d),r.widths[a]=d,r.heights[a]=m,r.height1=Math.max(r.height1,m),r.width1=Math.max(r.width1,d),u?(r.totalWidth=Math.max(r.totalWidth,d),r.openWidth=r.totalWidth,r.totalHeight+=m+h.gapButton,r.openHeight+=m+h.gapButton):(r.totalWidth+=d+h.gapButton,r.openWidth+=d+h.gapButton,r.totalHeight=Math.max(r.totalHeight,m),r.openHeight=r.totalHeight)}),u?r.totalHeight-=h.gapButton:r.totalWidth-=h.gapButton,r.headerWidth=r.width1+h.arrowPadX,r.headerHeight=r.height1,\\\"dropdown\\\"===e.type&&(u?(r.width1+=h.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=h.arrowPadX),a.remove();var p=r.totalWidth+e.pad.l+e.pad.r,d=r.totalHeight+e.pad.t+e.pad.b,g=t._fullLayout._size;r.lx=g.l+g.w*e.x,r.ly=g.t+g.h*(1-e.y);var v=\\\"left\\\";c.isRightAnchor(e)&&(r.lx-=p,v=\\\"right\\\"),c.isCenterAnchor(e)&&(r.lx-=p/2,v=\\\"center\\\");var m=\\\"top\\\";c.isBottomAnchor(e)&&(r.ly-=d,m=\\\"bottom\\\"),c.isMiddleAnchor(e)&&(r.ly-=d/2,m=\\\"middle\\\"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),i.autoMargin(t,T(e),{x:e.x,y:e.y,l:p*({right:1,center:.5}[v]||0),r:p*({left:1,center:.5}[v]||0),b:d*({top:1,middle:.5}[m]||0),t:d*({bottom:1,middle:.5}[m]||0)})}function T(t){return h.autoMarginIdRoot+t._index}function S(t,e,r,n){n=n||{};var i=t.select(\\\".\\\"+h.itemRectClassName),a=t.select(\\\".\\\"+h.itemTextClassName),s=e.borderwidth,c=r.index,u=e._dims;o.setTranslate(t,s+r.x,s+r.y);var p=-1!==[\\\"up\\\",\\\"down\\\"].indexOf(e.direction),d=n.height||(p?u.heights[c]:u.height1);i.attr({x:0,y:0,width:n.width||(p?u.width1:u.widths[c]),height:d});var g=e.font.size*f,v=(l.lineCount(a)-1)*g/2;l.positionText(a,h.textOffsetX,d/2-v+h.textOffsetY),p?r.y+=u.heights[c]+r.yPad:r.x+=u.widths[c]+r.xPad,r.index++}function C(t,e){t.attr(h.menuIndexAttrName,e||\\\"-1\\\").selectAll(\\\"g.\\\"+h.dropdownButtonClassName).remove()}e.exports=function(t){var e=t._fullLayout,r=s.filterVisible(e[h.name]);function a(e){i.autoMargin(t,T(e))}var o=e._menulayer.selectAll(\\\"g.\\\"+h.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append(\\\"g\\\").classed(h.containerClassName,!0).style(\\\"cursor\\\",\\\"pointer\\\"),o.exit().each(function(){n.select(this).selectAll(\\\"g.\\\"+h.headerGroupClassName).each(a)}).remove(),0!==r.length){var l=o.selectAll(\\\"g.\\\"+h.headerGroupClassName).data(r,d);l.enter().append(\\\"g\\\").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(o,\\\"g\\\",h.dropdownButtonGroupClassName,function(t){t.style(\\\"pointer-events\\\",\\\"all\\\")}),u=0;u<r.length;u++){var f=r[u];A(t,f)}var x=\\\"updatemenus\\\"+e._uid,b=new p(t,c,x);l.enter().size()&&(c.node().parentNode.appendChild(c.node()),c.call(C)),l.exit().each(function(t){c.call(C),a(t)}).remove(),l.each(function(e){var r=n.select(this),a=\\\"dropdown\\\"===e.type?c:null;i.manageCommandObserver(t,e,e.buttons,function(n){v(t,e,e.buttons[n.index],r,a,b,n.index,!0)}),\\\"dropdown\\\"===e.type?(m(t,r,c,b,e),g(c,e)&&y(t,r,c,b,e)):y(t,r,null,null,e)})}}},{\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/plots\\\":809,\\\"../color\\\":570,\\\"../drawing\\\":595,\\\"../legend/anchor_utils\\\":622,\\\"./constants\\\":663,\\\"./scrollbox\\\":667,d3:148}],666:[function(t,e,r){arguments[4][660][0].apply(r,arguments)},{\\\"./attributes\\\":662,\\\"./constants\\\":663,\\\"./defaults\\\":664,\\\"./draw\\\":665,dup:660}],667:[function(t,e,r){\\\"use strict\\\";e.exports=s;var n=t(\\\"d3\\\"),i=t(\\\"../color\\\"),a=t(\\\"../drawing\\\"),o=t(\\\"../../lib\\\");function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll(\\\"rect.scrollbox-bg\\\").data([0]),this.bg.exit().on(\\\".drag\\\",null).on(\\\"wheel\\\",null).remove(),this.bg.enter().append(\\\"rect\\\").classed(\\\"scrollbox-bg\\\",!0).style(\\\"pointer-events\\\",\\\"all\\\").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor=\\\"#808BA4\\\",s.prototype.enable=function(t,e,r){var o=this.gd._fullLayout,l=o.width,c=o.height;this.position=t;var u,f,h,p,d=this.position.l,g=this.position.w,v=this.position.t,m=this.position.h,y=this.position.direction,x=\\\"down\\\"===y,b=\\\"left\\\"===y,_=\\\"up\\\"===y,w=g,k=m;x||b||\\\"right\\\"===y||_||(this.position.direction=\\\"down\\\",x=!0),x||_?(f=(u=d)+w,x?(h=v,k=(p=Math.min(h+k,c))-h):k=(p=v+k)-(h=Math.max(p-k,0))):(p=(h=v)+k,b?w=(f=d+w)-(u=Math.max(f-w,0)):(u=d,w=(f=Math.min(u+w,l))-u)),this._box={l:u,t:h,w:w,h:k};var M=g>w,A=s.barLength+2*s.barPad,T=s.barWidth+2*s.barPad,S=d,C=v+m;C+T>c&&(C=c-T);var E=this.container.selectAll(\\\"rect.scrollbar-horizontal\\\").data(M?[0]:[]);E.exit().on(\\\".drag\\\",null).remove(),E.enter().append(\\\"rect\\\").classed(\\\"scrollbar-horizontal\\\",!0).call(i.fill,s.barColor),M?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:C,width:A,height:T}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=m>k,z=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,I=d+g,P=v;I+z>l&&(I=l-z);var D=this.container.selectAll(\\\"rect.scrollbar-vertical\\\").data(L?[0]:[]);D.exit().on(\\\".drag\\\",null).remove(),D.enter().append(\\\"rect\\\").classed(\\\"scrollbar-vertical\\\",!0).call(i.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:P,width:z,height:O}),this._vbarYMin=P+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,B=u-.5,F=L?f+z+.5:f+.5,N=h-.5,j=M?p+T+.5:p+.5,V=o._topdefs.selectAll(\\\"#\\\"+R).data(M||L?[0]:[]);if(V.exit().remove(),V.enter().append(\\\"clipPath\\\").attr(\\\"id\\\",R).append(\\\"rect\\\"),M||L?(this._clipRect=V.select(\\\"rect\\\").attr({x:Math.floor(B),y:Math.floor(N),width:Math.ceil(F)-Math.floor(B),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R),this.bg.attr({x:d,y:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on(\\\"wheel\\\",null).on(\\\".drag\\\",null).call(a.setClipUrl,null),delete this._clipRect),M||L){var U=n.behavior.drag().on(\\\"dragstart\\\",function(){n.event.sourceEvent.preventDefault()}).on(\\\"drag\\\",this._onBoxDrag.bind(this));this.container.on(\\\"wheel\\\",null).on(\\\"wheel\\\",this._onBoxWheel.bind(this)).on(\\\".drag\\\",null).call(U);var q=n.behavior.drag().on(\\\"dragstart\\\",function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()}).on(\\\"drag\\\",this._onBarDrag.bind(this));M&&this.hbar.on(\\\".drag\\\",null).call(q),L&&this.vbar.on(\\\".drag\\\",null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on(\\\"wheel\\\",null).on(\\\".drag\\\",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(\\\".drag\\\",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(\\\".drag\\\",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},{\\\"../../lib\\\":696,\\\"../color\\\":570,\\\"../drawing\\\":595,d3:148}],668:[function(t,e,r){\\\"use strict\\\";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\\\"right\\\",right:\\\"left\\\",top:\\\"bottom\\\",bottom:\\\"top\\\"}}},{}],669:[function(t,e,r){\\\"use strict\\\";e.exports={COMPARISON_OPS:[\\\"=\\\",\\\"!=\\\",\\\"<\\\",\\\">=\\\",\\\">\\\",\\\"<=\\\"],COMPARISON_OPS2:[\\\"=\\\",\\\"<\\\",\\\">=\\\",\\\">\\\",\\\"<=\\\"],INTERVAL_OPS:[\\\"[]\\\",\\\"()\\\",\\\"[)\\\",\\\"(]\\\",\\\"][\\\",\\\")(\\\",\\\"](\\\",\\\")[\\\"],SET_OPS:[\\\"{}\\\",\\\"}{\\\"],CONSTRAINT_REDUCTION:{\\\"=\\\":\\\"=\\\",\\\"<\\\":\\\"<\\\",\\\"<=\\\":\\\"<\\\",\\\">\\\":\\\">\\\",\\\">=\\\":\\\">\\\",\\\"[]\\\":\\\"[]\\\",\\\"()\\\":\\\"[]\\\",\\\"[)\\\":\\\"[]\\\",\\\"(]\\\":\\\"[]\\\",\\\"][\\\":\\\"][\\\",\\\")(\\\":\\\"][\\\",\\\"](\\\":\\\"][\\\",\\\")[\\\":\\\"][\\\"}}},{}],670:[function(t,e,r){\\\"use strict\\\";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],671:[function(t,e,r){\\\"use strict\\\";e.exports={circle:\\\"\\\\u25cf\\\",\\\"circle-open\\\":\\\"\\\\u25cb\\\",square:\\\"\\\\u25a0\\\",\\\"square-open\\\":\\\"\\\\u25a1\\\",diamond:\\\"\\\\u25c6\\\",\\\"diamond-open\\\":\\\"\\\\u25c7\\\",cross:\\\"+\\\",x:\\\"\\\\u274c\\\"}},{}],672:[function(t,e,r){\\\"use strict\\\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300,DESELECTDIM:.2}},{}],673:[function(t,e,r){\\\"use strict\\\";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:\\\"\\\\u2212\\\"}},{}],674:[function(t,e,r){\\\"use strict\\\";r.xmlns=\\\"http://www.w3.org/2000/xmlns/\\\",r.svg=\\\"http://www.w3.org/2000/svg\\\",r.xlink=\\\"http://www.w3.org/1999/xlink\\\",r.svgAttrs={xmlns:r.svg,\\\"xmlns:xlink\\\":r.xlink}},{}],675:[function(t,e,r){\\\"use strict\\\";r.version=\\\"1.42.2\\\",t(\\\"es6-promise\\\").polyfill(),t(\\\"../build/plotcss\\\"),t(\\\"./fonts/mathjax_config\\\");for(var n=t(\\\"./registry\\\"),i=r.register=n.register,a=t(\\\"./plot_api\\\"),o=Object.keys(a),s=0;s<o.length;s++){var l=o[s];r[l]=a[l],i({moduleType:\\\"apiMethod\\\",name:l,fn:a[l]})}i(t(\\\"./traces/scatter\\\")),i([t(\\\"./components/fx\\\"),t(\\\"./components/legend\\\"),t(\\\"./components/annotations\\\"),t(\\\"./components/annotations3d\\\"),t(\\\"./components/shapes\\\"),t(\\\"./components/images\\\"),t(\\\"./components/updatemenus\\\"),t(\\\"./components/sliders\\\"),t(\\\"./components/rangeslider\\\"),t(\\\"./components/rangeselector\\\"),t(\\\"./components/grid\\\"),t(\\\"./components/errorbars\\\")]),i([t(\\\"./locale-en\\\"),t(\\\"./locale-en-us\\\")]),r.Icons=t(\\\"../build/ploticon\\\"),r.Plots=t(\\\"./plots/plots\\\"),r.Fx=t(\\\"./components/fx\\\"),r.Snapshot=t(\\\"./snapshot\\\"),r.PlotSchema=t(\\\"./plot_api/plot_schema\\\"),r.Queue=t(\\\"./lib/queue\\\"),r.d3=t(\\\"d3\\\")},{\\\"../build/plotcss\\\":1,\\\"../build/ploticon\\\":2,\\\"./components/annotations\\\":561,\\\"./components/annotations3d\\\":566,\\\"./components/errorbars\\\":601,\\\"./components/fx\\\":612,\\\"./components/grid\\\":616,\\\"./components/images\\\":621,\\\"./components/legend\\\":630,\\\"./components/rangeselector\\\":641,\\\"./components/rangeslider\\\":647,\\\"./components/shapes\\\":655,\\\"./components/sliders\\\":660,\\\"./components/updatemenus\\\":666,\\\"./fonts/mathjax_config\\\":676,\\\"./lib/queue\\\":712,\\\"./locale-en\\\":726,\\\"./locale-en-us\\\":725,\\\"./plot_api\\\":730,\\\"./plot_api/plot_schema\\\":734,\\\"./plots/plots\\\":809,\\\"./registry\\\":828,\\\"./snapshot\\\":833,\\\"./traces/scatter\\\":1056,d3:148,\\\"es6-promise\\\":203}],676:[function(t,e,r){\\\"use strict\\\";\\\"undefined\\\"!=typeof MathJax?(r.MathJax=!0,\\\"local\\\"!==(window.PlotlyConfig||{}).MathJaxConfig&&(MathJax.Hub.Config({messageStyle:\\\"none\\\",skipStartupTypeset:!0,displayAlign:\\\"left\\\",tex2jax:{inlineMath:[[\\\"$\\\",\\\"$\\\"],[\\\"\\\\\\\\(\\\",\\\"\\\\\\\\)\\\"]]}}),MathJax.Hub.Configured())):r.MathJax=!1},{}],677:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./mod\\\"),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-15}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0]<e[1]?(r=e[0],n=e[1]):(r=e[1],n=e[0]),(r=i(r,s))>(n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,f,h,p,d,g=l([r,n]);function v(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r<n?(u=r,h=n):(u=n,h=r),t<e?(p=t,d=e):(p=e,d=t);var m,y=Math.abs(h-u)<=o?0:1;function x(t,e,r){return\\\"A\\\"+[t,t]+\\\" \\\"+[0,y,r]+\\\" \\\"+v(t,e)}return g?m=null===p?\\\"M\\\"+v(d,u)+x(d,f,0)+x(d,h,0)+\\\"Z\\\":\\\"M\\\"+v(p,u)+x(p,f,0)+x(p,h,0)+\\\"ZM\\\"+v(d,u)+x(d,f,1)+x(d,h,1)+\\\"Z\\\":null===p?(m=\\\"M\\\"+v(d,u)+x(d,h,0),c&&(m+=\\\"L0,0Z\\\")):m=\\\"M\\\"+v(p,u)+\\\"L\\\"+v(d,u)+x(d,h,0)+\\\"L\\\"+v(p,h)+x(p,u,1)+\\\"Z\\\",m}e.exports={deg2rad:function(t){return t/180*o},rad2deg:function(t){return t/o*180},angleDelta:c,angleDist:function(t,e){return Math.abs(c(t,e))},isFullCircle:l,isAngleInsideSector:u,isPtInsideSector:function(t,e,r,n){return!!u(e,n)&&(r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),t>=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},{\\\"./mod\\\":704}],678:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../constants/numerical\\\").BADNUM,a=/^['\\\"%,$#\\\\s']+|[, ]|['\\\"%,$#\\\\s']+$/g;e.exports=function(t){return\\\"string\\\"==typeof t&&(t=t.replace(a,\\\"\\\")),n(t)?Number(t):i}},{\\\"../constants/numerical\\\":673,\\\"fast-isnumeric\\\":214}],679:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each(function(t){t.regl&&t.regl.clear({color:!0,depth:!0})})}},{}],680:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener(\\\"resize\\\",t._responsiveChartHandler),delete t._responsiveChartHandler)}},{}],681:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../plots/attributes\\\"),o=t(\\\"../components/colorscale/get_scale\\\"),s=(Object.keys(t(\\\"../components/colorscale/scales\\\")),t(\\\"./nested_property\\\")),l=t(\\\"./regex\\\").counter,c=t(\\\"../constants/interactions\\\").DESELECTDIM,u=t(\\\"./mod\\\").modHalf,f=t(\\\"./is_array\\\").isArrayOrTypedArray;function h(t,e){var n=r.valObjectMeta[e.valType];if(e.arrayOk&&f(t))return!0;if(n.validateFunction)return n.validateFunction(t,e);var i={},a=i,o={set:function(t){a=t}};return n.coerceFunction(t,o,i,e),a!==i}r.valObjectMeta={data_array:{coerceFunction:function(t,e,r){f(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if(\\\"/\\\"===i.charAt(0)&&\\\"/\\\"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if(\\\"string\\\"!=typeof t){var i=\\\"number\\\"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every(function(t){return i(t).isValid()})?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o(t,r))}},angle:{coerceFunction:function(t,e,r){\\\"auto\\\"===t?e.set(\\\"auto\\\"):n(t)?e.set(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||l(r);\\\"string\\\"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||\\\"string\\\"==typeof t&&!!l(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(\\\"string\\\"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var i=t.split(\\\"+\\\"),a=0;a<i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)<a?i.splice(a,1):a++}i.length?e.set(i.join(\\\"+\\\")):e.set(r)}else e.set(t);else e.set(r)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(t)}},info_array:{coerceFunction:function(t,e,n,i){function a(t,e,n){var i,a={set:function(t){i=t}};return void 0===n&&(n=e.dflt),r.valObjectMeta[e.valType].coerceFunction(t,a,n,e),i}var o=2===i.dimensions||\\\"1-2\\\"===i.dimensions&&Array.isArray(t)&&Array.isArray(t[0]);if(Array.isArray(t)){var s,l,c,u,f,h,p=i.items,d=[],g=Array.isArray(p),v=g&&o&&Array.isArray(p[0]),m=o&&g&&!v,y=g&&!m?p.length:t.length;if(n=Array.isArray(n)?n:[],o)for(s=0;s<y;s++)for(d[s]=[],c=Array.isArray(t[s])?t[s]:[],f=m?p.length:g?p[s].length:c.length,l=0;l<f;l++)u=m?p[l]:g?p[s][l]:p,void 0!==(h=a(c[l],u,(n[s]||[])[l]))&&(d[s][l]=h);else for(s=0;s<y;s++)void 0!==(h=a(t[s],g?p[s]:p,n[s]))&&(d[s]=h);e.set(d)}else e.set(n)},validateFunction:function(t,e){if(!Array.isArray(t))return!1;var r=e.items,n=Array.isArray(r),i=2===e.dimensions;if(!e.freeLength&&t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(i){if(!Array.isArray(t[a])||!e.freeLength&&t[a].length!==r[a].length)return!1;for(var o=0;o<t[a].length;o++)if(!h(t[a][o],n?r[a][o]:r))return!1}else if(!h(t[a],n?r[a]:r))return!1;return!0}}},r.coerce=function(t,e,n,i,a){var o=s(n,i).get(),l=s(t,i),c=s(e,i),u=l.get(),p=e._template;if(void 0===u&&p&&(u=s(p,i).get(),p=0),void 0===a&&(a=o.dflt),o.arrayOk&&f(u))return c.set(u),u;var d=r.valObjectMeta[o.valType].coerceFunction;d(u,c,a,o);var g=c.get();return p&&g===a&&!h(u,o)&&(d(u=s(p,i).get(),c,a,o),g=c.get()),g},r.coerce2=function(t,e,n,i,a){var o=s(t,i),l=r.coerce(t,e,n,i,a),c=o.get();return null!=c&&l},r.coerceFont=function(t,e,r){var n={};return r=r||{},n.family=t(e+\\\".family\\\",r.family),n.size=t(e+\\\".size\\\",r.size),n.color=t(e+\\\".color\\\",r.color),n},r.coerceHoverinfo=function(t,e,n){var i,o=e._module.attributes,s=o.hoverinfo?o:a,l=s.hoverinfo;if(1===n._dataLength){var c=\\\"all\\\"===l.dflt?l.flags.slice():l.dflt.split(\\\"+\\\");c.splice(c.indexOf(\\\"name\\\"),1),i=c.join(\\\"+\\\")}return r.coerce(t,e,s,\\\"hoverinfo\\\",i)},r.coerceSelectionMarkerOpacity=function(t,e){if(t.marker){var r,n,i=t.marker.opacity;if(void 0!==i)f(i)||t.selected||t.unselected||(r=i,n=c*i),e(\\\"selected.marker.opacity\\\",r),e(\\\"unselected.marker.opacity\\\",n)}},r.validate=h},{\\\"../components/colorscale/get_scale\\\":583,\\\"../components/colorscale/scales\\\":589,\\\"../constants/interactions\\\":672,\\\"../plots/attributes\\\":742,\\\"./is_array\\\":697,\\\"./mod\\\":704,\\\"./nested_property\\\":705,\\\"./regex\\\":713,\\\"fast-isnumeric\\\":214,tinycolor2:514}],682:[function(t,e,r){\\\"use strict\\\";var n,i,a=t(\\\"d3\\\"),o=t(\\\"fast-isnumeric\\\"),s=t(\\\"./loggers\\\"),l=t(\\\"./mod\\\").mod,c=t(\\\"../constants/numerical\\\"),u=c.BADNUM,f=c.ONEDAY,h=c.ONEHOUR,p=c.ONEMIN,d=c.ONESEC,g=c.EPOCHJD,v=t(\\\"../registry\\\"),m=a.time.format.utc,y=/^\\\\s*(-?\\\\d\\\\d\\\\d\\\\d|\\\\d\\\\d)(-(\\\\d?\\\\d)(-(\\\\d?\\\\d)([ Tt]([01]?\\\\d|2[0-3])(:([0-5]\\\\d)(:([0-5]\\\\d(\\\\.\\\\d+)?))?(Z|z|[+\\\\-]\\\\d\\\\d:?\\\\d\\\\d)?)?)?)?)?\\\\s*$/m,x=/^\\\\s*(-?\\\\d\\\\d\\\\d\\\\d|\\\\d\\\\d)(-(\\\\d?\\\\di?)(-(\\\\d?\\\\d)([ Tt]([01]?\\\\d|2[0-3])(:([0-5]\\\\d)(:([0-5]\\\\d(\\\\.\\\\d+)?))?(Z|z|[+\\\\-]\\\\d\\\\d:?\\\\d\\\\d)?)?)?)?)?\\\\s*$/m,b=(new Date).getFullYear()-70;function _(t){return t&&v.componentsRegistry.calendars&&\\\"string\\\"==typeof t&&\\\"gregorian\\\"!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}r.dateTick0=function(t,e){return _(t)?e?v.getComponentMethod(\\\"calendars\\\",\\\"CANONICAL_SUNDAY\\\")[t]:v.getComponentMethod(\\\"calendars\\\",\\\"CANONICAL_TICK\\\")[t]:e?\\\"2000-01-02\\\":\\\"2000-01-01\\\"},r.dfltRange=function(t){return _(t)?v.getComponentMethod(\\\"calendars\\\",\\\"DFLTRANGE\\\")[t]:[\\\"2000-01-01\\\",\\\"2001-01-01\\\"]},r.isJSDate=function(t){return\\\"object\\\"==typeof t&&null!==t&&\\\"function\\\"==typeof t.getTime},r.dateTime2ms=function(t,e){if(r.isJSDate(t)){var a=t.getTimezoneOffset()*p,o=(t.getUTCMinutes()-t.getMinutes())*p+(t.getUTCSeconds()-t.getSeconds())*d+(t.getUTCMilliseconds()-t.getMilliseconds());if(o){var s=3*p;a=a-s/2+l(o-a+s/2,s)}return(t=Number(t)-a)>=n&&t<=i?t:u}if(\\\"string\\\"!=typeof t&&\\\"number\\\"!=typeof t)return u;t=String(t);var c=_(e),m=t.charAt(0);!c||\\\"G\\\"!==m&&\\\"g\\\"!==m||(t=t.substr(1),e=\\\"\\\");var w=c&&\\\"chinese\\\"===e.substr(0,7),k=t.match(w?x:y);if(!k)return u;var M=k[1],A=k[3]||\\\"1\\\",T=Number(k[5]||1),S=Number(k[7]||0),C=Number(k[9]||0),E=Number(k[11]||0);if(c){if(2===M.length)return u;var L;M=Number(M);try{var z=v.getComponentMethod(\\\"calendars\\\",\\\"getCal\\\")(e);if(w){var O=\\\"i\\\"===A.charAt(A.length-1);A=parseInt(A,10),L=z.newDate(M,z.toMonthIndex(M,A,O),T)}else L=z.newDate(M,Number(A),T)}catch(t){return u}return L?(L.toJD()-g)*f+S*h+C*p+E*d:u}M=2===M.length?(Number(M)+2e3-b)%100+b:Number(M),A-=1;var I=new Date(Date.UTC(2e3,A,T,S,C));return I.setUTCFullYear(M),I.getUTCMonth()!==A?u:I.getUTCDate()!==T?u:I.getTime()+E*d},n=r.MIN_MS=r.dateTime2ms(\\\"-9999\\\"),i=r.MAX_MS=r.dateTime2ms(\\\"9999-12-31 23:59:59.9999\\\"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var k=90*f,M=3*h,A=5*p;function T(t,e,r,n,i){if((e||r||n||i)&&(t+=\\\" \\\"+w(e,2)+\\\":\\\"+w(r,2),(n||i)&&(t+=\\\":\\\"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+=\\\".\\\"+w(i,a)}return t}r.ms2DateTime=function(t,e,r){if(\\\"number\\\"!=typeof t||!(t>=n&&t<=i))return u;e||(e=0);var a,o,s,c,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+g,C=Math.floor(l(t,f));try{a=v.getComponentMethod(\\\"calendars\\\",\\\"getCal\\\")(r).fromJD(S).formatDate(\\\"yyyy-mm-dd\\\")}catch(t){a=m(\\\"G%Y-%m-%d\\\")(new Date(w))}if(\\\"-\\\"===a.charAt(0))for(;a.length<11;)a=\\\"-0\\\"+a.substr(1);else for(;a.length<10;)a=\\\"0\\\"+a;o=e<k?Math.floor(C/h):0,s=e<k?Math.floor(C%h/p):0,c=e<M?Math.floor(C%p/d):0,y=e<A?C%d*10+b:0}else x=new Date(w),a=m(\\\"%Y-%m-%d\\\")(x),o=e<k?x.getUTCHours():0,s=e<k?x.getUTCMinutes():0,c=e<M?x.getUTCSeconds():0,y=e<A?10*x.getUTCMilliseconds()+b:0;return T(a,o,s,c,y)},r.ms2DateTimeLocal=function(t){if(!(t>=n+f&&t<=i-f))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return T(a.time.format(\\\"%Y-%m-%d\\\")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||\\\"number\\\"==typeof t&&isFinite(t)){if(_(n))return s.error(\\\"JS Dates and milliseconds are incompatible with world calendars\\\",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error(\\\"unrecognized date\\\",t),e;return t};var S=/%\\\\d?f/g;function C(t,e,r,n){t=t.replace(S,function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,\\\"\\\")||\\\"0\\\"});var i=new Date(Math.floor(e+.05));if(_(n))try{t=v.getComponentMethod(\\\"calendars\\\",\\\"worldCalFmt\\\")(t,e,n)}catch(t){return\\\"Invalid\\\"}return r(t)(i)}var E=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,i,a){if(i=_(i)&&i,!e)if(\\\"y\\\"===r)e=a.year;else if(\\\"m\\\"===r)e=a.month;else{if(\\\"d\\\"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+\\\":\\\"+w(l(Math.floor(r/p),60),2);if(\\\"M\\\"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),E[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,\\\"\\\").replace(/[\\\\.]$/,\\\"\\\")),n+=\\\":\\\"+i}return n}(t,r)+\\\"\\\\n\\\"+C(a.dayMonthYear,t,n,i);e=a.dayMonth+\\\"\\\\n\\\"+a.year}return C(e,t,n,i)};var L=3*f;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+g,a=v.getComponentMethod(\\\"calendars\\\",\\\"getCal\\\")(r),o=a.fromJD(i);return e%12?a.add(o,e,\\\"m\\\"):a.add(o,e/12,\\\"y\\\"),(o.toJD()-g)*f+n}catch(e){s.error(\\\"invalid ms \\\"+t+\\\" in calendar \\\"+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&v.getComponentMethod(\\\"calendars\\\",\\\"getCal\\\")(e),u=0;u<t.length;u++)if(n=t[u],o(n)){if(!(n%f))if(c)try{1===(r=c.fromJD(n/f+g)).day()?1===r.month()?i++:a++:s++}catch(t){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?i++:a++:s++}else l++;s+=a+=i;var h=t.length-l;return{exactYears:i/h,exactMonths:a/h,exactDays:s/h}}},{\\\"../constants/numerical\\\":673,\\\"../registry\\\":828,\\\"./loggers\\\":701,\\\"./mod\\\":704,d3:148,\\\"fast-isnumeric\\\":214}],683:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return Array.isArray(t)||(t=[]),t.length=e,t}},{}],684:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"events\\\").EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){\\\"undefined\\\"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;\\\"undefined\\\"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o,s=a._events[e];if(!s)return n;function l(t){return t.listener?(a.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(a,[r]))):t.apply(a,[r])}for(s=Array.isArray(s)?s:[s],o=0;o<s.length-1;o++)l(s[o]);return i=l(s[o]),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};e.exports=i},{events:92}],685:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is_plain_object.js\\\"),i=Array.isArray;function a(t,e,r,o){var s,l,c,u,f,h,p=t[0],d=t.length;if(2===d&&i(p)&&i(t[1])&&0===p.length){if(function(t,e){var r,n;for(r=0;r<t.length;r++){if(null!==(n=t[r])&&\\\"object\\\"==typeof n)return!1;void 0!==n&&(e[r]=n)}return!0}(t[1],p))return p;p.splice(0,p.length)}for(var g=1;g<d;g++)for(l in s=t[g])c=p[l],u=s[l],o&&i(u)?p[l]=u:e&&u&&(n(u)||(f=i(u)))?(f?(f=!1,h=c&&i(c)?c:[]):h=c&&n(c)?c:{},p[l]=a([h,u],e,r,o)):(\\\"undefined\\\"!=typeof u||r)&&(p[l]=u);return p}r.extendFlat=function(){return a(arguments,!1,!1,!1)},r.extendDeep=function(){return a(arguments,!0,!1,!1)},r.extendDeepAll=function(){return a(arguments,!0,!0,!1)},r.extendDeepNoArrays=function(){return a(arguments,!0,!1,!0)}},{\\\"./is_plain_object.js\\\":698}],686:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e={},r=[],n=0,i=0;i<t.length;i++){var a=t[i];1!==e[a]&&(e[a]=1,r[n++]=a)}return r}},{}],687:[function(t,e,r){\\\"use strict\\\";function n(t){return!0===t.visible}function i(t){return!0===t[0].trace.visible}e.exports=function(t){for(var e,r=(e=t,Array.isArray(e)&&Array.isArray(e[0])&&e[0][0]&&e[0][0].trace?i:n),a=[],o=0;o<t.length;o++){var s=t[o];r(s)&&a.push(s)}return a}},{}],688:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"country-regex\\\"),i=t(\\\"../lib\\\"),a=Object.keys(n),o={\\\"ISO-3\\\":i.identity,\\\"USA-states\\\":i.identity,\\\"country names\\\":function(t){for(var e=0;e<a.length;e++){var r=a[e],o=new RegExp(n[r]);if(o.test(t.trim().toLowerCase()))return r}return i.log(\\\"Unrecognized country name: \\\"+t+\\\".\\\"),!1}};r.locationToFeature=function(t,e,r){if(!e||\\\"string\\\"!=typeof e)return!1;var n=function(t,e){return(0,o[t])(e)}(t,e);if(n){for(var a=0;a<r.length;a++){var s=r[a];if(s.id===n)return s}i.log([\\\"Location with id\\\",n,\\\"does not have a matching topojson feature at this resolution.\\\"].join(\\\" \\\"))}return!1}},{\\\"../lib\\\":696,\\\"country-regex\\\":122}],689:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../constants/numerical\\\").BADNUM;r.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a<t.length;a++){var o=t[a].lonlat;o[0]!==n?i.push(o):!e&&i.length>0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},r.makeLine=function(t){return 1===t.length?{type:\\\"LineString\\\",coordinates:t[0]}:{type:\\\"MultiLineString\\\",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:\\\"Polygon\\\",coordinates:t};for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=[t[r]];return{type:\\\"MultiPolygon\\\",coordinates:e}},r.makeBlank=function(){return{type:\\\"Point\\\",coordinates:[]}}},{\\\"../constants/numerical\\\":673}],690:[function(t,e,r){\\\"use strict\\\";var n,i,a,o=t(\\\"./mod\\\").mod;function s(t,e,r,n,i,a,o,s){var l=r-t,c=i-t,u=o-i,f=n-e,h=a-e,p=s-a,d=l*p-u*f;if(0===d)return null;var g=(c*p-u*h)/d,v=(c*f-l*h)/d;return v<0||v>1||g<0||g>1?null:{x:t+l*g,y:e+f*g}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,i,a,o,c){if(s(t,e,r,n,i,a,o,c))return 0;var u=r-t,f=n-e,h=o-i,p=c-a,d=u*u+f*f,g=h*h+p*p,v=Math.min(l(u,f,d,i-t,a-e),l(u,f,d,o-t,c-e),l(h,p,g,t-i,e-a),l(h,p,g,r-i,n-a));return Math.sqrt(v)},r.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+c.x)/6,y:(4*f.y+l.y+c.y)/6,theta:u};return n[r]=h,h},r.clearLocationCache=function(){i=null},r.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),f=u;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.x<a?a-r.x:r.x>o?r.x-o:0,f=r.y<s?s-r.y:r.y>l?r.y-l:0;return Math.sqrt(c*c+f*f)}for(var p=h(c);p;){if((c+=p+r)>f)return;p=h(c)}for(p=h(f);p;){if(c>(f-=p+r))return;p=h(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f<c;){if(i=(h+p)/2,o=(a=t.getPointAtLength(i))[r]-e,Math.abs(o)<l)return a;u*o>0?p=i:h=i,f++}return a}},{\\\"./mod\\\":704}],691:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e;if(\\\"string\\\"==typeof t){if(null===(e=document.getElementById(t)))throw new Error(\\\"No DOM element with id '\\\"+t+\\\"' exists on the page.\\\");return e}if(null==t)throw new Error(\\\"DOM element provided is null or undefined\\\");return t}},{}],692:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"color-normalize\\\"),o=t(\\\"../components/colorscale\\\"),s=t(\\\"../components/color/attributes\\\").defaultLine,l=t(\\\"./is_array\\\").isArrayOrTypedArray,c=a(s),u=1;function f(t,e){var r=t;return r[3]*=e,r}function h(t){if(n(t))return c;var e=a(t);return e.length?e:c}function p(t){return n(t)?t:u}e.exports={formatColor:function(t,e,r){var n,i,s,d,g,v=t.color,m=l(v),y=l(e),x=[];if(n=void 0!==t.colorscale?o.makeColorScaleFunc(o.extractScale(t.colorscale,t.cmin,t.cmax)):h,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:h,s=y?function(t,e){return void 0===t[e]?u:p(t[e])}:p,m||y)for(var b=0;b<r;b++)d=i(v,b),g=s(e,b),x[b]=f(d,g);else x=f(a(v),e);return x},parseColorScale:function(t,e){return void 0===e&&(e=1),t.map(function(t){var r=t[0],n=i(t[1]).toRgb();return{index:r,rgb:[n.r,n.g,n.b,e]}})}}},{\\\"../components/color/attributes\\\":569,\\\"../components/colorscale\\\":585,\\\"./is_array\\\":697,\\\"color-normalize\\\":108,\\\"fast-isnumeric\\\":214,tinycolor2:514}],693:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./identity\\\");function i(t){return[t]}e.exports={keyFun:function(t){return t.key},repeat:i,descend:n,wrap:i,unwrap:function(t){return t[0]}}},{\\\"./identity\\\":695}],694:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"superscript-text\\\"),i=t(\\\"./svg_text_utils\\\").convertEntities;e.exports=function(t){return\\\"\\\"+i(function(t){return t.replace(/\\\\<.*\\\\>/g,\\\"\\\")}(function(t){for(var e=0;(e=t.indexOf(\\\"<sup>\\\",e))>=0;){var r=t.indexOf(\\\"</sup>\\\",e);if(r<e)break;t=t.slice(0,e)+n(t.slice(e+5,r))+t.slice(r+6)}return t}(t.replace(/\\\\<br\\\\>/g,\\\"\\\\n\\\"))))}},{\\\"./svg_text_utils\\\":721,\\\"superscript-text\\\":507}],695:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t}},{}],696:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../constants/numerical\\\"),o=a.FP_SAFE,s=a.BADNUM,l=e.exports={};l.nestedProperty=t(\\\"./nested_property\\\"),l.keyedContainer=t(\\\"./keyed_container\\\"),l.relativeAttr=t(\\\"./relative_attr\\\"),l.isPlainObject=t(\\\"./is_plain_object\\\"),l.toLogRange=t(\\\"./to_log_range\\\"),l.relinkPrivateKeys=t(\\\"./relink_private\\\"),l.ensureArray=t(\\\"./ensure_array\\\");var c=t(\\\"./mod\\\");l.mod=c.mod,l.modHalf=c.modHalf;var u=t(\\\"./is_array\\\");l.isTypedArray=u.isTypedArray,l.isArrayOrTypedArray=u.isArrayOrTypedArray,l.isArray1D=u.isArray1D;var f=t(\\\"./coerce\\\");l.valObjectMeta=f.valObjectMeta,l.coerce=f.coerce,l.coerce2=f.coerce2,l.coerceFont=f.coerceFont,l.coerceHoverinfo=f.coerceHoverinfo,l.coerceSelectionMarkerOpacity=f.coerceSelectionMarkerOpacity,l.validate=f.validate;var h=t(\\\"./dates\\\");l.dateTime2ms=h.dateTime2ms,l.isDateTime=h.isDateTime,l.ms2DateTime=h.ms2DateTime,l.ms2DateTimeLocal=h.ms2DateTimeLocal,l.cleanDate=h.cleanDate,l.isJSDate=h.isJSDate,l.formatDate=h.formatDate,l.incrementMonth=h.incrementMonth,l.dateTick0=h.dateTick0,l.dfltRange=h.dfltRange,l.findExactDates=h.findExactDates,l.MIN_MS=h.MIN_MS,l.MAX_MS=h.MAX_MS;var p=t(\\\"./search\\\");l.findBin=p.findBin,l.sorterAsc=p.sorterAsc,l.sorterDes=p.sorterDes,l.distinctVals=p.distinctVals,l.roundUp=p.roundUp,l.sort=p.sort,l.findIndexOfMin=p.findIndexOfMin;var d=t(\\\"./stats\\\");l.aggNums=d.aggNums,l.len=d.len,l.mean=d.mean,l.midRange=d.midRange,l.variance=d.variance,l.stdev=d.stdev,l.interp=d.interp;var g=t(\\\"./matrix\\\");l.init2dArray=g.init2dArray,l.transposeRagged=g.transposeRagged,l.dot=g.dot,l.translationMatrix=g.translationMatrix,l.rotationMatrix=g.rotationMatrix,l.rotationXYMatrix=g.rotationXYMatrix,l.apply2DTransform=g.apply2DTransform,l.apply2DTransform2=g.apply2DTransform2;var v=t(\\\"./angles\\\");l.deg2rad=v.deg2rad,l.rad2deg=v.rad2deg,l.angleDelta=v.angleDelta,l.angleDist=v.angleDist,l.isFullCircle=v.isFullCircle,l.isAngleInsideSector=v.isAngleInsideSector,l.isPtInsideSector=v.isPtInsideSector,l.pathArc=v.pathArc,l.pathSector=v.pathSector,l.pathAnnulus=v.pathAnnulus;var m=t(\\\"./geometry2d\\\");l.segmentsIntersect=m.segmentsIntersect,l.segmentDistance=m.segmentDistance,l.getTextLocation=m.getTextLocation,l.clearLocationCache=m.clearLocationCache,l.getVisibleSegment=m.getVisibleSegment,l.findPointOnPath=m.findPointOnPath;var y=t(\\\"./extend\\\");l.extendFlat=y.extendFlat,l.extendDeep=y.extendDeep,l.extendDeepAll=y.extendDeepAll,l.extendDeepNoArrays=y.extendDeepNoArrays;var x=t(\\\"./loggers\\\");l.log=x.log,l.warn=x.warn,l.error=x.error;var b=t(\\\"./regex\\\");l.counterRegex=b.counter;var _=t(\\\"./throttle\\\");function w(t){var e={};for(var r in t)for(var n=t[r],i=0;i<n.length;i++)e[n[i]]=+r;return e}l.throttle=_.throttle,l.throttleDone=_.done,l.clearThrottle=_.clear,l.getGraphDiv=t(\\\"./get_graph_div\\\"),l.clearResponsive=t(\\\"./clear_responsive\\\"),l.makeTraceGroups=t(\\\"./make_trace_groups\\\"),l._=t(\\\"./localize\\\"),l.notifier=t(\\\"./notifier\\\"),l.filterUnique=t(\\\"./filter_unique\\\"),l.filterVisible=t(\\\"./filter_visible\\\"),l.pushUnique=t(\\\"./push_unique\\\"),l.cleanNumber=t(\\\"./clean_number\\\"),l.ensureNumber=function(t){return i(t)?(t=Number(t))<-o||t>o?s:i(t)?Number(t):s:s},l.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&(i(t)&&t>=0&&t%1==0)},l.noop=t(\\\"./noop\\\"),l.identity=t(\\\"./identity\\\"),l.repeat=function(t,e){for(var r=new Array(e),n=0;n<e;n++)r[n]=t;return r},l.swapAttrs=function(t,e,r,n){r||(r=\\\"x\\\"),n||(n=\\\"y\\\");for(var i=0;i<e.length;i++){var a=e[i],o=l.nestedProperty(t,a.replace(\\\"?\\\",r)),s=l.nestedProperty(t,a.replace(\\\"?\\\",n)),c=o.get();o.set(s.get()),s.set(c)}},l.raiseToTop=function(t){t.parentNode.appendChild(t)},l.cancelTransition=function(t){return t.transition().duration(0)},l.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},l.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o<i;o++)a[o]=e(t[o],r,n);return a},l.randstr=function t(e,r,n,i){if(n||(n=16),void 0===r&&(r=24),r<=0)return\\\"0\\\";var a,o,s=Math.log(Math.pow(2,r))/Math.log(n),c=\\\"\\\";for(a=2;s===1/0;a*=2)s=Math.log(Math.pow(2,r/a))/Math.log(n)*a;var u=s-Math.floor(s);for(a=0;a<Math.floor(s);a++)c=Math.floor(Math.random()*n).toString(n)+c;u&&(o=Math.pow(n,u),c=Math.floor(Math.random()*o).toString(n)+c);var f=parseInt(c,n);return e&&e[c]||f!==1/0&&f>=Math.pow(2,r)?i>10?(l.warn(\\\"randstr failed uniqueness\\\"),c):t(e,r,n,(i||0)+1):c},l.OptionControl=function(t,e){t||(t={}),e||(e=\\\"opt\\\");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r[\\\"_\\\"+e]=t,r},l.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r<l;r++)c[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},l.syncOrAsync=function(t,e,r){var n;function i(){return l.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return\\\"/\\\"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n<r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&&!a)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},l.mergeArray=function(t,e,r){if(l.isArrayOrTypedArray(t))for(var n=Math.min(t.length,e.length),i=0;i<n;i++)e[i][r]=t[i]},l.fillArray=function(t,e,r,n){if(n=n||l.identity,l.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},l.castOption=function(t,e,r,n){n=n||l.identity;var i=l.nestedProperty(t,r).get();return l.isArrayOrTypedArray(i)?Array.isArray(e)&&l.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},l.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=l.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},l.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&&(n=w(o));for(var s=0;s<a.length;s++){var c=a[s];if(l.isIndex(c)){var u=n?n[c]:c,f=r?r[u]:u;void 0!==(i=f)&&i<t.length&&(t[f].selected=1)}}},l.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var n=w(r),i=[],a=0;a<e.length;a++){var o=e[a];if(l.isIndex(o)){var s=n[o];l.isIndex(s)&&i.push(s)}}return i}return e},l.getTargetArray=function(t,e){var r=e.target;if(\\\"string\\\"==typeof r&&r){var n=l.nestedProperty(t,r).get();return!!Array.isArray(n)&&n}return!!Array.isArray(r)&&r},l.minExtend=function(t,e){var r={};\\\"object\\\"!=typeof e&&(e={});var n,i,a,o=Object.keys(t);for(n=0;n<o.length;n++)a=t[i=o[n]],\\\"_\\\"!==i.charAt(0)&&\\\"function\\\"!=typeof a&&(\\\"module\\\"===i?r[i]=a:Array.isArray(a)?r[i]=a.slice(0,3):r[i]=a&&\\\"object\\\"==typeof a?l.minExtend(t[i],e[i]):a);for(o=Object.keys(e),n=0;n<o.length;n++)\\\"object\\\"==typeof(a=e[i=o[n]])&&i in r&&\\\"object\\\"==typeof r[i]||(r[i]=a);return r},l.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},l.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},l.isPlotDiv=function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed(\\\"js-plotly-plot\\\")},l.removeElement=function(t){var e=t&&t.parentNode;e&&e.removeChild(t)},l.addStyleRule=function(t,e){l.addRelatedStyleRule(\\\"global\\\",t,e)},l.addRelatedStyleRule=function(t,e,r){var n=\\\"plotly.js-style-\\\"+t,i=document.getElementById(n);i||((i=document.createElement(\\\"style\\\")).setAttribute(\\\"id\\\",n),i.appendChild(document.createTextNode(\\\"\\\")),document.head.appendChild(i));var a=i.sheet;a.insertRule?a.insertRule(e+\\\"{\\\"+r+\\\"}\\\",0):a.addRule?a.addRule(e,r,0):l.warn(\\\"addStyleRule failed\\\")},l.deleteRelatedStyleRule=function(t){var e=\\\"plotly.js-style-\\\"+t,r=document.getElementById(e);r&&l.removeElement(r)},l.isIE=function(){return\\\"undefined\\\"!=typeof window.navigator.msSaveBlob},l.isD3Selection=function(t){return t&&\\\"function\\\"==typeof t.classed},l.ensureSingle=function(t,e,r,n){var i=t.select(e+(r?\\\".\\\"+r:\\\"\\\"));if(i.size())return i;var a=t.append(e);return r&&a.classed(r,!0),n&&a.call(n),a},l.ensureSingleById=function(t,e,r,n){var i=t.select(e+\\\"#\\\"+r);if(i.size())return i;var a=t.append(e).attr(\\\"id\\\",r);return n&&a.call(n),a},l.objectFromPath=function(t,e){for(var r,n=t.split(\\\".\\\"),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\\\\[([0-9]+)\\\\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var k=/^([^\\\\[\\\\.]+)\\\\.(.+)?/,M=/^([^\\\\.]+)\\\\[([0-9]+)\\\\](\\\\.)?(.+)?/;l.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if(\\\"object\\\"==typeof t&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(k))?(i=t[r],n=e[1],delete t[r],t[n]=l.extendDeepNoArrays(t[n]||{},l.objectFromPath(r,l.expandObjectPaths(i))[n])):(e=r.match(M))?(i=t[r],n=e[1],a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],\\\".\\\"===e[3]?(s=e[4],o=t[n][a]=t[n][a]||{},l.extendDeepNoArrays(o,l.objectFromPath(s,l.expandObjectPaths(i)))):t[n][a]=l.expandObjectPaths(i)):t[r]=l.expandObjectPaths(t[r]));return t},l.numSeparate=function(t,e,r){if(r||(r=!1),\\\"string\\\"!=typeof e||0===e.length)throw new Error(\\\"Separator string required for formatting!\\\");\\\"number\\\"==typeof t&&(t=String(t));var n=/(\\\\d+)(\\\\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split(\\\".\\\"),s=o[0],l=o.length>1?i+o[1]:\\\"\\\";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,\\\"$1\\\"+a+\\\"$2\\\");return s+l};var A=/%{([^\\\\s%{}]*)}/g,T=/^\\\\w*$/;l.templateString=function(t,e){var r={};return t.replace(A,function(t,n){return T.test(n)?e[n]||\\\"\\\":(r[n]=r[n]||l.nestedProperty(e,n).get,r[n]()||\\\"\\\")})};l.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var S=2e9;l.seedPseudoRandom=function(){S=2e9},l.pseudoRandom=function(){var t=S;return S=(69069*S+1)%4294967296,Math.abs(S-t)<429496729?l.pseudoRandom():S/4294967296}},{\\\"../constants/numerical\\\":673,\\\"./angles\\\":677,\\\"./clean_number\\\":678,\\\"./clear_responsive\\\":680,\\\"./coerce\\\":681,\\\"./dates\\\":682,\\\"./ensure_array\\\":683,\\\"./extend\\\":685,\\\"./filter_unique\\\":686,\\\"./filter_visible\\\":687,\\\"./geometry2d\\\":690,\\\"./get_graph_div\\\":691,\\\"./identity\\\":695,\\\"./is_array\\\":697,\\\"./is_plain_object\\\":698,\\\"./keyed_container\\\":699,\\\"./localize\\\":700,\\\"./loggers\\\":701,\\\"./make_trace_groups\\\":702,\\\"./matrix\\\":703,\\\"./mod\\\":704,\\\"./nested_property\\\":705,\\\"./noop\\\":706,\\\"./notifier\\\":707,\\\"./push_unique\\\":711,\\\"./regex\\\":713,\\\"./relative_attr\\\":714,\\\"./relink_private\\\":715,\\\"./search\\\":716,\\\"./stats\\\":719,\\\"./throttle\\\":722,\\\"./to_log_range\\\":723,d3:148,\\\"fast-isnumeric\\\":214}],697:[function(t,e,r){\\\"use strict\\\";var n=\\\"undefined\\\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},i=\\\"undefined\\\"==typeof DataView?function(){}:DataView;function a(t){return n.isView(t)&&!(t instanceof i)}function o(t){return Array.isArray(t)||a(t)}e.exports={isTypedArray:a,isArrayOrTypedArray:o,isArray1D:function(t){return!o(t[0])}}},{}],698:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return window&&window.process&&window.process.versions?\\\"[object Object]\\\"===Object.prototype.toString.call(t):\\\"[object Object]\\\"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],699:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./nested_property\\\"),i=/^\\\\w*$/;e.exports=function(t,e,r,a){var o,s,l;r=r||\\\"name\\\",a=a||\\\"value\\\";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||\\\"\\\";var u={};if(s)for(o=0;o<s.length;o++)u[s[o][r]]=o;var f=i.test(a),h={set:function(t,e){var i=null===e?4:0;if(!s){if(!l||4===i)return;s=[],l.set(s)}var o=u[t];if(void 0===o){if(4===i)return;i|=3,o=s.length,u[t]=o}else e!==(f?s[o][a]:n(s[o],a).get())&&(i|=2);var p=s[o]=s[o]||{};return p[r]=t,f?p[a]=e:n(p,a).set(e),null!==e&&(i&=-5),c[o]=c[o]|i,h},get:function(t){if(s){var e=u[t];return void 0===e?void 0:f?s[e][a]:n(s[e],a).get()}},rename:function(t,e){var n=u[t];return void 0===n?h:(c[n]=1|c[n],u[e]=n,delete u[t],s[n][r]=e,h)},remove:function(t){var e=u[t];if(void 0===e)return h;var i=s[e];if(Object.keys(i).length>2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o<s.length;o++)c[o]=3|c[o];for(o=e;o<s.length;o++)u[s[o][r]]--;s.splice(e,1),delete u[t]}else n(i,a).set(null),c[e]=6|c[e];return h},constructUpdate:function(){for(var t,i,o={},l=Object.keys(c),u=0;u<l.length;u++)i=l[u],t=e+\\\"[\\\"+i+\\\"]\\\",s[i]?(1&c[i]&&(o[t+\\\".\\\"+r]=s[i][r]),2&c[i]&&(o[t+\\\".\\\"+a]=f?4&c[i]?null:s[i][a]:4&c[i]?null:n(s[i],a).get())):o[t]=null;return o}};return h}},{\\\"./nested_property\\\":705}],700:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\");e.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var c=r.split(\\\"-\\\")[0];if(c===r)break;r=c}return e}},{\\\"../registry\\\":828}],701:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../plot_api/plot_config\\\"),i=e.exports={};function a(t,e){if(t&&t.apply)try{return void t.apply(console,e)}catch(t){}for(var r=0;r<e.length;r++)try{t(e[r])}catch(t){console.log(e[r])}}i.log=function(){if(n.logging>1){for(var t=[\\\"LOG:\\\"],e=0;e<arguments.length;e++)t.push(arguments[e]);a(console.trace||console.log,t)}},i.warn=function(){if(n.logging>0){for(var t=[\\\"WARN:\\\"],e=0;e<arguments.length;e++)t.push(arguments[e]);a(console.trace||console.log,t)}},i.error=function(){if(n.logging>0){for(var t=[\\\"ERROR:\\\"],e=0;e<arguments.length;e++)t.push(arguments[e]);a(console.error,t)}}},{\\\"../plot_api/plot_config\\\":733}],702:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){var n=t.selectAll(\\\"g.\\\"+r.replace(/\\\\s/g,\\\".\\\")).data(e,function(t){return t[0].trace.uid});return n.exit().remove(),n.enter().append(\\\"g\\\").attr(\\\"class\\\",r),n.order(),n}},{}],703:[function(t,e,r){\\\"use strict\\\";r.init2dArray=function(t,e){for(var r=new Array(t),n=0;n<t;n++)r[n]=new Array(e);return r},r.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},r.dot=function(t,e){if(!t.length||!e.length||t.length!==e.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=r.dot(t[i],e);else if(e[0].length){var o=r.transposeRagged(e);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=r.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*e[i];return n},r.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},r.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},r.rotationXYMatrix=function(t,e,n){return r.dot(r.dot(r.translationMatrix(e,n),r.rotationMatrix(t)),r.translationMatrix(-e,-n))},r.apply2DTransform=function(t){return function(){var e=arguments;3===e.length&&(e=e[0]);var n=1===arguments.length?e[0]:[e[0],e[1]];return r.dot(t,[n[0],n[1],1]).slice(0,2)}},r.apply2DTransform2=function(t){var e=r.apply2DTransform(t);return function(t){return e(t.slice(0,2)).concat(e(t.slice(2,4)))}}},{}],704:[function(t,e,r){\\\"use strict\\\";e.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},{}],705:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"./is_array\\\").isArrayOrTypedArray;e.exports=function(t,e){if(n(e))e=String(e);else if(\\\"string\\\"!=typeof e||\\\"[-1]\\\"===e.substr(e.length-4))throw\\\"bad property string\\\";for(var r,a,o,l=0,c=e.split(\\\".\\\");l<c.length;){if(r=String(c[l]).match(/^([^\\\\[\\\\]]*)((\\\\[\\\\-?[0-9]*\\\\])+)$/)){if(r[1])c[l]=r[1];else{if(0!==l)throw\\\"bad property string\\\";c.splice(0,1)}for(a=r[2].substr(1,r[2].length-2).split(\\\"][\\\"),o=0;o<a.length;o++)l++,c.splice(l,0,Number(a[o]))}l++}return\\\"object\\\"!=typeof t?function(t,e,r){return{set:function(){throw\\\"bad container\\\"},get:function(){},astr:e,parts:r,obj:t}}(t,e,c):{set:s(t,c,e),get:function t(e,r){return function(){var n,a,o,s,l,c=e;for(s=0;s<r.length-1;s++){if(-1===(n=r[s])){for(a=!0,o=[],l=0;l<c.length;l++)o[l]=t(c[l],r.slice(s+1))(),o[l]!==o[0]&&(a=!1);return a?o[0]:o}if(\\\"number\\\"==typeof n&&!i(c))return;if(\\\"object\\\"!=typeof(c=c[n])||null===c)return}if(\\\"object\\\"==typeof c&&null!==c&&null!==(o=c[r[s]]))return o}}(t,c),astr:e,parts:c,obj:t}};var a=/(^|\\\\.)args\\\\[/;function o(t,e){return void 0===t||null===t&&!e.match(a)}function s(t,e,r){return function(n){var a,s,f=t,h=\\\"\\\",p=[[t,h]],d=o(n,r);for(s=0;s<e.length-1;s++){if(\\\"number\\\"==typeof(a=e[s])&&!i(f))throw\\\"array index but container is not an array\\\";if(-1===a){if(d=!c(f,e.slice(s+1),n,r))break;return}if(!u(f,a,e[s+1],d))break;if(\\\"object\\\"!=typeof(f=f[a])||null===f)throw\\\"container is not an object\\\";h=l(h,a),p.push([f,h])}if(d){if(s===e.length-1&&(delete f[e[s]],Array.isArray(f)&&+e[s]==f.length-1))for(;f.length&&void 0===f[f.length-1];)f.pop()}else f[e[s]]=n}}function l(t,e){var r=e;return n(e)?r=\\\"[\\\"+e+\\\"]\\\":t&&(r=\\\".\\\"+e),t+r}function c(t,e,r,n){var a,l=i(r),c=!0,f=r,h=n.replace(\\\"-1\\\",0),p=!l&&o(r,h),d=e[0];for(a=0;a<t.length;a++)h=n.replace(\\\"-1\\\",a),l&&(p=o(f=r[a%r.length],h)),p&&(c=!1),u(t,a,d,p)&&s(t[a],e,n.replace(\\\"-1\\\",a))(f);return c}function u(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]=\\\"number\\\"==typeof r?[]:{}}return!0}},{\\\"./is_array\\\":697,\\\"fast-isnumeric\\\":214}],706:[function(t,e,r){\\\"use strict\\\";e.exports=function(){}},{}],707:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=[];e.exports=function(t,e){if(-1===a.indexOf(t)){a.push(t);var r=1e3;i(e)?r=e:\\\"long\\\"===e&&(r=3e3);var o=n.select(\\\"body\\\").selectAll(\\\".plotly-notifier\\\").data([0]);o.enter().append(\\\"div\\\").classed(\\\"plotly-notifier\\\",!0),o.selectAll(\\\".notifier-note\\\").data(a).enter().append(\\\"div\\\").classed(\\\"notifier-note\\\",!0).style(\\\"opacity\\\",0).each(function(t){var e=n.select(this);e.append(\\\"button\\\").classed(\\\"notifier-close\\\",!0).html(\\\"&times;\\\").on(\\\"click\\\",function(){e.transition().call(s)});for(var i=e.append(\\\"p\\\"),a=t.split(/<br\\\\s*\\\\/?>/g),o=0;o<a.length;o++)o&&i.append(\\\"br\\\"),i.append(\\\"span\\\").text(a[o]);e.transition().duration(700).style(\\\"opacity\\\",1).transition().delay(r).call(s)})}function s(t){t.duration(700).style(\\\"opacity\\\",0).each(\\\"end\\\",function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()})}}},{d3:148,\\\"fast-isnumeric\\\":214}],708:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./setcursor\\\"),i=\\\"data-savedcursor\\\";e.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr(\\\"class\\\")||\\\"\\\").split(\\\" \\\"),o=0;o<a.length;o++){var s=a[o];0===s.indexOf(\\\"cursor-\\\")&&t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,\\\"!!\\\")}n(t,e)}else r&&(t.attr(i,null),\\\"!!\\\"===r?n(t):n(t,r))}},{\\\"./setcursor\\\":717}],709:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./matrix\\\").dot,i=t(\\\"../constants/numerical\\\").BADNUM,a=e.exports={};a.tester=function(t){var e,r=t.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for(r.push(r[0]),e=1;e<r.length;e++)n=Math.min(n,r[e][0]),a=Math.max(a,r[e][0]),o=Math.min(o,r[e][1]),s=Math.max(s,r[e][1]);var l,c=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(c=!0,l=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(c=!0,l=function(t){return t[1]===r[0][1]}));var u=!0,f=r[0];for(e=1;e<r.length;e++)if(f[0]!==r[e][0]||f[1]!==r[e][1]){u=!1;break}return{xmin:n,xmax:a,ymin:o,ymax:s,pts:r,contains:c?function(t,e){var r=t[0],c=t[1];return!(r===i||r<n||r>a||c===i||c<o||c>s||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||l<n||l>a||c===i||c<o||c>s)return!1;var u,f,h,p,d,g=r.length,v=r[0][0],m=r[0][1],y=0;for(u=1;u<g;u++)if(f=v,h=m,v=r[u][0],m=r[u][1],!(l<(p=Math.min(f,v))||l>Math.max(f,v)||c>Math.max(h,m)))if(c<Math.min(h,m))l!==p&&y++;else{if(c===(d=v===f?c:h+(l-f)*(m-h)/(v-f)))return 1!==u||!e;c<=d&&l!==p&&y++}return y%2==1},isRect:c,degenerate:u}};var o=a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],c=[t[r][0]-l[0],t[r][1]-l[1]],u=n(c,c),f=Math.sqrt(u),h=[-c[1]/f,c[0]/f];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,c))<0||s>u||Math.abs(n(o,h))>i)return!0;return!1};a.filter=function(t,e){var r=[t[0]],n=0,i=0;function a(a){t.push(a);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c<t.length;c++)(c===t.length-1||o(t,l,c+1,e))&&(r.push(t[c]),r.length<s-2&&(n=c,i=r.length-1),l=c)}t.length>1&&a(t.pop());return{addPt:a,raw:t,filtered:r}}},{\\\"../constants/numerical\\\":673,\\\"./matrix\\\":703}],710:[function(t,e,r){(function(r){\\\"use strict\\\";var n=t(\\\"./show_no_webgl_msg\\\"),i=t(\\\"regl\\\");e.exports=function(t,e){var a=t._fullLayout,o=!0;return a._glcanvas.each(function(n){if(!n.regl&&(!n.pick||a._has(\\\"parcoords\\\"))){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[]})}catch(t){o=!1}o&&this.addEventListener(\\\"webglcontextlost\\\",function(e){t&&t.emit&&t.emit(\\\"plotly_webglcontextlost\\\",{event:e,layer:n.key})},!1)}}),o||n({container:a._glcontainer.node()}),o}}).call(this,\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:{})},{\\\"./show_no_webgl_msg\\\":718,regl:478}],711:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;r<t.length;r++)if(t[r]instanceof RegExp&&t[r].toString()===n)return t;t.push(e)}else!e&&0!==e||-1!==t.indexOf(e)||t.push(e);return t}},{}],712:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plot_api/plot_config\\\");var a={add:function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},redo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.redo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}}};a.plotDo=function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a<e.length;a++)r=e[a],i[a]=r===t?r:\\\"object\\\"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)},e.exports=a},{\\\"../lib\\\":696,\\\"../plot_api/plot_config\\\":733}],713:[function(t,e,r){\\\"use strict\\\";r.counter=function(t,e,r){var n=(e||\\\"\\\")+(r?\\\"\\\":\\\"$\\\");return\\\"xy\\\"===t?new RegExp(\\\"^x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?\\\"+n):new RegExp(\\\"^\\\"+t+\\\"([2-9]|[1-9][0-9]+)?\\\"+n)}},{}],714:[function(t,e,r){\\\"use strict\\\";var n=/^(.*)(\\\\.[^\\\\.\\\\[\\\\]]+|\\\\[\\\\d\\\\])$/,i=/^[^\\\\.\\\\[\\\\]]+$/;e.exports=function(t,e){for(;e;){var r=t.match(n);if(r)t=r[1];else{if(!t.match(i))throw new Error(\\\"bad relativeAttr call:\\\"+[t,e]);t=\\\"\\\"}if(\\\"^\\\"!==e.charAt(0))break;e=e.slice(1)}return t&&\\\"[\\\"!==e.charAt(0)?t+\\\".\\\"+e:t+e}},{}],715:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./is_array\\\").isArrayOrTypedArray,i=t(\\\"./is_plain_object\\\");e.exports=function t(e,r){for(var a in r){var o=r[a],s=e[a];if(s!==o)if(\\\"_\\\"===a.charAt(0)||\\\"function\\\"==typeof o){if(a in e)continue;e[a]=o}else if(n(o)&&n(s)&&i(o[0])){if(\\\"customdata\\\"===a||\\\"ids\\\"===a)continue;for(var l=Math.min(o.length,s.length),c=0;c<l;c++)s[c]!==o[c]&&i(o[c])&&i(s[c])&&t(s[c],o[c])}else i(o)&&i(s)&&(t(s,o),Object.keys(s).length||delete e[a])}}},{\\\"./is_array\\\":697,\\\"./is_plain_object\\\":698}],716:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"./loggers\\\"),a=t(\\\"./identity\\\");function o(t,e){return t<e}function s(t,e){return t<=e}function l(t,e){return t>e}function c(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,u,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(u=d>=0?r?o:s:r?c:l,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f<h&&p++<100;)u(e[a=Math.floor((f+h)/2)],t)?f=a+1:h=a;return p>90&&i.log(\\\"Long binary search...\\\"),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;s<n;s++)e[s+1]>e[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i<a&&o++<100;)e[n=c((i+a)/2)]<=t?i=n+s:a=n-l;return e[i]},r.sort=function(t,e){for(var r=0,n=0,i=1;i<t.length;i++){var a=e(t[i],t[i-1]);if(a<0?r=1:a>0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;i<t.length;i++){var o=e(t[i]);o<n&&(n=o,r=i)}return r}},{\\\"./identity\\\":695,\\\"./loggers\\\":701,\\\"fast-isnumeric\\\":214}],717:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){(t.attr(\\\"class\\\")||\\\"\\\").split(\\\" \\\").forEach(function(e){0===e.indexOf(\\\"cursor-\\\")&&t.classed(e,!1)}),e&&t.classed(\\\"cursor-\\\"+e,!0)}},{}],718:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../components/color\\\"),i=function(){};e.exports=function(t){for(var e in t)\\\"function\\\"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement(\\\"div\\\");r.className=\\\"no-webgl\\\",r.style.cursor=\\\"pointer\\\",r.style.fontSize=\\\"24px\\\",r.style.color=n.defaults[0],r.style.position=\\\"absolute\\\",r.style.left=r.style.top=\\\"0px\\\",r.style.width=r.style.height=\\\"100%\\\",r.style[\\\"background-color\\\"]=n.lightLine,r.style[\\\"z-index\\\"]=30;var a=document.createElement(\\\"p\\\");return a.textContent=\\\"WebGL is not supported by your browser - visit https://get.webgl.org for more info\\\",a.style.position=\\\"relative\\\",a.style.top=\\\"50%\\\",a.style.left=\\\"50%\\\",a.style.height=\\\"30%\\\",a.style.width=\\\"50%\\\",a.style.margin=\\\"-15% 0 0 -25%\\\",r.appendChild(a),t.container.appendChild(r),t.container.style.background=\\\"#FFFFFF\\\",t.container.onclick=function(){window.open(\\\"https://get.webgl.org\\\")},!1}},{\\\"../components/color\\\":570}],719:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"./is_array\\\").isArrayOrTypedArray;r.aggNums=function(t,e,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;s<o;s++)l[s]=r.aggNums(t,e,a[s]);a=l}for(s=0;s<o;s++)n(e)?n(a[s])&&(e=t(+e,+a[s])):e=a[s];return e},r.len=function(t){return r.aggNums(function(t){return t+1},0,t)},r.mean=function(t,e){return e||(e=r.len(t)),r.aggNums(function(t,e){return t+e},0,t)/e},r.midRange=function(t){if(void 0!==t&&0!==t.length)return(r.aggNums(Math.max,null,t)+r.aggNums(Math.min,null,t))/2},r.variance=function(t,e,i){return e||(e=r.len(t)),n(i)||(i=r.mean(t,e)),r.aggNums(function(t,e){return t+Math.pow(e-i,2)},0,t)/e},r.stdev=function(t,e,n){return Math.sqrt(r.variance(t,e,n))},r.interp=function(t,e){if(!n(e))throw\\\"n should be a finite number\\\";if((e=e*t.length-.5)<0)return t[0];if(e>t.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\\\"./is_array\\\":697,\\\"fast-isnumeric\\\":214}],720:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"color-normalize\\\");e.exports=function(t){return t?n(t):[0,0,0,1]}},{\\\"color-normalize\\\":108}],721:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../constants/xmlns_namespaces\\\"),o=t(\\\"../constants/alignment\\\").LINE_SPACING;function s(t,e){return t.node().getBoundingClientRect()[e]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,v){var S=t.text(),C=!t.attr(\\\"data-notex\\\")&&\\\"undefined\\\"!=typeof MathJax&&S.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var z=t.attr(\\\"class\\\")?t.attr(\\\"class\\\").split(\\\" \\\")[0]:\\\"text\\\";return z+=\\\"-math\\\",L.selectAll(\\\"svg.\\\"+z).remove(),L.selectAll(\\\"g.\\\"+z+\\\"-group\\\").remove(),t.style(\\\"display\\\",null).attr({\\\"data-unformatted\\\":S,\\\"data-math\\\":\\\"N\\\"}),C?(e&&e._promises||[]).push(new Promise(function(e){t.style(\\\"display\\\",\\\"none\\\");var r=parseInt(t.node().style.fontSize,10),a={fontSize:r};!function(t,e,r){var a,o,s,l;MathJax.Hub.Queue(function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:\\\"none\\\",tex2jax:{inlineMath:[[\\\"$\\\",\\\"$\\\"],[\\\"\\\\\\\\(\\\",\\\"\\\\\\\\)\\\"]]},displayAlign:\\\"left\\\"})},function(){if(\\\"SVG\\\"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer(\\\"SVG\\\")},function(){var r=\\\"math-output-\\\"+i.randstr({},64);return l=n.select(\\\"body\\\").append(\\\"div\\\").attr({id:r}).style({visibility:\\\"hidden\\\",position:\\\"absolute\\\"}).style({\\\"font-size\\\":e.fontSize+\\\"px\\\"}).text(t.replace(c,\\\"\\\\\\\\lt \\\").replace(u,\\\"\\\\\\\\gt \\\")),MathJax.Hub.Typeset(l.node())},function(){var e=n.select(\\\"body\\\").select(\\\"#MathJax_SVG_glyphs\\\");if(l.select(\\\".MathJax_SVG\\\").empty()||!l.select(\\\"svg\\\").node())i.log(\\\"There was an error in the tex syntax.\\\",t),r();else{var o=l.select(\\\"svg\\\").node().getBoundingClientRect();r(l.select(\\\".MathJax_SVG\\\"),e,o)}if(l.remove(),\\\"SVG\\\"!==a)return MathJax.Hub.setRenderer(a)},function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})}(C[2],a,function(n,i,a){L.selectAll(\\\"svg.\\\"+z).remove(),L.selectAll(\\\"g.\\\"+z+\\\"-group\\\").remove();var o=n&&n.select(\\\"svg\\\");if(!o||!o.node())return O(),void e();var l=L.append(\\\"g\\\").classed(z+\\\"-group\\\",!0).attr({\\\"pointer-events\\\":\\\"none\\\",\\\"data-unformatted\\\":S,\\\"data-math\\\":\\\"Y\\\"});l.node().appendChild(o.node()),i&&i.node()&&o.node().insertBefore(i.node().cloneNode(!0),o.node().firstChild),o.attr({class:z,height:a.height,preserveAspectRatio:\\\"xMinYMin meet\\\"}).style({overflow:\\\"visible\\\",\\\"pointer-events\\\":\\\"none\\\"});var c=t.node().style.fill||\\\"black\\\";o.select(\\\"g\\\").attr({fill:c,stroke:c});var u=s(o,\\\"width\\\"),f=s(o,\\\"height\\\"),h=+t.attr(\\\"x\\\")-u*{start:0,middle:.5,end:1}[t.attr(\\\"text-anchor\\\")||\\\"start\\\"],p=-(r||s(t,\\\"height\\\"))/4;\\\"y\\\"===z[0]?(l.attr({transform:\\\"rotate(\\\"+[-90,+t.attr(\\\"x\\\"),+t.attr(\\\"y\\\")]+\\\") translate(\\\"+[-u/2,p-f/2]+\\\")\\\"}),o.attr({x:+t.attr(\\\"x\\\"),y:+t.attr(\\\"y\\\")})):\\\"l\\\"===z[0]?o.attr({x:t.attr(\\\"x\\\"),y:p-f/2}):\\\"a\\\"===z[0]?o.attr({x:0,y:p}):o.attr({x:h,y:+t.attr(\\\"y\\\")+p-f/2}),v&&v.call(t,l),e(l)})})):O(),t}function O(){L.empty()||(z=t.attr(\\\"class\\\")+\\\"-math\\\",L.select(\\\"svg.\\\"+z).remove()),t.text(\\\"\\\").style(\\\"white-space\\\",\\\"pre\\\"),function(t,e){e=e.replace(m,\\\" \\\");var r,s=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(a.svg,\\\"tspan\\\");n.select(e).attr({class:\\\"line\\\",dy:c*o+\\\"em\\\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var s=1;s<i.length;s++)v(i[s])}function v(t){var e,i=t.type,o={};if(\\\"a\\\"===i){e=\\\"a\\\";var s=t.target,c=t.href,u=t.popup;c&&(o={\\\"xlink:xlink:show\\\":\\\"_blank\\\"===s||\\\"_\\\"!==s.charAt(0)?\\\"new\\\":\\\"replace\\\",target:s,\\\"xlink:xlink:href\\\":c},u&&(o.onclick='window.open(this.href.baseVal,this.target.baseVal,\\\"'+u+'\\\");return false;'))}else e=\\\"tspan\\\";t.style&&(o.style=t.style);var f=document.createElementNS(a.svg,e);if(\\\"sup\\\"===i||\\\"sub\\\"===i){S(r,d),r.appendChild(f);var g=document.createElementNS(a.svg,\\\"tspan\\\");S(g,d),n.select(g).attr(\\\"dy\\\",p[i]),o.dy=h[i],r.appendChild(f),r.appendChild(g)}else r.appendChild(f);n.select(f).attr(o),r=t.node=f,l.push(t)}function S(t,e){t.appendChild(document.createTextNode(e))}function C(t){if(1!==l.length){var n=l.pop();t!==n.type&&i.log(\\\"Start tag <\\\"+n.type+\\\"> doesn't match end tag <\\\"+t+\\\">. Pretending it did match.\\\",e),r=l[l.length-1].node}else i.log(\\\"Ignoring unexpected end tag </\\\"+t+\\\">.\\\",e)}b.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(y),z=0;z<L.length;z++){var O=L[z],I=O.match(x),P=I&&I[2].toLowerCase(),D=f[P];if(\\\"br\\\"===P)u();else if(void 0===D)S(r,E(O));else if(I[1])C(P);else{var R=I[4],B={type:P},F=A(R,_);if(F?(F=F.replace(T,\\\"$1 fill:\\\"),D&&(F+=\\\";\\\"+D)):D&&(F=D),F&&(B.style=F),\\\"a\\\"===P){s=!0;var N=A(R,w);if(N){var j=document.createElement(\\\"a\\\");j.href=N,-1!==g.indexOf(j.protocol)&&(B.href=encodeURI(decodeURI(N)),B.target=A(R,k)||\\\"_blank\\\",B.popup=A(R,M))}}v(B)}}return s}(t.node(),S)&&t.style(\\\"pointer-events\\\",\\\"all\\\"),r.positionText(t),v&&v.call(t)}};var c=/(<|&lt;|&#60;)/g,u=/(>|&gt;|&#62;)/g;var f={sup:\\\"font-size:70%\\\",sub:\\\"font-size:70%\\\",b:\\\"font-weight:bold\\\",i:\\\"font-style:italic\\\",a:\\\"cursor:pointer\\\",span:\\\"\\\",em:\\\"font-style:italic;font-weight:bold\\\"},h={sub:\\\"0.3em\\\",sup:\\\"-0.6em\\\"},p={sub:\\\"-0.21em\\\",sup:\\\"0.42em\\\"},d=\\\"\\\\u200b\\\",g=[\\\"http:\\\",\\\"https:\\\",\\\"mailto:\\\",\\\"\\\",void 0,\\\":\\\"],v=new RegExp(\\\"</?(\\\"+Object.keys(f).join(\\\"|\\\")+\\\")( [^>]*)?/?>\\\",\\\"g\\\"),m=/(\\\\r\\\\n?|\\\\n)/g,y=/(<[^<>]*>)/,x=/<(\\\\/?)([^ >]*)(\\\\s+(.*))?>/i,b=/<br(\\\\s+.*)?>/i,_=/(^|[\\\\s\\\"'])style\\\\s*=\\\\s*(\\\"([^\\\"]*);?\\\"|'([^']*);?')/i,w=/(^|[\\\\s\\\"'])href\\\\s*=\\\\s*(\\\"([^\\\"]*)\\\"|'([^']*)')/i,k=/(^|[\\\\s\\\"'])target\\\\s*=\\\\s*(\\\"([^\\\"\\\\s]*)\\\"|'([^'\\\\s]*)')/i,M=/(^|[\\\\s\\\"'])popup\\\\s*=\\\\s*(\\\"([\\\\w=,]*)\\\"|'([\\\\w=,]*)')/i;function A(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var T=/(^|;)\\\\s*color:/;r.plainText=function(t){return(t||\\\"\\\").replace(v,\\\" \\\")};var S={mu:\\\"\\\\u03bc\\\",amp:\\\"&\\\",lt:\\\"<\\\",gt:\\\">\\\",nbsp:\\\"\\\\xa0\\\",times:\\\"\\\\xd7\\\",plusmn:\\\"\\\\xb1\\\",deg:\\\"\\\\xb0\\\"},C=/&(#\\\\d+|#x[\\\\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(C,function(t,e){return(\\\"#\\\"===e.charAt(0)?function(t){if(t>1114111)return;var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}(\\\"x\\\"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t})}function L(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||\\\"top\\\",l=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return i=\\\"bottom\\\"===s?function(){return l.bottom-n.height}:\\\"middle\\\"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a=\\\"right\\\"===o?function(){return l.right-n.width}:\\\"center\\\"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-c.top+\\\"px\\\",left:a()-c.left+\\\"px\\\",\\\"z-index\\\":1e3}),this}}r.convertEntities=E,r.lineCount=function(t){return t.selectAll(\\\"tspan.line\\\").size()||1},r.positionText=function(t,e,r){return t.each(function(){var t=n.select(this);function i(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var a=i(\\\"x\\\",e),o=i(\\\"y\\\",r);\\\"text\\\"===this.nodeName&&t.selectAll(\\\"tspan.line\\\").attr({x:a,y:o})})},r.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch(\\\"edit\\\",\\\"input\\\",\\\"cancel\\\"),o=i||t;if(t.style({\\\"pointer-events\\\":i?\\\"none\\\":\\\"all\\\"}),1!==t.size())throw new Error(\\\"boo\\\");function s(){!function(){var i=n.select(r).select(\\\".svg-container\\\"),o=i.append(\\\"div\\\"),s=t.node().style,c=parseFloat(s.fontSize||12),u=e.text;void 0===u&&(u=t.attr(\\\"data-unformatted\\\"));o.classed(\\\"plugin-editable editable\\\",!0).style({position:\\\"absolute\\\",\\\"font-family\\\":s.fontFamily||\\\"Arial\\\",\\\"font-size\\\":c,color:e.fill||s.fill||\\\"black\\\",opacity:1,\\\"background-color\\\":e.background||\\\"transparent\\\",outline:\\\"#ffffff33 1px solid\\\",margin:[-c/8+1,0,0,-1].join(\\\"px \\\")+\\\"px\\\",padding:\\\"0\\\",\\\"box-sizing\\\":\\\"border-box\\\"}).attr({contenteditable:!0}).text(u).call(L(t,i,e)).on(\\\"blur\\\",function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr(\\\"class\\\");(e=i?\\\".\\\"+i.split(\\\" \\\")[0]+\\\"-math-group\\\":\\\"[class*=-math-group]\\\")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on(\\\"mouseup\\\",null),a.edit.call(t,o)}).on(\\\"focus\\\",function(){var t=this;r._editing=!0,n.select(document).on(\\\"mouseup\\\",function(){if(n.event.target===t)return!1;document.activeElement===o.node()&&o.node().blur()})}).on(\\\"keyup\\\",function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on(\\\"blur\\\",function(){return!1}).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(L(t,i,e)))}).on(\\\"keydown\\\",function(){13===n.event.which&&this.blur()}).call(l)}(),t.style({opacity:0});var i,s=o.attr(\\\"class\\\");(i=s?\\\".\\\"+s.split(\\\" \\\")[0]+\\\"-math-group\\\":\\\"[class*=-math-group]\\\")&&n.select(t.node().parentNode).select(i).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on(\\\"click\\\",s),n.rebind(t,a,\\\"on\\\")}},{\\\"../constants/alignment\\\":668,\\\"../constants/xmlns_namespaces\\\":674,\\\"../lib\\\":696,d3:148}],722:[function(t,e,r){\\\"use strict\\\";var n={};function i(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var a=n[t],o=Date.now();if(!a){for(var s in n)n[s].ts<o-6e4&&delete n[s];a=n[t]={ts:0,timer:null}}function l(){r(),a.ts=Date.now(),a.onDone&&(a.onDone(),a.onDone=null)}i(a),o>a.ts+e?l():a.timer=setTimeout(function(){l(),a.timer=null},e)},r.done=function(t){var e=n[t];return e&&e.timer?new Promise(function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}}):Promise.resolve()},r.clear=function(t){if(t)i(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],723:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{\\\"fast-isnumeric\\\":214}],724:[function(t,e,r){\\\"use strict\\\";var n=e.exports={},i=t(\\\"../plots/geo/constants\\\").locationmodeToLayer,a=t(\\\"topojson-client\\\").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,\\\"-\\\"),\\\"_\\\",t.resolution.toString(),\\\"m\\\"].join(\\\"\\\")},n.getTopojsonPath=function(t,e){return t+e+\\\".json\\\"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{\\\"../plots/geo/constants\\\":774,\\\"topojson-client\\\":517}],725:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"locale\\\",name:\\\"en-US\\\",dictionary:{\\\"Click to enter Colorscale title\\\":\\\"Click to enter Colorscale title\\\"},format:{date:\\\"%m/%d/%Y\\\"}}},{}],726:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"locale\\\",name:\\\"en\\\",dictionary:{\\\"Click to enter Colorscale title\\\":\\\"Click to enter Colourscale title\\\"},format:{days:[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"],shortDays:[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],months:[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],shortMonths:[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],periods:[\\\"AM\\\",\\\"PM\\\"],dateTime:\\\"%a %b %e %X %Y\\\",date:\\\"%d/%m/%Y\\\",time:\\\"%H:%M:%S\\\",decimal:\\\".\\\",thousands:\\\",\\\",grouping:[3],currency:[\\\"$\\\",\\\"\\\"],year:\\\"%Y\\\",month:\\\"%b %Y\\\",dayMonth:\\\"%b %-d\\\",dayMonthYear:\\\"%b %-d, %Y\\\"}}},{}],727:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\");e.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split(\\\"[\\\")[0],s=0;s<a.length;s++)if((r=t.match(a[s]))&&0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\\\\[(0|[1-9][0-9]*)\\\\](\\\\.(.+))?$/))&&{array:e,index:Number(r[1]),property:r[3]||\\\"\\\"}:{array:e,index:\\\"\\\",property:\\\"\\\"}}},{\\\"../registry\\\":828}],728:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=n.extendFlat,a=n.isPlainObject,o={valType:\\\"flaglist\\\",extras:[\\\"none\\\"],flags:[\\\"calc\\\",\\\"clearAxisTypes\\\",\\\"plot\\\",\\\"style\\\",\\\"markerSize\\\",\\\"colorbars\\\"]},s={valType:\\\"flaglist\\\",extras:[\\\"none\\\"],flags:[\\\"calc\\\",\\\"plot\\\",\\\"legend\\\",\\\"ticks\\\",\\\"axrange\\\",\\\"layoutstyle\\\",\\\"modebar\\\",\\\"camera\\\",\\\"arraydraw\\\"]},l=o.flags.slice().concat([\\\"fullReplot\\\"]),c=s.flags.slice().concat(\\\"layoutReplot\\\");function u(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function f(t,e,r){var n=i({},t);for(var o in n){var s=n[o];a(s)&&(n[o]=h(s,e,r,o))}return\\\"from-root\\\"===r&&(n.editType=e),n}function h(t,e,r,n){if(t.valType){var a=i({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o<t.items.length;o++)a.items[o]=h(t.items[o],e,\\\"from-root\\\")}return a}return f(t,e,\\\"_\\\"===n.charAt(0)?\\\"nested\\\":\\\"from-root\\\")}e.exports={traces:o,layout:s,traceFlags:function(){return u(l)},layoutFlags:function(){return u(c)},update:function(t,e){var r=e.editType;if(r&&\\\"none\\\"!==r)for(var n=r.split(\\\"+\\\"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:f}},{\\\"../lib\\\":696}],729:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"gl-mat4/fromQuat\\\"),a=t(\\\"../registry\\\"),o=t(\\\"../lib\\\"),s=t(\\\"../plots/plots\\\"),l=t(\\\"../plots/cartesian/axis_ids\\\"),c=l.cleanId,u=l.getFromTrace,f=t(\\\"../components/color\\\");function h(t,e){var r=t[e],n=e.charAt(0);r&&\\\"paper\\\"!==r&&(t[e]=c(r,n))}function p(t){if(!o.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,(\\\"string\\\"==typeof e||\\\"number\\\"==typeof e)&&String(e)}function d(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,a=Math.min(t.length,e.length);for(i=0;i<a&&t.charAt(i)===e.charAt(i);i++);return t.substr(0,i).trim()}function g(t){var e=\\\"middle\\\",r=\\\"center\\\";return-1!==t.indexOf(\\\"top\\\")?e=\\\"top\\\":-1!==t.indexOf(\\\"bottom\\\")&&(e=\\\"bottom\\\"),-1!==t.indexOf(\\\"left\\\")?r=\\\"left\\\":-1!==t.indexOf(\\\"right\\\")&&(r=\\\"right\\\"),e+\\\" \\\"+r}function v(t,e){return e in t&&\\\"object\\\"==typeof t[e]&&0===Object.keys(t[e]).length}r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&o.log(\\\"Clearing previous rejected promises from queue.\\\"),t._promises=[]},r.cleanLayout=function(t){var e,r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var n=(s.subplotsRegistry.cartesian||{}).attrRegex,a=(s.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(t);for(e=0;e<l.length;e++){var u=l[e];if(n&&n.test(u)){var p=t[u];p.anchor&&\\\"free\\\"!==p.anchor&&(p.anchor=c(p.anchor)),p.overlaying&&(p.overlaying=c(p.overlaying)),p.type||(p.isdate?p.type=\\\"date\\\":p.islog?p.type=\\\"log\\\":!1===p.isdate&&!1===p.islog&&(p.type=\\\"linear\\\")),\\\"withzero\\\"!==p.autorange&&\\\"tozero\\\"!==p.autorange||(p.autorange=!0,p.rangemode=\\\"tozero\\\"),delete p.islog,delete p.isdate,delete p.categories,v(p,\\\"domain\\\")&&delete p.domain,void 0!==p.autotick&&(void 0===p.tickmode&&(p.tickmode=p.autotick?\\\"auto\\\":\\\"linear\\\"),delete p.autotick)}else if(a&&a.test(u)){var d=t[u],g=d.cameraposition;if(Array.isArray(g)&&4===g[0].length){var m=g[0],y=g[1],x=g[2],b=i([],m),_=[];for(r=0;r<3;++r)_[r]=y[r]+x*b[2+4*r];d.camera={eye:{x:_[0],y:_[1],z:_[2]},center:{x:y[0],y:y[1],z:y[2]},up:{x:b[1],y:b[5],z:b[9]}},delete d.cameraposition}}}var w=Array.isArray(t.annotations)?t.annotations.length:0;for(e=0;e<w;e++){var k=t.annotations[e];o.isPlainObject(k)&&(k.ref&&(\\\"paper\\\"===k.ref?(k.xref=\\\"paper\\\",k.yref=\\\"paper\\\"):\\\"data\\\"===k.ref&&(k.xref=\\\"x\\\",k.yref=\\\"y\\\"),delete k.ref),h(k,\\\"xref\\\"),h(k,\\\"yref\\\"))}var M=Array.isArray(t.shapes)?t.shapes.length:0;for(e=0;e<M;e++){var A=t.shapes[e];o.isPlainObject(A)&&(h(A,\\\"xref\\\"),h(A,\\\"yref\\\"))}var T=t.legend;return T&&(T.x>3?(T.x=1.02,T.xanchor=\\\"left\\\"):T.x<-2&&(T.x=-.02,T.xanchor=\\\"right\\\"),T.y>3?(T.y=1.02,T.yanchor=\\\"bottom\\\"):T.y<-2&&(T.y=-.02,T.yanchor=\\\"top\\\")),\\\"rotate\\\"===t.dragmode&&(t.dragmode=\\\"orbit\\\"),f.clean(t),t},r.cleanData=function(t){for(var e=0;e<t.length;e++){var n,i=t[e];if(\\\"histogramy\\\"===i.type&&\\\"xbins\\\"in i&&!(\\\"ybins\\\"in i)&&(i.ybins=i.xbins,delete i.xbins),i.error_y&&\\\"opacity\\\"in i.error_y){var l=f.defaults,u=i.error_y.color||(a.traceIs(i,\\\"bar\\\")?f.defaultLine:l[e%l.length]);i.error_y.color=f.addOpacity(f.rgb(u),f.opacity(u)*i.error_y.opacity),delete i.error_y.opacity}if(\\\"bardir\\\"in i&&(\\\"h\\\"!==i.bardir||!a.traceIs(i,\\\"bar\\\")&&\\\"histogram\\\"!==i.type.substr(0,9)||(i.orientation=\\\"h\\\",r.swapXYData(i)),delete i.bardir),\\\"histogramy\\\"===i.type&&r.swapXYData(i),\\\"histogramx\\\"!==i.type&&\\\"histogramy\\\"!==i.type||(i.type=\\\"histogram\\\"),\\\"scl\\\"in i&&(i.colorscale=i.scl,delete i.scl),\\\"reversescl\\\"in i&&(i.reversescale=i.reversescl,delete i.reversescl),i.xaxis&&(i.xaxis=c(i.xaxis,\\\"x\\\")),i.yaxis&&(i.yaxis=c(i.yaxis,\\\"y\\\")),a.traceIs(i,\\\"gl3d\\\")&&i.scene&&(i.scene=s.subplotsRegistry.gl3d.cleanId(i.scene)),!a.traceIs(i,\\\"pie\\\")&&!a.traceIs(i,\\\"bar\\\"))if(Array.isArray(i.textposition))for(n=0;n<i.textposition.length;n++)i.textposition[n]=g(i.textposition[n]);else i.textposition&&(i.textposition=g(i.textposition));var h=a.getModule(i);if(h&&h.colorbar){var m=h.colorbar.container,y=m?i[m]:i;y&&y.colorscale&&(\\\"YIGnBu\\\"===y.colorscale&&(y.colorscale=\\\"YlGnBu\\\"),\\\"YIOrRd\\\"===y.colorscale&&(y.colorscale=\\\"YlOrRd\\\"))}if(\\\"surface\\\"===i.type&&o.isPlainObject(i.contours)){var x=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];for(n=0;n<x.length;n++){var b=i.contours[x[n]];o.isPlainObject(b)&&(b.highlightColor&&(b.highlightcolor=b.highlightColor,delete b.highlightColor),b.highlightWidth&&(b.highlightwidth=b.highlightWidth,delete b.highlightWidth))}}if(\\\"candlestick\\\"===i.type||\\\"ohlc\\\"===i.type){var _=!1!==(i.increasing||{}).showlegend,w=!1!==(i.decreasing||{}).showlegend,k=p(i.increasing),M=p(i.decreasing);if(!1!==k&&!1!==M){var A=d(k,M,_,w);A&&(i.name=A)}else!k&&!M||i.name||(i.name=k||M)}if(Array.isArray(i.transforms)){var T=i.transforms;for(n=0;n<T.length;n++){var S=T[n];if(o.isPlainObject(S))switch(S.type){case\\\"filter\\\":S.filtersrc&&(S.target=S.filtersrc,delete S.filtersrc),S.calendar&&(S.valuecalendar||(S.valuecalendar=S.calendar),delete S.calendar);break;case\\\"groupby\\\":if(S.styles=S.styles||S.style,S.styles&&!Array.isArray(S.styles)){var C=S.styles,E=Object.keys(C);S.styles=[];for(var L=0;L<E.length;L++)S.styles.push({target:E[L],value:C[E[L]]})}}}}v(i,\\\"line\\\")&&delete i.line,\\\"marker\\\"in i&&(v(i.marker,\\\"line\\\")&&delete i.marker.line,v(i,\\\"marker\\\")&&delete i.marker),f.clean(i),i.autobinx&&(delete i.autobinx,delete i.xbins),i.autobiny&&(delete i.autobiny,delete i.ybins)}},r.swapXYData=function(t){var e;if(o.swapAttrs(t,[\\\"?\\\",\\\"?0\\\",\\\"d?\\\",\\\"?bins\\\",\\\"nbins?\\\",\\\"autobin?\\\",\\\"?src\\\",\\\"error_?\\\"]),Array.isArray(t.z)&&Array.isArray(t.z[0])&&(t.transpose?delete t.transpose:t.transpose=!0),t.error_x&&t.error_y){var r=t.error_y,n=\\\"copy_ystyle\\\"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(t,[\\\"error_?.copy_ystyle\\\"]),n&&o.swapAttrs(t,[\\\"error_?.color\\\",\\\"error_?.thickness\\\",\\\"error_?.width\\\"])}if(\\\"string\\\"==typeof t.hoverinfo){var i=t.hoverinfo.split(\\\"+\\\");for(e=0;e<i.length;e++)\\\"x\\\"===i[e]?i[e]=\\\"y\\\":\\\"y\\\"===i[e]&&(i[e]=\\\"x\\\");t.hoverinfo=i.join(\\\"+\\\")}},r.coerceTraceIndices=function(t,e){if(n(e))return[e];if(!Array.isArray(e)||!e.length)return t.data.map(function(t,e){return e});if(Array.isArray(e)){for(var r=[],i=0;i<e.length;i++)o.isIndex(e[i],t.data.length)?r.push(e[i]):o.warn(\\\"trace index (\\\",e[i],\\\") is not a number or is out of bounds\\\");return r}return e},r.manageArrayContainers=function(t,e,r){var i=t.obj,a=t.parts,s=a.length,l=a[s-1],c=n(l);if(c&&null===e){var u=a.slice(0,s-1).join(\\\".\\\");o.nestedProperty(i,u).get().splice(l,1)}else c&&void 0===t.get()?(void 0===t.get()&&(r[t.astr]=null),t.set(e)):t.set(e)};var m=/(\\\\.[^\\\\[\\\\]\\\\.]+|\\\\[[^\\\\[\\\\]\\\\.]+\\\\])$/;function y(t){var e=t.search(m);if(e>0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=y(e);r;){if(r in t)return!0;r=y(r)}return!1};var x=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n<e.length;n++)for(var i=t._fullData[n],a=0;a<3;a++){var s=u(t,i,x[a]);if(s&&\\\"log\\\"!==s.type){var l=s._name,c=s._id.substr(1);if(\\\"scene\\\"===c.substr(0,5)){if(void 0!==r[c])continue;l=c+\\\".\\\"+l}var f=l+\\\".type\\\";void 0===r[l]&&void 0===r[f]&&o.nestedProperty(t.layout,f).set(null)}}}},{\\\"../components/color\\\":570,\\\"../lib\\\":696,\\\"../plots/cartesian/axis_ids\\\":748,\\\"../plots/plots\\\":809,\\\"../registry\\\":828,\\\"fast-isnumeric\\\":214,\\\"gl-mat4/fromQuat\\\":251}],730:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./plot_api\\\");r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r.react=n.react,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.setPlotConfig=n.setPlotConfig,r.toImage=t(\\\"./to_image\\\"),r.validate=t(\\\"./validate\\\"),r.downloadImage=t(\\\"../snapshot/download\\\");var i=t(\\\"./template_api\\\");r.makeTemplate=i.makeTemplate,r.validateTemplate=i.validateTemplate},{\\\"../snapshot/download\\\":830,\\\"./plot_api\\\":732,\\\"./template_api\\\":737,\\\"./to_image\\\":738,\\\"./validate\\\":739}],731:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib/nested_property\\\"),i=t(\\\"../lib/is_plain_object\\\"),a=t(\\\"../lib/noop\\\"),o=t(\\\"../lib/loggers\\\"),s=t(\\\"../lib/search\\\").sorterAsc,l=t(\\\"../registry\\\");r.containerArrayMatch=t(\\\"./container_array_match\\\");var c=r.isAddVal=function(t){return\\\"add\\\"===t||i(t)},u=r.isRemoveVal=function(t){return null===t||\\\"remove\\\"===t};r.applyContainerArrayChanges=function(t,e,r,i){var f=e.astr,h=l.getComponentMethod(f,\\\"supplyLayoutDefaults\\\"),p=l.getComponentMethod(f,\\\"draw\\\"),d=l.getComponentMethod(f,\\\"drawOne\\\"),g=i.replot||i.recalc||h===a||p===a,v=t.layout,m=t._fullLayout;if(r[\\\"\\\"]){Object.keys(r).length>1&&o.warn(\\\"Full array edits are incompatible with other edits\\\",f);var y=r[\\\"\\\"][\\\"\\\"];if(u(y))e.set(null);else{if(!Array.isArray(y))return o.warn(\\\"Unrecognized full array edit value\\\",f,y),!0;e.set(y)}return!g&&(h(v,m),p(t),!0)}var x,b,_,w,k,M,A,T=Object.keys(r).map(Number).sort(s),S=e.get(),C=S||[],E=n(m,f).get(),L=[],z=-1,O=C.length;for(x=0;x<T.length;x++)if(w=r[_=T[x]],k=Object.keys(w),M=w[\\\"\\\"],A=c(M),_<0||_>C.length-(A?0:1))o.warn(\\\"index out of range\\\",f,_);else if(void 0!==M)k.length>1&&o.warn(\\\"Insertion & removal are incompatible with edits to the same index.\\\",f,_),u(M)?L.push(_):A?(\\\"add\\\"===M&&(M={}),C.splice(_,0,M),E&&E.splice(_,0,{})):o.warn(\\\"Unrecognized full object edit value\\\",f,_,M),-1===z&&(z=_);else for(b=0;b<k.length;b++)n(C[_],k[b]).set(w[k[b]]);for(x=L.length-1;x>=0;x--)C.splice(L[x],1),E&&E.splice(L[x],1);if(C.length?S||e.set(C):e.set(null),g)return!1;if(h(v,m),d!==a){var I;if(-1===z)I=T;else{for(O=Math.max(C.length,O),I=[],x=0;x<T.length&&!((_=T[x])>=z);x++)I.push(_);for(x=z;x<O;x++)I.push(x)}for(x=0;x<I.length;x++)d(t,I[x])}else p(t);return!0}},{\\\"../lib/is_plain_object\\\":698,\\\"../lib/loggers\\\":701,\\\"../lib/nested_property\\\":705,\\\"../lib/noop\\\":706,\\\"../lib/search\\\":716,\\\"../registry\\\":828,\\\"./container_array_match\\\":727}],732:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"has-hover\\\"),o=t(\\\"../lib\\\"),s=t(\\\"../lib/events\\\"),l=t(\\\"../lib/queue\\\"),c=t(\\\"../registry\\\"),u=t(\\\"./plot_schema\\\"),f=t(\\\"../plots/plots\\\"),h=t(\\\"../plots/polar/legacy\\\"),p=t(\\\"../plots/cartesian/axes\\\"),d=t(\\\"../components/drawing\\\"),g=t(\\\"../components/color\\\"),v=t(\\\"../components/colorbar/connect\\\"),m=t(\\\"../plots/cartesian/graph_interact\\\").initInteractions,y=t(\\\"../constants/xmlns_namespaces\\\"),x=t(\\\"../lib/svg_text_utils\\\"),b=t(\\\"./plot_config\\\"),_=t(\\\"./manage_arrays\\\"),w=t(\\\"./helpers\\\"),k=t(\\\"./subroutines\\\"),M=t(\\\"./edit_types\\\"),A=t(\\\"../plots/cartesian/constants\\\").AX_NAME_PATTERN,T=0;function S(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit(\\\"plotly_afterplot\\\")}function C(t,e){try{t._fullLayout._paper.style(\\\"background\\\",e)}catch(t){o.error(t)}}function E(t,e){C(t,g.combine(e,\\\"white\\\"))}function L(t,e){t._context||(t._context=o.extendDeep({},b));var r,n,i,s=t._context;if(e){for(n=Object.keys(e),r=0;r<n.length;r++)\\\"editable\\\"!==(i=n[r])&&\\\"edits\\\"!==i&&i in s&&(\\\"setBackground\\\"===i&&\\\"opaque\\\"===e[i]?s[i]=E:s[i]=e[i]);e.plot3dPixelRatio&&!s.plotGlPixelRatio&&(s.plotGlPixelRatio=s.plot3dPixelRatio);var l=e.editable;if(void 0!==l)for(s.editable=l,n=Object.keys(s.edits),r=0;r<n.length;r++)s.edits[n[r]]=l;if(e.edits)for(n=Object.keys(e.edits),r=0;r<n.length;r++)(i=n[r])in s.edits&&(s.edits[i]=e.edits[i])}s.staticPlot&&(s.editable=!1,s.edits={},s.autosizable=!1,s.scrollZoom=!1,s.doubleClick=!1,s.showTips=!1,s.showLink=!1,s.displayModeBar=!1),\\\"hover\\\"!==s.displayModeBar||a||(s.displayModeBar=!0),\\\"transparent\\\"!==s.setBackground&&\\\"function\\\"==typeof s.setBackground||(s.setBackground=C),s._hasZeroHeight=s._hasZeroHeight||0===t.clientHeight,s._hasZeroWidth=s._hasZeroWidth||0===t.clientWidth}function z(t,e){var r,n,i=e+1,a=[];for(r=0;r<t.length;r++)(n=t[r])<0?a.push(i+n):a.push(n);return a}function O(t,e,r){var n,i;for(n=0;n<e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error(\\\"all values in \\\"+r+\\\" must be integers\\\");if(i>=t.data.length||i<-t.data.length)throw new Error(r+\\\" must be valid indices for gd.data.\\\");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error(\\\"each index in \\\"+r+\\\" must be unique.\\\")}}function I(t,e,r){if(!Array.isArray(t.data))throw new Error(\\\"gd.data must be an array.\\\");if(\\\"undefined\\\"==typeof e)throw new Error(\\\"currentIndices is a required argument.\\\");if(Array.isArray(e)||(e=[e]),O(t,e,\\\"currentIndices\\\"),\\\"undefined\\\"==typeof r||Array.isArray(r)||(r=[r]),\\\"undefined\\\"!=typeof r&&O(t,r,\\\"newIndices\\\"),\\\"undefined\\\"!=typeof r&&e.length!==r.length)throw new Error(\\\"current and new indices must be of equal length.\\\")}function P(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error(\\\"gd.data must be an array\\\");if(!o.isPlainObject(e))throw new Error(\\\"update must be a key:value object\\\");if(\\\"undefined\\\"==typeof r)throw new Error(\\\"indices must be an integer or array of integers\\\");for(var a in O(t,r,\\\"indices\\\"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error(\\\"attribute \\\"+a+\\\" must be an array of length equal to indices array length\\\");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error(\\\"when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object\\\")}}(t,e,r,n);for(var s=function(t,e,r,n){var a,s,l,c,u,f=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=z(r,t.data.length-1),e)for(var d=0;d<r.length;d++){if(a=t.data[r[d]],s=(l=o.nestedProperty(a,p)).get(),c=e[p][d],!o.isArrayOrTypedArray(c))throw new Error(\\\"attribute: \\\"+p+\\\" index: \\\"+d+\\\" must be an array\\\");if(!o.isArrayOrTypedArray(s))throw new Error(\\\"cannot extend missing or non-array attribute: \\\"+p);if(s.constructor!==c.constructor)throw new Error(\\\"cannot extend array with an array of a different type: \\\"+p);u=f?n[p][d]:n,i(u)||(u=-1),h.push({prop:l,target:s,insert:c,maxp:Math.floor(u)})}return h}(t,e,r,n),l={},c={},u=0;u<s.length;u++){var f=s[u].prop,h=s[u].maxp,p=a(s[u].target,s[u].insert,h);f.set(p[0]),Array.isArray(l[f.astr])||(l[f.astr]=[]),l[f.astr].push(p[1]),Array.isArray(c[f.astr])||(c[f.astr]=[]),c[f.astr].push(s[u].target.length)}return{update:l,maxPoints:c}}function D(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}function R(t){return void 0===t?null:t}function B(t,e,r){var n,i,a=t._fullLayout,s=t._fullData,l=t.data,h=M.traceFlags(),d={},g={};function v(){return r.map(function(){})}function m(t){var e=p.id2name(t);-1===i.indexOf(e)&&i.push(e)}function y(t){return\\\"LAYOUT\\\"+t+\\\".autorange\\\"}function x(t){return\\\"LAYOUT\\\"+t+\\\".range\\\"}function b(n,i,a){var s;Array.isArray(n)?n.forEach(function(t){b(t,i,a)}):n in e||w.hasParent(e,n)||(s=\\\"LAYOUT\\\"===n.substr(0,6)?o.nestedProperty(t.layout,n.replace(\\\"LAYOUT\\\",\\\"\\\")):o.nestedProperty(l[r[a]],n),n in g||(g[n]=v()),void 0===g[n][a]&&(g[n][a]=R(s.get())),void 0!==i&&s.set(i))}function _(t){return function(e){return s[e][t]}}function k(t){return function(e,n){return!1===e?s[r[n]][t]:null}}for(var A in e){if(w.hasParent(e,A))throw new Error(\\\"cannot set \\\"+A+\\\"and a parent attribute simultaneously\\\");var T,S,C,E,L,z,O=e[A];if(\\\"autobinx\\\"!==A&&\\\"autobiny\\\"!==A||(A=A.charAt(A.length-1)+\\\"bins\\\",O=Array.isArray(O)?O.map(k(A)):!1===O?r.map(_(A)):null),d[A]=O,\\\"LAYOUT\\\"!==A.substr(0,6)){for(g[A]=v(),n=0;n<r.length;n++)if(T=l[r[n]],S=s[r[n]],E=(C=o.nestedProperty(T,A)).get(),void 0!==(L=Array.isArray(O)?O[n%O.length]:O)){var I=C.parts[C.parts.length-1],P=A.substr(0,A.length-I.length-1),D=P?P+\\\".\\\":\\\"\\\",B=P?o.nestedProperty(S,P).get():S;if((z=u.getTraceValObject(S,C.parts))&&z.impliedEdits&&null!==L)for(var F in z.impliedEdits)b(o.relativeAttr(A,F),z.impliedEdits[F],n);else if(\\\"thicknessmode\\\"!==I&&\\\"lenmode\\\"!==I||E===L||\\\"fraction\\\"!==L&&\\\"pixels\\\"!==L||!B){if(\\\"type\\\"===A&&\\\"pie\\\"===L!=(\\\"pie\\\"===E)){var N=\\\"x\\\",j=\\\"y\\\";\\\"bar\\\"!==L&&\\\"bar\\\"!==E||\\\"h\\\"!==T.orientation||(N=\\\"y\\\",j=\\\"x\\\"),o.swapAttrs(T,[\\\"?\\\",\\\"?src\\\"],\\\"labels\\\",N),o.swapAttrs(T,[\\\"d?\\\",\\\"?0\\\"],\\\"label\\\",N),o.swapAttrs(T,[\\\"?\\\",\\\"?src\\\"],\\\"values\\\",j),\\\"pie\\\"===E?(o.nestedProperty(T,\\\"marker.color\\\").set(o.nestedProperty(T,\\\"marker.colors\\\").get()),a._pielayer.selectAll(\\\"g.trace\\\").remove()):c.traceIs(T,\\\"cartesian\\\")&&o.nestedProperty(T,\\\"marker.colors\\\").set(o.nestedProperty(T,\\\"marker.color\\\").get())}}else{var V=a._size,U=B.orient,q=\\\"top\\\"===U||\\\"bottom\\\"===U;if(\\\"thicknessmode\\\"===I){var H=q?V.h:V.w;b(D+\\\"thickness\\\",B.thickness*(\\\"fraction\\\"===L?1/H:H),n)}else{var G=q?V.w:V.h;b(D+\\\"len\\\",B.len*(\\\"fraction\\\"===L?1/G:G),n)}}g[A][n]=R(E);if(-1!==[\\\"swapxy\\\",\\\"swapxyaxes\\\",\\\"orientation\\\",\\\"orientationaxes\\\"].indexOf(A)){if(\\\"orientation\\\"===A){C.set(L);var W=T.x&&!T.y?\\\"h\\\":\\\"v\\\";if((C.get()||W)===S.orientation)continue}else\\\"orientationaxes\\\"===A&&(T.orientation={v:\\\"h\\\",h:\\\"v\\\"}[S.orientation]);w.swapXYData(T),h.calc=h.clearAxisTypes=!0}else-1!==f.dataArrayContainers.indexOf(C.parts[0])?(w.manageArrayContainers(C,L,g),h.calc=!0):(z?z.arrayOk&&!c.traceIs(S,\\\"regl\\\")&&(o.isArrayOrTypedArray(L)||o.isArrayOrTypedArray(E))?h.calc=!0:M.update(h,z):h.calc=!0,C.set(L))}if(-1!==[\\\"swapxyaxes\\\",\\\"orientationaxes\\\"].indexOf(A)&&p.swap(t,r),\\\"orientationaxes\\\"===A){var Y=o.nestedProperty(t.layout,\\\"hovermode\\\");\\\"x\\\"===Y.get()?Y.set(\\\"y\\\"):\\\"y\\\"===Y.get()&&Y.set(\\\"x\\\")}if(-1!==[\\\"orientation\\\",\\\"type\\\"].indexOf(A)){for(i=[],n=0;n<r.length;n++){var X=l[r[n]];c.traceIs(X,\\\"cartesian\\\")&&(m(X.xaxis||\\\"x\\\"),m(X.yaxis||\\\"y\\\"))}b(i.map(y),!0,0),b(i.map(x),[0,1],0)}}else C=o.nestedProperty(t.layout,A.replace(\\\"LAYOUT\\\",\\\"\\\")),g[A]=[R(C.get())],C.set(Array.isArray(O)?O[0]:O),h.calc=!0}return(h.calc||h.plot)&&(h.fullReplot=!0),{flags:h,undoit:g,redoit:d,traces:r,eventData:o.extendDeepNoArrays([],[d,r])}}function F(t,e,r){var n;if(!e.axrange)return!1;for(n in e)if(\\\"axrange\\\"!==n&&e[n])return!1;for(n in r.rangesAltered){var i=p.id2name(n),a=t.layout[i],o=t._fullLayout[i];o.autorange=a.autorange,o.range=a.range.slice(),o.cleanRange()}return!0}function N(t,e){var r=e?function(t){return p.doTicks(t,Object.keys(e),!0)}:function(t){return p.doTicks(t,\\\"redraw\\\")};t.push(k.doAutoRangeAndConstraints,r,k.drawData,k.finalDraw)}r.plot=function(t,e,i,a){var l;if(t=o.getGraphDiv(t),s.init(t),o.isPlainObject(e)){var u=e;e=u.data,i=u.layout,a=u.config,l=u.frames}if(!1===s.triggerHandler(t,\\\"plotly_beforeplot\\\",[e,i,a]))return Promise.reject();e||i||o.isPlotDiv(t)||o.warn(\\\"Calling Plotly.plot as if redrawing but this container doesn't yet have a plot.\\\",t),L(t,a),i||(i={}),n.select(t).classed(\\\"js-plotly-plot\\\",!0),d.makeTester(),delete d.baseUrl,Array.isArray(t._promises)||(t._promises=[]);var g=0===(t.data||[]).length&&Array.isArray(e);if(Array.isArray(e)&&(w.cleanData(e),g?t.data=e:t.data.push.apply(t.data,e),t.empty=!1),t.layout&&!g||(t.layout=w.cleanLayout(i)),t._dragging&&!t._transitioning)return t._replotPending=!0,Promise.reject();t._replotPending=!1,f.supplyDefaults(t);var y=t._fullLayout,b=y._has(\\\"cartesian\\\");if(!y._has(\\\"polar\\\")&&e&&e[0]&&e[0].r)return o.log(\\\"Legacy polar charts are deprecated!\\\"),function(t,e,r){var i=n.select(t).selectAll(\\\".plot-container\\\").data([0]);i.enter().insert(\\\"div\\\",\\\":first-child\\\").classed(\\\"plot-container plotly\\\",!0);var a=i.selectAll(\\\".svg-container\\\").data([0]);a.enter().append(\\\"div\\\").classed(\\\"svg-container\\\",!0).style(\\\"position\\\",\\\"relative\\\"),a.html(\\\"\\\"),e&&(t.data=e);r&&(t.layout=r);h.manager.fillLayout(t),a.style({width:t._fullLayout.width+\\\"px\\\",height:t._fullLayout.height+\\\"px\\\"}),t.framework=h.manager.framework(t),t.framework({data:t.data,layout:t.layout},a.node()),t.framework.setUndoPoint();var s=t.framework.svg(),l=1,c=t._fullLayout.title;\\\"\\\"!==c&&c||(l=0);var u=function(){this.call(x.convertToTspans,t)},p=s.select(\\\".title-group text\\\").call(u);if(t._context.edits.titleText){var d=o._(t,\\\"Click to enter Plot title\\\");c&&c!==d||(l=.2,p.attr({\\\"data-unformatted\\\":d}).text(d).style({opacity:l}).on(\\\"mouseover.opacity\\\",function(){n.select(this).transition().duration(100).style(\\\"opacity\\\",1)}).on(\\\"mouseout.opacity\\\",function(){n.select(this).transition().duration(1e3).style(\\\"opacity\\\",0)}));var g=function(){this.call(x.makeEditable,{gd:t}).on(\\\"edit\\\",function(e){t.framework({layout:{title:e}}),this.text(e).call(u),this.call(g)}).on(\\\"cancel\\\",function(){var t=this.attr(\\\"data-unformatted\\\");this.text(t).call(u)})};p.call(g)}return t._context.setBackground(t,t._fullLayout.paper_bgcolor),f.addLinks(t),Promise.resolve()}(t,e,i);y._replotting=!0,g&&W(t),t.framework!==W&&(t.framework=W,W(t)),d.initGradients(t),g&&p.saveShowSpikeInitial(t);var _=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;_&&f.doCalcdata(t);for(var M=0;M<t.calcdata.length;M++)t.calcdata[M][0].trace=t._fullData[M];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){f.resize(t)},window.addEventListener(\\\"resize\\\",t._responsiveChartHandler)):o.clearResponsive(t);var A=JSON.stringify(y._size),T=0;function C(){var e,r,n,i=t.calcdata;for(f.clearAutoMarginIds(t),k.drawMarginPushers(t),p.allowAutoMargin(t),e=0;e<i.length;e++){var a=(n=(r=i[e])[0].trace)._module.colorbar;!0===n.visible&&a?v(t,r,a):f.autoMargin(t,\\\"cb\\\"+n.uid)}return f.doAutoMargin(t),f.previousPromises(t)}function E(){t._transitioning||(k.doAutoRangeAndConstraints(t),g&&p.saveRangeInitial(t))}var z=[f.previousPromises,function(){if(l)return r.addFrames(t,l)},function e(){for(var r=y._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(t);if(!y._glcanvas&&y._has(\\\"gl\\\")&&(y._glcanvas=y._glcontainer.selectAll(\\\".gl-canvas\\\").data([{key:\\\"contextLayer\\\",context:!0,pick:!1},{key:\\\"focusLayer\\\",context:!1,pick:!1},{key:\\\"pickLayer\\\",context:!1,pick:!0}],function(t){return t.key}),y._glcanvas.enter().append(\\\"canvas\\\").attr(\\\"class\\\",function(t){return\\\"gl-canvas gl-canvas-\\\"+t.key.replace(\\\"Layer\\\",\\\"\\\")}).style({position:\\\"absolute\\\",top:0,left:0,width:\\\"100%\\\",height:\\\"100%\\\",overflow:\\\"visible\\\",\\\"pointer-events\\\":\\\"none\\\"})),y._glcanvas){y._glcanvas.attr(\\\"width\\\",y.width).attr(\\\"height\\\",y.height);var i=y._glcanvas.data()[0].regl;if(i&&(Math.floor(y.width)!==i._gl.drawingBufferWidth||Math.floor(y.height)!==i._gl.drawingBufferHeight)){var a=\\\"WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.\\\";if(!T)return o.log(a+\\\" Clearing graph and plotting again.\\\"),f.cleanPlot([],{},t._fullData,y),f.supplyDefaults(t),y=t._fullLayout,f.doCalcdata(t),T++,e();o.error(a)}}return f.previousPromises(t)},C,function(){if(JSON.stringify(y._size)!==A)return o.syncOrAsync([C,k.layoutStyles],t)}];b&&z.push(function(){if(_)return o.syncOrAsync([c.getComponentMethod(\\\"shapes\\\",\\\"calcAutorange\\\"),c.getComponentMethod(\\\"annotations\\\",\\\"calcAutorange\\\"),E,c.getComponentMethod(\\\"rangeslider\\\",\\\"calcAutorange\\\")],t);E()}),z.push(k.layoutStyles),b&&z.push(function(){return p.doTicks(t,g?\\\"\\\":\\\"redraw\\\")}),z.push(k.drawData,k.finalDraw,m,f.addLinks,f.rehover,f.doAutoMargin,f.previousPromises);var O=o.syncOrAsync(z,t);return O&&O.then||(O=Promise.resolve()),O.then(function(){return S(t),t})},r.setPlotConfig=function(t){return o.extendFlat(b,t)},r.redraw=function(t){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(\\\"This element is not a Plotly plot: \\\"+t);return w.cleanData(t.data),w.cleanLayout(t.layout),t.calcdata=void 0,r.plot(t).then(function(){return t.emit(\\\"plotly_redraw\\\"),t})},r.newPlot=function(t,e,n,i){return t=o.getGraphDiv(t),f.cleanPlot([],{},t._fullData||[],t._fullLayout||{}),f.purge(t),r.plot(t,e,n,i)},r.extendTraces=function t(e,n,i,a){var s=P(e=o.getGraphDiv(e),n,i,a,function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<0){var a=new t.constructor(0),s=D(t,e);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(l)),i.set(t),i.set(e.subarray(0,l),t.length)}else{var c=r-e.length,u=t.length-c;n.set(t.subarray(u)),n.set(e,c),i.set(t.subarray(0,u))}else n=t.concat(e),i=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,i]}),c=r.redraw(e),u=[e,s.update,i,s.maxPoints];return l.add(e,r.prependTraces,u,t,arguments),c},r.prependTraces=function t(e,n,i,a){var s=P(e=o.getGraphDiv(e),n,i,a,function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<=0){var a=new t.constructor(0),s=D(e,t);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(0,l)),i.set(e.subarray(l)),i.set(t,l)}else{var c=r-e.length;n.set(e),n.set(t.subarray(0,c),e.length),i.set(t.subarray(c))}else n=e.concat(t),i=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,i]}),c=r.redraw(e),u=[e,s.update,i,s.maxPoints];return l.add(e,r.extendTraces,u,t,arguments),c},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,c=[],u=r.deleteTraces,f=t,h=[e,c],p=[e,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error(\\\"gd.data must be an array.\\\");if(\\\"undefined\\\"==typeof e)throw new Error(\\\"traces must be defined.\\\");for(Array.isArray(e)||(e=[e]),n=0;n<e.length;n++)if(\\\"object\\\"!=typeof(i=e[n])||Array.isArray(i)||null===i)throw new Error(\\\"all values in traces array must be non-array objects\\\");if(\\\"undefined\\\"==typeof r||Array.isArray(r)||(r=[r]),\\\"undefined\\\"!=typeof r&&r.length!==e.length)throw new Error(\\\"if indices is specified, traces.length must equal indices.length\\\")}(e,n,i),Array.isArray(n)||(n=[n]),n=n.map(function(t){return o.extendFlat({},t)}),w.cleanData(n),a=0;a<n.length;a++)e.data.push(n[a]);for(a=0;a<n.length;a++)c.push(-n.length+a);if(\\\"undefined\\\"==typeof i)return s=r.redraw(e),l.add(e,u,h,f,p),s;Array.isArray(i)||(i=[i]);try{I(e,c,i)}catch(t){throw e.data.splice(e.data.length-n.length,n.length),t}return l.startSequence(e),l.add(e,u,h,f,p),s=r.moveTraces(e,c,i),l.stopSequence(e),s},r.deleteTraces=function t(e,n){e=o.getGraphDiv(e);var i,a,s=[],c=r.addTraces,u=t,f=[e,s,n],h=[e,n];if(\\\"undefined\\\"==typeof n)throw new Error(\\\"indices must be an integer or array of integers.\\\");for(Array.isArray(n)||(n=[n]),O(e,n,\\\"indices\\\"),(n=z(n,e.data.length-1)).sort(o.sorterDes),i=0;i<n.length;i+=1)a=e.data.splice(n[i],1)[0],s.push(a);var p=r.redraw(e);return l.add(e,c,f,u,h),p},r.moveTraces=function t(e,n,i){var a,s=[],c=[],u=t,f=t,h=[e=o.getGraphDiv(e),i,n],p=[e,n,i];if(I(e,n,i),n=Array.isArray(n)?n:[n],\\\"undefined\\\"==typeof i)for(i=[],a=0;a<n.length;a++)i.push(-n.length+a);for(i=Array.isArray(i)?i:[i],n=z(n,e.data.length-1),i=z(i,e.data.length-1),a=0;a<e.data.length;a++)-1===n.indexOf(a)&&s.push(e.data[a]);for(a=0;a<n.length;a++)c.push({newIndex:i[a],trace:e.data[n[a]]});for(c.sort(function(t,e){return t.newIndex-e.newIndex}),a=0;a<c.length;a+=1)s.splice(c[a].newIndex,0,c[a].trace);e.data=s;var d=r.redraw(e);return l.add(e,u,h,f,p),d},r.restyle=function t(e,n,i,a){e=o.getGraphDiv(e),w.clearPromiseQueue(e);var s={};if(\\\"string\\\"==typeof n)s[n]=i;else{if(!o.isPlainObject(n))return o.warn(\\\"Restyle fail.\\\",n,i,a),Promise.reject();s=o.extendFlat({},n),void 0===a&&(a=i)}Object.keys(s).length&&(e.changed=!0);var c=w.coerceTraceIndices(e,a),u=B(e,s,c),h=u.flags;h.calc&&(e.calcdata=void 0),h.clearAxisTypes&&w.clearAxisTypes(e,c,{});var p=[];h.fullReplot?p.push(r.plot):(p.push(f.previousPromises),f.supplyDefaults(e),h.markerSize&&(f.doCalcdata(e),N(p)),h.style&&p.push(k.doTraceStyle),h.colorbars&&p.push(k.doColorBars),p.push(S)),p.push(f.rehover),l.add(e,t,[e,u.undoit,u.traces],t,[e,u.redoit,u.traces]);var d=o.syncOrAsync(p,e);return d&&d.then||(d=Promise.resolve()),d.then(function(){return e.emit(\\\"plotly_restyle\\\",u.eventData),e})},r.relayout=function t(e,r,n){if(e=o.getGraphDiv(e),w.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);var i={};if(\\\"string\\\"==typeof r)i[r]=n;else{if(!o.isPlainObject(r))return o.warn(\\\"Relayout fail.\\\",r,n),Promise.reject();i=o.extendFlat({},r)}Object.keys(i).length&&(e.changed=!0);var a=q(e,i),s=a.flags;s.calc&&(e.calcdata=void 0);var c=[f.previousPromises];s.layoutReplot?c.push(k.layoutReplot):Object.keys(i).length&&(F(e,s,a)||f.supplyDefaults(e),s.legend&&c.push(k.doLegend),s.layoutstyle&&c.push(k.layoutStyles),s.axrange&&N(c,a.rangesAltered),s.ticks&&c.push(k.doTicksRelayout),s.modebar&&c.push(k.doModeBar),s.camera&&c.push(k.doCamera),c.push(S)),c.push(f.rehover),l.add(e,t,[e,a.undoit],t,[e,a.redoit]);var u=o.syncOrAsync(c,e);return u&&u.then||(u=Promise.resolve(e)),u.then(function(){return e.emit(\\\"plotly_relayout\\\",a.eventData),e})};var j=/^[xyz]axis[0-9]*\\\\.range(\\\\[[0|1]\\\\])?$/,V=/^[xyz]axis[0-9]*\\\\.autorange$/,U=/^[xyz]axis[0-9]*\\\\.domain(\\\\[[0|1]\\\\])?$/;function q(t,e){var r,n,i,a=t.layout,s=t._fullLayout,l=Object.keys(e),f=p.list(t),h={};for(n=0;n<l.length;n++)if(0===l[n].indexOf(\\\"allaxes\\\")){for(i=0;i<f.length;i++){var d=f[i]._id.substr(1),g=-1!==d.indexOf(\\\"scene\\\")?d+\\\".\\\":\\\"\\\",v=l[n].replace(\\\"allaxes\\\",g+f[i]._name);e[v]||(e[v]=e[l[n]])}delete e[l[n]]}var m=M.layoutFlags(),y={},x={};function b(t,r){if(Array.isArray(t))t.forEach(function(t){b(t,r)});else if(!(t in e||w.hasParent(e,t))){var n=o.nestedProperty(a,t);t in x||(x[t]=R(n.get())),void 0!==r&&n.set(r)}}var k,T={};function S(t){var e=p.name2id(t.split(\\\".\\\")[0]);return T[e]=1,e}for(var C in e){if(w.hasParent(e,C))throw new Error(\\\"cannot set \\\"+C+\\\"and a parent attribute simultaneously\\\");for(var E=o.nestedProperty(a,C),L=e[C],z=E.parts.length-1;z>0&&\\\"string\\\"!=typeof E.parts[z];)z--;var O=E.parts[z],I=E.parts[z-1]+\\\".\\\"+O,P=E.parts.slice(0,z).join(\\\".\\\"),D=o.nestedProperty(t.layout,P).get(),B=o.nestedProperty(s,P).get(),F=E.get();if(void 0!==L){y[C]=L,x[C]=\\\"reverse\\\"===O?L:R(F);var N=u.getLayoutValObject(s,E.parts);if(N&&N.impliedEdits&&null!==L)for(var q in N.impliedEdits)b(o.relativeAttr(C,q),N.impliedEdits[q]);if(-1!==[\\\"width\\\",\\\"height\\\"].indexOf(C))if(L){b(\\\"autosize\\\",null);var G=\\\"height\\\"===C?\\\"width\\\":\\\"height\\\";b(G,s[G])}else s[C]=t._initialAutoSize[C];else if(\\\"autosize\\\"===C)b(\\\"width\\\",L?null:s.width),b(\\\"height\\\",L?null:s.height);else if(I.match(j))S(I),o.nestedProperty(s,P+\\\"._inputRange\\\").set(null);else if(I.match(V)){S(I),o.nestedProperty(s,P+\\\"._inputRange\\\").set(null);var W=o.nestedProperty(s,P).get();W._inputDomain&&(W._input.domain=W._inputDomain.slice())}else I.match(U)&&o.nestedProperty(s,P+\\\"._inputDomain\\\").set(null);if(\\\"type\\\"===O){var Y=D,X=\\\"linear\\\"===B.type&&\\\"log\\\"===L,Z=\\\"log\\\"===B.type&&\\\"linear\\\"===L;if(X||Z){if(Y&&Y.range)if(B.autorange)X&&(Y.range=Y.range[1]>Y.range[0]?[1,2]:[2,1]);else{var $=Y.range[0],J=Y.range[1];X?($<=0&&J<=0&&b(P+\\\".autorange\\\",!0),$<=0?$=J/1e6:J<=0&&(J=$/1e6),b(P+\\\".range[0]\\\",Math.log($)/Math.LN10),b(P+\\\".range[1]\\\",Math.log(J)/Math.LN10)):(b(P+\\\".range[0]\\\",Math.pow(10,$)),b(P+\\\".range[1]\\\",Math.pow(10,J)))}else b(P+\\\".autorange\\\",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[E.parts[0]]&&\\\"radialaxis\\\"===E.parts[1]&&delete s[E.parts[0]]._subplot.viewInitial[\\\"radialaxis.range\\\"],c.getComponentMethod(\\\"annotations\\\",\\\"convertCoords\\\")(t,B,L,b),c.getComponentMethod(\\\"images\\\",\\\"convertCoords\\\")(t,B,L,b)}else b(P+\\\".autorange\\\",!0),b(P+\\\".range\\\",null);o.nestedProperty(s,P+\\\"._inputRange\\\").set(null)}else if(O.match(A)){var K=o.nestedProperty(s,C).get(),Q=(L||{}).type;Q&&\\\"-\\\"!==Q||(Q=\\\"linear\\\"),c.getComponentMethod(\\\"annotations\\\",\\\"convertCoords\\\")(t,K,Q,b),c.getComponentMethod(\\\"images\\\",\\\"convertCoords\\\")(t,K,Q,b)}var tt=_.containerArrayMatch(C);if(tt){r=tt.array,n=tt.index;var et=tt.property,rt=(o.nestedProperty(a,r)||[])[n]||{},nt=N||{editType:\\\"calc\\\"};\\\"\\\"!==n&&\\\"\\\"===et&&(_.isAddVal(L)?x[C]=null:_.isRemoveVal(L)?x[C]=rt:o.warn(\\\"unrecognized full object value\\\",e)),M.update(m,nt),h[r]||(h[r]={});var it=h[r][n];it||(it=h[r][n]={}),it[et]=L,delete e[C]}else\\\"reverse\\\"===O?(D.range?D.range.reverse():(b(P+\\\".autorange\\\",!0),D.range=[1,0]),B.autorange?m.calc=!0:m.plot=!0):(s._has(\\\"scatter-like\\\")&&s._has(\\\"regl\\\")&&\\\"dragmode\\\"===C&&(\\\"lasso\\\"===L||\\\"select\\\"===L)&&\\\"lasso\\\"!==F&&\\\"select\\\"!==F?m.plot=!0:N?M.update(m,N):m.calc=!0,E.set(L))}}for(r in h){_.applyContainerArrayChanges(t,o.nestedProperty(a,r),h[r],m)||(m.plot=!0)}var at=s._axisConstraintGroups||[];for(k in T)for(n=0;n<at.length;n++){var ot=at[n];if(ot[k])for(var st in m.calc=!0,ot)T[st]||(p.getFromId(t,st)._constraintShrinkable=!0)}return(H(t)||e.height||e.width)&&(m.plot=!0),(m.plot||m.calc)&&(m.layoutReplot=!0),{flags:m,rangesAltered:T,undoit:x,redoit:y,eventData:o.extendDeep({},y)}}function H(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&f.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function G(t,e,r,n){var i,a,s=n.getValObject,l=n.flags,c=n.immutable,u=n.inArray,f=n.arrayIndex;function h(){var t=i.editType;u&&-1!==t.indexOf(\\\"arraydraw\\\")?o.pushUnique(l.arrays[u],f):M.update(l,i)}function p(t){return\\\"data_array\\\"===t.valType||t.arrayOk}for(a in t){if(l.calc)return;var d=t[a],g=e[a];if(\\\"_\\\"!==a.charAt(0)&&\\\"function\\\"!=typeof d&&d!==g){if((\\\"tick0\\\"===a||\\\"dtick\\\"===a)&&\\\"geo\\\"!==r[0]){var v=e.tickmode;if(\\\"auto\\\"===v||\\\"array\\\"===v||!v)continue}if((\\\"range\\\"!==a||!e.autorange)&&(\\\"zmin\\\"!==a&&\\\"zmax\\\"!==a||\\\"contourcarpet\\\"!==e.type)){var m=r.concat(a);if((i=s(m))&&(!i._compareAsJSON||JSON.stringify(d)!==JSON.stringify(g))){var y,x=i.valType,b=p(i),_=Array.isArray(d),w=Array.isArray(g);if(_&&w){var k=\\\"_input_\\\"+a,A=t[k],T=e[k];if(Array.isArray(A)&&A===T)continue}if(void 0===g)b&&_?l.calc=!0:h();else if(i._isLinkedToArray){var S=[],C=!1;u||(l.arrays[a]=S);var E=Math.min(d.length,g.length),L=Math.max(d.length,g.length);if(E!==L){if(\\\"arraydraw\\\"!==i.editType){h();continue}C=!0}for(y=0;y<E;y++)G(d[y],g[y],m.concat(y),o.extendFlat({inArray:a,arrayIndex:y},n));if(C)for(y=E;y<L;y++)S.push(y)}else!x&&o.isPlainObject(d)?G(d,g,m,n):b?_&&w?c&&(l.calc=!0):_!==w?l.calc=!0:h():_&&w&&d.length===g.length&&String(d)===String(g)||h()}}}}for(a in e)if(!(a in t||\\\"_\\\"===a.charAt(0)||\\\"function\\\"==typeof e[a])){if(p(i=s(r.concat(a)))&&Array.isArray(e[a]))return void(l.calc=!0);h()}}function W(t){var e=n.select(t),r=t._fullLayout;if(r._container=e.selectAll(\\\".plot-container\\\").data([0]),r._container.enter().insert(\\\"div\\\",\\\":first-child\\\").classed(\\\"plot-container\\\",!0).classed(\\\"plotly\\\",!0),r._paperdiv=r._container.selectAll(\\\".svg-container\\\").data([0]),r._paperdiv.enter().append(\\\"div\\\").classed(\\\"svg-container\\\",!0).style(\\\"position\\\",\\\"relative\\\"),r._glcontainer=r._paperdiv.selectAll(\\\".gl-container\\\").data([{}]),r._glcontainer.enter().append(\\\"div\\\").classed(\\\"gl-container\\\",!0),r._paperdiv.selectAll(\\\".main-svg\\\").remove(),r._paper=r._paperdiv.insert(\\\"svg\\\",\\\":first-child\\\").classed(\\\"main-svg\\\",!0),r._toppaper=r._paperdiv.append(\\\"svg\\\").classed(\\\"main-svg\\\",!0),!r._uid){var i={};n.selectAll(\\\"defs\\\").each(function(){this.id&&(i[this.id.split(\\\"-\\\")[1]]=1)}),r._uid=o.randstr(i)}r._paperdiv.selectAll(\\\".main-svg\\\").attr(y.svgAttrs),r._defs=r._paper.append(\\\"defs\\\").attr(\\\"id\\\",\\\"defs-\\\"+r._uid),r._clips=r._defs.append(\\\"g\\\").classed(\\\"clips\\\",!0),r._topdefs=r._toppaper.append(\\\"defs\\\").attr(\\\"id\\\",\\\"topdefs-\\\"+r._uid),r._topclips=r._topdefs.append(\\\"g\\\").classed(\\\"clips\\\",!0),r._bgLayer=r._paper.append(\\\"g\\\").classed(\\\"bglayer\\\",!0),r._draggers=r._paper.append(\\\"g\\\").classed(\\\"draglayer\\\",!0);var a=r._paper.append(\\\"g\\\").classed(\\\"layer-below\\\",!0);r._imageLowerLayer=a.append(\\\"g\\\").classed(\\\"imagelayer\\\",!0),r._shapeLowerLayer=a.append(\\\"g\\\").classed(\\\"shapelayer\\\",!0),r._cartesianlayer=r._paper.append(\\\"g\\\").classed(\\\"cartesianlayer\\\",!0),r._polarlayer=r._paper.append(\\\"g\\\").classed(\\\"polarlayer\\\",!0),r._ternarylayer=r._paper.append(\\\"g\\\").classed(\\\"ternarylayer\\\",!0),r._geolayer=r._paper.append(\\\"g\\\").classed(\\\"geolayer\\\",!0),r._pielayer=r._paper.append(\\\"g\\\").classed(\\\"pielayer\\\",!0),r._glimages=r._paper.append(\\\"g\\\").classed(\\\"glimages\\\",!0);var s=r._toppaper.append(\\\"g\\\").classed(\\\"layer-above\\\",!0);r._imageUpperLayer=s.append(\\\"g\\\").classed(\\\"imagelayer\\\",!0),r._shapeUpperLayer=s.append(\\\"g\\\").classed(\\\"shapelayer\\\",!0),r._infolayer=r._toppaper.append(\\\"g\\\").classed(\\\"infolayer\\\",!0),r._menulayer=r._toppaper.append(\\\"g\\\").classed(\\\"menulayer\\\",!0),r._zoomlayer=r._toppaper.append(\\\"g\\\").classed(\\\"zoomlayer\\\",!0),r._hoverlayer=r._toppaper.append(\\\"g\\\").classed(\\\"hoverlayer\\\",!0),t.emit(\\\"plotly_framework\\\")}r.update=function t(e,n,i,a){if(e=o.getGraphDiv(e),w.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);o.isPlainObject(n)||(n={}),o.isPlainObject(i)||(i={}),Object.keys(n).length&&(e.changed=!0),Object.keys(i).length&&(e.changed=!0);var s=w.coerceTraceIndices(e,a),c=B(e,o.extendFlat({},n),s),u=c.flags,h=q(e,o.extendFlat({},i)),p=h.flags;(u.calc||p.calc)&&(e.calcdata=void 0),u.clearAxisTypes&&w.clearAxisTypes(e,s,i);var d=[];if(u.fullReplot&&p.layoutReplot){var g=e.data,v=e.layout;e.data=void 0,e.layout=void 0,d.push(function(){return r.plot(e,g,v)})}else u.fullReplot?d.push(r.plot):p.layoutReplot?d.push(k.layoutReplot):(d.push(f.previousPromises),F(e,p,h)||f.supplyDefaults(e),u.style&&d.push(k.doTraceStyle),u.colorbars&&d.push(k.doColorBars),p.legend&&d.push(k.doLegend),p.layoutstyle&&d.push(k.layoutStyles),p.axrange&&N(d,h.rangesAltered),p.ticks&&d.push(k.doTicksRelayout),p.modebar&&d.push(k.doModeBar),p.camera&&d.push(k.doCamera),d.push(S));d.push(f.rehover),l.add(e,t,[e,c.undoit,h.undoit,c.traces],t,[e,c.redoit,h.redoit,c.traces]);var m=o.syncOrAsync(d,e);return m&&m.then||(m=Promise.resolve(e)),m.then(function(){return e.emit(\\\"plotly_update\\\",{data:c.eventData,layout:h.eventData}),e})},r.react=function(t,e,n,i){var a,s;var l=(t=o.getGraphDiv(t))._fullData,h=t._fullLayout;if(o.isPlotDiv(t)&&l&&h){if(o.isPlainObject(e)){var p=e;e=p.data,n=p.layout,i=p.config,a=p.frames}var d=!1;if(i){var g=o.extendDeep({},t._context);t._context=void 0,L(t,i),d=function t(e,r){var n;for(n in e)if(\\\"_\\\"!==n.charAt(0)){var i=e[n],a=r[n];if(i!==a)if(o.isPlainObject(i)&&o.isPlainObject(a)){if(t(i,a))return!0}else{if(!Array.isArray(i)||!Array.isArray(a))return!0;if(i.length!==a.length)return!0;for(var s=0;s<i.length;s++)if(i[s]!==a[s]){if(!o.isPlainObject(i[s])||!o.isPlainObject(a[s]))return!0;if(t(i[s],a[s]))return!0}}}}(g,t._context)}t.data=e||[],w.cleanData(t.data),t.layout=n||{},w.cleanLayout(t.layout),f.supplyDefaults(t,{skipUpdateCalc:!0});var v=t._fullData,m=t._fullLayout,y=void 0===m.datarevision,x=function(t,e,r,n){if(e.length!==r.length)return{fullReplot:!0,calc:!0};var i,a,o=M.traceFlags();o.arrays={};var s={getValObject:function(t){return u.getTraceValObject(a,t)},flags:o,immutable:n,gd:t},l={};for(i=0;i<e.length;i++)a=r[i]._fullInput,f.hasMakesDataTransform(a)&&(a=r[i]),l[a.uid]||(l[a.uid]=1,G(e[i]._fullInput,a,[],s));(o.calc||o.plot)&&(o.fullReplot=!0);return o}(t,l,v,y),b=function(t,e,r,n){var i=M.layoutFlags();i.arrays={},G(e,r,[],{getValObject:function(t){return u.getLayoutValObject(r,t)},flags:i,immutable:n,gd:t}),(i.plot||i.calc)&&(i.layoutReplot=!0);return i}(t,h,m,y);H(t)&&(b.layoutReplot=!0),x.calc||b.calc?t.calcdata=void 0:f.supplyDefaultsUpdateCalc(t.calcdata,v);var _=[];if(a&&(t._transitionData={},f.createTransitionData(t),_.push(function(){return r.addFrames(t,a)})),x.fullReplot||b.layoutReplot||d)t._fullLayout._skipDefaults=!0,_.push(r.plot);else{for(var A in b.arrays){var T=b.arrays[A];if(T.length){var C=c.getComponentMethod(A,\\\"drawOne\\\");if(C!==o.noop)for(var E=0;E<T.length;E++)C(t,T[E]);else{var z=c.getComponentMethod(A,\\\"draw\\\");if(z===o.noop)throw new Error(\\\"cannot draw components: \\\"+A);z(t)}}}_.push(f.previousPromises),x.style&&_.push(k.doTraceStyle),x.colorbars&&_.push(k.doColorBars),b.legend&&_.push(k.doLegend),b.layoutstyle&&_.push(k.layoutStyles),b.axrange&&N(_),b.ticks&&_.push(k.doTicksRelayout),b.modebar&&_.push(k.doModeBar),b.camera&&_.push(k.doCamera),_.push(S)}_.push(f.rehover),(s=o.syncOrAsync(_,t))&&s.then||(s=Promise.resolve(t))}else s=r.newPlot(t,e,n,i);return s.then(function(){return t.emit(\\\"plotly_react\\\",{data:e,layout:n}),t})},r.animate=function(t,e,r){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(\\\"This element is not a Plotly plot: \\\"+t+\\\". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/\\\");var n=t._transitionData;n._frameQueue||(n._frameQueue=[]);var i=(r=f.supplyAnimationDefaults(r)).transition,a=r.frame;function s(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise(function(a,u){function h(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,f.transition(t,e.frame.data,e.frame.layout,w.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit(\\\"plotly_animatingframe\\\",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit(\\\"plotly_animated\\\"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit(\\\"plotly_animating\\\"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&h()};e()}var d,g,v=0;function m(t){return Array.isArray(i)?v>=i.length?t.transitionOpts=i[v]:t.transitionOpts=i[0]:t.transitionOpts=i,v++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:\\\"object\\\",data:m(o.extendFlat({},e))});else if(x||-1!==[\\\"string\\\",\\\"number\\\"].indexOf(typeof e))for(d=0;d<n._frames.length;d++)(g=n._frames[d])&&(x||String(g.group)===String(e))&&y.push({type:\\\"byname\\\",name:String(g.name),data:m({name:g.name})});else if(b)for(d=0;d<e.length;d++){var _=e[d];-1!==[\\\"number\\\",\\\"string\\\"].indexOf(typeof _)?(_=String(_),y.push({type:\\\"byname\\\",name:_,data:m({name:_})})):o.isPlainObject(_)&&y.push({type:\\\"object\\\",data:m(o.extendFlat({},_))})}for(d=0;d<y.length;d++)if(\\\"byname\\\"===(g=y[d]).type&&!n._frameHash[g.data.name])return o.warn('animate failure: frame not found: \\\"'+g.data.name+'\\\"'),void u();-1!==[\\\"next\\\",\\\"immediate\\\"].indexOf(r.mode)&&function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var e=n._frameQueue.pop();e.onInterrupt&&e.onInterrupt()}t.emit(\\\"plotly_animationinterrupted\\\",[])}}(),\\\"reverse\\\"===r.direction&&y.reverse();var k=t._fullLayout._currentFrame;if(k&&r.fromcurrent){var M=-1;for(d=0;d<y.length;d++)if(\\\"byname\\\"===(g=y[d]).type&&g.name===k){M=d;break}if(M>0&&M<y.length-1){var A=[];for(d=0;d<y.length;d++)g=y[d],(\\\"byname\\\"!==y[d].type||d>M)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var i=0;i<e.length;i++){var o;o=\\\"byname\\\"===e[i].type?f.computeFrame(t,e[i].name):e[i].data;var h=l(i),d=s(i);d.duration=Math.min(d.duration,h.duration);var g={frame:o,name:e[i].name,frameOpts:h,transitionOpts:d};i===e.length-1&&(g.onComplete=c(a,2),g.onInterrupt=u),n._frameQueue.push(g)}\\\"immediate\\\"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||p()}}(y):(t.emit(\\\"plotly_animated\\\"),a())})},r.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw new Error(\\\"This element is not a Plotly plot: \\\"+t+\\\". It's likely that you've failed to create a plot before adding frames. For more details, see https://plot.ly/javascript/animations/\\\");var n,i,a,s,c=t._transitionData._frames,u=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error(\\\"addFrames failure: frameList must be an Array of frame definitions\\\"+e);var h=c.length+2*e.length,p=[],d={};for(n=e.length-1;n>=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,v=(u[g]||d[g]||{}).name,m=e[n].name,y=u[v]||d[v];v&&m&&\\\"number\\\"==typeof m&&y&&T<5&&(T++,o.warn('addFrames: overwriting frame \\\"'+(u[v]||d[v]).name+'\\\" with a frame whose name of type \\\"number\\\" also equates to \\\"'+v+'\\\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===T&&o.warn(\\\"addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.\\\")),d[g]={name:g},p.push({frame:f.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:h+n})}p.sort(function(t,e){return t.index>e.index?-1:t.index<e.index?1:0});var x=[],b=[],_=c.length;for(n=p.length-1;n>=0;n--){if(\\\"number\\\"==typeof(i=p[n].frame).name&&o.warn(\\\"Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings\\\"),!i.name)for(;u[i.name=\\\"frame \\\"+t._transitionData._counter++];);if(u[i.name]){for(a=0;a<c.length&&(c[a]||{}).name!==i.name;a++);x.push({type:\\\"replace\\\",index:a,value:i}),b.unshift({type:\\\"replace\\\",index:a,value:c[a]})}else s=Math.max(0,Math.min(p[n].index,_)),x.push({type:\\\"insert\\\",index:s,value:i}),b.unshift({type:\\\"delete\\\",index:s}),_++}var w=f.modifyFrames,k=f.modifyFrames,M=[t,b],A=[t,x];return l&&l.add(t,w,M,k,A),f.modifyFrames(t,x)},r.deleteFrames=function(t,e){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(\\\"This element is not a Plotly plot: \\\"+t);var r,n,i=t._transitionData._frames,a=[],s=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice(0)).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:\\\"delete\\\",index:n}),s.unshift({type:\\\"insert\\\",index:n,value:i[n]});var c=f.modifyFrames,u=f.modifyFrames,h=[t,s],p=[t,a];return l&&l.add(t,c,h,u,p),f.modifyFrames(t,a)},r.purge=function(t){var e=(t=o.getGraphDiv(t))._fullLayout||{},r=t._fullData||[];return f.cleanPlot([],{},r,e),f.purge(t),s.purge(t),e._container&&e._container.remove(),delete t._context,t}},{\\\"../components/color\\\":570,\\\"../components/colorbar/connect\\\":572,\\\"../components/drawing\\\":595,\\\"../constants/xmlns_namespaces\\\":674,\\\"../lib\\\":696,\\\"../lib/events\\\":684,\\\"../lib/queue\\\":712,\\\"../lib/svg_text_utils\\\":721,\\\"../plots/cartesian/axes\\\":745,\\\"../plots/cartesian/constants\\\":751,\\\"../plots/cartesian/graph_interact\\\":755,\\\"../plots/plots\\\":809,\\\"../plots/polar/legacy\\\":817,\\\"../registry\\\":828,\\\"./edit_types\\\":728,\\\"./helpers\\\":729,\\\"./manage_arrays\\\":731,\\\"./plot_config\\\":733,\\\"./plot_schema\\\":734,\\\"./subroutines\\\":736,d3:148,\\\"fast-isnumeric\\\":214,\\\"has-hover\\\":393}],733:[function(t,e,r){\\\"use strict\\\";e.exports={staticPlot:!1,plotlyServerURL:\\\"https://plot.ly\\\",editable:!1,edits:{annotationPosition:!1,annotationTail:!1,annotationText:!1,axisTitleText:!1,colorbarPosition:!1,colorbarTitleText:!1,legendPosition:!1,legendText:!1,shapePosition:!1,titleText:!1},autosizable:!1,responsive:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:\\\"reset+autosize\\\",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:\\\"Edit chart\\\",showSources:!1,displayModeBar:\\\"hover\\\",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,toImageButtonOptions:{},displaylogo:!0,plotGlPixelRatio:2,setBackground:\\\"transparent\\\",topojsonURL:\\\"https://cdn.plot.ly/\\\",mapboxAccessToken:null,logging:1,globalTransforms:[],locale:\\\"en-US\\\",locales:{}}},{}],734:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../plots/attributes\\\"),o=t(\\\"../plots/layout_attributes\\\"),s=t(\\\"../plots/frame_attributes\\\"),l=t(\\\"../plots/animation_attributes\\\"),c=t(\\\"../plots/polar/legacy/area_attributes\\\"),u=t(\\\"../plots/polar/legacy/axis_attributes\\\"),f=t(\\\"./edit_types\\\"),h=i.extendFlat,p=i.extendDeepAll,d=i.isPlainObject,g=\\\"_isSubplotObj\\\",v=\\\"_isLinkedToArray\\\",m=[g,v,\\\"_arrayAttrRegexps\\\",\\\"_deprecated\\\"];function y(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(x(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!d(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(!x(e[++r]))return!1}else if(\\\"info_array\\\"===t.valType){var i=e[++r];if(!x(i))return!1;var a=t.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!x(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function x(t){return t===Math.round(t)&&t>=0}function b(t){return function(t){r.crawl(t,function(t,e,n){r.isValObject(t)?\\\"data_array\\\"===t.valType?(t.role=\\\"data\\\",n[e+\\\"src\\\"]={valType:\\\"string\\\",editType:\\\"none\\\"}):!0===t.arrayOk&&(n[e+\\\"src\\\"]={valType:\\\"string\\\",editType:\\\"none\\\"}):d(t)&&(t.role=\\\"object\\\")})}(t),function(t){r.crawl(t,function(t,e,r){if(!t)return;var n=t[v];if(!n)return;delete t[v],r[e]={items:{}},r[e].items[n]=t,r[e].role=\\\"object\\\"})}(t),function(t){!function t(e){for(var r in e)if(d(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n<e[r].length;n++)t(e[r][n]);else e[r]instanceof RegExp&&(e[r]=e[r].toString())}(t)}(t),t}function _(t,e,r){var n=i.nestedProperty(t,r),a=p({},e.layoutAttributes);a[g]=!0,n.set(a)}function w(t,e,r){var n=i.nestedProperty(t,r);n.set(p(n.get()||{},e))}r.IS_SUBPLOT_OBJ=g,r.IS_LINKED_TO_ARRAY=v,r.DEPRECATED=\\\"_deprecated\\\",r.UNDERSCORE_ATTRS=m,r.get=function(){var t={};n.allTypes.concat(\\\"area\\\").forEach(function(e){t[e]=function(t){var e,o;\\\"area\\\"===t?(e={attributes:c},o={}):(e=n.modules[t]._module,o=e.basePlotModule);var s={type:null},l=p({},a),u=p({},e.attributes);r.crawl(u,function(t,e,r,n,a){i.nestedProperty(l,a).set(void 0),void 0===t&&i.nestedProperty(u,a).set(void 0)}),p(s,l),p(s,u),o.attributes&&p(s,o.attributes);s.type=t;var f={meta:e.meta||{},attributes:b(s)};if(e.layoutAttributes){var h={};p(h,e.layoutAttributes),f.layoutAttributes=b(h)}return f}(e)});var e,d={};return Object.keys(n.transformsRegistry).forEach(function(t){d[t]=function(t){var e=n.transformsRegistry[t],r=p({},e.attributes);return Object.keys(n.componentsRegistry).forEach(function(e){var i=n.componentsRegistry[e];i.schema&&i.schema.transforms&&i.schema.transforms[t]&&Object.keys(i.schema.transforms[t]).forEach(function(e){w(r,i.schema.transforms[t][e],e)})}),{attributes:b(r)}}(t)}),{defs:{valObjects:i.valObjectMeta,metaKeys:m.concat([\\\"description\\\",\\\"role\\\",\\\"editType\\\",\\\"impliedEdits\\\"]),editType:{traces:f.traces,layout:f.layout},impliedEdits:{}},traces:t,layout:function(){var t,e,r={};for(t in p(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i<e.attr.length;i++)_(r,e,e.attr[i]);else{var a=\\\"subplot\\\"===e.attr?e.name:e.attr;_(r,e,a)}for(t in r=function(t){return h(t,{radialaxis:u.radialaxis,angularaxis:u.angularaxis}),h(t,u.layout),t}(r),n.componentsRegistry){var s=(e=n.componentsRegistry[t]).schema;if(s&&(s.subplots||s.layout)){var l=s.subplots;if(l&&l.xaxis&&!l.yaxis)for(var c in l.xaxis)delete r.yaxis[c]}else e.layoutAttributes&&w(r,e.layoutAttributes,e.name)}return{layoutAttributes:b(r)}}(),transforms:d,frames:(e={frames:i.extendDeepAll({},s)},b(e),e.frames),animation:b(l)}},r.crawl=function(t,e,n,i){var a=n||0;i=i||\\\"\\\",Object.keys(t).forEach(function(n){var o=t[n];if(-1===m.indexOf(n)){var s=(i?i+\\\".\\\":\\\"\\\")+n;e(o,n,t,a,s),r.isValObject(o)||d(o)&&\\\"impliedEdits\\\"!==n&&r.crawl(o,e,a+1,s)}})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){var e,n,o=[],s=[],l=[];function c(t,r,a,c){s=s.slice(0,c).concat([r]),l=l.slice(0,c).concat([t&&t._isLinkedToArray]),t&&(\\\"data_array\\\"===t.valType||!0===t.arrayOk)&&!(\\\"colorbar\\\"===s[c-1]&&(\\\"ticktext\\\"===r||\\\"tickvals\\\"===r))&&function t(e,r,a){var c=e[s[r]];var u=a+s[r];if(r===s.length-1)i.isArrayOrTypedArray(c)&&o.push(n+u);else if(l[r]){if(Array.isArray(c))for(var f=0;f<c.length;f++)i.isPlainObject(c[f])&&t(c[f],r+1,u+\\\"[\\\"+f+\\\"].\\\")}else i.isPlainObject(c)&&t(c,r+1,u+\\\".\\\")}(e,0,\\\"\\\")}e=t,n=\\\"\\\",r.crawl(a,c),t._module&&t._module.attributes&&r.crawl(t._module.attributes,c);var u=t.transforms;if(u)for(var f=0;f<u.length;f++){var h=u[f],p=h._module;p&&(n=\\\"transforms[\\\"+f+\\\"].\\\",e=h,r.crawl(p.attributes,c))}return o},r.getTraceValObject=function(t,e){var r,i,o=e[0],s=1;if(\\\"transforms\\\"===o){if(1===e.length)return a.transforms;var l=t.transforms;if(!Array.isArray(l)||!l.length)return!1;var u=e[1];if(!x(u)||u>=l.length)return!1;i=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&&r[e[2]],s=3}else if(\\\"area\\\"===t.type)i=c[o];else{var f=t._module;if(f||(f=(n.modules[t.type||a.type.dflt]||{})._module),!f)return!1;if(!(i=(r=f.attributes)&&r[o])){var h=f.basePlotModule;h&&h.attributes&&(i=h.attributes[o])}i||(i=a[o])}return y(i,e,s)},r.getLayoutValObject=function(t,e){return y(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r<l.length;r++){if((a=l[r]).attrRegex&&a.attrRegex.test(e)){if(a.layoutAttrOverrides)return a.layoutAttrOverrides;!c&&a.layoutAttributes&&(c=a.layoutAttributes)}var f=a.baseLayoutAttrOverrides;if(f&&e in f)return f[e]}if(c)return c}var h=t._modules;if(h)for(r=0;r<h.length;r++)if((s=h[r].layoutAttributes)&&e in s)return s[e];for(i in n.componentsRegistry)if(!(a=n.componentsRegistry[i]).schema&&e===a.name)return a.layoutAttributes;if(e in o)return o[e];if(\\\"radialaxis\\\"===e||\\\"angularaxis\\\"===e)return u[e];return u.layout[e]||!1}(t,e[0]),e,1)}},{\\\"../lib\\\":696,\\\"../plots/animation_attributes\\\":740,\\\"../plots/attributes\\\":742,\\\"../plots/frame_attributes\\\":773,\\\"../plots/layout_attributes\\\":800,\\\"../plots/polar/legacy/area_attributes\\\":815,\\\"../plots/polar/legacy/axis_attributes\\\":816,\\\"../registry\\\":828,\\\"./edit_types\\\":728}],735:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plots/attributes\\\"),a=\\\"templateitemname\\\",o={name:{valType:\\\"string\\\",editType:\\\"none\\\"}};function s(t){return t&&\\\"string\\\"==typeof t}function l(t){var e=t.length-1;return\\\"s\\\"!==t.charAt(e)&&n.warn(\\\"bad argument to arrayDefaultKey: \\\"+t),t.substr(0,t.length-1)+\\\"defaults\\\"}o[a]={valType:\\\"string\\\",editType:\\\"calc\\\"},r.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=o.name,e[a]=o[a],e},r.traceTemplater=function(t){var e,r,a={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(a[e]=0);return{newTrace:function(o){var s={type:e=n.coerce(o,{},i,\\\"type\\\"),_template:null};if(e in a){r=t[e];var l=a[e]%r.length;a[e]++,s._template=r[l]}return s}}},r.newContainer=function(t,e,r){var i=t._template,a=i&&(i[e]||r&&i[r]);return n.isPlainObject(a)||(a=null),t[e]={_template:a}},r.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],o=n&&n[e];Array.isArray(o)&&o.length||(o=[]);var c={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[a]=t[a];if(!s(n))return e._template=i,e;for(var l=0;l<o.length;l++){var u=o[l];if(u.name===n)return c[n]=1,e._template=u,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e<o.length;e++){var r=o[e],n=r.name;if(s(n)&&!c[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i[a]=r[a],t.push(i),c[n]=1}}return t}}},r.arrayDefaultKey=l,r.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,o=r._index,s=o>=i&&(r._input||{})._templateitemname;s&&(o=i);var l,c=e+\\\"[\\\"+o+\\\"]\\\";function u(){l={},s&&(l[c]={},l[c][a]=s)}function f(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+\\\".\\\"+t]=e}function h(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:f,getUpdateObj:h,applyUpdate:function(e,r){e&&f(e,r);var i=h();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\\\"../lib\\\":696,\\\"../plots/attributes\\\":742}],736:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../registry\\\"),a=t(\\\"../plots/plots\\\"),o=t(\\\"../lib\\\"),s=t(\\\"../lib/clear_gl_canvases\\\"),l=t(\\\"../components/color\\\"),c=t(\\\"../components/drawing\\\"),u=t(\\\"../components/titles\\\"),f=t(\\\"../components/modebar\\\"),h=t(\\\"../plots/cartesian/axes\\\"),p=t(\\\"../constants/alignment\\\"),d=t(\\\"../plots/cartesian/constraints\\\"),g=d.enforce,v=d.clean,m=t(\\\"../plots/cartesian/autorange\\\").doAutoRange;function y(t,e,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=t[1]||i[1]<=t[0])&&(a[0]<e[1]&&a[1]>e[0]))return!0}return!1}function x(t){var e,i,a,s,u,d=t._fullLayout,g=d._size,v=g.p,m=h.list(t,\\\"\\\",!0);if(d._paperdiv.style({width:t._context.responsive&&d.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\\\"100%\\\":d.width+\\\"px\\\",height:t._context.responsive&&d.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\\\"100%\\\":d.height+\\\"px\\\"}).selectAll(\\\".main-svg\\\").call(c.setSize,d.width,d.height),t._context.setBackground(t,d.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!d._has(\\\"cartesian\\\"))return t._promises.length&&Promise.all(t._promises);function x(t,e,r){var n=t._lw/2;return\\\"x\\\"===t._id.charAt(0)?e?\\\"top\\\"===r?e._offset-v-n:e._offset+e._length+v+n:g.t+g.h*(1-(t.position||0))+n%1:e?\\\"right\\\"===r?e._offset+e._length+v+n:e._offset-v-n:g.l+g.w*(t.position||0)+n%1}for(e=0;e<m.length;e++){var w=m[e];w.setScale();var M=w._anchorAxis;w._linepositions={},w._lw=c.crispRound(t,w.linewidth,1),w._mainLinePosition=x(w,M,w.side),w._mainMirrorPosition=w.mirror&&M?x(w,M,p.OPPOSITE_SIDE[w.side]):null,w._mainSubplot=b(w,d)}var A=[],T=[],S=[],C=1===l.opacity(d.paper_bgcolor)&&1===l.opacity(d.plot_bgcolor)&&d.paper_bgcolor===d.plot_bgcolor;for(i in d._plots)if((a=d._plots[i]).mainplot)a.bg&&a.bg.remove(),a.bg=void 0;else{var E=a.xaxis.domain,L=a.yaxis.domain,z=a.plotgroup;if(y(E,L,S)){var O=z.node(),I=a.bg=o.ensureSingle(z,\\\"rect\\\",\\\"bg\\\");O.insertBefore(I.node(),O.childNodes[0]),T.push(i)}else z.select(\\\"rect.bg\\\").remove(),S.push([E,L]),C||(A.push(i),T.push(i))}var P,D,R,B,F,N,j,V,U,q,H,G,W,Y=d._bgLayer.selectAll(\\\".bg\\\").data(A);for(Y.enter().append(\\\"rect\\\").classed(\\\"bg\\\",!0),Y.exit().remove(),Y.each(function(t){d._plots[t].bg=n.select(this)}),e=0;e<T.length;e++)a=d._plots[T[e]],s=a.xaxis,u=a.yaxis,a.bg&&a.bg.call(c.setRect,s._offset-v,u._offset-v,s._length+2*v,u._length+2*v).call(l.fill,d.plot_bgcolor).style(\\\"stroke-width\\\",0);if(!d._hasOnlyLargeSploms)for(i in d._plots){a=d._plots[i],s=a.xaxis,u=a.yaxis;var X,Z,$=a.clipId=\\\"clip\\\"+d._uid+i+\\\"plot\\\",J=o.ensureSingleById(d._clips,\\\"clipPath\\\",$,function(t){t.classed(\\\"plotclip\\\",!0).append(\\\"rect\\\")});a.clipRect=J.select(\\\"rect\\\").attr({width:s._length,height:u._length}),c.setTranslate(a.plot,s._offset,u._offset),a._hasClipOnAxisFalse?(X=null,Z=$):(X=$,Z=null),c.setClipUrl(a.plot,X),a.layerClipId=Z}function K(t){return\\\"M\\\"+P+\\\",\\\"+t+\\\"H\\\"+D}function Q(t){return\\\"M\\\"+s._offset+\\\",\\\"+t+\\\"h\\\"+s._length}function tt(t){return\\\"M\\\"+t+\\\",\\\"+V+\\\"V\\\"+j}function et(t){return\\\"M\\\"+t+\\\",\\\"+u._offset+\\\"v\\\"+u._length}function rt(t,e,r){if(!t.showline||i!==t._mainSubplot)return\\\"\\\";if(!t._anchorAxis)return r(t._mainLinePosition);var n=e(t._mainLinePosition);return t.mirror&&(n+=e(t._mainMirrorPosition)),n}for(i in d._plots){a=d._plots[i],s=a.xaxis,u=a.yaxis;var nt=\\\"M0,0\\\";_(s,i)&&(F=k(s,\\\"left\\\",u,m),P=s._offset-(F?v+F:0),N=k(s,\\\"right\\\",u,m),D=s._offset+s._length+(N?v+N:0),R=x(s,u,\\\"bottom\\\"),B=x(s,u,\\\"top\\\"),!(W=!s._anchorAxis||i!==s._mainSubplot)||\\\"allticks\\\"!==s.mirror&&\\\"all\\\"!==s.mirror||(s._linepositions[i]=[R,B]),nt=rt(s,K,Q),W&&s.showline&&(\\\"all\\\"===s.mirror||\\\"allticks\\\"===s.mirror)&&(nt+=K(R)+K(B)),a.xlines.style(\\\"stroke-width\\\",s._lw+\\\"px\\\").call(l.stroke,s.showline?s.linecolor:\\\"rgba(0,0,0,0)\\\")),a.xlines.attr(\\\"d\\\",nt);var it=\\\"M0,0\\\";_(u,i)&&(H=k(u,\\\"bottom\\\",s,m),j=u._offset+u._length+(H?v:0),G=k(u,\\\"top\\\",s,m),V=u._offset-(G?v:0),U=x(u,s,\\\"left\\\"),q=x(u,s,\\\"right\\\"),!(W=!u._anchorAxis||i!==u._mainSubplot)||\\\"allticks\\\"!==u.mirror&&\\\"all\\\"!==u.mirror||(u._linepositions[i]=[U,q]),it=rt(u,tt,et),W&&u.showline&&(\\\"all\\\"===u.mirror||\\\"allticks\\\"===u.mirror)&&(it+=tt(U)+tt(q)),a.ylines.style(\\\"stroke-width\\\",u._lw+\\\"px\\\").call(l.stroke,u.showline?u.linecolor:\\\"rgba(0,0,0,0)\\\")),a.ylines.attr(\\\"d\\\",it)}return h.makeClipPaths(t),t._promises.length&&Promise.all(t._promises)}function b(t,e){var r=e._subplots,n=r.cartesian.concat(r.gl2d||[]),i={_fullLayout:e},a=\\\"x\\\"===t._id.charAt(0),o=t._mainAxis._anchorAxis,s=\\\"\\\",l=\\\"\\\",c=\\\"\\\";if(o&&(c=o._mainAxis._id,s=a?t._id+c:c+t._id),!s||!e._plots[s]){s=\\\"\\\";for(var u=0;u<n.length;u++){var f=n[u],p=f.indexOf(\\\"y\\\"),d=a?f.substr(0,p):f.substr(p),g=a?f.substr(p):f.substr(0,p);if(d===t._id){l||(l=f);var v=h.getFromId(i,g);if(c&&v.overlaying===c){s=f;break}}}}return s||l}function _(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||\\\"all\\\"===t.mirror||\\\"allticks\\\"===t.mirror)}function w(t,e,r){if(!r.showline||!r._lw)return!1;if(\\\"all\\\"===r.mirror||\\\"allticks\\\"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=p.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&&n.domain[1-i]===t.domain[1-i]}function k(t,e,r,n){if(w(t,e,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&w(t,e,a))return a._lw}return 0}r.layoutStyles=function(t){return o.syncOrAsync([a.doAutoMargin,x],t)},r.drawMainTitle=function(t){var e=t._fullLayout;u.draw(t,\\\"gtitle\\\",{propContainer:e,propName:\\\"title\\\",placeholder:e._dfltTitle.plot,attributes:{x:e.width/2,y:e._size.t/2,\\\"text-anchor\\\":\\\"middle\\\"}})},r.doTraceStyle=function(t){var e,n=t.calcdata,o=[];for(e=0;e<n.length;e++){var l=n[e],c=l[0]||{},u=c.trace||{},f=u._module||{},h=f.arraysToCalcdata;h&&h(l,u);var p=f.editStyle;p&&o.push({fn:p,cd0:c})}if(o.length){for(e=0;e<o.length;e++){var d=o[e];d.fn(t,d.cd0)}s(t),r.redrawReglTraces(t)}return a.style(t),i.getComponentMethod(\\\"legend\\\",\\\"draw\\\")(t),a.previousPromises(t)},r.doColorBars=function(t){for(var e=0;e<t.calcdata.length;e++){var r=t.calcdata[e][0];if((r.t||{}).cb){var n=r.trace,o=r.t.cb;i.traceIs(n,\\\"contour\\\")&&o.line({width:!1!==n.contours.showlines?n.line.width:0,dash:n.line.dash,color:\\\"line\\\"===n.contours.coloring?o._opts.line.color:n.line.color});var s=n._module.colorbar.container,l=(s?n[s]:n).colorbar;o.options(l)()}}return a.previousPromises(t)},r.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,i.call(\\\"plot\\\",t,\\\"\\\",e)},r.doLegend=function(t){return i.getComponentMethod(\\\"legend\\\",\\\"draw\\\")(t),a.previousPromises(t)},r.doTicksRelayout=function(t){return h.doTicks(t,\\\"redraw\\\"),t._fullLayout._hasOnlyLargeSploms&&(i.subplotsRegistry.splom.updateGrid(t),s(t),r.redrawReglTraces(t)),r.drawMainTitle(t),a.previousPromises(t)},r.doModeBar=function(t){var e=t._fullLayout;f.manage(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(t)}return a.previousPromises(t)},r.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){var i=e[r[n]];i._scene.setCamera(i.camera)}},r.drawData=function(t){var e,n=t._fullLayout,o=t.calcdata;for(e=0;e<o.length;e++){var l=o[e][0].trace;!0===l.visible&&l._module.colorbar||n._infolayer.select(\\\".cb\\\"+l.uid).remove()}s(t);var c=n._basePlotModules;for(e=0;e<c.length;e++)c[e].plot(t);return r.redrawReglTraces(t),a.style(t),i.getComponentMethod(\\\"shapes\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"annotations\\\",\\\"draw\\\")(t),n._replotting=!1,a.previousPromises(t)},r.redrawReglTraces=function(t){var e=t._fullLayout;if(e._has(\\\"regl\\\")){var r,n,i=t._fullData,a=[],s=[];for(e._hasOnlyLargeSploms&&e._splomGrid.draw(),r=0;r<i.length;r++){var l=i[r];!0===l.visible&&(\\\"splom\\\"===l.type?e._splomScenes[l.uid].draw():\\\"scattergl\\\"===l.type?o.pushUnique(a,l.xaxis+l.yaxis):\\\"scatterpolargl\\\"===l.type&&o.pushUnique(s,l.subplot))}for(r=0;r<a.length;r++)(n=e._plots[a[r]])._scene&&n._scene.draw();for(r=0;r<s.length;r++)(n=e[s[r]]._subplot)._scene&&n._scene.draw()}},r.doAutoRangeAndConstraints=function(t){for(var e=h.list(t,\\\"\\\",!0),r=0;r<e.length;r++){var n=e[r];v(t,n),m(t,n)}g(t)},r.finalDraw=function(t){i.getComponentMethod(\\\"shapes\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"images\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"annotations\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"rangeslider\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"rangeselector\\\",\\\"draw\\\")(t)},r.drawMarginPushers=function(t){i.getComponentMethod(\\\"legend\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"rangeselector\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"sliders\\\",\\\"draw\\\")(t),i.getComponentMethod(\\\"updatemenus\\\",\\\"draw\\\")(t)}},{\\\"../components/color\\\":570,\\\"../components/drawing\\\":595,\\\"../components/modebar\\\":633,\\\"../components/titles\\\":661,\\\"../constants/alignment\\\":668,\\\"../lib\\\":696,\\\"../lib/clear_gl_canvases\\\":679,\\\"../plots/cartesian/autorange\\\":744,\\\"../plots/cartesian/axes\\\":745,\\\"../plots/cartesian/constraints\\\":753,\\\"../plots/plots\\\":809,\\\"../registry\\\":828,d3:148}],737:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=n.isPlainObject,a=t(\\\"./plot_schema\\\"),o=t(\\\"../plots/plots\\\"),s=t(\\\"../plots/attributes\\\"),l=t(\\\"./plot_template\\\"),c=t(\\\"./plot_config\\\");function u(t,e){t=n.extendDeep({},t);var r,a,o=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))u(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var o=l.arrayTemplater({_template:t},n);for(a=0;a<r.length;a++){var s=r[a],c=o.newItem(s)._template;c&&u(c,s)}var f=o.defaultItems();for(a=0;a<f.length;a++)r.push(f[a]._template);for(a=0;a<r.length;a++)delete r[a].templateitemname}}for(r=0;r<o.length;r++){var c=o[r],h=t[c];if(c in e?s(h,e[c],c):e[c]=h,f(c)===c)for(var p in e){var d=f(p);p===d||d!==c||p in t||s(h,e[p],c)}}}function f(t){return t.replace(/[0-9]+$/,\\\"\\\")}function h(t,e,r,a,o){var s=o&&r(o);for(var c in t){var u=t[c],d=p(t,c,a),g=p(t,c,o),v=r(g);if(!v){var m=f(c);m!==c&&(v=r(g=p(t,m,o)))}if((!s||s!==v)&&!(!v||v._noTemplating||\\\"data_array\\\"===v.valType||v.arrayOk&&Array.isArray(u)))if(!v.valType&&i(u))h(u,e,r,d,g);else if(v._isLinkedToArray&&Array.isArray(u))for(var y=!1,x=0,b={},_=0;_<u.length;_++){var w=u[_];if(i(w)){var k=w.name;if(k)b[k]||(h(w,e,r,p(u,x,d),p(u,x,g)),x++,b[k]=1);else if(!y){var M=p(t,l.arrayDefaultKey(c),a),A=p(u,x,d);h(w,e,r,A,p(u,x,g));var T=n.nestedProperty(e,A);n.nestedProperty(e,M).set(T.get()),T.set(null),y=!0}}}else{n.nestedProperty(e,d).set(u)}}}function p(t,e,r){return r?Array.isArray(t)?r+\\\"[\\\"+e+\\\"]\\\":r+\\\".\\\"+e:e}function d(t){for(var e=0;e<t.length;e++)if(i(t[e]))return!0}function g(t){var e;switch(t.code){case\\\"data\\\":e=\\\"The template has no key data.\\\";break;case\\\"layout\\\":e=\\\"The template has no key layout.\\\";break;case\\\"missing\\\":e=t.path?\\\"There are no templates for item \\\"+t.path+\\\" with name \\\"+t.templateitemname:\\\"There are no templates for trace \\\"+t.index+\\\", of type \\\"+t.traceType+\\\".\\\";break;case\\\"unused\\\":e=t.path?\\\"The template item at \\\"+t.path+\\\" was not used in constructing the plot.\\\":t.dataCount?\\\"Some of the templates of type \\\"+t.traceType+\\\" were not used. The template has \\\"+t.templateCount+\\\" traces, the data only has \\\"+t.dataCount+\\\" of this type.\\\":\\\"The template has \\\"+t.templateCount+\\\" traces of type \\\"+t.traceType+\\\" but there are none in the data.\\\";break;case\\\"reused\\\":e=\\\"Some of the templates of type \\\"+t.traceType+\\\" were used more than once. The template has \\\"+t.templateCount+\\\" traces, the data has \\\"+t.dataCount+\\\" of this type.\\\"}return t.msg=e,t}r.makeTemplate=function(t){t=n.extendDeep({_context:c},{data:t.data,layout:t.layout}),o.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var l={data:{},layout:{}};e.forEach(function(t){var e={};h(t,e,function(t,e){return a.getTraceValObject(t,n.nestedProperty({},e).parts)}.bind(null,t));var r=n.coerce(t,{},s,\\\"type\\\"),i=l.data[r];i||(i=l.data[r]=[]),i.push(e)}),h(r,l.layout,function(t,e){return a.getLayoutValObject(t,n.nestedProperty({},e).parts)}.bind(null,r)),delete l.layout.template;var f=r.template;if(i(f)){var p,d,g,v,m,y,x=f.layout;i(x)&&u(x,l.layout);var b=f.data;if(i(b)){for(d in l.data)if(g=b[d],Array.isArray(g)){for(y=(m=l.data[d]).length,v=g.length,p=0;p<y;p++)u(g[p%v],m[p]);for(p=y;p<v;p++)m.push(n.extendDeep({},g[p]))}for(d in b)d in l.data||(l.data[d]=n.extendDeep([],b[d]))}}return l},r.validateTemplate=function(t,e){var r=n.extendDeep({},{_context:c,data:t.data,layout:t.layout}),a=r.layout||{};i(e)||(e=a.template||{});var s=e.layout,l=e.data,u=[];r.layout=a,r.layout.template=e,o.supplyDefaults(r);var h=r._fullLayout,v=r._fullData,m={};if(i(s)?(!function t(e,r){for(var n in e)if(\\\"_\\\"!==n.charAt(0)&&i(e[n])){var a,o=f(n),s=[];for(a=0;a<r.length;a++)s.push(p(e,n,r[a])),o!==n&&s.push(p(e,o,r[a]));for(a=0;a<s.length;a++)m[s[a]]=1;t(e[n],s)}}(h,[\\\"layout\\\"]),function t(e,r){for(var n in e)if(-1===n.indexOf(\\\"defaults\\\")&&i(e[n])){var a=p(e,n,r);m[a]?t(e[n],a):u.push({code:\\\"unused\\\",path:a})}}(s,\\\"layout\\\")):u.push({code:\\\"layout\\\"}),i(l)){for(var y,x={},b=0;b<v.length;b++){var _=v[b];x[y=_.type]=(x[y]||0)+1,_._fullInput._template||u.push({code:\\\"missing\\\",index:_._fullInput.index,traceType:y})}for(y in l){var w=l[y].length,k=x[y]||0;w>k?u.push({code:\\\"unused\\\",traceType:y,templateCount:w,dataCount:k}):k>w&&u.push({code:\\\"reused\\\",traceType:y,templateCount:w,dataCount:k})}}else u.push({code:\\\"data\\\"});if(function t(e,r){for(var n in e)if(\\\"_\\\"!==n.charAt(0)){var a=e[n],o=p(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&u.push({code:\\\"missing\\\",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&d(a)&&t(a,o)}}({data:v,layout:h},\\\"\\\"),u.length)return u.map(g)}},{\\\"../lib\\\":696,\\\"../plots/attributes\\\":742,\\\"../plots/plots\\\":809,\\\"./plot_config\\\":733,\\\"./plot_schema\\\":734,\\\"./plot_template\\\":735}],738:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./plot_api\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../snapshot/helpers\\\"),o=t(\\\"../snapshot/tosvg\\\"),s=t(\\\"../snapshot/svgtoimg\\\"),l={format:{valType:\\\"enumerated\\\",values:[\\\"png\\\",\\\"jpeg\\\",\\\"webp\\\",\\\"svg\\\"],dflt:\\\"png\\\"},width:{valType:\\\"number\\\",min:1},height:{valType:\\\"number\\\",min:1},scale:{valType:\\\"number\\\",min:0,dflt:1},setBackground:{valType:\\\"any\\\",dflt:!1},imageDataOnly:{valType:\\\"boolean\\\",dflt:!1}},c=/^data:image\\\\/\\\\w+;base64,/;e.exports=function(t,e){var r,u,f;function h(t){return!(t in e)||i.validate(e[t],l[t])}if(e=e||{},i.isPlainObject(t)?(r=t.data||[],u=t.layout||{},f=t.config||{}):(t=i.getGraphDiv(t),r=i.extendDeep([],t.data),u=i.extendDeep({},t.layout),f=t._context),!h(\\\"width\\\")||!h(\\\"height\\\"))throw new Error(\\\"Height and width should be pixel values.\\\");if(!h(\\\"format\\\"))throw new Error(\\\"Image format is not jpeg, png, svg or webp.\\\");var p={};function d(t,r){return i.coerce(e,p,l,t,r)}var g=d(\\\"format\\\"),v=d(\\\"width\\\"),m=d(\\\"height\\\"),y=d(\\\"scale\\\"),x=d(\\\"setBackground\\\"),b=d(\\\"imageDataOnly\\\"),_=document.createElement(\\\"div\\\");_.style.position=\\\"absolute\\\",_.style.left=\\\"-5000px\\\",document.body.appendChild(_);var w=i.extendFlat({},u);v&&(w.width=v),m&&(w.height=m);var k=i.extendFlat({},f,{staticPlot:!0,setBackground:x}),M=a.getRedrawFunc(_);function A(){return new Promise(function(t){setTimeout(t,a.getDelay(_._fullLayout))})}function T(){return new Promise(function(t,e){var r=o(_,g,y),a=_._fullLayout.width,l=_._fullLayout.height;if(n.purge(_),document.body.removeChild(_),\\\"svg\\\"===g)return t(b?r:\\\"data:image/svg+xml,\\\"+encodeURIComponent(r));var c=document.createElement(\\\"canvas\\\");c.id=i.randstr(),s({format:g,width:a,height:l,scale:y,canvas:c,svg:r,promise:!0}).then(t).catch(e)})}return new Promise(function(t,e){n.plot(_,r,w,k).then(M).then(A).then(T).then(function(e){t(function(t){return b?t.replace(c,\\\"\\\"):t}(e))}).catch(function(t){e(t)})})}},{\\\"../lib\\\":696,\\\"../snapshot/helpers\\\":832,\\\"../snapshot/svgtoimg\\\":834,\\\"../snapshot/tosvg\\\":836,\\\"./plot_api\\\":732}],739:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plots/plots\\\"),a=t(\\\"./plot_schema\\\"),o=t(\\\"./plot_config\\\"),s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;h<f.length;h++){var v=f[h];if(\\\"transforms\\\"!==v){var m=o.slice();m.push(v);var y=t[v],x=e[v],b=g(r,v),_=\\\"info_array\\\"===(b||{}).valType,w=\\\"colorscale\\\"===(b||{}).valType,k=(b||{}).items;if(d(r,v))if(s(y)&&s(x))u(y,x,b,i,a,m);else if(_&&l(y)){y.length>x.length&&i.push(p(\\\"unused\\\",a,m.concat(x.length)));var M,A,T,S,C,E=x.length,L=Array.isArray(k);if(L&&(E=Math.min(E,k.length)),2===b.dimensions)for(A=0;A<E;A++)if(l(y[A])){y[A].length>x[A].length&&i.push(p(\\\"unused\\\",a,m.concat(A,x[A].length)));var z=x[A].length;for(M=0;M<(L?Math.min(z,k[A].length):z);M++)T=L?k[A][M]:k,S=y[A][M],C=x[A][M],n.validate(S,T)?C!==S&&C!==+S&&i.push(p(\\\"dynamic\\\",a,m.concat(A,M),S,C)):i.push(p(\\\"value\\\",a,m.concat(A,M),S))}else i.push(p(\\\"array\\\",a,m.concat(A),y[A]));else for(A=0;A<E;A++)T=L?k[A]:k,S=y[A],C=x[A],n.validate(S,T)?C!==S&&C!==+S&&i.push(p(\\\"dynamic\\\",a,m.concat(A),S,C)):i.push(p(\\\"value\\\",a,m.concat(A),S))}else if(b.items&&!_&&l(y)){var O,I,P=k[Object.keys(k)[0]],D=[];for(O=0;O<x.length;O++){var R=x[O]._index||O;if((I=m.slice()).push(R),s(y[R])&&s(x[O])){D.push(R);var B=y[R],F=x[O];s(B)&&!1!==B.visible&&!1===F.visible?i.push(p(\\\"invisible\\\",a,I)):u(B,F,P,i,a,I)}}for(O=0;O<y.length;O++)(I=m.slice()).push(O),s(y[O])?-1===D.indexOf(O)&&i.push(p(\\\"unused\\\",a,I)):i.push(p(\\\"object\\\",a,I,y[O]))}else!s(y)&&s(x)?i.push(p(\\\"object\\\",a,m,y)):c(y)||!c(x)||_||w?v in e?n.validate(y,b)?\\\"enumerated\\\"===b.valType&&(b.coerceNumber&&y!==+x||y!==x)&&i.push(p(\\\"dynamic\\\",a,m,y,x)):i.push(p(\\\"value\\\",a,m,y)):i.push(p(\\\"unused\\\",a,m,y)):i.push(p(\\\"array\\\",a,m,y));else i.push(p(\\\"schema\\\",a,m))}}return i}e.exports=function(t,e){var r,c,f=a.get(),h=[],d={_context:n.extendFlat({},o)};l(t)?(d.data=n.extendDeep([],t),r=t):(d.data=[],r=[],h.push(p(\\\"array\\\",\\\"data\\\"))),s(e)?(d.layout=n.extendDeep({},e),c=e):(d.layout={},c={},arguments.length>1&&h.push(p(\\\"object\\\",\\\"layout\\\"))),i.supplyDefaults(d);for(var g=d._fullData,v=r.length,m=0;m<v;m++){var y=r[m],x=[\\\"data\\\",m];if(s(y)){var b=g[m],_=b.type,w=f.traces[_].attributes;w.type={valType:\\\"enumerated\\\",values:[_]},!1===b.visible&&!1!==y.visible&&h.push(p(\\\"invisible\\\",x)),u(y,b,w,h,x);var k=y.transforms,M=b.transforms;if(k){l(k)||h.push(p(\\\"array\\\",x,[\\\"transforms\\\"])),x.push(\\\"transforms\\\");for(var A=0;A<k.length;A++){var T=[\\\"transforms\\\",A],S=k[A].type;if(s(k[A])){var C=f.transforms[S]?f.transforms[S].attributes:{};C.type={valType:\\\"enumerated\\\",values:Object.keys(f.transforms)},u(k[A],M[A],C,h,x,T)}else h.push(p(\\\"object\\\",x,T))}}}else h.push(p(\\\"object\\\",x))}return u(c,d._fullLayout,function(t,e){for(var r=t.layout.layoutAttributes,i=0;i<e.length;i++){var a=e[i],o=t.traces[a.type],s=o.layoutAttributes;s&&(a.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}(f,g),h,\\\"layout\\\"),0===h.length?void 0:h};var f={object:function(t,e){return(\\\"layout\\\"===t&&\\\"\\\"===e?\\\"The layout argument\\\":\\\"data\\\"===t[0]&&\\\"\\\"===e?\\\"Trace \\\"+t[1]+\\\" in the data argument\\\":h(t)+\\\"key \\\"+e)+\\\" must be linked to an object container\\\"},array:function(t,e){return(\\\"data\\\"===t?\\\"The data argument\\\":h(t)+\\\"key \\\"+e)+\\\" must be linked to an array container\\\"},schema:function(t,e){return h(t)+\\\"key \\\"+e+\\\" is not part of the schema\\\"},unused:function(t,e,r){var n=s(r)?\\\"container\\\":\\\"key\\\";return h(t)+n+\\\" \\\"+e+\\\" did not get coerced\\\"},dynamic:function(t,e,r,n){return[h(t)+\\\"key\\\",e,\\\"(set to '\\\"+r+\\\"')\\\",\\\"got reset to\\\",\\\"'\\\"+n+\\\"'\\\",\\\"during defaults.\\\"].join(\\\" \\\")},invisible:function(t,e){return(e?h(t)+\\\"item \\\"+e:\\\"Trace \\\"+t[1])+\\\" got defaulted to be not visible\\\"},value:function(t,e,r){return[h(t)+\\\"key \\\"+e,\\\"is set to an invalid value (\\\"+r+\\\")\\\"].join(\\\" \\\")}};function h(t){return l(t)?\\\"In data trace \\\"+t[1]+\\\", \\\":\\\"In \\\"+t+\\\", \\\"}function p(t,e,r,i,a){var o,s;r=r||\\\"\\\",l(e)?(o=e[0],s=e[1]):(o=e,s=null);var c=function(t){if(!l(t))return String(t);for(var e=\\\"\\\",r=0;r<t.length;r++){var n=t[r];\\\"number\\\"==typeof n?e=e.substr(0,e.length-1)+\\\"[\\\"+n+\\\"]\\\":e+=n,r<t.length-1&&(e+=\\\".\\\")}return e}(r),u=f[t](e,c,i,a);return n.log(u),{code:t,container:o,trace:s,path:r,astr:c,msg:u}}function d(t,e){var r=m(e),n=r.keyMinusId,i=r.id;return!!(n in t&&t[n]._isSubplotObj&&i)||e in t}function g(t,e){return e in t?t[e]:t[m(e).keyMinusId]}var v=n.counterRegex(\\\"([a-z]+)\\\");function m(t){var e=t.match(v);return{keyMinusId:e&&e[1],id:e&&e[2]}}},{\\\"../lib\\\":696,\\\"../plots/plots\\\":809,\\\"./plot_config\\\":733,\\\"./plot_schema\\\":734}],740:[function(t,e,r){\\\"use strict\\\";e.exports={mode:{valType:\\\"enumerated\\\",dflt:\\\"afterall\\\",values:[\\\"immediate\\\",\\\"next\\\",\\\"afterall\\\"]},direction:{valType:\\\"enumerated\\\",values:[\\\"forward\\\",\\\"reverse\\\"],dflt:\\\"forward\\\"},fromcurrent:{valType:\\\"boolean\\\",dflt:!1},frame:{duration:{valType:\\\"number\\\",min:0,dflt:500},redraw:{valType:\\\"boolean\\\",dflt:!0}},transition:{duration:{valType:\\\"number\\\",min:0,dflt:500},easing:{valType:\\\"enumerated\\\",dflt:\\\"cubic-in-out\\\",values:[\\\"linear\\\",\\\"quad\\\",\\\"cubic\\\",\\\"sin\\\",\\\"exp\\\",\\\"circle\\\",\\\"elastic\\\",\\\"back\\\",\\\"bounce\\\",\\\"linear-in\\\",\\\"quad-in\\\",\\\"cubic-in\\\",\\\"sin-in\\\",\\\"exp-in\\\",\\\"circle-in\\\",\\\"elastic-in\\\",\\\"back-in\\\",\\\"bounce-in\\\",\\\"linear-out\\\",\\\"quad-out\\\",\\\"cubic-out\\\",\\\"sin-out\\\",\\\"exp-out\\\",\\\"circle-out\\\",\\\"elastic-out\\\",\\\"back-out\\\",\\\"bounce-out\\\",\\\"linear-in-out\\\",\\\"quad-in-out\\\",\\\"cubic-in-out\\\",\\\"sin-in-out\\\",\\\"exp-in-out\\\",\\\"circle-in-out\\\",\\\"elastic-in-out\\\",\\\"back-in-out\\\",\\\"bounce-in-out\\\"]}}}},{}],741:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plot_api/plot_template\\\");e.exports=function(t,e,r){var a,o,s=r.name,l=r.inclusionAttr||\\\"visible\\\",c=e[s],u=n.isArrayOrTypedArray(t[s])?t[s]:[],f=e[s]=[],h=i.arrayTemplater(e,s,l);for(a=0;a<u.length;a++){var p=u[a];n.isPlainObject(p)?o=h.newItem(p):(o=h.newItem({}))[l]=!1,o._index=a,!1!==o[l]&&r.handleItemDefaults(p,o,e,r),f.push(o)}var d=h.defaultItems();for(a=0;a<d.length;a++)(o=d[a])._index=f.length,r.handleItemDefaults({},o,e,r,{}),f.push(o);if(n.isArrayOrTypedArray(c)){var g=Math.min(c.length,f.length);for(a=0;a<g;a++)n.relinkPrivateKeys(f[a],c[a])}return f}},{\\\"../lib\\\":696,\\\"../plot_api/plot_template\\\":735}],742:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../components/fx/attributes\\\");e.exports={type:{valType:\\\"enumerated\\\",values:[],dflt:\\\"scatter\\\",editType:\\\"calc+clearAxisTypes\\\",_noTemplating:!0},visible:{valType:\\\"enumerated\\\",values:[!0,!1,\\\"legendonly\\\"],dflt:!0,editType:\\\"calc\\\"},showlegend:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"style\\\"},legendgroup:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"style\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,editType:\\\"style\\\"},name:{valType:\\\"string\\\",editType:\\\"style\\\"},uid:{valType:\\\"string\\\",editType:\\\"plot\\\"},ids:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},customdata:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},selectedpoints:{valType:\\\"any\\\",editType:\\\"calc\\\"},hoverinfo:{valType:\\\"flaglist\\\",flags:[\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"text\\\",\\\"name\\\"],extras:[\\\"all\\\",\\\"none\\\",\\\"skip\\\"],arrayOk:!0,dflt:\\\"all\\\",editType:\\\"none\\\"},hoverlabel:n.hoverlabel,stream:{token:{valType:\\\"string\\\",noBlank:!0,strict:!0,editType:\\\"calc\\\"},maxpoints:{valType:\\\"number\\\",min:0,max:1e4,dflt:500,editType:\\\"calc\\\"},editType:\\\"calc\\\"},transforms:{_isLinkedToArray:\\\"transform\\\",editType:\\\"calc\\\"}}},{\\\"../components/fx/attributes\\\":604}],743:[function(t,e,r){\\\"use strict\\\";e.exports={xaxis:{valType:\\\"subplotid\\\",dflt:\\\"x\\\",editType:\\\"calc+clearAxisTypes\\\"},yaxis:{valType:\\\"subplotid\\\",dflt:\\\"y\\\",editType:\\\"calc+clearAxisTypes\\\"}}},{}],744:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").FP_SAFE;function o(t,e){var r,n,a=[],o=s(e),c=l(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return i.simpleMap(e.range,e.r2l);var h=u[0].val,p=f[0].val;for(r=1;r<u.length&&h===p;r++)h=Math.min(h,u[r].val);for(r=1;r<f.length&&h===p;r++)p=Math.max(p,f[r].val);var d=!1;if(e.range){var g=i.simpleMap(e.range,e.r2l);d=g[1]<g[0]}\\\"reversed\\\"===e.autorange&&(d=!0,e.autorange=!0);var v,m,y,x,b,_,w=e.rangemode,k=\\\"tozero\\\"===w,M=\\\"nonnegative\\\"===w,A=e._length,T=A/10,S=0;for(r=0;r<u.length;r++)for(v=u[r],n=0;n<f.length;n++)(_=(m=f[n]).val-v.val)>0&&((b=A-o(v)-o(m))>T?_/b>S&&(y=v,x=m,S=_/b):_/A>S&&(y={val:v.val,pad:0},x={val:m.val,pad:0},S=_/A));if(h===p){var C=h-1,E=h+1;if(k)if(0===h)a=[0,1];else{var L=(h>0?f:u).reduce(function(t,e){return Math.max(t,o(e))},0),z=h/(1-Math.min(.5,L/A));a=h>0?[0,z]:[z,0]}else a=M?[Math.max(0,C),Math.max(1,E)]:[C,E]}else k?(y.val>=0&&(y={val:0,pad:0}),x.val<=0&&(x={val:0,pad:0})):M&&(y.val-S*o(y)<0&&(y={val:0,pad:0}),x.val<=0&&(x={val:1,pad:0})),S=(x.val-y.val)/(A-o(y)-o(x)),a=[y.val-S*o(y),x.val+S*o(x)];return d&&a.reverse(),i.simpleMap(a,e.l2r||Number)}function s(t){var e=t._length/20;return\\\"domain\\\"===t.constrain&&t._inputDomain&&(e*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(t){return t.pad+(t.extrapad?e:0)}}function l(t,e){var r,n,i,a=e._id,o=t._fullData,s=t._fullLayout,l=[],f=[];function h(t,e){for(r=0;r<e.length;r++){var o=t[e[r]],s=(o._extremes||{})[a];if(!0===o.visible&&s){for(n=0;n<s.min.length;n++)i=s.min[n],c(l,i.val,i.pad,{extrapad:i.extrapad});for(n=0;n<s.max.length;n++)i=s.max[n],u(f,i.val,i.pad,{extrapad:i.extrapad})}}}return h(o,e._traceIndices),h(s.annotations||[],e._annIndices||[]),h(s.shapes||[],e._shapeIndices||[]),{min:l,max:f}}function c(t,e,r,n){f(t,e,r,n,p)}function u(t,e,r,n){f(t,e,r,n,d)}function f(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<t.length&&s;l++){var c=t[l];if(i(c.val,e)&&c.pad>=r&&(c.extrapad||!o)){s=!1;break}i(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=a&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function h(t){return n(t)&&Math.abs(t)<a}function p(t,e){return t<=e}function d(t,e){return t>=e}e.exports={getAutoRange:o,makePadFn:s,doAutoRange:function(t,e){e._length||e.setScale();var r;e.autorange&&(e.range=o(t,e),e._r=e.range.slice(),e._rl=i.simpleMap(e._r,e.r2l),(r=e._input).range=e.range.slice(),r.autorange=e.autorange);if(e._anchorAxis&&e._anchorAxis.rangeslider){var n=e._anchorAxis.rangeslider[e._name];n&&\\\"auto\\\"===n.rangemode&&(n.range=o(t,e)),(r=e._anchorAxis._input).rangeslider[e._name]=i.extendFlat({},n)}},findExtremes:function(t,e,r){r||(r={});t._m||t.setScale();var i,o,s,l,f,p,d,g,v,m=[],y=[],x=e.length,b=r.padded||!1,_=r.tozero&&(\\\"linear\\\"===t.type||\\\"-\\\"===t.type),w=\\\"log\\\"===t.type,k=!1;function M(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var A=M((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),T=M((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!k){if(g=1/0,v=-1/0,w)for(i=0;i<x;i++)(o=e[i])<g&&o>0&&(g=o),o>v&&o<a&&(v=o);else for(i=0;i<x;i++)(o=e[i])<g&&o>-a&&(g=o),o>v&&o<a&&(v=o);e=[g,v],x=2}var E={tozero:_,extrapad:b};function L(r){s=e[r],n(s)&&(p=A(r),d=T(r),g=s-C(r),v=s+S(r),w&&g<v/10&&(g=v/10),l=t.c2l(g),f=t.c2l(v),_&&(l=Math.min(0,l),f=Math.max(0,f)),h(l)&&c(m,l,d,E),h(f)&&u(y,f,p,E))}var z=Math.min(6,x);for(i=0;i<z;i++)L(i);for(i=x-1;i>=z;i--)L(i);return{min:m,max:y}},concatExtremes:l}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"fast-isnumeric\\\":214}],745:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../plots/plots\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../../components/titles\\\"),u=t(\\\"../../components/color\\\"),f=t(\\\"../../components/drawing\\\"),h=t(\\\"./layout_attributes\\\"),p=t(\\\"./clean_ticks\\\"),d=t(\\\"../../constants/numerical\\\"),g=d.ONEAVGYEAR,v=d.ONEAVGMONTH,m=d.ONEDAY,y=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=d.MINUS_SIGN,w=d.BADNUM,k=t(\\\"../../constants/alignment\\\").MID_SHIFT,M=t(\\\"../../constants/alignment\\\").LINE_SPACING,A=e.exports={};A.setConvert=t(\\\"./set_convert\\\");var T=t(\\\"./axis_autotype\\\"),S=t(\\\"./axis_ids\\\");A.id2name=S.id2name,A.name2id=S.name2id,A.cleanId=S.cleanId,A.list=S.list,A.listIds=S.listIds,A.getFromId=S.getFromId,A.getFromTrace=S.getFromTrace;var C=t(\\\"./autorange\\\");A.getAutoRange=C.getAutoRange,A.findExtremes=C.findExtremes,A.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+\\\"axis\\\"],c=n+\\\"ref\\\",u={};return i||(i=l[0]||a),a||(a=i),u[c]={valType:\\\"enumerated\\\",values:l.concat(a?[a]:[]),dflt:i},s.coerce(t,e,u,c)},A.coercePosition=function(t,e,r,n,i,a){var o,l;if(\\\"paper\\\"===n||\\\"pixel\\\"===n)o=s.ensureNumber,l=r(i,a);else{var c=A.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},A.cleanPosition=function(t,e,r){return(\\\"paper\\\"===r||\\\"pixel\\\"===r?s.ensureNumber:A.getFromId(e,r).cleanPos)(t)};var E=A.getDataConversions=function(t,e,r,n){var i,a=\\\"x\\\"===r||\\\"y\\\"===r||\\\"z\\\"===r?r:n;if(Array.isArray(a)){if(i={type:T(n),_categories:[]},A.setConvert(i),\\\"category\\\"===i.type)for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=A.getFromTrace(t,e,a);return i?{d2c:i.d2c,c2d:i.c2d}:\\\"ids\\\"===a?{d2c:z,c2d:z}:{d2c:L,c2d:L}};function L(t){return+t}function z(t){return String(t)}A.getDataToCoordFunc=function(t,e,r,n){return E(t,e,r,n).d2c},A.counterLetter=function(t){var e=t.charAt(0);return\\\"x\\\"===e?\\\"y\\\":\\\"y\\\"===e?\\\"x\\\":void 0},A.minDtick=function(t,e,r,n){-1===[\\\"log\\\",\\\"category\\\"].indexOf(t.type)&&n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},A.saveRangeInitial=function(t,e){for(var r=A.list(t,\\\"\\\",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial,s=o||!(a.range[0]===a._rangeInitial[0]&&a.range[1]===a._rangeInitial[1]);(o&&!1===a.autorange||e&&s)&&(a._rangeInitial=a.range.slice(),n=!0)}return n},A.saveShowSpikeInitial=function(t,e){for(var r=A.list(t,\\\"\\\",!0),n=!1,i=\\\"on\\\",a=0;a<r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),\\\"on\\\"!==i||o.showspikes||(i=\\\"off\\\")}return t._fullLayout._cartesianSpikesEnabled=i,n},A.autoBin=function(t,e,r,n,a,o){var l,c=s.aggNums(Math.min,null,t),u=s.aggNums(Math.max,null,t);if(\\\"category\\\"===e.type)return{start:c-.5,end:u+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:u-c};if(a||(a=e.calendar),l=\\\"log\\\"===e.type?{type:\\\"linear\\\",range:[c,u]}:{type:e.type,range:s.simpleMap([c,u],e.c2r,0,a),calendar:a},A.setConvert(l),o=o&&p.dtick(o,l.type))l.dtick=o,l.tick0=p.tick0(void 0,l.type,a);else{var f;if(r)f=(u-c)/r;else{var h=s.distinctVals(t),d=Math.pow(10,Math.floor(Math.log(h.minDiff)/Math.LN10)),g=d*s.roundUp(h.minDiff/d,[.9,1.9,4.9,9.9],!0);f=Math.max(g,2*s.stdev(t)/Math.pow(t.length,n?.25:.4)),i(f)||(f=1)}A.autoTicks(l,f)}var v,y=l.dtick,x=A.tickIncrement(A.tickFirst(l),y,\\\"reverse\\\",a);if(\\\"number\\\"==typeof y)v=(x=function(t,e,r,n,a){var o=0,s=0,l=0,c=0;function u(e){return(1+100*(e-t)/r.dtick)%100<2}for(var f=0;f<e.length;f++)e[f]%1==0?l++:i(e[f])||c++,u(e[f])&&o++,u(e[f]+r.dtick/2)&&s++;var h=e.length-c;if(l===h&&\\\"date\\\"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*h&&(o>.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p<n?p:-p}return t}(x,t,l,c,u))+(1+Math.floor((u-x)/y))*y;else for(\\\"M\\\"===l.dtick.charAt(0)&&(x=function(t,e,r,n,i){var a=s.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=A.tickIncrement(t,\\\"M6\\\",\\\"reverse\\\")+1.5*m:a.exactMonths>.8?t=A.tickIncrement(t,\\\"M1\\\",\\\"reverse\\\")+15.5*m:t-=m/2;var l=A.tickIncrement(t,r);if(l<=n)return l}return t}(x,t,y,c,a)),v=x,0;v<=u;)v=A.tickIncrement(v,y,!1,a),0;return{start:e.c2r(x,0,a),end:e.c2r(v,0,a),size:y,_dataSpan:u-c}},A.prepTicks=function(t){var e=s.simpleMap(t.range,t.r2l);if(\\\"auto\\\"===t.tickmode||!t.dtick){var r,n=t.nticks;n||(\\\"category\\\"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r=\\\"y\\\"===t._id.charAt(0)?40:80,n=s.constrain(t._length/r,4,9)+1),\\\"radialaxis\\\"===t._name&&(n*=2)),\\\"array\\\"===t.tickmode&&(n*=100),A.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0=\\\"date\\\"===t.type?\\\"2000-01-01\\\":0),\\\"date\\\"===t.type&&t.dtick<.1&&(t.dtick=.1),j(t)},A.calcTicks=function(t){A.prepTicks(t);var e=s.simpleMap(t.range,t.r2l);if(\\\"array\\\"===t.tickmode)return function(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=s.simpleMap(t.range,t.r2l),l=1.0001*o[0]-1e-4*o[1],c=1.0001*o[1]-1e-4*o[0],u=Math.min(l,c),f=Math.max(l,c),h=0;Array.isArray(i)||(i=[]);var p=\\\"category\\\"===t.type?t.d2l_noadd:t.d2l;\\\"log\\\"===t.type&&\\\"L\\\"!==String(t.dtick).charAt(0)&&(t.dtick=\\\"L\\\"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(r=0;r<n.length;r++)(e=p(n[r]))>u&&e<f&&(void 0===i[r]?a[h]=A.tickText(t,e):a[h]=V(t,e,String(i[r])),h++);h<n.length&&a.splice(h,n.length-h);return a}(t);t._tmin=A.tickFirst(t);var r=1.0001*e[0]-1e-4*e[1],n=1.0001*e[1]-1e-4*e[0],i=e[1]<e[0];if(t._tmin<r!==i)return[];var a=[];\\\"category\\\"===t.type&&(n=i?Math.max(-.5,n):Math.min(t._categories.length-.5,n));for(var o=null,l=Math.max(1e3,t._length||0),c=t._tmin;(i?c>=n:c<=n)&&!(a.length>l||c===o);c=A.tickIncrement(c,t.dtick,i,t.calendar))o=c,a.push(c);$(t)&&360===Math.abs(e[1]-e[0])&&a.pop(),t._tmax=a[a.length-1],t._prevDateHead=\\\"\\\",t._inCalcTicks=!0;for(var u=new Array(a.length),f=0;f<a.length;f++)u[f]=A.tickText(t,a[f]);return t._inCalcTicks=!1,u};var O=[2,5,10],I=[1,2,3,6,12],P=[1,2,5,10,15,30],D=[1,2,3,7,14],R=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],B=[-.301,0,.301,.699,1],F=[15,30,45,90,180];function N(t,e,r){return e*s.roundUp(t/e,r)}function j(t){var e=t.dtick;if(t._tickexponent=0,i(e)||\\\"string\\\"==typeof e||(e=1),\\\"category\\\"===t.type&&(t._tickround=null),\\\"date\\\"===t.type){var r=t.r2l(t.tick0),n=t.l2r(r).replace(/(^-|i)/g,\\\"\\\"),a=n.length;if(\\\"M\\\"===String(e).charAt(0))a>10||\\\"01-01\\\"!==n.substr(5)?t._tickround=\\\"d\\\":t._tickround=+e.substr(1)%12==0?\\\"y\\\":\\\"m\\\";else if(e>=m&&a<=10||e>=15*m)t._tickround=\\\"d\\\";else if(e>=x&&a<=16||e>=y)t._tickround=\\\"M\\\";else if(e>=b&&a<=19||e>=x)t._tickround=\\\"S\\\";else{var o=t.l2r(r+e).replace(/^-/,\\\"\\\").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||\\\"L\\\"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(q(t.exponentformat)&&!H(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function V(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||\\\"\\\",fontSize:n.size,font:n.family,fontColor:n.color}}A.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if(\\\"date\\\"===t.type){t.tick0=s.dateTick0(t.calendar);var a=2*e;a>g?(e/=g,r=n(10),t.dtick=\\\"M\\\"+12*N(e,r,O)):a>v?(e/=v,t.dtick=\\\"M\\\"+N(e,1,I)):a>m?(t.dtick=N(e,m,D),t.tick0=s.dateTick0(t.calendar,!0)):a>y?t.dtick=N(e,y,I):a>x?t.dtick=N(e,x,P):a>b?t.dtick=N(e,b,P):(r=n(10),t.dtick=N(e,r,O))}else if(\\\"log\\\"===t.type){t.tick0=0;var o=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),t.dtick=\\\"L\\\"+N(e,r,O)}else t.dtick=e>.3?\\\"D2\\\":\\\"D1\\\"}else\\\"category\\\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):$(t)?(t.tick0=0,r=1,t.dtick=N(e,r,F)):(t.tick0=0,r=n(10),t.dtick=N(e,r,O));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\\\"string\\\"!=typeof t.dtick){var c=t.dtick;throw t.dtick=1,\\\"ax.dtick error: \\\"+String(c)}},A.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return t+o*e;var l=e.charAt(0),c=o*Number(e.substr(1));if(\\\"M\\\"===l)return s.incrementMonth(t,c,a);if(\\\"L\\\"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if(\\\"D\\\"===l){var u=\\\"D2\\\"===e?B:R,f=t+.01*o,h=s.roundUp(s.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw\\\"unrecognized dtick \\\"+String(e)},A.tickFirst=function(t){var e=t.r2l||Number,r=s.simpleMap(t.range,e),a=r[1]<r[0],o=a?Math.floor:Math.ceil,l=1.0001*r[0]-1e-4*r[1],c=t.dtick,u=e(t.tick0);if(i(c)){var f=o((l-u)/c)*c+u;return\\\"category\\\"===t.type&&(f=s.constrain(f,0,t._categories.length-1)),f}var h=c.charAt(0),p=Number(c.substr(1));if(\\\"M\\\"===h){for(var d,g,v,m=0,y=u;m<10;){if(((d=A.tickIncrement(y,c,a,t.calendar))-l)*(y-l)<=0)return a?Math.min(y,d):Math.max(y,d);g=(l-(y+d)/2)/(d-y),v=h+(Math.abs(Math.round(g))||1)*p,y=A.tickIncrement(y,v,g<0?!a:a,t.calendar),m++}return s.error(\\\"tickFirst did not converge\\\",t),y}if(\\\"L\\\"===h)return Math.log(o((Math.pow(10,l)-u)/p)*p+u)/Math.LN10;if(\\\"D\\\"===h){var x=\\\"D2\\\"===c?B:R,b=s.roundUp(s.mod(l,1),x,a);return Math.floor(l)+Math.log(n.round(Math.pow(10,b),1))/Math.LN10}throw\\\"unrecognized dtick \\\"+String(c)},A.tickText=function(t,e,r){var n,a,o=V(t,e),l=\\\"array\\\"===t.tickmode,c=r||l,u=\\\"category\\\"===t.type?t.d2l_noadd:t.d2l;if(l&&Array.isArray(t.ticktext)){var f=s.simpleMap(t.range,t.r2l),h=Math.abs(f[1]-f[0])/1e4;for(a=0;a<t.ticktext.length&&!(Math.abs(e-u(t.tickvals[a]))<h);a++);if(a<t.ticktext.length)return o.text=String(t.ticktext[a]),o}function p(n){var i;return void 0===n||(r?\\\"none\\\"===n:(i={first:t._tmin,last:t._tmax}[n],\\\"all\\\"!==n&&e!==i))}return n=r?\\\"never\\\":\\\"none\\\"!==t.exponentformat&&p(t.showexponent)?\\\"hide\\\":\\\"\\\",\\\"date\\\"===t.type?function(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||A.getTickFormat(t);n&&(a=i(a)?4:{y:\\\"m\\\",m:\\\"d\\\",d:\\\"M\\\",M:\\\"S\\\",S:4}[a]);var l,c=s.formatDate(e.x,o,a,t._dateFormat,t.calendar,t._extraFormat),u=c.indexOf(\\\"\\\\n\\\");-1!==u&&(l=c.substr(u+1),c=c.substr(0,u));n&&(\\\"00:00:00\\\"===c||\\\"00:00\\\"===c?(c=l,l=\\\"\\\"):8===c.length&&(c=c.replace(/:00$/,\\\"\\\")));l&&(r?\\\"d\\\"===a?c+=\\\", \\\"+l:c=l+(c?\\\", \\\"+c:\\\"\\\"):t._inCalcTicks&&l===t._prevDateHead||(c+=\\\"<br>\\\"+l,t._prevDateHead=l));e.text=c}(t,o,r,c):\\\"log\\\"===t.type?function(t,e,r,n,a){var o=t.dtick,l=e.x,c=t.tickformat,u=\\\"string\\\"==typeof o&&o.charAt(0);\\\"never\\\"===a&&(a=\\\"\\\");n&&\\\"L\\\"!==u&&(o=\\\"L3\\\",u=\\\"L\\\");if(c||\\\"L\\\"===u)e.text=G(Math.pow(10,l),t,a,n);else if(i(o)||\\\"D\\\"===u&&s.mod(l+.01,1)<.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;\\\"power\\\"===p||q(p)&&H(f)?(e.text=0===f?1:1===f?\\\"10\\\":\\\"10<sup>\\\"+(f>1?\\\"\\\":_)+h+\\\"</sup>\\\",e.fontSize*=1.25):(\\\"e\\\"===p||\\\"E\\\"===p)&&h>2?e.text=\\\"1\\\"+p+(f>0?\\\"+\\\":_)+h:(e.text=G(Math.pow(10,l),t,\\\"\\\",\\\"fakehover\\\"),\\\"D1\\\"===o&&\\\"y\\\"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if(\\\"D\\\"!==u)throw\\\"unrecognized dtick \\\"+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if(\\\"D1\\\"===t.dtick){var d=String(e.text).charAt(0);\\\"0\\\"!==d&&\\\"1\\\"!==d||(\\\"y\\\"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,n):\\\"category\\\"===t.type?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\\\"\\\");e.text=String(r)}(t,o):$(t)?function(t,e,r,n,i){if(\\\"radians\\\"!==t.thetaunit||r)e.text=G(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text=\\\"0\\\";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){var r=1;for(;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=G(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text=\\\"\\\\u03c0\\\":e.text=o[0]+\\\"\\\\u03c0\\\":e.text=[\\\"<sup>\\\",o[0],\\\"</sup>\\\",\\\"\\\\u2044\\\",\\\"<sub>\\\",o[1],\\\"</sub>\\\",\\\"\\\\u03c0\\\"].join(\\\"\\\"),l&&(e.text=_+e.text)}}}}(t,o,r,c,n):function(t,e,r,n,i){\\\"never\\\"===i?i=\\\"\\\":\\\"all\\\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\\\"hide\\\");e.text=G(e.x,t,i,n)}(t,o,0,c,n),t.tickprefix&&!p(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!p(t.showticksuffix)&&(o.text+=t.ticksuffix),o},A.hoverLabelText=function(t,e,r){if(r!==w&&r!==e)return A.hoverLabelText(t,e)+\\\" - \\\"+A.hoverLabelText(t,r);var n=\\\"log\\\"===t.type&&e<=0,i=A.tickText(t,t.c2l(n?-e:e),\\\"hover\\\").text;return n?0===e?\\\"0\\\":_+i:i};var U=[\\\"f\\\",\\\"p\\\",\\\"n\\\",\\\"\\\\u03bc\\\",\\\"m\\\",\\\"\\\",\\\"k\\\",\\\"M\\\",\\\"G\\\",\\\"T\\\"];function q(t){return\\\"SI\\\"===t||\\\"B\\\"===t}function H(t){return t>14||t<-15}function G(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\\\"B\\\",c=e._tickexponent,u=A.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,dtick:\\\"none\\\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\\\"none\\\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};j(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,_);var p,d=Math.pow(10,-o)/2;if(\\\"none\\\"===l&&(c=0),(t=Math.abs(t))<d)t=\\\"0\\\",a=!1;else{if(t+=d,c&&(t*=Math.pow(10,-c),o+=c),0===o)t=String(Math.floor(t));else if(o<0){t=(t=String(Math.round(t))).substr(0,t.length+o);for(var g=o;g<0;g++)t+=\\\"0\\\"}else{var v=(t=String(t)).indexOf(\\\".\\\")+1;v&&(t=t.substr(0,v+o).replace(/\\\\.?0+$/,\\\"\\\"))}t=s.numSeparate(t,e._separators,f)}c&&\\\"hide\\\"!==l&&(q(l)&&H(c)&&(l=\\\"power\\\"),p=c<0?_+-c:\\\"power\\\"!==l?\\\"+\\\"+c:String(c),\\\"e\\\"===l||\\\"E\\\"===l?t+=l+p:\\\"power\\\"===l?t+=\\\"\\\\xd710<sup>\\\"+p+\\\"</sup>\\\":\\\"B\\\"===l&&9===c?t+=\\\"B\\\":q(l)&&(t+=U[c/3+5]));return a?_+t:t}function W(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function Y(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function X(t,e,r){var n,i,a=[],o=[],l=t.layout;for(n=0;n<e.length;n++)a.push(A.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(A.getFromId(t,r[n]));var c=Object.keys(h),u=[\\\"anchor\\\",\\\"domain\\\",\\\"overlaying\\\",\\\"position\\\",\\\"side\\\",\\\"tickangle\\\",\\\"editType\\\"],f=[\\\"linear\\\",\\\"log\\\"];for(n=0;n<c.length;n++){var p=c[n],d=a[0][p],g=o[0][p],v=!0,m=!1,y=!1;if(\\\"_\\\"!==p.charAt(0)&&\\\"function\\\"!=typeof d&&-1===u.indexOf(p)){for(i=1;i<a.length&&v;i++){var x=a[i][p];\\\"type\\\"===p&&-1!==f.indexOf(d)&&-1!==f.indexOf(x)&&d!==x?m=!0:x!==d&&(v=!1)}for(i=1;i<o.length&&v;i++){var b=o[i][p];\\\"type\\\"===p&&-1!==f.indexOf(g)&&-1!==f.indexOf(b)&&g!==b?y=!0:o[i][p]!==g&&(v=!1)}v&&(m&&(l[a[0]._name].type=\\\"linear\\\"),y&&(l[o[0]._name].type=\\\"linear\\\"),Z(l,p,a,o,t._fullLayout._dfltTitle))}}for(n=0;n<t._fullLayout.annotations.length;n++){var _=t._fullLayout.annotations[n];-1!==e.indexOf(_.xref)&&-1!==r.indexOf(_.yref)&&s.swapAttrs(l.annotations[n],[\\\"?\\\"])}}function Z(t,e,r,n,i){var a,o=s.nestedProperty,l=o(t[r[0]._name],e).get(),c=o(t[n[0]._name],e).get();for(\\\"title\\\"===e&&(l===i.x&&(l=i.y),c===i.y&&(c=i.x)),a=0;a<r.length;a++)o(t,r[a]._name+\\\".\\\"+e).set(c);for(a=0;a<n.length;a++)o(t,n[a]._name+\\\".\\\"+e).set(l)}function $(t){return\\\"angularaxis\\\"===t._id}A.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function c(t){return\\\"string\\\"!=typeof t?t:Number(t.replace(\\\"M\\\",\\\"\\\"))*v}function u(t,e){var r=[\\\"L\\\",\\\"D\\\"];if(typeof t==typeof e){if(\\\"number\\\"==typeof t)return t-e;var n=r.indexOf(t.charAt(0)),i=r.indexOf(e.charAt(0));return n===i?Number(t.replace(/(L|D)/g,\\\"\\\"))-Number(e.replace(/(L|D)/g,\\\"\\\")):n-i}return\\\"number\\\"==typeof t?1:-1}function f(t,e){var r=null===e[0],n=null===e[1],i=u(t,e[0])>=0,a=u(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case\\\"date\\\":case\\\"linear\\\":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&(i=t.dtick,a=n.dtickrange,o=void 0,void 0,void 0,o=c||function(t){return t},s=a[0],l=a[1],(!s&&\\\"number\\\"!=typeof s||o(s)<=o(i))&&(!l&&\\\"number\\\"!=typeof l||o(l)>=o(i)))){r=n;break}break;case\\\"log\\\":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&f(t.dtick,n.dtickrange)){r=n;break}}return r?r.value:t.tickformat},A.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?A.findSubplotsWithAxis(n,e):n;return i.sort(function(t,e){var r=t.substr(1).split(\\\"y\\\"),n=e.substr(1).split(\\\"y\\\");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]}),i},A.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(\\\"x\\\"===e._id.charAt(0)?\\\"^\\\"+e._id+\\\"y\\\":e._id+\\\"$\\\"),n=[],i=0;i<t.length;i++){var a=t[i];r.test(a)&&n.push(a)}return n},A.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r,i,a={_offset:0,_length:e.width,_id:\\\"\\\"},o={_offset:0,_length:e.height,_id:\\\"\\\"},s=A.list(t,\\\"x\\\",!0),l=A.list(t,\\\"y\\\",!0),c=[];for(r=0;r<s.length;r++)for(c.push({x:s[r],y:o}),i=0;i<l.length;i++)0===r&&c.push({x:a,y:l[i]}),c.push({x:s[r],y:l[i]});var u=e._clips.selectAll(\\\".axesclip\\\").data(c,function(t){return t.x._id+t.y._id});u.enter().append(\\\"clipPath\\\").classed(\\\"axesclip\\\",!0).attr(\\\"id\\\",function(t){return\\\"clip\\\"+e._uid+t.x._id+t.y._id}).append(\\\"rect\\\"),u.exit().remove(),u.each(function(t){n.select(this).select(\\\"rect\\\").attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})})}},A.doTicks=function(t,e,r){var n=t._fullLayout;\\\"redraw\\\"===e&&n._paper.selectAll(\\\"g.subplot\\\").each(function(t){var e=t[0],r=n._plots[e],i=r.xaxis,a=r.yaxis;r.xaxislayer.selectAll(\\\".\\\"+i._id+\\\"tick\\\").remove(),r.yaxislayer.selectAll(\\\".\\\"+a._id+\\\"tick\\\").remove(),r.gridlayer&&r.gridlayer.selectAll(\\\"path\\\").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll(\\\"path\\\").remove(),n._infolayer.select(\\\".g-\\\"+i._id+\\\"title\\\").remove(),n._infolayer.select(\\\".g-\\\"+a._id+\\\"title\\\").remove()});var i=e&&\\\"redraw\\\"!==e?e:A.listIds(t);s.syncOrAsync(i.map(function(e){return function(){if(e){var n=A.doTicksSingle(t,e,r),i=A.getFromId(t,e);return i._r=i.range.slice(),i._rl=s.simpleMap(i._r,i.r2l),n}}}))},A.doTicksSingle=function(t,e,r){var o,h=t._fullLayout,p=!1;s.isPlainObject(e)?(o=e,p=!0):o=A.getFromId(t,e),o.setScale();var d,g,v,m,y,x,b=o._id,_=b.charAt(0),w=A.counterLetter(b),T=o._vals=A.calcTicks(o),C=function(t){return[t.text,t.x,o.mirror,t.font,t.fontSize,t.fontColor].join(\\\"_\\\")},E=b+\\\"tick\\\",L=b+\\\"grid\\\",z=b+\\\"zl\\\",O=(o.linewidth||1)/2,I=\\\"outside\\\"===o.ticks?o.ticklen:0,P=0,D=f.crispRound(t,o.gridwidth,1),R=f.crispRound(t,o.zerolinewidth,D),B=f.crispRound(t,o.tickwidth,1);if(o._counterangle&&\\\"outside\\\"===o.ticks){var F=o._counterangle*Math.PI/180;I=o.ticklen*Math.cos(F)+1,P=o.ticklen*Math.sin(F)}if(o.showticklabels&&(\\\"outside\\\"===o.ticks||o.showline)&&(I+=.2*o.tickfont.size),\\\"x\\\"===_)d=[\\\"bottom\\\",\\\"top\\\"],g=o._transfn||function(t){return\\\"translate(\\\"+(o._offset+o.l2p(t.x))+\\\",0)\\\"},v=function(t,e){if(o._counterangle){var r=o._counterangle*Math.PI/180;return\\\"M0,\\\"+t+\\\"l\\\"+Math.sin(r)*e+\\\",\\\"+Math.cos(r)*e}return\\\"M0,\\\"+t+\\\"v\\\"+e};else if(\\\"y\\\"===_)d=[\\\"left\\\",\\\"right\\\"],g=o._transfn||function(t){return\\\"translate(0,\\\"+(o._offset+o.l2p(t.x))+\\\")\\\"},v=function(t,e){if(o._counterangle){var r=o._counterangle*Math.PI/180;return\\\"M\\\"+t+\\\",0l\\\"+Math.cos(r)*e+\\\",\\\"+-Math.sin(r)*e}return\\\"M\\\"+t+\\\",0h\\\"+e};else{if(!$(o))return void s.warn(\\\"Unrecognized doTicks axis:\\\",b);d=[\\\"left\\\",\\\"right\\\"],g=o._transfn,v=function(t,e){return\\\"M\\\"+t+\\\",0h\\\"+e}}var N=o.side||d[0],j=[-1,1,N===d[1]?1:-1];if(\\\"inside\\\"!==o.ticks==(\\\"x\\\"===_)&&(j=j.map(function(t){return-t})),o.visible){o._tickFilter&&(T=T.filter(o._tickFilter));var V=o._valsClipped=$(o)?T:T.filter(function(t){return W(o,t.x)});if(p){if(Z(o._axislayer,v(o._pos+O*j[2],j[2]*o.ticklen)),o._counteraxis)Q({gridlayer:o._gridlayer,zerolinelayer:o._zerolinelayer},o._counteraxis);return J(o._axislayer,o._pos)}if(h._has(\\\"cartesian\\\")){m=A.getSubplots(t,o);var U={};m.map(function(t){var e=h._plots[t],r=e[w+\\\"axis\\\"],n=r._mainAxis._id;U[n]||(U[n]=1,Q(e,r))});var q=o._mainSubplot,H=h._plots[q],G=[];if(o.ticks){var Y=j[2],X=v(o._mainLinePosition+O*Y,Y*o.ticklen);o._anchorAxis&&o.mirror&&!0!==o.mirror&&(X+=v(o._mainMirrorPosition-O*Y,-Y*o.ticklen)),Z(H[_+\\\"axislayer\\\"],X),G=Object.keys(o._linepositions||{})}return G.map(function(t){var e=h._plots[t][_+\\\"axislayer\\\"],r=o._linepositions[t]||[];function n(t){var e=j[t];return v(r[t]+O*e,e*o.ticklen)}Z(e,n(0)+n(1))}),J(H[_+\\\"axislayer\\\"],o._mainLinePosition)}}function Z(t,e){var r=t.selectAll(\\\"path.\\\"+E).data(\\\"inside\\\"===o.ticks?V:T,C);e&&o.ticks?(r.enter().append(\\\"path\\\").classed(E,1).classed(\\\"ticks\\\",1).classed(\\\"crisp\\\",1).call(u.stroke,o.tickcolor).style(\\\"stroke-width\\\",B+\\\"px\\\").attr(\\\"d\\\",e),r.attr(\\\"transform\\\",g),r.exit().remove()):r.remove()}function J(e,r){if(y=e.selectAll(\\\"g.\\\"+E).data(T,C),!i(r))return y.remove(),void K();if(!o.showticklabels)return y.remove(),K(),void z();var c,u,p,d,v;\\\"x\\\"===_?(c=function(t){return t.dx+P*v},d=r+(I+O)*(v=\\\"bottom\\\"===N?1:-1),u=function(t){return t.dy+d+t.fontSize*(\\\"bottom\\\"===N?1:-.2)},p=function(t){return i(t)&&0!==t&&180!==t?t*v<0?\\\"end\\\":\\\"start\\\":\\\"middle\\\"}):\\\"y\\\"===_?(v=\\\"right\\\"===N?1:-1,u=function(t){return t.dy+t.fontSize*k-P*v},c=function(t){return t.dx+r+(I+O+(90===Math.abs(o.tickangle)?t.fontSize/2:0))*v},p=function(t){return i(t)&&90===Math.abs(t)?\\\"middle\\\":\\\"right\\\"===N?\\\"start\\\":\\\"end\\\"}):$(o)&&(o._labelShift=P,o._labelStandoff=I,o._pad=O,c=o._labelx,u=o._labely,p=o._labelanchor);var w=0,A=0,S=[];function L(t,e){t.each(function(t){var r=p(e,t),a=n.select(this),o=a.select(\\\".text-math-group\\\"),s=g.call(a.node(),t)+(i(e)&&0!=+e?\\\" rotate(\\\"+e+\\\",\\\"+c(t)+\\\",\\\"+(u(t)-t.fontSize/2)+\\\")\\\":\\\"\\\"),h=function(t,e,r){var n=(t-1)*e;if(\\\"x\\\"===_){if(r<-60||60<r)return-.5*n;if(\\\"top\\\"===N)return-n}else{if((r*=\\\"left\\\"===N?1:-1)<-30)return-n;if(r<30)return-.5*n}return 0}(l.lineCount(a),M*t.fontSize,i(e)?+e:0);if(h&&(s+=\\\" translate(0, \\\"+h+\\\")\\\"),o.empty())a.select(\\\"text\\\").attr({transform:s,\\\"text-anchor\\\":r});else{var d=f.bBox(o.node()).width*{end:-.5,start:.5}[r];o.attr(\\\"transform\\\",s+(d?\\\"translate(\\\"+d+\\\",0)\\\":\\\"\\\"))}})}function z(){if(o.showticklabels){var r=t.getBoundingClientRect(),n=e.node().getBoundingClientRect();o._boundingBox={width:n.width,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,bottom:n.bottom-r.top}}else{var i,a=h._size;\\\"x\\\"===_?(i=\\\"free\\\"===o.anchor?a.t+a.h*(1-o.position):a.t+a.h*(1-o._anchorAxis.domain[{bottom:0,top:1}[o.side]]),o._boundingBox={top:i,bottom:i,left:o._offset,right:o._offset+o._length,width:o._length,height:0}):(i=\\\"free\\\"===o.anchor?a.l+a.w*o.position:a.l+a.w*o._anchorAxis.domain[{left:0,right:1}[o.side]],o._boundingBox={left:i,right:i,bottom:o._offset+o._length,top:o._offset,height:o._length,width:0})}if(m){var s=o._counterSpan=[1/0,-1/0];for(x=0;x<m.length;x++){var l=h._plots[m[x]][\\\"x\\\"===_?\\\"yaxis\\\":\\\"xaxis\\\"];c(s,[l._offset,l._offset+l._length])}\\\"free\\\"===o.anchor&&c(s,\\\"x\\\"===_?[o._boundingBox.bottom,o._boundingBox.top]:[o._boundingBox.right,o._boundingBox.left])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[1])}}y.enter().append(\\\"g\\\").classed(E,1).append(\\\"text\\\").attr(\\\"text-anchor\\\",\\\"middle\\\").each(function(e){var r=n.select(this),i=t._promises.length;r.call(l.positionText,c(e),u(e)).call(f.font,e.font,e.fontSize,e.fontColor).text(e.text).call(l.convertToTspans,t),(i=t._promises[i])?S.push(t._promises.pop().then(function(){L(r,o.tickangle)})):L(r,o.tickangle)}),y.exit().remove(),y.each(function(t){w=Math.max(w,t.fontSize)}),$(o)&&y.each(function(t){n.select(this).select(\\\"text\\\").call(l.positionText,c(t),u(t))}),L(y,o._lastangle||o.tickangle);var D=s.syncOrAsync([function(){return S.length&&Promise.all(S)},function(){if(L(y,o.tickangle),\\\"x\\\"===_&&!i(o.tickangle)&&(\\\"log\\\"!==o.type||\\\"D\\\"!==String(o.dtick).charAt(0))){var t=[];for(y.each(function(e){var r=n.select(this),i=r.select(\\\".text-math-group\\\"),a=o.l2p(e.x);i.empty()&&(i=r.select(\\\"text\\\"));var s=f.bBox(i.node());t.push({top:0,bottom:10,height:10,left:a-s.width/2,right:a+s.width/2+2,width:s.width+2})}),x=0;x<t.length-1;x++)if(s.bBoxIntersect(t[x],t[x+1])){A=30;break}A&&(Math.abs((T[T.length-1].x-T[0].x)*o._m)/(T.length-1)<2.5*w&&(A=90),L(y,A)),o._lastangle=A}return K(),b+\\\" done\\\"},z,function(){var e=o._name+\\\".automargin\\\";if(\\\"x\\\"===_||\\\"y\\\"===_)if(o.automargin){var r=o.side[0],n={x:0,y:0,r:0,l:0,t:0,b:0};\\\"x\\\"===_?(n.y=\\\"free\\\"===o.anchor?o.position:o._anchorAxis.domain[\\\"t\\\"===r?1:0],n[r]+=o._boundingBox.height):(n.x=\\\"free\\\"===o.anchor?o.position:o._anchorAxis.domain[\\\"r\\\"===r?1:0],n[r]+=o._boundingBox.width),o.title!==h._dfltTitle[_]&&(n[r]+=o.titlefont.size),a.autoMargin(t,e,n)}else a.autoMargin(t,e)}]);return D&&D.then&&t._promises.push(D),D}function K(){if(!(r||o.rangeslider&&o.rangeslider.visible&&o._boundingBox&&\\\"bottom\\\"===o.side)){var e,n,i,a,s={selection:y,side:o.side},l=b.charAt(0),u=t._fullLayout._size,p=o.titlefont.size;if(y.size()){var d=f.getTranslate(y.node().parentNode);s.offsetLeft=d.x,s.offsetTop=d.y}var g=10+1.5*p+(o.linewidth?o.linewidth-1:0);\\\"x\\\"===l?(n=\\\"free\\\"===o.anchor?{_offset:u.t+(1-(o.position||0))*u.h,_length:0}:S.getFromId(t,o.anchor),i=o._offset+o._length/2,a=\\\"top\\\"===o.side?-g-p*(o.showticklabels?1:0):n._length+g+p*(o.showticklabels?1.5:.5),a+=n._offset,s.side||(s.side=\\\"bottom\\\")):(n=\\\"free\\\"===o.anchor?{_offset:u.l+(o.position||0)*u.w,_length:0}:S.getFromId(t,o.anchor),a=o._offset+o._length/2,i=\\\"right\\\"===o.side?n._length+g+p*(o.showticklabels?1:.5):-g-p*(o.showticklabels?.5:0),i+=n._offset,e={rotate:\\\"-90\\\",offset:0},s.side||(s.side=\\\"left\\\")),c.draw(t,b+\\\"title\\\",{propContainer:o,propName:o._name+\\\".title\\\",placeholder:h._dfltTitle[l],avoid:s,transform:e,attributes:{x:i,y:a,\\\"text-anchor\\\":\\\"middle\\\"}})}}function Q(e,r){if(!h._hasOnlyLargeSploms){var i=e.gridlayer.selectAll(\\\".\\\"+b),a=e.zerolinelayer,s=o._gridpath||(\\\"x\\\"===_?\\\"M0,\\\"+r._offset+\\\"v\\\":\\\"M\\\"+r._offset+\\\",0h\\\")+r._length,l=i.selectAll(\\\"path.\\\"+L).data(!1===o.showgrid?[]:V,C);if(l.enter().append(\\\"path\\\").classed(L,1).classed(\\\"crisp\\\",1).attr(\\\"d\\\",s).each(function(t){o.zeroline&&(\\\"linear\\\"===o.type||\\\"-\\\"===o.type)&&Math.abs(t.x)<o.dtick/100&&n.select(this).remove()}),l.attr(\\\"transform\\\",g).call(u.stroke,o.gridcolor||\\\"#ddd\\\").style(\\\"stroke-width\\\",D+\\\"px\\\"),\\\"function\\\"==typeof s&&l.attr(\\\"d\\\",s),l.exit().remove(),a){var c={x:0,id:b},f=A.shouldShowZeroLine(t,o,r),p=a.selectAll(\\\"path.\\\"+z).data(f?[c]:[]);p.enter().append(\\\"path\\\").classed(z,1).classed(\\\"zl\\\",1).classed(\\\"crisp\\\",1).attr(\\\"d\\\",s).each(function(){a.selectAll(\\\"path\\\").sort(function(t,e){return S.idSort(t.id,e.id)})}),p.attr(\\\"transform\\\",g).call(u.stroke,o.zerolinecolor||u.defaultLine).style(\\\"stroke-width\\\",R+\\\"px\\\"),p.exit().remove()}}}},A.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&(\\\"linear\\\"===e.type||\\\"-\\\"===e.type)&&e._valsClipped.length&&(W(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(!i)return;var a=t._fullLayout,o=e._id.charAt(0),s=A.counterLetter(e._id),l=e._offset+(Math.abs(n[0])<Math.abs(n[1])==(\\\"x\\\"===o)?0:e._length);function c(t){if(!t.showline||!t.linewidth)return!1;var r=Math.max((t.linewidth+e.zerolinewidth)/2,1);function n(t){return\\\"number\\\"==typeof t&&Math.abs(t-l)<r}if(n(t._mainLinePosition)||n(t._mainMirrorPosition))return!0;var i=t._linepositions||{};for(var a in i)if(n(i[a][0])||n(i[a][1]))return!0}var u=a._plots[r._mainSubplot];if(!(u.mainplotinfo||u).overlays.length)return c(r);for(var f=A.list(t,s),h=0;h<f.length;h++){var p=f[h];if(p._mainAxis===i&&c(p))return!0}}(t,e,r,n)||function(t,e){for(var r=t._fullData,n=e._mainSubplot,i=e._id.charAt(0),a=0;a<r.length;a++){var s=r[a];if(!0===s.visible&&s.xaxis+s.yaxis===n&&(o.traceIs(s,\\\"bar\\\")&&s.orientation==={x:\\\"h\\\",y:\\\"v\\\"}[i]||s.fill&&s.fill.charAt(s.fill.length-1)===i))return!0}return!1}(t,e))},A.allowAutoMargin=function(t){for(var e=A.list(t,\\\"\\\",!0),r=0;r<e.length;r++){var n=e[r];n.automargin&&a.allowAutoMargin(t,n._name+\\\".automargin\\\"),n.rangeslider&&n.rangeslider.visible&&a.allowAutoMargin(t,\\\"rangeslider\\\"+n._id)}},A.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r<e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&&s){for(n=0;n<i.length;n++)-1===i[n].x.indexOf(o)&&-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,c=i[a[0]];if(a.length>1)for(n=1;n<a.length;n++)l=i[a[n]],Y(c.x,l.x),Y(c.y,l.y);Y(c.x,[o]),Y(c.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)X(t,r[n].x,r[n].y)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../components/titles\\\":661,\\\"../../constants/alignment\\\":668,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/plots\\\":809,\\\"../../registry\\\":828,\\\"./autorange\\\":744,\\\"./axis_autotype\\\":746,\\\"./axis_ids\\\":748,\\\"./clean_ticks\\\":750,\\\"./layout_attributes\\\":758,\\\"./set_convert\\\":764,d3:148,\\\"fast-isnumeric\\\":214}],746:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e){return function(t,e){for(var r=Math.max(1,(t.length-1)/1e3),a=0,o=0,s={},l=0;l<t.length;l+=r){var c=t[Math.round(l)],u=String(c);s[u]||(s[u]=1,i.isDateTime(c,e)&&(a+=1),n(c)&&(o+=1))}return a>2*o}(t,e)?\\\"date\\\":function(t){for(var e=Math.max(1,(t.length-1)/1e3),r=0,n=0,o={},s=0;s<t.length;s+=e){var l=t[Math.round(s)],c=String(l);o[c]||(o[c]=1,\\\"boolean\\\"==typeof l?n++:i.cleanNumber(l)!==a?r++:\\\"string\\\"==typeof l&&n++)}return n>2*r}(t)?\\\"category\\\":function(t){if(!t)return!1;for(var e=0;e<t.length;e++)if(n(t[e]))return!0;return!1}(t)?\\\"linear\\\":\\\"-\\\"}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"fast-isnumeric\\\":214}],747:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"./layout_attributes\\\"),o=t(\\\"./tick_value_defaults\\\"),s=t(\\\"./tick_mark_defaults\\\"),l=t(\\\"./tick_label_defaults\\\"),c=t(\\\"./category_order_defaults\\\"),u=t(\\\"./line_grid_defaults\\\"),f=t(\\\"./set_convert\\\");e.exports=function(t,e,r,h,p){var d=h.letter,g=h.font||{},v=h.splomStash||{},m=r(\\\"visible\\\",!h.cheateronly),y=e.type;\\\"date\\\"===y&&n.getComponentMethod(\\\"calendars\\\",\\\"handleDefaults\\\")(t,e,\\\"calendar\\\",h.calendar);if(f(e,p),!r(\\\"autorange\\\",!e.isValidRange(t.range))||\\\"linear\\\"!==y&&\\\"-\\\"!==y||r(\\\"rangemode\\\"),r(\\\"range\\\"),e.cleanRange(),c(t,e,r,h),\\\"category\\\"===y||h.noHover||r(\\\"hoverformat\\\"),!m)return e;var x=r(\\\"color\\\"),b=x!==a.color.dflt?x:g.color;return r(\\\"title\\\",v.label||p._dfltTitle[d]),i.coerceFont(r,\\\"titlefont\\\",{family:g.family,size:Math.round(1.2*g.size),color:b}),o(t,e,r,y),l(t,e,r,y,h),s(t,e,r,h),u(t,e,r,{dfltColor:x,bgColor:h.bgColor,showGrid:h.showGrid,attributes:a}),(e.showline||e.ticks)&&r(\\\"mirror\\\"),h.automargin&&r(\\\"automargin\\\"),e}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./category_order_defaults\\\":749,\\\"./layout_attributes\\\":758,\\\"./line_grid_defaults\\\":760,\\\"./set_convert\\\":764,\\\"./tick_label_defaults\\\":765,\\\"./tick_mark_defaults\\\":766,\\\"./tick_value_defaults\\\":767}],748:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"./constants\\\");r.id2name=function(t){if(\\\"string\\\"==typeof t&&t.match(i.AX_ID_PATTERN)){var e=t.substr(1);return\\\"1\\\"===e&&(e=\\\"\\\"),t.charAt(0)+\\\"axis\\\"+e}},r.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return\\\"1\\\"===e&&(e=\\\"\\\"),t.charAt(0)+e}},r.cleanId=function(t,e){if(t.match(i.AX_ID_PATTERN)&&(!e||t.charAt(0)===e)){var r=t.substr(1).replace(/^0+/,\\\"\\\");return\\\"1\\\"===r&&(r=\\\"\\\"),t.charAt(0)+r}},r.list=function(t,e,n){var i=t._fullLayout;if(!i)return[];var a,o=r.listIds(t,e),s=new Array(o.length);for(a=0;a<o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+\\\"axis\\\"+l.substr(1)]}if(!n){var c=i._subplots.gl3d||[];for(a=0;a<c.length;a++){var u=i[c[a]];e?s.push(u[e+\\\"axis\\\"]):s.push(u.xaxis,u.yaxis,u.zaxis)}}return s},r.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+\\\"axis\\\"]:n.xaxis.concat(n.yaxis)},r.getFromId=function(t,e,n){var i=t._fullLayout;return\\\"x\\\"===n?e=e.replace(/y[0-9]*/,\\\"\\\"):\\\"y\\\"===n&&(e=e.replace(/x[0-9]*/,\\\"\\\")),i[r.id2name(e)]},r.getFromTrace=function(t,e,i){var a=t._fullLayout,o=null;if(n.traceIs(e,\\\"gl3d\\\")){var s=e.scene;\\\"scene\\\"===s.substr(0,5)&&(o=a[s][i+\\\"axis\\\"])}else o=r.getFromId(t,e[i+\\\"axis\\\"]||i);return o},r.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r>n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)}},{\\\"../../registry\\\":828,\\\"./constants\\\":751}],749:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){if(\\\"category\\\"===e.type){var i,a=t.categoryarray,o=Array.isArray(a)&&a.length>0;o&&(i=\\\"array\\\");var s,l=r(\\\"categoryorder\\\",i);\\\"array\\\"===l&&(s=r(\\\"categoryarray\\\")),o||\\\"array\\\"!==l||(l=e.categoryorder=\\\"trace\\\"),\\\"trace\\\"===l?e._initialCategories=[]:\\\"array\\\"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;n<e.data.length;n++){var s=e.data[n];s[a+\\\"axis\\\"]===t._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][a];for(i=0;i<l.length;i++){var c=l[i];null!=c&&(o[c]=1)}}return Object.keys(o)}(e,n).sort(),\\\"category ascending\\\"===l?e._initialCategories=s:\\\"category descending\\\"===l&&(e._initialCategories=s.reverse()))}}},{}],750:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").ONEDAY;r.dtick=function(t,e){var r=\\\"log\\\"===e,i=\\\"date\\\"===e,o=\\\"category\\\"===e,s=i?a:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:o?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if(\\\"string\\\"!=typeof t||!i&&!r)return s;var l=t.charAt(0),c=t.substr(1);return(c=n(c)?Number(c):0)<=0||!(i&&\\\"M\\\"===l&&c===Math.round(c)||r&&\\\"L\\\"===l||r&&\\\"D\\\"===l&&(1===c||2===c))?s:t},r.tick0=function(t,e,r,a){return\\\"date\\\"===e?i.cleanDate(t,i.dateTick0(r)):\\\"D1\\\"!==a&&\\\"D2\\\"!==a?n(t)?Number(t):0:void 0}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"fast-isnumeric\\\":214}],751:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/regex\\\").counter;e.exports={idRegex:{x:n(\\\"x\\\"),y:n(\\\"y\\\")},attrRegex:n(\\\"[xy]axis\\\"),xAxisMatch:n(\\\"xaxis\\\"),yAxisMatch:n(\\\"yaxis\\\"),AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:\\\"-select\\\",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:[\\\"heatmaplayer\\\",\\\"contourcarpetlayer\\\",\\\"contourlayer\\\",\\\"barlayer\\\",\\\"carpetlayer\\\",\\\"violinlayer\\\",\\\"boxlayer\\\",\\\"ohlclayer\\\",\\\"scattercarpetlayer\\\",\\\"scatterlayer\\\"],layerValue2layerClass:{\\\"above traces\\\":\\\"above\\\",\\\"below traces\\\":\\\"below\\\"}}},{\\\"../../lib/regex\\\":713}],752:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./axis_ids\\\").id2name;e.exports=function(t,e,r,a,o){var s=o._axisConstraintGroups,l=e._id,c=l.charAt(0);if(!e.fixedrange&&(r(\\\"constrain\\\"),n.coerce(t,e,{constraintoward:{valType:\\\"enumerated\\\",values:\\\"x\\\"===c?[\\\"left\\\",\\\"center\\\",\\\"right\\\"]:[\\\"bottom\\\",\\\"middle\\\",\\\"top\\\"],dflt:\\\"x\\\"===c?\\\"center\\\":\\\"middle\\\"}},\\\"constraintoward\\\"),t.scaleanchor)){var u=function(t,e,r,n){var a,o,s,l,c=n[i(e)].type,u=[];for(o=0;o<r.length;o++)(s=r[o])!==e&&((l=n[i(s)]).type!==c||l.fixedrange||u.push(s));for(a=0;a<t.length;a++)if(t[a][e]){var f=t[a],h=[];for(o=0;o<u.length;o++)s=u[o],f[s]||h.push(s);return{linkableAxes:h,thisGroup:f}}return{linkableAxes:u,thisGroup:null}}(s,l,a,o),f=n.coerce(t,e,{scaleanchor:{valType:\\\"enumerated\\\",values:u.linkableAxes}},\\\"scaleanchor\\\");if(f){var h=r(\\\"scaleratio\\\");h||(h=e.scaleratio=1),function(t,e,r,n,i){var a,o,s,l,c;null===e?((e={})[r]=1,c=t.length,t.push(e)):c=t.indexOf(e);var u=Object.keys(e);for(a=0;a<t.length;a++)if(s=t[a],a!==c&&s[n]){var f=s[n];for(o=0;o<u.length;o++)l=u[o],s[l]=f*i*e[l];return void t.splice(c,1)}if(1!==i)for(o=0;o<u.length;o++)e[u[o]]*=i;e[n]=1}(s,u.thisGroup,l,f,h)}else-1!==a.indexOf(t.scaleanchor)&&n.warn(\\\"ignored \\\"+e._name+'.scaleanchor: \\\"'+t.scaleanchor+'\\\" to avoid either an infinite loop and possibly inconsistent scaleratios, or because the targetaxis has fixed range.')}}},{\\\"../../lib\\\":696,\\\"./axis_ids\\\":748}],753:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./axis_ids\\\").id2name,i=t(\\\"./scale_zoom\\\"),a=t(\\\"./autorange\\\").makePadFn,o=t(\\\"./autorange\\\").concatExtremes,s=t(\\\"../../constants/numerical\\\").ALMOST_EQUAL,l=t(\\\"../../constants/alignment\\\").FROM_BL;function c(t,e){var r=t._inputDomain,n=l[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e]}r.enforce=function(t){var e,r,l,u,f,h,p,d=t._fullLayout,g=d._axisConstraintGroups||[];for(e=0;e<g.length;e++){var v=g[e],m=Object.keys(v),y=1/0,x=0,b=1/0,_={},w={},k=!1;for(r=0;r<m.length;r++)w[l=m[r]]=u=d[n(l)],u._inputDomain?u.domain=u._inputDomain.slice():u._inputDomain=u.domain.slice(),u._inputRange||(u._inputRange=u.range.slice()),u.setScale(),_[l]=f=Math.abs(u._m)/v[l],y=Math.min(y,f),\\\"domain\\\"!==u.constrain&&u._constraintShrinkable||(b=Math.min(b,f)),delete u._constraintShrinkable,x=Math.max(x,f),\\\"domain\\\"===u.constrain&&(k=!0);if(!(y>s*x)||k)for(r=0;r<m.length;r++)if(f=_[l=m[r]],h=(u=w[l]).constrain,f!==b||\\\"domain\\\"===h)if(p=f/b,\\\"range\\\"===h)i(u,p);else{var M=u._inputDomain,A=(u.domain[1]-u.domain[0])/(M[1]-M[0]),T=(u.r2l(u.range[1])-u.r2l(u.range[0]))/(u.r2l(u._inputRange[1])-u.r2l(u._inputRange[0]));if((p/=A)*T<1){u.domain=u._input.domain=M.slice(),i(u,p);continue}if(T<1&&(u.range=u._input.range=u._inputRange.slice(),p*=T),u.autorange){var S=u.r2l(u.range[0]),C=u.r2l(u.range[1]),E=(S+C)/2,L=E,z=E,O=Math.abs(C-E),I=E-O*p*1.0001,P=E+O*p*1.0001,D=a(u);c(u,p),u.setScale();var R,B,F=Math.abs(u._m),N=o(t,u),j=N.min,V=N.max;for(B=0;B<j.length;B++)(R=j[B].val-D(j[B])/F)>I&&R<L&&(L=R);for(B=0;B<V.length;B++)(R=V[B].val+D(V[B])/F)<P&&R>z&&(z=R);p/=(z-L)/(2*O),L=u.l2r(L),z=u.l2r(z),u.range=u._input.range=S<C?[L,z]:[z,L]}c(u,p)}}},r.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a<i.length;a++)if(i[a][n]){r=!0;break}r&&\\\"domain\\\"===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},{\\\"../../constants/alignment\\\":668,\\\"../../constants/numerical\\\":673,\\\"./autorange\\\":744,\\\"./axis_ids\\\":748,\\\"./scale_zoom\\\":762}],754:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"has-passive-events\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../../components/color\\\"),u=t(\\\"../../components/drawing\\\"),f=t(\\\"../../components/fx\\\"),h=t(\\\"../../lib/setcursor\\\"),p=t(\\\"../../components/dragelement\\\"),d=t(\\\"../../constants/alignment\\\").FROM_TL,g=t(\\\"../../lib/clear_gl_canvases\\\"),v=t(\\\"../../plot_api/subroutines\\\").redrawReglTraces,m=t(\\\"../plots\\\"),y=t(\\\"./axes\\\").doTicksSingle,x=t(\\\"./axis_ids\\\").getFromId,b=t(\\\"./select\\\").prepSelect,_=t(\\\"./select\\\").clearSelect,w=t(\\\"./select\\\").selectOnClick,k=t(\\\"./scale_zoom\\\"),M=t(\\\"./constants\\\"),A=M.MINDRAG,T=M.MINZOOM,S=!0;function C(t,e,r,n){var i=s.ensureSingle(t.draglayer,e,r,function(e){e.classed(\\\"drag\\\",!0).style({fill:\\\"transparent\\\",\\\"stroke-width\\\":0}).attr(\\\"data-subplot\\\",t.id)});return i.call(h,n),i.node()}function E(t,e,r,i,a,o,s){var l=C(t,\\\"rect\\\",e,r);return n.select(l).call(u.setRect,i,a,o,s),l}function L(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return\\\"\\\"}function z(t,e,r,n,i){var a,o,s,l;for(a=0;a<t.length;a++)(o=t[a]).fixedrange||(s=o._rl[0],l=o._rl[1]-s,o.range=[o.l2r(s+l*e),o.l2r(s+l*r)],n[o._name+\\\".range[0]\\\"]=o.range[0],n[o._name+\\\".range[1]\\\"]=o.range[1]);if(i&&i.length){var c=(e+(1-r))/2;z(i,c,1-c,n)}}function O(t,e){for(var r=0;r<t.length;r++){var n=t[r];n.fixedrange||(n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)])}}function I(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function P(t,e,r,n,i){return t.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox\\\").style({fill:e>.2?\\\"rgba(0,0,0,0)\\\":\\\"rgba(255,255,255,0)\\\",\\\"stroke-width\\\":0}).attr(\\\"transform\\\",\\\"translate(\\\"+r+\\\", \\\"+n+\\\")\\\").attr(\\\"d\\\",i+\\\"Z\\\")}function D(t,e,r){return t.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox-corners\\\").style({fill:c.background,stroke:c.defaultLine,\\\"stroke-width\\\":1,opacity:0}).attr(\\\"transform\\\",\\\"translate(\\\"+e+\\\", \\\"+r+\\\")\\\").attr(\\\"d\\\",\\\"M0,0Z\\\")}function R(t,e,r,n,i,a){t.attr(\\\"d\\\",n+\\\"M\\\"+r.l+\\\",\\\"+r.t+\\\"v\\\"+r.h+\\\"h\\\"+r.w+\\\"v-\\\"+r.h+\\\"h-\\\"+r.w+\\\"Z\\\"),B(t,e,i,a)}function B(t,e,r,n){r||(t.transition().style(\\\"fill\\\",n>.2?\\\"rgba(0,0,0,0.4)\\\":\\\"rgba(255,255,255,0.3)\\\").duration(200),e.transition().style(\\\"opacity\\\",1).duration(200))}function F(t){n.select(t).selectAll(\\\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\\\").remove()}function N(t){S&&t.data&&t._context.showTips&&(s.notifier(s._(t,\\\"Double-click to zoom back out\\\"),\\\"long\\\"),S=!1)}function j(t){return\\\"lasso\\\"===t||\\\"select\\\"===t}function V(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,T)/2);return\\\"M\\\"+(t.l-3.5)+\\\",\\\"+(t.t-.5+e)+\\\"h3v\\\"+-e+\\\"h\\\"+e+\\\"v-3h-\\\"+(e+3)+\\\"ZM\\\"+(t.r+3.5)+\\\",\\\"+(t.t-.5+e)+\\\"h-3v\\\"+-e+\\\"h\\\"+-e+\\\"v-3h\\\"+(e+3)+\\\"ZM\\\"+(t.r+3.5)+\\\",\\\"+(t.b+.5-e)+\\\"h-3v\\\"+e+\\\"h\\\"+-e+\\\"v3h\\\"+(e+3)+\\\"ZM\\\"+(t.l-3.5)+\\\",\\\"+(t.b+.5-e)+\\\"h3v\\\"+e+\\\"h\\\"+e+\\\"v3h-\\\"+(e+3)+\\\"Z\\\"}function U(t,e){if(a){var r=void 0!==t.onwheel?\\\"wheel\\\":\\\"mousewheel\\\";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel&&(t.onmousewheel=e)}function q(t){var e=[];for(var r in t)e.push(t[r]);return e}e.exports={makeDragBox:function(t,e,r,a,c,h,S,C){var B,H,G,W,Y,X,Z,$,J,K,Q,tt,et,rt,nt,it,at,ot,st,lt,ct,ut=t._fullLayout._zoomlayer,ft=S+C===\\\"nsew\\\",ht=1===(S+C).length;function pt(){if(B=e.xaxis,H=e.yaxis,J=B._length,K=H._length,Z=B._offset,$=H._offset,(G={})[B._id]=B,(W={})[H._id]=H,S&&C)for(var r=e.overlays,n=0;n<r.length;n++){var i=r[n].xaxis;G[i._id]=i;var a=r[n].yaxis;W[a._id]=a}Y=q(G),X=q(W),tt=L(Y,C),et=L(X,S),rt=!et&&!tt,Q=function(t,e,r){for(var n,i,a,o,l=t._fullLayout._axisConstraintGroups,c=!1,u={},f={},h=0;h<l.length;h++){var p=l[h];for(n in e)if(p[n]){for(a in p)(\\\"x\\\"===a.charAt(0)?e:r)[a]||(u[a]=1);for(i in r)p[i]&&(c=!0)}for(i in r)if(p[i])for(o in p)(\\\"x\\\"===o.charAt(0)?e:r)[o]||(f[o]=1)}c&&(s.extendFlat(u,f),f={});var d={},g=[];for(a in u){var v=x(t,a);g.push(v),d[v._id]=v}var m={},y=[];for(o in f){var b=x(t,o);y.push(b),m[b._id]=b}return{xaHash:d,yaHash:m,xaxes:g,yaxes:y,isSubplotConstrained:c}}(t,G,W),nt=Q.isSubplotConstrained,it=C||nt,at=S||nt;var o=t._fullLayout;ot=o._has(\\\"scattergl\\\"),st=o._has(\\\"splom\\\"),lt=o._has(\\\"svg\\\")}pt();var dt=function(t,e,r){return t?\\\"nsew\\\"===t?r?\\\"\\\":\\\"pan\\\"===e?\\\"move\\\":\\\"crosshair\\\":t.toLowerCase()+\\\"-resize\\\":\\\"pointer\\\"}(et+tt,t._fullLayout.dragmode,ft),gt=E(e,S+C+\\\"drag\\\",dt,r,a,c,h);if(rt&&!ft)return gt.onmousedown=null,gt.style.pointerEvents=\\\"none\\\",gt;var vt,mt,yt,xt,bt,_t,wt,kt,Mt,At,Tt={element:gt,gd:t,plotinfo:e};function St(){Tt.plotinfo.selection=!1,_(ut)}function Ct(r,i){var a=t._fullLayout.clickmode;if(F(t),2!==r||ht||function(){if(!t._transitioningWithDuration){var e,r,n,i=t._context.doubleClick,a=(tt?Y:[]).concat(et?X:[]),s={};if(\\\"reset+autosize\\\"===i)for(i=\\\"autosize\\\",r=0;r<a.length;r++)if((e=a[r])._rangeInitial&&(e.range[0]!==e._rangeInitial[0]||e.range[1]!==e._rangeInitial[1])||!e._rangeInitial&&!e.autorange){i=\\\"reset\\\";break}if(\\\"autosize\\\"===i)for(r=0;r<a.length;r++)(e=a[r]).fixedrange||(s[e._name+\\\".autorange\\\"]=!0);else if(\\\"reset\\\"===i)for((tt||nt)&&(a=a.concat(Q.xaxes)),et&&!nt&&(a=a.concat(Q.yaxes)),nt&&(tt?et||(a=a.concat(X)):a=a.concat(Y)),r=0;r<a.length;r++)(e=a[r])._rangeInitial?(n=e._rangeInitial,s[e._name+\\\".range[0]\\\"]=n[0],s[e._name+\\\".range[1]\\\"]=n[1]):s[e._name+\\\".autorange\\\"]=!0;t.emit(\\\"plotly_doubleclick\\\",null),o.call(\\\"relayout\\\",t,s)}}(),ft)a.indexOf(\\\"select\\\")>-1&&w(i,t,Y,X,e.id,Tt),a.indexOf(\\\"event\\\")>-1&&f.click(t,i,e.id);else if(1===r&&ht){var s=S?H:B,c=\\\"s\\\"===S||\\\"w\\\"===C?0:1,u=s._name+\\\".range[\\\"+c+\\\"]\\\",h=function(t,e){var r,i=t.range[e],a=Math.abs(i-t.range[1-e]);return\\\"date\\\"===t.type?i:\\\"log\\\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,n.format(\\\".\\\"+r+\\\"g\\\")(Math.pow(10,i))):(r=Math.floor(Math.log(Math.abs(i))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,n.format(\\\".\\\"+String(r)+\\\"g\\\")(i))}(s,c),p=\\\"left\\\",d=\\\"middle\\\";if(s.fixedrange)return;S?(d=\\\"n\\\"===S?\\\"top\\\":\\\"bottom\\\",\\\"right\\\"===s.side&&(p=\\\"right\\\")):\\\"e\\\"===C&&(p=\\\"right\\\"),t._context.showAxisRangeEntryBoxes&&n.select(gt).call(l.makeEditable,{gd:t,immediate:!0,background:t._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:\\\"#444\\\",horizontalAlign:p,verticalAlign:d}).on(\\\"edit\\\",function(e){var r=s.d2r(e);void 0!==r&&o.call(\\\"relayout\\\",t,u,r)})}}function Et(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(J,e+vt)),i=Math.max(0,Math.min(K,r+mt)),a=Math.abs(n-vt),o=Math.abs(i-mt);function s(){wt=\\\"\\\",yt.r=yt.l,yt.t=yt.b,Mt.attr(\\\"d\\\",\\\"M0,0Z\\\")}yt.l=Math.min(vt,n),yt.r=Math.max(vt,n),yt.t=Math.min(mt,i),yt.b=Math.max(mt,i),nt?a>T||o>T?(wt=\\\"xy\\\",a/J>o/K?(o=a*K/J,mt>i?yt.t=mt-o:yt.b=mt+o):(a=o*J/K,vt>n?yt.l=vt-a:yt.r=vt+a),Mt.attr(\\\"d\\\",V(yt))):s():!et||o<Math.min(Math.max(.6*a,A),T)?a<A||!tt?s():(yt.t=0,yt.b=K,wt=\\\"x\\\",Mt.attr(\\\"d\\\",function(t,e){return\\\"M\\\"+(t.l-.5)+\\\",\\\"+(e-T-.5)+\\\"h-3v\\\"+(2*T+1)+\\\"h3ZM\\\"+(t.r+.5)+\\\",\\\"+(e-T-.5)+\\\"h3v\\\"+(2*T+1)+\\\"h-3Z\\\"}(yt,mt))):!tt||a<Math.min(.6*o,T)?(yt.l=0,yt.r=J,wt=\\\"y\\\",Mt.attr(\\\"d\\\",function(t,e){return\\\"M\\\"+(e-T-.5)+\\\",\\\"+(t.t-.5)+\\\"v-3h\\\"+(2*T+1)+\\\"v3ZM\\\"+(e-T-.5)+\\\",\\\"+(t.b+.5)+\\\"v3h\\\"+(2*T+1)+\\\"v-3Z\\\"}(yt,vt))):(wt=\\\"xy\\\",Mt.attr(\\\"d\\\",V(yt))),yt.w=yt.r-yt.l,yt.h=yt.b-yt.t,wt&&(At=!0),t._dragged=At,R(kt,Mt,yt,bt,_t,xt),_t=!0}function Lt(){if(ct={},Math.min(yt.h,yt.w)<2*A)return F(t);\\\"xy\\\"!==wt&&\\\"x\\\"!==wt||z(Y,yt.l/J,yt.r/J,ct,Q.xaxes),\\\"xy\\\"!==wt&&\\\"y\\\"!==wt||z(X,(K-yt.b)/K,(K-yt.t)/K,ct,Q.yaxes),F(t),Nt(),N(t)}Tt.prepFn=function(e,r,n){var a=Tt.dragmode,o=t._fullLayout.dragmode;o!==a&&(Tt.dragmode=o),pt(),rt||(ft?e.shiftKey?\\\"pan\\\"===o?o=\\\"zoom\\\":j(o)||(o=\\\"pan\\\"):e.ctrlKey&&(o=\\\"pan\\\"):o=\\\"pan\\\"),Tt.minDrag=\\\"lasso\\\"===o?1:void 0,j(o)?(Tt.xaxes=Y,Tt.yaxes=X,b(e,r,n,Tt,o)):(Tt.clickFn=Ct,j(a)&&St(),rt||(\\\"zoom\\\"===o?(Tt.moveFn=Et,Tt.doneFn=Lt,Tt.minDrag=1,function(e,r,n){var a=gt.getBoundingClientRect();vt=r-a.left,mt=n-a.top,yt={l:vt,r:vt,w:0,t:mt,b:mt,h:0},xt=t._hmpixcount?t._hmlumcount/t._hmpixcount:i(t._fullLayout.plot_bgcolor).getLuminance(),_t=!1,wt=\\\"xy\\\",At=!1,kt=P(ut,xt,Z,$,bt=\\\"M0,0H\\\"+J+\\\"V\\\"+K+\\\"H0V0\\\"),Mt=D(ut,Z,$)}(0,r,n)):\\\"pan\\\"===o&&(Tt.moveFn=Bt,Tt.doneFn=Nt)))},p.init(Tt);var zt,Ot,It=[0,0,J,K],Pt=null,Dt=M.REDRAWDELAY,Rt=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function Bt(e,r){if(!t._transitioningWithDuration){if(\\\"ew\\\"===tt||\\\"ns\\\"===et)return tt&&O(Y,e),et&&O(X,r),jt([tt?-e:0,et?-r:0,J,K]),void Ft(et,tt);if(nt&&tt&&et){var n=\\\"w\\\"===tt==(\\\"n\\\"===et)?1:-1,i=(e/J+n*r/K)/2;e=i*J,r=n*i*K}\\\"w\\\"===tt?e=l(Y,0,e):\\\"e\\\"===tt?e=l(Y,1,-e):tt||(e=0),\\\"n\\\"===et?r=l(X,1,r):\\\"s\\\"===et?r=l(X,0,-r):et||(r=0);var a=\\\"w\\\"===tt?e:0,o=\\\"n\\\"===et?r:0;if(nt){var s;if(!tt&&1===et.length){for(s=0;s<Y.length;s++)Y[s].range=Y[s]._r.slice(),k(Y[s],1-r/K);a=(e=r*J/K)/2}if(!et&&1===tt.length){for(s=0;s<X.length;s++)X[s].range=X[s]._r.slice(),k(X[s],1-e/J);o=(r=e*K/J)/2}}jt([a,o,J-e,K-r]),Ft(et,tt)}function l(t,e,r){for(var n,i,a=1-e,o=0;o<t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/I(r/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}}function Ft(e,r){var n,i=[];function a(t){for(n=0;n<t.length;n++)t[n].fixedrange||i.push(t[n]._id)}for(it&&(a(Y),a(Q.xaxes)),at&&(a(X),a(Q.yaxes)),ct={},n=0;n<i.length;n++){var s=i[n];y(t,s,!0);var l=x(t,s);ct[l._name+\\\".range[0]\\\"]=l.range[0],ct[l._name+\\\".range[1]\\\"]=l.range[1]}function c(a,o,s){for(n=0;n<a.length;n++){var l=a[n];if((r&&-1!==i.indexOf(l.xref)||e&&-1!==i.indexOf(l.yref))&&(o(t,n),s))return}}c(t._fullLayout.annotations||[],o.getComponentMethod(\\\"annotations\\\",\\\"drawOne\\\")),c(t._fullLayout.shapes||[],o.getComponentMethod(\\\"shapes\\\",\\\"drawOne\\\")),c(t._fullLayout.images||[],o.getComponentMethod(\\\"images\\\",\\\"draw\\\"),!0)}function Nt(){jt([0,0,J,K]),s.syncOrAsync([m.previousPromises,function(){o.call(\\\"relayout\\\",t,ct)}],t)}function jt(e){var r,n,i,a,l=t._fullLayout,c=l._plots,f=l._subplots.cartesian;if(st&&o.subplotsRegistry.splom.drag(t),ot)for(r=0;r<f.length;r++)if(i=(n=c[f[r]]).xaxis,a=n.yaxis,n._scene){var h=s.simpleMap(i.range,i.r2l),p=s.simpleMap(a.range,a.r2l);n._scene.update({range:[h[0],p[0],h[1],p[1]]})}if((st||ot)&&(g(t),v(t)),lt){var d=e[2]/B._length,m=e[3]/H._length;for(r=0;r<f.length;r++){i=(n=c[f[r]]).xaxis,a=n.yaxis;var y,x,b,_,w=it&&!i.fixedrange&&G[i._id],k=at&&!a.fixedrange&&W[a._id];if(w?(y=d,b=C?e[0]:qt(i,y)):b=Ut(i,y=Vt(i,d,m)),k?(x=m,_=S?e[1]:qt(a,x)):_=Ut(a,x=Vt(a,d,m)),y||x){y||(y=1),x||(x=1);var M=i._offset-b/y,A=a._offset-_/x;n.clipRect.call(u.setTranslate,b,_).call(u.setScale,y,x),n.plot.call(u.setTranslate,M,A).call(u.setScale,1/y,1/x),y===zt&&x===Ot||(u.setPointGroupScale(n.zoomScalePts,y,x),u.setTextPointsScale(n.zoomScaleTxt,y,x)),u.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),zt=y,Ot=x}}}}function Vt(t,e,r){return t.fixedrange?0:it&&Q.xaHash[t._id]?e:at&&(nt?Q.xaHash:Q.yaHash)[t._id]?r:0}function Ut(t,e){return e?(t.range=t._r.slice(),k(t,e),qt(t,e)):0}function qt(t,e){return t._length*(1-e)*d[t.constraintoward||\\\"middle\\\"]}return S.length*C.length!=1&&U(gt,function(e){if(t._context.scrollZoom||t._fullLayout._enablescrollzoom){if(St(),t._transitioningWithDuration)return e.preventDefault(),void e.stopPropagation();var r=t.querySelector(\\\".plotly\\\");if(pt(),!(r.scrollHeight-r.clientHeight>10||r.scrollWidth-r.clientWidth>10)){clearTimeout(Pt);var n=-e.deltaY;if(isFinite(n)||(n=e.wheelDelta/10),isFinite(n)){var i,a=Math.exp(-Math.min(Math.max(n,-20),20)/200),o=Rt.draglayer.select(\\\".nsewdrag\\\").node().getBoundingClientRect(),l=(e.clientX-o.left)/o.width,c=(o.bottom-e.clientY)/o.height;if(it){for(C||(l=.5),i=0;i<Y.length;i++)u(Y[i],l,a);It[2]*=a,It[0]+=It[2]*l*(1/a-1)}if(at){for(S||(c=.5),i=0;i<X.length;i++)u(X[i],c,a);It[3]*=a,It[1]+=It[3]*(1-c)*(1/a-1)}jt(It),Ft(S,C),Pt=setTimeout(function(){It=[0,0,J,K],Nt()},Dt),e.preventDefault()}else s.log(\\\"Did not find wheel motion attributes: \\\",e)}}function u(t,e,r){if(!t.fixedrange){var n=s.simpleMap(t.range,t.r2l),i=n[0]+(n[1]-n[0])*e;t.range=n.map(function(e){return t.l2r(i+(e-i)*r)})}}}),gt},makeDragger:C,makeRectDragger:E,makeZoombox:P,makeCorners:D,updateZoombox:R,xyCorners:V,transitionZoombox:B,removeZoombox:F,showDoubleClickNotifier:N,attachWheelEventHandler:U}},{\\\"../../components/color\\\":570,\\\"../../components/dragelement\\\":592,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/clear_gl_canvases\\\":679,\\\"../../lib/setcursor\\\":717,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/subroutines\\\":736,\\\"../../registry\\\":828,\\\"../plots\\\":809,\\\"./axes\\\":745,\\\"./axis_ids\\\":748,\\\"./constants\\\":751,\\\"./scale_zoom\\\":762,\\\"./select\\\":763,d3:148,\\\"has-passive-events\\\":394,tinycolor2:514}],755:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/fx\\\"),a=t(\\\"../../components/dragelement\\\"),o=t(\\\"../../lib/setcursor\\\"),s=t(\\\"./dragbox\\\").makeDragBox,l=t(\\\"./constants\\\").DRAGGERSIZE;r.initInteractions=function(t){var e=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(\\\".drag\\\").remove();else if(e._has(\\\"cartesian\\\")||e._has(\\\"splom\\\")){Object.keys(e._plots||{}).sort(function(t,r){if((e._plots[t].mainplot&&!0)===(e._plots[r].mainplot&&!0)){var n=t.split(\\\"y\\\"),i=r.split(\\\"y\\\");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return e._plots[t].mainplot?1:-1}).forEach(function(r){var n=e._plots[r],o=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=s(t,n,o._offset,c._offset,o._length,c._length,\\\"ns\\\",\\\"ew\\\");u.onmousemove=function(e){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===r&&i.hover(t,e,r)},i.hover(t,e,r),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=r},u.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,a.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,o._offset-l,c._offset-l,l,l,\\\"n\\\",\\\"w\\\"),s(t,n,o._offset+o._length,c._offset-l,l,l,\\\"n\\\",\\\"e\\\"),s(t,n,o._offset-l,c._offset+c._length,l,l,\\\"s\\\",\\\"w\\\"),s(t,n,o._offset+o._length,c._offset+c._length,l,l,\\\"s\\\",\\\"e\\\"))}if(t._context.showAxisDragHandles){if(r===o._mainSubplot){var f=o._mainLinePosition;\\\"top\\\"===o.side&&(f-=l),s(t,n,o._offset+.1*o._length,f,.8*o._length,l,\\\"\\\",\\\"ew\\\"),s(t,n,o._offset,f,.1*o._length,l,\\\"\\\",\\\"w\\\"),s(t,n,o._offset+.9*o._length,f,.1*o._length,l,\\\"\\\",\\\"e\\\")}if(r===c._mainSubplot){var h=c._mainLinePosition;\\\"right\\\"!==c.side&&(h-=l),s(t,n,h,c._offset+.1*c._length,l,.8*c._length,\\\"ns\\\",\\\"\\\"),s(t,n,h,c._offset+.9*c._length,l,.1*c._length,\\\"s\\\",\\\"\\\"),s(t,n,h,c._offset,l,.1*c._length,\\\"n\\\",\\\"\\\")}}});var o=e._hoverlayer.node();o.onmousemove=function(r){r.target=t._fullLayout._lasthover,i.hover(t,r,e._hoversubplot)},o.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},o.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},r.updateFx(t)}},r.updateFx=function(t){var e=t._fullLayout,r=\\\"pan\\\"===e.dragmode?\\\"move\\\":\\\"crosshair\\\";o(e._draggers,r)}},{\\\"../../components/dragelement\\\":592,\\\"../../components/fx\\\":612,\\\"../../lib/setcursor\\\":717,\\\"./constants\\\":751,\\\"./dragbox\\\":754,d3:148}],756:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\");e.exports=function(t){return function(e,r){var a=e[t];if(Array.isArray(a))for(var o=n.subplotsRegistry.cartesian,s=o.idRegex,l=r._subplots,c=l.xaxis,u=l.yaxis,f=l.cartesian,h=r._has(\\\"cartesian\\\")||r._has(\\\"gl2d\\\"),p=0;p<a.length;p++){var d=a[p];if(i.isPlainObject(d)){var g=d.xref,v=d.yref,m=s.x.test(g),y=s.y.test(v);if(m||y){h||i.pushUnique(r._basePlotModules,o);var x=!1;m&&-1===c.indexOf(g)&&(c.push(g),x=!0),y&&-1===u.indexOf(v)&&(u.push(v),x=!0),x&&m&&y&&f.push(g+v)}}}}}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828}],757:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../plots\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"../get_data\\\").getModuleCalcData,c=t(\\\"./axis_ids\\\"),u=t(\\\"./constants\\\"),f=t(\\\"../../constants/xmlns_namespaces\\\"),h=a.ensureSingle;function p(t,e,r){return a.ensureSingle(t,e,r,function(t){t.datum(r)})}function d(t,e,r,a,o){for(var c,f,h,p=u.traceLayerClasses,d=t._fullLayout,g=d._modules,v=[],m=[],y=0;y<g.length;y++){var x=(c=g[y]).name,b=i.modules[x].categories;if(b.svg){var _=c.layerName||x+\\\"layer\\\",w=c.plot;h=(f=l(r,w))[0],r=f[1],h.length&&v.push({i:p.indexOf(_),className:_,plotMethod:w,cdModule:h}),b.zoomScale&&m.push(\\\".\\\"+_)}}v.sort(function(t,e){return t.i-e.i});var k=e.plot.selectAll(\\\"g.mlayer\\\").data(v,function(t){return t.className});if(k.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return t.className}).classed(\\\"mlayer\\\",!0),k.exit().remove(),k.order(),k.each(function(r){var i=n.select(this),l=r.className;r.plotMethod(t,e,r.cdModule,i,a,o),\\\"scatterlayer\\\"!==l&&\\\"barlayer\\\"!==l&&s.setClipUrl(i,e.layerClipId)}),d._has(\\\"scattergl\\\")&&(c=i.getModule(\\\"scattergl\\\"),h=l(r,c)[0],c.plot(t,e,h)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(\\\".scatterlayer, .barlayer\\\").selectAll(\\\".trace\\\")),m.length)){var M=e.plot.selectAll(m.join(\\\",\\\")).selectAll(\\\".trace\\\");e.zoomScalePts=M.selectAll(\\\"path.point\\\"),e.zoomScaleTxt=M.selectAll(\\\".textpoint\\\")}}function g(t,e){var r=e.plotgroup,n=e.id,i=u.layerValue2layerClass[e.xaxis.layer],a=u.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,l=s.plotgroup,f=n+\\\"-x\\\",d=n+\\\"-y\\\";e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,h(s.overlinesBelow,\\\"path\\\",f),h(s.overlinesBelow,\\\"path\\\",d),h(s.overaxesBelow,\\\"g\\\",f),h(s.overaxesBelow,\\\"g\\\",d),e.plot=h(s.overplot,\\\"g\\\",n),h(s.overlinesAbove,\\\"path\\\",f),h(s.overlinesAbove,\\\"path\\\",d),h(s.overaxesAbove,\\\"g\\\",f),h(s.overaxesAbove,\\\"g\\\",d),e.xlines=l.select(\\\".overlines-\\\"+i).select(\\\".\\\"+f),e.ylines=l.select(\\\".overlines-\\\"+a).select(\\\".\\\"+d),e.xaxislayer=l.select(\\\".overaxes-\\\"+i).select(\\\".\\\"+f),e.yaxislayer=l.select(\\\".overaxes-\\\"+a).select(\\\".\\\"+d)}else if(o)e.xlines=h(r,\\\"path\\\",\\\"xlines-above\\\"),e.ylines=h(r,\\\"path\\\",\\\"ylines-above\\\"),e.xaxislayer=h(r,\\\"g\\\",\\\"xaxislayer-above\\\"),e.yaxislayer=h(r,\\\"g\\\",\\\"yaxislayer-above\\\");else{var g=h(r,\\\"g\\\",\\\"layer-subplot\\\");e.shapelayer=h(g,\\\"g\\\",\\\"shapelayer\\\"),e.imagelayer=h(g,\\\"g\\\",\\\"imagelayer\\\"),e.gridlayer=h(r,\\\"g\\\",\\\"gridlayer\\\"),e.zerolinelayer=h(r,\\\"g\\\",\\\"zerolinelayer\\\"),h(r,\\\"path\\\",\\\"xlines-below\\\"),h(r,\\\"path\\\",\\\"ylines-below\\\"),e.overlinesBelow=h(r,\\\"g\\\",\\\"overlines-below\\\"),h(r,\\\"g\\\",\\\"xaxislayer-below\\\"),h(r,\\\"g\\\",\\\"yaxislayer-below\\\"),e.overaxesBelow=h(r,\\\"g\\\",\\\"overaxes-below\\\"),e.plot=h(r,\\\"g\\\",\\\"plot\\\"),e.overplot=h(r,\\\"g\\\",\\\"overplot\\\"),e.xlines=h(r,\\\"path\\\",\\\"xlines-above\\\"),e.ylines=h(r,\\\"path\\\",\\\"ylines-above\\\"),e.overlinesAbove=h(r,\\\"g\\\",\\\"overlines-above\\\"),h(r,\\\"g\\\",\\\"xaxislayer-above\\\"),h(r,\\\"g\\\",\\\"yaxislayer-above\\\"),e.overaxesAbove=h(r,\\\"g\\\",\\\"overaxes-above\\\"),e.xlines=r.select(\\\".xlines-\\\"+i),e.ylines=r.select(\\\".ylines-\\\"+a),e.xaxislayer=r.select(\\\".xaxislayer-\\\"+i),e.yaxislayer=r.select(\\\".yaxislayer-\\\"+a)}o||(p(e.gridlayer,\\\"g\\\",e.xaxis._id),p(e.gridlayer,\\\"g\\\",e.yaxis._id),e.gridlayer.selectAll(\\\"g\\\").map(function(t){return t[0]}).sort(c.idSort)),e.xlines.style(\\\"fill\\\",\\\"none\\\").classed(\\\"crisp\\\",!0),e.ylines.style(\\\"fill\\\",\\\"none\\\").classed(\\\"crisp\\\",!0)}function v(t,e){if(t){var r={};for(var i in t.each(function(t){var i=t[0];n.select(this).remove(),m(i,e),r[i]=!0}),e._plots)for(var a=e._plots[i].overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(\\\".trace\\\").remove()}}}function m(t,e){e._draggers.selectAll(\\\"g.\\\"+t).remove(),e._defs.select(\\\"#clip\\\"+e._uid+t+\\\"plot\\\").remove()}r.name=\\\"cartesian\\\",r.attr=[\\\"xaxis\\\",\\\"yaxis\\\"],r.idRoot=[\\\"x\\\",\\\"y\\\"],r.idRegex=u.idRegex,r.attrRegex=u.attrRegex,r.attributes=t(\\\"./attributes\\\"),r.layoutAttributes=t(\\\"./layout_attributes\\\"),r.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),r.transitionAxes=t(\\\"./transition_axes\\\"),r.finalizeSubplots=function(t,e){var r,n,i,o=e._subplots,s=o.xaxis,l=o.yaxis,f=o.cartesian,h=f.concat(o.gl2d||[]),p={},d={};for(r=0;r<h.length;r++){var g=h[r].split(\\\"y\\\");p[g[0]]=1,d[\\\"y\\\"+g[1]]=1}for(r=0;r<s.length;r++)p[n=s[r]]||(i=(t[c.id2name(n)]||{}).anchor,u.idRegex.y.test(i)||(i=\\\"y\\\"),f.push(n+i),h.push(n+i),d[i]||(d[i]=1,a.pushUnique(l,i)));for(r=0;r<l.length;r++)d[i=l[r]]||(n=(t[c.id2name(i)]||{}).anchor,u.idRegex.x.test(n)||(n=\\\"x\\\"),f.push(n+i),h.push(n+i),p[n]||(p[n]=1,a.pushUnique(s,n)));if(!h.length){for(var v in n=\\\"\\\",i=\\\"\\\",t){if(u.attrRegex.test(v))\\\"x\\\"===v.charAt(0)?(!n||+v.substr(5)<+n.substr(5))&&(n=v):(!i||+v.substr(5)<+i.substr(5))&&(i=v)}n=n?c.name2id(n):\\\"x\\\",i=i?c.name2id(i):\\\"y\\\",s.push(n),l.push(i),f.push(n+i)}},r.plot=function(t,e,r,n){var i,a=t._fullLayout,o=a._subplots.cartesian,s=t.calcdata;if(null!==e){if(!Array.isArray(e))for(e=[],i=0;i<s.length;i++)e.push(i);for(i=0;i<o.length;i++){for(var l,c=o[i],u=a._plots[c],f=[],h=0;h<s.length;h++){var p=s[h],g=p[0].trace;g.xaxis+g.yaxis===c&&((-1!==e.indexOf(g.index)||g.carpet)&&(l&&l[0].trace.xaxis+l[0].trace.yaxis===c&&-1!==[\\\"tonextx\\\",\\\"tonexty\\\",\\\"tonext\\\"].indexOf(g.fill)&&-1===f.indexOf(l)&&f.push(l),f.push(p)),l=p)}d(t,u,f,r,n)}}},r.clean=function(t,e,r,n){var i,a,o,s=n._plots||{},l=e._plots||{},u=n._subplots||{};if(n._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(o in s)(i=s[o]).plotgroup&&i.plotgroup.remove();var f=n._has&&n._has(\\\"gl\\\"),h=e._has&&e._has(\\\"gl\\\");if(f&&!h)for(o in s)(i=s[o])._scene&&i._scene.destroy();if(u.xaxis&&u.yaxis){var p=c.listIds({_fullLayout:n});for(a=0;a<p.length;a++){var d=p[a];e[c.id2name(d)]||n._infolayer.selectAll(\\\".g-\\\"+d+\\\"title\\\").remove()}}var g=n._has&&n._has(\\\"cartesian\\\"),y=e._has&&e._has(\\\"cartesian\\\");if(g&&!y)v(n._cartesianlayer.selectAll(\\\".subplot\\\"),n),n._defs.selectAll(\\\".axesclip\\\").remove(),delete n._axisConstraintGroups;else if(u.cartesian)for(a=0;a<u.cartesian.length;a++){var x=u.cartesian[a];if(!l[x]){var b=\\\".\\\"+x+\\\",.\\\"+x+\\\"-x,.\\\"+x+\\\"-y\\\";n._cartesianlayer.selectAll(b).remove(),m(x,n)}}},r.drawFramework=function(t){var e=t._fullLayout,r=function(t){var e,r,n,i,a,o,s=t._fullLayout,l=s._subplots.cartesian,c=l.length,u=[],f=[];for(e=0;e<c;e++){n=l[e],i=s._plots[n],a=i.xaxis,o=i.yaxis;var h=a._mainAxis,p=o._mainAxis,d=h._id+p._id,g=s._plots[d];i.overlays=[],d!==n&&g?(i.mainplot=d,i.mainplotinfo=g,f.push(n)):(i.mainplot=void 0,i.mainPlotinfo=void 0,u.push(n))}for(e=0;e<f.length;e++)n=f[e],(i=s._plots[n]).mainplotinfo.overlays.push(i);var v=u.concat(f),m=new Array(c);for(e=0;e<c;e++){n=v[e],i=s._plots[n],a=i.xaxis,o=i.yaxis;var y=[n,a.layer,o.layer,a.overlaying||\\\"\\\",o.overlaying||\\\"\\\"];for(r=0;r<i.overlays.length;r++)y.push(i.overlays[r].id);m[e]=y}return m}(t),i=e._cartesianlayer.selectAll(\\\".subplot\\\").data(r,String);i.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"subplot \\\"+t[0]}),i.order(),i.exit().call(v,e),i.each(function(r){var i=r[0],a=e._plots[i];a.plotgroup=n.select(this),g(t,a),a.draglayer=h(e._draggers,\\\"g\\\",i)})},r.rangePlot=function(t,e,r){g(t,e),d(t,e,r),o.style(t)},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(\\\".svg-container\\\");r.filter(function(t,e){return e===r.size()-1}).selectAll(\\\".gl-canvas-context, .gl-canvas-focus\\\").each(function(){var t=this.toDataURL(\\\"image/png\\\");e.append(\\\"svg:image\\\").attr({xmlns:f.svg,\\\"xlink:href\\\":t,preserveAspectRatio:\\\"none\\\",x:0,y:0,width:this.width,height:this.height})})},r.updateFx=t(\\\"./graph_interact\\\").updateFx},{\\\"../../components/drawing\\\":595,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../get_data\\\":782,\\\"../plots\\\":809,\\\"./attributes\\\":743,\\\"./axis_ids\\\":748,\\\"./constants\\\":751,\\\"./graph_interact\\\":755,\\\"./layout_attributes\\\":758,\\\"./layout_defaults\\\":759,\\\"./transition_axes\\\":768,d3:148}],758:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../font_attributes\\\"),i=t(\\\"../../components/color/attributes\\\"),a=t(\\\"../../components/drawing/attributes\\\").dash,o=t(\\\"../../lib/extend\\\").extendFlat,s=t(\\\"../../plot_api/plot_template\\\").templatedArray,l=t(\\\"./constants\\\");e.exports={visible:{valType:\\\"boolean\\\",editType:\\\"plot\\\"},color:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"ticks\\\"},title:{valType:\\\"string\\\",editType:\\\"ticks\\\"},titlefont:n({editType:\\\"ticks\\\"}),type:{valType:\\\"enumerated\\\",values:[\\\"-\\\",\\\"linear\\\",\\\"log\\\",\\\"date\\\",\\\"category\\\"],dflt:\\\"-\\\",editType:\\\"calc\\\",_noTemplating:!0},autorange:{valType:\\\"enumerated\\\",values:[!0,!1,\\\"reversed\\\"],dflt:!0,editType:\\\"axrange\\\",impliedEdits:{\\\"range[0]\\\":void 0,\\\"range[1]\\\":void 0}},rangemode:{valType:\\\"enumerated\\\",values:[\\\"normal\\\",\\\"tozero\\\",\\\"nonnegative\\\"],dflt:\\\"normal\\\",editType:\\\"plot\\\"},range:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"axrange\\\",impliedEdits:{\\\"^autorange\\\":!1}},{valType:\\\"any\\\",editType:\\\"axrange\\\",impliedEdits:{\\\"^autorange\\\":!1}}],editType:\\\"axrange\\\",impliedEdits:{autorange:!1}},fixedrange:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},scaleanchor:{valType:\\\"enumerated\\\",values:[l.idRegex.x.toString(),l.idRegex.y.toString()],editType:\\\"plot\\\"},scaleratio:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"plot\\\"},constrain:{valType:\\\"enumerated\\\",values:[\\\"range\\\",\\\"domain\\\"],dflt:\\\"range\\\",editType:\\\"plot\\\"},constraintoward:{valType:\\\"enumerated\\\",values:[\\\"left\\\",\\\"center\\\",\\\"right\\\",\\\"top\\\",\\\"middle\\\",\\\"bottom\\\"],editType:\\\"plot\\\"},tickmode:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"linear\\\",\\\"array\\\"],editType:\\\"ticks\\\",impliedEdits:{tick0:void 0,dtick:void 0}},nticks:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"ticks\\\"},tick0:{valType:\\\"any\\\",editType:\\\"ticks\\\",impliedEdits:{tickmode:\\\"linear\\\"}},dtick:{valType:\\\"any\\\",editType:\\\"ticks\\\",impliedEdits:{tickmode:\\\"linear\\\"}},tickvals:{valType:\\\"data_array\\\",editType:\\\"ticks\\\"},ticktext:{valType:\\\"data_array\\\",editType:\\\"ticks\\\"},ticks:{valType:\\\"enumerated\\\",values:[\\\"outside\\\",\\\"inside\\\",\\\"\\\"],editType:\\\"ticks\\\"},mirror:{valType:\\\"enumerated\\\",values:[!0,\\\"ticks\\\",!1,\\\"all\\\",\\\"allticks\\\"],dflt:!1,editType:\\\"ticks+layoutstyle\\\"},ticklen:{valType:\\\"number\\\",min:0,dflt:5,editType:\\\"ticks\\\"},tickwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"ticks\\\"},tickcolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"ticks\\\"},showticklabels:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"ticks\\\"},automargin:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"ticks\\\"},showspikes:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"modebar\\\"},spikecolor:{valType:\\\"color\\\",dflt:null,editType:\\\"none\\\"},spikethickness:{valType:\\\"number\\\",dflt:3,editType:\\\"none\\\"},spikedash:o({},a,{dflt:\\\"dash\\\",editType:\\\"none\\\"}),spikemode:{valType:\\\"flaglist\\\",flags:[\\\"toaxis\\\",\\\"across\\\",\\\"marker\\\"],dflt:\\\"toaxis\\\",editType:\\\"none\\\"},spikesnap:{valType:\\\"enumerated\\\",values:[\\\"data\\\",\\\"cursor\\\"],dflt:\\\"data\\\",editType:\\\"none\\\"},tickfont:n({editType:\\\"ticks\\\"}),tickangle:{valType:\\\"angle\\\",dflt:\\\"auto\\\",editType:\\\"ticks\\\"},tickprefix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"ticks\\\"},showtickprefix:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"ticks\\\"},ticksuffix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"ticks\\\"},showticksuffix:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"ticks\\\"},showexponent:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"ticks\\\"},exponentformat:{valType:\\\"enumerated\\\",values:[\\\"none\\\",\\\"e\\\",\\\"E\\\",\\\"power\\\",\\\"SI\\\",\\\"B\\\"],dflt:\\\"B\\\",editType:\\\"ticks\\\"},separatethousands:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"ticks\\\"},tickformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"ticks\\\"},tickformatstops:s(\\\"tickformatstop\\\",{enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"ticks\\\"},dtickrange:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"ticks\\\"},{valType:\\\"any\\\",editType:\\\"ticks\\\"}],editType:\\\"ticks\\\"},value:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"ticks\\\"},editType:\\\"ticks\\\"}),hoverformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"none\\\"},showline:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"ticks+layoutstyle\\\"},linecolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"layoutstyle\\\"},linewidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"ticks+layoutstyle\\\"},showgrid:{valType:\\\"boolean\\\",editType:\\\"ticks\\\"},gridcolor:{valType:\\\"color\\\",dflt:i.lightLine,editType:\\\"ticks\\\"},gridwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"ticks\\\"},zeroline:{valType:\\\"boolean\\\",editType:\\\"ticks\\\"},zerolinecolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"ticks\\\"},zerolinewidth:{valType:\\\"number\\\",dflt:1,editType:\\\"ticks\\\"},anchor:{valType:\\\"enumerated\\\",values:[\\\"free\\\",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:\\\"plot\\\"},side:{valType:\\\"enumerated\\\",values:[\\\"top\\\",\\\"bottom\\\",\\\"left\\\",\\\"right\\\"],editType:\\\"plot\\\"},overlaying:{valType:\\\"enumerated\\\",values:[\\\"free\\\",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:\\\"plot\\\"},layer:{valType:\\\"enumerated\\\",values:[\\\"above traces\\\",\\\"below traces\\\"],dflt:\\\"above traces\\\",editType:\\\"plot\\\"},domain:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\",min:0,max:1,editType:\\\"plot\\\"},{valType:\\\"number\\\",min:0,max:1,editType:\\\"plot\\\"}],dflt:[0,1],editType:\\\"plot\\\"},position:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"plot\\\"},categoryorder:{valType:\\\"enumerated\\\",values:[\\\"trace\\\",\\\"category ascending\\\",\\\"category descending\\\",\\\"array\\\"],dflt:\\\"trace\\\",editType:\\\"calc\\\"},categoryarray:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\",_deprecated:{autotick:{valType:\\\"boolean\\\",editType:\\\"ticks\\\"}}}},{\\\"../../components/color/attributes\\\":569,\\\"../../components/drawing/attributes\\\":594,\\\"../../lib/extend\\\":685,\\\"../../plot_api/plot_template\\\":735,\\\"../font_attributes\\\":772,\\\"./constants\\\":751}],759:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../plot_api/plot_template\\\"),o=t(\\\"../layout_attributes\\\"),s=t(\\\"./layout_attributes\\\"),l=t(\\\"./type_defaults\\\"),c=t(\\\"./axis_defaults\\\"),u=t(\\\"./constraint_defaults\\\"),f=t(\\\"./position_defaults\\\"),h=t(\\\"./axis_ids\\\"),p=h.id2name,d=h.name2id,g=t(\\\"../../registry\\\"),v=g.traceIs,m=g.getComponentMethod;function y(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}e.exports=function(t,e,r){var h,g,x={},b={},_={},w={},k={};for(h=0;h<r.length;h++){var M=r[h];if(v(M,\\\"cartesian\\\")||v(M,\\\"gl2d\\\")){var A,T;if(M.xaxis)y(x,A=p(M.xaxis),M);else if(M.xaxes)for(g=0;g<M.xaxes.length;g++)y(x,p(M.xaxes[g]),M);if(M.yaxis)y(x,T=p(M.yaxis),M);else if(M.yaxes)for(g=0;g<M.yaxes.length;g++)y(x,p(M.yaxes[g]),M);if(v(M,\\\"carpet\\\")&&(\\\"carpet\\\"!==M.type||M._cheater)||A&&(_[A]=1),\\\"carpet\\\"===M.type&&M._cheater&&A&&(b[A]=1),v(M,\\\"2dMap\\\")&&(w[A]=1,w[T]=1),v(M,\\\"oriented\\\"))k[\\\"h\\\"===M.orientation?T:A]=1}}var S=e._subplots,C=S.xaxis,E=S.yaxis,L=n.simpleMap(C,p),z=n.simpleMap(E,p),O=L.concat(z),I=i.background;C.length&&E.length&&(I=n.coerce(t,e,o,\\\"plot_bgcolor\\\"));var P,D,R,B,F=i.combine(I,e.paper_bgcolor);function N(t,e){return n.coerce(R,B,s,t,e)}function j(t,e){return n.coerce2(R,B,s,t,e)}function V(t){return\\\"x\\\"===t?E:C}var U={x:V(\\\"x\\\"),y:V(\\\"y\\\")};function q(e,r){for(var n=\\\"x\\\"===e?L:z,i=[],a=0;a<n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(d(o))}return i}for(h=0;h<O.length;h++){D=(P=O[h]).charAt(0),n.isPlainObject(t[P])||(t[P]={}),R=t[P],B=a.newContainer(e,P,D+\\\"axis\\\");var H=x[P]||[];B._traceIndices=H.map(function(t){return t._expandedIndex}),B._annIndices=[],B._shapeIndices=[],B._name=P;var G=B._id=d(P),W=q(D,P),Y={letter:D,font:e.font,outerTicks:w[P],showGrid:!k[P],data:H,bgColor:F,calendar:e.calendar,automargin:!0,cheateronly:\\\"x\\\"===D&&b[P]&&!_[P],splomStash:((e._splomAxes||{})[D]||{})[G]};l(R,B,N,Y),c(R,B,N,Y,e);var X=j(\\\"spikecolor\\\"),Z=j(\\\"spikethickness\\\"),$=j(\\\"spikedash\\\"),J=j(\\\"spikemode\\\"),K=j(\\\"spikesnap\\\");N(\\\"showspikes\\\",!!(X||Z||$||J||K))||(delete B.spikecolor,delete B.spikethickness,delete B.spikedash,delete B.spikemode,delete B.spikesnap);var Q={letter:D,counterAxes:U[D],overlayableAxes:W,grid:e.grid};f(R,B,N,Q),B._input=R}var tt=m(\\\"rangeslider\\\",\\\"handleDefaults\\\"),et=m(\\\"rangeselector\\\",\\\"handleDefaults\\\");for(h=0;h<L.length;h++)P=L[h],R=t[P],B=e[P],tt(t,e,P),\\\"date\\\"===B.type&&et(R,B,e,z,B.calendar),N(\\\"fixedrange\\\");for(h=0;h<z.length;h++){P=z[h],R=t[P],B=e[P];var rt=e[p(B.anchor)];N(\\\"fixedrange\\\",rt&&rt.rangeslider&&rt.rangeslider.visible)}e._axisConstraintGroups=[];var nt=U.x.concat(U.y);for(h=0;h<O.length;h++)D=(P=O[h]).charAt(0),R=t[P],B=e[P],u(R,B,N,nt,e)}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../registry\\\":828,\\\"../layout_attributes\\\":800,\\\"./axis_defaults\\\":747,\\\"./axis_ids\\\":748,\\\"./constraint_defaults\\\":752,\\\"./layout_attributes\\\":758,\\\"./position_defaults\\\":761,\\\"./type_defaults\\\":769}],760:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"tinycolor2\\\").mix,i=t(\\\"../../components/color/attributes\\\").lightFraction,a=t(\\\"../../lib\\\");e.exports=function(t,e,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(t,e,o.attributes,r,n)}var c=l(\\\"linecolor\\\",s),u=l(\\\"linewidth\\\");r(\\\"showline\\\",o.showLine||!!c||!!u)||(delete e.linecolor,delete e.linewidth);var f=l(\\\"gridcolor\\\",n(s,o.bgColor,o.blend||i).toRgbString()),h=l(\\\"gridwidth\\\");if(r(\\\"showgrid\\\",o.showGrid||!!f||!!h)||(delete e.gridcolor,delete e.gridwidth),!o.noZeroLine){var p=l(\\\"zerolinecolor\\\",s),d=l(\\\"zerolinewidth\\\");r(\\\"zeroline\\\",o.showGrid||!!p||!!d)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib\\\":696,tinycolor2:514}],761:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\");e.exports=function(t,e,r,a){var o,s,l,c,u=a.counterAxes||[],f=a.overlayableAxes||[],h=a.letter,p=a.grid;p&&(s=p._domains[h][p._axisMap[e._id]],o=p._anchors[e._id],s&&(l=p[h+\\\"side\\\"].split(\\\" \\\")[0],c=p.domain[h][\\\"right\\\"===l||\\\"top\\\"===l?1:0])),s=s||[0,1],o=o||(n(t.position)?\\\"free\\\":u[0]||\\\"free\\\"),l=l||(\\\"x\\\"===h?\\\"bottom\\\":\\\"left\\\"),c=c||0,\\\"free\\\"===i.coerce(t,e,{anchor:{valType:\\\"enumerated\\\",values:[\\\"free\\\"].concat(u),dflt:o}},\\\"anchor\\\")&&r(\\\"position\\\",c),i.coerce(t,e,{side:{valType:\\\"enumerated\\\",values:\\\"x\\\"===h?[\\\"bottom\\\",\\\"top\\\"]:[\\\"left\\\",\\\"right\\\"],dflt:l}},\\\"side\\\");var d=!1;if(f.length&&(d=i.coerce(t,e,{overlaying:{valType:\\\"enumerated\\\",values:[!1].concat(f),dflt:!1}},\\\"overlaying\\\")),!d){var g=r(\\\"domain\\\",s);g[0]>g[1]-.01&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\\\"layer\\\"),e}},{\\\"../../lib\\\":696,\\\"fast-isnumeric\\\":214}],762:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../constants/alignment\\\").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||\\\"center\\\"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)]}},{\\\"../../constants/alignment\\\":668}],763:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"polybooljs\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../../components/fx\\\"),s=t(\\\"../../lib/polygon\\\"),l=t(\\\"../../lib/throttle\\\"),c=t(\\\"../../components/fx/helpers\\\").makeEventData,u=t(\\\"./axis_ids\\\").getFromId,f=t(\\\"../../lib/clear_gl_canvases\\\"),h=t(\\\"../../plot_api/subroutines\\\").redrawReglTraces,p=t(\\\"./constants\\\"),d=p.MINSELECT,g=s.filter,v=s.tester;function m(t){return t._id}function y(t,e,r,n,i,a,o){var s,l,c,u,f,h,p,d,g,v=e._hoverdata,m=e._fullLayout.clickmode.indexOf(\\\"event\\\")>-1,y=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){w(t,e,a);var x=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n<e.length;n++)if(r=e[n],i.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?a=i.pointNumber:void 0!==i.binNumber&&(a=i.binNumber,o=i.pointNumbers);break}return{pointNumber:a,pointNumbers:o,searchInfo:r}}(v,s=M(e,r,n,i));if(x.pointNumbers.length>0?function(t,e){var r,n,i,a=[];for(i=0;i<t.length;i++)(r=t[i]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i<e.pointNumbers.length;i++)if(n.selectedpoints.indexOf(e.pointNumbers[i])<0)return!1;return!0}return!1}(s,x):function(t){var e,r,n,i=0;for(n=0;n<t.length;n++)if(e=t[n],(r=e.cd[0].trace).selectedpoints){if(r.selectedpoints.length>1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=T(x))){for(o&&o.remove(),g=0;g<s.length;g++)(l=s[g])._module.selectPoints(l,!1);S(e,s),k(a),m&&e.emit(\\\"plotly_deselect\\\",null)}else{for(p=t.shiftKey&&(void 0!==h?h:T(x)),c=function(t,e,r){return{pointNumber:t,searchInfo:e,subtract:r}}(x.pointNumber,x.searchInfo,p),u=_(a.selectionDefs.concat([c])),g=0;g<s.length;g++)if(f=C(s[g]._module.selectPoints(s[g],u),s[g]),y.length)for(var b=0;b<f.length;b++)y.push(f[b]);else y=f;S(e,s,d={points:y}),c&&a&&a.selectionDefs.push(c),o&&A(a.mergedPolygons,o),m&&e.emit(\\\"plotly_selected\\\",d)}}}function x(t){return\\\"pointNumber\\\"in t&&\\\"searchInfo\\\"in t}function b(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,n,i){var a=t.searchInfo.cd[0].trace._expandedIndex;return i.cd[0].trace._expandedIndex===a&&n===t.pointNumber},isRect:!1,degenerate:!1,subtract:t.subtract}}function _(t){for(var e=[],r=x(t[0])?0:t[0][0][0],n=r,i=x(t[0])?0:t[0][0][1],a=i,o=0;o<t.length;o++)if(x(t[o]))e.push(b(t[o]));else{var l=s.tester(t[o]);l.subtract=t[o].subtract,e.push(l),r=Math.min(r,l.xmin),n=Math.max(n,l.xmax),i=Math.min(i,l.ymin),a=Math.max(a,l.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:function(t,r,n,i){for(var a=!1,o=0;o<e.length;o++)e[o].contains(t,r,n,i)&&(a=!1===e[o].subtract);return a},isRect:!1,degenerate:!1}}function w(t,e,r){var n=e._fullLayout,i=n._zoomlayer,a=r.plotinfo,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===a.id,s=t.shiftKey||t.altKey;o&&s&&a.selection&&a.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=a.selection.selectionDefs,r.mergedPolygons=a.selection.mergedPolygons):s&&a.selection||k(r),o||(E(i),n._lastSelectedSubplot=a.id)}function k(t){var e=t.plotinfo;e.selection={},e.selection.selectionDefs=t.selectionDefs=[],e.selection.mergedPolygons=t.mergedPolygons=[]}function M(t,e,r,n){var i,a,o,s=[],l=e.map(m),c=r.map(m);for(o=0;o<t.calcdata.length;o++)if(!0===(a=(i=t.calcdata[o])[0].trace).visible&&a._module&&a._module.selectPoints)if(!n||a.subplot!==n&&a.geo!==n)if(\\\"splom\\\"===a.type&&a._xaxes[l[0]]&&a._yaxes[c[0]]){var f=h(a._module,i,e[0],r[0]);f.scene=t._fullLayout._splomScenes[a.uid],s.push(f)}else{if(-1===l.indexOf(a.xaxis))continue;if(-1===c.indexOf(a.yaxis))continue;s.push(h(a._module,i,u(t,a.xaxis),u(t,a.yaxis)))}else s.push(h(a._module,i,e[0],r[0]));return s;function h(t,e,r,n){return{_module:t,cd:e,xaxis:r,yaxis:n}}}function A(t,e){var r,n,i=[];for(r=0;r<t.length;r++){var a=t[r];i.push(a.join(\\\"L\\\")+\\\"L\\\"+a[0])}n=t.length>0?\\\"M\\\"+i.join(\\\"M\\\")+\\\"Z\\\":\\\"M0,0Z\\\",e.attr(\\\"d\\\",n)}function T(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function S(t,e,r){var n,a,o,s;if(r){var l=r.points||[];for(n=0;n<e.length;n++)(s=e[n].cd[0].trace).selectedpoints=[],s._input.selectedpoints=[];for(n=0;n<l.length;n++){var c=l[n],u=c.data,p=c.fullData;c.pointIndices?([].push.apply(u.selectedpoints,c.pointIndices),[].push.apply(p.selectedpoints,c.pointIndices)):(u.selectedpoints.push(c.pointIndex),p.selectedpoints.push(c.pointIndex))}}else for(n=0;n<e.length;n++)delete(s=e[n].cd[0].trace).selectedpoints,delete s._input.selectedpoints;var d=!1;for(n=0;n<e.length;n++){s=(o=(a=e[n]).cd)[0].trace,i.traceIs(s,\\\"regl\\\")&&(d=!0);var g=a._module,v=g.styleOnSelect||g.style;v&&v(t,o)}d&&(f(t),h(t))}function C(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i<t.length;i++)t[i]=c(t[i],n,r);return t}function E(t){t.selectAll(\\\".select-outline\\\").remove()}e.exports={prepSelect:function(t,e,r,i,s){var c,u,f,h,m,x,b,T=i.gd,E=T._fullLayout,L=E._zoomlayer,z=i.element.getBoundingClientRect(),O=i.plotinfo,I=O.xaxis._offset,P=O.yaxis._offset,D=e-z.left,R=r-z.top,B=D,F=R,N=\\\"M\\\"+D+\\\",\\\"+R,j=i.xaxes[0]._length,V=i.yaxes[0]._length,U=i.xaxes.concat(i.yaxes),q=t.altKey;w(t,T,i),\\\"lasso\\\"===s&&(c=g([[D,R]],p.BENDPX));var H=L.selectAll(\\\"path.select-outline-\\\"+O.id).data([1,2]);H.enter().append(\\\"path\\\").attr(\\\"class\\\",function(t){return\\\"select-outline select-outline-\\\"+t+\\\" select-outline-\\\"+O.id}).attr(\\\"transform\\\",\\\"translate(\\\"+I+\\\", \\\"+P+\\\")\\\").attr(\\\"d\\\",N+\\\"Z\\\");var G,W=L.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox-corners\\\").style({fill:a.background,stroke:a.defaultLine,\\\"stroke-width\\\":1}).attr(\\\"transform\\\",\\\"translate(\\\"+I+\\\", \\\"+P+\\\")\\\").attr(\\\"d\\\",\\\"M0,0Z\\\"),Y=E._uid+p.SELECTID,X=[],Z=M(T,i.xaxes,i.yaxes,i.subplot);function $(t){var e=\\\"y\\\"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function J(t,e){return t-e}G=O.fillRangeItems?O.fillRangeItems:\\\"select\\\"===s?function(t,e){var r=t.range={};for(m=0;m<U.length;m++){var n=U[m],i=n._id.charAt(0);r[n._id]=[n.p2d(e[i+\\\"min\\\"]),n.p2d(e[i+\\\"max\\\"])].sort(J)}}:function(t,e,r){var n=t.lassoPoints={};for(m=0;m<U.length;m++){var i=U[m];n[i._id]=r.filtered.map($(i))}},i.moveFn=function(t,e){B=Math.max(0,Math.min(j,t+D)),F=Math.max(0,Math.min(V,e+R));var r=Math.abs(B-D),a=Math.abs(F-R);if(\\\"select\\\"===s){var o=E.selectdirection;\\\"h\\\"===(o=\\\"any\\\"===E.selectdirection?a<Math.min(.6*r,d)?\\\"h\\\":r<Math.min(.6*a,d)?\\\"v\\\":\\\"d\\\":E.selectdirection)?((h=[[D,0],[D,V],[B,V],[B,0]]).xmin=Math.min(D,B),h.xmax=Math.max(D,B),h.ymin=Math.min(0,V),h.ymax=Math.max(0,V),W.attr(\\\"d\\\",\\\"M\\\"+h.xmin+\\\",\\\"+(R-d)+\\\"h-4v\\\"+2*d+\\\"h4ZM\\\"+(h.xmax-1)+\\\",\\\"+(R-d)+\\\"h4v\\\"+2*d+\\\"h-4Z\\\")):\\\"v\\\"===o?((h=[[0,R],[0,F],[j,F],[j,R]]).xmin=Math.min(0,j),h.xmax=Math.max(0,j),h.ymin=Math.min(R,F),h.ymax=Math.max(R,F),W.attr(\\\"d\\\",\\\"M\\\"+(D-d)+\\\",\\\"+h.ymin+\\\"v-4h\\\"+2*d+\\\"v4ZM\\\"+(D-d)+\\\",\\\"+(h.ymax-1)+\\\"v4h\\\"+2*d+\\\"v-4Z\\\")):\\\"d\\\"===o&&((h=[[D,R],[D,F],[B,F],[B,R]]).xmin=Math.min(D,B),h.xmax=Math.max(D,B),h.ymin=Math.min(R,F),h.ymax=Math.max(R,F),W.attr(\\\"d\\\",\\\"M0,0Z\\\"))}else\\\"lasso\\\"===s&&(c.addPt([B,F]),h=c.filtered);i.selectionDefs&&i.selectionDefs.length?(f=function(t,e,r){return r?n.difference({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions:n.union({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions}(i.mergedPolygons,h,q),h.subtract=q,u=_(i.selectionDefs.concat([h]))):(f=[h],u=v(h)),A(f,H),l.throttle(Y,p.SELECTDELAY,function(){X=[];var t,e,r=[];for(m=0;m<Z.length;m++)if(e=(x=Z[m])._module.selectPoints(x,u),r.push(e),t=C(e,x),X.length)for(var n=0;n<t.length;n++)X.push(t[n]);else X=t;S(T,Z,b={points:X}),G(b,h,c),i.gd.emit(\\\"plotly_selecting\\\",b)})},i.clickFn=function(t,e){var r=E.clickmode;W.remove(),l.done(Y).then(function(){if(l.clear(Y),2===t){for(H.remove(),m=0;m<Z.length;m++)(x=Z[m])._module.selectPoints(x,!1);S(T,Z),k(i),T.emit(\\\"plotly_deselect\\\",null)}else r.indexOf(\\\"select\\\")>-1&&y(e,T,i.xaxes,i.yaxes,i.subplot,i,H),\\\"event\\\"===r&&T.emit(\\\"plotly_selected\\\",void 0);o.click(T,e)})},i.doneFn=function(){W.remove(),l.done(Y).then(function(){l.clear(Y),i.gd.emit(\\\"plotly_selected\\\",b),h&&i.selectionDefs&&(h.subtract=q,i.selectionDefs.push(h),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,f))})}},clearSelect:E,selectOnClick:y}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../components/fx/helpers\\\":609,\\\"../../lib/clear_gl_canvases\\\":679,\\\"../../lib/polygon\\\":709,\\\"../../lib/throttle\\\":722,\\\"../../plot_api/subroutines\\\":736,\\\"../../registry\\\":828,\\\"./axis_ids\\\":748,\\\"./constants\\\":751,polybooljs:456}],764:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../lib\\\"),o=a.cleanNumber,s=a.ms2DateTime,l=a.dateTime2ms,c=a.ensureNumber,u=t(\\\"../../constants/numerical\\\"),f=u.FP_SAFE,h=u.BADNUM,p=u.LOG_CLIP,d=t(\\\"./constants\\\"),g=t(\\\"./axis_ids\\\");function v(t){return Math.pow(10,t)}e.exports=function(t,e){e=e||{};var r=(t._id||\\\"x\\\").charAt(0);function u(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*p*Math.abs(n-i))}return h}function m(e,r,n){var o=l(e,n||t.calendar);if(o===h){if(!i(e))return h;e=+e;var s=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-s/10);o=l(new Date(c))+s/10}return o}function y(e,r,n){return s(e,r,n||t.calendar)}function x(e){return t._categories[Math.round(e)]}function b(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if(i(e))return+e}function _(e){return i(e)?n.round(t._b+t._m*e,2):h}function w(e){return(e-t._b)/t._m}t.c2l=\\\"log\\\"===t.type?u:c,t.l2c=\\\"log\\\"===t.type?v:c,t.l2p=_,t.p2l=w,t.c2p=\\\"log\\\"===t.type?function(t,e){return _(u(t,e))}:_,t.p2c=\\\"log\\\"===t.type?function(t){return v(w(t))}:w,-1!==[\\\"linear\\\",\\\"-\\\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=c,t.d2p=t.r2p=function(e){return t.l2p(o(e))},t.p2d=t.p2r=w,t.cleanPos=c):\\\"log\\\"===t.type?(t.d2r=t.d2l=function(t,e){return u(o(t),e)},t.r2d=t.r2c=function(t){return v(o(t))},t.d2c=t.r2l=o,t.c2d=t.l2r=c,t.c2r=u,t.l2d=v,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return v(w(t))},t.r2p=function(e){return t.l2p(o(e))},t.p2r=w,t.cleanPos=c):\\\"date\\\"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=m,t.c2d=t.c2r=t.l2d=t.l2r=y,t.d2p=t.r2p=function(e,r,n){return t.l2p(m(e,0,n))},t.p2d=t.p2r=function(t,e,r){return y(w(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,h,t.calendar)}):\\\"category\\\"===t.type&&(t.d2c=t.d2l=function(e){if(null!=e){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return h},t.r2d=t.c2d=t.l2d=x,t.d2r=t.d2l_noadd=b,t.r2c=function(e){var r=b(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=c,t.r2l=b,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return x(w(t))},t.r2p=t.d2p,t.p2r=w,t.cleanPos=function(t){return\\\"string\\\"==typeof t&&\\\"\\\"!==t?t:c(t)}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e,n){n||(n={}),e||(e=\\\"range\\\");var o,s,l=a.nestedProperty(t,e).get();if(s=(s=\\\"date\\\"===t.type?a.dfltRange(t.calendar):\\\"y\\\"===r?d.DFLTRANGEY:n.dfltRange||d.DFLTRANGEX).slice(),l&&2===l.length)for(\\\"date\\\"===t.type&&(l[0]=a.cleanDate(l[0],h,t.calendar),l[1]=a.cleanDate(l[1],h,t.calendar)),o=0;o<2;o++)if(\\\"date\\\"===t.type){if(!a.isDateTime(l[o],t.calendar)){t[e]=s;break}if(t.r2l(l[0])===t.r2l(l[1])){var c=a.constrain(t.r2l(l[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);l[0]=t.l2r(c-1e3),l[1]=t.l2r(c+1e3);break}}else{if(!i(l[o])){if(!i(l[1-o])){t[e]=s;break}l[o]=l[1-o]*(o?10:.1)}if(l[o]<-f?l[o]=-f:l[o]>f&&(l[o]=f),l[0]===l[1]){var u=Math.max(1,Math.abs(1e-6*l[0]));l[0]-=u,l[1]+=u}}else a.nestedProperty(t,e).set(s)},t.setScale=function(n){var i=e._size;if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var a=g.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var o=n&&t._r?\\\"_r\\\":\\\"range\\\",s=t.calendar;t.cleanRange(o);var l=t.r2l(t[o][0],s),c=t.r2l(t[o][1],s);if(\\\"y\\\"===r?(t._offset=i.t+(1-t.domain[1])*i.h,t._length=i.h*(t.domain[1]-t.domain[0]),t._m=t._length/(l-c),t._b=-t._m*c):(t._offset=i.l+t.domain[0]*i.w,t._length=i.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-l),t._b=-t._m*l),!isFinite(t._m)||!isFinite(t._b))throw e._replotting=!1,new Error(\\\"Something went wrong with axis scaling\\\")},t.makeCalcdata=function(e,r){var n,i,o,s,l=t.type,c=\\\"date\\\"===l&&e[r+\\\"calendar\\\"];if(r in e){if(n=e[r],s=e._length||n.length,a.isTypedArray(n)&&(\\\"linear\\\"===l||\\\"log\\\"===l)){if(s===n.length)return n;if(n.subarray)return n.subarray(0,s)}for(i=new Array(s),o=0;o<s;o++)i[o]=t.d2c(n[o],0,c)}else{var u=r+\\\"0\\\"in e?t.d2c(e[r+\\\"0\\\"],0,c):0,f=e[\\\"d\\\"+r]?Number(e[\\\"d\\\"+r]):1;for(n=e[{x:\\\"y\\\",y:\\\"x\\\"}[r]],s=e._length||n.length,i=new Array(s),o=0;o<s;o++)i[o]=u+o*f}return i},t.isValidRange=function(e){return Array.isArray(e)&&2===e.length&&i(t.r2l(e[0]))&&i(t.r2l(e[1]))},t.isPtWithinRange=function(e,n){var i=t.c2l(e[r],null,n),a=t.r2l(t.range[0]),o=t.r2l(t.range[1]);return a<o?a<=i&&i<=o:o<=i&&i<=a},t.clearCalc=function(){t._categories=(t._initialCategories||[]).slice(),t._categoriesMap={};for(var e=0;e<t._categories.length;e++)t._categoriesMap[t._categories[e]]=e};var k=e._d3locale;\\\"date\\\"===t.type&&(t._dateFormat=k?k.timeFormat.utc:n.time.format.utc,t._extraFormat=e._extraFormat),t._separators=e.separators,t._numFormat=k?k.numberFormat:n.format,delete t._minDtick,delete t._forceTick0}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"./axis_ids\\\":748,\\\"./constants\\\":751,d3:148,\\\"fast-isnumeric\\\":214}],765:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\"),a=t(\\\"../array_container_defaults\\\");function o(t,e){function r(r,a){return n.coerce(t,e,i.tickformatstops,r,a)}r(\\\"enabled\\\")&&(r(\\\"dtickrange\\\"),r(\\\"value\\\"))}e.exports=function(t,e,r,s,l){var c=function(t){var e=[\\\"showexponent\\\",\\\"showtickprefix\\\",\\\"showticksuffix\\\"].filter(function(e){return void 0!==t[e]});if(e.every(function(r){return t[r]===t[e[0]]})||1===e.length)return t[e[0]]}(t);if(r(\\\"tickprefix\\\")&&r(\\\"showtickprefix\\\",c),r(\\\"ticksuffix\\\",l.tickSuffixDflt)&&r(\\\"showticksuffix\\\",c),r(\\\"showticklabels\\\")){var u=l.font||{},f=e.color,h=f&&f!==i.color.dflt?f:u.color;if(n.coerceFont(r,\\\"tickfont\\\",{family:u.family,size:u.size,color:h}),r(\\\"tickangle\\\"),\\\"category\\\"!==s){var p=r(\\\"tickformat\\\"),d=t.tickformatstops;Array.isArray(d)&&d.length&&a(t,e,{name:\\\"tickformatstops\\\",inclusionAttr:\\\"enabled\\\",handleItemDefaults:o}),p||\\\"date\\\"===s||(r(\\\"showexponent\\\",c),r(\\\"exponentformat\\\"),r(\\\"separatethousands\\\"))}}}},{\\\"../../lib\\\":696,\\\"../array_container_defaults\\\":741,\\\"./layout_attributes\\\":758}],766:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\");e.exports=function(t,e,r,a){var o=n.coerce2(t,e,i,\\\"ticklen\\\"),s=n.coerce2(t,e,i,\\\"tickwidth\\\"),l=n.coerce2(t,e,i,\\\"tickcolor\\\",e.color);r(\\\"ticks\\\",a.outerTicks||o||s||l?\\\"outside\\\":\\\"\\\")||(delete e.ticklen,delete e.tickwidth,delete e.tickcolor)}},{\\\"../../lib\\\":696,\\\"./layout_attributes\\\":758}],767:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./clean_ticks\\\");e.exports=function(t,e,r,i){var a;\\\"array\\\"!==t.tickmode||\\\"log\\\"!==i&&\\\"date\\\"!==i?a=r(\\\"tickmode\\\",Array.isArray(t.tickvals)?\\\"array\\\":t.dtick?\\\"linear\\\":\\\"auto\\\"):a=e.tickmode=\\\"auto\\\";if(\\\"auto\\\"===a)r(\\\"nticks\\\");else if(\\\"linear\\\"===a){var o=e.dtick=n.dtick(t.dtick,i);e.tick0=n.tick0(t.tick0,i,e.calendar,o)}else{void 0===r(\\\"tickvals\\\")?e.tickmode=\\\"auto\\\":r(\\\"ticktext\\\")}}},{\\\"./clean_ticks\\\":750}],768:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"./axes\\\"),s=t(\\\"./constants\\\").attrRegex;e.exports=function(t,e,r,l){var c=t._fullLayout,u=[];var f,h,p,d,g=function(t){var e,r,n,i,a={};for(e in t)if((r=e.split(\\\".\\\"))[0].match(s)){var o=e.charAt(0),l=r[0];if(n=c[l],i={},Array.isArray(t[e])?i.to=t[e].slice(0):Array.isArray(t[e].range)&&(i.to=t[e].range.slice(0)),!i.to)continue;i.axisName=l,i.length=n._length,u.push(o),a[o]=i}return a}(e),v=Object.keys(g),m=function(t,e,r){var n,i,a,o=t._plots,s=[];for(n in o){var l=o[n];if(-1===s.indexOf(l)){var c=l.xaxis._id,u=l.yaxis._id,f=l.xaxis.range,h=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[c]?r[c].to:f,a=r[u]?r[u].to:h,f[0]===i[0]&&f[1]===i[1]&&h[0]===a[0]&&h[1]===a[1]||-1===e.indexOf(c)&&-1===e.indexOf(u)||s.push(l)}}return s}(c,v,g);if(!m.length)return function(){function e(e,r,n){for(var i=0;i<e.length;i++)if(r(t,i),n)return}e(c.annotations||[],i.getComponentMethod(\\\"annotations\\\",\\\"drawOne\\\")),e(c.shapes||[],i.getComponentMethod(\\\"shapes\\\",\\\"drawOne\\\")),e(c.images||[],i.getComponentMethod(\\\"images\\\",\\\"draw\\\"),!0)}(),!1;function y(t){var e=t.xaxis,r=t.yaxis;c._defs.select(\\\"#\\\"+t.clipId+\\\"> rect\\\").call(a.setTranslate,0,0).call(a.setScale,1,1),t.plot.call(a.setTranslate,e._offset,r._offset).call(a.setScale,1,1);var n=t.plot.selectAll(\\\".scatterlayer .trace\\\");n.selectAll(\\\".point\\\").call(a.setPointGroupScale,1,1),n.selectAll(\\\".textpoint\\\").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,t)}function x(e,r){var n,s,l,u=g[e.xaxis._id],f=g[e.yaxis._id],h=[];if(u){s=(n=t._fullLayout[u.axisName])._r,l=u.to,h[0]=(s[0]*(1-r)+r*l[0]-s[0])/(s[1]-s[0])*e.xaxis._length;var p=s[1]-s[0],d=l[1]-l[0];n.range[0]=s[0]*(1-r)+r*l[0],n.range[1]=s[1]*(1-r)+r*l[1],h[2]=e.xaxis._length*(1-r+r*d/p)}else h[0]=0,h[2]=e.xaxis._length;if(f){s=(n=t._fullLayout[f.axisName])._r,l=f.to,h[1]=(s[1]*(1-r)+r*l[1]-s[1])/(s[0]-s[1])*e.yaxis._length;var v=s[1]-s[0],m=l[1]-l[0];n.range[0]=s[0]*(1-r)+r*l[0],n.range[1]=s[1]*(1-r)+r*l[1],h[3]=e.yaxis._length*(1-r+r*m/v)}else h[1]=0,h[3]=e.yaxis._length;!function(e,r){var n,a=[];for(a=[e._id,r._id],n=0;n<a.length;n++)o.doTicksSingle(t,a[n],!0);function s(e,r,i){for(n=0;n<e.length;n++){var o=e[n];if(-1===a.indexOf(o.xref)&&-1===a.indexOf(o.yref)||r(t,n),i)return}}s(c.annotations||[],i.getComponentMethod(\\\"annotations\\\",\\\"drawOne\\\")),s(c.shapes||[],i.getComponentMethod(\\\"shapes\\\",\\\"drawOne\\\")),s(c.images||[],i.getComponentMethod(\\\"images\\\",\\\"draw\\\"),!0)}(e.xaxis,e.yaxis);var y=e.xaxis,x=e.yaxis,b=!!u,_=!!f,w=b?y._length/h[2]:1,k=_?x._length/h[3]:1,M=b?h[0]:0,A=_?h[1]:0,T=b?h[0]/h[2]*y._length:0,S=_?h[1]/h[3]*x._length:0,C=y._offset-T,E=x._offset-S;e.clipRect.call(a.setTranslate,M,A).call(a.setScale,1/w,1/k),e.plot.call(a.setTranslate,C,E).call(a.setScale,w,k),a.setPointGroupScale(e.zoomScalePts,1/w,1/k),a.setTextPointsScale(e.zoomScaleTxt,1/w,1/k)}l&&(f=l());var b=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(d),d=null,function(){for(var e={},r=0;r<v.length;r++){var n=t._fullLayout[v[r]+\\\"axis\\\"];e[n._name+\\\".range[0]\\\"]=n.range[0],e[n._name+\\\".range[1]\\\"]=n.range[1],n.range=n._r.slice()}return i.call(\\\"relayout\\\",t,e).then(function(){for(var t=0;t<m.length;t++)y(m[t])})}()}),h=Date.now(),d=window.requestAnimationFrame(function e(){p=Date.now();for(var n=Math.min(1,(p-h)/r.duration),a=b(n),o=0;o<m.length;o++)x(m[o],a);p-h>r.duration?(function(){for(var e={},r=0;r<v.length;r++){var n=t._fullLayout[g[v[r]].axisName],a=g[v[r]].to;e[n._name+\\\".range[0]\\\"]=a[0],e[n._name+\\\".range[1]\\\"]=a[1],n.range=a.slice()}f&&f(),i.call(\\\"relayout\\\",t,e).then(function(){for(var t=0;t<m.length;t++)y(m[t])})}(),d=window.cancelAnimationFrame(e)):d=window.requestAnimationFrame(e)}),Promise.resolve()}},{\\\"../../components/drawing\\\":595,\\\"../../registry\\\":828,\\\"./axes\\\":745,\\\"./constants\\\":751,d3:148}],769:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"./axis_autotype\\\");function a(t){return{v:\\\"x\\\",h:\\\"y\\\"}[t.orientation||\\\"v\\\"]}function o(t,e){var r=a(t),i=n.traceIs(t,\\\"box-violin\\\"),o=n.traceIs(t._fullInput||{},\\\"candlestick\\\");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+\\\"0\\\"]}e.exports=function(t,e,r,s){\\\"-\\\"===r(\\\"type\\\",(s.splomStash||{}).type)&&(!function(t,e){if(\\\"-\\\"!==t.type)return;var r=t._id,s=r.charAt(0);-1!==r.indexOf(\\\"scene\\\")&&(r=s);var l=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(\\\"splom\\\"===i.type&&i._length>0&&(i[\\\"_\\\"+r+\\\"axes\\\"]||{})[e])return i;if((i[r+\\\"axis\\\"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+\\\"0\\\"])return i}}}(e,r,s);if(!l)return;if(\\\"histogram\\\"===l.type&&s==={v:\\\"y\\\",h:\\\"x\\\"}[l.orientation||\\\"v\\\"])return void(t.type=\\\"linear\\\");var c,u=s+\\\"calendar\\\",f=l[u];if(o(l,s)){var h=a(l),p=[];for(c=0;c<e.length;c++){var d=e[c];n.traceIs(d,\\\"box-violin\\\")&&(d[s+\\\"axis\\\"]||s)===r&&(void 0!==d[h]?p.push(d[h][0]):void 0!==d.name?p.push(d.name):p.push(\\\"text\\\"),d[u]!==f&&(f=void 0))}t.type=i(p,f)}else if(\\\"splom\\\"===l.type){var g=l.dimensions,v=l._diag;for(c=0;c<g.length;c++){var m=g[c];if(m.visible&&(v[c][0]===r||v[c][1]===r)){t.type=i(m.values,f);break}}}else t.type=i(l[s]||[l[s+\\\"0\\\"]],f)}(e,s.data),\\\"-\\\"===e.type?e.type=\\\"linear\\\":t.type=e.type)}},{\\\"../../registry\\\":828,\\\"./axis_autotype\\\":746}],770:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\"),i=t(\\\"../lib\\\");function a(t,e,r){var n,a,o,s=!1;if(\\\"data\\\"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if(\\\"layout\\\"!==e.type)return!1;n=t._fullLayout}return a=i.nestedProperty(n,e.prop).get(),(o=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&o[e.prop]!==a&&(s=!0),o[e.prop]=a,{changed:s,value:a}}function o(t,e){var r=[],n=e[0],a={};if(\\\"string\\\"==typeof n)a[n]=e[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,function(t,e,n){r.push({type:\\\"layout\\\",prop:t,value:n})},\\\"\\\",0),r}function s(t,e){var r,n,a,o,s=[];if(n=e[0],a=e[1],r=e[2],o={},\\\"string\\\"==typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&&(r=a)}return void 0===r&&(r=null),l(o,function(e,n,i){var a;if(Array.isArray(i)){var o=Math.min(i.length,t.data.length);r&&(o=Math.min(o,r.length)),a=[];for(var l=0;l<o;l++)a[l]=r?r[l]:l}else a=r?r.slice(0):null;if(null===a)Array.isArray(i)&&(i=i[0]);else if(Array.isArray(a)){if(!Array.isArray(i)){var c=i;i=[];for(var u=0;u<a.length;u++)i[u]=c}i.length=Math.min(a.length,i.length)}s.push({type:\\\"data\\\",prop:e,traces:a,value:i})},\\\"\\\",0),s}function l(t,e,r,n){Object.keys(t).forEach(function(a){var o=t[a];if(\\\"_\\\"!==a[0]){var s=r+(n>0?\\\".\\\":\\\"\\\")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}})}r.manageCommandObserver=function(t,e,n,o){var s={},l=!0;e&&e._commandObserver&&(s=e._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=r.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(e&&e._commandObserver){if(c)return s;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,s}if(c){a(t,c,s.cache),s.check=function(){if(l){var e=a(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=[\\\"plotly_relayout\\\",\\\"plotly_redraw\\\",\\\"plotly_restyle\\\",\\\"plotly_update\\\",\\\"plotly_animatingframe\\\",\\\"plotly_afterplot\\\"],f=0;f<u.length;f++)t._internalOn(u[f],s.check);s.remove=function(){for(var e=0;e<u.length;e++)t._removeInternalListener(u[e],s.check)}}else i.log(\\\"Unable to automatically bind plot updates to API command\\\"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},e&&(e._commandObserver=s),s},r.hasSimpleAPICommandBindings=function(t,e,n){var i,a,o=e.length;for(i=0;i<o;i++){var s,l=e[i],c=l.method,u=l.args;if(Array.isArray(u)||(u=[]),!c)return!1;var f=r.computeAPICommandBindings(t,c,u);if(1!==f.length)return!1;if(a){if((s=f[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var h=0;h<a.traces.length;h++)if(a.traces[h]!==s.traces[h])return!1}else if(s.prop!==a.prop)return!1}else a=f[0],Array.isArray(a.traces)&&a.traces.sort();var p=(s=f[0]).value;if(Array.isArray(p)){if(1!==p.length)return!1;p=p[0]}n&&(n[p]=i)}return a},r.executeAPICommand=function(t,e,r){if(\\\"skip\\\"===e)return Promise.resolve();var a=n.apiMethodRegistry[e],o=[t];Array.isArray(r)||(r=[]);for(var s=0;s<r.length;s++)o.push(r[s]);return a.apply(null,o).catch(function(t){return i.warn(\\\"API call to Plotly.\\\"+e+\\\" rejected.\\\",t),Promise.reject(t)})},r.computeAPICommandBindings=function(t,e,r){var n;switch(Array.isArray(r)||(r=[]),e){case\\\"restyle\\\":n=s(t,r);break;case\\\"relayout\\\":n=o(t,r);break;case\\\"update\\\":n=s(t,[r[0],r[2]]).concat(o(t,[r[1]]));break;case\\\"animate\\\":n=function(t,e){return Array.isArray(e[0])&&1===e[0].length&&-1!==[\\\"string\\\",\\\"number\\\"].indexOf(typeof e[0][0])?[{type:\\\"layout\\\",prop:\\\"_currentFrame\\\",value:e[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},{\\\"../lib\\\":696,\\\"../registry\\\":828}],771:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib/extend\\\").extendFlat;r.attributes=function(t,e){e=e||{};var r={valType:\\\"info_array\\\",editType:(t=t||{}).editType,items:[{valType:\\\"number\\\",min:0,max:1,editType:t.editType},{valType:\\\"number\\\",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=(t.name&&t.name,t.trace,e.description&&e.description,{x:n({},r,{}),y:n({},r,{}),editType:t.editType});return t.noGridCell||(i.row={valType:\\\"integer\\\",min:0,dflt:0,editType:t.editType},i.column={valType:\\\"integer\\\",min:0,dflt:0,editType:t.editType}),i},r.defaults=function(t,e,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=e.grid;if(o){var s=r(\\\"domain.column\\\");void 0!==s&&(s<o.columns?i=o._domains.x[s]:delete t.domain.column);var l=r(\\\"domain.row\\\");void 0!==l&&(l<o.rows?a=o._domains.y[l]:delete t.domain.row)}r(\\\"domain.x\\\",i),r(\\\"domain.y\\\",a)}},{\\\"../lib/extend\\\":685}],772:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){var e=t.editType,r=t.colorEditType;void 0===r&&(r=e);var n={family:{valType:\\\"string\\\",noBlank:!0,strict:!0,editType:e},size:{valType:\\\"number\\\",min:1,editType:e},color:{valType:\\\"color\\\",editType:r},editType:e};return t.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},{}],773:[function(t,e,r){\\\"use strict\\\";e.exports={_isLinkedToArray:\\\"frames_entry\\\",group:{valType:\\\"string\\\"},name:{valType:\\\"string\\\"},traces:{valType:\\\"any\\\"},baseframe:{valType:\\\"string\\\"},data:{valType:\\\"any\\\"},layout:{valType:\\\"any\\\"}}},{}],774:[function(t,e,r){\\\"use strict\\\";r.projNames={equirectangular:\\\"equirectangular\\\",mercator:\\\"mercator\\\",orthographic:\\\"orthographic\\\",\\\"natural earth\\\":\\\"naturalEarth\\\",kavrayskiy7:\\\"kavrayskiy7\\\",miller:\\\"miller\\\",robinson:\\\"robinson\\\",eckert4:\\\"eckert4\\\",\\\"azimuthal equal area\\\":\\\"azimuthalEqualArea\\\",\\\"azimuthal equidistant\\\":\\\"azimuthalEquidistant\\\",\\\"conic equal area\\\":\\\"conicEqualArea\\\",\\\"conic conformal\\\":\\\"conicConformal\\\",\\\"conic equidistant\\\":\\\"conicEquidistant\\\",gnomonic:\\\"gnomonic\\\",stereographic:\\\"stereographic\\\",mollweide:\\\"mollweide\\\",hammer:\\\"hammer\\\",\\\"transverse mercator\\\":\\\"transverseMercator\\\",\\\"albers usa\\\":\\\"albersUsa\\\",\\\"winkel tripel\\\":\\\"winkel3\\\",aitoff:\\\"aitoff\\\",sinusoidal:\\\"sinusoidal\\\"},r.axesNames=[\\\"lonaxis\\\",\\\"lataxis\\\"],r.lonaxisSpan={orthographic:180,\\\"azimuthal equal area\\\":360,\\\"azimuthal equidistant\\\":360,\\\"conic conformal\\\":180,gnomonic:160,stereographic:180,\\\"transverse mercator\\\":180,\\\"*\\\":360},r.lataxisSpan={\\\"conic conformal\\\":150,stereographic:179.5,\\\"*\\\":180},r.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:\\\"equirectangular\\\",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:\\\"albers usa\\\"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:\\\"conic conformal\\\",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:\\\"mercator\\\",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:\\\"mercator\\\",projRotate:[0,0,0]},\\\"north america\\\":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:\\\"conic conformal\\\",projRotate:[-100,0,0],projParallels:[29.5,45.5]},\\\"south america\\\":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:\\\"mercator\\\",projRotate:[0,0,0]}},r.clipPad=.001,r.precision=.1,r.landColor=\\\"#F0DC82\\\",r.waterColor=\\\"#3399FF\\\",r.locationmodeToLayer={\\\"ISO-3\\\":\\\"countries\\\",\\\"USA-states\\\":\\\"subunits\\\",\\\"country names\\\":\\\"countries\\\"},r.sphereSVG={type:\\\"Sphere\\\"},r.fillLayers={ocean:1,land:1,lakes:1},r.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},r.layers=[\\\"bg\\\",\\\"ocean\\\",\\\"land\\\",\\\"lakes\\\",\\\"subunits\\\",\\\"countries\\\",\\\"coastlines\\\",\\\"rivers\\\",\\\"lataxis\\\",\\\"lonaxis\\\",\\\"frame\\\",\\\"backplot\\\",\\\"frontplot\\\"],r.layersForChoropleth=[\\\"bg\\\",\\\"ocean\\\",\\\"land\\\",\\\"subunits\\\",\\\"countries\\\",\\\"coastlines\\\",\\\"lataxis\\\",\\\"lonaxis\\\",\\\"frame\\\",\\\"backplot\\\",\\\"rivers\\\",\\\"lakes\\\",\\\"frontplot\\\"],r.layerNameToAdjective={ocean:\\\"ocean\\\",land:\\\"land\\\",lakes:\\\"lake\\\",subunits:\\\"subunit\\\",countries:\\\"country\\\",coastlines:\\\"coastline\\\",rivers:\\\"river\\\",frame:\\\"frame\\\"}},{}],775:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"../../components/fx\\\"),c=t(\\\"../plots\\\"),u=t(\\\"../cartesian/axes\\\"),f=t(\\\"../../components/dragelement\\\"),h=t(\\\"../cartesian/select\\\").prepSelect,p=t(\\\"../cartesian/select\\\").selectOnClick,d=t(\\\"./zoom\\\"),g=t(\\\"./constants\\\"),v=t(\\\"../../lib/topojson_utils\\\"),m=t(\\\"topojson-client\\\").feature;function y(t){this.id=t.id,this.graphDiv=t.graphDiv,this.container=t.container,this.topojsonURL=t.topojsonURL,this.isStatic=t.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}t(\\\"./projections\\\")(n);var x=y.prototype;e.exports=function(t){return new y(t)},x.plot=function(t,e,r){var n=this,i=e[this.id],a=v.getTopojsonName(i);null===n.topojson||a!==n.topojsonName?(n.topojsonName=a,void 0===PlotlyGeoAssets.topojson[n.topojsonName]?r.push(n.fetchTopojson().then(function(r){PlotlyGeoAssets.topojson[n.topojsonName]=r,n.topojson=r,n.update(t,e)})):(n.topojson=PlotlyGeoAssets.topojson[n.topojsonName],n.update(t,e))):n.update(t,e)},x.fetchTopojson=function(){var t=v.getTopojsonPath(this.topojsonURL,this.topojsonName);return new Promise(function(e,r){n.json(t,function(n,i){if(n)return 404===n.status?r(new Error([\\\"plotly.js could not find topojson file at\\\",t,\\\".\\\",\\\"Make sure the *topojsonURL* plot config option\\\",\\\"is set properly.\\\"].join(\\\" \\\"))):r(new Error([\\\"unexpected error while fetching topojson file at\\\",t].join(\\\" \\\")));e(i)})})},x.update=function(t,e){var r=e[this.id];if(!this.updateProjection(e,r)){this.hasChoropleth=!1;for(var n=0;n<t.length;n++)if(\\\"choropleth\\\"===t[n][0].trace.type){this.hasChoropleth=!0;break}this.viewInitial||this.saveViewInitial(r),this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),c.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var i=this.layers.frontplot.select(\\\".scatterlayer\\\");this.dataPoints.point=i.selectAll(\\\".point\\\"),this.dataPoints.text=i.selectAll(\\\"text\\\"),this.dataPaths.line=i.selectAll(\\\".js-line\\\");var a=this.layers.backplot.select(\\\".choroplethlayer\\\");this.dataPaths.choropleth=a.selectAll(\\\"path\\\"),this.render()}},x.updateProjection=function(t,e){var r=t._size,o=e.domain,s=e.projection,l=s.rotation||{},c=e.center||{},u=this.projection=function(t){for(var e=t.projection.type,r=n.geo[g.projNames[e]](),i=t._isClipped?g.lonaxisSpan[e]/2:null,a=[\\\"center\\\",\\\"rotate\\\",\\\"parallels\\\",\\\"clipExtent\\\"],o=function(t){return t?r:[]},s=0;s<a.length;s++){var l=a[s];\\\"function\\\"!=typeof r[l]&&(r[l]=o)}r.isLonLatOverEdges=function(t){if(null===r(t))return!0;if(i){var e=r.rotate();return n.geo.distance(t,[-e[0],-e[1]])>i*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),a&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return a&&r.clipExtent(a),r.scale(150*s).translate([l,c])},r.precision(g.precision),i&&r.clipAngle(i-g.clipPad);return r}(e);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var f=[[r.l+r.w*o.x[0],r.t+r.h*(1-o.y[1])],[r.l+r.w*o.x[1],r.t+r.h*(1-o.y[0])]],h=e.lonaxis,p=e.lataxis,d=function(t,e){var r=g.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:\\\"Polygon\\\",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}(h.range,p.range);u.fitExtent(f,d);var v=this.bounds=u.getBounds(d),m=this.fitScale=u.scale(),y=u.translate();if(!isFinite(v[0][0])||!isFinite(v[0][1])||!isFinite(v[1][0])||!isFinite(v[1][1])||isNaN(y[0])||isNaN(y[0])){for(var x=this.graphDiv,b=[\\\"projection.rotation\\\",\\\"center\\\",\\\"lonaxis.range\\\",\\\"lataxis.range\\\"],_=\\\"Invalid geo settings, relayout'ing to default view.\\\",w={},k=0;k<b.length;k++)w[this.id+\\\".\\\"+b[k]]=null;return this.viewInitial=null,a.warn(_),x._promises.push(i.call(\\\"relayout\\\",x,w)),_}var M=this.midPt=[(v[0][0]+v[1][0])/2,(v[0][1]+v[1][1])/2];if(u.scale(s.scale*m).translate([y[0]+(M[0]-y[0]),y[1]+(M[1]-y[1])]).clipExtent(v),e._isAlbersUsa){var A=u([c.lon,c.lat]),T=u.translate();u.translate([T[0]-(A[0]-T[0]),T[1]-(A[1]-T[1])])}},x.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,l=r.basePaths;function c(t){return\\\"lonaxis\\\"===t||\\\"lataxis\\\"===t}function u(t){return Boolean(g.lineLayers[t])}function f(t){return Boolean(g.fillLayers[t])}var h=(this.hasChoropleth?g.layersForChoropleth:g.layers).filter(function(t){return u(t)||f(t)?e[\\\"show\\\"+t]:!c(t)||e[t].showgrid}),p=r.framework.selectAll(\\\".layer\\\").data(h,String);p.exit().each(function(t){delete a[t],delete l[t],n.select(this).remove()}),p.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"layer \\\"+t}).each(function(t){var e=a[t]=n.select(this);\\\"bg\\\"===t?r.bgRect=e.append(\\\"rect\\\").style(\\\"pointer-events\\\",\\\"all\\\"):c(t)?l[t]=e.append(\\\"path\\\").style(\\\"fill\\\",\\\"none\\\"):\\\"backplot\\\"===t?e.append(\\\"g\\\").classed(\\\"choroplethlayer\\\",!0):\\\"frontplot\\\"===t?e.append(\\\"g\\\").classed(\\\"scatterlayer\\\",!0):u(t)?l[t]=e.append(\\\"path\\\").style(\\\"fill\\\",\\\"none\\\").style(\\\"stroke-miterlimit\\\",2):f(t)&&(l[t]=e.append(\\\"path\\\").style(\\\"stroke\\\",\\\"none\\\"))}),p.order(),p.each(function(t){var r=l[t],a=g.layerNameToAdjective[t];\\\"frame\\\"===t?r.datum(g.sphereSVG):u(t)||f(t)?r.datum(m(i,i.objects[t])):c(t)&&r.datum(function(t,e){var r=e[t].dtick,i=g.scopeDefaults[e.scope],a=i.lonaxisRange,o=i.lataxisRange,s=\\\"lonaxis\\\"===t?[r]:[0,r];return n.geo.graticule().extent([[a[0],o[0]],[a[1],o[1]]]).step(s)}(t,e)).call(o.stroke,e[t].gridcolor).call(s.dashLine,\\\"\\\",e[t].gridwidth),u(t)?r.call(o.stroke,e[a+\\\"color\\\"]).call(s.dashLine,\\\"\\\",e[a+\\\"width\\\"]):f(t)&&r.call(o.fill,e[a+\\\"color\\\"])})},x.updateDims=function(t,e){var r=this.bounds,n=(e.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,l=r[1][0]-i+n,c=r[1][1]-a+n;s.setRect(this.clipRect,i,a,l,c),this.bgRect.call(s.setRect,i,a,l,c).call(o.fill,e.bgcolor),this.xaxis._offset=i,this.xaxis._length=l,this.yaxis._offset=a,this.yaxis._length=c},x.updateFx=function(t,e){var r=this,a=r.graphDiv,o=r.bgRect,s=t.dragmode,c=t.clickmode;if(!r.isStatic){var u;\\\"select\\\"===s?u=function(t,e){(t.range={})[r.id]=[v([e.xmin,e.ymin]),v([e.xmax,e.ymax])]}:\\\"lasso\\\"===s&&(u=function(t,e,n){(t.lassoPoints={})[r.id]=n.filtered.map(v)});var g={element:r.bgRect.node(),gd:a,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(e){2===e&&t._zoomlayer.selectAll(\\\".select-outline\\\").remove()}};\\\"pan\\\"===s?(o.node().onmousedown=null,o.call(d(r,e)),o.on(\\\"dblclick.zoom\\\",function(){var t=r.viewInitial,e={};for(var n in t)e[r.id+\\\".\\\"+n]=t[n];i.call(\\\"relayout\\\",a,e),a.emit(\\\"plotly_doubleclick\\\",null)})):\\\"select\\\"!==s&&\\\"lasso\\\"!==s||(o.on(\\\".zoom\\\",null),g.prepFn=function(t,e,r){h(t,e,r,g,s)},f.init(g)),o.on(\\\"mousemove\\\",function(){var t=r.projection.invert(n.mouse(this));if(!t||isNaN(t[0])||isNaN(t[1]))return f.unhover(a,n.event);r.xaxis.p2c=function(){return t[0]},r.yaxis.p2c=function(){return t[1]},l.hover(a,n.event,r.id)}),o.on(\\\"mouseout\\\",function(){a._dragging||f.unhover(a,n.event)}),o.on(\\\"click\\\",function(){\\\"select\\\"!==s&&\\\"lasso\\\"!==s&&(c.indexOf(\\\"select\\\")>-1&&p(n.event,a,[r.xaxis],[r.yaxis],r.id,g),c.indexOf(\\\"event\\\")>-1&&l.click(a,n.event))})}function v(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},x.makeFramework=function(){var t=this,e=t.graphDiv._fullLayout,r=\\\"clip\\\"+e._uid+t.id;t.clipDef=e._clips.append(\\\"clipPath\\\").attr(\\\"id\\\",r),t.clipRect=t.clipDef.append(\\\"rect\\\"),t.framework=n.select(t.container).append(\\\"g\\\").attr(\\\"class\\\",\\\"geo \\\"+t.id).call(s.setClipUrl,r),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:\\\"x\\\",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:\\\"y\\\",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:\\\"linear\\\",showexponent:\\\"all\\\",exponentformat:\\\"B\\\"},u.setConvert(t.mockAxis,e)},x.saveViewInitial=function(t){var e=t.center||{},r=t.projection,n=r.rotation||{};t._isScoped?this.viewInitial={\\\"center.lon\\\":e.lon,\\\"center.lat\\\":e.lat,\\\"projection.scale\\\":r.scale}:t._isClipped?this.viewInitial={\\\"projection.scale\\\":r.scale,\\\"projection.rotation.lon\\\":n.lon,\\\"projection.rotation.lat\\\":n.lat}:this.viewInitial={\\\"center.lon\\\":e.lon,\\\"center.lat\\\":e.lat,\\\"projection.scale\\\":r.scale,\\\"projection.rotation.lon\\\":n.lon}},x.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?\\\"translate(\\\"+r[0]+\\\",\\\"+r[1]+\\\")\\\":null}function i(t){return e.isLonLatOverEdges(t.lonlat)?\\\"none\\\":null}for(t in this.basePaths)this.basePaths[t].attr(\\\"d\\\",r);for(t in this.dataPaths)this.dataPaths[t].attr(\\\"d\\\",function(t){return r(t.geojson)});for(t in this.dataPoints)this.dataPoints[t].attr(\\\"display\\\",i).attr(\\\"transform\\\",n)}},{\\\"../../components/color\\\":570,\\\"../../components/dragelement\\\":592,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../lib/topojson_utils\\\":724,\\\"../../registry\\\":828,\\\"../cartesian/axes\\\":745,\\\"../cartesian/select\\\":763,\\\"../plots\\\":809,\\\"./constants\\\":774,\\\"./projections\\\":780,\\\"./zoom\\\":781,d3:148,\\\"topojson-client\\\":517}],776:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./geo\\\"),i=t(\\\"../../plots/get_data\\\").getSubplotCalcData,a=t(\\\"../../lib\\\").counterRegex,o=\\\"geo\\\";r.name=o,r.attr=o,r.idRoot=o,r.idRegex=r.attrRegex=a(o),r.attributes=t(\\\"./layout/attributes\\\"),r.layoutAttributes=t(\\\"./layout/layout_attributes\\\"),r.supplyLayoutDefaults=t(\\\"./layout/defaults\\\"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots.geo;void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var s=0;s<a.length;s++){var l=a[s],c=i(r,o,l),u=e[l]._subplot;u||(u=n({id:l,graphDiv:t,container:e._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),e[l]._subplot=u),u.plot(c,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.geo||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.framework.remove(),s.clipDef.remove())}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.geo,n=0;n<r.length;n++){var i=e[r[n]];i._subplot.updateFx(e,i)}}},{\\\"../../lib\\\":696,\\\"../../plots/get_data\\\":782,\\\"./geo\\\":775,\\\"./layout/attributes\\\":777,\\\"./layout/defaults\\\":778,\\\"./layout/layout_attributes\\\":779}],777:[function(t,e,r){\\\"use strict\\\";e.exports={geo:{valType:\\\"subplotid\\\",dflt:\\\"geo\\\",editType:\\\"calc\\\"}}},{}],778:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../subplot_defaults\\\"),i=t(\\\"../constants\\\"),a=t(\\\"./layout_attributes\\\"),o=i.axesNames;function s(t,e,r){var n=r(\\\"resolution\\\"),a=r(\\\"scope\\\"),s=i.scopeDefaults[a],l=r(\\\"projection.type\\\",s.projType),c=e._isAlbersUsa=\\\"albers usa\\\"===l;c&&(a=e.scope=\\\"usa\\\");var u=e._isScoped=\\\"world\\\"!==a,f=e._isConic=-1!==l.indexOf(\\\"conic\\\");e._isClipped=!!i.lonaxisSpan[l];for(var h=0;h<o.length;h++){var p,d=o[h],g=[30,10][h];if(u)p=s[d+\\\"Range\\\"];else{var v=i[d+\\\"Span\\\"],m=(v[l]||v[\\\"*\\\"])/2,y=r(\\\"projection.rotation.\\\"+d.substr(0,3),s.projRotate[h]);p=[y-m,y+m]}var x=r(d+\\\".range\\\",p);r(d+\\\".tick0\\\",x[0]),r(d+\\\".dtick\\\",g),r(d+\\\".showgrid\\\")&&(r(d+\\\".gridcolor\\\"),r(d+\\\".gridwidth\\\"))}var b=e.lonaxis.range,_=e.lataxis.range,w=b[0],k=b[1];w>0&&k<0&&(k+=360);var M,A,T,S=(w+k)/2;if(!c){var C=u?s.projRotate:[S,0,0];M=r(\\\"projection.rotation.lon\\\",C[0]),r(\\\"projection.rotation.lat\\\",C[1]),r(\\\"projection.rotation.roll\\\",C[2]),r(\\\"showcoastlines\\\",!u)&&(r(\\\"coastlinecolor\\\"),r(\\\"coastlinewidth\\\")),r(\\\"showocean\\\")&&r(\\\"oceancolor\\\")}(c?(A=-96.6,T=38.7):(A=u?S:M,T=(_[0]+_[1])/2),r(\\\"center.lon\\\",A),r(\\\"center.lat\\\",T),f)&&r(\\\"projection.parallels\\\",s.projParallels||[0,60]);r(\\\"projection.scale\\\"),r(\\\"showland\\\")&&r(\\\"landcolor\\\"),r(\\\"showlakes\\\")&&r(\\\"lakecolor\\\"),r(\\\"showrivers\\\")&&(r(\\\"rivercolor\\\"),r(\\\"riverwidth\\\")),r(\\\"showcountries\\\",u&&\\\"usa\\\"!==a)&&(r(\\\"countrycolor\\\"),r(\\\"countrywidth\\\")),(\\\"usa\\\"===a||\\\"north america\\\"===a&&50===n)&&(r(\\\"showsubunits\\\",!0),r(\\\"subunitcolor\\\"),r(\\\"subunitwidth\\\")),u||r(\\\"showframe\\\",!0)&&(r(\\\"framecolor\\\"),r(\\\"framewidth\\\")),r(\\\"bgcolor\\\")}e.exports=function(t,e,r){n(t,e,r,{type:\\\"geo\\\",attributes:a,handleDefaults:s,partition:\\\"y\\\"})}},{\\\"../../subplot_defaults\\\":823,\\\"../constants\\\":774,\\\"./layout_attributes\\\":779}],779:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../components/color/attributes\\\"),i=t(\\\"../../domain\\\").attributes,a=t(\\\"../constants\\\"),o=t(\\\"../../../plot_api/edit_types\\\").overrideAll,s={range:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\"},{valType:\\\"number\\\"}]},showgrid:{valType:\\\"boolean\\\",dflt:!1},tick0:{valType:\\\"number\\\"},dtick:{valType:\\\"number\\\"},gridcolor:{valType:\\\"color\\\",dflt:n.lightLine},gridwidth:{valType:\\\"number\\\",min:0,dflt:1}};e.exports=o({domain:i({name:\\\"geo\\\"},{}),resolution:{valType:\\\"enumerated\\\",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:\\\"enumerated\\\",values:Object.keys(a.scopeDefaults),dflt:\\\"world\\\"},projection:{type:{valType:\\\"enumerated\\\",values:Object.keys(a.projNames)},rotation:{lon:{valType:\\\"number\\\"},lat:{valType:\\\"number\\\"},roll:{valType:\\\"number\\\"}},parallels:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\"},{valType:\\\"number\\\"}]},scale:{valType:\\\"number\\\",min:0,dflt:1}},center:{lon:{valType:\\\"number\\\"},lat:{valType:\\\"number\\\"}},showcoastlines:{valType:\\\"boolean\\\"},coastlinecolor:{valType:\\\"color\\\",dflt:n.defaultLine},coastlinewidth:{valType:\\\"number\\\",min:0,dflt:1},showland:{valType:\\\"boolean\\\",dflt:!1},landcolor:{valType:\\\"color\\\",dflt:a.landColor},showocean:{valType:\\\"boolean\\\",dflt:!1},oceancolor:{valType:\\\"color\\\",dflt:a.waterColor},showlakes:{valType:\\\"boolean\\\",dflt:!1},lakecolor:{valType:\\\"color\\\",dflt:a.waterColor},showrivers:{valType:\\\"boolean\\\",dflt:!1},rivercolor:{valType:\\\"color\\\",dflt:a.waterColor},riverwidth:{valType:\\\"number\\\",min:0,dflt:1},showcountries:{valType:\\\"boolean\\\"},countrycolor:{valType:\\\"color\\\",dflt:n.defaultLine},countrywidth:{valType:\\\"number\\\",min:0,dflt:1},showsubunits:{valType:\\\"boolean\\\"},subunitcolor:{valType:\\\"color\\\",dflt:n.defaultLine},subunitwidth:{valType:\\\"number\\\",min:0,dflt:1},showframe:{valType:\\\"boolean\\\"},framecolor:{valType:\\\"color\\\",dflt:n.defaultLine},framewidth:{valType:\\\"number\\\",min:0,dflt:1},bgcolor:{valType:\\\"color\\\",dflt:n.background},lonaxis:s,lataxis:s},\\\"plot\\\",\\\"from-root\\\")},{\\\"../../../components/color/attributes\\\":569,\\\"../../../plot_api/edit_types\\\":728,\\\"../../domain\\\":771,\\\"../constants\\\":774}],780:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){function e(t,e){return{type:\\\"Feature\\\",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if(\\\"GeometryCollection\\\"===e.type)return{type:\\\"GeometryCollection\\\",geometries:object.geometries.map(function(t){return r(t,n)})};if(!c.hasOwnProperty(e.type))return null;var i=c[e.type];return t.geo.stream(e,n(i)),i.result()}t.geo.project=function(t,e){var i=e.stream;if(!i)throw new Error(\\\"not yet supported\\\");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,i)};var n={Feature:e,FeatureCollection:function(t,r){return{type:\\\"FeatureCollection\\\",features:t.features.map(function(t){return e(t,r)})}}},i=[],a=[],o={point:function(t,e){i.push([t,e])},result:function(){var t=i.length?i.length<2?{type:\\\"Point\\\",coordinates:i[0]}:{type:\\\"MultiPoint\\\",coordinates:i}:null;return i=[],t}},s={lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){i.length&&(a.push(i),i=[])},result:function(){var t=a.length?a.length<2?{type:\\\"LineString\\\",coordinates:a[0]}:{type:\\\"MultiLineString\\\",coordinates:a}:null;return a=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){var t=i.length;if(t){do{i.push(i[0].slice())}while(++t<4);a.push(i),i=[]}},polygonEnd:u,result:function(){if(!a.length)return null;var t=[],e=[];return a.forEach(function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++r<e;)n+=t[r-1][1]*t[r][0]-t[r-1][0]*t[r][1];return n<=0}(r)?e.push(r):t.push([r])}),e.forEach(function(e){var r=e[0];t.some(function(t){if(function(t,e){for(var r=e[0],n=e[1],i=!1,a=0,o=t.length,s=o-1;a<o;s=a++){var l=t[a],c=l[0],u=l[1],f=t[s],h=f[0],p=f[1];u>n^p>n&&r<(h-c)*(n-u)/(p-u)+c&&(i=!i)}return i}(t[0],r))return t.push(e),!0})||t.push([e])}),a=[],t.length?t.length>1?{type:\\\"MultiPolygon\\\",coordinates:t}:{type:\\\"Polygon\\\",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var f=1e-6,h=f*f,p=Math.PI,d=p/2,g=(Math.sqrt(p),p/180),v=180/p;function m(t){return t>1?d:t<-1?-d:Math.asin(t)}function y(t){return t>1?0:t<-1?p:Math.acos(t)}var x=t.geo.projection,b=t.geo.projectionMutator;function _(t,e){var r=(2+d)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>f;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(p*(4+p))*t*(1+Math.cos(e)),2*Math.sqrt(p/(4+p))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-p,0],[0,d],[p,0]]],[[[-p,0],[0,-d],[p,0]]]];function i(t,r){for(var i=r<0?-1:1,a=n[+(r<0)],o=0,s=a.length-1;o<s&&t>a[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}e.invert&&(i.invert=function(t,a){for(var o=r[+(a<0)],s=n[+(a<0)],c=0,u=o.length;c<u;++c){var f=o[c];if(f[0][0]<=t&&t<f[1][0]&&f[0][1]<=a&&a<f[1][1]){var h=e.invert(t-e(s[c][1][0],0)[0],a);return h[0]+=s[c][1][0],l(i(h[0],h[1]),[t,a])?h:null}}});var a=t.geo.projection(i),o=a.stream;function s(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++a<o;){n=((r=t[a])[0]-s[0])/e,i=(r[1]-s[1])/e;for(var c=0;c<e;++c)l.push([s[0]+c*n,s[1]+c*i]);s=r}return l.push(r),l}function l(t,e){return Math.abs(t[0]-e[0])<f&&Math.abs(t[1]-e[1])<f}return a.stream=function(e){var r=a.rotate(),i=o(e),l=(a.rotate([0,0]),o(e));return a.rotate(r),i.sphere=function(){t.geo.stream(function(){for(var e=1e-6,r=[],i=0,a=n[0].length;i<a;++i){var o=n[0][i],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,f=180*o[2][0]/p,h=180*o[2][1]/p;r.push(s([[l+e,c+e],[l+e,u-e],[f-e,u-e],[f-e,h+e]],30))}for(var i=n[1].length-1;i>=0;--i){var o=n[1][i],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,f=180*o[2][0]/p,h=180*o[2][1]/p;r.push(s([[f-e,h-e],[f-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:\\\"Polygon\\\",coordinates:[t.merge(r)]}}(),l)},i},a.lobes=function(t){return arguments.length?(n=t.map(function(t){return t.map(function(t){return[[t[0][0]*p/180,t[0][1]*p/180],[t[1][0]*p/180,t[1][1]*p/180],[t[2][0]*p/180,t[2][1]*p/180]]})}),r=n.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})}),a):n.map(function(t){return t.map(function(t){return[[180*t[0][0]/p,180*t[0][1]/p],[180*t[1][0]/p,180*t[1][1]/p],[180*t[2][0]/p,180*t[2][1]/p]]})})},a},_.invert=function(t,e){var r=.5*e*Math.sqrt((4+p)/p),n=m(r),i=Math.cos(n);return[t/(2/Math.sqrt(p*(4+p))*(1+i)),m((n+r*(i+2))/(2+d))]},(t.geo.eckert4=function(){return x(_)}).raw=_;var w=t.geo.azimuthalEqualArea.raw;function k(t,e){if(arguments.length<2&&(e=t),1===e)return w;if(e===1/0)return M;function r(r,n){var i=w(r/e,n);return i[0]*=t,i}return r.invert=function(r,n){var i=w.invert(r/t,n);return i[0]*=e,i},r}function M(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function A(t,e){return[3*t/(2*p)*Math.sqrt(p*p/3-e*e),e]}function T(t,e){return[t,1.25*Math.log(Math.tan(p/4+.4*e))]}function S(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>f&&--i>0);return e/2}}M.invert=function(t,e){var r=2*m(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=b(k),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=k,A.invert=function(t,e){return[2/3*p*t/Math.sqrt(p*p/3-e*e),e]},(t.geo.kavrayskiy7=function(){return x(A)}).raw=A,T.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*p]},(t.geo.miller=function(){return x(T)}).raw=T,S(p);var C=function(t,e,r){var n=S(r);function i(r,i){return[t*r*Math.cos(i=n(i)),e*Math.sin(i)]}return i.invert=function(n,i){var a=m(i/e);return[n/(t*Math.cos(a)),m((2*a+Math.sin(2*a))/r)]},i}(Math.SQRT2/d,Math.SQRT2,p);function E(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return x(C)}).raw=C,E.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Math.abs(r)>f&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return x(E)}).raw=E;var L=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function z(t,e){var r,n=Math.min(18,36*Math.abs(e)/p),i=Math.floor(n),a=n-i,o=(r=L[i])[0],s=r[1],l=(r=L[++i])[0],c=r[1],u=(r=L[Math.min(19,++i)])[0],f=r[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?d:-d)*(c+a*(f-s)/2+a*a*(f-2*c+s)/2)]}function O(t,e){return[t*Math.cos(e),e]}function I(t,e){var r,n=Math.cos(e),i=(r=y(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*i,Math.sin(e)*i]}function P(t,e){var r=I(t,e);return[(r[0]+t/d)/2,(r[1]+e)/2]}L.forEach(function(t){t[1]*=1.0144}),z.invert=function(t,e){var r=e/d,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],c=l-o,u=l-2*s+o,f=2*(Math.abs(r)-s)/c,p=u/c,m=f*(1-p*f*(1-2*p*f));if(m>=0||1===a){n=(e>=0?5:-5)*(m+i);var y,x=50;do{m=(i=Math.min(18,Math.abs(n)/5))-(a=Math.floor(i)),o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],n-=(y=(e>=0?d:-d)*(s+m*(l-o)/2+m*m*(l-2*s+o)/2)-e)*v}while(Math.abs(y)>h&&--x>0);break}}while(--a>=0);var b=L[a][0],_=L[a+1][0],w=L[Math.min(19,a+2)][0];return[t/(_+m*(w-b)/2+m*m*(w-2*_+b)/2),n*g]},(t.geo.robinson=function(){return x(z)}).raw=z,O.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return x(O)}).raw=O,I.invert=function(t,e){if(!(t*t+4*e*e>p*p+f)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),h=Math.sin(2*n),d=c*c,g=u*u,v=s*s,m=1-g*l*l,x=m?y(u*l)*Math.sqrt(a=1/m):a=0,b=2*x*u*s-t,_=x*c-e,w=a*(g*v+x*u*l*d),k=a*(.5*o*h-2*x*c*s),M=.25*a*(h*s-x*c*g*o),A=a*(d*l+x*v*u),T=k*M-A*w;if(!T)break;var S=(_*k-b*A)/T,C=(b*M-_*w)/T;r-=S,n-=C}while((Math.abs(S)>f||Math.abs(C)>f)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return x(I)}).raw=I,P.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,h=Math.sin(r),p=Math.cos(r/2),g=Math.sin(r/2),v=g*g,m=1-u*p*p,x=m?y(o*p)*Math.sqrt(a=1/m):a=0,b=.5*(2*x*o*g+r/d)-t,_=.5*(x*s+n)-e,w=.5*a*(u*v+x*o*p*c)+.5/d,k=a*(h*l/4-x*s*g),M=.125*a*(l*g-x*s*u*h),A=.5*a*(c*p+x*v*o)+.5,T=k*M-A*w,S=(_*k-b*A)/T,C=(b*M-_*w)/T;r-=S,n-=C}while((Math.abs(S)>f||Math.abs(C)>f)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return x(P)}).raw=P}},{}],781:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=Math.PI/180,o=180/Math.PI,s={cursor:\\\"pointer\\\"},l={cursor:\\\"auto\\\"};function c(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function u(t,e,r){var n=t.id,a=t.graphDiv,o=a.layout[n],s=a._fullLayout[n],l={};function c(t,e){var r=i.nestedProperty(s,t);r.get()!==e&&(r.set(e),i.nestedProperty(o,t).set(e),l[n+\\\".\\\"+t]=e)}r(c),c(\\\"projection.scale\\\",e.scale()/t.fitScale),a.emit(\\\"plotly_relayout\\\",l)}function f(t,e){var r=c(0,e);function i(r){var n=e.invert(t.midPt);r(\\\"center.lon\\\",n[0]),r(\\\"center.lat\\\",n[1])}return r.on(\\\"zoomstart\\\",function(){n.select(this).style(s)}).on(\\\"zoom\\\",function(){e.scale(n.event.scale).translate(n.event.translate),t.render()}).on(\\\"zoomend\\\",function(){n.select(this).style(l),u(t,e,i)}),r}function h(t,e){var r,i,a,o,f,h,p,d,g,v=c(0,e),m=2;function y(t){return e.invert(t)}function x(r){var n=e.rotate(),i=e.invert(t.midPt);r(\\\"projection.rotation.lon\\\",-n[0]),r(\\\"center.lon\\\",i[0]),r(\\\"center.lat\\\",i[1])}return v.on(\\\"zoomstart\\\",function(){n.select(this).style(s),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,f=y(r)}).on(\\\"zoom\\\",function(){if(h=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>m||Math.abs(n[1]-t[1])>m}(r))return v.scale(e.scale()),void v.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),f?y(h)&&(d=y(h),p=[o[0]+(d[0]-f[0]),i[1],i[2]],e.rotate(p),o=p):f=y(r=h),g=!0,t.render()}).on(\\\"zoomend\\\",function(){n.select(this).style(l),g&&u(t,e,x)}),v}function p(t,e){var r,i={r:e.rotate(),k:e.scale()},f=c(0,e),h=function(t){var e=0,r=arguments.length,i=[];for(;++e<r;)i.push(arguments[e]);var a=n.dispatch.apply(null,i);return a.of=function(e,r){return function(i){var o;try{o=i.sourceEvent=n.event,i.target=t,n.event=i,a[i.type].apply(e,r)}finally{n.event=o}}},a}(f,\\\"zoomstart\\\",\\\"zoom\\\",\\\"zoomend\\\"),p=0,v=f.on;function x(t){var r=e.rotate();t(\\\"projection.rotation.lon\\\",-r[0]),t(\\\"projection.rotation.lat\\\",-r[1])}return f.on(\\\"zoomstart\\\",function(){n.select(this).style(s);var t,l,c,u,x,b,_,w,k,M,A,T=n.mouse(this),S=e.rotate(),C=S,E=e.translate(),L=(l=.5*(t=S)[0]*a,c=.5*t[1]*a,u=.5*t[2]*a,x=Math.sin(l),b=Math.cos(l),_=Math.sin(c),w=Math.cos(c),k=Math.sin(u),M=Math.cos(u),[b*w*M+x*_*k,x*w*M-b*_*k,b*_*M+x*w*k,b*w*k-x*_*M]);r=d(e,T),v.call(f,\\\"zoom\\\",function(){var t,a,s,l,c,u,f,p,v,x,b=n.mouse(this);if(e.scale(i.k=n.event.scale),r){if(d(e,b)){e.rotate(S).translate(E);var _=d(e,b),w=function(t,e){if(!t||!e)return;var r=function(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}(t,e),n=Math.sqrt(y(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,y(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}(r,_),k=function(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*o,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*o,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*o]}((a=w,s=(t=L)[0],l=t[1],c=t[2],u=t[3],f=a[0],p=a[1],v=a[2],x=a[3],[s*f-l*p-c*v-u*x,s*p+l*f+c*x-u*v,s*v-l*x+c*f+u*p,s*x+l*v-c*p+u*f])),M=i.r=function(t,e,r){var n=m(e,2,t[0]);n=m(n,1,t[1]),n=m(n,0,t[2]-r[2]);var i,a,s=e[0],l=e[1],c=e[2],u=n[0],f=n[1],h=n[2],p=Math.atan2(l,s)*o,d=Math.sqrt(s*s+l*l);Math.abs(f)>d?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*o-p,i=Math.sqrt(d*d-f*f));var v=180-a-2*p,y=(Math.atan2(h,u)-Math.atan2(c,i))*o,x=(Math.atan2(h,u)-Math.atan2(c,-i))*o,b=g(r[0],r[1],a,y),_=g(r[0],r[1],v,x);return b<=_?[a,y,r[2]]:[v,x,r[2]]}(k,r,C);isFinite(M[0])&&isFinite(M[1])&&isFinite(M[2])||(M=C),e.rotate(M),C=M}}else r=d(e,T=b);h.of(this,arguments)({type:\\\"zoom\\\"})}),A=h.of(this,arguments),p++||A({type:\\\"zoomstart\\\"})}).on(\\\"zoomend\\\",function(){var r;n.select(this).style(l),v.call(f,\\\"zoom\\\",null),r=h.of(this,arguments),--p||r({type:\\\"zoomend\\\"}),u(t,e,x)}).on(\\\"zoom.redraw\\\",function(){t.render()}),n.rebind(f,h,\\\"on\\\")}function d(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*a,r=t[1]*a,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function g(t,e,r,n){var i=v(r-t),a=v(n-e);return Math.sqrt(i*i+a*a)}function v(t){return(t%360+540)%360-180}function m(t,e,r){var n=r*a,i=t.slice(),o=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[o]=t[o]*l-t[s]*c,i[s]=t[s]*l+t[o]*c,i}function y(t,e){for(var r=0,n=0,i=t.length;n<i;++n)r+=t[n]*e[n];return r}e.exports=function(t,e){var r=t.projection;return(e._isScoped?f:e._isClipped?p:h)(t,r)}},{\\\"../../lib\\\":696,d3:148}],782:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../registry\\\"),i=t(\\\"./cartesian/constants\\\").SUBPLOT_PATTERN;r.getSubplotCalcData=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;s<t.length;s++){var l=t[s];l[0].trace[a]===r&&o.push(l)}return o},r.getModuleCalcData=function(t,e){var r,i=[],a=[];if(!(r=\\\"string\\\"==typeof e?n.getModule(e).plot:\\\"function\\\"==typeof e?e:e.plot))return[i,t];for(var o=0;o<t.length;o++){var s=t[o],l=s[0].trace;!0===l.visible&&(l._module.plot===r?i.push(s):a.push(s))}return[i,a]},r.getSubplotData=function(t,e,r){if(!n.subplotsRegistry[e])return[];var a,o,s,l=n.subplotsRegistry[e].attr,c=[];if(\\\"gl2d\\\"===e){var u=r.match(i);o=\\\"x\\\"+u[1],s=\\\"y\\\"+u[2]}for(var f=0;f<t.length;f++)a=t[f],\\\"gl2d\\\"===e&&n.traceIs(a,\\\"gl2d\\\")?a[l[0]]===o&&a[l[1]]===s&&c.push(a):a[l]===r&&c.push(a);return c}},{\\\"../registry\\\":828,\\\"./cartesian/constants\\\":751}],783:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"mouse-change\\\"),i=t(\\\"mouse-wheel\\\"),a=t(\\\"mouse-event-offset\\\"),o=t(\\\"../cartesian/constants\\\"),s=t(\\\"has-passive-events\\\");function l(t,e){this.element=t,this.plot=e,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}e.exports=function(t){var e=t.mouseContainer,r=t.glplot,c=new l(e,r);function u(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function f(e,n,i){var a,s,l=t.calcDataBox(),f=r.viewBox,h=c.lastPos[0],p=c.lastPos[1],d=o.MINDRAG*r.pixelRatio,g=o.MINZOOM*r.pixelRatio;function v(e,r,n){var i=Math.min(r,n),a=Math.max(r,n);i!==a?(l[e]=i,l[e+2]=a,c.dataBox=l,t.setRanges(l)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(n*=r.pixelRatio,i*=r.pixelRatio,i=f[3]-f[1]-i,t.fullLayout.dragmode){case\\\"zoom\\\":if(e){var m=n/(f[2]-f[0])*(l[2]-l[0])+l[0],y=i/(f[3]-f[1])*(l[3]-l[1])+l[1];c.boxInited||(c.boxStart[0]=m,c.boxStart[1]=y,c.dragStart[0]=n,c.dragStart[1]=i),c.boxEnd[0]=m,c.boxEnd[1]=y,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&&c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var x=Math.abs(c.dragStart[0]-n)<g,b=Math.abs(c.dragStart[1]-i)<g;if(!function(){for(var e=t.graphDiv._fullLayout._axisConstraintGroups,r=t.xaxis._id,n=t.yaxis._id,i=0;i<e.length;i++)if(-1!==e[i][r]){if(-1!==e[i][n])return!0;break}return!1}()||x&&b)x&&(c.boxEnd[0]=c.boxStart[0]),b&&(c.boxEnd[1]=c.boxStart[1]);else{a=c.boxEnd[0]-c.boxStart[0],s=c.boxEnd[1]-c.boxStart[1];var _=(l[3]-l[1])/(l[2]-l[0]);Math.abs(a*_)>Math.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),c.boxEnd[1]<l[1]?(c.boxEnd[1]=l[1],c.boxEnd[0]=c.boxStart[0]+(l[1]-c.boxStart[1])/Math.abs(_)):c.boxEnd[1]>l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),c.boxEnd[0]<l[0]?(c.boxEnd[0]=l[0],c.boxEnd[1]=c.boxStart[1]+(l[0]-c.boxStart[0])*Math.abs(_)):c.boxEnd[0]>l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(a=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],a||s?(a&&(v(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(v(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case\\\"pan\\\":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n)<d&&(n=c.dragStart[0]),Math.abs(c.dragStart[1]-i)<d&&(i=c.dragStart[1]),a=(h-n)*(l[2]-l[0])/(r.viewBox[2]-r.viewBox[0]),s=(p-i)*(l[3]-l[1])/(r.viewBox[3]-r.viewBox[1]),l[0]+=a,l[2]+=a,l[1]+=s,l[3]+=s,t.setRanges(l),c.panning=!0,c.lastInputTime=Date.now(),u(),t.cameraChanged(),t.handleAnnotations()):c.panning&&(c.panning=!1,t.relayoutCallback())}c.lastPos[0]=n,c.lastPos[1]=i}return c.mouseListener=n(e,f),e.addEventListener(\\\"touchstart\\\",function(t){var r=a(t.changedTouches[0],e);f(0,r[0],r[1]),f(1,r[0],r[1]),t.preventDefault()},!!s&&{passive:!1}),e.addEventListener(\\\"touchmove\\\",function(t){t.preventDefault();var r=a(t.changedTouches[0],e);f(1,r[0],r[1]),t.preventDefault()},!!s&&{passive:!1}),e.addEventListener(\\\"touchend\\\",function(t){f(0,c.lastPos[0],c.lastPos[1]),t.preventDefault()},!!s&&{passive:!1}),c.wheelListener=i(e,function(e,n){if(!t.scrollZoom)return!1;var i=t.calcDataBox(),a=r.viewBox,o=c.lastPos[0],s=c.lastPos[1],l=Math.exp(5*n/(a[3]-a[1])),f=o/(a[2]-a[0])*(i[2]-i[0])+i[0],h=s/(a[3]-a[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-f)*l+f,i[2]=(i[2]-f)*l+f,i[1]=(i[1]-h)*l+h,i[3]=(i[3]-h)*l+h,t.setRanges(i),c.lastInputTime=Date.now(),u(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0},!0),c}},{\\\"../cartesian/constants\\\":751,\\\"has-passive-events\\\":394,\\\"mouse-change\\\":418,\\\"mouse-event-offset\\\":419,\\\"mouse-wheel\\\":421}],784:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../cartesian/axes\\\"),i=t(\\\"../../lib/html2unicode\\\"),a=t(\\\"../../lib/str2rgbarray\\\");function o(t){this.scene=t,this.gl=t.gl,this.pixelRatio=t.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=[\\\"x\\\",\\\"y\\\"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=[\\\"sans-serif\\\",\\\"sans-serif\\\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title=\\\"\\\",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont=\\\"sans-serif\\\",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=!1,this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var s=o.prototype,l=[\\\"xaxis\\\",\\\"yaxis\\\"];s.merge=function(t){var e,r,n,o,s,c,u,f,h,p,d;for(this.titleEnable=!1,this.backgroundColor=a(t.plot_bgcolor),p=0;p<2;++p){var g=(e=l[p]).charAt(0);for(n=(r=t[this.scene[e]._name]).title===this.scene.fullLayout._dfltTitle[g]?\\\"\\\":r.title,d=0;d<=2;d+=2)this.labelEnable[p+d]=!1,this.labels[p+d]=i(n),this.labelColor[p+d]=a(r.titlefont.color),this.labelFont[p+d]=r.titlefont.family,this.labelSize[p+d]=r.titlefont.size,this.labelPad[p+d]=this.getLabelPad(e,r),this.tickEnable[p+d]=!1,this.tickColor[p+d]=a((r.tickfont||{}).color),this.tickAngle[p+d]=\\\"auto\\\"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[p+d]=this.getTickPad(r),this.tickMarkLength[p+d]=0,this.tickMarkWidth[p+d]=r.tickwidth||0,this.tickMarkColor[p+d]=a(r.tickcolor),this.borderLineEnable[p+d]=!1,this.borderLineColor[p+d]=a(r.linecolor),this.borderLineWidth[p+d]=r.linewidth||0;u=this.hasSharedAxis(r),s=this.hasAxisInDfltPos(e,r)&&!u,c=this.hasAxisInAltrPos(e,r)&&!u,o=r.mirror||!1,f=u?-1!==String(o).indexOf(\\\"all\\\"):!!o,h=u?\\\"allticks\\\"===o:-1!==String(o).indexOf(\\\"ticks\\\"),s?this.labelEnable[p]=!0:c&&(this.labelEnable[p+2]=!0),s?this.tickEnable[p]=r.showticklabels:c&&(this.tickEnable[p+2]=r.showticklabels),(s||f)&&(this.borderLineEnable[p]=r.showline),(c||f)&&(this.borderLineEnable[p+2]=r.showline),(s||h)&&(this.tickMarkLength[p]=this.getTickMarkLength(r)),(c||h)&&(this.tickMarkLength[p+2]=this.getTickMarkLength(r)),this.gridLineEnable[p]=r.showgrid,this.gridLineColor[p]=a(r.gridcolor),this.gridLineWidth[p]=r.gridwidth,this.zeroLineEnable[p]=r.zeroline,this.zeroLineColor[p]=a(r.zerolinecolor),this.zeroLineWidth[p]=r.zerolinewidth}},s.hasSharedAxis=function(t){var e=this.scene,r=e.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,t).indexOf(e.id)},s.hasAxisInDfltPos=function(t,e){var r=e.side;return\\\"xaxis\\\"===t?\\\"bottom\\\"===r:\\\"yaxis\\\"===t?\\\"left\\\"===r:void 0},s.hasAxisInAltrPos=function(t,e){var r=e.side;return\\\"xaxis\\\"===t?\\\"top\\\"===r:\\\"yaxis\\\"===t?\\\"right\\\"===r:void 0},s.getLabelPad=function(t,e){var r=e.titlefont.size,n=e.showticklabels;return\\\"xaxis\\\"===t?\\\"top\\\"===e.side?r*(1.5+(n?1:0))-10:r*(1.5+(n?.5:0))-10:\\\"yaxis\\\"===t?\\\"right\\\"===e.side?10+r*(1.5+(n?1:.5)):10+r*(1.5+(n?.5:0)):void 0},s.getTickPad=function(t){return\\\"outside\\\"===t.ticks?10+t.ticklen:15},s.getTickMarkLength=function(t){if(!t.ticks)return 0;var e=t.ticklen;return\\\"inside\\\"===t.ticks?-e:e},e.exports=function(t){return new o(t)}},{\\\"../../lib/html2unicode\\\":694,\\\"../../lib/str2rgbarray\\\":720,\\\"../cartesian/axes\\\":745}],785:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plot_api/edit_types\\\").overrideAll,i=t(\\\"./scene2d\\\"),a=t(\\\"../layout_attributes\\\"),o=t(\\\"../../constants/xmlns_namespaces\\\"),s=t(\\\"../cartesian/constants\\\"),l=t(\\\"../cartesian\\\"),c=t(\\\"../../components/fx/layout_attributes\\\"),u=t(\\\"../get_data\\\").getSubplotData;r.name=\\\"gl2d\\\",r.attr=[\\\"xaxis\\\",\\\"yaxis\\\"],r.idRoot=[\\\"x\\\",\\\"y\\\"],r.idRegex=s.idRegex,r.attrRegex=s.attrRegex,r.attributes=t(\\\"../cartesian/attributes\\\"),r.supplyLayoutDefaults=function(t,e,r){e._has(\\\"cartesian\\\")||l.supplyLayoutDefaults(t,e,r)},r.layoutAttrOverrides=n(l.layoutAttributes,\\\"plot\\\",\\\"from-root\\\"),r.baseLayoutAttrOverrides=n({plot_bgcolor:a.plot_bgcolor,hoverlabel:c.hoverlabel},\\\"plot\\\",\\\"nested\\\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl2d,a=0;a<n.length;a++){var o=n[a],s=e._plots[o],l=u(r,\\\"gl2d\\\",o),c=s._scene2d;void 0===c&&(c=new i({id:o,graphDiv:t,container:t.querySelector(\\\".gl-container\\\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),s._scene2d=c),c.plot(l,t.calcdata,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl2d||[],a=0;a<i.length;a++){var o=i[a],s=n._plots[o];if(s._scene2d)0===u(t,\\\"gl2d\\\",o).length&&(s._scene2d.destroy(),delete n._plots[o])}l.clean.apply(this,arguments)},r.drawFramework=function(t){t._context.staticPlot||l.drawFramework(t)},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){var i=e._plots[r[n]]._scene2d,a=i.toImage(\\\"png\\\");e._glimages.append(\\\"svg:image\\\").attr({xmlns:o.svg,\\\"xlink:href\\\":a,x:0,y:0,width:\\\"100%\\\",height:\\\"100%\\\",preserveAspectRatio:\\\"none\\\"}),i.destroy()}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){e._plots[r[n]]._scene2d.updateFx(e.dragmode)}}},{\\\"../../components/fx/layout_attributes\\\":613,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../plot_api/edit_types\\\":728,\\\"../cartesian\\\":757,\\\"../cartesian/attributes\\\":743,\\\"../cartesian/constants\\\":751,\\\"../get_data\\\":782,\\\"../layout_attributes\\\":800,\\\"./scene2d\\\":786}],786:[function(t,e,r){\\\"use strict\\\";var n,i,a=t(\\\"../../registry\\\"),o=t(\\\"../../plots/cartesian/axes\\\"),s=t(\\\"../../components/fx\\\"),l=t(\\\"gl-plot2d\\\"),c=t(\\\"gl-spikes2d\\\"),u=t(\\\"gl-select-box\\\"),f=t(\\\"webgl-context\\\"),h=t(\\\"./convert\\\"),p=t(\\\"./camera\\\"),d=t(\\\"../../lib/html2unicode\\\"),g=t(\\\"../../lib/show_no_webgl_msg\\\"),v=t(\\\"../cartesian/constraints\\\"),m=v.enforce,y=v.clean,x=t(\\\"../cartesian/autorange\\\").doAutoRange,b=[\\\"xaxis\\\",\\\"yaxis\\\"],_=t(\\\"../cartesian/constants\\\").SUBPLOT_PATTERN;function w(t,e){this.container=t.container,this.graphDiv=t.graphDiv,this.pixelRatio=t.plotGlPixelRatio||window.devicePixelRatio,this.id=t.id,this.staticPlot=!!t.staticPlot,this.scrollZoom=this.graphDiv._context.scrollZoom,this.fullData=null,this.updateRefs(e),this.makeFramework(),this.stopped||(this.glplotOptions=h(this),this.glplotOptions.merge(e),this.glplot=l(this.glplotOptions),this.camera=p(this),this.traces={},this.spikes=c(this.glplot),this.selectBox=u(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}e.exports=w;var k=w.prototype;k.makeFramework=function(){if(this.staticPlot){if(!(i||(n=document.createElement(\\\"canvas\\\"),i=f({canvas:n,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\\\"Error creating static canvas/context for image server\\\");this.canvas=n,this.gl=i}else{var t=this.container.querySelector(\\\".gl-canvas-focus\\\"),e=f({canvas:t,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!e)return g(this),void(this.stopped=!0);this.canvas=t,this.gl=e}var r=this.canvas;r.style.width=\\\"100%\\\",r.style.height=\\\"100%\\\",r.style.position=\\\"absolute\\\",r.style.top=\\\"0px\\\",r.style.left=\\\"0px\\\",r.style[\\\"pointer-events\\\"]=\\\"none\\\",this.updateSize(r),r.className+=\\\" user-select-none\\\";var a=this.svgContainer=document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",\\\"svg\\\");a.style.position=\\\"absolute\\\",a.style.top=a.style.left=\\\"0px\\\",a.style.width=a.style.height=\\\"100%\\\",a.style[\\\"z-index\\\"]=20,a.style[\\\"pointer-events\\\"]=\\\"none\\\";var o=this.mouseContainer=document.createElement(\\\"div\\\");o.style.position=\\\"absolute\\\",o.style[\\\"pointer-events\\\"]=\\\"auto\\\",this.pickCanvas=this.container.querySelector(\\\".gl-canvas-pick\\\");var s=this.container;s.appendChild(a),s.appendChild(o);var l=this;o.addEventListener(\\\"mouseout\\\",function(){l.isMouseOver=!1,l.unhover()}),o.addEventListener(\\\"mouseover\\\",function(){l.isMouseOver=!0})},k.toImage=function(t){t||(t=\\\"png\\\"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var c=0;c<4;++c){var u=a[4*(r*o+l)+c];a[4*(r*o+l)+c]=a[4*(r*s+l)+c],a[4*(r*s+l)+c]=u}var f=document.createElement(\\\"canvas\\\");f.width=r,f.height=i;var h,p=f.getContext(\\\"2d\\\"),d=p.createImageData(r,i);switch(d.data.set(a),p.putImageData(d,0,0),t){case\\\"jpeg\\\":h=f.toDataURL(\\\"image/jpeg\\\");break;case\\\"webp\\\":h=f.toDataURL(\\\"image/webp\\\");break;default:h=f.toDataURL(\\\"image/png\\\")}return this.staticPlot&&this.container.removeChild(n),h},k.updateSize=function(t){t||(t=this.canvas);var e=this.pixelRatio,r=this.fullLayout,n=r.width,i=r.height,a=0|Math.ceil(e*n),o=0|Math.ceil(e*i);return t.width===a&&t.height===o||(t.width=a,t.height=o),t},k.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var t=[o.calcTicks(this.xaxis),o.calcTicks(this.yaxis)],e=0;e<2;++e)for(var r=0;r<t[e].length;++r)t[e][r].text=d(t[e][r].text+\\\"\\\");return t},k.updateRefs=function(t){this.fullLayout=t;var e=this.id.match(_),r=\\\"xaxis\\\"+e[1],n=\\\"yaxis\\\"+e[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},k.relayoutCallback=function(){var t=this.graphDiv,e=this.xaxis,r=this.yaxis,n=t.layout;n.xaxis.autorange=e.autorange,n.xaxis.range=e.range.slice(0),n.yaxis.autorange=r.autorange,n.yaxis.range=r.range.slice(0);var i={lastInputTime:this.camera.lastInputTime};i[e._name]=e.range.slice(0),i[r._name]=r.range.slice(0),t.emit(\\\"plotly_relayout\\\",i)},k.cameraChanged=function(){var t=this.camera;this.glplot.setDataBox(this.calcDataBox());var e=this.computeTickMarks();(function(t,e){for(var r=0;r<2;++r){var n=t[r],i=e[r];if(n.length!==i.length)return!0;for(var a=0;a<n.length;++a)if(n[a].x!==i[a].x)return!0}return!1})(e,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=e,this.glplotOptions.dataBox=t.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},k.handleAnnotations=function(){for(var t=this.graphDiv,e=this.fullLayout.annotations,r=0;r<e.length;r++){var n=e[r];n.xref===this.xaxis._id&&n.yref===this.yaxis._id&&a.getComponentMethod(\\\"annotations\\\",\\\"drawOne\\\")(t,r)}},k.destroy=function(){if(this.glplot){var t=this.traces;t&&Object.keys(t).map(function(e){t[e].dispose(),delete t[e]}),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener(\\\"wheel\\\",this.camera.wheelListener),this.camera=null}},k.plot=function(t,e,r){var n=this.glplot;this.updateRefs(r),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(t,e),this.updateFx(r.dragmode);var i=r.width,a=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,i,a];var s={_fullLayout:{_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis}};y(s,this.xaxis),y(s,this.yaxis);var l,c,u=r._size,f=this.xaxis.domain,h=this.yaxis.domain;for(o.viewBox=[u.l+f[0]*u.w,u.b+h[0]*u.h,i-u.r-(1-f[1])*u.w,a-u.t-(1-h[1])*u.h],this.mouseContainer.style.width=u.w*(f[1]-f[0])+\\\"px\\\",this.mouseContainer.style.height=u.h*(h[1]-h[0])+\\\"px\\\",this.mouseContainer.height=u.h*(h[1]-h[0]),this.mouseContainer.style.left=u.l+f[0]*u.w+\\\"px\\\",this.mouseContainer.style.top=u.t+(1-h[1])*u.h+\\\"px\\\",c=0;c<2;++c)(l=this[b[c]])._length=o.viewBox[c+2]-o.viewBox[c],x(this.graphDiv,l),l.setScale();m(s),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},k.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},k.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},k.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;r<a.length;r++){var o=a[r],s=this.traces[o];for(n=0;n<t.length;n++)if((i=t[n]).uid===o&&i.type===s.type)continue t;s.dispose(),delete this.traces[o]}for(r=0;r<t.length;r++){i=t[r];var l=e[r],c=this.traces[i.uid];c?c.update(i,l):(c=i._module.plot(this,i,l),this.traces[i.uid]=c)}this.glplot.objects.sort(function(t,e){return t._trace.index-e._trace.index})},k.updateFx=function(t){\\\"lasso\\\"===t||\\\"select\\\"===t?(this.pickCanvas.style[\\\"pointer-events\\\"]=\\\"none\\\",this.mouseContainer.style[\\\"pointer-events\\\"]=\\\"none\\\"):(this.pickCanvas.style[\\\"pointer-events\\\"]=\\\"auto\\\",this.mouseContainer.style[\\\"pointer-events\\\"]=\\\"auto\\\"),this.mouseContainer.style.cursor=\\\"pan\\\"===t?\\\"move\\\":\\\"zoom\\\"===t?\\\"crosshair\\\":null},k.emitPointAction=function(t,e){for(var r,n=t.trace.uid,i=t.pointIndex,a=0;a<this.fullData.length;a++)this.fullData[a].uid===n&&(r=this.fullData[a]);var o={x:t.traceCoord[0],y:t.traceCoord[1],curveNumber:r.index,pointNumber:i,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};s.appendArrayPointValue(o,r,i),this.graphDiv.emit(e,{points:[o]})},k.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var t=this.glplot,e=this.camera,r=e.mouseListener,n=1===this.lastButtonState&&0===r.buttons,i=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var a,o=r.x*t.pixelRatio,l=this.canvas.height-t.pixelRatio*r.y;if(e.boxEnabled&&\\\"zoom\\\"===i.dragmode){this.selectBox.enabled=!0;for(var c=this.selectBox.selectBox=[Math.min(e.boxStart[0],e.boxEnd[0]),Math.min(e.boxStart[1],e.boxEnd[1]),Math.max(e.boxStart[0],e.boxEnd[0]),Math.max(e.boxStart[1],e.boxEnd[1])],u=0;u<2;u++)e.boxStart[u]===e.boxEnd[u]&&(c[u]=t.dataBox[u],c[u+2]=t.dataBox[u+2]);t.setDirty()}else if(!e.panning&&this.isMouseOver){this.selectBox.enabled=!1;var f=i._size,h=this.xaxis.domain,p=this.yaxis.domain,d=(a=t.pick(o/t.pixelRatio+f.l+h[0]*f.w,l/t.pixelRatio-(f.t+(1-p[1])*f.h)))&&a.object._trace.handlePick(a);if(d&&n&&this.emitPointAction(d,\\\"plotly_click\\\"),a&&\\\"skip\\\"!==a.object._trace.hoverinfo&&i.hovermode&&d&&(!this.lastPickResult||this.lastPickResult.traceUid!==d.trace.uid||this.lastPickResult.dataCoord[0]!==d.dataCoord[0]||this.lastPickResult.dataCoord[1]!==d.dataCoord[1])){var g=d;this.lastPickResult={traceUid:d.trace?d.trace.uid:null,dataCoord:d.dataCoord.slice()},this.spikes.update({center:a.dataCoord}),g.screenCoord=[((t.viewBox[2]-t.viewBox[0])*(a.dataCoord[0]-t.dataBox[0])/(t.dataBox[2]-t.dataBox[0])+t.viewBox[0])/t.pixelRatio,(this.canvas.height-(t.viewBox[3]-t.viewBox[1])*(a.dataCoord[1]-t.dataBox[1])/(t.dataBox[3]-t.dataBox[1])-t.viewBox[1])/t.pixelRatio],this.emitPointAction(d,\\\"plotly_hover\\\");var v=this.fullData[g.trace.index]||{},m=g.pointIndex,y=s.castHoverinfo(v,i,m);if(y&&\\\"all\\\"!==y){var x=y.split(\\\"+\\\");-1===x.indexOf(\\\"x\\\")&&(g.traceCoord[0]=void 0),-1===x.indexOf(\\\"y\\\")&&(g.traceCoord[1]=void 0),-1===x.indexOf(\\\"z\\\")&&(g.traceCoord[2]=void 0),-1===x.indexOf(\\\"text\\\")&&(g.textLabel=void 0),-1===x.indexOf(\\\"name\\\")&&(g.name=void 0)}s.loneHover({x:g.screenCoord[0],y:g.screenCoord[1],xLabel:this.hoverFormatter(\\\"xaxis\\\",g.traceCoord[0]),yLabel:this.hoverFormatter(\\\"yaxis\\\",g.traceCoord[1]),zLabel:g.traceCoord[2],text:g.textLabel,name:g.name,color:s.castHoverOption(v,m,\\\"bgcolor\\\")||g.color,borderColor:s.castHoverOption(v,m,\\\"bordercolor\\\"),fontFamily:s.castHoverOption(v,m,\\\"font.family\\\"),fontSize:s.castHoverOption(v,m,\\\"font.size\\\"),fontColor:s.castHoverOption(v,m,\\\"font.color\\\")},{container:this.svgContainer,gd:this.graphDiv})}}a||this.unhover(),t.draw()}},k.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit(\\\"plotly_unhover\\\"),s.loneUnhover(this.svgContainer))},k.hoverFormatter=function(t,e){if(void 0!==e){var r=this[t];return o.tickText(r,r.c2l(e),\\\"hover\\\").text}}},{\\\"../../components/fx\\\":612,\\\"../../lib/html2unicode\\\":694,\\\"../../lib/show_no_webgl_msg\\\":718,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"../cartesian/autorange\\\":744,\\\"../cartesian/constants\\\":751,\\\"../cartesian/constraints\\\":753,\\\"./camera\\\":783,\\\"./convert\\\":784,\\\"gl-plot2d\\\":275,\\\"gl-select-box\\\":286,\\\"gl-spikes2d\\\":295,\\\"webgl-context\\\":533}],787:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){t=t||document.body,e=e||{};var r=[.01,1/0];\\\"distanceLimits\\\"in e&&(r[0]=e.distanceLimits[0],r[1]=e.distanceLimits[1]);\\\"zoomMin\\\"in e&&(r[0]=e.zoomMin);\\\"zoomMax\\\"in e&&(r[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||\\\"orbit\\\",distanceLimits:r}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,p=t.clientHeight,d={keyBindingMode:\\\"rotate\\\",view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay,i=e-2*r;c.idle(e-r),c.recalcMatrix(i),c.flush(e-(100+2*r));for(var a=!0,o=c.computedMatrix,s=0;s<16;++s)a=a&&u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===p;return h=t.clientWidth,p=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(d,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){var e=c.computedUp.slice(),r=c.computedEye.slice(),i=c.computedCenter.slice();if(c.setMode(t),\\\"turntable\\\"===t){var a=n();c._active.lookAt(a,r,i,e),c._active.lookAt(a+500,r,i,[0,0,1]),c._active.flush(a)}return c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(r)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(\\\"contextmenu\\\",function(t){return t.preventDefault(),!1});var g=0,v=0,m={shift:!1,control:!1,alt:!1,meta:!1};function y(e,r,i,a){var o=d.keyBindingMode;if(!1!==o){var s=\\\"rotate\\\"===o,l=\\\"pan\\\"===o,u=\\\"zoom\\\"===o,h=!!a.control,p=!!a.alt,y=!!a.shift,x=!!(1&e),b=!!(2&e),_=!!(4&e),w=1/t.clientHeight,k=w*(r-g),M=w*(i-v),A=d.flipX?1:-1,T=d.flipY?1:-1,S=n(),C=Math.PI*d.rotateSpeed;if((s&&x&&!h&&!p&&!y||x&&!h&&!p&&y)&&c.rotate(S,A*C*k,-T*C*M,0),(l&&x&&!h&&!p&&!y||b||x&&h&&!p&&!y)&&c.pan(S,-d.translateSpeed*k*f,d.translateSpeed*M*f,0),u&&x&&!h&&!p&&!y||_||x&&!h&&p&&!y){var E=-d.zoomSpeed*M/window.innerHeight*(S-c.lastT())*100;c.pan(S,0,0,f*(Math.exp(E)-1))}return g=r,v=i,m=a,!0}}return d.mouseListener=a(t,y),t.addEventListener(\\\"touchstart\\\",function(e){var r=s(e.changedTouches[0],t);y(0,r[0],r[1],m),y(1,r[0],r[1],m),e.preventDefault()},!!l&&{passive:!1}),t.addEventListener(\\\"touchmove\\\",function(e){var r=s(e.changedTouches[0],t);y(1,r[0],r[1],m),e.preventDefault()},!!l&&{passive:!1}),t.addEventListener(\\\"touchend\\\",function(t){y(0,g,v,m),t.preventDefault()},!!l&&{passive:!1}),d.wheelListener=o(t,function(t,e){if(!1!==d.keyBindingMode){var r=d.flipX?1:-1,i=d.flipY?1:-1,a=n();if(Math.abs(t)>Math.abs(e))c.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else{var o=-d.zoomSpeed*i*e/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,f*(Math.exp(o)-1))}}},!0),d};var n=t(\\\"right-now\\\"),i=t(\\\"3d-view\\\"),a=t(\\\"mouse-change\\\"),o=t(\\\"mouse-wheel\\\"),s=t(\\\"mouse-event-offset\\\"),l=t(\\\"has-passive-events\\\")},{\\\"3d-view\\\":45,\\\"has-passive-events\\\":394,\\\"mouse-change\\\":418,\\\"mouse-event-offset\\\":419,\\\"mouse-wheel\\\":421,\\\"right-now\\\":480}],788:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plot_api/edit_types\\\").overrideAll,i=t(\\\"../../components/fx/layout_attributes\\\"),a=t(\\\"./scene\\\"),o=t(\\\"../get_data\\\").getSubplotData,s=t(\\\"../../lib\\\"),l=t(\\\"../../constants/xmlns_namespaces\\\");r.name=\\\"gl3d\\\",r.attr=\\\"scene\\\",r.idRoot=\\\"scene\\\",r.idRegex=r.attrRegex=s.counterRegex(\\\"scene\\\"),r.attributes=t(\\\"./layout/attributes\\\"),r.layoutAttributes=t(\\\"./layout/layout_attributes\\\"),r.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},\\\"plot\\\",\\\"nested\\\"),r.supplyLayoutDefaults=t(\\\"./layout/defaults\\\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl3d,i=0;i<n.length;i++){var l=n[i],c=o(r,\\\"gl3d\\\",l),u=e[l],f=u._scene;f||(f=new a({id:l,graphDiv:t,container:t.querySelector(\\\".gl-container\\\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),u._scene=f),f.cameraInitial||(f.cameraInitial=s.extendDeep({},u.camera)),f.plot(c,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl3d||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(\\\".annotation-\\\"+o).remove())}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,c=s.toImage(\\\"png\\\");e._glimages.append(\\\"svg:image\\\").attr({xmlns:l.svg,\\\"xlink:href\\\":c,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:\\\"none\\\"}),s.destroy()}},r.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var e=t.substr(5);return\\\"1\\\"===e&&(e=\\\"\\\"),\\\"scene\\\"+e}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){e[r[n]]._scene.updateFx(e.dragmode,e.hovermode)}}},{\\\"../../components/fx/layout_attributes\\\":613,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../plot_api/edit_types\\\":728,\\\"../get_data\\\":782,\\\"./layout/attributes\\\":789,\\\"./layout/defaults\\\":793,\\\"./layout/layout_attributes\\\":794,\\\"./scene\\\":798}],789:[function(t,e,r){\\\"use strict\\\";e.exports={scene:{valType:\\\"subplotid\\\",dflt:\\\"scene\\\",editType:\\\"calc+clearAxisTypes\\\"}}},{}],790:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../components/color\\\"),i=t(\\\"../../cartesian/layout_attributes\\\"),a=t(\\\"../../../lib/extend\\\").extendFlat,o=t(\\\"../../../plot_api/edit_types\\\").overrideAll;e.exports=o({visible:i.visible,showspikes:{valType:\\\"boolean\\\",dflt:!0},spikesides:{valType:\\\"boolean\\\",dflt:!0},spikethickness:{valType:\\\"number\\\",min:0,dflt:2},spikecolor:{valType:\\\"color\\\",dflt:n.defaultLine},showbackground:{valType:\\\"boolean\\\",dflt:!1},backgroundcolor:{valType:\\\"color\\\",dflt:\\\"rgba(204, 204, 204, 0.5)\\\"},showaxeslabels:{valType:\\\"boolean\\\",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:i.title,titlefont:i.titlefont,type:i.type,autorange:i.autorange,rangemode:i.rangemode,range:i.range,tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:a({},i.gridcolor,{dflt:\\\"rgb(204, 204, 204)\\\"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth},\\\"plot\\\",\\\"from-root\\\")},{\\\"../../../components/color\\\":570,\\\"../../../lib/extend\\\":685,\\\"../../../plot_api/edit_types\\\":728,\\\"../../cartesian/layout_attributes\\\":758}],791:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"tinycolor2\\\").mix,i=t(\\\"../../../lib\\\"),a=t(\\\"../../../plot_api/plot_template\\\"),o=t(\\\"./axis_attributes\\\"),s=t(\\\"../../cartesian/type_defaults\\\"),l=t(\\\"../../cartesian/axis_defaults\\\"),c=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"];e.exports=function(t,e,r){var u,f;function h(t,e){return i.coerce(u,f,o,t,e)}for(var p=0;p<c.length;p++){var d=c[p];u=t[d]||{},(f=a.newContainer(e,d))._id=d[0]+r.scene,f._name=d,s(u,f,h,r),l(u,f,h,{font:r.font,letter:d[0],data:r.data,showGrid:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),h(\\\"gridcolor\\\",n(f.color,r.bgColor,13600/187).toRgbString()),h(\\\"title\\\",d[0]),f.setScale=i.noop,h(\\\"showspikes\\\")&&(h(\\\"spikesides\\\"),h(\\\"spikethickness\\\"),h(\\\"spikecolor\\\",f.color)),h(\\\"showaxeslabels\\\"),h(\\\"showbackground\\\")&&h(\\\"backgroundcolor\\\")}}},{\\\"../../../lib\\\":696,\\\"../../../plot_api/plot_template\\\":735,\\\"../../cartesian/axis_defaults\\\":747,\\\"../../cartesian/type_defaults\\\":769,\\\"./axis_attributes\\\":790,tinycolor2:514}],792:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../lib/html2unicode\\\"),i=t(\\\"../../../lib/str2rgbarray\\\"),a=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"];function o(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=[\\\"sans-serif\\\",\\\"sans-serif\\\",\\\"sans-serif\\\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=[\\\"x\\\",\\\"y\\\",\\\"z\\\"],this.labelEnable=[!0,!0,!0],this.labelFont=[\\\"Open Sans\\\",\\\"Open Sans\\\",\\\"Open Sans\\\"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}o.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[a[e]];r.visible?(this.labels[e]=n(r.title),\\\"titlefont\\\"in r&&(r.titlefont.color&&(this.labelColor[e]=i(r.titlefont.color)),r.titlefont.family&&(this.labelFont[e]=r.titlefont.family),r.titlefont.size&&(this.labelSize[e]=r.titlefont.size)),\\\"showline\\\"in r&&(this.lineEnable[e]=r.showline),\\\"linecolor\\\"in r&&(this.lineColor[e]=i(r.linecolor)),\\\"linewidth\\\"in r&&(this.lineWidth[e]=r.linewidth),\\\"showgrid\\\"in r&&(this.gridEnable[e]=r.showgrid),\\\"gridcolor\\\"in r&&(this.gridColor[e]=i(r.gridcolor)),\\\"gridwidth\\\"in r&&(this.gridWidth[e]=r.gridwidth),\\\"log\\\"===r.type?this.zeroEnable[e]=!1:\\\"zeroline\\\"in r&&(this.zeroEnable[e]=r.zeroline),\\\"zerolinecolor\\\"in r&&(this.zeroLineColor[e]=i(r.zerolinecolor)),\\\"zerolinewidth\\\"in r&&(this.zeroLineWidth[e]=r.zerolinewidth),\\\"ticks\\\"in r&&r.ticks?this.lineTickEnable[e]=!0:this.lineTickEnable[e]=!1,\\\"ticklen\\\"in r&&(this.lineTickLength[e]=this._defaultLineTickLength[e]=r.ticklen),\\\"tickcolor\\\"in r&&(this.lineTickColor[e]=i(r.tickcolor)),\\\"tickwidth\\\"in r&&(this.lineTickWidth[e]=r.tickwidth),\\\"tickangle\\\"in r&&(this.tickAngle[e]=\\\"auto\\\"===r.tickangle?-3600:Math.PI*-r.tickangle/180),\\\"showticklabels\\\"in r&&(this.tickEnable[e]=r.showticklabels),\\\"tickfont\\\"in r&&(r.tickfont.color&&(this.tickColor[e]=i(r.tickfont.color)),r.tickfont.family&&(this.tickFont[e]=r.tickfont.family),r.tickfont.size&&(this.tickSize[e]=r.tickfont.size)),\\\"mirror\\\"in r?-1!==[\\\"ticks\\\",\\\"all\\\",\\\"allticks\\\"].indexOf(r.mirror)?(this.lineTickMirror[e]=!0,this.lineMirror[e]=!0):!0===r.mirror?(this.lineTickMirror[e]=!1,this.lineMirror[e]=!0):(this.lineTickMirror[e]=!1,this.lineMirror[e]=!1):this.lineMirror[e]=!1,\\\"showbackground\\\"in r&&!1!==r.showbackground?(this.backgroundEnable[e]=!0,this.backgroundColor[e]=i(r.backgroundcolor)):this.backgroundEnable[e]=!1):(this.tickEnable[e]=!1,this.labelEnable[e]=!1,this.lineEnable[e]=!1,this.lineTickEnable[e]=!1,this.gridEnable[e]=!1,this.zeroEnable[e]=!1,this.backgroundEnable[e]=!1)}},e.exports=function(t){var e=new o;return e.merge(t),e}},{\\\"../../../lib/html2unicode\\\":694,\\\"../../../lib/str2rgbarray\\\":720}],793:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../lib\\\"),i=t(\\\"../../../components/color\\\"),a=t(\\\"../../../registry\\\"),o=t(\\\"../../subplot_defaults\\\"),s=t(\\\"./axis_defaults\\\"),l=t(\\\"./layout_attributes\\\");function c(t,e,r,n){for(var o=r(\\\"bgcolor\\\"),l=i.combine(o,n.paper_bgcolor),c=[\\\"up\\\",\\\"center\\\",\\\"eye\\\"],u=0;u<c.length;u++)r(\\\"camera.\\\"+c[u]+\\\".x\\\"),r(\\\"camera.\\\"+c[u]+\\\".y\\\"),r(\\\"camera.\\\"+c[u]+\\\".z\\\");var f=!!r(\\\"aspectratio.x\\\")&&!!r(\\\"aspectratio.y\\\")&&!!r(\\\"aspectratio.z\\\"),h=r(\\\"aspectmode\\\",f?\\\"manual\\\":\\\"auto\\\");f||(t.aspectratio=e.aspectratio={x:1,y:1,z:1},\\\"manual\\\"===h&&(e.aspectmode=\\\"auto\\\"),t.aspectmode=e.aspectmode),s(t,e,{font:n.font,scene:n.id,data:n.fullData,bgColor:l,calendar:n.calendar,fullLayout:n.fullLayout}),a.getComponentMethod(\\\"annotations3d\\\",\\\"handleDefaults\\\")(t,e,n),r(\\\"dragmode\\\",n.getDfltFromLayout(\\\"dragmode\\\")),r(\\\"hovermode\\\",n.getDfltFromLayout(\\\"hovermode\\\"))}e.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:\\\"gl3d\\\",attributes:l,handleDefaults:c,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\\\"../../../components/color\\\":570,\\\"../../../lib\\\":696,\\\"../../../registry\\\":828,\\\"../../subplot_defaults\\\":823,\\\"./axis_defaults\\\":791,\\\"./layout_attributes\\\":794}],794:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./axis_attributes\\\"),i=t(\\\"../../domain\\\").attributes,a=t(\\\"../../../lib/extend\\\").extendFlat,o=t(\\\"../../../lib\\\").counterRegex;function s(t,e,r){return{x:{valType:\\\"number\\\",dflt:t,editType:\\\"camera\\\"},y:{valType:\\\"number\\\",dflt:e,editType:\\\"camera\\\"},z:{valType:\\\"number\\\",dflt:r,editType:\\\"camera\\\"},editType:\\\"camera\\\"}}e.exports={_arrayAttrRegexps:[o(\\\"scene\\\",\\\".annotations\\\",!0)],bgcolor:{valType:\\\"color\\\",dflt:\\\"rgba(0,0,0,0)\\\",editType:\\\"plot\\\"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),editType:\\\"camera\\\"},domain:i({name:\\\"scene\\\",editType:\\\"plot\\\"}),aspectmode:{valType:\\\"enumerated\\\",values:[\\\"auto\\\",\\\"cube\\\",\\\"data\\\",\\\"manual\\\"],dflt:\\\"auto\\\",editType:\\\"plot\\\",impliedEdits:{\\\"aspectratio.x\\\":void 0,\\\"aspectratio.y\\\":void 0,\\\"aspectratio.z\\\":void 0}},aspectratio:{x:{valType:\\\"number\\\",min:0,editType:\\\"plot\\\",impliedEdits:{\\\"^aspectmode\\\":\\\"manual\\\"}},y:{valType:\\\"number\\\",min:0,editType:\\\"plot\\\",impliedEdits:{\\\"^aspectmode\\\":\\\"manual\\\"}},z:{valType:\\\"number\\\",min:0,editType:\\\"plot\\\",impliedEdits:{\\\"^aspectmode\\\":\\\"manual\\\"}},editType:\\\"plot\\\",impliedEdits:{aspectmode:\\\"manual\\\"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:\\\"enumerated\\\",values:[\\\"orbit\\\",\\\"turntable\\\",\\\"zoom\\\",\\\"pan\\\",!1],dflt:\\\"turntable\\\",editType:\\\"plot\\\"},hovermode:{valType:\\\"enumerated\\\",values:[\\\"closest\\\",!1],dflt:\\\"closest\\\",editType:\\\"modebar\\\"},editType:\\\"plot\\\",_deprecated:{cameraposition:{valType:\\\"info_array\\\",editType:\\\"camera\\\"}}}},{\\\"../../../lib\\\":696,\\\"../../../lib/extend\\\":685,\\\"../../domain\\\":771,\\\"./axis_attributes\\\":790}],795:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../lib/str2rgbarray\\\"),i=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new a;return e.merge(t),e}},{\\\"../../../lib/str2rgbarray\\\":720}],796:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,l=t.fullSceneLayout,c=[[],[],[]],u=0;u<3;++u){var f=l[o[u]];if(f._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/t.dataScale[u],Math.abs(f._length)===1/0)c[u]=[];else{f._input_range=f.range.slice(),f.range[0]=r[u].lo/t.dataScale[u],f.range[1]=r[u].hi/t.dataScale[u],f._m=1/(t.dataScale[u]*r[u].pixelsPerDataUnit),f.range[0]===f.range[1]&&(f.range[0]-=1,f.range[1]+=1);var h=f.tickmode;if(\\\"auto\\\"===f.tickmode){f.tickmode=\\\"linear\\\";var p=f.nticks||i.constrain(f._length/40,4,9);n.autoTicks(f,Math.abs(f.range[1]-f.range[0])/p)}for(var d=n.calcTicks(f),g=0;g<d.length;++g)d[g].x=d[g].x*t.dataScale[u],d[g].text=a(d[g].text);c[u]=d,f.tickmode=h}}e.ticks=c;for(var u=0;u<3;++u){s[u]=.5*(t.glplot.bounds[0][u]+t.glplot.bounds[1][u]);for(var g=0;g<2;++g)e.bounds[g][u]=t.glplot.bounds[g][u]}t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;a<n.length;++a)i[a]=n[a].x;e[r]=i}return e}(c)};var n=t(\\\"../../cartesian/axes\\\"),i=t(\\\"../../../lib\\\"),a=t(\\\"../../../lib/html2unicode\\\"),o=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"],s=[0,0,0]},{\\\"../../../lib\\\":696,\\\"../../../lib/html2unicode\\\":694,\\\"../../cartesian/axes\\\":745}],797:[function(t,e,r){\\\"use strict\\\";function n(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}e.exports=function(t,e){return n(t.projection,n(t.view,n(t.model,[e[0],e[1],e[2],1])))}},{}],798:[function(t,e,r){\\\"use strict\\\";var n,i,a=t(\\\"gl-plot3d\\\"),o=t(\\\"webgl-context\\\"),s=t(\\\"has-passive-events\\\"),l=t(\\\"../../registry\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../plots/cartesian/axes\\\"),f=t(\\\"../../components/fx\\\"),h=t(\\\"../../lib/str2rgbarray\\\"),p=t(\\\"../../lib/show_no_webgl_msg\\\"),d=t(\\\"./camera\\\"),g=t(\\\"./project\\\"),v=t(\\\"./layout/convert\\\"),m=t(\\\"./layout/spikes\\\"),y=t(\\\"./layout/tick_marks\\\");function x(t,e,r,l){var c=t.graphDiv,h={canvas:r,gl:l,container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1};if(t.staticMode){if(!(i||(n=document.createElement(\\\"canvas\\\"),i=o({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\\\"error creating static canvas/context for image server\\\");h.pixelRatio=t.pixelRatio,h.gl=i,h.canvas=n}try{t.glplot=a(h)}catch(e){return p(t)}var v=function(t){if(!1!==t.fullSceneLayout.dragmode){var e={};e[t.id+\\\".camera\\\"]=M(t.camera),t.saveCamera(c.layout),t.graphDiv.emit(\\\"plotly_relayout\\\",e)}};if(t.glplot.canvas.addEventListener(\\\"mouseup\\\",v.bind(null,t)),t.glplot.canvas.addEventListener(\\\"wheel\\\",v.bind(null,t),!!s&&{passive:!1}),t.staticMode||t.glplot.canvas.addEventListener(\\\"webglcontextlost\\\",function(e){c&&c.emit&&c.emit(\\\"plotly_webglcontextlost\\\",{event:e,layer:t.id})},!1),!t.camera){var m=t.fullSceneLayout.camera;t.camera=d(t.container,{center:[m.center.x,m.center.y,m.center.z],eye:[m.eye.x,m.eye.y,m.eye.z],up:[m.up.x,m.up.y,m.up.z],zoomMin:.1,zoomMax:100,mode:\\\"orbit\\\"})}return t.glplot.camera=t.camera,t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(t){var e,r=t.svgContainer,n=t.container.getBoundingClientRect(),i=n.width,a=n.height;r.setAttributeNS(null,\\\"viewBox\\\",\\\"0 0 \\\"+i+\\\" \\\"+a),r.setAttributeNS(null,\\\"width\\\",i),r.setAttributeNS(null,\\\"height\\\",a),y(t),t.glplot.axes.update(t.axesOptions);for(var o,s=Object.keys(t.traces),l=null,c=t.glplot.selection,h=0;h<s.length;++h)\\\"skip\\\"!==(e=t.traces[s[h]]).data.hoverinfo&&e.handlePick(c)&&(l=e),e.setContourLevels&&e.setContourLevels();function p(e,r){var n=t.fullSceneLayout[e];return u.tickText(n,n.d2l(r),\\\"hover\\\").text}if(null!==l){var d=g(t.glplot.cameraParams,c.dataCoordinate);e=l.data;var v,m=c.index,x=f.castHoverinfo(e,t.fullLayout,m),b=x.split(\\\"+\\\"),_=\\\"all\\\"===x,w=p(\\\"xaxis\\\",c.traceCoordinate[0]),k=p(\\\"yaxis\\\",c.traceCoordinate[1]),M=p(\\\"zaxis\\\",c.traceCoordinate[2]);if(_||(-1===b.indexOf(\\\"x\\\")&&(w=void 0),-1===b.indexOf(\\\"y\\\")&&(k=void 0),-1===b.indexOf(\\\"z\\\")&&(M=void 0),-1===b.indexOf(\\\"text\\\")&&(c.textLabel=void 0),-1===b.indexOf(\\\"name\\\")&&(l.name=void 0)),\\\"cone\\\"===e.type||\\\"streamtube\\\"===e.type){var A=[];(_||-1!==b.indexOf(\\\"u\\\"))&&A.push(\\\"u: \\\"+p(\\\"xaxis\\\",c.traceCoordinate[3])),(_||-1!==b.indexOf(\\\"v\\\"))&&A.push(\\\"v: \\\"+p(\\\"yaxis\\\",c.traceCoordinate[4])),(_||-1!==b.indexOf(\\\"w\\\"))&&A.push(\\\"w: \\\"+p(\\\"zaxis\\\",c.traceCoordinate[5])),(_||-1!==b.indexOf(\\\"norm\\\"))&&A.push(\\\"norm: \\\"+c.traceCoordinate[6].toPrecision(3)),\\\"streamtube\\\"!==e.type||!_&&-1===b.indexOf(\\\"divergence\\\")||A.push(\\\"divergence: \\\"+c.traceCoordinate[7].toPrecision(3)),c.textLabel&&A.push(c.textLabel),v=A.join(\\\"<br>\\\")}else v=c.textLabel;t.fullSceneLayout.hovermode&&f.loneHover({x:(.5+.5*d[0]/d[3])*i,y:(.5-.5*d[1]/d[3])*a,xLabel:w,yLabel:k,zLabel:M,text:v,name:l.name,color:f.castHoverOption(e,m,\\\"bgcolor\\\")||l.color,borderColor:f.castHoverOption(e,m,\\\"bordercolor\\\"),fontFamily:f.castHoverOption(e,m,\\\"font.family\\\"),fontSize:f.castHoverOption(e,m,\\\"font.size\\\"),fontColor:f.castHoverOption(e,m,\\\"font.color\\\")},{container:r,gd:t.graphDiv});var T={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:e._input,fullData:e,curveNumber:e.index,pointNumber:m};e._module.eventData&&(T=e._module.eventData(T,c,e,{},m)),f.appendArrayPointValue(T,e,m);var S={points:[T]};c.buttons&&c.distance<5?t.graphDiv.emit(\\\"plotly_click\\\",S):t.graphDiv.emit(\\\"plotly_hover\\\",S),o=S}else f.loneUnhover(r),t.graphDiv.emit(\\\"plotly_unhover\\\",o);t.drawAnnotations(t)}.bind(null,t),t.traces={},!0}function b(t,e){var r=document.createElement(\\\"div\\\"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS(\\\"http://www.w3.org/2000/svg\\\",\\\"svg\\\");i.style.position=\\\"absolute\\\",i.style.top=i.style.left=\\\"0px\\\",i.style.width=i.style.height=\\\"100%\\\",i.style[\\\"z-index\\\"]=20,i.style[\\\"pointer-events\\\"]=\\\"none\\\",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position=\\\"absolute\\\",r.style.top=r.style.left=\\\"0px\\\",r.style.width=r.style.height=\\\"100%\\\",n.appendChild(r),this.fullLayout=e,this.id=t.id||\\\"scene\\\",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=v(e[this.id]),this.spikeOptions=m(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=l.getComponentMethod(\\\"annotations3d\\\",\\\"convert\\\"),this.drawAnnotations=l.getComponentMethod(\\\"annotations3d\\\",\\\"draw\\\"),x(this)}var _=b.prototype;_.recoverContext=function(){var t=this,e=this.glplot.gl,r=this.glplot.canvas;this.glplot.dispose(),requestAnimationFrame(function n(){e.isContextLost()?requestAnimationFrame(n):x(t,t.fullLayout,r,e)?t.plot.apply(t,t.plotArgs):c.error(\\\"Catastrophic and unrecoverable WebGL error. Context lost.\\\")})};var w=[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"];function k(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=w[i],o=a.charAt(0),s=n[a],l=e[o],u=e[o+\\\"calendar\\\"],f=e[\\\"_\\\"+o+\\\"length\\\"];if(c.isArrayOrTypedArray(l))for(var h,p=0;p<(f||l.length);p++)if(c.isArrayOrTypedArray(l[p]))for(var d=0;d<l[p].length;++d)h=s.d2l(l[p][d],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else h=s.d2l(l[p],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],f-1)}}function M(t){return{up:{x:t.up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]}}}_.plot=function(t,e,r){if(this.plotArgs=[t,e,r],!this.glplot.contextLost){var n,i,a,o,s,l,c=e[this.id],u=r[this.id];c.bgcolor?this.glplot.clearColor=h(c.bgcolor):this.glplot.clearColor=[0,0,0,0],this.glplot.snapToData=!0,this.fullLayout=e,this.fullSceneLayout=c,this.glplotLayout=c,this.axesOptions.merge(c),this.spikeOptions.merge(c),this.setCamera(c.camera),this.updateFx(c.dragmode,c.hovermode),this.glplot.update({}),this.setConvert(s),t?Array.isArray(t)||(t=[t]):t=[];var f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;a<t.length;++a)!0===(n=t[a]).visible&&k(this,n,f);var p=[1,1,1];for(o=0;o<3;++o)f[1][o]===f[0][o]?p[o]=1:p[o]=1/(f[1][o]-f[0][o]);for(this.dataScale=p,this.convertAnnotations(this),a=0;a<t.length;++a)!0===(n=t[a]).visible&&((i=this.traces[n.uid])?i.data.type===n.type?i.update(n):(i.dispose(),i=n._module.plot(this,n),this.traces[n.uid]=i):(i=n._module.plot(this,n),this.traces[n.uid]=i),i.name=n.name);var d=Object.keys(this.traces);t:for(a=0;a<d.length;++a){for(o=0;o<t.length;++o)if(t[o].uid===d[a]&&!0===t[o].visible)continue t;(i=this.traces[d[a]]).dispose(),delete this.traces[d[a]]}this.glplot.objects.sort(function(t,e){return t._trace.data.index-e._trace.data.index});var g=[[0,0,0],[0,0,0]],v=[],m={};for(a=0;a<3;++a){if((l=(s=c[w[a]]).type)in m?(m[l].acc*=p[a],m[l].count+=1):m[l]={acc:p[a],count:1},s.autorange){g[0][a]=1/0,g[1][a]=-1/0;var y=this.glplot.objects,x=this.fullSceneLayout.annotations||[],b=s._name.charAt(0);for(o=0;o<y.length;o++){var _=y[o],M=_.bounds,A=_._trace.data._pad||0;\\\"ErrorBars\\\"===_.constructor.name&&s._lowerLogErrorBound?g[0][a]=Math.min(g[0][a],s._lowerLogErrorBound):g[0][a]=Math.min(g[0][a],M[0][a]/p[a]-A),g[1][a]=Math.max(g[1][a],M[1][a]/p[a]+A)}for(o=0;o<x.length;o++){var T=x[o];if(T.visible){var S=s.r2l(T[b]);g[0][a]=Math.min(g[0][a],S),g[1][a]=Math.max(g[1][a],S)}}if(\\\"rangemode\\\"in s&&\\\"tozero\\\"===s.rangemode&&(g[0][a]=Math.min(g[0][a],0),g[1][a]=Math.max(g[1][a],0)),g[0][a]>g[1][a])g[0][a]=-1,g[1][a]=1;else{var C=g[1][a]-g[0][a];g[0][a]-=C/32,g[1][a]+=C/32}if(\\\"reversed\\\"===s.autorange){var E=g[0][a];g[0][a]=g[1][a],g[1][a]=E}}else{var L=s.range;g[0][a]=s.r2l(L[0]),g[1][a]=s.r2l(L[1])}g[0][a]===g[1][a]&&(g[0][a]-=1,g[1][a]+=1),v[a]=g[1][a]-g[0][a],this.glplot.bounds[0][a]=g[0][a]*p[a],this.glplot.bounds[1][a]=g[1][a]*p[a]}var z=[1,1,1];for(a=0;a<3;++a){var O=m[l=(s=c[w[a]]).type];z[a]=Math.pow(O.acc,1/O.count)/p[a]}var I;if(\\\"auto\\\"===c.aspectmode)I=Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1];else if(\\\"cube\\\"===c.aspectmode)I=[1,1,1];else if(\\\"data\\\"===c.aspectmode)I=z;else{if(\\\"manual\\\"!==c.aspectmode)throw new Error(\\\"scene.js aspectRatio was not one of the enumerated types\\\");var P=c.aspectratio;I=[P.x,P.y,P.z]}c.aspectratio.x=u.aspectratio.x=I[0],c.aspectratio.y=u.aspectratio.y=I[1],c.aspectratio.z=u.aspectratio.z=I[2],this.glplot.aspect=I;var D=c.domain||null,R=e._size||null;if(D&&R){var B=this.container.style;B.position=\\\"absolute\\\",B.left=R.l+D.x[0]*R.w+\\\"px\\\",B.top=R.t+(1-D.y[1])*R.h+\\\"px\\\",B.width=R.w*(D.x[1]-D.x[0])+\\\"px\\\",B.height=R.h*(D.y[1]-D.y[0])+\\\"px\\\"}this.glplot.redraw()}},_.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\\\"wheel\\\",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},_.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),M(this.glplot.camera)},_.setCamera=function(t){var e;this.glplot.camera.lookAt.apply(this,[[(e=t).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]])},_.saveCamera=function(t){var e=this.getCamera(),r=c.nestedProperty(t,this.id+\\\".camera\\\"),n=r.get(),i=!1;function a(t,e,r,n){var i=[\\\"up\\\",\\\"center\\\",\\\"eye\\\"],a=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}if(void 0===n)i=!0;else for(var o=0;o<3;o++)for(var s=0;s<3;s++)if(!a(e,n,o,s)){i=!0;break}return i&&r.set(e),i},_.updateFx=function(t,e){var r=this.camera;r&&(\\\"orbit\\\"===t?(r.mode=\\\"orbit\\\",r.keyBindingMode=\\\"rotate\\\"):\\\"turntable\\\"===t?(r.up=[0,0,1],r.mode=\\\"turntable\\\",r.keyBindingMode=\\\"rotate\\\"):r.keyBindingMode=t),this.fullSceneLayout.hovermode=e},_.toImage=function(t){t||(t=\\\"png\\\"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var c=0;c<4;++c){var u=a[4*(r*o+l)+c];a[4*(r*o+l)+c]=a[4*(r*s+l)+c],a[4*(r*s+l)+c]=u}var f=document.createElement(\\\"canvas\\\");f.width=r,f.height=i;var h,p=f.getContext(\\\"2d\\\"),d=p.createImageData(r,i);switch(d.data.set(a),p.putImageData(d,0,0),t){case\\\"jpeg\\\":h=f.toDataURL(\\\"image/jpeg\\\");break;case\\\"webp\\\":h=f.toDataURL(\\\"image/webp\\\");break;default:h=f.toDataURL(\\\"image/png\\\")}return this.staticMode&&this.container.removeChild(n),h},_.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[w[t]];u.setConvert(e,this.fullLayout),e.setScale=c.noop}},e.exports=b},{\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../lib/show_no_webgl_msg\\\":718,\\\"../../lib/str2rgbarray\\\":720,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"./camera\\\":787,\\\"./layout/convert\\\":792,\\\"./layout/spikes\\\":795,\\\"./layout/tick_marks\\\":796,\\\"./project\\\":797,\\\"gl-plot3d\\\":277,\\\"has-passive-events\\\":394,\\\"webgl-context\\\":533}],799:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;a<n;a++)i[a]=[t[a],e[a],r[a]];return i}},{}],800:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./font_attributes\\\"),i=t(\\\"../components/color/attributes\\\"),a=n({editType:\\\"calc\\\"});a.family.dflt='\\\"Open Sans\\\", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=i.defaultLine,e.exports={font:a,title:{valType:\\\"string\\\",editType:\\\"layoutstyle\\\"},titlefont:n({editType:\\\"layoutstyle\\\"}),autosize:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"none\\\"},width:{valType:\\\"number\\\",min:10,dflt:700,editType:\\\"plot\\\"},height:{valType:\\\"number\\\",min:10,dflt:450,editType:\\\"plot\\\"},margin:{l:{valType:\\\"number\\\",min:0,dflt:80,editType:\\\"plot\\\"},r:{valType:\\\"number\\\",min:0,dflt:80,editType:\\\"plot\\\"},t:{valType:\\\"number\\\",min:0,dflt:100,editType:\\\"plot\\\"},b:{valType:\\\"number\\\",min:0,dflt:80,editType:\\\"plot\\\"},pad:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"plot\\\"},autoexpand:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},editType:\\\"plot\\\"},paper_bgcolor:{valType:\\\"color\\\",dflt:i.background,editType:\\\"plot\\\"},plot_bgcolor:{valType:\\\"color\\\",dflt:i.background,editType:\\\"layoutstyle\\\"},separators:{valType:\\\"string\\\",editType:\\\"plot\\\"},hidesources:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"plot\\\"},showlegend:{valType:\\\"boolean\\\",editType:\\\"legend\\\"},colorway:{valType:\\\"colorlist\\\",dflt:i.defaults,editType:\\\"calc\\\"},datarevision:{valType:\\\"any\\\",editType:\\\"calc\\\"},template:{valType:\\\"any\\\",editType:\\\"calc\\\"},modebar:{orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],dflt:\\\"h\\\",editType:\\\"modebar\\\"},bgcolor:{valType:\\\"color\\\",editType:\\\"modebar\\\"},color:{valType:\\\"color\\\",editType:\\\"modebar\\\"},activecolor:{valType:\\\"color\\\",editType:\\\"modebar\\\"},editType:\\\"modebar\\\"}}},{\\\"../components/color/attributes\\\":569,\\\"./font_attributes\\\":772}],801:[function(t,e,r){\\\"use strict\\\";e.exports={requiredVersion:\\\"0.45.0\\\",styleUrlPrefix:\\\"mapbox://styles/mapbox/\\\",styleUrlSuffix:\\\"v9\\\",controlContainerClassName:\\\"mapboxgl-control-container\\\",wrongVersionErrorMsg:[\\\"Your custom plotly.js bundle is not using the correct mapbox-gl version\\\",\\\"Please install mapbox-gl@0.45.0.\\\"].join(\\\"\\\\n\\\"),noAccessTokenErrorMsg:[\\\"Missing Mapbox access token.\\\",\\\"Mapbox trace type require a Mapbox access token to be registered.\\\",\\\"For example:\\\",\\\"  Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\\\",\\\"More info here: https://www.mapbox.com/help/define-access-token/\\\"].join(\\\"\\\\n\\\"),mapOnErrorMsg:\\\"Mapbox error.\\\",styleRules:{map:\\\"overflow:hidden;position:relative;\\\",\\\"missing-css\\\":\\\"display:none\\\"}}},{}],802:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e){var r=t.split(\\\" \\\"),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=[\\\"\\\",\\\"\\\"],u=[0,0];switch(i){case\\\"top\\\":c[0]=\\\"top\\\",u[1]=-l;break;case\\\"bottom\\\":c[0]=\\\"bottom\\\",u[1]=l}switch(a){case\\\"left\\\":c[1]=\\\"right\\\",u[0]=-s;break;case\\\"right\\\":c[1]=\\\"left\\\",u[0]=s}return{anchor:c[0]&&c[1]?c.join(\\\"-\\\"):c[0]?c[0]:c[1]?c[1]:\\\"center\\\",offset:u}}},{\\\"../../lib\\\":696}],803:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"mapbox-gl\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/get_data\\\").getSubplotCalcData,o=t(\\\"../../constants/xmlns_namespaces\\\"),s=t(\\\"./mapbox\\\"),l=t(\\\"./constants\\\");for(var c in l.styleRules)i.addStyleRule(\\\".mapboxgl-\\\"+c,l.styleRules[c]);r.name=\\\"mapbox\\\",r.attr=\\\"subplot\\\",r.idRoot=\\\"mapbox\\\",r.idRegex=r.attrRegex=i.counterRegex(\\\"mapbox\\\"),r.attributes={subplot:{valType:\\\"subplotid\\\",dflt:\\\"mapbox\\\",editType:\\\"calc\\\"}},r.layoutAttributes=t(\\\"./layout_attributes\\\"),r.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox;if(n.version!==l.requiredVersion)throw new Error(l.wrongVersionErrorMsg);var c=function(t,e){var r=t._fullLayout;if(\\\"\\\"===t._context.mapboxAccessToken)return\\\"\\\";for(var n=0;n<e.length;n++){var i=r[e[n]];if(i.accesstoken)return i.accesstoken}throw new Error(l.noAccessTokenErrorMsg)}(t,o);n.accessToken=c;for(var u=0;u<o.length;u++){var f=o[u],h=a(r,\\\"mapbox\\\",f),p=e[f],d=p._subplot;d||(d=s({gd:t,container:e._glcontainer.node(),id:f,fullLayout:e,staticPlot:t._context.staticPlot}),e[f]._subplot=d),d.viewInitial||(d.viewInitial={center:i.extendFlat({},p.center),zoom:p.zoom,bearing:p.bearing,pitch:p.pitch}),d.plot(h,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.mapbox||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],s=a.domain,l=a._subplot,c=l.toImage(\\\"png\\\");e._glimages.append(\\\"svg:image\\\").attr({xmlns:o.svg,\\\"xlink:href\\\":c,x:n.l+n.w*s.x[0],y:n.t+n.h*(1-s.y[1]),width:n.w*(s.x[1]-s.x[0]),height:n.h*(s.y[1]-s.y[0]),preserveAspectRatio:\\\"none\\\"}),l.destroy()}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n<r.length;n++){e[r[n]]._subplot.updateFx(e)}}},{\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../plots/get_data\\\":782,\\\"./constants\\\":801,\\\"./layout_attributes\\\":805,\\\"./layout_defaults\\\":806,\\\"./mapbox\\\":807,\\\"mapbox-gl\\\":409}],804:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./convert_text_opts\\\");function a(t,e){this.mapbox=t,this.map=t.map,this.uid=t.uid+\\\"-layer\\\"+e,this.idSource=this.uid+\\\"-source\\\",this.idLayer=this.uid+\\\"-layer\\\",this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var o=a.prototype;function s(t){var e=t.source;return t.visible&&(n.isPlainObject(e)||\\\"string\\\"==typeof e&&e.length>0)}function l(t){var e={},r={};switch(t.type){case\\\"circle\\\":n.extendFlat(r,{\\\"circle-radius\\\":t.circle.radius,\\\"circle-color\\\":t.color,\\\"circle-opacity\\\":t.opacity});break;case\\\"line\\\":n.extendFlat(r,{\\\"line-width\\\":t.line.width,\\\"line-color\\\":t.color,\\\"line-opacity\\\":t.opacity});break;case\\\"fill\\\":n.extendFlat(r,{\\\"fill-color\\\":t.color,\\\"fill-outline-color\\\":t.fill.outlinecolor,\\\"fill-opacity\\\":t.opacity});break;case\\\"symbol\\\":var a=t.symbol,o=i(a.textposition,a.iconsize);n.extendFlat(e,{\\\"icon-image\\\":a.icon+\\\"-15\\\",\\\"icon-size\\\":a.iconsize/10,\\\"text-field\\\":a.text,\\\"text-size\\\":a.textfont.size,\\\"text-anchor\\\":o.anchor,\\\"text-offset\\\":o.offset}),n.extendFlat(r,{\\\"icon-color\\\":t.color,\\\"text-color\\\":a.textfont.color,\\\"text-opacity\\\":t.opacity})}return{layout:e,paint:r}}o.update=function(t){this.visible?this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=s(t)},o.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},o.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},o.updateSource=function(t){var e=this.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,s(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,i={type:r};\\\"geojson\\\"===r?e=\\\"data\\\":\\\"vector\\\"===r&&(e=\\\"string\\\"==typeof n?\\\"url\\\":\\\"tiles\\\");return i[e]=n,i}(t);e.addSource(this.idSource,r)}},o.updateLayer=function(t){var e=this.map,r=l(t);this.removeLayer(),this.layerType=t.type,s(t)&&e.addLayer({id:this.idLayer,source:this.idSource,\\\"source-layer\\\":t.sourcelayer||\\\"\\\",type:t.type,layout:r.layout,paint:r.paint},t.below)},o.updateStyle=function(t){if(s(t)){var e=l(t);this.mapbox.setOptions(this.idLayer,\\\"setLayoutProperty\\\",e.layout),this.mapbox.setOptions(this.idLayer,\\\"setPaintProperty\\\",e.paint)}},o.removeLayer=function(){var t=this.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer)},o.dispose=function(){var t=this.map;t.removeLayer(this.idLayer),t.removeSource(this.idSource)},e.exports=function(t,e,r){var n=new a(t,e);return n.update(r),n}},{\\\"../../lib\\\":696,\\\"./convert_text_opts\\\":802}],805:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\").defaultLine,a=t(\\\"../domain\\\").attributes,o=t(\\\"../font_attributes\\\"),s=t(\\\"../../traces/scatter/attributes\\\").textposition,l=t(\\\"../../plot_api/edit_types\\\").overrideAll,c=t(\\\"../../plot_api/plot_template\\\").templatedArray,u=o({});u.family.dflt=\\\"Open Sans Regular, Arial Unicode MS Regular\\\",e.exports=l({_arrayAttrRegexps:[n.counterRegex(\\\"mapbox\\\",\\\".layers\\\",!0)],domain:a({name:\\\"mapbox\\\"}),accesstoken:{valType:\\\"string\\\",noBlank:!0,strict:!0},style:{valType:\\\"any\\\",values:[\\\"basic\\\",\\\"streets\\\",\\\"outdoors\\\",\\\"light\\\",\\\"dark\\\",\\\"satellite\\\",\\\"satellite-streets\\\"],dflt:\\\"basic\\\"},center:{lon:{valType:\\\"number\\\",dflt:0},lat:{valType:\\\"number\\\",dflt:0}},zoom:{valType:\\\"number\\\",dflt:1},bearing:{valType:\\\"number\\\",dflt:0},pitch:{valType:\\\"number\\\",dflt:0},layers:c(\\\"layer\\\",{visible:{valType:\\\"boolean\\\",dflt:!0},sourcetype:{valType:\\\"enumerated\\\",values:[\\\"geojson\\\",\\\"vector\\\"],dflt:\\\"geojson\\\"},source:{valType:\\\"any\\\"},sourcelayer:{valType:\\\"string\\\",dflt:\\\"\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"circle\\\",\\\"line\\\",\\\"fill\\\",\\\"symbol\\\"],dflt:\\\"circle\\\"},below:{valType:\\\"string\\\",dflt:\\\"\\\"},color:{valType:\\\"color\\\",dflt:i},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},circle:{radius:{valType:\\\"number\\\",dflt:15}},line:{width:{valType:\\\"number\\\",dflt:2}},fill:{outlinecolor:{valType:\\\"color\\\",dflt:i}},symbol:{icon:{valType:\\\"string\\\",dflt:\\\"marker\\\"},iconsize:{valType:\\\"number\\\",dflt:10},text:{valType:\\\"string\\\",dflt:\\\"\\\"},textfont:u,textposition:n.extendFlat({},s,{arrayOk:!1})}})},\\\"plot\\\",\\\"from-root\\\")},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plot_api/edit_types\\\":728,\\\"../../plot_api/plot_template\\\":735,\\\"../../traces/scatter/attributes\\\":1044,\\\"../domain\\\":771,\\\"../font_attributes\\\":772}],806:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../subplot_defaults\\\"),a=t(\\\"../array_container_defaults\\\"),o=t(\\\"./layout_attributes\\\");function s(t,e,r,n){r(\\\"accesstoken\\\",n.accessToken),r(\\\"style\\\"),r(\\\"center.lon\\\"),r(\\\"center.lat\\\"),r(\\\"zoom\\\"),r(\\\"bearing\\\"),r(\\\"pitch\\\"),a(t,e,{name:\\\"layers\\\",handleItemDefaults:l}),e._input=t}function l(t,e){function r(r,i){return n.coerce(t,e,o.layers,r,i)}if(r(\\\"visible\\\")){var i=r(\\\"sourcetype\\\");r(\\\"source\\\"),\\\"vector\\\"===i&&r(\\\"sourcelayer\\\");var a=r(\\\"type\\\");r(\\\"below\\\"),r(\\\"color\\\"),r(\\\"opacity\\\"),\\\"circle\\\"===a&&r(\\\"circle.radius\\\"),\\\"line\\\"===a&&r(\\\"line.width\\\"),\\\"fill\\\"===a&&r(\\\"fill.outlinecolor\\\"),\\\"symbol\\\"===a&&(r(\\\"symbol.icon\\\"),r(\\\"symbol.iconsize\\\"),r(\\\"symbol.text\\\"),n.coerceFont(r,\\\"symbol.textfont\\\"),r(\\\"symbol.textposition\\\"))}}e.exports=function(t,e,r){i(t,e,r,{type:\\\"mapbox\\\",attributes:o,handleDefaults:s,partition:\\\"y\\\",accessToken:e._mapboxAccessToken})}},{\\\"../../lib\\\":696,\\\"../array_container_defaults\\\":741,\\\"../subplot_defaults\\\":823,\\\"./layout_attributes\\\":805}],807:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"mapbox-gl\\\"),i=t(\\\"../../components/fx\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../components/dragelement\\\"),s=t(\\\"../cartesian/select\\\").prepSelect,l=t(\\\"../cartesian/select\\\").selectOnClick,c=t(\\\"./constants\\\"),u=t(\\\"./layout_attributes\\\"),f=t(\\\"./layers\\\");function h(t){this.id=t.id,this.gd=t.gd,this.container=t.container,this.isStatic=t.staticPlot;var e=t.fullLayout;this.uid=e._uid+\\\"-\\\"+this.id,this.opts=e[this.id],this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(e),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[]}var p=h.prototype;function d(t){var e=u.style.values,r=u.style.dflt,n={};return a.isPlainObject(t)?(n.id=t.id,n.style=t):\\\"string\\\"==typeof t?(n.id=t,n.style=-1!==e.indexOf(t)?g(t):t):(n.id=r,n.style=g(r)),n.transition={duration:0,delay:0},n}function g(t){return c.styleUrlPrefix+t+\\\"-\\\"+c.styleUrlSuffix}function v(t){return[t.lon,t.lat]}e.exports=function(t){return new h(t)},p.plot=function(t,e,r){var n,i=this,a=i.opts=e[this.id];i.map&&a.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash=[],i.layerList={}),n=i.map?new Promise(function(r,n){i.updateMap(t,e,r,n)}):new Promise(function(r,n){i.createMap(t,e,r,n)}),r.push(n)},p.createMap=function(t,e,r,a){var o=this,s=o.gd,u=o.opts,f=o.styleObj=d(u.style);o.accessToken=u.accesstoken;var h=o.map=new n.Map({container:o.div,style:f.style,center:v(u.center),zoom:u.zoom,bearing:u.bearing,pitch:u.pitch,interactive:!o.isStatic,preserveDrawingBuffer:o.isStatic,doubleClickZoom:!1,boxZoom:!1}),p=c.controlContainerClassName,g=o.div.getElementsByClassName(p)[0];if(o.div.removeChild(g),h._canvas.style.left=\\\"0px\\\",h._canvas.style.top=\\\"0px\\\",o.rejectOnError(a),h.once(\\\"load\\\",function(){o.updateData(t),o.updateLayout(e),o.resolveOnRender(r)}),!o.isStatic){var m=!1;h.on(\\\"moveend\\\",function(t){if(o.map){var e=o.getView();u._input.center=u.center=e.center,u._input.zoom=u.zoom=e.zoom,u._input.bearing=u.bearing=e.bearing,u._input.pitch=u.pitch=e.pitch,(t.originalEvent||m)&&x(e),m=!1}}),h.on(\\\"wheel\\\",function(){m=!0}),h.on(\\\"mousemove\\\",function(t){var e=o.div.getBoundingClientRect();t.clientX=t.point.x+e.left,t.clientY=t.point.y+e.top,t.target.getBoundingClientRect=function(){return e},o.xaxis.p2c=function(){return t.lngLat.lng},o.yaxis.p2c=function(){return t.lngLat.lat},i.hover(s,t,o.id)}),h.on(\\\"dragstart\\\",y),h.on(\\\"zoomstart\\\",y),h.on(\\\"dblclick\\\",function(){s.emit(\\\"plotly_doubleclick\\\",null);var t=o.viewInitial;h.setCenter(v(t.center)),h.setZoom(t.zoom),h.setBearing(t.bearing),h.setPitch(t.pitch);var e=o.getView();u._input.center=u.center=e.center,u._input.zoom=u.zoom=e.zoom,u._input.bearing=u.bearing=e.bearing,u._input.pitch=u.pitch=e.pitch,x(e)}),o.clearSelect=function(){s._fullLayout._zoomlayer.selectAll(\\\".select-outline\\\").remove()},o.onClickInPanFn=function(t){return function(e){var r=s._fullLayout.clickmode;r.indexOf(\\\"select\\\")>-1&&l(e.originalEvent,s,[o.xaxis],[o.yaxis],o.id,t),r.indexOf(\\\"event\\\")>-1&&i.click(s,e.originalEvent)}}}function y(){i.loneUnhover(e._toppaper)}function x(t){var e=o.id,r={};for(var n in t)r[e+\\\".\\\"+n]=t[n];s.emit(\\\"plotly_relayout\\\",r)}},p.updateMap=function(t,e,r,n){var i=this,a=i.map;i.rejectOnError(n);var o=d(i.opts.style);i.styleObj.id!==o.id?(i.styleObj=o,a.setStyle(o.style),a.once(\\\"styledata\\\",function(){i.traceHash={},i.updateData(t),i.updateLayout(e),i.resolveOnRender(r)})):(i.updateData(t),i.updateLayout(e),i.resolveOnRender(r))},p.updateData=function(t){var e,r,n,i,a=this.traceHash;for(n=0;n<t.length;n++){var o=t[n];(e=a[(r=o[0].trace).uid])?e.update(o):r._module&&(a[r.uid]=r._module.plot(this,o))}var s=Object.keys(a);t:for(n=0;n<s.length;n++){var l=s[n];for(i=0;i<t.length;i++)if(l===(r=t[i][0].trace).uid)continue t;(e=a[l]).dispose(),delete a[l]}},p.updateLayout=function(t){var e=this.map,r=this.opts;e.setCenter(v(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch),this.updateLayers(),this.updateFramework(t),this.updateFx(t),this.map.resize()},p.resolveOnRender=function(t){var e=this.map;e.on(\\\"render\\\",function r(){e.loaded()&&(e.off(\\\"render\\\",r),setTimeout(t,0))})},p.rejectOnError=function(t){var e=this.map;function r(){t(new Error(c.mapOnErrorMsg))}e.once(\\\"error\\\",r),e.once(\\\"style.error\\\",r),e.once(\\\"source.error\\\",r),e.once(\\\"tile.error\\\",r),e.once(\\\"layer.error\\\",r)},p.createFramework=function(t){var e=this,r=e.div=document.createElement(\\\"div\\\");r.id=e.uid,r.style.position=\\\"absolute\\\",e.container.appendChild(r),e.xaxis={_id:\\\"x\\\",c2p:function(t){return e.project(t).x}},e.yaxis={_id:\\\"y\\\",c2p:function(t){return e.project(t).y}},e.updateFramework(t)},p.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var i,l=t.dragmode;i=\\\"select\\\"===l?function(t,r){(t.range={})[e.id]=[u([r.xmin,r.ymin]),u([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(u)};var c=e.dragOptions;e.dragOptions=a.extendDeep(c||{},{element:e.div,gd:n,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:i},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\\\"click\\\",e.onClickInPanHandler),\\\"select\\\"===l||\\\"lasso\\\"===l?(r.dragPan.disable(),r.on(\\\"zoomstart\\\",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){s(t,r,n,e.dragOptions,l)},o.init(e.dragOptions)):(r.dragPan.enable(),r.off(\\\"zoomstart\\\",e.clearSelect),e.div.onmousedown=null,e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on(\\\"click\\\",e.onClickInPanHandler))}function u(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},p.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+\\\"px\\\",n.height=r.h*(e.y[1]-e.y[0])+\\\"px\\\",n.left=r.l+e.x[0]*r.w+\\\"px\\\",n.top=r.t+(1-e.y[1])*r.h+\\\"px\\\",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},p.updateLayers=function(){var t,e=this.opts.layers,r=this.layerList;if(e.length!==r.length){for(t=0;t<r.length;t++)r[t].dispose();for(r=this.layerList=[],t=0;t<e.length;t++)r.push(f(this,t,e[t]))}else for(t=0;t<e.length;t++)r[t].update(e[t])},p.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},p.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},p.setOptions=function(t,e,r){for(var n in r)this.map[e](t,n,r[n])},p.project=function(t){return this.map.project(new n.LngLat(t[0],t[1]))},p.getView=function(){var t=this.map,e=t.getCenter();return{center:{lon:e.lng,lat:e.lat},zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch()}}},{\\\"../../components/dragelement\\\":592,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../cartesian/select\\\":763,\\\"./constants\\\":801,\\\"./layers\\\":804,\\\"./layout_attributes\\\":805,\\\"mapbox-gl\\\":409}],808:[function(t,e,r){\\\"use strict\\\";e.exports={t:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},r:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},b:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},l:{valType:\\\"number\\\",dflt:0,editType:\\\"arraydraw\\\"},editType:\\\"arraydraw\\\"}},{}],809:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../registry\\\"),o=t(\\\"../plot_api/plot_schema\\\"),s=t(\\\"../plot_api/plot_template\\\"),l=t(\\\"../lib\\\"),c=t(\\\"../components/color\\\"),u=t(\\\"../constants/numerical\\\").BADNUM,f=t(\\\"../plots/cartesian/axis_ids\\\"),h=t(\\\"./animation_attributes\\\"),p=t(\\\"./frame_attributes\\\"),d=l.relinkPrivateKeys,g=l._,v=e.exports={};l.extendFlat(v,a),v.attributes=t(\\\"./attributes\\\"),v.attributes.type.values=v.allTypes,v.fontAttrs=t(\\\"./font_attributes\\\"),v.layoutAttributes=t(\\\"./layout_attributes\\\"),v.fontWeight=\\\"normal\\\";var m=v.transformsRegistry,y=t(\\\"./command\\\");v.executeAPICommand=y.executeAPICommand,v.computeAPICommandBindings=y.computeAPICommandBindings,v.manageCommandObserver=y.manageCommandObserver,v.hasSimpleAPICommandBindings=y.hasSimpleAPICommandBindings,v.redrawText=function(t){if(!((t=l.getGraphDiv(t)).data&&t.data[0]&&t.data[0].r))return new Promise(function(e){setTimeout(function(){a.getComponentMethod(\\\"annotations\\\",\\\"draw\\\")(t),a.getComponentMethod(\\\"legend\\\",\\\"draw\\\")(t),(t.calcdata||[]).forEach(function(t){t[0]&&t[0].t&&t[0].t.cb&&t[0].t.cb()}),e(v.previousPromises(t))},300)})},v.resize=function(t){return t=l.getGraphDiv(t),new Promise(function(e,r){function n(t){var e=window.getComputedStyle(t).display;return!e||\\\"none\\\"===e}t&&!n(t)||r(new Error(\\\"Resize must be passed a displayed plot div element.\\\")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._redrawTimer=setTimeout(function(){if(!t.layout||t.layout.width&&t.layout.height||n(t))e(t);else{delete t.layout.width,delete t.layout.height;var r=t.changed;t.autoplay=!0,a.call(\\\"relayout\\\",t,{autosize:!0}).then(function(){t.changed=r,e(t)})}},100)})},v.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})},v.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=l.ensureSingle(e._paper,\\\"text\\\",\\\"js-plot-link-container\\\",function(t){t.style({\\\"font-family\\\":'\\\"Open Sans\\\", Arial, sans-serif',\\\"font-size\\\":\\\"12px\\\",fill:c.defaultLine,\\\"pointer-events\\\":\\\"all\\\"}).each(function(){var t=n.select(this);t.append(\\\"tspan\\\").classed(\\\"js-link-to-tool\\\",!0),t.append(\\\"tspan\\\").classed(\\\"js-link-spacer\\\",!0),t.append(\\\"tspan\\\").classed(\\\"js-sourcelinks\\\",!0)})}),i=r.node(),a={y:e._paper.attr(\\\"height\\\")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(a[\\\"text-anchor\\\"]=\\\"start\\\",a.x=5):(a[\\\"text-anchor\\\"]=\\\"end\\\",a.x=e._paper.attr(\\\"width\\\")-7),r.attr(a);var o=r.select(\\\".js-link-to-tool\\\"),s=r.select(\\\".js-link-spacer\\\"),u=r.select(\\\".js-sourcelinks\\\");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text(\\\"\\\");var r=e.append(\\\"a\\\").attr({\\\"xlink:xlink:href\\\":\\\"#\\\",class:\\\"link--impt link--embedview\\\",\\\"font-weight\\\":\\\"bold\\\"}).text(t._context.linkText+\\\" \\\"+String.fromCharCode(187));if(t._context.sendData)r.on(\\\"click\\\",function(){v.sendDataToCloud(t)});else{var n=window.location.pathname.split(\\\"/\\\"),i=window.location.search;r.attr({\\\"xlink:xlink:show\\\":\\\"new\\\",\\\"xlink:xlink:href\\\":\\\"/\\\"+n[2].split(\\\".\\\")[0]+\\\"/\\\"+n[1]+i})}}(t,o),s.text(o.text()&&u.text()?\\\" - \\\":\\\"\\\")}},v.sendDataToCloud=function(t){t.emit(\\\"plotly_beforeexport\\\");var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL,r=n.select(t).append(\\\"div\\\").attr(\\\"id\\\",\\\"hiddenform\\\").style(\\\"display\\\",\\\"none\\\"),i=r.append(\\\"form\\\").attr({action:e+\\\"/external\\\",method:\\\"post\\\",target:\\\"_blank\\\"});return i.append(\\\"input\\\").attr({type:\\\"text\\\",name:\\\"data\\\"}).node().value=v.graphJson(t,!1,\\\"keepdata\\\"),i.node().submit(),r.remove(),t.emit(\\\"plotly_afterexport\\\"),!1};var x,b=[\\\"days\\\",\\\"shortDays\\\",\\\"months\\\",\\\"shortMonths\\\",\\\"periods\\\",\\\"dateTime\\\",\\\"date\\\",\\\"time\\\",\\\"decimal\\\",\\\"thousands\\\",\\\"grouping\\\",\\\"currency\\\"],_=[\\\"year\\\",\\\"month\\\",\\\"dayMonth\\\",\\\"dayMonthYear\\\"];function w(t,e){var r=t._context.locale,n=!1,i={};function o(t){for(var r=!0,a=0;a<e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&&(n=!0)}for(var s=0;s<2;s++){for(var l=t._context.locales,c=0;c<2;c++){var u=(l[r]||{}).format;if(u&&(o(u),n))break;l=a.localeRegistry}var f=r.split(\\\"-\\\")[0];if(n||f===r)break;r=f}return n||o(a.localeRegistry.en.format),i}function k(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var n=e[r],i=n._module||m[n.type];if(i&&i.makesData)return!0}return!1}function M(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=m[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function A(t){t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={})}function T(t){for(var e=0;e<t.length;e++)t[e].clearCalc()}v.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,i=t._fullLayout||{};if(i._skipDefaults)delete i._skipDefaults;else{var o,s=t._fullLayout={},c=t.layout||{},u=t._fullData||[],h=t._fullData=[],p=t.data||[],m=t.calcdata||[],y=t._context||{};t._transitionData||v.createTransitionData(t),s._dfltTitle={plot:g(t,\\\"Click to enter Plot title\\\"),x:g(t,\\\"Click to enter X axis title\\\"),y:g(t,\\\"Click to enter Y axis title\\\"),colorbar:g(t,\\\"Click to enter Colorscale title\\\"),annotation:g(t,\\\"new text\\\")},s._traceWord=g(t,\\\"trace\\\");var k=w(t,b);if(s._mapboxAccessToken=y.mapboxAccessToken,i._initialAutoSizeIsDone){var M=i.width,A=i.height;v.supplyLayoutGlobalDefaults(c,s,k),c.width||(s.width=M),c.height||(s.height=A),v.sanitizeMargins(s)}else{v.supplyLayoutGlobalDefaults(c,s,k);var T=!c.width||!c.height,S=s.autosize,C=y.autosizable;T&&(S||C)?v.plotAutoSize(t,c,s):T&&v.sanitizeMargins(s),!S&&T&&(c.width=s.width,c.height=s.height)}s._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),n.locale(t)}(k,s.separators),s._extraFormat=w(t,_),s._initialAutoSizeIsDone=!0,s._dataLength=p.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var E=s._subplots=function(){var t,e,r={};if(!x){x=[];var n=a.subplotsRegistry;for(var i in n){var o=n[i],s=o.attr;if(s&&(x.push(i),Array.isArray(s)))for(e=0;e<s.length;e++)l.pushUnique(x,s[e])}}for(t=0;t<x.length;t++)r[x[t]]=[];return r}(),L=s._splomAxes={x:{},y:{}},z=s._splomSubplots={};s._splomGridDflt={},s._scatterStackOpts={},s._firstScatter={},s._requestRangeslider={},s._traceUids=function(t,e){var r,n,i=e.length,a=[];for(r=0;r<t.length;r++){var o=t[r]._fullInput;o!==n&&a.push(o),n=o}var s=a.length,c=new Array(i),u={};function f(t,e){c[e]=t,u[t]=1}function h(t,e){if(t&&\\\"string\\\"==typeof t&&!u[t])return f(t,e),!0}for(r=0;r<i;r++)h(e[r].uid,r)||r<s&&h(a[r].uid,r)||f(l.randstr(u),r);return c}(u,p),s._globalTransforms=(t._context||{}).globalTransforms,v.supplyDataDefaults(p,h,c,s);var O=Object.keys(L.x),I=Object.keys(L.y);if(O.length>1&&I.length>1){for(a.getComponentMethod(\\\"grid\\\",\\\"sizeDefaults\\\")(c,s),o=0;o<O.length;o++)l.pushUnique(E.xaxis,O[o]);for(o=0;o<I.length;o++)l.pushUnique(E.yaxis,I[o]);for(var P in z)l.pushUnique(E.cartesian,P)}if(s._has=v._hasPlotType.bind(s),u.length===h.length)for(o=0;o<h.length;o++)d(h[o],u[o]);v.supplyLayoutModuleDefaults(c,s,h,t._transitionData);var D=s._visibleModules,R=[];for(o=0;o<D.length;o++){var B=D[o].crossTraceDefaults;B&&l.pushUnique(R,B)}for(o=0;o<R.length;o++)R[o](h,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&\\\"splom\\\"===s._basePlotModules[0].name&&O.length>15&&I.length>15&&0===s.shapes.length&&0===s.images.length,s._hasCartesian=s._has(\\\"cartesian\\\"),s._hasGeo=s._has(\\\"geo\\\"),s._hasGL3D=s._has(\\\"gl3d\\\"),s._hasGL2D=s._has(\\\"gl2d\\\"),s._hasTernary=s._has(\\\"ternary\\\"),s._hasPie=s._has(\\\"pie\\\"),v.linkSubplots(h,s,u,i),v.cleanPlot(h,s,u,i),d(s,i),v.doAutoMargin(t);var F=f.list(t);for(o=0;o<F.length;o++){F[o].setScale()}r||m.length!==h.length||v.supplyDefaultsUpdateCalc(m,h)}},v.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=t[r][0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o,s,c,u=a._arrayAttrs;for(o=0;o<u.length;o++)s=u[o],c=l.nestedProperty(a,s).get().slice(),l.nestedProperty(n,s).set(c)}i.trace=n}}},v.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},v._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var n=this._modules||[];for(e=0;e<n.length;e++){var i=n[e].name;if(i===t)return!0;var o=a.modules[i];if(o&&o.categories[t])return!0}return!1},v.cleanPlot=function(t,e,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(t,e,r,n)}var l=n._has&&n._has(\\\"gl\\\"),c=e._has&&e._has(\\\"gl\\\");l&&!c&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(\\\".gl-canvas\\\").remove(),n._glcontainer.selectAll(\\\".no-webgl\\\").remove(),n._glcanvas=null);var u=!!n._infolayer;t:for(i=0;i<r.length;i++){var f=r[i].uid;for(a=0;a<t.length;a++){if(f===t[a].uid)continue t}u&&n._infolayer.select(\\\".cb\\\"+f).remove()}n._zoomlayer&&n._zoomlayer.selectAll(\\\".select-outline\\\").remove()},v.linkSubplots=function(t,e,r,n){var i,a,o=n._plots||{},s=e._plots={},l=e._subplots,c={_fullData:t,_fullLayout:e},u=l.cartesian.concat(l.gl2d||[]);for(i=0;i<u.length;i++){var h,p=u[i],d=o[p],g=f.getFromId(c,p,\\\"x\\\"),v=f.getFromId(c,p,\\\"y\\\");for(d?h=s[p]=d:(h=s[p]={}).id=p,h.xaxis=g,h.yaxis=v,h._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var m=t[a];if(m.xaxis===h.xaxis._id&&m.yaxis===h.yaxis._id&&!1===m.cliponaxis){h._hasClipOnAxisFalse=!0;break}}}var y=f.list(c,null,!0);for(i=0;i<y.length;i++){var x=y[i],b=null;x.overlaying&&(b=f.getFromId(c,x.overlaying))&&b.overlaying&&(x.overlaying=!1,b=null),x._mainAxis=b||x,b&&(x.domain=b.domain.slice()),x._anchorAxis=\\\"free\\\"===x.anchor?null:f.getFromId(c,x.anchor)}},v.clearExpandedTraceDefaultColors=function(t){var e,r,n;for(r=[],(e=t._module._colorAttrs)||(t._module._colorAttrs=e=[],o.crawl(t._module.attributes,function(t,n,i,a){r[a]=n,r.length=a+1,\\\"color\\\"===t.valType&&void 0===t.dflt&&e.push(r.join(\\\".\\\"))})),n=0;n<e.length;n++){l.nestedProperty(t,\\\"_input.\\\"+e[n]).get()||l.nestedProperty(t,e[n]).set(null)}},v.supplyDataDefaults=function(t,e,r,n){var i,o,c,u=n._modules,f=n._visibleModules,h=n._basePlotModules,p=0,g=0;function m(t){e.push(t);var r=t._module;r&&(l.pushUnique(u,r),!0===t.visible&&l.pushUnique(f,r),l.pushUnique(h,t._module.basePlotModule),p++,!1!==t._input.visible&&g++)}n._transformModules=[];var y={},x=[],b=(r.template||{}).data||{},_=s.traceTemplater(b);for(i=0;i<t.length;i++){if(c=t[i],(o=_.newTrace(c)).uid=n._traceUids[i],v.supplyTraceDefaults(c,o,g,n,i),o.index=i,o._input=c,o._expandedIndex=p,o.transforms&&o.transforms.length)for(var w=!1!==c.visible&&!1===o.visible,k=M(o,e,r,n),A=0;A<k.length;A++){var T=k[A],S={_template:o._template,type:o.type,uid:o.uid+A};w&&!1===T.visible&&delete T.visible,v.supplyTraceDefaults(T,S,p,n,i),d(S,T),S.index=i,S._input=c,S._fullInput=o,S._expandedIndex=p,S._expandedInput=T,m(S)}else o._fullInput=o,o._expandedInput=o,m(o);a.traceIs(o,\\\"carpetAxis\\\")&&(y[o.carpet]=o),a.traceIs(o,\\\"carpetDependent\\\")&&x.push(i)}for(i=0;i<x.length;i++)if((o=e[x[i]]).visible){var C=y[o.carpet];o._carpet=C,C&&C.visible?(o.xaxis=C.xaxis,o.yaxis=C.yaxis):o.visible=!1}},v.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return l.coerce(t||{},r,h,e,n)}if(n(\\\"mode\\\"),n(\\\"direction\\\"),n(\\\"fromcurrent\\\"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=v.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=v.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=v.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=v.supplyAnimationTransitionDefaults(t.transition||{});return r},v.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return l.coerce(t||{},e,h.frame,r,n)}return r(\\\"duration\\\"),r(\\\"redraw\\\"),e},v.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return l.coerce(t||{},e,h.transition,r,n)}return r(\\\"duration\\\"),r(\\\"easing\\\"),e},v.supplyFrameDefaults=function(t){var e={};function r(r,n){return l.coerce(t,e,p,r,n)}return r(\\\"group\\\"),r(\\\"name\\\"),r(\\\"traces\\\"),r(\\\"baseframe\\\"),r(\\\"data\\\"),r(\\\"layout\\\"),e},v.supplyTraceDefaults=function(t,e,r,n,i){var o,s=n.colorway||c.defaults,u=s[r%s.length];function f(r,n){return l.coerce(t,e,v.attributes,r,n)}var h=f(\\\"visible\\\");f(\\\"type\\\"),f(\\\"name\\\",n._traceWord+\\\" \\\"+i);var p,d,g,m=v.getModule(e);if(e._module=m,m){var y=m.basePlotModule,x=y.attr,b=y.attributes;if(x&&b){var _=n._subplots,w=\\\"\\\";if(\\\"gl2d\\\"!==y.name||h){if(Array.isArray(x))for(o=0;o<x.length;o++){var k=x[o],M=l.coerce(t,e,b,k);_[k]&&l.pushUnique(_[k],M),w+=M}else w=l.coerce(t,e,b,x);_[y.name]&&l.pushUnique(_[y.name],w)}}}return h&&(f(\\\"customdata\\\"),f(\\\"ids\\\"),a.traceIs(e,\\\"showLegend\\\")?(e._dfltShowLegend=!0,f(\\\"showlegend\\\"),f(\\\"legendgroup\\\")):e._dfltShowLegend=!1,p=\\\"hoverlabel\\\",d=\\\"\\\",g=function(){a.getComponentMethod(\\\"fx\\\",\\\"supplyDefaults\\\")(t,e,u,n)},m&&p in m.attributes&&void 0===m.attributes[p]||(g&&\\\"function\\\"==typeof g?g():f(p,d)),m&&(m.supplyDefaults(t,e,u,n),l.coerceHoverinfo(t,e,n)),a.traceIs(e,\\\"noOpacity\\\")||f(\\\"opacity\\\"),a.traceIs(e,\\\"notLegendIsolatable\\\")&&(e.visible=!!e.visible),m&&m.selectPoints&&f(\\\"selectedpoints\\\"),v.supplyTransformDefaults(t,e,n)),e},v.hasMakesDataTransform=k,v.supplyTransformDefaults=function(t,e,r){if(e._length||k(t)){var n=r._globalTransforms||[],i=r._transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],c=0;c<o.length;c++){var u,f=o[c],h=f.type,p=m[h],d=!(f._module&&f._module===p),g=p&&\\\"function\\\"==typeof p.transform;p||l.warn(\\\"Unrecognized transform type \\\"+h+\\\".\\\"),p&&p.supplyDefaults&&(d||g)?((u=p.supplyDefaults(f,e,r,t)).type=h,u._module=p,l.pushUnique(i,p)):u=l.extendFlat({},f),s.push(u)}}},v.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return l.coerce(t,e,v.layoutAttributes,r,n)}var i=t.template;l.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data);var o=l.coerceFont(n,\\\"font\\\");n(\\\"title\\\",e._dfltTitle.plot),l.coerceFont(n,\\\"titlefont\\\",{family:o.family,size:Math.round(1.4*o.size),color:o.color}),n(\\\"autosize\\\",!(t.width&&t.height)),n(\\\"width\\\"),n(\\\"height\\\"),n(\\\"margin.l\\\"),n(\\\"margin.r\\\"),n(\\\"margin.t\\\"),n(\\\"margin.b\\\"),n(\\\"margin.pad\\\"),n(\\\"margin.autoexpand\\\"),t.width&&t.height&&v.sanitizeMargins(e),a.getComponentMethod(\\\"grid\\\",\\\"sizeDefaults\\\")(t,e),n(\\\"paper_bgcolor\\\"),n(\\\"separators\\\",r.decimal+r.thousands),n(\\\"hidesources\\\"),n(\\\"colorway\\\"),n(\\\"datarevision\\\"),n(\\\"modebar.orientation\\\"),n(\\\"modebar.bgcolor\\\",c.addOpacity(e.paper_bgcolor,.5));var s=c.contrast(c.rgb(e.modebar.bgcolor));n(\\\"modebar.color\\\",c.addOpacity(s,.3)),n(\\\"modebar.activecolor\\\",c.addOpacity(s,.7)),a.getComponentMethod(\\\"calendars\\\",\\\"handleDefaults\\\")(t,e,\\\"calendar\\\"),a.getComponentMethod(\\\"fx\\\",\\\"supplyLayoutGlobalDefaults\\\")(t,e,n)},v.plotAutoSize=function(t,e,r){var n,a,o=t._context||{},s=o.frameMargins,c=l.isPlotDiv(t);if(c&&t.emit(\\\"plotly_autosize\\\"),o.fillFrame)n=window.innerWidth,a=window.innerHeight,document.body.style.overflow=\\\"hidden\\\";else{var u=c?window.getComputedStyle(t):{};if(n=parseFloat(u.width)||parseFloat(u.maxWidth)||r.width,a=parseFloat(u.height)||parseFloat(u.maxHeight)||r.height,i(s)&&s>0){var f=1-2*s;n=Math.round(f*n),a=Math.round(f*a)}}var h=v.layoutAttributes.width.min,p=v.layoutAttributes.height.min;n<h&&(n=h),a<p&&(a=p);var d=!e.width&&Math.abs(r.width-n)>1,g=!e.height&&Math.abs(r.height-a)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=a)),t._initialAutoSize||(t._initialAutoSize={width:n,height:a}),v.sanitizeMargins(r)},v.supplyLayoutModuleDefaults=function(t,e,r,n){var i,o,s,c=a.componentsRegistry,u=e._basePlotModules,f=a.subplotsRegistry.cartesian;for(i in c)(s=c[i]).includeBasePlot&&s.includeBasePlot(t,e);for(var h in u.length||u.push(f),e._has(\\\"cartesian\\\")&&(a.getComponentMethod(\\\"grid\\\",\\\"contentDefaults\\\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(l.subplotSort);for(o=0;o<u.length;o++)(s=u[o]).supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var p=e._modules;for(o=0;o<p.length;o++)(s=p[o]).supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var d=e._transformModules;for(o=0;o<d.length;o++)(s=d[o]).supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r,n);for(i in c)(s=c[i]).supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r)},v.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&&(e._glcontainer.selectAll(\\\".gl-canvas\\\").remove(),e._glcontainer.remove(),e._glcanvas=null),void 0!==e._geocontainer&&e._geocontainer.remove(),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),l.clearThrottle(),l.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.framework,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},v.style=function(t){var e,r=t._fullLayout._visibleModules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&l.pushUnique(n,i.style)}for(e=0;e<n.length;e++)n[e](t)},v.sanitizeMargins=function(t){if(t&&t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a<0&&(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},v.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}},v.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1},v.autoMargin=function(t,e,r){var n=t._fullLayout;A(n);var i=n._pushmargin,a=n._pushmarginIds;if(!1!==n.margin.autoexpand){if(r){var o=r.pad;if(void 0===o){var s=n.margin;o=Math.min(12,s.l,s.r,s.t,s.b)}r.l+r.r>.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0);var l=void 0!==r.xl?r.xl:r.x,c=void 0!==r.xr?r.xr:r.x,u=void 0!==r.yt?r.yt:r.y,f=void 0!==r.yb?r.yb:r.y;i[e]={l:{val:l,size:r.l+o},r:{val:c,size:r.r+o},b:{val:f,size:r.b+o},t:{val:u,size:r.t+o}},a[e]=1}else delete i[e],delete a[e];n._replotting||v.doAutoMargin(t)}},v.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),A(e);var r=e._size,n=JSON.stringify(r),o=Math.max(e.margin.l||0,0),s=Math.max(e.margin.r||0,0),l=Math.max(e.margin.t||0,0),c=Math.max(e.margin.b||0,0),u=e._pushmargin,f=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var h in u)f[h]||delete u[h];for(var p in u.base={l:{val:0,size:o},r:{val:1,size:s},t:{val:1,size:l},b:{val:0,size:c}},u){var d=u[p].l||{},g=u[p].b||{},v=d.val,m=d.size,y=g.val,x=g.size;for(var b in u){if(i(m)&&u[b].r){var _=u[b].r.val,w=u[b].r.size;if(_>v){var k=(m*_+(w-e.width)*v)/(_-v),M=(w*(1-v)+(m-e.width)*(1-_))/(_-v);k>=0&&M>=0&&k+M>o+s&&(o=k,s=M)}}if(i(x)&&u[b].t){var T=u[b].t.val,S=u[b].t.size;if(T>y){var C=(x*T+(S-e.height)*y)/(T-y),E=(S*(1-y)+(x-e.height)*(1-T))/(T-y);C>=0&&E>=0&&C+E>c+l&&(c=C,l=E)}}}}}if(r.l=Math.round(o),r.r=Math.round(s),r.t=Math.round(l),r.b=Math.round(c),r.p=Math.round(e.margin.pad),r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b,!e._replotting&&\\\"{}\\\"!==n&&n!==JSON.stringify(e._size))return\\\"_redrawFromAutoMarginCount\\\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1,a.call(\\\"plot\\\",t)},v.graphJson=function(t,e,r,n,i){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&v.supplyDefaults(t);var a=i?t._fullData:t.data,o=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function c(t){if(\\\"function\\\"==typeof t)return null;if(l.isPlainObject(t)){var e,n,i={};for(e in t)if(\\\"function\\\"!=typeof t[e]&&-1===[\\\"_\\\",\\\"[\\\"].indexOf(e.charAt(0))){if(\\\"keepdata\\\"===r){if(\\\"src\\\"===e.substr(e.length-3))continue}else if(\\\"keepstream\\\"===r){if(\\\"string\\\"==typeof(n=t[e+\\\"src\\\"])&&n.indexOf(\\\":\\\")>0&&!l.isPlainObject(t.stream))continue}else if(\\\"keepall\\\"!==r&&\\\"string\\\"==typeof(n=t[e+\\\"src\\\"])&&n.indexOf(\\\":\\\")>0)continue;i[e]=c(t[e])}return i}return Array.isArray(t)?t.map(c):l.isTypedArray(t)?l.simpleMap(t,l.identity):l.isJSDate(t)?l.ms2DateTimeLocal(+t):t}var u={data:(a||[]).map(function(t){var r=c(t);return e&&delete r.fit,r})};return e||(u.layout=c(o)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=c(s)),\\\"object\\\"===n?u:JSON.stringify(u)},v.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch((n=e[r]).type){case\\\"replace\\\":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case\\\"insert\\\":o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case\\\"delete\\\":delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},v.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error(\\\"computeFrame must be given a string frame name\\\");var s=o[e.toString()];if(!s)return!1;for(var l=[s],c=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===c.indexOf(s.name);)l.push(s),c.push(s.name);for(var u={};s=l.pop();)if(s.layout&&(u.layout=v.extendLayout(u.layout,s.layout)),s.data){if(u.data||(u.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(u.traces||(u.traces=[]),r=0;r<s.data.length;r++)null!=(i=n[r])&&(-1===(a=u.traces.indexOf(i))&&(a=u.data.length,u.traces[a]=i),u.data[a]=v.extendTrace(u.data[a],s.data[r]))}return u},v.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(e[i.name]=i)}},v.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,c,u,f=l.extendDeepNoArrays({},e||{}),h=l.expandObjectPaths(f),p={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=l.nestedProperty(h,r[a])).get())?l.nestedProperty(p,r[a]).set(null):(n.set(null),l.nestedProperty(p,r[a]).set(i));if(t=l.extendDeepNoArrays(t||{},h),r&&r.length)for(a=0;a<r.length;a++)if(c=l.nestedProperty(p,r[a]).get()){for(u=(s=l.nestedProperty(t,r[a])).get(),Array.isArray(u)||(u=[],s.set(u)),o=0;o<c.length;o++){var d=c[o];u[o]=null===d?null:v.extendObjectWithContainers(u[o],d)}s.set(u)}return t},v.dataArrayContainers=[\\\"transforms\\\",\\\"dimensions\\\"],v.layoutArrayContainers=a.layoutArrayContainers,v.extendTrace=function(t,e){return v.extendObjectWithContainers(t,e,v.dataArrayContainers)},v.extendLayout=function(t,e){return v.extendObjectWithContainers(t,e,v.layoutArrayContainers)},v.transition=function(t,e,r,n,i,o){var s,c,u=Array.isArray(e)?e.length:0,f=n.slice(0,u),h=[];var p=!1;for(s=0;s<f.length;s++){c=f[s];t._fullData[c]._module}var d=[v.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},function(){var n;for(n=0;n<f.length;n++){var i=f[n],a=t._fullData[i]._module;a&&(a.animatable&&h.push(i),t.data[f[n]]=v.extendTrace(t.data[f[n]],e[n]))}var o=l.expandObjectPaths(l.extendDeepNoArrays({},r)),s=/^[xy]axis[0-9]*$/;for(var c in o)s.test(c)&&delete o[c].range;return v.extendLayout(t.layout,o),delete t.calcdata,v.supplyDefaults(t),v.doCalcdata(t),Promise.resolve()},v.rehover,function(){return t.emit(\\\"plotly_transitioning\\\",[]),new Promise(function(e){t._transitioning=!0,o.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){p=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return a.call(\\\"redraw\\\",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit(\\\"plotly_transitioninterrupted\\\",[])});var n,s,c=0,u=0;function f(){return c++,function(){var r;u++,p||u!==c||(r=e,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(i.redraw)return a.call(\\\"redraw\\\",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\\\"plotly_transitioned\\\",[])}).then(r)))}}var d=t._fullLayout._basePlotModules,g=!1;if(r)for(s=0;s<d.length;s++)if(d[s].transitionAxes){var v=l.expandObjectPaths(r);g=d[s].transitionAxes(t,v,o,f)||g}for(g?((n=l.extendFlat({},o)).duration=0,h=null):n=o,s=0;s<d.length;s++)d[s].plot(t,h,n,f);setTimeout(f())})}],g=l.syncOrAsync(d,t);return g&&g.then||(g=Promise.resolve()),g.then(function(){return t})},v.doCalcdata=function(t,e){var r,n,i,s,c=f.list(t),h=t._fullData,p=t._fullLayout,d=new Array(h.length),g=(t.calcdata||[]).slice(0);for(t.calcdata=d,p._numBoxes=0,p._numViolins=0,p._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,p._piecolormap={},i=0;i<h.length;i++)Array.isArray(e)&&-1===e.indexOf(i)&&(d[i]=g[i]);for(i=0;i<h.length;i++)(r=h[i])._arrayAttrs=o.findArrayAttributes(r),r._extremes={};var v=p._subplots.polar||[];for(i=0;i<v.length;i++)c.push(p[v[i]].radialaxis,p[v[i]].angularaxis);T(c);var y=!1;for(i=0;i<h.length;i++)if(!0===(r=h[i]).visible&&r.transforms){if((n=r._module)&&n.calc){var x=n.calc(t,r);x[0]&&x[0].t&&x[0].t._scene&&delete x[0].t._scene.dirty}for(s=0;s<r.transforms.length;s++){var b=r.transforms[s];(n=m[b.type])&&n.calcTransform&&(r._hasCalcTransform=!0,y=!0,n.calcTransform(t,r,b))}}function _(e,i){if(r=h[e],!!(n=r._module).isContainer===i){var a=[];if(!0===r.visible){delete r._indexToPoints;var o=r.transforms||[];for(s=o.length-1;s>=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(a=n.calc(t,r))}Array.isArray(a)&&a[0]||(a=[{x:u,y:u}]),a[0].t||(a[0].t={}),a[0].trace=r,d[e]=a}}for(y&&T(c),i=0;i<h.length;i++)_(i,!0);for(i=0;i<h.length;i++)_(i,!1);!function(t){var e,r,n,i=t._fullLayout,a=i._visibleModules,o={};for(r=0;r<a.length;r++){var s=a[r],c=s.crossTraceCalc;if(c){var u=s.basePlotModule.name;o[u]?l.pushUnique(o[u],c):o[u]=[c]}}for(n in o){var f=o[n],h=i._subplots[n];if(Array.isArray(h))for(e=0;e<h.length;e++){var p=h[e],d=\\\"cartesian\\\"===n?i._plots[p]:i[p];for(r=0;r<f.length;r++)f[r](t,d,p)}else for(r=0;r<f.length;r++)f[r](t)}}(t),a.getComponentMethod(\\\"fx\\\",\\\"calc\\\")(t),a.getComponentMethod(\\\"errorbars\\\",\\\"calc\\\")(t)},v.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()},v.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i<r.length;i++){var s=r[i],c=s[0].trace;c.visible&&(o[c.type]=o[c.type]||[],o[c.type].push(s))}for(var u in a)if(!o[u]){var f=a[u][0];f[0].trace.visible=!1,o[u]=[f]}for(var h in o){var p=o[h];p[0][0].trace._module.plot(t,e,l.filterVisible(p),n)}e.traceHash=o}},{\\\"../components/color\\\":570,\\\"../constants/numerical\\\":673,\\\"../lib\\\":696,\\\"../plot_api/plot_schema\\\":734,\\\"../plot_api/plot_template\\\":735,\\\"../plots/cartesian/axis_ids\\\":748,\\\"../registry\\\":828,\\\"./animation_attributes\\\":740,\\\"./attributes\\\":742,\\\"./command\\\":770,\\\"./font_attributes\\\":772,\\\"./frame_attributes\\\":773,\\\"./layout_attributes\\\":800,d3:148,\\\"fast-isnumeric\\\":214}],810:[function(t,e,r){\\\"use strict\\\";e.exports={attr:\\\"subplot\\\",name:\\\"polar\\\",axisNames:[\\\"angularaxis\\\",\\\"radialaxis\\\"],axisName2dataArray:{angularaxis:\\\"theta\\\",radialaxis:\\\"r\\\"},layerNames:[\\\"draglayer\\\",\\\"plotbg\\\",\\\"backplot\\\",\\\"angular-grid\\\",\\\"radial-grid\\\",\\\"frontplot\\\",\\\"angular-line\\\",\\\"radial-line\\\",\\\"angular-axis\\\",\\\"radial-axis\\\"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},{}],811:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../lib/polygon\\\").tester,a=n.findIndexOfMin,o=n.isAngleInsideSector,s=n.angleDelta,l=n.angleDist;function c(t,e,r,n){var i,a,o=n[0],s=n[1],l=f(Math.sin(e)-Math.sin(t)),c=f(Math.cos(e)-Math.cos(t)),u=Math.tan(r),h=f(1/u),p=l/c,d=s-p*o;return h?l&&c?a=u*(i=d/(u-p)):c?(i=s*h,a=s):(i=o,a=o*u):l&&c?(i=0,a=d):c?(i=0,a=s):i=a=NaN,[i,a]}function u(t,e,r,i){return n.isFullCircle([e,r])?function(t,e){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;r++){var a=e[r];i[r]=[t*Math.cos(a),t*Math.sin(a)]}return i[r]=i[0].slice(),i}(t,i):function(t,e,r,i){var s,u,f=i.length,h=[];function p(e){return[t*Math.cos(e),t*Math.sin(e)]}function d(t,e,r){return c(t,e,r,p(t))}function g(t){return n.mod(t,f)}function v(t){return o(t,[e,r])}var m=a(i,function(t){return v(t)?l(t,e):1/0}),y=d(i[m],i[g(m-1)],e);for(h.push(y),s=m,u=0;u<f;s++,u++){var x=i[g(s)];if(!v(x))break;h.push(p(x))}var b=a(i,function(t){return v(t)?l(t,r):1/0}),_=d(i[b],i[g(b+1)],r);return h.push(_),h.push([0,0]),h.push(h[0].slice()),h}(t,e,r,i)}function f(t){return Math.abs(t)>1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a<n;a++){var o=t[a];i[a]=[e+o[0],r-o[1]]}return i}e.exports={isPtInsidePolygon:function(t,e,r,n,a){if(!o(e,n))return!1;var s,l;r[0]<r[1]?(s=r[0],l=r[1]):(s=r[1],l=r[0]);var c=i(u(s,n[0],n[1],a)),f=i(u(l,n[0],n[1],a)),h=[t*Math.cos(e),t*Math.sin(e)];return f.contains(h)&&!c.contains(h)},findPolygonOffset:function(t,e,r,n){for(var i=1/0,a=1/0,o=u(t,e,r,n),s=0;s<o.length;s++){var l=o[s];i=Math.min(i,l[0]),a=Math.min(a,-l[1])}return[i,a]},findEnclosingVertexAngles:function(t,e){var r=a(e,function(e){var r=s(e,t);return r>0?r:1/0}),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,e*c+i+n],[u,e*u+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return\\\"M\\\"+h(u(t,e,r,n),i,a).join(\\\"L\\\")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t<e?(s=t,l=e):(s=e,l=t);var c=h(u(s,r,n,i),a,o);return\\\"M\\\"+h(u(l,r,n,i),a,o).reverse().join(\\\"L\\\")+\\\"M\\\"+c.join(\\\"L\\\")}}},{\\\"../../lib\\\":696,\\\"../../lib/polygon\\\":709}],812:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../get_data\\\").getSubplotCalcData,i=t(\\\"../../lib\\\").counterRegex,a=t(\\\"./polar\\\"),o=t(\\\"./constants\\\"),s=o.attr,l=o.name,c=i(l),u={};u[s]={valType:\\\"subplotid\\\",dflt:l,editType:\\\"calc\\\"},e.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:t(\\\"./layout_attributes\\\"),supplyLayoutDefaults:t(\\\"./layout_defaults\\\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o<i.length;o++){var s=i[o],c=n(r,l,s),u=e[s]._subplot;u||(u=a(t,s),e[s]._subplot=u),u.plot(c,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=n._has&&n._has(\\\"gl\\\"),o=e._has&&e._has(\\\"gl\\\"),s=a&&!o,c=0;c<i.length;c++){var u=i[c],f=n[u]._subplot;if(!e[u]&&f)for(var h in f.framework.remove(),f.layers[\\\"radial-axis-title\\\"].remove(),f.clipPaths)f.clipPaths[h].remove();s&&f._scene&&(f._scene.destroy(),f._scene=null)}},toSVG:t(\\\"../cartesian\\\").toSVG}},{\\\"../../lib\\\":696,\\\"../cartesian\\\":757,\\\"../get_data\\\":782,\\\"./constants\\\":810,\\\"./layout_attributes\\\":813,\\\"./layout_defaults\\\":814,\\\"./polar\\\":821}],813:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color/attributes\\\"),i=t(\\\"../cartesian/layout_attributes\\\"),a=t(\\\"../domain\\\").attributes,o=t(\\\"../../lib\\\").extendFlat,s=t(\\\"../../plot_api/edit_types\\\").overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth},\\\"plot\\\",\\\"from-root\\\"),c=s({tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,layer:i.layer},\\\"plot\\\",\\\"from-root\\\"),u={visible:o({},i.visible,{dflt:!0}),type:i.type,autorange:o({},i.autorange,{editType:\\\"plot\\\"}),rangemode:{valType:\\\"enumerated\\\",values:[\\\"tozero\\\",\\\"nonnegative\\\",\\\"normal\\\"],dflt:\\\"tozero\\\",editType:\\\"calc\\\"},range:o({},i.range,{items:[{valType:\\\"any\\\",editType:\\\"plot\\\",impliedEdits:{\\\"^autorange\\\":!1}},{valType:\\\"any\\\",editType:\\\"plot\\\",impliedEdits:{\\\"^autorange\\\":!1}}],editType:\\\"plot\\\"}),categoryorder:i.categoryorder,categoryarray:i.categoryarray,angle:{valType:\\\"angle\\\",editType:\\\"plot\\\"},side:{valType:\\\"enumerated\\\",values:[\\\"clockwise\\\",\\\"counterclockwise\\\"],dflt:\\\"clockwise\\\",editType:\\\"plot\\\"},title:o({},i.title,{editType:\\\"plot\\\",dflt:\\\"\\\"}),titlefont:s(i.titlefont,\\\"plot\\\",\\\"from-root\\\"),hoverformat:i.hoverformat,editType:\\\"calc\\\"};o(u,l,c);var f={visible:o({},i.visible,{dflt:!0}),type:{valType:\\\"enumerated\\\",values:[\\\"-\\\",\\\"linear\\\",\\\"category\\\"],dflt:\\\"-\\\",editType:\\\"calc\\\",_noTemplating:!0},categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:\\\"enumerated\\\",values:[\\\"radians\\\",\\\"degrees\\\"],dflt:\\\"degrees\\\",editType:\\\"calc\\\"},period:{valType:\\\"number\\\",editType:\\\"calc\\\",min:0},direction:{valType:\\\"enumerated\\\",values:[\\\"counterclockwise\\\",\\\"clockwise\\\"],dflt:\\\"counterclockwise\\\",editType:\\\"calc\\\"},rotation:{valType:\\\"angle\\\",editType:\\\"calc\\\"},hoverformat:i.hoverformat,editType:\\\"calc\\\"};o(f,l,c),e.exports={domain:a({name:\\\"polar\\\",editType:\\\"plot\\\"}),sector:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\",editType:\\\"plot\\\"},{valType:\\\"number\\\",editType:\\\"plot\\\"}],dflt:[0,360],editType:\\\"plot\\\"},hole:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"plot\\\"},bgcolor:{valType:\\\"color\\\",editType:\\\"plot\\\",dflt:n.background},radialaxis:u,angularaxis:f,gridshape:{valType:\\\"enumerated\\\",values:[\\\"circular\\\",\\\"linear\\\"],dflt:\\\"circular\\\",editType:\\\"plot\\\"},editType:\\\"calc\\\"}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib\\\":696,\\\"../../plot_api/edit_types\\\":728,\\\"../cartesian/layout_attributes\\\":758,\\\"../domain\\\":771}],814:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../plot_api/plot_template\\\"),o=t(\\\"../subplot_defaults\\\"),s=t(\\\"../get_data\\\").getSubplotData,l=t(\\\"../cartesian/tick_value_defaults\\\"),c=t(\\\"../cartesian/tick_mark_defaults\\\"),u=t(\\\"../cartesian/tick_label_defaults\\\"),f=t(\\\"../cartesian/category_order_defaults\\\"),h=t(\\\"../cartesian/line_grid_defaults\\\"),p=t(\\\"../cartesian/axis_autotype\\\"),d=t(\\\"./layout_attributes\\\"),g=t(\\\"./set_convert\\\"),v=t(\\\"./constants\\\"),m=v.axisNames;function y(t,e,r,o){var p=r(\\\"bgcolor\\\");o.bgColor=i.combine(p,o.paper_bgcolor);var y=r(\\\"sector\\\");r(\\\"hole\\\");var b,_=s(o.fullData,v.name,o.id),w=o.layoutOut;function k(t,e){return r(b+\\\".\\\"+t,e)}for(var M=0;M<m.length;M++){b=m[M],n.isPlainObject(t[b])||(t[b]={});var A=t[b],T=a.newContainer(e,b);T._id=T._name=b,T._traceIndices=_.map(function(t){return t._expandedIndex});var S=v.axisName2dataArray[b],C=x(A,T,k,_,S);f(A,T,k,{axData:_,dataAttr:S});var E,L,z=k(\\\"visible\\\");switch(g(T,e,w),z&&(L=(E=k(\\\"color\\\"))===A.color?E:o.font.color),T._m=1,b){case\\\"radialaxis\\\":var O=k(\\\"autorange\\\",!T.isValidRange(A.range));A.autorange=O,!O||\\\"linear\\\"!==C&&\\\"-\\\"!==C||k(\\\"rangemode\\\"),\\\"reversed\\\"===O&&(T._m=-1),k(\\\"range\\\"),T.cleanRange(\\\"range\\\",{dfltRange:[0,1]}),z&&(k(\\\"side\\\"),k(\\\"angle\\\",y[0]),k(\\\"title\\\"),n.coerceFont(k,\\\"titlefont\\\",{family:o.font.family,size:Math.round(1.2*o.font.size),color:L}));break;case\\\"angularaxis\\\":if(\\\"date\\\"===C){n.log(\\\"Polar plots do not support date angular axes yet.\\\");for(var I=0;I<_.length;I++)_[I].visible=!1;C=A.type=T.type=\\\"linear\\\"}k(\\\"linear\\\"===C?\\\"thetaunit\\\":\\\"period\\\");var P=k(\\\"direction\\\");k(\\\"rotation\\\",{counterclockwise:0,clockwise:90}[P])}if(z)l(A,T,k,T.type),u(A,T,k,T.type,{tickSuffixDflt:\\\"degrees\\\"===T.thetaunit?\\\"\\\\xb0\\\":void 0}),c(A,T,k,{outerTicks:!0}),k(\\\"showticklabels\\\")&&(n.coerceFont(k,\\\"tickfont\\\",{family:o.font.family,size:o.font.size,color:L}),k(\\\"tickangle\\\"),k(\\\"tickformat\\\")),h(A,T,k,{dfltColor:E,bgColor:o.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:d[b]}),k(\\\"layer\\\");\\\"category\\\"!==C&&k(\\\"hoverformat\\\"),T._input=A}\\\"category\\\"===e.angularaxis.type&&r(\\\"gridshape\\\")}function x(t,e,r,n,i){if(\\\"-\\\"===r(\\\"type\\\")){for(var a,o=0;o<n.length;o++)if(n[o].visible){a=n[o];break}a&&a[i]&&(e.type=p(a[i],\\\"gregorian\\\")),\\\"-\\\"===e.type?e.type=\\\"linear\\\":t.type=e.type}return e.type}e.exports=function(t,e,r){o(t,e,r,{type:v.name,attributes:d,handleDefaults:y,font:e.font,paper_bgcolor:e.paper_bgcolor,fullData:r,layoutOut:e})}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../cartesian/axis_autotype\\\":746,\\\"../cartesian/category_order_defaults\\\":749,\\\"../cartesian/line_grid_defaults\\\":760,\\\"../cartesian/tick_label_defaults\\\":765,\\\"../cartesian/tick_mark_defaults\\\":766,\\\"../cartesian/tick_value_defaults\\\":767,\\\"../get_data\\\":782,\\\"../subplot_defaults\\\":823,\\\"./constants\\\":810,\\\"./layout_attributes\\\":813,\\\"./set_convert\\\":822}],815:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../../traces/scatter/attributes\\\"),i=n.marker,a=t(\\\"../../../lib/extend\\\").extendFlat;[\\\"Area traces are deprecated!\\\",\\\"Please switch to the *barpolar* trace type.\\\"].join(\\\" \\\");e.exports={r:a({},n.r,{}),t:a({},n.t,{}),marker:{color:a({},i.color,{}),size:a({},i.size,{}),symbol:a({},i.symbol,{}),opacity:a({},i.opacity,{}),editType:\\\"calc\\\"}}},{\\\"../../../lib/extend\\\":685,\\\"../../../traces/scatter/attributes\\\":1044}],816:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../cartesian/layout_attributes\\\"),i=t(\\\"../../../lib/extend\\\").extendFlat,a=t(\\\"../../../plot_api/edit_types\\\").overrideAll,o=[\\\"Legacy polar charts are deprecated!\\\",\\\"Please switch to *polar* subplots.\\\"].join(\\\" \\\"),s=i({},n.domain,{});function l(t,e){return i({},e,{showline:{valType:\\\"boolean\\\"},showticklabels:{valType:\\\"boolean\\\"},tickorientation:{valType:\\\"enumerated\\\",values:[\\\"horizontal\\\",\\\"vertical\\\"]},ticklen:{valType:\\\"number\\\",min:0},tickcolor:{valType:\\\"color\\\"},ticksuffix:{valType:\\\"string\\\"},endpadding:{valType:\\\"number\\\",description:o},visible:{valType:\\\"boolean\\\"}})}e.exports=a({radialaxis:l(0,{range:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\"},{valType:\\\"number\\\"}]},domain:s,orientation:{valType:\\\"number\\\"}}),angularaxis:l(0,{range:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\",dflt:0},{valType:\\\"number\\\",dflt:360}]},domain:s}),layout:{direction:{valType:\\\"enumerated\\\",values:[\\\"clockwise\\\",\\\"counterclockwise\\\"]},orientation:{valType:\\\"angle\\\"}}},\\\"plot\\\",\\\"nested\\\")},{\\\"../../../lib/extend\\\":685,\\\"../../../plot_api/edit_types\\\":728,\\\"../../cartesian/layout_attributes\\\":758}],817:[function(t,e,r){\\\"use strict\\\";(e.exports=t(\\\"./micropolar\\\")).manager=t(\\\"./micropolar_manager\\\")},{\\\"./micropolar\\\":818,\\\"./micropolar_manager\\\":819}],818:[function(t,e,r){var n=t(\\\"d3\\\"),i=t(\\\"../../../lib\\\").extendDeepAll,a=t(\\\"../../../constants/alignment\\\").MID_SHIFT,o=e.exports={version:\\\"0.2.2\\\"};o.Axis=function(){var t,e,r,s,l={data:[],layout:{}},c={},u={},f=n.dispatch(\\\"hover\\\"),h={};return h.render=function(c){return function(c){e=c||e;var f=l.data,h=l.layout;(\\\"string\\\"==typeof e||e.nodeName)&&(e=n.select(e)),e.datum(f).each(function(e,l){var c=e.slice();u={data:o.util.cloneJson(c),layout:o.util.cloneJson(h)};var f=0;c.forEach(function(t,e){t.color||(t.color=h.defaultColorRange[f],f=(f+1)%h.defaultColorRange.length),t.strokeColor||(t.strokeColor=\\\"LinePlot\\\"===t.geometry?t.color:n.rgb(t.color).darker().toString()),u.data[e].color=t.color,u.data[e].strokeColor=t.strokeColor,u.data[e].strokeDash=t.strokeDash,u.data[e].strokeSize=t.strokeSize});var p=c.filter(function(t,e){var r=t.visible;return\\\"undefined\\\"==typeof r||!0===r}),d=!1,g=p.map(function(t,e){return d=d||\\\"undefined\\\"!=typeof t.groupId,t});if(d){var v=n.nest().key(function(t,e){return\\\"undefined\\\"!=typeof t.groupId?t.groupId:\\\"unstacked\\\"}).entries(g),m=[],y=v.map(function(t,e){if(\\\"unstacked\\\"===t.key)return t.values;var r=t.values[0].r.map(function(t,e){return 0});return t.values.forEach(function(t,e,n){t.yStack=[r],m.push(r),r=o.util.sumArrays(t.r,r)}),t.values});p=n.merge(y)}p.forEach(function(t,e){t.t=Array.isArray(t.t[0])?t.t:[t.t],t.r=Array.isArray(t.r[0])?t.r:[t.r]});var x=Math.min(h.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2;x=Math.max(10,x);var b,_=[h.margin.left+x,h.margin.top+x];b=d?[0,n.max(o.util.sumArrays(o.util.arrayLast(p).r[0],o.util.arrayLast(m)))]:n.extent(o.util.flattenArray(p.map(function(t,e){return t.r}))),h.radialAxis.domain!=o.DATAEXTENT&&(b[0]=0),r=n.scale.linear().domain(h.radialAxis.domain!=o.DATAEXTENT&&h.radialAxis.domain?h.radialAxis.domain:b).range([0,x]),u.layout.radialAxis.domain=r.domain();var w,k=o.util.flattenArray(p.map(function(t,e){return t.t})),M=\\\"string\\\"==typeof k[0];M&&(k=o.util.deduplicate(k),w=k.slice(),k=n.range(k.length),p=p.map(function(t,e){var r=t;return t.t=[k],d&&(r.yStack=t.yStack),r}));var A=p.filter(function(t,e){return\\\"LinePlot\\\"===t.geometry||\\\"DotPlot\\\"===t.geometry}).length===p.length,T=null===h.needsEndSpacing?M||!A:h.needsEndSpacing,S=h.angularAxis.domain&&h.angularAxis.domain!=o.DATAEXTENT&&!M&&h.angularAxis.domain[0]>=0?h.angularAxis.domain:n.extent(k),C=Math.abs(k[1]-k[0]);A&&!M&&(C=0);var E=S.slice();T&&M&&(E[1]+=C);var L=h.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),h.angularAxis.ticksStep&&(L=(E[1]-E[0])/L);var z=h.angularAxis.ticksStep||(E[1]-E[0])/(L*(h.minorTicks+1));w&&(z=Math.max(Math.round(z),1)),E[2]||(E[2]=z);var O=n.range.apply(this,E);if(O=O.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(E.slice(0,2)).range(\\\"clockwise\\\"===h.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=T?C:0,\\\"undefined\\\"==typeof(t=n.select(this).select(\\\"svg.chart-root\\\"))||t.empty()){var I=(new DOMParser).parseFromString(\\\"<svg xmlns='http://www.w3.org/2000/svg' class='chart-root'>' + '<g class='outer-group'>' + '<g class='chart-group'>' + '<circle class='background-circle'></circle>' + '<g class='geometry-group'></g>' + '<g class='radial axis-group'>' + '<circle class='outside-circle'></circle>' + '</g>' + '<g class='angular axis-group'></g>' + '<g class='guides-group'><line></line><circle r='0'></circle></g>' + '</g>' + '<g class='legend-group'></g>' + '<g class='tooltips-group'></g>' + '<g class='title-group'><text></text></g>' + '</g>' + '</svg>\\\",\\\"application/xml\\\"),P=this.appendChild(this.ownerDocument.importNode(I.documentElement,!0));t=n.select(P)}t.select(\\\".guides-group\\\").style({\\\"pointer-events\\\":\\\"none\\\"}),t.select(\\\".angular.axis-group\\\").style({\\\"pointer-events\\\":\\\"none\\\"}),t.select(\\\".radial.axis-group\\\").style({\\\"pointer-events\\\":\\\"none\\\"});var D,R=t.select(\\\".chart-group\\\"),B={fill:\\\"none\\\",stroke:h.tickColor},F={\\\"font-size\\\":h.font.size,\\\"font-family\\\":h.font.family,fill:h.font.color,\\\"text-shadow\\\":[\\\"-1px 0px\\\",\\\"1px -1px\\\",\\\"-1px 1px\\\",\\\"1px 1px\\\"].map(function(t,e){return\\\" \\\"+t+\\\" 0 \\\"+h.font.outlineColor}).join(\\\",\\\")};if(h.showLegend){D=t.select(\\\".legend-group\\\").attr({transform:\\\"translate(\\\"+[x,h.margin.top]+\\\")\\\"}).style({display:\\\"block\\\"});var N=p.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol=\\\"DotPlot\\\"===t.geometry?t.dotType||\\\"circle\\\":\\\"LinePlot\\\"!=t.geometry?\\\"square\\\":\\\"line\\\",r.visibleInLegend=\\\"undefined\\\"==typeof t.visibleInLegend||t.visibleInLegend,r.color=\\\"LinePlot\\\"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:p.map(function(t,e){return t.name||\\\"Element\\\"+e}),legendConfig:i({},o.Legend.defaultConfig().legendConfig,{container:D,elements:N,reverseOrder:h.legend.reverseOrder})})();var j=D.node().getBBox();x=Math.min(h.width-j.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,x=Math.max(10,x),_=[h.margin.left+x,h.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),D.attr(\\\"transform\\\",\\\"translate(\\\"+[_[0]+x,_[1]-x]+\\\")\\\")}else D=t.select(\\\".legend-group\\\").style({display:\\\"none\\\"});t.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),R.attr(\\\"transform\\\",\\\"translate(\\\"+_+\\\")\\\").style({cursor:\\\"crosshair\\\"});var V=[(h.width-(h.margin.left+h.margin.right+2*x+(j?j.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*x))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),t.select(\\\".outer-group\\\").attr(\\\"transform\\\",\\\"translate(\\\"+V+\\\")\\\"),h.title){var U=t.select(\\\"g.title-group text\\\").style(F).text(h.title),q=U.node().getBBox();U.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(\\\".radial.axis-group\\\");if(h.radialAxis.gridLinesVisible){var G=H.selectAll(\\\"circle.grid-circle\\\").data(r.ticks(5));G.enter().append(\\\"circle\\\").attr({class:\\\"grid-circle\\\"}).style(B),G.attr(\\\"r\\\",r),G.exit().remove()}H.select(\\\"circle.outside-circle\\\").attr({r:x}).style(B);var W=t.select(\\\"circle.background-circle\\\").attr({r:x}).style({fill:h.backgroundColor,stroke:h.stroke});function Y(t,e){return s(t)%360+h.orientation}if(h.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:\\\"rotate(\\\"+h.radialAxis.orientation+\\\")\\\"}),H.selectAll(\\\".domain\\\").style(B),H.selectAll(\\\"g>text\\\").text(function(t,e){return this.textContent+h.radialAxis.ticksSuffix}).style(F).style({\\\"text-anchor\\\":\\\"start\\\"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return\\\"horizontal\\\"===h.radialAxis.tickOrientation?\\\"rotate(\\\"+-h.radialAxis.orientation+\\\") translate(\\\"+[0,F[\\\"font-size\\\"]]+\\\")\\\":\\\"translate(\\\"+[0,F[\\\"font-size\\\"]]+\\\")\\\"}}),H.selectAll(\\\"g>line\\\").style({stroke:\\\"black\\\"})}var Z=t.select(\\\".angular.axis-group\\\").selectAll(\\\"g.angular-tick\\\").data(O),$=Z.enter().append(\\\"g\\\").classed(\\\"angular-tick\\\",!0);Z.attr({transform:function(t,e){return\\\"rotate(\\\"+Y(t)+\\\")\\\"}}).style({display:h.angularAxis.visible?\\\"block\\\":\\\"none\\\"}),Z.exit().remove(),$.append(\\\"line\\\").classed(\\\"grid-line\\\",!0).classed(\\\"major\\\",function(t,e){return e%(h.minorTicks+1)==0}).classed(\\\"minor\\\",function(t,e){return!(e%(h.minorTicks+1)==0)}).style(B),$.selectAll(\\\".minor\\\").style({stroke:h.minorTickColor}),Z.select(\\\"line.grid-line\\\").attr({x1:h.tickLength?x-h.tickLength:0,x2:x}).style({display:h.angularAxis.gridLinesVisible?\\\"block\\\":\\\"none\\\"}),$.append(\\\"text\\\").classed(\\\"axis-text\\\",!0).style(F);var J=Z.select(\\\"text.axis-text\\\").attr({x:x+h.labelOffset,dy:a+\\\"em\\\",transform:function(t,e){var r=Y(t),n=x+h.labelOffset,i=h.angularAxis.tickOrientation;return\\\"horizontal\\\"==i?\\\"rotate(\\\"+-r+\\\" \\\"+n+\\\" 0)\\\":\\\"radial\\\"==i?r<270&&r>90?\\\"rotate(180 \\\"+n+\\\" 0)\\\":null:\\\"rotate(\\\"+(r<=180&&r>0?-90:90)+\\\" \\\"+n+\\\" 0)\\\"}}).style({\\\"text-anchor\\\":\\\"middle\\\",display:h.angularAxis.labelsVisible?\\\"block\\\":\\\"none\\\"}).text(function(t,e){return e%(h.minorTicks+1)!=0?\\\"\\\":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix}).style(F);h.angularAxis.rewriteTicks&&J.text(function(t,e){return e%(h.minorTicks+1)!=0?\\\"\\\":h.angularAxis.rewriteTicks(this.textContent,e)});var K=n.max(R.selectAll(\\\".angular-tick text\\\")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));D.attr({transform:\\\"translate(\\\"+[x+K,h.margin.top]+\\\")\\\"});var Q=t.select(\\\"g.geometry-group\\\").selectAll(\\\"g\\\").size()>0,tt=t.select(\\\"g.geometry-group\\\").selectAll(\\\"g.geometry\\\").data(p);if(tt.enter().append(\\\"g\\\").attr({class:function(t,e){return\\\"geometry geometry\\\"+e}}),tt.exit().remove(),p[0]||Q){var et=[];p.forEach(function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter(function(t,r){return r==e}),n.geometry=t.geometry,n.orientation=h.orientation,n.direction=h.direction,n.index=e,et.push({data:t,geometryConfig:n})});var rt=n.nest().key(function(t,e){return\\\"undefined\\\"!=typeof t.data.groupId||\\\"unstacked\\\"}).entries(et),nt=[];rt.forEach(function(t,e){\\\"unstacked\\\"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return i(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=t.select(\\\".guides-group\\\"),st=t.select(\\\".tooltips-group\\\"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!M){var ft=ot.select(\\\"line\\\").attr({x1:0,y1:0,y2:0}).style({stroke:\\\"grey\\\",\\\"pointer-events\\\":\\\"none\\\"});R.on(\\\"mousemove.angular-guide\\\",function(t,e){var r=o.util.getMousePos(W).angle;ft.attr({x2:-x,transform:\\\"rotate(\\\"+r+\\\")\\\"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on(\\\"mouseout.angular-guide\\\",function(t,e){ot.select(\\\"line\\\").style({opacity:0})})}var ht=ot.select(\\\"circle\\\").style({stroke:\\\"grey\\\",fill:\\\"none\\\"});R.on(\\\"mousemove.radial-guide\\\",function(t,e){var n=o.util.getMousePos(W).radius;ht.attr({r:n}).style({opacity:.5}),at=r.invert(o.util.getMousePos(W).radius);var i=o.util.convertToCartesian(n,h.radialAxis.orientation);ct.text(o.util.round(at)).move([i[0]+_[0],i[1]+_[1]])}).on(\\\"mouseout.radial-guide\\\",function(t,e){ht.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()}),t.selectAll(\\\".geometry-group .mark\\\").on(\\\"mouseover.tooltip\\\",function(e,r){var i=n.select(this),a=this.style.fill,s=\\\"black\\\",l=this.style.opacity||1;if(i.attr({\\\"data-opacity\\\":l}),a&&\\\"none\\\"!==a){i.attr({\\\"data-fill\\\":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};M&&(c.t=w[e[0]]);var u=\\\"t: \\\"+c.t+\\\", r: \\\"+c.r,f=this.getBoundingClientRect(),h=t.node().getBoundingClientRect(),p=[f.left+f.width/2-V[0]-h.left,f.top+f.height/2-V[1]-h.top];ut.config({color:s}).text(u),ut.move(p)}else a=this.style.stroke||\\\"black\\\",i.attr({\\\"data-stroke\\\":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on(\\\"mousemove.tooltip\\\",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr(\\\"data-fill\\\")&&ut.show()}).on(\\\"mouseout.tooltip\\\",function(t,e){ut.hide();var r=n.select(this),i=r.attr(\\\"data-fill\\\");i?r.style({fill:i,opacity:r.attr(\\\"data-opacity\\\")}):r.style({stroke:r.attr(\\\"data-stroke\\\"),opacity:r.attr(\\\"data-opacity\\\")})})})}(c),this},h.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),i(l.data[e],o.Axis.defaultConfig().data[0]),i(l.data[e],t)}),i(l.layout,o.Axis.defaultConfig().layout),i(l.layout,e.layout),this},h.getLiveConfig=function(){return u},h.getinputConfig=function(){return c},h.radialScale=function(t){return r},h.angularScale=function(t){return s},h.svg=function(){return t},n.rebind(h,f,\\\"on\\\"),h},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:\\\"Line1\\\",geometry:\\\"LinePlot\\\",color:null,strokeDash:\\\"solid\\\",strokeColor:null,strokeSize:\\\"1\\\",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:\\\"gray\\\",outlineColor:\\\"white\\\",family:\\\"Tahoma, sans-serif\\\"},direction:\\\"clockwise\\\",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:\\\"\\\",visible:!0,gridLinesVisible:!0,tickOrientation:\\\"horizontal\\\",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:\\\"\\\",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:\\\"horizontal\\\",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:\\\"silver\\\",minorTickColor:\\\"#eee\\\",backgroundColor:\\\"none\\\",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT=\\\"dataExtent\\\",o.AREA=\\\"AreaChart\\\",o.LINE=\\\"LinePlot\\\",o.DOT=\\\"DotPlot\\\",o.BAR=\\\"BarChart\\\",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if(\\\"undefined\\\"==typeof t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){\\\"string\\\"==typeof e&&(e=e.split(\\\".\\\"));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i<a;i++)(e=t[i])in r?(r[e]++,n[e]=r[e]):r[e]=1;return n},o.util.duplicates=function(t){return Object.keys(o.util.duplicatesCount(t))},o.util.translator=function(t,e,r,n){if(n){var i=r.slice();r=e,e=i}var a=e.reduce(function(t,e){if(\\\"undefined\\\"!=typeof t)return t[e]},t);\\\"undefined\\\"!=typeof a&&(e.reduce(function(t,r,n){if(\\\"undefined\\\"!=typeof t)return n===e.length-1&&delete t[r],t[r]},t),r.reduce(function(t,e,n){return\\\"undefined\\\"==typeof t[e]&&(t[e]={}),n===r.length-1&&(t[e]=a),t[e]},t))},o.PolyChart=function(){var t=[o.PolyChart.defaultConfig()],e=n.dispatch(\\\"hover\\\"),r={solid:\\\"none\\\",dash:[5,2],dot:[2,5]};function a(){var e=t[0].geometryConfig,i=e.container;\\\"string\\\"==typeof i&&(i=n.select(i)),i.datum(t).each(function(t,i){var a=!!t[0].data.yStack,o=t.map(function(t,e){return a?n.zip(t.data.t[0],t.data.r[0],t.data.yStack[0]):n.zip(t.data.t[0],t.data.r[0])}),s=e.angularScale,l=e.radialScale.domain()[0],c={bar:function(r,i,a){var o=t[a].data,l=e.radialScale(r[1])-e.radialScale(0),c=e.radialScale(r[2]||0),u=o.barWidth;n.select(this).attr({class:\\\"mark bar\\\",d:\\\"M\\\"+[[l+c,-u/2],[l+c,u/2],[c,u/2],[c,-u/2]].join(\\\"L\\\")+\\\"Z\\\",transform:function(t,r){return\\\"rotate(\\\"+(e.orientation+s(t[0]))+\\\")\\\"}})}};c.dot=function(r,i,a){var o=r[2]?[r[0],r[1]+r[2]]:r,s=n.svg.symbol().size(t[a].data.dotSize).type(t[a].data.dotType)(r,i);n.select(this).attr({class:\\\"mark dot\\\",d:s,transform:function(t,r){var n,i,a,s=(n=function(t,r){var n=e.radialScale(t[1]),i=(e.angularScale(t[0])+e.orientation)*Math.PI/180;return{r:n,t:i}}(o),i=n.r*Math.cos(n.t),a=n.r*Math.sin(n.t),{x:i,y:a});return\\\"translate(\\\"+[s.x,s.y]+\\\")\\\"}})};var u=n.svg.line.radial().interpolate(t[0].data.lineInterpolation).radius(function(t){return e.radialScale(t[1])}).angle(function(t){return e.angularScale(t[0])*Math.PI/180});c.line=function(r,i,a){var s=r[2]?o[a].map(function(t,e){return[t[0],t[1]+t[2]]}):o[a];if(n.select(this).each(c.dot).style({opacity:function(e,r){return+t[a].data.dotVisible},fill:d.stroke(r,i,a)}).attr({class:\\\"mark dot\\\"}),!(i>0)){var l=n.select(this.parentNode).selectAll(\\\"path.line\\\").data([0]);l.enter().insert(\\\"path\\\"),l.attr({class:\\\"line\\\",d:u(s),transform:function(t,r){return\\\"rotate(\\\"+(e.orientation+90)+\\\")\\\"},\\\"pointer-events\\\":\\\"none\\\"}).style({fill:function(t,e){return d.fill(r,i,a)},\\\"fill-opacity\\\":0,stroke:function(t,e){return d.stroke(r,i,a)},\\\"stroke-width\\\":function(t,e){return d[\\\"stroke-width\\\"](r,i,a)},\\\"stroke-dasharray\\\":function(t,e){return d[\\\"stroke-dasharray\\\"](r,i,a)},opacity:function(t,e){return d.opacity(r,i,a)},display:function(t,e){return d.display(r,i,a)}})}};var f=e.angularScale.range(),h=Math.abs(f[1]-f[0])/o[0].length*Math.PI/180,p=n.svg.arc().startAngle(function(t){return-h/2}).endAngle(function(t){return h/2}).innerRadius(function(t){return e.radialScale(l+(t[2]||0))}).outerRadius(function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])});c.arc=function(t,r,i){n.select(this).attr({class:\\\"mark arc\\\",d:p,transform:function(t,r){return\\\"rotate(\\\"+(e.orientation+s(t[0])+90)+\\\")\\\"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},\\\"stroke-width\\\":function(e,r,n){return t[n].data.strokeSize+\\\"px\\\"},\\\"stroke-dasharray\\\":function(e,n,i){return r[t[i].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return\\\"undefined\\\"==typeof t[n].data.visible||t[n].data.visible?\\\"block\\\":\\\"none\\\"}},g=n.select(this).selectAll(\\\"g.layer\\\").data(o);g.enter().append(\\\"g\\\").attr({class:\\\"layer\\\"});var v=g.selectAll(\\\"path.mark\\\").data(function(t,e){return t});v.enter().append(\\\"path\\\").attr({class:\\\"mark\\\"}),v.style(d).each(c[e.geometryType]),v.exit().remove(),g.exit().remove()})}return a.config=function(e){return arguments.length?(e.forEach(function(e,r){t[r]||(t[r]={}),i(t[r],o.PolyChart.defaultConfig()),i(t[r],e)}),this):t},a.getColorScale=function(){},n.rebind(a,e,\\\"on\\\"),a},o.PolyChart.defaultConfig=function(){return{data:{name:\\\"geom1\\\",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:\\\"circle\\\",dotSize:64,dotVisible:!1,barWidth:20,color:\\\"#ffa500\\\",strokeSize:1,strokeColor:\\\"silver\\\",strokeDash:\\\"solid\\\",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:\\\"LinePlot\\\",geometryType:\\\"arc\\\",direction:\\\"clockwise\\\",orientation:0,container:\\\"body\\\",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:\\\"bar\\\"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:\\\"arc\\\"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:\\\"dot\\\",dotType:\\\"circle\\\"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:\\\"line\\\"}}},o.Legend=function(){var t=o.Legend.defaultConfig(),e=n.dispatch(\\\"hover\\\");function r(){var e=t.legendConfig,a=t.data.map(function(t,r){return[].concat(t).map(function(t,n){var a=i({},e.elements[r]);return a.name=t,a.color=[].concat(e.elements[r].color)[n],a})}),o=n.merge(a);o=o.filter(function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||\\\"undefined\\\"==typeof e.elements[r].visibleInLegend)}),e.reverseOrder&&(o=o.reverse());var s=e.container;(\\\"string\\\"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),c=e.fontSize,u=null==e.isContinuous?\\\"number\\\"==typeof o[0]:e.isContinuous,f=u?e.height:c*o.length,h=s.classed(\\\"legend-group\\\",!0).selectAll(\\\"svg\\\").data([0]),p=h.enter().append(\\\"svg\\\").attr({width:300,height:f+c,xmlns:\\\"http://www.w3.org/2000/svg\\\",\\\"xmlns:xlink\\\":\\\"http://www.w3.org/1999/xlink\\\",version:\\\"1.1\\\"});p.append(\\\"g\\\").classed(\\\"legend-axis\\\",!0),p.append(\\\"g\\\").classed(\\\"legend-marks\\\",!0);var d=n.range(o.length),g=n.scale[u?\\\"linear\\\":\\\"ordinal\\\"]().domain(d).range(l),v=n.scale[u?\\\"linear\\\":\\\"ordinal\\\"]().domain(d)[u?\\\"range\\\":\\\"rangePoints\\\"]([0,f]);if(u){var m=h.select(\\\".legend-marks\\\").append(\\\"defs\\\").append(\\\"linearGradient\\\").attr({id:\\\"grad1\\\",x1:\\\"0%\\\",y1:\\\"0%\\\",x2:\\\"0%\\\",y2:\\\"100%\\\"}).selectAll(\\\"stop\\\").data(l);m.enter().append(\\\"stop\\\"),m.attr({offset:function(t,e){return e/(l.length-1)*100+\\\"%\\\"}}).style({\\\"stop-color\\\":function(t,e){return t}}),h.append(\\\"rect\\\").classed(\\\"legend-mark\\\",!0).attr({height:e.height,width:e.colorBandWidth,fill:\\\"url(#grad1)\\\"})}else{var y=h.select(\\\".legend-marks\\\").selectAll(\\\"path.legend-mark\\\").data(o);y.enter().append(\\\"path\\\").classed(\\\"legend-mark\\\",!0),y.attr({transform:function(t,e){return\\\"translate(\\\"+[c/2,v(e)+c/2]+\\\")\\\"},d:function(t,e){var r,i,a,o=t.symbol;return a=3*(i=c),\\\"line\\\"===(r=o)?\\\"M\\\"+[[-i/2,-i/12],[i/2,-i/12],[i/2,i/12],[-i/2,i/12]]+\\\"Z\\\":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(a)():n.svg.symbol().type(\\\"square\\\").size(a)()},fill:function(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(v).orient(\\\"right\\\"),b=h.select(\\\"g.legend-axis\\\").attr({transform:\\\"translate(\\\"+[u?e.colorBandWidth:c,c/2]+\\\")\\\"}).call(x);return b.selectAll(\\\".domain\\\").style({fill:\\\"none\\\",stroke:\\\"none\\\"}),b.selectAll(\\\"line\\\").style({fill:\\\"none\\\",stroke:u?e.textColor:\\\"none\\\"}),b.selectAll(\\\"text\\\").style({fill:e.textColor,\\\"font-size\\\":e.fontSize}).text(function(t,e){return o[e].name}),r}return r.config=function(e){return arguments.length?(i(t,e),this):t},n.rebind(r,e,\\\"on\\\"),r},o.Legend.defaultConfig=function(t,e){return{data:[\\\"a\\\",\\\"b\\\",\\\"c\\\"],legendConfig:{elements:[{symbol:\\\"line\\\",color:\\\"red\\\"},{symbol:\\\"square\\\",color:\\\"yellow\\\"},{symbol:\\\"diamond\\\",color:\\\"limegreen\\\"}],height:150,colorBandWidth:30,fontSize:12,container:\\\"body\\\",isContinuous:null,textColor:\\\"grey\\\",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,a={container:null,hasTick:!1,fontSize:12,color:\\\"white\\\",padding:5},s=\\\"tooltip-\\\"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=a.container.selectAll(\\\"g.\\\"+s).data([0])).enter().append(\\\"g\\\").classed(s,!0).style({\\\"pointer-events\\\":\\\"none\\\",display:\\\"none\\\"});return r=n.append(\\\"path\\\").style({fill:\\\"white\\\",\\\"fill-opacity\\\":.9}).attr({d:\\\"M0 0\\\"}),e=n.append(\\\"text\\\").attr({dx:a.padding+l,dy:.3*+a.fontSize}),c};return c.text=function(i){var o=n.hsl(a.color).l,s=o>=.5?\\\"#aaa\\\":\\\"white\\\",u=o>=.5?\\\"black\\\":\\\"white\\\",f=i||\\\"\\\";e.style({fill:u,\\\"font-size\\\":a.fontSize+\\\"px\\\"}).text(f);var h=a.padding,p=e.node().getBBox(),d={fill:a.color,stroke:s,\\\"stroke-width\\\":\\\"2px\\\"},g=p.width+2*h+l,v=p.height+2*h;return r.attr({d:\\\"M\\\"+[[l,-v/2],[l,-v/4],[a.hasTick?0:l,0],[l,v/4],[l,v/2],[g,v/2],[g,-v/2]].join(\\\"L\\\")+\\\"Z\\\"}).style(d),t.attr({transform:\\\"translate(\\\"+[l,-v/2+2*h]+\\\")\\\"}),t.style({display:\\\"block\\\"}),c},c.move=function(e){if(t)return t.attr({transform:\\\"translate(\\\"+[e[0],e[1]]+\\\")\\\"}).style({display:\\\"block\\\"}),c},c.hide=function(){if(t)return t.style({display:\\\"none\\\"}),c},c.show=function(){if(t)return t.style({display:\\\"block\\\"}),c},c.config=function(t){return i(a,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=i({},t);return[[n,[\\\"marker\\\",\\\"color\\\"],[\\\"color\\\"]],[n,[\\\"marker\\\",\\\"opacity\\\"],[\\\"opacity\\\"]],[n,[\\\"marker\\\",\\\"line\\\",\\\"color\\\"],[\\\"strokeColor\\\"]],[n,[\\\"marker\\\",\\\"line\\\",\\\"dash\\\"],[\\\"strokeDash\\\"]],[n,[\\\"marker\\\",\\\"line\\\",\\\"width\\\"],[\\\"strokeSize\\\"]],[n,[\\\"marker\\\",\\\"symbol\\\"],[\\\"dotType\\\"]],[n,[\\\"marker\\\",\\\"size\\\"],[\\\"dotSize\\\"]],[n,[\\\"marker\\\",\\\"barWidth\\\"],[\\\"barWidth\\\"]],[n,[\\\"line\\\",\\\"interpolation\\\"],[\\\"lineInterpolation\\\"]],[n,[\\\"showlegend\\\"],[\\\"visibleInLegend\\\"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?(\\\"LinePlot\\\"===n.geometry?(n.type=\\\"scatter\\\",!0===n.dotVisible?(delete n.dotVisible,n.mode=\\\"lines+markers\\\"):n.mode=\\\"lines\\\"):\\\"DotPlot\\\"===n.geometry?(n.type=\\\"scatter\\\",n.mode=\\\"markers\\\"):\\\"AreaChart\\\"===n.geometry?n.type=\\\"area\\\":\\\"BarChart\\\"===n.geometry&&(n.type=\\\"bar\\\"),delete n.geometry):(\\\"scatter\\\"===n.type?\\\"lines\\\"===n.mode?n.geometry=\\\"LinePlot\\\":\\\"markers\\\"===n.mode?n.geometry=\\\"DotPlot\\\":\\\"lines+markers\\\"===n.mode&&(n.geometry=\\\"LinePlot\\\",n.dotVisible=!0):\\\"area\\\"===n.type?n.geometry=\\\"AreaChart\\\":\\\"bar\\\"===n.type&&(n.geometry=\\\"BarChart\\\"),delete n.mode,delete n.type),n}),!e&&t.layout&&\\\"stack\\\"===t.layout.barmode)){var a=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=i({},t.layout);if([[s,[\\\"plot_bgcolor\\\"],[\\\"backgroundColor\\\"]],[s,[\\\"showlegend\\\"],[\\\"showLegend\\\"]],[s,[\\\"radialaxis\\\"],[\\\"radialAxis\\\"]],[s,[\\\"angularaxis\\\"],[\\\"angularAxis\\\"]],[s.angularaxis,[\\\"showline\\\"],[\\\"gridLinesVisible\\\"]],[s.angularaxis,[\\\"showticklabels\\\"],[\\\"labelsVisible\\\"]],[s.angularaxis,[\\\"nticks\\\"],[\\\"ticksCount\\\"]],[s.angularaxis,[\\\"tickorientation\\\"],[\\\"tickOrientation\\\"]],[s.angularaxis,[\\\"ticksuffix\\\"],[\\\"ticksSuffix\\\"]],[s.angularaxis,[\\\"range\\\"],[\\\"domain\\\"]],[s.angularaxis,[\\\"endpadding\\\"],[\\\"endPadding\\\"]],[s.radialaxis,[\\\"showline\\\"],[\\\"gridLinesVisible\\\"]],[s.radialaxis,[\\\"tickorientation\\\"],[\\\"tickOrientation\\\"]],[s.radialaxis,[\\\"ticksuffix\\\"],[\\\"ticksSuffix\\\"]],[s.radialaxis,[\\\"range\\\"],[\\\"domain\\\"]],[s.angularAxis,[\\\"showline\\\"],[\\\"gridLinesVisible\\\"]],[s.angularAxis,[\\\"showticklabels\\\"],[\\\"labelsVisible\\\"]],[s.angularAxis,[\\\"nticks\\\"],[\\\"ticksCount\\\"]],[s.angularAxis,[\\\"tickorientation\\\"],[\\\"tickOrientation\\\"]],[s.angularAxis,[\\\"ticksuffix\\\"],[\\\"ticksSuffix\\\"]],[s.angularAxis,[\\\"range\\\"],[\\\"domain\\\"]],[s.angularAxis,[\\\"endpadding\\\"],[\\\"endPadding\\\"]],[s.radialAxis,[\\\"showline\\\"],[\\\"gridLinesVisible\\\"]],[s.radialAxis,[\\\"tickorientation\\\"],[\\\"tickOrientation\\\"]],[s.radialAxis,[\\\"ticksuffix\\\"],[\\\"ticksSuffix\\\"]],[s.radialAxis,[\\\"range\\\"],[\\\"domain\\\"]],[s.font,[\\\"outlinecolor\\\"],[\\\"outlineColor\\\"]],[s.legend,[\\\"traceorder\\\"],[\\\"reverseOrder\\\"]],[s,[\\\"labeloffset\\\"],[\\\"labelOffset\\\"]],[s,[\\\"defaultcolorrange\\\"],[\\\"defaultColorRange\\\"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?(\\\"undefined\\\"!=typeof s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&\\\"undefined\\\"!=typeof s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&\\\"undefined\\\"!=typeof s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&\\\"boolean\\\"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder=\\\"normal\\\"!=s.legend.reverseOrder),s.legend&&\\\"boolean\\\"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?\\\"reversed\\\":\\\"normal\\\",delete s.legend.reverseOrder),s.margin&&\\\"undefined\\\"!=typeof s.margin.t){var l=[\\\"t\\\",\\\"r\\\",\\\"b\\\",\\\"l\\\",\\\"pad\\\"],c=[\\\"top\\\",\\\"right\\\",\\\"bottom\\\",\\\"left\\\",\\\"pad\\\"],u={};n.entries(s.margin).forEach(function(t,e){u[c[l.indexOf(t.key)]]=t.value}),s.margin=u}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return t}},{\\\"../../../constants/alignment\\\":668,\\\"../../../lib\\\":696,d3:148}],819:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../../lib\\\"),a=t(\\\"../../../components/color\\\"),o=t(\\\"./micropolar\\\"),s=t(\\\"./undo_manager\\\"),l=i.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,i,a,u,f=new s;function h(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(\\\".svg-container>*:not(.chart-root)\\\").remove(),e=e?l(e,r):r,i||(i=o.Axis()),a=o.adapter.plotly().convert(e),i.config(a).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return h.isPolar=!0,h.svg=function(){return i.svg()},h.getConfig=function(){return e},h.getLiveConfig=function(){return o.adapter.plotly().convert(i.getLiveConfig(),!0)},h.getLiveScales=function(){return{t:i.angularScale(),r:i.radialScale()}},h.setUndoPoint=function(){var t,n,i=this,a=o.util.cloneJson(e);t=a,n=r,f.add({undo:function(){n&&i(n)},redo:function(){i(t)}}),r=o.util.cloneJson(a)},h.undo=function(){f.undo()},h.redo=function(){f.redo()},h},c.fillLayout=function(t){var e=n.select(t).selectAll(\\\".plot-container\\\"),r=e.selectAll(\\\".svg-container\\\"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{\\\"../../../components/color\\\":570,\\\"../../../lib\\\":696,\\\"./micropolar\\\":818,\\\"./undo_manager\\\":820,d3:148}],820:[function(t,e,r){\\\"use strict\\\";e.exports=function(){var t,e=[],r=-1,n=!1;function i(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n?this:(e.splice(r+1,e.length-r),e.push(t),r=e.length-1,this)},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(i(n,\\\"undo\\\"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(i(n,\\\"redo\\\"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r<e.length-1},getCommands:function(){return e},getPreviousCommand:function(){return e[r-1]},getIndex:function(){return r}}}},{}],821:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../components/color\\\"),l=t(\\\"../../components/drawing\\\"),c=t(\\\"../plots\\\"),u=t(\\\"../cartesian/set_convert\\\"),f=t(\\\"./set_convert\\\"),h=t(\\\"../cartesian/autorange\\\").doAutoRange,p=t(\\\"../cartesian/axes\\\").doTicksSingle,d=t(\\\"../cartesian/dragbox\\\"),g=t(\\\"../../components/dragelement\\\"),v=t(\\\"../../components/fx\\\"),m=t(\\\"../../components/titles\\\"),y=t(\\\"../cartesian/select\\\").prepSelect,x=t(\\\"../cartesian/select\\\").selectOnClick,b=t(\\\"../cartesian/select\\\").clearSelect,_=t(\\\"../../lib/setcursor\\\"),w=t(\\\"../../lib/clear_gl_canvases\\\"),k=t(\\\"../../plot_api/subroutines\\\").redrawReglTraces,M=t(\\\"../../constants/alignment\\\").MID_SHIFT,A=t(\\\"./constants\\\"),T=t(\\\"./helpers\\\"),S=o._,C=o.mod,E=o.deg2rad,L=o.rad2deg;function z(t,e){this.id=e,this.gd=t,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var r=t._fullLayout,n=\\\"clip\\\"+r._uid+e;this.clipIds.forTraces=n+\\\"-for-traces\\\",this.clipPaths.forTraces=r._clips.append(\\\"clipPath\\\").attr(\\\"id\\\",this.clipIds.forTraces),this.clipPaths.forTraces.append(\\\"path\\\"),this.framework=r._polarlayer.append(\\\"g\\\").attr(\\\"class\\\",e),this.radialTickLayout=null,this.angularTickLayout=null}var O=z.prototype;function I(t){var e=t.ticks+String(t.ticklen)+String(t.showticklabels);return\\\"side\\\"in t&&(e+=t.side),e}function P(t,e){return e[o.findIndexOfMin(e,function(e){return o.angleDist(t,e)})]}function D(t,e,r){return e?(t.attr(\\\"display\\\",null),t.attr(r)):t&&t.attr(\\\"display\\\",\\\"none\\\"),t}function R(t,e){return\\\"translate(\\\"+t+\\\",\\\"+e+\\\")\\\"}function B(t){return\\\"rotate(\\\"+t+\\\")\\\"}function F(t){return Math.abs(t)<1e-10?0:t>0?1:-1}function N(t){return F(Math.cos(t))}function j(t){return F(Math.sin(t))}e.exports=function(t,e){return new z(t,e)},O.plot=function(t,e){var r=e[this.id];this._hasClipOnAxisFalse=!1;for(var n=0;n<t.length;n++){if(!1===t[n][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(e,r),this.updateLayout(e,r),c.generalUpdatePerTraceModule(this.gd,this,t,r),this.updateFx(e,r)},O.updateLayers=function(t,e){var r=this.layers,i=e.radialaxis,a=e.angularaxis,o=A.layerNames,s=o.indexOf(\\\"frontplot\\\"),l=o.slice(0,s),c=\\\"below traces\\\"===a.layer,u=\\\"below traces\\\"===i.layer;c&&l.push(\\\"angular-line\\\"),u&&l.push(\\\"radial-line\\\"),c&&l.push(\\\"angular-axis\\\"),u&&l.push(\\\"radial-axis\\\"),l.push(\\\"frontplot\\\"),c||l.push(\\\"angular-line\\\"),u||l.push(\\\"radial-line\\\"),c||l.push(\\\"angular-axis\\\"),u||l.push(\\\"radial-axis\\\");var f=this.framework.selectAll(\\\".polarsublayer\\\").data(l,String);f.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"polarsublayer \\\"+t}).each(function(t){var e=r[t]=n.select(this);switch(t){case\\\"frontplot\\\":e.append(\\\"g\\\").classed(\\\"barlayer\\\",!0),e.append(\\\"g\\\").classed(\\\"scatterlayer\\\",!0);break;case\\\"backplot\\\":e.append(\\\"g\\\").classed(\\\"maplayer\\\",!0);break;case\\\"plotbg\\\":r.bg=e.append(\\\"path\\\");break;case\\\"radial-grid\\\":e.style(\\\"fill\\\",\\\"none\\\"),e.append(\\\"g\\\").classed(\\\"x\\\",1);break;case\\\"angular-grid\\\":e.style(\\\"fill\\\",\\\"none\\\"),e.append(\\\"g\\\").classed(\\\"angularaxis\\\",1);break;case\\\"radial-line\\\":e.append(\\\"line\\\").style(\\\"fill\\\",\\\"none\\\");break;case\\\"angular-line\\\":e.append(\\\"path\\\").style(\\\"fill\\\",\\\"none\\\")}}),f.order()},O.updateLayout=function(t,e){var r=this.layers,n=t._size,i=e.radialaxis,a=e.angularaxis,o=e.domain.x,c=e.domain.y;this.xOffset=n.l+n.w*o[0],this.yOffset=n.t+n.h*(1-c[1]);var u=this.xLength=n.w*(o[1]-o[0]),f=this.yLength=n.h*(c[1]-c[0]),h=e.sector;this.sectorInRad=h.map(E);var p,d,g,v,m,y=this.sectorBBox=function(t){var e,r,n,i,a=t[0],o=t[1]-a,s=C(a,360),l=s+o,c=Math.cos(E(s)),u=Math.sin(E(s)),f=Math.cos(E(l)),h=Math.sin(E(l));i=s<=90&&l>=90||s>90&&l>=450?1:u<=0&&h<=0?0:Math.max(u,h);e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&f>=0?0:Math.min(c,f);r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&h>=0?0:Math.min(u,h);n=l>=360?1:c<=0&&f<=0?0:Math.max(c,f);return[e,r,n,i]}(h),x=y[2]-y[0],b=y[3]-y[1],_=f/u,w=Math.abs(b/x);_>w?(p=u,m=(f-(d=u*w))/n.h/2,g=[o[0],o[1]],v=[c[0]+m,c[1]-m]):(d=f,m=(u-(p=f/w))/n.w/2,g=[o[0]+m,o[1]-m],v=[c[0],c[1]]),this.xLength2=p,this.yLength2=d,this.xDomain2=g,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*g[0],M=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=p/x,T=this.innerRadius=e.hole*A,S=this.cx=k-A*y[0],L=this.cy=M+A*y[3],z=this.cxx=S-k,O=this.cyy=L-M;this.radialAxis=this.mockAxis(t,e,i,{_axislayer:r[\\\"radial-axis\\\"],_gridlayer:r[\\\"radial-grid\\\"],_id:\\\"x\\\",side:{counterclockwise:\\\"top\\\",clockwise:\\\"bottom\\\"}[i.side],domain:[T/n.w,A/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{_axislayer:r[\\\"angular-axis\\\"],_gridlayer:r[\\\"angular-grid\\\"],side:\\\"right\\\",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:\\\"x\\\",domain:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:\\\"y\\\",domain:v});var I=this.pathSubplot();this.clipPaths.forTraces.select(\\\"path\\\").attr(\\\"d\\\",I).attr(\\\"transform\\\",R(z,O)),r.frontplot.attr(\\\"transform\\\",R(k,M)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces),r.bg.attr(\\\"d\\\",I).attr(\\\"transform\\\",R(S,L)).call(s.fill,e.bgcolor),this.framework.selectAll(\\\".crisp\\\").classed(\\\"crisp\\\",0)},O.mockAxis=function(t,e,r,n){var i=o.extendFlat({anchor:\\\"free\\\",position:0,_pos:0,_counteraxis:!0,automargin:!1},r,n);return f(i,e,t),i},O.mockCartesianAxis=function(t,e,r){var n=this,i=r._id,a=o.extendFlat({type:\\\"linear\\\"},r);u(a,t);var s={x:[0,2],y:[1,3]};return a.setRange=function(){var t=n.sectorBBox,r=s[i],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);a.range=[t[r[0]]*l,t[r[1]]*l]},a.isPtWithinRange=\\\"x\\\"===i?function(t){return n.isPtInside(t)}:function(){return!0},a.setRange(),a.setScale(),a},O.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=e.radialaxis;n.setScale(),h(r,n);var a=n.range;i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,\\\"gregorian\\\"),n.r2l(a[1],null,\\\"gregorian\\\")]},O.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,l=r.cx,c=r.cy,u=e.radialaxis,f=C(e.sector[0],360),h=r.radialAxis,d=o<a;r.fillViewInitialKey(\\\"radialaxis.angle\\\",u.angle),r.fillViewInitialKey(\\\"radialaxis.range\\\",h.range.slice()),h.setGeometry(),\\\"auto\\\"===h.tickangle&&f>90&&f<=270&&(h.tickangle=180),h._transfn=function(t){return\\\"translate(\\\"+(h.l2p(t.x)+o)+\\\",0)\\\"},h._gridpath=function(t){return r.pathArc(h.r2p(t.x)+o)};var g=I(u);r.radialTickLayout!==g&&(i[\\\"radial-axis\\\"].selectAll(\\\".xtick\\\").remove(),r.radialTickLayout=g),d&&(h.setScale(),p(n,h,!0));var v=r.radialAxisAngle=r.vangles?L(P(E(u.angle),r.vangles)):u.angle,m=R(l,c)+B(-v);D(i[\\\"radial-axis\\\"],d&&(u.showticklabels||u.ticks),{transform:m}),D(i[\\\"radial-grid\\\"],d&&u.showgrid,{transform:R(l,c)}).selectAll(\\\"path\\\").attr(\\\"transform\\\",null),D(i[\\\"radial-line\\\"].select(\\\"line\\\"),d&&u.showline,{x1:o,y1:0,x2:a,y2:0,transform:m}).attr(\\\"stroke-width\\\",u.linewidth).call(s.stroke,u.linecolor)},O.updateRadialAxisTitle=function(t,e,r){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=e.radialaxis,c=this.id+\\\"title\\\",u=void 0!==r?r:this.radialAxisAngle,f=E(u),h=Math.cos(f),p=Math.sin(f),d=0;if(s.title){var g=l.bBox(this.layers[\\\"radial-axis\\\"].node()).height,v=s.titlefont.size;d=\\\"counterclockwise\\\"===s.side?-g-.4*v:g+.8*v}this.layers[\\\"radial-axis-title\\\"]=m.draw(n,c,{propContainer:s,propName:this.id+\\\".radialaxis.title\\\",placeholder:S(n,\\\"Click to enter radial axis title\\\"),attributes:{x:a+i/2*h+d*p,y:o-i/2*p+d*h,\\\"text-anchor\\\":\\\"middle\\\"},transform:{rotate:-u}})},O.updateAngularAxis=function(t,e){var r=this,i=r.gd,a=r.layers,l=r.radius,c=r.innerRadius,u=r.cx,f=r.cy,h=e.angularaxis,d=r.angularAxis;r.fillViewInitialKey(\\\"angularaxis.rotation\\\",h.rotation),d.setGeometry();var g=function(t){return d.t2g(t.x)};\\\"linear\\\"===d.type&&\\\"radians\\\"===d.thetaunit&&(d.tick0=L(d.tick0),d.dtick=L(d.dtick)),\\\"category\\\"===d.type&&(d._tickFilter=function(t){return o.isAngleInsideSector(g(t),r.sectorInRad)}),d._transfn=function(t){var e=n.select(this),r=e&&e.node();if(r&&e.classed(\\\"angularaxisgrid\\\"))return\\\"\\\";var i=g(t),a=R(u+l*Math.cos(i),f-l*Math.sin(i));return r&&e.classed(\\\"ticks\\\")&&(a+=B(-L(i))),a},d._gridpath=function(t){var e=g(t),r=Math.cos(e),n=Math.sin(e);return\\\"M\\\"+[u+c*r,f-c*n]+\\\"L\\\"+[u+l*r,f-l*n]};var v=\\\"outside\\\"!==h.ticks?.7:.5;d._labelx=function(t){var e=g(t),r=d._labelStandoff,n=d._pad;return(0===j(e)?0:Math.cos(e)*(r+n+v*t.fontSize))+N(e)*(t.dx+r+n)},d._labely=function(t){var e=g(t),r=d._labelStandoff,n=d._labelShift,i=d._pad;return t.dy+t.fontSize*M-n+-Math.sin(e)*(r+i+v*t.fontSize)},d._labelanchor=function(t,e){var r=g(e);return 0===j(r)?N(r)>0?\\\"start\\\":\\\"end\\\":\\\"middle\\\"};var m,y=I(h);r.angularTickLayout!==y&&(a[\\\"angular-axis\\\"].selectAll(\\\".\\\"+d._id+\\\"tick\\\").remove(),r.angularTickLayout=y),d.setScale(),p(i,d,!0),\\\"linear\\\"===e.gridshape?(m=d._vals.map(g),o.angleDelta(m[0],m[1])<0&&(m=m.slice().reverse())):m=null,r.vangles=m,D(a[\\\"angular-line\\\"].select(\\\"path\\\"),h.showline,{d:r.pathSubplot(),transform:R(u,f)}).attr(\\\"stroke-width\\\",h.linewidth).call(s.stroke,h.linecolor)},O.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},O.updateMainDrag=function(t){var e=this,r=e.gd,o=e.layers,s=t._zoomlayer,l=A.MINZOOM,c=A.OFFEDGE,u=e.radius,f=e.innerRadius,h=e.cx,p=e.cy,m=e.cxx,_=e.cyy,w=e.sectorInRad,k=e.vangles,M=e.radialAxis,S=T.clampTiny,C=T.findXYatLength,E=T.findEnclosingVertexAngles,L=A.cornerHalfWidth,z=A.cornerLen/2,O=d.makeDragger(o,\\\"path\\\",\\\"maindrag\\\",\\\"crosshair\\\");n.select(O).attr(\\\"d\\\",e.pathSubplot()).attr(\\\"transform\\\",R(h,p));var I,P,D,B,F,N,j,V,U,q={element:O,gd:r,subplot:e.id,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis},xaxes:[e.xaxis],yaxes:[e.yaxis]};function H(t,e){return Math.sqrt(t*t+e*e)}function G(t,e){return H(t-m,e-_)}function W(t,e){return Math.atan2(_-e,t-m)}function Y(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function X(t,r){if(0===t)return e.pathSector(2*L);var n=z/t,i=r-n,a=r+n,o=Math.max(0,Math.min(t,u)),s=o-L,l=o+L;return\\\"M\\\"+Y(s,i)+\\\"A\\\"+[s,s]+\\\" 0,0,0 \\\"+Y(s,a)+\\\"L\\\"+Y(l,a)+\\\"A\\\"+[l,l]+\\\" 0,0,1 \\\"+Y(l,i)+\\\"Z\\\"}function Z(t,r,n){if(0===t)return e.pathSector(2*L);var i,a,o=Y(t,r),s=Y(t,n),l=S((o[0]+s[0])/2),c=S((o[1]+s[1])/2);if(l&&c){var u=c/l,f=-1/u,h=C(L,u,l,c);i=C(z,f,h[0][0],h[0][1]),a=C(z,f,h[1][0],h[1][1])}else{var p,d;c?(p=z,d=L):(p=L,d=z),i=[[l-p,c-d],[l+p,c-d]],a=[[l-p,c+d],[l+p,c+d]]}return\\\"M\\\"+i.join(\\\"L\\\")+\\\"L\\\"+a.reverse().join(\\\"L\\\")+\\\"Z\\\"}function $(t,e){return e=Math.max(Math.min(e,u),f),t<c?t=0:u-t<c?t=u:e<c?e=0:u-e<c&&(e=u),Math.abs(e-t)>l?(t<e?(D=t,B=e):(D=e,B=t),!0):(D=null,B=null,!1)}function J(t,e){t=t||F,e=e||\\\"M0,0Z\\\",V.attr(\\\"d\\\",t),U.attr(\\\"d\\\",e),d.transitionZoombox(V,U,N,j),N=!0}function K(t,r){var n,i,a=I+t,o=P+r,s=G(I,P),l=Math.min(G(a,o),u),c=W(I,P);$(s,l)&&(n=F+e.pathSector(B),D&&(n+=e.pathSector(D)),i=X(D,c)+X(B,c)),J(n,i)}function Q(t,e,r,n){var i=T.findIntersectionXY(r,n,r,[t-m,_-e]);return H(i[0],i[1])}function tt(t,r){var n,i,a=I+t,o=P+r,s=W(I,P),l=W(a,o),c=E(s,k),f=E(l,k);$(Q(I,P,c[0],c[1]),Math.min(Q(a,o,f[0],f[1]),u))&&(n=F+e.pathSector(B),D&&(n+=e.pathSector(D)),i=[Z(D,c[0],c[1]),Z(B,c[0],c[1])].join(\\\" \\\")),J(n,i)}function et(){if(d.removeZoombox(r),null!==D&&null!==B){d.showDoubleClickNotifier(r);var t=M._rl,n=(t[1]-t[0])/(1-f/u)/u,i=[t[0]+(D-f)*n,t[0]+(B-f)*n];a.call(\\\"relayout\\\",r,e.id+\\\".radialaxis.range\\\",i)}}function rt(t,n){var i=r._fullLayout.clickmode;if(d.removeZoombox(r),2===t){var o={};for(var s in e.viewInitial)o[e.id+\\\".\\\"+s]=e.viewInitial[s];r.emit(\\\"plotly_doubleclick\\\",null),a.call(\\\"relayout\\\",r,o)}i.indexOf(\\\"select\\\")>-1&&1===t&&x(n,r,[e.xaxis],[e.yaxis],e.id,q),i.indexOf(\\\"event\\\")>-1&&v.click(r,n,e.id)}q.prepFn=function(t,n,a){var o=r._fullLayout.dragmode,l=O.getBoundingClientRect();if(I=n-l.left,P=a-l.top,k){var c=T.findPolygonOffset(u,w[0],w[1],k);I+=m+c[0],P+=_+c[1]}switch(o){case\\\"zoom\\\":q.moveFn=k?tt:K,q.clickFn=rt,q.doneFn=et,function(){D=null,B=null,F=e.pathSubplot(),N=!1;var t=r._fullLayout[e.id];j=i(t.bgcolor).getLuminance(),(V=d.makeZoombox(s,j,h,p,F)).attr(\\\"fill-rule\\\",\\\"evenodd\\\"),U=d.makeCorners(s,h,p),b(s)}();break;case\\\"select\\\":case\\\"lasso\\\":y(t,n,a,q,o)}},O.onmousemove=function(t){v.hover(r,t,e.id),r._fullLayout._lasthover=O,r._fullLayout._hoversubplot=e.id},O.onmouseout=function(t){r._dragging||g.unhover(r,t)},g.init(q)},O.updateRadialDrag=function(t,e,r){var i=this,s=i.gd,l=i.layers,c=i.radius,u=i.innerRadius,f=i.cx,h=i.cy,v=i.radialAxis,m=A.radialDragBoxSize,y=m/2;if(v.visible){var x,_,M,T=E(i.radialAxisAngle),S=v._rl,C=S[0],z=S[1],O=S[r],I=.75*(S[1]-S[0])/(1-e.hole)/c;r?(x=f+(c+y)*Math.cos(T),_=h-(c+y)*Math.sin(T),M=\\\"radialdrag\\\"):(x=f+(u-y)*Math.cos(T),_=h-(u-y)*Math.sin(T),M=\\\"radialdrag-inner\\\");var F,N,j,V=d.makeRectDragger(l,M,\\\"crosshair\\\",-y,-y,m,m),U={element:V,gd:s};D(n.select(V),v.visible&&u<c,{transform:R(x,_)}),U.prepFn=function(){F=null,N=null,j=null,U.moveFn=q,U.doneFn=H,b(t._zoomlayer)},U.clampFn=function(t,e){return Math.sqrt(t*t+e*e)<A.MINDRAG&&(t=0,e=0),[t,e]},g.init(U)}function q(t,e){if(F)F(t,e);else{var r=[t,-e],n=[Math.cos(T),Math.sin(T)],i=Math.abs(o.dot(r,n)/Math.sqrt(o.dot(r,r)));isNaN(i)||(F=i<.5?G:W)}}function H(){null!==N?a.call(\\\"relayout\\\",s,i.id+\\\".radialaxis.angle\\\",N):null!==j&&a.call(\\\"relayout\\\",s,i.id+\\\".radialaxis.range[\\\"+r+\\\"]\\\",j)}function G(t,e){if(0!==r){var n=x+t,a=_+e;N=Math.atan2(h-a,n-f),i.vangles&&(N=P(N,i.vangles)),N=L(N);var o=R(f,h)+B(-N);l[\\\"radial-axis\\\"].attr(\\\"transform\\\",o),l[\\\"radial-line\\\"].select(\\\"line\\\").attr(\\\"transform\\\",o);var s=i.gd._fullLayout,c=s[i.id];i.updateRadialAxisTitle(s,c,N)}}function W(t,e){var n=o.dot([t,-e],[Math.cos(T),Math.sin(T)]);if(j=O-I*n,I>0==(r?j>C:j<z)){v.range[r]=j,v._rl[r]=j,v.setGeometry(),v.setScale(),i.xaxis.setRange(),i.xaxis.setScale(),i.yaxis.setRange(),i.yaxis.setScale(),p(s,v,!0),l[\\\"radial-grid\\\"].attr(\\\"transform\\\",R(f,h)).selectAll(\\\"path\\\").attr(\\\"transform\\\",null);var c=!1;for(var u in i.traceHash){var d=i.traceHash[u],g=o.filterVisible(d),m=d[0][0].trace._module,y=s._fullLayout[i.id];m.plot(s,i,g,y),a.traceIs(u,\\\"gl\\\")&&g.length&&(c=!0)}c&&(w(s),k(s))}else j=null}},O.updateAngularDrag=function(t){var e=this,r=e.gd,i=e.layers,s=e.radius,c=e.angularAxis,u=e.cx,f=e.cy,h=e.cxx,v=e.cyy,m=A.angularDragBoxSize,y=d.makeDragger(i,\\\"path\\\",\\\"angulardrag\\\",\\\"move\\\"),x={element:y,gd:r};function M(t,e){return Math.atan2(v+m-e,t-h-m)}n.select(y).attr(\\\"d\\\",e.pathAnnulus(s,s+m)).attr(\\\"transform\\\",R(u,f)).call(_,\\\"move\\\");var T,S,C,E,z,O,I=i.frontplot.select(\\\".scatterlayer\\\").selectAll(\\\".trace\\\"),P=I.selectAll(\\\".point\\\"),D=I.selectAll(\\\".textpoint\\\");function F(t,s){var d=e.gd._fullLayout,g=d[e.id],m=M(T+t,S+s),y=L(m-O);if(E=C+y,i.frontplot.attr(\\\"transform\\\",R(e.xOffset2,e.yOffset2)+B([-y,h,v])),e.vangles){z=e.radialAxisAngle+y;var x=R(u,f)+B(-y),b=R(u,f)+B(-z);i.bg.attr(\\\"transform\\\",x),i[\\\"radial-grid\\\"].attr(\\\"transform\\\",x),i[\\\"angular-line\\\"].select(\\\"path\\\").attr(\\\"transform\\\",x),i[\\\"radial-axis\\\"].attr(\\\"transform\\\",b),i[\\\"radial-line\\\"].select(\\\"line\\\").attr(\\\"transform\\\",b),e.updateRadialAxisTitle(d,g,z)}else e.clipPaths.forTraces.select(\\\"path\\\").attr(\\\"transform\\\",R(h,v)+B(y));P.each(function(){var t=n.select(this),e=l.getTranslate(t);t.attr(\\\"transform\\\",R(e.x,e.y)+B([y]))}),D.each(function(){var t=n.select(this),e=t.select(\\\"text\\\"),r=l.getTranslate(t);t.attr(\\\"transform\\\",B([y,e.attr(\\\"x\\\"),e.attr(\\\"y\\\")])+R(r.x,r.y))}),c.rotation=o.modHalf(E,360),c.setGeometry(),c.setScale(),p(r,c,!0),e._hasClipOnAxisFalse&&!o.isFullCircle(e.sectorInRad)&&I.call(l.hideOutsideRangePoints,e);var _=!1;for(var A in e.traceHash)if(a.traceIs(A,\\\"gl\\\")){var F=e.traceHash[A],N=o.filterVisible(F);F[0][0].trace._module.plot(r,e,N,g),N.length&&(_=!0)}_&&(w(r),k(r))}function N(){D.select(\\\"text\\\").attr(\\\"transform\\\",null);var t={};t[e.id+\\\".angularaxis.rotation\\\"]=E,e.vangles&&(t[e.id+\\\".radialaxis.angle\\\"]=z),a.call(\\\"relayout\\\",r,t)}x.prepFn=function(r,n,i){var a=t[e.id];C=a.angularaxis.rotation;var o=y.getBoundingClientRect();T=n-o.left,S=i-o.top,O=M(T,S),x.moveFn=F,x.doneFn=N,b(t._zoomlayer)},e.vangles&&!o.isFullCircle(e.sectorInRad)&&(x.prepFn=o.noop,_(n.select(y),null)),g.init(x)},O.isPtInside=function(t){var e=this.sectorInRad,r=this.vangles,n=this.angularAxis.c2g(t.theta),i=this.radialAxis,a=i.c2l(t.r),s=i._rl;return(r?T.isPtInsidePolygon:o.isPtInsideSector)(a,n,s,e,r)},O.pathArc=function(t){var e=this.sectorInRad,r=this.vangles;return(r?T.pathPolygon:o.pathArc)(t,e[0],e[1],r)},O.pathSector=function(t){var e=this.sectorInRad,r=this.vangles;return(r?T.pathPolygon:o.pathSector)(t,e[0],e[1],r)},O.pathAnnulus=function(t,e){var r=this.sectorInRad,n=this.vangles;return(n?T.pathPolygonAnnulus:o.pathAnnulus)(t,e,r[0],r[1],n)},O.pathSubplot=function(){var t=this.innerRadius,e=this.radius;return t?this.pathAnnulus(t,e):this.pathSector(e)},O.fillViewInitialKey=function(t,e){t in this.viewInitial||(this.viewInitial[t]=e)}},{\\\"../../components/color\\\":570,\\\"../../components/dragelement\\\":592,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../components/titles\\\":661,\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/clear_gl_canvases\\\":679,\\\"../../lib/setcursor\\\":717,\\\"../../plot_api/subroutines\\\":736,\\\"../../registry\\\":828,\\\"../cartesian/autorange\\\":744,\\\"../cartesian/axes\\\":745,\\\"../cartesian/dragbox\\\":754,\\\"../cartesian/select\\\":763,\\\"../cartesian/set_convert\\\":764,\\\"../plots\\\":809,\\\"./constants\\\":810,\\\"./helpers\\\":811,\\\"./set_convert\\\":822,d3:148,tinycolor2:514}],822:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../cartesian/set_convert\\\"),a=n.deg2rad,o=n.rad2deg;e.exports=function(t,e,r){switch(i(t,r),t._id){case\\\"x\\\":case\\\"radialaxis\\\":!function(t,e){var r=e._subplot;t.setGeometry=function(){var e=t._rl[0],n=t._rl[1],i=r.innerRadius,a=(r.radius-i)/(n-e),o=i/a,s=e>n?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case\\\"angularaxis\\\":!function(t,e){var r=t.type;if(\\\"linear\\\"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return\\\"degrees\\\"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return\\\"degrees\\\"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,c=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&&\\\"linear\\\"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o<l;o++)a[o]=c(s[o])}else{var u=i+\\\"0\\\",f=\\\"d\\\"+i,h=u in e?c(e[u]):0,p=e[f]?c(e[f]):(t.period||2*Math.PI)/l;for(a=new Array(l),o=0;o<l;o++)a[o]=h+o*p}return a},t.setGeometry=function(){var i,s,l,c,u=e.sector,f=u.map(a),h={clockwise:-1,counterclockwise:1}[t.direction],p=a(t.rotation),d=function(t){return h*t+p},g=function(t){return(t-p)/h};switch(r){case\\\"linear\\\":s=i=n.identity,c=a,l=o,t.range=n.isFullCircle(f)?[u[0],u[0]+360]:f.map(g).map(o);break;case\\\"category\\\":var v=t._categories.length,m=t.period?Math.max(t.period,v):v;s=c=function(t){return 2*t*Math.PI/m},i=l=function(t){return t*m/Math.PI/2},t.range=[0,m]}t.c2g=function(t){return d(s(t))},t.g2c=function(t){return i(g(t))},t.t2g=function(t){return d(c(t))},t.g2t=function(t){return l(g(t))}}}(t,e)}}},{\\\"../../lib\\\":696,\\\"../cartesian/set_convert\\\":764}],823:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plot_api/plot_template\\\"),a=t(\\\"./domain\\\").defaults;e.exports=function(t,e,r,o){var s,l,c=o.type,u=o.attributes,f=o.handleDefaults,h=o.partition||\\\"x\\\",p=e._subplots[c],d=p.length,g=d&&p[0].replace(/\\\\d+$/,\\\"\\\");function v(t,e){return n.coerce(s,l,u,t,e)}for(var m=0;m<d;m++){var y=p[m];s=t[y]?t[y]:t[y]={},l=i.newContainer(e,y,g);var x={};x[h]=[m/d,(m+1)/d],a(l,e,v,x),o.id=y,f(s,l,v,o)}}},{\\\"../lib\\\":696,\\\"../plot_api/plot_template\\\":735,\\\"./domain\\\":771}],824:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./ternary\\\"),i=t(\\\"../../plots/get_data\\\").getSubplotCalcData,a=t(\\\"../../lib\\\").counterRegex;r.name=\\\"ternary\\\";var o=r.attr=\\\"subplot\\\";r.idRoot=\\\"ternary\\\",r.idRegex=r.attrRegex=a(\\\"ternary\\\"),(r.attributes={})[o]={valType:\\\"subplotid\\\",dflt:\\\"ternary\\\",editType:\\\"calc\\\"},r.layoutAttributes=t(\\\"./layout_attributes\\\"),r.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),r.plot=function(t){for(var e=t._fullLayout,r=t.calcdata,a=e._subplots.ternary,o=0;o<a.length;o++){var s=a[o],l=i(r,\\\"ternary\\\",s),c=e[s]._subplot;c||(c=new n({id:s,graphDiv:t,container:e._ternarylayer.node()},e),e[s]._subplot=c),c.plot(l,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.ternary||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers[\\\"a-title\\\"].remove(),s.layers[\\\"b-title\\\"].remove(),s.layers[\\\"c-title\\\"].remove())}}},{\\\"../../lib\\\":696,\\\"../../plots/get_data\\\":782,\\\"./layout_attributes\\\":825,\\\"./layout_defaults\\\":826,\\\"./ternary\\\":827}],825:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color/attributes\\\"),i=t(\\\"../domain\\\").attributes,a=t(\\\"../cartesian/layout_attributes\\\"),o=t(\\\"../../plot_api/edit_types\\\").overrideAll,s=t(\\\"../../lib/extend\\\").extendFlat,l={title:a.title,titlefont:a.titlefont,color:a.color,tickmode:a.tickmode,nticks:s({},a.nticks,{dflt:6,min:1}),tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,showticklabels:a.showticklabels,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,hoverformat:a.hoverformat,showline:s({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:s({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,layer:a.layer,min:{valType:\\\"number\\\",dflt:0,min:0}};e.exports=o({domain:i({name:\\\"ternary\\\"}),bgcolor:{valType:\\\"color\\\",dflt:n.background},sum:{valType:\\\"number\\\",dflt:1,min:0},aaxis:l,baxis:l,caxis:l},\\\"plot\\\",\\\"from-root\\\")},{\\\"../../components/color/attributes\\\":569,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../cartesian/layout_attributes\\\":758,\\\"../domain\\\":771}],826:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../plot_api/plot_template\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../subplot_defaults\\\"),s=t(\\\"../cartesian/tick_label_defaults\\\"),l=t(\\\"../cartesian/tick_mark_defaults\\\"),c=t(\\\"../cartesian/tick_value_defaults\\\"),u=t(\\\"../cartesian/line_grid_defaults\\\"),f=t(\\\"./layout_attributes\\\"),h=[\\\"aaxis\\\",\\\"baxis\\\",\\\"caxis\\\"];function p(t,e,r,a){var o,s,l,c=r(\\\"bgcolor\\\"),u=r(\\\"sum\\\");a.bgColor=n.combine(c,a.paper_bgcolor);for(var f=0;f<h.length;f++)s=t[o=h[f]]||{},(l=i.newContainer(e,o))._name=o,d(s,l,a);var p=e.aaxis,g=e.baxis,v=e.caxis;p.min+g.min+v.min>=u&&(p.min=0,g.min=0,v.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r){var n=f[e._name];function i(r,i){return a.coerce(t,e,n,r,i)}e.type=\\\"linear\\\";var o=i(\\\"color\\\"),h=o!==n.color.dflt?o:r.font.color,p=e._name.charAt(0).toUpperCase(),d=\\\"Component \\\"+p,g=i(\\\"title\\\",d);e._hovertitle=g===d?g:p,a.coerceFont(i,\\\"titlefont\\\",{family:r.font.family,size:Math.round(1.2*r.font.size),color:h}),i(\\\"min\\\"),c(t,e,i,\\\"linear\\\"),s(t,e,i,\\\"linear\\\",{}),l(t,e,i,{outerTicks:!0}),i(\\\"showticklabels\\\")&&(a.coerceFont(i,\\\"tickfont\\\",{family:r.font.family,size:r.font.size,color:h}),i(\\\"tickangle\\\"),i(\\\"tickformat\\\")),u(t,e,i,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n}),i(\\\"hoverformat\\\"),i(\\\"layer\\\")}e.exports=function(t,e,r){o(t,e,r,{type:\\\"ternary\\\",attributes:f,handleDefaults:p,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../cartesian/line_grid_defaults\\\":760,\\\"../cartesian/tick_label_defaults\\\":765,\\\"../cartesian/tick_mark_defaults\\\":766,\\\"../cartesian/tick_value_defaults\\\":767,\\\"../subplot_defaults\\\":823,\\\"./layout_attributes\\\":825}],827:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../../lib\\\"),s=o._,l=t(\\\"../../components/color\\\"),c=t(\\\"../../components/drawing\\\"),u=t(\\\"../cartesian/set_convert\\\"),f=t(\\\"../../lib/extend\\\").extendFlat,h=t(\\\"../plots\\\"),p=t(\\\"../cartesian/axes\\\"),d=t(\\\"../../components/dragelement\\\"),g=t(\\\"../../components/fx\\\"),v=t(\\\"../../components/titles\\\"),m=t(\\\"../cartesian/select\\\").prepSelect,y=t(\\\"../cartesian/select\\\").selectOnClick,x=t(\\\"../cartesian/select\\\").clearSelect,b=t(\\\"../cartesian/constants\\\");function _(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=_;var w=_.prototype;w.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},w.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;i<t.length;i++){if(!1===t[i][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(r),this.adjustLayout(r,n),h.generalUpdatePerTraceModule(this.graphDiv,this,t,r),this.layers.plotbg.select(\\\"path\\\").call(l.fill,r.bgcolor)},w.makeFramework=function(t){var e=t[this.id],r=this.clipId=\\\"clip\\\"+this.layoutId+this.id,n=this.clipIdRelative=\\\"clip-relative\\\"+this.layoutId+this.id;this.clipDef=o.ensureSingleById(t._clips,\\\"clipPath\\\",r,function(t){t.append(\\\"path\\\").attr(\\\"d\\\",\\\"M0,0Z\\\")}),this.clipDefRelative=o.ensureSingleById(t._clips,\\\"clipPath\\\",n,function(t){t.append(\\\"path\\\").attr(\\\"d\\\",\\\"M0,0Z\\\")}),this.plotContainer=o.ensureSingle(this.container,\\\"g\\\",this.id),this.updateLayers(e),c.setClipUrl(this.layers.backplot,r),c.setClipUrl(this.layers.grids,r)},w.updateLayers=function(t){var e=this.layers,r=[\\\"draglayer\\\",\\\"plotbg\\\",\\\"backplot\\\",\\\"grids\\\"];\\\"below traces\\\"===t.aaxis.layer&&r.push(\\\"aaxis\\\",\\\"aline\\\"),\\\"below traces\\\"===t.baxis.layer&&r.push(\\\"baxis\\\",\\\"bline\\\"),\\\"below traces\\\"===t.caxis.layer&&r.push(\\\"caxis\\\",\\\"cline\\\"),r.push(\\\"frontplot\\\"),\\\"above traces\\\"===t.aaxis.layer&&r.push(\\\"aaxis\\\",\\\"aline\\\"),\\\"above traces\\\"===t.baxis.layer&&r.push(\\\"baxis\\\",\\\"bline\\\"),\\\"above traces\\\"===t.caxis.layer&&r.push(\\\"caxis\\\",\\\"cline\\\");var i=this.plotContainer.selectAll(\\\"g.toplevel\\\").data(r,String),a=[\\\"agrid\\\",\\\"bgrid\\\",\\\"cgrid\\\"];i.enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"toplevel \\\"+t}).each(function(t){var r=n.select(this);e[t]=r,\\\"frontplot\\\"===t?r.append(\\\"g\\\").classed(\\\"scatterlayer\\\",!0):\\\"backplot\\\"===t?r.append(\\\"g\\\").classed(\\\"maplayer\\\",!0):\\\"plotbg\\\"===t?r.append(\\\"path\\\").attr(\\\"d\\\",\\\"M0,0Z\\\"):\\\"aline\\\"===t||\\\"bline\\\"===t||\\\"cline\\\"===t?r.append(\\\"path\\\"):\\\"grids\\\"===t&&a.forEach(function(t){e[t]=r.append(\\\"g\\\").classed(\\\"grid \\\"+t,!0);var n=\\\"bgrid\\\"===t?\\\"x\\\":\\\"y\\\";e[t].append(\\\"g\\\").classed(n,!0)})}),i.order()};var k=Math.sqrt(4/3);function M(t){return t.ticks+String(t.ticklen)+String(t.showticklabels)}w.adjustLayout=function(t,e){var r,n,i,a,o,s,h=this,p=t.domain,d=(p.x[0]+p.x[1])/2,g=(p.y[0]+p.y[1])/2,v=p.x[1]-p.x[0],m=p.y[1]-p.y[0],y=v*e.w,x=m*e.h,b=t.sum,_=t.aaxis.min,w=t.baxis.min,M=t.caxis.min;y>k*x?i=(a=x)*k:a=(i=y)/k,o=v*i/y,s=m*a/x,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-g)-a/2,h.x0=r,h.y0=n,h.w=i,h.h=a,h.sum=b,h.xaxis={type:\\\"linear\\\",range:[_+2*M-b,b-_-2*w],domain:[d-o/2,d+o/2],_id:\\\"x\\\"},u(h.xaxis,h.graphDiv._fullLayout),h.xaxis.setScale(),h.xaxis.isPtWithinRange=function(t){return t.a>=h.aaxis.range[0]&&t.a<=h.aaxis.range[1]&&t.b>=h.baxis.range[1]&&t.b<=h.baxis.range[0]&&t.c>=h.caxis.range[1]&&t.c<=h.caxis.range[0]},h.yaxis={type:\\\"linear\\\",range:[_,b-w-M],domain:[g-s/2,g+s/2],_id:\\\"y\\\"},u(h.yaxis,h.graphDiv._fullLayout),h.yaxis.setScale(),h.yaxis.isPtWithinRange=function(){return!0};var A=h.yaxis.domain[0],T=h.aaxis=f({},t.aaxis,{visible:!0,range:[_,b-w-M],side:\\\"left\\\",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*k],_axislayer:h.layers.aaxis,_gridlayer:h.layers.agrid,anchor:\\\"free\\\",position:0,_pos:0,_id:\\\"y\\\",_length:i,_gridpath:\\\"M0,0l\\\"+a+\\\",-\\\"+i/2,automargin:!1});u(T,h.graphDiv._fullLayout),T.setScale();var S=h.baxis=f({},t.baxis,{visible:!0,range:[b-_-M,w],side:\\\"bottom\\\",_counterangle:30,domain:h.xaxis.domain,_axislayer:h.layers.baxis,_gridlayer:h.layers.bgrid,_counteraxis:h.aaxis,anchor:\\\"free\\\",position:0,_pos:0,_id:\\\"x\\\",_length:i,_gridpath:\\\"M0,0l-\\\"+i/2+\\\",-\\\"+a,automargin:!1});u(S,h.graphDiv._fullLayout),S.setScale(),T._counteraxis=S;var C=h.caxis=f({},t.caxis,{visible:!0,range:[b-_-w,M],side:\\\"right\\\",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*k],_axislayer:h.layers.caxis,_gridlayer:h.layers.cgrid,_counteraxis:h.baxis,anchor:\\\"free\\\",position:0,_pos:0,_id:\\\"y\\\",_length:i,_gridpath:\\\"M0,0l-\\\"+a+\\\",\\\"+i/2,automargin:!1});u(C,h.graphDiv._fullLayout),C.setScale();var E=\\\"M\\\"+r+\\\",\\\"+(n+a)+\\\"h\\\"+i+\\\"l-\\\"+i/2+\\\",-\\\"+a+\\\"Z\\\";h.clipDef.select(\\\"path\\\").attr(\\\"d\\\",E),h.layers.plotbg.select(\\\"path\\\").attr(\\\"d\\\",E);var L=\\\"M0,\\\"+a+\\\"h\\\"+i+\\\"l-\\\"+i/2+\\\",-\\\"+a+\\\"Z\\\";h.clipDefRelative.select(\\\"path\\\").attr(\\\"d\\\",L);var z=\\\"translate(\\\"+r+\\\",\\\"+n+\\\")\\\";h.plotContainer.selectAll(\\\".scatterlayer,.maplayer\\\").attr(\\\"transform\\\",z),h.clipDefRelative.select(\\\"path\\\").attr(\\\"transform\\\",null);var O=\\\"translate(\\\"+(r-S._offset)+\\\",\\\"+(n+a)+\\\")\\\";h.layers.baxis.attr(\\\"transform\\\",O),h.layers.bgrid.attr(\\\"transform\\\",O);var I=\\\"translate(\\\"+(r+i/2)+\\\",\\\"+n+\\\")rotate(30)translate(0,\\\"+-T._offset+\\\")\\\";h.layers.aaxis.attr(\\\"transform\\\",I),h.layers.agrid.attr(\\\"transform\\\",I);var P=\\\"translate(\\\"+(r+i/2)+\\\",\\\"+n+\\\")rotate(-30)translate(0,\\\"+-C._offset+\\\")\\\";h.layers.caxis.attr(\\\"transform\\\",P),h.layers.cgrid.attr(\\\"transform\\\",P),h.drawAxes(!0),h.plotContainer.selectAll(\\\".crisp\\\").classed(\\\"crisp\\\",!1),h.layers.aline.select(\\\"path\\\").attr(\\\"d\\\",T.showline?\\\"M\\\"+r+\\\",\\\"+(n+a)+\\\"l\\\"+i/2+\\\",-\\\"+a:\\\"M0,0\\\").call(l.stroke,T.linecolor||\\\"#000\\\").style(\\\"stroke-width\\\",(T.linewidth||0)+\\\"px\\\"),h.layers.bline.select(\\\"path\\\").attr(\\\"d\\\",S.showline?\\\"M\\\"+r+\\\",\\\"+(n+a)+\\\"h\\\"+i:\\\"M0,0\\\").call(l.stroke,S.linecolor||\\\"#000\\\").style(\\\"stroke-width\\\",(S.linewidth||0)+\\\"px\\\"),h.layers.cline.select(\\\"path\\\").attr(\\\"d\\\",C.showline?\\\"M\\\"+(r+i/2)+\\\",\\\"+n+\\\"l\\\"+i/2+\\\",\\\"+a:\\\"M0,0\\\").call(l.stroke,C.linecolor||\\\"#000\\\").style(\\\"stroke-width\\\",(C.linewidth||0)+\\\"px\\\"),h.graphDiv._context.staticPlot||h.initInteractions(),c.setClipUrl(h.layers.frontplot,h._hasClipOnAxisFalse?null:h.clipId)},w.drawAxes=function(t){var e,r=this.graphDiv,n=this.id.substr(7)+\\\"title\\\",i=this.layers,a=this.aaxis,o=this.baxis,l=this.caxis;if(e=M(a),this.aTickLayout!==e&&(i.aaxis.selectAll(\\\".ytick\\\").remove(),this.aTickLayout=e),e=M(o),this.bTickLayout!==e&&(i.baxis.selectAll(\\\".xtick\\\").remove(),this.bTickLayout=e),e=M(l),this.cTickLayout!==e&&(i.caxis.selectAll(\\\".ytick\\\").remove(),this.cTickLayout=e),p.doTicksSingle(r,a,!0),p.doTicksSingle(r,o,!0),p.doTicksSingle(r,l,!0),t){var c=Math.max(a.showticklabels?a.tickfont.size/2:0,(l.showticklabels?.75*l.tickfont.size:0)+(\\\"outside\\\"===l.ticks?.87*l.ticklen:0));this.layers[\\\"a-title\\\"]=v.draw(r,\\\"a\\\"+n,{propContainer:a,propName:this.id+\\\".aaxis.title\\\",placeholder:s(r,\\\"Click to enter Component A title\\\"),attributes:{x:this.x0+this.w/2,y:this.y0-a.titlefont.size/3-c,\\\"text-anchor\\\":\\\"middle\\\"}});var u=(o.showticklabels?o.tickfont.size:0)+(\\\"outside\\\"===o.ticks?o.ticklen:0)+3;this.layers[\\\"b-title\\\"]=v.draw(r,\\\"b\\\"+n,{propContainer:o,propName:this.id+\\\".baxis.title\\\",placeholder:s(r,\\\"Click to enter Component B title\\\"),attributes:{x:this.x0-u,y:this.y0+this.h+.83*o.titlefont.size+u,\\\"text-anchor\\\":\\\"middle\\\"}}),this.layers[\\\"c-title\\\"]=v.draw(r,\\\"c\\\"+n,{propContainer:l,propName:this.id+\\\".caxis.title\\\",placeholder:s(r,\\\"Click to enter Component C title\\\"),attributes:{x:this.x0+this.w+u,y:this.y0+this.h+.83*l.titlefont.size+u,\\\"text-anchor\\\":\\\"middle\\\"}})}};var A=b.MINZOOM/2+.87,T=\\\"m-0.87,.5h\\\"+A+\\\"v3h-\\\"+(A+5.2)+\\\"l\\\"+(A/2+2.6)+\\\",-\\\"+(.87*A+4.5)+\\\"l2.6,1.5l-\\\"+A/2+\\\",\\\"+.87*A+\\\"Z\\\",S=\\\"m0.87,.5h-\\\"+A+\\\"v3h\\\"+(A+5.2)+\\\"l-\\\"+(A/2+2.6)+\\\",-\\\"+(.87*A+4.5)+\\\"l-2.6,1.5l\\\"+A/2+\\\",\\\"+.87*A+\\\"Z\\\",C=\\\"m0,1l\\\"+A/2+\\\",\\\"+.87*A+\\\"l2.6,-1.5l-\\\"+(A/2+2.6)+\\\",-\\\"+(.87*A+4.5)+\\\"l-\\\"+(A/2+2.6)+\\\",\\\"+(.87*A+4.5)+\\\"l2.6,1.5l\\\"+A/2+\\\",-\\\"+.87*A+\\\"Z\\\",E=\\\"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z\\\",L=!0;function z(t){n.select(t).selectAll(\\\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\\\").remove()}w.initInteractions=function(){var t,e,r,n,u,f,h,p,v,_,w=this,M=w.layers.plotbg.select(\\\"path\\\").node(),A=w.graphDiv,O=A._fullLayout._zoomlayer,I={element:M,gd:A,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(a,o,s){I.xaxes=[w.xaxis],I.yaxes=[w.yaxis];var c=A._fullLayout.dragmode;I.minDrag=\\\"lasso\\\"===c?1:void 0,\\\"zoom\\\"===c?(I.moveFn=F,I.clickFn=P,I.doneFn=N,function(a,o,s){var c=M.getBoundingClientRect();t=o-c.left,e=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,f=i(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),h=\\\"M0,\\\"+w.h+\\\"L\\\"+w.w/2+\\\", 0L\\\"+w.w+\\\",\\\"+w.h+\\\"Z\\\",p=!1,v=O.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox\\\").attr(\\\"transform\\\",\\\"translate(\\\"+w.x0+\\\", \\\"+w.y0+\\\")\\\").style({fill:f>.2?\\\"rgba(0,0,0,0)\\\":\\\"rgba(255,255,255,0)\\\",\\\"stroke-width\\\":0}).attr(\\\"d\\\",h),_=O.append(\\\"path\\\").attr(\\\"class\\\",\\\"zoombox-corners\\\").attr(\\\"transform\\\",\\\"translate(\\\"+w.x0+\\\", \\\"+w.y0+\\\")\\\").style({fill:l.background,stroke:l.defaultLine,\\\"stroke-width\\\":1,opacity:0}).attr(\\\"d\\\",\\\"M0,0Z\\\"),x(O)}(0,o,s)):\\\"pan\\\"===c?(I.moveFn=j,I.clickFn=P,I.doneFn=V,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,x(O)):\\\"select\\\"!==c&&\\\"lasso\\\"!==c||m(a,o,s,I,c)}};function P(t,e){var r=A._fullLayout.clickmode;if(z(A),2===t){var n={};n[w.id+\\\".aaxis.min\\\"]=0,n[w.id+\\\".baxis.min\\\"]=0,n[w.id+\\\".caxis.min\\\"]=0,A.emit(\\\"plotly_doubleclick\\\",null),a.call(\\\"relayout\\\",A,n)}r.indexOf(\\\"select\\\")>-1&&1===t&&y(e,A,[w.xaxis],[w.yaxis],w.id,I),r.indexOf(\\\"event\\\")>-1&&g.click(A,e,w.id)}function D(t,e){return 1-e/w.h}function R(t,e){return 1-(t+(w.h-e)/Math.sqrt(3))/w.w}function B(t,e){return(t-(w.h-e)/Math.sqrt(3))/w.w}function F(i,a){var o=t+i,s=e+a,l=Math.max(0,Math.min(1,D(0,e),D(0,s))),c=Math.max(0,Math.min(1,R(t,e),R(o,s))),d=Math.max(0,Math.min(1,B(t,e),B(o,s))),g=(l/2+d)*w.w,m=(1-l/2-c)*w.w,y=(g+m)/2,x=m-g,M=(1-l)*w.h,A=M-x/k;x<b.MINZOOM?(u=r,v.attr(\\\"d\\\",h),_.attr(\\\"d\\\",\\\"M0,0Z\\\")):(u={a:r.a+l*n,b:r.b+c*n,c:r.c+d*n},v.attr(\\\"d\\\",h+\\\"M\\\"+g+\\\",\\\"+M+\\\"H\\\"+m+\\\"L\\\"+y+\\\",\\\"+A+\\\"L\\\"+g+\\\",\\\"+M+\\\"Z\\\"),_.attr(\\\"d\\\",\\\"M\\\"+t+\\\",\\\"+e+E+\\\"M\\\"+g+\\\",\\\"+M+T+\\\"M\\\"+m+\\\",\\\"+M+S+\\\"M\\\"+y+\\\",\\\"+A+C)),p||(v.transition().style(\\\"fill\\\",f>.2?\\\"rgba(0,0,0,0.4)\\\":\\\"rgba(255,255,255,0.3)\\\").duration(200),_.transition().style(\\\"opacity\\\",1).duration(200),p=!0)}function N(){if(z(A),u!==r){var t={};t[w.id+\\\".aaxis.min\\\"]=u.a,t[w.id+\\\".baxis.min\\\"]=u.b,t[w.id+\\\".caxis.min\\\"]=u.c,a.call(\\\"relayout\\\",A,t),L&&A.data&&A._context.showTips&&(o.notifier(s(A,\\\"Double-click to zoom back out\\\"),\\\"long\\\"),L=!1)}}function j(t,e){var n=t/w.xaxis._m,i=e/w.yaxis._m,a=[(u={a:r.a-i,b:r.b+(n+i)/2,c:r.c-(n-i)/2}).a,u.b,u.c].sort(),o=a.indexOf(u.a),s=a.indexOf(u.b),l=a.indexOf(u.c);a[0]<0&&(a[1]+a[0]/2<0?(a[2]+=a[0]+a[1],a[0]=a[1]=0):(a[2]+=a[0]/2,a[1]+=a[0]/2,a[0]=0),u={a:a[o],b:a[s],c:a[l]},e=(r.a-u.a)*w.yaxis._m,t=(r.c-u.c-r.b+u.b)*w.xaxis._m);var f=\\\"translate(\\\"+(w.x0+t)+\\\",\\\"+(w.y0+e)+\\\")\\\";w.plotContainer.selectAll(\\\".scatterlayer,.maplayer\\\").attr(\\\"transform\\\",f);var h=\\\"translate(\\\"+-t+\\\",\\\"+-e+\\\")\\\";w.clipDefRelative.select(\\\"path\\\").attr(\\\"transform\\\",h),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w.plotContainer.selectAll(\\\".crisp\\\").classed(\\\"crisp\\\",!1),w._hasClipOnAxisFalse&&w.plotContainer.select(\\\".scatterlayer\\\").selectAll(\\\".trace\\\").call(c.hideOutsideRangePoints,w)}function V(){var t={};t[w.id+\\\".aaxis.min\\\"]=u.a,t[w.id+\\\".baxis.min\\\"]=u.b,t[w.id+\\\".caxis.min\\\"]=u.c,a.call(\\\"relayout\\\",A,t)}M.onmousemove=function(t){g.hover(A,t,w.id),A._fullLayout._lasthover=M,A._fullLayout._hoversubplot=w.id},M.onmouseout=function(t){A._dragging||d.unhover(A,t)},d.init(I)}},{\\\"../../components/color\\\":570,\\\"../../components/dragelement\\\":592,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../components/titles\\\":661,\\\"../../lib\\\":696,\\\"../../lib/extend\\\":685,\\\"../../registry\\\":828,\\\"../cartesian/axes\\\":745,\\\"../cartesian/constants\\\":751,\\\"../cartesian/select\\\":763,\\\"../cartesian/set_convert\\\":764,\\\"../plots\\\":809,d3:148,tinycolor2:514}],828:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lib/loggers\\\"),i=t(\\\"./lib/noop\\\"),a=t(\\\"./lib/push_unique\\\"),o=t(\\\"./lib/is_plain_object\\\"),s=t(\\\"./lib/extend\\\"),l=t(\\\"./plots/attributes\\\"),c=t(\\\"./plots/layout_attributes\\\"),u=s.extendFlat,f=s.extendDeepAll;function h(t){var e=t.name,i=t.categories,a=t.meta;if(r.modules[e])n.log(\\\"Type \\\"+e+\\\" already registered\\\");else{r.subplotsRegistry[t.basePlotModule.name]||function(t){var e=t.name;if(r.subplotsRegistry[e])return void n.log(\\\"Plot type \\\"+e+\\\" already registered.\\\");for(var i in v(t),r.subplotsRegistry[e]=t,r.componentsRegistry)x(i,t.name)}(t.basePlotModule);for(var o={},s=0;s<i.length;s++)o[i[s]]=!0,r.allCategories[i[s]]=!0;for(var l in r.modules[e]={_module:t,categories:o},a&&Object.keys(a).length&&(r.modules[e].meta=a),r.allTypes.push(e),r.componentsRegistry)m(l,e);t.layoutAttributes&&u(r.traceLayoutAttributes,t.layoutAttributes)}}function p(t){if(\\\"string\\\"!=typeof t.name)throw new Error(\\\"Component module *name* must be a string.\\\");var e=t.name;for(var n in r.componentsRegistry[e]=t,t.layoutAttributes&&(t.layoutAttributes._isLinkedToArray&&a(r.layoutArrayContainers,e),v(t)),r.modules)m(e,n);for(var i in r.subplotsRegistry)x(e,i);for(var o in r.transformsRegistry)y(e,o);t.schema&&t.schema.layout&&f(c,t.schema.layout)}function d(t){if(\\\"string\\\"!=typeof t.name)throw new Error(\\\"Transform module *name* must be a string.\\\");var e=\\\"Transform module \\\"+t.name,i=\\\"function\\\"==typeof t.transform,a=\\\"function\\\"==typeof t.calcTransform;if(!i&&!a)throw new Error(e+\\\" is missing a *transform* or *calcTransform* method.\\\");for(var s in i&&a&&n.log([e+\\\" has both a *transform* and *calcTransform* methods.\\\",\\\"Please note that all *transform* methods are executed\\\",\\\"before all *calcTransform* methods.\\\"].join(\\\" \\\")),o(t.attributes)||n.log(e+\\\" registered without an *attributes* object.\\\"),\\\"function\\\"!=typeof t.supplyDefaults&&n.log(e+\\\" registered without a *supplyDefaults* method.\\\"),r.transformsRegistry[t.name]=t,r.componentsRegistry)y(s,t.name)}function g(t){var e=t.name,n=e.split(\\\"-\\\")[0],i=t.dictionary,a=t.format,o=i&&Object.keys(i).length,s=a&&Object.keys(a).length,l=r.localeRegistry,c=l[e];if(c||(l[e]=c={}),n!==e){var u=l[n];u||(l[n]=u={}),o&&u.dictionary===c.dictionary&&(u.dictionary=i),s&&u.format===c.format&&(u.format=a)}o&&(c.dictionary=i),s&&(c.format=a)}function v(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n<e.length;n++)a(r.layoutArrayRegexes,e[n])}}function m(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.traces){var i=n.traces[e];i&&f(r.modules[e]._module.attributes,i)}}function y(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.transforms){var i=n.transforms[e];i&&f(r.transformsRegistry[e].attributes,i)}}function x(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.subplots){var i=r.subplotsRegistry[e],a=i.layoutAttributes,o=\\\"subplot\\\"===i.attr?i.name:i.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];a&&s&&f(a,s)}}function b(t){return\\\"object\\\"==typeof t&&(t=t.type),t}r.modules={},r.allCategories={},r.allTypes=[],r.subplotsRegistry={},r.transformsRegistry={},r.componentsRegistry={},r.layoutArrayContainers=[],r.layoutArrayRegexes=[],r.traceLayoutAttributes={},r.localeRegistry={},r.apiMethodRegistry={},r.register=function(t){if(!t)throw new Error(\\\"No argument passed to Plotly.register.\\\");t&&!Array.isArray(t)&&(t=[t]);for(var e=0;e<t.length;e++){var n=t[e];if(!n)throw new Error(\\\"Invalid module was attempted to be registered!\\\");switch(n.moduleType){case\\\"trace\\\":h(n);break;case\\\"transform\\\":d(n);break;case\\\"component\\\":p(n);break;case\\\"locale\\\":g(n);break;case\\\"apiMethod\\\":var i=n.name;r.apiMethodRegistry[i]=n.fn;break;default:throw new Error(\\\"Invalid module was attempted to be registered!\\\")}}},r.getModule=function(t){var e=r.modules[b(t)];return!!e&&e._module},r.traceIs=function(t,e){if(\\\"various\\\"===(t=b(t)))return!1;var i=r.modules[t];return i||(t&&\\\"area\\\"!==t&&n.log(\\\"Unrecognized trace type \\\"+t+\\\".\\\"),i=r.modules[l.type.dflt]),!!i.categories[e]},r.getTransformIndices=function(t,e){for(var r=[],n=t.transforms||[],i=0;i<n.length;i++)n[i].type===e&&r.push(i);return r},r.hasTransform=function(t,e){for(var r=t.transforms||[],n=0;n<r.length;n++)if(r[n].type===e)return!0;return!1},r.getComponentMethod=function(t,e){var n=r.componentsRegistry[t];return n&&n[e]||i},r.call=function(){var t=arguments[0],e=[].slice.call(arguments,1);return r.apiMethodRegistry[t].apply(null,e)}},{\\\"./lib/extend\\\":685,\\\"./lib/is_plain_object\\\":698,\\\"./lib/loggers\\\":701,\\\"./lib/noop\\\":706,\\\"./lib/push_unique\\\":711,\\\"./plots/attributes\\\":742,\\\"./plots/layout_attributes\\\":800}],829:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=n.extendFlat,a=n.extendDeep;function o(t){var e;switch(t){case\\\"themes__thumb\\\":e={autosize:!0,width:150,height:150,title:\\\"\\\",showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case\\\"thumbnail\\\":e={title:\\\"\\\",hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:\\\"\\\",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}e.exports=function(t,e){var r;t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var n,s=t.data,l=t.layout,c=a([],s),u=a({},l,o(e.tileClass)),f=t._context||{};if(e.width&&(u.width=e.width),e.height&&(u.height=e.height),\\\"thumbnail\\\"===e.tileClass||\\\"themes__thumb\\\"===e.tileClass){u.annotations=[];var h=Object.keys(u);for(r=0;r<h.length;r++)n=h[r],[\\\"xaxis\\\",\\\"yaxis\\\",\\\"zaxis\\\"].indexOf(n.slice(0,5))>-1&&(u[h[r]].title=\\\"\\\");for(r=0;r<c.length;r++){var p=c[r];p.showscale=!1,p.marker&&(p.marker.showscale=!1),\\\"pie\\\"===p.type&&(p.textposition=\\\"none\\\")}}if(Array.isArray(e.annotations))for(r=0;r<e.annotations.length;r++)u.annotations.push(e.annotations[r]);var d=Object.keys(u).filter(function(t){return t.match(/^scene\\\\d*$/)});if(d.length){var g={};for(\\\"thumbnail\\\"===e.tileClass&&(g={title:\\\"\\\",showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<d.length;r++){var v=u[d[r]];v.xaxis||(v.xaxis={}),v.yaxis||(v.yaxis={}),v.zaxis||(v.zaxis={}),i(v.xaxis,g),i(v.yaxis,g),i(v.zaxis,g),v._scene=null}}var m=document.createElement(\\\"div\\\");e.tileClass&&(m.className=e.tileClass);var y={gd:m,td:m,layout:u,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:f.mapboxAccessToken}};return\\\"transparent\\\"!==e.setBackground&&(y.config.setBackground=e.setBackground||\\\"opaque\\\"),y.gd.defaultLayout=o(e.tileClass),y}},{\\\"../lib\\\":696}],830:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../plot_api/to_image\\\"),i=t(\\\"../lib\\\"),a=t(\\\"./filesaver\\\");e.exports=function(t,e){var r;return i.isPlainObject(t)||(r=i.getGraphDiv(t)),(e=e||{}).format=e.format||\\\"png\\\",new Promise(function(o,s){r&&r._snapshotInProgress&&s(new Error(\\\"Snapshotting already in progress.\\\")),i.isIE()&&\\\"svg\\\"!==e.format&&s(new Error(\\\"Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.\\\")),r&&(r._snapshotInProgress=!0);var l=n(t,e),c=e.filename||t.fn||\\\"newplot\\\";c+=\\\".\\\"+e.format,l.then(function(t){return r&&(r._snapshotInProgress=!1),a(t,c)}).then(function(t){o(t)}).catch(function(t){r&&(r._snapshotInProgress=!1),s(t)})})}},{\\\"../lib\\\":696,\\\"../plot_api/to_image\\\":738,\\\"./filesaver\\\":831}],831:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r=document.createElement(\\\"a\\\"),n=\\\"download\\\"in r,i=/Version\\\\/[\\\\d\\\\.]+.*Safari/.test(navigator.userAgent);return new Promise(function(a,o){if(\\\"undefined\\\"!=typeof navigator&&/MSIE [1-9]\\\\./.test(navigator.userAgent)&&o(new Error(\\\"IE < 10 unsupported\\\")),i&&(document.location.href=\\\"data:application/octet-stream\\\"+t.slice(t.search(/[,;]/)),a(e)),e||(e=\\\"download\\\"),n&&(r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),a(e)),\\\"undefined\\\"!=typeof navigator&&navigator.msSaveBlob){var s=t.split(/^data:image\\\\/svg\\\\+xml,/)[1],l=decodeURIComponent(s);navigator.msSaveBlob(new Blob([l]),e),a(e)}o(new Error(\\\"download error\\\"))})}},{}],832:[function(t,e,r){\\\"use strict\\\";r.getDelay=function(t){return t._has&&(t._has(\\\"gl3d\\\")||t._has(\\\"gl2d\\\")||t._has(\\\"mapbox\\\"))?500:0},r.getRedrawFunc=function(t){var e=t._fullLayout||{};if(!(!(e._has&&e._has(\\\"polar\\\"))&&t.data&&t.data[0]&&t.data[0].r))return function(){(t.calcdata||[]).forEach(function(t){t[0]&&t[0].t&&t[0].t.cb&&t[0].t.cb()})}}},{}],833:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./helpers\\\"),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:t(\\\"./cloneplot\\\"),toSVG:t(\\\"./tosvg\\\"),svgToImg:t(\\\"./svgtoimg\\\"),toImage:t(\\\"./toimage\\\"),downloadImage:t(\\\"./download\\\")};e.exports=i},{\\\"./cloneplot\\\":829,\\\"./download\\\":830,\\\"./helpers\\\":832,\\\"./svgtoimg\\\":834,\\\"./toimage\\\":835,\\\"./tosvg\\\":836}],834:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"events\\\").EventEmitter;e.exports=function(t){var e=t.emitter||new i,r=new Promise(function(i,a){var o=window.Image,s=t.svg,l=t.format||\\\"png\\\";if(n.isIE()&&\\\"svg\\\"!==l){var c=new Error(\\\"Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.\\\");return a(c),t.promise?r:e.emit(\\\"error\\\",c)}var u=t.canvas,f=t.scale||1,h=t.width||300,p=t.height||150,d=f*h,g=f*p,v=u.getContext(\\\"2d\\\"),m=new o,y=\\\"data:image/svg+xml,\\\"+encodeURIComponent(s);u.width=d,u.height=g,m.onload=function(){var r;switch(\\\"svg\\\"!==l&&v.drawImage(m,0,0,d,g),l){case\\\"jpeg\\\":r=u.toDataURL(\\\"image/jpeg\\\");break;case\\\"png\\\":r=u.toDataURL(\\\"image/png\\\");break;case\\\"webp\\\":r=u.toDataURL(\\\"image/webp\\\");break;case\\\"svg\\\":r=y;break;default:var n=\\\"Image format is not jpeg, png, svg or webp.\\\";if(a(new Error(n)),!t.promise)return e.emit(\\\"error\\\",n)}i(r),t.promise||e.emit(\\\"success\\\",r)},m.onerror=function(r){if(a(r),!t.promise)return e.emit(\\\"error\\\",r)},m.src=y});return t.promise?r:e}},{\\\"../lib\\\":696,events:92}],835:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"events\\\").EventEmitter,i=t(\\\"../registry\\\"),a=t(\\\"../lib\\\"),o=t(\\\"./helpers\\\"),s=t(\\\"./cloneplot\\\"),l=t(\\\"./tosvg\\\"),c=t(\\\"./svgtoimg\\\");e.exports=function(t,e){var r=new n,u=s(t,{format:\\\"png\\\"}),f=u.gd;f.style.position=\\\"absolute\\\",f.style.left=\\\"-5000px\\\",document.body.appendChild(f);var h=o.getRedrawFunc(f);return i.call(\\\"plot\\\",f,u.data,u.layout,u.config).then(h).then(function(){var t=o.getDelay(f._fullLayout);setTimeout(function(){var t=l(f),n=document.createElement(\\\"canvas\\\");n.id=a.randstr(),(r=c({format:e.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){f&&document.body.removeChild(f)}},t)}).catch(function(t){r.emit(\\\"error\\\",t)}),r}},{\\\"../lib\\\":696,\\\"../registry\\\":828,\\\"./cloneplot\\\":829,\\\"./helpers\\\":832,\\\"./svgtoimg\\\":834,\\\"./tosvg\\\":836,events:92}],836:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../components/drawing\\\"),o=t(\\\"../components/color\\\"),s=t(\\\"../constants/xmlns_namespaces\\\"),l=/\\\"/g,c=new RegExp('(\\\"TOBESTRIPPED)|(TOBESTRIPPED\\\")',\\\"g\\\");e.exports=function(t,e,r){var u,f=t._fullLayout,h=f._paper,p=f._toppaper,d=f.width,g=f.height;h.insert(\\\"rect\\\",\\\":first-child\\\").call(a.setRect,0,0,d,g).call(o.fill,f.paper_bgcolor);var v=f._basePlotModules||[];for(u=0;u<v.length;u++){var m=v[u];m.toSVG&&m.toSVG(t)}if(p){var y=p.node().childNodes,x=Array.prototype.slice.call(y);for(u=0;u<x.length;u++){var b=x[u];b.childNodes.length&&h.node().appendChild(b)}}f._draggers&&f._draggers.remove(),h.node().style.background=\\\"\\\",h.selectAll(\\\"text\\\").attr({\\\"data-unformatted\\\":null,\\\"data-math\\\":null}).each(function(){var t=n.select(this);if(\\\"hidden\\\"!==this.style.visibility&&\\\"none\\\"!==this.style.display){t.style({visibility:null,display:null});var e=this.style.fontFamily;e&&-1!==e.indexOf('\\\"')&&t.style(\\\"font-family\\\",e.replace(l,\\\"TOBESTRIPPED\\\"))}else t.remove()}),h.selectAll(\\\".point, .scatterpts, .legendfill>path, .legendlines>path, .cbfill\\\").each(function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf(\\\"url(\\\")&&t.style(\\\"fill\\\",e.replace(l,\\\"TOBESTRIPPED\\\"));var r=this.style.stroke;r&&-1!==r.indexOf(\\\"url(\\\")&&t.style(\\\"stroke\\\",r.replace(l,\\\"TOBESTRIPPED\\\"))}),\\\"pdf\\\"!==e&&\\\"eps\\\"!==e||h.selectAll(\\\"#MathJax_SVG_glyphs path\\\").attr(\\\"stroke-width\\\",0),h.node().setAttributeNS(s.xmlns,\\\"xmlns\\\",s.svg),h.node().setAttributeNS(s.xmlns,\\\"xmlns:xlink\\\",s.xlink),\\\"svg\\\"===e&&r&&(h.attr(\\\"width\\\",r*d),h.attr(\\\"height\\\",r*g),h.attr(\\\"viewBox\\\",\\\"0 0 \\\"+d+\\\" \\\"+g));var _=(new window.XMLSerializer).serializeToString(h.node());return _=function(t){var e=n.select(\\\"body\\\").append(\\\"div\\\").style({display:\\\"none\\\"}).html(\\\"\\\"),r=t.replace(/(&[^;]*;)/gi,function(t){return\\\"&lt;\\\"===t?\\\"&#60;\\\":\\\"&rt;\\\"===t?\\\"&#62;\\\":-1!==t.indexOf(\\\"<\\\")||-1!==t.indexOf(\\\">\\\")?\\\"\\\":e.html(t).text()});return e.remove(),r}(_),_=(_=_.replace(/&(?!\\\\w+;|\\\\#[0-9]+;| \\\\#x[0-9A-F]+;)/g,\\\"&amp;\\\")).replace(c,\\\"'\\\"),i.isIE()&&(_=(_=(_=_.replace(/\\\"/gi,\\\"'\\\")).replace(/(\\\\('#)([^']*)('\\\\))/gi,'(\\\"#$2\\\")')).replace(/(\\\\\\\\')/gi,'\\\"')),_}},{\\\"../components/color\\\":570,\\\"../components/drawing\\\":595,\\\"../constants/xmlns_namespaces\\\":674,\\\"../lib\\\":696,d3:148}],837:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").mergeArray;e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n(e.text,t,\\\"tx\\\"),n(e.hovertext,t,\\\"htx\\\");var i=e.marker;if(i){n(i.opacity,t,\\\"mo\\\"),n(i.color,t,\\\"mc\\\");var a=i.line;a&&(n(a.color,t,\\\"mlc\\\"),n(a.width,t,\\\"mlw\\\"))}}},{\\\"../../lib\\\":696}],838:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../plots/font_attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l=o({editType:\\\"calc\\\",arrayOk:!0}),c=s({},n.marker.line.width,{dflt:0}),u=s({width:c,editType:\\\"calc\\\"},i(\\\"marker.line\\\")),f=s({line:u,editType:\\\"calc\\\"},i(\\\"marker\\\"),{colorbar:a,opacity:{valType:\\\"number\\\",arrayOk:!0,dflt:1,min:0,max:1,editType:\\\"style\\\"}});e.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,hovertext:n.hovertext,textposition:{valType:\\\"enumerated\\\",values:[\\\"inside\\\",\\\"outside\\\",\\\"auto\\\",\\\"none\\\"],dflt:\\\"none\\\",arrayOk:!0,editType:\\\"calc\\\"},textfont:s({},l,{}),insidetextfont:s({},l,{}),outsidetextfont:s({},l,{}),constraintext:{valType:\\\"enumerated\\\",values:[\\\"inside\\\",\\\"outside\\\",\\\"both\\\",\\\"none\\\"],dflt:\\\"both\\\",editType:\\\"calc\\\"},cliponaxis:s({},n.cliponaxis,{}),orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],editType:\\\"calc+clearAxisTypes\\\"},base:{valType:\\\"any\\\",dflt:null,arrayOk:!0,editType:\\\"calc\\\"},offset:{valType:\\\"number\\\",dflt:null,arrayOk:!0,editType:\\\"calc\\\"},width:{valType:\\\"number\\\",dflt:null,min:0,arrayOk:!0,editType:\\\"calc\\\"},marker:f,selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:\\\"style\\\"},textfont:n.selected.textfont,editType:\\\"style\\\"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:\\\"style\\\"},textfont:n.unselected.textfont,editType:\\\"style\\\"},r:n.r,t:n.t,_deprecated:{bardir:{valType:\\\"enumerated\\\",editType:\\\"calc\\\",values:[\\\"v\\\",\\\"h\\\"]}}}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/font_attributes\\\":772,\\\"../scatter/attributes\\\":1044}],839:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/calc\\\"),o=t(\\\"./arrays_to_calcdata\\\"),s=t(\\\"../scatter/calc_selection\\\");e.exports=function(t,e){var r,l,c=n.getFromId(t,e.xaxis||\\\"x\\\"),u=n.getFromId(t,e.yaxis||\\\"y\\\");\\\"h\\\"===e.orientation?(r=c.makeCalcdata(e,\\\"x\\\"),l=u.makeCalcdata(e,\\\"y\\\")):(r=u.makeCalcdata(e,\\\"y\\\"),l=c.makeCalcdata(e,\\\"x\\\"));for(var f=Math.min(l.length,r.length),h=new Array(f),p=0;p<f;p++)h[p]={p:l[p],s:r[p]},e.ids&&(h[p].id=String(e.ids[p]));return i(e,\\\"marker\\\")&&a(e,e.marker.color,\\\"marker\\\",\\\"c\\\"),i(e,\\\"marker.line\\\")&&a(e,e.marker.line.color,\\\"marker.line\\\",\\\"c\\\"),o(h,e),s(h,e),h}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/calc_selection\\\":1046,\\\"./arrays_to_calcdata\\\":837}],840:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\").isArrayOrTypedArray,a=t(\\\"../../constants/numerical\\\").BADNUM,o=t(\\\"../../registry\\\"),s=t(\\\"../../plots/cartesian/axes\\\"),l=t(\\\"./sieve.js\\\");function c(t,e,r,o){if(o.length){var c,_,w,k,M=t._fullLayout.barmode,A=\\\"overlay\\\"===M,T=\\\"group\\\"===M;if(function(t,e,r,a){var o,s;for(o=0;o<a.length;o++){var l,c=a[o],u=c[0].trace,f=u.base,h=\\\"h\\\"===u.orientation?u.xcalendar:u.ycalendar;if(i(f)){for(s=0;s<Math.min(f.length,c.length);s++)l=r.d2c(f[s],0,h),n(l)?(c[s].b=+l,c[s].hasB=1):c[s].b=0;for(;s<c.length;s++)c[s].b=0}else{l=r.d2c(f,0,h);var p=n(l);for(l=p?l:0,s=0;s<c.length;s++)c[s].b=l,p&&(c[s].hasB=1)}}}(0,0,r,o),A)u(t,e,r,o);else if(T){for(c=[],_=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.offset?_.push(k):c.push(k);_.length&&function(t,e,r,n){var i=t._fullLayout.barnorm,a=new l(n,!1,!i);(function(t,e,r){var n,i,a,o,s=t._fullLayout,l=s.bargap,c=s.bargroupgap||0,u=r.positions,f=r.distinctPositions,g=r.minDiff,v=r.traces,m=u.length!==f.length,y=v.length,x=g*(1-l),b=m?x/y:x,_=b*(1-c);for(n=0;n<y;n++){i=v[n],a=i[0];var w=m?((2*n+1-y)*b-_)/2:-_/2;(o=a.t).barwidth=_,o.poffset=w,o.bargroupwidth=x,o.bardelta=g}r.binWidth=v[0][0].t.barwidth/100,h(r),p(t,e,r),d(t,e,r,m)})(t,e,a),i?(m(t,r,a),y(t,r,a)):v(t,r,a)}(t,e,r,_),c.length&&u(t,e,r,c)}else{for(c=[],_=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.base?_.push(k):c.push(k);_.length&&function(t,e,r,i){var o=t._fullLayout.barmode,c=\\\"stack\\\"===o,u=\\\"relative\\\"===o,h=t._fullLayout.barnorm,p=new l(i,u,!(h||c||u));f(t,e,p),function(t,e,r){var i,o,l,c,u=t._fullLayout.barnorm,f=x(e),h=r.traces,p=[null,null];for(i=0;i<h.length;i++)for(o=h[i],l=0;l<o.length;l++)if((c=o[l]).s!==a){var d=r.put(c.p,c.b+c.s),v=d+c.b+c.s;c.b=d,c[f]=v,u||(n(e.c2l(v))&&g(p,v),c.hasB&&n(e.c2l(d))&&g(p,d))}if(!u){var m=s.findExtremes(e,p,{tozero:!0,padded:!0});b(h,e,m)}}(t,r,p);for(var d=0;d<i.length;d++)for(var v=i[d],m=0;m<v.length;m++){var _=v[m];if(_.s!==a){var w=_.b+_.s===p.get(_.p,_.s);w&&(_._outmost=!0)}}h&&y(t,r,p)}(t,e,r,_),c.length&&u(t,e,r,c)}!function(t,e){var r,i,a,o=e._id.charAt(0),s={},l=1/0,c=-1/0;for(r=0;r<t.length;r++)for(a=t[r],i=0;i<a.length;i++){var u=a[i].p;n(u)&&(l=Math.min(l,u),c=Math.max(c,u))}var f,h,p=1e4/(c-l),d=s.round=function(t){return String(Math.round(p*(t-l)))};for(r=0;r<t.length;r++)for((a=t[r])[0].t.extents=s,f=a[0].t.poffset,h=Array.isArray(f),i=0;i<a.length;i++){var g=a[i],v=g[o]-g.w/2;if(n(v)){var m=g[o]+g.w/2,y=d(g.p);s[y]?s[y]=[Math.min(v,s[y][0]),Math.max(m,s[y][1])]:s[y]=[v,m]}g.p0=g.p+(h?f[i]:f),g.p1=g.p0+g.w,g.s0=g.b,g.s1=g.s0+g.s}}(o,e)}}function u(t,e,r,n){for(var i=t._fullLayout.barnorm,a=!i,o=0;o<n.length;o++){var s=n[o],c=new l([s],!1,a);f(t,e,c),i?(m(t,r,c),y(t,r,c)):v(t,r,c)}}function f(t,e,r){var n,i,a=t._fullLayout,o=a.bargap,s=a.bargroupgap||0,l=r.minDiff,c=r.traces,u=l*(1-o),f=u*(1-s),g=-f/2;for(n=0;n<c.length;n++)(i=c[n][0].t).barwidth=f,i.poffset=g,i.bargroupwidth=u,i.bardelta=l;r.binWidth=c[0][0].t.barwidth/100,h(r),p(t,e,r),d(t,e,r)}function h(t){var e,r,a,o,s,l,c=t.traces;for(e=0;e<c.length;e++){o=(a=(r=c[e])[0]).trace,l=a.t;var u,f=o._offset||o.offset,h=l.poffset;if(i(f)){for(u=Array.prototype.slice.call(f,0,r.length),s=0;s<u.length;s++)n(u[s])||(u[s]=h);for(s=u.length;s<r.length;s++)u.push(h);l.poffset=u}else void 0!==f&&(l.poffset=f);var p=o._width||o.width,d=l.barwidth;if(i(p)){var g=Array.prototype.slice.call(p,0,r.length);for(s=0;s<g.length;s++)n(g[s])||(g[s]=d);for(s=g.length;s<r.length;s++)g.push(d);if(l.barwidth=g,void 0===f){for(u=[],s=0;s<r.length;s++)u.push(h+(d-g[s])/2);l.poffset=u}}else void 0!==p&&(l.barwidth=p,void 0===f&&(l.poffset=h+(d-p)/2))}}function p(t,e,r){for(var n=r.traces,i=x(e),a=0;a<n.length;a++)for(var o=n[a],s=o[0].t,l=s.poffset,c=Array.isArray(l),u=s.barwidth,f=Array.isArray(u),h=0;h<o.length;h++){var p=o[h],d=p.w=f?u[h]:u;p[i]=p.p+(c?l[h]:l)+d/2}}function d(t,e,r,n){var i=r.traces,a=r.distinctPositions,o=a[0],l=r.minDiff,c=l/2;s.minDtick(e,l,o,n);for(var u=Math.min.apply(Math,a)-c,f=Math.max.apply(Math,a)+c,h=0;h<i.length;h++){var p=i[h],d=p[0],g=d.trace;if(void 0!==g.width||void 0!==g.offset)for(var v=d.t,m=v.poffset,y=v.barwidth,x=Array.isArray(m),_=Array.isArray(y),w=0;w<p.length;w++){var k=p[w],M=x?m[w]:m,A=_?y[w]:y,T=k.p+M,S=T+A;u=Math.min(u,T),f=Math.max(f,S)}}b(i,e,s.findExtremes(e,[u,f],{padded:!1}))}function g(t,e){n(t[0])?t[0]=Math.min(t[0],e):t[0]=e,n(t[1])?t[1]=Math.max(t[1],e):t[1]=e}function v(t,e,r){for(var i=r.traces,a=x(e),o=[null,null],l=0;l<i.length;l++)for(var c=i[l],u=0;u<c.length;u++){var f=c[u],h=f.b,p=h+f.s;f[a]=p,n(e.c2l(p))&&g(o,p),f.hasB&&n(e.c2l(h))&&g(o,h)}b(i,e,s.findExtremes(e,o,{tozero:!0,padded:!0}))}function m(t,e,r){for(var n=r.traces,i=0;i<n.length;i++)for(var o=n[i],s=0;s<o.length;s++){var l=o[s];l.s!==a&&r.put(l.p,l.b+l.s)}}function y(t,e,r){var i=r.traces,o=x(e),l=\\\"fraction\\\"===t._fullLayout.barnorm?1:100,c=l/1e9,u=e.l2c(e.c2l(0)),f=\\\"stack\\\"===t._fullLayout.barmode?l:u,h=[u,f],p=!1;function d(t){n(e.c2l(t))&&(t<u-c||t>f+c||!n(u))&&(p=!0,g(h,t))}for(var v=0;v<i.length;v++)for(var m=i[v],y=0;y<m.length;y++){var _=m[y];if(_.s!==a){var w=Math.abs(l/r.get(_.p,_.s));_.b*=w,_.s*=w;var k=_.b,M=k+_.s;_[o]=M,d(M),_.hasB&&d(k)}}var A=s.findExtremes(e,h,{tozero:!0,padded:p});b(i,e,A)}function x(t){return t._id.charAt(0)}function b(t,e,r){for(var n=0;n<t.length;n++)t[n][0].trace._extremes[e._id]=r}e.exports={crossTraceCalc:function(t,e){var r,n=e.xaxis,i=e.yaxis,a=t._fullData,s=t.calcdata,l=[],u=[];for(r=0;r<a.length;r++){var f=a[r];!0===f.visible&&o.traceIs(f,\\\"bar\\\")&&f.xaxis===n._id&&f.yaxis===i._id&&(\\\"h\\\"===f.orientation?l.push(s[r]):u.push(s[r]))}c(t,n,i,u),c(t,i,n,l)},setGroupPositions:c}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"./sieve.js\\\":849,\\\"fast-isnumeric\\\":214}],841:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../scatter/xy_defaults\\\"),s=t(\\\"../bar/style_defaults\\\"),l=t(\\\"./attributes\\\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}var f=n.coerceFont;if(o(t,e,c,u)){u(\\\"orientation\\\",e.x&&!e.y?\\\"h\\\":\\\"v\\\"),u(\\\"base\\\"),u(\\\"offset\\\"),u(\\\"width\\\"),u(\\\"text\\\"),u(\\\"hovertext\\\");var h=u(\\\"textposition\\\"),p=Array.isArray(h)||\\\"auto\\\"===h,d=p||\\\"outside\\\"===h;if(p||\\\"inside\\\"===h||d){var g=f(u,\\\"textfont\\\",c.font),v=n.extendFlat({},g);!(t.textfont&&t.textfont.color)&&delete v.color,f(u,\\\"insidetextfont\\\",v),d&&f(u,\\\"outsidetextfont\\\",g),u(\\\"constraintext\\\"),u(\\\"selected.textfont.color\\\"),u(\\\"unselected.textfont.color\\\"),u(\\\"cliponaxis\\\")}s(t,e,u,r,c);var m=a.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");m(t,e,i.defaultLine,{axis:\\\"y\\\"}),m(t,e,i.defaultLine,{axis:\\\"x\\\",inherit:\\\"y\\\"}),n.coerceSelectionMarkerOpacity(e,u)}else e.visible=!1}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../bar/style_defaults\\\":851,\\\"../scatter/xy_defaults\\\":1070,\\\"./attributes\\\":838}],842:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"tinycolor2\\\");r.coerceString=function(t,e,r){if(\\\"string\\\"==typeof e){if(e||!t.noBlank)return e}else if(\\\"number\\\"==typeof e&&!t.strict)return String(e);return void 0!==r?r:t.dflt},r.coerceNumber=function(t,e,r){if(n(e)){e=+e;var i=t.min,a=t.max;if(!(void 0!==i&&e<i||void 0!==a&&e>a))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return i(e).isValid()?e:void 0!==r?r:t.dflt},r.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},r.getValue=function(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r}},{\\\"fast-isnumeric\\\":214,tinycolor2:514}],843:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../scatter/fill_hover_text\\\");function s(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=e.mlw||t.marker.line.width;return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,a){var l,c,u,f,h,p,d,g=t.cd,v=g[0].trace,m=g[0].t,y=\\\"closest\\\"===a,x=t.maxHoverDistance,b=t.maxSpikeDistance;function _(t){return t[u]-t.w/2}function w(t){return t[u]+t.w/2}var k=y?_:function(t){return Math.min(_(t),t.p-m.bardelta/2)},M=y?w:function(t){return Math.max(w(t),t.p+m.bardelta/2)};function A(t,e){return n.inbox(t-l,e-l,x+Math.min(1,Math.abs(e-t)/d)-1)}function T(t){return A(k(t),M(t))}function S(t){return n.inbox(t.b-c,t[f]-c,x+(t[f]-c)/(t[f]-t.b)-1)}\\\"h\\\"===v.orientation?(l=r,c=e,u=\\\"y\\\",f=\\\"x\\\",h=S,p=T):(l=e,c=r,u=\\\"x\\\",f=\\\"y\\\",p=S,h=T);var C=t[u+\\\"a\\\"],E=t[f+\\\"a\\\"];d=Math.abs(C.r2c(C.range[1])-C.r2c(C.range[0]));var L=n.getDistanceFunction(a,h,p,function(t){return(h(t)+p(t))/2});if(n.getClosest(g,L,t),!1!==t.index){y||(k=function(t){return Math.min(_(t),t.p-m.bargroupwidth/2)},M=function(t){return Math.max(w(t),t.p+m.bargroupwidth/2)});var z=g[t.index],O=v.base?z.b+z.s:z.s;t[f+\\\"0\\\"]=t[f+\\\"1\\\"]=E.c2p(z[f],!0),t[f+\\\"LabelVal\\\"]=O;var I=m.extents[m.extents.round(z.p)];return t[u+\\\"0\\\"]=C.c2p(y?k(z):I[0],!0),t[u+\\\"1\\\"]=C.c2p(y?M(z):I[1],!0),t[u+\\\"LabelVal\\\"]=z.p,t.spikeDistance=(S(z)+function(t){return A(_(t),w(t))}(z))/2+b-x,t[u+\\\"Spike\\\"]=C.c2p(z.p,!0),t.color=s(v,z),o(z,v,t),i.getComponentMethod(\\\"errorbars\\\",\\\"hoverInfo\\\")(z,v,t),[t]}},getTraceColor:s}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../registry\\\":828,\\\"../scatter/fill_hover_text\\\":1052}],844:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.layoutAttributes=t(\\\"./layout_attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),n.calc=t(\\\"./calc\\\"),n.crossTraceCalc=t(\\\"./cross_trace_calc\\\").crossTraceCalc,n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.arraysToCalcdata=t(\\\"./arrays_to_calcdata\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"./style\\\").style,n.styleOnSelect=t(\\\"./style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\").hoverPoints,n.selectPoints=t(\\\"./select\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"bar\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"bar\\\",\\\"oriented\\\",\\\"errorBarsOK\\\",\\\"showLegend\\\",\\\"zoomScale\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../scatter/marker_colorbar\\\":1062,\\\"./arrays_to_calcdata\\\":837,\\\"./attributes\\\":838,\\\"./calc\\\":839,\\\"./cross_trace_calc\\\":840,\\\"./defaults\\\":841,\\\"./hover\\\":843,\\\"./layout_attributes\\\":845,\\\"./layout_defaults\\\":846,\\\"./plot\\\":847,\\\"./select\\\":848,\\\"./style\\\":850}],845:[function(t,e,r){\\\"use strict\\\";e.exports={barmode:{valType:\\\"enumerated\\\",values:[\\\"stack\\\",\\\"group\\\",\\\"overlay\\\",\\\"relative\\\"],dflt:\\\"group\\\",editType:\\\"calc\\\"},barnorm:{valType:\\\"enumerated\\\",values:[\\\"\\\",\\\"fraction\\\",\\\"percent\\\"],dflt:\\\"\\\",editType:\\\"calc\\\"},bargap:{valType:\\\"number\\\",min:0,max:1,editType:\\\"calc\\\"},bargroupgap:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"calc\\\"}}},{}],846:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"./layout_attributes\\\");e.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},h=0;h<r.length;h++){var p=r[h];if(n.traceIs(p,\\\"bar\\\")&&p.visible){if(l=!0,\\\"overlay\\\"!==t.barmode&&\\\"stack\\\"!==t.barmode){var d=p.xaxis+p.yaxis;f[d]&&(u=!0),f[d]=!0}if(p.visible&&\\\"histogram\\\"===p.type)\\\"category\\\"!==i.getFromId({_fullLayout:e},p[\\\"v\\\"===p.orientation?\\\"xaxis\\\":\\\"yaxis\\\"]).type&&(c=!0)}}l&&(\\\"overlay\\\"!==s(\\\"barmode\\\")&&s(\\\"barnorm\\\"),s(\\\"bargap\\\",c&&!u?0:.2),s(\\\"bargroupgap\\\"))}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"./layout_attributes\\\":845}],847:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../lib/svg_text_utils\\\"),s=t(\\\"../../components/color\\\"),l=t(\\\"../../components/drawing\\\"),c=t(\\\"../../registry\\\"),u=t(\\\"./attributes\\\"),f=u.text,h=u.textposition,p=t(\\\"./helpers\\\"),d=t(\\\"./style\\\"),g=3;function v(t,e,r,n,i,a){var o;return i<1?o=\\\"scale(\\\"+i+\\\") \\\":(i=1,o=\\\"\\\"),\\\"translate(\\\"+(r-i*t)+\\\" \\\"+(n-i*e)+\\\")\\\"+o+(a?\\\"rotate(\\\"+a+\\\" \\\"+t+\\\" \\\"+e+\\\") \\\":\\\"\\\")}e.exports=function(t,e,r,u){var m=e.xaxis,y=e.yaxis,x=t._fullLayout,b=a.makeTraceGroups(u,r,\\\"trace bars\\\").each(function(r){var c=n.select(this),u=r[0],b=u.trace;e.isRangePlot||(u.node3=c);var _=a.ensureSingle(c,\\\"g\\\",\\\"points\\\").selectAll(\\\"g.point\\\").data(a.identity);_.enter().append(\\\"g\\\").classed(\\\"point\\\",!0),_.exit().remove(),_.each(function(c,u){var _,w,k,M,A=n.select(this);if(\\\"h\\\"===b.orientation?(k=y.c2p(c.p0,!0),M=y.c2p(c.p1,!0),_=m.c2p(c.s0,!0),w=m.c2p(c.s1,!0),c.ct=[w,(k+M)/2]):(_=m.c2p(c.p0,!0),w=m.c2p(c.p1,!0),k=y.c2p(c.s0,!0),M=y.c2p(c.s1,!0),c.ct=[(_+w)/2,M]),i(_)&&i(w)&&i(k)&&i(M)&&_!==w&&k!==M){var T=(c.mlw+1||b.marker.line.width+1||(c.trace?c.trace.marker.line.width:0)+1)-1,S=n.round(T/2%1,2);if(!t._context.staticPlot){var C=s.opacity(c.mc||b.marker.color)<1||T>.01?E:function(t,e){return Math.abs(t-e)>=2?E(t):t>e?Math.ceil(t):Math.floor(t)};_=C(_,w),w=C(w,_),k=C(k,M),M=C(M,k)}a.ensureSingle(A,\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").attr(\\\"d\\\",\\\"M\\\"+_+\\\",\\\"+k+\\\"V\\\"+M+\\\"H\\\"+w+\\\"V\\\"+k+\\\"Z\\\").call(l.setClipUrl,e.layerClipId),function(t,e,r,n,i,s,c,u){var m;function y(e,r,n){var i=a.ensureSingle(e,\\\"text\\\").text(r).attr({class:\\\"bartext bartext-\\\"+m,transform:\\\"\\\",\\\"text-anchor\\\":\\\"middle\\\",\\\"data-notex\\\":1}).call(l.font,n).call(o.convertToTspans,t);return i}var x=r[0].trace,b=x.orientation,_=function(t,e){var r=p.getValue(t.text,e);return p.coerceString(f,r)}(x,n);if(m=function(t,e){var r=p.getValue(t.textposition,e);return p.coerceEnumerated(h,r)}(x,n),!_||\\\"none\\\"===m)return void e.select(\\\"text\\\").remove();var w,k,M,A,T,S,C=t._fullLayout.font,E=d.getBarColor(r[n],x),L=d.getInsideTextFont(x,n,C,E),z=d.getOutsideTextFont(x,n,C),O=t._fullLayout.barmode,I=\\\"relative\\\"===O,P=\\\"stack\\\"===O||I,D=r[n],R=!P||D._outmost,B=Math.abs(s-i)-2*g,F=Math.abs(u-c)-2*g;\\\"outside\\\"===m&&(R||D.hasB||(m=\\\"inside\\\"));if(\\\"auto\\\"===m)if(R){m=\\\"inside\\\",w=y(e,_,L),k=l.bBox(w.node()),M=k.width,A=k.height;var N=M>0&&A>0,j=M<=B&&A<=F,V=M<=F&&A<=B,U=\\\"h\\\"===b?B>=M*(F/A):F>=A*(B/M);N&&(j||V||U)?m=\\\"inside\\\":(m=\\\"outside\\\",w.remove(),w=null)}else m=\\\"inside\\\";if(!w&&(w=y(e,_,\\\"outside\\\"===m?z:L),k=l.bBox(w.node()),M=k.width,A=k.height,M<=0||A<=0))return void w.remove();\\\"outside\\\"===m?(S=\\\"both\\\"===x.constraintext||\\\"outside\\\"===x.constraintext,T=function(t,e,r,n,i,a,o){var s,l=\\\"h\\\"===a?Math.abs(n-r):Math.abs(e-t);l>2*g&&(s=g);var c=1;o&&(c=\\\"h\\\"===a?Math.min(1,l/i.height):Math.min(1,l/i.width));var u,f,h,p,d=(i.left+i.right)/2,m=(i.top+i.bottom)/2;u=c*i.width,f=c*i.height,\\\"h\\\"===a?e<t?(h=e-s-u/2,p=(r+n)/2):(h=e+s+u/2,p=(r+n)/2):n>r?(h=(t+e)/2,p=n+s+f/2):(h=(t+e)/2,p=n-s-f/2);return v(d,m,h,p,c,!1)}(i,s,c,u,k,b,S)):(S=\\\"both\\\"===x.constraintext||\\\"inside\\\"===x.constraintext,T=function(t,e,r,n,i,a,o){var s,l,c,u,f,h,p,d=i.width,m=i.height,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=Math.abs(e-t),_=Math.abs(n-r);b>2*g&&_>2*g?(b-=2*(f=g),_-=2*f):f=0;d<=b&&m<=_?(h=!1,p=1):d<=_&&m<=b?(h=!0,p=1):d<m==b<_?(h=!1,p=o?Math.min(b/d,_/m):1):(h=!0,p=o?Math.min(_/d,b/m):1);h&&(h=90);h?(s=p*m,l=p*d):(s=p*d,l=p*m);\\\"h\\\"===a?e<t?(c=e+f+s/2,u=(r+n)/2):(c=e-f-s/2,u=(r+n)/2):n>r?(c=(t+e)/2,u=n-f-l/2):(c=(t+e)/2,u=n+f+l/2);return v(y,x,c,u,p,h)}(i,s,c,u,k,b,S));w.attr(\\\"transform\\\",T)}(t,A,r,u,_,w,k,M),e.layerClipId&&l.hideOutsideRangePoint(c,A.select(\\\"text\\\"),m,y,b.xcalendar,b.ycalendar)}else A.remove();function E(t){return 0===x.bargap&&0===x.bargroupgap?n.round(Math.round(t)-S,2):t}});var w=!1===u.trace.cliponaxis;l.setClipUrl(c,w?null:e.layerClipId)});c.getComponentMethod(\\\"errorbars\\\",\\\"plot\\\")(b,e)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../registry\\\":828,\\\"./attributes\\\":838,\\\"./helpers\\\":842,\\\"./style\\\":850,d3:148,\\\"fast-isnumeric\\\":214}],848:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[];if(!1===e)for(r=0;r<n.length;r++)n[r].selected=0;else for(r=0;r<n.length;r++){var s=n[r];e.contains(s.ct,!1,r,t)?(o.push({pointNumber:r,x:i.c2d(s.x),y:a.c2d(s.y)}),s.selected=1):s.selected=0}return o}},{}],849:[function(t,e,r){\\\"use strict\\\";e.exports=a;var n=t(\\\"../../lib\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM;function a(t,e,r){this.traces=t,this.separateNegativeValues=e,this.dontMergeOverlappingData=r;for(var a=1/0,o=[],s=0;s<t.length;s++){for(var l=t[s],c=0;c<l.length;c++){var u=l[c];u.p!==i&&o.push(u.p)}l[0]&&l[0].width1&&(a=Math.min(l[0].width1,a))}this.positions=o;var f=n.distinctVals(o);this.distinctPositions=f.vals,1===f.vals.length&&a!==1/0?this.minDiff=a:this.minDiff=Math.min(f.minDiff,a),this.binWidth=this.minDiff,this.bins={}}a.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},a.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},a.prototype.getLabel=function(t,e){return(e<0&&this.separateNegativeValues?\\\"v\\\":\\\"^\\\")+(this.dontMergeOverlappingData?t:Math.round(t/this.binWidth))}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696}],850:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../registry\\\"),l=t(\\\"./attributes\\\"),c=l.textfont,u=l.insidetextfont,f=l.outsidetextfont,h=t(\\\"./helpers\\\");function p(t,e,r){var i=t.selectAll(\\\"path\\\"),o=t.selectAll(\\\"text\\\");a.pointStyle(i,e,r),o.each(function(t){var i=n.select(this),o=d(i,t,e,r);a.font(i,o)})}function d(t,e,r,n){var i=n._fullLayout.font,a=r.textfont;if(t.classed(\\\"bartext-inside\\\")){var o=x(e,r);a=v(r,e.i,i,o)}else t.classed(\\\"bartext-outside\\\")&&(a=m(r,e.i,i));return a}function g(t,e,r){return y(c,t.textfont,e,r)}function v(t,e,r,n){var a=g(t,e,r);return(void 0===t._input.textfont||void 0===t._input.textfont.color||Array.isArray(t.textfont.color)&&void 0===t.textfont.color[e])&&(a={color:i.contrast(n),family:a.family,size:a.size}),y(u,t.insidetextfont,e,a)}function m(t,e,r){var n=g(t,e,r);return y(f,t.outsidetextfont,e,n)}function y(t,e,r,n){e=e||{};var i=h.getValue(e.family,r),a=h.getValue(e.size,r),o=h.getValue(e.color,r);return{family:h.coerceString(t.family,i,n.family),size:h.coerceNumber(t.size,a,n.size),color:h.coerceColor(t.color,o,n.color)}}function x(t,e){return t.mc||e.marker.color}e.exports={style:function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.trace.bars\\\"),i=r.size(),a=t._fullLayout;r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}).each(function(t){(\\\"stack\\\"===a.barmode&&i>1||0===a.bargap&&0===a.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\\\"shape-rendering\\\",\\\"crispEdges\\\")}),r.selectAll(\\\"g.points\\\").each(function(e){p(n.select(this),e[0].trace,t)}),s.getComponentMethod(\\\"errorbars\\\",\\\"style\\\")(r)},styleOnSelect:function(t,e){var r=e[0].node3,i=e[0].trace;i.selectedpoints?function(t,e,r){a.selectedPointStyle(t.selectAll(\\\"path\\\"),e),function(t,e,r){t.each(function(t){var i,s=n.select(this);if(t.selected){i=o.extendFlat({},d(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)})}(t.selectAll(\\\"text\\\"),e,r)}(r,i,t):p(r,i,t)},getInsideTextFont:v,getOutsideTextFont:m,getBarColor:x}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":838,\\\"./helpers\\\":842,d3:148}],851:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\");e.exports=function(t,e,r,o,s){r(\\\"marker.color\\\",o),i(t,\\\"marker\\\")&&a(t,e,s,r,{prefix:\\\"marker.\\\",cLetter:\\\"c\\\"}),r(\\\"marker.line.color\\\",n.defaultLine),i(t,\\\"marker.line\\\")&&a(t,e,s,r,{prefix:\\\"marker.line.\\\",cLetter:\\\"c\\\"}),r(\\\"marker.line.width\\\"),r(\\\"marker.opacity\\\"),r(\\\"selected.marker.color\\\"),r(\\\"unselected.marker.color\\\")}},{\\\"../../components/color\\\":570,\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584}],852:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/extend\\\").extendFlat,i=t(\\\"../scatterpolar/attributes\\\"),a=t(\\\"../bar/attributes\\\");e.exports={r:i.r,theta:i.theta,r0:i.r0,dr:i.dr,theta0:i.theta0,dtheta:i.dtheta,thetaunit:i.thetaunit,base:n({},a.base,{}),offset:n({},a.offset,{}),width:n({},a.width,{}),text:n({},a.text,{}),marker:a.marker,hoverinfo:i.hoverinfo,selected:a.selected,unselected:a.unselected}},{\\\"../../lib/extend\\\":685,\\\"../bar/attributes\\\":838,\\\"../scatterpolar/attributes\\\":1106}],853:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/has_colorscale\\\"),i=t(\\\"../../components/colorscale/calc\\\"),a=t(\\\"../bar/arrays_to_calcdata\\\"),o=t(\\\"../bar/cross_trace_calc\\\").setGroupPositions,s=t(\\\"../scatter/calc_selection\\\"),l=t(\\\"../../registry\\\").traceIs,c=t(\\\"../../lib\\\").extendFlat;e.exports={calc:function(t,e){for(var r=t._fullLayout,o=e.subplot,l=r[o].radialaxis,c=r[o].angularaxis,u=l.makeCalcdata(e,\\\"r\\\"),f=c.makeCalcdata(e,\\\"theta\\\"),h=e._length,p=new Array(h),d=u,g=f,v=0;v<h;v++)p[v]={p:g[v],s:d[v]};function m(t){var r=e[t];void 0!==r&&(e[\\\"_\\\"+t]=Array.isArray(r)?c.makeCalcdata(e,t):c.d2c(r,e.thetaunit))}return\\\"linear\\\"===c.type&&(m(\\\"width\\\"),m(\\\"offset\\\")),n(e,\\\"marker\\\")&&i(e,e.marker.color,\\\"marker\\\",\\\"c\\\"),n(e,\\\"marker.line\\\")&&i(e,e.marker.line.color,\\\"marker.line\\\",\\\"c\\\"),a(p,e),s(p,e),p},crossTraceCalc:function(t,e,r){for(var n=t.calcdata,i=[],a=0;a<n.length;a++){var s=n[a],u=s[0].trace;!0===u.visible&&l(u,\\\"bar\\\")&&u.subplot===r&&i.push(s)}var f=c({},e.radialaxis,{_id:\\\"x\\\"}),h=e.angularaxis;o({_fullLayout:e},h,f,i)}}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../bar/arrays_to_calcdata\\\":837,\\\"../bar/cross_trace_calc\\\":840,\\\"../scatter/calc_selection\\\":1046}],854:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatterpolar/defaults\\\").handleRThetaDefaults,a=t(\\\"../bar/style_defaults\\\"),o=t(\\\"./attributes\\\");e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}i(t,e,s,l)?(l(\\\"thetaunit\\\"),l(\\\"base\\\"),l(\\\"offset\\\"),l(\\\"width\\\"),l(\\\"text\\\"),a(t,e,l,r,s),n.coerceSelectionMarkerOpacity(e,l)):e.visible=!1}},{\\\"../../lib\\\":696,\\\"../bar/style_defaults\\\":851,\\\"../scatterpolar/defaults\\\":1108,\\\"./attributes\\\":852}],855:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../bar/hover\\\").getTraceColor,o=t(\\\"../scatter/fill_hover_text\\\"),s=t(\\\"../scatterpolar/hover\\\").makeHoverPointText,l=t(\\\"../../plots/polar/helpers\\\").isPtInsidePolygon;e.exports=function(t,e,r){var c=t.cd,u=c[0].trace,f=t.subplot,h=f.radialAxis,p=f.angularAxis,d=f.vangles,g=d?l:i.isPtInsideSector,v=t.maxHoverDistance,m=p._period||2*Math.PI,y=Math.abs(h.g2p(Math.sqrt(e*e+r*r))),x=Math.atan2(r,e);h.range[0]>h.range[1]&&(x+=Math.PI);if(n.getClosest(c,function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?v+Math.min(1,Math.abs(t.thetag1-t.thetag0)/m)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0},t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,f,t),t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\\\"left\\\"),[t]}}},{\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../plots/polar/helpers\\\":811,\\\"../bar/hover\\\":843,\\\"../scatter/fill_hover_text\\\":1052,\\\"../scatterpolar/hover\\\":1109}],856:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"barpolar\\\",basePlotModule:t(\\\"../../plots/polar\\\"),categories:[\\\"polar\\\",\\\"bar\\\",\\\"showLegend\\\"],attributes:t(\\\"./attributes\\\"),layoutAttributes:t(\\\"./layout_attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),supplyLayoutDefaults:t(\\\"./layout_defaults\\\"),calc:t(\\\"./calc\\\").calc,crossTraceCalc:t(\\\"./calc\\\").crossTraceCalc,plot:t(\\\"./plot\\\"),colorbar:t(\\\"../scatter/marker_colorbar\\\"),style:t(\\\"../bar/style\\\").style,hoverPoints:t(\\\"./hover\\\"),selectPoints:t(\\\"../bar/select\\\"),meta:{}}},{\\\"../../plots/polar\\\":812,\\\"../bar/select\\\":848,\\\"../bar/style\\\":850,\\\"../scatter/marker_colorbar\\\":1062,\\\"./attributes\\\":852,\\\"./calc\\\":853,\\\"./defaults\\\":854,\\\"./hover\\\":855,\\\"./layout_attributes\\\":857,\\\"./layout_defaults\\\":858,\\\"./plot\\\":859}],857:[function(t,e,r){\\\"use strict\\\";e.exports={barmode:{valType:\\\"enumerated\\\",values:[\\\"stack\\\",\\\"overlay\\\"],dflt:\\\"stack\\\",editType:\\\"calc\\\"},bargap:{valType:\\\"number\\\",dflt:.1,min:0,max:1,editType:\\\"calc\\\"}}},{}],858:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\");e.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l<r.length;l++){var c=r[l];\\\"barpolar\\\"===c.type&&!0===c.visible&&(o[a=c.subplot]||(s(\\\"barmode\\\"),s(\\\"bargap\\\"),o[a]=1))}}},{\\\"../../lib\\\":696,\\\"./layout_attributes\\\":857}],859:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../components/drawing\\\"),s=t(\\\"../../plots/polar/helpers\\\");e.exports=function(t,e,r){var l=e.xaxis,c=e.yaxis,u=e.radialAxis,f=e.angularAxis,h=function(t){var e=t.cxx,r=t.cyy;if(t.vangles)return function(n,i,o,l){var c,u;a.angleDelta(o,l)>0?(c=o,u=l):(c=l,u=o);var f=s.findEnclosingVertexAngles(c,t.vangles)[0],h=s.findEnclosingVertexAngles(u,t.vangles)[1],p=[f,(c+u)/2,h];return s.pathPolygonAnnulus(n,i,c,u,p,e,r)};return function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select(\\\"g.barlayer\\\");a.makeTraceGroups(p,r,\\\"trace bars\\\").each(function(t){var r=t[0].node3=n.select(this),s=a.ensureSingle(r,\\\"g\\\",\\\"points\\\").selectAll(\\\"g.point\\\").data(a.identity);s.enter().append(\\\"g\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").style(\\\"stroke-miterlimit\\\",2).classed(\\\"point\\\",!0),s.exit().remove(),s.each(function(t){var e,r=n.select(this),o=t.rp0=u.c2p(t.s0),s=t.rp1=u.c2p(t.s1),p=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(i(o)&&i(s)&&i(p)&&i(d)&&o!==s&&p!==d){var g=u.c2g(t.s1),v=(p+d)/2;t.ct=[l.c2p(g*Math.cos(v)),c.c2p(g*Math.sin(v))],e=h(o,s,p,d)}else e=\\\"M0,0Z\\\";a.ensureSingle(r,\\\"path\\\").attr(\\\"d\\\",e)}),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null)})}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../plots/polar/helpers\\\":811,d3:148,\\\"fast-isnumeric\\\":214}],860:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/color/attributes\\\"),a=t(\\\"../../lib/extend\\\").extendFlat,o=n.marker,s=o.line;e.exports={y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},x0:{valType:\\\"any\\\",editType:\\\"calc+clearAxisTypes\\\"},y0:{valType:\\\"any\\\",editType:\\\"calc+clearAxisTypes\\\"},name:{valType:\\\"string\\\",editType:\\\"calc+clearAxisTypes\\\"},text:a({},n.text,{}),whiskerwidth:{valType:\\\"number\\\",min:0,max:1,dflt:.5,editType:\\\"calc\\\"},notched:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},notchwidth:{valType:\\\"number\\\",min:0,max:.5,dflt:.25,editType:\\\"calc\\\"},boxpoints:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"outliers\\\",\\\"suspectedoutliers\\\",!1],dflt:\\\"outliers\\\",editType:\\\"calc\\\"},boxmean:{valType:\\\"enumerated\\\",values:[!0,\\\"sd\\\",!1],dflt:!1,editType:\\\"calc\\\"},jitter:{valType:\\\"number\\\",min:0,max:1,editType:\\\"calc\\\"},pointpos:{valType:\\\"number\\\",min:-2,max:2,editType:\\\"calc\\\"},orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],editType:\\\"calc+clearAxisTypes\\\"},marker:{outliercolor:{valType:\\\"color\\\",dflt:\\\"rgba(0, 0, 0, 0)\\\",editType:\\\"style\\\"},symbol:a({},o.symbol,{arrayOk:!1,editType:\\\"plot\\\"}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1,editType:\\\"style\\\"}),size:a({},o.size,{arrayOk:!1,editType:\\\"calc\\\"}),color:a({},o.color,{arrayOk:!1,editType:\\\"style\\\"}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine,editType:\\\"style\\\"}),width:a({},s.width,{arrayOk:!1,dflt:0,editType:\\\"style\\\"}),outliercolor:{valType:\\\"color\\\",editType:\\\"style\\\"},outlierwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"style\\\"},editType:\\\"style\\\"},editType:\\\"plot\\\"},line:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,dflt:2,editType:\\\"style\\\"},editType:\\\"plot\\\"},fillcolor:n.fillcolor,selected:{marker:n.selected.marker,editType:\\\"style\\\"},unselected:{marker:n.unselected.marker,editType:\\\"style\\\"},hoveron:{valType:\\\"flaglist\\\",flags:[\\\"boxes\\\",\\\"points\\\"],dflt:\\\"boxes+points\\\",editType:\\\"style\\\"}}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib/extend\\\":685,\\\"../scatter/attributes\\\":1044}],861:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=i._,o=t(\\\"../../plots/cartesian/axes\\\");function s(t,e,r){var n={text:\\\"tx\\\"};for(var i in n)Array.isArray(e[i])&&(t[n[i]]=e[i][r])}function l(t,e){return t.v-e.v}function c(t){return t.v}e.exports=function(t,e){var r,u,f,h,p,d=t._fullLayout,g=o.getFromId(t,e.xaxis||\\\"x\\\"),v=o.getFromId(t,e.yaxis||\\\"y\\\"),m=[],y=\\\"violin\\\"===e.type?\\\"_numViolins\\\":\\\"_numBoxes\\\";\\\"h\\\"===e.orientation?(u=g,f=\\\"x\\\",h=v,p=\\\"y\\\"):(u=v,f=\\\"y\\\",h=g,p=\\\"x\\\");var x=u.makeCalcdata(e,f),b=function(t,e,r,a,o){if(e in t)return r.makeCalcdata(t,e);var s;s=e+\\\"0\\\"in t?t[e+\\\"0\\\"]:\\\"name\\\"in t&&(\\\"category\\\"===r.type||n(t.name)&&-1!==[\\\"linear\\\",\\\"log\\\"].indexOf(r.type)||i.isDateTime(t.name)&&\\\"date\\\"===r.type)?t.name:o;var l=r.d2c(s,0,t[e+\\\"calendar\\\"]);return a.map(function(){return l})}(e,p,h,x,d[y]),_=i.distinctVals(b),w=_.vals,k=_.minDiff/2,M=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i<r;i++)n[i]=t[i]-e;return n[r]=t[r-1]+e,n}(w,k),A=w.length,T=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=[];return e}(A);for(r=0;r<e._length;r++){var S=x[r];if(n(S)){var C=i.findBin(b[r],M);if(C>=0&&C<A){var E={v:S,i:r};s(E,e,r),T[C].push(E)}}}for(r=0;r<A;r++)if(T[r].length>0){var L=T[r].sort(l),z=L.map(c),O=z.length,I={pos:w[r],pts:L};I.min=z[0],I.max=z[O-1],I.mean=i.mean(z,O),I.sd=i.stdev(z,O,I.mean),I.q1=i.interp(z,.25),I.med=i.interp(z,.5),I.q3=i.interp(z,.75),I.lf=Math.min(I.q1,z[Math.min(i.findBin(2.5*I.q1-1.5*I.q3,z,!0)+1,O-1)]),I.uf=Math.max(I.q3,z[Math.max(i.findBin(2.5*I.q3-1.5*I.q1,z),0)]),I.lo=4*I.q1-3*I.q3,I.uo=4*I.q3-3*I.q1;var P=1.57*(I.q3-I.q1)/Math.sqrt(O);I.ln=I.med-P,I.un=I.med+P,m.push(I)}!function(t,e){if(i.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r<t.length;r++){for(var n=t[r].pts||[],a={},o=0;o<n.length;o++)a[n[o].i]=o;i.tagSelected(n,e,a)}}(m,e);var D=o.findExtremes(u,x,{padded:!0});return e._extremes[u._id]=D,m.length>0?(m[0].t={num:d[y],dPos:k,posLetter:p,valLetter:f,labels:{med:a(t,\\\"median:\\\"),min:a(t,\\\"min:\\\"),q1:a(t,\\\"q1:\\\"),q3:a(t,\\\"q3:\\\"),max:a(t,\\\"max:\\\"),mean:\\\"sd\\\"===e.boxmean?a(t,\\\"mean \\\\xb1 \\\\u03c3:\\\"):a(t,\\\"mean:\\\"),lf:a(t,\\\"lower fence:\\\"),uf:a(t,\\\"upper fence:\\\")}},d[y]++,m):[{t:{empty:!0}}]}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"fast-isnumeric\\\":214}],862:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\"),a=[\\\"v\\\",\\\"h\\\"];function o(t,e,r,a,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=[],p=\\\"violin\\\"===t?\\\"_numViolins\\\":\\\"_numBoxes\\\";for(s=0;s<r.length;s++)for(c=u[r[s]],l=0;l<c.length;l++)h.push(c[l].pos);if(h.length){var d=i.distinctVals(h),g=d.minDiff/2;h.length===d.vals.length&&(f[p]=1),n.minDtick(a,d.minDiff,d.vals[0],!0);var v=(1-f[t+\\\"gap\\\"])*(1-f[t+\\\"groupgap\\\"])*g/f[p],m=n.findExtremes(a,d.vals,{vpadminus:g+o[0]*v,vpadplus:g+o[1]*v});for(s=0;s<r.length;s++)(c=u[r[s]])[0].t.dPos=g,c[0].trace._extremes[a._id]=m}}e.exports={crossTraceCalc:function(t,e){for(var r=t.calcdata,n=e.xaxis,i=e.yaxis,s=0;s<a.length;s++){for(var l=a[s],c=\\\"h\\\"===l?i:n,u=[],f=0,h=0,p=0;p<r.length;p++){var d=r[p],g=d[0].t,v=d[0].trace;!0!==v.visible||\\\"box\\\"!==v.type&&\\\"candlestick\\\"!==v.type||g.empty||(v.orientation||\\\"v\\\")!==l||v.xaxis!==n._id||v.yaxis!==i._id||(u.push(p),v.boxpoints&&(f=Math.max(f,v.jitter-v.pointpos-1),h=Math.max(h,v.jitter+v.pointpos-1)))}o(\\\"box\\\",t,u,c,[f,h])}},setPositionOffset:o}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],863:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"./attributes\\\");function s(t,e,r,n){var a,o,s=r(\\\"y\\\"),l=r(\\\"x\\\"),c=l&&l.length;if(s&&s.length)a=\\\"v\\\",c?o=Math.min(l.length,s.length):(r(\\\"x0\\\"),o=s.length);else{if(!c)return void(e.visible=!1);a=\\\"h\\\",r(\\\"y0\\\"),o=l.length}e._length=o,i.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\"],n),r(\\\"orientation\\\",a)}function l(t,e,r,i){var a=i.prefix,s=n.coerce2(t,e,o,\\\"marker.outliercolor\\\"),l=r(\\\"marker.line.outliercolor\\\"),c=r(a+\\\"points\\\",s||l?\\\"suspectedoutliers\\\":void 0);c?(r(\\\"jitter\\\",\\\"all\\\"===c?.3:0),r(\\\"pointpos\\\",\\\"all\\\"===c?-1.5:0),r(\\\"marker.symbol\\\"),r(\\\"marker.opacity\\\"),r(\\\"marker.size\\\"),r(\\\"marker.color\\\",e.line.color),r(\\\"marker.line.color\\\"),r(\\\"marker.line.width\\\"),\\\"suspectedoutliers\\\"===c&&(r(\\\"marker.line.outliercolor\\\",e.marker.color),r(\\\"marker.line.outlierwidth\\\")),r(\\\"selected.marker.color\\\"),r(\\\"unselected.marker.color\\\"),r(\\\"selected.marker.size\\\"),r(\\\"unselected.marker.size\\\"),r(\\\"text\\\")):delete e.marker,r(\\\"hoveron\\\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function c(r,i){return n.coerce(t,e,o,r,i)}s(t,e,c,i),!1!==e.visible&&(c(\\\"line.color\\\",(t.marker||{}).color||r),c(\\\"line.width\\\"),c(\\\"fillcolor\\\",a.addOpacity(e.line.color,.5)),c(\\\"whiskerwidth\\\"),c(\\\"boxmean\\\"),c(\\\"notched\\\",void 0!==t.notchwidth)&&c(\\\"notchwidth\\\"),l(t,e,c,{prefix:\\\"box\\\"}))},handleSampleDefaults:s,handlePointsDefaults:l}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":860}],864:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return e.hoverOnBox&&(t.hoverOnBox=e.hoverOnBox),\\\"xVal\\\"in e&&(t.x=e.xVal),\\\"yVal\\\"in e&&(t.y=e.yVal),e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),t}},{}],865:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/fx\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../scatter/fill_hover_text\\\");function l(t,e,r,s){var l,c,u,f,h,p,d,g,v,m,y,x,b=t.cd,_=t.xa,w=t.ya,k=b[0].trace,M=b[0].t,A=\\\"violin\\\"===k.type,T=[],S=M.bdPos,C=M.wHover,E=function(t){return t.pos+M.bPos-p};A&&\\\"both\\\"!==k.side?(\\\"positive\\\"===k.side&&(v=function(t){var e=E(t);return a.inbox(e,e+C,m)}),\\\"negative\\\"===k.side&&(v=function(t){var e=E(t);return a.inbox(e-C,e,m)})):v=function(t){var e=E(t);return a.inbox(e-C,e+C,m)},x=A?function(t){return a.inbox(t.span[0]-h,t.span[1]-h,m)}:function(t){return a.inbox(t.min-h,t.max-h,m)},\\\"h\\\"===k.orientation?(h=e,p=r,d=x,g=v,l=\\\"y\\\",u=w,c=\\\"x\\\",f=_):(h=r,p=e,d=v,g=x,l=\\\"x\\\",u=_,c=\\\"y\\\",f=w);var L=Math.min(1,S/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function z(t){return(d(t)+g(t))/2}m=t.maxHoverDistance-L,y=t.maxSpikeDistance-L;var O=a.getDistanceFunction(s,d,g,z);if(a.getClosest(b,O,t),!1===t.index)return[];var I=b[t.index],P=k.line.color,D=(k.marker||{}).color;o.opacity(P)&&k.line.width?t.color=P:o.opacity(D)&&k.boxpoints?t.color=D:t.color=k.fillcolor,t[l+\\\"0\\\"]=u.c2p(I.pos+M.bPos-S,!0),t[l+\\\"1\\\"]=u.c2p(I.pos+M.bPos+S,!0),t[l+\\\"LabelVal\\\"]=I.pos;var R=l+\\\"Spike\\\";t.spikeDistance=z(I)*y/m,t[R]=u.c2p(I.pos,!0);var B={},F=[\\\"med\\\",\\\"min\\\",\\\"q1\\\",\\\"q3\\\",\\\"max\\\"];(k.boxmean||(k.meanline||{}).visible)&&F.push(\\\"mean\\\"),(k.boxpoints||k.points)&&F.push(\\\"lf\\\",\\\"uf\\\");for(var N=0;N<F.length;N++){var j=F[N];if(j in I&&!(I[j]in B)){B[I[j]]=!0;var V=I[j],U=f.c2p(V,!0),q=i.extendFlat({},t);q[c+\\\"0\\\"]=q[c+\\\"1\\\"]=U,q[c+\\\"LabelVal\\\"]=V,q[c+\\\"Label\\\"]=(M.labels?M.labels[j]+\\\" \\\":\\\"\\\")+n.hoverLabelText(f,V),q.hoverOnBox=!0,\\\"mean\\\"===j&&\\\"sd\\\"in I&&\\\"sd\\\"===k.boxmean&&(q[c+\\\"err\\\"]=I.sd),t.name=\\\"\\\",t.spikeDistance=void 0,t[R]=void 0,T.push(q)}}return T}function c(t,e,r){for(var n,o,l,c=t.cd,u=t.xa,f=t.ya,h=c[0].trace,p=u.c2p(e),d=f.c2p(r),g=a.quadrature(function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(u.c2p(t.x)-p)-e,1-3/e)},function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(f.c2p(t.y)-d)-e,1-3/e)}),v=!1,m=0;m<c.length;m++){o=c[m];for(var y=0;y<(o.pts||[]).length;y++){var x=g(l=o.pts[y]);x<=t.distance&&(t.distance=x,v=[m,y])}}if(!v)return!1;l=(o=c[v[0]]).pts[v[1]];var b=u.c2p(l.x,!0),_=f.c2p(l.y,!0),w=l.mrc||1;n=i.extendFlat({},t,{index:l.i,color:(h.marker||{}).color,name:h.name,x0:b-w,x1:b+w,xLabelVal:l.x,y0:_-w,y1:_+w,yLabelVal:l.y,spikeDistance:t.distance});var k=\\\"h\\\"===h.orientation?\\\"y\\\":\\\"x\\\",M=\\\"h\\\"===h.orientation?f:u;return n[k+\\\"Spike\\\"]=M.c2p(o.pos,!0),s(l,h,n),n}e.exports={hoverPoints:function(t,e,r,n){var i,a=t.cd[0].trace.hoveron,o=[];return-1!==a.indexOf(\\\"boxes\\\")&&(o=o.concat(l(t,e,r,n))),-1!==a.indexOf(\\\"points\\\")&&(i=c(t,e,r)),\\\"closest\\\"===n?i?[i]:o:i?(o.push(i),o):o},hoverOnBoxes:l,hoverOnPoints:c}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/fill_hover_text\\\":1052}],866:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.layoutAttributes=t(\\\"./layout_attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\").supplyDefaults,n.supplyLayoutDefaults=t(\\\"./layout_defaults\\\").supplyLayoutDefaults,n.calc=t(\\\"./calc\\\"),n.crossTraceCalc=t(\\\"./cross_trace_calc\\\").crossTraceCalc,n.plot=t(\\\"./plot\\\").plot,n.style=t(\\\"./style\\\").style,n.styleOnSelect=t(\\\"./style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\").hoverPoints,n.eventData=t(\\\"./event_data\\\"),n.selectPoints=t(\\\"./select\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"box\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"symbols\\\",\\\"oriented\\\",\\\"box-violin\\\",\\\"showLegend\\\",\\\"boxLayout\\\",\\\"zoomScale\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":860,\\\"./calc\\\":861,\\\"./cross_trace_calc\\\":862,\\\"./defaults\\\":863,\\\"./event_data\\\":864,\\\"./hover\\\":865,\\\"./layout_attributes\\\":867,\\\"./layout_defaults\\\":868,\\\"./plot\\\":869,\\\"./select\\\":870,\\\"./style\\\":871}],867:[function(t,e,r){\\\"use strict\\\";e.exports={boxmode:{valType:\\\"enumerated\\\",values:[\\\"group\\\",\\\"overlay\\\"],dflt:\\\"overlay\\\",editType:\\\"calc\\\"},boxgap:{valType:\\\"number\\\",min:0,max:1,dflt:.3,editType:\\\"calc\\\"},boxgroupgap:{valType:\\\"number\\\",min:0,max:1,dflt:.3,editType:\\\"calc\\\"}}},{}],868:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"./layout_attributes\\\");function o(t,e,r,i,a){for(var o,s=a+\\\"Layout\\\",l=0;l<r.length;l++)if(n.traceIs(r[l],s)){o=!0;break}o&&(i(a+\\\"mode\\\"),i(a+\\\"gap\\\"),i(a+\\\"groupgap\\\"))}e.exports={supplyLayoutDefaults:function(t,e,r){o(0,0,r,function(r,n){return i.coerce(t,e,a,r,n)},\\\"box\\\")},_supply:o}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./layout_attributes\\\":867}],869:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/drawing\\\"),o=5,s=.01;function l(t,e,r,a){var o,s,l=e.pos,c=e.val,u=a.bPos,f=a.wdPos||0,h=a.bPosPxOffset||0,p=r.whiskerwidth||0,d=r.notched||!1,g=d?1-2*r.notchwidth:1;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var v=t.selectAll(\\\"path.box\\\").data(\\\"violin\\\"!==r.type||r.box.visible?i.identity:[]);v.enter().append(\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").attr(\\\"class\\\",\\\"box\\\"),v.exit().remove(),v.each(function(t){var e=t.pos,a=l.c2p(e+u,!0)+h,v=l.c2p(e+u-o,!0)+h,m=l.c2p(e+u+s,!0)+h,y=l.c2p(e+u-f,!0)+h,x=l.c2p(e+u+f,!0)+h,b=l.c2p(e+u-o*g,!0)+h,_=l.c2p(e+u+s*g,!0)+h,w=c.c2p(t.q1,!0),k=c.c2p(t.q3,!0),M=i.constrain(c.c2p(t.med,!0),Math.min(w,k)+1,Math.max(w,k)-1),A=void 0===t.lf||!1===r.boxpoints,T=c.c2p(A?t.min:t.lf,!0),S=c.c2p(A?t.max:t.uf,!0),C=c.c2p(t.ln,!0),E=c.c2p(t.un,!0);\\\"h\\\"===r.orientation?n.select(this).attr(\\\"d\\\",\\\"M\\\"+M+\\\",\\\"+b+\\\"V\\\"+_+\\\"M\\\"+w+\\\",\\\"+v+\\\"V\\\"+m+(d?\\\"H\\\"+C+\\\"L\\\"+M+\\\",\\\"+_+\\\"L\\\"+E+\\\",\\\"+m:\\\"\\\")+\\\"H\\\"+k+\\\"V\\\"+v+(d?\\\"H\\\"+E+\\\"L\\\"+M+\\\",\\\"+b+\\\"L\\\"+C+\\\",\\\"+v:\\\"\\\")+\\\"ZM\\\"+w+\\\",\\\"+a+\\\"H\\\"+T+\\\"M\\\"+k+\\\",\\\"+a+\\\"H\\\"+S+(0===p?\\\"\\\":\\\"M\\\"+T+\\\",\\\"+y+\\\"V\\\"+x+\\\"M\\\"+S+\\\",\\\"+y+\\\"V\\\"+x)):n.select(this).attr(\\\"d\\\",\\\"M\\\"+b+\\\",\\\"+M+\\\"H\\\"+_+\\\"M\\\"+v+\\\",\\\"+w+\\\"H\\\"+m+(d?\\\"V\\\"+C+\\\"L\\\"+_+\\\",\\\"+M+\\\"L\\\"+m+\\\",\\\"+E:\\\"\\\")+\\\"V\\\"+k+\\\"H\\\"+v+(d?\\\"V\\\"+E+\\\"L\\\"+b+\\\",\\\"+M+\\\"L\\\"+v+\\\",\\\"+C:\\\"\\\")+\\\"ZM\\\"+a+\\\",\\\"+w+\\\"V\\\"+T+\\\"M\\\"+a+\\\",\\\"+k+\\\"V\\\"+S+(0===p?\\\"\\\":\\\"M\\\"+y+\\\",\\\"+T+\\\"H\\\"+x+\\\"M\\\"+y+\\\",\\\"+S+\\\"H\\\"+x))})}function c(t,e,r,n){var l=e.x,c=e.y,u=n.bdPos,f=n.bPos,h=r.boxpoints||r.points;i.seedPseudoRandom();var p=t.selectAll(\\\"g.points\\\").data(h?function(t){return t.forEach(function(t){t.t=n,t.trace=r}),t}:[]);p.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"points\\\"),p.exit().remove();var d=p.selectAll(\\\"path\\\").data(function(t){var e,n,a=\\\"all\\\"===h?t.pts:t.pts.filter(function(e){return e.v<t.lf||e.v>t.uf}),l=Math.max((t.max-t.min)/10,t.q3-t.q1),c=1e-9*l,p=l*s,d=[],g=0;if(r.jitter){if(0===l)for(g=1,d=new Array(a.length),e=0;e<a.length;e++)d[e]=1;else for(e=0;e<a.length;e++){var v=Math.max(0,e-o),m=a[v].v,y=Math.min(a.length-1,e+o),x=a[y].v;\\\"all\\\"!==h&&(a[e].v<t.lf?x=Math.min(x,t.lf):m=Math.max(m,t.uf));var b=Math.sqrt(p*(y-v)/(x-m+c))||0;b=i.constrain(Math.abs(b),0,1),d.push(b),g=Math.max(b,g)}n=2*r.jitter/(g||1)}for(e=0;e<a.length;e++){var _=a[e],w=_.v,k=r.jitter?n*d[e]*(i.pseudoRandom()-.5):0,M=t.pos+f+u*(r.pointpos+k);\\\"h\\\"===r.orientation?(_.y=M,_.x=w):(_.x=M,_.y=w),\\\"suspectedoutliers\\\"===h&&w<t.uo&&w>t.lo&&(_.so=!0)}return a});d.enter().append(\\\"path\\\").classed(\\\"point\\\",!0),d.exit().remove(),d.call(a.translatePoints,l,c)}function u(t,e,r,a){var o,s,l=e.pos,c=e.val,u=a.bPos,f=a.bPosPxOffset||0,h=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=t.selectAll(\\\"path.mean\\\").data(\\\"box\\\"===r.type&&r.boxmean||\\\"violin\\\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);p.enter().append(\\\"path\\\").attr(\\\"class\\\",\\\"mean\\\").style({fill:\\\"none\\\",\\\"vector-effect\\\":\\\"non-scaling-stroke\\\"}),p.exit().remove(),p.each(function(t){var e=l.c2p(t.pos+u,!0)+f,i=l.c2p(t.pos+u-o,!0)+f,a=l.c2p(t.pos+u+s,!0)+f,p=c.c2p(t.mean,!0),d=c.c2p(t.mean-t.sd,!0),g=c.c2p(t.mean+t.sd,!0);\\\"h\\\"===r.orientation?n.select(this).attr(\\\"d\\\",\\\"M\\\"+p+\\\",\\\"+i+\\\"V\\\"+a+(\\\"sd\\\"===h?\\\"m0,0L\\\"+d+\\\",\\\"+e+\\\"L\\\"+p+\\\",\\\"+i+\\\"L\\\"+g+\\\",\\\"+e+\\\"Z\\\":\\\"\\\")):n.select(this).attr(\\\"d\\\",\\\"M\\\"+i+\\\",\\\"+p+\\\"H\\\"+a+(\\\"sd\\\"===h?\\\"m0,0L\\\"+e+\\\",\\\"+d+\\\"L\\\"+i+\\\",\\\"+p+\\\"L\\\"+e+\\\",\\\"+g+\\\"Z\\\":\\\"\\\"))})}e.exports={plot:function(t,e,r,a){var o=t._fullLayout,s=e.xaxis,f=e.yaxis,h=o._numBoxes,p=1-o.boxgap,d=\\\"group\\\"===o.boxmode&&h>1;i.makeTraceGroups(a,r,\\\"trace boxes\\\").each(function(t){var r=n.select(this),i=t[0],a=i.t,g=i.trace;e.isRangePlot||(i.node3=r);var v,m,y=a.dPos*p*(1-o.boxgroupgap)/(d?h:1),x=d?2*a.dPos*((a.num+.5)/h-.5)*p:0,b=y*g.whiskerwidth;!0!==g.visible||a.empty?r.remove():(\\\"h\\\"===g.orientation?(v=f,m=s):(v=s,m=f),a.bPos=x,a.bdPos=y,a.wdPos=b,a.wHover=a.dPos*(d?p/h:1),l(r,{pos:v,val:m},g,a),c(r,{x:s,y:f},g,a),u(r,{pos:v,val:m},g,a))})},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,d3:148}],870:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++)i[r].pts[n].selected=0;else for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++){var l=i[r].pts[n],c=a.c2p(l.x),u=o.c2p(l.y);e.contains([c,u],null,l.i,t)?(s.push({pointNumber:l.i,x:a.c2d(l.x),y:o.c2d(l.y)}),l.selected=1):l.selected=0}return s}},{}],871:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../components/drawing\\\");e.exports={style:function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.trace.boxes\\\");r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),r.each(function(e){var r=n.select(this),o=e[0].trace,s=o.line.width;function l(t,e,r,n){t.style(\\\"stroke-width\\\",e+\\\"px\\\").call(i.stroke,r).call(i.fill,n)}var c=r.selectAll(\\\"path.box\\\");if(\\\"candlestick\\\"===o.type)c.each(function(t){var e=n.select(this),r=o[t.dir];l(e,r.line.width,r.line.color,r.fillcolor),e.style(\\\"opacity\\\",o.selectedpoints&&!t.selected?.3:1)});else{l(c,s,o.line.color,o.fillcolor),r.selectAll(\\\"path.mean\\\").style({\\\"stroke-width\\\":s,\\\"stroke-dasharray\\\":2*s+\\\"px,\\\"+s+\\\"px\\\"}).call(i.stroke,o.line.color);var u=r.selectAll(\\\"path.point\\\");a.pointStyle(u,o,t)}})},styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace,i=r.selectAll(\\\"path.point\\\");n.selectedpoints?a.selectedPointStyle(i,n):a.pointStyle(i,n,t)}}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,d3:148}],872:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").extendFlat,i=t(\\\"../ohlc/attributes\\\"),a=t(\\\"../box/attributes\\\");function o(t){return{line:{color:n({},a.line.color,{dflt:t}),width:a.line.width,editType:\\\"style\\\"},fillcolor:a.fillcolor,editType:\\\"style\\\"}}e.exports={x:i.x,open:i.open,high:i.high,low:i.low,close:i.close,line:{width:n({},a.line.width,{}),editType:\\\"style\\\"},increasing:o(i.increasing.line.color.dflt),decreasing:o(i.decreasing.line.color.dflt),text:i.text,whiskerwidth:n({},a.whiskerwidth,{dflt:0}),hoverlabel:i.hoverlabel}},{\\\"../../lib\\\":696,\\\"../box/attributes\\\":860,\\\"../ohlc/attributes\\\":992}],873:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../ohlc/calc\\\").calcCommon;function o(t,e,r,n){return{min:r,q1:Math.min(t,n),med:n,q3:Math.max(t,n),max:e}}e.exports=function(t,e){var r=t._fullLayout,s=i.getFromId(t,e.xaxis),l=i.getFromId(t,e.yaxis),c=s.makeCalcdata(e,\\\"x\\\"),u=a(t,e,c,l,o);return u.length?(n.extendFlat(u[0].t,{num:r._numBoxes,dPos:n.distinctVals(c).minDiff/2,posLetter:\\\"x\\\",valLetter:\\\"y\\\"}),r._numBoxes++,u):[{t:{empty:!0}}]}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../ohlc/calc\\\":993}],874:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../ohlc/ohlc_defaults\\\"),o=t(\\\"./attributes\\\");function s(t,e,r,n){var a=r(n+\\\".line.color\\\");r(n+\\\".line.width\\\",e.line.width),r(n+\\\".fillcolor\\\",i.addOpacity(a,.5))}e.exports=function(t,e,r,i){function l(r,i){return n.coerce(t,e,o,r,i)}a(t,e,l,i)?(l(\\\"line.width\\\"),s(t,e,l,\\\"increasing\\\"),s(t,e,l,\\\"decreasing\\\"),l(\\\"text\\\"),l(\\\"whiskerwidth\\\"),i._requestRangeslider[e.xaxis]=!0):e.visible=!1}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../ohlc/ohlc_defaults\\\":997,\\\"./attributes\\\":872}],875:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"candlestick\\\",basePlotModule:t(\\\"../../plots/cartesian\\\"),categories:[\\\"cartesian\\\",\\\"svg\\\",\\\"showLegend\\\",\\\"candlestick\\\",\\\"boxLayout\\\"],meta:{},attributes:t(\\\"./attributes\\\"),layoutAttributes:t(\\\"../box/layout_attributes\\\"),supplyLayoutDefaults:t(\\\"../box/layout_defaults\\\").supplyLayoutDefaults,crossTraceCalc:t(\\\"../box/cross_trace_calc\\\").crossTraceCalc,supplyDefaults:t(\\\"./defaults\\\"),calc:t(\\\"./calc\\\"),plot:t(\\\"../box/plot\\\").plot,layerName:\\\"boxlayer\\\",style:t(\\\"../box/style\\\").style,hoverPoints:t(\\\"../ohlc/hover\\\").hoverPoints,selectPoints:t(\\\"../ohlc/select\\\")}},{\\\"../../plots/cartesian\\\":757,\\\"../box/cross_trace_calc\\\":862,\\\"../box/layout_attributes\\\":867,\\\"../box/layout_defaults\\\":868,\\\"../box/plot\\\":869,\\\"../box/style\\\":871,\\\"../ohlc/hover\\\":995,\\\"../ohlc/select\\\":999,\\\"./attributes\\\":872,\\\"./calc\\\":873,\\\"./defaults\\\":874}],876:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./axis_defaults\\\"),i=t(\\\"../../plot_api/plot_template\\\");e.exports=function(t,e,r,a,o){a(\\\"a\\\")||(a(\\\"da\\\"),a(\\\"a0\\\")),a(\\\"b\\\")||(a(\\\"db\\\"),a(\\\"b0\\\")),function(t,e,r,a){[\\\"aaxis\\\",\\\"baxis\\\"].forEach(function(o){var s=o.charAt(0),l=t[o]||{},c=i.newContainer(e,o),u={tickfont:\\\"x\\\",id:s+\\\"axis\\\",letter:s,font:e.font,name:o,data:t[s],calendar:e.calendar,dfltColor:a,bgColor:r.paper_bgcolor,fullLayout:r};n(l,c,u),c._categories=c._categories||[],t[o]||\\\"-\\\"===l.type||(t[o]={type:l.type})})}(t,e,r,o)}},{\\\"../../plot_api/plot_template\\\":735,\\\"./axis_defaults\\\":881}],877:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t){return function t(e,r){if(!n(e)||r>=10)return null;var i=1/0;var a=-1/0;var o=e.length;for(var s=0;s<o;s++){var l=e[s];if(n(l)){var c=t(l,r+1);c&&(i=Math.min(c[0],i),a=Math.max(c[1],a))}else i=Math.min(l,i),a=Math.max(l,a)}return[i,a]}(t,0)}},{\\\"../../lib\\\":696}],878:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"./axis_attributes\\\"),a=t(\\\"../../components/color/attributes\\\"),o=n({editType:\\\"calc\\\"});o.family.dflt='\\\"Open Sans\\\", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=a.defaultLine,e.exports={carpet:{valType:\\\"string\\\",editType:\\\"calc\\\"},x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},a:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},a0:{valType:\\\"number\\\",dflt:0,editType:\\\"calc\\\"},da:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},b:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},b0:{valType:\\\"number\\\",dflt:0,editType:\\\"calc\\\"},db:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},cheaterslope:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},aaxis:i,baxis:i,font:o,color:{valType:\\\"color\\\",dflt:a.defaultLine,editType:\\\"plot\\\"},transforms:void 0}},{\\\"../../components/color/attributes\\\":569,\\\"../../plots/font_attributes\\\":772,\\\"./axis_attributes\\\":880}],879:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r,i){var a,o,s,l,c,u,f,h,p,d,g,v,m,y=n(r)?\\\"a\\\":\\\"b\\\",x=(\\\"a\\\"===y?t.aaxis:t.baxis).smoothing,b=\\\"a\\\"===y?t.a2i:t.b2j,_=\\\"a\\\"===y?r:i,w=\\\"a\\\"===y?i:r,k=\\\"a\\\"===y?e.a.length:e.b.length,M=\\\"a\\\"===y?e.b.length:e.a.length,A=Math.floor(\\\"a\\\"===y?t.b2j(w):t.a2i(w)),T=\\\"a\\\"===y?function(e){return t.evalxy([],e,A)}:function(e){return t.evalxy([],A,e)};x&&(s=Math.max(0,Math.min(M-2,A)),l=A-s,o=\\\"a\\\"===y?function(e,r){return t.dxydi([],e,s,r,l)}:function(e,r){return t.dxydj([],s,e,l,r)});var S=b(_[0]),C=b(_[1]),E=S<C?1:-1,L=1e-8*(C-S),z=E>0?Math.floor:Math.ceil,O=E>0?Math.ceil:Math.floor,I=E>0?Math.min:Math.max,P=E>0?Math.max:Math.min,D=z(S+L),R=O(C-L),B=[[f=T(S)]];for(a=D;a*E<R*E;a+=E)c=[],g=P(S,a),m=(v=I(C,a+E))-g,u=Math.max(0,Math.min(k-2,Math.floor(.5*(g+v)))),h=T(v),x&&(p=o(u,g-u),d=o(u,v-u),c.push([f[0]+p[0]/3*m,f[1]+p[1]/3*m]),c.push([h[0]-d[0]/3*m,h[1]-d[1]/3*m])),c.push(h),B.push(c),f=h;return B}},{\\\"../../lib\\\":696}],880:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../../components/color/attributes\\\"),a=t(\\\"../../plots/cartesian/layout_attributes\\\"),o=t(\\\"../../plot_api/edit_types\\\").overrideAll;e.exports={color:{valType:\\\"color\\\",editType:\\\"calc\\\"},smoothing:{valType:\\\"number\\\",dflt:1,min:0,max:1.3,editType:\\\"calc\\\"},title:{valType:\\\"string\\\",editType:\\\"calc\\\"},titlefont:n({editType:\\\"calc\\\"}),titleoffset:{valType:\\\"number\\\",dflt:10,editType:\\\"calc\\\"},type:{valType:\\\"enumerated\\\",values:[\\\"-\\\",\\\"linear\\\",\\\"date\\\",\\\"category\\\"],dflt:\\\"-\\\",editType:\\\"calc\\\"},autorange:{valType:\\\"enumerated\\\",values:[!0,!1,\\\"reversed\\\"],dflt:!0,editType:\\\"calc\\\"},rangemode:{valType:\\\"enumerated\\\",values:[\\\"normal\\\",\\\"tozero\\\",\\\"nonnegative\\\"],dflt:\\\"normal\\\",editType:\\\"calc\\\"},range:{valType:\\\"info_array\\\",editType:\\\"calc\\\",items:[{valType:\\\"any\\\",editType:\\\"calc\\\"},{valType:\\\"any\\\",editType:\\\"calc\\\"}]},fixedrange:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},cheatertype:{valType:\\\"enumerated\\\",values:[\\\"index\\\",\\\"value\\\"],dflt:\\\"value\\\",editType:\\\"calc\\\"},tickmode:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"array\\\"],dflt:\\\"array\\\",editType:\\\"calc\\\"},nticks:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},tickvals:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},ticktext:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},showticklabels:{valType:\\\"enumerated\\\",values:[\\\"start\\\",\\\"end\\\",\\\"both\\\",\\\"none\\\"],dflt:\\\"start\\\",editType:\\\"calc\\\"},tickfont:n({editType:\\\"calc\\\"}),tickangle:{valType:\\\"angle\\\",dflt:\\\"auto\\\",editType:\\\"calc\\\"},tickprefix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},showtickprefix:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"calc\\\"},ticksuffix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},showticksuffix:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"calc\\\"},showexponent:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"first\\\",\\\"last\\\",\\\"none\\\"],dflt:\\\"all\\\",editType:\\\"calc\\\"},exponentformat:{valType:\\\"enumerated\\\",values:[\\\"none\\\",\\\"e\\\",\\\"E\\\",\\\"power\\\",\\\"SI\\\",\\\"B\\\"],dflt:\\\"B\\\",editType:\\\"calc\\\"},separatethousands:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},tickformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},tickformatstops:o(a.tickformatstops,\\\"calc\\\",\\\"from-root\\\"),categoryorder:{valType:\\\"enumerated\\\",values:[\\\"trace\\\",\\\"category ascending\\\",\\\"category descending\\\",\\\"array\\\"],dflt:\\\"trace\\\",editType:\\\"calc\\\"},categoryarray:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},labelpadding:{valType:\\\"integer\\\",dflt:10,editType:\\\"calc\\\"},labelprefix:{valType:\\\"string\\\",editType:\\\"calc\\\"},labelsuffix:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},showline:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},linecolor:{valType:\\\"color\\\",dflt:i.defaultLine,editType:\\\"calc\\\"},linewidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc\\\"},gridcolor:{valType:\\\"color\\\",editType:\\\"calc\\\"},gridwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc\\\"},showgrid:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},minorgridcount:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},minorgridwidth:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc\\\"},minorgridcolor:{valType:\\\"color\\\",dflt:i.lightLine,editType:\\\"calc\\\"},startline:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},startlinecolor:{valType:\\\"color\\\",editType:\\\"calc\\\"},startlinewidth:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},endline:{valType:\\\"boolean\\\",editType:\\\"calc\\\"},endlinewidth:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},endlinecolor:{valType:\\\"color\\\",editType:\\\"calc\\\"},tick0:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"calc\\\"},dtick:{valType:\\\"number\\\",min:0,dflt:1,editType:\\\"calc\\\"},arraytick0:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},arraydtick:{valType:\\\"integer\\\",min:1,dflt:1,editType:\\\"calc\\\"},editType:\\\"calc\\\"}},{\\\"../../components/color/attributes\\\":569,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/cartesian/layout_attributes\\\":758,\\\"../../plots/font_attributes\\\":772}],881:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./attributes\\\"),i=t(\\\"../../components/color\\\").addOpacity,a=t(\\\"../../registry\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../plots/cartesian/tick_value_defaults\\\"),l=t(\\\"../../plots/cartesian/tick_label_defaults\\\"),c=t(\\\"../../plots/cartesian/category_order_defaults\\\"),u=t(\\\"../../plots/cartesian/set_convert\\\"),f=t(\\\"../../plots/cartesian/axis_autotype\\\");e.exports=function(t,e,r){var h=r.letter,p=r.font||{},d=n[h+\\\"axis\\\"];function g(r,n){return o.coerce(t,e,d,r,n)}function v(r,n){return o.coerce2(t,e,d,r,n)}r.name&&(e._name=r.name,e._id=r.name);var m=g(\\\"type\\\");(\\\"-\\\"===m&&(r.data&&function(t,e){if(\\\"-\\\"!==t.type)return;var r=t._id.charAt(0),n=t[r+\\\"calendar\\\"];t.type=f(e,n)}(e,r.data),\\\"-\\\"===e.type?e.type=\\\"linear\\\":m=t.type=e.type),g(\\\"smoothing\\\"),g(\\\"cheatertype\\\"),g(\\\"showticklabels\\\"),g(\\\"labelprefix\\\",h+\\\" = \\\"),g(\\\"labelsuffix\\\"),g(\\\"showtickprefix\\\"),g(\\\"showticksuffix\\\"),g(\\\"separatethousands\\\"),g(\\\"tickformat\\\"),g(\\\"exponentformat\\\"),g(\\\"showexponent\\\"),g(\\\"categoryorder\\\"),g(\\\"tickmode\\\"),g(\\\"tickvals\\\"),g(\\\"ticktext\\\"),g(\\\"tick0\\\"),g(\\\"dtick\\\"),\\\"array\\\"===e.tickmode&&(g(\\\"arraytick0\\\"),g(\\\"arraydtick\\\")),g(\\\"labelpadding\\\"),e._hovertitle=h,\\\"date\\\"===m)&&a.getComponentMethod(\\\"calendars\\\",\\\"handleDefaults\\\")(t,e,\\\"calendar\\\",r.calendar);u(e,r.fullLayout),e.c2p=o.identity;var y=g(\\\"color\\\",r.dfltColor),x=y===t.color?y:p.color;g(\\\"title\\\"),o.coerceFont(g,\\\"titlefont\\\",{family:p.family,size:Math.round(1.2*p.size),color:x}),g(\\\"titleoffset\\\"),g(\\\"tickangle\\\"),g(\\\"autorange\\\",!e.isValidRange(t.range))&&g(\\\"rangemode\\\"),g(\\\"range\\\"),e.cleanRange(),g(\\\"fixedrange\\\"),s(t,e,g,m),l(t,e,g,m,r),c(t,e,g,{data:r.data,dataAttr:h});var b=v(\\\"gridcolor\\\",i(y,.3)),_=v(\\\"gridwidth\\\"),w=g(\\\"showgrid\\\");w||(delete e.gridcolor,delete e.gridwidth);var k=v(\\\"startlinecolor\\\",y),M=v(\\\"startlinewidth\\\",_);g(\\\"startline\\\",e.showgrid||!!k||!!M)||(delete e.startlinecolor,delete e.startlinewidth);var A=v(\\\"endlinecolor\\\",y),T=v(\\\"endlinewidth\\\",_);return g(\\\"endline\\\",e.showgrid||!!A||!!T)||(delete e.endlinecolor,delete e.endlinewidth),w?(g(\\\"minorgridcount\\\"),g(\\\"minorgridwidth\\\",_),g(\\\"minorgridcolor\\\",i(b,.06)),e.minorgridcount||(delete e.minorgridwidth,delete e.minorgridcolor)):(delete e.gridcolor,delete e.gridWidth),\\\"none\\\"===e.showticklabels&&(delete e.tickfont,delete e.tickangle,delete e.showexponent,delete e.exponentformat,delete e.tickformat,delete e.showticksuffix,delete e.showtickprefix),e.showticksuffix||delete e.ticksuffix,e.showtickprefix||delete e.tickprefix,g(\\\"tickmode\\\"),(!e.title||e.title&&0===e.title.length)&&(delete e.titlefont,delete e.titleoffset),e}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axis_autotype\\\":746,\\\"../../plots/cartesian/category_order_defaults\\\":749,\\\"../../plots/cartesian/set_convert\\\":764,\\\"../../plots/cartesian/tick_label_defaults\\\":765,\\\"../../plots/cartesian/tick_value_defaults\\\":767,\\\"../../registry\\\":828,\\\"./attributes\\\":878}],882:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\").isArray1D,a=t(\\\"./cheater_basis\\\"),o=t(\\\"./array_minmax\\\"),s=t(\\\"./calc_gridlines\\\"),l=t(\\\"./calc_labels\\\"),c=t(\\\"./calc_clippath\\\"),u=t(\\\"../heatmap/clean_2d_array\\\"),f=t(\\\"./smooth_fill_2d_array\\\"),h=t(\\\"../heatmap/convert_column_xyz\\\"),p=t(\\\"./set_convert\\\");e.exports=function(t,e){var r=n.getFromId(t,e.xaxis),d=n.getFromId(t,e.yaxis),g=e.aaxis,v=e.baxis,m=e.x,y=e.y,x=[];m&&i(m)&&x.push(\\\"x\\\"),y&&i(y)&&x.push(\\\"y\\\"),x.length&&h(e,g,v,\\\"a\\\",\\\"b\\\",x);var b=e._a=e._a||e.a,_=e._b=e._b||e.b;m=e._x||e.x,y=e._y||e.y;var w={};if(e._cheater){var k=\\\"index\\\"===g.cheatertype?b.length:b,M=\\\"index\\\"===v.cheatertype?_.length:_;m=a(k,M,e.cheaterslope)}e._x=m=u(m),e._y=y=u(y),f(m,b,_),f(y,b,_),p(e),e.setScale();var A=o(m),T=o(y),S=.5*(A[1]-A[0]),C=.5*(A[1]+A[0]),E=.5*(T[1]-T[0]),L=.5*(T[1]+T[0]);return A=[C-1.3*S,C+1.3*S],T=[L-1.3*E,L+1.3*E],e._extremes[r._id]=n.findExtremes(r,A,{padded:!0}),e._extremes[d._id]=n.findExtremes(d,T,{padded:!0}),s(e,\\\"a\\\",\\\"b\\\"),s(e,\\\"b\\\",\\\"a\\\"),l(e,g),l(e,v),w.clipsegments=c(e._xctrl,e._yctrl,g,v),w.x=m,w.y=y,w.a=b,w.b=_,[w]}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../heatmap/clean_2d_array\\\":948,\\\"../heatmap/convert_column_xyz\\\":950,\\\"./array_minmax\\\":877,\\\"./calc_clippath\\\":883,\\\"./calc_gridlines\\\":884,\\\"./calc_labels\\\":885,\\\"./cheater_basis\\\":887,\\\"./set_convert\\\":900,\\\"./smooth_fill_2d_array\\\":901}],883:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i,a,o,s=[],l=!!r.smoothing,c=!!n.smoothing,u=t[0].length-1,f=t.length-1;for(i=0,a=[],o=[];i<=u;i++)a[i]=t[0][i],o[i]=e[0][i];for(s.push({x:a,y:o,bicubic:l}),i=0,a=[],o=[];i<=f;i++)a[i]=t[i][u],o[i]=e[i][u];for(s.push({x:a,y:o,bicubic:c}),i=u,a=[],o=[];i>=0;i--)a[u-i]=t[f][i],o[u-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],884:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib/extend\\\").extendFlat;e.exports=function(t,e,r){var a,o,s,l,c,u,f,h,p,d,g,v,m,y,x=t[\\\"_\\\"+e],b=t[e+\\\"axis\\\"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],M=t[\\\"_\\\"+r],A=t[r+\\\"axis\\\"];\\\"array\\\"===b.tickmode&&(b.tickvals=x.slice());var T=t._xctrl,S=t._yctrl,C=T[0].length,E=T.length,L=t._a.length,z=t._b.length;n.prepTicks(b),\\\"array\\\"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function I(n){var i,a,o,s,l,c,u,f,p,d,g,v,m=[],y=[],x={};if(\\\"b\\\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(z-2,a))),s=a-o,x.length=z,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i<L;i++)c=Math.min(L-2,i),u=i-c,f=t.evalxy([],i,a),A.smoothing&&i>0&&(p=t.dxydi([],i-1,o,0,s),m.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),m.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),m.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,i))),u=i-c,x.length=L,x.crossLength=z,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a<z;a++)o=Math.min(z-2,a),s=a-o,f=t.evalxy([],i,a),A.smoothing&&a>0&&(g=t.dxydj([],c,a-1,u,0),m.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),v=t.dxydj([],c,a-1,u,1),m.push(f[0]-v[0]/3),y.push(f[1]-v[1]/3)),m.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=h,x.x=m,x.y=y,x.smoothing=A.smoothing,x}function P(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=M.length,\\\"b\\\"===e)for(o=Math.max(0,Math.min(z-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;i<C;i++)c[i]=T[n*O][i],u[i]=S[n*O][i];else for(a=Math.max(0,Math.min(L-2,n)),s=Math.min(1,Math.max(0,n-a)),f.xy=function(e){return t.evalxy([],n,e)},f.dxy=function(e,r){return t.dxydj([],a,e,s,r)},i=0;i<E;i++)c[i]=T[i][n*O],u[i]=S[i][n*O];return f.axisLetter=e,f.axis=b,f.crossAxis=A,f.value=x[n],f.constvar=r,f.index=n,f.x=c,f.y=u,f.smoothing=A.smoothing,f}if(\\\"array\\\"===b.tickmode){for(l=5e-15,u=(c=[Math.floor((x.length-1-b.arraytick0)/b.arraydtick*(1+l)),Math.ceil(-b.arraytick0/b.arraydtick/(1+l))].sort(function(t,e){return t-e}))[0]-1,f=c[1]+1,h=u;h<f;h++)(o=b.arraytick0+b.arraydtick*h)<0||o>x.length-1||_.push(i(P(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;h<f;h++)if(s=b.arraytick0+b.arraydtick*h,g=Math.min(s+b.arraydtick,x.length-1),!(s<0||s>x.length-1||g<0||g>x.length-1))for(v=x[s],m=x[g],a=0;a<b.minorgridcount;a++)(y=g-s)<=0||(d=v+(m-v)*(a+1)/(b.minorgridcount+1)*(b.arraydtick/y))<x[0]||d>x[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(i(P(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(P(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort(function(t,e){return t-e}))[0],f=c[1],h=u;h<=f;h++)p=b.tick0+b.dtick*h,_.push(i(I(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;h<f+1;h++)for(p=b.tick0+b.dtick*h,a=0;a<b.minorgridcount;a++)(d=p+b.dtick*(a+1)/(b.minorgridcount+1))<x[0]||d>x[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(i(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\\\"../../lib/extend\\\":685,\\\"../../plots/cartesian/axes\\\":745}],885:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib/extend\\\").extendFlat;e.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;r<l.length;r++)o=l[r],-1!==[\\\"start\\\",\\\"both\\\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:o.xy(0),dxy:o.dxy(0,0),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a)),-1!==[\\\"end\\\",\\\"both\\\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{endAnchor:!1,xy:o.xy(o.crossLength-1),dxy:o.dxy(o.crossLength-2,1),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a))}},{\\\"../../lib/extend\\\":685,\\\"../../plots/cartesian/axes\\\":745}],886:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,f=(c*c*a-l*l*s)*n,h=c*(l+c)*3,p=l*(l+c)*3;return[[e[0]+(h&&u/h),e[1]+(h&&f/h)],[e[0]-(p&&u/p),e[1]-(p&&f/p)]]}},{}],887:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r){var i,a,o,s,l,c,u=[],f=n(t)?t.length:t,h=n(e)?e.length:e,p=n(t)?t:null,d=n(e)?e:null;p&&(o=(p.length-1)/(p[p.length-1]-p[0])/(f-1)),d&&(s=(d.length-1)/(d[d.length-1]-d[0])/(h-1));var g=1/0,v=-1/0;for(a=0;a<h;a++)for(u[a]=[],l=d?(d[a]-d[0])*s:a/(h-1),i=0;i<f;i++)c=(p?(p[i]-p[0])*o:i/(f-1))-l*r,g=Math.min(c,g),v=Math.max(c,v),u[a][i]=c;var m=1/(v-g),y=-g*m;for(a=0;a<h;a++)for(i=0;i<f;i++)u[a][i]=m*u[a][i]+y;return u}},{\\\"../../lib\\\":696}],888:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./catmull_rom\\\"),i=t(\\\"../../lib\\\").ensureArray;function a(t,e,r){var n=-.5*r[0]+1.5*e[0],i=-.5*r[1]+1.5*e[1];return[(2*n+t[0])/3,(2*i+t[1])/3]}e.exports=function(t,e,r,o,s,l){var c,u,f,h,p,d,g,v,m,y,x=r[0].length,b=r.length,_=s?3*x-2:x,w=l?3*b-2:b;for(t=i(t,w),e=i(e,w),f=0;f<w;f++)t[f]=i(t[f],_),e[f]=i(e[f],_);for(u=0,h=0;u<b;u++,h+=l?3:1)for(p=t[h],d=e[h],g=r[u],v=o[u],c=0,f=0;c<x;c++,f+=s?3:1)p[f]=g[c],d[f]=v[c];if(s)for(u=0,h=0;u<b;u++,h+=l?3:1){for(c=1,f=3;c<x-1;c++,f+=3)m=n([r[u][c-1],o[u][c-1]],[r[u][c],o[u][c]],[r[u][c+1],o[u][c+1]],s),t[h][f-1]=m[0][0],e[h][f-1]=m[0][1],t[h][f+1]=m[1][0],e[h][f+1]=m[1][1];y=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=y[0],e[h][1]=y[1],y=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=y[0],e[h][_-2]=y[1]}if(l)for(f=0;f<_;f++){for(h=3;h<w-3;h+=3)m=n([t[h-3][f],e[h-3][f]],[t[h][f],e[h][f]],[t[h+3][f],e[h+3][f]],l),t[h-1][f]=m[0][0],e[h-1][f]=m[0][1],t[h+1][f]=m[1][0],e[h+1][f]=m[1][1];y=a([t[0][f],e[0][f]],[t[2][f],e[2][f]],[t[3][f],e[3][f]]),t[1][f]=y[0],e[1][f]=y[1],y=a([t[w-1][f],e[w-1][f]],[t[w-3][f],e[w-3][f]],[t[w-4][f],e[w-4][f]]),t[w-2][f]=y[0],e[w-2][f]=y[1]}if(s&&l)for(h=1;h<w;h+=(h+1)%3==0?2:1){for(f=3;f<_-3;f+=3)m=n([t[h][f-3],e[h][f-3]],[t[h][f],e[h][f]],[t[h][f+3],e[h][f+3]],s),t[h][f-1]=.5*(t[h][f-1]+m[0][0]),e[h][f-1]=.5*(e[h][f-1]+m[0][1]),t[h][f+1]=.5*(t[h][f+1]+m[1][0]),e[h][f+1]=.5*(e[h][f+1]+m[1][1]);y=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=.5*(t[h][1]+y[0]),e[h][1]=.5*(e[h][1]+y[1]),y=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=.5*(t[h][_-2]+y[0]),e[h][_-2]=.5*(e[h][_-2]+y[1])}return[t,e]}},{\\\"../../lib\\\":696,\\\"./catmull_rom\\\":886}],889:[function(t,e,r){\\\"use strict\\\";e.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],890:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=1-i,d=p*p,g=p*i*2,v=-3*d,m=3*(d-g),y=3*(g-h),x=3*h,b=a*a,_=b*a,w=1-a,k=w*w,M=k*w;for(f=0;f<t.length;f++)o=v*(u=t[f])[n][r]+m*u[n][r+1]+y*u[n][r+2]+x*u[n][r+3],s=v*u[n+1][r]+m*u[n+1][r+1]+y*u[n+1][r+2]+x*u[n+1][r+3],l=v*u[n+2][r]+m*u[n+2][r+1]+y*u[n+2][r+2]+x*u[n+2][r+3],c=v*u[n+3][r]+m*u[n+3][r+1]+y*u[n+3][r+2]+x*u[n+3][r+3],e[f]=M*o+3*(k*a*s+w*b*l)+_*c;return e}:e?function(e,r,n,i,a){var o,s,l,c;e||(e=[]),r*=3;var u=i*i,f=1-i,h=f*f,p=f*i*2,d=-3*h,g=3*(h-p),v=3*(p-u),m=3*u,y=1-a;for(l=0;l<t.length;l++)o=d*(c=t[l])[n][r]+g*c[n][r+1]+v*c[n][r+2]+m*c[n][r+3],s=d*c[n+1][r]+g*c[n+1][r+1]+v*c[n+1][r+2]+m*c[n+1][r+3],e[l]=y*o+a*s;return e}:r?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),n*=3;var h=a*a,p=h*a,d=1-a,g=d*d,v=g*d;for(u=0;u<t.length;u++)o=(f=t[u])[n][r+1]-f[n][r],s=f[n+1][r+1]-f[n+1][r],l=f[n+2][r+1]-f[n+2][r],c=f[n+3][r+1]-f[n+3][r],e[u]=v*o+3*(g*a*s+d*h*l)+p*c;return e}:function(e,r,n,i,a){var o,s,l,c;e||(e=[]);var u=1-a;for(l=0;l<t.length;l++)o=(c=t[l])[n][r+1]-c[n][r],s=c[n+1][r+1]-c[n+1][r],e[l]=u*o+a*s;return e}}},{}],891:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=h*i,d=1-i,g=d*d,v=g*d,m=a*a,y=1-a,x=y*y,b=y*a*2,_=-3*x,w=3*(x-b),k=3*(b-m),M=3*m;for(f=0;f<t.length;f++)o=_*(u=t[f])[n][r]+w*u[n+1][r]+k*u[n+2][r]+M*u[n+3][r],s=_*u[n][r+1]+w*u[n+1][r+1]+k*u[n+2][r+1]+M*u[n+3][r+1],l=_*u[n][r+2]+w*u[n+1][r+2]+k*u[n+2][r+2]+M*u[n+3][r+2],c=_*u[n][r+3]+w*u[n+1][r+3]+k*u[n+2][r+3]+M*u[n+3][r+3],e[f]=v*o+3*(g*i*s+d*h*l)+p*c;return e}:e?function(e,r,n,i,a){var o,s,l,c,u,f;e||(e=[]),r*=3;var h=a*a,p=h*a,d=1-a,g=d*d,v=g*d;for(u=0;u<t.length;u++)o=(f=t[u])[n+1][r]-f[n][r],s=f[n+1][r+1]-f[n][r+1],l=f[n+1][r+2]-f[n][r+2],c=f[n+1][r+3]-f[n][r+3],e[u]=v*o+3*(g*a*s+d*h*l)+p*c;return e}:r?function(e,r,n,i,a){var o,s,l,c;e||(e=[]),n*=3;var u=1-i,f=a*a,h=1-a,p=h*h,d=h*a*2,g=-3*p,v=3*(p-d),m=3*(d-f),y=3*f;for(l=0;l<t.length;l++)o=g*(c=t[l])[n][r]+v*c[n+1][r]+m*c[n+2][r]+y*c[n+3][r],s=g*c[n][r+1]+v*c[n+1][r+1]+m*c[n+2][r+1]+y*c[n+3][r+1],e[l]=u*o+i*s;return e}:function(e,r,n,i,a){var o,s,l,c;e||(e=[]);var u=1-i;for(l=0;l<t.length;l++)o=(c=t[l])[n+1][r]-c[n][r],s=c[n+1][r+1]-c[n][r+1],e[l]=u*o+i*s;return e}}},{}],892:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){var a=e-2,o=r-2;return n&&i?function(e,r,n){var i,s,l,c,u,f;e||(e=[]);var h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));h*=3,p*=3;var v=d*d,m=v*d,y=1-d,x=y*y,b=x*y,_=g*g,w=_*g,k=1-g,M=k*k,A=M*k;for(f=0;f<t.length;f++)i=b*(u=t[f])[p][h]+3*(x*d*u[p][h+1]+y*v*u[p][h+2])+m*u[p][h+3],s=b*u[p+1][h]+3*(x*d*u[p+1][h+1]+y*v*u[p+1][h+2])+m*u[p+1][h+3],l=b*u[p+2][h]+3*(x*d*u[p+2][h+1]+y*v*u[p+2][h+2])+m*u[p+2][h+3],c=b*u[p+3][h]+3*(x*d*u[p+3][h+1]+y*v*u[p+3][h+2])+m*u[p+3][h+3],e[f]=A*i+3*(M*g*s+k*_*l)+w*c;return e}:n?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));h*=3;var v=d*d,m=v*d,y=1-d,x=y*y,b=x*y,_=1-g;for(u=0;u<t.length;u++)i=_*(f=t[u])[p][h]+g*f[p+1][h],s=_*f[p][h+1]+g*f[p+1][h+1],l=_*f[p][h+2]+g*f[p+1][h+1],c=_*f[p][h+3]+g*f[p+1][h+1],e[u]=b*i+3*(x*d*s+y*v*l)+m*c;return e}:i?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));p*=3;var v=g*g,m=v*g,y=1-g,x=y*y,b=x*y,_=1-d;for(u=0;u<t.length;u++)i=_*(f=t[u])[p][h]+d*f[p][h+1],s=_*f[p+1][h]+d*f[p+1][h+1],l=_*f[p+2][h]+d*f[p+2][h+1],c=_*f[p+3][h]+d*f[p+3][h+1],e[u]=b*i+3*(x*g*s+y*v*l)+m*c;return e}:function(e,r,n){e||(e=[]);var i,s,l,c,u=Math.max(0,Math.min(Math.floor(r),a)),f=Math.max(0,Math.min(Math.floor(n),o)),h=Math.max(0,Math.min(1,r-u)),p=Math.max(0,Math.min(1,n-f)),d=1-p,g=1-h;for(l=0;l<t.length;l++)i=g*(c=t[l])[f][u]+h*c[f][u+1],s=g*c[f+1][u]+h*c[f+1][u+1],e[l]=d*i+p*s;return e}}},{}],893:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./xy_defaults\\\"),a=t(\\\"./ab_defaults\\\"),o=t(\\\"./attributes\\\"),s=t(\\\"../../components/color/attributes\\\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,o,r,i)}e._clipPathId=\\\"clip\\\"+e.uid+\\\"carpet\\\";var u=c(\\\"color\\\",s.defaultLine);(n.coerceFont(c,\\\"font\\\"),c(\\\"carpet\\\"),a(t,e,l,c,u),e.a&&e.b)?(e.a.length<3&&(e.aaxis.smoothing=0),e.b.length<3&&(e.baxis.smoothing=0),i(t,e,c)||(e.visible=!1),e._cheater&&c(\\\"cheaterslope\\\")):e.visible=!1}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib\\\":696,\\\"./ab_defaults\\\":876,\\\"./attributes\\\":878,\\\"./xy_defaults\\\":902}],894:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.plot=t(\\\"./plot\\\"),n.calc=t(\\\"./calc\\\"),n.animatable=!0,n.isContainer=!0,n.moduleType=\\\"trace\\\",n.name=\\\"carpet\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"carpet\\\",\\\"carpetAxis\\\",\\\"notLegendIsolatable\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":878,\\\"./calc\\\":882,\\\"./defaults\\\":893,\\\"./plot\\\":899}],895:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r,n=t._fullData.length,i=0;i<n;i++){var a=t._fullData[i];if(a.index!==e.index&&(\\\"carpet\\\"===a.type&&(r||(r=a),a.carpet===e.carpet)))return a}return r}},{}],896:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){if(0===t.length)return\\\"\\\";var n,i=[],a=r?3:1;for(n=0;n<t.length;n+=a)i.push(t[n]+\\\",\\\"+e[n]),r&&n<t.length-a&&(i.push(\\\"C\\\"),i.push([t[n+1]+\\\",\\\"+e[n+1],t[n+2]+\\\",\\\"+e[n+2]+\\\" \\\"].join(\\\" \\\")));return i.join(r?\\\"\\\":\\\"L\\\")}},{}],897:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r){var i;for(n(t)?t.length>e.length&&(t=t.slice(0,e.length)):t=[],i=0;i<e.length;i++)t[i]=r(e[i]);return t}},{\\\"../../lib\\\":696}],898:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i,a){var o=i[0]*t.dpdx(e),s=i[1]*t.dpdy(r),l=1,c=1;if(a){var u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=(i[0]*a[0]+i[1]*a[1])/u/f;c=Math.max(0,h)}var p=180*Math.atan2(s,o)/Math.PI;return p<-90?(p+=180,l=-l):p>90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],899:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"./map_1d_array\\\"),o=t(\\\"./makepath\\\"),s=t(\\\"./orient_text\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../constants/alignment\\\");function f(t,e,r,i,s,l){var c=\\\"const-\\\"+s+\\\"-lines\\\",u=r.selectAll(\\\".\\\"+c).data(l);u.enter().append(\\\"path\\\").classed(c,!0).style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\"),u.each(function(r){var i=r,s=i.x,l=i.y,c=a([],s,t.c2p),u=a([],l,e.c2p),f=\\\"M\\\"+o(c,u,i.smoothing);n.select(this).attr(\\\"d\\\",f).style(\\\"stroke-width\\\",i.width).style(\\\"stroke\\\",i.color).style(\\\"fill\\\",\\\"none\\\")}),u.exit().remove()}function h(t,e,r,a,o,c,u,f){var h=c.selectAll(\\\"text.\\\"+f).data(u);h.enter().append(\\\"text\\\").classed(f,!0);var p=0,d={};return h.each(function(o,c){var u;if(\\\"auto\\\"===o.axis.tickangle)u=s(a,e,r,o.xy,o.dxy);else{var f=(o.axis.tickangle+180)*Math.PI/180;u=s(a,e,r,o.xy,[Math.cos(f),Math.sin(f)])}c||(d={angle:u.angle,flip:u.flip});var h=(o.endAnchor?-1:1)*u.flip,g=n.select(this).attr({\\\"text-anchor\\\":h>0?\\\"start\\\":\\\"end\\\",\\\"data-notex\\\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),v=i.bBox(this);g.attr(\\\"transform\\\",\\\"translate(\\\"+u.p[0]+\\\",\\\"+u.p[1]+\\\") rotate(\\\"+u.angle+\\\")translate(\\\"+o.axis.labelpadding*h+\\\",\\\"+.3*v.height+\\\")\\\"),p=Math.max(p,v.width+o.axis.labelpadding)}),h.exit().remove(),d.maxExtent=p,d}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,p=t._fullLayout._clips;c.makeTraceGroups(i,r,\\\"trace\\\").each(function(e){var r=n.select(this),i=e[0],d=i.trace,v=d.aaxis,m=d.baxis,y=c.ensureSingle(r,\\\"g\\\",\\\"minorlayer\\\"),x=c.ensureSingle(r,\\\"g\\\",\\\"majorlayer\\\"),b=c.ensureSingle(r,\\\"g\\\",\\\"boundarylayer\\\"),_=c.ensureSingle(r,\\\"g\\\",\\\"labellayer\\\");r.style(\\\"opacity\\\",d.opacity),f(l,u,x,v,\\\"a\\\",v._gridlines),f(l,u,x,m,\\\"b\\\",m._gridlines),f(l,u,y,v,\\\"a\\\",v._minorgridlines),f(l,u,y,m,\\\"b\\\",m._minorgridlines),f(l,u,b,v,\\\"a-boundary\\\",v._boundarylines),f(l,u,b,m,\\\"b-boundary\\\",m._boundarylines);var w=h(t,l,u,d,i,_,v._labels,\\\"a-label\\\"),k=h(t,l,u,d,i,_,m._labels,\\\"b-label\\\");!function(t,e,r,n,i,a,o,l){var u,f,h,p;u=.5*(r.a[0]+r.a[r.a.length-1]),f=r.b[0],h=r.ab2xy(u,f,!0),p=r.dxyda_rough(u,f),void 0===o.angle&&c.extendFlat(o,s(r,i,a,h,r.dxydb_rough(u,f)));g(t,e,r,n,h,p,r.aaxis,i,a,o,\\\"a-title\\\"),u=r.a[0],f=.5*(r.b[0]+r.b[r.b.length-1]),h=r.ab2xy(u,f,!0),p=r.dxydb_rough(u,f),void 0===l.angle&&c.extendFlat(l,s(r,i,a,h,r.dxyda_rough(u,f)));g(t,e,r,n,h,p,r.baxis,i,a,l,\\\"b-title\\\")}(t,_,d,i,l,u,w,k),function(t,e,r,n,i){var s,l,u,f,h=r.select(\\\"#\\\"+t._clipPathId);h.size()||(h=r.append(\\\"clipPath\\\").classed(\\\"carpetclip\\\",!0));var p=c.ensureSingle(h,\\\"path\\\",\\\"carpetboundary\\\"),d=e.clipsegments,g=[];for(f=0;f<d.length;f++)s=d[f],l=a([],s.x,n.c2p),u=a([],s.y,i.c2p),g.push(o(l,u,s.bicubic));var v=\\\"M\\\"+g.join(\\\"L\\\")+\\\"Z\\\";h.attr(\\\"id\\\",t._clipPathId),p.attr(\\\"d\\\",v)}(d,i,p,l,u)})};var p=u.LINE_SPACING,d=(1-u.MID_SHIFT)/p+1;function g(t,e,r,a,o,c,u,f,h,g,v){var m=[];u.title&&m.push(u.title);var y=e.selectAll(\\\"text.\\\"+v).data(m),x=g.maxExtent;y.enter().append(\\\"text\\\").classed(v,!0),y.each(function(){var e=s(r,f,h,o,c);-1===[\\\"start\\\",\\\"both\\\"].indexOf(u.showticklabels)&&(x=0);var a=u.titlefont.size;x+=a+u.titleoffset;var v=(g.angle+(g.flip<0?180:0)-e.angle+450)%360,m=v>90&&v<270,y=n.select(this);y.text(u.title||\\\"\\\").call(l.convertToTspans,t),m&&(x=(-l.lineCount(y)+d)*p*a-x),y.attr(\\\"transform\\\",\\\"translate(\\\"+e.p[0]+\\\",\\\"+e.p[1]+\\\") rotate(\\\"+e.angle+\\\") translate(0,\\\"+x+\\\")\\\").classed(\\\"user-select-none\\\",!0).attr(\\\"text-anchor\\\",\\\"middle\\\").call(i.font,u.titlefont)}),y.exit().remove()}},{\\\"../../components/drawing\\\":595,\\\"../../constants/alignment\\\":668,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"./makepath\\\":896,\\\"./map_1d_array\\\":897,\\\"./orient_text\\\":898,d3:148}],900:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"../../lib/search\\\").findBin,a=t(\\\"./compute_control_points\\\"),o=t(\\\"./create_spline_evaluator\\\"),s=t(\\\"./create_i_derivative_evaluator\\\"),l=t(\\\"./create_j_derivative_evaluator\\\");e.exports=function(t){var e=t._a,r=t._b,c=e.length,u=r.length,f=t.aaxis,h=t.baxis,p=e[0],d=e[c-1],g=r[0],v=r[u-1],m=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=m*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,v+=b,t.isVisible=function(t,e){return t>p&&t<d&&e>g&&e<v},t.isOccluded=function(t,e){return t<p||t>d||e<g||e>v},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,f.smoothing,h.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,f.smoothing,h.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,h.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),c-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),c-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),u-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(n<e[0]||n>e[c-1]|i<r[0]||i>r[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,p,d,g=0,v=0,m=[];n<e[0]?(f=0,h=0,g=(n-e[0])/(e[1]-e[0])):n>e[c-1]?(f=c-2,h=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):h=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),i<r[0]?(p=0,d=0,v=(i-r[0])/(r[1]-r[0])):i>r[u-1]?(p=u-2,d=1,v=(i-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(m,f,p,h,d),l[0]+=m[0]*g,l[1]+=m[1]*g),v&&(t.dxydj(m,f,p,h,d),l[0]+=m[0]*v,l[1]+=m[1]*v)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=m*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{\\\"../../lib/search\\\":716,\\\"./compute_control_points\\\":888,\\\"./constants\\\":889,\\\"./create_i_derivative_evaluator\\\":890,\\\"./create_j_derivative_evaluator\\\":891,\\\"./create_spline_evaluator\\\":892}],901:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e,r){var i,a,o,s=[],l=[],c=t[0].length,u=t.length;function f(e,r){var n,i=0,a=0;return e>0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e<c-1&&void 0!==(n=t[r][e+1])&&(a++,i+=n),r>0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r<u-1&&void 0!==(n=t[r+1][e])&&(a++,i+=n),i/Math.max(1,a)}var h,p,d,g,v,m,y,x,b,_,w,k=0;for(i=0;i<c;i++)for(a=0;a<u;a++)void 0===t[a][i]&&(s.push(i),l.push(a),t[a][i]=f(i,a)),k=Math.max(k,Math.abs(t[a][i]));if(!s.length)return t;var M=0,A=0,T=s.length;do{for(M=0,o=0;o<T;o++){i=s[o],a=l[o];var S,C,E,L,z,O,I=0,P=0;0===i?(E=e[z=Math.min(c-1,2)],L=e[1],S=t[a][z],P+=(C=t[a][1])+(C-S)*(e[0]-L)/(L-E),I++):i===c-1&&(E=e[z=Math.max(0,c-3)],L=e[c-2],S=t[a][z],P+=(C=t[a][c-2])+(C-S)*(e[c-1]-L)/(L-E),I++),(0===i||i===c-1)&&a>0&&a<u-1&&(h=r[a+1]-r[a],P+=((p=r[a]-r[a-1])*t[a+1][i]+h*t[a-1][i])/(p+h),I++),0===a?(E=r[O=Math.min(u-1,2)],L=r[1],S=t[O][i],P+=(C=t[1][i])+(C-S)*(r[0]-L)/(L-E),I++):a===u-1&&(E=r[O=Math.max(0,u-3)],L=r[u-2],S=t[O][i],P+=(C=t[u-2][i])+(C-S)*(r[u-1]-L)/(L-E),I++),(0===a||a===u-1)&&i>0&&i<c-1&&(h=e[i+1]-e[i],P+=((p=e[i]-e[i-1])*t[a][i+1]+h*t[a][i-1])/(p+h),I++),I?P/=I:(d=e[i+1]-e[i],g=e[i]-e[i-1],x=(v=r[a+1]-r[a])*(m=r[a]-r[a-1])*(v+m),P=((y=d*g*(d+g))*(m*t[a+1][i]+v*t[a-1][i])+x*(g*t[a][i+1]+d*t[a][i-1]))/(x*(g+d)+y*(m+v))),M+=(_=(b=P-t[a][i])/k)*_,w=I?0:.85,t[a][i]+=b*(1+w)}M=Math.sqrt(M)}while(A++<100&&M>1e-5);return n.log(\\\"Smoother converged to\\\",M,\\\"after\\\",A,\\\"iterations\\\"),t}},{\\\"../../lib\\\":696}],902:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArray1D;e.exports=function(t,e,r){var i=r(\\\"x\\\"),a=i&&i.length,o=r(\\\"y\\\"),s=o&&o.length;if(!a&&!s)return!1;if(e._cheater=!i,a&&!n(i)||s&&!n(o))e._length=null;else{var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}return!0}},{\\\"../../lib\\\":696}],903:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scattergeo/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l=n.marker.line;e.exports=s({locations:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},locationmode:n.locationmode,z:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},text:s({},n.text,{}),marker:{line:{color:l.color,width:s({},l.width,{dflt:1}),editType:\\\"calc\\\"},opacity:{valType:\\\"number\\\",arrayOk:!0,min:0,max:1,dflt:1,editType:\\\"style\\\"},editType:\\\"calc\\\"},selected:{marker:{opacity:n.selected.marker.opacity,editType:\\\"plot\\\"},editType:\\\"plot\\\"},unselected:{marker:{opacity:n.unselected.marker.opacity,editType:\\\"plot\\\"},editType:\\\"plot\\\"},hoverinfo:s({},o.hoverinfo,{editType:\\\"calc\\\",flags:[\\\"location\\\",\\\"z\\\",\\\"text\\\",\\\"name\\\"]})},i(\\\"\\\",{cLetter:\\\"z\\\",editTypeOverride:\\\"calc\\\"}),{colorbar:a})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../scattergeo/attributes\\\":1084}],904:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM,a=t(\\\"../../components/colorscale/calc\\\"),o=t(\\\"../scatter/arrays_to_calcdata\\\"),s=t(\\\"../scatter/calc_selection\\\");e.exports=function(t,e){for(var r=e._length,l=new Array(r),c=0;c<r;c++){var u=l[c]={},f=e.locations[c],h=e.z[c];u.loc=\\\"string\\\"==typeof f?f:null,u.z=n(h)?h:i}return o(l,e),a(e,e.z,\\\"\\\",\\\"z\\\"),s(l,e),l}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../constants/numerical\\\":673,\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc_selection\\\":1046,\\\"fast-isnumeric\\\":214}],905:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/defaults\\\"),a=t(\\\"./attributes\\\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\\\"locations\\\"),c=s(\\\"z\\\");l&&l.length&&n.isArrayOrTypedArray(c)&&c.length?(e._length=Math.min(l.length,c.length),s(\\\"locationmode\\\"),s(\\\"text\\\"),s(\\\"marker.line.color\\\"),s(\\\"marker.line.width\\\"),s(\\\"marker.opacity\\\"),i(t,e,o,s,{prefix:\\\"\\\",cLetter:\\\"z\\\"}),n.coerceSelectionMarkerOpacity(e,s)):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"./attributes\\\":903}],906:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],907:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"../scatter/fill_hover_text\\\");e.exports=function(t,e,r){var o,s,l,c,u=t.cd,f=u[0].trace,h=t.subplot;for(s=0;s<u.length;s++)if(c=!1,(o=u[s])._polygons){for(l=0;l<o._polygons.length;l++)o._polygons[l].contains([e,r])&&(c=!c),o._polygons[l].contains([e+360,r])&&(c=!c);if(c)break}if(c&&o)return t.x0=t.x1=t.xa.c2p(o.ct),t.y0=t.y1=t.ya.c2p(o.ct),t.index=o.index,t.location=o.loc,t.z=o.z,function(t,e,r,o){var s=r.hi||e.hoverinfo,l=\\\"all\\\"===s?i.hoverinfo.flags:s.split(\\\"+\\\"),c=-1!==l.indexOf(\\\"name\\\"),u=-1!==l.indexOf(\\\"location\\\"),f=-1!==l.indexOf(\\\"z\\\"),h=-1!==l.indexOf(\\\"text\\\"),p=[];!c&&u?t.nameOverride=r.loc:(c&&(t.nameOverride=e.name),u&&p.push(r.loc));f&&p.push((d=r.z,n.tickText(o,o.c2l(d),\\\"hover\\\").text));var d;h&&a(r,e,p);t.extraText=p.join(\\\"<br>\\\")}(t,f,o,h.mockAxis),[t]}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/fill_hover_text\\\":1052,\\\"./attributes\\\":903}],908:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../heatmap/colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"./style\\\").style,n.styleOnSelect=t(\\\"./style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.eventData=t(\\\"./event_data\\\"),n.selectPoints=t(\\\"./select\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"choropleth\\\",n.basePlotModule=t(\\\"../../plots/geo\\\"),n.categories=[\\\"geo\\\",\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"../../plots/geo\\\":776,\\\"../heatmap/colorbar\\\":949,\\\"./attributes\\\":903,\\\"./calc\\\":904,\\\"./defaults\\\":905,\\\"./event_data\\\":906,\\\"./hover\\\":907,\\\"./plot\\\":909,\\\"./select\\\":910,\\\"./style\\\":911}],909:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../lib/polygon\\\"),o=t(\\\"../../lib/topojson_utils\\\").getTopojsonFeatures,s=t(\\\"../../lib/geo_location_utils\\\").locationToFeature,l=t(\\\"./style\\\").style;function c(t,e){for(var r=t[0].trace,n=t.length,i=o(r,e),a=0;a<n;a++){var l=t[a],c=s(r.locationmode,l.loc,i);c?(l.geojson=c,l.ct=c.properties.ct,l.index=a,l._polygons=u(c)):l.geojson=null}}function u(t){var e,r,n,i,o=t.geometry,s=o.coordinates,l=t.id,c=[];function u(t){for(var e=0;e<t.length-1;e++)if(t[e][0]>0&&t[e+1][0]<0)return e;return null}switch(e=\\\"RUS\\\"===l||\\\"FJI\\\"===l?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),i=0;i<t.length;i++)e[i]=[t[i][0]<0?t[i][0]+360:t[i][0],t[i][1]];c.push(a.tester(e))}:\\\"ATA\\\"===l?function(t){var e=u(t);if(null===e)return c.push(a.tester(t));var r=new Array(t.length+1),n=0;for(i=0;i<t.length;i++)i>e?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var o=a.tester(r);o.pts.pop(),c.push(o)}:function(t){c.push(a.tester(t))},o.type){case\\\"MultiPolygon\\\":for(r=0;r<s.length;r++)for(n=0;n<s[r].length;n++)e(s[r][n]);break;case\\\"Polygon\\\":for(r=0;r<s.length;r++)e(s[r])}return c}e.exports=function(t,e,r){for(var a=0;a<r.length;a++)c(r[a],e.topojson);var o=e.layers.backplot.select(\\\".choroplethlayer\\\");i.makeTraceGroups(o,r,\\\"trace choropleth\\\").each(function(e){var r=(e[0].node3=n.select(this)).selectAll(\\\"path.choroplethlocation\\\").data(i.identity);r.enter().append(\\\"path\\\").classed(\\\"choroplethlocation\\\",!0),r.exit().remove(),l(t,e)})}},{\\\"../../lib\\\":696,\\\"../../lib/geo_location_utils\\\":688,\\\"../../lib/polygon\\\":709,\\\"../../lib/topojson_utils\\\":724,\\\"./style\\\":911,d3:148}],910:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)(i=(n=s[r]).ct)&&(a=l.c2p(i),o=c.c2p(i),e.contains([a,o],null,r,t)?(u.push({pointNumber:r,lon:i[0],lat:i[1]}),n.selected=1):n.selected=0);return u}},{}],911:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"../../components/colorscale\\\");function s(t,e){var r=e[0].trace,s=e[0].node3.selectAll(\\\".choroplethlocation\\\"),l=r.marker||{},c=l.line||{},u=o.makeColorScaleFunc(o.extractScale(r.colorscale,r.zmin,r.zmax));s.each(function(t){n.select(this).attr(\\\"fill\\\",u(t.z)).call(i.stroke,t.mlc||c.color).call(a.dashLine,\\\"\\\",t.mlw||c.width||0).style(\\\"opacity\\\",l.opacity)}),a.selectedPointStyle(s,r,t)}e.exports={style:function(t,e){e&&s(t,e)},styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace;n.selectedpoints?a.selectedPointStyle(r.selectAll(\\\".choroplethlocation\\\"),n,t):s(t,e)}}},{\\\"../../components/color\\\":570,\\\"../../components/colorscale\\\":585,\\\"../../components/drawing\\\":595,d3:148}],912:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../mesh3d/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},z:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},u:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},v:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},w:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},sizemode:{valType:\\\"enumerated\\\",values:[\\\"scaled\\\",\\\"absolute\\\"],editType:\\\"calc\\\",dflt:\\\"scaled\\\"},sizeref:{valType:\\\"number\\\",editType:\\\"calc\\\",min:0},anchor:{valType:\\\"enumerated\\\",editType:\\\"calc\\\",values:[\\\"tip\\\",\\\"tail\\\",\\\"cm\\\",\\\"center\\\"],dflt:\\\"cm\\\"},text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"calc\\\"}};s(l,n(\\\"\\\",{colorAttr:\\\"u/v/w norm\\\",showScaleDflt:!0,editTypeOverride:\\\"calc\\\"}),{colorbar:i});[\\\"opacity\\\",\\\"lightposition\\\",\\\"lighting\\\"].forEach(function(t){l[t]=a[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:\\\"calc\\\",flags:[\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"u\\\",\\\"v\\\",\\\"w\\\",\\\"norm\\\",\\\"text\\\",\\\"name\\\"],dflt:\\\"x+y+z+norm+text+name\\\"}),l.transforms=void 0,e.exports=l},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../mesh3d/attributes\\\":987}],913:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\");e.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,c=0;c<o;c++){var u=r[c],f=i[c],h=a[c],p=Math.sqrt(u*u+f*f+h*h);s=Math.max(s,p),l=Math.min(l,p)}e._len=o,e._normMax=s,n(e,[l,s],\\\"\\\",\\\"c\\\")}},{\\\"../../components/colorscale/calc\\\":578}],914:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-cone3d\\\"),i=t(\\\"gl-cone3d\\\").createConeMesh,a=t(\\\"../../lib\\\").simpleMap,o=t(\\\"../../lib/gl_format_color\\\").parseColorScale,s=t(\\\"../../plots/gl3d/zip3\\\");function l(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var c=l.prototype;c.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index,r=this.data.x[e],n=this.data.y[e],i=this.data.z[e],a=this.data.u[e],o=this.data.v[e],s=this.data.w[e];t.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.text;return Array.isArray(l)&&void 0!==l[e]?t.textLabel=l[e]:l&&(t.textLabel=l),!0}};var u={xaxis:0,yaxis:1,zaxis:2},f={tip:1,tail:0,cm:.25,center:.5},h={tip:1,tail:1,cm:.75,center:.5};function p(t,e){var r=t.fullSceneLayout,i=t.dataScale,l={};function c(t,e){var n=r[e],o=i[u[e]];return a(t,function(t){return n.d2l(t)*o})}l.vectors=s(c(e.u,\\\"xaxis\\\"),c(e.v,\\\"yaxis\\\"),c(e.w,\\\"zaxis\\\"),e._len),l.positions=s(c(e.x,\\\"xaxis\\\"),c(e.y,\\\"yaxis\\\"),c(e.z,\\\"zaxis\\\"),e._len),l.colormap=o(e.colorscale),l.vertexIntensityBounds=[e.cmin/e._normMax,e.cmax/e._normMax],l.coneOffset=f[e.anchor],\\\"scaled\\\"===e.sizemode?l.coneSize=e.sizeref||.5:l.coneSize=e.sizeref&&e._normMax?e.sizeref/e._normMax:.5;var p=n(l),d=e.lightposition;return p.lightPosition=[d.x,d.y,d.z],p.ambient=e.lighting.ambient,p.diffuse=e.lighting.diffuse,p.specular=e.lighting.specular,p.roughness=e.lighting.roughness,p.fresnel=e.lighting.fresnel,p.opacity=e.opacity,e._pad=h[e.anchor]*p.vectorScale*p.coneScale*e._normMax,p}c.update=function(t){this.data=t;var e=p(this.scene,t);this.mesh.update(e)},c.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,n=p(t,e),a=i(r,n),o=new l(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},{\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../plots/gl3d/zip3\\\":799,\\\"gl-cone3d\\\":231}],915:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/defaults\\\"),a=t(\\\"./attributes\\\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\\\"u\\\"),c=s(\\\"v\\\"),u=s(\\\"w\\\"),f=s(\\\"x\\\"),h=s(\\\"y\\\"),p=s(\\\"z\\\");l&&l.length&&c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length&&p&&p.length?(s(\\\"sizeref\\\"),s(\\\"sizemode\\\"),s(\\\"anchor\\\"),s(\\\"lighting.ambient\\\"),s(\\\"lighting.diffuse\\\"),s(\\\"lighting.specular\\\"),s(\\\"lighting.roughness\\\"),s(\\\"lighting.fresnel\\\"),s(\\\"lightposition.x\\\"),s(\\\"lightposition.y\\\"),s(\\\"lightposition.z\\\"),i(t,e,o,s,{prefix:\\\"\\\",cLetter:\\\"c\\\"}),s(\\\"text\\\"),e._length=null):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"./attributes\\\":912}],916:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"cone\\\",basePlotModule:t(\\\"../../plots/gl3d\\\"),categories:[\\\"gl3d\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),colorbar:{min:\\\"cmin\\\",max:\\\"cmax\\\"},calc:t(\\\"./calc\\\"),plot:t(\\\"./convert\\\"),meta:{}}},{\\\"../../plots/gl3d\\\":788,\\\"./attributes\\\":912,\\\"./calc\\\":913,\\\"./convert\\\":914,\\\"./defaults\\\":915}],917:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../heatmap/attributes\\\"),i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/colorbar/attributes\\\"),s=t(\\\"../../components/drawing/attributes\\\").dash,l=t(\\\"../../plots/font_attributes\\\"),c=t(\\\"../../lib/extend\\\").extendFlat,u=t(\\\"../../constants/filter_ops\\\"),f=u.COMPARISON_OPS2,h=u.INTERVAL_OPS,p=i.line;e.exports=c({z:n.z,x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,transpose:n.transpose,xtype:n.xtype,ytype:n.ytype,zhoverformat:n.zhoverformat,connectgaps:n.connectgaps,fillcolor:{valType:\\\"color\\\",editType:\\\"calc\\\"},autocontour:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\",impliedEdits:{\\\"contours.start\\\":void 0,\\\"contours.end\\\":void 0,\\\"contours.size\\\":void 0}},ncontours:{valType:\\\"integer\\\",dflt:15,min:1,editType:\\\"calc\\\"},contours:{type:{valType:\\\"enumerated\\\",values:[\\\"levels\\\",\\\"constraint\\\"],dflt:\\\"levels\\\",editType:\\\"calc\\\"},start:{valType:\\\"number\\\",dflt:null,editType:\\\"plot\\\",impliedEdits:{\\\"^autocontour\\\":!1}},end:{valType:\\\"number\\\",dflt:null,editType:\\\"plot\\\",impliedEdits:{\\\"^autocontour\\\":!1}},size:{valType:\\\"number\\\",dflt:null,min:0,editType:\\\"plot\\\",impliedEdits:{\\\"^autocontour\\\":!1}},coloring:{valType:\\\"enumerated\\\",values:[\\\"fill\\\",\\\"heatmap\\\",\\\"lines\\\",\\\"none\\\"],dflt:\\\"fill\\\",editType:\\\"calc\\\"},showlines:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},showlabels:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"plot\\\"},labelfont:l({editType:\\\"plot\\\",colorEditType:\\\"style\\\"}),labelformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"plot\\\"},operation:{valType:\\\"enumerated\\\",values:[].concat(f).concat(h),dflt:\\\"=\\\",editType:\\\"calc\\\"},value:{valType:\\\"any\\\",dflt:0,editType:\\\"calc\\\"},editType:\\\"calc\\\",impliedEdits:{autocontour:!1}},line:{color:c({},p.color,{editType:\\\"style+colorbars\\\"}),width:c({},p.width,{editType:\\\"style+colorbars\\\"}),dash:s,smoothing:c({},p.smoothing,{}),editType:\\\"plot\\\"}},a(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1,editTypeOverride:\\\"calc\\\"}),{colorbar:o})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../components/drawing/attributes\\\":594,\\\"../../constants/filter_ops\\\":669,\\\"../../lib/extend\\\":685,\\\"../../plots/font_attributes\\\":772,\\\"../heatmap/attributes\\\":946,\\\"../scatter/attributes\\\":1044}],918:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../heatmap/calc\\\"),i=t(\\\"./set_contours\\\");e.exports=function(t,e){var r=n(t,e);return i(e),r}},{\\\"../heatmap/calc\\\":947,\\\"./set_contours\\\":936}],919:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i,a,o,s=t[0],l=s.x.length,c=s.y.length,u=s.z,f=n.contours,h=-1/0,p=1/0;for(i=0;i<c;i++)p=Math.min(p,u[i][0]),p=Math.min(p,u[i][l-1]),h=Math.max(h,u[i][0]),h=Math.max(h,u[i][l-1]);for(i=1;i<l-1;i++)p=Math.min(p,u[0][i]),p=Math.min(p,u[c-1][i]),h=Math.max(h,u[0][i]),h=Math.max(h,u[c-1][i]);switch(s.prefixBoundary=!1,e){case\\\">\\\":f.value>h&&(s.prefixBoundary=!0);break;case\\\"<\\\":f.value<p&&(s.prefixBoundary=!0);break;case\\\"[]\\\":a=Math.min.apply(null,f.value),((o=Math.max.apply(null,f.value))<p||a>h)&&(s.prefixBoundary=!0);break;case\\\"][\\\":a=Math.min.apply(null,f.value),o=Math.max.apply(null,f.value),a<p&&o>h&&(s.prefixBoundary=!0)}}},{}],920:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorbar/draw\\\"),i=t(\\\"./make_color_map\\\"),a=t(\\\"./end_plus\\\");e.exports=function(t,e){var r=e[0].trace,o=\\\"cb\\\"+r.uid;if(t._fullLayout._infolayer.selectAll(\\\".\\\"+o).remove(),r.showscale){var s=e[0].t.cb=n(t,o),l=r.contours,c=r.line,u=l.size||1,f=l.coloring,h=i(r,{isColorbar:!0});s.fillgradient(\\\"heatmap\\\"===f?r.colorscale:\\\"\\\").zrange(\\\"heatmap\\\"===f?[r.zmin,r.zmax]:\\\"\\\").fillcolor(\\\"fill\\\"===f?h:\\\"\\\").line({color:\\\"lines\\\"===f?h:c.color,width:!1!==l.showlines?c.width:0,dash:c.dash}).levels({start:l.start,end:a(l),size:u}).options(r.colorbar)()}}},{\\\"../../components/colorbar/draw\\\":575,\\\"./end_plus\\\":928,\\\"./make_color_map\\\":933}],921:[function(t,e,r){\\\"use strict\\\";e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],922:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"./label_defaults\\\"),a=t(\\\"../../components/color\\\"),o=a.addOpacity,s=a.opacity,l=t(\\\"../../constants/filter_ops\\\"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,a,l,f){var h,p,d,g=e.contours,v=r(\\\"contours.operation\\\");(g._operation=c[v],function(t,e){var r;-1===u.indexOf(e.operation)?(t(\\\"contours.value\\\",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t(\\\"contours.value\\\",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),\\\"=\\\"===v?h=g.showlines=!0:(h=r(\\\"contours.showlines\\\"),d=r(\\\"fillcolor\\\",o((t.line||{}).color||l,.5))),h)&&(p=r(\\\"line.color\\\",d&&s(d)?o(e.fillcolor,1):l),r(\\\"line.width\\\",2),r(\\\"line.dash\\\"));r(\\\"line.smoothing\\\"),i(r,a,p,f)}},{\\\"../../components/color\\\":570,\\\"../../constants/filter_ops\\\":669,\\\"./label_defaults\\\":932,\\\"fast-isnumeric\\\":214}],923:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../constants/filter_ops\\\"),i=t(\\\"fast-isnumeric\\\");function a(t,e){var r,a=Array.isArray(e);function o(t){return i(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(a?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=a?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=a?e.map(o):[o(e)]),r}function o(t){return function(e){e=a(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=a(t,e),end:1/0,size:1/0}}}e.exports={\\\"[]\\\":o(\\\"[]\\\"),\\\"][\\\":o(\\\"][\\\"),\\\">\\\":s(\\\">\\\"),\\\"<\\\":s(\\\"<\\\"),\\\"=\\\":s(\\\"=\\\")}},{\\\"../../constants/filter_ops\\\":669,\\\"fast-isnumeric\\\":214}],924:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i=n(\\\"contours.start\\\"),a=n(\\\"contours.end\\\"),o=!1===i||!1===a,s=r(\\\"contours.size\\\");!(o?e.autocontour=!0:r(\\\"autocontour\\\",!1))&&s||r(\\\"ncontours\\\")}},{}],925:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths)})}e.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case\\\"=\\\":case\\\"<\\\":return t;case\\\">\\\":for(1!==t.length&&n.warn(\\\"Contour data invalid for the specified inequality operation.\\\"),a=t[0],r=0;r<a.edgepaths.length;r++)a.edgepaths[r]=s(a.edgepaths[r]);for(r=0;r<a.paths.length;r++)a.paths[r]=s(a.paths[r]);return t;case\\\"][\\\":var c=s;s=l,l=c;case\\\"[]\\\":for(2!==t.length&&n.warn(\\\"Contour data invalid for the specified inequality range operation.\\\"),a=i(t[0]),o=i(t[1]),r=0;r<a.edgepaths.length;r++)a.edgepaths[r]=s(a.edgepaths[r]);for(r=0;r<a.paths.length;r++)a.paths[r]=s(a.paths[r]);for(;o.edgepaths.length;)a.edgepaths.push(l(o.edgepaths.shift()));for(;o.paths.length;)a.paths.push(l(o.paths.shift()));return[a]}}},{\\\"../../lib\\\":696}],926:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../heatmap/xyz_defaults\\\"),a=t(\\\"./constraint_defaults\\\"),o=t(\\\"./contours_defaults\\\"),s=t(\\\"./style_defaults\\\"),l=t(\\\"./attributes\\\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}if(i(t,e,u,c)){u(\\\"text\\\");var f=\\\"constraint\\\"===u(\\\"contours.type\\\");u(\\\"connectgaps\\\",n.isArray1D(e.z)),f?a(t,e,u,c,r):(o(t,e,u,function(r){return n.coerce2(t,e,l,r)}),s(t,e,u,c))}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../heatmap/xyz_defaults\\\":961,\\\"./attributes\\\":917,\\\"./constraint_defaults\\\":922,\\\"./contours_defaults\\\":924,\\\"./style_defaults\\\":938}],927:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./constraint_mapping\\\"),a=t(\\\"./end_plus\\\");e.exports=function(t,e,r){for(var o=\\\"constraint\\\"===t.type?i[t._operation](t.value):t,s=o.size,l=[],c=a(o),u=r.trace._carpetTrace,f=u?{xaxis:u.aaxis,yaxis:u.baxis,x:r.a,y:r.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:r.x,y:r.y},h=o.start;h<c;h+=s)if(l.push(n.extendFlat({level:h,crossings:{},starts:[],edgepaths:[],paths:[],z:r.z,smoothing:r.trace.line.smoothing},f)),l.length>1e3){n.warn(\\\"Too many contours, clipping at 1000\\\",t);break}return l}},{\\\"../../lib\\\":696,\\\"./constraint_mapping\\\":923,\\\"./end_plus\\\":928}],928:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){return t.end+t.size/1e6}},{}],929:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./constants\\\");function a(t,e,r,n){return Math.abs(t[0]-e[0])<r&&Math.abs(t[1]-e[1])<n}function o(t,e,r,o,l){var c,u=e.join(\\\",\\\"),f=u,h=t.crossings[f],p=function(t,e,r){var n=0,a=0;t>20&&e?208===t||1114===t?n=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(t)?a=1:-1!==i.LEFTSTART.indexOf(t)?n=1:-1!==i.TOPSTART.indexOf(t)?a=-1:n=-1;return[n,a]}(h,r,e),d=[s(t,e,[-p[0],-p[1]])],g=p.join(\\\",\\\"),v=t.z.length,m=t.z[0].length;for(c=0;c<1e4;c++){if(h>20?(h=i.CHOOSESADDLE[h][(p[0]||p[1])<0?0:1],t.crossings[f]=i.SADDLEREMAINDER[h]):delete t.crossings[f],!(p=i.NEWDELTA[h])){n.log(\\\"Found bad marching index:\\\",h,e,t.level);break}d.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],a(d[d.length-1],d[d.length-2],o,l)&&d.pop(),f=e.join(\\\",\\\");var y=p[0]&&(e[0]<0||e[0]>m-2)||p[1]&&(e[1]<0||e[1]>v-2);if(f===u&&p.join(\\\",\\\")===g||r&&y)break;h=t.crossings[f]}1e4===c&&n.log(\\\"Infinite loop in contour?\\\");var x,b,_,w,k,M,A,T,S,C,E,L,z,O,I,P=a(d[0],d[d.length-1],o,l),D=0,R=.2*t.smoothing,B=[],F=0;for(c=1;c<d.length;c++)L=d[c],z=d[c-1],void 0,void 0,O=L[2]-z[2],I=L[3]-z[3],D+=A=Math.sqrt(O*O+I*I),B.push(A);var N=D/B.length*R;function j(t){return d[t%d.length]}for(c=d.length-2;c>=F;c--)if((x=B[c])<N){for(_=0,b=c-1;b>=F&&x+B[b]<N;b--)x+=B[b];if(P&&c===d.length-2)for(_=0;_<b&&x+B[_]<N;_++)x+=B[_];k=c-b+_+1,M=Math.floor((c+b+_+2)/2),w=P||c!==d.length-2?P||-1!==b?k%2?j(M):[(j(M)[0]+j(M+1)[0])/2,(j(M)[1]+j(M+1)[1])/2]:d[0]:d[d.length-1],d.splice(b+1,c-b+1,w),c=b+1,_&&(F=_),P&&(c===d.length-2?d[_]=d[d.length-1]:0===c&&(d[d.length-1]=d[0]))}for(d.splice(0,F),c=0;c<d.length;c++)d[c].length=2;if(!(d.length<2))if(P)d.pop(),t.paths.push(d);else{r||n.log(\\\"Unclosed interior contour?\\\",t.level,u,d.join(\\\"L\\\"));var V=!1;for(T=0;T<t.edgepaths.length;T++)if(C=t.edgepaths[T],!V&&a(C[0],d[d.length-1],o,l)){d.pop(),V=!0;var U=!1;for(S=0;S<t.edgepaths.length;S++)if(a((E=t.edgepaths[S])[E.length-1],d[0],o,l)){U=!0,d.shift(),t.edgepaths.splice(T,1),S===T?t.paths.push(d.concat(E)):(S>T&&S--,t.edgepaths[S]=E.concat(d,C));break}U||(t.edgepaths[T]=d.concat(C))}for(T=0;T<t.edgepaths.length&&!V;T++)a((C=t.edgepaths[T])[C.length-1],d[0],o,l)&&(d.shift(),t.edgepaths[T]=C.concat(d),V=!0);V||t.edgepaths.push(d)}}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a);return[o.c2p((1-l)*t.x[n]+l*t.x[n+1],!0),s.c2p(t.y[i],!0),n+l,i]}var c=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-c)*t.y[i]+c*t.y[i+1],!0),n,i+c]}e.exports=function(t,e,r){var i,a,s,l;for(e=e||.01,r=r||.01,a=0;a<t.length;a++){for(s=t[a],l=0;l<s.starts.length;l++)o(s,s.starts[l],\\\"edge\\\",e,r);for(i=0;Object.keys(s.crossings).length&&i<1e4;)i++,o(s,Object.keys(s.crossings)[0].split(\\\",\\\").map(Number),void 0,e,r);1e4===i&&n.log(\\\"Infinite loop in contour?\\\")}}},{\\\"../../lib\\\":696,\\\"./constants\\\":921}],930:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../heatmap/hover\\\");e.exports=function(t,e,r,a,o){var s=i(t,e,r,a,o,!0);return s&&s.forEach(function(t){var e=t.trace;\\\"constraint\\\"===e.contours.type&&(e.fillcolor&&n.opacity(e.fillcolor)?t.color=n.addOpacity(e.fillcolor,1):e.contours.showlines&&n.opacity(e.line.color)&&(t.color=n.addOpacity(e.line.color,1)))}),s}},{\\\"../../components/color\\\":570,\\\"../heatmap/hover\\\":953}],931:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\").plot,n.style=t(\\\"./style\\\"),n.colorbar=t(\\\"./colorbar\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"contour\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"2dMap\\\",\\\"contour\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":917,\\\"./calc\\\":918,\\\"./colorbar\\\":920,\\\"./defaults\\\":926,\\\"./hover\\\":930,\\\"./plot\\\":935,\\\"./style\\\":937}],932:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e,r,i){if(i||(i={}),t(\\\"contours.showlabels\\\")){var a=e.font;n.coerceFont(t,\\\"contours.labelfont\\\",{family:a.family,size:a.size,color:r}),t(\\\"contours.labelformat\\\")}!1!==i.hasHover&&t(\\\"zhoverformat\\\")}},{\\\"../../lib\\\":696}],933:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/colorscale\\\"),a=t(\\\"./end_plus\\\");e.exports=function(t){var e=t.contours,r=e.start,o=a(e),s=e.size||1,l=Math.floor((o-r)/s)+1,c=\\\"lines\\\"===e.coloring?0:1;isFinite(s)||(s=1,l=1);var u,f,h=t.colorscale,p=h.length,d=new Array(p),g=new Array(p);if(\\\"heatmap\\\"===e.coloring){for(t.zauto&&!1===t.autocontour&&(t.zmin=r-s/2,t.zmax=t.zmin+l*s),f=0;f<p;f++)u=h[f],d[f]=u[0]*(t.zmax-t.zmin)+t.zmin,g[f]=u[1];var v=n.extent([t.zmin,t.zmax,e.start,e.start+s*(l-1)]),m=v[t.zmin<t.zmax?0:1],y=v[t.zmin<t.zmax?1:0];m!==t.zmin&&(d.splice(0,0,m),g.splice(0,0,Range[0])),y!==t.zmax&&(d.push(y),g.push(g[g.length-1]))}else for(f=0;f<p;f++)u=h[f],d[f]=(u[0]*(l+c-1)-c/2)*s+r,g[f]=u[1];return i.makeColorScaleFunc({domain:d,range:g},{noNumericCheck:!0})}},{\\\"../../components/colorscale\\\":585,\\\"./end_plus\\\":928,d3:148}],934:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\");function i(t,e){var r=(e[0][0]>t?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(t){var e,r,a,o,s,l,c,u,f,h=t[0].z,p=h.length,d=h[0].length,g=2===p||2===d;for(r=0;r<p-1;r++)for(o=[],0===r&&(o=o.concat(n.BOTTOMSTART)),r===p-2&&(o=o.concat(n.TOPSTART)),e=0;e<d-1;e++)for(a=o.slice(),0===e&&(a=a.concat(n.LEFTSTART)),e===d-2&&(a=a.concat(n.RIGHTSTART)),s=e+\\\",\\\"+r,l=[[h[r][e],h[r][e+1]],[h[r+1][e],h[r+1][e+1]]],f=0;f<t.length;f++)(c=i((u=t[f]).level,l))&&(u.crossings[s]=c,-1!==a.indexOf(c)&&(u.starts.push([e,r]),g&&-1!==a.indexOf(c,a.indexOf(c)+1)&&u.starts.push([e,r])))}},{\\\"./constants\\\":921}],935:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"../../lib/svg_text_utils\\\"),s=t(\\\"../../plots/cartesian/axes\\\"),l=t(\\\"../../plots/cartesian/set_convert\\\"),c=t(\\\"../heatmap/plot\\\"),u=t(\\\"./make_crossings\\\"),f=t(\\\"./find_all_paths\\\"),h=t(\\\"./empty_pathinfo\\\"),p=t(\\\"./convert_to_constraints\\\"),d=t(\\\"./close_boundaries\\\"),g=t(\\\"./constants\\\"),v=g.LABELOPTIMIZER;function m(t,e){var r,n,o,s,l,c,u,f=function(t,e){var r=t.prefixBoundary;if(void 0===r){var n=Math.min(t.z[0][0],t.z[0][1]);r=!t.edgepaths.length&&n>t.level}return r?\\\"M\\\"+e.join(\\\"L\\\")+\\\"Z\\\":\\\"\\\"}(t,e),h=0,p=t.edgepaths.map(function(t,e){return e}),d=!0;function g(t){return Math.abs(t[1]-e[2][1])<.01}function v(t){return Math.abs(t[0]-e[0][0])<.01}function m(t){return Math.abs(t[0]-e[2][0])<.01}for(;p.length;){for(c=a.smoothopen(t.edgepaths[h],t.smoothing),f+=d?c:c.replace(/^M/,\\\"L\\\"),p.splice(p.indexOf(h),1),r=t.edgepaths[h][t.edgepaths[h].length-1],s=-1,o=0;o<4;o++){if(!r){i.log(\\\"Missing end?\\\",h,t);break}for(u=r,Math.abs(u[1]-e[0][1])<.01&&!m(r)?n=e[1]:v(r)?n=e[0]:g(r)?n=e[3]:m(r)&&(n=e[2]),l=0;l<t.edgepaths.length;l++){var y=t.edgepaths[l][0];Math.abs(r[0]-n[0])<.01?Math.abs(r[0]-y[0])<.01&&(y[1]-r[1])*(n[1]-y[1])>=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):i.log(\\\"endpt to newendpt is not vert. or horz.\\\",r,n,y)}if(r=n,s>=0)break;f+=\\\"L\\\"+n}if(s===t.edgepaths.length){i.log(\\\"unclosed perimeter path\\\");break}h=s,(d=-1===p.indexOf(h))&&(h=p[0],f+=\\\"Z\\\")}for(h=0;h<t.paths.length;h++)f+=a.smoothclosed(t.paths[h],t.smoothing);return f}function y(t,e,r,n){var a=e.width/2,o=e.height/2,s=t.x,l=t.y,c=t.theta,u=Math.cos(c)*a,f=Math.sin(c)*a,h=(s>n.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),p=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*o);if(h<1||p<1)return 1/0;var d=v.EDGECOST*(1/(h-1)+1/(p-1));d+=v.ANGLECOST*c*c;for(var g=s-u,m=l-f,y=s+u,x=l+f,b=0;b<r.length;b++){var _=r[b],w=Math.cos(_.theta)*_.width/2,k=Math.sin(_.theta)*_.width/2,M=2*i.segmentDistance(g,m,y,x,_.x-w,_.y-k,_.x+w,_.y+k)/(e.height+_.height),A=_.level===e.level,T=A?v.SAMELEVELDISTANCE:1;if(M<=T)return 1/0;d+=v.NEIGHBORCOST*(A?v.SAMELEVELFACTOR:1)/(M-T)}return d}r.plot=function(t,e,o,s){var l=e.xaxis,v=e.yaxis,y=t._fullLayout;i.makeTraceGroups(s,o,\\\"contour\\\").each(function(o){var s=n.select(this),x=o[0],b=x.trace,_=x.x,w=x.y,k=b.contours,M=h(k,e,x),A=i.ensureSingle(s,\\\"g\\\",\\\"heatmapcoloring\\\"),T=[];\\\"heatmap\\\"===k.coloring&&(b.zauto&&!1===b.autocontour&&(b._input.zmin=b.zmin=k.start-k.size/2,b._input.zmax=b.zmax=b.zmin+M.length*k.size),T=[o]),c(t,e,T,A),u(M),f(M);var S=l.c2p(_[0],!0),C=l.c2p(_[_.length-1],!0),E=v.c2p(w[0],!0),L=v.c2p(w[w.length-1],!0),z=[[S,L],[C,L],[C,E],[S,E]],O=M;\\\"constraint\\\"===k.type&&(O=p(M,k._operation),d(O,k._operation,z,b)),function(t,e,r){var n=i.ensureSingle(t,\\\"g\\\",\\\"contourbg\\\").selectAll(\\\"path\\\").data(\\\"fill\\\"===r.coloring?[0]:[]);n.enter().append(\\\"path\\\"),n.exit().remove(),n.attr(\\\"d\\\",\\\"M\\\"+e.join(\\\"L\\\")+\\\"Z\\\").style(\\\"stroke\\\",\\\"none\\\")}(s,z,k),function(t,e,r,a){var o=i.ensureSingle(t,\\\"g\\\",\\\"contourfill\\\").selectAll(\\\"path\\\").data(\\\"fill\\\"===a.coloring||\\\"constraint\\\"===a.type&&\\\"=\\\"!==a._operation?e:[]);o.enter().append(\\\"path\\\"),o.exit().remove(),o.each(function(t){var e=m(t,r);e?n.select(this).attr(\\\"d\\\",e).style(\\\"stroke\\\",\\\"none\\\"):n.select(this).remove()})}(s,O,z,k),function(t,e,o,s,l,c){var u=i.ensureSingle(t,\\\"g\\\",\\\"contourlines\\\"),f=!1!==l.showlines,h=l.showlabels,p=f&&h,d=r.createLines(u,f||h,e),v=r.createLineClip(u,p,o._fullLayout._clips,s.trace.uid),m=t.selectAll(\\\"g.contourlabels\\\").data(h?[0]:[]);if(m.exit().remove(),m.enter().append(\\\"g\\\").classed(\\\"contourlabels\\\",!0),h){var y=[c],x=[];i.clearLocationCache();var b=r.labelFormatter(l,s.t.cb,o._fullLayout),_=a.tester.append(\\\"text\\\").attr(\\\"data-notex\\\",1).call(a.font,l.labelfont),w=e[0].xaxis._length,k=e[0].yaxis._length,M={left:Math.max(c[0][0],0),right:Math.min(c[2][0],w),top:Math.max(c[0][1],0),bottom:Math.min(c[2][1],k)};M.middle=(M.top+M.bottom)/2,M.center=(M.left+M.right)/2;var A=Math.sqrt(w*w+k*k),T=g.LABELDISTANCE*A/Math.max(1,e.length/g.LABELINCREASE);d.each(function(t){var e=r.calcTextOpts(t.level,b,_,o);n.select(this).selectAll(\\\"path\\\").each(function(){var t=i.getVisibleSegment(this,M,e.height/2);if(t&&!(t.len<(e.width+e.height)*g.LABELMIN))for(var n=Math.min(Math.ceil(t.len/T),g.LABELMAX),a=0;a<n;a++){var o=r.findBestTextLocation(this,t,e,x,M);if(!o)break;r.addLabelData(o,e,x,y)}})}),_.remove(),r.drawLabels(m,x,o,v,p?y:null)}h&&!f&&d.remove()}(s,M,t,x,k,z),function(t,e,r,n,o){var s=\\\"clip\\\"+n.trace.uid,l=r.selectAll(\\\"#\\\"+s).data(n.trace.connectgaps?[]:[0]);if(l.enter().append(\\\"clipPath\\\").classed(\\\"contourclip\\\",!0).attr(\\\"id\\\",s),l.exit().remove(),!1===n.trace.connectgaps){var c={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:e.xaxis,yaxis:e.yaxis,x:n.x,y:n.y,z:function(t){var e,r,n=t.trace._emptypoints,i=[],a=t.z.length,o=t.z[0].length,s=[];for(e=0;e<o;e++)s.push(1);for(e=0;e<a;e++)i.push(s.slice());for(e=0;e<n.length;e++)r=n[e],i[r[0]][r[1]]=0;return t.zmask=i,i}(n),smoothing:0};u([c]),f([c]);var h=m(c,o),p=i.ensureSingle(l,\\\"path\\\",\\\"\\\");p.attr(\\\"d\\\",h)}else s=null;t.call(a.setClipUrl,s)}(s,e,y._clips,x,z)})},r.createLines=function(t,e,r){var n=r[0].smoothing,i=t.selectAll(\\\"g.contourlevel\\\").data(e?r:[]);if(i.exit().remove(),i.enter().append(\\\"g\\\").classed(\\\"contourlevel\\\",!0),e){var o=i.selectAll(\\\"path.openline\\\").data(function(t){return t.pedgepaths||t.edgepaths});o.exit().remove(),o.enter().append(\\\"path\\\").classed(\\\"openline\\\",!0),o.attr(\\\"d\\\",function(t){return a.smoothopen(t,n)}).style(\\\"stroke-miterlimit\\\",1).style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\");var s=i.selectAll(\\\"path.closedline\\\").data(function(t){return t.ppaths||t.paths});s.exit().remove(),s.enter().append(\\\"path\\\").classed(\\\"closedline\\\",!0),s.attr(\\\"d\\\",function(t){return a.smoothclosed(t,n)}).style(\\\"stroke-miterlimit\\\",1).style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\")}return i},r.createLineClip=function(t,e,r,n){var i=e?\\\"clipline\\\"+n:null,o=r.selectAll(\\\"#\\\"+i).data(e?[0]:[]);return o.exit().remove(),o.enter().append(\\\"clipPath\\\").classed(\\\"contourlineclip\\\",!0).attr(\\\"id\\\",i),a.setClipUrl(t,i),o},r.labelFormatter=function(t,e,r){if(t.labelformat)return r._d3locale.numberFormat(t.labelformat);var n;if(e)n=e.axis;else{if(n={type:\\\"linear\\\",_id:\\\"ycontour\\\",showexponent:\\\"all\\\",exponentformat:\\\"B\\\"},\\\"constraint\\\"===t.type){var i=t.value;Array.isArray(i)?n.range=[i[0],i[i.length-1]]:n.range=[i,i]}else n.range=[t.start,t.end],n.nticks=(t.end-t.start)/t.size;n.range[0]===n.range[1]&&(n.range[1]+=n.range[0]||1),n.nticks||(n.nticks=1e3),l(n,r),s.prepTicks(n),n._tmin=null,n._tmax=null}return function(t){return s.tickText(n,t).text}},r.calcTextOpts=function(t,e,r,n){var i=e(t);r.text(i).call(o.convertToTspans,n);var s=a.bBox(r.node(),!0);return{text:i,width:s.width,height:s.height,level:t,dy:(s.top+s.bottom)/2}},r.findBestTextLocation=function(t,e,r,n,a){var o,s,l,c,u,f=r.width;e.isClosed?(s=e.len/v.INITIALSEARCHPOINTS,o=e.min+s/2,l=e.max):(s=(e.len-f)/(v.INITIALSEARCHPOINTS+1),o=e.min+s+f/2,l=e.max-(s+f)/2);for(var h=1/0,p=0;p<v.ITERATIONS;p++){for(var d=o;d<l;d+=s){var g=i.getTextLocation(t,e.total,d,f),m=y(g,r,n,a);m<h&&(h=m,u=g,c=d)}if(h>2*v.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(h<=v.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.width/2,a=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),f=i*u,h=a*c,p=i*c,d=-a*u,g=[[o-f-h,s-p-d],[o+f-h,s+p-d],[o+f+h,s+p+d],[o-f+h,s-p+d]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(g)},r.drawLabels=function(t,e,r,a,s){var l=t.selectAll(\\\"text\\\").data(e,function(t){return t.text+\\\",\\\"+t.x+\\\",\\\"+t.y+\\\",\\\"+t.theta});if(l.exit().remove(),l.enter().append(\\\"text\\\").attr({\\\"data-notex\\\":1,\\\"text-anchor\\\":\\\"middle\\\"}).each(function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:\\\"rotate(\\\"+180*t.theta/Math.PI+\\\" \\\"+e+\\\" \\\"+i+\\\")\\\"}).call(o.convertToTspans,r)}),s){for(var c=\\\"\\\",u=0;u<s.length;u++)c+=\\\"M\\\"+s[u].join(\\\"L\\\")+\\\"Z\\\";i.ensureSingle(a,\\\"path\\\",\\\"\\\").attr(\\\"d\\\",c)}}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/cartesian/set_convert\\\":764,\\\"../heatmap/plot\\\":958,\\\"./close_boundaries\\\":919,\\\"./constants\\\":921,\\\"./convert_to_constraints\\\":925,\\\"./empty_pathinfo\\\":927,\\\"./find_all_paths\\\":929,\\\"./make_crossings\\\":934,d3:148}],936:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\");function a(t,e,r){var i={type:\\\"linear\\\",range:[t,e]};return n.autoTicks(i,(e-t)/(r||15)),i}e.exports=function(t){var e=t.contours;if(t.autocontour){var r=t.zmin,o=t.zmax;void 0!==r&&void 0!==o||(r=i.aggNums(Math.min,null,t._z),o=i.aggNums(Math.max,null,t._z));var s=a(r,o,t.ncontours);e.size=s.dtick,e.start=n.tickFirst(s),s.range.reverse(),e.end=n.tickFirst(s),e.start===r&&(e.start+=e.size),e.end===o&&(e.end-=e.size),e.start>e.end&&(e.start=e.end=(e.start+e.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:e.start,end:e.end,size:e.size}),t._input.autocontour=!0}else if(\\\"constraint\\\"!==e.type){var l,c=e.start,u=e.end,f=t._input.contours;if(c>u&&(e.start=f.start=u,u=e.end=f.end=c,c=e.start),!(e.size>0))l=c===u?1:a(c,u,t.ncontours).dtick,f.size=e.size=l}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],937:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"../heatmap/style\\\"),o=t(\\\"./make_color_map\\\");e.exports=function(t){var e=n.select(t).selectAll(\\\"g.contour\\\");e.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),e.each(function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u=\\\"constraint\\\"===a.type,f=!u&&\\\"lines\\\"===a.coloring,h=!u&&\\\"fill\\\"===a.coloring,p=f||h?o(r):null;e.selectAll(\\\"g.contourlevel\\\").each(function(t){n.select(this).selectAll(\\\"path\\\").call(i.lineGroupStyle,s.width,f?p(t.level):s.color,s.dash)});var d=a.labelfont;if(e.selectAll(\\\"g.contourlabels text\\\").each(function(t){i.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?p(t.level):s.color)})}),u)e.selectAll(\\\"g.contourfill path\\\").style(\\\"fill\\\",r.fillcolor);else if(h){var g;e.selectAll(\\\"g.contourfill path\\\").style(\\\"fill\\\",function(t){return void 0===g&&(g=t.level),p(t.level+.5*l)}),void 0===g&&(g=c),e.selectAll(\\\"g.contourbg path\\\").style(\\\"fill\\\",p(g-.5*l))}}),a(t)}},{\\\"../../components/drawing\\\":595,\\\"../heatmap/style\\\":959,\\\"./make_color_map\\\":933,d3:148}],938:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/defaults\\\"),i=t(\\\"./label_defaults\\\");e.exports=function(t,e,r,a,o){var s,l=r(\\\"contours.coloring\\\"),c=\\\"\\\";\\\"fill\\\"===l&&(s=r(\\\"contours.showlines\\\")),!1!==s&&(\\\"lines\\\"!==l&&(c=r(\\\"line.color\\\",\\\"#000\\\")),r(\\\"line.width\\\",.5),r(\\\"line.dash\\\")),\\\"none\\\"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,a,r,{prefix:\\\"\\\",cLetter:\\\"z\\\"})),r(\\\"line.smoothing\\\"),i(r,a,c,o)}},{\\\"../../components/colorscale/defaults\\\":580,\\\"./label_defaults\\\":932}],939:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../heatmap/attributes\\\"),i=t(\\\"../contour/attributes\\\"),a=i.contours,o=t(\\\"../scatter/attributes\\\"),s=t(\\\"../../components/colorscale/attributes\\\"),l=t(\\\"../../components/colorbar/attributes\\\"),c=t(\\\"../../lib/extend\\\").extendFlat,u=o.line;e.exports=c({carpet:{valType:\\\"string\\\",editType:\\\"calc\\\"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:a.type,start:a.start,end:a.end,size:a.size,coloring:{valType:\\\"enumerated\\\",values:[\\\"fill\\\",\\\"lines\\\",\\\"none\\\"],dflt:\\\"fill\\\",editType:\\\"calc\\\"},showlines:a.showlines,showlabels:a.showlabels,labelfont:a.labelfont,labelformat:a.labelformat,operation:a.operation,value:a.value,editType:\\\"calc\\\",impliedEdits:{autocontour:!1}},line:{color:c({},u.color,{}),width:u.width,dash:u.dash,smoothing:c({},u.smoothing,{}),editType:\\\"plot\\\"},transforms:void 0},s(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1}),{colorbar:l})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../contour/attributes\\\":917,\\\"../heatmap/attributes\\\":946,\\\"../scatter/attributes\\\":1044}],940:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\"),i=t(\\\"../../lib\\\").isArray1D,a=t(\\\"../heatmap/convert_column_xyz\\\"),o=t(\\\"../heatmap/clean_2d_array\\\"),s=t(\\\"../heatmap/max_row_length\\\"),l=t(\\\"../heatmap/interp2d\\\"),c=t(\\\"../heatmap/find_empties\\\"),u=t(\\\"../heatmap/make_bound_array\\\"),f=t(\\\"./defaults\\\"),h=t(\\\"../carpet/lookup_carpetid\\\"),p=t(\\\"../contour/set_contours\\\");e.exports=function(t,e){var r=e._carpetTrace=h(t,e);if(r&&r.visible&&\\\"legendonly\\\"!==r.visible){if(!e.a||!e.b){var d=t.data[r.index],g=t.data[e.index];g.a||(g.a=d.a),g.b||(g.b=d.b),f(g,e,e._defaultColor,t._fullLayout)}var v=function(t,e){var r,f,h,p,d,g,v,m=e._carpetTrace,y=m.aaxis,x=m.baxis;y._minDtick=0,x._minDtick=0,i(e.z)&&a(e,y,x,\\\"a\\\",\\\"b\\\",[\\\"z\\\"]);r=e._a=e._a||e.a,p=e._b=e._b||e.b,r=r?y.makeCalcdata(e,\\\"_a\\\"):[],p=p?x.makeCalcdata(e,\\\"_b\\\"):[],f=e.a0||0,h=e.da||1,d=e.b0||0,g=e.db||1,v=e._z=o(e._z||e.z,e.transpose),e._emptypoints=c(v),l(v,e._emptypoints);var b=s(v),_=\\\"scaled\\\"===e.xtype?\\\"\\\":r,w=u(e,_,f,h,b,y),k=\\\"scaled\\\"===e.ytype?\\\"\\\":p,M=u(e,k,d,g,v.length,x),A={a:w,b:M,z:v};\\\"levels\\\"===e.contours.type&&\\\"none\\\"!==e.contours.coloring&&n(e,v,\\\"\\\",\\\"z\\\");return[A]}(0,e);return p(e),v}}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../lib\\\":696,\\\"../carpet/lookup_carpetid\\\":895,\\\"../contour/set_contours\\\":936,\\\"../heatmap/clean_2d_array\\\":948,\\\"../heatmap/convert_column_xyz\\\":950,\\\"../heatmap/find_empties\\\":952,\\\"../heatmap/interp2d\\\":955,\\\"../heatmap/make_bound_array\\\":956,\\\"../heatmap/max_row_length\\\":957,\\\"./defaults\\\":941}],941:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../heatmap/xyz_defaults\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"../contour/constraint_defaults\\\"),s=t(\\\"../contour/contours_defaults\\\"),l=t(\\\"../contour/style_defaults\\\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,a,r,i)}if(u(\\\"carpet\\\"),t.a&&t.b){if(!i(t,e,u,c,\\\"a\\\",\\\"b\\\"))return void(e.visible=!1);u(\\\"text\\\"),\\\"constraint\\\"===u(\\\"contours.type\\\")?o(t,e,u,c,r,{hasHover:!1}):(s(t,e,u,function(r){return n.coerce2(t,e,a,r)}),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{\\\"../../lib\\\":696,\\\"../contour/constraint_defaults\\\":922,\\\"../contour/contours_defaults\\\":924,\\\"../contour/style_defaults\\\":938,\\\"../heatmap/xyz_defaults\\\":961,\\\"./attributes\\\":939}],942:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../contour/colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"../contour/style\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"contourcarpet\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"carpet\\\",\\\"contour\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"hasLines\\\",\\\"carpetDependent\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../contour/colorbar\\\":920,\\\"../contour/style\\\":937,\\\"./attributes\\\":939,\\\"./calc\\\":940,\\\"./defaults\\\":941,\\\"./plot\\\":945}],943:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/drawing\\\"),i=t(\\\"../carpet/axis_aligned_line\\\"),a=t(\\\"../../lib\\\");e.exports=function(t,e,r,o,s,l,c,u){var f,h,p,d,g,v,m,y=\\\"\\\",x=e.edgepaths.map(function(t,e){return e}),b=!0,_=1e-4*Math.abs(r[0][0]-r[2][0]),w=1e-4*Math.abs(r[0][1]-r[2][1]);function k(t){return Math.abs(t[1]-r[0][1])<w}function M(t){return Math.abs(t[1]-r[2][1])<w}function A(t){return Math.abs(t[0]-r[0][0])<_}function T(t){return Math.abs(t[0]-r[2][0])<_}function S(t,e){var r,n,a,o,f=\\\"\\\";for(k(t)&&!T(t)||M(t)&&!A(t)?(o=s.aaxis,a=i(s,l,[t[0],e[0]],.5*(t[1]+e[1]))):(o=s.baxis,a=i(s,l,.5*(t[0]+e[0]),[t[1],e[1]])),r=1;r<a.length;r++)for(f+=o.smoothing?\\\"C\\\":\\\"L\\\",n=0;n<a[r].length;n++){var h=a[r][n];f+=[c.c2p(h[0]),u.c2p(h[1])]+\\\" \\\"}return f}for(f=0,h=null;x.length;){var C=e.edgepaths[f][0];for(h&&(y+=S(h,C)),m=n.smoothopen(e.edgepaths[f].map(o),e.smoothing),y+=b?m:m.replace(/^M/,\\\"L\\\"),x.splice(x.indexOf(f),1),h=e.edgepaths[f][e.edgepaths[f].length-1],g=-1,d=0;d<4;d++){if(!h){a.log(\\\"Missing end?\\\",f,e);break}for(k(h)&&!T(h)?p=r[1]:A(h)?p=r[0]:M(h)?p=r[3]:T(h)&&(p=r[2]),v=0;v<e.edgepaths.length;v++){var E=e.edgepaths[v][0];Math.abs(h[0]-p[0])<_?Math.abs(h[0]-E[0])<_&&(E[1]-h[1])*(p[1]-E[1])>=0&&(p=E,g=v):Math.abs(h[1]-p[1])<w?Math.abs(h[1]-E[1])<w&&(E[0]-h[0])*(p[0]-E[0])>=0&&(p=E,g=v):a.log(\\\"endpt to newendpt is not vert. or horz.\\\",h,p,E)}if(g>=0)break;y+=S(h,p),h=p}if(g===e.edgepaths.length){a.log(\\\"unclosed perimeter path\\\");break}f=g,(b=-1===x.indexOf(f))&&(f=x[0],y+=S(h,p)+\\\"Z\\\",h=null)}for(f=0;f<e.paths.length;f++)y+=n.smoothclosed(e.paths[f].map(o),e.smoothing);return y}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../carpet/axis_aligned_line\\\":879}],944:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r<t.length;r++){for(o=(a=t[r]).pedgepaths=[],s=a.ppaths=[],n=0;n<a.edgepaths.length;n++){for(u=a.edgepaths[n],l=[],i=0;i<u.length;i++)l[i]=e(u[i]);o.push(l)}for(n=0;n<a.paths.length;n++){for(u=a.paths[n],c=[],i=0;i<u.length;i++)c[i]=e(u[i]);s.push(c)}}}},{}],945:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../carpet/map_1d_array\\\"),a=t(\\\"../carpet/makepath\\\"),o=t(\\\"../../components/drawing\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../contour/make_crossings\\\"),c=t(\\\"../contour/find_all_paths\\\"),u=t(\\\"../contour/plot\\\"),f=t(\\\"../contour/constants\\\"),h=t(\\\"../contour/convert_to_constraints\\\"),p=t(\\\"./join_all_paths\\\"),d=t(\\\"../contour/empty_pathinfo\\\"),g=t(\\\"./map_pathinfo\\\"),v=t(\\\"../carpet/lookup_carpetid\\\"),m=t(\\\"../contour/close_boundaries\\\");function y(t,e,r){var n=t.getPointAtLength(e),i=t.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function x(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function b(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}e.exports=function(t,e,r,_){var w=e.xaxis,k=e.yaxis;s.makeTraceGroups(_,r,\\\"contour\\\").each(function(r){var _=n.select(this),M=r[0],A=M.trace,T=A._carpetTrace=v(t,A),S=t.calcdata[T.index][0];if(T.visible&&\\\"legendonly\\\"!==T.visible){var C=M.a,E=M.b,L=A.contours,z=d(L,e,M),O=\\\"constraint\\\"===L.type,I=L._operation,P=O?\\\"=\\\"===I?\\\"lines\\\":\\\"fill\\\":L.coloring,D=[[C[0],E[E.length-1]],[C[C.length-1],E[E.length-1]],[C[C.length-1],E[0]],[C[0],E[0]]];l(z);var R=1e-8*(C[C.length-1]-C[0]),B=1e-8*(E[E.length-1]-E[0]);c(z,R,B);var F,N,j,V,U=z;\\\"constraint\\\"===L.type&&(U=h(z,I),m(U,I,D,A)),g(z,G);var q=[];for(V=S.clipsegments.length-1;V>=0;V--)F=S.clipsegments[V],N=i([],F.x,w.c2p),j=i([],F.y,k.c2p),N.reverse(),j.reverse(),q.push(a(N,j,F.bicubic));var H=\\\"M\\\"+q.join(\\\"L\\\")+\\\"Z\\\";!function(t,e,r,n,o,l){var c,u,f,h,p=s.ensureSingle(t,\\\"g\\\",\\\"contourbg\\\").selectAll(\\\"path\\\").data(\\\"fill\\\"!==l||o?[]:[0]);p.enter().append(\\\"path\\\"),p.exit().remove();var d=[];for(h=0;h<e.length;h++)c=e[h],u=i([],c.x,r.c2p),f=i([],c.y,n.c2p),d.push(a(u,f,c.bicubic));p.attr(\\\"d\\\",\\\"M\\\"+d.join(\\\"L\\\")+\\\"Z\\\").style(\\\"stroke\\\",\\\"none\\\")}(_,S.clipsegments,w,k,O,P),function(t,e,r,i,a,o,l,c,u,f,h){var d=s.ensureSingle(e,\\\"g\\\",\\\"contourfill\\\").selectAll(\\\"path\\\").data(\\\"fill\\\"===f?a:[]);d.enter().append(\\\"path\\\"),d.exit().remove(),d.each(function(e){var a=p(t,e,o,l,c,u,r,i);e.prefixBoundary&&(a=h+a),a?n.select(this).attr(\\\"d\\\",a).style(\\\"stroke\\\",\\\"none\\\"):n.select(this).remove()})}(A,_,w,k,U,D,G,T,S,P,H),function(t,e,r,i,a,l,c){var h=s.ensureSingle(t,\\\"g\\\",\\\"contourlines\\\"),p=!1!==a.showlines,d=a.showlabels,g=p&&d,v=u.createLines(h,p||d,e),m=u.createLineClip(h,g,r._fullLayout._defs,i.trace.uid),_=t.selectAll(\\\"g.contourlabels\\\").data(d?[0]:[]);if(_.exit().remove(),_.enter().append(\\\"g\\\").classed(\\\"contourlabels\\\",!0),d){var w=l.xaxis,k=l.yaxis,M=w._length,A=k._length,T=[[[0,0],[M,0],[M,A],[0,A]]],S=[];s.clearLocationCache();var C=u.labelFormatter(a,i.t.cb,r._fullLayout),E=o.tester.append(\\\"text\\\").attr(\\\"data-notex\\\",1).call(o.font,a.labelfont),L={left:0,right:M,center:M/2,top:0,bottom:A,middle:A/2},z=Math.sqrt(M*M+A*A),O=f.LABELDISTANCE*z/Math.max(1,e.length/f.LABELINCREASE);v.each(function(t){var e=u.calcTextOpts(t.level,C,E,r);n.select(this).selectAll(\\\"path\\\").each(function(r){var n=s.getVisibleSegment(this,L,e.height/2);if(n&&(function(t,e,r,n,i,a){for(var o,s=0;s<r.pedgepaths.length;s++)e===r.pedgepaths[s]&&(o=r.edgepaths[s]);if(!o)return;var l=i.a[0],c=i.a[i.a.length-1],u=i.b[0],f=i.b[i.b.length-1];function h(t,e){var r,n=0;return(Math.abs(t[0]-l)<.1||Math.abs(t[0]-c)<.1)&&(r=x(i.dxydb_rough(t[0],t[1],.1)),n=Math.max(n,a*b(e,r)/2)),(Math.abs(t[1]-u)<.1||Math.abs(t[1]-f)<.1)&&(r=x(i.dxyda_rough(t[0],t[1],.1)),n=Math.max(n,a*b(e,r)/2)),n}var p=y(t,0,1),d=y(t,n.total,n.total-1),g=h(o[0],p),v=n.total-h(o[o.length-1],d);n.min<g&&(n.min=g);n.max>v&&(n.max=v);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*f.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/O),f.LABELMAX),a=0;a<i;a++){var o=u.findBestTextLocation(this,n,e,S,L);if(!o)break;u.addLabelData(o,e,S,T)}})}),E.remove(),u.drawLabels(_,S,r,m,g?T:null)}d&&!p&&v.remove()}(_,z,t,M,L,e,T),o.setClipUrl(_,T._clipPathId)}function G(t){var e=T.ab2xy(t[0],t[1],!0);return[w.c2p(e[0]),k.c2p(e[1])]}})}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../carpet/lookup_carpetid\\\":895,\\\"../carpet/makepath\\\":896,\\\"../carpet/map_1d_array\\\":897,\\\"../contour/close_boundaries\\\":919,\\\"../contour/constants\\\":921,\\\"../contour/convert_to_constraints\\\":925,\\\"../contour/empty_pathinfo\\\":927,\\\"../contour/find_all_paths\\\":929,\\\"../contour/make_crossings\\\":934,\\\"../contour/plot\\\":935,\\\"./join_all_paths\\\":943,\\\"./map_pathinfo\\\":944,d3:148}],946:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../lib/extend\\\").extendFlat;e.exports=o({z:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},x:o({},n.x,{impliedEdits:{xtype:\\\"array\\\"}}),x0:o({},n.x0,{impliedEdits:{xtype:\\\"scaled\\\"}}),dx:o({},n.dx,{impliedEdits:{xtype:\\\"scaled\\\"}}),y:o({},n.y,{impliedEdits:{ytype:\\\"array\\\"}}),y0:o({},n.y0,{impliedEdits:{ytype:\\\"scaled\\\"}}),dy:o({},n.dy,{impliedEdits:{ytype:\\\"scaled\\\"}}),text:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},transpose:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},xtype:{valType:\\\"enumerated\\\",values:[\\\"array\\\",\\\"scaled\\\"],editType:\\\"calc+clearAxisTypes\\\"},ytype:{valType:\\\"enumerated\\\",values:[\\\"array\\\",\\\"scaled\\\"],editType:\\\"calc+clearAxisTypes\\\"},zsmooth:{valType:\\\"enumerated\\\",values:[\\\"fast\\\",\\\"best\\\",!1],dflt:!1,editType:\\\"calc\\\"},connectgaps:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},xgap:{valType:\\\"number\\\",dflt:0,min:0,editType:\\\"plot\\\"},ygap:{valType:\\\"number\\\",dflt:0,min:0,editType:\\\"plot\\\"},zhoverformat:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"none\\\"},transforms:void 0},i(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1}),{colorbar:a})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../scatter/attributes\\\":1044}],947:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../histogram2d/calc\\\"),s=t(\\\"../../components/colorscale/calc\\\"),l=t(\\\"./convert_column_xyz\\\"),c=t(\\\"./max_row_length\\\"),u=t(\\\"./clean_2d_array\\\"),f=t(\\\"./interp2d\\\"),h=t(\\\"./find_empties\\\"),p=t(\\\"./make_bound_array\\\");e.exports=function(t,e){var r,d,g,v,m,y,x,b,_,w=a.getFromId(t,e.xaxis||\\\"x\\\"),k=a.getFromId(t,e.yaxis||\\\"y\\\"),M=n.traceIs(e,\\\"contour\\\"),A=n.traceIs(e,\\\"histogram\\\"),T=n.traceIs(e,\\\"gl2d\\\"),S=M?\\\"best\\\":e.zsmooth;if(w._minDtick=0,k._minDtick=0,A)r=(_=o(t,e)).x,d=_.x0,g=_.dx,v=_.y,m=_.y0,y=_.dy,x=_.z;else{var C=e.z;i.isArray1D(C)?(l(e,w,k,\\\"x\\\",\\\"y\\\",[\\\"z\\\"]),r=e._x,v=e._y,C=e._z):(r=e.x?w.makeCalcdata(e,\\\"x\\\"):[],v=e.y?k.makeCalcdata(e,\\\"y\\\"):[]),d=e.x0||0,g=e.dx||1,m=e.y0||0,y=e.dy||1,x=u(C,e.transpose),(M||e.connectgaps)&&(e._emptypoints=h(x),f(x,e._emptypoints))}function E(t){S=e._input.zsmooth=e.zsmooth=!1,i.warn('cannot use zsmooth: \\\"fast\\\": '+t)}if(\\\"fast\\\"===S)if(\\\"log\\\"===w.type||\\\"log\\\"===k.type)E(\\\"log axis found\\\");else if(!A){if(r.length){var L=(r[r.length-1]-r[0])/(r.length-1),z=Math.abs(L/100);for(b=0;b<r.length-1;b++)if(Math.abs(r[b+1]-r[b]-L)>z){E(\\\"x scale is not linear\\\");break}}if(v.length&&\\\"fast\\\"===S){var O=(v[v.length-1]-v[0])/(v.length-1),I=Math.abs(O/100);for(b=0;b<v.length-1;b++)if(Math.abs(v[b+1]-v[b]-O)>I){E(\\\"y scale is not linear\\\");break}}}var P=c(x),D=\\\"scaled\\\"===e.xtype?\\\"\\\":r,R=p(e,D,d,g,P,w),B=\\\"scaled\\\"===e.ytype?\\\"\\\":v,F=p(e,B,m,y,x.length,k);T||(e._extremes[w._id]=a.findExtremes(w,R),e._extremes[k._id]=a.findExtremes(k,F));var N={x:R,y:F,z:x,text:e._text||e.text};if(D&&D.length===R.length-1&&(N.xCenter=D),B&&B.length===F.length-1&&(N.yCenter=B),A&&(N.xRanges=_.xRanges,N.yRanges=_.yRanges,N.pts=_.pts),M&&\\\"constraint\\\"===e.contours.type||s(e,x,\\\"\\\",\\\"z\\\"),M&&e.contours&&\\\"heatmap\\\"===e.contours.coloring){var j={type:\\\"contour\\\"===e.type?\\\"heatmap\\\":\\\"histogram2d\\\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};N.xfill=p(j,D,d,g,P,w),N.yfill=p(j,B,m,y,x.length,k)}return[N]}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../../registry\\\":828,\\\"../histogram2d/calc\\\":978,\\\"./clean_2d_array\\\":948,\\\"./convert_column_xyz\\\":950,\\\"./find_empties\\\":952,\\\"./interp2d\\\":955,\\\"./make_bound_array\\\":956,\\\"./max_row_length\\\":957}],948:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\");e.exports=function(t,e){var r,i,a,o,s,l;function c(t){if(n(t))return+t}if(e){for(r=0,s=0;s<t.length;s++)r=Math.max(r,t[s].length);if(0===r)return!1;a=function(t){return t.length},o=function(t,e,r){return t[r][e]}}else r=t.length,a=function(t,e){return t[e].length},o=function(t,e,r){return t[e][r]};var u=new Array(r);for(s=0;s<r;s++)for(i=a(t,s),u[s]=new Array(i),l=0;l<i;l++)u[s][l]=c(o(t,s,l));return u}},{\\\"fast-isnumeric\\\":214}],949:[function(t,e,r){\\\"use strict\\\";e.exports={min:\\\"zmin\\\",max:\\\"zmax\\\"}},{}],950:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e,r,a,o,s){var l,c,u,f=t._length,h=t[a].slice(0,f),p=t[o].slice(0,f),d=t.text,g=void 0!==d&&n.isArray1D(d),v=t[a+\\\"calendar\\\"],m=t[o+\\\"calendar\\\"];for(l=0;l<f;l++)h[l]=e.d2c(h[l],0,v),p[l]=r.d2c(p[l],0,m);var y,x,b,_=n.distinctVals(h),w=_.vals,k=n.distinctVals(p),M=k.vals,A=[];for(l=0;l<s.length;l++)A[l]=n.init2dArray(M.length,w.length);for(g&&(b=n.init2dArray(M.length,w.length)),l=0;l<f;l++)if(h[l]!==i&&p[l]!==i){for(y=n.findBin(h[l]+_.minDiff/2,w),x=n.findBin(p[l]+k.minDiff/2,M),c=0;c<s.length;c++)u=t[s[c]],A[c][x][y]=u[l];g&&(b[x][y]=d[l])}for(t[\\\"_\\\"+a]=w,t[\\\"_\\\"+o]=M,c=0;c<s.length;c++)t[\\\"_\\\"+s[c]]=A[c];g&&(t._text=b)}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696}],951:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./xyz_defaults\\\"),a=t(\\\"./style_defaults\\\"),o=t(\\\"../../components/colorscale/defaults\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l)?(c(\\\"text\\\"),a(t,e,c,l),c(\\\"connectgaps\\\",n.isArray1D(e.z)&&!1!==e.zsmooth),o(t,e,l,c,{prefix:\\\"\\\",cLetter:\\\"z\\\"})):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"./attributes\\\":946,\\\"./style_defaults\\\":960,\\\"./xyz_defaults\\\":961}],952:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./max_row_length\\\");e.exports=function(t){var e,r,i,a,o,s,l,c,u=[],f={},h=[],p=t[0],d=[],g=[0,0,0],v=n(t);for(r=0;r<t.length;r++)for(e=d,d=p,p=t[r+1]||[],i=0;i<v;i++)void 0===d[i]&&((s=(void 0!==d[i-1]?1:0)+(void 0!==d[i+1]?1:0)+(void 0!==e[i]?1:0)+(void 0!==p[i]?1:0))?(0===r&&s++,0===i&&s++,r===t.length-1&&s++,i===d.length-1&&s++,s<4&&(f[[r,i]]=[r,i,s]),u.push([r,i,s])):h.push([r,i]));for(;h.length;){for(l={},c=!1,o=h.length-1;o>=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||g)[2]+(f[[r+1,i]]||g)[2]+(f[[r,i-1]]||g)[2]+(f[[r,i+1]]||g)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),c=!0);if(!c)throw\\\"findEmpties iterated with no new neighbors\\\";for(a in l)f[a]=l[a],u.push(l[a])}return u.sort(function(t,e){return e[2]-t[2]})}},{\\\"./max_row_length\\\":957}],953:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\");e.exports=function(t,e,r,o,s,l){var c,u,f,h,p=t.cd[0],d=p.trace,g=t.xa,v=t.ya,m=p.x,y=p.y,x=p.z,b=p.xCenter,_=p.yCenter,w=p.zmask,k=[d.zmin,d.zmax],M=d.zhoverformat,A=m,T=y;if(!1!==t.index){try{f=Math.round(t.index[1]),h=Math.round(t.index[0])}catch(e){return void i.error(\\\"Error hovering on heatmap, pointNumber must be [row,col], found:\\\",t.index)}if(f<0||f>=x[0].length||h<0||h>x.length)return}else{if(n.inbox(e-m[0],e-m[m.length-1],0)>0||n.inbox(r-y[0],r-y[y.length-1],0)>0)return;if(l){var S;for(A=[2*m[0]-m[1]],S=1;S<m.length;S++)A.push((m[S]+m[S-1])/2);for(A.push([2*m[m.length-1]-m[m.length-2]]),T=[2*y[0]-y[1]],S=1;S<y.length;S++)T.push((y[S]+y[S-1])/2);T.push([2*y[y.length-1]-y[y.length-2]])}f=Math.max(0,Math.min(A.length-2,i.findBin(e,A))),h=Math.max(0,Math.min(T.length-2,i.findBin(r,T)))}var C=g.c2p(m[f]),E=g.c2p(m[f+1]),L=v.c2p(y[h]),z=v.c2p(y[h+1]);l?(E=C,c=m[f],z=L,u=y[h]):(c=b?b[f]:(m[f]+m[f+1])/2,u=_?_[h]:(y[h]+y[h+1])/2,d.zsmooth&&(C=E=g.c2p(c),L=z=v.c2p(u)));var O,I,P=x[h][f];w&&!w[h][f]&&(P=void 0),Array.isArray(p.text)&&Array.isArray(p.text[h])&&(O=p.text[h][f]);var D={type:\\\"linear\\\",range:k,hoverformat:M,_separators:g._separators,_numFormat:g._numFormat};return I=a.tickText(D,P,\\\"hover\\\").text,[i.extendFlat(t,{index:[h,f],distance:t.maxHoverDistance,spikeDistance:t.maxSpikeDistance,x0:C,x1:E,y0:L,y1:z,xLabelVal:c,yLabelVal:u,zLabelVal:P,zLabel:I,text:O})]}},{\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],954:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.colorbar=t(\\\"./colorbar\\\"),n.style=t(\\\"./style\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"heatmap\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"2dMap\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":946,\\\"./calc\\\":947,\\\"./colorbar\\\":949,\\\"./defaults\\\":951,\\\"./hover\\\":953,\\\"./plot\\\":958,\\\"./style\\\":959}],955:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=[[-1,0],[1,0],[0,-1],[0,1]];function a(t){return.5-.25*Math.min(1,.5*t)}function o(t,e,r){var n,a,o,s,l,c,u,f,h,p,d,g,v,m=0;for(s=0;s<e.length;s++){for(a=(n=e[s])[0],o=n[1],d=t[a][o],p=0,h=0,l=0;l<4;l++)(u=t[a+(c=i[l])[0]])&&void 0!==(f=u[o+c[1]])&&(0===p?g=v=f:(g=Math.min(g,f),v=Math.max(v,f)),h++,p+=f);if(0===h)throw\\\"iterateInterp2d order is wrong: no defined neighbors\\\";t[a][o]=p/h,void 0===d?h<4&&(m=1):(t[a][o]=(1+r)*t[a][o]-r*d,v>g&&(m=Math.max(m,Math.abs(t[a][o]-d)/(v-g))))}return m}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r<e.length&&!(e[r][2]<4);r++);for(e=e.slice(r),r=0;r<100&&i>.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\\\"interp2d didn't converge quickly\\\",i),t}},{\\\"../../lib\\\":696}],956:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r,a,o,s){var l,c,u,f=[],h=n.traceIs(t,\\\"contour\\\"),p=n.traceIs(t,\\\"histogram\\\"),d=n.traceIs(t,\\\"gl2d\\\");if(i(e)&&e.length>1&&!p&&\\\"category\\\"!==s.type){var g=e.length;if(!(g<=o))return h?e.slice(0,o):e.slice(0,o+1);if(h||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],u=1;u<g;u++)f.push(.5*(e[u-1]+e[u]));f.push(1.5*e[g-1]-.5*e[g-2])}if(g<o){var v=f[f.length-1],m=v-f[f.length-2];for(u=g;u<o;u++)v+=m,f.push(v)}}else{c=a||1;var y=t[s._id.charAt(0)+\\\"calendar\\\"];for(l=p||\\\"category\\\"===s.type?s.r2c(r,0,y)||0:i(e)&&1===e.length?e[0]:void 0===r?0:s.d2c(r,0,y),u=h||d?0:-.5;u<o;u++)f.push(l+c*u)}return f}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828}],957:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=0,r=0;r<t.length;r++)e=Math.max(e,t[r].length);return e}},{}],958:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"tinycolor2\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../components/colorscale\\\"),l=t(\\\"../../constants/xmlns_namespaces\\\"),c=t(\\\"./max_row_length\\\");function u(t,e){var r=e.length-2,n=o.constrain(o.findBin(t,e),0,r),i=e[n],a=e[n+1],s=o.constrain(n+(t-i)/(a-i)-.5,0,r),l=Math.round(s),c=Math.abs(s-l);return s&&s!==r&&c?{bin0:l,frac:c,bin1:Math.round(l+c/(s-l))}:{bin0:l,bin1:l,frac:0}}function f(t,e){var r=e.length-1,n=o.constrain(o.findBin(t,e),0,r),i=e[n],a=(t-i)/(e[n+1]-i)||0;return a<=0?{bin0:n,bin1:n,frac:0}:a<.5?{bin0:n,bin1:n+1,frac:a}:{bin0:n+1,bin1:n,frac:1-a}}function h(t,e,r){t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=Math.round(255*r[3])}e.exports=function(t,e,r,p){var d=e.xaxis,g=e.yaxis;o.makeTraceGroups(p,r,\\\"hm\\\").each(function(e){var r,p,v,m,y,x,b=n.select(this),_=e[0],w=_.trace,k=_.z,M=_.x,A=_.y,T=_.xCenter,S=_.yCenter,C=a.traceIs(w,\\\"contour\\\"),E=C?\\\"best\\\":w.zsmooth,L=k.length,z=c(k),O=!1,I=!1;for(x=0;void 0===r&&x<M.length-1;)r=d.c2p(M[x]),x++;for(x=M.length-1;void 0===p&&x>0;)p=d.c2p(M[x]),x--;for(p<r&&(v=p,p=r,r=v,O=!0),x=0;void 0===m&&x<A.length-1;)m=g.c2p(A[x]),x++;for(x=A.length-1;void 0===y&&x>0;)y=g.c2p(A[x]),x--;if(y<m&&(v=m,m=y,y=v,I=!0),C&&(T=M,S=A,M=_.xfill,A=_.yfill),\\\"fast\\\"!==E){var P=\\\"best\\\"===E?0:.5;r=Math.max(-P*d._length,r),p=Math.min((1+P)*d._length,p),m=Math.max(-P*g._length,m),y=Math.min((1+P)*g._length,y)}var D=Math.round(p-r),R=Math.round(y-m);if(D<=0||R<=0){b.selectAll(\\\"image\\\").data([]).exit().remove()}else{var B,F;\\\"fast\\\"===E?(B=z,F=L):(B=D,F=R);var N=document.createElement(\\\"canvas\\\");N.width=B,N.height=F;var j,V,U=N.getContext(\\\"2d\\\"),q=s.makeColorScaleFunc(s.extractScale(w.colorscale,w.zmin,w.zmax),{noNumericCheck:!0,returnArray:!0});\\\"fast\\\"===E?(j=O?function(t){return z-1-t}:o.identity,V=I?function(t){return L-1-t}:o.identity):(j=function(t){return o.constrain(Math.round(d.c2p(M[t])-r),0,D)},V=function(t){return o.constrain(Math.round(g.c2p(A[t])-m),0,R)});var H,G,W,Y,X,Z=V(0),$=[Z,Z],J=O?0:1,K=I?0:1,Q=0,tt=0,et=0,rt=0;if(E){var nt,it=0;try{nt=new Uint8Array(D*R*4)}catch(t){nt=new Array(D*R*4)}if(\\\"best\\\"===E){var at,ot,st,lt=T||M,ct=S||A,ut=new Array(lt.length),ft=new Array(ct.length),ht=new Array(D),pt=T?f:u,dt=S?f:u;for(x=0;x<lt.length;x++)ut[x]=Math.round(d.c2p(lt[x])-r);for(x=0;x<ct.length;x++)ft[x]=Math.round(g.c2p(ct[x])-m);for(x=0;x<D;x++)ht[x]=pt(x,ut);for(G=0;G<R;G++)for(ot=k[(at=dt(G,ft)).bin0],st=k[at.bin1],x=0;x<D;x++,it+=4)h(nt,it,X=At(ot,st,ht[x],at))}else for(G=0;G<L;G++)for(Y=k[G],$=V(G),x=0;x<D;x++)X=Mt(Y[x],1),h(nt,it=4*($*D+j(x)),X);var gt=U.createImageData(D,R);try{gt.data.set(nt)}catch(t){var vt=gt.data,mt=vt.length;for(G=0;G<mt;G++)vt[G]=nt[G]}U.putImageData(gt,0,0)}else{var yt=w.xgap,xt=w.ygap,bt=Math.floor(yt/2),_t=Math.floor(xt/2);for(G=0;G<L;G++)if(Y=k[G],$.reverse(),$[K]=V(G+1),$[0]!==$[1]&&void 0!==$[0]&&void 0!==$[1])for(H=[W=j(0),W],x=0;x<z;x++)H.reverse(),H[J]=j(x+1),H[0]!==H[1]&&void 0!==H[0]&&void 0!==H[1]&&(X=Mt(Y[x],(H[1]-H[0])*($[1]-$[0])),U.fillStyle=\\\"rgba(\\\"+X.join(\\\",\\\")+\\\")\\\",U.fillRect(H[0]+bt,$[0]+_t,H[1]-H[0]-yt,$[1]-$[0]-xt))}tt=Math.round(tt/Q),et=Math.round(et/Q),rt=Math.round(rt/Q);var wt=i(\\\"rgb(\\\"+tt+\\\",\\\"+et+\\\",\\\"+rt+\\\")\\\");t._hmpixcount=(t._hmpixcount||0)+Q,t._hmlumcount=(t._hmlumcount||0)+Q*wt.getLuminance();var kt=b.selectAll(\\\"image\\\").data(e);kt.enter().append(\\\"svg:image\\\").attr({xmlns:l.svg,preserveAspectRatio:\\\"none\\\"}),kt.attr({height:R,width:D,x:r,y:m,\\\"xlink:href\\\":N.toDataURL(\\\"image/png\\\")})}function Mt(t,e){if(void 0!==t){var r=q(t);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),Q+=e,tt+=r[0]*e,et+=r[1]*e,rt+=r[2]*e,r}return[0,0,0,0]}function At(t,e,r,n){var i=t[r.bin0];if(void 0===i)return Mt(void 0,1);var a,o=t[r.bin1],s=e[r.bin0],l=e[r.bin1],c=o-i||0,u=s-i||0;return a=void 0===o?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-o-s)/3:void 0===s?2*(2*l-o-i)/3:l+i-o-s,Mt(i+r.frac*c+n.frac*(u+r.frac*a))}})}},{\\\"../../components/colorscale\\\":585,\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./max_row_length\\\":957,d3:148,tinycolor2:514}],959:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\");e.exports=function(t){n.select(t).selectAll(\\\".hm image\\\").style(\\\"opacity\\\",function(t){return t.trace.opacity})}},{d3:148}],960:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){!1===r(\\\"zsmooth\\\")&&(r(\\\"xgap\\\"),r(\\\"ygap\\\")),r(\\\"zhoverformat\\\")}},{}],961:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../registry\\\");function o(t,e){var r=e(t);return\\\"scaled\\\"===(r?e(t+\\\"type\\\",\\\"array\\\"):\\\"scaled\\\")&&(e(t+\\\"0\\\"),e(\\\"d\\\"+t)),r}e.exports=function(t,e,r,s,l,c){var u,f,h=r(\\\"z\\\");if(l=l||\\\"x\\\",c=c||\\\"y\\\",void 0===h||!h.length)return 0;if(i.isArray1D(t.z)){if(u=r(l),f=r(c),!(u&&u.length&&f&&f.length))return 0;e._length=Math.min(u.length,f.length,h.length)}else{if(u=o(l,r),f=o(c,r),!function(t){for(var e,r=!0,a=!1,o=!1,s=0;s<t.length;s++){if(e=t[s],!i.isArrayOrTypedArray(e)){r=!1;break}e.length>0&&(a=!0);for(var l=0;l<e.length;l++)if(n(e[l])){o=!0;break}}return r&&a&&o}(h))return 0;r(\\\"transpose\\\"),e._length=null}return a.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[l,c],s),!0}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"fast-isnumeric\\\":214}],962:[function(t,e,r){\\\"use strict\\\";for(var n=t(\\\"../heatmap/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../lib/extend\\\").extendFlat,s=t(\\\"../../plot_api/edit_types\\\").overrideAll,l=[\\\"z\\\",\\\"x\\\",\\\"x0\\\",\\\"dx\\\",\\\"y\\\",\\\"y0\\\",\\\"dy\\\",\\\"text\\\",\\\"transpose\\\",\\\"xtype\\\",\\\"ytype\\\"],c={},u=0;u<l.length;u++){var f=l[u];c[f]=n[f]}o(c,i(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1}),{colorbar:a}),e.exports=s(c,\\\"calc\\\",\\\"nested\\\")},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../heatmap/attributes\\\":946}],963:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-heatmap2d\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../lib/str2rgbarray\\\");function o(t,e){this.scene=t,this.uid=e,this.type=\\\"heatmapgl\\\",this.name=\\\"\\\",this.hoverinfo=\\\"all\\\",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=n(t.glplot,this.options),this.heatmap._trace=this}var s=o.prototype;s.handlePick=function(t){var e=this.options,r=e.shape,n=t.pointId,i=n%r[0],a=Math.floor(n/r[0]),o=n;return{trace:this,dataCoord:t.dataCoord,traceCoord:[e.x[i],e.y[a],e.z[o]],textLabel:this.textLabels[n],name:this.name,pointIndex:[a,i],hoverinfo:this.hoverinfo}},s.update=function(t,e){var r=e[0];this.index=t.index,this.name=t.name,this.hoverinfo=t.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var o=n[0].length,s=n.length;this.options.shape=[o,s],this.options.x=r.x,this.options.y=r.y;var l=function(t){for(var e=t.colorscale,r=t.zmin,n=t.zmax,i=e.length,o=new Array(i),s=new Array(4*i),l=0;l<i;l++){var c=e[l],u=a(c[1]);o[l]=r+c[0]*(n-r);for(var f=0;f<4;f++)s[4*l+f]=u[f]}return{colorLevels:o,colorValues:s}}(t);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],t.text),this.heatmap.update(this.options);var c=this.scene.xaxis,u=this.scene.yaxis;t._extremes[c._id]=i.findExtremes(c,r.x),t._extremes[u._id]=i.findExtremes(u,r.y)},s.dispose=function(){this.heatmap.dispose()},e.exports=function(t,e,r){var n=new o(t,e.uid);return n.update(e,r),n}},{\\\"../../lib/str2rgbarray\\\":720,\\\"../../plots/cartesian/axes\\\":745,\\\"gl-heatmap2d\\\":241}],964:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"../heatmap/defaults\\\"),n.colorbar=t(\\\"../heatmap/colorbar\\\"),n.calc=t(\\\"../heatmap/calc\\\"),n.plot=t(\\\"./convert\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"heatmapgl\\\",n.basePlotModule=t(\\\"../../plots/gl2d\\\"),n.categories=[\\\"gl\\\",\\\"gl2d\\\",\\\"2dMap\\\"],n.meta={},e.exports=n},{\\\"../../plots/gl2d\\\":785,\\\"../heatmap/calc\\\":947,\\\"../heatmap/colorbar\\\":949,\\\"../heatmap/defaults\\\":951,\\\"./attributes\\\":962,\\\"./convert\\\":963}],965:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../bar/attributes\\\"),i=t(\\\"./bin_attributes\\\");e.exports={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},text:n.text,orientation:n.orientation,histfunc:{valType:\\\"enumerated\\\",values:[\\\"count\\\",\\\"sum\\\",\\\"avg\\\",\\\"min\\\",\\\"max\\\"],dflt:\\\"count\\\",editType:\\\"calc\\\"},histnorm:{valType:\\\"enumerated\\\",values:[\\\"\\\",\\\"percent\\\",\\\"probability\\\",\\\"density\\\",\\\"probability density\\\"],dflt:\\\"\\\",editType:\\\"calc\\\"},cumulative:{enabled:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},direction:{valType:\\\"enumerated\\\",values:[\\\"increasing\\\",\\\"decreasing\\\"],dflt:\\\"increasing\\\",editType:\\\"calc\\\"},currentbin:{valType:\\\"enumerated\\\",values:[\\\"include\\\",\\\"exclude\\\",\\\"half\\\"],dflt:\\\"include\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"},nbinsx:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},xbins:i(\\\"x\\\",!0),nbinsy:{valType:\\\"integer\\\",min:0,dflt:0,editType:\\\"calc\\\"},ybins:i(\\\"y\\\",!0),autobinx:{valType:\\\"boolean\\\",dflt:null,editType:\\\"calc\\\"},autobiny:{valType:\\\"boolean\\\",dflt:null,editType:\\\"calc\\\",impliedEdits:{\\\"ybins.start\\\":void 0,\\\"ybins.end\\\":void 0,\\\"ybins.size\\\":void 0}},marker:n.marker,selected:n.selected,unselected:n.unselected,_deprecated:{bardir:n._deprecated.bardir}}},{\\\"../bar/attributes\\\":838,\\\"./bin_attributes\\\":967}],966:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){for(var r=t.length,n=0,i=0;i<r;i++)e[i]?(t[i]/=e[i],n+=t[i]):t[i]=null;return n}},{}],967:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return{start:{valType:\\\"any\\\",editType:\\\"calc\\\"},end:{valType:\\\"any\\\",editType:\\\"calc\\\"},size:{valType:\\\"any\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"}}},{}],968:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\");e.exports={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,i){var a=i[e];return n(a)?(a=Number(a),r[t]+=a,a):0},avg:function(t,e,r,i,a){var o=i[e];return n(o)&&(o=Number(o),r[t]+=o,a[t]++),0},min:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]>a){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]<a){var o=a-r[t];return r[t]=a,o}}return 0}}},{\\\"fast-isnumeric\\\":214}],969:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../constants/numerical\\\"),i=n.ONEAVGYEAR,a=n.ONEAVGMONTH,o=n.ONEDAY,s=n.ONEHOUR,l=n.ONEMIN,c=n.ONESEC,u=t(\\\"../../plots/cartesian/axes\\\").tickIncrement;function f(t,e,r,n){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),a=\\\"date\\\"===r.type,o=h(i,a),s=0;s<10;s++){var l=h(80*o,a);if(o===l)break;if(!p(l,t,e,a,r,n))break;o=l}return o}function h(t,e){return e&&t>c?t>o?t>1.1*i?i:t>1.1*a?a:o:t>s?s:t>l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,a,s){if(n&&t>o){var l=d(e,a,s),c=d(r,a,s),u=t===i?0:1;return l[u]!==c[u]}return Math.floor(r/t)-Math.floor(e/t)>.1}function d(t,e,r){var n=e.c2d(t,i,r).split(\\\"-\\\");return\\\"\\\"===n[0]&&(n.unshift(),n[0]=\\\"-\\\"+n[0]),n}e.exports=function(t,e,r,n,a){var s,l,c=-1.1*e,h=-.1*e,p=t-h,d=r[0],g=r[1],v=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),m=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(v>m&&m<Math.abs(g-d)/4e3?(s=v,l=!1):(s=Math.min(v,m),l=!0),\\\"date\\\"===n.type&&s>o){var y=s===i?1:6,x=s===i?\\\"M12\\\":\\\"M1\\\";return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf(\\\"-\\\",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,a);if(c<e){var f=u(c,x,!1,a);(c+f)/2<e+t&&(c=f)}return r&&l?u(c,x,!0,a):c}}return function(e,r){var n=s*Math.round(e/s);return n+s/10<e&&n+.9*s<e+t&&(n+=s),r&&l&&(n-=s),n}}},{\\\"../../constants/numerical\\\":673,\\\"../../plots/cartesian/axes\\\":745}],970:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../bar/arrays_to_calcdata\\\"),s=t(\\\"./bin_functions\\\"),l=t(\\\"./norm_functions\\\"),c=t(\\\"./average\\\"),u=t(\\\"./bin_label_vals\\\");function f(t,e,r,o,s){var l,c,u,h,p,d,g,v=o+\\\"bins\\\",m=t._fullLayout,y=\\\"overlay\\\"===m.barmode,x=\\\"date\\\"===r.type?function(t){return t||0===t?i.cleanDate(t,null,r.calendar):null}:function(t){return n(t)?Number(t):null};function b(t,e,r){e[t+\\\"Found\\\"]?(e[t]=x(e[t]),null===e[t]&&(e[t]=r[t])):(d[t]=e[t]=r[t],i.nestedProperty(c[0],v+\\\".\\\"+t).set(r[t]))}var _=m._histogramBinOpts[e._groupName];if(e._autoBinFinished)delete e._autoBinFinished;else{c=_.traces;var w=_.sizeFound,k=[];d=c[0]._autoBin={};var M=!0;for(l=0;l<c.length;l++)p=(u=c[l])._pos0=r.makeCalcdata(u,o),k=k.concat(p),delete u._autoBinFinished,!0===e.visible&&(M?M=!1:(delete u._autoBin,u._autoBinFinished=1));h=c[0][o+\\\"calendar\\\"];var A=a.autoBin(k,r,_.nbins,!1,h,w&&_.size);if(y&&0===A._dataSpan&&\\\"category\\\"!==r.type){if(s)return[A,p,!0];A=function(t,e,r,n,a){var o,s,l=function(t,e){for(var r=e.xaxis,n=e.yaxis,i=e.orientation,a=[],o=t._fullData,s=0;s<o.length;s++){var l=o[s];\\\"histogram\\\"===l.type&&!0===l.visible&&l.orientation===i&&l.xaxis===r&&l.yaxis===n&&a.push(l)}return a}(t,e),c=!1,u=1/0,h=[e];for(o=0;o<l.length;o++)if((s=l[o])===e)c=!0;else if(c){var p=f(t,s,r,n,!0),d=p[0],g=p[2];s._autoBinFinished=1,s._pos0=p[1],g?h.push(s):u=Math.min(u,d.size)}else u=Math.min(u,s[a].size);var v=new Array(h.length);for(o=0;o<h.length;o++)for(var m=h[o]._pos0,y=0;y<m.length;y++)if(void 0!==m[y]){v[o]=m[y];break}isFinite(u)||(u=i.distinctVals(v).minDiff);for(o=0;o<h.length;o++){var x=(s=h[o])[n+\\\"calendar\\\"];s._input[a]=s[a]={start:r.c2r(v[o]-u/2,0,x),end:r.c2r(v[o]+u/2,0,x),size:u}}return e[a]}(t,e,r,o,v)}(g=u.cumulative).enabled&&\\\"include\\\"!==g.currentbin&&(\\\"decreasing\\\"===g.direction?A.start=r.c2r(a.tickIncrement(r.r2c(A.start,0,h),A.size,!0,h)):A.end=r.c2r(a.tickIncrement(r.r2c(A.end,0,h),A.size,!1,h))),_.size=A.size,w||(d.size=A.size,i.nestedProperty(c[0],v+\\\".size\\\").set(A.size)),b(\\\"start\\\",_,A),b(\\\"end\\\",_,A)}p=e._pos0,delete e._pos0;var T=e._input[v]||{},S=i.extendFlat({},_),C=_.start,E=r.r2l(T.start),L=void 0!==E;if((_.startFound||L)&&E!==r.r2l(C)){var z=L?E:i.aggNums(Math.min,null,p),O={type:\\\"category\\\"===r.type?\\\"linear\\\":r.type,r2l:r.r2l,dtick:_.size,tick0:C,calendar:h,range:[z,a.tickIncrement(z,_.size,!1,h)].map(r.l2r)},I=a.tickFirst(O);I>r.r2l(z)&&(I=a.tickIncrement(I,_.size,!0,h)),S.start=r.l2r(I),L||i.nestedProperty(e,v+\\\".start\\\").set(S.start)}var P=_.end,D=r.r2l(T.end),R=void 0!==D;if((_.endFound||R)&&D!==r.r2l(P)){var B=R?D:i.aggNums(Math.max,null,p);S.end=r.l2r(B),R||i.nestedProperty(e,v+\\\".start\\\").set(S.end)}var F=\\\"autobin\\\"+o;return!1===e._input[F]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[F],delete e[F]),[S,p]}e.exports=function(t,e){if(!0===e.visible){var r,h,p,d,g=[],v=[],m=a.getFromId(t,\\\"h\\\"===e.orientation?e.yaxis||\\\"y\\\":e.xaxis||\\\"x\\\"),y=\\\"h\\\"===e.orientation?\\\"y\\\":\\\"x\\\",x={x:\\\"y\\\",y:\\\"x\\\"}[y],b=e[y+\\\"calendar\\\"],_=e.cumulative,w=f(t,e,m,y),k=w[0],M=w[1],A=\\\"string\\\"==typeof k.size,T=[],S=A?T:k,C=[],E=[],L=[],z=0,O=e.histnorm,I=e.histfunc,P=-1!==O.indexOf(\\\"density\\\");_.enabled&&P&&(O=O.replace(/ ?density$/,\\\"\\\"),P=!1);var D,R=\\\"max\\\"===I||\\\"min\\\"===I?null:0,B=s.count,F=l[O],N=!1,j=function(t){return m.r2c(t,0,b)};for(i.isArrayOrTypedArray(e[x])&&\\\"count\\\"!==I&&(D=e[x],N=\\\"avg\\\"===I,B=s[I]),r=j(k.start),p=j(k.end)+(r-a.tickIncrement(r,k.size,!1,b))/1e6;r<p&&g.length<1e6&&(h=a.tickIncrement(r,k.size,!1,b),g.push((r+h)/2),v.push(R),L.push([]),T.push(r),P&&C.push(1/(h-r)),N&&E.push(0),!(h<=r));)r=h;T.push(r),A||\\\"date\\\"!==m.type||(S={start:j(S.start),end:j(S.end),size:S.size});var V,U=v.length,q=!0,H=1/0,G=1/0,W={};for(r=0;r<M.length;r++){var Y=M[r];(d=i.findBin(Y,S))>=0&&d<U&&(z+=B(d,r,v,D,E),q&&L[d].length&&Y!==M[L[d][0]]&&(q=!1),L[d].push(r),W[r]=d,H=Math.min(H,Y-T[d]),G=Math.min(G,T[d+1]-Y))}q||(V=u(H,G,T,m,b)),N&&(z=c(v,E)),F&&F(v,z,C),_.enabled&&function(t,e,r){var n,i,a;function o(e){a=t[e],t[e]/=2}function s(e){i=t[e],t[e]=a+i/2,a+=i}if(\\\"half\\\"===r)if(\\\"increasing\\\"===e)for(o(0),n=1;n<t.length;n++)s(n);else for(o(t.length-1),n=t.length-2;n>=0;n--)s(n);else if(\\\"increasing\\\"===e){for(n=1;n<t.length;n++)t[n]+=t[n-1];\\\"exclude\\\"===r&&(t.unshift(0),t.pop())}else{for(n=t.length-2;n>=0;n--)t[n]+=t[n+1];\\\"exclude\\\"===r&&(t.push(0),t.shift())}}(v,_.direction,_.currentbin);var X=Math.min(g.length,v.length),Z=[],$=0,J=X-1;for(r=0;r<X;r++)if(v[r]){$=r;break}for(r=X-1;r>=$;r--)if(v[r]){J=r;break}for(r=$;r<=J;r++)if(n(g[r])&&n(v[r])){var K={p:g[r],s:v[r],b:0};_.enabled||(K.pts=L[r],q?K.ph0=K.ph1=L[r].length?M[L[r][0]]:g[r]:(K.ph0=V(T[r]),K.ph1=V(T[r+1],!0))),Z.push(K)}return 1===Z.length&&(Z[0].width1=a.tickIncrement(Z[0].p,k.size,!1,b)-Z[0].p),o(Z,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Z,e,W),Z}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../bar/arrays_to_calcdata\\\":837,\\\"./average\\\":966,\\\"./bin_functions\\\":968,\\\"./bin_label_vals\\\":969,\\\"./norm_functions\\\":976,\\\"fast-isnumeric\\\":214}],971:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=n.nestedProperty,a=t(\\\"./attributes\\\"),o={x:[{aStr:\\\"xbins.start\\\",name:\\\"start\\\"},{aStr:\\\"xbins.end\\\",name:\\\"end\\\"},{aStr:\\\"xbins.size\\\",name:\\\"size\\\"},{aStr:\\\"nbinsx\\\",name:\\\"nbins\\\"}],y:[{aStr:\\\"ybins.start\\\",name:\\\"start\\\"},{aStr:\\\"ybins.end\\\",name:\\\"end\\\"},{aStr:\\\"ybins.size\\\",name:\\\"size\\\"},{aStr:\\\"nbinsy\\\",name:\\\"nbins\\\"}]};e.exports=function(t,e){var r,s,l,c,u,f,h,p=e._histogramBinOpts={},d=\\\"overlay\\\"===e.barmode;function g(t){return n.coerce(l._input,l,a,t)}for(r=0;r<t.length;r++)\\\"histogram\\\"===(l=t[r]).type&&(delete l._autoBinFinished,u=\\\"v\\\"===l.orientation?\\\"x\\\":\\\"y\\\",f=d?l.uid:l.xaxis+l.yaxis+u,l._groupName=f,(h=p[f])?h.traces.push(l):h=p[f]={traces:[l],direction:u});for(f in p){u=(h=p[f]).direction;var v=o[u];for(s=0;s<v.length;s++){var m=v[s],y=m.name;if(\\\"nbins\\\"!==y||!h.sizeFound){var x=m.aStr;for(r=0;r<h.traces.length;r++){if(c=(l=h.traces[r])._input,void 0!==i(c,x).get()){h[y]=g(x),h[y+\\\"Found\\\"]=!0;break}var b=l._autoBin;b&&b[y]&&i(l,x).set(b[y])}if(\\\"start\\\"===y||\\\"end\\\"===y)for(;r<h.traces.length;r++)g(x,((l=h.traces[r])._autoBin||{})[y]);\\\"nbins\\\"!==y||h.sizeFound||h.nbinsFound||(l=h.traces[0],h[y]=g(x))}}}}},{\\\"../../lib\\\":696,\\\"./attributes\\\":965}],972:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../bar/style_defaults\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){function c(r,n){return i.coerce(t,e,s,r,n)}var u=c(\\\"x\\\"),f=c(\\\"y\\\");c(\\\"cumulative.enabled\\\")&&(c(\\\"cumulative.direction\\\"),c(\\\"cumulative.currentbin\\\")),c(\\\"text\\\");var h=c(\\\"orientation\\\",f&&!u?\\\"h\\\":\\\"v\\\"),p=\\\"v\\\"===h?\\\"x\\\":\\\"y\\\",d=\\\"v\\\"===h?\\\"y\\\":\\\"x\\\",g=u&&f?Math.min(u.length&&f.length):(e[p]||[]).length;if(g){e._length=g,n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\"],l),e[d]&&c(\\\"histfunc\\\"),c(\\\"histnorm\\\"),c(\\\"autobin\\\"+p),o(t,e,c,r,l);var v=n.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");v(t,e,a.defaultLine,{axis:\\\"y\\\"}),v(t,e,a.defaultLine,{axis:\\\"x\\\",inherit:\\\"y\\\"}),i.coerceSelectionMarkerOpacity(e,c)}else e.visible=!1}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../bar/style_defaults\\\":851,\\\"./attributes\\\":965}],973:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){if(t.x=\\\"xVal\\\"in e?e.xVal:e.x,t.y=\\\"yVal\\\"in e?e.yVal:e.y,e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),!(r.cumulative||{}).enabled){var a,o=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;if(t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,r._indexToPoints){a=[];for(var s=0;s<o.length;s++)a=a.concat(r._indexToPoints[o[s]])}else a=o;t.pointIndices=a}return t}},{}],974:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../bar/hover\\\").hoverPoints,i=t(\\\"../../plots/cartesian/axes\\\").hoverLabelText;e.exports=function(t,e,r,a){var o=n(t,e,r,a);if(o){var s=(t=o[0]).cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var c=\\\"h\\\"===l.orientation?\\\"y\\\":\\\"x\\\";t[c+\\\"Label\\\"]=i(t[c+\\\"a\\\"],s.ph0,s.ph1)}return o}}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../bar/hover\\\":843}],975:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.layoutAttributes=t(\\\"../bar/layout_attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.crossTraceDefaults=t(\\\"./cross_trace_defaults\\\"),n.supplyLayoutDefaults=t(\\\"../bar/layout_defaults\\\"),n.calc=t(\\\"./calc\\\"),n.crossTraceCalc=t(\\\"../bar/cross_trace_calc\\\").crossTraceCalc,n.plot=t(\\\"../bar/plot\\\"),n.layerName=\\\"barlayer\\\",n.style=t(\\\"../bar/style\\\").style,n.styleOnSelect=t(\\\"../bar/style\\\").styleOnSelect,n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.selectPoints=t(\\\"../bar/select\\\"),n.eventData=t(\\\"./event_data\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"histogram\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"bar\\\",\\\"histogram\\\",\\\"oriented\\\",\\\"errorBarsOK\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../bar/cross_trace_calc\\\":840,\\\"../bar/layout_attributes\\\":845,\\\"../bar/layout_defaults\\\":846,\\\"../bar/plot\\\":847,\\\"../bar/select\\\":848,\\\"../bar/style\\\":850,\\\"../scatter/marker_colorbar\\\":1062,\\\"./attributes\\\":965,\\\"./calc\\\":970,\\\"./cross_trace_defaults\\\":971,\\\"./defaults\\\":972,\\\"./event_data\\\":973,\\\"./hover\\\":974}],976:[function(t,e,r){\\\"use strict\\\";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;i<r;i++)t[i]*=n},probability:function(t,e){for(var r=t.length,n=0;n<r;n++)t[n]/=e},density:function(t,e,r,n){var i=t.length;n=n||1;for(var a=0;a<i;a++)t[a]*=r[a]*n},\\\"probability density\\\":function(t,e,r,n){var i=t.length;n&&(e/=n);for(var a=0;a<i;a++)t[a]*=r[a]/e}}},{}],977:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../histogram/attributes\\\"),i=t(\\\"../histogram/bin_attributes\\\"),a=t(\\\"../heatmap/attributes\\\"),o=t(\\\"../../components/colorscale/attributes\\\"),s=t(\\\"../../components/colorbar/attributes\\\"),l=t(\\\"../../lib/extend\\\").extendFlat;e.exports=l({x:n.x,y:n.y,z:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},marker:{color:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"},histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:i(\\\"x\\\"),nbinsy:n.nbinsy,ybins:i(\\\"y\\\"),autobinx:n.autobinx,autobiny:n.autobiny,xgap:a.xgap,ygap:a.ygap,zsmooth:a.zsmooth,zhoverformat:a.zhoverformat},o(\\\"\\\",{cLetter:\\\"z\\\",autoColorDflt:!1}),{colorbar:s})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../heatmap/attributes\\\":946,\\\"../histogram/attributes\\\":965,\\\"../histogram/bin_attributes\\\":967}],978:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../histogram/bin_functions\\\"),o=t(\\\"../histogram/norm_functions\\\"),s=t(\\\"../histogram/average\\\"),l=t(\\\"../histogram/bin_label_vals\\\");function c(t,e,r,a,o,s,l){var c=e+\\\"bins\\\",u=t[c];u||(u=t[c]={});var f=t._input[c]||{},h=t._autoBin={};f.size||delete u.size,void 0===f.start&&delete u.start,void 0===f.end&&delete u.end;var p=!u.size,d=void 0===u.start,g=void 0===u.end;if(p||d||g){var v=i.autoBin(r,a,t[\\\"nbins\\\"+e],\\\"2d\\\",l,u.size);\\\"histogram2dcontour\\\"===t.type&&(d&&(v.start=s(i.tickIncrement(o(v.start),v.size,!0,l))),g&&(v.end=s(i.tickIncrement(o(v.end),v.size,!1,l)))),p&&(u.size=h.size=v.size),d&&(u.start=h.start=v.start),g&&(u.end=h.end=v.end)}var m=\\\"autobin\\\"+e;!1===t._input[m]&&(t._input[c]=n.extendFlat({},u),delete t._input[m],delete t[m])}function u(t,e,r,n){var i,a=new Array(t);if(n)for(i=0;i<t;i++)a[i]=1/(e[i+1]-e[i]);else{var o=1/r;for(i=0;i<t;i++)a[i]=o}return a}function f(t,e){return{start:t(e.start),end:t(e.end),size:e.size}}function h(t,e,r,n,i,a){var o,s=t.length-1,c=new Array(s);if(e)for(o=0;o<s;o++)c[o]=[e[o],e[o]];else{var u=l(r,n,t,i,a);for(o=0;o<s;o++)c[o]=[u(t[o]),u(t[o+1],!0)]}return c}e.exports=function(t,e){var r,l,p,d,g=i.getFromId(t,e.xaxis||\\\"x\\\"),v=e.x?g.makeCalcdata(e,\\\"x\\\"):[],m=i.getFromId(t,e.yaxis||\\\"y\\\"),y=e.y?m.makeCalcdata(e,\\\"y\\\"):[],x=e.xcalendar,b=e.ycalendar,_=function(t){return g.r2c(t,0,x)},w=function(t){return m.r2c(t,0,b)},k=function(t){return g.c2r(t,0,x)},M=function(t){return m.c2r(t,0,b)},A=e._length;v.length>A&&v.splice(A,v.length-A),y.length>A&&y.splice(A,y.length-A),c(e,\\\"x\\\",v,g,_,k,x),c(e,\\\"y\\\",y,m,w,M,b);var T=[],S=[],C=[],E=\\\"string\\\"==typeof e.xbins.size,L=\\\"string\\\"==typeof e.ybins.size,z=[],O=[],I=E?z:e.xbins,P=L?O:e.ybins,D=0,R=[],B=[],F=e.histnorm,N=e.histfunc,j=-1!==F.indexOf(\\\"density\\\"),V=\\\"max\\\"===N||\\\"min\\\"===N?null:0,U=a.count,q=o[F],H=!1,G=[],W=[],Y=\\\"z\\\"in e?e.z:\\\"marker\\\"in e&&Array.isArray(e.marker.color)?e.marker.color:\\\"\\\";Y&&\\\"count\\\"!==N&&(H=\\\"avg\\\"===N,U=a[N]);var X=e.xbins,Z=_(X.start),$=_(X.end)+(Z-i.tickIncrement(Z,X.size,!1,x))/1e6;for(r=Z;r<$;r=i.tickIncrement(r,X.size,!1,x))S.push(V),z.push(r),H&&C.push(0);z.push(r);var J=S.length,K=_(e.xbins.start),Q=(r-K)/J,tt=k(K+Q/2);for(Z=w((X=e.ybins).start),$=w(X.end)+(Z-i.tickIncrement(Z,X.size,!1,b))/1e6,r=Z;r<$;r=i.tickIncrement(r,X.size,!1,b)){T.push(S.slice()),O.push(r);var et=new Array(J);for(l=0;l<J;l++)et[l]=[];B.push(et),H&&R.push(C.slice())}O.push(r);var rt=T.length,nt=w(e.ybins.start),it=(r-nt)/rt,at=M(nt+it/2);j&&(G=u(S.length,I,Q,E),W=u(T.length,P,it,L)),E||\\\"date\\\"!==g.type||(I=f(_,I)),L||\\\"date\\\"!==m.type||(P=f(w,P));var ot=!0,st=!0,lt=new Array(J),ct=new Array(rt),ut=1/0,ft=1/0,ht=1/0,pt=1/0;for(r=0;r<A;r++){var dt=v[r],gt=y[r];p=n.findBin(dt,I),d=n.findBin(gt,P),p>=0&&p<J&&d>=0&&d<rt&&(D+=U(p,r,T[d],Y,R[d]),B[d][p].push(r),ot&&(void 0===lt[p]?lt[p]=dt:lt[p]!==dt&&(ot=!1)),st&&(void 0===ct[p]?ct[p]=gt:ct[p]!==gt&&(st=!1)),ut=Math.min(ut,dt-z[p]),ft=Math.min(ft,z[p+1]-dt),ht=Math.min(ht,gt-O[d]),pt=Math.min(pt,O[d+1]-gt))}if(H)for(d=0;d<rt;d++)D+=s(T[d],R[d]);if(q)for(d=0;d<rt;d++)q(T[d],D,G,W[d]);return{x:v,xRanges:h(z,ot&&lt,ut,ft,g,x),x0:tt,dx:Q,y:y,yRanges:h(O,st&&ct,ht,pt,m,b),y0:at,dy:it,z:T,pts:B}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../histogram/average\\\":966,\\\"../histogram/bin_functions\\\":968,\\\"../histogram/bin_label_vals\\\":969,\\\"../histogram/norm_functions\\\":976}],979:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM,a=t(\\\"../../plots/cartesian/axis_ids\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"./attributes\\\"),l=[\\\"x\\\",\\\"y\\\"];function c(t,e,r,s){var l=r[a.id2name(t[e+\\\"axis\\\"])].type,c=e+\\\"bins\\\",u=t[c],f=t[e+\\\"calendar\\\"];u||(u=t[c]={});var h=\\\"date\\\"===l?function(t,e){return t||0===t?o.cleanDate(t,i,f):e}:function(t,e){return n(t)?Number(t):e};u.start=h(u.start,s.start),u.end=h(u.end,s.end);var p=s.size,d=u.size;if(n(d))u.size=d>0?Number(d):p;else if(\\\"string\\\"!=typeof d)u.size=p;else{var g=d.charAt(0),v=d.substr(1);((v=n(v)?Number(v):0)<=0||\\\"date\\\"!==l||\\\"M\\\"!==g||v!==Math.round(v))&&(u.size=p)}}e.exports=function(t,e){var r,n,i,a;function u(t){return o.coerce(i._input,i,s,t)}for(r=0;r<t.length;r++){var f=(i=t[r]).type;if(\\\"histogram2d\\\"===f||\\\"histogram2dcontour\\\"===f)for(n=0;n<l.length;n++){var h=(a=l[n])+\\\"bins\\\",p=(i._autoBin||{})[a]||{};u(h+\\\".start\\\",p.start),u(h+\\\".end\\\",p.end),u(h+\\\".size\\\",p.size),c(i,a,e,p),(i[h]||{}).size||u(\\\"nbins\\\"+a)}}}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"./attributes\\\":977,\\\"fast-isnumeric\\\":214}],980:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./sample_defaults\\\"),a=t(\\\"../heatmap/style_defaults\\\"),o=t(\\\"../../components/colorscale/defaults\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&&(a(t,e,c,l),o(t,e,l,c,{prefix:\\\"\\\",cLetter:\\\"z\\\"}))}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"../heatmap/style_defaults\\\":960,\\\"./attributes\\\":977,\\\"./sample_defaults\\\":983}],981:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../heatmap/hover\\\"),i=t(\\\"../../plots/cartesian/axes\\\").hoverLabelText;e.exports=function(t,e,r,a,o,s){var l=n(t,e,r,a,o,s);if(l){var c=(t=l[0]).index,u=c[0],f=c[1],h=t.cd[0],p=h.xRanges[f],d=h.yRanges[u];return t.xLabel=i(t.xa,p[0],p[1]),t.yLabel=i(t.ya,d[0],d[1]),l}}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../heatmap/hover\\\":953}],982:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.crossTraceDefaults=t(\\\"./cross_trace_defaults\\\"),n.calc=t(\\\"../heatmap/calc\\\"),n.plot=t(\\\"../heatmap/plot\\\"),n.layerName=\\\"heatmaplayer\\\",n.colorbar=t(\\\"../heatmap/colorbar\\\"),n.style=t(\\\"../heatmap/style\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.eventData=t(\\\"../histogram/event_data\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"histogram2d\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"2dMap\\\",\\\"histogram\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../heatmap/calc\\\":947,\\\"../heatmap/colorbar\\\":949,\\\"../heatmap/plot\\\":958,\\\"../heatmap/style\\\":959,\\\"../histogram/event_data\\\":973,\\\"./attributes\\\":977,\\\"./cross_trace_defaults\\\":979,\\\"./defaults\\\":980,\\\"./hover\\\":981}],983:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\");e.exports=function(t,e,r,i){var a=r(\\\"x\\\"),o=r(\\\"y\\\");a&&a.length&&o&&o.length?(e._length=Math.min(a.length,o.length),n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\"],i),(r(\\\"z\\\")||r(\\\"marker.color\\\"))&&r(\\\"histfunc\\\"),r(\\\"histnorm\\\"),r(\\\"autobinx\\\"),r(\\\"autobiny\\\")):e.visible=!1}},{\\\"../../registry\\\":828}],984:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../histogram2d/attributes\\\"),i=t(\\\"../contour/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/colorbar/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat;e.exports=s({x:n.x,y:n.y,z:n.z,marker:n.marker,histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:n.xbins,nbinsy:n.nbinsy,ybins:n.ybins,autobinx:n.autobinx,autobiny:n.autobiny,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:i.line,zhoverformat:n.zhoverformat},a(\\\"\\\",{cLetter:\\\"z\\\",editTypeOverride:\\\"calc\\\"}),{colorbar:o})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../contour/attributes\\\":917,\\\"../histogram2d/attributes\\\":977}],985:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../histogram2d/sample_defaults\\\"),a=t(\\\"../contour/contours_defaults\\\"),o=t(\\\"../contour/style_defaults\\\"),s=t(\\\"./attributes\\\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&&(a(t,e,c,function(r){return n.coerce2(t,e,s,r)}),o(t,e,c,l))}},{\\\"../../lib\\\":696,\\\"../contour/contours_defaults\\\":924,\\\"../contour/style_defaults\\\":938,\\\"../histogram2d/sample_defaults\\\":983,\\\"./attributes\\\":984}],986:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.crossTraceDefaults=t(\\\"../histogram2d/cross_trace_defaults\\\"),n.calc=t(\\\"../contour/calc\\\"),n.plot=t(\\\"../contour/plot\\\").plot,n.layerName=\\\"contourlayer\\\",n.style=t(\\\"../contour/style\\\"),n.colorbar=t(\\\"../contour/colorbar\\\"),n.hoverPoints=t(\\\"../contour/hover\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"histogram2dcontour\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"2dMap\\\",\\\"contour\\\",\\\"histogram\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../contour/calc\\\":918,\\\"../contour/colorbar\\\":920,\\\"../contour/hover\\\":930,\\\"../contour/plot\\\":935,\\\"../contour/style\\\":937,\\\"../histogram2d/cross_trace_defaults\\\":979,\\\"./attributes\\\":984,\\\"./defaults\\\":985}],987:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../surface/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat;e.exports=s({x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},z:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},i:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},j:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},k:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"calc\\\"},delaunayaxis:{valType:\\\"enumerated\\\",values:[\\\"x\\\",\\\"y\\\",\\\"z\\\"],dflt:\\\"z\\\",editType:\\\"calc\\\"},alphahull:{valType:\\\"number\\\",dflt:-1,editType:\\\"calc\\\"},intensity:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},color:{valType:\\\"color\\\",editType:\\\"calc\\\"},vertexcolor:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},facecolor:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},transforms:void 0},n(\\\"\\\",{colorAttr:\\\"`intensity`\\\",showScaleDflt:!0,editTypeOverride:\\\"calc\\\"}),{colorbar:i,opacity:a.opacity,flatshading:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},contour:{show:s({},a.contours.x.show,{}),color:a.contours.x.color,width:a.contours.x.width,editType:\\\"calc\\\"},lightposition:{x:s({},a.lightposition.x,{dflt:1e5}),y:s({},a.lightposition.y,{dflt:1e5}),z:s({},a.lightposition.z,{dflt:0}),editType:\\\"calc\\\"},lighting:s({vertexnormalsepsilon:{valType:\\\"number\\\",min:0,max:1,dflt:1e-12,editType:\\\"calc\\\"},facenormalsepsilon:{valType:\\\"number\\\",min:0,max:1,dflt:1e-6,editType:\\\"calc\\\"},editType:\\\"calc\\\"},a.lighting),hoverinfo:s({},o.hoverinfo,{editType:\\\"calc\\\"})})},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../surface/attributes\\\":1131}],988:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\");e.exports=function(t,e){e.intensity&&n(e,e.intensity,\\\"\\\",\\\"c\\\")}},{\\\"../../components/colorscale/calc\\\":578}],989:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-mesh3d\\\"),i=t(\\\"delaunay-triangulate\\\"),a=t(\\\"alpha-shape\\\"),o=t(\\\"convex-hull\\\"),s=t(\\\"../../lib/gl_format_color\\\").parseColorScale,l=t(\\\"../../lib/str2rgbarray\\\"),c=t(\\\"../../plots/gl3d/zip3\\\");function u(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\\\"\\\",this.color=\\\"#fff\\\",this.data=null,this.showContour=!1}var f=u.prototype;function h(t){return t.map(l)}f.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map(function(e){return t.d2l(e,0,n)*r})}this.data=t;var u,f=c(n(r.xaxis,t.x,e.dataScale[0],t.xcalendar),n(r.yaxis,t.y,e.dataScale[1],t.ycalendar),n(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k)u=c(t.i,t.j,t.k);else if(0===t.alphahull)u=o(f);else if(t.alphahull>0)u=a(t.alphahull,f);else{var p=[\\\"x\\\",\\\"y\\\",\\\"z\\\"].indexOf(t.delaunayaxis);u=i(f.map(function(t){return[t[(p+1)%3],t[(p+2)%3]]}))}var d={positions:f,cells:u,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:l(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color=\\\"#fff\\\",d.vertexIntensity=t.intensity,d.vertexIntensityBounds=[t.cmin,t.cmax],d.colormap=s(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolor[0],d.vertexColors=h(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],d.cellColors=h(t.facecolor)):(this.color=t.color,d.meshColor=l(t.color)),this.mesh.update(d)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new u(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{\\\"../../lib/gl_format_color\\\":692,\\\"../../lib/str2rgbarray\\\":720,\\\"../../plots/gl3d/zip3\\\":799,\\\"alpha-shape\\\":52,\\\"convex-hull\\\":118,\\\"delaunay-triangulate\\\":150,\\\"gl-mesh3d\\\":268}],990:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"./attributes\\\");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function c(t){var e=t.map(function(t){var e=l(t);return e&&i.isArrayOrTypedArray(e)?e:null});return e.every(function(t){return t&&t.length===e[0].length})&&e}var u=c([\\\"x\\\",\\\"y\\\",\\\"z\\\"]),f=c([\\\"i\\\",\\\"j\\\",\\\"k\\\"]);u?(f&&f.forEach(function(t){for(var e=0;e<t.length;++e)t[e]|=0}),n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\",\\\"z\\\"],s),[\\\"lighting.ambient\\\",\\\"lighting.diffuse\\\",\\\"lighting.specular\\\",\\\"lighting.roughness\\\",\\\"lighting.fresnel\\\",\\\"lighting.vertexnormalsepsilon\\\",\\\"lighting.facenormalsepsilon\\\",\\\"lightposition.x\\\",\\\"lightposition.y\\\",\\\"lightposition.z\\\",\\\"contour.show\\\",\\\"contour.color\\\",\\\"contour.width\\\",\\\"colorscale\\\",\\\"reversescale\\\",\\\"flatshading\\\",\\\"alphahull\\\",\\\"delaunayaxis\\\",\\\"opacity\\\"].forEach(function(t){l(t)}),\\\"intensity\\\"in t?(l(\\\"intensity\\\"),a(t,e,s,l,{prefix:\\\"\\\",cLetter:\\\"c\\\"})):(e.showscale=!1,\\\"facecolor\\\"in t?l(\\\"facecolor\\\"):\\\"vertexcolor\\\"in t?l(\\\"vertexcolor\\\"):l(\\\"color\\\",r)),l(\\\"text\\\"),e._length=null):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":987}],991:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.colorbar={min:\\\"cmin\\\",max:\\\"cmax\\\"},n.plot=t(\\\"./convert\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"mesh3d\\\",n.basePlotModule=t(\\\"../../plots/gl3d\\\"),n.categories=[\\\"gl3d\\\"],n.meta={},e.exports=n},{\\\"../../plots/gl3d\\\":788,\\\"./attributes\\\":987,\\\"./calc\\\":988,\\\"./convert\\\":989,\\\"./defaults\\\":990}],992:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").extendFlat,i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../components/drawing/attributes\\\").dash,o=t(\\\"../../components/fx/attributes\\\"),s=i.line;function l(t){return{line:{color:n({},s.color,{dflt:t}),width:s.width,dash:a,editType:\\\"style\\\"},editType:\\\"style\\\"}}e.exports={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},open:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},high:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},low:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},close:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},line:{width:n({},s.width,{}),dash:n({},a,{}),editType:\\\"style\\\"},increasing:l(\\\"#3D9970\\\"),decreasing:l(\\\"#FF4136\\\"),text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"calc\\\"},tickwidth:{valType:\\\"number\\\",min:0,max:.5,dflt:.3,editType:\\\"calc\\\"},hoverlabel:n({},o.hoverlabel,{split:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"style\\\"}})}},{\\\"../../components/drawing/attributes\\\":594,\\\"../../components/fx/attributes\\\":604,\\\"../../lib\\\":696,\\\"../scatter/attributes\\\":1044}],993:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=n._,a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../../constants/numerical\\\").BADNUM;function s(t,e,r,n){return{o:t,h:e,l:r,c:n}}function l(t,e,r,n,s){for(var l=n.makeCalcdata(e,\\\"open\\\"),c=n.makeCalcdata(e,\\\"high\\\"),u=n.makeCalcdata(e,\\\"low\\\"),f=n.makeCalcdata(e,\\\"close\\\"),h=Array.isArray(e.text),p=!0,d=null,g=[],v=0;v<r.length;v++){var m=r[v],y=l[v],x=c[v],b=u[v],_=f[v];if(m!==o&&y!==o&&x!==o&&b!==o&&_!==o){_===y?null!==d&&_!==d&&(p=_>d):p=_>y,d=_;var w=s(y,x,b,_);w.pos=m,w.yc=(y+_)/2,w.i=v,w.dir=p?\\\"increasing\\\":\\\"decreasing\\\",h&&(w.tx=e.text[v]),g.push(w)}}return e._extremes[n._id]=a.findExtremes(n,u.concat(c),{padded:!0}),g.length&&(g[0].t={labels:{open:i(t,\\\"open:\\\")+\\\" \\\",high:i(t,\\\"high:\\\")+\\\" \\\",low:i(t,\\\"low:\\\")+\\\" \\\",close:i(t,\\\"close:\\\")+\\\" \\\"}}),g}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),o=function(t,e,r){var i=r._minDiff;if(!i){var a,o=t._fullData,s=[];for(i=1/0,a=0;a<o.length;a++){var l=o[a];if(\\\"ohlc\\\"===l.type&&!0===l.visible&&l.xaxis===e._id){s.push(l);var c=e.makeCalcdata(l,\\\"x\\\");l._xcalc=c;var u=n.distinctVals(c).minDiff;u&&isFinite(u)&&(i=Math.min(i,u))}}for(i===1/0&&(i=1),a=0;a<s.length;a++)s[a]._minDiff=i}return i*r.tickwidth}(t,r,e),c=e._minDiff;e._minDiff=null;var u=e._xcalc;e._xcalc=null;var f=l(t,e,u,i,s);return e._extremes[r._id]=a.findExtremes(r,u,{vpad:c/2}),f.length?(n.extendFlat(f[0].t,{wHover:c/2,tickLen:o}),f):[{t:{empty:!0}}]},calcCommon:l}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745}],994:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./ohlc_defaults\\\"),a=t(\\\"./attributes\\\");function o(t,e,r,n){r(n+\\\".line.color\\\"),r(n+\\\".line.width\\\",e.line.width),r(n+\\\".line.dash\\\",e.line.dash)}e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,a,r,i)}i(t,e,l,s)?(l(\\\"line.width\\\"),l(\\\"line.dash\\\"),o(t,e,l,\\\"increasing\\\"),o(t,e,l,\\\"decreasing\\\"),l(\\\"text\\\"),l(\\\"tickwidth\\\"),s._requestRangeslider[e.xaxis]=!0):e.visible=!1}},{\\\"../../lib\\\":696,\\\"./attributes\\\":992,\\\"./ohlc_defaults\\\":997}],995:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/cartesian/axes\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/fx\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../scatter/fill_hover_text\\\"),l={increasing:\\\"\\\\u25b2\\\",decreasing:\\\"\\\\u25bc\\\"};function c(t,e,r,n){var i,s,l=t.cd,c=t.xa,u=l[0].trace,f=l[0].t,h=u.type,p=\\\"ohlc\\\"===h?\\\"l\\\":\\\"min\\\",d=\\\"ohlc\\\"===h?\\\"h\\\":\\\"max\\\",g=f.bPos||0,v=function(t){return t.pos+g-e},m=f.bdPos||f.tickLen,y=f.wHover,x=Math.min(1,m/Math.abs(c.r2c(c.range[1])-c.r2c(c.range[0])));function b(t){var e=v(t);return a.inbox(e-y,e+y,i)}function _(t){return a.inbox(t[p]-r,t[d]-r,i)}function w(t){return(b(t)+_(t))/2}i=t.maxHoverDistance-x,s=t.maxSpikeDistance-x;var k=a.getDistanceFunction(n,b,_,w);if(a.getClosest(l,k,t),!1===t.index)return null;var M=l[t.index],A=u[M.dir],T=A.line.color;return o.opacity(T)&&A.line.width?t.color=T:t.color=A.fillcolor,t.x0=c.c2p(M.pos+g-m,!0),t.x1=c.c2p(M.pos+g+m,!0),t.xLabelVal=M.pos,t.spikeDistance=w(M)*s/i,t.xSpike=c.c2p(M.pos,!0),t}function u(t,e,r,a){var o=t.cd,s=t.ya,l=o[0].trace,u=o[0].t,f=[],h=c(t,e,r,a);if(!h)return[];var p=l.hoverinfo,d=p.split(\\\"+\\\");if(!(\\\"all\\\"===p||-1!==d.indexOf(\\\"y\\\")))return[];for(var g=[\\\"high\\\",\\\"open\\\",\\\"close\\\",\\\"low\\\"],v={},m=0;m<g.length;m++){var y,x=g[m],b=l[x][h.index],_=s.c2p(b,!0);b in v?(y=v[b]).yLabel+=\\\"<br>\\\"+u.labels[x]+n.hoverLabelText(s,b):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=u.labels[x]+n.hoverLabelText(s,b),y.name=\\\"\\\",f.push(y),v[b]=y)}return f}function f(t,e,r,i){var a=t.cd,o=t.ya,u=a[0].trace,f=a[0].t,h=c(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function v(t){return f.labels[t]+n.hoverLabelText(o,u[t][d])}var m=u.hoverinfo,y=m.split(\\\"+\\\"),x=\\\"all\\\"===m,b=x||-1!==y.indexOf(\\\"y\\\"),_=x||-1!==y.indexOf(\\\"text\\\"),w=b?[v(\\\"open\\\"),v(\\\"high\\\"),v(\\\"low\\\"),v(\\\"close\\\")+\\\"  \\\"+l[g]]:[];return _&&s(p,u,w),h.extraText=w.join(\\\"<br>\\\"),h.y0=h.y1=o.c2p(p.yc,!0),[h]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?u(t,e,r,n):f(t,e,r,n)},hoverSplit:u,hoverOnPoints:f}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/fill_hover_text\\\":1052}],996:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"ohlc\\\",basePlotModule:t(\\\"../../plots/cartesian\\\"),categories:[\\\"cartesian\\\",\\\"svg\\\",\\\"showLegend\\\"],meta:{},attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),calc:t(\\\"./calc\\\").calc,plot:t(\\\"./plot\\\"),style:t(\\\"./style\\\"),hoverPoints:t(\\\"./hover\\\").hoverPoints,selectPoints:t(\\\"./select\\\")}},{\\\"../../plots/cartesian\\\":757,\\\"./attributes\\\":992,\\\"./calc\\\":993,\\\"./defaults\\\":994,\\\"./hover\\\":995,\\\"./plot\\\":998,\\\"./select\\\":999,\\\"./style\\\":1e3}],997:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\");e.exports=function(t,e,r,i){var a=r(\\\"x\\\"),o=r(\\\"open\\\"),s=r(\\\"high\\\"),l=r(\\\"low\\\"),c=r(\\\"close\\\");if(r(\\\"hoverlabel.split\\\"),n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\"],i),o&&s&&l&&c){var u=Math.min(o.length,s.length,l.length,c.length);return a&&(u=Math.min(u,a.length)),e._length=u,u}}},{\\\"../../registry\\\":828}],998:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\");e.exports=function(t,e,r,a){var o=e.xaxis,s=e.yaxis;i.makeTraceGroups(a,r,\\\"trace ohlc\\\").each(function(t){var r=n.select(this),a=t[0],l=a.t,c=a.trace;if(e.isRangePlot||(a.node3=r),!0!==c.visible||l.empty)r.remove();else{var u=l.tickLen,f=r.selectAll(\\\"path\\\").data(i.identity);f.enter().append(\\\"path\\\"),f.exit().remove(),f.attr(\\\"d\\\",function(t){var e=o.c2p(t.pos,!0),r=o.c2p(t.pos-u,!0),n=o.c2p(t.pos+u,!0);return\\\"M\\\"+r+\\\",\\\"+s.c2p(t.o,!0)+\\\"H\\\"+e+\\\"M\\\"+e+\\\",\\\"+s.c2p(t.h,!0)+\\\"V\\\"+s.c2p(t.l,!0)+\\\"M\\\"+n+\\\",\\\"+s.c2p(t.c,!0)+\\\"H\\\"+e})}})}},{\\\"../../lib\\\":696,d3:148}],999:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r<n.length;r++)n[r].selected=0;else for(r=0;r<n.length;r++){var l=n[r];e.contains([i.c2p(l.pos+s),a.c2p(l.yc)],null,l.i,t)?(o.push({pointNumber:l.i,x:i.c2d(l.pos),y:a.c2d(l.yc)}),l.selected=1):l.selected=0}return o}},{}],1000:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"../../components/color\\\");e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.ohlclayer\\\").selectAll(\\\"g.trace\\\");r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),r.each(function(t){var e=t[0].trace;n.select(this).selectAll(\\\"path\\\").each(function(t){var r=e[t.dir].line;n.select(this).style(\\\"fill\\\",\\\"none\\\").call(a.stroke,r.color).call(i.dashLine,r.dash,r.width).style(\\\"opacity\\\",e.selectedpoints&&!t.selected?.3:1)})})}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,d3:148}],1001:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/extend\\\").extendFlat,i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../plots/font_attributes\\\"),o=t(\\\"../../components/colorscale/attributes\\\"),s=t(\\\"../../plots/domain\\\").attributes,l=t(\\\"../scatter/attributes\\\").line,c=t(\\\"../../components/colorbar/attributes\\\"),u=n({editType:\\\"calc\\\"},o(\\\"line\\\",{editType:\\\"calc\\\"}),{showscale:l.showscale,colorbar:c,shape:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"hspline\\\"],dflt:\\\"linear\\\",editType:\\\"plot\\\"}});e.exports={domain:s({name:\\\"parcats\\\",trace:!0,editType:\\\"calc\\\"}),hoverinfo:n({},i.hoverinfo,{flags:[\\\"count\\\",\\\"probability\\\"],editType:\\\"plot\\\"}),hoveron:{valType:\\\"enumerated\\\",values:[\\\"category\\\",\\\"color\\\",\\\"dimension\\\"],dflt:\\\"category\\\",editType:\\\"plot\\\"},arrangement:{valType:\\\"enumerated\\\",values:[\\\"perpendicular\\\",\\\"freeform\\\",\\\"fixed\\\"],dflt:\\\"perpendicular\\\",editType:\\\"plot\\\"},bundlecolors:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},sortpaths:{valType:\\\"enumerated\\\",values:[\\\"forward\\\",\\\"backward\\\"],dflt:\\\"forward\\\",editType:\\\"plot\\\"},labelfont:a({editType:\\\"calc\\\"}),tickfont:a({editType:\\\"calc\\\"}),dimensions:{_isLinkedToArray:\\\"dimension\\\",label:{valType:\\\"string\\\",editType:\\\"calc\\\"},categoryorder:{valType:\\\"enumerated\\\",values:[\\\"trace\\\",\\\"category ascending\\\",\\\"category descending\\\",\\\"array\\\"],dflt:\\\"trace\\\",editType:\\\"calc\\\"},categoryarray:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},ticktext:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},values:{valType:\\\"data_array\\\",dflt:[],editType:\\\"calc\\\"},displayindex:{valType:\\\"integer\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\",visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"}},line:u,counts:{valType:\\\"number\\\",min:0,dflt:1,arrayOk:!0,editType:\\\"calc\\\"},customdata:void 0,hoverlabel:void 0,ids:void 0,legendgroup:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772,\\\"../scatter/attributes\\\":1044}],1002:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/get_data\\\").getModuleCalcData,i=t(\\\"./plot\\\");r.name=\\\"parcats\\\",r.plot=function(t,e,r,a){var o=n(t.calcdata,\\\"parcats\\\");if(o.length){var s=o[0];i(t,s,r,a)}},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"parcats\\\"),a=e._has&&e._has(\\\"parcats\\\");i&&!a&&n._paperdiv.selectAll(\\\".parcats\\\").remove()}},{\\\"../../plots/get_data\\\":782,\\\"./plot\\\":1007}],1003:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/gup\\\").wrap,i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/calc\\\"),o=t(\\\"../../lib/filter_unique.js\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"../../lib\\\");function c(t,e,r){t.valueInds.push(e),t.count+=r}function u(t,e,r){t.valueInds.push(e),t.count+=r}e.exports=function(t,e){var r=l.filterVisible(e.dimensions);if(0===r.length)return[];var f,h,p,d=r.map(function(t){var e;return\\\"trace\\\"===t.categoryorder?e=null:\\\"array\\\"===t.categoryorder?e=t.categoryarray:(e=o(t.values).sort(),\\\"category descending\\\"===t.categoryorder&&(e=e.reverse())),function(t,e){e=null==e?[]:e.map(function(t){return t});var r={},n={},i=[];e.forEach(function(t,e){r[t]=0,n[t]=e});for(var a=0;a<t.length;a++){var o,s=t[a];void 0===r[s]?(r[s]=1,o=e.push(s)-1,n[s]=o):(r[s]++,o=n[s]),i.push(o)}var l=e.map(function(t){return r[t]});return{uniqueValues:e,uniqueCounts:l,inds:i}}(t.values,e)});f=l.isArrayOrTypedArray(e.counts)?e.counts:[e.counts],function(t){var e;if(function(t){for(var e=new Array(t.length),r=0;r<t.length;r++){if(t[r]<0||t[r]>=t.length)return!1;if(void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(t.map(function(t){return t.displayindex})))for(e=0;e<t.length;e++)t[e]._displayindex=t[e].displayindex;else for(e=0;e<t.length;e++)t[e]._displayindex=e}(r),r.forEach(function(t,e){!function(t,e){t._categoryarray=e.uniqueValues,null===t.ticktext||void 0===t.ticktext?t._ticktext=[]:t._ticktext=t.ticktext.slice();for(var r=t._ticktext.length;r<e.uniqueValues.length;r++)t._ticktext.push(e.uniqueValues[r])}(t,d[e])});var g,v=e.line;v?(i(e,\\\"line\\\")&&a(e,e.line.color,\\\"line\\\",\\\"c\\\"),g=s.tryColorscale(v)):g=l.identity;var m,y,x,b,_=r[0].values.length,w={},k=d.map(function(t){return t.inds});for(p=0,m=0;m<_;m++){var M=[];for(y=0;y<k.length;y++)M.push(k[y][m]);h=f[m%f.length],p+=h;var A=(x=m,b=void 0,b=l.isArrayOrTypedArray(v.color)?v.color[x%v.color.length]:v.color,{color:g(b),rawColor:b}),T=M+\\\"-\\\"+A.rawColor;void 0===w[T]&&(w[T]={categoryInds:M,color:A.color,rawColor:A.rawColor,valueInds:[],count:0}),u(w[T],m,h)}var S,C=r.map(function(t,e){return r=e,n=t._index,i=t._displayindex,a=t.label,{dimensionInd:r,containerInd:n,displayInd:i,dimensionLabel:a,count:p,categories:[],dragX:null};var r,n,i,a});for(m=0;m<_;m++)for(h=f[m%f.length],y=0;y<C.length;y++){var E=C[y].containerInd,L=d[y].inds[m],z=C[y].categories;if(void 0===z[L]){var O=e.dimensions[E]._categoryarray[L],I=e.dimensions[E]._ticktext[L];z[L]={dimensionInd:y,categoryInd:S=L,categoryValue:O,displayInd:S,categoryLabel:I,valueInds:[],count:0,dragY:null}}c(z[L],m,h)}return n(function(t,e,r){var n=t.map(function(t){return t.categories.length}).reduce(function(t,e){return Math.max(t,e)});return{dimensions:t,paths:e,trace:void 0,maxCats:n,count:r}}(C,w,p))}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/filter_unique.js\\\":686,\\\"../../lib/gup\\\":693}],1004:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"../../plots/domain\\\").defaults,s=t(\\\"../../plots/array_container_defaults\\\"),l=t(\\\"./attributes\\\"),c=t(\\\"../parcoords/merge_length\\\");function u(t,e){function r(r,i){return n.coerce(t,e,l.dimensions,r,i)}var i=r(\\\"values\\\"),a=r(\\\"visible\\\");if(i&&i.length||(a=e.visible=!1),a){r(\\\"label\\\"),r(\\\"displayindex\\\",e._index);var o,s=t.categoryarray,c=Array.isArray(s)&&s.length>0;c&&(o=\\\"array\\\");var u=r(\\\"categoryorder\\\",o);\\\"array\\\"===u?(r(\\\"categoryarray\\\"),r(\\\"ticktext\\\")):(delete t.categoryarray,delete t.ticktext),c||\\\"array\\\"!==u||(e.categoryorder=\\\"trace\\\")}}e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,l,r,i)}var p=s(t,e,{name:\\\"dimensions\\\",handleItemDefaults:u}),d=function(t,e,r,o,s){s(\\\"line.shape\\\");var l=s(\\\"line.color\\\",o.colorway[0]);if(i(t,\\\"line\\\")&&n.isArrayOrTypedArray(l)){if(l.length)return s(\\\"line.colorscale\\\"),a(t,e,o,s,{prefix:\\\"line.\\\",cLetter:\\\"c\\\"}),l.length;e.line.color=r}return 1/0}(t,e,r,f,h);o(e,f,h),Array.isArray(p)&&p.length||(e.visible=!1),c(e,p,\\\"values\\\",d),h(\\\"hoveron\\\"),h(\\\"arrangement\\\"),h(\\\"bundlecolors\\\"),h(\\\"sortpaths\\\"),h(\\\"counts\\\");var g={family:f.font.family,size:Math.round(f.font.size),color:f.font.color};n.coerceFont(h,\\\"labelfont\\\",g);var v={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\\\"tickfont\\\",v)}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/domain\\\":771,\\\"../parcoords/merge_length\\\":1016,\\\"./attributes\\\":1001}],1005:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.colorbar={container:\\\"line\\\",min:\\\"cmin\\\",max:\\\"cmax\\\"},n.moduleType=\\\"trace\\\",n.name=\\\"parcats\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1001,\\\"./base_plot\\\":1002,\\\"./calc\\\":1003,\\\"./defaults\\\":1004,\\\"./plot\\\":1007}],1006:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../plot_api/plot_api\\\"),a=t(\\\"../../components/fx\\\"),o=t(\\\"../../lib\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"tinycolor2\\\"),c=t(\\\"../../lib/svg_text_utils\\\");function u(t,e,r,i){var a=t.map(function(t,e,r){var n,i=r[0],a=e.margin||{l:80,r:80,t:100,b:80},o=i.trace,s=o.domain,l=e.width,c=e.height,u=Math.floor(l*(s.x[1]-s.x[0])),f=Math.floor(c*(s.y[1]-s.y[0])),h=s.x[0]*l+a.l,p=e.height-s.y[1]*e.height+a.t,d=o.line.shape;n=\\\"all\\\"===o.hoverinfo?[\\\"count\\\",\\\"probability\\\"]:o.hoverinfo.split(\\\"+\\\");var g={key:o.uid,model:i,x:h,y:p,width:u,height:f,hoveron:o.hoveron,hoverinfoItems:n,arrangement:o.arrangement,bundlecolors:o.bundlecolors,sortpaths:o.sortpaths,labelfont:o.labelfont,categorylabelfont:o.tickfont,pathShape:d,dragDimension:null,margin:a,paths:[],dimensions:[],graphDiv:t,traceSelection:null,pathSelection:null,dimensionSelection:null};i.dimensions&&(R(g),D(g));return g}.bind(0,e,r)),l=i.selectAll(\\\"g.parcatslayer\\\").data([null]);l.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"parcatslayer\\\").style(\\\"pointer-events\\\",\\\"all\\\");var u=l.selectAll(\\\"g.trace.parcats\\\").data(a,f),v=u.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"trace parcats\\\");u.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\", \\\"+t.y+\\\")\\\"}),v.append(\\\"g\\\").attr(\\\"class\\\",\\\"paths\\\");var x=u.select(\\\"g.paths\\\").selectAll(\\\"path.path\\\").data(function(t){return t.paths},f);x.attr(\\\"fill\\\",function(t){return t.model.color});var w=x.enter().append(\\\"path\\\").attr(\\\"class\\\",\\\"path\\\").attr(\\\"stroke-opacity\\\",0).attr(\\\"fill\\\",function(t){return t.model.color}).attr(\\\"fill-opacity\\\",0);y(w),x.attr(\\\"d\\\",function(t){return t.svgD}),w.empty()||x.sort(p),x.exit().remove(),x.on(\\\"mouseover\\\",d).on(\\\"mouseout\\\",g).on(\\\"click\\\",m),v.append(\\\"g\\\").attr(\\\"class\\\",\\\"dimensions\\\");var k=u.select(\\\"g.dimensions\\\").selectAll(\\\"g.dimension\\\").data(function(t){return t.dimensions},f);k.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"dimension\\\"),k.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\", 0)\\\"}),k.exit().remove();var M=k.selectAll(\\\"g.category\\\").data(function(t){return t.categories},f),A=M.enter().append(\\\"g\\\").attr(\\\"class\\\",\\\"category\\\");M.attr(\\\"transform\\\",function(t){return\\\"translate(0, \\\"+t.y+\\\")\\\"}),A.append(\\\"rect\\\").attr(\\\"class\\\",\\\"catrect\\\").attr(\\\"pointer-events\\\",\\\"none\\\"),M.select(\\\"rect.catrect\\\").attr(\\\"fill\\\",\\\"none\\\").attr(\\\"width\\\",function(t){return t.width}).attr(\\\"height\\\",function(t){return t.height}),b(A);var z=M.selectAll(\\\"rect.bandrect\\\").data(function(t){return t.bands},f);z.each(function(){o.raiseToTop(this)}),z.attr(\\\"fill\\\",function(t){return t.color});var O=z.enter().append(\\\"rect\\\").attr(\\\"class\\\",\\\"bandrect\\\").attr(\\\"stroke-opacity\\\",0).attr(\\\"fill\\\",function(t){return t.color}).attr(\\\"fill-opacity\\\",0);z.attr(\\\"fill\\\",function(t){return t.color}).attr(\\\"width\\\",function(t){return t.width}).attr(\\\"height\\\",function(t){return t.height}).attr(\\\"y\\\",function(t){return t.y}).attr(\\\"cursor\\\",function(t){return\\\"fixed\\\"===t.parcatsViewModel.arrangement?\\\"default\\\":\\\"perpendicular\\\"===t.parcatsViewModel.arrangement?\\\"ns-resize\\\":\\\"move\\\"}),_(O),z.exit().remove(),A.append(\\\"text\\\").attr(\\\"class\\\",\\\"catlabel\\\").attr(\\\"pointer-events\\\",\\\"none\\\");var I=e._fullLayout.paper_bgcolor;M.select(\\\"text.catlabel\\\").attr(\\\"text-anchor\\\",function(t){return h(t)?\\\"start\\\":\\\"end\\\"}).attr(\\\"alignment-baseline\\\",\\\"middle\\\").style(\\\"text-shadow\\\",I+\\\" -1px  1px 2px, \\\"+I+\\\" 1px  1px 2px, \\\"+I+\\\"  1px -1px 2px, \\\"+I+\\\" -1px -1px 2px\\\").style(\\\"fill\\\",\\\"rgb(0, 0, 0)\\\").attr(\\\"x\\\",function(t){return h(t)?t.width+5:-5}).attr(\\\"y\\\",function(t){return t.height/2}).text(function(t){return t.model.categoryLabel}).each(function(t){s.font(n.select(this),t.parcatsViewModel.categorylabelfont),c.convertToTspans(n.select(this),e)}),A.append(\\\"text\\\").attr(\\\"class\\\",\\\"dimlabel\\\"),M.select(\\\"text.dimlabel\\\").attr(\\\"text-anchor\\\",\\\"middle\\\").attr(\\\"alignment-baseline\\\",\\\"baseline\\\").attr(\\\"cursor\\\",function(t){return\\\"fixed\\\"===t.parcatsViewModel.arrangement?\\\"default\\\":\\\"ew-resize\\\"}).attr(\\\"x\\\",function(t){return t.width/2}).attr(\\\"y\\\",-5).text(function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null}).each(function(t){s.font(n.select(this),t.parcatsViewModel.labelfont)}),M.selectAll(\\\"rect.bandrect\\\").on(\\\"mouseover\\\",T).on(\\\"mouseout\\\",S),M.exit().remove(),k.call(n.behavior.drag().origin(function(t){return{x:t.x,y:0}}).on(\\\"dragstart\\\",C).on(\\\"drag\\\",E).on(\\\"dragend\\\",L)),u.each(function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll(\\\"g.paths\\\").selectAll(\\\"path.path\\\"),t.dimensionSelection=n.select(this).selectAll(\\\"g.dimensions\\\").selectAll(\\\"g.dimension\\\")}),u.exit().remove()}function f(t){return t.key}function h(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function p(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor<e.model.rawColor?-1:0}function d(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\")){o.raiseToTop(this),x(n.select(this));var e=v(t);if(t.parcatsViewModel.graphDiv.emit(\\\"plotly_hover\\\",{points:e,event:n.event}),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"none\\\")){var r,i,s,c=n.mouse(this)[0],u=t.parcatsViewModel.graphDiv,f=u._fullLayout,h=f._paperdiv.node().getBoundingClientRect(),p=t.parcatsViewModel.graphDiv.getBoundingClientRect();for(s=0;s<t.leftXs.length-1;s++)if(t.leftXs[s]+t.dimWidths[s]-2<=c&&c<=t.leftXs[s+1]+2){var d=t.parcatsViewModel.dimensions[s],g=t.parcatsViewModel.dimensions[s+1];r=(d.x+d.width+g.x)/2,i=(t.topYs[s]+t.topYs[s+1]+t.height)/2;break}var m=t.parcatsViewModel.x+r,y=t.parcatsViewModel.y+i,b=l.mostReadable(t.model.color,[\\\"black\\\",\\\"white\\\"]),_=[];-1!==t.parcatsViewModel.hoverinfoItems.indexOf(\\\"count\\\")&&_.push([\\\"Count:\\\",t.model.count].join(\\\" \\\")),-1!==t.parcatsViewModel.hoverinfoItems.indexOf(\\\"probability\\\")&&_.push([\\\"P:\\\",(t.model.count/t.parcatsViewModel.model.count).toFixed(3)].join(\\\" \\\"));var w=_.join(\\\"<br>\\\"),k=n.mouse(u)[0];a.loneHover({x:m-h.left+p.left,y:y-h.top+p.top,text:w,color:t.model.color,borderColor:\\\"black\\\",fontFamily:'Monaco, \\\"Courier New\\\", monospace',fontSize:10,fontColor:b,idealAlign:k<m?\\\"right\\\":\\\"left\\\"},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:u})}}}function g(t){if(!t.parcatsViewModel.dragDimension&&(y(n.select(this)),a.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),t.parcatsViewModel.pathSelection.sort(p),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\"))){var e=v(t);t.parcatsViewModel.graphDiv.emit(\\\"plotly_unhover\\\",{points:e,event:n.event})}}function v(t){for(var e=[],r=z(t.parcatsViewModel),n=0;n<t.model.valueInds.length;n++){var i=t.model.valueInds[n];e.push({curveNumber:r,pointNumber:i})}return e}function m(t){if(-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\")){var e=v(t);t.parcatsViewModel.graphDiv.emit(\\\"plotly_click\\\",{points:e,event:n.event})}}function y(t){t.attr(\\\"fill\\\",function(t){return t.model.color}).attr(\\\"fill-opacity\\\",.6).attr(\\\"stroke\\\",\\\"lightgray\\\").attr(\\\"stroke-width\\\",.2).attr(\\\"stroke-opacity\\\",1)}function x(t){t.attr(\\\"fill-opacity\\\",.8).attr(\\\"stroke\\\",function(t){return l.mostReadable(t.model.color,[\\\"black\\\",\\\"white\\\"])}).attr(\\\"stroke-width\\\",.3)}function b(t){t.select(\\\"rect.catrect\\\").attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",1).attr(\\\"stroke-opacity\\\",1)}function _(t){t.attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",.2).attr(\\\"stroke-opacity\\\",1).attr(\\\"fill-opacity\\\",1)}function w(t){var e=t.parcatsViewModel.pathSelection,r=t.categoryViewModel.model.dimensionInd,n=t.categoryViewModel.model.categoryInd;return e.filter(function(e){return e.model.categoryInds[r]===n&&e.model.color===t.color})}function k(t,e,r){var i=n.select(t).datum().parcatsViewModel.graphDiv,a=n.select(t.parentNode).selectAll(\\\"rect.bandrect\\\"),o=[];a.each(function(t){w(t).each(function(t){Array.prototype.push.apply(o,v(t))})}),i.emit(e,{points:o,event:r})}function M(t,e,r){var i=n.select(t).datum(),a=i.parcatsViewModel.graphDiv,o=w(i),s=[];o.each(function(t){Array.prototype.push.apply(s,v(t))}),a.emit(e,{points:s,event:r})}function A(t,e){var r,i,a=n.select(e.parentNode).select(\\\"rect.catrect\\\"),o=a.node().getBoundingClientRect(),s=a.datum(),l=s.parcatsViewModel,c=l.model.dimensions[s.model.dimensionInd],u=o.top+o.height/2;l.dimensions.length>1&&c.displayInd===l.dimensions.length-1?(r=o.left,i=\\\"left\\\"):(r=o.left+o.width,i=\\\"right\\\");var f=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf(\\\"count\\\")&&f.push([\\\"Count:\\\",s.model.count].join(\\\" \\\")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf(\\\"probability\\\")&&f.push([\\\"P(\\\"+s.model.categoryLabel+\\\"):\\\",(s.model.count/s.parcatsViewModel.model.count).toFixed(3)].join(\\\" \\\"));var h=f.join(\\\"<br>\\\");return{x:r-t.left,y:u-t.top,text:h,color:\\\"lightgray\\\",borderColor:\\\"black\\\",fontFamily:'Monaco, \\\"Courier New\\\", monospace',fontSize:12,fontColor:\\\"black\\\",idealAlign:i}}function T(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,i=r._fullLayout,s=i._paperdiv.node().getBoundingClientRect(),c=t.parcatsViewModel.hoveron;if(\\\"color\\\"===c?(!function(t){var e=n.select(t).datum(),r=w(e);x(r),r.each(function(){o.raiseToTop(this)}),n.select(t.parentNode).selectAll(\\\"rect.bandrect\\\").filter(function(t){return t.color===e.color}).each(function(){o.raiseToTop(this),n.select(this).attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",1.5)})}(this),M(this,\\\"plotly_hover\\\",n.event)):(!function(t){n.select(t.parentNode).selectAll(\\\"rect.bandrect\\\").each(function(t){var e=w(t);x(e),e.each(function(){o.raiseToTop(this)})}),n.select(t.parentNode).select(\\\"rect.catrect\\\").attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",2.5)}(this),k(this,\\\"plotly_hover\\\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"none\\\"))\\\"category\\\"===c?e=A(s,this):\\\"color\\\"===c?e=function(t,e){var r,i,a=e.getBoundingClientRect(),o=n.select(e).datum(),s=o.categoryViewModel,c=s.parcatsViewModel,u=c.model.dimensions[s.model.dimensionInd],f=a.y+a.height/2;c.dimensions.length>1&&u.displayInd===c.dimensions.length-1?(r=a.left,i=\\\"left\\\"):(r=a.left+a.width,i=\\\"right\\\");var h=s.model.categoryLabel,p=o.parcatsViewModel.model.count,d=0;o.categoryViewModel.bands.forEach(function(t){t.color===o.color&&(d+=t.count)});var g=s.model.count,v=0;c.pathSelection.each(function(t){t.model.color===o.color&&(v+=t.model.count)});var m=[];if(-1!==s.parcatsViewModel.hoverinfoItems.indexOf(\\\"count\\\")&&m.push([\\\"Count:\\\",d].join(\\\" \\\")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf(\\\"probability\\\")){var y=\\\"P(color \\\\u2229 \\\"+h+\\\"): \\\"+(d/p).toFixed(3);m.push(y);var x=\\\"P(\\\"+h+\\\" | color): \\\"+(d/v).toFixed(3);m.push(x);var b=\\\"P(color | \\\"+h+\\\"): \\\"+(d/g).toFixed(3);m.push(b)}var _=m.join(\\\"<br>\\\"),w=l.mostReadable(o.color,[\\\"black\\\",\\\"white\\\"]);return{x:r-t.left,y:f-t.top,text:_,color:o.color,borderColor:\\\"black\\\",fontFamily:'Monaco, \\\"Courier New\\\", monospace',fontColor:w,fontSize:10,idealAlign:i}}(s,this):\\\"dimension\\\"===c&&(e=function(t,e){var r=[];return n.select(e.parentNode.parentNode).selectAll(\\\"g.category\\\").select(\\\"rect.catrect\\\").each(function(){r.push(A(t,this))}),r}(s,this)),e&&a.multiHovers(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function S(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(y(e.pathSelection),b(e.dimensionSelection.selectAll(\\\"g.category\\\")),_(e.dimensionSelection.selectAll(\\\"g.category\\\").selectAll(\\\"rect.bandrect\\\")),a.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(p),-1===e.hoverinfoItems.indexOf(\\\"skip\\\"))){\\\"color\\\"===t.parcatsViewModel.hoveron?M(this,\\\"plotly_unhover\\\",n.event):k(this,\\\"plotly_unhover\\\",n.event)}}function C(t){\\\"fixed\\\"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll(\\\"g.category\\\").select(\\\"rect.catrect\\\").each(function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map(function(t){return t.displayInd}),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\\\"rect.bandrect\\\").each(function(e){e.y<i&&i<=e.y+e.height&&(t.potentialClickBand=this)}))}),t.parcatsViewModel.dragDimension=t,a.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function E(t){if(\\\"fixed\\\"!==t.parcatsViewModel.arrangement&&(t.dragHasMoved=!0,null!==t.dragDimensionDisplayInd)){var e=t.dragDimensionDisplayInd,r=e-1,i=e+1,a=t.parcatsViewModel.dimensions[e];if(null!==t.dragCategoryDisplayInd){var o=a.categories[t.dragCategoryDisplayInd];o.model.dragY+=n.event.dy;var s=o.model.dragY,l=o.model.displayInd,c=a.categories,u=c[l-1],f=c[l+1];void 0!==u&&s<u.y+u.height/2&&(o.model.displayInd=u.model.displayInd,u.model.displayInd=l),void 0!==f&&s+o.height>f.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||\\\"freeform\\\"===t.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var h=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[i];void 0!==h&&a.model.dragX<h.x+h.width&&(a.model.displayInd=h.model.displayInd,h.model.displayInd=e),void 0!==p&&a.model.dragX+a.width>p.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}R(t.parcatsViewModel),D(t.parcatsViewModel),I(t.parcatsViewModel),O(t.parcatsViewModel)}}function L(t){if(\\\"fixed\\\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\\\"text\\\").attr(\\\"font-weight\\\",\\\"normal\\\");var e={},r=z(t.parcatsViewModel),a=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),o=t.initialDragDimensionDisplayInds.some(function(t,e){return t!==a[e]});o&&a.forEach(function(r,n){var i=t.parcatsViewModel.model.dimensions[n].containerInd;e[\\\"dimensions[\\\"+i+\\\"].displayindex\\\"]=r});var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map(function(t){return t.displayInd});if(s=t.initialDragCategoryDisplayInds.some(function(t,e){return t!==l[e]})){var c=t.model.categories.slice().sort(function(t,e){return t.displayInd-e.displayInd}),u=c.map(function(t){return t.categoryValue}),f=c.map(function(t){return t.categoryLabel});e[\\\"dimensions[\\\"+t.model.containerInd+\\\"].categoryarray\\\"]=[u],e[\\\"dimensions[\\\"+t.model.containerInd+\\\"].ticktext\\\"]=[f],e[\\\"dimensions[\\\"+t.model.containerInd+\\\"].categoryorder\\\"]=\\\"array\\\"}}if(-1===t.parcatsViewModel.hoverinfoItems.indexOf(\\\"skip\\\")&&!t.dragHasMoved&&t.potentialClickBand&&(\\\"color\\\"===t.parcatsViewModel.hoveron?M(t.potentialClickBand,\\\"plotly_click\\\",n.event.sourceEvent):k(t.potentialClickBand,\\\"plotly_click\\\",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd)t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null;t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,R(t.parcatsViewModel),D(t.parcatsViewModel),n.transition().duration(300).ease(\\\"cubic-in-out\\\").each(function(){I(t.parcatsViewModel,!0),O(t.parcatsViewModel,!0)}).each(\\\"end\\\",function(){(o||s)&&i.restyle(t.parcatsViewModel.graphDiv,e,[r])})}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n<r.length;n++)if(t.key===r[n].uid){e=n;break}return e}function O(t,e){var r;void 0===e&&(e=!1),t.pathSelection.data(function(t){return t.paths},f),(r=t.pathSelection,e?r.transition():r).attr(\\\"d\\\",function(t){return t.svgD})}function I(t,e){function r(t){return e?t.transition():t}void 0===e&&(e=!1),t.dimensionSelection.data(function(t){return t.dimensions},f);var i=t.dimensionSelection.selectAll(\\\"g.category\\\").data(function(t){return t.categories},f);r(t.dimensionSelection).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\", 0)\\\"}),r(i).attr(\\\"transform\\\",function(t){return\\\"translate(0, \\\"+t.y+\\\")\\\"}),i.select(\\\".dimlabel\\\").text(function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null}),i.select(\\\".catlabel\\\").attr(\\\"text-anchor\\\",function(t){return h(t)?\\\"start\\\":\\\"end\\\"}).attr(\\\"x\\\",function(t){return h(t)?t.width+5:-5}).each(function(t){var e,r;h(t)?(e=t.width+5,r=\\\"start\\\"):(e=-5,r=\\\"end\\\"),n.select(this).selectAll(\\\"tspan\\\").attr(\\\"x\\\",e).attr(\\\"text-anchor\\\",r)});var a=i.selectAll(\\\"rect.bandrect\\\").data(function(t){return t.bands},f),s=a.enter().append(\\\"rect\\\").attr(\\\"class\\\",\\\"bandrect\\\").attr(\\\"cursor\\\",\\\"move\\\").attr(\\\"stroke-opacity\\\",0).attr(\\\"fill\\\",function(t){return t.color}).attr(\\\"fill-opacity\\\",0);a.attr(\\\"fill\\\",function(t){return t.color}).attr(\\\"width\\\",function(t){return t.width}).attr(\\\"height\\\",function(t){return t.height}).attr(\\\"y\\\",function(t){return t.y}),_(s),a.each(function(){o.raiseToTop(this)}),a.exit().remove()}function P(t,e,r,i,a){var o,s,l=[],c=[];for(s=0;s<r.length-1;s++)o=n.interpolateNumber(r[s]+t[s],t[s+1]),l.push(o(a)),c.push(o(1-a));var u=\\\"M \\\"+t[0]+\\\",\\\"+e[0];for(u+=\\\"l\\\"+r[0]+\\\",0 \\\",s=1;s<r.length;s++)u+=\\\"C\\\"+l[s-1]+\\\",\\\"+e[s-1]+\\\" \\\"+c[s-1]+\\\",\\\"+e[s]+\\\" \\\"+t[s]+\\\",\\\"+e[s],u+=\\\"l\\\"+r[s]+\\\",0 \\\";for(u+=\\\"l0,\\\"+i+\\\" \\\",u+=\\\"l -\\\"+r[r.length-1]+\\\",0 \\\",s=r.length-2;s>=0;s--)u+=\\\"C\\\"+c[s]+\\\",\\\"+(e[s+1]+i)+\\\" \\\"+l[s]+\\\",\\\"+(e[s]+i)+\\\" \\\"+(t[s]+r[s])+\\\",\\\"+(e[s]+i),u+=\\\"l-\\\"+r[s]+\\\",0 \\\";return u+=\\\"Z\\\"}function D(t){var e=t.dimensions,r=t.model,n=e.map(function(t){return t.categories.map(function(t){return t.y})}),i=t.model.dimensions.map(function(t){return t.categories.map(function(t){return t.displayInd})}),a=t.model.dimensions.map(function(t){return t.displayInd}),o=t.dimensions.map(function(t){return t.model.dimensionInd}),s=e.map(function(t){return t.x}),l=e.map(function(t){return t.width}),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function f(t){var e=t.categoryInds.map(function(t,e){return i[e][t]});return o.map(function(t){return e[t]})}c.sort(function(e,r){var n=f(e),i=f(r);return\\\"backward\\\"===t.sortpaths&&(n.reverse(),i.reverse()),n.push(e.valueInds[0]),i.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),i.unshift(r.rawColor)),n<i?-1:n>i?1:0});for(var h=new Array(c.length),p=e[0].model.count,d=e[0].categories.map(function(t){return t.height}).reduce(function(t,e){return t+e}),g=0;g<c.length;g++){var v,m=c[g];v=p>0?d*(m.count/p):0;for(var y,x=new Array(n.length),b=0;b<m.categoryInds.length;b++){var _=m.categoryInds[b],w=i[b][_],k=a[b];x[k]=n[k][w],n[k][w]+=v;var M=t.dimensions[k].categories[w],A=M.bands.length,T=M.bands[A-1];if(void 0===T||m.rawColor!==T.rawColor){var S=void 0===T?0:T.y+T.height;M.bands.push({key:S,color:m.color,rawColor:m.rawColor,height:v,width:M.width,count:m.count,y:S,categoryViewModel:M,parcatsViewModel:t})}else{var C=M.bands[A-1];C.height+=v,C.count+=m.count}}y=\\\"hspline\\\"===t.pathShape?P(s,x,l,v,.5):P(s,x,l,v,0),h[g]={key:m.valueInds[0],model:m,height:v,leftXs:s,topYs:x,dimWidths:l,svgD:y,parcatsViewModel:t}}t.paths=h}function R(t){var e=t.model.dimensions.map(function(t){return{displayInd:t.displayInd,dimensionInd:t.dimensionInd}});e.sort(function(t,e){return t.displayInd-e.displayInd});var r=[];for(var n in e){var i=e[n].dimensionInd,a=t.model.dimensions[i];r.push(B(t,a))}t.dimensions=r}function B(t,e){var r,n=t.model.dimensions.length,i=e.displayInd;r=40+(n>1?(t.width-80-16)/(n-1):0)*i;var a,o,s,l,c,u=[],f=t.model.maxCats,h=e.categories.length,p=e.count,d=t.height-8*(f-1),g=8*(f-h)/2,v=e.categories.map(function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}});for(v.sort(function(t,e){return t.displayInd-e.displayInd}),c=0;c<h;c++)l=v[c].categoryInd,o=e.categories[l],a=p>0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:g,bands:[],parcatsViewModel:t},g=g+a+8,u.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:u,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){u(r,t,n,e)}},{\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"../../plot_api/plot_api\\\":732,d3:148,tinycolor2:514}],1007:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./parcats\\\");e.exports=function(t,e,r,i){var a=t._fullLayout,o=a._paper,s=a._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},{\\\"./parcats\\\":1006}],1008:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../../plots/cartesian/layout_attributes\\\"),o=t(\\\"../../plots/font_attributes\\\"),s=t(\\\"../../plots/domain\\\").attributes,l=t(\\\"../../lib/extend\\\").extendFlat,c=t(\\\"../../plot_api/plot_template\\\").templatedArray;e.exports={domain:s({name:\\\"parcoords\\\",trace:!0,editType:\\\"calc\\\"}),hoverlabel:void 0,labelfont:o({editType:\\\"calc\\\"}),tickfont:o({editType:\\\"calc\\\"}),rangefont:o({editType:\\\"calc\\\"}),dimensions:c(\\\"dimension\\\",{label:{valType:\\\"string\\\",editType:\\\"calc\\\"},tickvals:l({},a.tickvals,{editType:\\\"calc\\\"}),ticktext:l({},a.ticktext,{editType:\\\"calc\\\"}),tickformat:{valType:\\\"string\\\",dflt:\\\"3s\\\",editType:\\\"calc\\\"},visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},range:{valType:\\\"info_array\\\",items:[{valType:\\\"number\\\",editType:\\\"calc\\\"},{valType:\\\"number\\\",editType:\\\"calc\\\"}],editType:\\\"calc\\\"},constraintrange:{valType:\\\"info_array\\\",freeLength:!0,dimensions:\\\"1-2\\\",items:[{valType:\\\"number\\\",editType:\\\"calc\\\"},{valType:\\\"number\\\",editType:\\\"calc\\\"}],editType:\\\"calc\\\"},multiselect:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},values:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"}),line:l(n(\\\"line\\\",{colorscaleDflt:\\\"Viridis\\\",autoColorDflt:!1,editTypeOverride:\\\"calc\\\"}),{colorbar:i,editType:\\\"calc\\\"})}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/layout_attributes\\\":758,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772}],1009:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"d3\\\"),a=t(\\\"../../lib/gup\\\").keyFun,o=t(\\\"../../lib/gup\\\").repeat,s=t(\\\"../../lib\\\").sorterAsc,l=n.bar.snapRatio;function c(t,e){return t*(1-l)+e*l}var u=n.bar.snapClose;function f(t,e){return t*(1-u)+e*u}function h(t,e,r){if(d(e,r))return e;for(var n=t[0],i=n,a=1;a<t.length;a++){var o=t[a];if(e<f(n,o))return c(n,i);if(e<o||a===t.length-1)return c(o,n);i=n,n=o}}function p(t,e,r){if(d(e,r))return e;for(var n=t[t.length-1],i=n,a=t.length-2;a>=0;a--){var o=t[a];if(e>f(n,o))return c(n,i);if(e>o||a===t.length-1)return c(o,n);i=n,n=o}}function d(t,e){for(var r=0;r<e.length;r++)if(t>=e[r][0]&&t<=e[r][1])return!0;return!1}function g(t){t.attr(\\\"x\\\",-n.bar.captureWidth/2).attr(\\\"width\\\",n.bar.captureWidth)}function v(t){t.attr(\\\"visibility\\\",\\\"visible\\\").style(\\\"visibility\\\",\\\"visible\\\").attr(\\\"fill\\\",\\\"yellow\\\").attr(\\\"opacity\\\",0)}function m(t){if(!t.brush.filterSpecified)return\\\"0,\\\"+t.height;for(var e,r,n,i=y(t.brush.filter.getConsolidated(),t.height),a=[0],o=i.length?i[0][0]:null,s=0;s<i.length;s++)r=(e=i[s])[1]-e[0],a.push(o),a.push(r),(n=s+1)<i.length&&(o=i[n][0]-e[1]);return a.push(t.height),a}function y(t,e){return t.map(function(t){return t.map(function(t){return t*e}).sort(s)})}function x(){i.select(document.body).style(\\\"cursor\\\",null)}function b(t){t.attr(\\\"stroke-dasharray\\\",m)}function _(t,e){var r=i.select(t).selectAll(\\\".highlight, .highlight-shadow\\\");b(e?r.transition().duration(n.bar.snapDuration).each(\\\"end\\\",e):r)}function w(t,e){var r,i=t.brush,a=NaN,o={};if(i.filterSpecified){var s=t.height,l=i.filter.getConsolidated(),c=y(l,s),u=NaN,f=NaN,h=NaN;for(r=0;r<=c.length;r++){var p=c[r];if(p&&p[0]<=e&&e<=p[1]){u=r;break}if(f=r?r-1:NaN,p&&p[0]>e){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]<c[h][0]-e?f:h),!isNaN(a)){var d=c[a],g=function(t,e){var r=n.bar.handleHeight;if(!(e>t[1]+r||e<t[0]-r))return e>=.9*t[1]+.1*t[0]?\\\"n\\\":e<=.9*t[0]+.1*t[1]?\\\"s\\\":\\\"ns\\\"}(d,e);g&&(o.interval=l[a],o.intervalPix=d,o.region=g)}}if(t.ordinal&&!o.region){var v=t.unitTickvals,m=t.unitToPaddedPx.invert(e);for(r=0;r<v.length;r++){var x=[.25*v[Math.max(r-1,0)]+.75*v[r],.25*v[Math.min(r+1,v.length-1)]+.75*v[r]];if(m>=x[0]&&m<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function k(t){t.on(\\\"mousemove\\\",function(t){if(i.event.preventDefault(),!t.parent.inBrushDrag){var e=w(t,t.height-i.mouse(this)[1]-2*n.verticalPadding),r=\\\"crosshair\\\";e.clickableOrdinalRange?r=\\\"pointer\\\":e.region&&(r=e.region+\\\"-resize\\\"),i.select(document.body).style(\\\"cursor\\\",r)}}).on(\\\"mouseleave\\\",function(t){t.parent.inBrushDrag||x()}).call(i.behavior.drag().on(\\\"dragstart\\\",function(t){i.event.sourceEvent.stopPropagation();var e=t.height-i.mouse(this)[1]-2*n.verticalPadding,r=t.unitToPaddedPx.invert(e),a=t.brush,o=w(t,e),s=o.interval,l=a.svgBrush;if(l.wasDragged=!1,l.grabbingBar=\\\"ns\\\"===o.region,l.grabbingBar){var c=s.map(t.unitToPaddedPx);l.grabPoint=e-c[0]-n.verticalPadding,l.barLength=c[1]-c[0]}l.clickableOrdinalRange=o.clickableOrdinalRange,l.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],s&&(l.stayingIntervals=l.stayingIntervals.filter(function(t){return t[0]!==s[0]&&t[1]!==s[1]})),l.startExtent=o.region?s[\\\"s\\\"===o.region?1:0]:r,t.parent.inBrushDrag=!0,l.brushStartCallback()}).on(\\\"drag\\\",function(t){i.event.sourceEvent.stopPropagation();var e=t.height-i.mouse(this)[1]-2*n.verticalPadding,r=t.brush.svgBrush;r.wasDragged=!0,r.grabbingBar?r.newExtent=[e-r.grabPoint,e+r.barLength-r.grabPoint].map(t.unitToPaddedPx.invert):r.newExtent=[r.startExtent,t.unitToPaddedPx.invert(e)].sort(s);var a=Math.max(0,-r.newExtent[0]),o=Math.max(0,r.newExtent[1]-1);r.newExtent[0]+=a,r.newExtent[1]-=o,r.grabbingBar&&(r.newExtent[1]+=a,r.newExtent[0]-=o),t.brush.filterSpecified=!0,r.extent=r.stayingIntervals.concat([r.newExtent]),r.brushCallback(t),_(this.parentNode)}).on(\\\"dragend\\\",function(t){i.event.sourceEvent.stopPropagation();var e=t.brush,r=e.filter,n=e.svgBrush,a=n.grabbingBar;if(n.grabbingBar=!1,n.grabLocation=void 0,t.parent.inBrushDrag=!1,x(),!n.wasDragged)return n.wasDragged=void 0,n.clickableOrdinalRange?e.filterSpecified&&t.multiselect?n.extent.push(n.clickableOrdinalRange):(n.extent=[n.clickableOrdinalRange],e.filterSpecified=!0):a?(n.extent=n.stayingIntervals,0===n.extent.length&&A(e)):A(e),n.brushCallback(t),_(this.parentNode),void n.brushEndCallback(e.filterSpecified?r.getConsolidated():[]);var o=function(){r.set(r.getConsolidated())};if(t.ordinal){var s=t.unitTickvals;s[s.length-1]<s[0]&&s.reverse(),n.newExtent=[h(s,n.newExtent[0],n.stayingIntervals),p(s,n.newExtent[1],n.stayingIntervals)];var l=n.newExtent[1]>n.newExtent[0];n.extent=n.stayingIntervals.concat(l?[n.newExtent]:[]),n.extent.length||A(e),n.brushCallback(t),l?_(this.parentNode,o):(o(),_(this.parentNode))}else o();n.brushEndCallback(e.filterSpecified?r.getConsolidated():[])}))}function M(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[0,1]]}function T(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){r=n.map(function(t){return t.slice().sort(s)}).sort(M),t=T(r),e=r.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map(function(t){return t.slice()})}(e).slice();e.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t){var e=t.selectAll(\\\".\\\"+n.cn.axisBrush).data(o,a);e.enter().append(\\\"g\\\").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(\\\".background\\\").data(o);e.enter().append(\\\"rect\\\").classed(\\\"background\\\",!0).call(g).call(v).style(\\\"pointer-events\\\",\\\"auto\\\").attr(\\\"transform\\\",\\\"translate(0 \\\"+n.verticalPadding+\\\")\\\"),e.call(k).attr(\\\"height\\\",function(t){return t.height-n.verticalPadding});var r=t.selectAll(\\\".highlight-shadow\\\").data(o);r.enter().append(\\\"line\\\").classed(\\\"highlight-shadow\\\",!0).attr(\\\"x\\\",-n.bar.width/2).attr(\\\"stroke-width\\\",n.bar.width+n.bar.strokeWidth).attr(\\\"stroke\\\",n.bar.strokeColor).attr(\\\"opacity\\\",n.bar.strokeOpacity).attr(\\\"stroke-linecap\\\",\\\"butt\\\"),r.attr(\\\"y1\\\",function(t){return t.height}).call(b);var i=t.selectAll(\\\".highlight\\\").data(o);i.enter().append(\\\"line\\\").classed(\\\"highlight\\\",!0).attr(\\\"x\\\",-n.bar.width/2).attr(\\\"stroke-width\\\",n.bar.width-n.bar.strokeWidth).attr(\\\"stroke\\\",n.bar.fillColor).attr(\\\"opacity\\\",n.bar.fillOpacity).attr(\\\"stroke-linecap\\\",\\\"butt\\\"),i.attr(\\\"y1\\\",function(t){return t.height}).call(b)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map(function(t){return t.sort(s)}),t=e.multiselect?T(t.sort(M)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map(function(t){var e=[h(r,t[0],[]),p(r,t[1],[])];if(e[1]>e[0])return e}).filter(function(t){return t})).length)return}return t.length>1?t:t[0]}}},{\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"./constants\\\":1012,d3:148}],1010:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../plots/get_data\\\").getModuleCalcData,a=t(\\\"./plot\\\"),o=t(\\\"../../constants/xmlns_namespaces\\\");r.name=\\\"parcoords\\\",r.plot=function(t){var e=i(t.calcdata,\\\"parcoords\\\")[0];e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"parcoords\\\"),a=e._has&&e._has(\\\"parcoords\\\");i&&!a&&(n._paperdiv.selectAll(\\\".parcoords\\\").remove(),n._glimages.selectAll(\\\"*\\\").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(\\\".svg-container\\\");r.filter(function(t,e){return e===r.size()-1}).selectAll(\\\".gl-canvas-context, .gl-canvas-focus\\\").each(function(){var t=this.toDataURL(\\\"image/png\\\");e.append(\\\"svg:image\\\").attr({xmlns:o.svg,\\\"xlink:href\\\":t,preserveAspectRatio:\\\"none\\\",x:0,y:0,width:this.width,height:this.height})}),window.setTimeout(function(){n.selectAll(\\\"#filterBarPattern\\\").attr(\\\"id\\\",\\\"filterBarPattern\\\")},60)}},{\\\"../../constants/xmlns_namespaces\\\":674,\\\"../../plots/get_data\\\":782,\\\"./plot\\\":1018,d3:148}],1011:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/has_colorscale\\\"),i=t(\\\"../../components/colorscale/calc\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"../../lib/gup\\\").wrap;e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArrayOrTypedArray(e.line.color),s=r?e.line.color:function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=.5;return e}(e._length),l=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,\\\"line\\\")&&i(e,s,\\\"line\\\",\\\"c\\\"),o({lineColor:s,cscale:l})}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693}],1012:[function(t,e,r){\\\"use strict\\\";e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:[\\\"contextLineLayer\\\",\\\"focusLineLayer\\\",\\\"pickLineLayer\\\"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:\\\"magenta\\\",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeColor:\\\"white\\\",strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:\\\"axis-extent-text\\\",parcoordsLineLayers:\\\"parcoords-line-layers\\\",parcoordsLineLayer:\\\"parcoords-lines\\\",parcoords:\\\"parcoords\\\",parcoordsControlView:\\\"parcoords-control-view\\\",yAxis:\\\"y-axis\\\",axisOverlays:\\\"axis-overlays\\\",axis:\\\"axis\\\",axisHeading:\\\"axis-heading\\\",axisTitle:\\\"axis-title\\\",axisExtent:\\\"axis-extent\\\",axisExtentTop:\\\"axis-extent-top\\\",axisExtentTopText:\\\"axis-extent-top-text\\\",axisExtentBottom:\\\"axis-extent-bottom\\\",axisExtentBottomText:\\\"axis-extent-bottom-text\\\",axisBrush:\\\"axis-brush\\\"},id:{filterBarPattern:\\\"filter-bar-pattern\\\"}}},{}],1013:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"../../plots/domain\\\").defaults,s=t(\\\"../../plots/array_container_defaults\\\"),l=t(\\\"./attributes\\\"),c=t(\\\"./axisbrush\\\"),u=t(\\\"./constants\\\").maxDimensionCount,f=t(\\\"./merge_length\\\");function h(t,e){function r(r,i){return n.coerce(t,e,l.dimensions,r,i)}var i=r(\\\"values\\\"),a=r(\\\"visible\\\");if(i&&i.length||(a=e.visible=!1),a){r(\\\"label\\\"),r(\\\"tickvals\\\"),r(\\\"ticktext\\\"),r(\\\"tickformat\\\"),r(\\\"range\\\"),r(\\\"multiselect\\\");var o=r(\\\"constraintrange\\\");o&&(e.constraintrange=c.cleanRanges(o,e))}}e.exports=function(t,e,r,c){function p(r,i){return n.coerce(t,e,l,r,i)}var d=t.dimensions;Array.isArray(d)&&d.length>u&&(n.log(\\\"parcoords traces support up to \\\"+u+\\\" dimensions at the moment\\\"),d.splice(u));var g=s(t,e,{name:\\\"dimensions\\\",handleItemDefaults:h}),v=function(t,e,r,o,s){var l=s(\\\"line.color\\\",r);if(i(t,\\\"line\\\")&&n.isArrayOrTypedArray(l)){if(l.length)return s(\\\"line.colorscale\\\"),a(t,e,o,s,{prefix:\\\"line.\\\",cLetter:\\\"c\\\"}),l.length;e.line.color=r}return 1/0}(t,e,r,c,p);o(e,c,p),Array.isArray(g)&&g.length||(e.visible=!1),f(e,g,\\\"values\\\",v);var m={family:c.font.family,size:Math.round(c.font.size/1.2),color:c.font.color};n.coerceFont(p,\\\"labelfont\\\",m),n.coerceFont(p,\\\"tickfont\\\",m),n.coerceFont(p,\\\"rangefont\\\",m)}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../../plots/domain\\\":771,\\\"./attributes\\\":1008,\\\"./axisbrush\\\":1009,\\\"./constants\\\":1012,\\\"./merge_length\\\":1016}],1014:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.colorbar={container:\\\"line\\\",min:\\\"cmin\\\",max:\\\"cmax\\\"},n.moduleType=\\\"trace\\\",n.name=\\\"parcoords\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"gl\\\",\\\"regl\\\",\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1008,\\\"./base_plot\\\":1010,\\\"./calc\\\":1011,\\\"./defaults\\\":1013,\\\"./plot\\\":1018}],1015:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"glslify\\\"),i=n([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 p0, p1, p2, p3,\\\\n               p4, p5, p6, p7,\\\\n               p8, p9, pa, pb,\\\\n               pc, pd, pe;\\\\n\\\\nattribute vec4 pf;\\\\n\\\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\\\n             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\\\n\\\\nuniform vec2 resolution,\\\\n             viewBoxPosition,\\\\n             viewBoxSize;\\\\n\\\\nuniform sampler2D palette;\\\\nuniform sampler2D mask;\\\\nuniform float maskHeight;\\\\n\\\\nuniform vec2 colorClamp;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvec4 unit_1 = vec4(1, 1, 1, 1);\\\\n\\\\nfloat val(mat4 p, mat4 v) {\\\\n    return dot(matrixCompMult(p, v) * unit_1, unit_1);\\\\n}\\\\n\\\\nfloat axisY(\\\\n        float x,\\\\n        mat4 d[4],\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\\\n    ) {\\\\n\\\\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\\\\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\\\\n    return y1 * (1.0 - x) + y2 * x;\\\\n}\\\\n\\\\nconst int bitsPerByte = 8;\\\\n\\\\nint mod2(int a) {\\\\n    return a - 2 * (a / 2);\\\\n}\\\\n\\\\nint mod8(int a) {\\\\n    return a - 8 * (a / 8);\\\\n}\\\\n\\\\nvec4 zero = vec4(0, 0, 0, 0);\\\\nvec4 unit_0 = vec4(1, 1, 1, 1);\\\\nvec2 xyProjection = vec2(1, 1);\\\\n\\\\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\\\\n    return mat4(clamp(m[0], lo[0], hi[0]),\\\\n                clamp(m[1], lo[1], hi[1]),\\\\n                clamp(m[2], lo[2], hi[2]),\\\\n                clamp(m[3], lo[3], hi[3]));\\\\n}\\\\n\\\\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\\\\n    return mclamp(p, lo, hi) == p;\\\\n}\\\\n\\\\nbool withinBoundingBox(\\\\n        mat4 d[4],\\\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD\\\\n    ) {\\\\n\\\\n    return mshow(d[0], loA, hiA) &&\\\\n           mshow(d[1], loB, hiB) &&\\\\n           mshow(d[2], loC, hiC) &&\\\\n           mshow(d[3], loD, hiD);\\\\n}\\\\n\\\\nbool withinRasterMask(mat4 d[4], sampler2D mask, float height) {\\\\n    bool result = true;\\\\n    int bitInByteStepper;\\\\n    float valY, valueY, scaleX;\\\\n    int hit, bitmask, valX;\\\\n    for(int i = 0; i < 4; i++) {\\\\n        for(int j = 0; j < 4; j++) {\\\\n            for(int k = 0; k < 4; k++) {\\\\n                bitInByteStepper = mod8(j * 4 + k);\\\\n                valX = i * 2 + j / 2;\\\\n                valY = d[i][j][k];\\\\n                valueY = valY * (height - 1.0) + 0.5;\\\\n                scaleX = (float(valX) + 0.5) / 8.0;\\\\n                hit = int(texture2D(mask, vec2(scaleX, (valueY + 0.5) / height))[3] * 255.0) / int(pow(2.0, float(bitInByteStepper)));\\\\n                result = result && mod2(hit) == 1;\\\\n            }\\\\n        }\\\\n    }\\\\n    return result;\\\\n}\\\\n\\\\nvec4 position(\\\\n        float depth,\\\\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\\\\n        mat4 dims[4],\\\\n        float signum,\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D,\\\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD,\\\\n        sampler2D mask, float maskHeight\\\\n    ) {\\\\n\\\\n    float x = 0.5 * signum + 0.5;\\\\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\\\\n\\\\n    float show = float(\\\\n                            withinBoundingBox(dims, loA, hiA, loB, hiB, loC, hiC, loD, hiD)\\\\n                         && withinRasterMask(dims, mask, maskHeight)\\\\n                      );\\\\n\\\\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\\\\n    float depthOrHide = depth + 2.0 * (1.0 - show);\\\\n\\\\n    return vec4(\\\\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\\\n        depthOrHide,\\\\n        1.0\\\\n    );\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\n    float prominence = abs(pf[3]);\\\\n\\\\n    mat4 p[4];\\\\n    p[0] = mat4(p0, p1, p2, p3);\\\\n    p[1] = mat4(p4, p5, p6, p7);\\\\n    p[2] = mat4(p8, p9, pa, pb);\\\\n    p[3] = mat4(pc, pd, pe, abs(pf));\\\\n\\\\n    gl_Position = position(\\\\n        1.0 - prominence,\\\\n        resolution, viewBoxPosition, viewBoxSize,\\\\n        p,\\\\n        sign(pf[3]),\\\\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\\\n        loA, hiA, loB, hiB, loC, hiC, loD, hiD,\\\\n        mask, maskHeight\\\\n    );\\\\n\\\\n    float clampedColorIndex = clamp((prominence - colorClamp[0]) / (colorClamp[1] - colorClamp[0]), 0.0, 1.0);\\\\n    fragColor = texture2D(palette, vec2((clampedColorIndex * 255.0 + 0.5) / 256.0, 0.5));\\\\n}\\\\n\\\"]),a=n([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 p0, p1, p2, p3,\\\\n               p4, p5, p6, p7,\\\\n               p8, p9, pa, pb,\\\\n               pc, pd, pe;\\\\n\\\\nattribute vec4 pf;\\\\n\\\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D;\\\\n\\\\nuniform vec2 resolution,\\\\n             viewBoxPosition,\\\\n             viewBoxSize;\\\\n\\\\nuniform sampler2D palette;\\\\n\\\\nuniform vec2 colorClamp;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvec2 xyProjection = vec2(1, 1);\\\\n\\\\nvec4 unit = vec4(1, 1, 1, 1);\\\\n\\\\nfloat val(mat4 p, mat4 v) {\\\\n    return dot(matrixCompMult(p, v) * unit, unit);\\\\n}\\\\n\\\\nfloat axisY(\\\\n        float x,\\\\n        mat4 d[4],\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\\\n    ) {\\\\n\\\\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\\\\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\\\\n    return y1 * (1.0 - x) + y2 * x;\\\\n}\\\\n\\\\nvec4 position(\\\\n        float depth,\\\\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\\\\n        mat4 dims[4],\\\\n        float signum,\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\\\n    ) {\\\\n\\\\n    float x = 0.5 * signum + 0.5;\\\\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\\\\n\\\\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\\\\n\\\\n    return vec4(\\\\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\\\n        depth,\\\\n        1.0\\\\n    );\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\n    float prominence = abs(pf[3]);\\\\n\\\\n    mat4 p[4];\\\\n    p[0] = mat4(p0, p1, p2, p3);\\\\n    p[1] = mat4(p4, p5, p6, p7);\\\\n    p[2] = mat4(p8, p9, pa, pb);\\\\n    p[3] = mat4(pc, pd, pe, abs(pf));\\\\n\\\\n    gl_Position = position(\\\\n        1.0 - prominence,\\\\n        resolution, viewBoxPosition, viewBoxSize,\\\\n        p,\\\\n        sign(pf[3]),\\\\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D\\\\n    );\\\\n\\\\n    float clampedColorIndex = clamp((prominence - colorClamp[0]) / (colorClamp[1] - colorClamp[0]), 0.0, 1.0);\\\\n    fragColor = texture2D(palette, vec2((clampedColorIndex * 255.0 + 0.5) / 256.0, 0.5));\\\\n}\\\\n\\\"]),o=n([\\\"precision highp float;\\\\n#define GLSLIFY 1\\\\n\\\\nattribute vec4 p0, p1, p2, p3,\\\\n               p4, p5, p6, p7,\\\\n               p8, p9, pa, pb,\\\\n               pc, pd, pe;\\\\n\\\\nattribute vec4 pf;\\\\n\\\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\\\n             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\\\n\\\\nuniform vec2 resolution,\\\\n             viewBoxPosition,\\\\n             viewBoxSize;\\\\n\\\\nuniform sampler2D mask;\\\\nuniform float maskHeight;\\\\n\\\\nuniform vec2 colorClamp;\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvec4 unit_1 = vec4(1, 1, 1, 1);\\\\n\\\\nfloat val(mat4 p, mat4 v) {\\\\n    return dot(matrixCompMult(p, v) * unit_1, unit_1);\\\\n}\\\\n\\\\nfloat axisY(\\\\n        float x,\\\\n        mat4 d[4],\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D\\\\n    ) {\\\\n\\\\n    float y1 = val(d[0], dim1A) + val(d[1], dim1B) + val(d[2], dim1C) + val(d[3], dim1D);\\\\n    float y2 = val(d[0], dim2A) + val(d[1], dim2B) + val(d[2], dim2C) + val(d[3], dim2D);\\\\n    return y1 * (1.0 - x) + y2 * x;\\\\n}\\\\n\\\\nconst int bitsPerByte = 8;\\\\n\\\\nint mod2(int a) {\\\\n    return a - 2 * (a / 2);\\\\n}\\\\n\\\\nint mod8(int a) {\\\\n    return a - 8 * (a / 8);\\\\n}\\\\n\\\\nvec4 zero = vec4(0, 0, 0, 0);\\\\nvec4 unit_0 = vec4(1, 1, 1, 1);\\\\nvec2 xyProjection = vec2(1, 1);\\\\n\\\\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\\\\n    return mat4(clamp(m[0], lo[0], hi[0]),\\\\n                clamp(m[1], lo[1], hi[1]),\\\\n                clamp(m[2], lo[2], hi[2]),\\\\n                clamp(m[3], lo[3], hi[3]));\\\\n}\\\\n\\\\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\\\\n    return mclamp(p, lo, hi) == p;\\\\n}\\\\n\\\\nbool withinBoundingBox(\\\\n        mat4 d[4],\\\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD\\\\n    ) {\\\\n\\\\n    return mshow(d[0], loA, hiA) &&\\\\n           mshow(d[1], loB, hiB) &&\\\\n           mshow(d[2], loC, hiC) &&\\\\n           mshow(d[3], loD, hiD);\\\\n}\\\\n\\\\nbool withinRasterMask(mat4 d[4], sampler2D mask, float height) {\\\\n    bool result = true;\\\\n    int bitInByteStepper;\\\\n    float valY, valueY, scaleX;\\\\n    int hit, bitmask, valX;\\\\n    for(int i = 0; i < 4; i++) {\\\\n        for(int j = 0; j < 4; j++) {\\\\n            for(int k = 0; k < 4; k++) {\\\\n                bitInByteStepper = mod8(j * 4 + k);\\\\n                valX = i * 2 + j / 2;\\\\n                valY = d[i][j][k];\\\\n                valueY = valY * (height - 1.0) + 0.5;\\\\n                scaleX = (float(valX) + 0.5) / 8.0;\\\\n                hit = int(texture2D(mask, vec2(scaleX, (valueY + 0.5) / height))[3] * 255.0) / int(pow(2.0, float(bitInByteStepper)));\\\\n                result = result && mod2(hit) == 1;\\\\n            }\\\\n        }\\\\n    }\\\\n    return result;\\\\n}\\\\n\\\\nvec4 position(\\\\n        float depth,\\\\n        vec2 resolution, vec2 viewBoxPosition, vec2 viewBoxSize,\\\\n        mat4 dims[4],\\\\n        float signum,\\\\n        mat4 dim1A, mat4 dim2A, mat4 dim1B, mat4 dim2B, mat4 dim1C, mat4 dim2C, mat4 dim1D, mat4 dim2D,\\\\n        mat4 loA, mat4 hiA, mat4 loB, mat4 hiB, mat4 loC, mat4 hiC, mat4 loD, mat4 hiD,\\\\n        sampler2D mask, float maskHeight\\\\n    ) {\\\\n\\\\n    float x = 0.5 * signum + 0.5;\\\\n    float y = axisY(x, dims, dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D);\\\\n\\\\n    float show = float(\\\\n                            withinBoundingBox(dims, loA, hiA, loB, hiB, loC, hiC, loD, hiD)\\\\n                         && withinRasterMask(dims, mask, maskHeight)\\\\n                      );\\\\n\\\\n    vec2 viewBoxXY = viewBoxPosition + viewBoxSize * vec2(x, y);\\\\n    float depthOrHide = depth + 2.0 * (1.0 - show);\\\\n\\\\n    return vec4(\\\\n        xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\\\n        depthOrHide,\\\\n        1.0\\\\n    );\\\\n}\\\\n\\\\nvoid main() {\\\\n\\\\n    float prominence = abs(pf[3]);\\\\n\\\\n    mat4 p[4];\\\\n    p[0] = mat4(p0, p1, p2, p3);\\\\n    p[1] = mat4(p4, p5, p6, p7);\\\\n    p[2] = mat4(p8, p9, pa, pb);\\\\n    p[3] = mat4(pc, pd, pe, abs(pf));\\\\n\\\\n    gl_Position = position(\\\\n        1.0 - prominence,\\\\n        resolution, viewBoxPosition, viewBoxSize,\\\\n        p,\\\\n        sign(pf[3]),\\\\n        dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\\\n        loA, hiA, loB, hiB, loC, hiC, loD, hiD,\\\\n        mask, maskHeight\\\\n    );\\\\n\\\\n    fragColor = vec4(pf.rgb, 1.0);\\\\n}\\\\n\\\"]),s=n([\\\"precision lowp float;\\\\n#define GLSLIFY 1\\\\n\\\\nvarying vec4 fragColor;\\\\n\\\\nvoid main() {\\\\n    gl_FragColor = fragColor;\\\\n}\\\\n\\\"]),l=t(\\\"../../lib\\\"),c=1e-6,u=1e-7,f=2048,h=64,p=2,d=4,g=8,v=h/g,m=[119,119,119],y=new Uint8Array(4),x=new Uint8Array(4),b={shape:[256,1],format:\\\"rgba\\\",type:\\\"uint8\\\",mag:\\\"nearest\\\",min:\\\"nearest\\\"};function _(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function w(t,e,r,n,i,a){var o=a.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:y})}(t),r.drawCompleted=!0),function s(l){var c;c=Math.min(n,i-l*n),a.offset=p*l*n,a.count=p*c,0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],_(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(e(a),l*n+c<i&&(r.currentRafs[o]=window.requestAnimationFrame(function(){s(l+1)})),r.drawCompleted=!1)}(0)}function k(t,e){return(t>>>8*e)%256/255}function M(t,e,r){var n,i,a,o=[];for(i=0;i<t;i++)for(a=0;a<p;a++)for(n=0;n<d;n++)o.push(e[i*h+r*d+n]),r*d+n===h-1&&a%2==0&&(o[o.length-1]*=-1);return o}e.exports=function(t,e){var r,n,p,d,y,A=e.context,T=e.pick,S=e.regl,C={currentRafs:{},drawCompleted:!0,clearOnly:!1},E=function(t){for(var e={},r=0;r<16;r++)e[\\\"p\\\"+r.toString(16)]=t.buffer({usage:\\\"dynamic\\\",type:\\\"float\\\",data:new Uint8Array(0)});return e}(S),L=S.texture(b);O(e);var z=S({profile:!1,blend:{enable:A,func:{srcRGB:\\\"src alpha\\\",dstRGB:\\\"one minus src alpha\\\",srcAlpha:1,dstAlpha:1},equation:{rgb:\\\"add\\\",alpha:\\\"add\\\"},color:[0,0,0,0]},depth:{enable:!A,mask:!0,func:\\\"less\\\",range:[0,1]},cull:{enable:!0,face:\\\"back\\\"},scissor:{enable:!0,box:{x:S.prop(\\\"scissorX\\\"),y:S.prop(\\\"scissorY\\\"),width:S.prop(\\\"scissorWidth\\\"),height:S.prop(\\\"scissorHeight\\\")}},viewport:{x:S.prop(\\\"viewportX\\\"),y:S.prop(\\\"viewportY\\\"),width:S.prop(\\\"viewportWidth\\\"),height:S.prop(\\\"viewportHeight\\\")},dither:!1,vert:T?o:A?a:i,frag:s,primitive:\\\"lines\\\",lineWidth:1,attributes:E,uniforms:{resolution:S.prop(\\\"resolution\\\"),viewBoxPosition:S.prop(\\\"viewBoxPosition\\\"),viewBoxSize:S.prop(\\\"viewBoxSize\\\"),dim1A:S.prop(\\\"dim1A\\\"),dim2A:S.prop(\\\"dim2A\\\"),dim1B:S.prop(\\\"dim1B\\\"),dim2B:S.prop(\\\"dim2B\\\"),dim1C:S.prop(\\\"dim1C\\\"),dim2C:S.prop(\\\"dim2C\\\"),dim1D:S.prop(\\\"dim1D\\\"),dim2D:S.prop(\\\"dim2D\\\"),loA:S.prop(\\\"loA\\\"),hiA:S.prop(\\\"hiA\\\"),loB:S.prop(\\\"loB\\\"),hiB:S.prop(\\\"hiB\\\"),loC:S.prop(\\\"loC\\\"),hiC:S.prop(\\\"hiC\\\"),loD:S.prop(\\\"loD\\\"),hiD:S.prop(\\\"hiD\\\"),palette:L,mask:S.prop(\\\"maskTexture\\\"),maskHeight:S.prop(\\\"maskHeight\\\"),colorClamp:S.prop(\\\"colorClamp\\\")},offset:S.prop(\\\"offset\\\"),count:S.prop(\\\"count\\\")});function O(t){r=t.model,n=t.viewModel,p=n.dimensions.slice(),d=p[0]?p[0].values.length:0;var e=r.lines,i=T?e.color.map(function(t,r){return r/e.color.length}):e.color,a=Math.max(1/255,Math.pow(1/i.length,1/3)),o=function(t,e,r){for(var n,i=e.length,a=[],o=0;o<t;o++)for(var s=0;s<h;s++)a.push(s<i?e[s].paddedUnitValues[o]:s===h-1?(n=r[o],Math.max(c,Math.min(1-c,n))):s>=h-4?k(o,h-2-s):.5);return a}(d,p,i);!function(t,e,r){for(var n=0;n<16;n++)t[\\\"p\\\"+n.toString(16)](M(e,r,n))}(E,d,o),L=S.texture(l.extendFlat({data:function(t,e,r){for(var n=[],i=0;i<256;i++){var a=t(i/255);n.push((e?m:a).concat(r))}return n}(r.unitToColor,A,Math.round(255*(A?a:1)))},b))}var I=[0,1];var P=[];function D(t,e,n,i,a,o,s,c,u,f,h){var p,d,g,v,m=[t,e],y=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})});for(p=0;p<2;p++)for(v=m[p],d=0;d<4;d++)for(g=0;g<16;g++)y[p][d][g]=g+16*d===v?1:0;var x=r.lines.canvasOverdrag,b=r.domain,_=r.canvasWidth,w=r.canvasHeight;return l.extendFlat({key:s,resolution:[_,w],viewBoxPosition:[n+x,i],viewBoxSize:[a,o],i:t,ii:e,dim1A:y[0][0],dim1B:y[0][1],dim1C:y[0][2],dim1D:y[0][3],dim2A:y[1][0],dim2B:y[1][1],dim2C:y[1][2],dim2D:y[1][3],colorClamp:I,scissorX:(c===u?0:n+x)+(r.pad.l-x)+r.layoutWidth*b.x[0],scissorWidth:(c===f?_-n+x:a+.5)+(c===u?n+x:0),scissorY:i+r.pad.b+r.layoutHeight*b.y[0],scissorHeight:o,viewportX:r.pad.l-x+r.layoutWidth*b.x[0],viewportY:r.pad.b+r.layoutHeight*b.y[0],viewportWidth:_,viewportHeight:w},h)}return{setColorDomain:function(t){I[0]=t[0],I[1]=t[1]},render:function(t,e,n){var i,a,o,s=t.length,l=1/0,c=-1/0;for(i=0;i<s;i++)t[i].dim2.canvasX>c&&(c=t[i].dim2.canvasX,o=i),t[i].dim1.canvasX<l&&(l=t[i].dim1.canvasX,a=i);0===s&&_(S,0,0,r.canvasWidth,r.canvasHeight);var h=A?{}:function(){var t,e,r,n=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})});for(t=0;t<2;t++)for(e=0;e<4;e++)for(r=0;r<16;r++){var i,a=r+16*e;i=a<p.length?p[a].brush.filter.getBounds()[t]:t,n[t][e][r]=i+(2*t-1)*u}function o(t,e){var r=f-1;return[Math.max(0,Math.floor(e[0]*r)),Math.min(r,Math.ceil(e[1]*r))]}for(var s=Array.apply(null,new Array(f*v)).map(function(){return 255}),l=0;l<p.length;l++){var c=l%g,h=(l-c)/g,d=Math.pow(2,c),m=p[l],x=m.brush.filter.get();if(!(x.length<2))for(var b=o(0,x[0])[1],_=1;_<x.length;_++){for(var w=o(0,x[_]),k=b+1;k<w[0];k++)s[k*v+h]&=~d;b=Math.max(b,w[1])}}var M={shape:[v,f],format:\\\"alpha\\\",type:\\\"uint8\\\",mag:\\\"nearest\\\",min:\\\"nearest\\\",data:s};return y?y(M):y=S.texture(M),{maskTexture:y,maskHeight:f,loA:n[0][0],loB:n[0][1],loC:n[0][2],loD:n[0][3],hiA:n[1][0],hiB:n[1][1],hiC:n[1][2],hiD:n[1][3]}}();for(i=0;i<s;i++){var m=t[i],x=m.dim1,b=x.crossfilterDimensionIndex,k=m.canvasX,M=m.canvasY,T=m.dim2.crossfilterDimensionIndex,E=m.panelSizeX,L=m.panelSizeY,O=k+E;if(e||!P[b]||P[b][0]!==k||P[b][1]!==O){P[b]=[k,O];var I=D(b,T,k,M,E,L,x.crossfilterDimensionIndex,i,a,o,h);C.clearOnly=n,w(S,z,C,e?r.lines.blockLineCount:d,d,I)}}},readPixel:function(t,e){return S.read({x:t,y:e,width:1,height:1,data:x}),x},readPixels:function(t,e,r,n){var i=new Uint8Array(4*r*n);return S.read({x:t,y:e,width:r,height:n,data:i}),i},destroy:function(){for(var e in t.style[\\\"pointer-events\\\"]=\\\"none\\\",L.destroy(),y&&y.destroy(),E)E[e].destroy()},update:O}}},{\\\"../../lib\\\":696,glslify:392}],1016:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n){var i,a;for(n||(n=1/0),i=0;i<e.length;i++)(a=e[i]).visible&&(n=Math.min(n,a[r].length));for(n===1/0&&(n=0),t._length=n,i=0;i<e.length;i++)(a=e[i]).visible&&(a._length=n);return n}},{}],1017:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./lines\\\"),i=t(\\\"./constants\\\"),a=t(\\\"../../lib\\\"),o=t(\\\"d3\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"../../lib/gup\\\"),c=l.keyFun,u=l.repeat,f=l.unwrap,h=t(\\\"./axisbrush\\\");function p(t){return!(\\\"visible\\\"in t)||t.visible}function d(t){var e=t.range?t.range[0]:a.aggNums(Math.min,null,t.values,t._length),r=t.range?t.range[1]:a.aggNums(Math.max,null,t.values,t._length);return!isNaN(e)&&isFinite(e)||(e=0),!isNaN(r)&&isFinite(r)||(r=0),e===r&&(0===e?(e-=1,r+=1):(e*=.9,r*=1.1)),[e,r]}function g(t){return t.dimensions.some(function(t){return t.brush.filterSpecified})}function v(t,e,r){var n=f(e),s=n.trace,l=n.lineColor,c=n.cscale,u=s.line,h=s.domain,g=s.dimensions,v=t.width,m=s.labelfont,y=s.tickfont,x=s.rangefont,b=a.extendDeepNoArrays({},u,{color:l.map(o.scale.linear().domain(d({values:l,range:[u.cmin,u.cmax],_length:s._length}))),blockLineCount:i.blockLineCount,canvasOverdrag:i.overdrag*i.canvasPixelRatio}),_=Math.floor(v*(h.x[1]-h.x[0])),w=Math.floor(t.height*(h.y[1]-h.y[0])),k=t.margin||{l:80,r:80,t:100,b:80},M=_,A=w;return{key:r,colCount:g.filter(p).length,dimensions:g,tickDistance:i.tickDistance,unitToColor:function(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return o.rgb(t[1])}),n=\\\"rgb\\\".split(\\\"\\\").map(function(t){return o.scale.linear().clamp(!0).domain(e).range(r.map((n=t,function(t){return t[n]})));var n});return function(t){return n.map(function(e){return e(t)})}}(c),lines:b,labelFont:m,tickFont:y,rangeFont:x,layoutWidth:v,layoutHeight:t.height,domain:h,translateX:h.x[0]*v,translateY:t.height-h.y[1]*t.height,pad:k,canvasWidth:M*i.canvasPixelRatio+2*b.canvasOverdrag,canvasHeight:A*i.canvasPixelRatio,width:M,height:A,canvasPixelRatio:i.canvasPixelRatio}}function m(t,e,r){var n=r.width,s=r.height,l=r.dimensions,c=r.canvasPixelRatio,u=function(t){return n*t/Math.max(1,r.colCount-1)},f=i.verticalPadding/s,v=function(t,e){return o.scale.linear().range([e,t-e])}(s,i.verticalPadding),m={key:r.key,xScale:u,model:r,inBrushDrag:!1},y={};return m.dimensions=l.filter(p).map(function(n,l){var p=function(t,e){return o.scale.linear().domain(d(t)).range([e,1-e])}(n,f),x=y[n.label];y[n.label]=(x||0)+1;var b=n.label+(x?\\\"__\\\"+x:\\\"\\\"),_=n.constraintrange,w=_&&_.length;w&&!Array.isArray(_[0])&&(_=[_]);var k=w?_.map(function(t){return t.map(p)}):[[0,1]],M=n.values;M.length>n._length&&(M=M.slice(0,n._length));var A,T=n.tickvals;function S(t,e){return{val:t,text:A[e]}}function C(t,e){return t.val-e.val}if(Array.isArray(T)&&T.length){A=n.ticktext,Array.isArray(A)&&A.length?A.length>T.length?A=A.slice(0,T.length):T.length>A.length&&(T=T.slice(0,A.length)):A=T.map(o.format(n.tickformat));for(var E=1;E<T.length;E++)if(T[E]<T[E-1]){for(var L=T.map(S).sort(C),z=0;z<T.length;z++)T[z]=L[z].val,A[z]=L[z].text;break}}else T=void 0;return{key:b,label:n.label,tickFormat:n.tickformat,tickvals:T,ticktext:A,ordinal:!!T,multiselect:n.multiselect,xIndex:l,crossfilterDimensionIndex:l,visibleIndex:n._index,height:s,values:M,paddedUnitValues:M.map(p),unitTickvals:T&&T.map(p),xScale:u,x:u(l),canvasX:u(l)*c,unitToPaddedPx:v,domainScale:function(t,e,r,n,i){var a,s,l=d(r);return n?o.scale.ordinal().domain(n.map((a=o.format(r.tickformat),s=i,s?function(t,e){var r=s[e];return null==r?a(t):r}:a))).range(n.map(function(r){var n=(r-l[0])/(l[1]-l[0]);return t-e+n*(2*e-t)})):o.scale.linear().domain(l).range([t-e,e])}(s,i.verticalPadding,n,T,A),ordinalScale:function(t){if(t.tickvals){var e=d(t);return o.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}}(n),parent:m,model:r,brush:h.makeBrush(t,w,k,function(){t.linePickActive(!1)},function(){var e=m;e.focusLayer&&e.focusLayer.render(e.panels,!0);var r=g(e);!t.contextShown()&&r?(e.contextLayer&&e.contextLayer.render(e.panels,!0),t.contextShown(!0)):t.contextShown()&&!r&&(e.contextLayer&&e.contextLayer.render(e.panels,!0,!0),t.contextShown(!1))},function(r){var i=m;if(i.focusLayer.render(i.panels,!0),i.pickLayer&&i.pickLayer.render(i.panels,!0),t.linePickActive(!0),e&&e.filterChanged){var o=p.invert,s=r.map(function(t){return t.map(o).sort(a.sorterAsc)}).sort(function(t,e){return t[0]-e[0]});e.filterChanged(i.key,n._index,s)}})}}),m}function y(t){t.classed(i.cn.axisExtentText,!0).attr(\\\"text-anchor\\\",\\\"middle\\\").style(\\\"cursor\\\",\\\"default\\\").style(\\\"user-select\\\",\\\"none\\\")}e.exports=function(t,e,r,l,p,d){var x,b,_=(x=!0,b=!1,{linePickActive:function(t){return arguments.length?x=!!t:x},contextShown:function(t){return arguments.length?b=!!t:b}}),w=l.filter(function(t){return f(t).trace.visible}).map(v.bind(0,p)).map(m.bind(0,_,d));r.each(function(t,e){return a.extendFlat(t,w[e])});var k=r.selectAll(\\\".gl-canvas\\\").each(function(t){t.viewModel=w[0],t.model=t.viewModel?t.viewModel.model:null}),M=null;k.filter(function(t){return t.pick}).style(\\\"pointer-events\\\",\\\"auto\\\").on(\\\"mousemove\\\",function(t){if(_.linePickActive()&&t.lineLayer&&d&&d.hover){var e=o.event,r=this.width,n=this.height,i=o.mouse(this),a=i[0],s=i[1];if(a<0||s<0||a>=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),c=0!==l[3],u=c?l[2]+256*(l[1]+256*l[0]):null,f={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:u};u!==M&&(c?d.hover(f):d.unhover&&d.unhover(f),M=u)}}),k.style(\\\"opacity\\\",function(t){return t.pick?.01:1}),e.style(\\\"background\\\",\\\"rgba(255, 255, 255, 0)\\\");var A=e.selectAll(\\\".\\\"+i.cn.parcoords).data(w,c);A.exit().remove(),A.enter().append(\\\"g\\\").classed(i.cn.parcoords,!0).style(\\\"shape-rendering\\\",\\\"crispEdges\\\").style(\\\"pointer-events\\\",\\\"none\\\"),A.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.model.translateX+\\\",\\\"+t.model.translateY+\\\")\\\"});var T=A.selectAll(\\\".\\\"+i.cn.parcoordsControlView).data(u,c);T.enter().append(\\\"g\\\").classed(i.cn.parcoordsControlView,!0),T.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.model.pad.l+\\\",\\\"+t.model.pad.t+\\\")\\\"});var S=T.selectAll(\\\".\\\"+i.cn.yAxis).data(function(t){return t.dimensions},c);function C(t,e){for(var r=e.panels||(e.panels=[]),n=t.data(),i=n.length-1,a=0;a<i;a++){var o=r[a]||(r[a]={}),s=n[a],l=n[a+1];o.dim1=s,o.dim2=l,o.canvasX=s.canvasX,o.panelSizeX=l.canvasX-s.canvasX,o.panelSizeY=e.model.canvasHeight,o.y=0,o.canvasY=0}}S.enter().append(\\\"g\\\").classed(i.cn.yAxis,!0),T.each(function(t){C(S,t)}),k.each(function(t){if(t.viewModel){!t.lineLayer||d?t.lineLayer=n(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||d;t.lineLayer.render(t.viewModel.panels,e)}}),S.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.xScale(t.xIndex)+\\\", 0)\\\"}),S.call(o.behavior.drag().origin(function(t){return t}).on(\\\"drag\\\",function(t){var e=t.parent;_.linePickActive(!1),t.x=Math.max(-i.overdrag,Math.min(t.model.width+i.overdrag,o.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,S.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),C(S,e),S.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.xScale(t.xIndex)+\\\", 0)\\\"}),o.select(this).attr(\\\"transform\\\",\\\"translate(\\\"+t.x+\\\", 0)\\\"),S.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!g(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)}).on(\\\"dragend\\\",function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,C(S,e),o.select(this).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\", 0)\\\"}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!g(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),_.linePickActive(!0),d&&d.axesMoved&&d.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),S.exit().remove();var E=S.selectAll(\\\".\\\"+i.cn.axisOverlays).data(u,c);E.enter().append(\\\"g\\\").classed(i.cn.axisOverlays,!0),E.selectAll(\\\".\\\"+i.cn.axis).remove();var L=E.selectAll(\\\".\\\"+i.cn.axis).data(u,c);L.enter().append(\\\"g\\\").classed(i.cn.axis,!0),L.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain();o.select(this).call(o.svg.axis().orient(\\\"left\\\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n:null).tickFormat(t.ordinal?function(t){return t}:null).scale(r)),s.font(L.selectAll(\\\"text\\\"),t.model.tickFont)}),L.selectAll(\\\".domain, .tick>line\\\").attr(\\\"fill\\\",\\\"none\\\").attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-opacity\\\",.25).attr(\\\"stroke-width\\\",\\\"1px\\\"),L.selectAll(\\\"text\\\").style(\\\"text-shadow\\\",\\\"1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff\\\").style(\\\"cursor\\\",\\\"default\\\").style(\\\"user-select\\\",\\\"none\\\");var z=E.selectAll(\\\".\\\"+i.cn.axisHeading).data(u,c);z.enter().append(\\\"g\\\").classed(i.cn.axisHeading,!0);var O=z.selectAll(\\\".\\\"+i.cn.axisTitle).data(u,c);O.enter().append(\\\"text\\\").classed(i.cn.axisTitle,!0).attr(\\\"text-anchor\\\",\\\"middle\\\").style(\\\"cursor\\\",\\\"ew-resize\\\").style(\\\"user-select\\\",\\\"none\\\").style(\\\"pointer-events\\\",\\\"auto\\\"),O.attr(\\\"transform\\\",\\\"translate(0,\\\"+-i.axisTitleOffset+\\\")\\\").text(function(t){return t.label}).each(function(t){s.font(o.select(this),t.model.labelFont)});var I=E.selectAll(\\\".\\\"+i.cn.axisExtent).data(u,c);I.enter().append(\\\"g\\\").classed(i.cn.axisExtent,!0);var P=I.selectAll(\\\".\\\"+i.cn.axisExtentTop).data(u,c);P.enter().append(\\\"g\\\").classed(i.cn.axisExtentTop,!0),P.attr(\\\"transform\\\",\\\"translate(0,\\\"+-i.axisExtentOffset+\\\")\\\");var D=P.selectAll(\\\".\\\"+i.cn.axisExtentTopText).data(u,c);function R(t,e){if(t.ordinal)return\\\"\\\";var r=t.domainScale.domain();return o.format(t.tickFormat)(r[e?r.length-1:0])}D.enter().append(\\\"text\\\").classed(i.cn.axisExtentTopText,!0).call(y),D.text(function(t){return R(t,!0)}).each(function(t){s.font(o.select(this),t.model.rangeFont)});var B=I.selectAll(\\\".\\\"+i.cn.axisExtentBottom).data(u,c);B.enter().append(\\\"g\\\").classed(i.cn.axisExtentBottom,!0),B.attr(\\\"transform\\\",function(t){return\\\"translate(0,\\\"+(t.model.height+i.axisExtentOffset)+\\\")\\\"});var F=B.selectAll(\\\".\\\"+i.cn.axisExtentBottomText).data(u,c);F.enter().append(\\\"text\\\").classed(i.cn.axisExtentBottomText,!0).attr(\\\"dy\\\",\\\"0.75em\\\").call(y),F.text(function(t){return R(t)}).each(function(t){s.font(o.select(this),t.model.rangeFont)}),h.ensureAxisBrush(E)}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"./axisbrush\\\":1009,\\\"./constants\\\":1012,\\\"./lines\\\":1015,d3:148}],1018:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./parcoords\\\"),i=t(\\\"../../lib/prepare_regl\\\");e.exports=function(t,e){var r=t._fullLayout,a=r._toppaper,o=r._paperdiv,s=r._glcontainer;if(i(t)){var l={},c={},u=r._size;e.forEach(function(e,r){l[r]=t.data[r].dimensions,c[r]=t.data[r].dimensions.slice()});n(o,a,s,e,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:function(e,r,n){var i=c[e][r],a=n.map(function(t){return t.slice()});a.length?(1===a.length&&(a=a[0]),i.constraintrange=a,a=[a]):(delete i.constraintrange,a=null);var o={};o[\\\"dimensions[\\\"+r+\\\"].constraintrange\\\"]=a,t.emit(\\\"plotly_restyle\\\",[o,[e]])},hover:function(e){t.emit(\\\"plotly_hover\\\",e)},unhover:function(e){t.emit(\\\"plotly_unhover\\\",e)},axesMoved:function(e,r){function n(t){return!(\\\"visible\\\"in t)||t.visible}function i(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}var a=function(t){return function(e,n){return i(r,t,e)-i(r,t,n)}}(c[e].filter(n));l[e].sort(a),c[e].filter(function(t){return!n(t)}).sort(function(t){return c[e].indexOf(t)}).forEach(function(t){l[e].splice(l[e].indexOf(t),1),l[e].splice(c[e].indexOf(t),0,t)}),t.emit(\\\"plotly_restyle\\\")}})}}},{\\\"../../lib/prepare_regl\\\":710,\\\"./parcoords\\\":1017}],1019:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color/attributes\\\"),i=t(\\\"../../plots/font_attributes\\\"),a=t(\\\"../../plots/attributes\\\"),o=t(\\\"../../plots/domain\\\").attributes,s=t(\\\"../../lib/extend\\\").extendFlat,l=i({editType:\\\"calc\\\",arrayOk:!0,colorEditType:\\\"style\\\"});e.exports={labels:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},label0:{valType:\\\"number\\\",dflt:0,editType:\\\"calc\\\"},dlabel:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},values:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},marker:{colors:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},line:{color:{valType:\\\"color\\\",dflt:n.defaultLine,arrayOk:!0,editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,dflt:0,arrayOk:!0,editType:\\\"style\\\"},editType:\\\"calc\\\"},editType:\\\"calc\\\"},text:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},hovertext:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"style\\\"},scalegroup:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},textinfo:{valType:\\\"flaglist\\\",flags:[\\\"label\\\",\\\"text\\\",\\\"value\\\",\\\"percent\\\"],extras:[\\\"none\\\"],editType:\\\"calc\\\"},hoverinfo:s({},a.hoverinfo,{flags:[\\\"label\\\",\\\"text\\\",\\\"value\\\",\\\"percent\\\",\\\"name\\\"]}),textposition:{valType:\\\"enumerated\\\",values:[\\\"inside\\\",\\\"outside\\\",\\\"auto\\\",\\\"none\\\"],dflt:\\\"auto\\\",arrayOk:!0,editType:\\\"calc\\\"},textfont:s({},l,{}),insidetextfont:s({},l,{}),outsidetextfont:s({},l,{}),title:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},titleposition:{valType:\\\"enumerated\\\",values:[\\\"top left\\\",\\\"top center\\\",\\\"top right\\\",\\\"middle center\\\",\\\"bottom left\\\",\\\"bottom center\\\",\\\"bottom right\\\"],editType:\\\"calc\\\"},titlefont:s({},l,{}),domain:o({name:\\\"pie\\\",trace:!0,editType:\\\"calc\\\"}),hole:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"calc\\\"},sort:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},direction:{valType:\\\"enumerated\\\",values:[\\\"clockwise\\\",\\\"counterclockwise\\\"],dflt:\\\"counterclockwise\\\",editType:\\\"calc\\\"},rotation:{valType:\\\"number\\\",min:-360,max:360,dflt:0,editType:\\\"calc\\\"},pull:{valType:\\\"number\\\",min:0,max:1,dflt:0,arrayOk:!0,editType:\\\"calc\\\"}}},{\\\"../../components/color/attributes\\\":569,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772}],1020:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../plots/get_data\\\").getModuleCalcData;r.name=\\\"pie\\\",r.plot=function(t){var e=n.getModule(\\\"pie\\\"),r=i(t.calcdata,e)[0];r.length&&e.plot(t,r)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"pie\\\"),a=e._has&&e._has(\\\"pie\\\");i&&!a&&n._pielayer.selectAll(\\\"g.trace\\\").remove()}},{\\\"../../plots/get_data\\\":782,\\\"../../registry\\\":828}],1021:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\").isArrayOrTypedArray,a=t(\\\"tinycolor2\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"./helpers\\\");r.calc=function(t,e){var r,l,c,u,f,h=e.values,p=i(h)&&h.length,d=e.labels,g=e.marker.colors||[],v=[],m=t._fullLayout,y=m._piecolormap,x={},b=0,_=m.hiddenlabels||[];if(e.dlabel)for(d=new Array(h.length),r=0;r<h.length;r++)d[r]=String(e.label0+r*e.dlabel);function w(t,e){return!!t&&(!!(t=a(t)).isValid()&&(t=o.addOpacity(t,t.getAlpha()),y[e]||(y[e]=t),t))}var k=(p?h:d).length;for(r=0;r<k;r++){if(p){if(l=h[r],!n(l))continue;if((l=+l)<0)continue}else l=1;void 0!==(c=d[r])&&\\\"\\\"!==c||(c=r);var M=x[c=String(c)];void 0===M?(x[c]=v.length,(u=-1!==_.indexOf(c))||(b+=l),v.push({v:l,label:c,color:w(g[r],c),i:r,pts:[r],hidden:u})):((f=v[M]).v+=l,f.pts.push(r),f.hidden||(b+=l),!1===f.color&&g[r]&&(f.color=w(g[r],c)))}if(e.sort&&v.sort(function(t,e){return e.v-t.v}),v[0]&&(v[0].vTotal=b),e.textinfo&&\\\"none\\\"!==e.textinfo){var A,T=-1!==e.textinfo.indexOf(\\\"label\\\"),S=-1!==e.textinfo.indexOf(\\\"text\\\"),C=-1!==e.textinfo.indexOf(\\\"value\\\"),E=-1!==e.textinfo.indexOf(\\\"percent\\\"),L=m.separators;for(r=0;r<v.length;r++){if(f=v[r],A=T?[f.label]:[],S){var z=s.getFirstFilled(e.text,f.pts);z&&A.push(z)}C&&A.push(s.formatPieValue(f.v,L)),E&&A.push(s.formatPiePercent(f.v/b,L)),f.text=A.join(\\\"<br>\\\")}}return v},r.crossTraceCalc=function(t){var e=t._fullLayout,r=t.calcdata,n=e.piecolorway,i=e._piecolormap;e.extendpiecolors&&(n=function(t){var e,r=JSON.stringify(t),n=l[r];if(!n){for(n=t.slice(),e=0;e<t.length;e++)n.push(a(t[e]).lighten(20).toHexString());for(e=0;e<t.length;e++)n.push(a(t[e]).darken(20).toHexString());l[r]=n}return n}(n));var o,s,c,u,f=0;for(o=0;o<r.length;o++)if(\\\"pie\\\"===(c=r[o])[0].trace.type)for(s=0;s<c.length;s++)!1===(u=c[s]).color&&(i[u.label]?u.color=i[u.label]:(i[u.label]=u.color=n[f%n.length],f++))};var l={}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"./helpers\\\":1024,\\\"fast-isnumeric\\\":214,tinycolor2:514}],1022:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"../../plots/domain\\\").defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}var l,c=n.coerceFont,u=s(\\\"values\\\"),f=n.isArrayOrTypedArray(u),h=s(\\\"labels\\\");if(Array.isArray(h)?(l=h.length,f&&(l=Math.min(l,u.length))):f&&(l=u.length,s(\\\"label0\\\"),s(\\\"dlabel\\\")),l){e._length=l,s(\\\"marker.line.width\\\")&&s(\\\"marker.line.color\\\"),s(\\\"marker.colors\\\"),s(\\\"scalegroup\\\");var p=s(\\\"text\\\"),d=s(\\\"textinfo\\\",Array.isArray(p)?\\\"text+percent\\\":\\\"percent\\\");if(s(\\\"hovertext\\\"),d&&\\\"none\\\"!==d){var g=s(\\\"textposition\\\"),v=Array.isArray(g)||\\\"auto\\\"===g,m=v||\\\"inside\\\"===g,y=v||\\\"outside\\\"===g;if(m||y){var x=c(s,\\\"textfont\\\",o.font);if(m){var b=n.extendFlat({},x);!(t.textfont&&t.textfont.color)&&delete b.color,c(s,\\\"insidetextfont\\\",b)}y&&c(s,\\\"outsidetextfont\\\",x)}}a(e,o,s);var _=s(\\\"hole\\\");if(s(\\\"title\\\")){var w=s(\\\"titleposition\\\",_?\\\"middle center\\\":\\\"top center\\\");_||\\\"middle center\\\"!==w||(e.titleposition=\\\"top center\\\"),c(s,\\\"titlefont\\\",o.font)}s(\\\"sort\\\"),s(\\\"direction\\\"),s(\\\"rotation\\\"),s(\\\"pull\\\")}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../../plots/domain\\\":771,\\\"./attributes\\\":1019}],1023:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx/helpers\\\").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),r}},{\\\"../../components/fx/helpers\\\":609}],1024:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");r.formatPiePercent=function(t,e){var r=(100*t).toPrecision(3);return-1!==r.lastIndexOf(\\\".\\\")&&(r=r.replace(/[.]?0+$/,\\\"\\\")),n.numSeparate(r,e)+\\\"%\\\"},r.formatPieValue=function(t,e){var r=t.toPrecision(10);return-1!==r.lastIndexOf(\\\".\\\")&&(r=r.replace(/[.]?0+$/,\\\"\\\")),n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r<e.length;r++){var n=t[e[r]];if(n||0===n)return n}},r.castOption=function(t,e){return Array.isArray(t)?r.getFirstFilled(t,e):t||void 0}},{\\\"../../lib\\\":696}],1025:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.supplyLayoutDefaults=t(\\\"./layout_defaults\\\"),n.layoutAttributes=t(\\\"./layout_attributes\\\");var i=t(\\\"./calc\\\");n.calc=i.calc,n.crossTraceCalc=i.crossTraceCalc,n.plot=t(\\\"./plot\\\"),n.style=t(\\\"./style\\\"),n.styleOne=t(\\\"./style_one\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"pie\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"pie\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1019,\\\"./base_plot\\\":1020,\\\"./calc\\\":1021,\\\"./defaults\\\":1022,\\\"./layout_attributes\\\":1026,\\\"./layout_defaults\\\":1027,\\\"./plot\\\":1028,\\\"./style\\\":1029,\\\"./style_one\\\":1030}],1026:[function(t,e,r){\\\"use strict\\\";e.exports={hiddenlabels:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},piecolorway:{valType:\\\"colorlist\\\",editType:\\\"calc\\\"},extendpiecolors:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"}}},{}],1027:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\\\"hiddenlabels\\\"),r(\\\"piecolorway\\\",e.colorway),r(\\\"extendpiecolors\\\")}},{\\\"../../lib\\\":696,\\\"./layout_attributes\\\":1026}],1028:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/fx\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../../components/drawing\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../lib/svg_text_utils\\\"),c=t(\\\"./helpers\\\"),u=t(\\\"./event_data\\\");function f(t,e){if(t.v===e.vTotal&&!e.trace.hole)return 1;var r=Math.PI*Math.min(t.v/e.vTotal,.5);return Math.min(1/(1+1/Math.sin(r)),(1-e.trace.hole)/2)}function h(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function p(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function d(t){var e,r=t.pull;if(Array.isArray(r))for(r=0,e=0;e<t.pull.length;e++)t.pull[e]>r&&(r=t.pull[e]);return r}e.exports=function(t,e){var r=t._fullLayout;!function(t,e){for(var r,n,i=0;i<t.length;i++)if(r=t[i][0],(n=r.trace).title){var a=o.tester.append(\\\"text\\\").attr(\\\"data-notex\\\",1).text(n.title).call(o.font,n.titlefont).call(l.convertToTspans,e),s=o.bBox(a.node(),!0);r.titleBox={width:s.width,height:s.height},a.remove()}}(e,t),function(t,e){var r,n,i,a,o,s,l,c,u,f=[];for(i=0;i<t.length;i++)o=t[i][0],s=o.trace,r=e.w*(s.domain.x[1]-s.domain.x[0]),n=e.h*(s.domain.y[1]-s.domain.y[0]),s.title&&\\\"middle center\\\"!==s.titleposition&&(n-=p(o,e)),l=d(s),o.r=Math.min(r,n)/(2+2*l),o.cx=e.l+e.w*(s.domain.x[1]+s.domain.x[0])/2,o.cy=e.t+e.h*(1-s.domain.y[0])-n/2,s.title&&-1!==s.titleposition.indexOf(\\\"bottom\\\")&&(o.cy-=p(o,e)),s.scalegroup&&-1===f.indexOf(s.scalegroup)&&f.push(s.scalegroup);for(a=0;a<f.length;a++){for(u=1/0,c=f[a],i=0;i<t.length;i++)(o=t[i][0]).trace.scalegroup===c&&(u=Math.min(u,o.r*o.r/o.vTotal));for(i=0;i<t.length;i++)(o=t[i][0]).trace.scalegroup===c&&(o.r=Math.sqrt(u*o.vTotal))}}(e,r._size);var g=s.makeTraceGroups(r._pielayer,e,\\\"trace\\\").each(function(e){var g=n.select(this),v=e[0],m=v.trace;!function(t){var e,r,n,i=t[0],a=i.trace,o=a.rotation*Math.PI/180,s=2*Math.PI/i.vTotal,l=\\\"px0\\\",c=\\\"px1\\\";if(\\\"counterclockwise\\\"===a.direction){for(e=0;e<t.length&&t[e].hidden;e++);if(e===t.length)return;o+=s*t[e].v,s*=-1,l=\\\"px1\\\",c=\\\"px0\\\"}function u(t){return[i.r*Math.sin(t),-i.r*Math.cos(t)]}for(n=u(o),e=0;e<t.length;e++)(r=t[e]).hidden||(r[l]=n,o+=s*r.v/2,r.pxmid=u(o),r.midangle=o,o+=s*r.v/2,n=u(o),r[c]=n,r.largeArc=r.v>i.vTotal/2?1:0)}(e),g.attr(\\\"stroke-linejoin\\\",\\\"round\\\"),g.each(function(){var g=n.select(this).selectAll(\\\"g.slice\\\").data(e);g.enter().append(\\\"g\\\").classed(\\\"slice\\\",!0),g.exit().remove();var y=[[[],[]],[[],[]]],x=!1;g.each(function(e){if(e.hidden)n.select(this).selectAll(\\\"path,g\\\").remove();else{e.pointNumber=e.i,e.curveNumber=m.index,y[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var p=v.cx,d=v.cy,g=n.select(this),b=g.selectAll(\\\"path.surface\\\").data([e]),_=!1,w=!1;if(b.enter().append(\\\"path\\\").classed(\\\"surface\\\",!0).style({\\\"pointer-events\\\":\\\"all\\\"}),g.select(\\\"path.textline\\\").remove(),g.on(\\\"mouseover\\\",function(){var a=t._fullLayout,o=t._fullData[m.index];if(!t._dragging&&!1!==a.hovermode){var s=o.hoverinfo;if(Array.isArray(s)&&(s=i.castHoverinfo({hoverinfo:[c.castOption(s,e.pts)],_module:m._module},a,0)),\\\"all\\\"===s&&(s=\\\"label+text+value+percent+name\\\"),\\\"none\\\"!==s&&\\\"skip\\\"!==s&&s){var l=f(e,v),h=p+e.pxmid[0]*(1-l),g=d+e.pxmid[1]*(1-l),y=r.separators,x=[];if(-1!==s.indexOf(\\\"label\\\")&&x.push(e.label),-1!==s.indexOf(\\\"text\\\")){var b=c.castOption(o.hovertext||o.text,e.pts);b&&x.push(b)}-1!==s.indexOf(\\\"value\\\")&&x.push(c.formatPieValue(e.v,y)),-1!==s.indexOf(\\\"percent\\\")&&x.push(c.formatPiePercent(e.v/v.vTotal,y));var k=m.hoverlabel,M=k.font;i.loneHover({x0:h-l*v.r,x1:h+l*v.r,y:g,text:x.join(\\\"<br>\\\"),name:-1!==s.indexOf(\\\"name\\\")?o.name:void 0,idealAlign:e.pxmid[0]<0?\\\"left\\\":\\\"right\\\",color:c.castOption(k.bgcolor,e.pts)||e.color,borderColor:c.castOption(k.bordercolor,e.pts),fontFamily:c.castOption(M.family,e.pts),fontSize:c.castOption(M.size,e.pts),fontColor:c.castOption(M.color,e.pts)},{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:t}),_=!0}t.emit(\\\"plotly_hover\\\",{points:[u(e,o)],event:n.event}),w=!0}}).on(\\\"mouseout\\\",function(r){var a=t._fullLayout,o=t._fullData[m.index];w&&(r.originalEvent=n.event,t.emit(\\\"plotly_unhover\\\",{points:[u(e,o)],event:n.event}),w=!1),_&&(i.loneUnhover(a._hoverlayer.node()),_=!1)}).on(\\\"click\\\",function(){var r=t._fullLayout,a=t._fullData[m.index];t._dragging||!1===r.hovermode||(t._hoverdata=[u(e,a)],i.click(t,n.event))}),m.pull){var k=+c.castOption(m.pull,e.pts)||0;k>0&&(p+=k*e.pxmid[0],d+=k*e.pxmid[1])}e.cxFinal=p,e.cyFinal=d;var M=m.hole;if(e.v===v.vTotal){var A=\\\"M\\\"+(p+e.px0[0])+\\\",\\\"+(d+e.px0[1])+L(e.px0,e.pxmid,!0,1)+L(e.pxmid,e.px0,!0,1)+\\\"Z\\\";M?b.attr(\\\"d\\\",\\\"M\\\"+(p+M*e.px0[0])+\\\",\\\"+(d+M*e.px0[1])+L(e.px0,e.pxmid,!1,M)+L(e.pxmid,e.px0,!1,M)+\\\"Z\\\"+A):b.attr(\\\"d\\\",A)}else{var T=L(e.px0,e.px1,!0,1);if(M){var S=1-M;b.attr(\\\"d\\\",\\\"M\\\"+(p+M*e.px1[0])+\\\",\\\"+(d+M*e.px1[1])+L(e.px1,e.px0,!1,M)+\\\"l\\\"+S*e.px0[0]+\\\",\\\"+S*e.px0[1]+T+\\\"Z\\\")}else b.attr(\\\"d\\\",\\\"M\\\"+p+\\\",\\\"+d+\\\"l\\\"+e.px0[0]+\\\",\\\"+e.px0[1]+T+\\\"Z\\\")}var C=c.castOption(m.textposition,e.pts),E=g.selectAll(\\\"g.slicetext\\\").data(e.text&&\\\"none\\\"!==C?[0]:[]);E.enter().append(\\\"g\\\").classed(\\\"slicetext\\\",!0),E.exit().remove(),E.each(function(){var r=s.ensureSingle(n.select(this),\\\"text\\\",\\\"\\\",function(t){t.attr(\\\"data-notex\\\",1)});r.text(e.text).attr({class:\\\"slicetext\\\",transform:\\\"\\\",\\\"text-anchor\\\":\\\"middle\\\"}).call(o.font,\\\"outside\\\"===C?function(t,e,r){var n=c.castOption(t.outsidetextfont.color,e.pts)||c.castOption(t.textfont.color,e.pts)||r.color,i=c.castOption(t.outsidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,a=c.castOption(t.outsidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(m,e,t._fullLayout.font):function(t,e,r){var n=c.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=c.castOption(t._input.textfont.color,e.pts));var i=c.castOption(t.insidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,o=c.castOption(t.insidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n||a.contrast(e.color),family:i,size:o}}(m,e,t._fullLayout.font)).call(l.convertToTspans,t);var i,u=o.bBox(r.node());\\\"outside\\\"===C?i=h(u,e):(i=function(t,e,r){var n=Math.sqrt(t.width*t.width+t.height*t.height),i=t.width/t.height,a=Math.PI*Math.min(e.v/r.vTotal,.5),o=1-r.trace.hole,s=f(e,r),l={scale:s*r.r*2/n,rCenter:1-s,rotate:0};if(l.scale>=1)return l;var c=i+1/(2*Math.tan(a)),u=r.r*Math.min(1/(Math.sqrt(c*c+.5)+c),o/(Math.sqrt(i*i+o/2)+i)),h={scale:2*u/t.height,rCenter:Math.cos(u/r.r)-u*i/r.r,rotate:(180/Math.PI*e.midangle+720)%180-90},p=1/i,d=p+1/(2*Math.tan(a)),g=r.r*Math.min(1/(Math.sqrt(d*d+.5)+d),o/(Math.sqrt(p*p+o/2)+p)),v={scale:2*g/t.width,rCenter:Math.cos(g/r.r)-g/i/r.r,rotate:(180/Math.PI*e.midangle+810)%180-90},m=v.scale>h.scale?v:h;return l.scale<1&&m.scale>l.scale?m:l}(u,e,v),\\\"auto\\\"===C&&i.scale<1&&(r.call(o.font,m.outsidetextfont),m.outsidetextfont.family===m.insidetextfont.family&&m.outsidetextfont.size===m.insidetextfont.size||(u=o.bBox(r.node())),i=h(u,e)));var g=p+e.pxmid[0]*i.rCenter+(i.x||0),y=d+e.pxmid[1]*i.rCenter+(i.y||0);i.outside&&(e.yLabelMin=y-u.height/2,e.yLabelMid=y,e.yLabelMax=y+u.height/2,e.labelExtraX=0,e.labelExtraY=0,x=!0),r.attr(\\\"transform\\\",\\\"translate(\\\"+g+\\\",\\\"+y+\\\")\\\"+(i.scale<1?\\\"scale(\\\"+i.scale+\\\")\\\":\\\"\\\")+(i.rotate?\\\"rotate(\\\"+i.rotate+\\\")\\\":\\\"\\\")+\\\"translate(\\\"+-(u.left+u.right)/2+\\\",\\\"+-(u.top+u.bottom)/2+\\\")\\\")})}function L(t,r,n,i){return\\\"a\\\"+i*v.r+\\\",\\\"+i*v.r+\\\" 0 \\\"+e.largeArc+(n?\\\" 1 \\\":\\\" 0 \\\")+i*(r[0]-t[0])+\\\",\\\"+i*(r[1]-t[1])}});var b=n.select(this).selectAll(\\\"g.titletext\\\").data(m.title?[0]:[]);b.enter().append(\\\"g\\\").classed(\\\"titletext\\\",!0),b.exit().remove(),b.each(function(){var e,i=s.ensureSingle(n.select(this),\\\"text\\\",\\\"\\\",function(t){t.attr(\\\"data-notex\\\",1)});i.text(m.title).attr({class:\\\"titletext\\\",transform:\\\"\\\",\\\"text-anchor\\\":\\\"middle\\\"}).call(o.font,m.titlefont).call(l.convertToTspans,t),e=\\\"middle center\\\"===m.titleposition?function(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.titlefont.size}}(v):function(t,e){var r,n,i=1,a=1,o=t.trace,s={x:t.cx,y:t.cy},l={tx:0,ty:0};l.ty+=o.titlefont.size,n=d(o),-1!==o.titleposition.indexOf(\\\"top\\\")?(s.y-=(1+n)*t.r,l.ty-=t.titleBox.height):-1!==o.titleposition.indexOf(\\\"bottom\\\")&&(s.y+=(1+n)*t.r);-1!==o.titleposition.indexOf(\\\"left\\\")?(r=e.w*(o.domain.x[1]-o.domain.x[0])/2+t.r,s.x-=(1+n)*t.r,l.tx+=t.titleBox.width/2):-1!==o.titleposition.indexOf(\\\"center\\\")?r=e.w*(o.domain.x[1]-o.domain.x[0]):-1!==o.titleposition.indexOf(\\\"right\\\")&&(r=e.w*(o.domain.x[1]-o.domain.x[0])/2+t.r,s.x+=(1+n)*t.r,l.tx-=t.titleBox.width/2);return i=r/t.titleBox.width,a=p(t,e)/t.titleBox.height,{x:s.x,y:s.y,scale:Math.min(i,a),tx:l.tx,ty:l.ty}}(v,r._size),i.attr(\\\"transform\\\",\\\"translate(\\\"+e.x+\\\",\\\"+e.y+\\\")\\\"+(e.scale<1?\\\"scale(\\\"+e.scale+\\\")\\\":\\\"\\\")+\\\"translate(\\\"+e.tx+\\\",\\\"+e.ty+\\\")\\\")}),x&&function(t,e){var r,n,i,a,o,s,l,u,f,h,p,d,g;function v(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,u,f,p,d,g,v=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?t.yLabelMin:t.yLabelMax,y=n?t.yLabelMax:t.yLabelMin,x=t.cyFinal+o(t.px0[1],t.px1[1]),b=v-m;if(b*l>0&&(t.labelExtraY=b),Array.isArray(e.pull))for(u=0;u<h.length;u++)(f=h[u])===t||(c.castOption(e.pull,t.pts)||0)>=(c.castOption(e.pull,f.pts)||0)||((t.pxmid[1]-f.pxmid[1])*l>0?(p=f.cyFinal+o(f.px0[1],f.px1[1]),(b=p-m-t.labelExtraY)*l>0&&(t.labelExtraY+=b)):(y+t.labelExtraY-x)*l>0&&(i=3*s*Math.abs(u-h.indexOf(t)),d=f.cxFinal+a(f.px0[0],f.px1[0]),(g=d+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=g)))}for(n=0;n<2;n++)for(i=n?v:m,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(u=t[n][r]).sort(i),f=t[1-n][r],h=f.concat(u),d=[],p=0;p<u.length;p++)void 0!==u[p].yLabelMid&&d.push(u[p]);for(g=!1,p=0;n&&p<f.length;p++)if(void 0!==f[p].yLabelMid){g=f[p];break}for(p=0;p<d.length;p++){var x=p&&d[p-1];g&&!p&&(x=g),y(d[p],x)}}}(y,m),g.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=n.select(this),r=e.select(\\\"g.slicetext text\\\");r.attr(\\\"transform\\\",\\\"translate(\\\"+t.labelExtraX+\\\",\\\"+t.labelExtraY+\\\")\\\"+r.attr(\\\"transform\\\"));var i=t.cxFinal+t.pxmid[0],o=\\\"M\\\"+i+\\\",\\\"+(t.cyFinal+t.pxmid[1]),s=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var l=t.labelExtraX*t.pxmid[1]/t.pxmid[0],c=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(l)>Math.abs(c)?o+=\\\"l\\\"+c*t.pxmid[0]/t.pxmid[1]+\\\",\\\"+c+\\\"H\\\"+(i+t.labelExtraX+s):o+=\\\"l\\\"+t.labelExtraX+\\\",\\\"+l+\\\"v\\\"+(c-l)+\\\"h\\\"+s}else o+=\\\"V\\\"+(t.yLabelMid+t.labelExtraY)+\\\"h\\\"+s;e.append(\\\"path\\\").classed(\\\"textline\\\",!0).call(a.stroke,m.outsidetextfont.color).attr({\\\"stroke-width\\\":Math.min(2,m.outsidetextfont.size/8),d:o,fill:\\\"none\\\"})}})})});setTimeout(function(){g.selectAll(\\\"tspan\\\").each(function(){var t=n.select(this);t.attr(\\\"dy\\\")&&t.attr(\\\"dy\\\",t.attr(\\\"dy\\\"))})},0)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../lib/svg_text_utils\\\":721,\\\"./event_data\\\":1023,\\\"./helpers\\\":1024,d3:148}],1029:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"./style_one\\\");e.exports=function(t){t._fullLayout._pielayer.selectAll(\\\".trace\\\").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll(\\\"path.surface\\\").each(function(t){n.select(this).call(i,t,e)})})}},{\\\"./style_one\\\":1030,d3:148}],1030:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"./helpers\\\").castOption;e.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style({\\\"stroke-width\\\":s}).call(n.fill,e.color).call(n.stroke,o)}},{\\\"../../components/color\\\":570,\\\"./helpers\\\":1024}],1031:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\");e.exports={x:n.x,y:n.y,xy:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},indices:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},xbounds:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},ybounds:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},text:n.text,marker:{color:{valType:\\\"color\\\",arrayOk:!1,editType:\\\"calc\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1,arrayOk:!1,editType:\\\"calc\\\"},blend:{valType:\\\"boolean\\\",dflt:null,editType:\\\"calc\\\"},sizemin:{valType:\\\"number\\\",min:.1,max:2,dflt:.5,editType:\\\"calc\\\"},sizemax:{valType:\\\"number\\\",min:.1,dflt:20,editType:\\\"calc\\\"},border:{color:{valType:\\\"color\\\",arrayOk:!1,editType:\\\"calc\\\"},arearatio:{valType:\\\"number\\\",min:0,max:1,dflt:0,editType:\\\"calc\\\"},editType:\\\"calc\\\"},editType:\\\"calc\\\"},transforms:void 0}},{\\\"../scatter/attributes\\\":1044}],1032:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-pointcloud2d\\\"),i=t(\\\"../../lib/str2rgbarray\\\"),a=t(\\\"../../plots/cartesian/autorange\\\").findExtremes,o=t(\\\"../scatter/get_trace_color\\\");function s(t,e){this.scene=t,this.uid=e,this.type=\\\"pointcloud\\\",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color=\\\"rgb(0, 0, 0)\\\",this.name=\\\"\\\",this.hoverinfo=\\\"all\\\",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;l<e;l++)o=n[2*l],s=n[2*l+1],o<d[0]&&(d[0]=o),o>d[2]&&(d[2]=o),s<d[1]&&(d[1]=s),s>d[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;l<e;l++)r[l]=l}else for(e=c.length,n=new Float32Array(2*e),r=new Int32Array(e),l=0;l<e;l++)o=c[l],s=u[l],r[l]=l,n[2*l]=o,n[2*l+1]=s,o<d[0]&&(d[0]=o),o>d[2]&&(d[2]=o),s<d[1]&&(d[1]=s),s>d[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),v=i(t.marker.border.color),m=t.opacity*t.marker.opacity;g[3]*=m,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,v[3]*=m,this.pointcloudOptions.borderColor=v;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\\\"../../lib/str2rgbarray\\\":720,\\\"../../plots/cartesian/autorange\\\":744,\\\"../scatter/get_trace_color\\\":1054,\\\"gl-pointcloud2d\\\":279}],1033:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a(\\\"x\\\"),a(\\\"y\\\"),a(\\\"xbounds\\\"),a(\\\"ybounds\\\"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a(\\\"text\\\"),a(\\\"marker.color\\\",r),a(\\\"marker.opacity\\\"),a(\\\"marker.blend\\\"),a(\\\"marker.sizemin\\\"),a(\\\"marker.sizemax\\\"),a(\\\"marker.border.color\\\",r),a(\\\"marker.border.arearatio\\\"),e._length=null}},{\\\"../../lib\\\":696,\\\"./attributes\\\":1031}],1034:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"../scatter3d/calc\\\"),n.plot=t(\\\"./convert\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"pointcloud\\\",n.basePlotModule=t(\\\"../../plots/gl2d\\\"),n.categories=[\\\"gl\\\",\\\"gl2d\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../plots/gl2d\\\":785,\\\"../scatter3d/calc\\\":1072,\\\"./attributes\\\":1031,\\\"./convert\\\":1032,\\\"./defaults\\\":1033}],1035:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/font_attributes\\\"),i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../components/color/attributes\\\"),o=t(\\\"../../components/fx/attributes\\\"),s=t(\\\"../../plots/domain\\\").attributes,l=t(\\\"../../lib/extend\\\").extendFlat,c=t(\\\"../../plot_api/edit_types\\\").overrideAll;(e.exports=c({hoverinfo:l({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:\\\"sankey\\\",trace:!0}),orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],dflt:\\\"h\\\"},valueformat:{valType:\\\"string\\\",dflt:\\\".3s\\\"},valuesuffix:{valType:\\\"string\\\",dflt:\\\"\\\"},arrangement:{valType:\\\"enumerated\\\",values:[\\\"snap\\\",\\\"perpendicular\\\",\\\"freeform\\\",\\\"fixed\\\"],dflt:\\\"snap\\\"},textfont:n({}),node:{label:{valType:\\\"data_array\\\",dflt:[]},color:{valType:\\\"color\\\",arrayOk:!0},line:{color:{valType:\\\"color\\\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\\\"number\\\",min:0,dflt:.5,arrayOk:!0}},pad:{valType:\\\"number\\\",arrayOk:!1,min:0,dflt:20},thickness:{valType:\\\"number\\\",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"none\\\",\\\"skip\\\"],dflt:\\\"all\\\"},hoverlabel:o.hoverlabel},link:{label:{valType:\\\"data_array\\\",dflt:[]},color:{valType:\\\"color\\\",arrayOk:!0},line:{color:{valType:\\\"color\\\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\\\"number\\\",min:0,dflt:0,arrayOk:!0}},source:{valType:\\\"data_array\\\",dflt:[]},target:{valType:\\\"data_array\\\",dflt:[]},value:{valType:\\\"data_array\\\",dflt:[]},hoverinfo:{valType:\\\"enumerated\\\",values:[\\\"all\\\",\\\"none\\\",\\\"skip\\\"],dflt:\\\"all\\\"},hoverlabel:o.hoverlabel}},\\\"calc\\\",\\\"nested\\\")).transforms=void 0},{\\\"../../components/color/attributes\\\":569,\\\"../../components/fx/attributes\\\":604,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772}],1036:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plot_api/edit_types\\\").overrideAll,i=t(\\\"../../plots/get_data\\\").getModuleCalcData,a=t(\\\"./plot\\\"),o=t(\\\"../../components/fx/layout_attributes\\\");r.name=\\\"sankey\\\",r.baseLayoutAttrOverrides=n({hoverlabel:o.hoverlabel},\\\"plot\\\",\\\"nested\\\"),r.plot=function(t){var e=i(t.calcdata,\\\"sankey\\\")[0];a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"sankey\\\"),a=e._has&&e._has(\\\"sankey\\\");i&&!a&&n._paperdiv.selectAll(\\\".sankey\\\").remove()}},{\\\"../../components/fx/layout_attributes\\\":613,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/get_data\\\":782,\\\"./plot\\\":1041}],1037:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"strongly-connected-components\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../lib/gup\\\").wrap;e.exports=function(t,e){return function(t,e,r){for(var a=t.length,o=i.init2dArray(a,0),s=0;s<Math.min(e.length,r.length);s++)if(i.isIndex(e[s],a)&&i.isIndex(r[s],a)){if(e[s]===r[s])return!0;o[e[s]].push(r[s])}return n(o).components.some(function(t){return t.length>1})}(e.node.label,e.link.source,e.link.target)&&(i.error(\\\"Circularity is present in the Sankey data. Removing all nodes and links.\\\"),e.link.label=[],e.link.source=[],e.link.target=[],e.link.value=[],e.link.color=[],e.node.label=[],e.node.color=[]),a({link:e.link,node:e.node})}},{\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"strongly-connected-components\\\":506}],1038:[function(t,e,r){\\\"use strict\\\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\\\"cubic-in-out\\\",cn:{sankey:\\\"sankey\\\",sankeyLinks:\\\"sankey-links\\\",sankeyLink:\\\"sankey-link\\\",sankeyNodeSet:\\\"sankey-node-set\\\",sankeyNode:\\\"sankey-node\\\",nodeRect:\\\"node-rect\\\",nodeCapture:\\\"node-capture\\\",nodeCentered:\\\"node-entered\\\",nodeLabelGuide:\\\"node-label-guide\\\",nodeLabel:\\\"node-label\\\",nodeLabelTextPath:\\\"node-label-text-path\\\"}}},{}],1039:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"tinycolor2\\\"),s=t(\\\"../../plots/domain\\\").defaults,l=t(\\\"../../components/fx/hoverlabel_defaults\\\"),c=t(\\\"../../plot_api/plot_template\\\");e.exports=function(t,e,r,u){function f(r,a){return n.coerce(t,e,i,r,a)}var h=n.extendDeep(u.hoverlabel,t.hoverlabel),p=t.node,d=c.newContainer(e,\\\"node\\\");function g(t,e){return n.coerce(p,d,i.node,t,e)}g(\\\"label\\\"),g(\\\"pad\\\"),g(\\\"thickness\\\"),g(\\\"line.color\\\"),g(\\\"line.width\\\"),g(\\\"hoverinfo\\\",t.hoverinfo),l(p,d,g,h);var v=u.colorway;g(\\\"color\\\",d.label.map(function(t,e){return a.addOpacity(function(t){return v[t%v.length]}(e),.8)}));var m=t.link,y=c.newContainer(e,\\\"link\\\");function x(t,e){return n.coerce(m,y,i.link,t,e)}x(\\\"label\\\"),x(\\\"source\\\"),x(\\\"target\\\"),x(\\\"value\\\"),x(\\\"line.color\\\"),x(\\\"line.width\\\"),x(\\\"hoverinfo\\\",t.hoverinfo),l(m,y,x,h);var b=o(u.paper_bgcolor).getLuminance()<.333?\\\"rgba(255, 255, 255, 0.6)\\\":\\\"rgba(0, 0, 0, 0.2)\\\";x(\\\"color\\\",n.repeat(b,y.value.length)),s(e,u,f),f(\\\"orientation\\\"),f(\\\"valueformat\\\"),f(\\\"valuesuffix\\\"),f(\\\"arrangement\\\"),n.coerceFont(f,\\\"textfont\\\",n.extendFlat({},u.font)),e._length=null}},{\\\"../../components/color\\\":570,\\\"../../components/fx/hoverlabel_defaults\\\":611,\\\"../../lib\\\":696,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/domain\\\":771,\\\"./attributes\\\":1035,tinycolor2:514}],1040:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"sankey\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1035,\\\"./base_plot\\\":1036,\\\"./calc\\\":1037,\\\"./defaults\\\":1039,\\\"./plot\\\":1041}],1041:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"./render\\\"),a=t(\\\"../../components/fx\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"./constants\\\").cn,c=s._;function u(t){return\\\"\\\"!==t}function f(t,e){return t.filter(function(t){return t.key===e.traceId})}function h(t,e){n.select(t).select(\\\"path\\\").style(\\\"fill-opacity\\\",e),n.select(t).select(\\\"rect\\\").style(\\\"fill-opacity\\\",e)}function p(t){n.select(t).select(\\\"text.name\\\").style(\\\"fill\\\",\\\"black\\\")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function v(t,e,r){e&&r&&f(r,e).selectAll(\\\".\\\"+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function m(t,e,r){e&&r&&f(r,e).selectAll(\\\".\\\"+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var i=n.datum().link.label;n.style(\\\"fill-opacity\\\",.4),i&&f(e,t).selectAll(\\\".\\\"+l.sankeyLink).filter(function(t){return t.link.label===i}).style(\\\"fill-opacity\\\",.4),r&&f(e,t).selectAll(\\\".\\\"+l.sankeyNode).filter(g(t)).call(v)}function x(t,e,r,n){var i=n.datum().link.label;n.style(\\\"fill-opacity\\\",function(t){return t.tinyColorAlpha}),i&&f(e,t).selectAll(\\\".\\\"+l.sankeyLink).filter(function(t){return t.link.label===i}).style(\\\"fill-opacity\\\",function(t){return t.tinyColorAlpha}),r&&f(e,t).selectAll(l.sankeyNode).filter(g(t)).call(m)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){var r=t._fullLayout,s=r._paper,f=r._size,d=c(t,\\\"source:\\\")+\\\" \\\",g=c(t,\\\"target:\\\")+\\\" \\\",_=c(t,\\\"incoming flow count:\\\")+\\\" \\\",w=c(t,\\\"outgoing flow count:\\\")+\\\" \\\";i(s,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:function(e,r,i){!1!==t._fullLayout.hovermode&&(n.select(e).call(y.bind(0,r,i,!0)),\\\"skip\\\"!==r.link.trace.link.hoverinfo&&t.emit(\\\"plotly_hover\\\",{event:n.event,points:[r.link]}))},follow:function(e,i){if(!1!==t._fullLayout.hovermode){var s=i.link.trace.link;if(\\\"none\\\"!==s.hoverinfo&&\\\"skip\\\"!==s.hoverinfo){var l=t._fullLayout._paperdiv.node().getBoundingClientRect(),c=e.getBoundingClientRect(),f=c.left+c.width/2,v=c.top+c.height/2,m=a.loneHover({x:f-l.left,y:v-l.top,name:n.format(i.valueFormat)(i.link.value)+i.valueSuffix,text:[i.link.label||\\\"\\\",d+i.link.source.label,g+i.link.target.label].filter(u).join(\\\"<br>\\\"),color:b(s,\\\"bgcolor\\\")||o.addOpacity(i.tinyColorHue,1),borderColor:b(s,\\\"bordercolor\\\"),fontFamily:b(s,\\\"font.family\\\"),fontSize:b(s,\\\"font.size\\\"),fontColor:b(s,\\\"font.color\\\"),idealAlign:n.event.x<f?\\\"right\\\":\\\"left\\\"},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});h(m,.65),p(m)}}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(x.bind(0,i,o,!0)),\\\"skip\\\"!==i.link.trace.link.hoverinfo&&t.emit(\\\"plotly_unhover\\\",{event:n.event,points:[i.link]}),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r){var i=r.link;i.originalEvent=n.event,t._hoverdata=[i],a.click(t,{target:!0})}},nodeEvents:{hover:function(e,r,i){!1!==t._fullLayout.hovermode&&(n.select(e).call(v,r,i),\\\"skip\\\"!==r.node.trace.node.hoverinfo&&t.emit(\\\"plotly_hover\\\",{event:n.event,points:[r.node]}))},follow:function(e,i){if(!1!==t._fullLayout.hovermode){var o=i.node.trace.node;if(\\\"none\\\"!==o.hoverinfo&&\\\"skip\\\"!==o.hoverinfo){var s=n.select(e).select(\\\".\\\"+l.nodeRect),c=t._fullLayout._paperdiv.node().getBoundingClientRect(),f=s.node().getBoundingClientRect(),d=f.left-2-c.left,g=f.right+2-c.left,v=f.top+f.height/4-c.top,m=a.loneHover({x0:d,x1:g,y:v,name:n.format(i.valueFormat)(i.node.value)+i.valueSuffix,text:[i.node.label,_+i.node.targetLinks.length,w+i.node.sourceLinks.length].filter(u).join(\\\"<br>\\\"),color:b(o,\\\"bgcolor\\\")||i.tinyColorHue,borderColor:b(o,\\\"bordercolor\\\"),fontFamily:b(o,\\\"font.family\\\"),fontSize:b(o,\\\"font.size\\\"),fontColor:b(o,\\\"font.color\\\"),idealAlign:\\\"left\\\"},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});h(m,.85),p(m)}}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,i,o),\\\"skip\\\"!==i.node.trace.node.hoverinfo&&t.emit(\\\"plotly_unhover\\\",{event:n.event,points:[i.node]}),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(m,r,i),a.click(t,{target:!0})}}})}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"./constants\\\":1038,\\\"./render\\\":1042,d3:148}],1042:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"d3\\\"),a=t(\\\"tinycolor2\\\"),o=t(\\\"../../components/color\\\"),s=t(\\\"../../components/drawing\\\"),l=t(\\\"@plotly/d3-sankey\\\").sankey,c=t(\\\"d3-force\\\"),u=t(\\\"../../lib\\\"),f=u.isArrayOrTypedArray,h=u.isIndex,p=t(\\\"../../lib/gup\\\"),d=p.keyFun,g=p.repeat,v=p.unwrap;function m(t){t.lastDraggedX=t.x,t.lastDraggedY=t.y}function y(t){return function(e){return e.node.originalX===t.node.originalX}}function x(t){for(var e=0;e<t.length;e++)t[e].y=t[e].y+t[e].dy/2}function b(t){t.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.node.x.toFixed(3)+\\\", \\\"+(t.node.y-t.node.dy/2).toFixed(3)+\\\")\\\"})}function _(t){var e=t.sankey.nodes();!function(t){for(var e=0;e<t.length;e++)t[e].y=t[e].y-t[e].dy/2}(e);var r=t.sankey.link()(t.link);return x(e),r}function w(t){t.call(b)}function k(t,e){t.call(w),e.attr(\\\"d\\\",_)}function M(t){t.attr(\\\"width\\\",function(t){return t.visibleWidth}).attr(\\\"height\\\",function(t){return t.visibleHeight})}function A(t){return t.link.dy>1||t.linkLineWidth>0}function T(t){return\\\"translate(\\\"+t.translateX+\\\",\\\"+t.translateY+\\\")\\\"+(t.horizontal?\\\"matrix(1 0 0 1 0 0)\\\":\\\"matrix(0 1 1 0 0 0)\\\")}function S(t){return\\\"translate(\\\"+(t.horizontal?0:t.labelY)+\\\" \\\"+(t.horizontal?t.labelY:0)+\\\")\\\"}function C(t){return i.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function E(t){return t.horizontal?\\\"matrix(1 0 0 1 0 0)\\\":\\\"matrix(0 1 1 0 0 0)\\\"}function L(t){return t.horizontal?\\\"scale(1 1)\\\":\\\"scale(-1 1)\\\"}function z(t){return t.darkBackground&&!t.horizontal?\\\"rgb(255,255,255)\\\":\\\"rgb(0,0,0)\\\"}function O(t){return t.horizontal&&t.left?\\\"100%\\\":\\\"0%\\\"}function I(t,e,r){t.on(\\\".basic\\\",null).on(\\\"mouseover.basic\\\",function(t){t.interactionState.dragInProgress||(r.hover(this,t,e),t.interactionState.hovered=[this,t])}).on(\\\"mousemove.basic\\\",function(t){t.interactionState.dragInProgress||(r.follow(this,t),t.interactionState.hovered=[this,t])}).on(\\\"mouseout.basic\\\",function(t){t.interactionState.dragInProgress||(r.unhover(this,t,e),t.interactionState.hovered=!1)}).on(\\\"click.basic\\\",function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||r.select(this,t,e)})}function P(t,e,r){var a=i.behavior.drag().origin(function(t){return t.node}).on(\\\"dragstart\\\",function(i){if(\\\"fixed\\\"!==i.arrangement&&(u.raiseToTop(this),i.interactionState.dragInProgress=i.node,m(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),\\\"snap\\\"===i.arrangement)){var a=i.traceId+\\\"|\\\"+Math.floor(i.node.originalX);i.forceLayouts[a]?i.forceLayouts[a].alpha(1):function(t,e,r){var i=r.sankey.nodes().filter(function(t){return t.originalX===r.node.originalX});r.forceLayouts[e]=c.forceSimulation(i).alphaDecay(0).force(\\\"collide\\\",c.forceCollide().radius(function(t){return t.dy/2+r.nodePad/2}).strength(1).iterations(n.forceIterations)).force(\\\"constrain\\\",function(t,e,r,i){return function(){for(var t=0,a=0;a<r.length;a++){var o=r[a];o===i.interactionState.dragInProgress?(o.x=o.lastDraggedX,o.y=o.lastDraggedY):(o.vx=(o.originalX-o.x)/n.forceTicksPerFrame,o.y=Math.min(i.size-o.dy/2,Math.max(o.dy/2,o.y))),t=Math.max(t,Math.abs(o.vx),Math.abs(o.vy))}!i.interactionState.dragInProgress&&t<.1&&i.forceLayouts[e].alpha()>0&&i.forceLayouts[e].alpha(0)}}(0,e,i,r)).stop()}(0,a,i),function(t,e,r,i){window.requestAnimationFrame(function a(){for(var o=0;o<n.forceTicksPerFrame;o++)r.forceLayouts[i].tick();r.sankey.relayout(),k(t.filter(y(r)),e),r.forceLayouts[i].alpha()>0&&window.requestAnimationFrame(a)})}(t,e,i,a)}}).on(\\\"drag\\\",function(r){if(\\\"fixed\\\"!==r.arrangement){var n=i.event.x,a=i.event.y;\\\"snap\\\"===r.arrangement?(r.node.x=n,r.node.y=a):(\\\"freeform\\\"===r.arrangement&&(r.node.x=n),r.node.y=Math.max(r.node.dy/2,Math.min(r.size-r.node.dy/2,a))),m(r.node),\\\"snap\\\"!==r.arrangement&&(r.sankey.relayout(),k(t.filter(y(r)),e))}}).on(\\\"dragend\\\",function(t){t.interactionState.dragInProgress=!1});t.on(\\\".drag\\\",null).call(a)}e.exports=function(t,e,r,i){var c=t.selectAll(\\\".\\\"+n.cn.sankey).data(e.filter(function(t){return v(t).trace.visible}).map(function(t,e,r){var i,a=v(e).trace,o=a.domain,s=a.node,c=a.link,p=a.arrangement,d=\\\"h\\\"===a.orientation,g=a.node.pad,m=a.node.thickness,y=a.node.line.color,b=a.node.line.width,_=a.link.line.color,w=a.link.line.width,k=a.valueformat,M=a.valuesuffix,A=a.textfont,T=t.width*(o.x[1]-o.x[0]),S=t.height*(o.y[1]-o.y[0]),C=[],E=f(c.color),L={},z=s.label.length;for(i=0;i<c.value.length;i++){var O=c.value[i],I=c.source[i],P=c.target[i];O>0&&h(I,z)&&h(P,z)&&(P=+P,L[I=+I]=L[P]=!0,C.push({pointNumber:i,label:c.label[i],color:E?c.color[i]:c.color,source:I,target:P,value:+O}))}var D=f(s.color),R=[],B=!1,F={};for(i=0;i<z;i++)if(L[i]){var N=s.label[i];F[i]=R.length,R.push({pointNumber:i,label:N,color:D?s.color[i]:s.color})}else B=!0;if(B)for(i=0;i<C.length;i++)C[i].source=F[C[i].source],C[i].target=F[C[i].target];var j=l().size(d?[T,S]:[S,T]).nodeWidth(m).nodePadding(g).nodes(R).links(C).layout(n.sankeyIterations);j.nodePadding()<g&&u.warn(\\\"node.pad was reduced to \\\",j.nodePadding(),\\\" to fit within the figure.\\\");for(var V,U=j.nodes(),q=0;q<U.length;q++)(V=U[q]).width=T,V.height=S;return x(R),{key:r,trace:a,guid:Math.floor(1e12*(1+Math.random())),horizontal:d,width:T,height:S,nodePad:g,nodeLineColor:y,nodeLineWidth:b,linkLineColor:_,linkLineWidth:w,valueFormat:k,valueSuffix:M,textFont:A,translateX:o.x[0]*t.width+t.margin.l,translateY:t.height-o.y[1]*t.height+t.margin.t,dragParallel:d?S:T,dragPerpendicular:d?T:S,nodes:R,links:C,arrangement:p,sankey:j,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}.bind(null,r)),d);c.exit().remove(),c.enter().append(\\\"g\\\").classed(n.cn.sankey,!0).style(\\\"box-sizing\\\",\\\"content-box\\\").style(\\\"position\\\",\\\"absolute\\\").style(\\\"left\\\",0).style(\\\"shape-rendering\\\",\\\"geometricPrecision\\\").style(\\\"pointer-events\\\",\\\"auto\\\").attr(\\\"transform\\\",T),c.transition().ease(n.ease).duration(n.duration).attr(\\\"transform\\\",T);var p=c.selectAll(\\\".\\\"+n.cn.sankeyLinks).data(g,d);p.enter().append(\\\"g\\\").classed(n.cn.sankeyLinks,!0).style(\\\"fill\\\",\\\"none\\\");var m=p.selectAll(\\\".\\\"+n.cn.sankeyLink).data(function(t){return t.sankey.links().filter(function(t){return t.value}).map(function(t,e,r){var n=a(r.color),i=r.source.label+\\\"|\\\"+r.target.label,s=t[i];t[i]=(s||0)+1;var l=i+\\\"__\\\"+t[i];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:l,traceId:e.key,link:r,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,interactionState:e.interactionState}}.bind(null,{},t))},d);m.enter().append(\\\"path\\\").classed(n.cn.sankeyLink,!0).attr(\\\"d\\\",_).call(I,c,i.linkEvents),m.style(\\\"stroke\\\",function(t){return A(t)?o.tinyRGB(a(t.linkLineColor)):t.tinyColorHue}).style(\\\"stroke-opacity\\\",function(t){return A(t)?o.opacity(t.linkLineColor):t.tinyColorAlpha}).style(\\\"stroke-width\\\",function(t){return A(t)?t.linkLineWidth:1}).style(\\\"fill\\\",function(t){return t.tinyColorHue}).style(\\\"fill-opacity\\\",function(t){return t.tinyColorAlpha}),m.transition().ease(n.ease).duration(n.duration).attr(\\\"d\\\",_),m.exit().transition().ease(n.ease).duration(n.duration).style(\\\"opacity\\\",0).remove();var y=c.selectAll(\\\".\\\"+n.cn.sankeyNodeSet).data(g,d);y.enter().append(\\\"g\\\").classed(n.cn.sankeyNodeSet,!0),y.style(\\\"cursor\\\",function(t){switch(t.arrangement){case\\\"fixed\\\":return\\\"default\\\";case\\\"perpendicular\\\":return\\\"ns-resize\\\";default:return\\\"move\\\"}});var w=y.selectAll(\\\".\\\"+n.cn.sankeyNode).data(function(t){var e=t.sankey.nodes();return function(t){var e,r=[];for(e=0;e<t.length;e++)t[e].originalX=t[e].x,t[e].originalY=t[e].y,-1===r.indexOf(t[e].x)&&r.push(t[e].x);for(r.sort(function(t,e){return t-e}),e=0;e<t.length;e++)t[e].originalLayerIndex=r.indexOf(t[e].originalX),t[e].originalLayer=t[e].originalLayerIndex/(r.length-1)}(e),e.filter(function(t){return t.value}).map(function(t,e,r){var i=a(r.color),s=n.nodePadAcross,l=e.nodePad/2,c=r.dx,u=Math.max(.5,r.dy),f=r.label,h=t[f];t[f]=(h||0)+1;var p=f+\\\"__\\\"+t[f];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:p,traceId:e.key,node:r,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(c),visibleHeight:u,zoneX:-s,zoneY:-l,zoneWidth:c+2*s,zoneHeight:u+2*l,labelY:e.horizontal?r.dy/2+1:r.dx/2+1,left:1===r.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:i.getBrightness()<=128,tinyColorHue:o.tinyRGB(i),tinyColorAlpha:i.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,p].join(\\\" \\\"),interactionState:e.interactionState}}.bind(null,{},t))},d);w.enter().append(\\\"g\\\").classed(n.cn.sankeyNode,!0).call(b).call(I,c,i.nodeEvents),w.call(P,m,i),w.transition().ease(n.ease).duration(n.duration).call(b),w.exit().transition().ease(n.ease).duration(n.duration).style(\\\"opacity\\\",0).remove();var k=w.selectAll(\\\".\\\"+n.cn.nodeRect).data(g);k.enter().append(\\\"rect\\\").classed(n.cn.nodeRect,!0).call(M),k.style(\\\"stroke-width\\\",function(t){return t.nodeLineWidth}).style(\\\"stroke\\\",function(t){return o.tinyRGB(a(t.nodeLineColor))}).style(\\\"stroke-opacity\\\",function(t){return o.opacity(t.nodeLineColor)}).style(\\\"fill\\\",function(t){return t.tinyColorHue}).style(\\\"fill-opacity\\\",function(t){return t.tinyColorAlpha}),k.transition().ease(n.ease).duration(n.duration).call(M);var D=w.selectAll(\\\".\\\"+n.cn.nodeCapture).data(g);D.enter().append(\\\"rect\\\").classed(n.cn.nodeCapture,!0).style(\\\"fill-opacity\\\",0),D.attr(\\\"x\\\",function(t){return t.zoneX}).attr(\\\"y\\\",function(t){return t.zoneY}).attr(\\\"width\\\",function(t){return t.zoneWidth}).attr(\\\"height\\\",function(t){return t.zoneHeight});var R=w.selectAll(\\\".\\\"+n.cn.nodeCentered).data(g);R.enter().append(\\\"g\\\").classed(n.cn.nodeCentered,!0).attr(\\\"transform\\\",S),R.transition().ease(n.ease).duration(n.duration).attr(\\\"transform\\\",S);var B=R.selectAll(\\\".\\\"+n.cn.nodeLabelGuide).data(g);B.enter().append(\\\"path\\\").classed(n.cn.nodeLabelGuide,!0).attr(\\\"id\\\",function(t){return t.uniqueNodeLabelPathId}).attr(\\\"d\\\",C).attr(\\\"transform\\\",E),B.transition().ease(n.ease).duration(n.duration).attr(\\\"d\\\",C).attr(\\\"transform\\\",E);var F=R.selectAll(\\\".\\\"+n.cn.nodeLabel).data(g);F.enter().append(\\\"text\\\").classed(n.cn.nodeLabel,!0).attr(\\\"transform\\\",L).style(\\\"user-select\\\",\\\"none\\\").style(\\\"cursor\\\",\\\"default\\\").style(\\\"fill\\\",\\\"black\\\"),F.style(\\\"text-shadow\\\",function(t){return t.horizontal?\\\"-1px 1px 1px #fff, 1px 1px 1px #fff, 1px -1px 1px #fff, -1px -1px 1px #fff\\\":\\\"none\\\"}).each(function(t){s.font(F,t.textFont)}),F.transition().ease(n.ease).duration(n.duration).attr(\\\"transform\\\",L);var N=F.selectAll(\\\".\\\"+n.cn.nodeLabelTextPath).data(g);N.enter().append(\\\"textPath\\\").classed(n.cn.nodeLabelTextPath,!0).attr(\\\"alignment-baseline\\\",\\\"middle\\\").attr(\\\"xlink:href\\\",function(t){return\\\"#\\\"+t.uniqueNodeLabelPathId}).attr(\\\"startOffset\\\",O).style(\\\"fill\\\",z),N.text(function(t){return t.horizontal||t.node.dy>5?t.node.label:\\\"\\\"}).attr(\\\"text-anchor\\\",function(t){return t.horizontal&&t.left?\\\"end\\\":\\\"start\\\"}),N.transition().ease(n.ease).duration(n.duration).attr(\\\"startOffset\\\",O).style(\\\"fill\\\",z)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"./constants\\\":1038,\\\"@plotly/d3-sankey\\\":46,d3:148,\\\"d3-force\\\":144,tinycolor2:514}],1043:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n.mergeArray(e.text,t,\\\"tx\\\"),n.mergeArray(e.hovertext,t,\\\"htx\\\"),n.mergeArray(e.customdata,t,\\\"data\\\"),n.mergeArray(e.textposition,t,\\\"tp\\\"),e.textfont&&(n.mergeArray(e.textfont.size,t,\\\"ts\\\"),n.mergeArray(e.textfont.color,t,\\\"tc\\\"),n.mergeArray(e.textfont.family,t,\\\"tf\\\"));var i=e.marker;if(i){n.mergeArray(i.size,t,\\\"ms\\\"),n.mergeArray(i.opacity,t,\\\"mo\\\"),n.mergeArray(i.symbol,t,\\\"mx\\\"),n.mergeArray(i.color,t,\\\"mc\\\");var a=i.line;i.line&&(n.mergeArray(a.color,t,\\\"mlc\\\"),n.mergeArray(a.width,t,\\\"mlw\\\"));var o=i.gradient;o&&\\\"none\\\"!==o.type&&(n.mergeArray(o.type,t,\\\"mgt\\\"),n.mergeArray(o.color,t,\\\"mgc\\\"))}}},{\\\"../../lib\\\":696}],1044:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../../plots/font_attributes\\\"),o=t(\\\"../../components/drawing/attributes\\\").dash,s=t(\\\"../../components/drawing\\\"),l=(t(\\\"./constants\\\"),t(\\\"../../lib/extend\\\").extendFlat);e.exports={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},x0:{valType:\\\"any\\\",dflt:0,editType:\\\"calc+clearAxisTypes\\\"},dx:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y0:{valType:\\\"any\\\",dflt:0,editType:\\\"calc+clearAxisTypes\\\"},dy:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},stackgroup:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},orientation:{valType:\\\"enumerated\\\",values:[\\\"v\\\",\\\"h\\\"],editType:\\\"calc\\\"},groupnorm:{valType:\\\"enumerated\\\",values:[\\\"\\\",\\\"fraction\\\",\\\"percent\\\"],dflt:\\\"\\\",editType:\\\"calc\\\"},stackgaps:{valType:\\\"enumerated\\\",values:[\\\"infer zero\\\",\\\"interpolate\\\"],dflt:\\\"infer zero\\\",editType:\\\"calc\\\"},text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"calc\\\"},hovertext:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0,editType:\\\"style\\\"},mode:{valType:\\\"flaglist\\\",flags:[\\\"lines\\\",\\\"markers\\\",\\\"text\\\"],extras:[\\\"none\\\"],editType:\\\"calc\\\"},hoveron:{valType:\\\"flaglist\\\",flags:[\\\"points\\\",\\\"fills\\\"],editType:\\\"style\\\"},line:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,dflt:2,editType:\\\"style\\\"},shape:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"spline\\\",\\\"hv\\\",\\\"vh\\\",\\\"hvh\\\",\\\"vhv\\\"],dflt:\\\"linear\\\",editType:\\\"plot\\\"},smoothing:{valType:\\\"number\\\",min:0,max:1.3,dflt:1,editType:\\\"plot\\\"},dash:l({},o,{editType:\\\"style\\\"}),simplify:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},editType:\\\"plot\\\"},connectgaps:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},cliponaxis:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"plot\\\"},fill:{valType:\\\"enumerated\\\",values:[\\\"none\\\",\\\"tozeroy\\\",\\\"tozerox\\\",\\\"tonexty\\\",\\\"tonextx\\\",\\\"toself\\\",\\\"tonext\\\"],editType:\\\"calc\\\"},fillcolor:{valType:\\\"color\\\",editType:\\\"style\\\"},marker:l({symbol:{valType:\\\"enumerated\\\",values:s.symbolList,dflt:\\\"circle\\\",arrayOk:!0,editType:\\\"style\\\"},opacity:{valType:\\\"number\\\",min:0,max:1,arrayOk:!0,editType:\\\"style\\\"},size:{valType:\\\"number\\\",min:0,dflt:6,arrayOk:!0,editType:\\\"calc\\\"},maxdisplayed:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"plot\\\"},sizeref:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},sizemin:{valType:\\\"number\\\",min:0,dflt:0,editType:\\\"calc\\\"},sizemode:{valType:\\\"enumerated\\\",values:[\\\"diameter\\\",\\\"area\\\"],dflt:\\\"diameter\\\",editType:\\\"calc\\\"},colorbar:i,line:l({width:{valType:\\\"number\\\",min:0,arrayOk:!0,editType:\\\"style\\\"},editType:\\\"calc\\\"},n(\\\"marker.line\\\")),gradient:{type:{valType:\\\"enumerated\\\",values:[\\\"radial\\\",\\\"horizontal\\\",\\\"vertical\\\",\\\"none\\\"],arrayOk:!0,dflt:\\\"none\\\",editType:\\\"calc\\\"},color:{valType:\\\"color\\\",arrayOk:!0,editType:\\\"calc\\\"},editType:\\\"calc\\\"},editType:\\\"calc\\\"},n(\\\"marker\\\")),selected:{marker:{opacity:{valType:\\\"number\\\",min:0,max:1,editType:\\\"style\\\"},color:{valType:\\\"color\\\",editType:\\\"style\\\"},size:{valType:\\\"number\\\",min:0,editType:\\\"style\\\"},editType:\\\"style\\\"},textfont:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},editType:\\\"style\\\"},editType:\\\"style\\\"},unselected:{marker:{opacity:{valType:\\\"number\\\",min:0,max:1,editType:\\\"style\\\"},color:{valType:\\\"color\\\",editType:\\\"style\\\"},size:{valType:\\\"number\\\",min:0,editType:\\\"style\\\"},editType:\\\"style\\\"},textfont:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},editType:\\\"style\\\"},editType:\\\"style\\\"},textposition:{valType:\\\"enumerated\\\",values:[\\\"top left\\\",\\\"top center\\\",\\\"top right\\\",\\\"middle left\\\",\\\"middle center\\\",\\\"middle right\\\",\\\"bottom left\\\",\\\"bottom center\\\",\\\"bottom right\\\"],dflt:\\\"middle center\\\",arrayOk:!0,editType:\\\"calc\\\"},textfont:a({editType:\\\"calc\\\",colorEditType:\\\"style\\\",arrayOk:!0}),r:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},t:{valType:\\\"data_array\\\",editType:\\\"calc\\\"}}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../components/drawing\\\":595,\\\"../../components/drawing/attributes\\\":594,\\\"../../lib/extend\\\":685,\\\"../../plots/font_attributes\\\":772,\\\"./constants\\\":1048}],1045:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../../constants/numerical\\\").BADNUM,s=t(\\\"./subtypes\\\"),l=t(\\\"./colorscale_calc\\\"),c=t(\\\"./arrays_to_calcdata\\\"),u=t(\\\"./calc_selection\\\");function f(t,e,r,n,i,o,l){var c=e._length,u=t._fullLayout,f=r._id,h=n._id,p=u._firstScatter[d(e)]===e.uid,v=(g(e,u,r,n)||{}).orientation,m=e.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},x={padded:!0};l&&(y.ppad=x.ppad=l);var b=c<2||i[0]!==i[c-1]||o[0]!==o[c-1];b&&(\\\"tozerox\\\"===m||\\\"tonextx\\\"===m&&(p||\\\"h\\\"===v))?y.tozero=!0:(e.error_y||{}).visible||\\\"tonexty\\\"!==m&&\\\"tozeroy\\\"!==m&&(s.hasMarkers(e)||s.hasText(e))||(y.padded=!1,y.ppad=0),b&&(\\\"tozeroy\\\"===m||\\\"tonexty\\\"===m&&(p||\\\"v\\\"===v))?x.tozero=!0:\\\"tonextx\\\"!==m&&\\\"tozerox\\\"!==m||(x.padded=!1),f&&(e._extremes[f]=a.findExtremes(r,i,y)),h&&(e._extremes[h]=a.findExtremes(n,o,x))}function h(t,e){if(s.hasMarkers(t)){var r,n=t.marker,o=1.6*(t.marker.sizeref||1);if(r=\\\"area\\\"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/o),3)}:function(t){return Math.max((t||0)/o,3)},i.isArrayOrTypedArray(n.size)){var l={type:\\\"linear\\\"};a.setConvert(l);for(var c=l.makeCalcdata(t.marker,\\\"size\\\"),u=new Array(e),f=0;f<e;f++)u[f]=r(c[f]);return u}return r(n.size)}}function p(t,e){var r=d(e),n=t._firstScatter;n[r]||(n[r]=e.uid)}function d(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?\\\"-\\\"+e:\\\"\\\")}function g(t,e,r,n){var i=t.stackgroup;if(i){var a=e._scatterStackOpts[r._id+n._id][i],o=\\\"v\\\"===a.orientation?n:r;return\\\"linear\\\"===o.type||\\\"log\\\"===o.type?a:void 0}}e.exports={calc:function(t,e){var r,s,d,v,m,y,x=t._fullLayout,b=a.getFromId(t,e.xaxis||\\\"x\\\"),_=a.getFromId(t,e.yaxis||\\\"y\\\"),w=b.makeCalcdata(e,\\\"x\\\"),k=_.makeCalcdata(e,\\\"y\\\"),M=e._length,A=new Array(M),T=e.ids,S=g(e,x,b,_),C=!1;p(x,e);var E,L=\\\"x\\\",z=\\\"y\\\";for(S?(S.traceIndices.push(e.index),(r=\\\"v\\\"===S.orientation)?(z=\\\"s\\\",E=\\\"x\\\"):(L=\\\"s\\\",E=\\\"y\\\"),m=\\\"interpolate\\\"===S.stackgaps):f(t,e,b,_,w,k,h(e,M)),s=0;s<M;s++){var O=A[s]={},I=n(w[s]),P=n(k[s]);I&&P?(O[L]=w[s],O[z]=k[s]):S&&(r?I:P)?(O[E]=r?w[s]:k[s],O.gap=!0,m?(O.s=o,C=!0):O.s=0):O[L]=O[z]=o,T&&(O.id=String(T[s]))}if(c(A,e),l(e),u(A,e),S){for(s=0;s<A.length;)A[s][E]===o?A.splice(s,1):s++;if(i.sort(A,function(t,e){return t[E]-e[E]||t.i-e.i}),C){for(s=0;s<A.length-1&&A[s].gap;)s++;for((y=A[s].s)||(y=A[s].s=0),d=0;d<s;d++)A[d].s=y;for(v=A.length-1;v>s&&A[v].gap;)v--;for(y=A[v].s,d=A.length-1;d>v;d--)A[d].s=y;for(;s<v;)if(A[++s].gap){for(d=s+1;A[d].gap;)d++;for(var D=A[s-1][E],R=A[s-1].s,B=(A[d].s-R)/(A[d][E]-D);s<d;)A[s].s=R+(A[s][E]-D)*B,s++}}}return A},calcMarkerSize:h,calcAxisExpansion:f,setFirstScatter:p,getStackOpts:g}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"./arrays_to_calcdata\\\":1043,\\\"./calc_selection\\\":1046,\\\"./colorscale_calc\\\":1047,\\\"./subtypes\\\":1068,\\\"fast-isnumeric\\\":214}],1046:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&&n.tagSelected(t,e)}},{\\\"../../lib\\\":696}],1047:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/has_colorscale\\\"),i=t(\\\"../../components/colorscale/calc\\\"),a=t(\\\"./subtypes\\\");e.exports=function(t){a.hasLines(t)&&n(t,\\\"line\\\")&&i(t,t.line.color,\\\"line\\\",\\\"c\\\"),a.hasMarkers(t)&&(n(t,\\\"marker\\\")&&i(t,t.marker.color,\\\"marker\\\",\\\"c\\\"),n(t,\\\"marker.line\\\")&&i(t,t.marker.line.color,\\\"marker.line\\\",\\\"c\\\"))}},{\\\"../../components/colorscale/calc\\\":578,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"./subtypes\\\":1068}],1048:[function(t,e,r){\\\"use strict\\\";e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20}},{}],1049:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./calc\\\");function i(t,e,r,n,i,a,o){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,t.splice(e,0,s),e&&r===t[e-1][o]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&&(s.s=function(t,e,r,n){var i=t[e-1],a=t[e+1];return a?i?i.s+(a.s-i.s)*(r-i[n])/(a[n]-i[n]):a.s:i.s}(t,e,r,o));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}e.exports=function(t,e){var r=e.xaxis,a=e.yaxis,o=r._id+a._id,s=t._fullLayout._scatterStackOpts[o];if(s){var l,c,u,f,h,p,d,g,v,m,y,x,b,_,w,k=t.calcdata;for(var M in s){var A=(m=s[M]).traceIndices;if(A.length){for(y=\\\"interpolate\\\"===m.stackgaps,x=m.groupnorm,\\\"v\\\"===m.orientation?(b=\\\"x\\\",_=\\\"y\\\"):(b=\\\"y\\\",_=\\\"x\\\"),w=new Array(A.length),l=0;l<w.length;l++)w[l]=!1;p=k[A[0]];var T=new Array(p.length);for(l=0;l<p.length;l++)T[l]=p[l][b];for(l=1;l<A.length;l++){for(h=k[A[l]],c=u=0;c<h.length;c++){for(d=h[c][b];d>T[u]&&u<T.length;u++)i(h,c,T[u],l,w,y,b),c++;if(d!==T[u]){for(f=0;f<l;f++)i(k[A[f]],u,d,f,w,y,b);T.splice(u,0,d)}u++}for(;u<T.length;u++)i(h,c,T[u],l,w,y,b),c++}var S=T.length;for(c=0;c<p.length;c++){for(g=p[c][_]=p[c].s,l=1;l<A.length;l++)(h=k[A[l]])[0].trace._rawLength=h[0].trace._length,h[0].trace._length=S,g+=h[c].s,h[c][_]=g;if(x)for(v=(\\\"fraction\\\"===x?g:g/100)||1,l=0;l<A.length;l++){var C=k[A[l]][c];C[_]/=v,C.sNorm=C.s/v}}for(l=0;l<A.length;l++){var E=(h=k[A[l]])[0].trace,L=n.calcMarkerSize(E,E._rawLength),z=Array.isArray(L);if(L&&w[l]||z){var O=L;for(L=new Array(S),c=0;c<S;c++)L[c]=h[c].gap?0:z?O[h[c].i]:O}var I=new Array(S),P=new Array(S);for(c=0;c<S;c++)I[c]=h[c].x,P[c]=h[c].y;n.calcAxisExpansion(t,E,r,a,I,P,L),h[0].t.orientation=m.orientation}}}}}},{\\\"./calc\\\":1045}],1050:[function(t,e,r){\\\"use strict\\\";e.exports=function(t){for(var e=0;e<t.length;e++){var r=t[e];if(\\\"scatter\\\"===r.type){var n=r.fill;if(\\\"none\\\"!==n&&\\\"toself\\\"!==n&&(r.opacity=void 0,\\\"tonexty\\\"===n||\\\"tonextx\\\"===n))for(var i=e-1;i>=0;i--){var a=t[i];if(\\\"scatter\\\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],1051:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"./constants\\\"),s=t(\\\"./subtypes\\\"),l=t(\\\"./xy_defaults\\\"),c=t(\\\"./stack_defaults\\\"),u=t(\\\"./marker_defaults\\\"),f=t(\\\"./line_defaults\\\"),h=t(\\\"./line_shape_defaults\\\"),p=t(\\\"./text_defaults\\\"),d=t(\\\"./fillcolor_defaults\\\");e.exports=function(t,e,r,g){function v(r,i){return n.coerce(t,e,a,r,i)}var m=l(t,e,g,v);if(m||(e.visible=!1),e.visible){var y=c(t,e,g,v),x=!y&&m<o.PTS_LINESONLY?\\\"lines+markers\\\":\\\"lines\\\";v(\\\"text\\\"),v(\\\"hovertext\\\"),v(\\\"mode\\\",x),s.hasLines(e)&&(f(t,e,r,g,v),h(t,e,v),v(\\\"connectgaps\\\"),v(\\\"line.simplify\\\")),s.hasMarkers(e)&&u(t,e,r,g,v,{gradient:!0}),s.hasText(e)&&p(t,e,g,v);var b=[];(s.hasMarkers(e)||s.hasText(e))&&(v(\\\"cliponaxis\\\"),v(\\\"marker.maxdisplayed\\\"),b.push(\\\"points\\\")),v(\\\"fill\\\",y?y.fillDflt:\\\"none\\\"),\\\"none\\\"!==e.fill&&(d(t,e,r,v),s.hasLines(e)||h(t,e,v)),\\\"tonext\\\"!==e.fill&&\\\"toself\\\"!==e.fill||b.push(\\\"fills\\\"),v(\\\"hoveron\\\",b.join(\\\"+\\\")||\\\"points\\\");var _=i.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");_(t,e,r,{axis:\\\"y\\\"}),_(t,e,r,{axis:\\\"x\\\",inherit:\\\"y\\\"}),n.coerceSelectionMarkerOpacity(e,v)}}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":1044,\\\"./constants\\\":1048,\\\"./fillcolor_defaults\\\":1053,\\\"./line_defaults\\\":1057,\\\"./line_shape_defaults\\\":1059,\\\"./marker_defaults\\\":1063,\\\"./stack_defaults\\\":1066,\\\"./subtypes\\\":1068,\\\"./text_defaults\\\":1069,\\\"./xy_defaults\\\":1070}],1052:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");function i(t){return t||0===t}e.exports=function(t,e,r){var a=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},o=n.extractOption(t,e,\\\"htx\\\",\\\"hovertext\\\");if(i(o))return a(o);var s=n.extractOption(t,e,\\\"tx\\\",\\\"text\\\");return i(s)?a(s):void 0}},{\\\"../../lib\\\":696}],1053:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../lib\\\").isArrayOrTypedArray;e.exports=function(t,e,r,a){var o=!1;if(e.marker){var s=e.marker.color,l=(e.marker.line||{}).color;s&&!i(s)?o=s:l&&!i(l)&&(o=l)}a(\\\"fillcolor\\\",n.addOpacity((e.line||{}).color||o||r,.5))}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696}],1054:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"./subtypes\\\");e.exports=function(t,e){var r,a;if(\\\"lines\\\"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if(\\\"none\\\"===t.mode)return t.fill?t.fillcolor:\\\"\\\";var o=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(a=o&&n.opacity(o)?o:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:\\\"\\\")?n.opacity(a)<.3?n.addOpacity(a,.3):a:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},{\\\"../../components/color\\\":570,\\\"./subtypes\\\":1068}],1055:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/fx\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"./get_trace_color\\\"),s=t(\\\"../../components/color\\\"),l=t(\\\"./fill_hover_text\\\");e.exports=function(t,e,r,c){var u=t.cd,f=u[0].trace,h=t.xa,p=t.ya,d=h.c2p(e),g=p.c2p(r),v=[d,g],m=f.hoveron||\\\"\\\",y=-1!==f.mode.indexOf(\\\"markers\\\")?3:.5;if(-1!==m.indexOf(\\\"points\\\")){var x=function(t){var e=Math.max(y,t.mrc||0),r=h.c2p(t.x)-d,n=p.c2p(t.y)-g;return Math.max(Math.sqrt(r*r+n*n)-e,1-y/e)},b=i.getDistanceFunction(c,function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(h.c2p(t.x)-d);return n<e?r*n/e:n-e+r},function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(p.c2p(t.y)-g);return n<e?r*n/e:n-e+r},x);if(i.getClosest(u,b,t),!1!==t.index){var _=u[t.index],w=h.c2p(_.x,!0),k=p.c2p(_.y,!0),M=_.mrc||1;t.index=_.i;var A=u[0].t.orientation,T=A&&(_.sNorm||_.s),S=\\\"h\\\"===A?T:_.x,C=\\\"v\\\"===A?T:_.y;return n.extendFlat(t,{color:o(f,_),x0:w-M,x1:w+M,xLabelVal:S,y0:k-M,y1:k+M,yLabelVal:C,spikeDistance:x(_)}),l(_,f,t),a.getComponentMethod(\\\"errorbars\\\",\\\"hoverInfo\\\")(_,f,t),[t]}}if(-1!==m.indexOf(\\\"fills\\\")&&f._polygons){var E,L,z,O,I,P,D,R,B,F=f._polygons,N=[],j=!1,V=1/0,U=-1/0,q=1/0,H=-1/0;for(E=0;E<F.length;E++)(z=F[E]).contains(v)&&(j=!j,N.push(z),q=Math.min(q,z.ymin),H=Math.max(H,z.ymax));if(j){var G=((q=Math.max(q,0))+(H=Math.min(H,p._length)))/2;for(E=0;E<N.length;E++)for(O=N[E].pts,L=1;L<O.length;L++)(R=O[L-1][1])>G!=(B=O[L][1])>=G&&(P=O[L-1][0],D=O[L][0],B-R&&(I=P+(D-P)*(G-R)/(B-R),V=Math.min(V,I),U=Math.max(U,I)));V=Math.max(V,0),U=Math.min(U,h._length);var W=s.defaultLine;return s.opacity(f.fillcolor)?W=f.fillcolor:s.opacity((f.line||{}).color)&&(W=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:V,x1:U,y0:G,y1:G,color:W}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\\\"../../components/color\\\":570,\\\"../../components/fx\\\":612,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./fill_hover_text\\\":1052,\\\"./get_trace_color\\\":1054}],1056:[function(t,e,r){\\\"use strict\\\";var n={},i=t(\\\"./subtypes\\\");n.hasLines=i.hasLines,n.hasMarkers=i.hasMarkers,n.hasText=i.hasText,n.isBubble=i.isBubble,n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.crossTraceDefaults=t(\\\"./cross_trace_defaults\\\"),n.calc=t(\\\"./calc\\\").calc,n.crossTraceCalc=t(\\\"./cross_trace_calc\\\"),n.arraysToCalcdata=t(\\\"./arrays_to_calcdata\\\"),n.plot=t(\\\"./plot\\\"),n.colorbar=t(\\\"./marker_colorbar\\\"),n.style=t(\\\"./style\\\").style,n.styleOnSelect=t(\\\"./style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.selectPoints=t(\\\"./select\\\"),n.animatable=!0,n.moduleType=\\\"trace\\\",n.name=\\\"scatter\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"cartesian\\\",\\\"svg\\\",\\\"symbols\\\",\\\"errorBarsOK\\\",\\\"showLegend\\\",\\\"scatter-like\\\",\\\"zoomScale\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"./arrays_to_calcdata\\\":1043,\\\"./attributes\\\":1044,\\\"./calc\\\":1045,\\\"./cross_trace_calc\\\":1049,\\\"./cross_trace_defaults\\\":1050,\\\"./defaults\\\":1051,\\\"./hover\\\":1055,\\\"./marker_colorbar\\\":1062,\\\"./plot\\\":1064,\\\"./select\\\":1065,\\\"./style\\\":1067,\\\"./subtypes\\\":1068}],1057:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\").isArrayOrTypedArray,i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\");e.exports=function(t,e,r,o,s,l){var c=(t.marker||{}).color;(s(\\\"line.color\\\",r),i(t,\\\"line\\\"))?a(t,e,o,s,{prefix:\\\"line.\\\",cLetter:\\\"c\\\",noScale:!0}):s(\\\"line.color\\\",!n(c)&&c||r);s(\\\"line.width\\\"),(l||{}).noDash||s(\\\"line.dash\\\")}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"../../lib\\\":696}],1058:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../constants/numerical\\\"),i=n.BADNUM,a=n.LOG_CLIP,o=a+.5,s=a-.5,l=t(\\\"../../lib\\\"),c=l.segmentsIntersect,u=l.constrain,f=t(\\\"./constants\\\");e.exports=function(t,e){var r,n,a,h,p,d,g,v,m,y,x,b,_,w,k,M,A,T,S=e.xaxis,C=e.yaxis,E=\\\"log\\\"===S.type,L=\\\"log\\\"===C.type,z=S._length,O=C._length,I=e.connectGaps,P=e.baseTolerance,D=e.shape,R=\\\"linear\\\"===D,B=[],F=f.minTolerance,N=new Array(t.length),j=0;function V(e){var r=t[e];if(!r)return!1;var n=S.c2p(r.x),a=C.c2p(r.y);if(n===i){if(E&&(n=S.c2p(r.x,!0)),n===i)return!1;L&&a===i&&(n*=Math.abs(S._m*O*(S._m>0?o:s)/(C._m*z*(C._m>0?o:s)))),n*=1e3}if(a===i){if(L&&(a=C.c2p(r.y,!0)),a===i)return!1;a*=1e3}return[n,a]}function U(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,c=i*o+a*s;if(c>0&&c<l){var u=o*a-s*i;if(u*u<l)return!0}}function q(t,e){var r=t[0]/z,n=t[1]/O,i=Math.max(0,-r,r-1,-n,n-1);return i&&void 0!==A&&U(r,n,A,T)&&(i=0),i&&e&&U(r,n,e[0]/z,e[1]/O)&&(i=0),(1+f.toleranceGrowth*i)*P}function H(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}var G,W,Y,X,Z,$,J,K=f.maxScreensAway,Q=-z*K,tt=z*(1+K),et=-O*K,rt=O*(1+K),nt=[[Q,et,tt,et],[tt,et,tt,rt],[tt,rt,Q,rt],[Q,rt,Q,et]];function it(t){if(t[0]<Q||t[0]>tt||t[1]<et||t[1]>rt)return[u(t[0],Q,tt),u(t[1],et,rt)]}function at(t,e){return t[0]===e[0]&&(t[0]===Q||t[0]===tt)||(t[1]===e[1]&&(t[1]===et||t[1]===rt)||void 0)}function ot(t,e,r){return function(n,i){var a=it(n),o=it(i),s=[];if(a&&o&&at(a,o))return s;a&&s.push(a),o&&s.push(o);var c=2*l.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);c&&((a&&o?c>0==a[t]>o[t]?a:o:a||o)[t]+=c);return s}}function st(t){var e=t[0],r=t[1],n=e===N[j-1][0],i=r===N[j-1][1];if(!n||!i)if(j>1){var a=e===N[j-2][0],o=r===N[j-2][1];n&&(e===Q||e===tt)&&a?o?j--:N[j-1]=t:i&&(r===et||r===rt)&&o?a?j--:N[j-1]=t:N[j++]=t}else N[j++]=t}function lt(t){N[j-1][0]!==t[0]&&N[j-1][1]!==t[1]&&st([Y,X]),st(t),Z=null,Y=X=0}function ct(t){if(A=t[0]/z,T=t[1]/O,G=t[0]<Q?Q:t[0]>tt?tt:0,W=t[1]<et?et:t[1]>rt?rt:0,G||W){if(j)if(Z){var e=J(Z,t);e.length>1&&(lt(e[0]),N[j++]=e[1])}else $=J(N[j-1],t)[0],N[j++]=$;else N[j++]=[G||t[0],W||t[1]];var r=N[j-1];G&&W&&(r[0]!==G||r[1]!==W)?(Z&&(Y!==G&&X!==W?st(Y&&X?(n=Z,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?Q:tt,rt]:[o>0?tt:Q,et]):[Y||G,X||W]):Y&&X&&st([Y,X])),st([G,W])):Y-G&&X-W&&st([G||Y,W||X]),Z=t,Y=G,X=W}else Z&&lt(J(Z,t)[0]),N[j++]=t;var n,i,a,o}for(\\\"linear\\\"===D||\\\"spline\\\"===D?J=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=nt[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&H(o,t)<H(r[0],t)?r.unshift(o):r.push(o),n++)}return r}:\\\"hv\\\"===D||\\\"vh\\\"===D?J=function(t,e){var r=[],n=it(t),i=it(e);return n&&i&&at(n,i)?r:(n&&r.push(n),i&&r.push(i),r)}:\\\"hvh\\\"===D?J=ot(0,Q,tt):\\\"vhv\\\"===D&&(J=ot(1,et,rt)),r=0;r<t.length;r++)if(n=V(r)){for(j=0,Z=null,ct(n),r++;r<t.length;r++){if(!(h=V(r))){if(I)continue;break}if(R&&e.simplify){var ut=V(r+1);if(!((y=H(h,n))<q(h,ut)*F)){for(v=[(h[0]-n[0])/y,(h[1]-n[1])/y],p=n,x=y,b=w=k=0,g=!1,a=h,r++;r<t.length;r++){if(d=ut,ut=V(r+1),!d){if(I)continue;break}if(M=(m=[d[0]-n[0],d[1]-n[1]])[0]*v[1]-m[1]*v[0],w=Math.min(w,M),(k=Math.max(k,M))-w>q(d,ut))break;a=d,(_=m[0]*v[0]+m[1]*v[1])>x?(x=_,h=d,g=!1):_<b&&(b=_,p=d,g=!0)}if(g?(ct(h),a!==p&&ct(p)):(p!==n&&ct(p),a!==h&&ct(h)),ct(a),r>=t.length||!d)break;ct(d),n=d}}else ct(h)}Z&&st([Y||Z[0],X||Z[1]]),B.push(N.slice(0,j))}return B}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"./constants\\\":1048}],1059:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r){\\\"spline\\\"===r(\\\"line.shape\\\")&&r(\\\"line.smoothing\\\")}},{}],1060:[function(t,e,r){\\\"use strict\\\";var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var i,a,o,s,l,c={},u=!1,f=-1,h=0,p=-1;for(a=0;a<r.length;a++)(o=(i=r[a][0].trace).stackgroup||\\\"\\\")?o in c?l=c[o]:(l=c[o]=h,h++):i.fill in n&&p>=0?l=p:(l=p=h,h++),l<f&&(u=!0),i._groupIndex=f=l;var d=r.slice();u&&d.sort(function(t,e){var r=t[0].trace,n=e[0].trace;return r._groupIndex-n._groupIndex||r.index-n.index});var g={};for(a=0;a<d.length;a++)o=(i=d[a][0].trace).stackgroup||\\\"\\\",!0===i.visible?(i._nexttrace=null,i.fill in n&&(s=g[o],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&(\\\"tozero\\\"===i.fill.substr(0,6)||\\\"toself\\\"===i.fill||\\\"to\\\"===i.fill.substr(0,2)&&!i._prevtrace),g[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return d}},{}],1061:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\");e.exports=function(t){var e=t.marker,r=e.sizeref||1,i=e.sizemin||0,a=\\\"area\\\"===e.sizemode?function(t){return Math.sqrt(t/r)}:function(t){return t/r};return function(t){var e=a(t/2);return n(e)&&e>0?Math.max(e,i):0}}},{\\\"fast-isnumeric\\\":214}],1062:[function(t,e,r){\\\"use strict\\\";e.exports={container:\\\"marker\\\",min:\\\"cmin\\\",max:\\\"cmax\\\"}},{}],1063:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../components/colorscale/has_colorscale\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"./subtypes\\\");e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),f=(t.line||{}).color;(c=c||{},f&&(r=f),l(\\\"marker.symbol\\\"),l(\\\"marker.opacity\\\",u?.7:1),l(\\\"marker.size\\\"),l(\\\"marker.color\\\",r),i(t,\\\"marker\\\")&&a(t,e,s,l,{prefix:\\\"marker.\\\",cLetter:\\\"c\\\"}),c.noSelect||(l(\\\"selected.marker.color\\\"),l(\\\"unselected.marker.color\\\"),l(\\\"selected.marker.size\\\"),l(\\\"unselected.marker.size\\\")),c.noLine||(l(\\\"marker.line.color\\\",f&&!Array.isArray(f)&&e.marker.color!==f?f:u?n.background:n.defaultLine),i(t,\\\"marker.line\\\")&&a(t,e,s,l,{prefix:\\\"marker.line.\\\",cLetter:\\\"c\\\"}),l(\\\"marker.line.width\\\",u?1:0)),u&&(l(\\\"marker.sizeref\\\"),l(\\\"marker.sizemin\\\"),l(\\\"marker.sizemode\\\")),c.gradient)&&(\\\"none\\\"!==l(\\\"marker.gradient.type\\\")&&l(\\\"marker.gradient.color\\\"))}},{\\\"../../components/color\\\":570,\\\"../../components/colorscale/defaults\\\":580,\\\"../../components/colorscale/has_colorscale\\\":584,\\\"./subtypes\\\":1068}],1064:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib\\\"),o=a.ensureSingle,s=a.identity,l=t(\\\"../../components/drawing\\\"),c=t(\\\"./subtypes\\\"),u=t(\\\"./line_points\\\"),f=t(\\\"./link_traces\\\"),h=t(\\\"../../lib/polygon\\\").tester;function p(t,e,r,f,p,d,g){var v;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,u=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(!c.hasMarkers(h))return;var p=h.marker.maxdisplayed;if(0===p)return;var d=i.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]}),g=Math.ceil(d.length/p),v=0;o.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<e&&v++});var m=Math.round(v*g/3+Math.floor(v/3)*g/7.1);i.forEach(function(t){delete t.vis}),d.forEach(function(t,e){0===Math.round((e+m)%g)&&(t.vis=!0)})}(0,e,r,f,p);var m=!!g&&g.duration>0;function y(t){return m?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,k=n.select(d),M=o(k,\\\"g\\\",\\\"errorbars\\\"),A=o(k,\\\"g\\\",\\\"lines\\\"),T=o(k,\\\"g\\\",\\\"points\\\"),S=o(k,\\\"g\\\",\\\"text\\\");if(i.getComponentMethod(\\\"errorbars\\\",\\\"plot\\\")(M,r,g),!0===_.visible){var C,E;y(k).style(\\\"opacity\\\",_.opacity);var L=_.fill.charAt(_.fill.length-1);\\\"x\\\"!==L&&\\\"y\\\"!==L&&(L=\\\"\\\"),r.isRangePlot||(f[0].node3=k);var z=\\\"\\\",O=[],I=_._prevtrace;I&&(z=I._prevRevpath||\\\"\\\",E=I._nextFill,O=I._polygons);var P,D,R,B,F,N,j,V,U,q=\\\"\\\",H=\\\"\\\",G=[],W=a.noop;if(C=_._ownFill,c.hasLines(_)||\\\"none\\\"!==_.fill){for(E&&E.datum(f),-1!==[\\\"hv\\\",\\\"vh\\\",\\\"hvh\\\",\\\"vhv\\\"].indexOf(w.shape)?(R=l.steps(w.shape),B=l.steps(w.shape.split(\\\"\\\").reverse().join(\\\"\\\"))):R=B=\\\"spline\\\"===w.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return\\\"M\\\"+t.join(\\\"L\\\")},F=function(t){return B(t.reverse())},G=u(f,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify}),U=_._polygons=new Array(G.length),v=0;v<G.length;v++)_._polygons[v]=h(G[v]);G.length&&(N=G[0][0],V=(j=G[G.length-1])[j.length-1]),W=function(t){return function(e){if(P=R(e),D=F(e),q?L?(q+=\\\"L\\\"+P.substr(1),H=D+\\\"L\\\"+H.substr(1)):(q+=\\\"Z\\\"+P,H=D+\\\"Z\\\"+H):(q=P,H=D),c.hasLines(_)&&e.length>1){var r=n.select(this);if(r.datum(f),t)y(r.style(\\\"opacity\\\",0).attr(\\\"d\\\",P).call(l.lineGroupStyle)).style(\\\"opacity\\\",1);else{var i=y(r);i.attr(\\\"d\\\",P),l.singleLineStyle(f,i)}}}}}var Y=A.selectAll(\\\".js-line\\\").data(G);y(Y.exit()).style(\\\"opacity\\\",0).remove(),Y.each(W(!1)),Y.enter().append(\\\"path\\\").classed(\\\"js-line\\\",!0).style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").call(l.lineGroupStyle).each(W(!0)),l.setClipUrl(Y,r.layerClipId),G.length?(C?(C.datum(f),N&&V&&(L?(\\\"y\\\"===L?N[1]=V[1]=b.c2p(0,!0):\\\"x\\\"===L&&(N[0]=V[0]=x.c2p(0,!0)),y(C).attr(\\\"d\\\",\\\"M\\\"+V+\\\"L\\\"+N+\\\"L\\\"+q.substr(1)).call(l.singleFillStyle)):y(C).attr(\\\"d\\\",q+\\\"Z\\\").call(l.singleFillStyle))):E&&(\\\"tonext\\\"===_.fill.substr(0,6)&&q&&z?(\\\"tonext\\\"===_.fill?y(E).attr(\\\"d\\\",q+\\\"Z\\\"+z+\\\"Z\\\").call(l.singleFillStyle):y(E).attr(\\\"d\\\",q+\\\"L\\\"+z.substr(1)+\\\"Z\\\").call(l.singleFillStyle),_._polygons=_._polygons.concat(O)):(Z(E),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=U):(C?Z(C):E&&Z(E),_._polygons=_._prevRevpath=_._prevPolygons=null),T.datum(f),S.datum(f),function(e,i,a){var o,u=a[0].trace,f=c.hasMarkers(u),h=c.hasText(u),p=tt(u),d=et,g=et;if(f||h){var v=s,_=u.stackgroup,w=_&&\\\"infer zero\\\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?v=w?J:$:_&&!w&&(v=K),f&&(d=v),h&&(g=v)}var k,M=(o=e.selectAll(\\\"path.point\\\").data(d,p)).enter().append(\\\"path\\\").classed(\\\"point\\\",!0);m&&M.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style(\\\"opacity\\\",0).transition().style(\\\"opacity\\\",1),o.order(),f&&(k=l.makePointStyleFns(u)),o.each(function(e){var i=n.select(this),a=y(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,u,k,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,x,b,u.xcalendar,u.ycalendar),u.customdata&&i.classed(\\\"plotly-customdata\\\",null!==e.data&&void 0!==e.data)):a.remove()}),m?o.exit().transition().style(\\\"opacity\\\",0).remove():o.exit().remove(),(o=i.selectAll(\\\"g\\\").data(g,p)).enter().append(\\\"g\\\").classed(\\\"textpoint\\\",!0).append(\\\"text\\\"),o.order(),o.each(function(t){var e=n.select(this),i=y(e.select(\\\"text\\\"));l.translatePoint(t,i,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()}),o.selectAll(\\\"text\\\").call(l.textPointStyle,u,t).each(function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll(\\\"tspan.line\\\").each(function(){y(n.select(this)).attr({x:e,y:r})})}),o.exit().remove()}(T,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(T,X),l.setClipUrl(S,X)}function Z(t){y(t).attr(\\\"d\\\",\\\"M0,0Z\\\")}function $(t){return t.filter(function(t){return!t.gap&&t.vis})}function J(t){return t.filter(function(t){return t.vis})}function K(t){return t.filter(function(t){return!t.gap})}function Q(t){return t.id}function tt(t){if(t.ids)return Q}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,v=f(t,e,r);((u=i.selectAll(\\\"g.trace\\\").data(v,function(t){return t[0].trace.uid})).enter().append(\\\"g\\\").attr(\\\"class\\\",function(t){return\\\"trace scatter trace\\\"+t[0].trace.uid}).style(\\\"stroke-miterlimit\\\",2),u.order(),function(t,e,r){e.each(function(t){var e=o(n.select(this),\\\"g\\\",\\\"fills\\\");l.setClipUrl(e,r.layerClipId);var i=t[0].trace,a=[];i._ownfill&&a.push(\\\"_ownFill\\\"),i._nexttrace&&a.push(\\\"_nextFill\\\");var c=e.selectAll(\\\"g\\\").data(a,s);c.enter().append(\\\"g\\\"),c.exit().each(function(t){i[t]=null}).remove(),c.order().each(function(t){i[t]=o(n.select(this),\\\"path\\\",\\\"js-fill\\\")})})}(0,u,e),g)?(c&&(h=c()),n.transition().duration(a.duration).ease(a.easing).each(\\\"end\\\",function(){h&&h()}).each(\\\"interrupt\\\",function(){h&&h()}).each(function(){i.selectAll(\\\"g.trace\\\").each(function(r,n){p(t,n,e,r,v,this,a)})})):u.each(function(r,n){p(t,n,e,r,v,this,a)});d&&u.exit().remove(),i.selectAll(\\\"path:not([d])\\\").remove()}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/polygon\\\":709,\\\"../../registry\\\":828,\\\"./line_points\\\":1058,\\\"./link_traces\\\":1060,\\\"./subtypes\\\":1068,d3:148}],1065:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./subtypes\\\");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)i=s[r],a=l.c2p(i.x),o=c.c2p(i.y),null!==i.i&&e.contains([a,o],!1,r,t)?(u.push({pointNumber:i.i,x:l.c2d(i.x),y:c.c2d(i.y)}),i.selected=1):i.selected=0;return u}},{\\\"./subtypes\\\":1068}],1066:[function(t,e,r){\\\"use strict\\\";var n=[\\\"orientation\\\",\\\"groupnorm\\\",\\\"stackgaps\\\"];e.exports=function(t,e,r,i){var a=r._scatterStackOpts,o=i(\\\"stackgroup\\\");if(o){var s=e.xaxis+e.yaxis,l=a[s];l||(l=a[s]={});var c=l[o],u=!1;c?c.traces.push(e):(c=l[o]={traceIndices:[],traces:[e]},u=!0);for(var f={orientation:e.x&&!e.y?\\\"h\\\":\\\"v\\\"},h=0;h<n.length;h++){var p=n[h],d=p+\\\"Found\\\";if(!c[d]){var g=void 0!==t[p],v=\\\"orientation\\\"===p;if((g||u)&&(c[p]=i(p,f[p]),v&&(c.fillDflt=\\\"h\\\"===c[p]?\\\"tonextx\\\":\\\"tonexty\\\"),g&&(c[d]=!0,!u&&(delete c.traces[0][p],v))))for(var m=0;m<c.traces.length-1;m++){var y=c.traces[m];y._input.fill!==y.fill&&(y.fill=c.fillDflt)}}}return c}}},{}],1067:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"../../registry\\\");function o(t,e,r){i.pointStyle(t.selectAll(\\\"path.point\\\"),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll(\\\"text\\\"),e,r)}e.exports={style:function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.trace.scatter\\\");r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),r.selectAll(\\\"g.points\\\").each(function(e){o(n.select(this),e.trace||e[0].trace,t)}),r.selectAll(\\\"g.text\\\").each(function(e){s(n.select(this),e.trace||e[0].trace,t)}),r.selectAll(\\\"g.trace path.js-line\\\").call(i.lineGroupStyle),r.selectAll(\\\"g.trace path.js-fill\\\").call(i.fillGroupStyle),a.getComponentMethod(\\\"errorbars\\\",\\\"style\\\")(r)},stylePoints:o,styleText:s,styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll(\\\"path.point\\\"),n),i.selectedTextStyle(r.selectAll(\\\"text\\\"),n)):(o(r,n,t),s(r,n,t))}}},{\\\"../../components/drawing\\\":595,\\\"../../registry\\\":828,d3:148}],1068:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\\\"lines\\\")},hasMarkers:function(t){return t.visible&&(t.mode&&-1!==t.mode.indexOf(\\\"markers\\\")||\\\"splom\\\"===t.type)},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\\\"text\\\")},isBubble:function(t){return n.isPlainObject(t.marker)&&n.isArrayOrTypedArray(t.marker.size)}}},{\\\"../../lib\\\":696}],1069:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\");e.exports=function(t,e,r,i,a){a=a||{},i(\\\"textposition\\\"),n.coerceFont(i,\\\"textfont\\\",r.font),a.noSelect||(i(\\\"selected.textfont.color\\\"),i(\\\"unselected.textfont.color\\\"))}},{\\\"../../lib\\\":696}],1070:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\");e.exports=function(t,e,r,i){var a,o=i(\\\"x\\\"),s=i(\\\"y\\\");if(n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\"],r),o)s?a=Math.min(o.length,s.length):(a=o.length,i(\\\"y0\\\"),i(\\\"dy\\\"));else{if(!s)return 0;a=e.y.length,i(\\\"x0\\\"),i(\\\"dx\\\")}return e._length=a,a}},{\\\"../../registry\\\":828}],1071:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../plots/attributes\\\"),o=t(\\\"../../constants/gl3d_dashes\\\"),s=t(\\\"../../constants/gl3d_markers\\\"),l=t(\\\"../../lib/extend\\\").extendFlat,c=t(\\\"../../plot_api/edit_types\\\").overrideAll,u=n.line,f=n.marker,h=f.line,p=l({width:u.width,dash:{valType:\\\"enumerated\\\",values:Object.keys(o),dflt:\\\"solid\\\"}},i(\\\"line\\\"));delete p.showscale,delete p.colorbar;var d=e.exports=c({x:n.x,y:n.y,z:{valType:\\\"data_array\\\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),mode:l({},n.mode,{dflt:\\\"lines+markers\\\"}),surfaceaxis:{valType:\\\"enumerated\\\",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:\\\"color\\\"},projection:{x:{show:{valType:\\\"boolean\\\",dflt:!1},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},scale:{valType:\\\"number\\\",min:0,max:10,dflt:2/3}},y:{show:{valType:\\\"boolean\\\",dflt:!1},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},scale:{valType:\\\"number\\\",min:0,max:10,dflt:2/3}},z:{show:{valType:\\\"boolean\\\",dflt:!1},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},scale:{valType:\\\"number\\\",min:0,max:10,dflt:2/3}}},connectgaps:n.connectgaps,line:p,marker:l({symbol:{valType:\\\"enumerated\\\",values:Object.keys(s),dflt:\\\"circle\\\",arrayOk:!0},size:l({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:l({},f.opacity,{arrayOk:!1}),colorbar:f.colorbar,line:l({width:l({},h.width,{arrayOk:!1})},i(\\\"marker.line\\\"))},i(\\\"marker\\\")),textposition:l({},n.textposition,{dflt:\\\"top center\\\",arrayOk:!1}),textfont:{color:n.textfont.color,size:n.textfont.size,family:l({},n.textfont.family,{arrayOk:!1})},hoverinfo:l({},a.hoverinfo)},\\\"calc\\\",\\\"nested\\\");d.x.editType=d.y.editType=d.z.editType=\\\"calc+clearAxisTypes\\\"},{\\\"../../components/colorscale/attributes\\\":577,\\\"../../constants/gl3d_dashes\\\":670,\\\"../../constants/gl3d_markers\\\":671,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1072:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/arrays_to_calcdata\\\"),i=t(\\\"../scatter/colorscale_calc\\\");e.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(e),r}},{\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/colorscale_calc\\\":1047}],1073:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\");function i(t,e,r,i){if(!e||!e.visible)return null;for(var a=n.getComponentMethod(\\\"errorbars\\\",\\\"makeComputeError\\\")(e),o=new Array(t.length),s=0;s<t.length;s++){var l=a(+t[s],s);if(\\\"log\\\"===i.type){var c=i.c2l(t[s]),u=t[s]-l[0],f=t[s]+l[1];if(o[s]=[(i.c2l(u,!0)-c)*r,(i.c2l(f,!0)-c)*r],u>0){var h=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e<t.length;e++)if(t[e])return t[e].length;return 0}(n);if(0===a)return null;for(var o=new Array(a),s=0;s<a;s++){for(var l=[[0,0,0],[0,0,0]],c=0;c<3;c++)if(n[c])for(var u=0;u<2;u++)l[u][c]=n[c][s][u];o[s]=l}return o}},{\\\"../../registry\\\":828}],1074:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-line3d\\\"),i=t(\\\"gl-scatter3d\\\"),a=t(\\\"gl-error3d\\\"),o=t(\\\"gl-mesh3d\\\"),s=t(\\\"delaunay-triangulate\\\"),l=t(\\\"../../lib\\\"),c=t(\\\"../../lib/str2rgbarray\\\"),u=t(\\\"../../lib/gl_format_color\\\").formatColor,f=t(\\\"../scatter/make_bubble_size_func\\\"),h=t(\\\"../../constants/gl3d_dashes\\\"),p=t(\\\"../../constants/gl3d_markers\\\"),d=t(\\\"./calc_errors\\\");function g(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode=\\\"\\\",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var v=g.prototype;function m(t,e){return e(4*t)}function y(t){return p[t]}function x(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o<e;o++)void 0===t[o]?a[o]=n:a[o]=r(t[o],i)}else a=r(t,l.identity);return a}function b(t,e){var r,n,i,a,o,s,h,p,g=[],v=t.fullSceneLayout,b=t.dataScale,_=v.xaxis,w=v.yaxis,k=v.zaxis,M=e.marker,A=e.line,T=e.x||[],S=e.y||[],C=e.z||[],E=T.length,L=e.xcalendar,z=e.ycalendar,O=e.zcalendar;for(n=0;n<E;n++)i=_.d2l(T[n],0,L)*b[0],a=w.d2l(S[n],0,z)*b[1],o=k.d2l(C[n],0,O)*b[2],g[n]=[i,a,o];if(Array.isArray(e.text))s=e.text;else if(void 0!==e.text)for(s=new Array(E),n=0;n<E;n++)s[n]=e.text;if(r={position:g,mode:e.mode,text:s},\\\"line\\\"in e&&(r.lineColor=u(A,1,E),r.lineWidth=A.width,r.lineDashes=A.dash),\\\"marker\\\"in e){var I=f(e);r.scatterColor=u(M,1,E),r.scatterSize=x(M.size,E,m,20,I),r.scatterMarker=x(M.symbol,E,y,\\\"\\\\u25cf\\\"),r.scatterLineWidth=M.line.width,r.scatterLineColor=u(M.line,1,E),r.scatterAngle=0}\\\"textposition\\\"in e&&(r.textOffset=(h=e.textposition,p=[0,0],Array.isArray(h)?[0,-1]:(h.indexOf(\\\"bottom\\\")>=0&&(p[1]+=1),h.indexOf(\\\"top\\\")>=0&&(p[1]-=1),h.indexOf(\\\"left\\\")>=0&&(p[0]-=1),h.indexOf(\\\"right\\\")>=0&&(p[0]+=1),p)),r.textColor=u(e.textfont,1,E),r.textSize=x(e.textfont.size,E,l.identity,12),r.textFont=e.textfont.family,r.textAngle=0);var P=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];for(r.project=[!1,!1,!1],r.projectScale=[1,1,1],r.projectOpacity=[1,1,1],n=0;n<3;++n){var D=e.projection[P[n]];(r.project[n]=D.show)&&(r.projectOpacity[n]=D.opacity,r.projectScale[n]=D.scale)}r.errorBounds=d(e,b,v);var R=function(t){for(var e=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[1,1,1],i=0;i<3;i++){var a=t[i];a&&!1!==a.copy_zstyle&&!1!==t[2].visible&&(a=t[2]),a&&a.visible&&(e[i]=a.width/2,r[i]=c(a.color),n[i]=a.thickness)}return{capSize:e,color:r,lineWidth:n}}([e.error_x,e.error_y,e.error_z]);return r.errorColor=R.color,r.errorLineWidth=R.lineWidth,r.errorCapSize=R.capSize,r.delaunayAxis=e.surfaceaxis,r.delaunayColor=c(e.surfacecolor),r}function _(t){if(Array.isArray(t)){var e=t[0];return Array.isArray(e)&&(t=e),\\\"rgb(\\\"+t.slice(0,3).map(function(t){return Math.round(255*t)})+\\\")\\\"}return null}v.handlePick=function(t){if(t.object&&(t.object===this.linePlot||t.object===this.delaunayMesh||t.object===this.textMarkers||t.object===this.scatterPlot)){var e=t.index=t.data.index;return t.object.highlight&&t.object.highlight(null),this.scatterPlot&&(t.object=this.scatterPlot,this.scatterPlot.highlight(t.data)),t.textLabel=\\\"\\\",this.textLabels&&(Array.isArray(this.textLabels)?(this.textLabels[e]||0===this.textLabels[e])&&(t.textLabel=this.textLabels[e]):t.textLabel=this.textLabels),t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]],!0}},v.update=function(t){var e,r,l,c,u=this.scene.glplot.gl,f=h.solid;this.data=t;var p=b(this.scene,t);\\\"mode\\\"in p&&(this.mode=p.mode),\\\"lineDashes\\\"in p&&p.lineDashes in h&&(f=h[p.lineDashes]),this.color=_(p.scatterColor)||_(p.lineColor),this.dataPoints=p.position,e={gl:u,position:p.position,color:p.lineColor,lineWidth:p.lineWidth||1,dashes:f[0],dashScale:f[1],opacity:t.opacity,connectGaps:t.connectgaps},-1!==this.mode.indexOf(\\\"lines\\\")?this.linePlot?this.linePlot.update(e):(this.linePlot=n(e),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var d=t.opacity;if(t.marker&&t.marker.opacity&&(d*=t.marker.opacity),r={gl:u,position:p.position,color:p.scatterColor,size:p.scatterSize,glyph:p.scatterMarker,opacity:d,orthographic:!0,lineWidth:p.scatterLineWidth,lineColor:p.scatterLineColor,project:p.project,projectScale:p.projectScale,projectOpacity:p.projectOpacity},-1!==this.mode.indexOf(\\\"markers\\\")?this.scatterPlot?this.scatterPlot.update(r):(this.scatterPlot=i(r),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),c={gl:u,position:p.position,glyph:p.text,color:p.textColor,size:p.textSize,angle:p.textAngle,alignment:p.textOffset,font:p.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:t.opacity},this.textLabels=t.hovertext||t.text,-1!==this.mode.indexOf(\\\"text\\\")?this.textMarkers?this.textMarkers.update(c):(this.textMarkers=i(c),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),l={gl:u,position:p.position,color:p.errorColor,error:p.errorBounds,lineWidth:p.errorLineWidth,capSize:p.errorCapSize,opacity:t.opacity},this.errorBars?p.errorBounds?this.errorBars.update(l):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):p.errorBounds&&(this.errorBars=a(l),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),p.delaunayAxis>=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n<t.length;++n){var c=t[n];!isNaN(c[i])&&isFinite(c[i])&&!isNaN(c[a])&&isFinite(c[a])&&(o.push([c[i],c[a]]),l.push(n))}var u=s(o);for(n=0;n<u.length;++n)for(var f=u[n],h=0;h<f.length;++h)f[h]=l[f[h]];return{positions:t,cells:u,meshColor:e}}(p.position,p.delaunayColor,p.delaunayAxis);g.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(g):(g.gl=u,this.delaunayMesh=o(g),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},v.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=function(t,e){var r=new g(t,e.uid);return r.update(e),r}},{\\\"../../constants/gl3d_dashes\\\":670,\\\"../../constants/gl3d_markers\\\":671,\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../lib/str2rgbarray\\\":720,\\\"../scatter/make_bubble_size_func\\\":1061,\\\"./calc_errors\\\":1073,\\\"delaunay-triangulate\\\":150,\\\"gl-error3d\\\":237,\\\"gl-line3d\\\":245,\\\"gl-mesh3d\\\":268,\\\"gl-scatter3d\\\":284}],1075:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../scatter/subtypes\\\"),o=t(\\\"../scatter/marker_defaults\\\"),s=t(\\\"../scatter/line_defaults\\\"),l=t(\\\"../scatter/text_defaults\\\"),c=t(\\\"./attributes\\\");e.exports=function(t,e,r,u){function f(r,n){return i.coerce(t,e,c,r,n)}if(function(t,e,r,i){var a=0,o=r(\\\"x\\\"),s=r(\\\"y\\\"),l=r(\\\"z\\\");n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\",\\\"z\\\"],i),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),e._length=e._xlength=e._ylength=e._zlength=a);return a}(t,e,f,u)){f(\\\"text\\\"),f(\\\"hovertext\\\"),f(\\\"mode\\\"),a.hasLines(e)&&(f(\\\"connectgaps\\\"),s(t,e,r,u,f)),a.hasMarkers(e)&&o(t,e,r,u,f,{noSelect:!0}),a.hasText(e)&&l(t,e,u,f,{noSelect:!0});var h=(e.line||{}).color,p=(e.marker||{}).color;f(\\\"surfaceaxis\\\")>=0&&f(\\\"surfacecolor\\\",h||p);for(var d=[\\\"x\\\",\\\"y\\\",\\\"z\\\"],g=0;g<3;++g){var v=\\\"projection.\\\"+d[g];f(v+\\\".show\\\")&&(f(v+\\\".opacity\\\"),f(v+\\\".scale\\\"))}var m=n.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");m(t,e,r,{axis:\\\"z\\\"}),m(t,e,r,{axis:\\\"y\\\",inherit:\\\"z\\\"}),m(t,e,r,{axis:\\\"x\\\",inherit:\\\"z\\\"})}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1071}],1076:[function(t,e,r){\\\"use strict\\\";var n={};n.plot=t(\\\"./convert\\\"),n.attributes=t(\\\"./attributes\\\"),n.markerSymbols=t(\\\"../../constants/gl3d_markers\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"scatter3d\\\",n.basePlotModule=t(\\\"../../plots/gl3d\\\"),n.categories=[\\\"gl3d\\\",\\\"symbols\\\",\\\"showLegend\\\"],n.meta={},e.exports=n},{\\\"../../constants/gl3d_markers\\\":671,\\\"../../plots/gl3d\\\":788,\\\"../scatter/marker_colorbar\\\":1062,\\\"./attributes\\\":1071,\\\"./calc\\\":1072,\\\"./convert\\\":1074,\\\"./defaults\\\":1075}],1077:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/colorbar/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l=n.marker,c=n.line,u=l.line;e.exports={carpet:{valType:\\\"string\\\",editType:\\\"calc\\\"},a:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},b:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},mode:s({},n.mode,{dflt:\\\"markers\\\"}),text:s({},n.text,{}),line:{color:c.color,width:c.width,dash:c.dash,shape:s({},c.shape,{values:[\\\"linear\\\",\\\"spline\\\"]}),smoothing:c.smoothing,editType:\\\"calc\\\"},connectgaps:n.connectgaps,fill:s({},n.fill,{values:[\\\"none\\\",\\\"toself\\\",\\\"tonext\\\"],dflt:\\\"none\\\"}),fillcolor:n.fillcolor,marker:s({symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({width:u.width,editType:\\\"calc\\\"},a(\\\"marker.line\\\")),gradient:l.gradient,editType:\\\"calc\\\"},a(\\\"marker\\\"),{colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[\\\"a\\\",\\\"b\\\",\\\"text\\\",\\\"name\\\"]}),hoveron:n.hoveron}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1078:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../scatter/colorscale_calc\\\"),a=t(\\\"../scatter/arrays_to_calcdata\\\"),o=t(\\\"../scatter/calc_selection\\\"),s=t(\\\"../scatter/calc\\\").calcMarkerSize,l=t(\\\"../carpet/lookup_carpetid\\\");e.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&&r.visible&&\\\"legendonly\\\"!==r.visible){var c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,h=e._length,p=new Array(h),d=!1;for(c=0;c<h;c++)if(u=e.a[c],f=e.b[c],n(u)&&n(f)){var g=r.ab2xy(+u,+f,!0),v=r.isVisible(+u,+f);v||(d=!0),p[c]={x:g[0],y:g[1],a:u,b:f,vis:v}}else p[c]={x:!1,y:!1};return e._needsCull=d,p[0].carpet=r,p[0].trace=e,s(e,h),i(e),a(p,e),o(p,e),p}}},{\\\"../carpet/lookup_carpetid\\\":895,\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc\\\":1045,\\\"../scatter/calc_selection\\\":1046,\\\"../scatter/colorscale_calc\\\":1047,\\\"fast-isnumeric\\\":214}],1079:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/constants\\\"),a=t(\\\"../scatter/subtypes\\\"),o=t(\\\"../scatter/marker_defaults\\\"),s=t(\\\"../scatter/line_defaults\\\"),l=t(\\\"../scatter/line_shape_defaults\\\"),c=t(\\\"../scatter/text_defaults\\\"),u=t(\\\"../scatter/fillcolor_defaults\\\"),f=t(\\\"./attributes\\\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}p(\\\"carpet\\\"),e.xaxis=\\\"x\\\",e.yaxis=\\\"y\\\";var d=p(\\\"a\\\"),g=p(\\\"b\\\"),v=Math.min(d.length,g.length);if(v){e._length=v,p(\\\"text\\\"),p(\\\"mode\\\",v<i.PTS_LINESONLY?\\\"lines+markers\\\":\\\"lines\\\"),a.hasLines(e)&&(s(t,e,r,h,p),l(t,e,p),p(\\\"connectgaps\\\")),a.hasMarkers(e)&&o(t,e,r,h,p,{gradient:!0}),a.hasText(e)&&c(t,e,h,p);var m=[];(a.hasMarkers(e)||a.hasText(e))&&(p(\\\"marker.maxdisplayed\\\"),m.push(\\\"points\\\")),p(\\\"fill\\\"),\\\"none\\\"!==e.fill&&(u(t,e,r,p),a.hasLines(e)||l(t,e,p)),\\\"tonext\\\"!==e.fill&&\\\"toself\\\"!==e.fill||m.push(\\\"fills\\\"),p(\\\"hoveron\\\",m.join(\\\"+\\\")||\\\"points\\\"),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/line_shape_defaults\\\":1059,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1077}],1080:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){var a=n[i];return t.a=a.a,t.b=a.b,t}},{}],1081:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/hover\\\");e.exports=function(t,e,r,i){var a=n(t,e,r,i);if(a&&!1!==a[0].index){var o=a[0];if(void 0===o.index){var s=1-o.y0/t.ya._length,l=t.xa._length,c=l*s/2,u=l-c;return o.x0=Math.max(Math.min(o.x0,u),c),o.x1=Math.max(Math.min(o.x1,u),c),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,p=h._carpet,d=(f.hi||h.hoverinfo).split(\\\"+\\\"),g=[];-1!==d.indexOf(\\\"all\\\")&&(d=[\\\"a\\\",\\\"b\\\"]),-1!==d.indexOf(\\\"a\\\")&&w(p.aaxis,f.a),-1!==d.indexOf(\\\"b\\\")&&w(p.baxis,f.b);var v=p.ab2ij([f.a,f.b]),m=Math.floor(v[0]),y=v[0]-m,x=Math.floor(v[1]),b=v[1]-x,_=p.evalxy([],m,x,y,b);return g.push(\\\"y: \\\"+_[1].toFixed(3)),o.extraText=g.join(\\\"<br>\\\"),a}function w(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\\\"\\\"):t._hovertitle,g.push(r+\\\": \\\"+e.toFixed(3)+t.labelsuffix)}}},{\\\"../scatter/hover\\\":1055}],1082:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"../scatter/style\\\").style,n.styleOnSelect=t(\\\"../scatter/style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.selectPoints=t(\\\"../scatter/select\\\"),n.eventData=t(\\\"./event_data\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"scattercarpet\\\",n.basePlotModule=t(\\\"../../plots/cartesian\\\"),n.categories=[\\\"svg\\\",\\\"carpet\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"carpetDependent\\\",\\\"zoomScale\\\"],n.meta={},e.exports=n},{\\\"../../plots/cartesian\\\":757,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/select\\\":1065,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1077,\\\"./calc\\\":1078,\\\"./defaults\\\":1079,\\\"./event_data\\\":1080,\\\"./hover\\\":1081,\\\"./plot\\\":1083}],1083:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/plot\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../components/drawing\\\");e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,f={xaxis:i.getFromId(t,u.xaxis||\\\"x\\\"),yaxis:i.getFromId(t,u.yaxis||\\\"y\\\"),plot:e.plot};for(n(t,f,r,o),s=0;s<r.length;s++)l=r[s][0].trace,c=o.selectAll(\\\"g.trace\\\"+l.uid+\\\" .js-line\\\"),a.setClipUrl(c,u._clipPathId)}},{\\\"../../components/drawing\\\":595,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/plot\\\":1064}],1084:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/drawing/attributes\\\").dash,s=t(\\\"../../lib/extend\\\").extendFlat,l=t(\\\"../../plot_api/edit_types\\\").overrideAll,c=n.marker,u=n.line,f=c.line;e.exports=l({lon:{valType:\\\"data_array\\\"},lat:{valType:\\\"data_array\\\"},locations:{valType:\\\"data_array\\\"},locationmode:{valType:\\\"enumerated\\\",values:[\\\"ISO-3\\\",\\\"USA-states\\\",\\\"country names\\\"],dflt:\\\"ISO-3\\\"},mode:s({},n.mode,{dflt:\\\"markers\\\"}),text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),textfont:n.textfont,textposition:n.textposition,line:{color:u.color,width:u.width,dash:o},connectgaps:n.connectgaps,marker:s({symbol:c.symbol,opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,colorbar:c.colorbar,line:s({width:f.width},a(\\\"marker.line\\\")),gradient:c.gradient},a(\\\"marker\\\")),fill:{valType:\\\"enumerated\\\",values:[\\\"none\\\",\\\"toself\\\"],dflt:\\\"none\\\"},fillcolor:n.fillcolor,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[\\\"lon\\\",\\\"lat\\\",\\\"location\\\",\\\"text\\\",\\\"name\\\"]})},\\\"calc\\\",\\\"nested\\\")},{\\\"../../components/colorscale/attributes\\\":577,\\\"../../components/drawing/attributes\\\":594,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1085:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM,a=t(\\\"../scatter/colorscale_calc\\\"),o=t(\\\"../scatter/arrays_to_calcdata\\\"),s=t(\\\"../scatter/calc_selection\\\"),l=t(\\\"../../lib\\\")._;e.exports=function(t,e){for(var r=Array.isArray(e.locations),c=r?e.locations.length:e._length,u=new Array(c),f=0;f<c;f++){var h=u[f]={};if(r){var p=e.locations[f];h.loc=\\\"string\\\"==typeof p?p:null}else{var d=e.lon[f],g=e.lat[f];n(d)&&n(g)?h.lonlat=[+d,+g]:h.lonlat=[i,i]}}return o(u,e),a(e),s(u,e),c&&(u[0].t={labels:{lat:l(t,\\\"lat:\\\")+\\\" \\\",lon:l(t,\\\"lon:\\\")+\\\" \\\"}}),u}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc_selection\\\":1046,\\\"../scatter/colorscale_calc\\\":1047,\\\"fast-isnumeric\\\":214}],1086:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../scatter/marker_defaults\\\"),o=t(\\\"../scatter/line_defaults\\\"),s=t(\\\"../scatter/text_defaults\\\"),l=t(\\\"../scatter/fillcolor_defaults\\\"),c=t(\\\"./attributes\\\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}!function(t,e,r){var n,i,a=0,o=r(\\\"locations\\\");if(o)return r(\\\"locationmode\\\"),a=o.length;return n=r(\\\"lon\\\")||[],i=r(\\\"lat\\\")||[],a=Math.min(n.length,i.length),e._length=a,a}(0,e,f)?e.visible=!1:(f(\\\"text\\\"),f(\\\"hovertext\\\"),f(\\\"mode\\\"),i.hasLines(e)&&(o(t,e,r,u,f),f(\\\"connectgaps\\\")),i.hasMarkers(e)&&a(t,e,r,u,f,{gradient:!0}),i.hasText(e)&&s(t,e,u,f),f(\\\"fill\\\"),\\\"none\\\"!==e.fill&&l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f))}},{\\\"../../lib\\\":696,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1084}],1087:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.location=e.loc?e.loc:null,t}},{}],1088:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM,o=t(\\\"../scatter/get_trace_color\\\"),s=t(\\\"../scatter/fill_hover_text\\\"),l=t(\\\"./attributes\\\");e.exports=function(t,e,r){var c=t.cd,u=c[0].trace,f=t.xa,h=t.ya,p=t.subplot,d=p.projection.isLonLatOverEdges,g=p.project;if(n.getClosest(c,function(t){var n=t.lonlat;if(n[0]===a)return 1/0;if(d(n))return 1/0;var i=g(n),o=g([e,r]),s=Math.abs(i[0]-o[0]),l=Math.abs(i[1]-o[1]),c=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-c,1-3/c)},t),!1!==t.index){var v=c[t.index],m=v.lonlat,y=[f.c2p(m),h.c2p(m)],x=v.mrc||1;return t.x0=y[0]-x,t.x1=y[0]+x,t.y0=y[1]-x,t.y1=y[1]+x,t.loc=v.loc,t.lon=m[0],t.lat=m[1],t.color=o(u,v),t.extraText=function(t,e,r,n){var a=e.hi||t.hoverinfo,o=\\\"all\\\"===a?l.hoverinfo.flags:a.split(\\\"+\\\"),c=-1!==o.indexOf(\\\"location\\\")&&Array.isArray(t.locations),u=-1!==o.indexOf(\\\"lon\\\"),f=-1!==o.indexOf(\\\"lat\\\"),h=-1!==o.indexOf(\\\"text\\\"),p=[];function d(t){return i.tickText(r,r.c2l(t),\\\"hover\\\").text+\\\"\\\\xb0\\\"}c?p.push(e.loc):u&&f?p.push(\\\"(\\\"+d(e.lonlat[0])+\\\", \\\"+d(e.lonlat[1])+\\\")\\\"):u?p.push(n.lon+d(e.lonlat[0])):f&&p.push(n.lat+d(e.lonlat[1]));h&&s(e,t,p);return p.join(\\\"<br>\\\")}(u,v,p.mockAxis,c[0].t.labels),[t]}}},{\\\"../../components/fx\\\":612,\\\"../../constants/numerical\\\":673,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/fill_hover_text\\\":1052,\\\"../scatter/get_trace_color\\\":1054,\\\"./attributes\\\":1084}],1089:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"./style\\\"),n.styleOnSelect=t(\\\"../scatter/style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.eventData=t(\\\"./event_data\\\"),n.selectPoints=t(\\\"./select\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"scattergeo\\\",n.basePlotModule=t(\\\"../../plots/geo\\\"),n.categories=[\\\"geo\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],n.meta={},e.exports=n},{\\\"../../plots/geo\\\":776,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1084,\\\"./calc\\\":1085,\\\"./defaults\\\":1086,\\\"./event_data\\\":1087,\\\"./hover\\\":1088,\\\"./plot\\\":1090,\\\"./select\\\":1091,\\\"./style\\\":1092}],1090:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM,o=t(\\\"../../lib/topojson_utils\\\").getTopojsonFeatures,s=t(\\\"../../lib/geo_location_utils\\\").locationToFeature,l=t(\\\"../../lib/geojson_utils\\\"),c=t(\\\"../scatter/subtypes\\\"),u=t(\\\"./style\\\");function f(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=o(r,e),i=r.locationmode,l=0;l<t.length;l++){var c=t[l],u=s(i,c.loc,n);c.lonlat=u?u.properties.ct:[a,a]}}e.exports=function(t,e,r){for(var o=0;o<r.length;o++)f(r[o],e.topojson);function s(t,e){t.lonlat[0]===a&&n.select(e).remove()}var h=e.layers.frontplot.select(\\\".scatterlayer\\\"),p=i.makeTraceGroups(h,r,\\\"trace scattergeo\\\");p.selectAll(\\\"*\\\").remove(),p.each(function(e){var r=e[0].node3=n.select(this),a=e[0].trace;if(c.hasLines(a)||\\\"none\\\"!==a.fill){var o=l.calcTraceToLineCoords(e),f=\\\"none\\\"!==a.fill?l.makePolygon(o):l.makeLine(o);r.selectAll(\\\"path.js-line\\\").data([{geojson:f,trace:a}]).enter().append(\\\"path\\\").classed(\\\"js-line\\\",!0).style(\\\"stroke-miterlimit\\\",2)}c.hasMarkers(a)&&r.selectAll(\\\"path.point\\\").data(i.identity).enter().append(\\\"path\\\").classed(\\\"point\\\",!0).each(function(t){s(t,this)}),c.hasText(a)&&r.selectAll(\\\"g\\\").data(i.identity).enter().append(\\\"g\\\").append(\\\"text\\\").each(function(t){s(t,this)}),u(t,e)})}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../lib/geo_location_utils\\\":688,\\\"../../lib/geojson_utils\\\":689,\\\"../../lib/topojson_utils\\\":724,\\\"../scatter/subtypes\\\":1068,\\\"./style\\\":1092,d3:148}],1091:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/subtypes\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e){var r,a,o,s,l,c=t.cd,u=t.xaxis,f=t.yaxis,h=[],p=c[0].trace;if(!n.hasMarkers(p)&&!n.hasText(p))return[];if(!1===e)for(l=0;l<c.length;l++)c[l].selected=0;else for(l=0;l<c.length;l++)(a=(r=c[l]).lonlat)[0]!==i&&(o=u.c2p(a),s=f.c2p(a),e.contains([o,s],null,l,t)?(h.push({pointNumber:l,lon:a[0],lat:a[1]}),r.selected=1):r.selected=0);return h}},{\\\"../../constants/numerical\\\":673,\\\"../scatter/subtypes\\\":1068}],1092:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/drawing\\\"),a=t(\\\"../../components/color\\\"),o=t(\\\"../scatter/style\\\"),s=o.stylePoints,l=o.styleText;e.exports=function(t,e){e&&function(t,e){var r=e[0].trace,o=e[0].node3;o.style(\\\"opacity\\\",e[0].trace.opacity),s(o,r,t),l(o,r,t),o.selectAll(\\\"path.js-line\\\").style(\\\"fill\\\",\\\"none\\\").each(function(t){var e=n.select(this),r=t.trace,o=r.line||{};e.call(a.stroke,o.color).call(i.dashLine,o.dash||\\\"\\\",o.width||0),\\\"none\\\"!==r.fill&&e.call(a.fill,r.fillcolor)})}(t,e)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../scatter/style\\\":1067,d3:148}],1093:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/attributes\\\"),i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../lib/extend\\\").extendFlat,s=t(\\\"../../plot_api/edit_types\\\").overrideAll,l=t(\\\"./constants\\\").DASHES,c=i.line,u=i.marker,f=u.line,h=e.exports=s({x:i.x,x0:i.x0,dx:i.dx,y:i.y,y0:i.y0,dy:i.dy,text:i.text,hovertext:i.hovertext,textposition:i.textposition,textfont:i.textfont,mode:{valType:\\\"flaglist\\\",flags:[\\\"lines\\\",\\\"markers\\\",\\\"text\\\"],extras:[\\\"none\\\"]},line:{color:c.color,width:c.width,shape:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"hv\\\",\\\"vh\\\",\\\"hvh\\\",\\\"vhv\\\"],dflt:\\\"linear\\\",editType:\\\"plot\\\"},dash:{valType:\\\"enumerated\\\",values:Object.keys(l),dflt:\\\"solid\\\"}},marker:o({},a(\\\"marker\\\"),{symbol:u.symbol,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:o({},a(\\\"marker.line\\\"),{width:f.width})}),connectgaps:i.connectgaps,fill:o({},i.fill,{dflt:\\\"none\\\"}),fillcolor:i.fillcolor,selected:{marker:i.selected.marker,textfont:i.selected.textfont},unselected:{marker:i.unselected.marker,textfont:i.unselected.textfont},opacity:n.opacity},\\\"calc\\\",\\\"nested\\\");h.x.editType=h.y.editType=h.x0.editType=h.y0.editType=\\\"calc+clearAxisTypes\\\"},{\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044,\\\"./constants\\\":1094}],1094:[function(t,e,r){\\\"use strict\\\";e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],1095:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"svg-path-sdf\\\"),a=t(\\\"color-normalize\\\"),o=t(\\\"../../registry\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../components/drawing\\\"),c=t(\\\"../../plots/cartesian/axis_ids\\\"),u=t(\\\"../../lib/gl_format_color\\\").formatColor,f=t(\\\"../scatter/subtypes\\\"),h=t(\\\"../scatter/make_bubble_size_func\\\"),p=t(\\\"./constants\\\"),d=t(\\\"../../constants/interactions\\\").DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1};function v(t){var e,r=t._length,i=t.textfont,a=t.textposition,o=Array.isArray(a)?a:[a],s=i.color,l=i.size,c=i.family,u={};for(u.text=t.text,u.opacity=t.opacity,u.font={},u.align=[],u.baseline=[],e=0;e<o.length;e++){var f=o[e].split(/\\\\s+/);switch(f[1]){case\\\"left\\\":u.align.push(\\\"right\\\");break;case\\\"right\\\":u.align.push(\\\"left\\\");break;default:u.align.push(f[1])}switch(f[0]){case\\\"top\\\":u.baseline.push(\\\"bottom\\\");break;case\\\"bottom\\\":u.baseline.push(\\\"top\\\");break;default:u.baseline.push(f[0])}}if(Array.isArray(s))for(u.color=new Array(r),e=0;e<r;e++)u.color[e]=s[e];else u.color=s;if(Array.isArray(l)||Array.isArray(c))for(u.font=new Array(r),e=0;e<r;e++){var h=u.font[e]={};h.size=Array.isArray(l)?n(l[e])?l[e]:0:l,h.family=Array.isArray(c)?c[e]:c}else u.font={size:l,family:c};return u}function m(t){var e,r,n=t._length,i=t.marker,o={},l=Array.isArray(i.symbol),c=s.isArrayOrTypedArray(i.color),f=s.isArrayOrTypedArray(i.line.color),d=s.isArrayOrTypedArray(i.opacity),g=s.isArrayOrTypedArray(i.size),v=s.isArrayOrTypedArray(i.line.width);if(l||(r=p.OPEN_RE.test(i.symbol)),l||c||f||d){o.colors=new Array(n),o.borderColors=new Array(n);var m=u(i,i.opacity,n),y=u(i.line,i.opacity,n);if(!Array.isArray(y[0])){var x=y;for(y=Array(n),e=0;e<n;e++)y[e]=x}if(!Array.isArray(m[0])){var b=m;for(m=Array(n),e=0;e<n;e++)m[e]=b}for(o.colors=m,o.borderColors=y,e=0;e<n;e++){if(l){var _=i.symbol[e];r=p.OPEN_RE.test(_)}r&&(y[e]=m[e].slice(),m[e]=m[e].slice(),m[e][3]=0)}o.opacity=t.opacity}else r?(o.color=a(i.color,\\\"uint8\\\"),o.color[3]=0,o.borderColor=a(i.color,\\\"uint8\\\")):(o.color=a(i.color,\\\"uint8\\\"),o.borderColor=a(i.line.color,\\\"uint8\\\")),o.opacity=t.opacity*i.opacity;if(l)for(o.markers=new Array(n),e=0;e<n;e++)o.markers[e]=T(i.symbol[e]);else o.marker=T(i.symbol);var w,k=h(t);if(g||v){var M,A=o.sizes=new Array(n),S=o.borderSizes=new Array(n),C=0;if(g){for(e=0;e<n;e++)A[e]=k(i.size[e]),C+=A[e];M=C/n}else for(w=k(i.size),e=0;e<n;e++)A[e]=w;if(v)for(e=0;e<n;e++)S[e]=i.line.width[e]/2;else for(w=i.line.width/2,e=0;e<n;e++)S[e]=w;o.sizeAvg=M}else o.size=k(i&&i.size||10),o.borderSizes=k(i.line.width);return o}function y(t,e){var r=t.marker,n={};return e?(e.marker&&e.marker.symbol?n=m(s.extendFlat({},r,e.marker)):e.marker&&(e.marker.size&&(n.size=e.marker.size/2),e.marker.color&&(n.colors=e.marker.color),void 0!==e.marker.opacity&&(n.opacity=e.marker.opacity)),n):n}function x(t,e){var r={};if(!e)return r;if(e.textfont){var n={opacity:1,text:t.text,textposition:t.textposition,textfont:s.extendFlat({},t.textfont)};e.textfont&&s.extendFlat(n.textfont,e.textfont),r=v(n)}return r}function b(t,e){var r={capSize:2*e.width,lineWidth:e.thickness,color:e.color};return e.copy_ystyle&&(r=t.error_y),r}var _=p.SYMBOL_SDF_SIZE,w=p.SYMBOL_SIZE,k=p.SYMBOL_STROKE,M={},A=l.symbolFuncs[0](.05*w);function T(t){if(\\\"circle\\\"===t)return null;var e,r,n=l.symbolNumber(t),a=l.symbolFuncs[n%100],o=!!l.symbolNoDot[n%100],s=!!l.symbolNoFill[n%100],c=p.DOT_RE.test(t);return M[t]?M[t]:(e=c&&!o?a(1.1*w)+A:a(w),r=i(e,{w:_,h:_,viewBox:[-w,-w,w,w],stroke:s?k:-k}),M[t]=r,r||null)}e.exports={style:function(t,e){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0};if(!0!==e.visible)return n;if(f.hasText(e)&&(n.text=v(e),n.textSel=x(e,e.selected),n.textUnsel=x(e,e.unselected)),f.hasMarkers(e)&&(n.marker=m(e),n.markerSel=y(e,e.selected),n.markerUnsel=y(e,e.unselected),!e.unselected&&Array.isArray(e.marker.opacity))){var i=e.marker.opacity;for(n.markerUnsel.opacity=new Array(i.length),r=0;r<i.length;r++)n.markerUnsel.opacity[r]=d*i[r]}if(f.hasLines(e)){n.line={overlay:!0,thickness:e.line.width,color:e.line.color,opacity:e.opacity};var a=(p.DASHES[e.line.dash]||[1]).slice();for(r=0;r<a.length;++r)a[r]*=e.line.width;n.line.dashes=a}return e.error_x&&e.error_x.visible&&(n.errorX=b(e,e.error_x)),e.error_y&&e.error_y.visible&&(n.errorY=b(e,e.error_y)),e.fill&&\\\"none\\\"!==e.fill&&(n.fill={closed:!0,fill:e.fillcolor,thickness:0}),n},markerStyle:m,markerSelection:y,linePositions:function(t,e,r){var n,i,a=r.length,o=a/2;if(f.hasLines(e)&&o)if(\\\"hv\\\"===e.line.shape){for(n=[],i=0;i<o-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*i],r[2*i+1]),isNaN(r[2*i+2])||isNaN(r[2*i+3])?n.push(NaN,NaN):n.push(r[2*i+2],r[2*i+1]));n.push(r[a-2],r[a-1])}else if(\\\"hvh\\\"===e.line.shape){for(n=[],i=0;i<o-1;i++)if(isNaN(r[2*i])||isNaN(r[2*i+1])||isNaN(r[2*i+2])||isNaN(r[2*i+3]))isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+1]),n.push(NaN,NaN);else{var s=(r[2*i]+r[2*i+2])/2;n.push(r[2*i],r[2*i+1],s,r[2*i+1],s,r[2*i+3])}n.push(r[a-2],r[a-1])}else if(\\\"vhv\\\"===e.line.shape){for(n=[],i=0;i<o-1;i++)if(isNaN(r[2*i])||isNaN(r[2*i+1])||isNaN(r[2*i+2])||isNaN(r[2*i+3]))isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+1]),n.push(NaN,NaN);else{var l=(r[2*i+1]+r[2*i+3])/2;n.push(r[2*i],r[2*i+1],r[2*i],l,r[2*i+2],l)}n.push(r[a-2],r[a-1])}else if(\\\"vh\\\"===e.line.shape){for(n=[],i=0;i<o-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*i],r[2*i+1]),isNaN(r[2*i+2])||isNaN(r[2*i+3])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+3]));n.push(r[a-2],r[a-1])}else n=r;var c=!1;for(i=0;i<n.length;i++)if(isNaN(n[i])){c=!0;break}var u=c||n.length>p.TOO_MANY_POINTS?\\\"rect\\\":f.hasMarkers(e)?\\\"rect\\\":\\\"round\\\";if(c&&e.connectgaps){var h=n[0],d=n[1];for(i=0;i<n.length;i+=2)isNaN(n[i])||isNaN(n[i+1])?(n[i]=h,n[i+1]=d):(h=n[i],d=n[i+1])}return{join:u,positions:n}},errorBarPositions:function(t,e,r,i,a){var s=o.getComponentMethod(\\\"errorbars\\\",\\\"makeComputeError\\\"),l=c.getFromId(t,e.xaxis),u=c.getFromId(t,e.yaxis),f=r.length/2,h={};function p(t,i){var a=i._id.charAt(0),o=e[\\\"error_\\\"+a];if(o&&o.visible&&(\\\"linear\\\"===i.type||\\\"log\\\"===i.type)){for(var l=s(o),c={x:0,y:1}[a],u={x:[0,1,2,3],y:[2,3,0,1]}[a],p=new Float64Array(4*f),d=1/0,g=-1/0,v=0,m=0;v<f;v++,m+=4){var y=t[v];if(n(y)){var x=r[2*v+c],b=l(y,v),_=b[0],w=b[1];if(n(_)&&n(w)){var k=y-_,M=y+w;p[m+u[0]]=x-i.c2l(k),p[m+u[1]]=i.c2l(M)-x,p[m+u[2]]=0,p[m+u[3]]=0,d=Math.min(d,y-_),g=Math.max(g,y+w)}}}h[a]={positions:r,errors:p,_bnds:[d,g]}}}return p(i,l),p(a,u),h},textPosition:function(t,e,r,n){var i,a=e._length,o={};if(f.hasMarkers(e)){var s=r.font,l=r.align,c=r.baseline;for(o.offset=new Array(a),i=0;i<a;i++){var u=n.sizes?n.sizes[i]:n.size,h=Array.isArray(s)?s[i].size:s.size,p=Array.isArray(l)?l.length>1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,v=g[p],m=g[d],y=u?u/.8+1:0,x=-m*y-.5*m;o.offset[i]=[v*y/h,x/h]}}return o}}},{\\\"../../components/drawing\\\":595,\\\"../../constants/interactions\\\":672,\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../registry\\\":828,\\\"../scatter/make_bubble_size_func\\\":1061,\\\"../scatter/subtypes\\\":1068,\\\"./constants\\\":1094,\\\"color-normalize\\\":108,\\\"fast-isnumeric\\\":214,\\\"svg-path-sdf\\\":512}],1096:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"../scatter/constants\\\"),s=t(\\\"../scatter/subtypes\\\"),l=t(\\\"../scatter/xy_defaults\\\"),c=t(\\\"../scatter/marker_defaults\\\"),u=t(\\\"../scatter/line_defaults\\\"),f=t(\\\"../scatter/fillcolor_defaults\\\"),h=t(\\\"../scatter/text_defaults\\\");e.exports=function(t,e,r,p){function d(r,i){return n.coerce(t,e,a,r,i)}var g=!!t.marker&&/-open/.test(t.marker.symbol),v=s.isBubble(t),m=l(t,e,p,d);if(m){var y=m<o.PTS_LINESONLY?\\\"lines+markers\\\":\\\"lines\\\";d(\\\"text\\\"),d(\\\"hovertext\\\"),d(\\\"mode\\\",y),s.hasLines(e)&&(d(\\\"connectgaps\\\"),u(t,e,r,p,d),d(\\\"line.shape\\\")),s.hasMarkers(e)&&(c(t,e,r,p,d),d(\\\"marker.line.width\\\",g||v?1:0)),s.hasText(e)&&h(t,e,p,d),d(\\\"fill\\\"),\\\"none\\\"!==e.fill&&f(t,e,r,d);var x=i.getComponentMethod(\\\"errorbars\\\",\\\"supplyDefaults\\\");x(t,e,r,{axis:\\\"y\\\"}),x(t,e,r,{axis:\\\"x\\\",inherit:\\\"y\\\"}),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"../scatter/xy_defaults\\\":1070,\\\"./attributes\\\":1093}],1097:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"regl-scatter2d\\\"),i=t(\\\"regl-line2d\\\"),a=t(\\\"regl-error2d\\\"),o=t(\\\"point-cluster\\\"),s=t(\\\"array-range\\\"),l=t(\\\"gl-text\\\"),c=t(\\\"../../registry\\\"),u=t(\\\"../../lib\\\"),f=t(\\\"../../lib/prepare_regl\\\"),h=t(\\\"../../plots/cartesian/axis_ids\\\"),p=t(\\\"../../plots/cartesian/autorange\\\").findExtremes,d=t(\\\"../../components/color\\\"),g=t(\\\"../scatter/subtypes\\\"),v=t(\\\"../scatter/calc\\\"),m=v.calcMarkerSize,y=v.calcAxisExpansion,x=v.setFirstScatter,b=t(\\\"../scatter/colorscale_calc\\\"),_=t(\\\"../scatter/link_traces\\\"),w=t(\\\"../scatter/get_trace_color\\\"),k=t(\\\"../scatter/fill_hover_text\\\"),M=t(\\\"./convert\\\"),A=t(\\\"../../constants/numerical\\\").BADNUM,T=t(\\\"./constants\\\").TOO_MANY_POINTS,S=t(\\\"../../constants/interactions\\\").DESELECTDIM;function C(t,e,r){var n=t._extremes[e._id],i=p(e,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}function E(t,e){var r=e._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[]},i={selectBatch:null,unselectBatch:null,fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:null};return e._scene||((r=e._scene={}).init=function(){u.extendFlat(r,i,n)},r.init(),r.update=function(t){var e=u.repeat(t,r.count);if(r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.glText)for(var n=0;n<r.count;n++)r.glText[n].update(t)},r.draw=function(){for(var t=r.count,e=r.fill2d,n=r.error2d,i=r.line2d,a=r.scatter2d,o=r.glText,s=r.select2d,l=r.selectBatch,c=r.unselectBatch,u=0;u<t;u++)e&&r.fillOrder[u]&&e.draw(r.fillOrder[u]),i&&r.lineOptions[u]&&i.draw(u),n&&(r.errorXOptions[u]&&n.draw(u),r.errorYOptions[u]&&n.draw(u+t)),!a||!r.markerOptions[u]||l&&l[u]||a.draw(u),o[u]&&r.textOptions[u]&&o[u].render();a&&s&&l&&(s.draw(l),a.draw(c)),r.dirty=!1},r.destroy=function(){r.fill2d&&r.fill2d.destroy&&r.fill2d.destroy(),r.scatter2d&&r.scatter2d.destroy&&r.scatter2d.destroy(),r.error2d&&r.error2d.destroy&&r.error2d.destroy(),r.line2d&&r.line2d.destroy&&r.line2d.destroy(),r.select2d&&r.select2d.destroy&&r.select2d.destroy(),r.glText&&r.glText.forEach(function(t){t.destroy&&t.destroy()}),r.lineOptions=null,r.fillOptions=null,r.markerOptions=null,r.markerSelectedOptions=null,r.markerUnselectedOptions=null,r.errorXOptions=null,r.errorYOptions=null,r.textOptions=null,r.textSelectedOptions=null,r.textUnselectedOptions=null,r.selectBatch=null,r.unselectBatch=null,e._scene=null}),r.dirty||u.extendFlat(r,n),r}function L(t,e,r,n){var i=t.xa,a=t.ya,o=t.distance,s=t.dxy,l=t.index,f={pointNumber:l,x:e[l],y:r[l]};f.tx=Array.isArray(n.text)?n.text[l]:n.text,f.htx=Array.isArray(n.hovertext)?n.hovertext[l]:n.hovertext,f.data=Array.isArray(n.customdata)?n.customdata[l]:n.customdata,f.tp=Array.isArray(n.textposition)?n.textposition[l]:n.textposition;var h=n.textfont;h&&(f.ts=Array.isArray(h.size)?h.size[l]:h.size,f.tc=Array.isArray(h.color)?h.color[l]:h.color,f.tf=Array.isArray(h.family)?h.family[l]:h.family);var p=n.marker;p&&(f.ms=u.isArrayOrTypedArray(p.size)?p.size[l]:p.size,f.mo=u.isArrayOrTypedArray(p.opacity)?p.opacity[l]:p.opacity,f.mx=Array.isArray(p.symbol)?p.symbol[l]:p.symbol,f.mc=u.isArrayOrTypedArray(p.color)?p.color[l]:p.color);var d=p&&p.line;d&&(f.mlc=Array.isArray(d.color)?d.color[l]:d.color,f.mlw=u.isArrayOrTypedArray(d.width)?d.width[l]:d.width);var g=p&&p.gradient;g&&\\\"none\\\"!==g.type&&(f.mgt=Array.isArray(g.type)?g.type[l]:g.type,f.mgc=Array.isArray(g.color)?g.color[l]:g.color);var v=i.c2p(f.x,!0),m=a.c2p(f.y,!0),y=f.mrc||1,x=n.hoverlabel;x&&(f.hbg=Array.isArray(x.bgcolor)?x.bgcolor[l]:x.bgcolor,f.hbc=Array.isArray(x.bordercolor)?x.bordercolor[l]:x.bordercolor,f.hts=Array.isArray(x.font.size)?x.font.size[l]:x.font.size,f.htc=Array.isArray(x.font.color)?x.font.color[l]:x.font.color,f.htf=Array.isArray(x.font.family)?x.font.family[l]:x.font.family,f.hnl=Array.isArray(x.namelength)?x.namelength[l]:x.namelength);var b=n.hoverinfo;b&&(f.hi=Array.isArray(b)?b[l]:b);var _={};return _[t.index]=f,u.extendFlat(t,{color:w(n,f),x0:v-y,x1:v+y,xLabelVal:f.x,y0:m-y,y1:m+y,yLabelVal:f.y,cd:_,distance:o,spikeDistance:s}),f.htx?t.text=f.htx:f.tx?t.text=f.tx:n.text&&(t.text=n.text),k(f,n,t),c.getComponentMethod(\\\"errorbars\\\",\\\"hoverInfo\\\")(f,n,t),t}function z(t){var e,r,n=t[0],i=n.trace,a=n.t,o=a._scene,s=a.index,l=o.selectBatch[s],c=o.unselectBatch[s],f=o.textOptions[s],h=o.textSelectedOptions[s]||{},p=o.textUnselectedOptions[s]||{},g=u.extendFlat({},f);if(l&&c){var v=h.color,m=p.color,y=f.color,x=Array.isArray(y);for(g.color=new Array(i._length),e=0;e<l.length;e++)r=l[e],g.color[r]=v||(x?y[r]:y);for(e=0;e<c.length;e++){r=c[e];var b=x?y[r]:y;g.color[r]=m||(v?b:d.addOpacity(b,S))}}o.glText[s].update(g)}e.exports={moduleType:\\\"trace\\\",name:\\\"scattergl\\\",basePlotModule:t(\\\"../../plots/cartesian\\\"),categories:[\\\"gl\\\",\\\"regl\\\",\\\"cartesian\\\",\\\"symbols\\\",\\\"errorBarsOK\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),crossTraceDefaults:t(\\\"../scatter/cross_trace_defaults\\\"),colorbar:t(\\\"../scatter/marker_colorbar\\\"),calc:function(t,e){var r,n,i,a=t._fullLayout,s=h.getFromId(t,e.xaxis),l=h.getFromId(t,e.yaxis),c=a._plots[e.xaxis+e.yaxis],f=e._length,p=2*f,d={},g=s.makeCalcdata(e,\\\"x\\\"),v=l.makeCalcdata(e,\\\"y\\\"),_=new Array(p);for(r=0;r<f;r++)n=g[r],i=v[r],_[2*r]=n===A?NaN:n,_[2*r+1]=i===A?NaN:i;if(\\\"log\\\"===s.type)for(r=0;r<p;r+=2)_[r]=s.c2l(_[r]);if(\\\"log\\\"===l.type)for(r=1;r<p;r+=2)_[r]=l.c2l(_[r]);if(\\\"log\\\"!==s.type&&\\\"log\\\"!==l.type)d.tree=o(_);else{var w=d.ids=new Array(f);for(r=0;r<f;r++)w[r]=r}b(e);var k=function(t,e,r,n,i,a){var o=M.style(t,r);if(o.marker&&(o.marker.positions=n),o.line&&n.length>1&&u.extendFlat(o.line,M.linePositions(t,r,n)),o.errorX||o.errorY){var s=M.errorBarPositions(t,r,n,i,a);o.errorX&&u.extendFlat(o.errorX,s.x),o.errorY&&u.extendFlat(o.errorY,s.y)}return o.text&&(u.extendFlat(o.text,{positions:n},M.textPosition(t,r,o.text,o.marker)),u.extendFlat(o.textSel,{positions:n},M.textPosition(t,r,o.text,o.markerSel)),u.extendFlat(o.textUnsel,{positions:n},M.textPosition(t,r,o.text,o.markerUnsel))),o}(t,0,e,_,g,v),S=E(0,c);x(a,e);var L=f<T?m(e,f):2*(k.marker.sizeAvg||Math.max(k.marker.size,3));return y(t,e,s,l,g,v,L),k.errorX&&C(e,s,k.errorX),k.errorY&&C(e,l,k.errorY),k.fill&&!S.fill2d&&(S.fill2d=!0),k.marker&&!S.scatter2d&&(S.scatter2d=!0),k.line&&!S.line2d&&(S.line2d=!0),!k.errorX&&!k.errorY||S.error2d||(S.error2d=!0),k.text&&!S.glText&&(S.glText=!0),k.marker&&f>=T&&(k.marker.cluster=d.tree),S.lineOptions.push(k.line),S.errorXOptions.push(k.errorX),S.errorYOptions.push(k.errorY),S.fillOptions.push(k.fill),S.markerOptions.push(k.marker),S.markerSelectedOptions.push(k.markerSel),S.markerUnselectedOptions.push(k.markerUnsel),S.textOptions.push(k.text),S.textSelectedOptions.push(k.textSel),S.textUnselectedOptions.push(k.textUnsel),d._scene=S,d.index=S.count,d.x=g,d.y=v,d.positions=_,S.count++,[{x:!1,y:!1,t:d,trace:e}]},plot:function(t,e,r){if(r.length){var o,s,c=t._fullLayout,h=e._scene,p=e.xaxis,d=e.yaxis;if(h)if(f(t,[\\\"ANGLE_instanced_arrays\\\",\\\"OES_element_index_uint\\\"])){var g=c._glcanvas.data()[0].regl;if(_(t,e,r),h.dirty){if(!0===h.error2d&&(h.error2d=a(g)),!0===h.line2d&&(h.line2d=i(g)),!0===h.scatter2d&&(h.scatter2d=n(g)),!0===h.fill2d&&(h.fill2d=i(g)),!0===h.glText)for(h.glText=new Array(h.count),o=0;o<h.count;o++)h.glText[o]=new l(g);if(h.glText)for(o=0;o<h.count;o++)h.glText[o].update(h.textOptions[o]);if(h.line2d&&(h.line2d.update(h.lineOptions),h.lineOptions=h.lineOptions.map(function(t){if(t&&t.positions){for(var e=t.positions,r=0;r<e.length&&(isNaN(e[r])||isNaN(e[r+1]));)r+=2;for(var n=e.length-2;n>r&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t}),h.line2d.update(h.lineOptions)),h.error2d){var v=(h.errorXOptions||[]).concat(h.errorYOptions||[]);h.error2d.update(v)}h.scatter2d&&h.scatter2d.update(h.markerOptions),h.fillOrder=u.repeat(null,h.count),h.fill2d&&(h.fillOptions=h.fillOptions.map(function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,c=h.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(h.fillOrder[e]=u);var f,p,d=[],g=c&&c.positions||l.positions;if(\\\"tozeroy\\\"===s.fill){for(f=0;f<g.length&&isNaN(g[f+1]);)f+=2;for(p=g.length-2;p>f&&isNaN(g[p+1]);)p-=2;0!==g[f+1]&&(d=[g[f],0]),d=d.concat(g.slice(f,p+2)),0!==g[p+1]&&(d=d.concat([g[p],0]))}else if(\\\"tozerox\\\"===s.fill){for(f=0;f<g.length&&isNaN(g[f]);)f+=2;for(p=g.length-2;p>f&&isNaN(g[p]);)p-=2;0!==g[f]&&(d=[0,g[f+1]]),d=d.concat(g.slice(f,p+2)),0!==g[p]&&(d=d.concat([0,g[p+1]]))}else if(\\\"toself\\\"===s.fill||\\\"tonext\\\"===s.fill){for(d=[],i=0,a=0;a<g.length;a+=2)(isNaN(g[a])||isNaN(g[a+1]))&&((d=d.concat(g.slice(i,a))).push(g[i],g[i+1]),i=a+2);d=d.concat(g.slice(i)),i&&d.push(g[i],g[i+1])}else{var v=s._nexttrace;if(v){var m=h.lineOptions[e+1];if(m){var y=m.positions;if(\\\"tonexty\\\"===s.fill){for(d=g.slice(),e=Math.floor(y.length/2);e--;){var x=y[2*e],b=y[2*e+1];isNaN(x)||isNaN(b)||d.push(x,b)}t.fill=v.fillcolor}}}}if(s._prevtrace&&\\\"tonext\\\"===s._prevtrace.fill){var _=h.lineOptions[e-1].positions,w=d.length/2,k=[i=w];for(a=0;a<_.length;a+=2)(isNaN(_[a])||isNaN(_[a+1]))&&(k.push(a/2+w+1),i=a+2);d=d.concat(_),t.hole=k}return t.fillmode=s.fill,t.opacity=s.opacity,t.positions=d,t}}),h.fill2d.update(h.fillOptions))}h.selectBatch=null,h.unselectBatch=null;var m=c.dragmode,y=\\\"lasso\\\"===m||\\\"select\\\"===m,x=c.clickmode.indexOf(\\\"select\\\")>-1;for(o=0;o<r.length;o++){var b=r[o][0],w=b.trace,k=b.t,M=k.index,A=w._length,T=k.x,S=k.y;if(w.selectedpoints||y||x){if(y||(y=!0),h.selectBatch||(h.selectBatch=[],h.unselectBatch=[]),w.selectedpoints){var C=h.selectBatch[M]=u.selIndices2selPoints(w),E={};for(s=0;s<C.length;s++)E[C[s]]=1;var L=[];for(s=0;s<A;s++)E[s]||L.push(s);h.unselectBatch[M]=L}var O=k.xpx=new Array(A),I=k.ypx=new Array(A);for(s=0;s<A;s++)O[s]=p.c2p(T[s]),I[s]=d.c2p(S[s])}else k.xpx=k.ypx=null}y?(h.select2d||(h.select2d=n(c._glcanvas.data()[1].regl)),h.scatter2d&&h.selectBatch&&h.selectBatch.length&&h.scatter2d.update(h.markerUnselectedOptions.map(function(t,e){return h.selectBatch[e]?t:null})),h.select2d&&(h.select2d.update(h.markerOptions),h.select2d.update(h.markerSelectedOptions)),h.glText&&r.forEach(function(t){t&&t[0]&&t[0].trace&&z(t)})):h.scatter2d&&h.scatter2d.update(h.markerOptions);var P={viewport:function(t,e,r){var n=t._size,i=t.width,a=t.height;return[n.l+e.domain[0]*n.w,n.b+r.domain[0]*n.h,i-n.r-(1-e.domain[1])*n.w,a-n.t-(1-r.domain[1])*n.h]}(c,p,d),range:[(p._rl||p.range)[0],(d._rl||d.range)[0],(p._rl||p.range)[1],(d._rl||d.range)[1]]},D=u.repeat(P,h.count);h.fill2d&&h.fill2d.update(D),h.line2d&&h.line2d.update(D),h.error2d&&h.error2d.update(D.concat(D)),h.scatter2d&&h.scatter2d.update(D),h.select2d&&h.select2d.update(D),h.glText&&h.glText.forEach(function(t){t.update(P)})}else h.init()}},hoverPoints:function(t,e,r,n){var i,a,o,s,l,c,u,f,h,p=t.cd,d=p[0].t,g=p[0].trace,v=t.xa,m=t.ya,y=d.x,x=d.y,b=v.c2p(e),_=m.c2p(r),w=t.distance;if(d.tree){var k=v.p2c(b-w),M=v.p2c(b+w),A=m.p2c(_-w),T=m.p2c(_+w);i=\\\"x\\\"===n?d.tree.range(Math.min(k,M),Math.min(m._rl[0],m._rl[1]),Math.max(k,M),Math.max(m._rl[0],m._rl[1])):d.tree.range(Math.min(k,M),Math.min(A,T),Math.max(k,M),Math.max(A,T))}else{if(!d.ids)return[t];i=d.ids}var S=w;if(\\\"x\\\"===n)for(l=0;l<i.length;l++)o=y[i[l]],(c=Math.abs(v.c2p(o)-b))<S&&(S=c,u=m.c2p(x[i[l]])-_,h=Math.sqrt(c*c+u*u),a=i[l]);else for(l=0;l<i.length;l++)o=y[i[l]],s=x[i[l]],c=v.c2p(o)-b,u=m.c2p(s)-_,(f=Math.sqrt(c*c+u*u))<S&&(S=h=f,a=i[l]);return t.index=a,t.distance=S,t.dxy=h,void 0===a?[t]:(L(t,y,x,g),[t])},selectPoints:function(t,e){var r=t.cd,n=[],i=r[0].trace,a=r[0].t,o=i._length,l=a.x,c=a.y,u=a._scene;if(!u)return n;var f=g.hasText(i),h=g.hasMarkers(i),p=!h&&!f;if(!0!==i.visible||p)return n;var d,v=null,m=null;if(!1===e||e.degenerate)m=s(o);else for(v=[],m=[],d=0;d<o;d++)e.contains([a.xpx[d],a.ypx[d]],!1,d,t)?(v.push(d),n.push({pointNumber:d,x:l[d],y:c[d]})):m.push(d);if(u.selectBatch||(u.selectBatch=[],u.unselectBatch=[]),!u.selectBatch[a.index]){for(d=0;d<u.count;d++)u.selectBatch[d]=[],u.unselectBatch[d]=[];h&&u.scatter2d.update(u.markerUnselectedOptions)}return u.selectBatch[a.index]=v,u.unselectBatch[a.index]=m,f&&z(r),n},sceneUpdate:E,calcHover:L,meta:{}}},{\\\"../../components/color\\\":570,\\\"../../constants/interactions\\\":672,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../lib/prepare_regl\\\":710,\\\"../../plots/cartesian\\\":757,\\\"../../plots/cartesian/autorange\\\":744,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../registry\\\":828,\\\"../scatter/calc\\\":1045,\\\"../scatter/colorscale_calc\\\":1047,\\\"../scatter/cross_trace_defaults\\\":1050,\\\"../scatter/fill_hover_text\\\":1052,\\\"../scatter/get_trace_color\\\":1054,\\\"../scatter/link_traces\\\":1060,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/subtypes\\\":1068,\\\"./attributes\\\":1093,\\\"./constants\\\":1094,\\\"./convert\\\":1095,\\\"./defaults\\\":1096,\\\"array-range\\\":55,\\\"gl-text\\\":304,\\\"point-cluster\\\":452,\\\"regl-error2d\\\":473,\\\"regl-line2d\\\":474,\\\"regl-scatter2d\\\":475}],1098:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scattergeo/attributes\\\"),i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../plots/mapbox/layout_attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../components/colorbar/attributes\\\"),l=t(\\\"../../lib/extend\\\").extendFlat,c=t(\\\"../../plot_api/edit_types\\\").overrideAll,u=n.line,f=n.marker;e.exports=c({lon:n.lon,lat:n.lat,mode:l({},i.mode,{dflt:\\\"markers\\\"}),text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),line:{color:u.color,width:u.width},connectgaps:i.connectgaps,marker:{symbol:{valType:\\\"string\\\",dflt:\\\"circle\\\",arrayOk:!0},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,color:f.color,colorscale:f.colorscale,cauto:f.cauto,cmax:f.cmax,cmin:f.cmin,autocolorscale:f.autocolorscale,reversescale:f.reversescale,showscale:f.showscale,colorbar:s},fill:n.fill,fillcolor:i.fillcolor,textfont:a.layers.symbol.textfont,textposition:a.layers.symbol.textposition,selected:{marker:i.selected.marker},unselected:{marker:i.unselected.marker},hoverinfo:l({},o.hoverinfo,{flags:[\\\"lon\\\",\\\"lat\\\",\\\"text\\\",\\\"name\\\"]})},\\\"calc\\\",\\\"nested\\\")},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742,\\\"../../plots/mapbox/layout_attributes\\\":805,\\\"../scatter/attributes\\\":1044,\\\"../scattergeo/attributes\\\":1084}],1099:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM,o=t(\\\"../../lib/geojson_utils\\\"),s=t(\\\"../../components/colorscale\\\"),l=t(\\\"../../components/drawing\\\"),c=t(\\\"../scatter/make_bubble_size_func\\\"),u=t(\\\"../scatter/subtypes\\\"),f=t(\\\"../../plots/mapbox/convert_text_opts\\\");function h(){return{geojson:o.makeBlank(),layout:{visibility:\\\"none\\\"},paint:{}}}function p(t){return i.isArrayOrTypedArray(t)?function(t){return t}:t?function(){return t}:d}function d(){return\\\"\\\"}function g(t){return t[0]===a}e.exports=function(t){var e,r=t[0].trace,a=!0===r.visible,v=\\\"none\\\"!==r.fill,m=u.hasLines(r),y=u.hasMarkers(r),x=u.hasText(r),b=y&&\\\"circle\\\"===r.marker.symbol,_=y&&\\\"circle\\\"!==r.marker.symbol,w=h(),k=h(),M=h(),A=h(),T={fill:w,line:k,circle:M,symbol:A};if(!a)return T;if((v||m)&&(e=o.calcTraceToLineCoords(t)),v&&(w.geojson=o.makePolygon(e),w.layout.visibility=\\\"visible\\\",i.extendFlat(w.paint,{\\\"fill-color\\\":r.fillcolor})),m&&(k.geojson=o.makeLine(e),k.layout.visibility=\\\"visible\\\",i.extendFlat(k.paint,{\\\"line-width\\\":r.line.width,\\\"line-color\\\":r.line.color,\\\"line-opacity\\\":r.opacity})),b){var S=function(t){var e,r,a,o,u=t[0].trace,f=u.marker,h=u.selectedpoints,p=i.isArrayOrTypedArray(f.color),d=i.isArrayOrTypedArray(f.size),v=i.isArrayOrTypedArray(f.opacity);function m(t){return u.opacity*t}p&&(r=s.hasColorscale(u,\\\"marker\\\")?s.makeColorScaleFunc(s.extractScale(f.colorscale,f.cmin,f.cmax)):i.identity);d&&(a=c(u));v&&(o=function(t){var e=n(t)?+i.constrain(t,0,1):0;return m(e)});var y,x=[];for(e=0;e<t.length;e++){var b=t[e],_=b.lonlat;if(!g(_)){var w={};r&&(w.mcc=b.mcc=r(b.mc)),a&&(w.mrc=b.mrc=a(b.ms)),o&&(w.mo=o(b.mo)),h&&(w.selected=b.selected||0),x.push({type:\\\"Feature\\\",geometry:{type:\\\"Point\\\",coordinates:_},properties:w})}}if(h)for(y=l.makeSelectedPointStyleFns(u),e=0;e<x.length;e++){var k=x[e].properties;y.selectedOpacityFn&&(k.mo=m(y.selectedOpacityFn(k))),y.selectedColorFn&&(k.mcc=y.selectedColorFn(k)),y.selectedSizeFn&&(k.mrc=y.selectedSizeFn(k))}return{geojson:{type:\\\"FeatureCollection\\\",features:x},mcc:p||y&&y.selectedColorFn?{type:\\\"identity\\\",property:\\\"mcc\\\"}:f.color,mrc:d||y&&y.selectedSizeFn?{type:\\\"identity\\\",property:\\\"mrc\\\"}:(M=f.size,M/2),mo:v||y&&y.selectedOpacityFn?{type:\\\"identity\\\",property:\\\"mo\\\"}:m(f.opacity)};var M}(t);M.geojson=S.geojson,M.layout.visibility=\\\"visible\\\",i.extendFlat(M.paint,{\\\"circle-color\\\":S.mcc,\\\"circle-radius\\\":S.mrc,\\\"circle-opacity\\\":S.mo})}if((_||x)&&(A.geojson=function(t){for(var e=t[0].trace,r=(e.marker||{}).symbol,n=e.text,i=\\\"circle\\\"!==r?p(r):d,a=u.hasText(e)?p(n):d,o=[],s=0;s<t.length;s++){var l=t[s];g(l.lonlat)||o.push({type:\\\"Feature\\\",geometry:{type:\\\"Point\\\",coordinates:l.lonlat},properties:{symbol:i(l.mx),text:a(l.tx)}})}return{type:\\\"FeatureCollection\\\",features:o}}(t),i.extendFlat(A.layout,{visibility:\\\"visible\\\",\\\"icon-image\\\":\\\"{symbol}-15\\\",\\\"text-field\\\":\\\"{text}\\\"}),_&&(i.extendFlat(A.layout,{\\\"icon-size\\\":r.marker.size/10}),i.extendFlat(A.paint,{\\\"icon-opacity\\\":r.opacity*r.marker.opacity,\\\"icon-color\\\":r.marker.color})),x)){var C=(r.marker||{}).size,E=f(r.textposition,C);i.extendFlat(A.layout,{\\\"text-size\\\":r.textfont.size,\\\"text-anchor\\\":E.anchor,\\\"text-offset\\\":E.offset}),i.extendFlat(A.paint,{\\\"text-color\\\":r.textfont.color,\\\"text-opacity\\\":r.opacity})}return T}},{\\\"../../components/colorscale\\\":585,\\\"../../components/drawing\\\":595,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../lib/geojson_utils\\\":689,\\\"../../plots/mapbox/convert_text_opts\\\":802,\\\"../scatter/make_bubble_size_func\\\":1061,\\\"../scatter/subtypes\\\":1068,\\\"fast-isnumeric\\\":214}],1100:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../scatter/marker_defaults\\\"),o=t(\\\"../scatter/line_defaults\\\"),s=t(\\\"../scatter/text_defaults\\\"),l=t(\\\"../scatter/fillcolor_defaults\\\"),c=t(\\\"./attributes\\\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}if(function(t,e,r){var n=r(\\\"lon\\\")||[],i=r(\\\"lat\\\")||[],a=Math.min(n.length,i.length);return e._length=a,a}(0,e,f)){if(f(\\\"text\\\"),f(\\\"hovertext\\\"),f(\\\"mode\\\"),i.hasLines(e)&&(o(t,e,r,u,f,{noDash:!0}),f(\\\"connectgaps\\\")),i.hasMarkers(e)){a(t,e,r,u,f,{noLine:!0});var h=e.marker;\\\"circle\\\"!==h.symbol&&(n.isArrayOrTypedArray(h.size)&&(h.size=h.size[0]),n.isArrayOrTypedArray(h.color)&&(h.color=h.color[0]))}i.hasText(e)&&s(t,e,u,f,{noSelect:!0}),f(\\\"fill\\\"),\\\"none\\\"!==e.fill&&l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1098}],1101:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t}},{}],1102:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/fx\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../scatter/get_trace_color\\\"),o=t(\\\"../scatter/fill_hover_text\\\"),s=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e,r){var l=t.cd,c=l[0].trace,u=t.xa,f=t.ya,h=t.subplot,p=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-p;if(n.getClosest(l,function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=h.project([n,a]),l=o.x-u.c2p([d,a]),c=o.y-f.c2p([n,r]),p=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-p,1-3/p)},t),!1!==t.index){var g=l[t.index],v=g.lonlat,m=[i.modHalf(v[0],360)+p,v[1]],y=u.c2p(m),x=f.c2p(m),b=g.mrc||1;return t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b,t.color=a(c,g),t.extraText=function(t,e,r){var n=(e.hi||t.hoverinfo).split(\\\"+\\\"),i=-1!==n.indexOf(\\\"all\\\"),a=-1!==n.indexOf(\\\"lon\\\"),s=-1!==n.indexOf(\\\"lat\\\"),l=e.lonlat,c=[];function u(t){return t+\\\"\\\\xb0\\\"}i||a&&s?c.push(\\\"(\\\"+u(l[0])+\\\", \\\"+u(l[1])+\\\")\\\"):a?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(i||-1!==n.indexOf(\\\"text\\\"))&&o(e,t,c);return c.join(\\\"<br>\\\")}(c,g,l[0].t.labels),[t]}}},{\\\"../../components/fx\\\":612,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../scatter/fill_hover_text\\\":1052,\\\"../scatter/get_trace_color\\\":1054}],1103:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"../scattergeo/calc\\\"),n.plot=t(\\\"./plot\\\"),n.hoverPoints=t(\\\"./hover\\\"),n.eventData=t(\\\"./event_data\\\"),n.selectPoints=t(\\\"./select\\\"),n.style=function(t,e){e&&e[0].trace._glTrace.update(e)},n.moduleType=\\\"trace\\\",n.name=\\\"scattermapbox\\\",n.basePlotModule=t(\\\"../../plots/mapbox\\\"),n.categories=[\\\"mapbox\\\",\\\"gl\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatterlike\\\"],n.meta={},e.exports=n},{\\\"../../plots/mapbox\\\":803,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scattergeo/calc\\\":1085,\\\"./attributes\\\":1098,\\\"./defaults\\\":1100,\\\"./event_data\\\":1101,\\\"./hover\\\":1102,\\\"./plot\\\":1104,\\\"./select\\\":1105}],1104:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./convert\\\");function i(t,e){this.subplot=t,this.uid=e,this.sourceIds={fill:e+\\\"-source-fill\\\",line:e+\\\"-source-line\\\",circle:e+\\\"-source-circle\\\",symbol:e+\\\"-source-symbol\\\"},this.layerIds={fill:e+\\\"-layer-fill\\\",line:e+\\\"-layer-line\\\",circle:e+\\\"-layer-circle\\\",symbol:e+\\\"-layer-symbol\\\"},this.order=[\\\"fill\\\",\\\"line\\\",\\\"circle\\\",\\\"symbol\\\"]}var a=i.prototype;a.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:\\\"geojson\\\",data:e.geojson})},a.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},a.addLayer=function(t,e){this.subplot.map.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint})},a.update=function(t){for(var e=this.subplot,r=n(t),i=0;i<this.order.length;i++){var a=this.order[i],o=r[a];e.setOptions(this.layerIds[a],\\\"setLayoutProperty\\\",o.layout),\\\"visible\\\"===o.layout.visibility&&(this.setSourceData(a,o),e.setOptions(this.layerIds[a],\\\"setPaintProperty\\\",o.paint))}t[0].trace._glTrace=this},a.dispose=function(){for(var t=this.subplot.map,e=0;e<this.order.length;e++){var r=this.order[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=new i(t,e[0].trace.uid),a=n(e),o=0;o<r.order.length;o++){var s=r.order[o],l=a[s];r.addSource(s,l),r.addLayer(s,l)}return e[0].trace._glTrace=r,r}},{\\\"./convert\\\":1099}],1105:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e){var r,o=t.cd,s=t.xaxis,l=t.yaxis,c=[],u=o[0].trace;if(!i.hasMarkers(u))return[];if(!1===e)for(r=0;r<o.length;r++)o[r].selected=0;else for(r=0;r<o.length;r++){var f=o[r],h=f.lonlat;if(h[0]!==a){var p=[n.modHalf(h[0],360),h[1]],d=[s.c2p(p),l.c2p(p)];e.contains(d,null,r,t)?(c.push({pointNumber:r,lon:h[0],lat:h[1]}),f.selected=1):f.selected=0}}return c}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../scatter/subtypes\\\":1068}],1106:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/extend\\\").extendFlat,i=t(\\\"../scatter/attributes\\\"),a=t(\\\"../../plots/attributes\\\"),o=i.line;e.exports={mode:i.mode,r:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},theta:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},r0:{valType:\\\"any\\\",dflt:0,editType:\\\"calc+clearAxisTypes\\\"},dr:{valType:\\\"number\\\",dflt:1,editType:\\\"calc\\\"},theta0:{valType:\\\"any\\\",dflt:0,editType:\\\"calc+clearAxisTypes\\\"},dtheta:{valType:\\\"number\\\",editType:\\\"calc\\\"},thetaunit:{valType:\\\"enumerated\\\",values:[\\\"radians\\\",\\\"degrees\\\",\\\"gradians\\\"],dflt:\\\"degrees\\\",editType:\\\"calc+clearAxisTypes\\\"},text:i.text,hovertext:i.hovertext,line:{color:o.color,width:o.width,dash:o.dash,shape:n({},o.shape,{values:[\\\"linear\\\",\\\"spline\\\"]}),smoothing:o.smoothing,editType:\\\"calc\\\"},connectgaps:i.connectgaps,marker:i.marker,cliponaxis:n({},i.cliponaxis,{dflt:!1}),textposition:i.textposition,textfont:i.textfont,fill:n({},i.fill,{values:[\\\"none\\\",\\\"toself\\\",\\\"tonext\\\"],dflt:\\\"none\\\"}),fillcolor:i.fillcolor,hoverinfo:n({},a.hoverinfo,{flags:[\\\"r\\\",\\\"theta\\\",\\\"text\\\",\\\"name\\\"]}),hoveron:i.hoveron,selected:i.selected,unselected:i.unselected}},{\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1107:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM,a=t(\\\"../../plots/cartesian/axes\\\"),o=t(\\\"../scatter/colorscale_calc\\\"),s=t(\\\"../scatter/arrays_to_calcdata\\\"),l=t(\\\"../scatter/calc_selection\\\"),c=t(\\\"../scatter/calc\\\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,u=e.subplot,f=r[u].radialaxis,h=r[u].angularaxis,p=f.makeCalcdata(e,\\\"r\\\"),d=h.makeCalcdata(e,\\\"theta\\\"),g=e._length,v=new Array(g),m=0;m<g;m++){var y=p[m],x=d[m],b=v[m]={};n(y)&&n(x)?(b.r=y,b.theta=x):b.r=i}var _=c(e,g);return e._extremes.x=a.findExtremes(f,p,{ppad:_}),o(e),s(v,e),l(v,e),v}},{\\\"../../constants/numerical\\\":673,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc\\\":1045,\\\"../scatter/calc_selection\\\":1046,\\\"../scatter/colorscale_calc\\\":1047,\\\"fast-isnumeric\\\":214}],1108:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../scatter/marker_defaults\\\"),o=t(\\\"../scatter/line_defaults\\\"),s=t(\\\"../scatter/line_shape_defaults\\\"),l=t(\\\"../scatter/text_defaults\\\"),c=t(\\\"../scatter/fillcolor_defaults\\\"),u=t(\\\"../scatter/constants\\\").PTS_LINESONLY,f=t(\\\"./attributes\\\");function h(t,e,r,n){var i,a=n(\\\"r\\\"),o=n(\\\"theta\\\");if(a)o?i=Math.min(a.length,o.length):(i=a.length,n(\\\"theta0\\\"),n(\\\"dtheta\\\"));else{if(!o)return 0;i=e.theta.length,n(\\\"r0\\\"),n(\\\"dr\\\")}return e._length=i,i}e.exports={handleRThetaDefaults:h,supplyDefaults:function(t,e,r,p){function d(r,i){return n.coerce(t,e,f,r,i)}var g=h(0,e,0,d);if(g){d(\\\"thetaunit\\\"),d(\\\"mode\\\",g<u?\\\"lines+markers\\\":\\\"lines\\\"),d(\\\"text\\\"),d(\\\"hovertext\\\"),i.hasLines(e)&&(o(t,e,r,p,d),s(t,e,d),d(\\\"connectgaps\\\")),i.hasMarkers(e)&&a(t,e,r,p,d,{gradient:!0}),i.hasText(e)&&l(t,e,p,d);var v=[];(i.hasMarkers(e)||i.hasText(e))&&(d(\\\"cliponaxis\\\"),d(\\\"marker.maxdisplayed\\\"),v.push(\\\"points\\\")),d(\\\"fill\\\"),\\\"none\\\"!==e.fill&&(c(t,e,r,d),i.hasLines(e)||s(t,e,d)),\\\"tonext\\\"!==e.fill&&\\\"toself\\\"!==e.fill||v.push(\\\"fills\\\"),d(\\\"hoveron\\\",v.join(\\\"+\\\")||\\\"points\\\"),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}}},{\\\"../../lib\\\":696,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/line_shape_defaults\\\":1059,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1106}],1109:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/hover\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../../lib\\\");function o(t,e,r,n){var o=r.radialAxis,s=r.angularAxis,l=(t.hi||e.hoverinfo).split(\\\"+\\\"),c=[];function u(t,e){c.push(t._hovertitle+\\\": \\\"+i.tickText(t,e,\\\"hover\\\").text)}if(o._hovertitle=\\\"r\\\",s._hovertitle=\\\"\\\\u03b8\\\",-1!==l.indexOf(\\\"all\\\")&&(l=[\\\"r\\\",\\\"theta\\\",\\\"text\\\"]),-1!==l.indexOf(\\\"r\\\")&&u(o,o.c2l(t.r)),-1!==l.indexOf(\\\"theta\\\")){var f=t.theta;u(s,\\\"degrees\\\"===s.thetaunit?a.rad2deg(f):f)}-1!==l.indexOf(\\\"text\\\")&&n.text&&(c.push(n.text),delete n.text),n.extraText=c.join(\\\"<br>\\\")}e.exports={hoverPoints:function(t,e,r,i){var a=n(t,e,r,i);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,o(c,u,l,s),a}},makeHoverPointText:o}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/hover\\\":1055}],1110:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"scatterpolar\\\",basePlotModule:t(\\\"../../plots/polar\\\"),categories:[\\\"polar\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\").supplyDefaults,colorbar:t(\\\"../scatter/marker_colorbar\\\"),calc:t(\\\"./calc\\\"),plot:t(\\\"./plot\\\"),style:t(\\\"../scatter/style\\\").style,hoverPoints:t(\\\"./hover\\\").hoverPoints,selectPoints:t(\\\"../scatter/select\\\"),meta:{}}},{\\\"../../plots/polar\\\":812,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/select\\\":1065,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1106,\\\"./calc\\\":1107,\\\"./defaults\\\":1108,\\\"./hover\\\":1109,\\\"./plot\\\":1111}],1111:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/plot\\\"),i=t(\\\"../../constants/numerical\\\").BADNUM;e.exports=function(t,e,r){for(var a=e.layers.frontplot.select(\\\"g.scatterlayer\\\"),o={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=e.radialAxis,l=e.angularAxis,c=0;c<r.length;c++)for(var u=r[c],f=0;f<u.length;f++){var h=u[f],p=h.r;if(p===i)h.x=h.y=i;else{var d=s.c2g(p),g=l.c2g(h.theta);h.x=d*Math.cos(g),h.y=d*Math.sin(g)}}n(t,o,r,a)}},{\\\"../../constants/numerical\\\":673,\\\"../scatter/plot\\\":1064}],1112:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatterpolar/attributes\\\"),i=t(\\\"../scattergl/attributes\\\");e.exports={mode:n.mode,r:n.r,theta:n.theta,r0:n.r0,dr:n.dr,theta0:n.theta0,dtheta:n.dtheta,thetaunit:n.thetaunit,text:n.text,hovertext:n.hovertext,line:i.line,connectgaps:i.connectgaps,marker:i.marker,fill:i.fill,fillcolor:i.fillcolor,textposition:i.textposition,textfont:i.textfont,hoverinfo:n.hoverinfo,selected:n.selected,unselected:n.unselected}},{\\\"../scattergl/attributes\\\":1093,\\\"../scatterpolar/attributes\\\":1106}],1113:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/subtypes\\\"),a=t(\\\"../scatterpolar/defaults\\\").handleRThetaDefaults,o=t(\\\"../scatter/marker_defaults\\\"),s=t(\\\"../scatter/line_defaults\\\"),l=t(\\\"../scatter/text_defaults\\\"),c=t(\\\"../scatter/fillcolor_defaults\\\"),u=t(\\\"../scatter/constants\\\").PTS_LINESONLY,f=t(\\\"./attributes\\\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}var d=a(t,e,h,p);d?(p(\\\"thetaunit\\\"),p(\\\"mode\\\",d<u?\\\"lines+markers\\\":\\\"lines\\\"),p(\\\"text\\\"),p(\\\"hovertext\\\"),i.hasLines(e)&&(s(t,e,r,h,p),p(\\\"connectgaps\\\")),i.hasMarkers(e)&&o(t,e,r,h,p),i.hasText(e)&&l(t,e,h,p),p(\\\"fill\\\"),\\\"none\\\"!==e.fill&&c(t,e,r,p),n.coerceSelectionMarkerOpacity(e,p)):e.visible=!1}},{\\\"../../lib\\\":696,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"../scatterpolar/defaults\\\":1108,\\\"./attributes\\\":1112}],1114:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"point-cluster\\\"),i=t(\\\"fast-isnumeric\\\"),a=t(\\\"../scattergl\\\"),o=t(\\\"../scatter/colorscale_calc\\\"),s=t(\\\"../scatter/calc\\\").calcMarkerSize,l=t(\\\"../scattergl/convert\\\"),c=t(\\\"../../lib\\\"),u=t(\\\"../../plots/cartesian/axes\\\"),f=t(\\\"../scatterpolar/hover\\\").makeHoverPointText,h=t(\\\"../scattergl/constants\\\").TOO_MANY_POINTS;e.exports={moduleType:\\\"trace\\\",name:\\\"scatterpolargl\\\",basePlotModule:t(\\\"../../plots/polar\\\"),categories:[\\\"gl\\\",\\\"regl\\\",\\\"polar\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),colorbar:t(\\\"../scatter/marker_colorbar\\\"),calc:function(t,e){var r=t._fullLayout,n=e.subplot,i=r[n].radialaxis,a=r[n].angularaxis,c=i.makeCalcdata(e,\\\"r\\\"),f=a.makeCalcdata(e,\\\"theta\\\"),p=e._length,d={};p<c.length&&(c=c.slice(0,p)),p<f.length&&(f=f.slice(0,p)),d.r=c,d.theta=f,o(e);var g=d.opts=l.style(t,e),v=p<h?s(e,p):2*(g.marker.sizeAvg||Math.max(g.marker.size,3));return e._extremes.x=u.findExtremes(i,c,{ppad:v}),[{x:!1,y:!1,t:d,trace:e}]},plot:function(t,e,r){if(r.length){var o=e.radialAxis,s=e.angularAxis,u=a.sceneUpdate(t,e);return r.forEach(function(r){if(r&&r[0]&&r[0].trace){var a,f=r[0],p=f.trace,d=f.t,g=p._length,v=d.r,m=d.theta,y=d.opts,x=v.slice(),b=m.slice();for(a=0;a<v.length;a++)e.isPtInside({r:v[a],theta:m[a]})||(x[a]=NaN,b[a]=NaN);var _=new Array(2*g),w=Array(g),k=Array(g);for(a=0;a<g;a++){var M,A,T=x[a];if(i(T)){var S=o.c2g(T),C=s.c2g(b[a],p.thetaunit);M=S*Math.cos(C),A=S*Math.sin(C)}else M=A=NaN;w[a]=_[2*a]=M,k[a]=_[2*a+1]=A}d.tree=n(_),y.marker&&g>=h&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&c.extendFlat(y.line,l.linePositions(t,p,_)),y.text&&(c.extendFlat(y.text,{positions:_},l.textPosition(t,p,y.text,y.marker)),c.extendFlat(y.textSel,{positions:_},l.textPosition(t,p,y.text,y.markerSel)),c.extendFlat(y.textUnsel,{positions:_},l.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!u.fill2d&&(u.fill2d=!0),y.marker&&!u.scatter2d&&(u.scatter2d=!0),y.line&&!u.line2d&&(u.line2d=!0),y.text&&!u.glText&&(u.glText=!0),u.lineOptions.push(y.line),u.fillOptions.push(y.fill),u.markerOptions.push(y.marker),u.markerSelectedOptions.push(y.markerSel),u.markerUnselectedOptions.push(y.markerUnsel),u.textOptions.push(y.text),u.textSelectedOptions.push(y.textSel),u.textUnselectedOptions.push(y.textUnsel),d.x=w,d.y=k,d.rawx=w,d.rawy=k,d.r=v,d.theta=m,d.positions=_,d._scene=u,d.index=u.count,u.count++}}),a.plot(t,e,r)}},hoverPoints:function(t,e,r,n){var i=t.cd[0].t,o=i.r,s=i.theta,l=a.hoverPoints(t,e,r,n);if(l&&!1!==l[0].index){var c=l[0];if(void 0===c.index)return l;var u=t.subplot,h=c.cd[c.index],p=c.trace;if(h.r=o[c.index],h.theta=s[c.index],u.isPtInside(h))return c.xLabelVal=void 0,c.yLabelVal=void 0,f(h,p,u,c),l}},selectPoints:a.selectPoints,meta:{}}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/polar\\\":812,\\\"../scatter/calc\\\":1045,\\\"../scatter/colorscale_calc\\\":1047,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scattergl\\\":1097,\\\"../scattergl/constants\\\":1094,\\\"../scattergl/convert\\\":1095,\\\"../scatterpolar/hover\\\":1109,\\\"./attributes\\\":1112,\\\"./defaults\\\":1113,\\\"fast-isnumeric\\\":214,\\\"point-cluster\\\":452}],1115:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../plots/attributes\\\"),a=t(\\\"../../components/colorscale/attributes\\\"),o=t(\\\"../../components/colorbar/attributes\\\"),s=t(\\\"../../components/drawing/attributes\\\").dash,l=t(\\\"../../lib/extend\\\").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={a:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},b:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},c:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},sum:{valType:\\\"number\\\",dflt:0,min:0,editType:\\\"calc\\\"},mode:l({},n.mode,{dflt:\\\"markers\\\"}),text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:s,shape:l({},u.shape,{values:[\\\"linear\\\",\\\"spline\\\"]}),smoothing:u.smoothing,editType:\\\"calc\\\"},connectgaps:n.connectgaps,cliponaxis:n.cliponaxis,fill:l({},n.fill,{values:[\\\"none\\\",\\\"toself\\\",\\\"tonext\\\"],dflt:\\\"none\\\"}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:\\\"calc\\\"},a(\\\"marker.line\\\")),gradient:c.gradient,editType:\\\"calc\\\"},a(\\\"marker\\\"),{colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\\\"a\\\",\\\"b\\\",\\\"c\\\",\\\"text\\\",\\\"name\\\"]}),hoveron:n.hoveron}},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../components/drawing/attributes\\\":594,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../scatter/attributes\\\":1044}],1116:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"fast-isnumeric\\\"),i=t(\\\"../scatter/colorscale_calc\\\"),a=t(\\\"../scatter/arrays_to_calcdata\\\"),o=t(\\\"../scatter/calc_selection\\\"),s=t(\\\"../scatter/calc\\\").calcMarkerSize,l=[\\\"a\\\",\\\"b\\\",\\\"c\\\"],c={a:[\\\"b\\\",\\\"c\\\"],b:[\\\"a\\\",\\\"c\\\"],c:[\\\"a\\\",\\\"b\\\"]};e.exports=function(t,e){var r,u,f,h,p,d,g=t._fullLayout[e.subplot].sum,v=e.sum||g,m={a:e.a,b:e.b,c:e.c};for(r=0;r<l.length;r++)if(!m[f=l[r]]){for(p=m[c[f][0]],d=m[c[f][1]],h=new Array(p.length),u=0;u<p.length;u++)h[u]=v-p[u]-d[u];m[f]=h}var y,x,b,_,w,k,M=e._length,A=new Array(M);for(r=0;r<M;r++)y=m.a[r],x=m.b[r],b=m.c[r],n(y)&&n(x)&&n(b)?(1!==(_=g/((y=+y)+(x=+x)+(b=+b)))&&(y*=_,x*=_,b*=_),k=y,w=b-x,A[r]={x:w,y:k,a:y,b:x,c:b}):A[r]={x:!1,y:!1};return s(e,M),i(e),a(A,e),o(A,e),A}},{\\\"../scatter/arrays_to_calcdata\\\":1043,\\\"../scatter/calc\\\":1045,\\\"../scatter/calc_selection\\\":1046,\\\"../scatter/colorscale_calc\\\":1047,\\\"fast-isnumeric\\\":214}],1117:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../scatter/constants\\\"),a=t(\\\"../scatter/subtypes\\\"),o=t(\\\"../scatter/marker_defaults\\\"),s=t(\\\"../scatter/line_defaults\\\"),l=t(\\\"../scatter/line_shape_defaults\\\"),c=t(\\\"../scatter/text_defaults\\\"),u=t(\\\"../scatter/fillcolor_defaults\\\"),f=t(\\\"./attributes\\\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}var d,g=p(\\\"a\\\"),v=p(\\\"b\\\"),m=p(\\\"c\\\");if(g?(d=g.length,v?(d=Math.min(d,v.length),m&&(d=Math.min(d,m.length))):d=m?Math.min(d,m.length):0):v&&m&&(d=Math.min(v.length,m.length)),d){e._length=d,p(\\\"sum\\\"),p(\\\"text\\\"),p(\\\"hovertext\\\"),p(\\\"mode\\\",d<i.PTS_LINESONLY?\\\"lines+markers\\\":\\\"lines\\\"),a.hasLines(e)&&(s(t,e,r,h,p),l(t,e,p),p(\\\"connectgaps\\\")),a.hasMarkers(e)&&o(t,e,r,h,p,{gradient:!0}),a.hasText(e)&&c(t,e,h,p);var y=[];(a.hasMarkers(e)||a.hasText(e))&&(p(\\\"cliponaxis\\\"),p(\\\"marker.maxdisplayed\\\"),y.push(\\\"points\\\")),p(\\\"fill\\\"),\\\"none\\\"!==e.fill&&(u(t,e,r,p),a.hasLines(e)||l(t,e,p)),\\\"tonext\\\"!==e.fill&&\\\"toself\\\"!==e.fill||y.push(\\\"fills\\\"),p(\\\"hoveron\\\",y.join(\\\"+\\\")||\\\"points\\\"),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../scatter/constants\\\":1048,\\\"../scatter/fillcolor_defaults\\\":1053,\\\"../scatter/line_defaults\\\":1057,\\\"../scatter/line_shape_defaults\\\":1059,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"../scatter/text_defaults\\\":1069,\\\"./attributes\\\":1115}],1118:[function(t,e,r){\\\"use strict\\\";e.exports=function(t,e,r,n,i){if(e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),n[i]){var a=n[i];t.a=a.a,t.b=a.b,t.c=a.c}else t.a=e.a,t.b=e.b,t.c=e.c;return t}},{}],1119:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/hover\\\"),i=t(\\\"../../plots/cartesian/axes\\\");e.exports=function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index){var l=1-s.y0/t.ya._length,c=t.xa._length,u=c*l/2,f=c-u;return s.x0=Math.max(Math.min(s.x0,f),u),s.x1=Math.max(Math.min(s.x1,f),u),o}var h=s.cd[s.index];s.a=h.a,s.b=h.b,s.c=h.c,s.xLabelVal=void 0,s.yLabelVal=void 0;var p=s.trace,d=s.subplot,g=(h.hi||p.hoverinfo).split(\\\"+\\\"),v=[];return-1!==g.indexOf(\\\"all\\\")&&(g=[\\\"a\\\",\\\"b\\\",\\\"c\\\"]),-1!==g.indexOf(\\\"a\\\")&&m(d.aaxis,h.a),-1!==g.indexOf(\\\"b\\\")&&m(d.baxis,h.b),-1!==g.indexOf(\\\"c\\\")&&m(d.caxis,h.c),s.extraText=v.join(\\\"<br>\\\"),o}function m(t,e){v.push(t._hovertitle+\\\": \\\"+i.tickText(t,e,\\\"hover\\\").text)}}},{\\\"../../plots/cartesian/axes\\\":745,\\\"../scatter/hover\\\":1055}],1120:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar=t(\\\"../scatter/marker_colorbar\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.style=t(\\\"../scatter/style\\\").style,n.styleOnSelect=t(\\\"../scatter/style\\\").styleOnSelect,n.hoverPoints=t(\\\"./hover\\\"),n.selectPoints=t(\\\"../scatter/select\\\"),n.eventData=t(\\\"./event_data\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"scatterternary\\\",n.basePlotModule=t(\\\"../../plots/ternary\\\"),n.categories=[\\\"ternary\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],n.meta={},e.exports=n},{\\\"../../plots/ternary\\\":824,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/select\\\":1065,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1115,\\\"./calc\\\":1116,\\\"./defaults\\\":1117,\\\"./event_data\\\":1118,\\\"./hover\\\":1119,\\\"./plot\\\":1121}],1121:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/plot\\\");e.exports=function(t,e,r){var i=e.plotContainer;i.select(\\\".scatterlayer\\\").selectAll(\\\"*\\\").remove();var a={xaxis:e.xaxis,yaxis:e.yaxis,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},o=e.layers.frontplot.select(\\\"g.scatterlayer\\\");n(t,a,r,o)}},{\\\"../scatter/plot\\\":1064}],1122:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../scatter/attributes\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../scattergl/attributes\\\"),o=t(\\\"../../plots/cartesian/constants\\\").idRegex,s=t(\\\"../../plot_api/plot_template\\\").templatedArray,l=t(\\\"../../lib/extend\\\").extendFlat,c=n.marker,u=c.line,f=l(i(\\\"marker.line\\\",{editTypeOverride:\\\"calc\\\"}),{width:l({},u.width,{editType:\\\"calc\\\"}),editType:\\\"calc\\\"}),h=l(i(\\\"marker\\\"),{symbol:c.symbol,size:l({},c.size,{editType:\\\"markerSize\\\"}),sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,opacity:c.opacity,colorbar:c.colorbar,line:f,editType:\\\"calc\\\"});function p(t){return{valType:\\\"info_array\\\",freeLength:!0,editType:\\\"calc\\\",items:{valType:\\\"subplotid\\\",regex:o[t],editType:\\\"plot\\\"}}}h.color.editType=h.cmin.editType=h.cmax.editType=\\\"style\\\",e.exports={dimensions:s(\\\"dimension\\\",{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},label:{valType:\\\"string\\\",editType:\\\"calc\\\"},values:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},axis:{type:{valType:\\\"enumerated\\\",values:[\\\"linear\\\",\\\"log\\\",\\\"date\\\",\\\"category\\\"],editType:\\\"calc+clearAxisTypes\\\"},editType:\\\"calc+clearAxisTypes\\\"},editType:\\\"calc+clearAxisTypes\\\"}),text:l({},a.text,{}),marker:h,xaxes:p(\\\"x\\\"),yaxes:p(\\\"y\\\"),diagonal:{visible:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},editType:\\\"calc\\\"},showupperhalf:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},showlowerhalf:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},selected:{marker:a.selected.marker,editType:\\\"calc\\\"},unselected:{marker:a.unselected.marker,editType:\\\"calc\\\"},opacity:a.opacity}},{\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/plot_template\\\":735,\\\"../../plots/cartesian/constants\\\":751,\\\"../scatter/attributes\\\":1044,\\\"../scattergl/attributes\\\":1093}],1123:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"regl-line2d\\\"),i=t(\\\"../../registry\\\"),a=t(\\\"../../lib/prepare_regl\\\"),o=t(\\\"../../plots/get_data\\\").getModuleCalcData,s=t(\\\"../../plots/cartesian\\\"),l=t(\\\"../../plots/cartesian/axis_ids\\\").getFromId,c=t(\\\"../../plots/cartesian/axes\\\").shouldShowZeroLine,u=\\\"splom\\\";function f(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;o<i.length;o++){var s=i[o],c=a[o]=new Array(4),u=l(t,e._diag[s][0]);u&&(c[0]=u.r2l(u.range[0]),c[2]=u.r2l(u.range[1]));var f=l(t,e._diag[s][1]);f&&(c[1]=f.r2l(f.range[0]),c[3]=f.r2l(f.range[1]))}r.selectBatch?r.matrix.update({ranges:a},{ranges:a}):r.matrix.update({ranges:a})}function h(t){var e=t._fullLayout,r=e._glcanvas.data()[0].regl,i=e._splomGrid;i||(i=e._splomGrid=n(r)),i.update(function(t){var e,r=t._fullLayout,n=r._size,i=[0,0,r.width,r.height],a={};function o(t,e,r,n,o,s){var l=e[t+\\\"color\\\"],c=e[t+\\\"width\\\"],u=String(l+c);u in a?a[u].data.push(NaN,NaN,r,n,o,s):a[u]={data:[r,n,o,s],join:\\\"rect\\\",thickness:c,color:l,viewport:i,range:i,overlay:!1}}for(e in r._splomSubplots){var s,l,u=r._plots[e],f=u.xaxis,h=u.yaxis,p=f._vals,d=h._vals,g=n.b+h.domain[0]*n.h,v=-h._m,m=-v*h.r2l(h.range[0],h.calendar);if(f.showgrid)for(e=0;e<p.length;e++)s=f._offset+f.l2p(p[e].x),o(\\\"grid\\\",f,s,g,s,g+h._length);if(h.showgrid)for(e=0;e<d.length;e++)l=g+m+v*d[e].x,o(\\\"grid\\\",h,f._offset,l,f._offset+f._length,l);c(t,f,h)&&(s=f._offset+f.l2p(0),o(\\\"zeroline\\\",f,s,g,s,g+h._length)),c(t,h,f)&&(l=g+m+0,o(\\\"zeroline\\\",h,f._offset,l,f._offset+f._length,l))}var y=[];for(e in a)y.push(a[e]);return y}(t))}e.exports={name:u,attr:s.attr,attrRegex:s.attrRegex,layoutAttributes:s.layoutAttributes,supplyLayoutDefaults:s.supplyLayoutDefaults,drawFramework:s.drawFramework,plot:function(t){var e=t._fullLayout,r=i.getModule(u),n=o(t.calcdata,r)[0];a(t,[\\\"ANGLE_instanced_arrays\\\",\\\"OES_element_index_uint\\\"])&&(e._hasOnlyLargeSploms&&h(t),r.plot(t,{},n))},drag:function(t){var e=t.calcdata,r=t._fullLayout;r._hasOnlyLargeSploms&&h(t);for(var n=0;n<e.length;n++){var i=e[n][0].trace,a=r._splomScenes[i.uid];\\\"splom\\\"===i.type&&a&&a.matrix&&f(t,i,a)}},updateGrid:h,clean:function(t,e,r,n){var i,a={};if(n._splomScenes){for(i=0;i<t.length;i++){var o=t[i];\\\"splom\\\"===o.type&&(a[o.uid]=1)}for(i=0;i<r.length;i++){var l=r[i];if(!a[l.uid]){var c=n._splomScenes[l.uid];c&&c.destroy&&c.destroy(),n._splomScenes[l.uid]=null,delete n._splomScenes[l.uid]}}}0===Object.keys(n._splomScenes||{}).length&&delete n._splomScenes,n._splomGrid&&!e._hasOnlyLargeSploms&&n._hasOnlyLargeSploms&&(n._splomGrid.destroy(),n._splomGrid=null,delete n._splomGrid),s.clean(t,e,r,n)},updateFx:function(t){s.updateFx(t);var e=t._fullLayout,r=e.dragmode;if(\\\"zoom\\\"===r||\\\"pan\\\"===r)for(var n=t.calcdata,i=0;i<n.length;i++){var a=n[i][0].trace;if(\\\"splom\\\"===a.type){var o=e._splomScenes[a.uid];null===o.selectBatch&&o.matrix.update(o.matrixOptions,null)}}},toSVG:s.toSVG}},{\\\"../../lib/prepare_regl\\\":710,\\\"../../plots/cartesian\\\":757,\\\"../../plots/cartesian/axes\\\":745,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../plots/get_data\\\":782,\\\"../../registry\\\":828,\\\"regl-line2d\\\":474}],1124:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/array_container_defaults\\\"),a=t(\\\"./attributes\\\"),o=t(\\\"../scatter/subtypes\\\"),s=t(\\\"../scatter/marker_defaults\\\"),l=t(\\\"../parcoords/merge_length\\\"),c=/-open/;function u(t,e){function r(r,i){return n.coerce(t,e,a.dimensions,r,i)}r(\\\"label\\\");var i=r(\\\"values\\\");i&&i.length?r(\\\"visible\\\"):e.visible=!1,r(\\\"axis.type\\\")}e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,a,r,i)}var p=i(t,e,{name:\\\"dimensions\\\",handleItemDefaults:u}),d=h(\\\"diagonal.visible\\\"),g=h(\\\"showupperhalf\\\"),v=h(\\\"showlowerhalf\\\");if(l(e,p,\\\"values\\\")&&(d||g||v)){h(\\\"text\\\"),s(t,e,r,f,h);var m=c.test(e.marker.symbol),y=o.isBubble(e);h(\\\"marker.line.width\\\",m||y?1:0),function(t,e,r,n){var i,a,o=e.dimensions,s=o.length,l=e.showupperhalf,c=e.showlowerhalf,u=e.diagonal.visible,f=new Array(s),h=new Array(s);for(i=0;i<s;i++){var p=i?i+1:\\\"\\\";f[i]=\\\"x\\\"+p,h[i]=\\\"y\\\"+p}var d=n(\\\"xaxes\\\",f),g=n(\\\"yaxes\\\",h),v=e._diag=new Array(s);e._xaxes={},e._yaxes={};var m=[],y=[];function x(t,n,i){if(t){var a=t.charAt(0),o=r._splomAxes[a];if(e[\\\"_\\\"+a+\\\"axes\\\"][t]=1,i.push(t),!(t in o)){var s=o[t]={};n&&(s.label=n.label||\\\"\\\",n.visible&&n.axis&&(s.type=n.axis.type))}}}var b=!u&&!c,_=!u&&!l;for(i=0;i<s;i++){var w=o[i],k=0===i,M=i===s-1,A=k&&b||M&&_?void 0:d[i],T=k&&_||M&&b?void 0:g[i];x(A,w,m),x(T,w,y),v[i]=[A,T]}for(i=0;i<m.length;i++)for(a=0;a<y.length;a++){var S=m[i]+y[a];i>a&&l?r._splomSubplots[S]=1:i<a&&c?r._splomSubplots[S]=1:i!==a||!u&&c&&l||(r._splomSubplots[S]=1)}(!c||!u&&l&&c)&&(r._splomGridDflt.xside=\\\"bottom\\\",r._splomGridDflt.yside=\\\"left\\\")}(0,e,f,h),n.coerceSelectionMarkerOpacity(e,h)}else e.visible=!1}},{\\\"../../lib\\\":696,\\\"../../plots/array_container_defaults\\\":741,\\\"../parcoords/merge_length\\\":1016,\\\"../scatter/marker_defaults\\\":1063,\\\"../scatter/subtypes\\\":1068,\\\"./attributes\\\":1122}],1125:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"regl-splom\\\"),i=t(\\\"array-range\\\"),a=t(\\\"../../registry\\\"),o=t(\\\"../../components/grid\\\"),s=t(\\\"../../lib\\\"),l=t(\\\"../../plots/cartesian/axis_ids\\\"),c=t(\\\"../scatter/subtypes\\\"),u=t(\\\"../scatter/calc\\\").calcMarkerSize,f=t(\\\"../scatter/calc\\\").calcAxisExpansion,h=t(\\\"../scatter/colorscale_calc\\\"),p=t(\\\"../scattergl/convert\\\").markerSelection,d=t(\\\"../scattergl/convert\\\").markerStyle,g=t(\\\"../scattergl\\\").calcHover,v=t(\\\"../../constants/numerical\\\").BADNUM,m=t(\\\"../scattergl/constants\\\").TOO_MANY_POINTS;function y(t,e){var r,i,a,o,c,u=t._fullLayout,f=u._size,h=e.trace,p=e.t,d=u._splomScenes[h.uid],g=d.matrixOptions,v=g.cdata,m=u._glcanvas.data()[0].regl,y=u.dragmode;if(0!==v.length){g.lower=h.showupperhalf,g.upper=h.showlowerhalf,g.diagonal=h.diagonal.visible;var x=h._visibleDims,b=v.length,_=d.viewOpts={};for(_.ranges=new Array(b),_.domains=new Array(b),c=0;c<x.length;c++){a=x[c];var w=_.ranges[c]=new Array(4),k=_.domains[c]=new Array(4);(r=l.getFromId(t,h._diag[a][0]))&&(w[0]=r._rl[0],w[2]=r._rl[1],k[0]=r.domain[0],k[2]=r.domain[1]),(i=l.getFromId(t,h._diag[a][1]))&&(w[1]=i._rl[0],w[3]=i._rl[1],k[1]=i.domain[0],k[3]=i.domain[1])}_.viewport=[f.l,f.b,f.w+f.l,f.h+f.b],!0===d.matrix&&(d.matrix=n(m));var M=u.clickmode.indexOf(\\\"select\\\")>-1,A=\\\"lasso\\\"===y||\\\"select\\\"===y||!!h.selectedpoints||M;if(d.selectBatch=null,d.unselectBatch=null,A){var T=h._length;if(d.selectBatch||(d.selectBatch=[],d.unselectBatch=[]),h.selectedpoints){d.selectBatch=h.selectedpoints;var S=h.selectedpoints,C={};for(a=0;a<S.length;a++)C[S[a]]=!0;var E=[];for(a=0;a<T;a++)C[a]||E.push(a);d.unselectBatch=E}var L=p.xpx=new Array(b),z=p.ypx=new Array(b);for(c=0;c<x.length;c++){if(a=x[c],r=l.getFromId(t,h._diag[a][0]))for(L[c]=new Array(T),o=0;o<T;o++)L[c][o]=r.c2p(v[c][o]);if(i=l.getFromId(t,h._diag[a][1]))for(z[c]=new Array(T),o=0;o<T;o++)z[c][o]=i.c2p(v[c][o])}d.selectBatch?(d.matrix.update(g,g),d.matrix.update(d.unselectedOptions,d.selectedOptions),d.matrix.update(_,_)):d.matrix.update(_,null)}else{var O=s.extendFlat({},g,_);d.matrix.update(O,null),p.xpx=p.ypx=null}}}function x(t,e){for(var r=e._id,n={x:0,y:1}[r.charAt(0)],i=t._visibleDims,a=0;a<i.length;a++){var o=i[a];if(t._diag[o][n]===r)return a}return!1}e.exports={moduleType:\\\"trace\\\",name:\\\"splom\\\",basePlotModule:t(\\\"./base_plot\\\"),categories:[\\\"gl\\\",\\\"regl\\\",\\\"cartesian\\\",\\\"symbols\\\",\\\"showLegend\\\",\\\"scatter-like\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),colorbar:t(\\\"../scatter/marker_colorbar\\\"),calc:function(t,e){var r,n,i,a,o,c,g=e.dimensions,y=e._length,x={},b=x.cdata=[],_=x.data=[],w=e._visibleDims=[];function k(t,r){for(var n=t.makeCalcdata({v:r.values,vcalendar:e.calendar},\\\"v\\\"),i=0;i<n.length;i++)n[i]=n[i]===v?NaN:n[i];b.push(n),_.push(\\\"log\\\"===t.type?s.simpleMap(n,t.c2l):n)}for(r=0;r<g.length;r++)if((i=g[r]).visible){if(a=l.getFromId(t,e._diag[r][0]),o=l.getFromId(t,e._diag[r][1]),a&&o&&a.type!==o.type){s.log(\\\"Skipping splom dimension \\\"+r+\\\" with conflicting axis types\\\");continue}a?(k(a,i),o&&\\\"category\\\"===o.type&&(o._categories=a._categories.slice())):k(o,i),w.push(r)}for(h(e),s.extendFlat(x,d(e)),c=b.length*y>m?2*(x.sizeAvg||Math.max(x.size,3)):u(e,y),n=0;n<w.length;n++)i=g[r=w[n]],a=l.getFromId(t,e._diag[r][0])||{},o=l.getFromId(t,e._diag[r][1])||{},f(t,e,a,o,b[n],b[n],c);var M=function(t,e){var r=t._fullLayout,n=e.uid,i=r._splomScenes;i||(i=r._splomScenes={});var a={dirty:!0},o=i[e.uid];return o||((o=i[n]=s.extendFlat({},a,{selectBatch:null,unselectBatch:null,matrix:!1,select:null})).draw=function(){o.matrix&&o.matrix.draw&&(o.selectBatch?o.matrix.draw(o.unselectBatch,o.selectBatch):o.matrix.draw()),o.dirty=!1},o.destroy=function(){o.matrix&&o.matrix.destroy&&o.matrix.destroy(),o.matrixOptions=null,o.selectBatch=null,o.unselectBatch=null,o=null}),o.dirty||s.extendFlat(o,a),o}(t,e);return M.matrix||(M.matrix=!0),M.matrixOptions=x,M.selectedOptions=p(e,e.selected),M.unselectedOptions=p(e,e.unselected),[{x:!1,y:!1,t:{},trace:e}]},plot:function(t,e,r){if(r.length)for(var n=0;n<r.length;n++)y(t,r[n][0])},hoverPoints:function(t,e,r){var n=t.cd[0].trace,i=t.scene.matrixOptions.cdata,a=t.xa,o=t.ya,s=a.c2p(e),l=o.c2p(r),c=t.distance,u=x(n,a),f=x(n,o);if(!1===u||!1===f)return[t];for(var h,p,d=i[u],v=i[f],m=c,y=0;y<d.length;y++){var b=d[y],_=v[y],w=a.c2p(b)-s,k=o.c2p(_)-l,M=Math.sqrt(w*w+k*k);M<m&&(m=p=M,h=y)}return t.index=h,t.distance=m,t.dxy=p,void 0===h?[t]:(g(t,d,v,n),[t])},selectPoints:function(t,e){var r,n=t.cd,a=n[0].trace,o=n[0].t,s=t.scene,l=s.matrixOptions.cdata,u=t.xaxis,f=t.yaxis,h=[];if(!s)return h;var p=!c.hasMarkers(a)&&!c.hasText(a);if(!0!==a.visible||p)return h;var d=x(a,u),g=x(a,f);if(!1===d||!1===g)return h;var v=o.xpx[d],m=o.ypx[g],y=l[d],b=l[g],_=null,w=null;if(!1===e||e.degenerate)w=i(o.count);else for(_=[],w=[],r=0;r<y.length;r++)e.contains([v[r],m[r]],null,r,t)?(_.push(r),h.push({pointNumber:r,x:y[r],y:b[r]})):w.push(r);if(s.selectBatch||(s.selectBatch=[],s.unselectBatch=[]),!s.selectBatch){for(r=0;r<s.count;r++)s.selectBatch=[],s.unselectBatch=[];s.matrix.update(s.unselectedOptions,s.selectedOptions)}return s.selectBatch=_,s.unselectBatch=w,h},editStyle:function(t,e){var r=e.trace,n=t._fullLayout._splomScenes[r.uid];if(n){h(r),s.extendFlat(n.matrixOptions,d(r));var i=s.extendFlat({},n.matrixOptions,n.viewOpts);n.matrix.update(i,null)}},meta:{}},a.register(o)},{\\\"../../components/grid\\\":616,\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axis_ids\\\":748,\\\"../../registry\\\":828,\\\"../scatter/calc\\\":1045,\\\"../scatter/colorscale_calc\\\":1047,\\\"../scatter/marker_colorbar\\\":1062,\\\"../scatter/subtypes\\\":1068,\\\"../scattergl\\\":1097,\\\"../scattergl/constants\\\":1094,\\\"../scattergl/convert\\\":1095,\\\"./attributes\\\":1122,\\\"./base_plot\\\":1123,\\\"./defaults\\\":1124,\\\"array-range\\\":55,\\\"regl-splom\\\":477}],1126:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/attributes\\\"),i=t(\\\"../../components/colorbar/attributes\\\"),a=t(\\\"../mesh3d/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l={x:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},z:{valType:\\\"data_array\\\",editType:\\\"calc+clearAxisTypes\\\"},u:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},v:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},w:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},starts:{x:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},y:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},z:{valType:\\\"data_array\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"},maxdisplayed:{valType:\\\"integer\\\",min:0,dflt:1e3,editType:\\\"calc\\\"},sizeref:{valType:\\\"number\\\",editType:\\\"calc\\\",min:0,dflt:1},text:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"}};s(l,n(\\\"\\\",{colorAttr:\\\"u/v/w norm\\\",showScaleDflt:!0,editTypeOverride:\\\"calc\\\"}),{colorbar:i});[\\\"opacity\\\",\\\"lightposition\\\",\\\"lighting\\\"].forEach(function(t){l[t]=a[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:\\\"calc\\\",flags:[\\\"x\\\",\\\"y\\\",\\\"z\\\",\\\"u\\\",\\\"v\\\",\\\"w\\\",\\\"norm\\\",\\\"divergence\\\",\\\"text\\\",\\\"name\\\"],dflt:\\\"x+y+z+norm+text+name\\\"}),l.transforms=void 0,e.exports=l},{\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plots/attributes\\\":742,\\\"../mesh3d/attributes\\\":987}],1127:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\");e.exports=function(t,e){var r,i,a,o,s=e.u,l=e.v,c=e.w,u=e.x,f=e.y,h=e.z,p=Math.min(u.length,f.length,h.length,s.length,l.length,c.length),d=0;e.starts&&(i=e.starts.x||[],a=e.starts.y||[],o=e.starts.z||[],d=Math.min(i.length,a.length,o.length));var g=0,v=1/0;for(r=0;r<p;r++){var m=s[r],y=l[r],x=c[r],b=Math.sqrt(m*m+y*y+x*x);g=Math.max(g,b),v=Math.min(v,b)}n(e,[v,g],\\\"\\\",\\\"c\\\");var _=-1/0,w=1/0,k=-1/0,M=1/0,A=-1/0,T=1/0;for(r=0;r<p;r++){var S=u[r];_=Math.max(_,S),w=Math.min(w,S);var C=f[r];k=Math.max(k,C),M=Math.min(M,C);var E=h[r];A=Math.max(A,E),T=Math.min(T,E)}for(r=0;r<d;r++){var L=i[r];_=Math.max(_,L),w=Math.min(w,L);var z=a[r];k=Math.max(k,z),M=Math.min(M,z);var O=o[r];A=Math.max(A,O),T=Math.min(T,O)}e._len=p,e._slen=d,e._normMax=g,e._xbnds=[w,_],e._ybnds=[M,k],e._zbnds=[T,A]}},{\\\"../../components/colorscale/calc\\\":578}],1128:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-streamtube3d\\\"),i=n.createTubeMesh,a=t(\\\"../../lib\\\"),o=t(\\\"../../lib/gl_format_color\\\").parseColorScale,s=t(\\\"../../plots/gl3d/zip3\\\"),l={xaxis:0,yaxis:1,zaxis:2};function c(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var u=c.prototype;function f(t){return a.distinctVals(t).vals}function h(t){var e=t.length;return e>2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function p(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,c=e._len,u={};function d(t,e){var n=r[e],o=i[l[e]];return a.simpleMap(t,function(t){return n.d2l(t)*o})}u.vectors=s(d(e.u,\\\"xaxis\\\"),d(e.v,\\\"yaxis\\\"),d(e.w,\\\"zaxis\\\"),c);var g=f(e.x.slice(0,c)),v=f(e.y.slice(0,c)),m=f(e.z.slice(0,c));if(g.length*v.length*m.length>c)return{positions:[],cells:[]};var y=d(g,\\\"xaxis\\\"),x=d(v,\\\"yaxis\\\"),b=d(m,\\\"zaxis\\\");if(u.meshgrid=[y,x,b],e.starts){var _=e._slen;u.startingPositions=s(d(e.starts.x.slice(0,_),\\\"xaxis\\\"),d(e.starts.y.slice(0,_),\\\"yaxis\\\"),d(e.starts.z.slice(0,_),\\\"zaxis\\\"))}else{for(var w=x[0],k=h(y),M=h(b),A=new Array(k.length*M.length),T=0,S=0;S<k.length;S++)for(var C=0;C<M.length;C++)A[T++]=[k[S],w,M[C]];u.startingPositions=A}u.colormap=o(e.colorscale),u.tubeSize=e.sizeref,u.maxLength=e.maxdisplayed;var E=d(e._xbnds,\\\"xaxis\\\"),L=d(e._ybnds,\\\"yaxis\\\"),z=d(e._zbnds,\\\"zaxis\\\"),O=p(y),I=p(x),P=p(b),D=[[E[0]-O[0],L[0]-I[0],z[0]-P[0]],[E[1]+O[1],L[1]+I[1],z[1]+P[1]]],R=n(u,D);R.vertexIntensityBounds=[e.cmin/e._normMax,e.cmax/e._normMax];var B=e.lightposition;return R.lightPosition=[B.x,B.y,B.z],R.ambient=e.lighting.ambient,R.diffuse=e.lighting.diffuse,R.specular=e.lighting.specular,R.roughness=e.lighting.roughness,R.fresnel=e.lighting.fresnel,R.opacity=e.opacity,e._pad=R.tubeScale*e.sizeref*2,R}u.handlePick=function(t){var e=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(t,n){var i=e[n],a=r[l[n]];return i.l2c(t)/a}if(t.object===this.mesh){var i=t.data.position,a=t.data.velocity;return t.traceCoordinate=[n(i[0],\\\"xaxis\\\"),n(i[1],\\\"yaxis\\\"),n(i[2],\\\"zaxis\\\"),n(a[0],\\\"xaxis\\\"),n(a[1],\\\"yaxis\\\"),n(a[2],\\\"zaxis\\\"),t.data.intensity*this.data._normMax,t.data.divergence],t.textLabel=this.data.text,!0}},u.update=function(t){this.data=t;var e=d(this.scene,t);this.mesh.update(e)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,n=d(t,e),a=i(r,n),o=new c(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},{\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../plots/gl3d/zip3\\\":799,\\\"gl-streamtube3d\\\":301}],1129:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/colorscale/defaults\\\"),a=t(\\\"./attributes\\\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\\\"u\\\"),c=s(\\\"v\\\"),u=s(\\\"w\\\"),f=s(\\\"x\\\"),h=s(\\\"y\\\"),p=s(\\\"z\\\");l&&l.length&&c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length&&p&&p.length?(s(\\\"starts.x\\\"),s(\\\"starts.y\\\"),s(\\\"starts.z\\\"),s(\\\"maxdisplayed\\\"),s(\\\"sizeref\\\"),s(\\\"lighting.ambient\\\"),s(\\\"lighting.diffuse\\\"),s(\\\"lighting.specular\\\"),s(\\\"lighting.roughness\\\"),s(\\\"lighting.fresnel\\\"),s(\\\"lightposition.x\\\"),s(\\\"lightposition.y\\\"),s(\\\"lightposition.z\\\"),i(t,e,o,s,{prefix:\\\"\\\",cLetter:\\\"c\\\"}),s(\\\"text\\\"),e._length=null):e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"./attributes\\\":1126}],1130:[function(t,e,r){\\\"use strict\\\";e.exports={moduleType:\\\"trace\\\",name:\\\"streamtube\\\",basePlotModule:t(\\\"../../plots/gl3d\\\"),categories:[\\\"gl3d\\\"],attributes:t(\\\"./attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),colorbar:{min:\\\"cmin\\\",max:\\\"cmax\\\"},calc:t(\\\"./calc\\\"),plot:t(\\\"./convert\\\"),eventData:function(t,e){return t.tubex=t.x,t.tubey=t.y,t.tubez=t.z,t.tubeu=e.traceCoordinate[3],t.tubev=e.traceCoordinate[4],t.tubew=e.traceCoordinate[5],t.norm=e.traceCoordinate[6],t.divergence=e.traceCoordinate[7],delete t.x,delete t.y,delete t.z,t},meta:{}}},{\\\"../../plots/gl3d\\\":788,\\\"./attributes\\\":1126,\\\"./calc\\\":1127,\\\"./convert\\\":1128,\\\"./defaults\\\":1129}],1131:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/color\\\"),i=t(\\\"../../components/colorscale/attributes\\\"),a=t(\\\"../../components/colorbar/attributes\\\"),o=t(\\\"../../plots/attributes\\\"),s=t(\\\"../../lib/extend\\\").extendFlat,l=t(\\\"../../plot_api/edit_types\\\").overrideAll;function c(t){return{show:{valType:\\\"boolean\\\",dflt:!1},project:{x:{valType:\\\"boolean\\\",dflt:!1},y:{valType:\\\"boolean\\\",dflt:!1},z:{valType:\\\"boolean\\\",dflt:!1}},color:{valType:\\\"color\\\",dflt:n.defaultLine},usecolormap:{valType:\\\"boolean\\\",dflt:!1},width:{valType:\\\"number\\\",min:1,max:16,dflt:2},highlight:{valType:\\\"boolean\\\",dflt:!0},highlightcolor:{valType:\\\"color\\\",dflt:n.defaultLine},highlightwidth:{valType:\\\"number\\\",min:1,max:16,dflt:2}}}var u=e.exports=l(s({z:{valType:\\\"data_array\\\"},x:{valType:\\\"data_array\\\"},y:{valType:\\\"data_array\\\"},text:{valType:\\\"string\\\",dflt:\\\"\\\",arrayOk:!0},surfacecolor:{valType:\\\"data_array\\\"}},i(\\\"\\\",{colorAttr:\\\"z or surfacecolor\\\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\\\"calc\\\"}),{colorbar:a,contours:{x:c(),y:c(),z:c()},hidesurface:{valType:\\\"boolean\\\",dflt:!1},lightposition:{x:{valType:\\\"number\\\",min:-1e5,max:1e5,dflt:10},y:{valType:\\\"number\\\",min:-1e5,max:1e5,dflt:1e4},z:{valType:\\\"number\\\",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:\\\"number\\\",min:0,max:1,dflt:.8},diffuse:{valType:\\\"number\\\",min:0,max:1,dflt:.8},specular:{valType:\\\"number\\\",min:0,max:2,dflt:.05},roughness:{valType:\\\"number\\\",min:0,max:1,dflt:.5},fresnel:{valType:\\\"number\\\",min:0,max:5,dflt:.2}},opacity:{valType:\\\"number\\\",min:0,max:1,dflt:1},_deprecated:{zauto:s({},i.zauto,{}),zmin:s({},i.zmin,{}),zmax:s({},i.zmax,{})},hoverinfo:s({},o.hoverinfo)}),\\\"calc\\\",\\\"nested\\\");u.x.editType=u.y.editType=u.z.editType=\\\"calc+clearAxisTypes\\\",u.transforms=void 0},{\\\"../../components/color\\\":570,\\\"../../components/colorbar/attributes\\\":571,\\\"../../components/colorscale/attributes\\\":577,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/attributes\\\":742}],1132:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/colorscale/calc\\\");e.exports=function(t,e){e.surfacecolor?n(e,e.surfacecolor,\\\"\\\",\\\"c\\\"):n(e,e.z,\\\"\\\",\\\"c\\\")}},{\\\"../../components/colorscale/calc\\\":578}],1133:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"gl-surface3d\\\"),i=t(\\\"ndarray\\\"),a=t(\\\"ndarray-homography\\\"),o=t(\\\"ndarray-fill\\\"),s=t(\\\"ndarray-ops\\\"),l=t(\\\"../../lib\\\").isArrayOrTypedArray,c=t(\\\"../../lib/gl_format_color\\\").parseColorScale,u=t(\\\"../../lib/str2rgbarray\\\"),f=128;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.dataScale=1}var p=h.prototype;function d(t){var e=t.shape,r=[e[0]+2,e[1]+2],n=i(new Float32Array(r[0]*r[1]),r);return s.assign(n.lo(1,1).hi(e[0],e[1]),t),s.assign(n.lo(1).hi(e[0],1),t.hi(e[0],1)),s.assign(n.lo(1,r[1]-1).hi(e[0],1),t.lo(0,e[1]-1).hi(e[0],1)),s.assign(n.lo(0,1).hi(1,e[1]),t.hi(1)),s.assign(n.lo(r[0]-1,1).hi(1,e[1]),t.lo(e[0]-1)),n.set(0,0,t.get(0,0)),n.set(0,r[1]-1,t.get(0,e[1]-1)),n.set(r[0]-1,0,t.get(e[0]-1,0)),n.set(r[0]-1,r[1]-1,t.get(e[0]-1,e[1]-1)),n}p.handlePick=function(t){if(t.object===this.surface){var e=t.index=[Math.min(0|Math.round(t.data.index[0]/this.dataScale-1),this.data.z[0].length-1),Math.min(0|Math.round(t.data.index[1]/this.dataScale-1),this.data.z.length-1)],r=[0,0,0];l(this.data.x)?l(this.data.x[0])?r[0]=this.data.x[e[1]][e[0]]:r[0]=this.data.x[e[0]]:r[0]=e[0],l(this.data.y)?l(this.data.y[0])?r[1]=this.data.y[e[1]][e[0]]:r[1]=this.data.y[e[1]]:r[1]=e[1],r[2]=this.data.z[e[1]][e[0]],t.traceCoordinate=r;var n=this.scene.fullSceneLayout;t.dataCoordinate=[n.xaxis.d2l(r[0],0,this.data.xcalendar)*this.scene.dataScale[0],n.yaxis.d2l(r[1],0,this.data.ycalendar)*this.scene.dataScale[1],n.zaxis.d2l(r[2],0,this.data.zcalendar)*this.scene.dataScale[2]];var i=this.data.text;return Array.isArray(i)&&i[e[1]]&&void 0!==i[e[1]][e[0]]?t.textLabel=i[e[1]][e[0]]:t.textLabel=i||\\\"\\\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}},p.setContourLevels=function(){for(var t=[[],[],[]],e=!1,r=0;r<3;++r)this.showContour[r]&&(e=!0,t[r]=this.scene.contourLevels[r]);e&&this.surface.update({levels:t})},p.update=function(t){var e,r=this.scene,n=r.fullSceneLayout,s=this.surface,h=t.opacity,p=c(t.colorscale,h),g=t.z,v=t.x,m=t.y,y=n.xaxis,x=n.yaxis,b=n.zaxis,_=r.dataScale,w=g[0].length,k=t._ylength,M=[i(new Float32Array(w*k),[w,k]),i(new Float32Array(w*k),[w,k]),i(new Float32Array(w*k),[w,k])],A=M[0],T=M[1],S=r.contourLevels;this.data=t;var C=t.xcalendar,E=t.ycalendar,L=t.zcalendar;o(M[2],function(t,e){return b.d2l(g[e][t],0,L)*_[2]}),l(v)?l(v[0])?o(A,function(t,e){return y.d2l(v[e][t],0,C)*_[0]}):o(A,function(t){return y.d2l(v[t],0,C)*_[0]}):o(A,function(t){return y.d2l(t,0,C)*_[0]}),l(v)?l(m[0])?o(T,function(t,e){return x.d2l(m[e][t],0,E)*_[1]}):o(T,function(t,e){return x.d2l(m[e],0,E)*_[1]}):o(T,function(t,e){return x.d2l(e,0,C)*_[1]});var z={colormap:p,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!t.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacity:t.opacity};if(z.intensityBounds=[t.cmin,t.cmax],t.surfacecolor){var O=i(new Float32Array(w*k),[w,k]);o(O,function(e,r){return t.surfacecolor[r][e]}),M.push(O)}else z.intensityBounds[0]*=_[2],z.intensityBounds[1]*=_[2];this.dataScale=function(t){var e=Math.max(t[0].shape[0],t[0].shape[1]);if(e<f){for(var r=f/e,n=[0|Math.floor(t[0].shape[0]*r+1),0|Math.floor(t[0].shape[1]*r+1)],o=n[0]*n[1],s=0;s<t.length;++s){var l=d(t[s]),c=i(new Float32Array(o),n);a(c,l,[r,0,0,0,r,0,0,0,1]),t[s]=c}return r}return 1}(M),t.surfacecolor&&(z.intensity=M.pop());var I=[!0,!0,!0],P=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];for(e=0;e<3;++e){var D=t.contours[P[e]];I[e]=D.highlight,z.showContour[e]=D.show||D.highlight,z.showContour[e]&&(z.contourProject[e]=[D.project.x,D.project.y,D.project.z],D.show?(this.showContour[e]=!0,z.levels[e]=S[e],s.highlightColor[e]=z.contourColor[e]=u(D.color),D.usecolormap?s.highlightTint[e]=z.contourTint[e]=0:s.highlightTint[e]=z.contourTint[e]=1,z.contourWidth[e]=D.width):this.showContour[e]=!1,D.highlight&&(z.dynamicColor[e]=u(D.highlightcolor),z.dynamicWidth[e]=D.highlightwidth))}(function(t){var e=t[0].rgb,r=t[t.length-1].rgb;return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]})(p)&&(z.vertexColor=!0),z.coords=M,s.update(z),s.visible=t.visible,s.enableDynamic=I,s.enableHighlight=I,s.snapToData=!0,\\\"lighting\\\"in t&&(s.ambientLight=t.lighting.ambient,s.diffuseLight=t.lighting.diffuse,s.specularLight=t.lighting.specular,s.roughness=t.lighting.roughness,s.fresnel=t.lighting.fresnel),\\\"lightposition\\\"in t&&(s.lightPosition=[t.lightposition.x,t.lightposition.y,t.lightposition.z]),h&&h<1&&(s.supportsTransparency=!0)},p.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new h(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{\\\"../../lib\\\":696,\\\"../../lib/gl_format_color\\\":692,\\\"../../lib/str2rgbarray\\\":720,\\\"gl-surface3d\\\":303,ndarray:433,\\\"ndarray-fill\\\":423,\\\"ndarray-homography\\\":425,\\\"ndarray-ops\\\":427}],1134:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../registry\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/colorscale/defaults\\\"),o=t(\\\"./attributes\\\");function s(t,e,r){e in t&&!(r in t)&&(t[r]=t[e])}e.exports=function(t,e,r,l){var c,u;function f(r,n){return i.coerce(t,e,o,r,n)}var h=f(\\\"z\\\");if(h){var p=f(\\\"x\\\");f(\\\"y\\\"),e._xlength=Array.isArray(p)&&i.isArrayOrTypedArray(p[0])?h.length:h[0].length,e._ylength=h.length,n.getComponentMethod(\\\"calendars\\\",\\\"handleTraceDefaults\\\")(t,e,[\\\"x\\\",\\\"y\\\",\\\"z\\\"],l),f(\\\"text\\\"),[\\\"lighting.ambient\\\",\\\"lighting.diffuse\\\",\\\"lighting.specular\\\",\\\"lighting.roughness\\\",\\\"lighting.fresnel\\\",\\\"lightposition.x\\\",\\\"lightposition.y\\\",\\\"lightposition.z\\\",\\\"hidesurface\\\",\\\"opacity\\\"].forEach(function(t){f(t)});var d=f(\\\"surfacecolor\\\");f(\\\"colorscale\\\");var g=[\\\"x\\\",\\\"y\\\",\\\"z\\\"];for(c=0;c<3;++c){var v=\\\"contours.\\\"+g[c],m=f(v+\\\".show\\\"),y=f(v+\\\".highlight\\\");if(m||y)for(u=0;u<3;++u)f(v+\\\".project.\\\"+g[u]);m&&(f(v+\\\".color\\\"),f(v+\\\".width\\\"),f(v+\\\".usecolormap\\\")),y&&(f(v+\\\".highlightcolor\\\"),f(v+\\\".highlightwidth\\\"))}d||(s(t,\\\"zmin\\\",\\\"cmin\\\"),s(t,\\\"zmax\\\",\\\"cmax\\\"),s(t,\\\"zauto\\\",\\\"cauto\\\")),a(t,e,l,f,{prefix:\\\"\\\",cLetter:\\\"c\\\"}),e._length=null}else e.visible=!1}},{\\\"../../components/colorscale/defaults\\\":580,\\\"../../lib\\\":696,\\\"../../registry\\\":828,\\\"./attributes\\\":1131}],1135:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.colorbar={min:\\\"cmin\\\",max:\\\"cmax\\\"},n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./convert\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"surface\\\",n.basePlotModule=t(\\\"../../plots/gl3d\\\"),n.categories=[\\\"gl3d\\\",\\\"2dMap\\\",\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"../../plots/gl3d\\\":788,\\\"./attributes\\\":1131,\\\"./calc\\\":1132,\\\"./convert\\\":1133,\\\"./defaults\\\":1134}],1136:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../components/annotations/attributes\\\"),i=t(\\\"../../lib/extend\\\").extendFlat,a=t(\\\"../../plot_api/edit_types\\\").overrideAll,o=t(\\\"../../plots/font_attributes\\\"),s=t(\\\"../../plots/domain\\\").attributes;(e.exports=a({domain:s({name:\\\"table\\\",trace:!0}),columnwidth:{valType:\\\"number\\\",arrayOk:!0,dflt:null},columnorder:{valType:\\\"data_array\\\"},header:{values:{valType:\\\"data_array\\\",dflt:[]},format:{valType:\\\"data_array\\\",dflt:[]},prefix:{valType:\\\"string\\\",arrayOk:!0,dflt:null},suffix:{valType:\\\"string\\\",arrayOk:!0,dflt:null},height:{valType:\\\"number\\\",dflt:28},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\\\"number\\\",arrayOk:!0,dflt:1},color:{valType:\\\"color\\\",arrayOk:!0,dflt:\\\"grey\\\"}},fill:{color:{valType:\\\"color\\\",arrayOk:!0,dflt:\\\"white\\\"}},font:i({},o({arrayOk:!0}))},cells:{values:{valType:\\\"data_array\\\",dflt:[]},format:{valType:\\\"data_array\\\",dflt:[]},prefix:{valType:\\\"string\\\",arrayOk:!0,dflt:null},suffix:{valType:\\\"string\\\",arrayOk:!0,dflt:null},height:{valType:\\\"number\\\",dflt:20},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\\\"number\\\",arrayOk:!0,dflt:1},color:{valType:\\\"color\\\",arrayOk:!0,dflt:\\\"grey\\\"}},fill:{color:{valType:\\\"color\\\",arrayOk:!0,dflt:\\\"white\\\"}},font:i({},o({arrayOk:!0}))}},\\\"calc\\\",\\\"from-root\\\")).transforms=void 0},{\\\"../../components/annotations/attributes\\\":553,\\\"../../lib/extend\\\":685,\\\"../../plot_api/edit_types\\\":728,\\\"../../plots/domain\\\":771,\\\"../../plots/font_attributes\\\":772}],1137:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../plots/get_data\\\").getModuleCalcData,i=t(\\\"./plot\\\");r.name=\\\"table\\\",r.plot=function(t){var e=n(t.calcdata,\\\"table\\\")[0];e.length&&i(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\\\"table\\\"),a=e._has&&e._has(\\\"table\\\");i&&!a&&n._paperdiv.selectAll(\\\".table\\\").remove()}},{\\\"../../plots/get_data\\\":782,\\\"./plot\\\":1144}],1138:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/gup\\\").wrap;e.exports=function(){return n({})}},{\\\"../../lib/gup\\\":693}],1139:[function(t,e,r){\\\"use strict\\\";e.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\\\\$.*\\\\$$/,goldenRatio:1.618,lineBreaker:\\\"<br>\\\",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:\\\"cubic-out\\\",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:\\\"cubic-out\\\",uplift:5,wrapSpacer:\\\" \\\",wrapSplitCharacter:\\\" \\\",cn:{table:\\\"table\\\",tableControlView:\\\"table-control-view\\\",scrollBackground:\\\"scroll-background\\\",yColumn:\\\"y-column\\\",columnBlock:\\\"column-block\\\",scrollAreaClip:\\\"scroll-area-clip\\\",scrollAreaClipRect:\\\"scroll-area-clip-rect\\\",columnBoundary:\\\"column-boundary\\\",columnBoundaryClippath:\\\"column-boundary-clippath\\\",columnBoundaryRect:\\\"column-boundary-rect\\\",columnCells:\\\"column-cells\\\",columnCell:\\\"column-cell\\\",cellRect:\\\"cell-rect\\\",cellText:\\\"cell-text\\\",cellTextHolder:\\\"cell-text-holder\\\",scrollbarKit:\\\"scrollbar-kit\\\",scrollbar:\\\"scrollbar\\\",scrollbarSlider:\\\"scrollbar-slider\\\",scrollbarGlyph:\\\"scrollbar-glyph\\\",scrollbarCaptureZone:\\\"scrollbar-capture-zone\\\"}}},{}],1140:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"../../lib/extend\\\").extendFlat,a=t(\\\"fast-isnumeric\\\");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r<t.length;r++)e=Math.max(e,o(t[r]));return e}return t}function s(t,e){return t+e}function l(t){var e,r=t.slice(),n=1/0,i=0;for(e=0;e<r.length;e++)Array.isArray(r[e])||(r[e]=[r[e]]),n=Math.min(n,r[e].length),i=Math.max(i,r[e].length);if(n!==i)for(e=0;e<r.length;e++){var a=i-r[e].length;a&&(r[e]=r[e].concat(c(a)))}return r}function c(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=\\\"\\\";return e}function u(t){return t.calcdata.columns.reduce(function(e,r){return r.xIndex<t.xIndex?e+r.columnWidth:e},0)}function f(t,e){return Object.keys(t).map(function(r){return i({},t[r],{auxiliaryBlocks:e})})}function h(t,e){for(var r,n={},i=0,a=0,o={firstRowIndex:null,lastRowIndex:null,rows:[]},s=0,l=0,c=0;c<t.length;c++)r=t[c],o.rows.push({rowIndex:c,rowHeight:r}),((a+=r)>=e||c===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}e.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[\\\"\\\"],d=l(d));var g=d.concat(p(r).map(function(){return c((d[0]||[\\\"\\\"]).length)})),v=e.domain,m=Math.floor(t._fullLayout._size.w*(v.x[1]-v.x[0])),y=Math.floor(t._fullLayout._size.h*(v.y[1]-v.y[0])),x=e.header.values.length?g[0].map(function(){return e.header.height}):[n.emptyHeaderHeight],b=r.length?r[0].map(function(){return e.cells.height}):[],_=x.reduce(s,0),w=h(b,y-_+n.uplift),k=f(h(x,_),[]),M=f(w,k),A={},T=e._fullInput.columnorder.concat(p(r.map(function(t,e){return e}))),S=g.map(function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return a(n)?Number(n):1}),C=S.reduce(s,0);S=S.map(function(t){return t/C*m});var E=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.index,translateX:v.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-v.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:E,height:y,columnOrder:T,groupHeight:y,rowBlocks:M,headerRowBlocks:k,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:g}),gdColumns:g.map(function(t){return t[0]}),gdColumnsOriginalOrder:g.map(function(t){return t[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(t,e){var r=A[t];return A[t]=(r||0)+1,{key:t+\\\"__\\\"+A[t],label:t,specIndex:e,xIndex:T[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}})};return L.columns.forEach(function(t){t.calcdata=L,t.x=u(t)}),L}},{\\\"../../lib/extend\\\":685,\\\"./constants\\\":1139,\\\"fast-isnumeric\\\":214}],1141:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib/extend\\\").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:\\\"header\\\",type:\\\"header\\\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:\\\"cells1\\\",type:\\\"cells\\\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:\\\"cells2\\\",type:\\\"cells\\\",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0,n=e?r+e.rows.length:0;return[r,n]}(t);return(t.values||[]).slice(e[0],e[1]).map(function(r,n){return{keyWithinBlock:n+(\\\"string\\\"==typeof r&&r.match(/[<$&> ]/)?\\\"_keybuster_\\\"+Math.random():\\\"\\\"),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}})}},{\\\"../../lib/extend\\\":685}],1142:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./attributes\\\"),a=t(\\\"../../plots/domain\\\").defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}a(e,o,s),s(\\\"columnwidth\\\"),s(\\\"header.values\\\"),s(\\\"header.format\\\"),s(\\\"header.align\\\"),s(\\\"header.prefix\\\"),s(\\\"header.suffix\\\"),s(\\\"header.height\\\"),s(\\\"header.line.width\\\"),s(\\\"header.line.color\\\"),s(\\\"header.fill.color\\\"),n.coerceFont(s,\\\"header.font\\\",n.extendFlat({},o.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(t,e){return t-e}),o=i.map(function(t){return a.indexOf(t)}),s=o.length;s<n;s++)o.push(s);e(\\\"columnorder\\\",o)}(e,s),s(\\\"cells.values\\\"),s(\\\"cells.format\\\"),s(\\\"cells.align\\\"),s(\\\"cells.prefix\\\"),s(\\\"cells.suffix\\\"),s(\\\"cells.height\\\"),s(\\\"cells.line.width\\\"),s(\\\"cells.line.color\\\"),s(\\\"cells.fill.color\\\"),n.coerceFont(s,\\\"cells.font\\\",n.extendFlat({},o.font)),e._length=null}},{\\\"../../lib\\\":696,\\\"../../plots/domain\\\":771,\\\"./attributes\\\":1136}],1143:[function(t,e,r){\\\"use strict\\\";var n={};n.attributes=t(\\\"./attributes\\\"),n.supplyDefaults=t(\\\"./defaults\\\"),n.calc=t(\\\"./calc\\\"),n.plot=t(\\\"./plot\\\"),n.moduleType=\\\"trace\\\",n.name=\\\"table\\\",n.basePlotModule=t(\\\"./base_plot\\\"),n.categories=[\\\"noOpacity\\\"],n.meta={},e.exports=n},{\\\"./attributes\\\":1136,\\\"./base_plot\\\":1137,\\\"./calc\\\":1138,\\\"./defaults\\\":1142,\\\"./plot\\\":1144}],1144:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"./constants\\\"),i=t(\\\"d3\\\"),a=t(\\\"../../lib/gup\\\"),o=t(\\\"../../components/drawing\\\"),s=t(\\\"../../lib/svg_text_utils\\\"),l=t(\\\"../../lib\\\").raiseToTop,c=t(\\\"../../lib\\\").cancelTransition,u=t(\\\"./data_preparation_helper\\\"),f=t(\\\"./data_split_helpers\\\"),h=t(\\\"../../components/color\\\");function p(t){return Math.ceil(t.calcdata.maxLineWidth/2)}function d(t,e){return\\\"clip\\\"+t._fullLayout._uid+\\\"_scrollAreaBottomClip_\\\"+e.key}function g(t,e){return\\\"clip\\\"+t._fullLayout._uid+\\\"_columnBoundaryClippath_\\\"+e.calcdata.key+\\\"_\\\"+e.specIndex}function v(t){return[].concat.apply([],t.map(function(t){return t})).map(function(t){return t.__data__})}function m(t,e,r){var o=t.selectAll(\\\".\\\"+n.cn.scrollbarKit).data(a.repeat,a.keyFun);o.enter().append(\\\"g\\\").classed(n.cn.scrollbarKit,!0).style(\\\"shape-rendering\\\",\\\"geometricPrecision\\\"),o.each(function(t){var e=t.scrollbarState;e.totalHeight=function(t){var e=t.rowBlocks;return I(e,e.length-1)+(e.length?P(e[e.length-1],1/0):1)}(t),e.scrollableAreaHeight=t.groupHeight-A(t),e.currentlyVisibleHeight=Math.min(e.totalHeight,e.scrollableAreaHeight),e.ratio=e.currentlyVisibleHeight/e.totalHeight,e.barLength=Math.max(e.ratio*e.currentlyVisibleHeight,n.goldenRatio*n.scrollbarWidth),e.barWiggleRoom=e.currentlyVisibleHeight-e.barLength,e.wiggleRoom=Math.max(0,e.totalHeight-e.scrollableAreaHeight),e.topY=0===e.barWiggleRoom?0:t.scrollY/e.wiggleRoom*e.barWiggleRoom,e.bottomY=e.topY+e.barLength,e.dragMultiplier=e.wiggleRoom/e.barWiggleRoom}).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+(t.width+n.scrollbarWidth/2+n.scrollbarOffset)+\\\" \\\"+A(t)+\\\")\\\"});var s=o.selectAll(\\\".\\\"+n.cn.scrollbar).data(a.repeat,a.keyFun);s.enter().append(\\\"g\\\").classed(n.cn.scrollbar,!0);var l=s.selectAll(\\\".\\\"+n.cn.scrollbarSlider).data(a.repeat,a.keyFun);l.enter().append(\\\"g\\\").classed(n.cn.scrollbarSlider,!0),l.attr(\\\"transform\\\",function(t){return\\\"translate(0 \\\"+(t.scrollbarState.topY||0)+\\\")\\\"});var c=l.selectAll(\\\".\\\"+n.cn.scrollbarGlyph).data(a.repeat,a.keyFun);c.enter().append(\\\"line\\\").classed(n.cn.scrollbarGlyph,!0).attr(\\\"stroke\\\",\\\"black\\\").attr(\\\"stroke-width\\\",n.scrollbarWidth).attr(\\\"stroke-linecap\\\",\\\"round\\\").attr(\\\"y1\\\",n.scrollbarWidth/2),c.attr(\\\"y2\\\",function(t){return t.scrollbarState.barLength-n.scrollbarWidth/2}).attr(\\\"stroke-opacity\\\",function(t){return t.columnDragInProgress||!t.scrollbarState.barWiggleRoom||r?0:.4}),c.transition().delay(0).duration(0),c.transition().delay(n.scrollbarHideDelay).duration(n.scrollbarHideDuration).attr(\\\"stroke-opacity\\\",0);var u=s.selectAll(\\\".\\\"+n.cn.scrollbarCaptureZone).data(a.repeat,a.keyFun);u.enter().append(\\\"line\\\").classed(n.cn.scrollbarCaptureZone,!0).attr(\\\"stroke\\\",\\\"white\\\").attr(\\\"stroke-opacity\\\",.01).attr(\\\"stroke-width\\\",n.scrollbarCaptureWidth).attr(\\\"stroke-linecap\\\",\\\"butt\\\").attr(\\\"y1\\\",0).on(\\\"mousedown\\\",function(r){var n=i.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=n-a.top,l=i.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||S(e,t,null,l(s-o.barLength/2))(r)}).call(i.behavior.drag().origin(function(t){return i.event.stopPropagation(),t.scrollbarState.scrollbarScrollInProgress=!0,t}).on(\\\"drag\\\",S(e,t)).on(\\\"dragend\\\",function(){})),u.attr(\\\"y2\\\",function(t){return t.scrollbarState.scrollableAreaHeight})}function y(t,e,r,s){var l=function(t){var e=t.selectAll(\\\".\\\"+n.cn.columnCell).data(f.splitToCells,function(t){return t.keyWithinBlock});return e.enter().append(\\\"g\\\").classed(n.cn.columnCell,!0),e.exit().remove(),e}(function(t){var e=t.selectAll(\\\".\\\"+n.cn.columnCells).data(a.repeat,a.keyFun);return e.enter().append(\\\"g\\\").classed(n.cn.columnCells,!0),e.exit().remove(),e}(r));!function(t){t.each(function(t,e){var r=t.calcdata.cells.font,n=t.column.specIndex,i={size:_(r.size,n,e),color:_(r.color,n,e),family:_(r.family,n,e)};t.rowNumber=t.key,t.align=_(t.calcdata.cells.align,n,e),t.cellBorderWidth=_(t.calcdata.cells.line.width,n,e),t.font=i})}(l),function(t){t.attr(\\\"width\\\",function(t){return t.column.columnWidth}).attr(\\\"stroke-width\\\",function(t){return t.cellBorderWidth}).each(function(t){var e=i.select(this);h.stroke(e,_(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),h.fill(e,_(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}(function(t){var e=t.selectAll(\\\".\\\"+n.cn.cellRect).data(a.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\\\"rect\\\").classed(n.cn.cellRect,!0),e}(l));var c=function(t){var e=t.selectAll(\\\".\\\"+n.cn.cellText).data(a.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\\\"text\\\").classed(n.cn.cellText,!0).style(\\\"cursor\\\",function(){return\\\"auto\\\"}).on(\\\"mousedown\\\",function(){i.event.stopPropagation()}),e}(function(t){var e=t.selectAll(\\\".\\\"+n.cn.cellTextHolder).data(a.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\\\"g\\\").classed(n.cn.cellTextHolder,!0).style(\\\"shape-rendering\\\",\\\"geometricPrecision\\\"),e}(l));!function(t){t.each(function(t){o.font(i.select(this),t.font)})}(c),x(c,e,s,t),O(l)}function x(t,e,r,a){t.text(function(t){var e=t.column.specIndex,r=t.rowNumber,a=t.value,o=\\\"string\\\"==typeof a,s=o&&a.match(/<br>/i),l=!o||s;t.mayHaveMarkup=o&&a.match(/[<&>]/);var c,u=\\\"string\\\"==typeof(c=a)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?\\\"\\\":_(t.calcdata.cells.prefix,e,r)||\\\"\\\",d=u?\\\"\\\":_(t.calcdata.cells.suffix,e,r)||\\\"\\\",g=u?null:_(t.calcdata.cells.format,e,r)||null,v=p+(g?i.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=b(v)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?b(v):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var m=(\\\" \\\"===n.wrapSplitCharacter?v.replace(/<a href=/gi,\\\"<a_href=\\\"):v).split(n.wrapSplitCharacter),y=\\\" \\\"===n.wrapSplitCharacter?m.map(function(t){return t.replace(/<a_href=/gi,\\\"<a href=\\\")}):m;t.fragments=y.map(function(t){return{text:t,width:null}}),t.fragments.push({fragment:n.wrapSpacer,width:null}),h=y.join(n.lineBreaker)+n.lineBreaker+n.wrapSpacer}else delete t.fragments,h=v;return h}).attr(\\\"dy\\\",function(t){return t.needsConvertToTspans?0:\\\"0.75em\\\"}).each(function(t){var o=i.select(this),l=t.wrappingNeeded?E:L;t.needsConvertToTspans?s.convertToTspans(o,a,l(r,this,e,a,t)):i.select(this.parentNode).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+z(t)+\\\" \\\"+n.cellPad+\\\")\\\"}).attr(\\\"text-anchor\\\",function(t){return{left:\\\"start\\\",center:\\\"middle\\\",right:\\\"end\\\"}[t.align]})})}function b(t){return-1!==t.indexOf(n.wrapSplitCharacter)}function _(t,e,r){if(Array.isArray(t)){var n=t[Math.min(e,t.length-1)];return Array.isArray(n)?n[Math.min(r,n.length-1)]:n}return t}function w(t,e,r){t.transition().ease(n.releaseTransitionEase).duration(n.releaseTransitionDuration).attr(\\\"transform\\\",\\\"translate(\\\"+e.x+\\\" \\\"+r+\\\")\\\")}function k(t){return\\\"cells\\\"===t.type}function M(t){return\\\"header\\\"===t.type}function A(t){return(t.rowBlocks.length?t.rowBlocks[0].auxiliaryBlocks:[]).reduce(function(t,e){return t+P(e,1/0)},0)}function T(t,e,r){var n=v(e)[0];if(void 0!==n){var i=n.rowBlocks,a=n.calcdata,o=I(i,i.length),s=n.calcdata.groupHeight-A(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),c=function(t,e,r){for(var n=[],i=0,a=0;a<t.length;a++){for(var o=t[a],s=o.rows,l=0,c=0;c<s.length;c++)l+=s[c].rowHeight;o.allRowsHeight=l,e<i+l&&e+r>i&&n.push(a),i+=l}return n}(i,l,s);1===c.length&&(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),e.each(function(t,e){t.page=c[e],t.scrollY=l}),e.attr(\\\"transform\\\",function(t){return\\\"translate(0 \\\"+(I(t.rowBlocks,t.page)-t.scrollY)+\\\")\\\"}),t&&(C(t,r,e,c,n.prevPages,n,0),C(t,r,e,c,n.prevPages,n,1),m(r,t))}}function S(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter(function(t){return s.key===t.key}),c=r||s.scrollbarState.dragMultiplier;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var u=l.selectAll(\\\".\\\"+n.cn.yColumn).selectAll(\\\".\\\"+n.cn.columnBlock).filter(k);T(t,u,l)}}function C(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var a=r.filter(function(t,e){return e===o&&n[e]!==i[e]});y(t,e,a,r),i[o]=n[o]}))}function E(t,e,r){return function(){var a=i.select(e.parentNode);a.each(function(t){var e=t.fragments;a.selectAll(\\\"tspan.line\\\").each(function(t,r){e[r].width=this.getComputedTextLength()});var r,i,o=e[e.length-1].width,s=e.slice(0,-1),l=[],c=0,u=t.column.columnWidth-2*n.cellPad;for(t.value=\\\"\\\";s.length;)c+(i=(r=s.shift()).width+o)>u&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=i;c&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0}),a.selectAll(\\\"tspan.line\\\").remove(),x(a.select(\\\".\\\"+n.cn.cellText),r,t),i.select(e.parentNode.parentNode).call(O)}}function L(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=R(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,f=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:u,h=Math.max(f,u);h-l.rows[c].rowHeight&&(l.rows[c].rowHeight=h,t.selectAll(\\\".\\\"+n.cn.columnCell).call(O),T(null,t.filter(k),0),m(r,a,!0)),s.attr(\\\"transform\\\",function(){var t=this.parentNode.getBoundingClientRect(),e=i.select(this.parentNode).select(\\\".\\\"+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),a=e.top-t.top+(r?r.matrix.f:n.cellPad);return\\\"translate(\\\"+z(o,i.select(this.parentNode).select(\\\".\\\"+n.cn.cellTextHolder).node().getBoundingClientRect().width)+\\\" \\\"+a+\\\")\\\"}),o.settledY=!0}}}function z(t,e){switch(t.align){case\\\"left\\\":return n.cellPad;case\\\"right\\\":return t.column.columnWidth-(e||0)-n.cellPad;case\\\"center\\\":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function O(t){t.attr(\\\"transform\\\",function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+P(e,1/0)},0);return\\\"translate(0 \\\"+(P(R(t),t.key)+e)+\\\")\\\"}).selectAll(\\\".\\\"+n.cn.cellRect).attr(\\\"height\\\",function(t){return(e=R(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r})}function I(t,e){for(var r=0,n=e-1;n>=0;n--)r+=D(t[n]);return r}function P(t,e){for(var r=0,n=0;n<t.rows.length&&t.rows[n].rowIndex<e;n++)r+=t.rows[n].rowHeight;return r}function D(t){var e=t.allRowsHeight;if(void 0!==e)return e;for(var r=0,n=0;n<t.rows.length;n++)r+=t.rows[n].rowHeight;return t.allRowsHeight=r,r}function R(t){return t.rowBlocks[t.page]}e.exports=function(t,e){var r=t._fullLayout._paper.selectAll(\\\".\\\"+n.cn.table).data(e.map(function(e){var r=a.unwrap(e).trace;return u(t,r)}),a.keyFun);r.exit().remove(),r.enter().append(\\\"g\\\").classed(n.cn.table,!0).attr(\\\"overflow\\\",\\\"visible\\\").style(\\\"box-sizing\\\",\\\"content-box\\\").style(\\\"position\\\",\\\"absolute\\\").style(\\\"left\\\",0).style(\\\"overflow\\\",\\\"visible\\\").style(\\\"shape-rendering\\\",\\\"crispEdges\\\").style(\\\"pointer-events\\\",\\\"all\\\"),r.attr(\\\"width\\\",function(t){return t.width+t.size.l+t.size.r}).attr(\\\"height\\\",function(t){return t.height+t.size.t+t.size.b}).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.translateX+\\\",\\\"+t.translateY+\\\")\\\"});var s=r.selectAll(\\\".\\\"+n.cn.tableControlView).data(a.repeat,a.keyFun);s.enter().append(\\\"g\\\").classed(n.cn.tableControlView,!0).style(\\\"box-sizing\\\",\\\"content-box\\\").on(\\\"mousemove\\\",function(e){s.filter(function(t){return e===t}).call(m,t)}).on(\\\"mousewheel\\\",function(e){e.scrollbarState.wheeling||(e.scrollbarState.wheeling=!0,i.event.stopPropagation(),i.event.preventDefault(),S(t,s,null,e.scrollY+i.event.deltaY)(e),e.scrollbarState.wheeling=!1)}).call(m,t,!0),s.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.size.l+\\\" \\\"+t.size.t+\\\")\\\"});var h=s.selectAll(\\\".\\\"+n.cn.scrollBackground).data(a.repeat,a.keyFun);h.enter().append(\\\"rect\\\").classed(n.cn.scrollBackground,!0).attr(\\\"fill\\\",\\\"none\\\"),h.attr(\\\"width\\\",function(t){return t.width}).attr(\\\"height\\\",function(t){return t.height}),s.each(function(e){o.setClipUrl(i.select(this),d(t,e))});var x=s.selectAll(\\\".\\\"+n.cn.yColumn).data(function(t){return t.columns},a.keyFun);x.enter().append(\\\"g\\\").classed(n.cn.yColumn,!0),x.exit().remove(),x.attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\" 0)\\\"}).call(i.behavior.drag().origin(function(e){return w(i.select(this),e,-n.uplift),l(this),e.calcdata.columnDragInProgress=!0,m(s.filter(function(t){return e.calcdata.key===t.key}),t),e}).on(\\\"drag\\\",function(t){var e=i.select(this),r=function(e){return(t===e?i.event.x:e.x)+e.columnWidth/2};t.x=Math.max(-n.overdrag,Math.min(t.calcdata.width+n.overdrag-t.columnWidth,i.event.x)),v(x).filter(function(e){return e.calcdata.key===t.calcdata.key}).sort(function(t,e){return r(t)-r(e)}).forEach(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e)}),x.filter(function(e){return t!==e}).transition().ease(n.transitionEase).duration(n.transitionDuration).attr(\\\"transform\\\",function(t){return\\\"translate(\\\"+t.x+\\\" 0)\\\"}),e.call(c).attr(\\\"transform\\\",\\\"translate(\\\"+t.x+\\\" -\\\"+n.uplift+\\\" )\\\")}).on(\\\"dragend\\\",function(e){var r=i.select(this),n=e.calcdata;e.x=e.xScale(e),e.calcdata.columnDragInProgress=!1,w(r,e,0),function(t,e,r){var n=e.gdColumnsOriginalOrder;e.gdColumns.sort(function(t,e){return r[n.indexOf(t)]-r[n.indexOf(e)]}),e.columnorder=r,t.emit(\\\"plotly_restyle\\\")}(t,n,n.columns.map(function(t){return t.xIndex}))})),x.each(function(e){o.setClipUrl(i.select(this),g(t,e))});var b=x.selectAll(\\\".\\\"+n.cn.columnBlock).data(f.splitToPanels,a.keyFun);b.enter().append(\\\"g\\\").classed(n.cn.columnBlock,!0).attr(\\\"id\\\",function(t){return t.key}),b.style(\\\"cursor\\\",function(t){return t.dragHandle?\\\"ew-resize\\\":t.calcdata.scrollbarState.barWiggleRoom?\\\"ns-resize\\\":\\\"default\\\"});var _=b.filter(M),A=b.filter(k);A.call(i.behavior.drag().origin(function(t){return i.event.stopPropagation(),t}).on(\\\"drag\\\",S(t,s,-1)).on(\\\"dragend\\\",function(){})),y(t,s,_,b),y(t,s,A,b);var C=s.selectAll(\\\".\\\"+n.cn.scrollAreaClip).data(a.repeat,a.keyFun);C.enter().append(\\\"clipPath\\\").classed(n.cn.scrollAreaClip,!0).attr(\\\"id\\\",function(e){return d(t,e)});var E=C.selectAll(\\\".\\\"+n.cn.scrollAreaClipRect).data(a.repeat,a.keyFun);E.enter().append(\\\"rect\\\").classed(n.cn.scrollAreaClipRect,!0).attr(\\\"x\\\",-n.overdrag).attr(\\\"y\\\",-n.uplift).attr(\\\"fill\\\",\\\"none\\\"),E.attr(\\\"width\\\",function(t){return t.width+2*n.overdrag}).attr(\\\"height\\\",function(t){return t.height+n.uplift}),x.selectAll(\\\".\\\"+n.cn.columnBoundary).data(a.repeat,a.keyFun).enter().append(\\\"g\\\").classed(n.cn.columnBoundary,!0);var L=x.selectAll(\\\".\\\"+n.cn.columnBoundaryClippath).data(a.repeat,a.keyFun);L.enter().append(\\\"clipPath\\\").classed(n.cn.columnBoundaryClippath,!0),L.attr(\\\"id\\\",function(e){return g(t,e)});var z=L.selectAll(\\\".\\\"+n.cn.columnBoundaryRect).data(a.repeat,a.keyFun);z.enter().append(\\\"rect\\\").classed(n.cn.columnBoundaryRect,!0).attr(\\\"fill\\\",\\\"none\\\"),z.attr(\\\"width\\\",function(t){return t.columnWidth+2*p(t)}).attr(\\\"height\\\",function(t){return t.calcdata.height+2*p(t)+n.uplift}).attr(\\\"x\\\",function(t){return-p(t)}).attr(\\\"y\\\",function(t){return-p(t)}),T(null,A,s)}},{\\\"../../components/color\\\":570,\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../../lib/gup\\\":693,\\\"../../lib/svg_text_utils\\\":721,\\\"./constants\\\":1139,\\\"./data_preparation_helper\\\":1140,\\\"./data_split_helpers\\\":1141,d3:148}],1145:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../box/attributes\\\"),i=t(\\\"../../lib/extend\\\").extendFlat;e.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,name:n.name,orientation:i({},n.orientation,{}),bandwidth:{valType:\\\"number\\\",min:0,editType:\\\"calc\\\"},scalegroup:{valType:\\\"string\\\",dflt:\\\"\\\",editType:\\\"calc\\\"},scalemode:{valType:\\\"enumerated\\\",values:[\\\"width\\\",\\\"count\\\"],dflt:\\\"width\\\",editType:\\\"calc\\\"},spanmode:{valType:\\\"enumerated\\\",values:[\\\"soft\\\",\\\"hard\\\",\\\"manual\\\"],dflt:\\\"soft\\\",editType:\\\"calc\\\"},span:{valType:\\\"info_array\\\",items:[{valType:\\\"any\\\",editType:\\\"calc\\\"},{valType:\\\"any\\\",editType:\\\"calc\\\"}],editType:\\\"calc\\\"},line:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,dflt:2,editType:\\\"style\\\"},editType:\\\"plot\\\"},fillcolor:n.fillcolor,points:i({},n.boxpoints,{}),jitter:i({},n.jitter,{}),pointpos:i({},n.pointpos,{}),marker:n.marker,text:n.text,box:{visible:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"plot\\\"},width:{valType:\\\"number\\\",min:0,max:1,dflt:.25,editType:\\\"plot\\\"},fillcolor:{valType:\\\"color\\\",editType:\\\"style\\\"},line:{color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,editType:\\\"style\\\"},editType:\\\"style\\\"},editType:\\\"plot\\\"},meanline:{visible:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"plot\\\"},color:{valType:\\\"color\\\",editType:\\\"style\\\"},width:{valType:\\\"number\\\",min:0,editType:\\\"style\\\"},editType:\\\"plot\\\"},side:{valType:\\\"enumerated\\\",values:[\\\"both\\\",\\\"positive\\\",\\\"negative\\\"],dflt:\\\"both\\\",editType:\\\"plot\\\"},selected:n.selected,unselected:n.unselected,hoveron:{valType:\\\"flaglist\\\",flags:[\\\"violins\\\",\\\"points\\\",\\\"kde\\\"],dflt:\\\"violins+points+kde\\\",extras:[\\\"all\\\"],editType:\\\"style\\\"}}},{\\\"../../lib/extend\\\":685,\\\"../box/attributes\\\":860}],1146:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../box/calc\\\"),o=t(\\\"./helpers\\\"),s=t(\\\"../../constants/numerical\\\").BADNUM;function l(t,e,r){var i=e.max-e.min;if(!i)return 1;if(t.bandwidth)return Math.max(t.bandwidth,i/1e4);var a=r.length,o=n.stdev(r,a-1,e.mean);return Math.max(function(t,e,r){return 1.059*Math.min(e,r/1.349)*Math.pow(t,-.2)}(a,o,e.q3-e.q1),i/100)}function c(t,e,r,n){var a,o=t.spanmode,l=t.span||[],c=[e.min,e.max],u=[e.min-2*n,e.max+2*n];function f(n){var i=l[n],a=r.d2c(i,0,t[e.valLetter+\\\"calendar\\\"]);return a===s?u[n]:a}var h={type:\\\"linear\\\",range:a=\\\"soft\\\"===o?u:\\\"hard\\\"===o?c:[f(0),f(1)]};return i.setConvert(h),h.cleanRange(),a}e.exports=function(t,e){var r=a(t,e);if(r[0].t.empty)return r;var s=t._fullLayout,u=i.getFromId(t,e[\\\"h\\\"===e.orientation?\\\"xaxis\\\":\\\"yaxis\\\"]),f=s._violinScaleGroupStats,h=e.scalegroup,p=f[h];p||(p=f[h]={maxWidth:0,maxCount:0});for(var d=1/0,g=-1/0,v=0;v<r.length;v++){var m=r[v],y=m.pts.map(o.extractVal),x=m.bandwidth=l(e,m,y),b=m.span=c(e,m,u,x),_=b[1]-b[0],w=Math.ceil(_/(x/3)),k=_/w;if(!isFinite(k)||!isFinite(w))return n.error(\\\"Something went wrong with computing the violin span\\\"),r[0].t.empty=!0,r;var M=o.makeKDE(m,e,y);m.density=new Array(w);for(var A=0,T=b[0];T<b[1]+k/2;A++,T+=k){var S=M(T);p.maxWidth=Math.max(p.maxWidth,S),m.density[A]={v:S,t:T}}p.maxCount=Math.max(p.maxCount,y.length),d=Math.min(d,b[0]),g=Math.max(g,b[1])}var C=i.findExtremes(u,[d,g],{padded:!0});return e._extremes[u._id]=C,r[0].t.labels.kde=n._(t,\\\"kde:\\\"),r}},{\\\"../../constants/numerical\\\":673,\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../box/calc\\\":861,\\\"./helpers\\\":1149}],1147:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../box/cross_trace_calc\\\").setPositionOffset,i=[\\\"v\\\",\\\"h\\\"];e.exports=function(t,e){for(var r=t.calcdata,a=e.xaxis,o=e.yaxis,s=0;s<i.length;s++){for(var l=i[s],c=\\\"h\\\"===l?o:a,u=[],f=0,h=0,p=0;p<r.length;p++){var d=r[p],g=d[0].t,v=d[0].trace;!0!==v.visible||\\\"violin\\\"!==v.type||g.empty||v.orientation!==l||v.xaxis!==a._id||v.yaxis!==o._id||(u.push(p),!1!==v.points&&(f=Math.max(f,v.jitter-v.pointpos-1),h=Math.max(h,v.jitter+v.pointpos-1)))}n(\\\"violin\\\",t,u,c,[f,h])}}},{\\\"../box/cross_trace_calc\\\":862}],1148:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../box/defaults\\\"),o=t(\\\"./attributes\\\");e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}function c(r,i){return n.coerce2(t,e,o,r,i)}if(a.handleSampleDefaults(t,e,l,s),!1!==e.visible){l(\\\"bandwidth\\\"),l(\\\"scalegroup\\\",e.name),l(\\\"scalemode\\\"),l(\\\"side\\\");var u,f=l(\\\"span\\\");Array.isArray(f)&&(u=\\\"manual\\\"),l(\\\"spanmode\\\",u);var h=l(\\\"line.color\\\",(t.marker||{}).color||r),p=l(\\\"line.width\\\"),d=l(\\\"fillcolor\\\",i.addOpacity(e.line.color,.5));a.handlePointsDefaults(t,e,l,{prefix:\\\"\\\"});var g=c(\\\"box.width\\\"),v=c(\\\"box.fillcolor\\\",d),m=c(\\\"box.line.color\\\",h),y=c(\\\"box.line.width\\\",p);l(\\\"box.visible\\\",Boolean(g||v||m||y))||(e.box={visible:!1});var x=c(\\\"meanline.color\\\",h),b=c(\\\"meanline.width\\\",p);l(\\\"meanline.visible\\\",Boolean(x||b))||(e.meanline={visible:!1})}}},{\\\"../../components/color\\\":570,\\\"../../lib\\\":696,\\\"../box/defaults\\\":863,\\\"./attributes\\\":1145}],1149:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=function(t){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*t*t)};r.makeKDE=function(t,e,r){var n=r.length,a=i,o=t.bandwidth,s=1/(n*o);return function(t){for(var e=0,i=0;i<n;i++)e+=a((t-r[i])/o);return s*e}},r.getPositionOnKdePath=function(t,e,r){var i,a;\\\"h\\\"===e.orientation?(i=\\\"y\\\",a=\\\"x\\\"):(i=\\\"x\\\",a=\\\"y\\\");var o=n.findPointOnPath(t.path,r,a,{pathLength:t.pathLength}),s=t.posCenterPx,l=o[i];return[l,\\\"both\\\"===e.side?2*s-l:s]},r.getKdeValue=function(t,e,n){var i=t.pts.map(r.extractVal);return r.makeKDE(t,e,i)(n)/t.posDensityScale},r.extractVal=function(t){return t.v}},{\\\"../../lib\\\":696}],1150:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"../../plots/cartesian/axes\\\"),a=t(\\\"../box/hover\\\"),o=t(\\\"./helpers\\\");e.exports=function(t,e,r,s,l){var c,u,f=t.cd,h=f[0].trace,p=h.hoveron,d=-1!==p.indexOf(\\\"violins\\\"),g=-1!==p.indexOf(\\\"kde\\\"),v=[];if(d||g){var m=a.hoverOnBoxes(t,e,r,s);if(d&&(v=v.concat(m)),g&&m.length>0){var y,x,b,_,w,k=t.xa,M=t.ya;\\\"h\\\"===h.orientation?(w=e,y=\\\"y\\\",b=M,x=\\\"x\\\",_=k):(w=r,y=\\\"x\\\",b=k,x=\\\"y\\\",_=M);var A=f[t.index];if(w>=A.span[0]&&w<=A.span[1]){var T=n.extendFlat({},t),S=_.c2p(w,!0),C=o.getKdeValue(A,h,w),E=o.getPositionOnKdePath(A,h,S),L=b._offset,z=b._length;T[y+\\\"0\\\"]=E[0],T[y+\\\"1\\\"]=E[1],T[x+\\\"0\\\"]=T[x+\\\"1\\\"]=S,T[x+\\\"Label\\\"]=x+\\\": \\\"+i.hoverLabelText(_,w)+\\\", \\\"+f[0].t.labels.kde+\\\" \\\"+C.toFixed(3),T.spikeDistance=m[0].spikeDistance;var O=y+\\\"Spike\\\";T[O]=m[0][O],m[0].spikeDistance=void 0,m[0][O]=void 0,v.push(T),(u={stroke:t.color})[y+\\\"1\\\"]=n.constrain(L+E[0],L,L+z),u[y+\\\"2\\\"]=n.constrain(L+E[1],L,L+z),u[x+\\\"1\\\"]=u[x+\\\"2\\\"]=_._offset+S}}}-1!==p.indexOf(\\\"points\\\")&&(c=a.hoverOnPoints(t,e,r));var I=l.selectAll(\\\".violinline-\\\"+h.uid).data(u?[0]:[]);return I.enter().append(\\\"line\\\").classed(\\\"violinline-\\\"+h.uid,!0).attr(\\\"stroke-width\\\",1.5),I.exit().remove(),I.attr(u),\\\"closest\\\"===s?c?[c]:v:c?(v.push(c),v):v}},{\\\"../../lib\\\":696,\\\"../../plots/cartesian/axes\\\":745,\\\"../box/hover\\\":865,\\\"./helpers\\\":1149}],1151:[function(t,e,r){\\\"use strict\\\";e.exports={attributes:t(\\\"./attributes\\\"),layoutAttributes:t(\\\"./layout_attributes\\\"),supplyDefaults:t(\\\"./defaults\\\"),supplyLayoutDefaults:t(\\\"./layout_defaults\\\"),calc:t(\\\"./calc\\\"),crossTraceCalc:t(\\\"./cross_trace_calc\\\"),plot:t(\\\"./plot\\\"),style:t(\\\"./style\\\"),styleOnSelect:t(\\\"../scatter/style\\\").styleOnSelect,hoverPoints:t(\\\"./hover\\\"),selectPoints:t(\\\"../box/select\\\"),moduleType:\\\"trace\\\",name:\\\"violin\\\",basePlotModule:t(\\\"../../plots/cartesian\\\"),categories:[\\\"cartesian\\\",\\\"svg\\\",\\\"symbols\\\",\\\"oriented\\\",\\\"box-violin\\\",\\\"showLegend\\\",\\\"violinLayout\\\",\\\"zoomScale\\\"],meta:{}}},{\\\"../../plots/cartesian\\\":757,\\\"../box/select\\\":870,\\\"../scatter/style\\\":1067,\\\"./attributes\\\":1145,\\\"./calc\\\":1146,\\\"./cross_trace_calc\\\":1147,\\\"./defaults\\\":1148,\\\"./hover\\\":1150,\\\"./layout_attributes\\\":1152,\\\"./layout_defaults\\\":1153,\\\"./plot\\\":1154,\\\"./style\\\":1155}],1152:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../box/layout_attributes\\\"),i=t(\\\"../../lib\\\").extendFlat;e.exports={violinmode:i({},n.boxmode,{}),violingap:i({},n.boxgap,{}),violingroupgap:i({},n.boxgroupgap,{})}},{\\\"../../lib\\\":696,\\\"../box/layout_attributes\\\":867}],1153:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../../lib\\\"),i=t(\\\"./layout_attributes\\\"),a=t(\\\"../box/layout_defaults\\\");e.exports=function(t,e,r){a._supply(t,e,r,function(r,a){return n.coerce(t,e,i,r,a)},\\\"violin\\\")}},{\\\"../../lib\\\":696,\\\"../box/layout_defaults\\\":868,\\\"./layout_attributes\\\":1152}],1154:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../lib\\\"),a=t(\\\"../../components/drawing\\\"),o=t(\\\"../box/plot\\\"),s=t(\\\"../scatter/line_points\\\"),l=t(\\\"./helpers\\\");e.exports=function(t,e,r,c){var u=t._fullLayout,f=e.xaxis,h=e.yaxis;function p(t){var e=s(t,{xaxis:f,yaxis:h,connectGaps:!0,baseTolerance:.75,shape:\\\"spline\\\",simplify:!0});return a.smoothopen(e[0],1)}i.makeTraceGroups(c,r,\\\"trace violins\\\").each(function(t){var r=n.select(this),a=t[0],s=a.t,c=a.trace;e.isRangePlot||(a.node3=r);var d=u._numViolins,g=\\\"group\\\"===u.violinmode&&d>1,v=1-u.violingap,m=s.bdPos=s.dPos*v*(1-u.violingroupgap)/(g?d:1),y=s.bPos=g?2*s.dPos*((s.num+.5)/d-.5)*v:0;if(s.wHover=s.dPos*(g?v/d:1),!0!==c.visible||s.empty)r.remove();else{var x=e[s.valLetter+\\\"axis\\\"],b=e[s.posLetter+\\\"axis\\\"],_=\\\"both\\\"===c.side,w=_||\\\"positive\\\"===c.side,k=_||\\\"negative\\\"===c.side,M=u._violinScaleGroupStats[c.scalegroup],A=r.selectAll(\\\"path.violin\\\").data(i.identity);A.enter().append(\\\"path\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\").attr(\\\"class\\\",\\\"violin\\\"),A.exit().remove(),A.each(function(t){var e,r,i,a,o,l,u,f,h=n.select(this),d=t.density,g=d.length,v=t.pos+y,A=b.c2p(v);switch(c.scalemode){case\\\"width\\\":e=M.maxWidth/m;break;case\\\"count\\\":e=M.maxWidth/m*(M.maxCount/t.pts.length)}if(w){for(u=new Array(g),o=0;o<g;o++)(f=u[o]={})[s.posLetter]=v+d[o].v/e,f[s.valLetter]=d[o].t;r=p(u)}if(k){for(u=new Array(g),l=0,o=g-1;l<g;l++,o--)(f=u[l]={})[s.posLetter]=v-d[o].v/e,f[s.valLetter]=d[o].t;i=p(u)}if(_)a=r+\\\"L\\\"+i.substr(1)+\\\"Z\\\";else{var T=[A,x.c2p(d[0].t)],S=[A,x.c2p(d[g-1].t)];\\\"h\\\"===c.orientation&&(T.reverse(),S.reverse()),a=w?\\\"M\\\"+T+\\\"L\\\"+r.substr(1)+\\\"L\\\"+S:\\\"M\\\"+S+\\\"L\\\"+i.substr(1)+\\\"L\\\"+T}h.attr(\\\"d\\\",a),t.posCenterPx=A,t.posDensityScale=e*m,t.path=h.node(),t.pathLength=t.path.getTotalLength()/(_?2:1)});var T,S,C,E=c.box,L=E.width,z=(E.line||{}).width;_?(T=m*L,S=0):w?(T=[0,m*L/2],S=-z):(T=[m*L/2,0],S=z),o.plotBoxAndWhiskers(r,{pos:b,val:x},c,{bPos:y,bdPos:T,bPosPxOffset:S}),o.plotBoxMean(r,{pos:b,val:x},c,{bPos:y,bdPos:T,bPosPxOffset:S}),!c.box.visible&&c.meanline.visible&&(C=i.identity);var O=r.selectAll(\\\"path.meanline\\\").data(C||[]);O.enter().append(\\\"path\\\").attr(\\\"class\\\",\\\"meanline\\\").style(\\\"fill\\\",\\\"none\\\").style(\\\"vector-effect\\\",\\\"non-scaling-stroke\\\"),O.exit().remove(),O.each(function(t){var e=x.c2p(t.mean,!0),r=l.getPositionOnKdePath(t,c,e);n.select(this).attr(\\\"d\\\",\\\"h\\\"===c.orientation?\\\"M\\\"+e+\\\",\\\"+r[0]+\\\"V\\\"+r[1]:\\\"M\\\"+r[0]+\\\",\\\"+e+\\\"H\\\"+r[1])}),o.plotPoints(r,{x:f,y:h},c,s)}})}},{\\\"../../components/drawing\\\":595,\\\"../../lib\\\":696,\\\"../box/plot\\\":869,\\\"../scatter/line_points\\\":1058,\\\"./helpers\\\":1149,d3:148}],1155:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"d3\\\"),i=t(\\\"../../components/color\\\"),a=t(\\\"../scatter/style\\\").stylePoints;e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\\\"g.trace.violins\\\");r.style(\\\"opacity\\\",function(t){return t[0].trace.opacity}),r.each(function(e){var r=e[0].trace,o=n.select(this),s=r.box||{},l=s.line||{},c=r.meanline||{},u=c.width;o.selectAll(\\\"path.violin\\\").style(\\\"stroke-width\\\",r.line.width+\\\"px\\\").call(i.stroke,r.line.color).call(i.fill,r.fillcolor),o.selectAll(\\\"path.box\\\").style(\\\"stroke-width\\\",l.width+\\\"px\\\").call(i.stroke,l.color).call(i.fill,s.fillcolor);var f={\\\"stroke-width\\\":u+\\\"px\\\",\\\"stroke-dasharray\\\":2*u+\\\"px,\\\"+u+\\\"px\\\"};o.selectAll(\\\"path.mean\\\").style(f).call(i.stroke,c.color),o.selectAll(\\\"path.meanline\\\").style(f).call(i.stroke,c.color),a(o,r,t)})}},{\\\"../../components/color\\\":570,\\\"../scatter/style\\\":1067,d3:148}],1156:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../plots/cartesian/axes\\\"),i=t(\\\"../lib\\\"),a=t(\\\"../plot_api/plot_schema\\\"),o=t(\\\"./helpers\\\").pointsAccessorFunction,s=t(\\\"../constants/numerical\\\").BADNUM;r.moduleType=\\\"transform\\\",r.name=\\\"aggregate\\\";var l=r.attributes={enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},groups:{valType:\\\"string\\\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\\\"x\\\",editType:\\\"calc\\\"},aggregations:{_isLinkedToArray:\\\"aggregation\\\",target:{valType:\\\"string\\\",editType:\\\"calc\\\"},func:{valType:\\\"enumerated\\\",values:[\\\"count\\\",\\\"sum\\\",\\\"avg\\\",\\\"median\\\",\\\"mode\\\",\\\"rms\\\",\\\"stddev\\\",\\\"min\\\",\\\"max\\\",\\\"first\\\",\\\"last\\\",\\\"change\\\",\\\"range\\\"],dflt:\\\"first\\\",editType:\\\"calc\\\"},funcmode:{valType:\\\"enumerated\\\",values:[\\\"sample\\\",\\\"population\\\"],dflt:\\\"sample\\\",editType:\\\"calc\\\"},enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},editType:\\\"calc\\\"},editType:\\\"calc\\\"},c=l.aggregations;function u(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,i=e.c2d;switch(r){case\\\"count\\\":return f;case\\\"first\\\":return h;case\\\"last\\\":return p;case\\\"sum\\\":return function(t,e){for(var r=0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==s&&(r+=o)}return i(r)};case\\\"avg\\\":return function(t,e){for(var r=0,a=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l,a++)}return a?i(r/a):s};case\\\"min\\\":return function(t,e){for(var r=1/0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==s&&(r=Math.min(r,o))}return r===1/0?s:i(r)};case\\\"max\\\":return function(t,e){for(var r=-1/0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==s&&(r=Math.max(r,o))}return r===-1/0?s:i(r)};case\\\"range\\\":return function(t,e){for(var r=1/0,a=-1/0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r=Math.min(r,l),a=Math.max(a,l))}return a===-1/0||r===1/0?s:i(a-r)};case\\\"change\\\":return function(t,e){var r=n(t[e[0]]),a=n(t[e[e.length-1]]);return r===s||a===s?s:i(a-r)};case\\\"median\\\":return function(t,e){for(var r=[],a=0;a<e.length;a++){var o=n(t[e[a]]);o!==s&&r.push(o)}if(!r.length)return s;r.sort();var l=(r.length-1)/2;return i((r[Math.floor(l)]+r[Math.ceil(l)])/2)};case\\\"mode\\\":return function(t,e){for(var r={},a=0,o=s,l=0;l<e.length;l++){var c=n(t[e[l]]);if(c!==s){var u=r[c]=(r[c]||0)+1;u>a&&(a=u,o=c)}}return a?i(o):s};case\\\"rms\\\":return function(t,e){for(var r=0,a=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l*l,a++)}return a?i(Math.sqrt(r/a)):s};case\\\"stddev\\\":return function(e,r){var i,a=0,o=0,l=1,c=s;for(i=0;i<r.length&&c===s;i++)c=n(e[r[i]]);if(c===s)return s;for(;i<r.length;i++){var u=n(e[r[i]]);if(u!==s){var f=u-c;a+=f,o+=f*f,l++}}var h=\\\"sample\\\"===t.funcmode?l-1:l;return h?Math.sqrt((o-a*a/l)/h):0}}}(a,n.getDataConversions(t,e,o,c)),d=new Array(r.length),g=0;g<r.length;g++)d[g]=u(c,r[g]);l.set(d),\\\"count\\\"===a.func&&i.pushUnique(e._arrayAttrs,o)}}function f(t,e){return e.length}function h(t,e){return t[e[0]]}function p(t,e){return t[e[e.length-1]]}r.supplyDefaults=function(t,e){var r,n={};function o(e,r){return i.coerce(t,n,l,e,r)}if(!o(\\\"enabled\\\"))return n;var s=a.findArrayAttributes(e),u={};for(r=0;r<s.length;r++)u[s[r]]=1;var f=o(\\\"groups\\\");if(!Array.isArray(f)){if(!u[f])return n.enabled=!1,n;u[f]=0}var h,p=t.aggregations||[],d=n.aggregations=new Array(p.length);function g(t,e){return i.coerce(p[r],h,c,t,e)}for(r=0;r<p.length;r++){h={_index:r};var v=g(\\\"target\\\"),m=g(\\\"func\\\");g(\\\"enabled\\\")&&v&&(u[v]||\\\"count\\\"===m&&void 0===u[v])?(\\\"stddev\\\"===m&&g(\\\"funcmode\\\"),u[v]=0,d[r]=h):d[r]={enabled:!1,_index:r}}for(r=0;r<s.length;r++)u[s[r]]&&d.push({target:s[r],func:c.func.dflt,enabled:!0,_index:-1});return n},r.calcTransform=function(t,e,r){if(r.enabled){var n=r.groups,a=i.getTargetArray(e,{target:n});if(a){var s,l,c,f,h={},p={},d=[],g=o(e.transforms,r),v=a.length;for(e._length&&(v=Math.min(v,e._length)),s=0;s<v;s++)void 0===(c=h[l=a[s]])?(h[l]=d.length,f=[s],d.push(f),p[h[l]]=g(s)):(d[c].push(s),p[h[l]]=(p[h[l]]||[]).concat(g(s)));r._indexToPoints=p;var m=r.aggregations;for(s=0;s<m.length;s++)u(t,e,d,m[s]);\\\"string\\\"==typeof n&&u(t,e,d,{target:n,func:\\\"first\\\",enabled:!0}),e._length=d.length}}}},{\\\"../constants/numerical\\\":673,\\\"../lib\\\":696,\\\"../plot_api/plot_schema\\\":734,\\\"../plots/cartesian/axes\\\":745,\\\"./helpers\\\":1159}],1157:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../registry\\\"),a=t(\\\"../plots/cartesian/axes\\\"),o=t(\\\"./helpers\\\").pointsAccessorFunction,s=t(\\\"../constants/filter_ops\\\"),l=s.COMPARISON_OPS,c=s.INTERVAL_OPS,u=s.SET_OPS;r.moduleType=\\\"transform\\\",r.name=\\\"filter\\\",r.attributes={enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},target:{valType:\\\"string\\\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\\\"x\\\",editType:\\\"calc\\\"},operation:{valType:\\\"enumerated\\\",values:[].concat(l).concat(c).concat(u),dflt:\\\"=\\\",editType:\\\"calc\\\"},value:{valType:\\\"any\\\",dflt:0,editType:\\\"calc\\\"},preservegaps:{valType:\\\"boolean\\\",dflt:!1,editType:\\\"calc\\\"},editType:\\\"calc\\\"},r.supplyDefaults=function(t){var e={};function a(i,a){return n.coerce(t,e,r.attributes,i,a)}if(a(\\\"enabled\\\")){a(\\\"preservegaps\\\"),a(\\\"operation\\\"),a(\\\"value\\\"),a(\\\"target\\\");var o=i.getComponentMethod(\\\"calendars\\\",\\\"handleDefaults\\\");o(t,e,\\\"valuecalendar\\\",null),o(t,e,\\\"targetcalendar\\\",null)}return e},r.calcTransform=function(t,e,r){if(r.enabled){var i=n.getTargetArray(e,r);if(i){var s=r.target,f=i.length;e._length&&(f=Math.min(f,e._length));var h=r.targetcalendar,p=e._arrayAttrs,d=r.preservegaps;if(\\\"string\\\"==typeof s){var g=n.nestedProperty(e,s+\\\"calendar\\\").get();g&&(h=g)}var v,m,y=function(t,e,r){var n=t.operation,i=t.value,a=Array.isArray(i);function o(t){return-1!==t.indexOf(n)}var s,f=function(r){return e(r,0,t.valuecalendar)},h=function(t){return e(t,0,r)};o(l)?s=f(a?i[0]:i):o(c)?s=a?[f(i[0]),f(i[1])]:[f(i),f(i)]:o(u)&&(s=a?i.map(f):[f(i)]);switch(n){case\\\"=\\\":return function(t){return h(t)===s};case\\\"!=\\\":return function(t){return h(t)!==s};case\\\"<\\\":return function(t){return h(t)<s};case\\\"<=\\\":return function(t){return h(t)<=s};case\\\">\\\":return function(t){return h(t)>s};case\\\">=\\\":return function(t){return h(t)>=s};case\\\"[]\\\":return function(t){var e=h(t);return e>=s[0]&&e<=s[1]};case\\\"()\\\":return function(t){var e=h(t);return e>s[0]&&e<s[1]};case\\\"[)\\\":return function(t){var e=h(t);return e>=s[0]&&e<s[1]};case\\\"(]\\\":return function(t){var e=h(t);return e>s[0]&&e<=s[1]};case\\\"][\\\":return function(t){var e=h(t);return e<=s[0]||e>=s[1]};case\\\")(\\\":return function(t){var e=h(t);return e<s[0]||e>s[1]};case\\\"](\\\":return function(t){var e=h(t);return e<=s[0]||e>s[1]};case\\\")[\\\":return function(t){var e=h(t);return e<s[0]||e>=s[1]};case\\\"{}\\\":return function(t){return-1!==s.indexOf(h(t))};case\\\"}{\\\":return function(t){return-1===s.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),h),x={},b={},_=0;d?(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),M(v);for(var w=o(e.transforms,r),k=0;k<f;k++){y(i[k])?(M(m,k),b[_++]=w(k)):d&&_++}r._indexToPoints=b,e._length=_}}function M(t,r){for(var i=0;i<p.length;i++){t(n.nestedProperty(e,p[i]),r)}}}},{\\\"../constants/filter_ops\\\":669,\\\"../lib\\\":696,\\\"../plots/cartesian/axes\\\":745,\\\"../registry\\\":828,\\\"./helpers\\\":1159}],1158:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plot_api/plot_schema\\\"),a=t(\\\"../plots/plots\\\"),o=t(\\\"./helpers\\\").pointsAccessorFunction;function s(t,e){var r,s,c,u,f,h,p,d,g,v,m=e.transform,y=e.transformIndex,x=t.transforms[y].groups,b=o(t.transforms,m);if(!Array.isArray(x)||0===x.length)return[t];var _=n.filterUnique(x),w=new Array(_.length),k=x.length,M=i.findArrayAttributes(t),A=m.styles||[],T={};for(r=0;r<A.length;r++)T[A[r].target]=A[r].value;m.styles&&(v=n.keyedContainer(m,\\\"styles\\\",\\\"target\\\",\\\"value.name\\\"));var S={},C={};for(r=0;r<_.length;r++){S[h=_[r]]=r,C[h]=0,(p=w[r]=n.extendDeepNoArrays({},t))._group=h,p.updateStyle=l(h,y),p.transforms[y]._indexToPoints={};var E=null;for(v&&(E=v.get(h)),p.name=E||\\\"\\\"===E?E:n.templateString(m.nameformat,{trace:t.name,group:h}),d=p.transforms,p.transforms=[],s=0;s<d.length;s++)p.transforms[s]=n.extendDeepNoArrays({},d[s]);for(s=0;s<M.length;s++)n.nestedProperty(p,M[s]).set([])}for(c=0;c<M.length;c++){for(u=M[c],s=0,g=[];s<_.length;s++)g[s]=n.nestedProperty(w[s],u).get();for(f=n.nestedProperty(t,u).get(),s=0;s<k;s++)g[S[x[s]]].push(f[s])}for(s=0;s<k;s++){(p=w[S[x[s]]]).transforms[y]._indexToPoints[C[x[s]]]=b(s),C[x[s]]++}for(r=0;r<_.length;r++)h=_[r],p=w[r],a.clearExpandedTraceDefaultColors(p),p=n.extendDeepNoArrays(p,T[h]||{});return w}function l(t,e){return function(r,i,a){n.keyedContainer(r,\\\"transforms[\\\"+e+\\\"].styles\\\",\\\"target\\\",\\\"value.\\\"+i).set(String(t),a)}}r.moduleType=\\\"transform\\\",r.name=\\\"groupby\\\",r.attributes={enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},groups:{valType:\\\"data_array\\\",dflt:[],editType:\\\"calc\\\"},nameformat:{valType:\\\"string\\\",editType:\\\"calc\\\"},styles:{_isLinkedToArray:\\\"style\\\",target:{valType:\\\"string\\\",editType:\\\"calc\\\"},value:{valType:\\\"any\\\",dflt:{},editType:\\\"calc\\\",_compareAsJSON:!0},editType:\\\"calc\\\"},editType:\\\"calc\\\"},r.supplyDefaults=function(t,e,i){var a,o={};function s(e,i){return n.coerce(t,o,r.attributes,e,i)}if(!s(\\\"enabled\\\"))return o;s(\\\"groups\\\"),s(\\\"nameformat\\\",i._dataLength>1?\\\"%{group} (%{trace})\\\":\\\"%{group}\\\");var l=t.styles,c=o.styles=[];if(l)for(a=0;a<l.length;a++){var u=c[a]={};n.coerce(l[a],c[a],r.attributes.styles,\\\"target\\\");var f=n.coerce(l[a],c[a],r.attributes.styles,\\\"value\\\");n.isPlainObject(f)?u.value=n.extendDeep({},f):f&&delete u.value}return o},r.transform=function(t,e){var r,n,i,a=[];for(n=0;n<t.length;n++)for(r=s(t[n],e),i=0;i<r.length;i++)a.push(r[i]);return a}},{\\\"../lib\\\":696,\\\"../plot_api/plot_schema\\\":734,\\\"../plots/plots\\\":809,\\\"./helpers\\\":1159}],1159:[function(t,e,r){\\\"use strict\\\";r.pointsAccessorFunction=function(t,e){for(var r,n,i=0;i<t.length&&(r=t[i])!==e;i++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);return n?function(t){return n[t]}:function(t){return[t]}}},{}],1160:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"../lib\\\"),i=t(\\\"../plots/cartesian/axes\\\"),a=t(\\\"./helpers\\\").pointsAccessorFunction;r.moduleType=\\\"transform\\\",r.name=\\\"sort\\\",r.attributes={enabled:{valType:\\\"boolean\\\",dflt:!0,editType:\\\"calc\\\"},target:{valType:\\\"string\\\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\\\"x\\\",editType:\\\"calc\\\"},order:{valType:\\\"enumerated\\\",values:[\\\"ascending\\\",\\\"descending\\\"],dflt:\\\"ascending\\\",editType:\\\"calc\\\"},editType:\\\"calc\\\"},r.supplyDefaults=function(t){var e={};function i(i,a){return n.coerce(t,e,r.attributes,i,a)}return i(\\\"enabled\\\")&&(i(\\\"target\\\"),i(\\\"order\\\")),e},r.calcTransform=function(t,e,r){if(r.enabled){var o=n.getTargetArray(e,r);if(o){var s=r.target,l=o.length;e._length&&(l=Math.min(l,e._length));var c,u,f=e._arrayAttrs,h=function(t,e,r,n){var i,a=new Array(n),o=new Array(n);for(i=0;i<n;i++)a[i]={v:e[i],i:i};for(a.sort(function(t,e){switch(t.order){case\\\"ascending\\\":return function(t,r){return e(t.v)-e(r.v)};case\\\"descending\\\":return function(t,r){return e(r.v)-e(t.v)}}}(t,r)),i=0;i<n;i++)o[i]=a[i].i;return o}(r,o,i.getDataToCoordFunc(t,e,s,o),l),p=a(e.transforms,r),d={};for(c=0;c<f.length;c++){var g=n.nestedProperty(e,f[c]),v=g.get(),m=new Array(l);for(u=0;u<l;u++)m[u]=v[h[u]];g.set(m)}for(u=0;u<l;u++)d[u]=p(h[u]);r._indexToPoints=d,e._length=l}}}},{\\\"../lib\\\":696,\\\"../plots/cartesian/axes\\\":745,\\\"./helpers\\\":1159}]},{},[22])(22)});});require(['plotly'], function(Plotly) {window._Plotly = Plotly;});}</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import plotly.offline as offline\\n\",\n    \"import plotly.graph_objs as go\\n\",\n    \"\\n\",\n    \"offline.init_notebook_mode()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 12,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.plotly.v1+json\": {\n       \"data\": [\n        {\n         \"name\": \"East Asia & Pacific\",\n         \"stackgroup\": \"World\",\n         \"type\": \"scatter\",\n         \"uid\": \"e5b08b9e-fcb8-4246-87db-4cb5b960bdf4\",\n         \"x\": [\n          \"1960-01-01\",\n          \"1961-01-01\",\n          \"1962-01-01\",\n          \"1963-01-01\",\n          \"1964-01-01\",\n          \"1965-01-01\",\n          \"1966-01-01\",\n          \"1967-01-01\",\n          \"1968-01-01\",\n          \"1969-01-01\",\n          \"1970-01-01\",\n          \"1971-01-01\",\n          \"1972-01-01\",\n          \"1973-01-01\",\n          \"1974-01-01\",\n          \"1975-01-01\",\n          \"1976-01-01\",\n          \"1977-01-01\",\n          \"1978-01-01\",\n          \"1979-01-01\",\n          \"1980-01-01\",\n          \"1981-01-01\",\n          \"1982-01-01\",\n          \"1983-01-01\",\n          \"1984-01-01\",\n          \"1985-01-01\",\n          \"1986-01-01\",\n          \"1987-01-01\",\n          \"1988-01-01\",\n          \"1989-01-01\",\n          \"1990-01-01\",\n          \"1991-01-01\",\n          \"1992-01-01\",\n          \"1993-01-01\",\n          \"1994-01-01\",\n          \"1995-01-01\",\n          \"1996-01-01\",\n          \"1997-01-01\",\n          \"1998-01-01\",\n          \"1999-01-01\",\n          \"2000-01-01\",\n          \"2001-01-01\",\n          \"2002-01-01\",\n          \"2003-01-01\",\n          \"2004-01-01\",\n          \"2005-01-01\",\n          \"2006-01-01\",\n          \"2007-01-01\",\n          \"2008-01-01\",\n          \"2009-01-01\",\n          \"2010-01-01\",\n          \"2011-01-01\",\n          \"2012-01-01\",\n          \"2013-01-01\",\n          \"2014-01-01\",\n          \"2015-01-01\",\n          \"2016-01-01\",\n          \"2017-01-01\"\n         ],\n         \"y\": [\n          1039944591,\n          1043546747,\n          1058028199,\n          1083802299,\n          1109204182,\n          1135650895,\n          1165517894,\n          1194424326,\n          1223721283,\n          1256501008,\n          1289258962,\n          1322942750,\n          1354794332,\n          1385052014,\n          1415128313,\n          1442241325,\n          1466464716,\n          1489361661,\n          1512159741,\n          1535391301,\n          1558178982,\n          1581806986,\n          1607731269,\n          1633628203,\n          1658253758,\n          1683448851,\n          1710171170,\n          1738276268,\n          1766656203,\n          1794408755,\n          1821481246,\n          1847530233,\n          1871898268,\n          1895356643,\n          1918771287,\n          1941918800,\n          1964635058,\n          1986799861,\n          2008140141,\n          2028095314,\n          2047150745,\n          2065521836,\n          2082953527,\n          2099545576,\n          2115557365,\n          2131363078,\n          2147029631,\n          2162104019,\n          2177421759,\n          2192352319,\n          2207154641,\n          2221934584,\n          2237082761,\n          2252311022,\n          2267745366,\n          2283108073,\n          2298726779,\n          2314364990\n         ]\n        },\n        {\n         \"name\": \"South Asia\",\n         \"stackgroup\": \"World\",\n         \"type\": \"scatter\",\n         \"uid\": \"5ccdb42f-dbf4-4abc-a1de-851c1114c31b\",\n         \"x\": [\n          \"1960-01-01\",\n          \"1961-01-01\",\n          \"1962-01-01\",\n          \"1963-01-01\",\n          \"1964-01-01\",\n          \"1965-01-01\",\n          \"1966-01-01\",\n          \"1967-01-01\",\n          \"1968-01-01\",\n          \"1969-01-01\",\n          \"1970-01-01\",\n          \"1971-01-01\",\n          \"1972-01-01\",\n          \"1973-01-01\",\n          \"1974-01-01\",\n          \"1975-01-01\",\n          \"1976-01-01\",\n          \"1977-01-01\",\n          \"1978-01-01\",\n          \"1979-01-01\",\n          \"1980-01-01\",\n          \"1981-01-01\",\n          \"1982-01-01\",\n          \"1983-01-01\",\n          \"1984-01-01\",\n          \"1985-01-01\",\n          \"1986-01-01\",\n          \"1987-01-01\",\n          \"1988-01-01\",\n          \"1989-01-01\",\n          \"1990-01-01\",\n          \"1991-01-01\",\n          \"1992-01-01\",\n          \"1993-01-01\",\n          \"1994-01-01\",\n          \"1995-01-01\",\n          \"1996-01-01\",\n          \"1997-01-01\",\n          \"1998-01-01\",\n          \"1999-01-01\",\n          \"2000-01-01\",\n          \"2001-01-01\",\n          \"2002-01-01\",\n          \"2003-01-01\",\n          \"2004-01-01\",\n          \"2005-01-01\",\n          \"2006-01-01\",\n          \"2007-01-01\",\n          \"2008-01-01\",\n          \"2009-01-01\",\n          \"2010-01-01\",\n          \"2011-01-01\",\n          \"2012-01-01\",\n          \"2013-01-01\",\n          \"2014-01-01\",\n          \"2015-01-01\",\n          \"2016-01-01\",\n          \"2017-01-01\"\n         ],\n         \"y\": [\n          571835666,\n          583894094,\n          596413939,\n          609391805,\n          622822615,\n          636701820,\n          651036352,\n          665826653,\n          681054882,\n          696697198,\n          712740919,\n          729173562,\n          746012374,\n          763310561,\n          781140577,\n          799553306,\n          818560436,\n          838142287,\n          858277856,\n          878933031,\n          900076467,\n          921696915,\n          943781613,\n          966293643,\n          989188965,\n          1012429641,\n          1035982524,\n          1059829211,\n          1083963380,\n          1108386444,\n          1133089464,\n          1158058109,\n          1183253534,\n          1208612942,\n          1234059205,\n          1259530819,\n          1284978193,\n          1310387887,\n          1335777637,\n          1361185289,\n          1386625845,\n          1412104373,\n          1437568227,\n          1462906674,\n          1487975237,\n          1512670560,\n          1536943534,\n          1560818860,\n          1584359049,\n          1607663899,\n          1630806784,\n          1653798614,\n          1676615491,\n          1699310450,\n          1721847786,\n          1744199944,\n          1766393714,\n          1788388852\n         ]\n        },\n        {\n         \"name\": \"Sub-Saharan Africa\",\n         \"stackgroup\": \"World\",\n         \"type\": \"scatter\",\n         \"uid\": \"d81b1f54-9dcc-475b-9517-2127417ea48f\",\n         \"x\": [\n          \"1960-01-01\",\n          \"1961-01-01\",\n          \"1962-01-01\",\n          \"1963-01-01\",\n          \"1964-01-01\",\n          \"1965-01-01\",\n          \"1966-01-01\",\n          \"1967-01-01\",\n          \"1968-01-01\",\n          \"1969-01-01\",\n          \"1970-01-01\",\n          \"1971-01-01\",\n          \"1972-01-01\",\n          \"1973-01-01\",\n          \"1974-01-01\",\n          \"1975-01-01\",\n          \"1976-01-01\",\n          \"1977-01-01\",\n          \"1978-01-01\",\n          \"1979-01-01\",\n          \"1980-01-01\",\n          \"1981-01-01\",\n          \"1982-01-01\",\n          \"1983-01-01\",\n          \"1984-01-01\",\n          \"1985-01-01\",\n          \"1986-01-01\",\n          \"1987-01-01\",\n          \"1988-01-01\",\n          \"1989-01-01\",\n          \"1990-01-01\",\n          \"1991-01-01\",\n          \"1992-01-01\",\n          \"1993-01-01\",\n          \"1994-01-01\",\n          \"1995-01-01\",\n          \"1996-01-01\",\n          \"1997-01-01\",\n          \"1998-01-01\",\n          \"1999-01-01\",\n          \"2000-01-01\",\n          \"2001-01-01\",\n          \"2002-01-01\",\n          \"2003-01-01\",\n          \"2004-01-01\",\n          \"2005-01-01\",\n          \"2006-01-01\",\n          \"2007-01-01\",\n          \"2008-01-01\",\n          \"2009-01-01\",\n          \"2010-01-01\",\n          \"2011-01-01\",\n          \"2012-01-01\",\n          \"2013-01-01\",\n          \"2014-01-01\",\n          \"2015-01-01\",\n          \"2016-01-01\",\n          \"2017-01-01\"\n         ],\n         \"y\": [\n          228586005,\n          234008580,\n          239647139,\n          245503266,\n          251576403,\n          257868609,\n          264386171,\n          271139271,\n          278138996,\n          285397999,\n          292929074,\n          300737023,\n          308831549,\n          317234127,\n          325972033,\n          335064879,\n          344522341,\n          354343159,\n          364515830,\n          375034981,\n          385885281,\n          397065556,\n          408577033,\n          420413518,\n          432573431,\n          445048059,\n          457835414,\n          470938971,\n          484357710,\n          498102752,\n          512177101,\n          526599014,\n          541365685,\n          556451898,\n          571828603,\n          587469624,\n          603385639,\n          619607956,\n          636182577,\n          653179863,\n          670649638,\n          688615995,\n          707099850,\n          726140617,\n          745788118,\n          766080507,\n          787035792,\n          808660166,\n          830965556,\n          853953657,\n          877628367,\n          901989926,\n          927039875,\n          952734072,\n          979017918,\n          1005850049,\n          1033212743,\n          1061107721\n         ]\n        },\n        {\n         \"name\": \"Europe & Central Asia\",\n         \"stackgroup\": \"World\",\n         \"type\": \"scatter\",\n         \"uid\": \"41d2b519-5c2e-4f44-a2bf-af5275db6ae1\",\n         \"x\": [\n          \"1960-01-01\",\n          \"1961-01-01\",\n          \"1962-01-01\",\n          \"1963-01-01\",\n          \"1964-01-01\",\n          \"1965-01-01\",\n          \"1966-01-01\",\n          \"1967-01-01\",\n          \"1968-01-01\",\n          \"1969-01-01\",\n          \"1970-01-01\",\n          \"1971-01-01\",\n          \"1972-01-01\",\n          \"1973-01-01\",\n          \"1974-01-01\",\n          \"1975-01-01\",\n          \"1976-01-01\",\n          \"1977-01-01\",\n          \"1978-01-01\",\n          \"1979-01-01\",\n          \"1980-01-01\",\n          \"1981-01-01\",\n          \"1982-01-01\",\n          \"1983-01-01\",\n          \"1984-01-01\",\n          \"1985-01-01\",\n          \"1986-01-01\",\n          \"1987-01-01\",\n          \"1988-01-01\",\n          \"1989-01-01\",\n          \"1990-01-01\",\n          \"1991-01-01\",\n          \"1992-01-01\",\n          \"1993-01-01\",\n          \"1994-01-01\",\n          \"1995-01-01\",\n          \"1996-01-01\",\n          \"1997-01-01\",\n          \"1998-01-01\",\n          \"1999-01-01\",\n          \"2000-01-01\",\n          \"2001-01-01\",\n          \"2002-01-01\",\n          \"2003-01-01\",\n          \"2004-01-01\",\n          \"2005-01-01\",\n          \"2006-01-01\",\n          \"2007-01-01\",\n          \"2008-01-01\",\n          \"2009-01-01\",\n          \"2010-01-01\",\n          \"2011-01-01\",\n          \"2012-01-01\",\n          \"2013-01-01\",\n          \"2014-01-01\",\n          \"2015-01-01\",\n          \"2016-01-01\",\n          \"2017-01-01\"\n         ],\n         \"y\": [\n          667246384,\n          674972972,\n          682938669,\n          690962675,\n          698905664,\n          706609007,\n          713341112,\n          719879789,\n          726161895,\n          732317863,\n          737948178,\n          743607439,\n          749815857,\n          755867961,\n          761701324,\n          767332578,\n          772838318,\n          778094845,\n          783298994,\n          788525199,\n          793937090,\n          799215272,\n          803972967,\n          808524728,\n          813281381,\n          818146882,\n          823155058,\n          828213790,\n          833315236,\n          838462813,\n          842848473,\n          846178276,\n          849656745,\n          852762016,\n          854723055,\n          856352860,\n          857652705,\n          859112733,\n          860236341,\n          861380108,\n          862304086,\n          863615632,\n          865196877,\n          867457664,\n          870030756,\n          872661616,\n          875343235,\n          878465990,\n          881965815,\n          885591814,\n          889016507,\n          891098854,\n          894679968,\n          898881448,\n          903123160,\n          907426233,\n          911686319,\n          915545801\n         ]\n        },\n        {\n         \"name\": \"Latin America & Caribbean\",\n         \"stackgroup\": \"World\",\n         \"type\": \"scatter\",\n         \"uid\": \"dd6bc133-ee5c-4ca8-8457-ddf476dc6ab2\",\n         \"x\": [\n          \"1960-01-01\",\n          \"1961-01-01\",\n          \"1962-01-01\",\n          \"1963-01-01\",\n          \"1964-01-01\",\n          \"1965-01-01\",\n          \"1966-01-01\",\n          \"1967-01-01\",\n          \"1968-01-01\",\n          \"1969-01-01\",\n          \"1970-01-01\",\n          \"1971-01-01\",\n          \"1972-01-01\",\n          \"1973-01-01\",\n          \"1974-01-01\",\n          \"1975-01-01\",\n          \"1976-01-01\",\n          \"1977-01-01\",\n          \"1978-01-01\",\n          \"1979-01-01\",\n          \"1980-01-01\",\n          \"1981-01-01\",\n          \"1982-01-01\",\n          \"1983-01-01\",\n          \"1984-01-01\",\n          \"1985-01-01\",\n          \"1986-01-01\",\n          \"1987-01-01\",\n          \"1988-01-01\",\n          \"1989-01-01\",\n          \"1990-01-01\",\n          \"1991-01-01\",\n          \"1992-01-01\",\n          \"1993-01-01\",\n          \"1994-01-01\",\n          \"1995-01-01\",\n          \"1996-01-01\",\n          \"1997-01-01\",\n          \"1998-01-01\",\n          \"1999-01-01\",\n          \"2000-01-01\",\n          \"2001-01-01\",\n          \"2002-01-01\",\n          \"2003-01-01\",\n          \"2004-01-01\",\n          \"2005-01-01\",\n          \"2006-01-01\",\n          \"2007-01-01\",\n          \"2008-01-01\",\n          \"2009-01-01\",\n          \"2010-01-01\",\n          \"2011-01-01\",\n          \"2012-01-01\",\n          \"2013-01-01\",\n          \"2014-01-01\",\n          \"2015-01-01\",\n          \"2016-01-01\",\n          \"2017-01-01\"\n         ],\n         \"y\": [\n          220434662,\n          226564469,\n          232897323,\n          239401268,\n          246016368,\n          252710310,\n          259468669,\n          266295880,\n          273209036,\n          280225795,\n          287361389,\n          294620137,\n          301984430,\n          309446959,\n          316987646,\n          324590837,\n          332247800,\n          339956419,\n          347735305,\n          355593111,\n          363543431,\n          371580994,\n          379697683,\n          387868173,\n          396059351,\n          404246768,\n          412413602,\n          420560827,\n          428701267,\n          436857131,\n          445044474,\n          453251622,\n          461466819,\n          469673465,\n          477832467,\n          485913138,\n          493920488,\n          501837820,\n          509664957,\n          517324344,\n          524829251,\n          532172709,\n          539372044,\n          546478662,\n          553563090,\n          560673962,\n          567821716,\n          574994397,\n          582179826,\n          589349327,\n          596478519,\n          603537118,\n          610547919,\n          617495658,\n          624335544,\n          631062657,\n          637663890,\n          644137666\n         ]\n        },\n        {\n         \"name\": \"Middle East & North Africa\",\n         \"stackgroup\": \"World\",\n         \"type\": \"scatter\",\n         \"uid\": \"ed1e8fae-72d2-495c-b82c-946c6c4a74bd\",\n         \"x\": [\n          \"1960-01-01\",\n          \"1961-01-01\",\n          \"1962-01-01\",\n          \"1963-01-01\",\n          \"1964-01-01\",\n          \"1965-01-01\",\n          \"1966-01-01\",\n          \"1967-01-01\",\n          \"1968-01-01\",\n          \"1969-01-01\",\n          \"1970-01-01\",\n          \"1971-01-01\",\n          \"1972-01-01\",\n          \"1973-01-01\",\n          \"1974-01-01\",\n          \"1975-01-01\",\n          \"1976-01-01\",\n          \"1977-01-01\",\n          \"1978-01-01\",\n          \"1979-01-01\",\n          \"1980-01-01\",\n          \"1981-01-01\",\n          \"1982-01-01\",\n          \"1983-01-01\",\n          \"1984-01-01\",\n          \"1985-01-01\",\n          \"1986-01-01\",\n          \"1987-01-01\",\n          \"1988-01-01\",\n          \"1989-01-01\",\n          \"1990-01-01\",\n          \"1991-01-01\",\n          \"1992-01-01\",\n          \"1993-01-01\",\n          \"1994-01-01\",\n          \"1995-01-01\",\n          \"1996-01-01\",\n          \"1997-01-01\",\n          \"1998-01-01\",\n          \"1999-01-01\",\n          \"2000-01-01\",\n          \"2001-01-01\",\n          \"2002-01-01\",\n          \"2003-01-01\",\n          \"2004-01-01\",\n          \"2005-01-01\",\n          \"2006-01-01\",\n          \"2007-01-01\",\n          \"2008-01-01\",\n          \"2009-01-01\",\n          \"2010-01-01\",\n          \"2011-01-01\",\n          \"2012-01-01\",\n          \"2013-01-01\",\n          \"2014-01-01\",\n          \"2015-01-01\",\n          \"2016-01-01\",\n          \"2017-01-01\"\n         ],\n         \"y\": [\n          105488678,\n          108374227,\n          111385940,\n          114471415,\n          117671617,\n          120973578,\n          124374455,\n          127947266,\n          131566224,\n          135279930,\n          139083819,\n          142950993,\n          146887303,\n          150999871,\n          155259901,\n          159722643,\n          164407528,\n          169318424,\n          174493349,\n          180000521,\n          185843847,\n          192015875,\n          198499602,\n          205229901,\n          212102793,\n          219095273,\n          226161475,\n          233285188,\n          240367135,\n          247283550,\n          255989130,\n          262659662,\n          267020622,\n          273204804,\n          279279333,\n          286917385,\n          292934005,\n          298982946,\n          305001541,\n          311053183,\n          317129227,\n          323196354,\n          329289435,\n          335522845,\n          342046777,\n          348956287,\n          356287693,\n          363996317,\n          371999662,\n          380192587,\n          388376106,\n          396573248,\n          404783020,\n          412953000,\n          421030035,\n          428974903,\n          436738031,\n          444322417\n         ]\n        },\n        {\n         \"name\": \"North America\",\n         \"stackgroup\": \"World\",\n         \"type\": \"scatter\",\n         \"uid\": \"1664abd5-63da-48bf-a458-41469dab41cb\",\n         \"x\": [\n          \"1960-01-01\",\n          \"1961-01-01\",\n          \"1962-01-01\",\n          \"1963-01-01\",\n          \"1964-01-01\",\n          \"1965-01-01\",\n          \"1966-01-01\",\n          \"1967-01-01\",\n          \"1968-01-01\",\n          \"1969-01-01\",\n          \"1970-01-01\",\n          \"1971-01-01\",\n          \"1972-01-01\",\n          \"1973-01-01\",\n          \"1974-01-01\",\n          \"1975-01-01\",\n          \"1976-01-01\",\n          \"1977-01-01\",\n          \"1978-01-01\",\n          \"1979-01-01\",\n          \"1980-01-01\",\n          \"1981-01-01\",\n          \"1982-01-01\",\n          \"1983-01-01\",\n          \"1984-01-01\",\n          \"1985-01-01\",\n          \"1986-01-01\",\n          \"1987-01-01\",\n          \"1988-01-01\",\n          \"1989-01-01\",\n          \"1990-01-01\",\n          \"1991-01-01\",\n          \"1992-01-01\",\n          \"1993-01-01\",\n          \"1994-01-01\",\n          \"1995-01-01\",\n          \"1996-01-01\",\n          \"1997-01-01\",\n          \"1998-01-01\",\n          \"1999-01-01\",\n          \"2000-01-01\",\n          \"2001-01-01\",\n          \"2002-01-01\",\n          \"2003-01-01\",\n          \"2004-01-01\",\n          \"2005-01-01\",\n          \"2006-01-01\",\n          \"2007-01-01\",\n          \"2008-01-01\",\n          \"2009-01-01\",\n          \"2010-01-01\",\n          \"2011-01-01\",\n          \"2012-01-01\",\n          \"2013-01-01\",\n          \"2014-01-01\",\n          \"2015-01-01\",\n          \"2016-01-01\",\n          \"2017-01-01\"\n         ],\n         \"y\": [\n          198624409,\n          202007500,\n          205198600,\n          208253700,\n          211262900,\n          214031100,\n          216659000,\n          219176000,\n          221503000,\n          223759000,\n          226431000,\n          229361135,\n          231943831,\n          234332208,\n          236681487,\n          239235000,\n          241606200,\n          244088400,\n          246674600,\n          249385800,\n          251872670,\n          254421050,\n          256921449,\n          259303930,\n          261583423,\n          263922898,\n          266394382,\n          268896849,\n          271452347,\n          274256841,\n          277473326,\n          281211703,\n          285092192,\n          288811320,\n          292297226,\n          295691746,\n          299126029,\n          302704697,\n          306162843,\n          309600485,\n          312993944,\n          316113359,\n          319050105,\n          321847258,\n          324864038,\n          327892753,\n          331014940,\n          334184023,\n          337405012,\n          340465736,\n          343408819,\n          346051624,\n          348808615,\n          351451876,\n          354223012,\n          356937591,\n          359735880,\n          362492702\n         ]\n        }\n       ],\n       \"layout\": {\n        \"title\": \"World population\"\n       }\n      },\n      \"text/html\": [\n       \"<div id=\\\"99673055-68bf-4267-96e1-20bc65a6ee8d\\\" style=\\\"height: 525px; width: 100%;\\\" class=\\\"plotly-graph-div\\\"></div><script type=\\\"text/javascript\\\">require([\\\"plotly\\\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\\\"https://plot.ly\\\";Plotly.newPlot(\\\"99673055-68bf-4267-96e1-20bc65a6ee8d\\\", [{\\\"name\\\": \\\"East Asia & Pacific\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [1039944591.0, 1043546747.0, 1058028199.0, 1083802299.0, 1109204182.0, 1135650895.0, 1165517894.0, 1194424326.0, 1223721283.0, 1256501008.0, 1289258962.0, 1322942750.0, 1354794332.0, 1385052014.0, 1415128313.0, 1442241325.0, 1466464716.0, 1489361661.0, 1512159741.0, 1535391301.0, 1558178982.0, 1581806986.0, 1607731269.0, 1633628203.0, 1658253758.0, 1683448851.0, 1710171170.0, 1738276268.0, 1766656203.0, 1794408755.0, 1821481246.0, 1847530233.0, 1871898268.0, 1895356643.0, 1918771287.0, 1941918800.0, 1964635058.0, 1986799861.0, 2008140141.0, 2028095314.0, 2047150745.0, 2065521836.0, 2082953527.0, 2099545576.0, 2115557365.0, 2131363078.0, 2147029631.0, 2162104019.0, 2177421759.0, 2192352319.0, 2207154641.0, 2221934584.0, 2237082761.0, 2252311022.0, 2267745366.0, 2283108073.0, 2298726779.0, 2314364990.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"e5b08b9e-fcb8-4246-87db-4cb5b960bdf4\\\"}, {\\\"name\\\": \\\"South Asia\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [571835666.0, 583894094.0, 596413939.0, 609391805.0, 622822615.0, 636701820.0, 651036352.0, 665826653.0, 681054882.0, 696697198.0, 712740919.0, 729173562.0, 746012374.0, 763310561.0, 781140577.0, 799553306.0, 818560436.0, 838142287.0, 858277856.0, 878933031.0, 900076467.0, 921696915.0, 943781613.0, 966293643.0, 989188965.0, 1012429641.0, 1035982524.0, 1059829211.0, 1083963380.0, 1108386444.0, 1133089464.0, 1158058109.0, 1183253534.0, 1208612942.0, 1234059205.0, 1259530819.0, 1284978193.0, 1310387887.0, 1335777637.0, 1361185289.0, 1386625845.0, 1412104373.0, 1437568227.0, 1462906674.0, 1487975237.0, 1512670560.0, 1536943534.0, 1560818860.0, 1584359049.0, 1607663899.0, 1630806784.0, 1653798614.0, 1676615491.0, 1699310450.0, 1721847786.0, 1744199944.0, 1766393714.0, 1788388852.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"5ccdb42f-dbf4-4abc-a1de-851c1114c31b\\\"}, {\\\"name\\\": \\\"Sub-Saharan Africa\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [228586005.0, 234008580.0, 239647139.0, 245503266.0, 251576403.0, 257868609.0, 264386171.0, 271139271.0, 278138996.0, 285397999.0, 292929074.0, 300737023.0, 308831549.0, 317234127.0, 325972033.0, 335064879.0, 344522341.0, 354343159.0, 364515830.0, 375034981.0, 385885281.0, 397065556.0, 408577033.0, 420413518.0, 432573431.0, 445048059.0, 457835414.0, 470938971.0, 484357710.0, 498102752.0, 512177101.0, 526599014.0, 541365685.0, 556451898.0, 571828603.0, 587469624.0, 603385639.0, 619607956.0, 636182577.0, 653179863.0, 670649638.0, 688615995.0, 707099850.0, 726140617.0, 745788118.0, 766080507.0, 787035792.0, 808660166.0, 830965556.0, 853953657.0, 877628367.0, 901989926.0, 927039875.0, 952734072.0, 979017918.0, 1005850049.0, 1033212743.0, 1061107721.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"d81b1f54-9dcc-475b-9517-2127417ea48f\\\"}, {\\\"name\\\": \\\"Europe & Central Asia\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [667246384.0, 674972972.0, 682938669.0, 690962675.0, 698905664.0, 706609007.0, 713341112.0, 719879789.0, 726161895.0, 732317863.0, 737948178.0, 743607439.0, 749815857.0, 755867961.0, 761701324.0, 767332578.0, 772838318.0, 778094845.0, 783298994.0, 788525199.0, 793937090.0, 799215272.0, 803972967.0, 808524728.0, 813281381.0, 818146882.0, 823155058.0, 828213790.0, 833315236.0, 838462813.0, 842848473.0, 846178276.0, 849656745.0, 852762016.0, 854723055.0, 856352860.0, 857652705.0, 859112733.0, 860236341.0, 861380108.0, 862304086.0, 863615632.0, 865196877.0, 867457664.0, 870030756.0, 872661616.0, 875343235.0, 878465990.0, 881965815.0, 885591814.0, 889016507.0, 891098854.0, 894679968.0, 898881448.0, 903123160.0, 907426233.0, 911686319.0, 915545801.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"41d2b519-5c2e-4f44-a2bf-af5275db6ae1\\\"}, {\\\"name\\\": \\\"Latin America & Caribbean\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [220434662.0, 226564469.0, 232897323.0, 239401268.0, 246016368.0, 252710310.0, 259468669.0, 266295880.0, 273209036.0, 280225795.0, 287361389.0, 294620137.0, 301984430.0, 309446959.0, 316987646.0, 324590837.0, 332247800.0, 339956419.0, 347735305.0, 355593111.0, 363543431.0, 371580994.0, 379697683.0, 387868173.0, 396059351.0, 404246768.0, 412413602.0, 420560827.0, 428701267.0, 436857131.0, 445044474.0, 453251622.0, 461466819.0, 469673465.0, 477832467.0, 485913138.0, 493920488.0, 501837820.0, 509664957.0, 517324344.0, 524829251.0, 532172709.0, 539372044.0, 546478662.0, 553563090.0, 560673962.0, 567821716.0, 574994397.0, 582179826.0, 589349327.0, 596478519.0, 603537118.0, 610547919.0, 617495658.0, 624335544.0, 631062657.0, 637663890.0, 644137666.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"dd6bc133-ee5c-4ca8-8457-ddf476dc6ab2\\\"}, {\\\"name\\\": \\\"Middle East & North Africa\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [105488678.0, 108374227.0, 111385940.0, 114471415.0, 117671617.0, 120973578.0, 124374455.0, 127947266.0, 131566224.0, 135279930.0, 139083819.0, 142950993.0, 146887303.0, 150999871.0, 155259901.0, 159722643.0, 164407528.0, 169318424.0, 174493349.0, 180000521.0, 185843847.0, 192015875.0, 198499602.0, 205229901.0, 212102793.0, 219095273.0, 226161475.0, 233285188.0, 240367135.0, 247283550.0, 255989130.0, 262659662.0, 267020622.0, 273204804.0, 279279333.0, 286917385.0, 292934005.0, 298982946.0, 305001541.0, 311053183.0, 317129227.0, 323196354.0, 329289435.0, 335522845.0, 342046777.0, 348956287.0, 356287693.0, 363996317.0, 371999662.0, 380192587.0, 388376106.0, 396573248.0, 404783020.0, 412953000.0, 421030035.0, 428974903.0, 436738031.0, 444322417.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"ed1e8fae-72d2-495c-b82c-946c6c4a74bd\\\"}, {\\\"name\\\": \\\"North America\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [198624409.0, 202007500.0, 205198600.0, 208253700.0, 211262900.0, 214031100.0, 216659000.0, 219176000.0, 221503000.0, 223759000.0, 226431000.0, 229361135.0, 231943831.0, 234332208.0, 236681487.0, 239235000.0, 241606200.0, 244088400.0, 246674600.0, 249385800.0, 251872670.0, 254421050.0, 256921449.0, 259303930.0, 261583423.0, 263922898.0, 266394382.0, 268896849.0, 271452347.0, 274256841.0, 277473326.0, 281211703.0, 285092192.0, 288811320.0, 292297226.0, 295691746.0, 299126029.0, 302704697.0, 306162843.0, 309600485.0, 312993944.0, 316113359.0, 319050105.0, 321847258.0, 324864038.0, 327892753.0, 331014940.0, 334184023.0, 337405012.0, 340465736.0, 343408819.0, 346051624.0, 348808615.0, 351451876.0, 354223012.0, 356937591.0, 359735880.0, 362492702.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"1664abd5-63da-48bf-a458-41469dab41cb\\\"}], {\\\"title\\\": \\\"World population\\\"}, {\\\"showLink\\\": true, \\\"linkText\\\": \\\"Export to plot.ly\\\"})});</script><script type=\\\"text/javascript\\\">window.addEventListener(\\\"resize\\\", function(){Plotly.Plots.resize(document.getElementById(\\\"99673055-68bf-4267-96e1-20bc65a6ee8d\\\"));});</script>\"\n      ],\n      \"text/vnd.plotly.v1+html\": [\n       \"<div id=\\\"99673055-68bf-4267-96e1-20bc65a6ee8d\\\" style=\\\"height: 525px; width: 100%;\\\" class=\\\"plotly-graph-div\\\"></div><script type=\\\"text/javascript\\\">require([\\\"plotly\\\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\\\"https://plot.ly\\\";Plotly.newPlot(\\\"99673055-68bf-4267-96e1-20bc65a6ee8d\\\", [{\\\"name\\\": \\\"East Asia & Pacific\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [1039944591.0, 1043546747.0, 1058028199.0, 1083802299.0, 1109204182.0, 1135650895.0, 1165517894.0, 1194424326.0, 1223721283.0, 1256501008.0, 1289258962.0, 1322942750.0, 1354794332.0, 1385052014.0, 1415128313.0, 1442241325.0, 1466464716.0, 1489361661.0, 1512159741.0, 1535391301.0, 1558178982.0, 1581806986.0, 1607731269.0, 1633628203.0, 1658253758.0, 1683448851.0, 1710171170.0, 1738276268.0, 1766656203.0, 1794408755.0, 1821481246.0, 1847530233.0, 1871898268.0, 1895356643.0, 1918771287.0, 1941918800.0, 1964635058.0, 1986799861.0, 2008140141.0, 2028095314.0, 2047150745.0, 2065521836.0, 2082953527.0, 2099545576.0, 2115557365.0, 2131363078.0, 2147029631.0, 2162104019.0, 2177421759.0, 2192352319.0, 2207154641.0, 2221934584.0, 2237082761.0, 2252311022.0, 2267745366.0, 2283108073.0, 2298726779.0, 2314364990.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"e5b08b9e-fcb8-4246-87db-4cb5b960bdf4\\\"}, {\\\"name\\\": \\\"South Asia\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [571835666.0, 583894094.0, 596413939.0, 609391805.0, 622822615.0, 636701820.0, 651036352.0, 665826653.0, 681054882.0, 696697198.0, 712740919.0, 729173562.0, 746012374.0, 763310561.0, 781140577.0, 799553306.0, 818560436.0, 838142287.0, 858277856.0, 878933031.0, 900076467.0, 921696915.0, 943781613.0, 966293643.0, 989188965.0, 1012429641.0, 1035982524.0, 1059829211.0, 1083963380.0, 1108386444.0, 1133089464.0, 1158058109.0, 1183253534.0, 1208612942.0, 1234059205.0, 1259530819.0, 1284978193.0, 1310387887.0, 1335777637.0, 1361185289.0, 1386625845.0, 1412104373.0, 1437568227.0, 1462906674.0, 1487975237.0, 1512670560.0, 1536943534.0, 1560818860.0, 1584359049.0, 1607663899.0, 1630806784.0, 1653798614.0, 1676615491.0, 1699310450.0, 1721847786.0, 1744199944.0, 1766393714.0, 1788388852.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"5ccdb42f-dbf4-4abc-a1de-851c1114c31b\\\"}, {\\\"name\\\": \\\"Sub-Saharan Africa\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [228586005.0, 234008580.0, 239647139.0, 245503266.0, 251576403.0, 257868609.0, 264386171.0, 271139271.0, 278138996.0, 285397999.0, 292929074.0, 300737023.0, 308831549.0, 317234127.0, 325972033.0, 335064879.0, 344522341.0, 354343159.0, 364515830.0, 375034981.0, 385885281.0, 397065556.0, 408577033.0, 420413518.0, 432573431.0, 445048059.0, 457835414.0, 470938971.0, 484357710.0, 498102752.0, 512177101.0, 526599014.0, 541365685.0, 556451898.0, 571828603.0, 587469624.0, 603385639.0, 619607956.0, 636182577.0, 653179863.0, 670649638.0, 688615995.0, 707099850.0, 726140617.0, 745788118.0, 766080507.0, 787035792.0, 808660166.0, 830965556.0, 853953657.0, 877628367.0, 901989926.0, 927039875.0, 952734072.0, 979017918.0, 1005850049.0, 1033212743.0, 1061107721.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"d81b1f54-9dcc-475b-9517-2127417ea48f\\\"}, {\\\"name\\\": \\\"Europe & Central Asia\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [667246384.0, 674972972.0, 682938669.0, 690962675.0, 698905664.0, 706609007.0, 713341112.0, 719879789.0, 726161895.0, 732317863.0, 737948178.0, 743607439.0, 749815857.0, 755867961.0, 761701324.0, 767332578.0, 772838318.0, 778094845.0, 783298994.0, 788525199.0, 793937090.0, 799215272.0, 803972967.0, 808524728.0, 813281381.0, 818146882.0, 823155058.0, 828213790.0, 833315236.0, 838462813.0, 842848473.0, 846178276.0, 849656745.0, 852762016.0, 854723055.0, 856352860.0, 857652705.0, 859112733.0, 860236341.0, 861380108.0, 862304086.0, 863615632.0, 865196877.0, 867457664.0, 870030756.0, 872661616.0, 875343235.0, 878465990.0, 881965815.0, 885591814.0, 889016507.0, 891098854.0, 894679968.0, 898881448.0, 903123160.0, 907426233.0, 911686319.0, 915545801.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"41d2b519-5c2e-4f44-a2bf-af5275db6ae1\\\"}, {\\\"name\\\": \\\"Latin America & Caribbean\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [220434662.0, 226564469.0, 232897323.0, 239401268.0, 246016368.0, 252710310.0, 259468669.0, 266295880.0, 273209036.0, 280225795.0, 287361389.0, 294620137.0, 301984430.0, 309446959.0, 316987646.0, 324590837.0, 332247800.0, 339956419.0, 347735305.0, 355593111.0, 363543431.0, 371580994.0, 379697683.0, 387868173.0, 396059351.0, 404246768.0, 412413602.0, 420560827.0, 428701267.0, 436857131.0, 445044474.0, 453251622.0, 461466819.0, 469673465.0, 477832467.0, 485913138.0, 493920488.0, 501837820.0, 509664957.0, 517324344.0, 524829251.0, 532172709.0, 539372044.0, 546478662.0, 553563090.0, 560673962.0, 567821716.0, 574994397.0, 582179826.0, 589349327.0, 596478519.0, 603537118.0, 610547919.0, 617495658.0, 624335544.0, 631062657.0, 637663890.0, 644137666.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"dd6bc133-ee5c-4ca8-8457-ddf476dc6ab2\\\"}, {\\\"name\\\": \\\"Middle East & North Africa\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [105488678.0, 108374227.0, 111385940.0, 114471415.0, 117671617.0, 120973578.0, 124374455.0, 127947266.0, 131566224.0, 135279930.0, 139083819.0, 142950993.0, 146887303.0, 150999871.0, 155259901.0, 159722643.0, 164407528.0, 169318424.0, 174493349.0, 180000521.0, 185843847.0, 192015875.0, 198499602.0, 205229901.0, 212102793.0, 219095273.0, 226161475.0, 233285188.0, 240367135.0, 247283550.0, 255989130.0, 262659662.0, 267020622.0, 273204804.0, 279279333.0, 286917385.0, 292934005.0, 298982946.0, 305001541.0, 311053183.0, 317129227.0, 323196354.0, 329289435.0, 335522845.0, 342046777.0, 348956287.0, 356287693.0, 363996317.0, 371999662.0, 380192587.0, 388376106.0, 396573248.0, 404783020.0, 412953000.0, 421030035.0, 428974903.0, 436738031.0, 444322417.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"ed1e8fae-72d2-495c-b82c-946c6c4a74bd\\\"}, {\\\"name\\\": \\\"North America\\\", \\\"stackgroup\\\": \\\"World\\\", \\\"x\\\": [\\\"1960-01-01\\\", \\\"1961-01-01\\\", \\\"1962-01-01\\\", \\\"1963-01-01\\\", \\\"1964-01-01\\\", \\\"1965-01-01\\\", \\\"1966-01-01\\\", \\\"1967-01-01\\\", \\\"1968-01-01\\\", \\\"1969-01-01\\\", \\\"1970-01-01\\\", \\\"1971-01-01\\\", \\\"1972-01-01\\\", \\\"1973-01-01\\\", \\\"1974-01-01\\\", \\\"1975-01-01\\\", \\\"1976-01-01\\\", \\\"1977-01-01\\\", \\\"1978-01-01\\\", \\\"1979-01-01\\\", \\\"1980-01-01\\\", \\\"1981-01-01\\\", \\\"1982-01-01\\\", \\\"1983-01-01\\\", \\\"1984-01-01\\\", \\\"1985-01-01\\\", \\\"1986-01-01\\\", \\\"1987-01-01\\\", \\\"1988-01-01\\\", \\\"1989-01-01\\\", \\\"1990-01-01\\\", \\\"1991-01-01\\\", \\\"1992-01-01\\\", \\\"1993-01-01\\\", \\\"1994-01-01\\\", \\\"1995-01-01\\\", \\\"1996-01-01\\\", \\\"1997-01-01\\\", \\\"1998-01-01\\\", \\\"1999-01-01\\\", \\\"2000-01-01\\\", \\\"2001-01-01\\\", \\\"2002-01-01\\\", \\\"2003-01-01\\\", \\\"2004-01-01\\\", \\\"2005-01-01\\\", \\\"2006-01-01\\\", \\\"2007-01-01\\\", \\\"2008-01-01\\\", \\\"2009-01-01\\\", \\\"2010-01-01\\\", \\\"2011-01-01\\\", \\\"2012-01-01\\\", \\\"2013-01-01\\\", \\\"2014-01-01\\\", \\\"2015-01-01\\\", \\\"2016-01-01\\\", \\\"2017-01-01\\\"], \\\"y\\\": [198624409.0, 202007500.0, 205198600.0, 208253700.0, 211262900.0, 214031100.0, 216659000.0, 219176000.0, 221503000.0, 223759000.0, 226431000.0, 229361135.0, 231943831.0, 234332208.0, 236681487.0, 239235000.0, 241606200.0, 244088400.0, 246674600.0, 249385800.0, 251872670.0, 254421050.0, 256921449.0, 259303930.0, 261583423.0, 263922898.0, 266394382.0, 268896849.0, 271452347.0, 274256841.0, 277473326.0, 281211703.0, 285092192.0, 288811320.0, 292297226.0, 295691746.0, 299126029.0, 302704697.0, 306162843.0, 309600485.0, 312993944.0, 316113359.0, 319050105.0, 321847258.0, 324864038.0, 327892753.0, 331014940.0, 334184023.0, 337405012.0, 340465736.0, 343408819.0, 346051624.0, 348808615.0, 351451876.0, 354223012.0, 356937591.0, 359735880.0, 362492702.0], \\\"type\\\": \\\"scatter\\\", \\\"uid\\\": \\\"1664abd5-63da-48bf-a458-41469dab41cb\\\"}], {\\\"title\\\": \\\"World population\\\"}, {\\\"showLink\\\": true, \\\"linkText\\\": \\\"Export to plot.ly\\\"})});</script><script type=\\\"text/javascript\\\">window.addEventListener(\\\"resize\\\", function(){Plotly.Plots.resize(document.getElementById(\\\"99673055-68bf-4267-96e1-20bc65a6ee8d\\\"));});</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"data = [go.Scatter(x=population.index, y=population[zone], name=zone, stackgroup='World')\\n\",\n    \"        for zone in zones]\\n\",\n    \"fig = go.Figure(data=data,\\n\",\n    \"                layout=go.Layout(title='World population'))\\n\",\n    \"offline.iplot(fig)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_markers\": \"region,endregion\",\n   \"formats\": \"ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc\"\n  },\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.7.3\"\n  },\n  \"toc\": {\n   \"base_numbering\": 1,\n   \"nav_menu\": {},\n   \"number_sections\": true,\n   \"sideBar\": true,\n   \"skip_h1_title\": false,\n   \"title_cell\": \"Table of Contents\",\n   \"title_sidebar\": \"Contents\",\n   \"toc_cell\": false,\n   \"toc_position\": {},\n   \"toc_section_display\": true,\n   \"toc_window_display\": false\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "demo/World population.lgt.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#     formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc\n#     text_representation:\n#       extension: .py\n#       format_name: light\n#       format_version: '1.4'\n#       jupytext_version: 1.1.0\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# # A quick insight at world population\n#\n# ## Collecting population data\n#\n# In the below we retrieve population data from the\n# [World Bank](http://www.worldbank.org/)\n# using the [wbdata](https://github.com/OliverSherouse/wbdata) python package\n\n# region\nimport pandas as pd\nimport wbdata as wb\n\npd.options.display.max_rows = 6\npd.options.display.max_columns = 20\n# endregion\n\n# Corresponding indicator is found using search method - or, directly,\n# the World Bank site.\n\nwb.search_indicators('Population, total')  # SP.POP.TOTL\n# wb.search_indicators('area')\n# => https://data.worldbank.org/indicator is easier to use\n\n# Now we download the population data\n\nindicators = {'SP.POP.TOTL': 'Population, total',\n              'AG.SRF.TOTL.K2': 'Surface area (sq. km)',\n              'AG.LND.TOTL.K2': 'Land area (sq. km)',\n              'AG.LND.ARBL.ZS': 'Arable land (% of land area)'}\ndata = wb.get_dataframe(indicators, convert_date=True).sort_index()\ndata\n\n# World is one of the countries\n\ndata.loc['World']\n\n# Can we classify over continents?\n\ndata.loc[(slice(None), '2017-01-01'), :]['Population, total'].dropna(\n).sort_values().tail(60).index.get_level_values('country')\n\n# Extract zones manually (in order of increasing population)\n\nzones = ['North America', 'Middle East & North Africa',\n         'Latin America & Caribbean', 'Europe & Central Asia',\n         'Sub-Saharan Africa', 'South Asia',\n         'East Asia & Pacific'][::-1]\n\n# And extract population information (and check total is right)\n\npopulation = data.loc[zones]['Population, total'].swaplevel().unstack()\npopulation = population[zones]\nassert all(data.loc['World']['Population, total'] == population.sum(axis=1))\n\n# ## Stacked area plot with matplotlib\n\nimport matplotlib.pyplot as plt\n\nplt.clf()\nplt.figure(figsize=(10, 5), dpi=100)\nplt.stackplot(population.index, population.values.T / 1e9)\nplt.legend(population.columns, loc='upper left')\nplt.ylabel('Population count (B)')\nplt.show()\n\n# ## Stacked bar plot with plotly\n\n# region\nimport plotly.offline as offline\nimport plotly.graph_objs as go\n\noffline.init_notebook_mode()\n# endregion\n\ndata = [go.Scatter(x=population.index, y=population[zone], name=zone, stackgroup='World')\n        for zone in zones]\nfig = go.Figure(data=data,\n                layout=go.Layout(title='World population'))\noffline.iplot(fig)\n"
  },
  {
    "path": "demo/World population.md",
    "content": "---\njupyter:\n  jupytext:\n    cell_markers: region,endregion\n    formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc\n    text_representation:\n      extension: .md\n      format_name: markdown\n      format_version: '1.1'\n      jupytext_version: 1.1.0\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n# A quick insight at world population\n\n## Collecting population data\n\nIn the below we retrieve population data from the\n[World Bank](http://www.worldbank.org/)\nusing the [wbdata](https://github.com/OliverSherouse/wbdata) python package\n\n```python\nimport pandas as pd\nimport wbdata as wb\n\npd.options.display.max_rows = 6\npd.options.display.max_columns = 20\n```\n\nCorresponding indicator is found using search method - or, directly,\nthe World Bank site.\n\n```python\nwb.search_indicators('Population, total')  # SP.POP.TOTL\n# wb.search_indicators('area')\n# => https://data.worldbank.org/indicator is easier to use\n```\n\nNow we download the population data\n\n```python\nindicators = {'SP.POP.TOTL': 'Population, total',\n              'AG.SRF.TOTL.K2': 'Surface area (sq. km)',\n              'AG.LND.TOTL.K2': 'Land area (sq. km)',\n              'AG.LND.ARBL.ZS': 'Arable land (% of land area)'}\ndata = wb.get_dataframe(indicators, convert_date=True).sort_index()\ndata\n```\n\nWorld is one of the countries\n\n```python\ndata.loc['World']\n```\n\nCan we classify over continents?\n\n```python\ndata.loc[(slice(None), '2017-01-01'), :]['Population, total'].dropna(\n).sort_values().tail(60).index.get_level_values('country')\n```\n\nExtract zones manually (in order of increasing population)\n\n```python\nzones = ['North America', 'Middle East & North Africa',\n         'Latin America & Caribbean', 'Europe & Central Asia',\n         'Sub-Saharan Africa', 'South Asia',\n         'East Asia & Pacific'][::-1]\n```\n\nAnd extract population information (and check total is right)\n\n```python\npopulation = data.loc[zones]['Population, total'].swaplevel().unstack()\npopulation = population[zones]\nassert all(data.loc['World']['Population, total'] == population.sum(axis=1))\n```\n\n## Stacked area plot with matplotlib\n\n```python\nimport matplotlib.pyplot as plt\n```\n\n```python\nplt.clf()\nplt.figure(figsize=(10, 5), dpi=100)\nplt.stackplot(population.index, population.values.T / 1e9)\nplt.legend(population.columns, loc='upper left')\nplt.ylabel('Population count (B)')\nplt.show()\n```\n\n## Stacked bar plot with plotly\n\n```python\nimport plotly.offline as offline\nimport plotly.graph_objs as go\n\noffline.init_notebook_mode()\n```\n\n```python\ndata = [go.Scatter(x=population.index, y=population[zone], name=zone, stackgroup='World')\n        for zone in zones]\nfig = go.Figure(data=data,\n                layout=go.Layout(title='World population'))\noffline.iplot(fig)\n```\n"
  },
  {
    "path": "demo/World population.myst.md",
    "content": "---\njupytext:\n  formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst\n  text_representation:\n    extension: '.md'\n    format_name: myst\n    format_version: '0.7'\n    jupytext_version: 1.4.0+dev\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n# A quick insight at world population\n\n## Collecting population data\n\nIn the below we retrieve population data from the\n[World Bank](http://www.worldbank.org/)\nusing the [wbdata](https://github.com/OliverSherouse/wbdata) python package\n\n```{code-cell} ipython3\nimport pandas as pd\nimport wbdata as wb\n\npd.options.display.max_rows = 6\npd.options.display.max_columns = 20\n```\n\nCorresponding indicator is found using search method - or, directly,\nthe World Bank site.\n\n```{code-cell} ipython3\nwb.search_indicators('Population, total')  # SP.POP.TOTL\n# wb.search_indicators('area')\n# => https://data.worldbank.org/indicator is easier to use\n```\n\nNow we download the population data\n\n```{code-cell} ipython3\nindicators = {'SP.POP.TOTL': 'Population, total',\n              'AG.SRF.TOTL.K2': 'Surface area (sq. km)',\n              'AG.LND.TOTL.K2': 'Land area (sq. km)',\n              'AG.LND.ARBL.ZS': 'Arable land (% of land area)'}\ndata = wb.get_dataframe(indicators, convert_date=True).sort_index()\ndata\n```\n\nWorld is one of the countries\n\n```{code-cell} ipython3\ndata.loc['World']\n```\n\nCan we classify over continents?\n\n```{code-cell} ipython3\ndata.loc[(slice(None), '2017-01-01'), :]['Population, total'].dropna(\n).sort_values().tail(60).index.get_level_values('country')\n```\n\nExtract zones manually (in order of increasing population)\n\n```{code-cell} ipython3\nzones = ['North America', 'Middle East & North Africa',\n         'Latin America & Caribbean', 'Europe & Central Asia',\n         'Sub-Saharan Africa', 'South Asia',\n         'East Asia & Pacific'][::-1]\n```\n\nAnd extract population information (and check total is right)\n\n```{code-cell} ipython3\npopulation = data.loc[zones]['Population, total'].swaplevel().unstack()\npopulation = population[zones]\nassert all(data.loc['World']['Population, total'] == population.sum(axis=1))\n```\n\n## Stacked area plot with matplotlib\n\n```{code-cell} ipython3\nimport matplotlib.pyplot as plt\n```\n\n```{code-cell} ipython3\nplt.clf()\nplt.figure(figsize=(10, 5), dpi=100)\nplt.stackplot(population.index, population.values.T / 1e9)\nplt.legend(population.columns, loc='upper left')\nplt.ylabel('Population count (B)')\nplt.show()\n```\n\n## Stacked bar plot with plotly\n\n+++\n\nStacked area plots (with cumulated values computed depending on\nselected legends) are\n[on their way](https://github.com/plotly/plotly.js/pull/2960) at Plotly. For\nnow we just do a stacked bar plot.\n\n```{code-cell} ipython3\nimport plotly.offline as offline\nimport plotly.graph_objs as go\n\noffline.init_notebook_mode()\n```\n\n```{code-cell} ipython3\nbars = [go.Bar(x=population.index, y=population[zone], name=zone)\n        for zone in zones]\nfig = go.Figure(data=bars,\n                layout=go.Layout(title='World population',\n                                 barmode='stack'))\noffline.iplot(fig)\n```\n"
  },
  {
    "path": "demo/World population.pandoc.md",
    "content": "---\njupyter:\n  jupytext:\n    cell_markers: 'region,endregion'\n    formats: 'ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc'\n    text_representation:\n      extension: '.md'\n      format_name: pandoc\n      format_version: '2.7.2'\n      jupytext_version: '1.1.0'\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .markdown}\n# A quick insight at world population\n\n## Collecting population data\n\nIn the below we retrieve population data from the\n[World Bank](http://www.worldbank.org/)\nusing the [wbdata](https://github.com/OliverSherouse/wbdata) python package\n:::\n\n::: {.cell .code}\n``` {.python}\nimport pandas as pd\nimport wbdata as wb\n\npd.options.display.max_rows = 6\npd.options.display.max_columns = 20\n```\n:::\n\n::: {.cell .markdown}\nCorresponding indicator is found using search method - or, directly,\nthe World Bank site.\n:::\n\n::: {.cell .code}\n``` {.python}\nwb.search_indicators('Population, total')  # SP.POP.TOTL\n# wb.search_indicators('area')\n# => https://data.worldbank.org/indicator is easier to use\n```\n:::\n\n::: {.cell .markdown}\nNow we download the population data\n:::\n\n::: {.cell .code}\n``` {.python}\nindicators = {'SP.POP.TOTL': 'Population, total',\n              'AG.SRF.TOTL.K2': 'Surface area (sq. km)',\n              'AG.LND.TOTL.K2': 'Land area (sq. km)',\n              'AG.LND.ARBL.ZS': 'Arable land (% of land area)'}\ndata = wb.get_dataframe(indicators, convert_date=True).sort_index()\ndata\n```\n:::\n\n::: {.cell .markdown}\nWorld is one of the countries\n:::\n\n::: {.cell .code}\n``` {.python}\ndata.loc['World']\n```\n:::\n\n::: {.cell .markdown}\nCan we classify over continents?\n:::\n\n::: {.cell .code}\n``` {.python}\ndata.loc[(slice(None), '2017-01-01'), :]['Population, total'].dropna(\n).sort_values().tail(60).index.get_level_values('country')\n```\n:::\n\n::: {.cell .markdown}\nExtract zones manually (in order of increasing population)\n:::\n\n::: {.cell .code}\n``` {.python}\nzones = ['North America', 'Middle East & North Africa',\n         'Latin America & Caribbean', 'Europe & Central Asia',\n         'Sub-Saharan Africa', 'South Asia',\n         'East Asia & Pacific'][::-1]\n```\n:::\n\n::: {.cell .markdown}\nAnd extract population information (and check total is right)\n:::\n\n::: {.cell .code}\n``` {.python}\npopulation = data.loc[zones]['Population, total'].swaplevel().unstack()\npopulation = population[zones]\nassert all(data.loc['World']['Population, total'] == population.sum(axis=1))\n```\n:::\n\n::: {.cell .markdown}\n## Stacked area plot with matplotlib\n:::\n\n::: {.cell .code}\n``` {.python}\nimport matplotlib.pyplot as plt\n```\n:::\n\n::: {.cell .code}\n``` {.python}\nplt.clf()\nplt.figure(figsize=(10, 5), dpi=100)\nplt.stackplot(population.index, population.values.T / 1e9)\nplt.legend(population.columns, loc='upper left')\nplt.ylabel('Population count (B)')\nplt.show()\n```\n:::\n\n::: {.cell .markdown}\n## Stacked bar plot with plotly\n:::\n\n::: {.cell .code}\n``` {.python}\nimport plotly.offline as offline\nimport plotly.graph_objs as go\n\noffline.init_notebook_mode()\n```\n:::\n\n::: {.cell .code}\n``` {.python}\ndata = [go.Scatter(x=population.index, y=population[zone], name=zone, stackgroup='World')\n        for zone in zones]\nfig = go.Figure(data=data,\n                layout=go.Layout(title='World population'))\noffline.iplot(fig)\n```\n:::\n"
  },
  {
    "path": "demo/World population.pct.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#     formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc\n#     text_representation:\n#       extension: .py\n#       format_name: percent\n#       format_version: '1.2'\n#       jupytext_version: 1.1.0\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# # A quick insight at world population\n#\n# ## Collecting population data\n#\n# In the below we retrieve population data from the\n# [World Bank](http://www.worldbank.org/)\n# using the [wbdata](https://github.com/OliverSherouse/wbdata) python package\n\n# %%\nimport pandas as pd\nimport wbdata as wb\n\npd.options.display.max_rows = 6\npd.options.display.max_columns = 20\n\n# %% [markdown]\n# Corresponding indicator is found using search method - or, directly,\n# the World Bank site.\n\n# %%\nwb.search_indicators('Population, total')  # SP.POP.TOTL\n# wb.search_indicators('area')\n# => https://data.worldbank.org/indicator is easier to use\n\n# %% [markdown]\n# Now we download the population data\n\n# %%\nindicators = {'SP.POP.TOTL': 'Population, total',\n              'AG.SRF.TOTL.K2': 'Surface area (sq. km)',\n              'AG.LND.TOTL.K2': 'Land area (sq. km)',\n              'AG.LND.ARBL.ZS': 'Arable land (% of land area)'}\ndata = wb.get_dataframe(indicators, convert_date=True).sort_index()\ndata\n\n# %% [markdown]\n# World is one of the countries\n\n# %%\ndata.loc['World']\n\n# %% [markdown]\n# Can we classify over continents?\n\n# %%\ndata.loc[(slice(None), '2017-01-01'), :]['Population, total'].dropna(\n).sort_values().tail(60).index.get_level_values('country')\n\n# %% [markdown]\n# Extract zones manually (in order of increasing population)\n\n# %%\nzones = ['North America', 'Middle East & North Africa',\n         'Latin America & Caribbean', 'Europe & Central Asia',\n         'Sub-Saharan Africa', 'South Asia',\n         'East Asia & Pacific'][::-1]\n\n# %% [markdown]\n# And extract population information (and check total is right)\n\n# %%\npopulation = data.loc[zones]['Population, total'].swaplevel().unstack()\npopulation = population[zones]\nassert all(data.loc['World']['Population, total'] == population.sum(axis=1))\n\n# %% [markdown]\n# ## Stacked area plot with matplotlib\n\n# %%\nimport matplotlib.pyplot as plt\n\n# %%\nplt.clf()\nplt.figure(figsize=(10, 5), dpi=100)\nplt.stackplot(population.index, population.values.T / 1e9)\nplt.legend(population.columns, loc='upper left')\nplt.ylabel('Population count (B)')\nplt.show()\n\n# %% [markdown]\n# ## Stacked bar plot with plotly\n\n# %%\nimport plotly.offline as offline\nimport plotly.graph_objs as go\n\noffline.init_notebook_mode()\n\n# %%\ndata = [go.Scatter(x=population.index, y=population[zone], name=zone, stackgroup='World')\n        for zone in zones]\nfig = go.Figure(data=data,\n                layout=go.Layout(title='World population'))\noffline.iplot(fig)\n"
  },
  {
    "path": "demo/World population.spx.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#     formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc\n#     text_representation:\n#       extension: .py\n#       format_name: sphinx\n#       format_version: '1.1'\n#       jupytext_version: 1.1.0\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\"\"\"\n# A quick insight at world population\n\n## Collecting population data\n\nIn the below we retrieve population data from the\n[World Bank](http://www.worldbank.org/)\nusing the [wbdata](https://github.com/OliverSherouse/wbdata) python package\n\"\"\"\n\nimport pandas as pd\nimport wbdata as wb\n\npd.options.display.max_rows = 6\npd.options.display.max_columns = 20\n\n###############################################################################\n# Corresponding indicator is found using search method - or, directly,\n# the World Bank site.\n\nwb.search_indicators('Population, total')  # SP.POP.TOTL\n# wb.search_indicators('area')\n# => https://data.worldbank.org/indicator is easier to use\n\n###############################################################################\n# Now we download the population data\n\nindicators = {'SP.POP.TOTL': 'Population, total',\n              'AG.SRF.TOTL.K2': 'Surface area (sq. km)',\n              'AG.LND.TOTL.K2': 'Land area (sq. km)',\n              'AG.LND.ARBL.ZS': 'Arable land (% of land area)'}\ndata = wb.get_dataframe(indicators, convert_date=True).sort_index()\ndata\n\n###############################################################################\n# World is one of the countries\n\ndata.loc['World']\n\n###############################################################################\n# Can we classify over continents?\n\ndata.loc[(slice(None), '2017-01-01'), :]['Population, total'].dropna(\n).sort_values().tail(60).index.get_level_values('country')\n\n###############################################################################\n# Extract zones manually (in order of increasing population)\n\nzones = ['North America', 'Middle East & North Africa',\n         'Latin America & Caribbean', 'Europe & Central Asia',\n         'Sub-Saharan Africa', 'South Asia',\n         'East Asia & Pacific'][::-1]\n\n###############################################################################\n# And extract population information (and check total is right)\n\npopulation = data.loc[zones]['Population, total'].swaplevel().unstack()\npopulation = population[zones]\nassert all(data.loc['World']['Population, total'] == population.sum(axis=1))\n\n###############################################################################\n# ## Stacked area plot with matplotlib\n\nimport matplotlib.pyplot as plt\n\n\"\"\nplt.clf()\nplt.figure(figsize=(10, 5), dpi=100)\nplt.stackplot(population.index, population.values.T / 1e9)\nplt.legend(population.columns, loc='upper left')\nplt.ylabel('Population count (B)')\nplt.show()\n\n###############################################################################\n# ## Stacked bar plot with plotly\n\nimport plotly.offline as offline\nimport plotly.graph_objs as go\n\noffline.init_notebook_mode()\n\n\"\"\ndata = [go.Scatter(x=population.index, y=population[zone], name=zone, stackgroup='World')\n        for zone in zones]\nfig = go.Figure(data=data,\n                layout=go.Layout(title='World population'))\noffline.iplot(fig)\n"
  },
  {
    "path": "demo/get_started.md",
    "content": "---\njupyter:\n  jupytext:\n    formats: ipynb,md\n    text_representation:\n      extension: .md\n      format_name: markdown\n      format_version: '1.1'\n      jupytext_version: 1.1.6\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n# Getting started with Jupytext\n\nThis small notebook shows you how to activate Jupytext in the JupyterLab\nenvironment. We'll show you a few things that you can do with Jupytext and\na bit of what happens under the hood.\n\n**Note: to run this notebook locally, you need to first follow the Jupytext\ninstallation instructions and activate the JupyterLab plugin. If you're on\nBinder, it should already work.**\n\n\n## Enabling Jupytext in a new notebook\n\nThis notebook is brand new - it hasn't had any special extra metadata added\nto it.\n\nIf we want Jupytext to save files in multiple formats automatically,\nwe can use the JupyterLab **command palette** to do so.\n\n* In the _View_ menu, click on _Activate Command Palette_\n* Then type **`Jupytext`**. You should see a number of commands come up. Each\n  one tells Jupytext to save the notebook in a different\n  file format automatically.\n* Select **Pair notebook with MyST Markdown**\n\nThat's it! If you have Jupytext installed, it will now save your notebook in\nmarkdown format automatically when you save this `.ipynb` file\n**in addition to** saving the `.ipynb` file itself.\n\nAfter you've done this, save the notebook. You should now see a new file called\n**`get_started.md`** in the same directory as this notebook.\n\n\n## How does Jupytext know to do this?\n\nJupytext uses notebook-level metadata to keep track of what formats are paired\nwith a notebook. Below we'll print the metadata of this notebook so you can see\nwhat the Jupytext metadata looks like.\n\n```python\nimport nbformat as nbf\nfrom IPython.display import JSON\nnotebook = nbf.read('./get_started.ipynb', nbf.NO_CONVERT)\nJSON(notebook['metadata'])\n```\n\nAs you select different formats from the command palette (following the instructions\nabove) and save the notebook, you'll see this metadata change.\n\n\n## That's it!\n\nPlay around with different kinds of code and outputs to see how each is\nconverted into its corresponding text format. Here's a little Python code\nto get you started:\n\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nplt.scatter(*np.random.randn(2, 100), c=np.random.randn(100), s=np.random.rand(100)*100)\n```\n\n# Experiment with the demo notebook!\n\nIn the *`demo/`* folder for `jupytext` there is a notebook called **`World population.ipynb`**.\nBy default, saving the demo notebook will also create *many* possible Jupytext\noutputs so you can see what each looks like and which you prefer.\n"
  },
  {
    "path": "demo/vscode/notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"fba07815\",\n   \"metadata\": {},\n   \"source\": [\n    \"This paired notebook can be edited either as\\n\",\n    \"a Python script or as a Jupyter notebook in\\n\",\n    \"VS Code. Thanks to the Jupytext Sync\\n\",\n    \"extension, changes are automatically synced to\\n\",\n    \"the other paired file(s) when you save.\\n\",\n    \"\\n\",\n    \"💡 Tip: don't forget to hit \\\"Save\\\" before\\n\",\n    \"switching to the other editor. If you don't save\\n\",\n    \"your changes, you will run into conflicting edits\\n\",\n    \"as VS Code does not autoreload files that have\\n\",\n    \"unsaved edits.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"1e480a09\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import plotly.express as px\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"80da494e-465e-472b-b94b-cea9d4e49451\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.plotly.v1+json\": {\n       \"config\": {\n        \"plotlyServerURL\": \"https://plot.ly\"\n       },\n       \"data\": [\n        {\n         \"hovertemplate\": \"species=setosa<br>sepal_width=%{x}<br>sepal_length=%{y}<extra></extra>\",\n         \"legendgroup\": \"setosa\",\n         \"marker\": {\n          \"color\": \"#636efa\",\n          \"symbol\": \"circle\"\n         },\n         \"mode\": \"markers\",\n         \"name\": \"setosa\",\n         \"orientation\": \"v\",\n         \"showlegend\": true,\n         \"type\": \"scatter\",\n         \"x\": {\n          \"bdata\": \"AAAAAAAADEAAAAAAAAAIQJqZmZmZmQlAzczMzMzMCEDNzMzMzMwMQDMzMzMzMw9AMzMzMzMzC0AzMzMzMzMLQDMzMzMzMwdAzczMzMzMCECamZmZmZkNQDMzMzMzMwtAAAAAAAAACEAAAAAAAAAIQAAAAAAAABBAmpmZmZmZEUAzMzMzMzMPQAAAAAAAAAxAZmZmZmZmDkBmZmZmZmYOQDMzMzMzMwtAmpmZmZmZDUDNzMzMzMwMQGZmZmZmZgpAMzMzMzMzC0AAAAAAAAAIQDMzMzMzMwtAAAAAAAAADEAzMzMzMzMLQJqZmZmZmQlAzczMzMzMCEAzMzMzMzMLQGZmZmZmZhBAzczMzMzMEEDNzMzMzMwIQJqZmZmZmQlAAAAAAAAADEDNzMzMzMwIQAAAAAAAAAhAMzMzMzMzC0AAAAAAAAAMQGZmZmZmZgJAmpmZmZmZCUAAAAAAAAAMQGZmZmZmZg5AAAAAAAAACEBmZmZmZmYOQJqZmZmZmQlAmpmZmZmZDUBmZmZmZmYKQA==\",\n          \"dtype\": \"f8\"\n         },\n         \"xaxis\": \"x\",\n         \"y\": {\n          \"bdata\": \"ZmZmZmZmFECamZmZmZkTQM3MzMzMzBJAZmZmZmZmEkAAAAAAAAAUQJqZmZmZmRVAZmZmZmZmEkAAAAAAAAAUQJqZmZmZmRFAmpmZmZmZE0CamZmZmZkVQDMzMzMzMxNAMzMzMzMzE0AzMzMzMzMRQDMzMzMzMxdAzczMzMzMFkCamZmZmZkVQGZmZmZmZhRAzczMzMzMFkBmZmZmZmYUQJqZmZmZmRVAZmZmZmZmFEBmZmZmZmYSQGZmZmZmZhRAMzMzMzMzE0AAAAAAAAAUQAAAAAAAABRAzczMzMzMFEDNzMzMzMwUQM3MzMzMzBJAMzMzMzMzE0CamZmZmZkVQM3MzMzMzBRAAAAAAAAAFkCamZmZmZkTQAAAAAAAABRAAAAAAAAAFkCamZmZmZkTQJqZmZmZmRFAZmZmZmZmFEAAAAAAAAAUQAAAAAAAABJAmpmZmZmZEUAAAAAAAAAUQGZmZmZmZhRAMzMzMzMzE0BmZmZmZmYUQGZmZmZmZhJAMzMzMzMzFUAAAAAAAAAUQA==\",\n          \"dtype\": \"f8\"\n         },\n         \"yaxis\": \"y\"\n        },\n        {\n         \"hovertemplate\": \"species=versicolor<br>sepal_width=%{x}<br>sepal_length=%{y}<extra></extra>\",\n         \"legendgroup\": \"versicolor\",\n         \"marker\": {\n          \"color\": \"#EF553B\",\n          \"symbol\": \"circle\"\n         },\n         \"mode\": \"markers\",\n         \"name\": \"versicolor\",\n         \"orientation\": \"v\",\n         \"showlegend\": true,\n         \"type\": \"scatter\",\n         \"x\": {\n          \"bdata\": \"mpmZmZmZCUCamZmZmZkJQM3MzMzMzAhAZmZmZmZmAkBmZmZmZmYGQGZmZmZmZgZAZmZmZmZmCkAzMzMzMzMDQDMzMzMzMwdAmpmZmZmZBUAAAAAAAAAAQAAAAAAAAAhAmpmZmZmZAUAzMzMzMzMHQDMzMzMzMwdAzczMzMzMCEAAAAAAAAAIQJqZmZmZmQVAmpmZmZmZAUAAAAAAAAAEQJqZmZmZmQlAZmZmZmZmBkAAAAAAAAAEQGZmZmZmZgZAMzMzMzMzB0AAAAAAAAAIQGZmZmZmZgZAAAAAAAAACEAzMzMzMzMHQM3MzMzMzARAMzMzMzMzA0AzMzMzMzMDQJqZmZmZmQVAmpmZmZmZBUAAAAAAAAAIQDMzMzMzMwtAzczMzMzMCEBmZmZmZmYCQAAAAAAAAAhAAAAAAAAABEDNzMzMzMwEQAAAAAAAAAhAzczMzMzMBEBmZmZmZmYCQJqZmZmZmQVAAAAAAAAACEAzMzMzMzMHQDMzMzMzMwdAAAAAAAAABEBmZmZmZmYGQA==\",\n          \"dtype\": \"f8\"\n         },\n         \"xaxis\": \"x\",\n         \"y\": {\n          \"bdata\": \"AAAAAAAAHECamZmZmZkZQJqZmZmZmRtAAAAAAAAAFkAAAAAAAAAaQM3MzMzMzBZAMzMzMzMzGUCamZmZmZkTQGZmZmZmZhpAzczMzMzMFEAAAAAAAAAUQJqZmZmZmRdAAAAAAAAAGEBmZmZmZmYYQGZmZmZmZhZAzczMzMzMGkBmZmZmZmYWQDMzMzMzMxdAzczMzMzMGEBmZmZmZmYWQJqZmZmZmRdAZmZmZmZmGEAzMzMzMzMZQGZmZmZmZhhAmpmZmZmZGUBmZmZmZmYaQDMzMzMzMxtAzczMzMzMGkAAAAAAAAAYQM3MzMzMzBZAAAAAAAAAFkAAAAAAAAAWQDMzMzMzMxdAAAAAAAAAGECamZmZmZkVQAAAAAAAABhAzczMzMzMGkAzMzMzMzMZQGZmZmZmZhZAAAAAAAAAFkAAAAAAAAAWQGZmZmZmZhhAMzMzMzMzF0AAAAAAAAAUQGZmZmZmZhZAzczMzMzMFkDNzMzMzMwWQM3MzMzMzBhAZmZmZmZmFEDNzMzMzMwWQA==\",\n          \"dtype\": \"f8\"\n         },\n         \"yaxis\": \"y\"\n        },\n        {\n         \"hovertemplate\": \"species=virginica<br>sepal_width=%{x}<br>sepal_length=%{y}<extra></extra>\",\n         \"legendgroup\": \"virginica\",\n         \"marker\": {\n          \"color\": \"#00cc96\",\n          \"symbol\": \"circle\"\n         },\n         \"mode\": \"markers\",\n         \"name\": \"virginica\",\n         \"orientation\": \"v\",\n         \"showlegend\": true,\n         \"type\": \"scatter\",\n         \"x\": {\n          \"bdata\": \"ZmZmZmZmCkCamZmZmZkFQAAAAAAAAAhAMzMzMzMzB0AAAAAAAAAIQAAAAAAAAAhAAAAAAAAABEAzMzMzMzMHQAAAAAAAAARAzczMzMzMDECamZmZmZkJQJqZmZmZmQVAAAAAAAAACEAAAAAAAAAEQGZmZmZmZgZAmpmZmZmZCUAAAAAAAAAIQGZmZmZmZg5AzczMzMzMBECamZmZmZkBQJqZmZmZmQlAZmZmZmZmBkBmZmZmZmYGQJqZmZmZmQVAZmZmZmZmCkCamZmZmZkJQGZmZmZmZgZAAAAAAAAACEBmZmZmZmYGQAAAAAAAAAhAZmZmZmZmBkBmZmZmZmYOQGZmZmZmZgZAZmZmZmZmBkDNzMzMzMwEQAAAAAAAAAhAMzMzMzMzC0DNzMzMzMwIQAAAAAAAAAhAzczMzMzMCEDNzMzMzMwIQM3MzMzMzAhAmpmZmZmZBUCamZmZmZkJQGZmZmZmZgpAAAAAAAAACEAAAAAAAAAEQAAAAAAAAAhAMzMzMzMzC0AAAAAAAAAIQA==\",\n          \"dtype\": \"f8\"\n         },\n         \"xaxis\": \"x\",\n         \"y\": {\n          \"bdata\": \"MzMzMzMzGUAzMzMzMzMXQGZmZmZmZhxAMzMzMzMzGUAAAAAAAAAaQGZmZmZmZh5AmpmZmZmZE0AzMzMzMzMdQM3MzMzMzBpAzczMzMzMHEAAAAAAAAAaQJqZmZmZmRlAMzMzMzMzG0DNzMzMzMwWQDMzMzMzMxdAmpmZmZmZGUAAAAAAAAAaQM3MzMzMzB5AzczMzMzMHkAAAAAAAAAYQJqZmZmZmRtAZmZmZmZmFkDNzMzMzMweQDMzMzMzMxlAzczMzMzMGkDNzMzMzMwcQM3MzMzMzBhAZmZmZmZmGECamZmZmZkZQM3MzMzMzBxAmpmZmZmZHUCamZmZmZkfQJqZmZmZmRlAMzMzMzMzGUBmZmZmZmYYQM3MzMzMzB5AMzMzMzMzGUCamZmZmZkZQAAAAAAAABhAmpmZmZmZG0DNzMzMzMwaQJqZmZmZmRtAMzMzMzMzF0AzMzMzMzMbQM3MzMzMzBpAzczMzMzMGkAzMzMzMzMZQAAAAAAAABpAzczMzMzMGECamZmZmZkXQA==\",\n          \"dtype\": \"f8\"\n         },\n         \"yaxis\": \"y\"\n        }\n       ],\n       \"layout\": {\n        \"legend\": {\n         \"title\": {\n          \"text\": \"species\"\n         },\n         \"tracegroupgap\": 0\n        },\n        \"margin\": {\n         \"t\": 60\n        },\n        \"template\": {\n         \"data\": {\n          \"bar\": [\n           {\n            \"error_x\": {\n             \"color\": \"#2a3f5f\"\n            },\n            \"error_y\": {\n             \"color\": \"#2a3f5f\"\n            },\n            \"marker\": {\n             \"line\": {\n              \"color\": \"#E5ECF6\",\n              \"width\": 0.5\n             },\n             \"pattern\": {\n              \"fillmode\": \"overlay\",\n              \"size\": 10,\n              \"solidity\": 0.2\n             }\n            },\n            \"type\": \"bar\"\n           }\n          ],\n          \"barpolar\": [\n           {\n            \"marker\": {\n             \"line\": {\n              \"color\": \"#E5ECF6\",\n              \"width\": 0.5\n             },\n             \"pattern\": {\n              \"fillmode\": \"overlay\",\n              \"size\": 10,\n              \"solidity\": 0.2\n             }\n            },\n            \"type\": \"barpolar\"\n           }\n          ],\n          \"carpet\": [\n           {\n            \"aaxis\": {\n             \"endlinecolor\": \"#2a3f5f\",\n             \"gridcolor\": \"white\",\n             \"linecolor\": \"white\",\n             \"minorgridcolor\": \"white\",\n             \"startlinecolor\": \"#2a3f5f\"\n            },\n            \"baxis\": {\n             \"endlinecolor\": \"#2a3f5f\",\n             \"gridcolor\": \"white\",\n             \"linecolor\": \"white\",\n             \"minorgridcolor\": \"white\",\n             \"startlinecolor\": \"#2a3f5f\"\n            },\n            \"type\": \"carpet\"\n           }\n          ],\n          \"choropleth\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"type\": \"choropleth\"\n           }\n          ],\n          \"contour\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"contour\"\n           }\n          ],\n          \"contourcarpet\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"type\": \"contourcarpet\"\n           }\n          ],\n          \"heatmap\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"heatmap\"\n           }\n          ],\n          \"histogram\": [\n           {\n            \"marker\": {\n             \"pattern\": {\n              \"fillmode\": \"overlay\",\n              \"size\": 10,\n              \"solidity\": 0.2\n             }\n            },\n            \"type\": \"histogram\"\n           }\n          ],\n          \"histogram2d\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"histogram2d\"\n           }\n          ],\n          \"histogram2dcontour\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"histogram2dcontour\"\n           }\n          ],\n          \"mesh3d\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"type\": \"mesh3d\"\n           }\n          ],\n          \"parcoords\": [\n           {\n            \"line\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"parcoords\"\n           }\n          ],\n          \"pie\": [\n           {\n            \"automargin\": true,\n            \"type\": \"pie\"\n           }\n          ],\n          \"scatter\": [\n           {\n            \"fillpattern\": {\n             \"fillmode\": \"overlay\",\n             \"size\": 10,\n             \"solidity\": 0.2\n            },\n            \"type\": \"scatter\"\n           }\n          ],\n          \"scatter3d\": [\n           {\n            \"line\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatter3d\"\n           }\n          ],\n          \"scattercarpet\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattercarpet\"\n           }\n          ],\n          \"scattergeo\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattergeo\"\n           }\n          ],\n          \"scattergl\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattergl\"\n           }\n          ],\n          \"scattermap\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattermap\"\n           }\n          ],\n          \"scattermapbox\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattermapbox\"\n           }\n          ],\n          \"scatterpolar\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatterpolar\"\n           }\n          ],\n          \"scatterpolargl\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatterpolargl\"\n           }\n          ],\n          \"scatterternary\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatterternary\"\n           }\n          ],\n          \"surface\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"surface\"\n           }\n          ],\n          \"table\": [\n           {\n            \"cells\": {\n             \"fill\": {\n              \"color\": \"#EBF0F8\"\n             },\n             \"line\": {\n              \"color\": \"white\"\n             }\n            },\n            \"header\": {\n             \"fill\": {\n              \"color\": \"#C8D4E3\"\n             },\n             \"line\": {\n              \"color\": \"white\"\n             }\n            },\n            \"type\": \"table\"\n           }\n          ]\n         },\n         \"layout\": {\n          \"annotationdefaults\": {\n           \"arrowcolor\": \"#2a3f5f\",\n           \"arrowhead\": 0,\n           \"arrowwidth\": 1\n          },\n          \"autotypenumbers\": \"strict\",\n          \"coloraxis\": {\n           \"colorbar\": {\n            \"outlinewidth\": 0,\n            \"ticks\": \"\"\n           }\n          },\n          \"colorscale\": {\n           \"diverging\": [\n            [\n             0,\n             \"#8e0152\"\n            ],\n            [\n             0.1,\n             \"#c51b7d\"\n            ],\n            [\n             0.2,\n             \"#de77ae\"\n            ],\n            [\n             0.3,\n             \"#f1b6da\"\n            ],\n            [\n             0.4,\n             \"#fde0ef\"\n            ],\n            [\n             0.5,\n             \"#f7f7f7\"\n            ],\n            [\n             0.6,\n             \"#e6f5d0\"\n            ],\n            [\n             0.7,\n             \"#b8e186\"\n            ],\n            [\n             0.8,\n             \"#7fbc41\"\n            ],\n            [\n             0.9,\n             \"#4d9221\"\n            ],\n            [\n             1,\n             \"#276419\"\n            ]\n           ],\n           \"sequential\": [\n            [\n             0,\n             \"#0d0887\"\n            ],\n            [\n             0.1111111111111111,\n             \"#46039f\"\n            ],\n            [\n             0.2222222222222222,\n             \"#7201a8\"\n            ],\n            [\n             0.3333333333333333,\n             \"#9c179e\"\n            ],\n            [\n             0.4444444444444444,\n             \"#bd3786\"\n            ],\n            [\n             0.5555555555555556,\n             \"#d8576b\"\n            ],\n            [\n             0.6666666666666666,\n             \"#ed7953\"\n            ],\n            [\n             0.7777777777777778,\n             \"#fb9f3a\"\n            ],\n            [\n             0.8888888888888888,\n             \"#fdca26\"\n            ],\n            [\n             1,\n             \"#f0f921\"\n            ]\n           ],\n           \"sequentialminus\": [\n            [\n             0,\n             \"#0d0887\"\n            ],\n            [\n             0.1111111111111111,\n             \"#46039f\"\n            ],\n            [\n             0.2222222222222222,\n             \"#7201a8\"\n            ],\n            [\n             0.3333333333333333,\n             \"#9c179e\"\n            ],\n            [\n             0.4444444444444444,\n             \"#bd3786\"\n            ],\n            [\n             0.5555555555555556,\n             \"#d8576b\"\n            ],\n            [\n             0.6666666666666666,\n             \"#ed7953\"\n            ],\n            [\n             0.7777777777777778,\n             \"#fb9f3a\"\n            ],\n            [\n             0.8888888888888888,\n             \"#fdca26\"\n            ],\n            [\n             1,\n             \"#f0f921\"\n            ]\n           ]\n          },\n          \"colorway\": [\n           \"#636efa\",\n           \"#EF553B\",\n           \"#00cc96\",\n           \"#ab63fa\",\n           \"#FFA15A\",\n           \"#19d3f3\",\n           \"#FF6692\",\n           \"#B6E880\",\n           \"#FF97FF\",\n           \"#FECB52\"\n          ],\n          \"font\": {\n           \"color\": \"#2a3f5f\"\n          },\n          \"geo\": {\n           \"bgcolor\": \"white\",\n           \"lakecolor\": \"white\",\n           \"landcolor\": \"#E5ECF6\",\n           \"showlakes\": true,\n           \"showland\": true,\n           \"subunitcolor\": \"white\"\n          },\n          \"hoverlabel\": {\n           \"align\": \"left\"\n          },\n          \"hovermode\": \"closest\",\n          \"mapbox\": {\n           \"style\": \"light\"\n          },\n          \"paper_bgcolor\": \"white\",\n          \"plot_bgcolor\": \"#E5ECF6\",\n          \"polar\": {\n           \"angularaxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           },\n           \"bgcolor\": \"#E5ECF6\",\n           \"radialaxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           }\n          },\n          \"scene\": {\n           \"xaxis\": {\n            \"backgroundcolor\": \"#E5ECF6\",\n            \"gridcolor\": \"white\",\n            \"gridwidth\": 2,\n            \"linecolor\": \"white\",\n            \"showbackground\": true,\n            \"ticks\": \"\",\n            \"zerolinecolor\": \"white\"\n           },\n           \"yaxis\": {\n            \"backgroundcolor\": \"#E5ECF6\",\n            \"gridcolor\": \"white\",\n            \"gridwidth\": 2,\n            \"linecolor\": \"white\",\n            \"showbackground\": true,\n            \"ticks\": \"\",\n            \"zerolinecolor\": \"white\"\n           },\n           \"zaxis\": {\n            \"backgroundcolor\": \"#E5ECF6\",\n            \"gridcolor\": \"white\",\n            \"gridwidth\": 2,\n            \"linecolor\": \"white\",\n            \"showbackground\": true,\n            \"ticks\": \"\",\n            \"zerolinecolor\": \"white\"\n           }\n          },\n          \"shapedefaults\": {\n           \"line\": {\n            \"color\": \"#2a3f5f\"\n           }\n          },\n          \"ternary\": {\n           \"aaxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           },\n           \"baxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           },\n           \"bgcolor\": \"#E5ECF6\",\n           \"caxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           }\n          },\n          \"title\": {\n           \"x\": 0.05\n          },\n          \"xaxis\": {\n           \"automargin\": true,\n           \"gridcolor\": \"white\",\n           \"linecolor\": \"white\",\n           \"ticks\": \"\",\n           \"title\": {\n            \"standoff\": 15\n           },\n           \"zerolinecolor\": \"white\",\n           \"zerolinewidth\": 2\n          },\n          \"yaxis\": {\n           \"automargin\": true,\n           \"gridcolor\": \"white\",\n           \"linecolor\": \"white\",\n           \"ticks\": \"\",\n           \"title\": {\n            \"standoff\": 15\n           },\n           \"zerolinecolor\": \"white\",\n           \"zerolinewidth\": 2\n          }\n         }\n        },\n        \"xaxis\": {\n         \"anchor\": \"y\",\n         \"domain\": [\n          0,\n          1\n         ],\n         \"title\": {\n          \"text\": \"sepal_width\"\n         }\n        },\n        \"yaxis\": {\n         \"anchor\": \"x\",\n         \"domain\": [\n          0,\n          1\n         ],\n         \"title\": {\n          \"text\": \"sepal_length\"\n         }\n        }\n       }\n      }\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"px.scatter(\\n\",\n    \"    px.data.iris(),\\n\",\n    \"    x=\\\"sepal_width\\\",\\n\",\n    \"    y=\\\"sepal_length\\\",\\n\",\n    \"    color=\\\"species\\\",\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"61adea94\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"formats\": \"ipynb,py:percent\"\n  },\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.12.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "demo/vscode/notebook.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     formats: ipynb,py:percent\n#     text_representation:\n#       extension: .py\n#       format_name: percent\n#       format_version: '1.3'\n#       jupytext_version: 1.18.0-dev\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# This paired notebook can be edited either as\n# a Python script or as a Jupyter notebook in\n# VS Code. Thanks to the Jupytext Sync\n# extension, changes are automatically synced to\n# the other paired file(s) when you save.\n#\n# 💡 Tip: don't forget to hit \"Save\" before\n# switching to the other editor. If you don't save\n# your changes, you will run into conflicting edits\n# as VS Code does not autoreload files that have\n# unsaved edits.\n\n# %%\nimport plotly.express as px\n\n# %%\npx.scatter(\n    px.data.iris(),\n    x=\"sepal_width\",\n    y=\"sepal_length\",\n    color=\"species\",\n)\n\n# %%\n"
  },
  {
    "path": "docs/Makefile",
    "content": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHINXBUILD   = sphinx-build\nSOURCEDIR     = .\nBUILDDIR      = _build\n\n# Put it first so that \"make\" without argument is like \"make help\".\nhelp:\n\t@$(SPHINXBUILD) -M help \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n\n.PHONY: help Makefile\n\n# Catch-all target: route all unknown targets to Sphinx using the new\n# \"make mode\" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).\n%: Makefile\n\t@$(SPHINXBUILD) -M $@ \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n"
  },
  {
    "path": "docs/advanced-options.md",
    "content": "# Advanced options\n\n## Metadata filtering\n\nThe metadata that is included in the text notebooks is governed by the two options `notebook_metadata_filter` and `cell_metadata_filter`. The default value for these options are\n- `notebook_metadata_filter=\"kernelspec,jupytext\"`, i.e. by default, only the Jupytext and the kernel metadata are included:\n- `cell_metadata_filter=all,-autoscroll,-collapsed,-scrolled,-trusted,-ExecuteTime`, i.e. by default all the cell metadata are included, except those listed with a negative sign.\n\nSuppose you want to keep all the notebook metadata but `widgets` and `varInspector` in the YAML header, and that for cell metadata, you want to allow `ExecuteTime` and `autoscroll`, but not `hide_output`. Then, you could either add\n```python\nnotebook_metadata_filter=\"all,-widgets,-varInspector\"\ncell_metadata_filter=\"ExecuteTime,autoscroll,-hide_output\"\n```\nto your [`jupytext.toml`](config.md) file, or set these options for one notebook using the [Jupytext CLI](using-cli.md) with\n```\njupytext --opt notebook_metadata_filter=all,-widgets,-varInspector --opt cell_metadata_filter=ExecuteTime,autoscroll,-hide_output notebook.py\n```\n\nIf you wanted no notebook or cell metadata at all in the text notebooks, you could add this to your [`jupytext.toml`](config.md) file:\n```python\nnotebook_metadata_filter=\"-all\"\ncell_metadata_filter=\"-all\"\n```\n\nIt is possible to filter nested metadata - use a dot to represent the nested fields. For example, if you wanted to include the Jupytext metadata, but not the Jupytext version number, you can use:\n```python\nnotebook_metadata_filter=\"-jupytext.text_representation.jupytext_version\"\n```\n\nFinally, note that you can _hide_ the notebook metadata in an HTML comment in `.md` files - just set `hide_notebook_metadata=true` either at the command line or in the `jupytext.toml` file.\n\n## Magic commands\n\nIn the `percent` and `light` script formats, magic commands (Jupyter commands prefixed by `%` or `%%`) are commented out in scripts. You can change this by using the `comment_magics` option, either in the `jupytext.toml` file or at the command line with `jupytext --opt`.\n\n## Active and inactive cells\n\nYou might want to make some cell active only when the notebook is run in Jupyter, or active only when the `.py` file is interpreted by Python. To do so, add an `active-ipynb` tag to the cells that should only be executed in the `.ipynb` file, and an `active-py` tag to the cells that should be executed only in the Python script.\n\n## More options\n\nThere are a couple more options available - please have a look at the `JupytextConfiguration` class in [config.py](https://github.com/mwouts/jupytext/blob/main/src/jupytext/config.py).\n"
  },
  {
    "path": "docs/changelog.md",
    "content": "```{include} ../CHANGELOG.md\n```\n"
  },
  {
    "path": "docs/conf.py",
    "content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\n# import os\n# import sys\n# sys.path.insert(0, os.path.abspath('.'))\n\n# -- Project information -----------------------------------------------------\n\nproject = \"Jupytext\"\ncopyright = \"2018-2025, The Jupytext Team\"\nauthor = \"The Jupytext Team\"\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\"sphinx_copybutton\", \"myst_parser\"]\n\n# Auto-generated header anchors\nmyst_heading_anchors = 3\n\nhtml_context = {\n    \"display_github\": True,  # Integrate GitHub\n    \"github_user\": \"mwouts\",  # Username\n    \"github_repo\": \"jupytext\",  # Repo name\n    \"github_version\": \"main\",  # Version\n    \"conf_py_path\": \"/docs/\",  # Path in the checkout to the docs root\n}\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = [\"_build\", \"Thumbs.db\", \".DS_Store\", \".ipynb_checkpoints\"]\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = \"alabaster\"\n\nhtml_sidebars = {\"**\": [\"about.html\", \"navigation.html\", \"searchbox.html\"]}\n\nhtml_theme_options = {\n    \"github_button\": True,\n    \"github_banner\": True,\n    \"github_user\": \"mwouts\",\n    \"github_repo\": \"jupytext\",\n    \"github_type\": \"star\",\n    \"logo\": \"logo.svg\",\n    \"show_relbars\": True,\n}\n\npygments_style = \"sphinx\"\nmaster_doc = \"index\"  # Makes `index.md` the main file\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"jupytext\"\n"
  },
  {
    "path": "docs/config.md",
    "content": "# Jupytext's configuration file\n\nJupytext can use either `jupytext.toml` or `pyproject.toml` as its configuration file.\n\n## Global pairing\n\nTo [pair](paired-notebooks.md) all the notebooks in the current folder and subfolders, all you need to do is to create a `jupytext.toml` file with this content:\n\n```\n# Pair ipynb notebooks to py:percent text notebooks\nformats = \"ipynb,py:percent\"\n```\n\nWith the above configuration, saving `notebook.ipynb` (or `notebook.py`) in Jupyter will have the effect to update both `notebook.ipynb` and `notebook.py` on disk.\n\nYou can use other text formats like `md`, `md:myst`, `Rmd` or `qmd`. The percent format is available for many languages. Use `auto:percent` to infer the file extension from the programmation language used in the notebook.\n\nYou can also configure Jupytext in a `pyproject.toml` config file rather than `jupytext.toml`. In that case, a sample configuration would be:\n```\n[tool.jupytext]\nformats = \"ipynb,py:percent\"\n```\n\n## Pairing in subfolders\n\nIf you want to store your `.ipynb` notebooks in a `notebooks` folder, and their `.py` representation in a `scripts` folder, you can use this `jupytext.toml` configuration:\n```\n[formats]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n```\n\nor this `pyproject.toml` configuration:\n```\n[tool.jupytext.formats]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n```\n\nThe `notebook/` prefix above is matched with the top-most parent folder of the matching name, not above the Jupytext configuration file.\n\n## Pairing with multiple format specifications\n\nYou can define different pairing configurations for specific subsets of notebooks by using a list of format dictionaries. This is useful when you want to apply different pairing rules to notebooks in different locations, such as generating documentation markdown files only for tutorial notebooks.\n\nSince Jupytext v1.18.0, the `formats` option can be a list of format dictionaries, where the first matching format is used for each notebook.\n\nHere's an example that pairs tutorial notebooks to markdown documentation files, and all other notebooks to Python scripts:\n\n```toml\n# jupytext.toml\n\n# Tutorial notebooks get paired to markdown docs\n[[formats]]\n\"notebooks/tutorials/\" = \"ipynb\"\n\"docs/tutorials/\" = \"md\"\n\"scripts/tutorials/\" = \"py:percent\"\n\n# Default pairing: all other notebooks are paired with Python scripts\n[[formats]]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n```\n\nWith this configuration:\n- Tutorial notebooks like `notebooks/tutorials/getting_started.ipynb` are paired with:\n  - `docs/tutorials/getting_started.md`\n  - `scripts/tutorials/getting_started.py`\n- Regular notebooks like `notebooks/hello.ipynb` are paired with `scripts/hello.py`\n\nYou can define multiple format specifications for different subsets:\n\n```toml\n# Tutorial notebooks\n[[formats]]\n\"notebooks/tutorials/\" = \"ipynb\"\n\"docs/tutorials/\" = \"md\"\n\n# Example notebooks with MyST format\n[[formats]]\n\"notebooks/examples/\" = \"ipynb\"\n\"docs/examples/\" = \"md:myst\"\n\n# Default for all other notebooks\n[[formats]]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n```\n\nThe first format specification that matches the notebook path is used. It's recommended to put more specific paths first and the default/catch-all formats last.\n\n### Alternative syntaxes\n\nYou can also use a semicolon-separated string for a more compact notation:\n\n```toml\n# jupytext.toml\nformats = \"notebooks///ipynb,scripts///py:percent;ipynb,py:percent\"\n```\n\nOr a TOML list with string format specifications:\n\n```toml\n# jupytext.toml\nformats = [\n    \"notebooks///ipynb,scripts///py:percent\",\n    \"ipynb,py:percent\"\n]\n```\n\nIn `pyproject.toml`, the configuration would be:\n```toml\n[[tool.jupytext.formats]]\n\"notebooks/tutorials/\" = \"ipynb\"\n\"docs/tutorials/\" = \"md\"\n\n[[tool.jupytext.formats]]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n```\n\n\n## Global pairing vs individual pairing\n\nAlternatively, notebooks can be paired individually using either the Jupytext commands in JupyterLab, or the command line interface:\n\n```bash\njupytext --set-formats ipynb,py:percent notebook.ipynb\n```\n\nThe individual pairing takes precedence over the global pairing. You can disable the global pairing for an individual notebook by setting formats to a single format:\n```bash\njupytext --set-formats ipynb notebook.ipynb\n```\n\nPlease note that, while Jupytext is Jupyter acts accordingly to both local or global Jupytext configuration files, the Jupyter commands in JupyterLab and the Jupytext menu in Jupyter only display the pairing information set in the notebooks itself and are not aware of the global configuration ([#177](https://github.com/mwouts/jupytext/issues/177)).\n\n## Possible locations for the Jupytext configuration files\n\nThe Jupytext configuration file(s) should be either in the local or a parent directory, or in any directory listed in\n```python\nfrom jupytext.config import global_jupytext_configuration_directories\nlist(global_jupytext_configuration_directories())\n```\nwhich include `XDG_CONFIG_HOME` (defaults to `$HOME/.config`) and `XDG_CONFIG_DIR`.\n\nThe name for the configuration file can be any of `jupytext.config.JUPYTEXT_CONFIG_FILES`, i.e. `.jupytext` (in TOML),\n`jupytext.toml`, `jupytext.yml`, `jupytext.yaml`, `jupytext.json` or `jupytext.py` (dot-files\nlike `.jupytext.toml` are accepted by the CLI version of Jupytext, but are not effective in Jupyter).\n\nAs mentionned above, you can also use your Python project's `pyproject.toml` file.\n\nIf you want to know, for a given directory, which configuration file is used by Jupytext, run this in a Python shell:\n```python\nfrom jupytext.config import find_jupytext_configuration_file\nfind_jupytext_configuration_file('.')\n```\n\nIf you want to limit the search for a configuration file to a given parent directory, you can create an empty `.jupytext` configuration file in that directory. Alternatively, you can set the search boundaries with an environment variable `JUPYTEXT_CEILING_DIRECTORIES` - a colon-separated list of absolute paths.\n\nIf `JUPYTEXT_CEILING_DIRECTORIES` is defined, Jupytext will stop searching for configuration files when it meets one of these path. This can be helpful to avoid searching for configuration files on slow filesystems. It can also be useful if you don't want to use a global configuration - for instance, when running `pytest` on Jupytext, we use `JUPYTEXT_CEILING_DIRECTORIES=\"/tmp\"`.\n"
  },
  {
    "path": "docs/contributing.md",
    "content": "# Contributing\n\nThanks for reading this! Contributions to this project are welcome, and there are many ways you can contribute\n\n## Improve the documentation\n\nYou've spotted a typo, a paragraph that is not very clear, or an instruction that does not work? Please follow the _Fork me on Github_ link, edit the document, and submit a pull request.\n\n## Report an issue\n\nYou have seen an issue with Jupytext, or you can't find your way in the documentation?\nPlease let us know, and provide enough information so that we can reproduce the problem.\n\n## Propose enhancements\n\nYou want to submit an enhancement on Jupytext? Unless this is a small change, we usually prefer that you let us know beforehand: open an issue that describe the problem you want to solve.\n\n## Add support for another language\n\nA pull request for which you do not need to contact us in advance is the addition of a new language to Jupytext. In principle that should be easy - you would only have to:\n- document the language extension and comment by adding one line to `_SCRIPT_EXTENSIONS` in `jupytext/languages.py`.\n- add the language to `docs/languages.md`\n- contribute a sample notebook in `tests/data/notebooks/inputs/ipynb_[language]`.\n- run the tests suite (create a [development environment](developing.md), then execute `pytest` locally). The tests will generate various text representations corresponding to your notebook under  `tests/data/notebooks/outputs/`. Please verify that these files are valid scripts, and include them in your PR.\n"
  },
  {
    "path": "docs/developing.md",
    "content": "# Developing Jupytext\n\n## How to test development versions from GitHub\n\nIf you want to test a feature that has been integrated in `main` but not delivered yet to `pip` or `conda`, use\n```\nHATCH_BUILD_HOOKS_ENABLE=true pip install git+https://github.com/mwouts/jupytext.git\n```\n\nThe above requires `node`. You can install it with e.g.\n```\nconda install 'nodejs>=20' -c conda-forge\n```\n\nAlternatively you can build only Jupytext core (e.g. skip the JupyterLab extension). To do so, remove `HATCH_BUILD_HOOKS_ENABLE=true` in the above.\n\nFinally, if you want to test a development branch, use\n```\nHATCH_BUILD_HOOKS_ENABLE=true pip install git+https://github.com/mwouts/jupytext.git@branch\n```\nwhere `branch` is the name of the branch you want to test.\n\n## Install and develop Jupytext locally\n\nMost of Jupytext's code is written in Python. To develop the Python part of Jupytext, you should clone Jupytext, then create a dedicated Python environment with [Pixi](https://pixi.sh):\n```\npixi shell\n```\n\nInstall the `jupytext` package in development mode with\n```\nHATCH_BUILD_HOOKS_ENABLE=true pip install -e '.[dev]'\n```\n\nWe use the [pre-commit](https://pre-commit.com) package to run pre-commit scripts like `black` and `ruff` on the code.\nInstall it with\n```\npre-commit install\n```\n\nTests are executed with `pytest`. You can run them in parallel with for instance\n```\npytest -n 5\n```\n\nSome tests require a Jupyter kernel pointing to the current environment:\n```\npython -m ipykernel install --name jupytext-dev --user\n```\n\n## Jupytext's extension for JupyterLab\n\nOur extension for JupyterLab adds a series of Jupytext commands to JupyterLab. The code is in `packages/labextension`. See the `README.md` there for instructions on how to develop that extension.\n\n## Jupytext's documentation\n\nYou can build the HTML documentation locally with\n```\nrm -rf docs/_build\npixi run -e docs sphinx-build docs docs/_build\n```\n"
  },
  {
    "path": "docs/doc-requirements.txt",
    "content": "sphinx\nsphinx_copybutton\nsphinx_rtd_theme\njupytext\nmyst_parser\n"
  },
  {
    "path": "docs/faq.md",
    "content": "# FAQ\n\n## What is Jupytext?\n\nJupytext is a Python package that provides _two-way_ conversion between Jupyter notebooks and several other text-based formats like Markdown documents or scripts.\n\n## Why would I want to convert my notebooks to text?\n\nThe text representation only contains the part of the notebook that you wrote (not the outputs). You get a cleaner diff history. Thanks to the _two-way_ conversion, you can also act on the text file and then propagate the changes to the original `.ipynb` file. Refactor your code or merge multiple contributions easily!\n\n## How do I use Jupytext?\n\nOpen the notebook that you want to version control. _Pair_ the notebook to a script or a Markdown file using the [Jupytext Commands](install.md#jupytext-commands-in-jupyterlab) in JupyterLab.\n\nSave the notebook, and you get two copies of the notebook: the original `*.ipynb` file, together with its paired text representation.\n\n## Which Jupytext format do you recommend?\n\nNotebooks that contain more text than code are best represented as Markdown documents. These are conveniently edited in IDEs and are also well rendered on GitHub.\n\nSaving notebooks as scripts is an appropriate choice when you want to act on the code (refactor the code, import it in another script or notebook, etc). Use the `percent` format if you prefer to get explicit cell markers (compatible with VScode, PyCharm, Spyder, Hydrogen...). And if you prefer to get the minimal amount of cell markers, go for the `light` format.\n\n## Can I see a sample of each format?\n\nGo to [our demo folder](https://github.com/mwouts/jupytext/tree/main/demo) and see how our sample `World population` notebook is represented in each format.\n\n## Can I edit the paired text file?\n\nYes! When you're done, reload the notebook in Jupyter. There, you will see the updated input cells combined with the matching output cells from the `.ipynb` file.\n\n## Do I need to close my notebook in Jupyter?\n\nClosing the notebook in Jupyter while you refactor it in another editor will help you avoid the message _Untitled.ipynb has changed on disk_. However, you don't really need to close the notebook.\n\nYou can simply use _Reload Notebook from disk_ to load the latest edits once you're done with the other editor. When you reload the notebook, the kernel variables are preserved (and the outputs too if the notebook is paired to an `.ipynb` file), so you can continue your work where you left it.\n\n💡 **Tip:** You can automate the notebook reloading by installing the [Jupyter Collaboration](jupyter-collaboration.md) extension.\n\n## How do paired notebooks work?\n\nThe `.ipynb` file contains the full notebook. The paired text file only contains the input cells and selected metadata. When the notebook is loaded by Jupyter, input cells are loaded from the text file, while the output cells and the filtered metadata are restored using the `.ipynb` file. When the notebook is saved in Jupyter, the two files are updated to match the current content of the notebook.\n\n## Can I create a notebook from a text file?\n\nCertainly. Open your pre-existing scripts or Markdown files as notebooks with the _Open as Notebook_ menu in JupyterLab.\n\nOutput cells appear in the browser when you execute the notebook, but they are not written to the disk when you save the notebook.\n\nThe output cells are lost when you reload the notebook - if you want to avoid this, just _pair_ the text file to an `.ipynb` file.\n\nIf you want to convert text formats to notebooks programmatically, use one of\n```shell\njupytext --to ipynb *.md                        # convert all .md files to notebooks with no outputs\njupytext --to ipynb --execute *.md              # convert all .md files to notebooks and execute them\njupytext --set-formats ipynb,md --execute *.md  # convert all .md files to paired notebooks and execute them\n```\n\nConversions the other way use a similar format\n```shell\njupytext --to md *.ipynb                         # convert all .ipynb files to .md files\n```\n\n## I want a specific cell to be commented out in the paired script\n\nThat's possible! See how to [activate or deactivate cells](advanced-options.md#active-and-inactive-cells).\n\n## Which files should I version control?\n\nUnless you want to version the outputs, you should version *only the text representation*. The paired `.ipynb` file can safely be deleted. It will be recreated locally the next time you open the notebook (from the text file) and save it.\n\nNote that if you version both the `.md` and `.ipynb` files, you can configure `git diff` to [ignore the diffs on the `.ipynb` files](https://github.com/mwouts/jupytext/issues/251).\n\n## I have modified a text file, but git reports no diff for the paired `.ipynb` file\n\nThe synchronization between the two files happens when you reload and *save* the notebook in Jupyter, or when you explicitly run `jupytext --sync`. If you want to force the synchronization on every commit, you could use `jupytext` as a [pre-commit hook](using-pre-commit.md).\n\n## Jupyter warns me that the file has changed on disk\n\nBy default, Jupyter tries to save your notebooks every 2 minutes. If you have edited the text representation in another editor, it will detect that and ask you if you want to either overwrite, or _reload_ the notebook from disk.\n\nYou should simply click on _Reload_.\n\nNote you can deactivate Jupyter's autosave function with the _Autosave Document_ setting in JupyterLab (search for _autosave_ in the _advanced settings editor_).\n\n## When I reload, Jupyter warns me that my notebook has unsaved changes\n\nThat happens if you have edited both the notebook and the paired text file at the same time... If you know which version you want to keep, save it and reload the other. If you want to compare and merge both versions, backup the text file (with e.g. `git stash`), save the notebook, and merge the updated paired file with the backup (with e.g. `git stash pop`). Then, refresh the notebook in Jupyter.\n\n## Jupyter complains that the `.ipynb` file is more recent than the text representation\n\nThis happens if you have edited the `.ipynb` file outside of Jupyter. This is a safeguard to avoid overwriting the notebook with an outdated text file.\n\nIn this case, a manual action is requested. Remove the paired `.md` or `.py` file if it is outdated, otherwise, edit and save it to update the file timestamp.\n\n## Can I use Jupytext with JupyterHub, Binder, Nteract, Colab, Saturn or Azure?\n\nJupytext is compatible with JupyterHub (execute `pip install jupytext --user` to install it in user mode) and with Binder (add `jupytext` to the project requirements).\n\nIf you use another editor than JupyterLab, you probably can't get Jupytext there. However, you can still use Jupytext at the command line to manually sync the two representations of the notebook:\n```shell\njupytext --set-formats ipynb,py:light notebook.ipynb   # Pair a notebook to a light script\njupytext --sync notebook.ipynb                         # Sync the two representations\n```\n\n## Can I re-write my git history to use text files instead of notebooks?\n\nIndeed, you could substitute every `.ipynb` file in the project history with its Jupytext Markdown representation.\n\nTechnically this is available in just one command, which results in a complete rewrite of the history. Please experiment that in a branch, and think twice before pushing the result...\n```shell\ngit filter-branch --tree-filter 'jupytext --to md */*.ipynb && rm -f */*.ipynb' HEAD\n```\n\nSee the result and the cleaner diff history in the case of the [Python Data Science Handbook](https://github.com/mwouts/PythonDataScienceHandbook/tree/jupytext_no_ipynb).\n"
  },
  {
    "path": "docs/formats-markdown.md",
    "content": "# Notebooks as Markdown\n\n## MyST Markdown\n\n[MyST (Markedly Structured Text)][myst-parser] is a markdown flavor that \"implements the best parts of reStructuredText\". It provides a way to call Sphinx directives and roles from within Markdown,\nusing a *slight* extension of CommonMark markdown.\n[MyST-NB][myst-nb] and [Jupyter Book][jupyter-book] builds on this markdown flavor, to offer direct conversion of Jupyter Notebooks into Sphinx documents.\n\nSimilar to the jupytext Markdown format, MyST Markdown uses code blocks to contain code cells.\nThe difference though, is that the metadata is contained in a YAML block:\n\n````md\n```{code-cell} ipython3\n---\nother:\n  more: true\ntags: [hide-output, show-input]\n---\n\nprint(\"Hallo!\")\n```\n````\n\nThe `ipython3` here is purely optional, as an aide for syntax highlighting.\nIn the round-trip, it is copied from `notebook.metadata.language_info.pygments_lexer`.\n\nAlso, where possible the conversion will use the short-hand metadata format\n(see the [MyST guide](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#parameterizing-directives)):\n\n````md\n```{code-cell} ipython3\n:tags: [hide-output, show-input]\n\nprint(\"Hallo!\")\n```\n````\n\nRaw cells are also represented in a similar fashion:\n\n````md\n```{raw-cell}\n:raw_mimetype: text/html\n\n<b>Bold text<b>\n```\n````\n\nMarkdown cells are not wrapped. If a markdown cell has metadata, or\ndirectly proceeds another markdown cell, then a [block break] will be inserted\nabove it, with an (optional) single line JSON representation of the metadata:\n\n```md\n+++ {\"slide\": true}\n\nThis is a markdown cell with metadata\n\n+++\n\nThis is a new markdown cell with no metadata\n```\n\nSee for instance how our `World population.ipynb` notebook is [represented](https://github.com/mwouts/jupytext/blob/main/demo/World%20population.myst.md#) in the `myst` format.\n\n**Note**: The `myst` format requires Python >= 3.6\n\n**Tip**: You can use the [myst-highlight] VS Code extension to provide better syntax highlighting for this format.\n\n[myst-parser]: https://myst-parser.readthedocs.io\n[myst-nb]: https://myst-nb.readthedocs.io\n[jupyter-book]: https://jupyterbook.org\n[block break]: https://myst-parser.readthedocs.io/en/latest/using/syntax.html#block-breaks\n[myst-highlight]: https://marketplace.visualstudio.com/items?itemName=ExecutableBookProject.myst-highlight\n\n## Quarto\n\n[Quarto](https://quarto.org/) is a scientific and technical publishing system built on Pandoc. If you have `quarto` installed, Jupytext lets you edit `.qmd` documents as notebooks in Jupyter, and pair `.ipynb` notebooks with `.qmd` notebooks.\n\nThe conversion from `.ipynb` to `.qmd` and back directly calls `quarto convert`, and consequently requires an installation of Quarto v0.2.134 or higher.\n\nNote that the round trip of `.ipynb` to `.qmd` to `.ipynb` has the effect of concatenating consecutive Markdown cells and turning raw cells into Markdown cells (since `.qmd` files represent all content as either Markdown or code cells).\n\n## R Markdown\n\n[R Markdown](https://rmarkdown.rstudio.com/authoring_quick_tour.html) is [RStudio](https://www.rstudio.com/)'s format for notebooks, with support for R, Python, and many [other languages](https://bookdown.org/yihui/rmarkdown/language-engines.html).\n\nJupytext's implementation of R Markdown is very similar to that of the Markdown format. The major difference is on code cells, which use R Markdown's convention, i.e. the language and options are surrounded by curly brackets, and the cell metadata are encoded as R objects. For instance our cell with the `parameters` tags would be represented as:\n\n    ```{python tags=c(\"parameters\")}\n    param = 5\n    ```\n\nPython and R notebooks represented in the R Markdown format can run both in Jupyter and RStudio. Note that you can change the default Python environment in RStudio with `RETICULATE_PYTHON` in a `.Renviron` file, see [here](https://github.com/mwouts/jupytext/issues/267#issuecomment-506994930).\n\nSee how our `World population.ipynb` notebook in the [demo folder](https://github.com/mwouts/jupytext/tree/main/demo) is represented in [R Markdown](https://github.com/mwouts/jupytext/blob/main/demo/World%20population.Rmd).\n\n## Jupytext Markdown\n\nJupytext can save notebooks as [Markdown](https://daringfireball.net/projects/markdown/syntax) documents. This format is well adapted to tutorials, books, or more generally notebooks that contain more text than code. Notebooks represented in this form are well rendered by most Markdown editors or renderers, including GitHub.\n\nLike all the Jupytext formats, Jupytext Markdown notebooks start with an (optional) YAML header. This header is used to store selected notebook metadata like the kernel information, together with Jupytext's format and version information.\n```\n---\njupyter:\n  jupytext:\n    text_representation:\n      extension: .md\n      format_name: markdown\n      format_version: '1.1'\n      jupytext_version: 1.1.0\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n```\n\nYou can add custom notebook metadata like `author` or `title` under the `jupyter:` section, it will be synchronized with the notebook metadata.\nAnd if you wish to export more metadata from the notebook, have a look at the paragraph on [metadata filtering](advanced-options.md#metadata-filtering).\n\nIn the Markdown format, markdown cells are inserted verbatim and separated with two blank lines.\n\nIf you'd like that cell breaks also occurs on Markdown headers, add a `split_at_heading: true` entry in the `jupytext` section in the YAML header, or if you want that option to be the default for all Markdown documents in Jupyter, activate the option in the [`jupytext.toml` configuration file](config.md):\n\n```\nsplit_at_heading = true\n```\n\nCode cells are encoded using the classical triple backticks, followed by the notebook language. Cell metadata are appended after the language information, with a `key=value` syntax, where `value` is encoded in JSON format. For instance, in a Python notebook, a simple code cell with a `parameters` tag is represented as:\n\n    ```python tags=[\"parameters\"]\n    param = 5\n    ```\n\nCode snippets are turned into code cells in Jupyter as soon as they have an explicit language, when that language is supported in Jupyter. Thus, you have a code snippet that you don't want to execute in Jupyter, you can either\n- remove the language information,\n- or, start the code snippet with a triple tilde, e.g. `~~~python`, instead of ` ```python`\n- or, add an `active=\"md\"` cell metadata, or a `.noeval` attribute after the language information, e.g. ` ```python .noeval `\n- or, surround the code snippet with explicit Markdown cell markers (see below).\n\nRaw cells are delimited with HTML comments, and accept cell metadata in the same key=value format:\n\n    <!-- #raw -->\n    raw text\n    <!-- #endraw -->\n\n    <!-- #raw key=\"value\"-->\n    raw cell with metadata\n    <!-- #endraw -->\n\nMarkdown cells can also have explicit markers: use one of `<!-- #md -->` or `<!-- #markdown -->` or `<!-- #region -->` and the corresponding `<!-- #end... -->` counterpart. Note that the `<!-- #region -->` and `<!-- #endregion -->` cells markers are [foldable](https://code.visualstudio.com/docs/editor/codebasics#_folding) in VS Code, and that you can also insert a title there, e.g. `<!-- #region This is a title for my protected cell -->`. Cell metadata are accepted in the format `key=\"value\"` (`\"value\"` being encoded in JSON) as for the other cell types.\n\nFor a concrete example, see how our `World population.ipynb` notebook in the [demo folder](https://github.com/mwouts/jupytext/tree/main/demo) is represented in [Markdown](https://github.com/mwouts/jupytext/blob/main/demo/World%20population.md#).\n\n## Pandoc Markdown\n\nPandoc, the _Universal document converter_,  can read and write Jupyter notebooks - see [Pandoc's documentation](https://pandoc.org/MANUAL.html#creating-jupyter-notebooks-with-pandoc).\n\nIn Pandoc Markdown, all cells are marked with pandoc divs (`:::`). The format is therefore slightly more verbose than the Jupytext Markdown format.\n\nSee for instance how our `World population.ipynb` notebook is [represented](https://github.com/mwouts/jupytext/blob/main/demo/World%20population.pandoc.md#) in the `md:pandoc` format.\n\nIf you wish to use that format, please install `pandoc` in version 2.7.2 or above, with e.g. `conda install pandoc -c conda-forge`.\n"
  },
  {
    "path": "docs/formats-scripts.md",
    "content": "# Notebooks as code\n\n## The `percent` format\n\nThe `percent` format is a representation of Jupyter notebooks as scripts, in which all cells are explicitly delimited with a commented double percent sign `# %%`. The `percent` format is currently available for these [languages](https://github.com/mwouts/jupytext/blob/main/src/jupytext/languages.py).\n\nThe format was introduced by Spyder in 2013, and is now supported by many editors, including\n- [Spyder IDE](https://docs.spyder-ide.org/editor.html#defining-code-cells),\n- [Hydrogen](https://nteract.gitbooks.io/hydrogen/docs/Usage/NotebookFiles.html#notebook-export), a package for Atom,\n- [VS\n  Code](https://code.visualstudio.com/docs/python/jupyter-support-py#_jupyter-code-cells),\n- [Python Tools for Visual Studio](https://docs.microsoft.com/en-us/visualstudio/python/python-interactive-repl-in-visual-studio?view=vs-2019#work-with-code-cells),\n- and [PyCharm Professional](https://www.jetbrains.com/help/pycharm/editing-jupyter-notebook-files.html#edit-content).\n\nOur implementation of the `percent` format is as follows: cells can have\n- a title\n- a cell type (`markdown`, `md` or `raw`, omitted for code cells)\n- and cell metadata\nlike in this example:\n\n```python\n# %% Optional title [cell type] key=\"value\"\n```\n\nIn the `percent` format, our previous example becomes:\n```python\n# %% [markdown]\n# This is a multiline\n# Markdown cell\n\n# %% [markdown]\n# Another Markdown cell\n\n\n# %%\n# This is a code cell\nclass A():\n    def one():\n        return 1\n\n    def two():\n        return 2\n```\n\nIn the case of Python scripts, Markdown cells do accept multiline comments:\n```python\n# %% [markdown]\n\"\"\"\nThis is a Markdown cell\nthat uses multiline comments\n\"\"\"\n```\n\nBy default Jupytext will use line comments when it converts your Jupyter notebooks for `percent` scripts. If you prefer to use multiline comments for all text cells, add a `{\"jupytext\": {\"cell_markers\": \"\\\"\\\"\\\"\"}}` metadata to your notebook, either with the notebook metadata editor in Jupyter, or at the command line:\n```bash\njupytext --update-metadata '{\"jupytext\": {\"cell_markers\": \"\\\"\\\"\\\"\"}}' notebook.ipynb --to py:percent\n```\n\nIf you want to use multiline comments for all your paired notebooks, you could also add\n```python\ncell_markers = '\"\"\"'\n```\nto your [`jupytext.toml` configuration file](config.md).\n\nSee how our `World population.ipynb` notebook is [represented](https://github.com/mwouts/jupytext/blob/main/demo/World%20population.pct.py) in the `percent` format.\n\n## The `marimo` format\n\nSince Jupytext v1.19, you can use the `py:marimo` format, in which text notebooks are converted to Jupyter notebooks, and back, using [Marimo](https://marimo.io/).\n\nOur [implementation](https://github.com/mwouts/jupytext/blob/main/src/jupytext/marimo.py) calls Marimo's converter directly (this requires Marimo v1.16.3 or later).\n\nPlease note that:\n- The format is available only for Python notebooks.\n- Marimo will add a suffix to variables that are defined multiple times, to make them compatible with its reactive evaluation.\n- Notebook and cell metadata (except tags) cannot be stored in the `py:marimo` file.\n- As of Marimo 0.17.8, empty cells are removed during round trips.\n\nYou can determine whether a given notebook is stable over a Marimo round trip with\n```\njupytext --test --to py:marimo your_notebook.ipynb\njupytext --test --to ipynb your_marimo_script.py\n```\n\n💡 If you notice unexpected changes, and can reproduce them with `marimo convert` and `marimo export ipynb --sort top-down`, report the issue on the Marimo [tracker](https://github.com/marimo-team/marimo/issues), and ping `@mwouts`. If you believe the issue is on Jupytext’s side, use the Jupytext [issue tracker](https://github.com/mwouts/jupytext/issues).\n\n## The `light` format\n\nThe `light` format was introduced by Jupytext. That format can represent any script in one of these [languages](https://github.com/mwouts/jupytext/blob/main/src/jupytext/languages.py) as a Jupyter notebook.\n\nWhen a script in the `light` format is converted to a notebook, Jupytext code paragraphs are turned into code cells, and comments that are not adjacent to code are converted to Markdown cells. Cell breaks occurs on blank lines outside of functions, classes or multiline comments.\n\nFor instance, in this example we have three cells:\n```python\n# This is a multiline\n# Markdown cell\n\n# Another Markdown cell\n\n\n# This is a code cell\nclass A():\n    def one():\n        return 1\n\n    def two():\n        return 2\n```\n\nCode cells can contain multiple code paragraphs. In that case Jupytext uses an explicit start-of-cell delimiter that is, by default, `# +` (`// +` in C++, etc). The default end of cell delimiter is `# -`, and can be omitted when followed by another explicit start of cell marker, or the end of the file:\n\n```python\n# +\n# A single code cell made of two paragraphs\na = 1\n\n\ndef f(x):\n    return x+a\n```\n\nMetadata can be associated to a given cell using a key/value representation:\n```python\n# + key=\"value\"\n# A code cell with metadata\n\n# + [markdown] key=\"value\"\n# A Markdown cell with metadata\n```\n\nThe `light` format can use custom cell markers instead of `# +` or `# -`. If you prefer to mark cells with VS Code/PyCharm (resp. Vim) folding markers, set `\"cell_markers\": \"region,endregion\"` (resp. `\"{{{,}}}\"`) in the jupytext section of the notebook metadata. If you want to configure this as a global default, add either\n```python\ncell_markers = \"region,endregion\"  # Use VS Code/PyCharm region folding delimiters\n```\nor\n```python\ncell_markers = \"{{{,}}}\"           # Use Vim region folding delimiters\n```\nto your [`jupytext.toml` configuration file](config.md#).\n\nSee how our `World population.ipynb` notebook is [represented](https://github.com/mwouts/jupytext/blob/main/demo/World%20population.lgt.py) in that format.\n\n## The `nomarker` format\n\nThe `nomarker` format is a variation of the `light` format with no cell marker at all. Please note that this format does not provide round-trip consistency - code cells are split on code paragraphs. By default, the `nomarker` format still includes a YAML header - if you prefer to also remove the header, set `\"notebook_metadata_filter\": \"-all\"` in the jupytext section of your notebook metadata.\n\n## Sphinx-gallery scripts\n\nAnother popular notebook-like format for Python scripts is the Sphinx-gallery [format](https://sphinx-gallery.github.io/stable/syntax.html). Scripts that contain at least two lines with more than twenty hash signs are classified as Sphinx-Gallery notebooks by Jupytext.\n\nComments in Sphinx-Gallery scripts are formatted using reStructuredText rather than markdown. They can be converted to markdown for a nicer display in Jupyter by adding a `sphinx_convert_rst2md = True` line to your Jupytext configuration file. Please note that this is a non-reversible transformation—use this only with Binder. Revert to the default value `sphinx_convert_rst2md = False` when you edit Sphinx-Gallery files with Jupytext.\n\nTurn a GitHub repository containing Sphinx-Gallery scripts into a live notebook repository with [Binder](https://mybinder.org/) and Jupytext by adding only two files to the repo:\n- `binder/requirements.txt`, a list of the required packages (including `jupytext`)\n- a [`jupytext.toml` configuration file](config.md#) with the following contents:\n```\npreferred_jupytext_formats_read = \"py:sphinx\"\nsphinx_convert_rst2md = true\n```\n\nOur sample notebook is also represented in `sphinx` format [here](https://github.com/mwouts/jupytext/blob/main/demo/World%20population.spx.py).\n"
  },
  {
    "path": "docs/index.md",
    "content": "```{include} ../README.md\n:relative-docs: docs/\n:start-after: <!-- INDEX-START -->\n```\n\n## Table of Contents\n\n```{toctree}\n:maxdepth: 1\ninstall.md\ntext-notebooks.md\npaired-notebooks.md\njupyterlab-extension.md\nvs-code.md\njupyter-collaboration.md\nconfig.md\nadvanced-options.md\nformats-scripts.md\nformats-markdown.md\nlanguages.md\nusing-cli.md\nusing-pre-commit.md\nfaq.md\ntutorials.md\ncontributing.md\ndeveloping.md\nchangelog.md\n```\n"
  },
  {
    "path": "docs/install.md",
    "content": "# Installation\n\nInstalling Jupytext is as simple as\n```bash\npip install jupytext\n```\nor\n```bash\nconda install jupytext -c conda-forge\n```\n\nYou should run either one of these commands in the Python environment from which you launch JupyterLab. Once you have installed Jupytext, you need to restart Jupyter to be able to use Jupytext within Jupyter.\n\nIf the Python environment where the Jupyter server runs is read-only, for instance if your server is started using JupyterHub, you can still install Jupytext in user mode with:\n```\n/path_to_your_jupyter_environment/python -m pip install jupytext --user\n```\n\nJupytext comes with a series of tools and plugin, which we will now briefly describe.\n\n## Jupytext's contents manager\n\nJupytext provides a contents manager that let Jupyter open and save notebooks as text files.\n\nJupytext's contents manager is activated automatically by Jupytext's server extension. When you start either `jupyter lab` or `jupyter notebook`, you should see a line that looks like:\n```bash\n[I 10:28:31.646 LabApp] [Jupytext Server Extension] Changing NotebookApp.contents_manager_class from LargeFileManager to jupytext.TextFileContentsManager\n```\n\nIf you don't see the message above after a fresh restart of your Jupyter server, please enable our server extension explicitly with\n```\njupyter serverextension enable jupytext\n```\n\nWhen [`jupyter-fs>=1.0.0`](https://github.com/jpmorganchase/jupyter-fs) is being used along with `jupytext`, use `SyncMetaManager` as the contents manager for `jupyter-fs` as `jupytext` do not support async contents manager which is used in default `MetaManager` of `jupyter-fs`. The `jupyter-fs` config must be as follows:\n\n```json\n{\n  \"ServerApp\": {\n    \"contents_manager_class\": \"jupyterfs.metamanager.SyncMetaManager\",\n  }\n}\n```\nso that `jupytext` will create its own contents manager derived from `SyncMetaManager`.\n\n## Jupytext commands in JupyterLab\n\nJupytext comes with a frontend extension for JupyterLab which provides pairing commands (accessible with View / Activate Command Palette, or Ctrl+Shift+C):\n\n![](images/pair_commands.png)\n\nThe Jupytext extension for JupyterLab is bundled with Jupytext. It should be installed and enabled automatically. You can `enable` or `disable` it manually with either\n```\njupyter labextension enable jupyterlab-jupytext\njupyter labextension disable jupyterlab-jupytext\n```\n\nFrom Jupytext 1.16.0 on, the version of the extension is compatible with JupyterLab 4.x only. If you wish to use Jupytext with JupyterLab 3.x or older, please\n- install the `jupytext` package using `pip` or `conda`\n- and then, install the last version of the `jupyterlab-jupytext` extension that is compatible with your version of JupyterLab, i.e.\n```\njupyter labextension install jupyterlab-jupytext@1.3.11  # for JupyterLab 3.x\njupyter labextension install jupyterlab-jupytext@1.2.2  # for JupyterLab 2.x\njupyter labextension install jupyterlab-jupytext@1.1.1  # for JupyterLab 1.x\n```\n\n## Jupytext menu in Jupyter Notebook\n\nIn Jupyter Notebook 7 you can use the same pairing commands as in JupyterLab (see above).\n\nIn Jupyter Notebook **classic**, i.e. Jupyter Notebook 6.x and below, Jupytext used to provided an extension that added a Jupytext section in the File menu.\n\n![](images/jupytext_menu.png)\n\nThat extension is available only for `jupytext<1.16`, and is automatically installed. If need be, you can install and activate it manually with\n```\njupyter nbextension install --py jupytext [--user]\njupyter nbextension enable --py jupytext [--user]\n```\n\nSee also [Issue #1095](https://github.com/mwouts/jupytext/issues/1095) where we discuss how to\nadd a Jupytext menu to JupyterLab and Notebook 7.x.\n\n## Jupytext's command line interface\n\nJupytext provides a `jupytext` command in the terminal that you can use to pair, synchronize or convert notebooks in different formats.\n\nThe CLI is documented [here](using-cli.md).\n\nRun `jupytext --version` to check which version of Jupytext is installed.\n\n## Jupytext as a Python library\n\nJupytext is also available as a Python library. The `jupytext` package exposes the same `read`, `write`, `reads` and `writes` functions than `nbformat`, meaning that you can read and write notebooks within Python like this:\n\n```\nimport jupytext\n\n# read a notebook from a file\nnb = jupytext.read(\"notebook.py\")\n\n# or from a string\nnb = jupytext.reads(text, fmt=\"md:myst\")\n\n# write a notebook to a file in the 'py:percent' format\njupytext.write(nb, \"notebook.py\", fmt=\"py:percent\")\n```\n\nIn the above, `nb` is an instance of an `nbformat` `NotebookNode`. The notebook format is documented in the [nbformat documentation](https://nbformat.readthedocs.io).\n"
  },
  {
    "path": "docs/jupyter-collaboration.md",
    "content": "# Jupyter Collaboration\n\n[Jupyter Collaboration](https://github.com/jupyterlab/jupyter-collaboration) is an official Jupyter extension that enables real-time collaboration in JupyterLab.\n\n## Autoreload Feature\n\nBeyond its collaboration features, Jupyter Collaboration also provides automatic file reloading. When the extension is installed, JupyterLab auto-reloads any file that gets modified on disk. This way, you can edit your notebook and text files outside of Jupyter, and the changes appear in Jupyter automatically without having to manually reload the document.\n\nNote that Jupyter Collaboration also comes with an auto-save feature. By [default](https://github.com/jupyterlab/jupyter-collaboration/blob/67453e04dad30978d42fdef07040ae94cabe2bf0/projects/jupyter-server-ydoc/jupyter_server_ydoc/app.py#L45-L84), notebooks and text documents are saved one second after your last change.\n\n## Collaborating on text notebooks\n\nCurrently, the real-time collaboration feature can be used:\n- in the notebook editor when opening `.ipynb` notebooks\n- in the text editor when opening `.py` or `.md` files\n\nHowever, it does not yet work on `.py` and `.md` files opened as notebooks. If you want to collaborate on text notebooks, we recommend that you collaborate on paired notebooks (see [#1432](https://github.com/mwouts/jupytext/issues/1432)).\n\n## Known issues\n\nWhile using Jupytext and Jupyter Collaboration together mostly works, we have noticed a few side effects. Please review the list of [known issues](https://github.com/mwouts/jupytext/issues?q=state%3Aopen%20label%3A%22jupyter-collaboration%22) and make sure that you are comfortable with these.\n"
  },
  {
    "path": "docs/jupyterlab-extension.md",
    "content": "# Frontend extension\n\nRecent versions of Jupytext (`>=1.16.0`) ships frontend extension that enables users\nto create text notebooks and pair notebooks from main menu of JupyterLab 4 and\nNotebook 7. In addition, the frontend extension adds selected Jupytext text\nnotebook formats to launcher in the `Jupytext` section so that users can launch text\nnotebooks as they launch a regular notebook from JupyterLab launcher.\n\n## Launcher icons\n\nAfter installing Jupytext extension, users will have a new category in the launcher\ncalled Jupytext as shown below:\n\n![](../jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests/jupytext-launcher.spec.ts-snapshots/launcher-category-jupytext-linux.png)\n\nUsers can remove and/or add new formats to the Jupytext section _via_ `Settings>Jupytext`.\n\n![](../jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests/jupytext-settings.spec.ts-snapshots/jupytext-settings-panel-jupytext-linux.png)\n\nBy (un)selecting different formats, users can filter the items in launcher and main menu. **Note** that users need to refresh the current browser tab when they modify the settings for them to take effect.\n\n## Main menu\n\nIt is also possible to create new text notebooks and/or pair existing notebooks from main menu and dedicated Jupytext main menu, respectively.\n\nFollowing screenshot shows the `New Text Notebook` submenu available in `File` menu.\n\n![](../jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests/jupytext-menu.spec.ts-snapshots/opened-jupytext-menu-file-new-text-notebook-jupytext-linux.png)\n\nSimilarly, to pair existing notebooks, users can go to `Jupytext` menu on main menu as shown below:\n\n![](../jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests/jupytext-menu.spec.ts-snapshots/opened-jupytext-menu-file-jupytext-jupytext-linux.png)\n\nAll the options are greyed out in the above screenshot as there is no notebook widget currently active. Once the user opens a new notebook, the options will become available.\n"
  },
  {
    "path": "docs/languages.md",
    "content": "# Supported Languages\n\nJupytext works with notebooks in any of the following languages:\n\n- Bash\n- C#\n- C++ (using either the xeus-cling or the ROOT kernel)\n- Clojure\n- Coconut\n- F#\n- Gnuplot\n- Go\n- Groovy\n- Haskell\n- IDL\n- Java\n- Javascript\n- Julia\n- Logtalk\n- Lua\n- Matlab\n- OCaml\n- Octave\n- PowerShell\n- Python\n- q/kdb+\n- R\n- Robot Framework\n- Rust/Evxcr\n- Sage\n- SAS\n- Scala\n- Scheme\n- Script of Script\n- Stata\n- Tcl\n- TypeScript\n- Wolfram Language\n  - Note that Jupytext uses the non-standard `.wolfram` file extension for Wolfram Language files to avoid conflicts with Matlab.\n- Xonsh\n\nExtending Jupytext to more languages should be easy, see the sections on [contributing to](contributing.md) and [developing](developing.md) Jupytext.\n"
  },
  {
    "path": "docs/make.bat",
    "content": "@ECHO OFF\n\npushd %~dp0\n\nREM Command file for Sphinx documentation\n\nif \"%SPHINXBUILD%\" == \"\" (\n\tset SPHINXBUILD=sphinx-build\n)\nset SOURCEDIR=.\nset BUILDDIR=_build\n\nif \"%1\" == \"\" goto help\n\n%SPHINXBUILD% >NUL 2>NUL\nif errorlevel 9009 (\n\techo.\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\n\techo.installed, then set the SPHINXBUILD environment variable to point\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\n\techo.may add the Sphinx directory to PATH.\n\techo.\n\techo.If you don't have Sphinx installed, grab it from\n\techo.http://sphinx-doc.org/\n\texit /b 1\n)\n\n%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%\ngoto end\n\n:help\n%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%\n\n:end\npopd\n"
  },
  {
    "path": "docs/paired-notebooks.md",
    "content": "# Paired notebooks\n\nBoth classical Jupyter Notebooks in the `.ipynb` format, and [text notebooks](text-notebooks.md), have great qualities. The former is a well established standard, contains all the notebook outputs, while the latter is lighter, easier to edit, and well suited for version control.\n\n_Paired notebooks_ give you the best of both worlds.\n\nThey work as follows:\n- When a paired notebook is opened, the inputs are loaded from the most recent file in the pair, while the outputs are loaded from the `.ipynb` file, if it exists\n- When a paired notebook is saved, all the files in the pair are updated (or recreated) with the new notebook content.\n\nThis means, in particular, that you can put under version control only the `.py` or `.md` representation of the notebook. When your collaborators\ncheck-out the updates on the text notebook, open it, then save it in Jupyter, the corresponding `.ipynb` file will be updated or even re-created if necessary.\n\n## How to pair a notebook\n\nIn JupyterLab, pair your notebook to one or more text formats with the [Jupytext commands](install.md#jupytext-commands-in-jupyterlab):\n\n![](images/pair_commands.png)\n\nThese commands simply add a `\"jupytext\": {\"formats\": \"ipynb,md\"}` entry to the notebook metadata.\n\nYou can also configure the notebook pairing [globally](config.md) for all your notebooks.\n\n## Can I edit a notebook simultaneously in Jupyter and in a text editor?\n\nWhen saving a paired notebook, Jupyter updates both the `.ipynb` and its text representation. The text representation can be edited outside of Jupyter. When the notebook is refreshed in Jupyter, the input cells are read from the text file, and the output cells from the `.ipynb` file.\n\nIt is possible (and convenient) to leave the notebook open in Jupyter while you edit its text representation. However, you don't want the two editors to save the notebook simultaneously. To avoid this:\n- deactivate Jupyter's autosave, and\n- make sure you reload the notebook when you switch back from the editor to Jupyter.\n\nIn case you forgot to reload, and saved the Jupyter notebook while the text representation had changed, no worries: Jupyter will ask you which version you want to keep:\n\n![](https://github.com/mwouts/jupytext-screenshots/raw/master/JupytextDocumentation/NotebookChanged.png)\n\nIf that happens, simply select the version that has the most recent changes (or: make a copy of the `.py` notebook on disk, click on _overwrite_ in Jupyter, and reconcile manually the two `.py` files).\n"
  },
  {
    "path": "docs/text-notebooks.md",
    "content": "# Text notebooks\n\nJupytext can save Jupyter Notebooks as text files, with e.g. a `.py` or `.md`\nextension. These text files only contain the inputs of your notebooks, as well\nas [selected metadata](advanced-options.md#metadata-filtering).\n\nText notebooks are well suited for version control. They are standard text files\nand you can easily edit or refactor them in the editor of your choice.\n\nThe outputs of the notebook are not stored on disk, unless you decide to\n[pair](paired-notebooks.md) your text notebook to a regular `.ipynb` file.\n\n## How to open a text notebook in JupyterLab\n\nOnce you have [installed](install.md) Jupytext, you can open and run `.py` and `.md` files as\nnotebooks.\n\n### With a right click\n\nRight click on the text notebook, then select _Open With_ → _Notebook_:\n\n![](images/jupyterlab_right_click.png)\n\nNotes:\n\n* you can achieve the same result if you use _Open With_ → _Jupytext Notebook_\n* to open links to `.md` files in notebooks with the Notebook editor, you will\n  need `jupyterlab>=3.6.0`.\n\n### With a double click\n\nRight clicking and the _Open With_ submenu allows you to choose among several\nways to open a file (several **viewers**, in JupyterLab jargon); and when you\ndouble click instead, you open the file using **its default viewer**.\n\nThe default viewer for text notebooks is by default configured to be the\n**Editor** (which means: text editor); if you'd prefer to have the text files\nopen as a notebook instead, you have the option to **redefine the default\nviewer**, which is something defined for each document type.\n\nSince version 1.15.1, `jupytext` comes with a helper command that allows you to\ndo this from the command line; and essentially you would just need to run\n\n```bash\njupytext-config set-default-viewer\n```\n\nSee also [the last section below](#more-on-default-viewers) for alternative\nmeans to change and inspect the default viewers configuration\n\n## How to open a text notebook in Jupyter notebook (nb7)\n\nAs of July 2023, Jupyter Notebook now comes as version 7.x - and is known in short as nb7\n\nnb7 being built on top of JupyterLab, the principles described above apply as\nwell in this context; which means that\n\n* you can always right-click a file and select *Open With* → *Notebook*;\n* and if you have properly defined the default viewers as described above, you\n  can also double-click a file to open it as a notebook.\n\n\n## How to open a text notebook in Jupyter Notebook (classic)\n\nPrevious releases of Jupyter Notebook, i.e. up to version 6, were known as notebook classic\n\nBy default, notebook classic opens scripts and Markdown documents as notebooks.\nIf you want to open them with the text editor, select the document and click on\n_edit_:\n\n![](https://github.com/mwouts/jupytext-screenshots/raw/master/JupytextDocumentation/OpenAsText.png)\n\n\n## How to decide which extensions are notebooks\n\nBy default, Jupytext will classify documents with a `.py`, `.R`, `.jl`, `.md`,\n`.Rmd`, `.qmd` extension (and more!) as notebooks. If you prefer to limit the\nnotebook type to certain extensions, you can add a `notebook_extensions` option\nto your [Jupytext config file (`jupytext.toml`)](config.md) configuration file\nwith, for instance, the following value:\n```\nnotebook_extensions = \"ipynb,md,qmd,Rmd\"\n```\n\n\n## More on default viewers\n\n### `jupytext-config`\n\nThis command has more options than the one shown above; in particular:\n\n* you can use `jupytext-config` to set only some of the default viewers; for\n  example, if you want to have your `.py` and `.md` files open as a notebook\n  when you double-click them e.g.\n  `jupytext-config set-default-viewer python markdown`\n* you can use `jupytext-config` to inspect the current configuration, e.g.\n  `jupytext-config list-default-viewer`\n* you can use `jupytext-config unset-default-viewer python` to remove some of the settings\n\nHere's an example of a session, starting from the default config of JupyterLab\n```bash\n# starting from the default config of JupyterLab\n$ jupytext-config list-default-viewer\n# we add the default viewer for 2 doctypes\n$ jupytext-config set-default-viewer python markdown\n# we check what was done\n$ jupytext-config list-default-viewer\npython: Jupytext Notebook\nmarkdown: Jupytext Notebook\n# we can now remove the default viewer for markdown\n$ jupytext-config unset-default-viewer markdown\n# and check again\n$ jupytext-config list-default-viewer\npython: Jupytext Notebook\n$\n```\n\n### From JupyterLab settings dialog\n\nAlternatively to using `jupytext-config`, you can also find the configuration of the default viewers from JupyterLab interactively; to do so, go to _Settings_, _Advanced Settings Editor_, and in the JSON view for the `Document Manager` copy-paste the following settings (or the subset that matches your use case):\n\n```json\n{\n  \"defaultViewers\": {\n    \"markdown\": \"Jupytext Notebook\",\n    \"myst\": \"Jupytext Notebook\",\n    \"r-markdown\": \"Jupytext Notebook\",\n    \"quarto\": \"Jupytext Notebook\",\n    \"julia\": \"Jupytext Notebook\",\n    \"python\": \"Jupytext Notebook\",\n    \"r\": \"Jupytext Notebook\"\n  }\n}\n```\n\nHere is a screencast of the steps to follow:\n\n![](images/jupyterlab_default_viewer.gif)\n"
  },
  {
    "path": "docs/tutorials.md",
    "content": "# Blog posts and talks\n\nOver the course of the years I wrote a few different blog posts about Jupytext, about text notebooks, their integration with the most popular IDEs, etc. They might help you get started with Jupytext:\n\n- Read the original [announcement](https://towardsdatascience.com/introducing-jupytext-9234fdff6c57) in _Towards Data Science_ (Sept. 2018),\n- Watch the [PyParis talk](https://github.com/mwouts/jupytext_pyparis_2018/blob/master/README.md) (Nov. 2018),\n- Read our article on [Jupytext and Papermill](https://medium.com/capital-fund-management/automated-reports-with-jupyter-notebooks-using-jupytext-and-papermill-619e60c37330) in _CFM Insights_ (Sept. 2019)\n- See how you can edit [Jupyter Notebooks in VS Code or PyCharm](https://towardsdatascience.com/jupyter-notebooks-in-the-ide-visual-studio-code-versus-pycharm-5e72218eb3e8) with (or without!) Jupytext (Jan. 2020)\n- Watch the [JupyterCon 2020 talk](https://github.com/mwouts/jupytext_jupytercon2020/blob/master/README.md) on Jupytext (Oct. 2020),\n- or, try Jupytext online with [binder](https://mybinder.org/v2/gh/mwouts/jupytext/main?urlpath=lab/tree/demo/get_started.ipynb)!\n"
  },
  {
    "path": "docs/using-cli.md",
    "content": "# Jupytext CLI\n\n## Command line conversion\n\nJupytext provides command line interface for converting notebooks between the different formats.\n\n```bash\njupytext --to py notebook.ipynb                 # convert notebook.ipynb to a .py file\njupytext --to py:percent notebook.ipynb         # convert notebook.ipynb to a .py file in the double percent format\njupytext --to py:percent --opt comment_magics=false notebook.ipynb   # same as above + do not comment magic commands\njupytext --to markdown notebook.ipynb           # convert notebook.ipynb to a .md file\njupytext --output script.py notebook.ipynb      # convert notebook.ipynb to a script.py file\n\njupytext --to notebook notebook.py              # convert notebook.py to an .ipynb file with no outputs\njupytext --update --to notebook notebook.py     # update the input cells in the .ipynb file and preserve outputs and metadata\n\njupytext --to md --test notebook.ipynb          # Test round trip conversion\n\njupytext --to md --output - notebook.ipynb      # display the markdown version on screen\njupytext --from ipynb --to py:percent           # read ipynb from stdin and write double percent script on stdout\n```\n\nJupytext has a `--sync` mode that updates all the paired representations of a notebook based on timestamps:\n```bash\njupytext --set-formats ipynb,py notebook.ipynb  # Turn notebook.ipynb into a paired ipynb/py notebook\njupytext --sync notebook.ipynb                  # Update whichever of notebook.ipynb/notebook.py is outdated\n```\n\nYou may also find useful to `--pipe` the text representation of a notebook into tools like `black`:\n```bash\njupytext --sync --pipe black notebook.ipynb    # read most recent version of notebook, reformat with black, save\n```\n\nTo reorder the imports in your notebook, use\n```bash\njupytext --pipe 'isort - --treat-comment-as-code \"# %%\" --float-to-top' notebook.ipynb\n```\n(remove the `--float-to-top` argument if you prefer to run `isort` per cell).\n\nFor programs that don't accept pipes, use `{}` as a placeholder for the name of a temporary file that will contain the text representation of the notebook. For instance, run `pytest` on your notebook with:\n```bash\njupytext --check 'pytest {}' notebook.ipynb    # export the notebook in format py:percent in a temp file, run pytest\n```\nRead more about running `pytest` on notebooks in our example [`Tests in a notebook.md`](https://github.com/mwouts/jupytext/blob/main/demo/Tests%20in%20a%20notebook.md#).\nNote also that on Windows you need to use double quotes instead of single quotes and type e.g. `jupytext --check \"pytest {}\" notebook.ipynb`.\n\nExecute `jupytext --help` to access the full documentation.\n\n### Execute notebook cells\n\nFor convenience, when creating a notebook from text you can execute it:\n\n```bash\njupytext --set-kernel - notebook.md             # create a YAML header with kernel metadata matching the current python executable\njupytext --set-formats md:myst notebook.md      # create a YAML header with an explicit jupytext format\njupytext --to notebook --execute notebook.md    # convert notebook.md to an .ipynb file and run it\n```\n\nIf you wanted to convert a collection of Markdown files to paired notebooks, and execute them in the current Python environment, you could run:\n```bash\njupytext --set-formats ipynb,md --execute *.md\n```\n\n#### Advanced usage: error tolerance\n\nIf any notebook cell errors, execution will terminate and `jupytext` will not save the notebook. This can cause headaches as the details of any error would be encoded in the notebook, which would not have been saved. But there's an error-tolerant way to execute a notebook: `jupyter nbconvert` has a mode which will still save a notebook if a cell errors, producing something akin to what would happen if you ran all cells manually in Jupyter's notebook UI.\n\n```bash\n# First, convert script (py/sh/R/jl etc) -> notebook. May need additional args to define input format etc as above.\njupytext --to ipynb script.py\n# Then, execute notebook in place and allowing cells to produce errors\njupyter nbconvert --to ipynb --inplace --execute --allow-errors script.ipynb\n# One can also combine these to a single command using jupytext --pipe\njupytext --to ipynb --pipe-fmt ipynb \\\n  --pipe 'jupyter nbconvert --to ipynb --execute --allow-errors --stdin --stdout' \\\n  script.py\n```\n\nIn each of the above, `jupyter nbconvert` could be replaced with any alternative tool to execute a jupyter notebook non-interactively, including [papermill](https://github.com/nteract/papermill) which would allow notebook parameterisation (see [@mwouts' post on the topic here](https://github.com/CFMTech/jupytext_papermill_post/blob/master/README.md)).\n\n## Testing the round-trip conversion\n\nRepresenting Jupyter notebooks as scripts requires a solid round trip conversion. You don't want your notebooks (nor your scripts) to change because you are converting them to the other form. Our test suite includes a few hundred tests to ensure that round trip conversion is safe.\n\nYou can test yourself that the round trip conversion preserves your Jupyter notebooks and scripts. Run for instance:\n```bash\n# Test the ipynb -> py:percent -> ipynb round trip conversion\njupytext --test notebook.ipynb --to py:percent\n\n# Test the ipynb -> (py:percent + ipynb) -> ipynb (à la paired notebook) conversion\njupytext --test --update notebook.ipynb --to py:percent\n```\n\nNote that `jupytext --test` compares the resulting notebooks according to its expectations. If you wish to proceed to a strict comparison of the two notebooks, use `jupytext --test-strict`, and use the flag `-x` to report with more details on the first difference, if any.\n\n## Cell and notebook metadata\n\nWhen a scripts is converted to an `.ipynb` notebook, Jupytext will set empty notebook and cell [metadata filters](advanced-options.md) to avoid having notebook or cell metadata added back to the script. Remove these filters if you want to store Jupytext's settings, or the kernel information, in the text file.\n\nCell metadata are available in the `light` and `percent` formats, as well as in the MyST Markdown, R Markdown and Jupytext Markdown formats. R scripts in `spin` format support cell metadata for code cells only. Sphinx Gallery scripts in `sphinx` format do not support cell metadata.\n\nA few cell metadata are not included in the text representation of the notebook, and only the most standard notebook metadata are exported - see the section on [metadata filters](advanced-options.md).\n"
  },
  {
    "path": "docs/using-pre-commit.md",
    "content": "# Pre-commit hook\n\nJupytext includes a hook for the [pre-commit](https://pre-commit.com/) framework.\n\n## Do I need to use this hook?\n\nYou don't need Jupytext's pre-commit hook if you commit only the `.py` (or `.md`) representation of notebooks in your Git repository.\n\nIn that case, a possible pre-commit `.pre-commit-config.yaml` configuration that works well with `.py:percent` notebooks (and does not include a `jupytext` pre-commit hook!) is the following:\n\n```yaml\nrepos:\n- repo: https://github.com/pycqa/isort\n    rev: 5.11.2\n    hooks:\n    - id: isort\n      args: [--treat-comment-as-code, \"# %%\", --float-to-top]\n\n- repo: https://github.com/astral-sh/ruff-pre-commit\n  rev: v0.0.275\n  hooks:\n    - id: ruff\n      args: [--fix, --exit-non-zero-on-fix]\n\n- repo: https://github.com/psf/black\n    rev: 23.3.0\n    hooks:\n    - id: black\n      language_version: python3\n```\n\n## What is the point of having a `jupytext` pre-commit hook?\n\nJupyter keeps paired `.py` and `.ipynb` files in sync, but the synchronization happens only when you _save_ the notebook in Jupyter. If you edit the `.py` file manually, then the `.ipynb` file will be outdated until you reload and save the notebook in Jupyter, or execute `jupytext --sync`.\n\nJupytext's pre-commit hook can enforce this synchronization on commits:\n```yaml\nrepos:\n-   repo: https://github.com/mwouts/jupytext\n    rev: v1.14.7  # CURRENT_TAG/COMMIT_HASH\n    hooks:\n    - id: jupytext\n      args: [--sync]\n```\n\nIf you combine Jupytext with other pre-commit hooks, you must ensure that all hooks will pass on any files you generate. For example, if you have a hook for using `black` to format all your python code, then you should use Jupytext's `--pipe` option to also format newly generated Python scripts before writing them:\n\n```yaml\nrepos:\n-   repo: https://github.com/mwouts/jupytext\n    rev: v1.14.7  # CURRENT_TAG/COMMIT_HASH\n    hooks:\n    - id: jupytext\n      args: [--sync, --pipe, black]\n      additional_dependencies:\n        - black==23.3.0 # Matches hook\n\n-   repo: https://github.com/psf/black\n    rev: 23.3.0\n    hooks:\n    - id: black\n      language_version: python3\n```\n\nTested examples of how to use the pre-commit hook are available in our [tests](https://github.com/mwouts/jupytext/tree/main/tests/external/pre_commit) -\nsee for instance [test_pre_commit_1_sync_with_config.py](https://github.com/mwouts/jupytext/blob/main/tests/external/pre_commit/test_pre_commit_1_sync_with_config.py).\n"
  },
  {
    "path": "docs/vs-code.md",
    "content": "# VS Code\n\n## The Jupytext Sync Extension\n\nYou can get the same pairing and synchronization functionality in VS Code as in Jupyter, thanks to the [Jupytext Sync](https://marketplace.visualstudio.com/items?itemName=caenrigen.jupytext-sync) extension for VS Code. The extension is developed by Victor Negîrneac on [GitHub](https://github.com/caenrigen/vscode-jupytext-sync) under a MIT license.\n\n### Installation\n\nInstall the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=caenrigen.jupytext-sync) or search for \"Jupytext Sync\" in the VS Code Extensions view.\n\n### Usage\n\nWith the Jupytext Sync extension active, open both the `.ipynb` and `.py` paired files in your editor. When you save changes to either file, they are automatically propagated to the other paired file(s).\n\n💡 **Tip:** Save your changes before switching editors. If a file has unsaved edits, VS Code will not auto-reload it when the paired file is saved, until you either save (overwrite) or revert your changes.\n\n![](images/paired_notebook_in_vs_code.png)\n\n### Configuration\n\nThe Jupytext Sync extension is aware of your `jupytext.toml` or `pyproject.toml` [configuration files](config.md), so you can use those to pair your notebooks or control which metadata you want in the text notebooks.\n\nThe extension also gives you the option to pair the notebooks individually. Read more about these features in the extension's [documentation](https://marketplace.visualstudio.com/items?itemName=caenrigen.jupytext-sync).\n\n### Requirements\n\nThe Jupytext Sync extension requires Jupytext 1.17.3 or later to properly identify which files are paired. Additionally, the `jupytext --sync` command gained the ability to detect simultaneous modifications in Jupytext 1.18.0, so we recommend updating to the latest version if possible.\n"
  },
  {
    "path": "jupyterlab/.gitignore",
    "content": ".build\n.cache\n.coverage\n.pytest_cache\n.eggs\n.tox\nbuild\n/dist\nvenv\njupytext.egg-info\nfuture\n*.pyc\ngits*\n.ipynb_checkpoints\njupyterlab_jupytext/labextension\n\n# Ignore node_modules and yarn cache\nnode_modules/\n.yarn\n*.bundle.*\nlib/\n*.log\n.eslintcache\n.stylelintcache\n*.egg-info/\n.ipynb_checkpoints\n*.tsbuildinfo\n\n# Ignore playwright stuff\n**/playwright-report\n**/test-results\n"
  },
  {
    "path": "jupyterlab/.prettierignore",
    "content": "node_modules\n**/node_modules\n**/lib\n**/labextension\n**/package.json\n**/venv\n**/.venv\n**/jupyter-config\n"
  },
  {
    "path": "jupyterlab/.yarnrc.yml",
    "content": "enableImmutableInstalls: false\nnodeLinker: node-modules\n"
  },
  {
    "path": "jupyterlab/install.json",
    "content": "{\n  \"packageManager\": \"python\",\n  \"packageName\": \"jupytext\",\n  \"uninstallInstructions\": \"Use your Python package manager (pip, conda, etc.) to uninstall the package jupytext\"\n}\n"
  },
  {
    "path": "jupyterlab/jupyter-config/jupyter_notebook_config.d/jupytext.json",
    "content": "{\n  \"NotebookApp\": {\n    \"nbserver_extensions\": {\n      \"jupyterlab_jupytext\": true\n    }\n  }\n}\n"
  },
  {
    "path": "jupyterlab/jupyter-config/jupyter_server_config.d/jupytext.json",
    "content": "{\n  \"ServerApp\": {\n    \"jpserver_extensions\": {\n      \"jupyterlab_jupytext\": true\n    }\n  }\n}\n"
  },
  {
    "path": "jupyterlab/jupyterlab_jupytext/__init__.py",
    "content": "\"\"\"Jupyter server and lab extension entry points\"\"\"\n\nimport asyncio\n\nfrom jupytext.reraise import reraise\n\ntry:\n    from jupytext.async_contentsmanager import (\n        build_async_jupytext_contents_manager_class,\n    )\nexcept ImportError as err:\n    build_async_jupytext_contents_manager_class = reraise(err)\n\ntry:\n    from jupytext.sync_contentsmanager import build_sync_jupytext_contents_manager_class\nexcept ImportError as err:\n    build_sync_jupytext_contents_manager_class = reraise(err)\n\n\ndef load_jupyter_server_extension(app):  # pragma: no cover\n    \"\"\"Use Jupytext's contents manager\"\"\"\n    if hasattr(app.contents_manager_class, \"formats\"):\n        app.log.info(\n            \"[Jupytext Server Extension] NotebookApp.contents_manager_class is \"\n            \"(a subclass of) jupytext.TextFileContentsManager already - OK\"\n        )\n        return\n\n    # The server extension call is too late!\n    # The contents manager was set at NotebookApp.init_configurables\n\n    base_class = app.contents_manager_class\n\n    asynchronous = asyncio.iscoroutinefunction(base_class.get)\n    app.log.info(\n        \"[Jupytext Server Extension] Deriving \"\n        + (\"an Async\" if asynchronous else \"a \")\n        + \"TextFileContentsManager from \"\n        + base_class.__name__\n    )\n\n    if asyncio.iscoroutinefunction(base_class.get):\n        app.contents_manager_class = build_async_jupytext_contents_manager_class(base_class)\n    else:\n        app.contents_manager_class = build_sync_jupytext_contents_manager_class(base_class)\n\n    try:\n        # And rerun selected init steps from https://github.com/jupyter/notebook/blob/\n        # 132f27306522b32fa667a6b208034cb7a04025c9/notebook/notebookapp.py#L1634-L1638\n\n        # app.init_configurables()\n        app.contents_manager = app.contents_manager_class(parent=app, log=app.log)\n        app.session_manager.contents_manager = app.contents_manager\n\n        # app.init_components()\n        # app.init_webapp()\n        app.web_app.settings[\"contents_manager\"] = app.contents_manager\n\n        # app.init_terminals()\n        # app.init_signal()\n\n    except Exception:\n        app.log.error(\n            \"\"\"[Jupytext Server Extension] An error occurred. Please deactivate the server extension with\n    jupyter serverextension disable jupytext\nand configure the contents manager manually by adding\n    c.NotebookApp.contents_manager_class = \"jupytext.TextFileContentsManager\"\nto your .jupyter/jupyter_notebook_config.py file.\n\"\"\"\n        )\n        raise\n\n\ndef _jupyter_labextension_paths():\n    return [{\"src\": \"labextension\", \"dest\": \"jupyterlab-jupytext\"}]\n"
  },
  {
    "path": "jupyterlab/lerna.json",
    "content": "{\n  \"$schema\": \"node_modules/lerna/schemas/lerna-schema.json\",\n  \"version\": \"independent\",\n  \"npmClient\": \"yarn\"\n}\n"
  },
  {
    "path": "jupyterlab/package.json",
    "content": "{\n    \"name\": \"jupyterlab-jupytext-extensions\",\n    \"version\": \"1.0.0\",\n    \"private\": true,\n    \"files\": [],\n    \"workspaces\": [\n        \"packages/*\"\n    ],\n    \"scripts\": {\n        \"build\": \"lerna run --parallel build\",\n        \"build:prod\": \"lerna run --parallel build:prod\",\n        \"install-ext\": \"lerna run build:labextension:dev\",\n        \"clean:all\": \"lerna run --parallel clean:all\",\n        \"eslint\": \"eslint . --ext .ts,.tsx --fix\",\n        \"eslint:check\": \"eslint . --ext .ts,.tsx\",\n        \"prettier\": \"prettier --write \\\"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\\\"\",\n        \"prettier:check\": \"prettier --list-different \\\"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\\\"\",\n        \"stylelint\": \"jlpm stylelint:check --fix\",\n        \"stylelint:check\": \"stylelint --cache \\\"packages/*/style/**/*.css\\\"\",\n        \"stylelint:files\": \"stylelint --fix\",\n        \"lint\": \"jlpm && jlpm prettier && jlpm eslint && jlpm stylelint\",\n        \"lint:check\": \"jlpm prettier:check && jlpm eslint:check && jlpm stylelint:check\",\n        \"update-dependency\": \"update-dependency --lerna\",\n        \"watch\": \"lerna run --parallel watch\"\n    },\n    \"devDependencies\": {\n        \"@typescript-eslint/eslint-plugin\": \"~6.13.2\",\n        \"@typescript-eslint/parser\": \"~6.13.2\",\n        \"eslint\": \"~8.55.0\",\n        \"eslint-config-prettier\": \"~9.1.0\",\n        \"eslint-plugin-prettier\": \"~5.0.1\",\n        \"lerna\": \"^7.1.4\",\n        \"prettier\": \"^3.5.3\",\n        \"stylelint\": \"^16.15.0\",\n        \"stylelint-config-prettier\": \"^9.0.4\",\n        \"stylelint-config-recommended\": \"^15.0.0\",\n        \"stylelint-config-standard\": \"^37.0.0\",\n        \"stylelint-prettier\": \"^5.0.3\"\n    },\n    \"resolutions\": {\n        \"tar\": \"7.5.3\",\n        \"glob\": \"10.5.0\",\n        \"systeminformation\": \"5.27.14\"\n    },\n    \"styleModule\": \"packages/*/style/index.js\",\n    \"eslintIgnore\": [\n        \"**/*.d.ts\",\n        \"dist\",\n        \"*node_modules*\",\n        \"coverage\",\n        \"tests\",\n        \"venv\",\n        \".venv\"\n    ],\n    \"prettier\": {\n        \"singleQuote\": true\n    },\n    \"eslintConfig\": {\n        \"extends\": [\n            \"eslint:recommended\",\n            \"plugin:@typescript-eslint/eslint-recommended\",\n            \"plugin:@typescript-eslint/recommended\",\n            \"plugin:prettier/recommended\"\n        ],\n        \"parser\": \"@typescript-eslint/parser\",\n        \"parserOptions\": {\n            \"project\": \"packages/**/tsconfig.json\",\n            \"sourceType\": \"module\",\n            \"tsconfigRootDir\": \".\"\n        },\n        \"plugins\": [\n            \"@typescript-eslint\"\n        ],\n        \"rules\": {\n            \"@typescript-eslint/naming-convention\": [\n                \"error\",\n                {\n                    \"selector\": \"interface\",\n                    \"format\": [\n                        \"PascalCase\"\n                    ],\n                    \"custom\": {\n                        \"regex\": \"^I[A-Z]\",\n                        \"match\": true\n                    }\n                }\n            ],\n            \"@typescript-eslint/no-unused-vars\": [\n                \"warn\",\n                {\n                    \"args\": \"none\"\n                }\n            ],\n            \"@typescript-eslint/no-explicit-any\": \"off\",\n            \"@typescript-eslint/no-namespace\": \"off\",\n            \"@typescript-eslint/no-use-before-define\": \"off\",\n            \"@typescript-eslint/quotes\": [\n                \"error\",\n                \"single\",\n                {\n                    \"avoidEscape\": true,\n                    \"allowTemplateLiterals\": false\n                }\n            ],\n            \"curly\": [\n                \"error\",\n                \"all\"\n            ],\n            \"eqeqeq\": \"error\",\n            \"prefer-arrow-callback\": \"error\"\n        }\n    },\n    \"stylelint\": {\n        \"extends\": [\n            \"stylelint-config-recommended\",\n            \"stylelint-config-standard\",\n            \"stylelint-prettier/recommended\"\n        ],\n        \"rules\": {\n            \"no-empty-source\": null,\n            \"selector-class-pattern\": null,\n            \"property-no-vendor-prefix\": null,\n            \"selector-no-vendor-prefix\": null,\n            \"value-no-vendor-prefix\": null\n        }\n    }\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/.gitignore",
    "content": "*.bundle.*\nlib/\nnode_modules/\n*.egg-info/\n.ipynb_checkpoints\n*.tgz\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/CHANGELOG.md",
    "content": "# 1.4.6 (2025-10-18)\n\nWe have added support for pairing notebooks to Python scripts in the Marimo format\n\n# 1.4.5 (2025-08-09)\n\nThe dependencies of the JupyterLab extension were updated to address [security issues](https://github.com/mwouts/jupytext/security/dependabot):\n\n- [#1360](https://github.com/mwouts/jupytext/pull/1360)\n- [#1410](https://github.com/mwouts/jupytext/pull/1410)\n- [#1412](https://github.com/mwouts/jupytext/pull/1412)\n\n# 1.4.4 (2025-04-05)\n\nThe context menu has a \"New Text Notebook\" entry. Thanks to [Mahendra Paipuri](https://github.com/mahendrapaipuri) for this PR ([#1365](https://github.com/mwouts/jupytext/pull/1365))!\n\nWe have updated the JupyterLab extension dependencies ([#1300](https://github.com/mwouts/jupytext/pull/1300), [#1355](https://github.com/mwouts/jupytext/pull/1355), [#1360](https://github.com/mwouts/jupytext/pull/1360)). Thanks to [Mahendra Paipuri](https://github.com/mahendrapaipuri) for these PRs!\n\nThe dependencies of the JupyterLab extension were updated to address [security issues](https://github.com/mwouts/jupytext/security/dependabot):\n\n- [#1272](https://github.com/mwouts/jupytext/issues/1272)\n- [#1273](https://github.com/mwouts/jupytext/issues/1273)\n- [#1280](https://github.com/mwouts/jupytext/issues/1280)\n- [#1285](https://github.com/mwouts/jupytext/issues/1285)\n- [#1290](https://github.com/mwouts/jupytext/issues/1290)\n- [#1304](https://github.com/mwouts/jupytext/pull/1304)\n\n# 1.4.3 (2024-05-05)\n\n- JupyterLab's dependency `ejs` was updated from 3.1.9 to 3.1.10 ([#1231](https://github.com/mwouts/jupytext/issues/1231))\n- JupyterLab's dependency `follow-redirects` was updated from 1.15.4 to 1.15.6 ([#1218](https://github.com/mwouts/jupytext/issues/1218))\n- JupyterLab's dependency `ip` was updated from 2.0.0 to 2.0.1 ([#1216](https://github.com/mwouts/jupytext/issues/1216))\n\n# 1.4.2 (2024-01-13)\n\n- Fixed an issue about unpairing notebooks from the Jupytext Menu ([#1197](https://github.com/mwouts/jupytext/issues/1197))\n- JupyterLab's dependency `follow-redirects` was updated from 1.15.3 to 1.15.4 ([#1203](https://github.com/mwouts/jupytext/issues/1203))\n\n# 1.4.1 (2023-11-27)\n\n- The Jupytext Menu is back! And text notebooks can be created directly from the launcher. This is an outstanding contribution by [Mahendra Paipuri](https://github.com/mahendrapaipuri) ([#1154](https://github.com/mwouts/jupytext/issues/1154), [#1163](https://github.com/mwouts/jupytext/issues/1163)). This requires JupyterLab 4.x or Jupyter Notebook 7.x.\n\n# 1.4.0 (2023-10-22)\n\n- This version of the JupyterLab extension is fully compatible with (and requires) JupyterLab 4.x.\n\n# 1.3.11 (2023-10-22)\n\n- This version is the same as 1.3.10. It was re-published to include the README that was missing in 1.3.10.\n\n# 1.3.10 (2023-10-22)\n\n- The server extension for `jupytext` has been moved from core Jupytext to the (Python) `jupyterlab-jupytext` extension.\n- The JupyterLab extension is now compatible with the [JupyterLab RISE](https://github.com/jupyterlab-contrib/rise) extension. Many thanks to [Frédéric Collonval](https://github.com/fcollonval) for his PR ([#1126](https://github.com/mwouts/jupytext/pull/1126))!\n- This version of the JupyterLab extension is compatible with JupyterLab 4.x. Many thanks to [Thierry Parmentelat](https://github.com/parmentelat) for his PRs! ([#1092](https://github.com/mwouts/jupytext/pull/1092), [#1109](https://github.com/mwouts/jupytext/pull/1109))\n\n# 1.3.9 (2022-06-02)\n\n- We updated the `yarn.lock` file for the jupyter lab extension to address security vulnerabilities ([#904](https://github.com/mwouts/jupytext/issues/904), [#925](https://github.com/mwouts/jupytext/issues/925), [#935](https://github.com/mwouts/jupytext/issues/935), [#939](https://github.com/mwouts/jupytext/issues/939), [#984](https://github.com/mwouts/jupytext/issues/984), [#1005](https://github.com/mwouts/jupytext/issues/1005), [#1011](https://github.com/mwouts/jupytext/issues/1011), [#1030](https://github.com/mwouts/jupytext/issues/1030), [#1036](https://github.com/mwouts/jupytext/issues/1036), [#1052](https://github.com/mwouts/jupytext/pull/1052))\n- This version is the last version that is compatible with `jupyterlab==3.x`.\n\n# 1.3.8 (2021-12-03)\n\n- The \"Jupytext Notebook\" factory that lets the user configure the Notebook viewer as the default for text notebooks accepts more filetypes: \"myst\", \"r-markdown\" and \"quarto\" ([#803](https://github.com/mwouts/jupytext/issues/803))\n\n# 1.3.7 (2021-11-30)\n\nThe extension for JupyterLab benefited from a series of improvements contributed by [Frédéric Collonval](https://github.com/fcollonval):\n\n- A new \"Jupytext Notebook\" factory offers the option to open text notebooks directly with the notebook view (#803). To use it, follow the instructions in the [documentation](https://github.com/mwouts/jupytext/blob/main/docs/index.md#Install).\n- The ICommandPalette is optional, for compatibility with RISE within JupyterLab [RISE#605](https://github.com/damianavila/RISE/pull/605)\n- Added support for translation.\n\nWe also upgraded the extension dependency and especially `json-schema` to address a security vulnerability.\n\n# 1.3.6 (2021-09-23)\n\n- We have upgraded the extension dependencies and especially `ansi-regex` to fix a security vulnerability (#857)\n\n# 1.3.5 (2021-09-05)\n\n- The extension can pair notebooks with `.qmd` files (Quarto format) (#837)\n\n# 1.3.4 (2021-08-31)\n\n- We have upgraded the extension dependencies and especially `tar` and `url-parse` to fix two security vulnerabilities (#842) (#843)\n\n# 1.3.3 (2021-06-10)\n\n- We have upgraded the extension dependencies and especially `ws` to fix a security vulnerability (#798)\n\n# 1.3.2 (2021-05-21)\n\n- We have upgraded the extension dependencies and especially `hosted-git-info` to fix a security vulnerability (#783)\n\n# 1.3.1 (2021-03-07)\n\n- We have updated `yarn.lock` to upgrade `marked` to `2.0` and fix a moderate vulnerability in the extension dependencies (#750)\n\n# 1.3.0 (2021-01-05)\n\n- The `jupyterlab-jupytext` extension is now distributed using `jupyter-packaging`, thanks to Martin Renou's awesome contribution (#683).\n\n# 1.2.3 (2020-10-14)\n\n- Remove duplicate `jupyterlab` entry in `package.json` (#654)\n\n# 1.2.2 (2020-10-13)\n\n- The description of the `jupyterlab-jupytext` extension was updated (#654)\n- The explicit dependency on the `jupytext` Python package was documented in `package.json` (#654)\n\n# 1.2.1 (2020-03-18)\n\n- The extension can pair a notebook to the new MyST Markdown format, developed by the [ExecutableBookProject](https://github.com/ExecutableBookProject) team. Thanks to Chris Sewell for his PRs! (#447 #456 #458)\n\n# 1.2.0 (2020-03-09)\n\n- This version of the extension is compatible with JupyterLab 2.0. Many thanks to Jean Helie! (#449)\n\n# 1.1.1 (2019-12-26)\n\n- The `nomarker` format is available through the Jupytext commands (requires `jupytext>=1.3.1`).\n\n# 1.1.0 (2019-11-03)\n\n- Multiple pairings are supported (#290)\n- The documentation includes the last version numbers for both Jupytext Python and for this extension (#311)\n- Documentation says clearly that the extension is bundled with the Python package (#350)\n\n# 1.0.2 (2019-07-18)\n\n- Fixed an incorrect `target_format` entry inserted by the version 1.0.1 of the extension.\n\n# 1.0.1 (2019-07-18)\n\n- A click on a selected format toggle the pairing (#289)\n- Use `JupyterFrontEnd` and `JupyterFrontEndPlugin` from `@jupyterlab/application` rather than `JupyterLab` and `JupyterLabPlugin` for compatibility with JupyterLab 1.0.\n\n# 1.0.0 (2019-07-06)\n\n- First extension compatible with JupyterLab 1.0\n\n# 0.19.0 (2019-07-06)\n\n- Last extension compatible with JupyterLab 0.35\n\n# 0.1.0 (2018-10-02)\n\n- Initial release of the extension\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/README.md",
    "content": "# A JupyterLab extension for Jupytext\n\nThis extension adds a few [Jupytext](https://github.com/mwouts/jupytext) commands to the command palette. Use these to select the desired ipynb/text pairing for your notebook.\n\nThe latest version for this extension is [![npm version](https://badge.fury.io/js/jupyterlab-jupytext.svg)](https://badge.fury.io/js/jupyterlab-jupytext).\n\nMost users do not need to install this extension, since it is already included in the latest [jupytext](https://github.com/mwouts/jupytext/), both on [![Pypi](https://img.shields.io/pypi/v/jupytext.svg)](https://pypi.python.org/pypi/jupytext) and\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/jupytext.svg)](https://anaconda.org/conda-forge/jupytext).\n\n![](https://raw.githubusercontent.com/mwouts/jupytext/main/packages/labextension/jupytext_commands.png)\n\n## Installation\n\nPlease install [Jupytext](https://github.com/mwouts/jupytext/blob/main/README.md#Install) first. As mentioned above, both the `pip` and `conda` packages do include the latest version of the JupyterLab extension, so in most cases you don't need to specifically install this `npm` package.\n\nIn case you're not using JupyterLab 4.x, you will have to install an older version of the extension that is compatible with your version. Please first install `jupytext` using `pip` or `conda`, and then downgrade the extension to a version compatible with your version of JupyterLab with:\n\n```bash\njupyter labextension install jupyterlab-jupytext@1.3.11  # for JupyterLab 3.x\njupyter labextension install jupyterlab-jupytext@1.2.2  # for JupyterLab 2.x\njupyter labextension install jupyterlab-jupytext@1.1.1  # for JupyterLab 1.x\n```\n\n# How to develop this extension\n\nFor fine-grained access to the `jlpm` command and various build steps:\n\n```bash\npip install -e '.[dev]'\ncd jupyterlab/packages/jupyterlab-jupytext-extension\njlpm\njlpm install:extension     # Symlink into `{sys.prefix}/share/jupyter/labextensions`\n```\n\n(see also the instructions at [developing.md](../../../docs/developing.md) on how to create a Python environment with a recent version of `nodejs`)\n\nWatch the source directory and automatically rebuild the `lib` folder:\n\n```bash\ncd jupyterlab/packages/jupyterlab-jupytext-extension\n# Watch the source directory in one terminal, automatically rebuilding when needed\njlpm watch\n# Run JupyterLab in another terminal\njupyter lab\n```\n\nWhile running `jlpm watch`, every saved change to a `.ts` file will immediately be\nbuilt locally and available in your running Jupyter client. \"Hard\" refresh JupyterLab or Notebook\nwith <kbd>CTRL-F5</kbd> or <kbd>⌘-F5</kbd> to load the change in your browser\n(you may need to wait several seconds for the extension to be fully rebuilt).\n\nRead more on this on the [JupyterLab documentation](https://jupyterlab.readthedocs.io/en/latest/extension/extension_dev.html#developing-a-prebuilt-extension).\n\n# How to publish a new version of the extension on npm\n\nPlease note that the main purpose of updating the extension on [npm](https://www.npmjs.com) is to keep the npm documentation up-to-date, since the extension is made available within the Python package itself.\n\nMake sure you have `nodejs>=18` installed, bump the version in `package.json`, and then:\n\n```bash\ncd jupyterlab/packages/jupyterlab-jupytext-extension\n\n# Package the extension\nnpm pack\n\n# Test the extension locally\njupyter labextension install jupyterlab-jupytext-xxx.tgz\n\n# Publish the package on npm with\nnpm publish --access=public\n```\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/package.json",
    "content": "{\n  \"name\": \"jupyterlab-jupytext\",\n  \"version\": \"1.4.6\",\n  \"description\": \"Save Jupyter Notebooks as Scripts or Markdown files that work well with version control & external text editors\",\n  \"keywords\": [\n    \"jupyter\",\n    \"jupytext\",\n    \"jupyterlab\",\n    \"jupyterlab-extension\"\n  ],\n  \"homepage\": \"https://github.com/mwouts/jupytext/tree/main/jupyterlab/packages/jupyterlab-jupytext\",\n  \"bugs\": {\n    \"url\": \"https://github.com/mwouts/jupytext/issues\"\n  },\n  \"license\": \"MIT\",\n  \"author\": \"Marc Wouts\",\n  \"files\": [\n    \"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}\",\n    \"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}\"\n  ],\n  \"main\": \"lib/index.js\",\n  \"types\": \"lib/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/mwouts/jupytext.git\"\n  },\n  \"workspaces\": [\n    \"ui-tests\"\n  ],\n  \"scripts\": {\n    \"build\": \"jlpm run build:lib && jlpm run build:labextension:dev && jlpm run copy:extensioncfgfile\",\n    \"build:labextension\": \"jupyter labextension build .\",\n    \"build:labextension:dev\": \"jupyter labextension build --development True .\",\n    \"build:lib\": \"tsc\",\n    \"build:prod\": \"jlpm run build:lib && jlpm run build:labextension && jlpm run copy:extensioncfgfile\",\n    \"copy:extensioncfgfile\": \"cp ../../install.json ../../jupyterlab_jupytext/labextension\",\n    \"clean\": \"jlpm run clean:lib\",\n    \"clean:all\": \"jlpm run clean:lib && jlpm run clean:labextension\",\n    \"clean:labextension\": \"rimraf ../../jupyterlab_jupytext/labextension\",\n    \"clean:lib\": \"rimraf lib tsconfig.tsbuildinfo\",\n    \"install:extension\": \"python ../../scripts/install_extension.py\",\n    \"watch\": \"run-p watch:src watch:labextension\",\n    \"watch:labextension\": \"jupyter labextension watch .\",\n    \"watch:src\": \"tsc -w\"\n  },\n  \"jupyterlab\": {\n    \"discovery\": {\n      \"server\": {\n        \"managers\": [\n          \"pip\",\n          \"conda\"\n        ],\n        \"base\": {\n          \"name\": \"jupyterlab_jupytext\"\n        }\n      }\n    },\n    \"extension\": true,\n    \"schemaDir\": \"schema\",\n    \"outputDir\": \"../../jupyterlab_jupytext/labextension\",\n    \"sharedPackages\": {\n      \"jupyterlab-rise\": {\n        \"singleton\": true\n      }\n    }\n  },\n  \"dependencies\": {\n    \"@jupyterlab/application\": \"^4.4.9\",\n    \"@jupyterlab/apputils\": \"^4.4.9\",\n    \"@jupyterlab/codeeditor\": \"^4.4.9\",\n    \"@jupyterlab/docregistry\": \"^4.4.9\",\n    \"@jupyterlab/filebrowser\": \"^4.4.9\",\n    \"@jupyterlab/launcher\": \"^4.4.9\",\n    \"@jupyterlab/nbformat\": \"^4.4.9\",\n    \"@jupyterlab/notebook\": \"^4.4.9\",\n    \"@jupyterlab/rendermime\": \"^4.4.9\",\n    \"@jupyterlab/settingregistry\": \"^4.4.9\",\n    \"@jupyterlab/translation\": \"^4.4.9\",\n    \"@jupyterlab/ui-components\": \"^4.4.9\",\n    \"@lumino/commands\": \"^2.3.3\",\n    \"@lumino/coreutils\": \"^2.2.2\",\n    \"@lumino/disposable\": \"^2.1.5\",\n    \"buffer\": \"^6.0.3\",\n    \"jupyterlab-rise\": \"^0.43.1\"\n  },\n  \"devDependencies\": {\n    \"@jupyterlab/builder\": \"^4.4.9\",\n    \"npm-run-all\": \"^4.1.5\",\n    \"rimraf\": \"^6.0.1\",\n    \"typescript\": \"~5.9.3\"\n  }\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/schema/plugin.json",
    "content": "{\n  \"title\": \"Jupytext\",\n  \"description\": \"List of Jupytext Text Notebook formats that will be added to launcher and jupytext menu.\",\n  \"properties\": {\n    \"auto:percent\": {\n      \"type\": \"boolean\",\n      \"title\": \"Text Notebook as Script in Percent Format\",\n      \"default\": true\n    },\n    \"auto:light\": {\n      \"type\": \"boolean\",\n      \"title\": \"Text Notebook as Script in Light Format\",\n      \"default\": false\n    },\n    \"auto:hydrogen\": {\n      \"type\": \"boolean\",\n      \"title\": \"Text Notebook as Script in Hydrogen Format\",\n      \"default\": false\n    },\n    \"auto:nomarker\": {\n      \"type\": \"boolean\",\n      \"title\": \"Text Notebook as Script in Nomarker Format\",\n      \"default\": false\n    },\n    \"py:marimo\": {\n      \"type\": \"boolean\",\n      \"title\": \"Text Notebook as Marimo Script\",\n      \"default\": false\n    },\n    \"md:myst\": {\n      \"type\": \"boolean\",\n      \"title\": \"MyST Markdown Notebook\",\n      \"default\": true\n    },\n    \"md\": {\n      \"type\": \"boolean\",\n      \"title\": \"Markdown Notebook\",\n      \"default\": false\n    },\n    \"Rmd\": {\n      \"type\": \"boolean\",\n      \"title\": \"R Markdown Notebook\",\n      \"default\": false\n    },\n    \"qmd\": {\n      \"type\": \"boolean\",\n      \"title\": \"Quarto Markdown Notebook\",\n      \"default\": false\n    },\n    \"NOTE\": {\n      \"description\": \"Refresh the current browser tab for the changes to take effect.\",\n      \"type\": \"null\"\n    }\n  },\n  \"additionalProperties\": false,\n  \"type\": \"object\"\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/src/commands.ts",
    "content": "import { showErrorMessage } from '@jupyterlab/apputils';\n\nimport { INotebookTracker } from '@jupyterlab/notebook';\n\nimport * as nbformat from '@jupyterlab/nbformat';\n\nimport { TranslationBundle } from '@jupyterlab/translation';\n\nimport {\n  LANGUAGE_INDEPENDENT_NOTEBOOK_EXTENSIONS,\n  JUPYTEXT_FORMATS,\n  IJupytextSection,\n} from './tokens';\n\n/**\n * Get Jupytext format of current widget if it is a text notebook\n */\nfunction getWidgetJupytextFormats(\n  notebookTracker: INotebookTracker,\n): Array<string> {\n  const model = notebookTracker.currentWidget.context.model;\n\n  const jupytext: IJupytextSection = (model as any).getMetadata('jupytext');\n  if (!jupytext) {\n    return [];\n  }\n  const formats: Array<string> = jupytext.formats\n    ? jupytext.formats.split(',')\n    : [];\n  return formats.filter((format) => {\n    return format !== '';\n  });\n}\n\n/**\n * Get file extension of current notebook widget\n */\nfunction getNotebookFileExtension(notebookTracker: INotebookTracker): string {\n  let notebookFileExtension: string | undefined =\n    notebookTracker.currentWidget.context.path.split('.').pop();\n  if (!notebookFileExtension) {\n    return '';\n  }\n\n  notebookFileExtension = LANGUAGE_INDEPENDENT_NOTEBOOK_EXTENSIONS.includes(\n    notebookFileExtension,\n  )\n    ? notebookFileExtension\n    : 'auto';\n  return notebookFileExtension;\n}\n\n/**\n * Get a list of all selected formats\n */\nfunction getSelectedFormats(notebookTracker: INotebookTracker): Array<string> {\n  if (!notebookTracker.currentWidget) {\n    return [];\n  }\n\n  let formats = getWidgetJupytextFormats(notebookTracker);\n\n  const model = notebookTracker.currentWidget.context.model;\n\n  const languageInfo = (model as any).getMetadata(\n    'language_info',\n  ) as nbformat.ILanguageInfoMetadata;\n  if (languageInfo && languageInfo.file_extension) {\n    const scriptExt = languageInfo.file_extension.substring(1);\n    formats = formats.map((format) => {\n      // By default use percent format\n      if (format === scriptExt) {\n        return 'auto:percent';\n      }\n      // Replace language specific extension with auto\n      return format.replace(`${scriptExt}:`, 'auto:');\n    });\n  }\n\n  const notebookFileExtension = getNotebookFileExtension(notebookTracker);\n  if (!notebookFileExtension) {\n    return formats;\n  }\n  // Remove variant after : in format\n  const formatExtensions = formats.map((format) => {\n    return format.split(':')[0];\n  });\n  // If current notebook file extension in formats, return\n  if (formatExtensions.includes(notebookFileExtension)) {\n    return formats;\n  }\n\n  // When notebook loads for the first time, ipynb extension would not be\n  // in the formats. Here we add it and return formats\n  if (\n    LANGUAGE_INDEPENDENT_NOTEBOOK_EXTENSIONS.includes(notebookFileExtension)\n  ) {\n    formats.push(notebookFileExtension);\n  } else {\n    const model = notebookTracker.currentWidget.context.model;\n    const jupytext: IJupytextSection = (model as any).getMetadata(\n      'jupytext',\n    ) as IJupytextSection;\n    const formatName = jupytext\n      ? jupytext?.text_representation?.formatName || 'percent'\n      : 'percent';\n    formats.push(`auto:${formatName}`);\n  }\n  return formats;\n}\n\n/**\n * Toggle pair command\n */\nexport function isPairCommandToggled(\n  format: string,\n  notebookTracker: INotebookTracker,\n): boolean {\n  if (!notebookTracker.currentWidget) {\n    return false;\n  }\n\n  // Get selected formats on current widget\n  const selectedFormats = getSelectedFormats(notebookTracker);\n\n  if (format === 'custom') {\n    for (const selectedFormat of selectedFormats) {\n      if (!JUPYTEXT_FORMATS.includes(selectedFormat)) {\n        return true;\n      }\n    }\n    return false;\n  }\n  return selectedFormats.includes(format);\n}\n\n/**\n * Enable pair command\n */\nexport function isPairCommandEnabled(\n  format: string,\n  notebookTracker: INotebookTracker,\n): boolean {\n  if (!notebookTracker.currentWidget) {\n    return false;\n  }\n\n  const notebookFileExtension: string | undefined =\n    notebookTracker.currentWidget.context.path.split('.').pop();\n  if (format === notebookFileExtension) {\n    return false;\n  }\n\n  // Get selected formats on current widget\n  const selectedFormats = getSelectedFormats(notebookTracker);\n\n  if (format === 'none') {\n    return selectedFormats.length > 1;\n  }\n\n  return true;\n}\n\n/**\n * Execute pair command\n */\nexport function executePairCommand(\n  command: string,\n  format: string,\n  notebookTracker: INotebookTracker,\n  trans: TranslationBundle,\n): void {\n  if (!notebookTracker.currentWidget) {\n    return;\n  }\n  const model = notebookTracker.currentWidget.context.model;\n  let jupytext: IJupytextSection = (model as any).getMetadata('jupytext') as\n    | IJupytextSection\n    | undefined;\n\n  // Get selected formats on current widget\n  let selectedFormats = getSelectedFormats(notebookTracker);\n\n  // Toggle the selected format\n  console.debug('Jupytext: executing command=' + command);\n  if (format === 'custom') {\n    showErrorMessage(\n      trans.__('Error'),\n      trans.__(\n        'Please edit the notebook metadata directly if you wish a custom configuration.',\n      ),\n    );\n    return;\n  }\n\n  // Get current notebook widget extension\n  const notebookFileExtension = getNotebookFileExtension(notebookTracker);\n\n  // Toggle the selected format\n  const index = selectedFormats.indexOf(format);\n  if (format === 'none') {\n    // Only keep one format - one that matches the current extension\n    for (const selectedFormat of selectedFormats) {\n      if (selectedFormat.split(':')[0] === notebookFileExtension) {\n        selectedFormats = [selectedFormat];\n        break;\n      }\n    }\n  } else if (index !== -1) {\n    selectedFormats.splice(index, 1);\n\n    // The current file extension can't be unpaired\n    let extFound = false;\n    for (const selectedFormat of selectedFormats) {\n      if (selectedFormat.split(':')[0] === notebookFileExtension) {\n        extFound = true;\n        break;\n      }\n    }\n\n    if (!extFound) {\n      return;\n    }\n  } else {\n    // We can't have the same extension multiple times\n    const newFormats = [];\n    for (const selectedFormat of selectedFormats) {\n      if (selectedFormat.split(':')[0] !== format.split(':')[0]) {\n        newFormats.push(selectedFormat);\n      }\n    }\n\n    selectedFormats = newFormats;\n    selectedFormats.push(format);\n  }\n\n  if (selectedFormats.length === 1) {\n    if (notebookFileExtension !== 'auto') {\n      selectedFormats = [];\n    } else if (jupytext?.text_representation) {\n      jupytext.text_representation.formatName =\n        selectedFormats[0].split(':')[1];\n      selectedFormats = [];\n    }\n  }\n\n  if (selectedFormats.length === 0) {\n    // an older version was re-fetching the jupytext metadata here\n    // but this is not necessary, as the metadata is already available\n    if (!jupytext) {\n      return;\n    }\n\n    if (jupytext.formats) {\n      delete jupytext.formats;\n    }\n    if (Object.keys(jupytext).length === 0) {\n      (model as any).deleteMetadata('jupytext');\n    }\n    (model as any).setMetadata('jupytext', jupytext);\n    return;\n  }\n\n  // set the desired format\n  if (jupytext) {\n    jupytext.formats = selectedFormats.join();\n  } else {\n    jupytext = { formats: selectedFormats.join() };\n  }\n  (model as any).setMetadata('jupytext', jupytext);\n}\n\n/**\n * Toggle metadata command\n */\nexport function isMetadataCommandToggled(\n  notebookTracker: INotebookTracker,\n): boolean {\n  if (!notebookTracker.currentWidget) {\n    return false;\n  }\n\n  const model = notebookTracker.currentWidget.context.model;\n  const jupytextMetadata = (model as any).getMetadata('jupytext');\n  if (!jupytextMetadata) {\n    return false;\n  }\n\n  const jupytext: IJupytextSection =\n    jupytextMetadata as unknown as IJupytextSection;\n\n  if (jupytext.notebook_metadata_filter === '-all') {\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Enable metadata command\n */\nexport function isMetadataCommandEnabled(\n  notebookTracker: INotebookTracker,\n): boolean {\n  if (!notebookTracker.currentWidget) {\n    return false;\n  }\n\n  const model = notebookTracker.currentWidget.context.model;\n  const jupytextMetadata = (model as any).getMetadata('jupytext');\n  if (!jupytextMetadata) {\n    return false;\n  }\n\n  const jupytext: IJupytextSection =\n    jupytextMetadata as unknown as IJupytextSection;\n\n  if (jupytext.notebook_metadata_filter === undefined) {\n    return true;\n  }\n\n  if (jupytext.notebook_metadata_filter === '-all') {\n    return true;\n  }\n\n  return false;\n}\n\n/**\n * Execute metadata command\n */\nexport function executeMetadataCommand(\n  notebookTracker: INotebookTracker,\n): void {\n  console.debug('Jupytext: toggling YAML header');\n  if (!notebookTracker.currentWidget) {\n    return;\n  }\n\n  const model = notebookTracker.currentWidget.context.model;\n  const jupytextMetadata = (model as any).getMetadata('jupytext');\n  if (!jupytextMetadata) {\n    return;\n  }\n\n  const jupytext = ((jupytextMetadata as unknown) ?? {}) as IJupytextSection;\n\n  if (jupytext.notebook_metadata_filter) {\n    delete jupytext.notebook_metadata_filter;\n    if (jupytext.notebook_metadata_filter === '-all') {\n      delete jupytext.notebook_metadata_filter;\n    }\n  } else {\n    jupytext.notebook_metadata_filter = '-all';\n    if (jupytext.notebook_metadata_filter === undefined) {\n      jupytext.notebook_metadata_filter = '-all';\n    }\n  }\n  (model as any).setMetadata('jupytext', jupytext);\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/src/factory.ts",
    "content": "import {\n  IToolbarWidgetRegistry,\n  createToolbarFactory,\n} from '@jupyterlab/apputils';\n\nimport {\n  INotebookTracker,\n  NotebookPanel,\n  NotebookWidgetFactory,\n} from '@jupyterlab/notebook';\n\nimport { ISettingRegistry } from '@jupyterlab/settingregistry';\n\nimport { DocumentRegistry } from '@jupyterlab/docregistry';\n\nimport { IRenderMimeRegistry } from '@jupyterlab/rendermime';\n\nimport { IEditorServices } from '@jupyterlab/codeeditor';\n\nimport { ITranslator, TranslationBundle } from '@jupyterlab/translation';\n\nimport { IDisposable } from '@lumino/disposable';\n\nimport { IRisePreviewFactory } from 'jupyterlab-rise';\n\nimport { FACTORY, FILE_TYPES } from './tokens';\n\nexport function createFactory(\n  kernelFileTypeNames: string[],\n  toolbarRegistry: IToolbarWidgetRegistry,\n  settingRegistry: ISettingRegistry,\n  docRegistry: DocumentRegistry,\n  notebookTracker: INotebookTracker,\n  notebookFactory: NotebookWidgetFactory.IFactory,\n  contentFactory: NotebookPanel.IContentFactory,\n  editorServices: IEditorServices,\n  rendermime: IRenderMimeRegistry,\n  translator: ITranslator,\n  trans: TranslationBundle,\n  riseFactory: IRisePreviewFactory | null,\n) {\n  const allFileTypes = FILE_TYPES.concat(kernelFileTypeNames);\n  // primarily this block is copied/pasted from jlab4 code and specifically\n  // jupyterlab/packages/notebook-extension/src/index.ts\n  // inside the function `activateWidgetFactory` at line 1150 as of this writing\n  //\n  const toolbarFactory = createToolbarFactory(\n    toolbarRegistry,\n    settingRegistry,\n    'Notebook',\n    '@jupyterlab/notebook-extension:panel',\n    translator,\n  );\n  // Duplicate notebook factory to apply it on Jupytext notebooks\n  // Mirror: https://github.com/jupyterlab/jupyterlab/blob/8a8c3752564f37493d4eb6b4c59008027fa83880/packages/notebook-extension/src/index.ts#L860\n  const factory = new NotebookWidgetFactory({\n    name: FACTORY,\n    label: trans.__(FACTORY),\n    fileTypes: allFileTypes,\n    modelName: notebookFactory.modelName ?? 'notebook',\n    preferKernel: notebookFactory.preferKernel ?? true,\n    canStartKernel: notebookFactory.canStartKernel ?? true,\n    rendermime,\n    contentFactory,\n    editorConfig: notebookFactory.editorConfig,\n    notebookConfig: notebookFactory.notebookConfig,\n    mimeTypeService: editorServices.mimeTypeService,\n    toolbarFactory: toolbarFactory,\n    translator,\n  });\n  docRegistry.addWidgetFactory(factory);\n\n  // The list of extensions in the Jupytext Notebook factory.\n  const factoryExtensions: IDisposable[] = [];\n  const updateWidgetExtensions = () => {\n    // Dispose of all existing extensions.\n    factoryExtensions.forEach((extension) => extension.dispose());\n    // Add all the widgets extensions in the Notebook factory.\n    for (const extension of docRegistry.widgetExtensions('Notebook')) {\n      docRegistry.addWidgetExtension(FACTORY, extension);\n    }\n  };\n\n  // Listen for changes in Notebook factory extensions.\n  docRegistry.changed.connect((_, change) => {\n    if (change.type === 'widgetExtension' && change.name === 'Notebook') {\n      updateWidgetExtensions();\n    }\n  });\n  updateWidgetExtensions();\n\n  // Register widget created with the new factory in the notebook tracker\n  // This is required to activate notebook commands (and therefore shortcuts)\n  let id = 0; // The ID counter for notebook panels.\n  const ft = docRegistry.getFileType('notebook');\n\n  factory.widgetCreated.connect((sender, widget) => {\n    // If the notebook panel does not have an ID, assign it one.\n    widget.id = widget.id || `notebook-jupytext-${++id}`;\n\n    // Set up the title icon\n    widget.title.icon = ft?.icon;\n    widget.title.iconClass = ft?.iconClass ?? '';\n    widget.title.iconLabel = ft?.iconLabel ?? '';\n\n    // Notify the widget tracker if restore data needs to update.\n    widget.context.pathChanged.connect(() => {\n      // @ts-expect-error Trick using private API\n      void notebookTracker.save(widget);\n    });\n    // Add the notebook panel to the tracker.\n    //   @ts-expect-error Trick using private API\n    void notebookTracker.add(widget);\n  });\n\n  // Add support for RISE slides\n  if (riseFactory) {\n    for (const fileType of allFileTypes) {\n      riseFactory.addFileType(fileType);\n    }\n  }\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/src/index.ts",
    "content": "import {\n  JupyterFrontEnd,\n  JupyterFrontEndPlugin,\n} from '@jupyterlab/application';\n\nimport {\n  ICommandPalette,\n  IToolbarWidgetRegistry,\n  showErrorMessage,\n} from '@jupyterlab/apputils';\n\nimport { IDocumentManager } from '@jupyterlab/docmanager';\n\nimport { IEditorLanguageRegistry } from '@jupyterlab/codemirror';\n\nimport { Contents } from '@jupyterlab/services';\n\nimport { ILauncher } from '@jupyterlab/launcher';\n\nimport { ISettingRegistry } from '@jupyterlab/settingregistry';\n\nimport { IEditorServices } from '@jupyterlab/codeeditor';\n\nimport {\n  INotebookTracker,\n  INotebookWidgetFactory,\n  NotebookPanel,\n  NotebookWidgetFactory,\n} from '@jupyterlab/notebook';\n\nimport { IRenderMimeRegistry } from '@jupyterlab/rendermime';\n\nimport { IDefaultFileBrowser } from '@jupyterlab/filebrowser';\n\nimport { IMainMenu } from '@jupyterlab/mainmenu';\n\nimport { ITranslator, nullTranslator } from '@jupyterlab/translation';\n\nimport { LabIcon } from '@jupyterlab/ui-components';\n\nimport { DisposableSet } from '@lumino/disposable';\n\nimport { Menu } from '@lumino/widgets';\n\nimport { JSONExt, ReadonlyJSONValue } from '@lumino/coreutils';\n\nimport { IRisePreviewFactory } from 'jupyterlab-rise';\n\nimport {\n  JUPYTEXT_EXTENSION_ID,\n  JUPYTEXT_PAIR_COMMANDS_FILETYPE_DATA,\n  JUPYTEXT_FORMATS,\n  TEXT_NOTEBOOKS_LAUNCHER_ICONS,\n  CommandIDs,\n  IFileTypeData,\n  JupytextIcon,\n  AUTO_LANGUAGE_FILETYPE_DATA,\n} from './tokens';\n\nimport {\n  isPairCommandToggled,\n  isPairCommandEnabled,\n  executePairCommand,\n  isMetadataCommandToggled,\n  isMetadataCommandEnabled,\n  executeMetadataCommand,\n} from './commands';\n\nimport { registerFileTypes } from './registry';\n\nimport { createFactory } from './factory';\n\nimport {\n  getAvailableKernelLanguages,\n  getAvailableCreateTextNotebookCommands,\n  createNewTextNotebook,\n} from './utils';\n\n/**\n * Initialization data for the jupyterlab-jupytext extension.\n */\nconst extension: JupyterFrontEndPlugin<void> = {\n  id: JUPYTEXT_EXTENSION_ID,\n  autoStart: true,\n  optional: [\n    ILauncher,\n    IMainMenu,\n    IDefaultFileBrowser,\n    ITranslator,\n    ICommandPalette,\n    IRisePreviewFactory,\n  ],\n  requires: [\n    NotebookPanel.IContentFactory,\n    IEditorServices,\n    IDocumentManager,\n    IEditorLanguageRegistry,\n    IRenderMimeRegistry,\n    INotebookWidgetFactory,\n    INotebookTracker,\n    ISettingRegistry,\n    IToolbarWidgetRegistry,\n  ],\n  activate: async (\n    app: JupyterFrontEnd,\n    contentFactory: NotebookPanel.IContentFactory,\n    editorServices: IEditorServices,\n    docManager: IDocumentManager,\n    languages: IEditorLanguageRegistry,\n    rendermime: IRenderMimeRegistry,\n    notebookFactory: NotebookWidgetFactory.IFactory,\n    notebookTracker: INotebookTracker,\n    settingRegistry: ISettingRegistry,\n    toolbarRegistry: IToolbarWidgetRegistry,\n    launcher: ILauncher | null,\n    mainmenu: IMainMenu | null,\n    defaultBrowser: IDefaultFileBrowser | null,\n    translator: ITranslator | null,\n    palette: ICommandPalette | null,\n    riseFactory: IRisePreviewFactory | null,\n  ) => {\n    console.log('JupyterLab extension jupytext is activating...');\n    const trans = (translator ?? nullTranslator).load('jupytext');\n\n    // Load settings\n    const includeFormats = TEXT_NOTEBOOKS_LAUNCHER_ICONS;\n    if (settingRegistry) {\n      const settings = await settingRegistry.load(extension.id);\n      for (const format of JUPYTEXT_FORMATS) {\n        const addFormat = settings.get(format).composite as boolean;\n        if (addFormat && !includeFormats.includes(format)) {\n          includeFormats.push(format);\n        } else if (!addFormat && includeFormats.includes(format)) {\n          includeFormats.splice(includeFormats.indexOf(format), 1);\n        }\n      }\n    }\n\n    // Unpack necessary components\n    const { commands, serviceManager, docRegistry } = app;\n\n    // Initialise Jupytext create notebook submenu and add it to File menu\n    const jupytextCreateMenu = new Menu({ commands: app.commands });\n    jupytextCreateMenu.id = 'jp-mainmenu-jupytext-new-menu';\n    jupytextCreateMenu.title.label = trans.__('New Text Notebook');\n    mainmenu.fileMenu.addItem({\n      rank: 0.97,\n      type: 'submenu',\n      submenu: jupytextCreateMenu,\n    });\n\n    // Add create text notebook submenu to context menu\n    // Rank 53 as 52 is used for classic notebook\n    // https://github.com/jupyterlab/jupyterlab/blob/4d34bbbea2afc7385169d92bf7bc0c9e0face3a9/packages/notebook-extension/schema/tracker.json#L363-L369\n    app.contextMenu.addItem({\n      submenu: jupytextCreateMenu,\n      type: 'submenu',\n      selector: '.jp-DirListing-content',\n      rank: 53,\n    });\n\n    // Initialise Jupytext menu and add it to main menu\n    const jupytextMenu = new Menu({ commands: app.commands });\n    mainmenu.fileMenu.addItem({\n      rank: 0.98,\n      type: 'submenu',\n      submenu: jupytextMenu,\n    });\n    jupytextMenu.id = 'jp-mainmenu-jupytext-menu';\n    jupytextMenu.title.label = trans.__('Jupytext');\n\n    // Get all Jupytext formats\n    let rank = 0;\n    const separatorIndex: number[] = [];\n    JUPYTEXT_PAIR_COMMANDS_FILETYPE_DATA.forEach(\n      (value: IFileTypeData[], key: string) => {\n        value.map((fileType: IFileTypeData) => {\n          const format = key;\n          const command = `jupytext:pair-nb-with-${format}`;\n          commands.addCommand(command, {\n            label: (args) => {\n              if (args.isPalette) {\n                return (\n                  (fileType.paletteLabel as string) ?? trans.__('Pair notebook')\n                );\n              }\n              return (fileType.caption as string) ?? trans.__('Pair notebook');\n            },\n            caption: trans.__(fileType.caption),\n            icon: (args) => {\n              if (args.isPalette) {\n                return undefined;\n              } else {\n                return fileType.iconName\n                  ? LabIcon.resolve({\n                      icon: fileType.iconName as string,\n                    })\n                  : undefined;\n              }\n            },\n            isToggled: () => {\n              return isPairCommandToggled(format, notebookTracker);\n            },\n            isEnabled: () => {\n              return isPairCommandEnabled(format, notebookTracker);\n            },\n            execute: () => {\n              return executePairCommand(\n                command,\n                format,\n                notebookTracker,\n                trans,\n              );\n            },\n          });\n\n          console.debug(\n            'Registering pairing command=' + command + ' with rank=' + rank,\n          );\n          palette?.addItem({\n            command,\n            args: { isPalette: true },\n            rank: rank + 1,\n            category: 'Jupytext',\n          });\n          // Add to jupytext pair menu\n          jupytextMenu.addItem({\n            command: command,\n          });\n          if (fileType.separator) {\n            separatorIndex.push(rank);\n          }\n          rank += 1;\n        });\n      },\n    );\n\n    // Add separators in jupytext pair menu\n    separatorIndex.map((index, idx) => {\n      jupytextMenu.insertItem(index + idx + 1, {\n        type: 'separator',\n      });\n    });\n\n    // Metadata in text representation\n    commands.addCommand(CommandIDs.metadata, {\n      label: trans.__('Include Metadata'),\n      icon: (args) => {\n        if (args.isPalette) {\n          return undefined;\n        } else {\n          return JupytextIcon;\n        }\n      },\n      isToggled: () => {\n        return isMetadataCommandToggled(notebookTracker);\n      },\n      isEnabled: () => {\n        return isMetadataCommandEnabled(notebookTracker);\n      },\n      execute: () => {\n        return executeMetadataCommand(notebookTracker);\n      },\n    });\n    palette?.addItem({\n      command: CommandIDs.metadata,\n      args: { isPalette: true },\n      rank: 98,\n      category: 'Jupytext',\n    });\n    jupytextMenu.addItem({\n      type: 'separator',\n    });\n    jupytextMenu.addItem({\n      command: CommandIDs.metadata,\n    });\n    jupytextMenu.addItem({\n      type: 'separator',\n    });\n\n    // Register Jupytext FAQ command\n    commands.addCommand(CommandIDs.faq, {\n      label: trans.__('Jupytext FAQ'),\n      icon: (args) => {\n        if (args.isPalette) {\n          return undefined;\n        } else {\n          return JupytextIcon;\n        }\n      },\n      execute: () => {\n        window.open('https://jupytext.readthedocs.io/en/latest/faq.html');\n      },\n    });\n    palette?.addItem({\n      command: CommandIDs.faq,\n      args: { isPalette: true },\n      rank: 99,\n      category: 'Jupytext',\n    });\n    jupytextMenu.addItem({\n      command: CommandIDs.faq,\n    });\n\n    // Register Jupytext Reference\n    commands.addCommand(CommandIDs.reference, {\n      label: trans.__('Jupytext Reference'),\n      icon: (args) => {\n        if (args.isPalette) {\n          return undefined;\n        } else {\n          return JupytextIcon;\n        }\n      },\n      execute: () => {\n        window.open('https://jupytext.readthedocs.io/en/latest/');\n      },\n    });\n    palette?.addItem({\n      command: CommandIDs.reference,\n      args: { isPalette: true },\n      rank: 100,\n      category: 'Jupytext',\n    });\n    jupytextMenu.addItem({\n      command: CommandIDs.reference,\n    });\n\n    // Register a new command to create untitled file. This snippet is taken\n    // from docManager package https://github.com/jupyterlab/jupyterlab/blob/c106f0a19110efad7c5e1b136144985819e21100/packages/docmanager-extension/src/index.tsx#L679-L680\n    // We are \"duplicating\" it as base command adds extension to the options\n    // only if it is of type file. But we are interested in creating notebook type\n    // files with different Jupytext supported extensions. So we create a dedicated\n    // create new text notebook command here and make sure we pass extension in options\n    commands.addCommand(CommandIDs.newUntitled, {\n      execute: async (args) => {\n        const errorTitle = (args['error'] as string) || trans.__('Error');\n        const path =\n          typeof args['path'] === 'undefined' ? '' : (args['path'] as string);\n        const options: Partial<Contents.ICreateOptions> = {\n          type: args['type'] as Contents.ContentType,\n          path,\n        };\n\n        // Ensure we pass extension to command always\n        options.ext = (args['ext'] as string) || '.txt';\n\n        return docManager.services.contents\n          .newUntitled(options)\n          .catch((error) => showErrorMessage(errorTitle, error));\n      },\n      label: (args) =>\n        (args['label'] as string) || `New ${args['type'] as string}`,\n    });\n    // We dont need to add this command to palettte as it is a utility one\n    // which does not have direct usage\n    // palette?.addItem({\n    //   command: CommandIDs.newUntitled,\n    //   rank: 50,\n    //   category: 'Jupytext',\n    // });\n\n    // Get a map of available kernel languages in current widget\n    const availableKernelLanguages = await getAvailableKernelLanguages(\n      languages,\n      docRegistry,\n      serviceManager,\n    );\n\n    // Get a map of all create text notebook commands\n    const createTextNotebookCommands =\n      await getAvailableCreateTextNotebookCommands(\n        includeFormats,\n        availableKernelLanguages,\n      );\n\n    // Register Jupytext text notebooks file types\n    registerFileTypes(\n      availableKernelLanguages,\n      [\n        ...[...JUPYTEXT_PAIR_COMMANDS_FILETYPE_DATA.values()].flat(),\n        ...[...AUTO_LANGUAGE_FILETYPE_DATA.values()].flat(),\n      ],\n      docRegistry,\n      trans,\n    );\n\n    // Get all kernel file types to add to Jupytext factory\n    const kernelLanguageNames: string[] = [];\n    for (const kernelLanguage of availableKernelLanguages.keys()) {\n      kernelLanguageNames.push(kernelLanguage);\n    }\n\n    // Create a factory for Jupytext\n    createFactory(\n      kernelLanguageNames,\n      toolbarRegistry,\n      settingRegistry,\n      docRegistry,\n      notebookTracker,\n      notebookFactory,\n      contentFactory,\n      editorServices,\n      rendermime,\n      translator,\n      trans,\n      riseFactory,\n    );\n\n    // Register all the commands that create text notebooks with different formats\n    // Nicked from notebook-extension package in JupyterLab\n    // https://github.com/jupyterlab/jupyterlab/blob/c106f0a19110efad7c5e1b136144985819e21100/packages/notebook-extension/src/index.ts#L1902-L1965\n    createTextNotebookCommands.forEach((fileTypes: IFileTypeData[], _) => {\n      fileTypes.map((fileType: IFileTypeData) => {\n        const format = fileType.fileExt;\n        const command = `jupytext:create-new-text-notebook-${format}`;\n        const iconName = fileType.iconName;\n        const kernelIcon = fileType.kernelIcon;\n        commands.addCommand(command, {\n          label: (args) => {\n            if (args['isLauncher']) {\n              return trans.__(fileType.launcherLabel);\n            }\n            return trans.__(fileType.paletteLabel);\n          },\n          caption: trans.__(fileType.caption),\n          icon: (args) => {\n            if (args.isPalette) {\n              return undefined;\n            } else {\n              if (iconName) {\n                return LabIcon.resolve({\n                  icon: iconName as string,\n                });\n              }\n              if (kernelIcon) {\n                return kernelIcon;\n              }\n              return LabIcon.resolve({\n                icon: 'ui-components:kernel',\n              });\n            }\n          },\n          execute: (args) => {\n            const cwd =\n              (args['cwd'] as string) || (defaultBrowser?.model.path ?? '');\n            const kernelId = (args['kernelId'] as string) || '';\n            const kernelName = (args['kernelName'] as string) || '';\n            return createNewTextNotebook(\n              cwd,\n              kernelId,\n              kernelName,\n              format,\n              commands,\n            );\n          },\n        });\n\n        console.debug(\n          'Registering create new text notebook command=' +\n            command +\n            ' with rank=' +\n            rank,\n        );\n        palette?.addItem({\n          command,\n          args: { isPalette: true },\n          rank: rank,\n          category: 'Jupytext',\n        });\n        if (includeFormats.includes(format)) {\n          jupytextCreateMenu.addItem({\n            command: command,\n            args: { isMainMenu: true },\n          });\n          // Add separator after each kernel type\n          if (fileType.separator) {\n            jupytextCreateMenu.addItem({\n              type: 'separator',\n            });\n          }\n        }\n\n        // Add a launcher item if the launcher is available.\n        if (launcher && includeFormats.includes(format)) {\n          void serviceManager.ready.then(() => {\n            let disposables: DisposableSet | null = null;\n            const onSpecsChanged = () => {\n              if (disposables) {\n                disposables.dispose();\n                disposables = null;\n              }\n              const specs = serviceManager.kernelspecs.specs;\n              if (!specs) {\n                return;\n              }\n              disposables = new DisposableSet();\n              const kernelIconUrl =\n                specs.kernelspecs[fileType.kernelName]?.resources['logo-svg'] ||\n                specs.kernelspecs[fileType.kernelName]?.resources['logo-64x64'];\n              disposables.add(\n                launcher.add({\n                  command: command,\n                  args: { isLauncher: true, kernelName: fileType.kernelName },\n                  category: trans.__('Jupytext'),\n                  rank: rank++,\n                  kernelIconUrl,\n                  metadata: {\n                    kernel: JSONExt.deepCopy(\n                      specs.kernelspecs[fileType.kernelName]?.metadata || {},\n                    ) as ReadonlyJSONValue,\n                  },\n                }),\n              );\n            };\n            onSpecsChanged();\n            serviceManager.kernelspecs.specsChanged.connect(onSpecsChanged);\n          });\n        }\n        // Increment rank\n        rank += 1;\n      });\n    });\n  },\n};\n\nexport default extension;\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/src/registry.ts",
    "content": "import { DocumentRegistry } from '@jupyterlab/docregistry';\n\nimport { TranslationBundle } from '@jupyterlab/translation';\n\nimport { markdownIcon, LabIcon, fileIcon } from '@jupyterlab/ui-components';\n\nimport { IFileTypeData } from './tokens';\n\nexport function registerFileTypes(\n  availableKernelLanguages: Map<string, IFileTypeData[]>,\n  jupytextFormatsWithFileTypeData: IFileTypeData[],\n  docRegistry: DocumentRegistry,\n  trans: TranslationBundle,\n) {\n  const mystExtensions = ['myst', 'mystnb', 'mnb'];\n  const rmdExtensions = ['Rmd'];\n  const quartoExtensions = ['qmd'];\n\n  const extensionsWithFactory = [\n    ...mystExtensions,\n    ...rmdExtensions,\n    ...quartoExtensions,\n  ];\n\n  // Add a catch-all file type to overrride icon which by default is derive from model type.\n  // Because jupytext changes the type of all files it can handle to Notebook, we need to\n  // override it. We exclude file types which have dedicated icons (handled later).\n  const excludedExtensions = [\n    'ipynb',\n    ...jupytextFormatsWithFileTypeData.map((f) => f.fileExt),\n    ...extensionsWithFactory,\n  ].join('|');\n  docRegistry.addFileType({\n    name: 'jupytext-notebook-file',\n    contentType: 'notebook',\n    pattern: `^(?!.*\\\\.(${excludedExtensions})$).*$`,\n    icon: fileIcon,\n  });\n\n  // Handle file types with dedicated icons\n  for (const format of jupytextFormatsWithFileTypeData) {\n    if (!extensionsWithFactory.includes(format.fileExt)) {\n      docRegistry.addFileType({\n        name: `${format.fileExt}-jupytext-notebook`,\n        contentType: 'notebook',\n        // `pattern` field gives it precedence over other file type information when resolving the icon\n        pattern: `\\\\.${format.fileExt}$`,\n        extensions: [`.${format.fileExt}`],\n        icon: format.iconName\n          ? LabIcon.resolve({ icon: format.iconName })\n          : format.kernelIcon,\n      });\n    }\n  }\n\n  // Add kernel file types to registry\n  availableKernelLanguages.forEach(\n    (kernelFileTypes: IFileTypeData[], kernelLanguage: string) => {\n      kernelFileTypes.map((kernelFileType) => {\n        docRegistry.addFileType({\n          name: kernelLanguage,\n          contentType: 'notebook',\n          pattern: `\\\\.${kernelFileType.fileExt}$`,\n          displayName: trans.__(\n            kernelFileType.paletteLabel.split('New')[1].trim(),\n          ),\n          extensions: [`.${kernelFileType.fileExt}`],\n          icon: kernelFileType.iconName\n            ? LabIcon.resolve({ icon: kernelFileType.iconName })\n            : kernelFileType.kernelIcon,\n        });\n      });\n    },\n  );\n\n  const markdownNotebookIcon = markdownIcon.bindprops({\n    boxSizing: 'border-box',\n    border: '2px solid var(--jp-notebook-icon-color)',\n    borderRadius: '2px',\n  });\n\n  // Add markdown file types to registry - these will be open with Notebook by default\n  docRegistry.addFileType(\n    {\n      name: 'myst',\n      contentType: 'notebook',\n      displayName: trans.__('MyST Markdown Notebook'),\n      extensions: mystExtensions.map((ext) => '.' + ext),\n      icon: markdownNotebookIcon,\n    },\n    ['Notebook'],\n  );\n\n  docRegistry.addFileType(\n    {\n      name: 'r-markdown',\n      contentType: 'notebook',\n      displayName: trans.__('R Markdown Notebook'),\n      // Extension file are transformed to lower case...\n      extensions: rmdExtensions.map((ext) => '.' + ext),\n      icon: markdownNotebookIcon,\n    },\n    ['Notebook'],\n  );\n\n  docRegistry.addFileType(\n    {\n      name: 'quarto',\n      contentType: 'notebook',\n      displayName: trans.__('Quarto Notebook'),\n      extensions: quartoExtensions.map((ext) => '.' + ext),\n      pattern: '\\\\.qmd$',\n      icon: markdownNotebookIcon,\n    },\n    ['Notebook'],\n  );\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/src/svg.d.ts",
    "content": "declare module '*.svg' {\n  const image: string;\n  export default image;\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/src/tokens.ts",
    "content": "import { ServerConnection } from '@jupyterlab/services';\n\nimport { LabIcon } from '@jupyterlab/ui-components';\n\nimport jupytextSvgstr from '../style/icons/logo.svg';\n\n/**\n * Jupytext extension ID\n */\nexport const JUPYTEXT_EXTENSION_ID = 'jupyterlab-jupytext:plugin';\n\n/**\n * Jupytext widget factory\n */\nexport const FACTORY = 'Jupytext Notebook';\n\n/**\n * Supported file formats.\n */\nexport const LANGUAGE_INDEPENDENT_NOTEBOOK_EXTENSIONS = [\n  'ipynb',\n  'md',\n  'Rmd',\n  'qmd',\n];\n\n/**\n * Supported file types names.\n */\nexport const FILE_TYPES = [\n  'markdown',\n  'myst',\n  'r-markdown',\n  'quarto',\n  'julia',\n  'python',\n  'r',\n];\n\n/**\n * The short namespace for commands, etc.\n */\nexport const NS = 'jupytext';\n\n/**\n * Command IDs of Jupytext\n */\nexport namespace CommandIDs {\n  export const metadata = `${NS}:metadata`;\n  export const reference = `${NS}:reference`;\n  export const faq = `${NS}:faq`;\n  export const newUntitled = `${NS}:new-untitled-text-notebook`;\n}\n\n/**\n * Jupytext logo icon\n */\nexport const JupytextIcon = new LabIcon({\n  name: `${NS}:icon:logo`,\n  svgstr: jupytextSvgstr,\n});\n\n/**\n * Current Jupyter server settings\n */\nexport const SERVER_SETTINGS = ServerConnection.makeSettings();\n\n/**\n * Supported Jupytext pairings along with metadata.\n */\nexport const JUPYTEXT_PAIR_COMMANDS_FILETYPE_DATA = new Map<\n  string,\n  IFileTypeData[]\n>([\n  [\n    'ipynb',\n    [\n      {\n        fileExt: 'ipynb',\n        paletteLabel: 'Pair with ipynb',\n        caption: 'Pair Notebook with ipynb document',\n        iconName: 'ui-components:notebook',\n        separator: true,\n      },\n    ],\n  ],\n  [\n    'auto:percent',\n    [\n      {\n        fileExt: 'auto:percent',\n        paletteLabel: 'Pair with percent script',\n        caption: 'Pair Notebook with Percent Format',\n        iconName: 'ui-components:text-editor',\n      },\n    ],\n  ],\n  [\n    'auto:light',\n    [\n      {\n        fileExt: 'auto:light',\n        paletteLabel: 'Pair with light script',\n        caption: 'Pair Notebook with Light Format',\n        iconName: 'ui-components:text-editor',\n      },\n    ],\n  ],\n  [\n    'auto:nomarker',\n    [\n      {\n        fileExt: 'auto:nomarker',\n        paletteLabel: 'Pair with nomarker script',\n        caption: 'Pair Notebook with Nomarker Format',\n        iconName: 'ui-components:text-editor',\n        separator: true,\n      },\n    ],\n  ],\n  [\n    'py:marimo',\n    [\n      {\n        fileExt: 'py:marimo',\n        paletteLabel: 'Pair with Marimo Python script',\n        caption: 'Pair Notebook with Marimo Python script',\n        iconName: 'ui-components:text-editor',\n        separator: true,\n      },\n    ],\n  ],\n  [\n    'md',\n    [\n      {\n        fileExt: 'md',\n        paletteLabel: 'Pair with md',\n        caption: 'Pair Notebook with Markdown',\n        iconName: 'ui-components:markdown',\n      },\n    ],\n  ],\n  [\n    'md:myst',\n    [\n      {\n        fileExt: 'md:myst',\n        paletteLabel: 'Pair with myst md',\n        caption: 'Pair Notebook with MyST Markdown',\n        iconName: 'ui-components:markdown',\n        separator: true,\n      },\n    ],\n  ],\n  [\n    'Rmd',\n    [\n      {\n        fileExt: 'Rmd',\n        paletteLabel: 'Pair with Rmd',\n        caption: 'Pair Notebook with R Markdown',\n        iconName: 'ui-components:markdown',\n      },\n    ],\n  ],\n  [\n    'qmd',\n    [\n      {\n        fileExt: 'qmd',\n        paletteLabel: 'Pair with qmd',\n        caption: 'Pair Notebook with Quarto (qmd)',\n        iconName: 'ui-components:markdown',\n        separator: true,\n      },\n    ],\n  ],\n  [\n    'custom',\n    [\n      {\n        fileExt: 'custom',\n        paletteLabel: 'Custom pair',\n        caption: 'Custom Pairing',\n        iconName: 'ui-components:text-editor',\n      },\n    ],\n  ],\n  [\n    'none',\n    [\n      {\n        fileExt: 'none',\n        paletteLabel: 'Unpair',\n        caption: 'Unpair Current Notebook',\n      },\n    ],\n  ],\n]);\n\n/**\n * Supported kernels file types metadata\n */\nexport const AUTO_LANGUAGE_FILETYPE_DATA = new Map<string, IFileTypeData[]>([\n  [\n    'python',\n    [\n      {\n        fileExt: 'py',\n        paletteLabel: 'New Python Text Notebook',\n        caption: 'Create a new Python Text Notebook',\n        iconName: 'ui-components:python',\n        launcherLabel: 'Python',\n        kernelName: 'python3',\n      },\n    ],\n  ],\n  [\n    'julia',\n    [\n      {\n        fileExt: 'jl',\n        paletteLabel: 'New Julia Text Notebook',\n        caption: 'Create a new Julia Text Notebook',\n        iconName: 'ui-components:julia',\n        launcherLabel: 'Julia',\n        kernelName: 'julia',\n      },\n    ],\n  ],\n  [\n    'R',\n    [\n      {\n        fileExt: 'R',\n        paletteLabel: 'New R Text Notebook',\n        caption: 'Create a new R Text Notebook',\n        iconName: 'ui-components:r-kernel',\n        launcherLabel: 'R',\n        kernelName: 'ir',\n      },\n    ],\n  ],\n]);\n\n/**\n * Supported Jupytext create new text notebooks file types\n */\nexport const JUPYTEXT_CREATE_TEXT_NOTEBOOK_FILETYPE_DATA = new Map<\n  string,\n  IFileTypeData[]\n>([\n  [\n    'auto:percent',\n    [\n      {\n        fileExt: 'auto:percent',\n        paletteLabel: 'Percent Format',\n        caption: 'Percent Format',\n        launcherLabel: 'Percent Format',\n      },\n    ],\n  ],\n  [\n    'auto:light',\n    [\n      {\n        fileExt: 'auto:light',\n        paletteLabel: 'Light Format',\n        caption: 'Light Format',\n        launcherLabel: 'Light Format',\n      },\n    ],\n  ],\n  [\n    'auto:nomarker',\n    [\n      {\n        fileExt: 'auto:nomarker',\n        paletteLabel: 'Nomarker Format',\n        caption: 'Nomarker Format',\n        launcherLabel: 'Nomarker Format',\n      },\n    ],\n  ],\n  [\n    'py:marimo',\n    [\n      {\n        fileExt: 'py:marimo',\n        paletteLabel: 'Marimo Format',\n        caption: 'Marimo Format',\n        launcherLabel: 'Marimo Format',\n      },\n    ],\n  ],\n  [\n    'md',\n    [\n      {\n        fileExt: 'md',\n        paletteLabel: 'New Markdown Text Notebook',\n        caption: 'Create a new Markdown Text Notebook',\n        iconName: 'ui-components:markdown',\n        launcherLabel: 'Markdown',\n      },\n    ],\n  ],\n  [\n    'md:myst',\n    [\n      {\n        fileExt: 'md:myst',\n        paletteLabel: 'New MyST Markdown Text Notebook',\n        caption: 'Create a new MyST Markdown Text Notebook',\n        iconName: 'ui-components:markdown',\n        launcherLabel: 'MyST Markdown',\n      },\n    ],\n  ],\n  [\n    'Rmd',\n    [\n      {\n        fileExt: 'Rmd',\n        paletteLabel: 'New R Markdown Text Notebook',\n        caption: 'Create a new R Markdown Text Notebook',\n        iconName: 'ui-components:markdown',\n        launcherLabel: 'R Markdown',\n      },\n    ],\n  ],\n  [\n    'qmd',\n    [\n      {\n        fileExt: 'qmd',\n        paletteLabel: 'New Quarto Markdown Text Notebook',\n        caption: 'Create a new Quarto Markdown Text Notebook',\n        iconName: 'ui-components:markdown',\n        launcherLabel: 'Quarto Markdown',\n      },\n    ],\n  ],\n]);\n\n/**\n * Supported Jupytext format extensions bar custom and none\n */\nexport const JUPYTEXT_FORMATS = Array.from(\n  JUPYTEXT_PAIR_COMMANDS_FILETYPE_DATA.keys(),\n)\n  .map((format) => {\n    return format;\n  })\n  .filter((format) => {\n    return !['custom', 'none'].includes(format);\n  });\n\n/**\n * List of formats that would be added to launcher icons\n */\nexport const TEXT_NOTEBOOKS_LAUNCHER_ICONS = JUPYTEXT_FORMATS.filter(\n  (format) => {\n    return !['ipynb', 'auto:nomarker', 'qmd', 'custom', 'none'].includes(\n      format,\n    );\n  },\n);\n\n/**\n * An interface for file type metadata\n */\nexport interface IFileTypeData {\n  fileExt: string;\n  paletteLabel: string;\n  caption: string;\n  iconName?: string;\n  kernelIcon?: LabIcon;\n  launcherLabel?: string;\n  kernelName?: string;\n  separator?: boolean;\n}\n\n/**\n * An interface for Jupytext representation\n */\nexport interface IJupytextRepresentation {\n  formatName: string;\n  extension: string;\n}\n\n/**\n * An interface for Jupytext metadata\n */\nexport interface IJupytextSection {\n  formats?: string;\n  notebook_metadata_filter?: string;\n  cell_metadata_filer?: string;\n  text_representation?: IJupytextRepresentation;\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/src/utils.ts",
    "content": "import { IEditorLanguageRegistry } from '@jupyterlab/codemirror';\n\nimport {\n  ServiceManager,\n  ServerConnection,\n  KernelSpec,\n} from '@jupyterlab/services';\n\nimport { LabIcon } from '@jupyterlab/ui-components';\n\nimport { URLExt } from '@jupyterlab/coreutils';\n\nimport { DocumentRegistry, IDocumentWidget } from '@jupyterlab/docregistry';\n\nimport { CommandRegistry } from '@lumino/commands';\n\nimport { Buffer } from 'buffer';\n\nimport {\n  NS,\n  SERVER_SETTINGS,\n  AUTO_LANGUAGE_FILETYPE_DATA,\n  JUPYTEXT_CREATE_TEXT_NOTEBOOK_FILETYPE_DATA,\n  FACTORY,\n  CommandIDs,\n  IFileTypeData,\n} from './tokens';\n\n/**\n * Get kernel icon SVG string\n */\nasync function getKernelIconBase64String(\n  kernelIconUrl: string,\n): Promise<string> {\n  // Seems like URL prefix is already included in kernelIconUrl. We need to strip\n  // it off as baseUrl will already has url prefix.\n  kernelIconUrl = `/kernelspecs${kernelIconUrl.split('kernelspecs')[1]}`;\n  const url = URLExt.join(SERVER_SETTINGS.baseUrl, kernelIconUrl);\n  const response = await ServerConnection.makeRequest(url, {}, SERVER_SETTINGS);\n  const blob = await response.arrayBuffer();\n  const contentType = response.headers.get('content-type');\n  return `data:${contentType};base64,${Buffer.from(blob).toString('base64')}`;\n}\n\n/**\n * Make a SVG string from base64 image\n */\nfunction base64ToSvgStr(width: number, imageBase64: string): string {\n  return `<svg xmlns=\"http://www.w3.org/2000/svg\"\n  xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"none\" viewBox=\"0 0 ${width} ${width}\">\n  <g id=\"layer1\">\n     <image xlink:href=\"${imageBase64}\"/>\n  </g>\n</svg>`.replace(/\\n/g, ' ');\n}\n\n/**\n * Get kernel Icon\n */\nasync function getKernelIcon(\n  specModel: KernelSpec.ISpecModel,\n  fileType: DocumentRegistry.IFileType | undefined,\n): Promise<LabIcon> {\n  // First check for logo-svg\n  if (specModel.resources['logo-svg']) {\n    const svgStr = await getKernelIconBase64String(\n      specModel.resources['logo-svg'],\n    );\n    return new LabIcon({\n      name: `${NS}:icon:${specModel.name}`,\n      svgstr: svgStr,\n    });\n  }\n  // Else check if 64x64 kernel icon is available\n  if (specModel.resources['logo-64x64']) {\n    const iconBase64String = await getKernelIconBase64String(\n      specModel.resources['logo-64x64'],\n    );\n    return new LabIcon({\n      name: `${NS}:icon:${specModel.name}`,\n      svgstr: base64ToSvgStr(64, iconBase64String),\n    });\n  }\n  // Finally check for 32x32 kernel icon\n  if (specModel.resources['logo-32x32']) {\n    const iconBase64String = await getKernelIconBase64String(\n      specModel.resources['logo-32x32'],\n    );\n    return new LabIcon({\n      name: `${NS}:icon:${specModel.name}`,\n      svgstr: base64ToSvgStr(32, iconBase64String),\n    });\n  }\n  if (fileType && fileType.icon) {\n    return fileType.icon;\n  }\n  // If not found, make a generic kernel icon\n  return LabIcon.resolve({\n    icon: 'ui-components:kernel',\n  });\n}\n\n/**\n * Get all available kernel languages so that we replace auto format\n * with these language file extensions\n */\nexport async function getAvailableKernelLanguages(\n  languages: IEditorLanguageRegistry,\n  docRegistry: DocumentRegistry,\n  serviceManager: ServiceManager.IManager,\n): Promise<Map<string, IFileTypeData[]>> {\n  const specsManager = serviceManager.kernelspecs;\n  await specsManager.ready;\n  const fileTypes = new Map<string, IFileTypeData[]>();\n  const specs = specsManager.specs?.kernelspecs ?? {};\n  for (const [spec, specModel] of Object.entries(specs)) {\n    if (specModel) {\n      // First check if kernel is one of the pre-defined types (Python, R, Julia)\n      const exts = AUTO_LANGUAGE_FILETYPE_DATA.get(specModel.language);\n      if (exts !== undefined) {\n        fileTypes.set(specModel.language, exts);\n      } else {\n        // If not, try to get languageInfo from codemirror languages\n        const languageInfo = languages.findByName(specModel.language);\n        // If we managed to find the language, construct the FileTypeData\n        // Here we make an assumption that first extension in\n        // languageInfo.extensions is the most common one.\n        const fileExt = languageInfo.extensions[0];\n        const fileType = docRegistry.getFileTypesForPath(`test.${fileExt}`)[0];\n        if (languageInfo) {\n          // We attempt to get kernelIcon here for specModel.resources\n          // If none provided, we return generic kernel icon\n          const kernelIcon = await getKernelIcon(specModel, fileType);\n          const displayName =\n            languageInfo.displayName || specModel.display_name;\n          const exts: IFileTypeData[] = [\n            {\n              fileExt,\n              paletteLabel: `New ${displayName} Text Notebook`,\n              caption: `Create a new ${displayName} Text Notebook`,\n              kernelIcon: kernelIcon,\n              launcherLabel: displayName,\n              kernelName: spec,\n            },\n          ];\n          fileTypes.set(specModel.language, exts);\n        }\n      }\n    }\n  }\n  return fileTypes;\n}\n\n/**\n * Get all available 'Create New Text Notebook' commands based on configured\n * formats and available kernels\n */\nexport async function getAvailableCreateTextNotebookCommands(\n  includeFormats: string[],\n  availableKernelLanguages: Map<string, IFileTypeData[]>,\n): Promise<Map<string, IFileTypeData[]>> {\n  const numKernels = availableKernelLanguages.size;\n\n  // Initialise a map of 'Create New Text Notebook' command filetypes\n  const createTextNotebookCommands = new Map<string, IFileTypeData[]>();\n\n  // Iterate through all JUPYTEXT_CREATE_TEXT_NOTEBOOK_FILETYPE_DATA file types.\n  JUPYTEXT_CREATE_TEXT_NOTEBOOK_FILETYPE_DATA.forEach(\n    (fileTypes: IFileTypeData[], format: string) => {\n      fileTypes.map((fileType: IFileTypeData) => {\n        // If format is auto, we need to add all currently available kernels\n        // For instance if there are Python and R kernels available, format\n        // auto:percent will be replaced by py:percent and R:percent\n        if (format.startsWith('auto')) {\n          const formatType = format.split(':')[1];\n          let mapIndex = 0;\n          availableKernelLanguages.forEach(\n            (kernelLanguages: IFileTypeData[], kernelKey: string) => {\n              const updatedKernelKey = `${kernelKey}:${formatType}`;\n              createTextNotebookCommands.set(updatedKernelKey, []);\n              mapIndex += 1;\n              kernelLanguages.map((kernelLanguageFileType) => {\n                // Merge fileType object from kernel and Jupytext format and push\n                // it to createTextNotebookCommands\n                const updatedKernelLanguageFileType = {\n                  ...kernelLanguageFileType,\n                };\n                updatedKernelLanguageFileType.fileExt = `${updatedKernelLanguageFileType.fileExt}:${formatType}`;\n                updatedKernelLanguageFileType.paletteLabel = `${updatedKernelLanguageFileType.paletteLabel} with ${fileType.paletteLabel}`;\n                updatedKernelLanguageFileType.caption = `${updatedKernelLanguageFileType.caption} with ${fileType.caption}`;\n                updatedKernelLanguageFileType.launcherLabel = `${updatedKernelLanguageFileType.launcherLabel} - ${fileType.launcherLabel}`;\n                if (numKernels === mapIndex) {\n                  updatedKernelLanguageFileType.separator = true;\n                }\n                createTextNotebookCommands\n                  .get(updatedKernelKey)\n                  .push(updatedKernelLanguageFileType);\n                // Update includeFormats with the language specific formats\n                // Effectiviely we will add formats like py:light, js:light here\n                if (includeFormats.includes(format)) {\n                  includeFormats.push(updatedKernelLanguageFileType.fileExt);\n                }\n              });\n            },\n          );\n        } else {\n          if (createTextNotebookCommands.get(format) === undefined) {\n            createTextNotebookCommands.set(format, []);\n          }\n          createTextNotebookCommands.get(format).push(fileType);\n        }\n      });\n    },\n  );\n  return createTextNotebookCommands;\n}\n\n/**\n * Create New Text Notebook file\n */\nexport const createNewTextNotebook = async (\n  cwd: string,\n  kernelId: string,\n  kernelName: string,\n  format: string,\n  commands: CommandRegistry,\n) => {\n  const model = await commands.execute(CommandIDs.newUntitled, {\n    path: cwd,\n    type: 'notebook',\n    // We should not have auto in format at this point. If somehow we end up having\n    // it, ensure we replace by py as Python kernel exists always\n    ext: format.replace('auto', 'py'),\n  });\n  if (model !== undefined) {\n    const widget = (await commands.execute('docmanager:open', {\n      path: model.path,\n      factory: FACTORY,\n      kernel: { id: kernelId, name: kernelName },\n    })) as unknown as IDocumentWidget;\n    widget.isUntitled = true;\n    return widget;\n  }\n};\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/style/base.css",
    "content": ""
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/style/index.css",
    "content": "@import url('base.css');\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/style/index.js",
    "content": "import './base.css';\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"lib\": [\"es2018\", \"dom\"],\n    \"module\": \"commonjs\",\n    \"moduleResolution\": \"node\",\n    \"noEmitOnError\": true,\n    \"noUnusedLocals\": true,\n    \"outDir\": \"lib\",\n    \"rootDir\": \"src\",\n    \"strict\": true,\n    \"strictNullChecks\": false,\n    \"target\": \"es2018\",\n    \"types\": [\"node\"],\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  },\n  \"include\": [\"src/*\"]\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/README.md",
    "content": "# Integration Testing\n\nThis folder contains the integration tests of the extension.\n\nThey are defined using [Playwright](https://playwright.dev/docs/intro) test runner\nand [Galata](https://github.com/jupyterlab/jupyterlab/tree/main/galata) helper.\n\nThe Playwright configuration is defined in [playwright.config.js](./playwright.config.js).\n\nThe JupyterLab server configuration to use for the integration test is defined\nin [jupyter_server_test_config.py](./jupyter_server_test_config.py).\n\nThe default configuration will produce video for failing tests and an HTML report.\n\n> There is a new experimental UI mode that you may fall in love with; see [that video](https://www.youtube.com/watch?v=jF0yA-JLQW0).\n\n## Run the tests\n\n> All commands are assumed to be executed from the _jupyterlab-jupytext-extension_ directory\n\nTo run the tests, you need to:\n\n1. Compile the extension:\n\n```sh\njlpm install\njlpm build:prod\n```\n\n> Check the extension is installed in JupyterLab.\n\n2. Install test dependencies (needed only once):\n\n```sh\ncd ./ui-tests\njlpm install\njlpm playwright install\ncd ..\n```\n\n3. Execute the [Playwright](https://playwright.dev/docs/intro) tests:\n\n```sh\ncd ./ui-tests\njlpm playwright test\n```\n\nTest results will be shown in the terminal. In case of any test failures, the test report\nwill be opened in your browser at the end of the tests execution; see\n[Playwright documentation](https://playwright.dev/docs/test-reporters#html-reporter)\nfor configuring that behavior.\n\n## Update the tests snapshots\n\n> All commands are assumed to be executed from the _main-menu_ directory\n\nIf you are comparing snapshots to validate your tests, you may need to update\nthe reference snapshots stored in the repository. To do that, you need to:\n\n1. Compile the extension:\n\n```sh\njlpm install\njlpm build:prod\n```\n\n> Check the extension is installed in JupyterLab.\n\n2. Install test dependencies (needed only once):\n\n```sh\ncd ./ui-tests\njlpm install\njlpm playwright install\ncd ..\n```\n\n3. Execute the [Playwright](https://playwright.dev/docs/intro) command:\n\n```sh\ncd ./ui-tests\njlpm playwright test -u\n```\n\n> Some discrepancy may occurs between the snapshots generated on your computer and\n> the one generated on the CI. To ease updating the snapshots on a PR, you can\n> type `please update playwright snapshots` to trigger the update by a bot on the CI.\n> Once the bot has computed new snapshots, it will commit them to the PR branch.\n\n## Create tests\n\n> All commands are assumed to be executed from the _main-menu_ directory\n\nTo create tests, the easiest way is to use the code generator tool of playwright:\n\n1. Compile the extension:\n\n```sh\njlpm install\njlpm build:prod\n```\n\n> Check the extension is installed in JupyterLab.\n\n2. Install test dependencies (needed only once):\n\n```sh\ncd ./ui-tests\njlpm install\njlpm playwright install\ncd ..\n```\n\n3. Start the server:\n\n```sh\ncd ./ui-tests\njlpm start\n```\n\n4. Execute the [Playwright code generator](https://playwright.dev/docs/codegen) in **another terminal**:\n\n```sh\ncd ./ui-tests\njlpm playwright codegen localhost:8888\n```\n\n## Debug tests\n\n> All commands are assumed to be executed from the _main-menu_ directory\n\nTo debug tests, a good way is to use the inspector tool of playwright:\n\n1. Compile the extension:\n\n```sh\njlpm install\njlpm build:prod\n```\n\n> Check the extension is installed in JupyterLab.\n\n2. Install test dependencies (needed only once):\n\n```sh\ncd ./ui-tests\njlpm install\njlpm playwright install\ncd ..\n```\n\n3. Execute the Playwright tests in [debug mode](https://playwright.dev/docs/debug):\n\n```sh\ncd ./ui-tests\njlpm playwright test --debug\n```\n\n## Upgrade Playwright and the browsers\n\nTo update the web browser versions, you must update the package `@playwright/test`:\n\n```sh\ncd ./ui-tests\njlpm up \"@playwright/test\"\njlpm playwright install\n```\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/jupyter_server_test_config.py",
    "content": "\"\"\"Server configuration for integration tests.\n\n!! Never use this configuration in production because it\nopens the server to the world and provide access to JupyterLab\nJavaScript objects through the global window variable.\n\"\"\"\n\nfrom jupyterlab.galata import configure_jupyter_server\n\nconfigure_jupyter_server(c)  # noqa: F821\n\n# Uncomment to set server log level to debug level\n# c.ServerApp.log_level = \"DEBUG\"\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/package.json",
    "content": "{\n    \"name\": \"jupyterlab-jupytext-ui-tests\",\n    \"version\": \"1.4.1\",\n    \"description\": \"Basic Integration Tests\",\n    \"private\": true,\n    \"scripts\": {\n        \"start\": \"python -m bash_kernel.install && jupyter lab --allow-root --config jupyter_server_test_config.py\",\n        \"test\": \"jlpm playwright test\",\n        \"test:update\": \"jlpm playwright test --update-snapshots\"\n    },\n    \"devDependencies\": {\n        \"@jupyterlab/galata\": \"^5.5.2\",\n        \"@playwright/test\": \"^1.55.1\"\n    }\n}\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/playwright.config.js",
    "content": "/**\n * Configuration for Playwright using default from @jupyterlab/galata\n */\nconst baseConfig = require('@jupyterlab/galata/lib/playwright-config');\n\nmodule.exports = {\n  ...baseConfig,\n  projects: [\n    {\n      name: 'jupytext',\n      testMatch: 'tests/*.ts',\n      testIgnore: '**/.ipynb_checkpoints/**',\n      timeout: 60000,\n      // use: {\n      //   launchOptions: {\n      //     // Force slow motion\n      //     slowMo: 1000,\n      //   },\n      // },\n    },\n  ],\n  // Visual comparison of screenshots can be flaky. Use a tolerance\n  expect: {\n    toMatchSnapshot: {\n      maxDiffPixelRatio: 0.02,\n    },\n  },\n  webServer: {\n    command: 'jlpm start',\n    url: 'http://localhost:8888/lab',\n    timeout: 120 * 1000,\n    reuseExistingServer: !process.env.CI,\n  },\n  // Switch to 'always' to keep raw assets for all tests\n  preserveOutput: 'failures-only', // Breaks HTML report if use.video == 'on'\n  // Try 3 retries as some tests are flaky\n  retries: process.env.CI ? 3 : 0,\n};\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests/jupytext-launcher.spec.ts",
    "content": "import { expect, test } from '@jupyterlab/galata';\n\ntest.describe('Jupytext Launcher Category', () => {\n  test.use({ autoGoto: false, viewport: { height: 1020, width: 1280 } });\n  test('should have Jupytext category in launcher', async ({ page }) => {\n    await page.goto();\n    await page.waitForSelector('.jp-LauncherCard-label');\n\n    const imageName = 'launcher-category.png';\n    expect(await page.screenshot()).toMatchSnapshot(imageName.toLowerCase());\n  });\n});\n\ntest.describe('Jupytext Context Menu', () => {\n  test.use({ autoGoto: false, viewport: { height: 1020, width: 1280 } });\n  test('should have New Text Notebook in Context Menu', async ({ page }) => {\n    await page.goto();\n    await page.waitForSelector('.jp-FileBrowser');\n\n    // Right click within file browser\n    await page.locator('.jp-FileBrowser').click({ button: 'right' });\n\n    // Wait for a moment to observe the context menu\n    await page.waitForTimeout(5000);\n\n    const imageName = 'context-menu.png';\n    expect(await page.screenshot()).toMatchSnapshot(imageName.toLowerCase());\n  });\n});\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests/jupytext-menu.spec.ts",
    "content": "import { expect, test } from '@jupyterlab/galata';\n\n// Main Jupytext menu\nconst jupytextMenu = ['File>New Text Notebook', 'File>Jupytext'];\n\ntest.describe('Jupytext Menu Tests', () => {\n  test.use({ autoGoto: false });\n\n  jupytextMenu.forEach((menuPath) => {\n    test(`Open menu item ${menuPath}`, async ({ page }) => {\n      await page.goto();\n      await page.menu.open(menuPath);\n      expect(await page.menu.isOpen(menuPath)).toBeTruthy();\n\n      const imageName = `opened-jupytext-menu-${menuPath.replace(\n        />/g,\n        '-',\n      )}.png`;\n      // const menu = await page.menu.getOpenMenu();\n      expect(await page!.screenshot()).toMatchSnapshot(imageName.toLowerCase());\n    });\n  });\n});\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests/jupytext-notebook.spec.ts",
    "content": "import { expect, test } from '@jupyterlab/galata';\n\n// Currently we are enabling only percent and MyST formats in Jupytext menu\n// So test for only these cases.\n// If we update our test env with more external kernels, we can include them\n// here in the formats\nconst createTests = [\n  {\n    label: 'New Python Text Notebook with Percent Format',\n    extension: '.py',\n  },\n  {\n    label: 'New Shell Text Notebook with Percent Format',\n    extension: '.sh',\n  },\n  {\n    label: 'New MyST Markdown Text Notebook',\n    extension: '.md',\n  },\n];\nconst pairTests = [\n  {\n    label: 'Percent Format',\n    extension: '.py',\n  },\n  {\n    label: 'Light Format',\n    extension: '.py',\n  },\n  {\n    label: 'MyST Markdown',\n    extension: '.md',\n  },\n];\n\n// Get all possible menuPaths\nconst createNewMenuPaths = createTests.map((format) => {\n  return {\n    menuPath: `File>New Text Notebook>${format.label}`,\n    extension: format.extension,\n  };\n});\n\nconst pairMenuPaths = pairTests.map((format) => {\n  return {\n    menuPath: `File>Jupytext>Pair Notebook>Pair Notebook with ${format.label}`,\n    extension: format.extension,\n  };\n});\n\n// Toggle metadata\nconst toggleMetadataPath = 'File>Jupytext>Include Metadata';\n\n// Name of notebook file\nconst fileName = 'notebook.ipynb';\n\n/**\n * Helper function to populate notebook cells and run them\n */\nasync function populateNotebook(extension, page) {\n  await page.notebook.setCell(0, 'raw', 'Just a raw cell');\n  await page.notebook.addCell(\n    'markdown',\n    '## This is **bold** and *italic* [link to jupyter.org!](http://jupyter.org)',\n  );\n  await page.notebook.runCell(1, true);\n  // For bash, use shell code\n  if (extension === '.sh') {\n    await page.notebook.addCell('code', 'echo \"This is Bash Kernel\"');\n  } else {\n    await page.notebook.addCell('code', '2 ** 3');\n  }\n  await page.notebook.runCell(2, true);\n}\n\ntest.describe('Jupytext Create Text Notebooks from Menu Tests', () => {\n  createNewMenuPaths.forEach((paths) => {\n    test(`Open menu item ${paths.menuPath}`, async ({ page }) => {\n      // await page.goto();\n      // Create new text notebook by clicking menupath item\n      await page.menu.clickMenuItem(paths.menuPath);\n\n      // Wait for the kernel dialog and accept it\n      await page.waitForSelector('.jp-Dialog');\n\n      const select = await page.$('.jp-Dialog-body >> select');\n      // Select appropriate kernel\n      let option: any;\n      if (paths.extension === '.sh') {\n        option = await select!.$('option:has-text(\"Bash\")');\n      } else {\n        option = await select!.$('option:has-text(\"Python\")');\n      }\n      await select!.selectOption(option);\n      await page.click('.jp-Dialog .jp-mod-accept');\n\n      const firstCell = await page.notebook.getCellLocator(0);\n      await firstCell?.hover();\n\n      await expect(firstCell!.locator('.jp-cell-toolbar')).toHaveCount(1);\n\n      // Populate page\n      await populateNotebook(paths.extension, page);\n\n      // Toggle Include Metadata. It is enabled by default.\n      // It is to avoid having Jupytext version in metadata in snapshot\n      // If we include it, for every version bump we need to update snapshots as\n      // version changes which will fail UI tests. Just do not include metadata\n      // which will ensure smooth version bumping\n      await page.menu.clickMenuItem(toggleMetadataPath);\n\n      // Save notebook\n      await page.notebook.save();\n\n      // Try to open saved text notebook with Editor factory\n      await page.filebrowser.open(`Untitled${paths.extension}`, 'Editor');\n\n      // Compare text notebook contents\n      const imageName = `opened-${paths.menuPath.replace(/>/g, '-')}-text.png`;\n      expect(await page.screenshot()).toMatchSnapshot(imageName.toLowerCase());\n    });\n  });\n});\n\ntest.describe('Jupytext Pair Python Notebooks from Menu Tests', () => {\n  // Before each test start a new notebook and add some cell data\n  test.beforeEach(async ({ page }) => {\n    await page.notebook.createNew(fileName, { kernel: 'python3' });\n    await populateNotebook('.py', page);\n  });\n\n  pairMenuPaths.forEach((paths) => {\n    test(`Open menu item ${paths.menuPath}`, async ({ page }) => {\n      // Click pairing command\n      await page.menu.clickMenuItem(paths.menuPath);\n\n      // Toggle Include Metadata. It is enabled by default.\n      // It is to avoid having Jupytext version in metadata in snapshot\n      // If we include it, for every version bump we need to update snapshots as\n      // version changes which will fail UI tests. Just do not include metadata\n      // which will ensure smooth version bumping\n      await page.menu.clickMenuItem(toggleMetadataPath);\n\n      // Wait until we save notebook. Once we save it, paired file appears\n      await page.notebook.save();\n\n      // Try to open paired file\n      await page.filebrowser.open(fileName.replace('.ipynb', paths.extension));\n\n      const imageName = `paired-jupytext-${paths.menuPath.replace(\n        />/g,\n        '-',\n      )}.png`;\n      expect(await page.screenshot()).toMatchSnapshot(imageName.toLowerCase());\n    });\n  });\n});\n"
  },
  {
    "path": "jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests/jupytext-settings.spec.ts",
    "content": "import { expect, test } from '@jupyterlab/galata';\n\ntest('Open the settings editor with a Jupytext query', async ({ page }) => {\n  await page.evaluate(async () => {\n    await window.jupyterapp.commands.execute('settingeditor:open', {\n      query: 'Jupytext',\n    });\n  });\n\n  // Seems like this test is very flaky. Moreover it does not add a lot of value\n  // expect(\n  //   await page.locator('.jp-PluginList .jp-FilterBox input').inputValue()\n  // ).toEqual('Jupytext');\n\n  await expect(page.locator('.jp-SettingsForm')).toHaveCount(1);\n\n  const pluginList = page.locator('.jp-PluginList');\n\n  expect(await pluginList.screenshot()).toMatchSnapshot(\n    'jupytext-settings-plugin-list.png',\n  );\n\n  const settingsPanel = page.locator('.jp-SettingsPanel');\n\n  expect(await settingsPanel.screenshot()).toMatchSnapshot(\n    'jupytext-settings-panel.png',\n  );\n});\n"
  },
  {
    "path": "jupyterlab/scripts/install_extension.py",
    "content": "# This script does the \"same\" job as `jupyter labextension develop --overwrite .`\n#\n# Seems like we cannot use the upstream script on our repo organization.\n# If we want to use the upstream script we need to have a setup.py or pyproject.toml\n# in jupyterlab/jupyterlab-jupytext folder with the name of the package.\n#\n# We are only interested in making a symlink to the\n# sys.prefix/share/jupyter/labextensions folder for development. We should be able\n# to do it in simple script\n#\n\nimport os\n\nimport jupyterlab_jupytext\nfrom jupyterlab.federated_labextensions import build_labextension, develop_labextension\n\n\ndef main():\n    \"\"\"Create symlink in sys.prefix based on name of extension\"\"\"\n\n    labexts = jupyterlab_jupytext._jupyter_labextension_paths()\n    base_path = os.path.join(\n        os.path.dirname(os.path.dirname(os.path.abspath(__file__))),\n        \"jupyterlab_jupytext\",\n    )\n\n    for labext in labexts:\n        src = os.path.join(base_path, labext[\"src\"])\n        dest = labext[\"dest\"]\n        print(f\"Installing {src} -> {dest}\")\n\n        if not os.path.exists(src):\n            build_labextension(base_path)\n\n        full_dest = develop_labextension(\n            src,\n            overwrite=True,\n            symlink=True,\n            user=False,\n            sys_prefix=True,\n            labextensions_dir=\"\",\n            destination=dest,\n        )\n        print(f\"Creating symlink at {full_dest}\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "jupyterlab/tsconfig.eslint.json",
    "content": "{\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"lib\": [\"es2018\", \"dom\"],\n    \"module\": \"commonjs\",\n    \"moduleResolution\": \"node\",\n    \"noEmitOnError\": true,\n    \"noUnusedLocals\": true,\n    \"outDir\": \"lib\",\n    \"rootDir\": \"src\",\n    \"strict\": true,\n    \"strictNullChecks\": false,\n    \"target\": \"es2018\",\n    \"types\": [],\n    \"esModuleInterop\": true\n  },\n  \"extends\": \"../../tsconfig.eslint.json\",\n  \"include\": [\"**/src/*\"]\n}\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[build-system]\nrequires = [\"hatchling>=1.5.0\", \"hatch-jupyter-builder>=0.5\", \"jupyterlab>=4\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"jupytext\"\ndescription = \"Jupyter notebooks as Markdown documents, Julia, Python or R scripts\"\nlicense = { file = \"LICENSE\" }\nauthors = [\n    { name = \"Marc Wouts\", email = \"marc.wouts@gmail.com\" },\n]\nreadme = \"build/README_with_absolute_links.md\"\nrequires-python = \">=3.9\"\nclassifiers = [\n    \"Development Status :: 5 - Production/Stable\",\n    \"License :: OSI Approved :: MIT License\",\n    \"Environment :: Console\",\n    \"Framework :: Jupyter\",\n    \"Framework :: Jupyter :: JupyterLab :: 4\",\n    \"Framework :: Jupyter :: JupyterLab :: Extensions\",\n    \"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt\",\n    \"Intended Audience :: Developers\",\n    \"Intended Audience :: Science/Research\",\n    \"Topic :: Text Processing :: Markup\",\n    \"Programming Language :: Python\",\n    \"Programming Language :: Python :: 3\",\n    \"Programming Language :: Python :: 3.9\",\n    \"Programming Language :: Python :: 3.10\",\n    \"Programming Language :: Python :: 3.11\",\n    \"Programming Language :: Python :: 3.12\",\n    \"Programming Language :: Python :: 3.13\",\n    \"Programming Language :: Python :: 3.14\",\n]\ndependencies = [\n    \"nbformat\",\n    \"mdit-py-plugins\",\n    \"markdown-it-py>=1.0\",\n    \"packaging\",\n    \"pyyaml\",\n    \"tomli;python_version<\\\"3.11\\\"\",\n]\ndynamic = [\"version\"]\n\n[project.urls]\nHomepage = \"https://github.com/mwouts/jupytext\"\n\"Source Code\" = \"https://github.com/mwouts/jupytext\"\nDocumentation = \"https://jupytext.readthedocs.io\"\n\n[project.optional-dependencies]\n# Test related dependencies\ntest = [\n  \"pytest\",\n  \"pytest-asyncio\",\n  \"pytest-xdist\",\n  \"pytest-randomly\"\n]\ntest-functional = [\n  \"jupytext[test]\",\n  \"black\",\n]\ntest-integration = [\n  \"jupytext[test-functional]\",\n  \"jupyter-server!=2.11\", # issue 1165\n  # jupytext --execute\n  \"nbconvert\",\n  \"ipykernel\",\n]\ntest-external = [\n  \"jupytext[test-integration]\",\n  # jupytext --pipe and --check\n  \"autopep8\",\n  \"isort\",\n  \"flake8\",\n  # Sphinx gallery\n  \"sphinx\",\n  \"sphinx-gallery>=0.8\",\n  # Pre-commit tests\n  \"gitpython\",\n  \"pre-commit\",\n  # Marimo notebooks\n  \"marimo>=0.17.6,<=0.19.4\", #1485\n  # Interaction with other contents managers\n  \"jupyter-fs[fs]>=1.0\"  # 1398\n]\n# Coverage requirements\ntest-cov = [\n    \"jupytext[test-integration]\",\n    \"pytest-cov>=2.6.1\",\n]\n# Galata test env\n# Install a non python kernel to ensure extension is working as expected\n# Kernel spec is installed before running UI tests\ntest-ui = [\n    \"bash_kernel\",\n]\ndev = [\n    \"jupytext[test-cov,test-external]\",\n]\n# Documentation dependencies\ndocs = [\n    \"sphinx\",\n    \"sphinx-copybutton\",\n    \"sphinx-rtd-theme\",\n    \"myst-parser\",\n]\n\n[project.scripts]\n\"jupytext\" = \"jupytext.cli:jupytext\"\n\"jupytext-config\" = \"jupytext_config.__main__:main\"\n\n[tool.hatch.metadata.hooks.custom]\npath = \"tools/absolute_links_in_readme.py\"\n\n[tool.hatch.version]\n# Read version string from version.py and use it for the package\npath = \"src/jupytext/version.py\"\n\n# Hatch first build sdist and then builds a wheel out of that sdist\n# By using the below config, we remove path prefixes in sdist meaning\n# that sdist will not have a src in root but directly jupytext and other\n# modules.\n#\n# So when it attempts to build wheel out of the sdist there is no more\n# src folder and hence it complains about not finding src/jupytext/version.py\n# file. So, we **should not** use hatch.build.sources here which removes\n# path prefixes\n# [tool.hatch.build]\n# sources = [\"src\", \"jupyterlab\"]\n\n# Following config is related to JupyterLab extension\n[tool.hatch.build.targets.sdist]\nartifacts = [\"jupyterlab/jupyterlab_jupytext/labextension\"]\n\n[tool.hatch.build.targets.wheel]\npackages = [\"src/jupytext\", \"src/jupytext_config\", \"jupyterlab/jupyterlab_jupytext\"]\n\n[tool.hatch.build.targets.wheel.shared-data]\n\"jupyterlab/jupyter-config\" = \"etc/jupyter\"\n\"jupyterlab/jupyterlab_jupytext/labextension\" = \"share/jupyter/labextensions/jupyterlab-jupytext\"\n\n[tool.hatch.build.hooks.jupyter-builder]\nenable-by-default = false\n# We enable this hook by setting env var HATCH_BUILD_HOOKS_ENABLE=true\n# So `pip install .` will **not** build JupyterLab related\n# extension. To install the extension, it is required to run\n# `HATCH_BUILD_HOOKS_ENABLE=true pip install .`\n# Runtime dependency for this build hook\n# We need jupyterlab as build time depdendency to get jlpm (wrapper around yarn)\n# UPDATE 20260118: Based on https://github.com/jupyterlab/hatch-jupyter-builder/issues/146\n# we moved all the dependencies to build system dependencies\n# We use npm_builder to build the jupyterlab extension\nbuild-function = \"hatch_jupyter_builder.npm_builder\"\n# Hatch will mark this hook as success upon creation of following files\n# in the build_dir\nensured-targets = [\n    \"jupyterlab/jupyterlab_jupytext/labextension/static/style.js\",\n    \"jupyterlab/jupyterlab_jupytext/labextension/package.json\",\n]\n# If these files already exists in build_dir (after first build),\n# hatch will skip build step. If there are changes in src/ of\n# the extension, build will be triggered even if the build assets exist\nskip-if-exists = [\"jupyterlab/jupyterlab_jupytext/labextension/static/style.js\"]\n\n[tool.hatch.build.hooks.jupyter-builder.build-kwargs]\n# Root directory where build should be done\npath = \"jupyterlab\"\n# Build command that is defined in package.json\nbuild_cmd = \"build:prod\"\n# We use jlpm, which is wrapper around yarn to build transpiled assets\nnpm = [\"jlpm\"]\n\n[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]\npath = \"jupyterlab\"\nbuild_cmd = \"build\"\nnpm = [\"jlpm\"]\n# hatch-jupyter-builder hook will check the mtime of source_dir and\n# compare it with build_dir to decide if build is necessary or not\nsource_dir = \"jupyterlab/packages\"\nbuild_dir = \"jupyterlab/jupyterlab_jupytext/labextension\"\n\n[tool.check-wheel-contents]\nignore = [\"W002\"]\n\n# flake8 config has been moved to ruff and a pre-commit config has been\n# added\n[tool.ruff]\nline-length = 127\nexclude = [\n    \"tests/data/notebooks/*\",\n]\n# Seems like W503 is not implemented in ruff\n# ref: https://github.com/astral-sh/ruff/issues/4125\nlint.ignore = [\n    \"E203\", \"E231\",\n]\n\n[tool.pytest.ini_options]\nmarkers = [\n    \"requires_black\",\n    \"requires_isort\",\n    \"requires_flake8\",\n    \"requires_autopep8\",\n    \"requires_nbconvert\",\n    \"requires_myst\",\n    \"requires_no_myst\",\n    \"requires_quarto\",\n    \"requires_marimo\",\n    \"requires_pandoc\",\n    \"requires_no_pandoc\",\n    \"requires_sphinx_gallery\",\n    \"requires_user_kernel_python3\",\n    \"requires_ir_kernel\",\n    \"skip_on_windows\",\n    \"pre_commit\",\n    \"asyncio\"\n]\nfilterwarnings = [\n    # Uncomment this \"error\" to turn all unfiltered warnings into errors\n    # \"error\",\n    # Our cwd_tmpdir fixture\n    \"ignore:pathlib.Path.__enter__\\\\(\\\\) is deprecated and scheduled for removal in Python 3.13:DeprecationWarning\",\n    # Pre-commit\n    \"ignore:read_text is deprecated. Use files\\\\(\\\\) instead:DeprecationWarning\",\n    \"ignore:open_text is deprecated. Use files\\\\(\\\\) instead:DeprecationWarning\",\n    # Jupyter\n    \"ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning\",\n    # Jupyter notebook\n    \"ignore:Support for bleach <5 will be removed in a future version of nbconvert:DeprecationWarning\",\n    # jupyterfs\n    \"ignore:run_pre_save_hook is deprecated, use run_pre_save_hooks instead:DeprecationWarning\",\n    \"ignore:run_post_save_hook is deprecated, use run_post_save_hooks instead:DeprecationWarning\",\n    \"ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning\",\n    \"ignore:pkg_resources is deprecated as an API:DeprecationWarning\",\n    # use single quote to denote raw strings in toml\n    # (10 warnings)\n    'ignore:Passing unrecognized arguments to super\\(KernelSpec\\).__init__:DeprecationWarning',\n    # Not seen any more with latest Python + libs\n    \"ignore:Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release:DeprecationWarning\",\n    # in test_utf8_out_331 and two others\n    # Not seen any more with latest Python + libs\n    'ignore:Exception ignored in. <function Context.__del__:pytest.PytestUnraisableExceptionWarning',\n    # In test_markdown_jupytext_nbconvert_is_identity\n    'ignore:.*contextfilter.* renamed to .*pass_context:DeprecationWarning',\n    # in test_cli_expect_errors and two others\n    'ignore:Exception ignored in. <socket.socket:pytest.PytestUnraisableExceptionWarning',\n    # in test_paired_paths / Python 3.6\n    'ignore:Exception ignored in. <bound method Context.__del__:pytest.PytestUnraisableExceptionWarning',\n    # test_config_jupytext_jupyter_fs_meta_manager\n    'ignore:The alias `_\\(\\)` will be deprecated. Use `_i18n\\(\\)` instead.:FutureWarning',\n    # Conda/Python 3.7/Windows - ImportError while loading conftest\n    \"ignore:the imp module is deprecated in favour of importlib:DeprecationWarning\",\n    \"ignore:Code cell is missing an id field:FutureWarning\",\n    \"ignore:There is no current event loop:DeprecationWarning\",\n    # Intermittent in tests/functional/cli/test_cli.py::test_format_prefix_suffix #1357\n    \"ignore:unclosed database in <sqlite3.Connection:ResourceWarning\",\n    \"ignore:Exception ignored:pytest.PytestUnraisableExceptionWarning\",\n]\nasyncio_default_fixture_loop_scope = \"function\"\n\n[tool.coverage.run]\nomit = [\n    \"tests/*\",\n]\nparallel = true\n\n[tool.coverage.report]\n# Regexes for lines to exclude from consideration\nexclude_lines = [\n    \"if self.debug:\",\n    # Have to re-enable the standard pragma\n    \"pragma: no cover\",\n\n    # Don't complain if tests don't hit defensive assertion code:\n    \"raise NotImplementedError\",\n    \"except ImportError\",\n]\nignore_errors = true\nomit = [\n    \"tests/*\",\n    \"src/jupytext/version.py\",\n]\n\n[tool.pixi.workspace]\nchannels = [\"conda-forge\"]\nplatforms = [\"linux-64\", \"osx-64\", \"osx-arm64\", \"win-64\"]\n\n[tool.pixi.dependencies]\npython = \">=3.9,<3.14\" # One test involving Black fails on the CI\njupyterlab = \">=4.0\"\nnbformat = \">=5.1.2\"\npre-commit = \">=4.3\"\nnodejs = \">=20\"\nhatch = \"*\"\npip = \"*\"\n\n[tool.pixi.feature.docs.dependencies]\nsphinx = \"*\"\nsphinx-copybutton = \"*\"\nsphinx-rtd-theme = \"*\"\nmyst-parser = \"*\"\n\n[tool.pixi.feature.dev.dependencies]\npandoc = \">=3.0\"\n\n[tool.pixi.environments]\ndefault = { features = [\"dev\"], solve-group = \"default\" }\ndocs = { features = [\"docs\"], solve-group = \"default\" }\n\n[tool.pixi.pypi-dependencies]\n# Note: this does not build the jupyterlab-jupytext extension\njupytext = {path = \".\", editable = true, extras=[\"dev\"]}\n"
  },
  {
    "path": "src/jupytext/__init__.py",
    "content": "\"\"\"Read and write Jupyter notebooks as text files\"\"\"\n\nfrom .formats import NOTEBOOK_EXTENSIONS, get_format_implementation, guess_format\nfrom .jupytext import read, reads, write, writes\nfrom .reraise import reraise\nfrom .version import __version__\n\ntry:\n    from .sync_contentsmanager import build_sync_jupytext_contents_manager_class\nexcept ImportError as err:\n    build_sync_jupytext_contents_manager_class = reraise(err)\n\ntry:\n    from .sync_contentsmanager import TextFileContentsManager\nexcept ImportError as err:\n    TextFileContentsManager = reraise(err)\n\ntry:\n    from .async_contentsmanager import build_async_jupytext_contents_manager_class\nexcept ImportError as err:\n    build_async_jupytext_contents_manager_class = reraise(err)\n\ntry:\n    from .async_contentsmanager import AsyncTextFileContentsManager\nexcept ImportError as err:\n    AsyncTextFileContentsManager = reraise(err)\n\n__all__ = [\n    \"read\",\n    \"write\",\n    \"writes\",\n    \"reads\",\n    \"NOTEBOOK_EXTENSIONS\",\n    \"guess_format\",\n    \"get_format_implementation\",\n    \"TextFileContentsManager\",\n    \"AsyncTextFileContentsManager\",\n    \"build_sync_jupytext_contents_manager_class\",\n    \"build_async_jupytext_contents_manager_class\",\n    \"__version__\",\n]\n"
  },
  {
    "path": "src/jupytext/__main__.py",
    "content": "\"\"\"Main for Jupytext\n\nCall with (e.g.)::\n\n    python -m jupytext my_notebook.ipynb --to Rmd\n\"\"\"\n\nimport sys\n\nfrom .cli import jupytext\n\nif __name__ == \"__main__\":\n    sys.exit(jupytext())\n"
  },
  {
    "path": "src/jupytext/async_contentsmanager.py",
    "content": "\"\"\"\nThis module exposes the AsyncTextFileContentsManager that allows to open\ntext files as notebooks\n\"\"\"\n\nimport inspect\nimport itertools\nimport os\n\ntry:\n    import tomllib\nexcept ImportError:\n    import tomli as tomllib\n\nfrom collections import namedtuple\nfrom datetime import timedelta\n\nimport nbformat\nfrom tornado.web import HTTPError\n\nfrom .async_pairs import read_pair, write_pair\nfrom .config import (\n    JUPYTEXT_CONFIG_FILES,\n    PYPROJECT_FILE,\n    JupytextConfiguration,\n    JupytextConfigurationError,\n    find_global_jupytext_configuration_file,\n    load_jupytext_configuration_file,\n    notebook_formats,\n    preferred_format,\n)\nfrom .formats import (\n    long_form_multiple_formats,\n    short_form_multiple_formats,\n    short_form_one_format,\n)\nfrom .jupytext import drop_text_representation_metadata, reads, writes\nfrom .kernels import set_kernelspec_from_language\nfrom .paired_paths import (\n    InconsistentPath,\n    base_path,\n    base_path_and_adjusted_fmt,\n    find_base_path_and_format,\n    full_path,\n    paired_paths,\n)\nfrom .pairs import PairedFilesDiffer, latest_inputs_and_outputs\n\n\ndef build_async_jupytext_contents_manager_class(base_contents_manager_class):\n    \"\"\"\n    Derives an asynchronous TextFileContentsManager class from the given base class,\n    which is supposed to be asynchronous too.\n    \"\"\"\n\n    class AsyncJupytextContentsManager(base_contents_manager_class, JupytextConfiguration):\n        \"\"\"\n        A FileContentsManager Class that reads and stores notebooks to classical\n        Jupyter notebooks (.ipynb), R Markdown notebooks (.Rmd), Julia (.jl),\n        Python (.py) or R scripts (.R)\n        \"\"\"\n\n        def __init__(self, *args, **kwargs):\n            # Dictionary: notebook path => (fmt, formats) where\n            # fmt is the current format, and formats the paired formats.\n            self.paired_notebooks = dict()\n\n            # Configuration cache, useful when notebooks are listed in a given directory\n            self.cached_config = namedtuple(\"cached_config\", \"path config_file config\")\n            self.super = super()\n            self.super.__init__(*args, **kwargs)\n\n        def all_nb_extensions(self, config):\n            \"\"\"All extensions that should be classified as notebooks\"\"\"\n            return [ext if ext.startswith(\".\") else \".\" + ext for ext in config.notebook_extensions]\n\n        def drop_paired_notebook(self, path):\n            \"\"\"Remove the current notebook from the list of paired notebooks\"\"\"\n            if path not in self.paired_notebooks:\n                return\n\n            fmt, formats = self.paired_notebooks.pop(path)\n            prev_paired_paths = paired_paths(path, fmt, formats)\n            for alt_path, _ in prev_paired_paths:\n                if alt_path in self.paired_notebooks:\n                    self.drop_paired_notebook(alt_path)\n\n        def update_paired_notebooks(self, path, formats):\n            \"\"\"Update the list of paired notebooks to include/update the current pair\"\"\"\n            if not formats:\n                self.drop_paired_notebook(path)\n                return\n\n            formats = long_form_multiple_formats(formats)\n            _, fmt = find_base_path_and_format(path, formats)\n            new_paired_paths = paired_paths(path, fmt, formats)\n            for alt_path, _ in new_paired_paths:\n                self.drop_paired_notebook(alt_path)\n\n            if len(formats) == 1 and set(formats[0]) <= {\"extension\"}:\n                return\n\n            short_formats = short_form_multiple_formats(formats)\n            for alt_path, alt_fmt in new_paired_paths:\n                self.paired_notebooks[alt_path] = (\n                    short_form_one_format(alt_fmt),\n                    short_formats,\n                )\n\n        async def create_prefix_dir(self, path, fmt):\n            \"\"\"Create the prefix dir, if missing\"\"\"\n            if \"prefix\" in fmt and \"/\" in path:\n                parent_dir = self.get_parent_dir(path)\n                if not await self.dir_exists(parent_dir):\n                    await self.create_prefix_dir(parent_dir, fmt)\n                    self.log.info(\"Creating directory %s\", parent_dir)\n                    await self.super.save(dict(type=\"directory\"), parent_dir)\n\n        async def save(self, model, path=\"\"):\n            \"\"\"Save the file model and return the model with no content.\"\"\"\n            if model[\"type\"] != \"notebook\":\n                return await self.super.save(model, path)\n\n            path = path.strip(\"/\")\n            nbk = model[\"content\"]\n            try:\n                config = await self.get_config(path)\n                jupytext_formats = notebook_formats(nbk, config, path)\n                _, jupytext_formats = self._drop_formats_if_they_dont_match_path(path, None, jupytext_formats)\n                self.update_paired_notebooks(path, jupytext_formats)\n\n                async def save_one_file(path, fmt):\n                    if \"format_name\" in fmt and fmt[\"extension\"] not in [\n                        \".md\",\n                        \".markdown\",\n                        \".Rmd\",\n                    ]:\n                        self.log.info(\n                            \"Saving %s in format %s:%s\",\n                            os.path.basename(path),\n                            fmt[\"extension\"][1:],\n                            fmt[\"format_name\"],\n                        )\n                    else:\n                        self.log.info(\"Saving %s\", os.path.basename(path))\n\n                    await self.create_prefix_dir(path, fmt)\n                    if fmt[\"extension\"] == \".ipynb\":\n                        return await self.super.save(\n                            dict(\n                                type=\"notebook\",\n                                content=drop_text_representation_metadata(model[\"content\"]),\n                            ),\n                            path,\n                        )\n\n                    if model[\"content\"][\"metadata\"].get(\"jupytext\", {}).get(\"notebook_metadata_filter\") == \"-all\":\n                        self.log.warning(\n                            \"Stripping metadata from {} as 'Include Metadata' is off \"\n                            \"(toggle 'Include Metadata' in the Jupytext Menu or Commands if desired)\".format(path)\n                        )\n\n                    text_model = dict(\n                        type=\"file\",\n                        format=\"text\",\n                        content=writes(nbformat.from_dict(model[\"content\"]), fmt=fmt, config=config),\n                    )\n\n                    return await self.super.save(text_model, path)\n\n                return await write_pair(path, jupytext_formats, save_one_file)\n\n            except Exception as e:\n                self.log.error(\"Error while saving file: %s %s\", path, e, exc_info=True)\n                raise HTTPError(500, f\"Unexpected error while saving file: {path} {e}\")\n\n        async def _get_with_no_require_hash_argument(\n            self,\n            path,\n            content=True,\n            type=None,\n            format=None,\n            load_alternative_format=True,\n        ):\n            return await self._get_with_require_hash_argument(\n                path,\n                content=content,\n                type=type,\n                format=format,\n                require_hash=False,\n                load_alternative_format=load_alternative_format,\n            )\n\n        async def _get_with_require_hash_argument(\n            self,\n            path,\n            content=True,\n            type=None,\n            format=None,\n            require_hash=False,\n            load_alternative_format=True,\n        ):\n            \"\"\"Takes a path for an entity and returns its model\"\"\"\n            path = path.strip(\"/\")\n            ext = os.path.splitext(path)[1]\n\n            super_kwargs = {\"content\": content, \"type\": type, \"format\": format}\n            if require_hash:\n                super_kwargs[\"require_hash\"] = require_hash\n\n            # Not a notebook?\n            if not await self.file_exists(path) or await self.dir_exists(path) or (type is not None and type != \"notebook\"):\n                return await self.super.get(path, **super_kwargs)\n\n            config = await self.get_config(path, use_cache=content is False)\n            if ext not in self.all_nb_extensions(config):\n                return await self.super.get(path, **super_kwargs)\n\n            fmt = preferred_format(ext, config.preferred_jupytext_formats_read)\n            if ext == \".ipynb\":\n                super_kwargs[\"type\"] = \"notebook\"\n                model = await self.super.get(path, **super_kwargs)\n            else:\n                super_kwargs[\"type\"] = \"file\"\n                super_kwargs[\"format\"] = \"text\"\n                model = await self.super.get(path, **super_kwargs)\n                model[\"type\"] = \"notebook\"\n                if content:\n                    # We may need to update these keys, inherited from text files formats\n                    # Cf. https://github.com/mwouts/jupytext/issues/659\n                    model[\"format\"] = \"json\"\n                    model[\"mimetype\"] = None\n                    try:\n                        model[\"content\"] = reads(model[\"content\"], fmt=fmt, config=config)\n                        # mark all code cells from text notebooks as 'trusted'\n                        # as they don't have any outputs, cf. #941\n                        for cell in model[\"content\"].cells:\n                            if cell.cell_type == \"code\":\n                                cell[\"metadata\"][\"trusted\"] = True\n\n                    except Exception as err:\n                        self.log.error(\"Error while reading file: %s %s\", path, err, exc_info=True)\n                        raise HTTPError(500, str(err))\n\n            if not load_alternative_format:\n                return model\n\n            # We will now read a second file if this is a paired notebooks.\n            if content:\n                nbk = model[\"content\"]\n                formats = nbk.metadata.get(\"jupytext\", {}).get(\"formats\") or config.default_formats(path)\n                formats = long_form_multiple_formats(formats, nbk.metadata, auto_ext_requires_language_info=False)\n            else:\n                if path not in self.paired_notebooks:\n                    return model\n\n                _, formats = self.paired_notebooks.get(path)\n                formats = long_form_multiple_formats(formats)\n\n            # Compute paired notebooks from formats\n            alt_paths = [(path, fmt)]\n            fmt, formats = self._drop_formats_if_they_dont_match_path(path, fmt, formats)\n            if formats:\n                try:\n                    _, fmt = find_base_path_and_format(path, formats)\n                    alt_paths = paired_paths(path, fmt, formats)\n                    self.update_paired_notebooks(path, formats)\n                except InconsistentPath as err:\n                    self.log.error(\n                        \"Unable to read paired notebook: %s %s\",\n                        path,\n                        err,\n                        exc_info=True,\n                    )\n                    raise HTTPError(500, f\"Unable to read paired notebook: {path} {err}\")\n            else:\n                if path in self.paired_notebooks:\n                    fmt, formats = self.paired_notebooks.get(path)\n                    alt_paths = paired_paths(path, fmt, formats)\n                    formats = long_form_multiple_formats(formats)\n\n            if content and len(alt_paths) > 1 and ext == \".ipynb\":\n                # Apply default options (like saving and reloading would do)\n                jupytext_metadata = model[\"content\"][\"metadata\"].get(\"jupytext\", {})\n                config.set_default_format_options(jupytext_metadata, read=True)\n                if jupytext_metadata:\n                    model[\"content\"][\"metadata\"][\"jupytext\"] = jupytext_metadata\n\n            async def get_timestamp(alt_path):\n                # self.exists is not async for AsyncLargeManager,\n                # but MetaManager from fs_manager has an async version\n                exists = self.exists(alt_path)\n                if inspect.isawaitable(exists):\n                    exists = await exists\n                if not exists:\n                    return None\n                if alt_path == path:\n                    return model[\"last_modified\"]\n                return (await self.super.get(alt_path, content=False))[\"last_modified\"]\n\n            async def read_one_file(alt_path, alt_fmt):\n                if alt_path == path:\n                    return model[\"content\"]\n                if alt_path.endswith(\".ipynb\"):\n                    self.log.info(f\"Reading OUTPUTS from {alt_path}\")\n                    return (await self.super.get(alt_path, content=True, type=\"notebook\", format=format))[\"content\"]\n\n                self.log.info(f\"Reading SOURCE from {alt_path}\")\n                text = (\n                    await self.super.get(\n                        alt_path,\n                        content=True,\n                        type=\"file\",\n                        # Don't use the parent format, see https://github.com/mwouts/jupytext/issues/1124\n                        format=None,\n                    )\n                )[\"content\"]\n                return reads(text, fmt=alt_fmt, config=config)\n\n            timestamps = {alt_path: await get_timestamp(alt_path) for alt_path, alt_fmt in paired_paths(path, fmt, formats)}\n\n            inputs, outputs = latest_inputs_and_outputs(\n                path,\n                fmt,\n                formats,\n                lambda alt_path: timestamps[alt_path],\n                contents_manager_mode=True,\n            )\n\n            # Modification time of a paired notebook is the timestamp of inputs #118 #978\n            model[\"last_modified\"] = inputs.timestamp\n\n            if require_hash:\n                if inputs.path is not None and outputs.path is not None and inputs.path != outputs.path:\n                    model_other = await self.super.get(\n                        inputs.path if path == outputs.path else outputs.path,\n                        content=False,\n                        require_hash=True,\n                    )\n                    # The hash of a paired file is the concatenation of\n                    # the hashes of the input and output files\n                    if path == outputs.path:\n                        model[\"hash\"] = model_other[\"hash\"] + model[\"hash\"]\n                    else:\n                        model[\"hash\"] = model[\"hash\"] + model_other[\"hash\"]\n\n            if not content:\n                return model\n\n            # Before we combine the two files, we make sure we're not overwriting ipynb cells\n            # with an outdated text file\n            content = None\n            try:\n                if outputs.timestamp and outputs.timestamp > inputs.timestamp + timedelta(\n                    seconds=config.outdated_text_notebook_margin\n                ):\n                    ts_mismatch = (\n                        \"{out} (last modified {out_last}) is more recent than {src} (last modified {src_last})\".format(\n                            src=inputs.path,\n                            src_last=inputs.timestamp,\n                            out=outputs.path,\n                            out_last=outputs.timestamp,\n                        )\n                    )\n                    self.log.warning(ts_mismatch)\n\n                    try:\n                        content = await read_pair(inputs, outputs, read_one_file, must_match=True)\n                        self.log.warning(\n                            \"The inputs in {src} and {out} are identical, so the mismatch in timestamps was ignored\".format(\n                                src=inputs.path, out=outputs.path\n                            )\n                        )\n                    except HTTPError:\n                        raise\n                    except PairedFilesDiffer as diff:\n                        raise HTTPError(\n                            400,\n                            \"\"\"{ts_mismatch}\n\nDifferences (jupytext --diff {src} {out}) are:\n{diff}\nPlease either:\n- open {src} in a text editor, make sure it is up to date, and save it,\n- or delete {src} if not up to date,\n- or increase check margin by adding, say,\noutdated_text_notebook_margin = 5  # default is 1 (second)\nto your jupytext.toml file\n                        \"\"\".format(\n                                ts_mismatch=ts_mismatch,\n                                src=inputs.path,\n                                out=outputs.path,\n                                diff=diff,\n                            ),\n                        )\n            except OverflowError:\n                pass\n\n            if content is not None:\n                model[\"content\"] = content\n            else:\n                try:\n                    model[\"content\"] = await read_pair(inputs, outputs, read_one_file)\n                except HTTPError:\n                    raise\n                except Exception as err:\n                    self.log.error(\"Error while reading file: %s %s\", path, err, exc_info=True)\n                    raise HTTPError(500, str(err))\n\n            if not outputs.timestamp:\n                set_kernelspec_from_language(model[\"content\"])\n\n            return model\n\n        async def new_untitled(self, path=\"\", type=\"\", ext=\"\"):\n            \"\"\"Create a new untitled file or directory in path\n\n            We override the base function because that one does not take the 'ext' argument\n            into account when type==\"notebook\". See https://github.com/mwouts/jupytext/issues/443\n            \"\"\"\n            if type != \"notebook\" and ext != \".ipynb\":\n                return await self.super.new_untitled(path, type, ext)\n\n            ext = ext or \".ipynb\"\n            if \":\" in ext:\n                ext, format_name = ext.split(\":\", 1)\n            else:\n                format_name = \"\"\n\n            path = path.strip(\"/\")\n            if not await self.dir_exists(path):\n                raise HTTPError(404, \"No such directory: %s\" % path)\n\n            untitled = self.untitled_notebook\n            config = await self.get_config(path)\n            name = self.increment_notebook_filename(config, untitled + ext, path)\n            path = f\"{path}/{name}\"\n\n            model = {\"type\": \"notebook\"}\n            if format_name:\n                model[\"format\"] = \"json\"\n                model[\"content\"] = nbformat.v4.nbbase.new_notebook(metadata={\"jupytext\": {\"formats\": ext + \":\" + format_name}})\n\n            return await self.new(model, path)\n\n        def increment_notebook_filename(self, config, filename, path=\"\"):\n            \"\"\"Increment a notebook filename until it is unique, regardless of extension\"\"\"\n            # Extract the full suffix from the filename (e.g. .tar.gz)\n            path = path.strip(\"/\")\n            basename, dot, ext = filename.partition(\".\")\n            ext = dot + ext\n\n            for i in itertools.count():\n                if i:\n                    insert_i = f\"{i}\"\n                else:\n                    insert_i = \"\"\n                basename_i = basename + insert_i\n                name = basename_i + ext\n                if not any(self.exists(f\"{path}/{basename_i}{nb_ext}\") for nb_ext in config.notebook_extensions):\n                    break\n            return name\n\n        async def trust_notebook(self, path):\n            \"\"\"Trust the current notebook\"\"\"\n            if path.endswith(\".ipynb\") or path not in self.paired_notebooks:\n                await self.super.trust_notebook(path)\n                return\n\n            fmt, formats = self.paired_notebooks[path]\n            for alt_path, alt_fmt in paired_paths(path, fmt, formats):\n                if alt_fmt[\"extension\"] == \".ipynb\":\n                    await self.super.trust_notebook(alt_path)\n\n        async def rename_file(self, old_path, new_path):\n            \"\"\"\n            Rename the current file. If the file is a notebook,\n            we rename the paired files as well\n            \"\"\"\n\n            # If the file is not a notebook, we call the parent rename_file method\n            ext = os.path.splitext(old_path)[1]\n            config = await self.get_config(old_path, use_cache=True)\n            if ext not in self.all_nb_extensions(config):\n                await self.super.rename_file(old_path, new_path)\n                return\n\n            if old_path not in self.paired_notebooks:\n                try:\n                    # we do not know yet if this is a paired notebook (#190)\n                    # -> to get this information we open the notebook\n                    self.log.info(\"Opening %s to check if it is a paired notebook\", old_path)\n                    await self.get(old_path, content=True)\n                except Exception:\n                    pass\n\n            if old_path not in self.paired_notebooks:\n                await self.super.rename_file(old_path, new_path)\n                return\n\n            fmt, formats = self.paired_notebooks.get(old_path)\n            fmt, formats = self._drop_formats_if_they_dont_match_path(new_path, fmt, formats)\n            old_alt_paths = paired_paths(old_path, fmt, formats)\n\n            # Is the new file name consistent with suffix?\n            try:\n                new_base = base_path(new_path, fmt)\n            except HTTPError:\n                raise\n            except Exception as err:\n                self.log.error(\n                    \"Error while renaming file from %s to %s: %s\",\n                    old_path,\n                    new_path,\n                    err,\n                    exc_info=True,\n                )\n                raise HTTPError(500, str(err))\n\n            for old_alt_path, alt_fmt in old_alt_paths:\n                new_alt_path = full_path(new_base, alt_fmt)\n                if self.exists(old_alt_path):\n                    await self.create_prefix_dir(new_alt_path, alt_fmt)\n                    await self.super.rename_file(old_alt_path, new_alt_path)\n\n            self.drop_paired_notebook(old_path)\n            self.update_paired_notebooks(new_path, formats)\n\n        def get_parent_dir(self, path):\n            \"\"\"The parent directory\"\"\"\n            if \"/\" in path:\n                return path.rsplit(\"/\", 1)[0]\n            # jupyter-fs\n            if \":\" in path and hasattr(self, \"_managers\"):\n                if path.endswith(\":\"):\n                    return \"\"\n                return path.rsplit(\":\", 1)[0] + \":\"\n            return \"\"\n\n        async def get_config_file(self, directory):\n            \"\"\"Return the jupytext configuration file, if any\"\"\"\n            for jupytext_config_file in JUPYTEXT_CONFIG_FILES:\n                path = directory + \"/\" + jupytext_config_file\n                if await self.file_exists(path):\n                    if not self.allow_hidden and jupytext_config_file.startswith(\".\"):\n                        self.log.warning(f\"Ignoring config file {path} (see Jupytext issue #964)\")\n                        continue\n                    return path\n\n            pyproject_path = directory + \"/\" + PYPROJECT_FILE\n            if await self.file_exists(pyproject_path):\n                model = await self.get(pyproject_path, type=\"file\")\n                try:\n                    doc = tomllib.loads(model[\"content\"])\n                except tomllib.TOMLDecodeError as e:\n                    self.log.warning(f\"Cannot load {pyproject_path}: {e}\")\n                else:\n                    if doc.get(\"tool\", {}).get(\"jupytext\") is not None:\n                        return pyproject_path\n\n            if not directory:\n                return None\n\n            parent_dir = self.get_parent_dir(directory)\n            return await self.get_config_file(parent_dir)\n\n        async def load_config_file(self, config_file, *, prev_config_file, prev_config, is_os_path=False):\n            \"\"\"Load the configuration file\"\"\"\n            if config_file is None:\n                return None\n            if config_file.endswith(\".py\") and not is_os_path:\n                config_file = self._get_os_path(config_file)\n                is_os_path = True\n\n            config_content = None\n            if not is_os_path:\n                try:\n                    model = await self.super.get(config_file, content=True, type=\"file\")\n                    config_content = model[\"content\"]\n                except HTTPError:\n                    pass\n\n            config = load_jupytext_configuration_file(config_file, config_content)\n            if config is None:\n                return config\n\n            log_level = config.cm_config_log_level\n            if log_level == \"info_if_changed\":\n                if config_file != prev_config_file or config != prev_config:\n                    log_level = \"info\"\n                else:\n                    log_level = \"none\"\n            if log_level != \"none\":\n                getattr(self.log, log_level)(\"Loaded Jupytext configuration file at %s\", config_file)\n            return config\n\n        async def get_config(self, path, use_cache=False):\n            \"\"\"Return the Jupytext configuration for the given path\"\"\"\n            parent_dir = self.get_parent_dir(path)\n\n            # When listing the notebooks for the tree view, we use a cache for the configuration file\n            # The cache will be refreshed when a notebook is opened or saved, or when we go\n            # to a different directory.\n            if not use_cache or parent_dir != self.cached_config.path:\n                try:\n                    config_file = await self.get_config_file(parent_dir)\n                    if config_file:\n                        self.cached_config.config = await self.load_config_file(\n                            config_file,\n                            prev_config_file=self.cached_config.config_file,\n                            prev_config=self.cached_config.config,\n                        )\n                    else:\n                        config_file = find_global_jupytext_configuration_file()\n                        self.cached_config.config = await self.load_config_file(\n                            config_file,\n                            prev_config_file=self.cached_config.config_file,\n                            prev_config=self.cached_config.config,\n                            is_os_path=True,\n                        )\n                    self.cached_config.config_file = config_file\n                    self.cached_config.path = parent_dir\n                except JupytextConfigurationError as err:\n                    self.log.error(\n                        \"Error while reading config file: %s %s\",\n                        config_file,\n                        err,\n                        exc_info=True,\n                    )\n                    raise HTTPError(500, f\"{err}\")\n\n            if self.cached_config.config is not None:\n                return self.cached_config.config\n            if isinstance(self.notebook_extensions, str):\n                self.notebook_extensions = self.notebook_extensions.split(\",\")\n            return self\n\n        def _drop_formats_if_they_dont_match_path(self, path, fmt, formats):\n            if formats is None:\n                return fmt, formats\n            list_of_formats = long_form_multiple_formats(formats)\n            try:\n                _, _ = find_base_path_and_format(path, list_of_formats)\n            except InconsistentPath:\n                for fmt in list_of_formats:\n                    try:\n                        _, adjusted_format = base_path_and_adjusted_fmt(path, fmt)\n                    except InconsistentPath:\n                        continue\n                    else:\n                        self.log.warning(\n                            \"Notebook %s matches none of the expected formats. \"\n                            'Ignoring formats=\"%s\" and using formats=\"%s\" instead.',\n                            path,\n                            short_form_multiple_formats(formats),\n                            short_form_one_format(adjusted_format),\n                        )\n                        new_formats = [adjusted_format]\n                        if isinstance(formats, list):\n                            return adjusted_format, new_formats\n                        return short_form_one_format(adjusted_format), short_form_multiple_formats(new_formats)\n            return fmt, formats\n\n    if \"require_hash\" in inspect.signature(base_contents_manager_class.get).parameters:\n        AsyncJupytextContentsManager.get = AsyncJupytextContentsManager._get_with_require_hash_argument\n    else:\n        AsyncJupytextContentsManager.get = AsyncJupytextContentsManager._get_with_no_require_hash_argument\n\n    return AsyncJupytextContentsManager\n\n\ntry:\n    # The AsyncLargeFileManager is taken by default from jupyter_server if available\n    from jupyter_server.services.contents.largefilemanager import AsyncLargeFileManager\n\n    AsyncTextFileContentsManager = build_async_jupytext_contents_manager_class(AsyncLargeFileManager)\nexcept ImportError:\n    # If we can't find jupyter_server then we take the file manager from notebook\n    # import notebook.transutils needs to happen before notebook.services.contents.filemanager, see #75\n    try:\n        import notebook.transutils  # noqa\n    except ImportError:\n        pass\n\n    try:\n        from notebook.services.contents.largefilemanager import AsyncLargeFileManager\n\n        AsyncTextFileContentsManager = build_async_jupytext_contents_manager_class(AsyncLargeFileManager)\n    except ImportError:\n        # Older versions of notebook do not have the LargeFileManager #217\n        from notebook.services.contents.filemanager import FileContentsManager\n\n        AsyncTextFileContentsManager = build_async_jupytext_contents_manager_class(FileContentsManager)\n"
  },
  {
    "path": "src/jupytext/async_pairs.py",
    "content": "import jupytext\n\nfrom .combine import combine_inputs_with_outputs\nfrom .compare import compare\nfrom .formats import check_file_version, long_form_multiple_formats\nfrom .paired_paths import find_base_path_and_format, full_path\nfrom .pairs import PairedFilesDiffer\n\n\nasync def read_pair(inputs, outputs, read_one_file, must_match=False):\n    \"\"\"Read a notebook given its inputs and outputs path and formats\"\"\"\n    if not outputs.path or outputs.path == inputs.path:\n        return await read_one_file(inputs.path, inputs.fmt)\n\n    notebook = await read_one_file(inputs.path, inputs.fmt)\n    check_file_version(notebook, inputs.path, outputs.path)\n\n    notebook_with_outputs = await read_one_file(outputs.path, outputs.fmt)\n\n    if must_match:\n        in_text = jupytext.writes(notebook, inputs.fmt)\n        out_text = jupytext.writes(notebook_with_outputs, inputs.fmt)\n        diff = compare(out_text, in_text, outputs.path, inputs.path, return_diff=True)\n        if diff:\n            raise PairedFilesDiffer(diff)\n\n    notebook = combine_inputs_with_outputs(notebook, notebook_with_outputs, fmt=inputs.fmt)\n\n    return notebook\n\n\nasync def write_pair(path, formats, write_one_file):\n    \"\"\"\n    Call the function 'write_one_file' on each of the paired path/formats\n    \"\"\"\n    formats = long_form_multiple_formats(formats)\n    base, _ = find_base_path_and_format(path, formats)\n\n    # Save as ipynb first\n    return_value = None\n    value = None\n    ipynb_changed = False\n    for fmt in formats[::-1]:\n        if fmt[\"extension\"] != \".ipynb\":\n            continue\n\n        alt_path = full_path(base, fmt)\n        value = await write_one_file(alt_path, fmt)\n        ipynb_changed = ipynb_changed or value.get(\"modified\", False)\n        if alt_path == path:\n            return_value = value\n\n    # And then to the other formats, in reverse order so that\n    # the first format is the most recent\n    for fmt in formats[::-1]:\n        if fmt[\"extension\"] == \".ipynb\":\n            continue\n\n        alt_path = full_path(base, fmt)\n        if ipynb_changed:\n            value = await write_one_file(alt_path, fmt, force_update_timestamp=True)\n        else:\n            # in the contents manager the write_one_file always writes anyway\n            value = await write_one_file(alt_path, fmt)\n        if alt_path == path:\n            return_value = value\n\n    # Update modified timestamp to match that of the pair #207\n    if isinstance(return_value, dict) and \"last_modified\" in return_value:\n        return_value[\"last_modified\"] = value[\"last_modified\"]\n\n    return return_value\n"
  },
  {
    "path": "src/jupytext/cell_metadata.py",
    "content": "\"\"\"\nConvert between text notebook metadata and jupyter cell metadata.\n\nStandard cell metadata are documented here:\nSee also https://ipython.org/ipython-doc/3/notebook/nbformat.html#cell-metadata\n\"\"\"\n\nimport ast\nimport re\nfrom json import dumps, loads\n\ntry:\n    from json import JSONDecodeError\nexcept ImportError:\n    JSONDecodeError = ValueError\n\nfrom .languages import _JUPYTER_LANGUAGES\n\n# Map R Markdown's \"echo\", \"results\" and \"include\" to \"hide_input\" and \"hide_output\", that are understood by the\n# `runtools` extension for Jupyter notebook, and by nbconvert (use the `hide_input_output.tpl` template).\n# See http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/runtools/readme.html\n_RMARKDOWN_TO_RUNTOOLS_OPTION_MAP = [\n    ((\"include\", \"FALSE\"), [(\"hide_input\", True), (\"hide_output\", True)]),\n    ((\"echo\", \"FALSE\"), [(\"hide_input\", True)]),\n    ((\"results\", \"'hide'\"), [(\"hide_output\", True)]),\n    ((\"results\", '\"hide\"'), [(\"hide_output\", True)]),\n]\n# Alternatively, Jupytext can also map the Jupyter Book options to R Markdown\n_RMARKDOWN_TO_JUPYTER_BOOK_MAP = [\n    ((\"include\", \"FALSE\"), \"remove_cell\"),\n    ((\"echo\", \"FALSE\"), \"remove_input\"),\n    ((\"results\", \"'hide'\"), \"remove_output\"),\n    ((\"results\", '\"hide\"'), \"remove_output\"),\n]\n\n_JUPYTEXT_CELL_METADATA = [\n    # Pre-jupytext metadata\n    \"skipline\",\n    \"noskipline\",\n    # Jupytext metadata\n    \"cell_marker\",\n    \"lines_to_next_cell\",\n    \"lines_to_end_of_cell_marker\",\n]\n_IGNORE_CELL_METADATA = \",\".join(\n    f\"-{name}\"\n    for name in [\n        # Frequent cell metadata that should not enter the text representation\n        # (these metadata are preserved in the paired Jupyter notebook).\n        \"autoscroll\",\n        \"collapsed\",\n        \"scrolled\",\n        \"trusted\",\n        \"execution\",\n        \"ExecuteTime\",\n    ]\n    + _JUPYTEXT_CELL_METADATA\n)\n\n# In R Markdown we might have options without a value\n_IS_IDENTIFIER = re.compile(r\"^[a-zA-Z_\\.]+[a-zA-Z0-9_\\.]*$\")\n_IS_VALID_METADATA_KEY = re.compile(r\"^[a-zA-Z0-9_\\.@/-]+$\")\n\n\nclass RLogicalValueError(Exception):\n    \"\"\"Incorrect value for R boolean\"\"\"\n\n\nclass RMarkdownOptionParsingError(Exception):\n    \"\"\"Error when parsing Rmd cell options\"\"\"\n\n\ndef _py_logical_values(rbool):\n    if rbool in [\"TRUE\", \"T\"]:\n        return True\n    if rbool in [\"FALSE\", \"F\"]:\n        return False\n    raise RLogicalValueError\n\n\ndef metadata_to_rmd_options(language, metadata, use_runtools=False):\n    \"\"\"Convert language and metadata information to their rmd representation\"\"\"\n    options = (language or \"R\").lower()\n    if \"name\" in metadata:\n        options += \" \" + metadata[\"name\"] + \",\"\n        del metadata[\"name\"]\n    if use_runtools:\n        for rmd_option, jupyter_options in _RMARKDOWN_TO_RUNTOOLS_OPTION_MAP:\n            if all([metadata.get(opt_name) == opt_value for opt_name, opt_value in jupyter_options]):\n                options += \" {}={},\".format(rmd_option[0], \"FALSE\" if rmd_option[1] is False else rmd_option[1])\n                for opt_name, _ in jupyter_options:\n                    metadata.pop(opt_name)\n    else:\n        for rmd_option, tag in _RMARKDOWN_TO_JUPYTER_BOOK_MAP:\n            if tag in metadata.get(\"tags\", []):\n                options += \" {}={},\".format(rmd_option[0], \"FALSE\" if rmd_option[1] is False else rmd_option[1])\n                metadata[\"tags\"] = [i for i in metadata[\"tags\"] if i != tag]\n                if not metadata[\"tags\"]:\n                    metadata.pop(\"tags\")\n    for opt_name in metadata:\n        opt_value = metadata[opt_name]\n        opt_name = opt_name.strip()\n        if opt_name == \"active\":\n            options += f' {opt_name}=\"{str(opt_value)}\",'\n        elif isinstance(opt_value, bool):\n            options += \" {}={},\".format(opt_name, \"TRUE\" if opt_value else \"FALSE\")\n        elif isinstance(opt_value, list):\n            options += \" {}={},\".format(\n                opt_name,\n                \"c({})\".format(\", \".join([f'\"{str(v)}\"' for v in opt_value])),\n            )\n        elif isinstance(opt_value, str):\n            if opt_value.startswith(\"#R_CODE#\"):\n                options += f\" {opt_name}={opt_value[8:]},\"\n            elif '\"' not in opt_value:\n                options += f' {opt_name}=\"{opt_value}\",'\n            else:\n                options += f\" {opt_name}='{opt_value}',\"\n        else:\n            options += f\" {opt_name}={str(opt_value)},\"\n    if not language:\n        options = options[2:]\n    return options.strip(\",\").strip()\n\n\ndef update_metadata_from_rmd_options(name, value, metadata, use_runtools=False):\n    \"\"\"Map the R Markdown cell visibility options to the Jupyter ones\"\"\"\n    if use_runtools:\n        for rmd_option, jupyter_options in _RMARKDOWN_TO_RUNTOOLS_OPTION_MAP:\n            if name == rmd_option[0] and value == rmd_option[1]:\n                for opt_name, opt_value in jupyter_options:\n                    metadata[opt_name] = opt_value\n                return True\n    else:\n        for rmd_option, tag in _RMARKDOWN_TO_JUPYTER_BOOK_MAP:\n            if name == rmd_option[0] and value == rmd_option[1]:\n                metadata.setdefault(\"tags\", []).append(tag)\n                return True\n    return False\n\n\nclass ParsingContext:\n    \"\"\"\n    Class for determining where to split rmd options\n    \"\"\"\n\n    parenthesis_count = 0\n    curly_bracket_count = 0\n    square_bracket_count = 0\n    in_single_quote = False\n    in_double_quote = False\n\n    def __init__(self, line):\n        self.line = line\n\n    def in_global_expression(self):\n        \"\"\"Currently inside an expression\"\"\"\n        return (\n            self.parenthesis_count == 0\n            and self.curly_bracket_count == 0\n            and self.square_bracket_count == 0\n            and not self.in_single_quote\n            and not self.in_double_quote\n        )\n\n    def count_special_chars(self, char, prev_char):\n        \"\"\"Update parenthesis counters\"\"\"\n        if char == \"(\":\n            self.parenthesis_count += 1\n        elif char == \")\":\n            self.parenthesis_count -= 1\n            if self.parenthesis_count < 0:\n                raise RMarkdownOptionParsingError(f'Option line \"{self.line}\" has too many closing parentheses')\n        elif char == \"{\":\n            self.curly_bracket_count += 1\n        elif char == \"}\":\n            self.curly_bracket_count -= 1\n            if self.curly_bracket_count < 0:\n                raise RMarkdownOptionParsingError(f'Option line \"{self.line}\" has too many closing curly brackets')\n        elif char == \"[\":\n            self.square_bracket_count += 1\n        elif char == \"]\":\n            self.square_bracket_count -= 1\n            if self.square_bracket_count < 0:\n                raise RMarkdownOptionParsingError(f'Option line \"{self.line}\" has too many closing square brackets')\n        elif char == \"'\" and prev_char != \"\\\\\" and not self.in_double_quote:\n            self.in_single_quote = not self.in_single_quote\n        elif char == '\"' and prev_char != \"\\\\\" and not self.in_single_quote:\n            self.in_double_quote = not self.in_double_quote\n\n\ndef parse_rmd_options(line):\n    \"\"\"\n    Given a R markdown option line, returns a list of pairs name,value\n    :param line:\n    :return:\n    \"\"\"\n    parsing_context = ParsingContext(line)\n\n    result = []\n    prev_char = \"\"\n\n    name = \"\"\n    value = \"\"\n\n    for char in \",\" + line + \",\":\n        if parsing_context.in_global_expression():\n            if char == \",\":\n                if name != \"\" or value != \"\":\n                    if result and name == \"\":\n                        raise RMarkdownOptionParsingError(f'Option line \"{line}\" has no name for option value {value}')\n                    result.append((name.strip(), value.strip()))\n                    name = \"\"\n                    value = \"\"\n            elif char == \"=\":\n                if name == \"\":\n                    name = value\n                    value = \"\"\n                else:\n                    value += char\n            else:\n                parsing_context.count_special_chars(char, prev_char)\n                value += char\n        else:\n            parsing_context.count_special_chars(char, prev_char)\n            value += char\n        prev_char = char\n\n    if not parsing_context.in_global_expression():\n        raise RMarkdownOptionParsingError(f'Option line \"{line}\" is not properly terminated')\n\n    return result\n\n\ndef rmd_options_to_metadata(options, use_runtools=False):\n    \"\"\"Parse rmd options and return a metadata dictionary\"\"\"\n    options = re.split(r\"\\s|,\", options, maxsplit=1)\n    # Special case Wolfram Language, which sadly has a space in the language\n    # name.\n    if options[0:2] == [\"wolfram\", \"language\"]:\n        options[0:2] = [\"wolfram language\"]\n    if len(options) == 1:\n        language = options[0]\n        chunk_options = []\n    else:\n        language, others = options\n        language = language.rstrip(\" ,\")\n        others = others.lstrip(\" ,\")\n        chunk_options = parse_rmd_options(others)\n\n    language = \"R\" if language == \"r\" else language\n    metadata = {}\n    for i, opt in enumerate(chunk_options):\n        name, value = opt\n        if i == 0 and name == \"\":\n            metadata[\"name\"] = value\n            continue\n        if update_metadata_from_rmd_options(name, value, metadata, use_runtools=use_runtools):\n            continue\n        try:\n            metadata[name] = _py_logical_values(value)\n            continue\n        except RLogicalValueError:\n            metadata[name] = value\n\n    for name in metadata:\n        try_eval_metadata(metadata, name)\n\n    if \"eval\" in metadata and not is_active(\".Rmd\", metadata):\n        del metadata[\"eval\"]\n\n    return metadata.get(\"language\") or language, metadata\n\n\ndef try_eval_metadata(metadata, name):\n    \"\"\"Evaluate the metadata to a python object, if possible\"\"\"\n    value = metadata[name]\n    if not isinstance(value, str):\n        return\n    if (value.startswith('\"') and value.endswith('\"')) or (value.startswith(\"'\") and value.endswith(\"'\")):\n        metadata[name] = value[1:-1]\n        return\n    if value.startswith(\"c(\") and value.endswith(\")\"):\n        value = \"[\" + value[2:-1] + \"]\"\n    elif value.startswith(\"list(\") and value.endswith(\")\"):\n        value = \"[\" + value[5:-1] + \"]\"\n    try:\n        metadata[name] = ast.literal_eval(value)\n    except (SyntaxError, ValueError):\n        if name != \"name\":\n            metadata[name] = \"#R_CODE#\" + value\n        return\n\n\ndef is_active(ext, metadata, default=True):\n    \"\"\"Is the cell active for the given file extension?\"\"\"\n    if metadata.get(\"run_control\", {}).get(\"frozen\") is True:\n        return ext == \".ipynb\"\n    for tag in metadata.get(\"tags\", []):\n        if tag.startswith(\"active-\"):\n            return ext.replace(\".\", \"\") in tag.split(\"-\")\n    if \"active\" not in metadata:\n        return default\n    return ext.replace(\".\", \"\") in re.split(r\"\\.|,\", metadata[\"active\"])\n\n\ndef metadata_to_double_percent_options(metadata, plain_json):\n    \"\"\"Metadata to double percent lines\"\"\"\n    text = []\n    if \"title\" in metadata:\n        text.append(metadata.pop(\"title\"))\n    if \"cell_depth\" in metadata:\n        text.insert(0, \"%\" * metadata.pop(\"cell_depth\"))\n    if \"cell_type\" in metadata:\n        text.append(\"[{}]\".format(metadata.pop(\"region_name\", metadata.pop(\"cell_type\"))))\n    return metadata_to_text(\" \".join(text), metadata, plain_json=plain_json)\n\n\ndef incorrectly_encoded_metadata(text):\n    \"\"\"Encode a text that Jupytext cannot parse as a cell metadata\"\"\"\n    return {\"incorrectly_encoded_metadata\": text}\n\n\ndef is_identifier(text):\n    return bool(_IS_IDENTIFIER.match(text))\n\n\ndef is_valid_metadata_key(text):\n    \"\"\"Can this text be a proper key?\"\"\"\n    return bool(_IS_VALID_METADATA_KEY.match(text))\n\n\ndef is_jupyter_language(language):\n    \"\"\"Is this a jupyter language?\"\"\"\n    for lang in _JUPYTER_LANGUAGES:\n        if language.lower() == lang.lower():\n            return True\n    return False\n\n\ndef parse_key_equal_value(text):\n    \"\"\"Parse a string of the form 'key1=value1 key2=value2'\"\"\"\n    # Empty metadata?\n    text = text.strip()\n    if not text:\n        return {}\n\n    last_space_pos = text.rfind(\" \")\n\n    # Just an identifier?\n    if not text.startswith(\"--\") and is_identifier(text[last_space_pos + 1 :]):\n        key = text[last_space_pos + 1 :]\n        value = None\n        result = {key: value}\n        if last_space_pos > 0:\n            result.update(parse_key_equal_value(text[:last_space_pos]))\n        return result\n\n    # Iterate on the '=' signs, starting from the right\n    equal_sign_pos = None\n    while True:\n        equal_sign_pos = text.rfind(\"=\", None, equal_sign_pos)\n        if equal_sign_pos < 0:\n            return incorrectly_encoded_metadata(text)\n\n        # Do we have an identifier on the left of the equal sign?\n        prev_whitespace = text[:equal_sign_pos].rstrip().rfind(\" \")\n        key = text[prev_whitespace + 1 : equal_sign_pos].strip()\n        if not is_valid_metadata_key(key):\n            continue\n\n        try:\n            value = relax_json_loads(text[equal_sign_pos + 1 :])\n        except (ValueError, SyntaxError):\n            # try with a longer expression\n            continue\n\n        # Combine with remaining metadata\n        metadata = parse_key_equal_value(text[:prev_whitespace]) if prev_whitespace > 0 else {}\n\n        # Append our value\n        metadata[key] = value\n\n        # And return\n        return metadata\n\n\ndef relax_json_loads(text, catch=False):\n    \"\"\"Parse a JSON string or similar\"\"\"\n    text = text.strip()\n    try:\n        return loads(text)\n    except JSONDecodeError:\n        pass\n\n    if not catch:\n        return ast.literal_eval(text)\n\n    try:\n        return ast.literal_eval(text)\n    except (ValueError, SyntaxError):\n        pass\n\n    return incorrectly_encoded_metadata(text)\n\n\ndef is_json_metadata(text):\n    \"\"\"Is this a JSON metadata?\"\"\"\n    first_curly_bracket = text.find(\"{\")\n    if first_curly_bracket < 0:\n        return False\n\n    first_equal_sign = text.find(\"=\")\n    if first_equal_sign < 0:\n        return True\n\n    return first_curly_bracket < first_equal_sign\n\n\ndef text_to_metadata(text, allow_title=False):\n    \"\"\"Parse the language/cell title and associated metadata\"\"\"\n    # Parse the language or cell title = everything before the last blank space before { or =\n    text = text.strip()\n    first_curly_bracket = text.find(\"{\")\n    first_equal_sign = text.find(\"=\")\n\n    if first_curly_bracket < 0 or (0 <= first_equal_sign < first_curly_bracket):\n        # this is a key=value metadata line\n        # case one = the options may be preceded with a language\n        if not allow_title:\n            if is_jupyter_language(text):\n                return text, {}\n            if \" \" not in text:\n                return \"\", parse_key_equal_value(text)\n            language, options = text.split(\" \", 1)\n            if is_jupyter_language(language):\n                return language, parse_key_equal_value(options)\n            return \"\", parse_key_equal_value(text)\n\n        # case two = a title may be before the options\n        # we split the title into words\n        if first_equal_sign >= 0:\n            words = text[:first_equal_sign].split(\" \")\n            # last word is the key before the equal sign!\n            while words and not words[-1]:\n                words.pop()\n            if words:\n                words.pop()\n        else:\n            words = text.split(\" \")\n\n        # and we remove words on the right that are attributes (they start with '.')\n        while words and (not words[-1].strip() or words[-1].startswith(\".\")):\n            words.pop()\n\n        title = \" \".join(words)\n        return title, parse_key_equal_value(text[len(title) :])\n\n    # json metadata line\n    return (\n        text[:first_curly_bracket].strip(),\n        relax_json_loads(text[first_curly_bracket:], catch=True),\n    )\n\n\ndef metadata_to_text(language_or_title, metadata=None, plain_json=False):\n    \"\"\"Write the cell metadata in the format key=value\"\"\"\n    # Was metadata the first argument?\n    if metadata is None:\n        metadata, language_or_title = language_or_title, metadata\n\n    metadata = {key: metadata[key] for key in metadata if key not in _JUPYTEXT_CELL_METADATA}\n    text = [language_or_title] if language_or_title else []\n    if language_or_title is None:\n        if \"title\" in metadata and \"{\" not in metadata[\"title\"] and \"=\" not in metadata[\"title\"]:\n            text.append(metadata.pop(\"title\"))\n\n    if plain_json:\n        if metadata:\n            text.append(dumps(metadata))\n    else:\n        for key in metadata:\n            if key == \"incorrectly_encoded_metadata\":\n                text.append(metadata[key])\n            elif metadata[key] is None:\n                text.append(key)\n            else:\n                text.append(f\"{key}={dumps(metadata[key])}\")\n    return \" \".join(text)\n"
  },
  {
    "path": "src/jupytext/cell_reader.py",
    "content": "\"\"\"Read notebook cells from their text representation\"\"\"\n\nimport re\nfrom collections import defaultdict\nfrom copy import copy\nfrom itertools import count\n\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_raw_cell\n\nfrom .doxygen import doxygen_to_markdown\nfrom .languages import _SCRIPT_EXTENSIONS\n\n# Sphinx Gallery is an optional dependency. And we intercept the SyntaxError for #301\ntry:\n    from sphinx_gallery.notebook import rst2md\nexcept (ImportError, SyntaxError):  # pragma: no cover\n    rst2md = None\n\nfrom .cell_metadata import (\n    is_active,\n    is_json_metadata,\n    rmd_options_to_metadata,\n    text_to_metadata,\n)\nfrom .languages import _JUPYTER_LANGUAGES_LOWER_AND_UPPER\nfrom .magics import is_magic, need_explicit_marker, uncomment_magic, unescape_code_start\nfrom .pep8 import pep8_lines_between_cells\nfrom .stringparser import StringParser\n\n_BLANK_LINE = re.compile(r\"^\\s*$\")\n_PY_INDENTED = re.compile(r\"^\\s\")\n\n\ndef uncomment(lines, prefix=\"#\", suffix=\"\"):\n    \"\"\"Remove prefix and space, or only prefix, when possible\"\"\"\n    if prefix:\n        prefix_and_space = prefix + \" \"\n        length_prefix = len(prefix)\n        length_prefix_and_space = len(prefix_and_space)\n        lines = [\n            (\n                line[length_prefix_and_space:]\n                if line.startswith(prefix_and_space)\n                else (line[length_prefix:] if line.startswith(prefix) else line)\n            )\n            for line in lines\n        ]\n\n    if suffix:\n        space_and_suffix = \" \" + suffix\n        length_suffix = len(suffix)\n        length_space_and_suffix = len(space_and_suffix)\n        lines = [\n            (\n                line[:-length_space_and_suffix]\n                if line.endswith(space_and_suffix)\n                else (line[:-length_suffix] if line.endswith(suffix) else line)\n            )\n            for line in lines\n        ]\n\n    return lines\n\n\ndef paragraph_is_fully_commented(lines, comment, main_language):\n    \"\"\"Is the paragraph fully commented?\"\"\"\n    for i, line in enumerate(lines):\n        if line.startswith(comment):\n            if line[len(comment) :].lstrip().startswith(comment):\n                continue\n            if is_magic(line, main_language):\n                return False\n            continue\n        return i > 0 and _BLANK_LINE.match(line)\n    return True\n\n\ndef next_code_is_indented(lines):\n    \"\"\"Is the next unescaped line indented?\"\"\"\n    for line in lines:\n        if _BLANK_LINE.match(line):\n            continue\n        return _PY_INDENTED.match(line)\n    return False\n\n\ndef count_lines_to_next_cell(cell_end_marker, next_cell_start, total, explicit_eoc):\n    \"\"\"How many blank lines between end of cell marker and next cell?\"\"\"\n    if cell_end_marker < total:\n        lines_to_next_cell = next_cell_start - cell_end_marker\n        if explicit_eoc:\n            lines_to_next_cell -= 1\n        if next_cell_start >= total:\n            lines_to_next_cell += 1\n        return lines_to_next_cell\n\n    return 1\n\n\ndef last_two_lines_blank(source):\n    \"\"\"Are the two last lines blank, and not the third last one?\"\"\"\n    if len(source) < 3:\n        return False\n    return not _BLANK_LINE.match(source[-3]) and _BLANK_LINE.match(source[-2]) and _BLANK_LINE.match(source[-1])\n\n\nclass BaseCellReader:\n    \"\"\"A class that can read notebook cells from their text representation\"\"\"\n\n    default_comment_magics = None\n    lines_to_next_cell = 1\n\n    start_code_re = None\n    simple_start_code_re = None\n    end_code_re = None\n\n    # How to make code inactive\n    comment = \"\"\n\n    # Any specific prefix for lines in markdown cells (like in R spin format?)\n    markdown_prefix = None\n\n    def __init__(self, fmt=None, default_language=None):\n        \"\"\"Create a cell reader with empty content\"\"\"\n        if not fmt:\n            fmt = {}\n        self.ext = fmt.get(\"extension\")\n        self.default_language = default_language or _SCRIPT_EXTENSIONS.get(self.ext, {}).get(\"language\", \"python\")\n        self.comment_magics = fmt.get(\"comment_magics\", self.default_comment_magics)\n        self.use_runtools = fmt.get(\"use_runtools\", False)\n        self.format_version = fmt.get(\"format_version\")\n        self.metadata = None\n        self.org_content = []\n        self.content = []\n        self.explicit_soc = None\n        self.explicit_eoc = None\n        self.cell_type = None\n        self.language = None\n        self.cell_metadata_json = fmt.get(\"cell_metadata_json\", False)\n        self.doxygen_equation_markers = fmt.get(\"doxygen_equation_markers\", False)\n\n    def read(self, lines):\n        \"\"\"Read one cell from the given lines, and return the cell,\n        plus the position of the next cell\n        \"\"\"\n\n        # Do we have an explicit code marker on the first line?\n        self.metadata_and_language_from_option_line(lines[0])\n\n        if self.metadata and \"language\" in self.metadata:\n            self.language = self.metadata.pop(\"language\")\n\n        # Parse cell till its end and set content, lines_to_next_cell\n        pos_next_cell = self.find_cell_content(lines)\n\n        if self.cell_type == \"code\":\n            new_cell = new_code_cell\n        elif self.cell_type == \"markdown\":\n            new_cell = new_markdown_cell\n        else:\n            new_cell = new_raw_cell\n\n        if not self.metadata:\n            self.metadata = {}\n\n        if self.ext == \".py\":\n            expected_blank_lines = pep8_lines_between_cells(self.org_content or [\"\"], lines[pos_next_cell:], self.ext)\n        else:\n            expected_blank_lines = 1\n\n        if self.lines_to_next_cell != expected_blank_lines:\n            self.metadata[\"lines_to_next_cell\"] = self.lines_to_next_cell\n\n        if self.language:\n            self.metadata[\"language\"] = self.language\n\n        return (\n            new_cell(source=\"\\n\".join(self.content), metadata=self.metadata),\n            pos_next_cell,\n        )\n\n    def metadata_and_language_from_option_line(self, line):\n        \"\"\"Parse code options on the given line. When a start of a code cell\n        is found, self.metadata is set to a dictionary.\"\"\"\n        if self.start_code_re.match(line):\n            self.language, self.metadata = self.options_to_metadata(self.start_code_re.findall(line)[0])\n\n    def options_to_metadata(self, options):\n        \"\"\"Return language (str) and metadata (dict) from the option line\"\"\"\n        raise NotImplementedError(\"Option parsing must be implemented in a sub class\")\n\n    def find_cell_end(self, lines):\n        \"\"\"Return position of end of cell marker, and position\n        of first line after cell\"\"\"\n        raise NotImplementedError(\"This method must be implemented in a sub class\")\n\n    def find_cell_content(self, lines):\n        \"\"\"Parse cell till its end and set content, lines_to_next_cell.\n        Return the position of next cell start\"\"\"\n        cell_end_marker, next_cell_start, self.explicit_eoc = self.find_cell_end(lines)\n\n        # Metadata to dict\n        if self.metadata is None:\n            cell_start = 0\n            self.metadata = {}\n        else:\n            cell_start = 1\n\n        # Cell content\n        source = lines[cell_start:cell_end_marker]\n        self.org_content = copy(source)\n\n        # Exactly two empty lines at the end of cell (caused by PEP8)?\n        if self.ext == \".py\" and self.explicit_eoc:\n            if last_two_lines_blank(source):\n                source = source[:-2]\n                lines_to_end_of_cell_marker = 2\n            else:\n                lines_to_end_of_cell_marker = 0\n\n            pep8_lines = pep8_lines_between_cells(source, lines[cell_end_marker:], self.ext)\n            if lines_to_end_of_cell_marker != (0 if pep8_lines == 1 else 2):\n                self.metadata[\"lines_to_end_of_cell_marker\"] = lines_to_end_of_cell_marker\n\n        # Uncomment content\n        self.explicit_soc = cell_start > 0\n        self.content = self.extract_content(source)\n\n        # Is this an inactive cell?\n        if self.cell_type == \"code\":\n            if not is_active(\".ipynb\", self.metadata):\n                if self.metadata.get(\"active\") == \"\":\n                    del self.metadata[\"active\"]\n                self.cell_type = \"raw\"\n            elif self.ext in [\".md\", \".markdown\"] and not self.language:\n                # Markdown files in version >= 1.3 represent code chunks with no language as Markdown cells\n                if self.format_version not in [\"1.0\", \"1.1\"]:\n                    self.cell_type = \"markdown\"\n                    self.explicit_eoc = False\n                    cell_end_marker += 1\n                    self.content = lines[:cell_end_marker]\n                # Previous versions mapped those to raw cells\n                else:\n                    self.cell_type = \"raw\"\n\n        # Explicit end of cell marker?\n        if (\n            next_cell_start + 1 < len(lines)\n            and _BLANK_LINE.match(lines[next_cell_start])\n            and not _BLANK_LINE.match(lines[next_cell_start + 1])\n        ):\n            next_cell_start += 1\n        elif (\n            self.explicit_eoc\n            and next_cell_start + 2 < len(lines)\n            and _BLANK_LINE.match(lines[next_cell_start])\n            and _BLANK_LINE.match(lines[next_cell_start + 1])\n            and not _BLANK_LINE.match(lines[next_cell_start + 2])\n        ):\n            next_cell_start += 2\n\n        self.lines_to_next_cell = count_lines_to_next_cell(cell_end_marker, next_cell_start, len(lines), self.explicit_eoc)\n\n        return next_cell_start\n\n    def uncomment_code_and_magics(self, lines):\n        \"\"\"Uncomment code and possibly commented magic commands\"\"\"\n        raise NotImplementedError(\"This method must be implemented in a sub class\")\n\n    def extract_content(self, lines):\n        # Code cells with just a multiline string become Markdown cells\n        if self.ext == \".py\" and not is_active(self.ext, self.metadata, self.cell_type == \"code\"):\n            content = \"\\n\".join(lines).strip()\n            for prefix in [\"\"] if self.ext != \".py\" else [\"\", \"r\", \"R\"]:\n                for triple_quote in ['\"\"\"', \"'''\"]:\n                    left = prefix + triple_quote\n                    right = triple_quote\n                    if content.startswith(left) and content.endswith(right) and len(content) >= len(left + right):\n                        content = content[len(left) : -len(right)]\n                        # Trim first/last line return\n                        if content.startswith(\"\\n\"):\n                            content = content[1:]\n                            left = left + \"\\n\"\n                        if content.endswith(\"\\n\"):\n                            content = content[:-1]\n                            right = \"\\n\" + right\n\n                        if not prefix:\n                            if len(left) == len(right) == 4:\n                                self.metadata[\"cell_marker\"] = left[:3]\n                        elif len(left[1:]) == len(right) == 4:\n                            self.metadata[\"cell_marker\"] = left[:4]\n                        else:\n                            self.metadata[\"cell_marker\"] = left + \",\" + right\n                        return content.splitlines()\n\n        if not is_active(self.ext, self.metadata) or (\n            \"active\" not in self.metadata and self.language and self.language != self.default_language\n        ):\n            return uncomment(lines, self.comment if self.ext not in [\".r\", \".R\"] else \"#\")\n\n        return self.uncomment_code_and_magics(lines)\n\n\nclass MarkdownCellReader(BaseCellReader):\n    \"\"\"Read notebook cells from Markdown documents\"\"\"\n\n    comment = \"\"\n    start_code_re = re.compile(\n        r\"^```(`*)(\\s*)({})($|\\s.*$)\".format(\"|\".join(_JUPYTER_LANGUAGES_LOWER_AND_UPPER).replace(\"+\", \"\\\\+\"))\n    )\n    non_jupyter_code_re = re.compile(r\"^```\")\n    end_code_re = re.compile(r\"^```\\s*$\")\n    start_region_re = re.compile(r\"^<!--\\s*#(region|markdown|md|raw)(.*)-->\\s*$\")\n    end_region_re = None\n    default_comment_magics = False\n\n    def __init__(self, fmt=None, default_language=None):\n        super().__init__(fmt, default_language)\n        self.split_at_heading = (fmt or {}).get(\"split_at_heading\", False)\n        self.in_region = False\n        self.in_raw = False\n        if self.format_version in [\"1.0\", \"1.1\"] and self.ext != \".Rmd\":\n            # Restore the pattern used in Markdown <= 1.1\n            self.start_code_re = re.compile(r\"^```(.*)\")\n            self.non_jupyter_code_re = re.compile(r\"^```\\{\")\n\n    def metadata_and_language_from_option_line(self, line):\n        match_region = self.start_region_re.match(line)\n        if match_region:\n            self.in_region = True\n            groups = match_region.groups()\n            region_name = groups[0]\n            self.end_region_re = re.compile(rf\"^<!--\\s*#end{region_name}\\s*-->\\s*$\")\n            self.cell_metadata_json = self.cell_metadata_json or is_json_metadata(groups[1])\n            title, self.metadata = text_to_metadata(groups[1], allow_title=True)\n            if region_name == \"raw\":\n                self.cell_type = \"raw\"\n            else:\n                self.cell_type = \"markdown\"\n            if title:\n                self.metadata[\"title\"] = title\n            if region_name in [\"markdown\", \"md\"]:\n                self.metadata[\"region_name\"] = region_name\n        elif self.start_code_re.match(line):\n            self.language, self.metadata = self.options_to_metadata(self.start_code_re.findall(line)[0])\n            # Cells with a .noeval attribute are markdown cells #347\n            if self.metadata.get(\".noeval\", \"\") is None:\n                self.cell_type = \"markdown\"\n                self.metadata = {}\n                self.language = None\n\n    def options_to_metadata(self, options):\n        if isinstance(options, tuple):\n            self.end_code_re = re.compile(\"```\" + options[0])\n            options = \" \".join(options[1:])\n        else:\n            self.end_code_re = re.compile(r\"^```\\s*$\")\n        self.cell_metadata_json = self.cell_metadata_json or is_json_metadata(options)\n        return text_to_metadata(options)\n\n    def find_cell_end(self, lines):\n        \"\"\"Return position of end of cell marker, and position\n        of first line after cell\"\"\"\n        if self.in_region:\n            for i, line in enumerate(lines):\n                if self.end_region_re.match(line):\n                    return i, i + 1, True\n        elif self.metadata is None:\n            # default markdown: (last) two consecutive blank lines, except when in code blocks\n            self.cell_type = \"markdown\"\n            prev_blank = 0\n            in_explicit_code_block = False\n            in_indented_code_block = False\n\n            for i, line in enumerate(lines):\n                if in_explicit_code_block and self.end_code_re.match(line):\n                    in_explicit_code_block = False\n                    continue\n\n                if prev_blank and line.startswith(\"    \") and not _BLANK_LINE.match(line):\n                    in_indented_code_block = True\n                    prev_blank = 0\n                    continue\n\n                if in_indented_code_block and not _BLANK_LINE.match(line) and not line.startswith(\"    \"):\n                    in_indented_code_block = False\n\n                if in_indented_code_block or in_explicit_code_block:\n                    continue\n\n                if self.start_region_re.match(line):\n                    if i > 1 and prev_blank:\n                        return i - 1, i, False\n                    return i, i, False\n\n                if self.start_code_re.match(line):\n                    language, metadata = self.options_to_metadata(self.start_code_re.findall(line)[0])\n                    # Cells with a .noeval attribute are markdown cells #347\n                    # R Markdown notebooks can have bibliography and index blocks, cf #1161 and #1429\n                    if language not in _JUPYTER_LANGUAGES_LOWER_AND_UPPER or metadata.get(\".noeval\", \"\") is None:\n                        in_explicit_code_block = True\n                        prev_blank = 0\n                        continue\n\n                    if i > 1 and prev_blank:\n                        return i - 1, i, False\n                    return i, i, False\n                elif line.startswith(\"```{\"):\n                    # These are non-code blocks but we still need to look for their end\n                    in_explicit_code_block = True\n                    prev_blank = 0\n                    continue\n\n                if self.non_jupyter_code_re.match(line):\n                    if prev_blank >= 2:\n                        return i - 2, i, True\n                    in_explicit_code_block = True\n                    prev_blank = 0\n                    continue\n\n                if self.split_at_heading and line.startswith(\"#\") and prev_blank >= 1:\n                    return i - 1, i, False\n\n                if _BLANK_LINE.match(lines[i]):\n                    prev_blank += 1\n                elif prev_blank >= 2:\n                    return i - 2, i, True\n                else:\n                    prev_blank = 0\n        else:\n            self.cell_type = \"code\"\n            # At some point we could remove the below, in which we make sure not to break language strings\n            # into multiple cells (#419). Indeed, now that the markdown cell uses one extra backtick (#712)\n            # we should not have the issue any more\n            parser = StringParser(self.language or self.default_language)\n            for i, line in enumerate(lines):\n                # skip cell header\n                if i == 0:\n                    continue\n\n                if parser.is_quoted():\n                    parser.read_line(line)\n                    continue\n\n                parser.read_line(line)\n                if self.end_code_re.match(line):\n                    return i, i + 1, True\n\n        # End not found\n        return len(lines), len(lines), False\n\n    def uncomment_code_and_magics(self, lines):\n        if self.cell_type == \"code\" and self.comment_magics:\n            lines = uncomment_magic(lines, self.language)\n        if self.cell_type == \"markdown\" and self.doxygen_equation_markers:\n            lines = doxygen_to_markdown(\"\\n\".join(lines)).splitlines()\n        return lines\n\n\nclass RMarkdownCellReader(MarkdownCellReader):\n    \"\"\"Read notebook cells from R Markdown notebooks\"\"\"\n\n    comment = \"\"\n    start_code_re = re.compile(r\"^```{(.*)}\\s*$\")\n    non_jupyter_code_re = re.compile(r\"^```([^\\{]|\\s*$)\")\n    default_language = \"R\"\n    default_comment_magics = True\n\n    def options_to_metadata(self, options):\n        return rmd_options_to_metadata(options, self.use_runtools)\n\n    def uncomment_code_and_magics(self, lines):\n        if self.cell_type == \"code\" and self.comment_magics and is_active(self.ext, self.metadata):\n            uncomment_magic(lines, self.language or self.default_language)\n\n        return lines\n\n\nclass ScriptCellReader(BaseCellReader):  # pylint: disable=W0223\n    \"\"\"Read notebook cells from scripts\n    (common base for R and Python scripts)\"\"\"\n\n    def uncomment_code_and_magics(self, lines):\n        if self.cell_type == \"code\" or self.comment != \"#'\":\n            if self.comment_magics:\n                if is_active(self.ext, self.metadata):\n                    uncomment_magic(\n                        lines,\n                        self.language or self.default_language,\n                        explicitly_code=self.explicit_soc,\n                    )\n                    if (\n                        self.cell_type == \"code\"\n                        and not self.explicit_soc\n                        and need_explicit_marker(lines, self.language or self.default_language)\n                    ):\n                        self.metadata[\"comment_questions\"] = False\n                else:\n                    lines = uncomment(lines)\n\n        if self.default_language == \"go\" and self.language is None:\n            lines = [re.sub(r\"^((//\\s*)*)(//\\s*gonb:%%)\", r\"\\1%%\", line) for line in lines]\n\n        if self.cell_type == \"code\":\n            return unescape_code_start(lines, self.ext, self.language or self.default_language)\n\n        return uncomment(lines, self.markdown_prefix or self.comment, self.comment_suffix)\n\n\nclass RScriptCellReader(ScriptCellReader):\n    \"\"\"Read notebook cells from R scripts written according\n    to the knitr-spin syntax\"\"\"\n\n    comment = \"#'\"\n    comment_suffix = \"\"\n    markdown_prefix = \"#'\"\n    default_language = \"R\"\n    start_code_re = re.compile(r\"^#\\+(.*)\\s*$\")\n    default_comment_magics = True\n\n    def options_to_metadata(self, options):\n        return rmd_options_to_metadata(\"r \" + options, self.use_runtools)\n\n    def find_cell_end(self, lines):\n        \"\"\"Return position of end of cell marker, and position\n        of first line after cell\"\"\"\n        if self.metadata is None and lines[0].startswith(\"#'\"):\n            self.cell_type = \"markdown\"\n            for i, line in enumerate(lines):\n                if not line.startswith(\"#'\"):\n                    if _BLANK_LINE.match(line):\n                        return i, i + 1, False\n                    return i, i, False\n\n            return len(lines), len(lines), False\n\n        if self.metadata and \"cell_type\" in self.metadata:\n            self.cell_type = self.metadata.pop(\"cell_type\")\n        else:\n            self.cell_type = \"code\"\n\n        parser = StringParser(self.language or self.default_language)\n        for i, line in enumerate(lines):\n            # skip cell header\n            if self.metadata is not None and i == 0:\n                continue\n\n            if parser.is_quoted():\n                parser.read_line(line)\n                continue\n\n            parser.read_line(line)\n\n            if self.start_code_re.match(line) or (self.markdown_prefix and line.startswith(self.markdown_prefix)):\n                if i > 0 and _BLANK_LINE.match(lines[i - 1]):\n                    if i > 1 and _BLANK_LINE.match(lines[i - 2]):\n                        return i - 2, i, False\n                    return i - 1, i, False\n                return i, i, False\n\n            if _BLANK_LINE.match(line):\n                if not next_code_is_indented(lines[i:]):\n                    if i > 0:\n                        return i, i + 1, False\n                    if len(lines) > 1 and not _BLANK_LINE.match(lines[1]):\n                        return 1, 1, False\n                    return 1, 2, False\n\n        return len(lines), len(lines), False\n\n\nclass LightScriptCellReader(ScriptCellReader):\n    \"\"\"Read notebook cells from plain Python or Julia files. Cells\n    are identified by line breaks, unless they start with an\n    explicit marker '# +'\"\"\"\n\n    default_comment_magics = True\n    cell_marker_start = None\n    cell_marker_end = None\n\n    def __init__(self, fmt=None, default_language=None):\n        super().__init__(fmt, default_language)\n        self.ext = self.ext or \".py\"\n        script = _SCRIPT_EXTENSIONS[self.ext]\n        self.default_language = default_language or script[\"language\"]\n        self.comment = script[\"comment\"]\n        self.comment_suffix = script.get(\"comment_suffix\", \"\")\n        self.ignore_end_marker = True\n        self.explicit_end_marker_required = False\n        if fmt and fmt.get(\"format_name\", \"light\") == \"light\" and \"cell_markers\" in fmt and fmt[\"cell_markers\"] != \"+,-\":\n            self.cell_marker_start, self.cell_marker_end = fmt[\"cell_markers\"].split(\",\", 1)\n            self.start_code_re = re.compile(\"^\" + re.escape(self.comment) + r\"\\s*\" + self.cell_marker_start + r\"(.*)$\")\n            self.end_code_re = re.compile(\"^\" + re.escape(self.comment) + r\"\\s*\" + self.cell_marker_end + r\"\\s*$\")\n        else:\n            self.start_code_re = re.compile(\"^\" + re.escape(self.comment) + r\"\\s*\\+(.*)$\")\n\n    def metadata_and_language_from_option_line(self, line):\n        if self.start_code_re.match(line):\n            # Remove the OCAML suffix\n            if self.comment_suffix:\n                if line.endswith(\" \" + self.comment_suffix):\n                    line = line[: -len(\" \" + self.comment_suffix)]\n                elif line.endswith(self.comment_suffix):\n                    line = line[: -len(self.comment_suffix)]\n\n            # We want to parse inner most regions as cells.\n            # Thus, if we find another region start before the end for this region,\n            # we will have ignore the metadata that we found here, and move on to the next cell.\n            groups = self.start_code_re.match(line).groups()\n            self.language, self.metadata = self.options_to_metadata(groups[0])\n            self.ignore_end_marker = False\n            if self.cell_marker_start:\n                self.explicit_end_marker_required = True\n        elif self.simple_start_code_re and self.simple_start_code_re.match(line):\n            self.metadata = {}\n            self.ignore_end_marker = False\n        elif self.cell_marker_end and self.end_code_re.match(line):\n            self.metadata = None\n            self.cell_type = \"code\"\n\n    def options_to_metadata(self, options):\n        self.cell_metadata_json = self.cell_metadata_json or is_json_metadata(options)\n        title, metadata = text_to_metadata(options, allow_title=True)\n\n        # Cell type\n        for cell_type in [\"markdown\", \"raw\", \"md\"]:\n            code = f\"[{cell_type}]\"\n            if code in title:\n                title = title.replace(code, \"\").strip()\n                metadata[\"cell_type\"] = cell_type\n                if cell_type == \"md\":\n                    metadata[\"region_name\"] = cell_type\n                    metadata[\"cell_type\"] = \"markdown\"\n                break\n\n        # Spyder has sub cells\n        cell_depth = 0\n        while title.startswith(\"%\"):\n            cell_depth += 1\n            title = title[1:]\n\n        if cell_depth:\n            metadata[\"cell_depth\"] = cell_depth\n            title = title.strip()\n\n        if title:\n            metadata[\"title\"] = title\n\n        return None, metadata\n\n    def find_cell_end(self, lines):\n        \"\"\"Return position of end of cell marker, and position of first line after cell\"\"\"\n        if (\n            self.metadata is None\n            and not (self.cell_marker_end and self.end_code_re.match(lines[0]))\n            and paragraph_is_fully_commented(lines, self.comment, self.default_language)\n        ):\n            self.cell_type = \"markdown\"\n            for i, line in enumerate(lines):\n                if _BLANK_LINE.match(line):\n                    return i, i + 1, False\n            return len(lines), len(lines), False\n\n        if self.metadata is None:\n            self.end_code_re = None\n        elif not self.cell_marker_end:\n            end_of_cell = self.metadata.get(\"endofcell\", \"-\")\n            self.end_code_re = re.compile(\"^\" + re.escape(self.comment) + \" \" + end_of_cell + r\"\\s*$\")\n\n        return self.find_region_end(lines)\n\n    def find_region_end(self, lines):\n        \"\"\"Find the end of the region started with start and end markers\"\"\"\n        if self.metadata and \"cell_type\" in self.metadata:\n            self.cell_type = self.metadata.pop(\"cell_type\")\n        else:\n            self.cell_type = \"code\"\n\n        parser = StringParser(self.language or self.default_language)\n        for i, line in enumerate(lines):\n            # skip cell header\n            if self.metadata is not None and i == 0:\n                continue\n\n            if parser.is_quoted():\n                parser.read_line(line)\n                continue\n\n            parser.read_line(line)\n            # New code region\n            # Simple code pattern in LightScripts must be preceded with a blank line\n            if self.start_code_re.match(line) or (\n                self.simple_start_code_re\n                and self.simple_start_code_re.match(line)\n                and (self.cell_marker_start or i == 0 or _BLANK_LINE.match(lines[i - 1]))\n            ):\n                if self.explicit_end_marker_required:\n                    # Metadata here was conditioned on finding an explicit end marker\n                    # before the next start marker. So we dismiss it.\n                    self.metadata = None\n                    self.language = None\n\n                if i > 0 and _BLANK_LINE.match(lines[i - 1]):\n                    if i > 1 and _BLANK_LINE.match(lines[i - 2]):\n                        return i - 2, i, False\n                    return i - 1, i, False\n                return i, i, False\n\n            if not self.ignore_end_marker and self.end_code_re:\n                if self.end_code_re.match(line):\n                    return i, i + 1, True\n            elif _BLANK_LINE.match(line):\n                if not next_code_is_indented(lines[i:]):\n                    if i > 0:\n                        return i, i + 1, False\n                    if len(lines) > 1 and not _BLANK_LINE.match(lines[1]):\n                        return 1, 1, False\n                    return 1, 2, False\n\n        return len(lines), len(lines), False\n\n\nclass DoublePercentScriptCellReader(LightScriptCellReader):\n    \"\"\"Read notebook cells from Spyder/VScode scripts (#59)\"\"\"\n\n    default_comment_magics = True\n\n    def __init__(self, fmt, default_language=None):\n        LightScriptCellReader.__init__(self, fmt, default_language)\n        script = _SCRIPT_EXTENSIONS[self.ext]\n        self.default_language = default_language or script[\"language\"]\n        self.comment = script[\"comment\"]\n        self.comment_suffix = script.get(\"comment_suffix\", \"\")\n        self.start_code_re = re.compile(rf\"^\\s*{re.escape(self.comment)}\\s*%%(%*)\\s(.*)$\")\n        self.alternative_start_code_re = re.compile(rf\"^\\s*{re.escape(self.comment)}\\s*(%%|<codecell>|In\\[[0-9 ]*\\]:?)\\s*$\")\n        self.explicit_soc = True\n\n    def metadata_and_language_from_option_line(self, line):\n        \"\"\"Parse code options on the given line. When a start of a code cell\n        is found, self.metadata is set to a dictionary.\"\"\"\n        if self.start_code_re.match(line):\n            line = uncomment([line], self.comment, self.comment_suffix)[0]\n            self.language, self.metadata = self.options_to_metadata(line[line.find(\"%%\") + 2 :])\n        else:\n            self.metadata = {}\n\n    def find_cell_content(self, lines):\n        \"\"\"Parse cell till its end and set content, lines_to_next_cell.\n        Return the position of next cell start\"\"\"\n        cell_end_marker, next_cell_start, explicit_eoc = self.find_cell_end(lines)\n\n        # Metadata to dict\n        if self.start_code_re.match(lines[0]) or self.alternative_start_code_re.match(lines[0]):\n            cell_start = 1\n        else:\n            cell_start = 0\n\n        # Cell content\n        source = lines[cell_start:cell_end_marker]\n        self.org_content = copy(source)\n        self.content = self.extract_content(source)\n\n        self.lines_to_next_cell = count_lines_to_next_cell(cell_end_marker, next_cell_start, len(lines), explicit_eoc)\n\n        return next_cell_start\n\n    def find_cell_end(self, lines):\n        \"\"\"Return position of end of cell marker, and position\n        of first line after cell\"\"\"\n\n        if self.metadata and \"cell_type\" in self.metadata:\n            self.cell_type = self.metadata.pop(\"cell_type\")\n        elif not is_active(\".ipynb\", self.metadata):\n            if self.metadata.get(\"active\") == \"\":\n                del self.metadata[\"active\"]\n            self.cell_type = \"raw\"\n            if is_active(self.ext, self.metadata):\n                self.comment = \"\"\n        else:\n            self.cell_type = \"code\"\n\n        next_cell = len(lines)\n        parser = StringParser(self.language or self.default_language)\n        for i, line in enumerate(lines):\n            if parser.is_quoted():\n                parser.read_line(line)\n                continue\n\n            parser.read_line(line)\n            if i > 0 and (self.start_code_re.match(line) or self.alternative_start_code_re.match(line)):\n                next_cell = i\n                break\n\n        if last_two_lines_blank(lines[:next_cell]):\n            return next_cell - 2, next_cell, False\n        if next_cell > 0 and _BLANK_LINE.match(lines[next_cell - 1]):\n            return next_cell - 1, next_cell, False\n        return next_cell, next_cell, False\n\n\nclass HydrogenCellReader(DoublePercentScriptCellReader):\n    \"\"\"Read notebook cells from Hydrogen scripts (#59)\"\"\"\n\n    default_comment_magics = False\n\n\nclass SphinxGalleryScriptCellReader(ScriptCellReader):  # pylint: disable=W0223\n    \"\"\"Read notebook cells from Sphinx Gallery scripts (#80)\"\"\"\n\n    comment = \"#\"\n    default_language = \"python\"\n    default_comment_magics = True\n    twenty_hash = re.compile(r\"^#( |)#{19,}\\s*$\")\n    default_markdown_cell_marker = \"#\" * 79\n    markdown_marker = None\n\n    def __init__(self, fmt=None, default_language=\"python\"):\n        super().__init__(fmt, default_language)\n        self.ext = \".py\"\n        self.rst2md = (fmt or {}).get(\"rst2md\", False)\n\n    def start_of_new_markdown_cell(self, line):\n        \"\"\"Does this line starts a new markdown cell?\n        Then, return the cell marker\"\"\"\n        for empty_markdown_cell in ['\"\"', \"''\"]:\n            if line == empty_markdown_cell:\n                return empty_markdown_cell\n\n        for triple_quote in ['\"\"\"', \"'''\"]:\n            if line.startswith(triple_quote):\n                return triple_quote\n\n        if self.twenty_hash.match(line):\n            return line\n\n        return None\n\n    def metadata_and_language_from_option_line(self, line):\n        self.markdown_marker = self.start_of_new_markdown_cell(line)\n        if self.markdown_marker:\n            self.cell_type = \"markdown\"\n            if self.markdown_marker != self.default_markdown_cell_marker:\n                self.metadata = {\"cell_marker\": self.markdown_marker}\n        else:\n            self.cell_type = \"code\"\n\n    def find_cell_end(self, lines):\n        \"\"\"Return position of end of cell, and position\n        of first line after cell, and whether there was an\n        explicit end of cell marker\"\"\"\n\n        if self.cell_type == \"markdown\":\n            # Empty cell \"\" or ''\n            if len(self.markdown_marker) <= 2:\n                if len(lines) == 1 or _BLANK_LINE.match(lines[1]):\n                    return 0, 2, True\n                return 0, 1, True\n\n            # Multi-line comment with triple quote\n            if len(self.markdown_marker) == 3:\n                for i, line in enumerate(lines):\n                    if (i > 0 or line.strip() != self.markdown_marker) and line.rstrip().endswith(self.markdown_marker):\n                        explicit_end_of_cell_marker = line.strip() == self.markdown_marker\n                        if explicit_end_of_cell_marker:\n                            end_of_cell = i\n                        else:\n                            end_of_cell = i + 1\n                        if len(lines) <= i + 1 or _BLANK_LINE.match(lines[i + 1]):\n                            return end_of_cell, i + 2, explicit_end_of_cell_marker\n                        return end_of_cell, i + 1, explicit_end_of_cell_marker\n            else:\n                # 20 # or more\n                for i, line in enumerate(lines[1:], 1):\n                    if not line.startswith(self.comment):\n                        if _BLANK_LINE.match(line):\n                            return i, i + 1, False\n                        return i, i, False\n\n        elif self.cell_type == \"code\":\n            parser = StringParser(\"python\")\n            for i, line in enumerate(lines):\n                if parser.is_quoted():\n                    parser.read_line(line)\n                    continue\n\n                if self.start_of_new_markdown_cell(line):\n                    if i > 0 and _BLANK_LINE.match(lines[i - 1]):\n                        return i - 1, i, False\n                    return i, i, False\n                parser.read_line(line)\n\n        return len(lines), len(lines), False\n\n    def find_cell_content(self, lines):\n        \"\"\"Parse cell till its end and set content, lines_to_next_cell.\n        Return the position of next cell start\"\"\"\n        cell_end_marker, next_cell_start, explicit_eoc = self.find_cell_end(lines)\n\n        # Metadata to dict\n        cell_start = 0\n        if self.cell_type == \"markdown\":\n            if self.markdown_marker in ['\"\"\"', \"'''\"]:\n                # Remove the triple quotes\n                if lines[0].strip() == self.markdown_marker:\n                    cell_start = 1\n                else:\n                    lines[0] = lines[0][3:]\n                if not explicit_eoc:\n                    last = lines[cell_end_marker - 1]\n                    lines[cell_end_marker - 1] = last[: last.rfind(self.markdown_marker)]\n            if self.twenty_hash.match(self.markdown_marker):\n                cell_start = 1\n        else:\n            self.metadata = {}\n\n        # Cell content\n        source = lines[cell_start:cell_end_marker]\n        self.org_content = copy(source)\n\n        if self.cell_type == \"code\" and self.comment_magics:\n            uncomment_magic(source, self.language or self.default_language)\n\n        if self.cell_type == \"markdown\" and source:\n            if self.markdown_marker.startswith(self.comment):\n                source = uncomment(source, self.comment)\n            if self.rst2md:\n                if rst2md:\n                    gallery_conf = {\"notebook_images\": False}\n                    heading_level_counter = count(start=1)\n                    heading_levels = defaultdict(lambda: next(heading_level_counter))\n                    source = rst2md(\"\\n\".join(source), gallery_conf, \"\", heading_levels).splitlines()\n                else:\n                    raise ImportError(\"Could not import rst2md from sphinx_gallery.notebook\")  # pragma: no cover\n\n        self.content = source\n\n        self.lines_to_next_cell = count_lines_to_next_cell(cell_end_marker, next_cell_start, len(lines), explicit_eoc)\n\n        return next_cell_start\n"
  },
  {
    "path": "src/jupytext/cell_to_text.py",
    "content": "\"\"\"Export notebook cells as text\"\"\"\n\nimport re\nimport warnings\nfrom copy import copy\n\nfrom .cell_metadata import (\n    _IGNORE_CELL_METADATA,\n    is_active,\n    metadata_to_double_percent_options,\n    metadata_to_rmd_options,\n    metadata_to_text,\n)\nfrom .cell_reader import LightScriptCellReader, MarkdownCellReader, RMarkdownCellReader\nfrom .doxygen import markdown_to_doxygen\nfrom .languages import _SCRIPT_EXTENSIONS, cell_language, comment_lines, same_language\nfrom .magics import comment_magic, escape_code_start, need_explicit_marker\nfrom .metadata_filter import filter_metadata\nfrom .pep8 import pep8_lines_between_cells\n\n\ndef cell_source(cell):\n    \"\"\"Return the source of the current cell, as an array of lines\"\"\"\n    source = cell.source\n    if source == \"\":\n        return [\"\"]\n    if source.endswith(\"\\n\"):\n        return source.splitlines() + [\"\"]\n    return source.splitlines()\n\n\ndef three_backticks_or_more(lines):\n    \"\"\"Return a string with enough backticks to encapsulate the given code cell in Markdown\n    cf. https://github.com/mwouts/jupytext/issues/712\"\"\"\n    code_cell_delimiter = \"```\"\n    for line in lines:\n        if not line.startswith(code_cell_delimiter):\n            continue\n        for char in line[len(code_cell_delimiter) :]:\n            if char != \"`\":\n                break\n            code_cell_delimiter += \"`\"\n        code_cell_delimiter += \"`\"\n\n    return code_cell_delimiter\n\n\nclass BaseCellExporter:\n    \"\"\"A class that represent a notebook cell as text\"\"\"\n\n    default_comment_magics = None\n    parse_cell_language = True\n\n    def __init__(self, cell, default_language, fmt=None, unsupported_keys=None):\n        self.fmt = fmt or {}\n        self.ext = self.fmt.get(\"extension\")\n        self.cell_type = cell.cell_type\n        self.source = cell_source(cell)\n        self.unfiltered_metadata = cell.metadata\n        self.metadata = filter_metadata(\n            cell.metadata,\n            self.fmt.get(\"cell_metadata_filter\"),\n            _IGNORE_CELL_METADATA,\n            unsupported_keys=unsupported_keys,\n        )\n        if self.parse_cell_language:\n            custom_cell_magics = self.fmt.get(\"custom_cell_magics\", \"\").split(\",\")\n            self.language, magic_args = cell_language(self.source, default_language, custom_cell_magics)\n\n            if magic_args:\n                self.metadata[\"magic_args\"] = magic_args\n        else:\n            self.language = None\n\n        if self.language and not self.ext.endswith(\".Rmd\"):\n            self.metadata[\"language\"] = self.language\n\n        self.language = self.language or cell.metadata.get(\"language\", default_language)\n        self.default_language = default_language\n        self.comment = _SCRIPT_EXTENSIONS.get(self.ext, {}).get(\"comment\", \"#\")\n        self.comment_suffix = _SCRIPT_EXTENSIONS.get(self.ext, {}).get(\"comment_suffix\", \"\")\n        self.comment_magics = self.fmt.get(\"comment_magics\", self.default_comment_magics)\n        self.cell_metadata_json = self.fmt.get(\"cell_metadata_json\", False)\n        self.use_runtools = self.fmt.get(\"use_runtools\", False)\n        self.doxygen_equation_markers = self.fmt.get(\"doxygen_equation_markers\", False)\n\n        # how many blank lines before next cell\n        self.lines_to_next_cell = cell.metadata.get(\"lines_to_next_cell\")\n        self.lines_to_end_of_cell_marker = cell.metadata.get(\"lines_to_end_of_cell_marker\")\n\n        if (\n            cell.cell_type == \"raw\"\n            and \"active\" not in self.metadata\n            and not any(tag.startswith(\"active-\") for tag in self.metadata.get(\"tags\", []))\n        ):\n            self.metadata[\"active\"] = \"\"\n\n    def is_code(self):\n        \"\"\"Is this cell a code cell?\"\"\"\n        if self.cell_type == \"code\":\n            return True\n        if (\n            self.cell_type == \"raw\"\n            and \"active\" in self.metadata\n            or any(tag.startswith(\"active-\") for tag in self.metadata.get(\"tags\", []))\n        ):\n            return True\n        return False\n\n    def use_triple_quotes(self):\n        \"\"\"Should this markdown cell use triple quote?\"\"\"\n        if \"cell_marker\" not in self.unfiltered_metadata:\n            return False\n        cell_marker = self.unfiltered_metadata[\"cell_marker\"]\n        if cell_marker in ['\"\"\"', \"'''\"]:\n            return True\n        if \",\" not in cell_marker:\n            return False\n        left, right = cell_marker.split(\",\")\n        return left[:3] == right[-3:] and left[:3] in ['\"\"\"', \"'''\"]\n\n    def cell_to_text(self):\n        \"\"\"Return the text representation for the cell\"\"\"\n        # Trigger cell marker in case we are using multiline quotes\n        if self.cell_type != \"code\" and not self.metadata and self.use_triple_quotes():\n            self.metadata[\"cell_type\"] = self.cell_type\n\n        # Go notebooks have '%%' or '%% -' magic commands that need to be escaped\n        if self.default_language == \"go\" and self.language == \"go\":\n            self.source = [re.sub(r\"^(//\\s*)*(%%\\s*$|%%\\s+-.*$)\", r\"\\1//gonb:\\2\", line) for line in self.source]\n\n        if self.is_code():\n            return self.code_to_text()\n\n        source = copy(self.source)\n        if not self.comment:\n            escape_code_start(source, self.ext, None)\n        return self.markdown_to_text(source)\n\n    def markdown_to_text(self, source):\n        \"\"\"Escape the given source, for a markdown cell\"\"\"\n        cell_markers = self.unfiltered_metadata.get(\"cell_marker\", self.fmt.get(\"cell_markers\"))\n        if cell_markers:\n            if \",\" in cell_markers:\n                left, right = cell_markers.split(\",\", 1)\n            else:\n                left = cell_markers + \"\\n\"\n                if cell_markers.startswith((\"r\", \"R\")):\n                    cell_markers = cell_markers[1:]\n                right = \"\\n\" + cell_markers\n\n            if (left[:3] == right[-3:] or (left[:1] in [\"r\", \"R\"] and left[1:4] == right[-3:])) and right[-3:] in [\n                '\"\"\"',\n                \"'''\",\n            ]:\n                # Markdown cells that contain a backslash should be encoded as raw strings\n                if left[:1] not in [\"r\", \"R\"] and \"\\\\\" in \"\\n\".join(source) and self.fmt.get(\"format_name\") == \"percent\":\n                    left = \"r\" + left\n\n                source = copy(source)\n                source[0] = left + source[0]\n                source[-1] = source[-1] + right\n                return source\n\n        if (\n            self.comment\n            and self.comment != \"#'\"\n            and is_active(self.ext, self.metadata)\n            and self.fmt.get(\"format_name\") not in [\"percent\", \"hydrogen\"]\n        ):\n            source = copy(source)\n            comment_magic(\n                source,\n                self.language,\n                self.comment_magics,\n                explicitly_code=self.cell_type == \"code\",\n            )\n\n        return comment_lines(source, self.comment, self.comment_suffix)\n\n    def code_to_text(self):\n        \"\"\"Return the text representation of this cell as a code cell\"\"\"\n        raise NotImplementedError(\"This method must be implemented in a sub-class\")\n\n    def remove_eoc_marker(self, text, next_text):\n        \"\"\"Remove end-of-cell marker when possible\"\"\"\n        # pylint: disable=W0613,R0201\n        return text\n\n\nclass MarkdownCellExporter(BaseCellExporter):\n    \"\"\"A class that represent a notebook cell as Markdown\"\"\"\n\n    default_comment_magics = False\n    cell_reader = MarkdownCellReader\n\n    def __init__(self, *args, **kwargs):\n        BaseCellExporter.__init__(self, *args, **kwargs)\n        self.comment = \"\"\n\n    def html_comment(self, metadata, code=\"region\"):\n        \"\"\"Protect a Markdown or Raw cell with HTML comments\"\"\"\n        if metadata:\n            region_start = [\n                \"<!-- #\" + code,\n                metadata_to_text(metadata, plain_json=self.cell_metadata_json),\n                \"-->\",\n            ]\n            region_start = \" \".join(region_start)\n        else:\n            region_start = f\"<!-- #{code} -->\"\n\n        return [region_start] + self.source + [f\"<!-- #end{code} -->\"]\n\n    def cell_to_text(self):\n        \"\"\"Return the text representation of a cell\"\"\"\n        if self.cell_type == \"markdown\":\n            if self.doxygen_equation_markers and self.cell_type == \"markdown\":\n                self.source = markdown_to_doxygen(\"\\n\".join(self.source)).splitlines()\n\n            # Is an explicit region required?\n            if self.metadata:\n                protect = True\n            else:\n                # Would the text be parsed to a shorter cell/a cell with a different type?\n                cell, pos = self.cell_reader(self.fmt).read(self.source)\n                protect = pos < len(self.source) or cell.cell_type != self.cell_type\n            if protect:\n                return self.html_comment(self.metadata, self.metadata.pop(\"region_name\", \"region\"))\n            return self.source\n\n        return self.code_to_text()\n\n    def code_to_text(self):\n        \"\"\"Return the text representation of a code cell\"\"\"\n        source = copy(self.source)\n        comment_magic(source, self.language, self.comment_magics)\n\n        if self.metadata.get(\"active\") == \"\":\n            self.metadata.pop(\"active\")\n\n        self.language = self.metadata.pop(\"language\", self.language)\n        if self.cell_type == \"raw\" and not is_active(self.ext, self.metadata, False):\n            return self.html_comment(self.metadata, \"raw\")\n\n        options = metadata_to_text(self.language, self.metadata)\n        code_cell_delimiter = three_backticks_or_more(self.source)\n        return [code_cell_delimiter + options] + source + [code_cell_delimiter]\n\n\nclass RMarkdownCellExporter(MarkdownCellExporter):\n    \"\"\"A class that represent a notebook cell as R Markdown\"\"\"\n\n    default_comment_magics = True\n    cell_reader = RMarkdownCellReader\n\n    def __init__(self, *args, **kwargs):\n        MarkdownCellExporter.__init__(self, *args, **kwargs)\n        self.ext = \".Rmd\"\n        self.comment = \"\"\n\n    def code_to_text(self):\n        \"\"\"Return the text representation of a code cell\"\"\"\n        active = is_active(self.ext, self.metadata)\n        source = copy(self.source)\n\n        if active:\n            comment_magic(source, self.language, self.comment_magics)\n\n        lines = []\n        if not is_active(self.ext, self.metadata):\n            self.metadata[\"eval\"] = False\n        options = metadata_to_rmd_options(self.language, self.metadata, self.use_runtools)\n        lines.append(f\"```{{{options}}}\")\n        lines.extend(source)\n        lines.append(\"```\")\n        return lines\n\n\ndef endofcell_marker(source, comment):\n    \"\"\"Issues #31 #38:  does the cell contain a blank line? In that case\n    we add an end-of-cell marker\"\"\"\n    endofcell = \"-\"\n    while True:\n        endofcell_re = re.compile(rf\"^{re.escape(comment)}( )\" + endofcell + r\"\\s*$\")\n        if list(filter(endofcell_re.match, source)):\n            endofcell = endofcell + \"-\"\n        else:\n            return endofcell\n\n\nclass LightScriptCellExporter(BaseCellExporter):\n    \"\"\"A class that represent a notebook cell as a Python or Julia script\"\"\"\n\n    default_comment_magics = True\n    use_cell_markers = True\n    cell_marker_start = None\n    cell_marker_end = None\n\n    def __init__(self, *args, **kwargs):\n        BaseCellExporter.__init__(self, *args, **kwargs)\n        if \"cell_markers\" in self.fmt:\n            if \",\" not in self.fmt[\"cell_markers\"]:\n                warnings.warn(\n                    \"Ignored cell markers '{}' as it does not match the expected 'start,end' pattern\".format(\n                        self.fmt.pop(\"cell_markers\")\n                    )\n                )\n            elif self.fmt[\"cell_markers\"] != \"+,-\":\n                self.cell_marker_start, self.cell_marker_end = self.fmt[\"cell_markers\"].split(\",\", 1)\n        for key in [\"endofcell\"]:\n            if key in self.unfiltered_metadata:\n                self.metadata[key] = self.unfiltered_metadata[key]\n\n    def is_code(self):\n        # Treat markdown cells with metadata as code cells (#66)\n        if (self.cell_type == \"markdown\" and self.metadata) or self.use_triple_quotes():\n            if is_active(self.ext, self.metadata):\n                self.metadata[\"cell_type\"] = self.cell_type\n                self.source = self.markdown_to_text(self.source)\n                self.cell_type = \"code\"\n                self.unfiltered_metadata = copy(self.unfiltered_metadata)\n                self.unfiltered_metadata.pop(\"cell_marker\", \"\")\n            return True\n        return super().is_code()\n\n    def code_to_text(self):\n        \"\"\"Return the text representation of a code cell\"\"\"\n        active = is_active(self.ext, self.metadata, same_language(self.language, self.default_language))\n        source = copy(self.source)\n        escape_code_start(source, self.ext, self.language)\n        comment_questions = self.metadata.pop(\"comment_questions\", True)\n\n        if active:\n            comment_magic(source, self.language, self.comment_magics, comment_questions)\n        else:\n            source = self.markdown_to_text(source)\n\n        if (\n            active and comment_questions and need_explicit_marker(self.source, self.language, self.comment_magics)\n        ) or self.explicit_start_marker(source):\n            self.metadata[\"endofcell\"] = self.cell_marker_end or endofcell_marker(source, self.comment)\n\n        if not self.metadata or not self.use_cell_markers:\n            return source\n\n        lines = []\n        endofcell = self.metadata[\"endofcell\"]\n        if endofcell == \"-\" or self.cell_marker_end:\n            del self.metadata[\"endofcell\"]\n\n        cell_start = [self.comment, self.cell_marker_start or \"+\"]\n        options = metadata_to_double_percent_options(self.metadata, self.cell_metadata_json)\n        if options:\n            cell_start.append(options)\n        lines.append(\" \".join(cell_start))\n        lines.extend(source)\n        lines.append(self.comment + f\" {endofcell}\")\n        return lines\n\n    def explicit_start_marker(self, source):\n        \"\"\"Does the python representation of this cell requires an explicit\n        start of cell marker?\"\"\"\n        if not self.use_cell_markers:\n            return False\n        if self.metadata:\n            return True\n        if self.cell_marker_start:\n            start_code_re = re.compile(\"^\" + self.comment + r\"\\s*\" + self.cell_marker_start + r\"\\s*(.*)$\")\n            end_code_re = re.compile(\"^\" + self.comment + r\"\\s*\" + self.cell_marker_end + r\"\\s*$\")\n            if start_code_re.match(source[0]) or end_code_re.match(source[0]):\n                return False\n\n        if all([line.startswith(self.comment) for line in self.source]):\n            return True\n        if LightScriptCellReader(self.fmt).read(source)[1] < len(source):\n            return True\n\n        return False\n\n    def remove_eoc_marker(self, text, next_text):\n        \"\"\"Remove end of cell marker when next cell has an explicit start marker\"\"\"\n        if self.cell_marker_start:\n            return text\n\n        if self.is_code() and text[-1] == self.comment + \" -\":\n            # remove end of cell marker when redundant with next explicit marker\n            if not next_text or next_text[0].startswith(self.comment + \" +\"):\n                text = text[:-1]\n                # When we do not need the end of cell marker, number of blank lines is the max\n                # between that required at the end of the cell, and that required before the next cell.\n                if self.lines_to_end_of_cell_marker and (\n                    self.lines_to_next_cell is None or self.lines_to_end_of_cell_marker > self.lines_to_next_cell\n                ):\n                    self.lines_to_next_cell = self.lines_to_end_of_cell_marker\n            else:\n                # Insert blank lines at the end of the cell\n                blank_lines = self.lines_to_end_of_cell_marker\n                if blank_lines is None:\n                    # two blank lines when required by pep8\n                    blank_lines = pep8_lines_between_cells(text[:-1], next_text, self.ext)\n                    blank_lines = 0 if blank_lines < 2 else 2\n                text = text[:-1] + [\"\"] * blank_lines + text[-1:]\n\n        return text\n\n\nclass BareScriptCellExporter(LightScriptCellExporter):\n    \"\"\"A class that writes notebook cells as scripts with no cell markers\"\"\"\n\n    use_cell_markers = False\n\n\nclass RScriptCellExporter(BaseCellExporter):\n    \"\"\"A class that can represent a notebook cell as a R script\"\"\"\n\n    default_comment_magics = True\n\n    def __init__(self, *args, **kwargs):\n        BaseCellExporter.__init__(self, *args, **kwargs)\n        self.comment = \"#'\"\n\n    def code_to_text(self):\n        \"\"\"Return the text representation of a code cell\"\"\"\n        active = is_active(self.ext, self.metadata)\n        source = copy(self.source)\n        escape_code_start(source, self.ext, self.language)\n\n        if active:\n            comment_magic(source, self.language, self.comment_magics)\n\n        if not active:\n            source = [\"# \" + line if line else \"#\" for line in source]\n\n        lines = []\n        if not is_active(self.ext, self.metadata):\n            self.metadata[\"eval\"] = False\n        options = metadata_to_rmd_options(None, self.metadata, self.use_runtools)\n        if options:\n            lines.append(f\"#+ {options}\")\n        lines.extend(source)\n        return lines\n\n\nclass DoublePercentCellExporter(BaseCellExporter):  # pylint: disable=W0223\n    \"\"\"A class that can represent a notebook cell as a Spyder/VScode script (#59)\"\"\"\n\n    default_comment_magics = True\n    parse_cell_language = True\n\n    def __init__(self, *args, **kwargs):\n        BaseCellExporter.__init__(self, *args, **kwargs)\n        self.cell_markers = self.fmt.get(\"cell_markers\")\n\n    def cell_to_text(self):\n        \"\"\"Return the text representation for the cell\"\"\"\n        # Go notebooks have '%%' or '%% -' magic commands that need to be escaped\n        if self.default_language == \"go\" and self.language == \"go\":\n            self.source = [re.sub(r\"^(//\\s*)*(%%\\s*$|%%\\s+-.*$)\", r\"\\1//gonb:\\2\", line) for line in self.source]\n\n        active = is_active(self.ext, self.metadata, same_language(self.language, self.default_language))\n        if self.cell_type == \"raw\" and \"active\" in self.metadata and self.metadata[\"active\"] == \"\":\n            del self.metadata[\"active\"]\n\n        if not self.is_code():\n            self.metadata[\"cell_type\"] = self.cell_type\n\n        options = metadata_to_double_percent_options(self.metadata, self.cell_metadata_json)\n        indent = \"\"\n        if self.is_code() and active and self.source:\n            first_line = self.source[0]\n            if first_line.strip():\n                left_space = re.compile(r\"^(\\s*)\").match(first_line)\n                if left_space:\n                    indent = left_space.groups()[0]\n\n        if options.startswith(\"%\") or not options:\n            lines = comment_lines([\"%%\" + options], indent + self.comment, self.comment_suffix)\n        else:\n            lines = comment_lines([\"%% \" + options], indent + self.comment, self.comment_suffix)\n\n        if self.is_code() and active:\n            source = copy(self.source)\n            comment_magic(source, self.language, self.comment_magics)\n            if source == [\"\"]:\n                return lines\n            return lines + source\n\n        return lines + self.markdown_to_text(self.source)\n\n\nclass HydrogenCellExporter(DoublePercentCellExporter):  # pylint: disable=W0223\n    \"\"\"A class that can represent a notebook cell as a Hydrogen script (#59)\"\"\"\n\n    default_comment_magics = False\n    parse_cell_language = False\n\n\nclass SphinxGalleryCellExporter(BaseCellExporter):  # pylint: disable=W0223\n    \"\"\"A class that can represent a notebook cell as a\n    Sphinx Gallery script (#80)\"\"\"\n\n    default_cell_marker = \"#\" * 79\n    default_comment_magics = True\n\n    def __init__(self, *args, **kwargs):\n        BaseCellExporter.__init__(self, *args, **kwargs)\n        self.comment = \"#\"\n\n        for key in [\"cell_marker\"]:\n            if key in self.unfiltered_metadata:\n                self.metadata[key] = self.unfiltered_metadata[key]\n\n        if self.fmt.get(\"rst2md\"):\n            raise ValueError(\n                \"The 'rst2md' option is a read only option. The reverse conversion is not \"\n                \"implemented. Please either deactivate the option, or save to another format.\"\n            )  # pragma: no cover\n\n    def cell_to_text(self):\n        \"\"\"Return the text representation for the cell\"\"\"\n        if self.cell_type == \"code\":\n            source = copy(self.source)\n            return comment_magic(source, self.language, self.comment_magics)\n\n        if \"cell_marker\" in self.metadata:\n            cell_marker = self.metadata.pop(\"cell_marker\")\n        else:\n            cell_marker = self.default_cell_marker\n\n        if self.source == [\"\"]:\n            return [cell_marker] if cell_marker in ['\"\"', \"''\"] else ['\"\"']\n\n        if cell_marker in ['\"\"\"', \"'''\"]:\n            return [cell_marker] + self.source + [cell_marker]\n\n        return [(cell_marker if cell_marker.startswith(\"#\" * 20) else self.default_cell_marker)] + comment_lines(\n            self.source, self.comment, self.comment_suffix\n        )\n"
  },
  {
    "path": "src/jupytext/cli.py",
    "content": "\"\"\"`jupytext` as a command line tool\"\"\"\n\nimport argparse\nimport glob\nimport json\nimport os\nimport re\nimport shlex\nimport subprocess\nimport sys\nimport warnings\nfrom copy import copy\nfrom tempfile import NamedTemporaryFile\nfrom typing import Optional\n\nfrom .combine import combine_inputs_with_outputs\nfrom .compare import NotebookDifference, compare, test_round_trip_conversion\nfrom .config import load_jupytext_config, notebook_formats\nfrom .formats import (\n    _BINARY_FORMAT_OPTIONS,\n    _VALID_FORMAT_OPTIONS,\n    JUPYTEXT_FORMATS,\n    NOTEBOOK_EXTENSIONS,\n    check_auto_ext,\n    check_file_version,\n    long_form_multiple_formats,\n    long_form_one_format,\n    short_form_one_format,\n)\nfrom .header import recursive_update\nfrom .jupytext import (\n    create_prefix_dir,\n    get_formats_from_notebook_path,\n    read,\n    reads,\n    write,\n    writes,\n)\nfrom .kernels import find_kernel_specs, get_kernel_spec, kernelspec_from_language\nfrom .languages import _SCRIPT_EXTENSIONS\nfrom .paired_paths import (\n    InconsistentPath,\n    base_path,\n    find_base_path_and_format,\n    full_path,\n    paired_paths,\n)\nfrom .pairs import latest_inputs_and_outputs\nfrom .sync_pairs import read_pair, write_pair\nfrom .version import __version__\n\n\ndef system(*args, **kwargs):\n    \"\"\"Execute the given bash command\"\"\"\n    kwargs.setdefault(\"stdout\", subprocess.PIPE)\n    proc = subprocess.Popen(args, **kwargs)\n    out, _ = proc.communicate()\n    if proc.returncode:\n        raise SystemExit(proc.returncode)\n    return out.decode(\"utf-8\")\n\n\ndef tool_version(tool):\n    try:\n        args = tool.split(\" \")\n        args.append(\"--version\")\n        return system(*args)\n    except (OSError, SystemExit):  # pragma: no cover\n        return None\n\n\ndef str2bool(value):\n    \"\"\"Parse Yes/No/Default string\n    https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse\"\"\"\n    if value.lower() in (\"yes\", \"true\", \"t\", \"y\", \"1\"):\n        return True\n    if value.lower() in (\"no\", \"false\", \"f\", \"n\", \"0\"):\n        return False\n    if value.lower() in (\"d\", \"default\", \"\"):\n        return None\n    raise argparse.ArgumentTypeError(\"Expected: (Y)es/(T)rue/(N)o/(F)alse/(D)efault\")\n\n\ndef parse_jupytext_args(args=None):\n    \"\"\"Command line parser for jupytext\"\"\"\n\n    parser = argparse.ArgumentParser(\n        description=\"Jupyter Notebooks as Markdown Documents, Julia, Python or R Scripts\",\n        formatter_class=argparse.ArgumentDefaultsHelpFormatter,\n    )\n\n    # Input\n    parser.add_argument(\n        \"notebooks\",\n        help=\"One or more notebook(s). Notebook is read from stdin when this argument is empty.\",\n        nargs=\"*\",\n    )\n    parser.add_argument(\n        \"--from\",\n        dest=\"input_format\",\n        help=\"Jupytext format for the input(s). Inferred from the file extension and content when missing.\",\n    )\n    # Destination format & act on metadata\n\n    selected_file_extensions = [\"md\", \"Rmd\", \"jl\", \"py\", \"R\"]\n    parser.add_argument(\n        \"--to\",\n        dest=\"output_format\",\n        help=(\n            \"The destination format: 'ipynb', 'markdown' or 'script', or a file extension: \"\n            \"'{}', ... or 'auto' (script extension matching the notebook language), \"\n            \"or a combination of an extension and a format name, e.g. {} \".format(\n                \"', '\".join(selected_file_extensions),\n                \", \".join({f\"md:{fmt.format_name}\" for fmt in JUPYTEXT_FORMATS if fmt.extension == \".md\"}),\n            )\n            + \" or {}. \".format(\", \".join({f\"py:{fmt.format_name}\" for fmt in JUPYTEXT_FORMATS if fmt.extension == \".py\"}))\n            + \"The default format for scripts is the 'percent' format, \"\n            \"which uses '# %%%%' as cell markers and is compatible with VS Code and PyCharm. \"\n            \"Alternatively, you can also use the 'light' format, which uses fewer cell markers. \"\n            \"The main formats (MyST Markdown, Markdown, percent, light) preserve \"\n            \"notebooks and text documents in a roundtrip. Use the \"\n            \"--test and and --test-strict commands to test the roundtrip on your files. \"\n            \"Read more about the available formats at \"\n            \"https://jupytext.readthedocs.io/en/latest/formats.html. \"\n            \"NB: in addition to the extensions listed above, you can also use these: '{}'\".format(\n                \"', '\".join(\n                    sorted(\n                        {ext.removeprefix(\".\") for ext in NOTEBOOK_EXTENSIONS}\n                        - set(selected_file_extensions + [\"auto\", \"ipynb\"])\n                    )\n                )\n            )\n        ),\n    )\n\n    # Destination file\n    parser.add_argument(\n        \"-o\",\n        \"--output\",\n        help=\"Destination file. Defaults to the original file, \"\n        \"with prefix/suffix/extension changed according to \"\n        \"the destination format. \"\n        \"Use '-' to print the notebook on stdout.\",\n    )\n    parser.add_argument(\n        \"--update\",\n        action=\"store_true\",\n        help=\"Preserve the output cells when the destination notebook is an .ipynb file that already exists\",\n    )\n\n    parser.add_argument(\n        \"--set-formats\",\n        type=str,\n        help=\"Turn the notebook or text document to one or more alternative representations \"\n        \"with e.g. '--set-formats ipynb,py:light'. \"\n        \"The --set-formats option also triggers the creation/update of all paired files\",\n    )\n\n    # Action: convert(default)/version/list paired paths/sync/apply/test\n    action = parser.add_mutually_exclusive_group()\n    action.add_argument(\n        \"--sync\",\n        \"-s\",\n        help=\"Synchronize the content of the paired representations of \"\n        \"the given notebook. Input cells are taken from the file that \"\n        \"was last modified, and outputs are read from the ipynb file, \"\n        \"if present.\",\n        action=\"store_true\",\n    )\n    action.add_argument(\n        \"--paired-paths\",\n        \"-p\",\n        help=\"List the locations of the alternative representations for this notebook.\",\n        action=\"store_true\",\n    )\n    parser.add_argument(\n        \"--format-options\",\n        \"--opt\",\n        action=\"append\",\n        help=\"Set format options with e.g. '--opt comment_magics=true' or '--opt notebook_metadata_filter=-kernelspec'.\",\n    )\n    parser.add_argument(\n        \"--update-metadata\",\n        default={},\n        type=json.loads,\n        help=\"Update the notebook metadata with the desired dictionary. \"\n        \"Argument must be given in JSON format. For instance, if you \"\n        \"want to activate a pairing in the generated file, use e.g. \"\n        \"\"\"--update-metadata '{\"jupytext\":{\"formats\":\"ipynb,py:light\"}}' \"\"\"\n        \"See also the --opt and --set-formats options for other ways \"\n        \"to operate on the Jupytext metadata.\",\n    )\n    parser.add_argument(\n        \"--use-source-timestamp\",\n        help=\"Set the modification timestamp of the output file(s) equal\"\n        \"to that of the source file, and keep the source file and \"\n        \"its timestamp unchanged.\",\n        action=\"store_true\",\n    )\n    parser.add_argument(\n        \"--check-source-is-newer\",\n        help=\"Check that the file given as argument is the most recent of all paired files, and \"\n        \"if applicable, checks that it is newer than the destination file.\",\n        action=\"store_true\",\n    )\n    parser.add_argument(\n        \"--warn-only\",\n        \"-w\",\n        action=\"store_true\",\n        help=\"Only issue a warning and continue processing other notebooks when the conversion of a given notebook fails\",\n    )\n    action.add_argument(\n        \"--test\",\n        action=\"store_true\",\n        help=\"Test that the notebook is stable under a round trip conversion, up to the expected changes\",\n    )\n    action.add_argument(\n        \"--test-strict\",\n        action=\"store_true\",\n        help=\"Test that the notebook is strictly stable under a round trip conversion\",\n    )\n    parser.add_argument(\n        \"--stop\",\n        \"-x\",\n        dest=\"stop_on_first_error\",\n        action=\"store_true\",\n        help=\"In --test mode, stop on first round trip conversion error, and report stack traceback\",\n    )\n\n    # Pipe notebook inputs into other commands\n    parser.add_argument(\n        \"--pipe\",\n        action=\"append\",\n        help=\"Pipe the text representation (in format --pipe-fmt) of the notebook into \"\n        \"another program, and read the notebook back. For instance, reformat \"\n        \"your notebook with: \"\n        \"'jupytext notebook.ipynb --pipe black' \"\n        \"If you want to reformat it and sync the paired representation, execute: \"\n        \"'jupytext notebook.ipynb --sync --pipe black' \"\n        \"In case the program that you want to execute does not accept pipes, use {} \"\n        \"as a placeholder for a temporary file name into which jupytext will \"\n        \"write the text representation of the notebook, e.g.: \"\n        \"jupytext notebook.ipynb --pipe 'black {}'\",\n    )\n    parser.add_argument(\n        \"--diff\",\n        \"-d\",\n        action=\"store_true\",\n        help=\"Show the differences between (the inputs) of two notebooks\",\n    )\n    parser.add_argument(\n        \"--diff-format\",\n        help=\"The text format used to show differences in --diff\",\n    )\n    parser.add_argument(\n        \"--check\",\n        action=\"append\",\n        help=\"Pipe the text representation (in format --pipe-fmt) of the notebook into \"\n        \"another program, and test that the returned value is non zero. For \"\n        \"instance, test that your notebook is pep8 compliant with: \"\n        \"'jupytext notebook.ipynb --check flake8' \"\n        \"or run pytest on your notebook with: \"\n        \"'jupytext notebook.ipynb --check pytest' \"\n        \"In case the program that you want to execute does not accept pipes, use {} \"\n        \"as a placeholder for a temporary file name into which jupytext will \"\n        \"write the text representation of the notebook, e.g.: \"\n        \"jupytext notebook.ipynb --check 'pytest {}'\",\n    )\n    parser.add_argument(\n        \"--pipe-fmt\",\n        default=\"auto:percent\",\n        help=\"The format in which the notebook should be piped to other programs, \"\n        \"when using the --pipe and/or --check commands.\",\n    )\n\n    # Execute the notebook\n    parser.add_argument(\n        \"--set-kernel\",\n        \"-k\",\n        type=str,\n        help=\"Set the kernel with the given name on the notebook. \"\n        \"Use '--set-kernel -' to set a kernel matching the current \"\n        \"environment on Python notebooks, and matching the notebook \"\n        \"language otherwise (get the list of available kernels with \"\n        \"'jupyter kernelspec list')\",\n    )\n    parser.add_argument(\n        \"--execute\",\n        action=\"store_true\",\n        help=\"Execute the notebook with the given kernel. In the \"\n        \"--pre-commit-mode, the notebook is executed only if a code \"\n        \"cell changed, or if some execution outputs are missing \"\n        \"or not ordered.\",\n    )\n    parser.add_argument(\n        \"--run-path\",\n        type=str,\n        help=\"Execute the notebook at the given path (defaults to the notebook parent directory)\",\n    )\n\n    parser.add_argument(\n        \"--quiet\",\n        \"-q\",\n        action=\"store_true\",\n        help=\"Quiet mode: do not comment about files being updated or created\",\n    )\n    parser.add_argument(\n        \"--show-changes\",\n        action=\"store_true\",\n        help=\"Display the diff for each output file\",\n    )\n\n    action.add_argument(\n        \"--version\",\n        \"-v\",\n        action=\"store_true\",\n        help=\"Show jupytext's version number and exit\",\n    )\n\n    parser.add_argument(\n        \"--pre-commit\",\n        action=\"store_true\",\n        help=\"Ignore the notebook argument, and instead apply Jupytext \"\n        \"on the notebooks found in the git index, which have an \"\n        \"extension that matches the (optional) --from argument.\",\n    )\n    parser.add_argument(\n        \"--pre-commit-mode\",\n        action=\"store_true\",\n        help=\"This is a mode that is compatible with the pre-commit framework. \"\n        \"In this mode, --sync won't use timestamp but instead will \"\n        \"determines the source notebook as the element of the pair \"\n        \"that is added to the git index. An alert is raised if multiple inconsistent representations are \"\n        \"in the index. It also raises an alert after updating the paired files or outputs if those \"\n        \"files need to be added to the index. Finally, filepaths that aren't in the source format \"\n        \"you are trying to convert from are ignored.\",\n    )\n\n    return parser.parse_args(args)\n\n\ndef jupytext(args=None):\n    \"\"\"Entry point for the jupytext script\"\"\"\n    args = parse_jupytext_args(args)\n\n    def log(text):\n        if not args.quiet:\n            sys.stdout.write(text + \"\\n\")\n\n    if args.version:\n        log(__version__)\n        return 0\n\n    if args.pre_commit:\n        warnings.warn(\n            \"The --pre-commit argument is deprecated. \"\n            \"Please consider switching to the pre-commit.com framework \"\n            \"(let us know at https://github.com/mwouts/jupytext/issues \"\n            \"if that is an issue for you)\",\n            DeprecationWarning,\n        )\n        if args.notebooks:\n            raise ValueError(\"--pre-commit takes notebooks from the git index. Do not pass any notebook here.\")\n        args.notebooks = notebooks_in_git_index(args.input_format)\n        log(\"[jupytext] Notebooks in git index are:\")\n        for nb_file in args.notebooks:\n            log(nb_file)\n\n    # Read notebook from stdin\n    if not args.notebooks:\n        if not args.pre_commit:\n            args.notebooks = [\"-\"]\n\n    if args.set_formats is not None:\n        # Replace empty string with None\n        args.update_metadata = recursive_update(args.update_metadata, {\"jupytext\": {\"formats\": args.set_formats or None}})\n        args.sync = True\n\n    if args.paired_paths:\n        if len(args.notebooks) != 1:\n            raise ValueError(\"--paired-paths applies to a single notebook\")\n        print_paired_paths(args.notebooks[0], args.input_format)\n        return 1\n\n    if args.run_path:\n        args.execute = True\n\n    if (args.test or args.test_strict) and not args.output_format and not args.output and not args.sync:\n        raise ValueError(\"Please provide one of --to, --output or --sync\")\n\n    if (\n        not args.output_format\n        and not args.output\n        and not args.sync\n        and not args.pipe\n        and not args.diff\n        and not args.check\n        and not args.update_metadata\n        and not args.format_options\n        and not args.set_kernel\n        and not args.execute\n    ):\n        raise ValueError(\n            \"Please provide one of --to, --output, --set-formats, --sync, --pipe, --diff, \"\n            \"--check, --update-metadata, --format-options, --set-kernel or --execute\"\n        )\n\n    if args.diff:\n        if (\n            len(args.notebooks) != 2\n            or args.output_format\n            or args.output\n            or args.sync\n            or args.pipe\n            or args.check\n            or args.update_metadata\n            or args.format_options\n            or args.set_kernel\n            or args.execute\n        ):\n            raise ValueError(\n                \"Please provide two notebooks after 'jupytext --diff'.\\n\"\n                \"NB: Use --show-changes if you wish to see the changes in \"\n                \"a notebook being updated by Jupytext.\"\n            )\n\n        nb_file1, nb_file2 = args.notebooks\n        nb1 = read(nb_file1)\n        nb2 = read(nb_file2)\n\n        def fmt_if_not_ipynb(nb):\n            fmt = nb.metadata[\"jupytext\"][\"text_representation\"]\n            if fmt[\"extension\"] == \".ipynb\":\n                return None\n            return short_form_one_format(fmt)\n\n        diff_fmt = args.diff_format or fmt_if_not_ipynb(nb1) or fmt_if_not_ipynb(nb2) or \"md\"\n\n        diff = compare(\n            writes(nb2, diff_fmt),\n            writes(nb1, diff_fmt),\n            nb_file2,\n            nb_file1,\n            return_diff=True,\n        )\n        sys.stdout.write(diff)\n\n        return\n\n    if args.output and len(args.notebooks) != 1:\n        raise ValueError(\"Please input a single notebook when using --output\")\n\n    # Warn if '--to' is used in place of '--output'\n    if (\n        not args.output\n        and args.output_format\n        and \".\" in args.output_format\n        # a suffix is expected to start with one of these characters #901\n        and not args.output_format.startswith((\".\", \"-\", \"_\"))\n        and \"//\" not in args.output_format\n    ):\n\n        def single_line(msg, *args, **kwargs):\n            return f\"[warning] {msg}\\n\"\n\n        warnings.formatwarning = single_line\n        warnings.warn(\n            \"You might have passed a file name to the '--to' option, \"\n            \"when a format description was expected. Maybe you want to use the '-o' option instead?\"\n        )\n\n    if args.input_format:\n        args.input_format = long_form_one_format(args.input_format)\n\n    if args.output_format:\n        args.output_format = long_form_one_format(args.output_format)\n        set_format_options(args.output_format, args.format_options)\n\n    # Wildcard extension on Windows #202\n    notebooks = []\n    for pattern in args.notebooks:\n        if \"*\" in pattern or \"?\" in pattern:\n            # Exclude the .jupytext.py configuration file\n            notebooks.extend(glob.glob(pattern, recursive=True))\n        else:\n            notebooks.append(pattern)\n\n    # Count how many files have round-trip issues when testing\n    exit_code = 0\n    for nb_file in notebooks:\n        if not args.warn_only:\n            exit_code += jupytext_single_file(nb_file, args, log)\n        else:\n            try:\n                exit_code += jupytext_single_file(nb_file, args, log)\n            except Exception as err:\n                sys.stderr.write(f\"[jupytext] Error: {str(err)}\\n\")\n\n    return exit_code\n\n\ndef jupytext_single_file(nb_file, args, log):\n    \"\"\"Apply the jupytext command, with given arguments, to a single file\"\"\"\n    if nb_file == \"-\" and args.sync:\n        msg = \"Missing notebook path.\"\n        if args.set_formats is not None and os.path.isfile(args.set_formats):\n            msg += f\" Did you mean 'jupytext --sync {args.set_formats}' ?\"\n        raise ValueError(msg)\n\n    nb_dest = None\n    if args.output:\n        nb_dest = args.output\n    elif nb_file == \"-\":\n        nb_dest = \"-\"\n    else:\n        try:\n            bp = base_path(nb_file, args.input_format)\n        except InconsistentPath:\n            if args.pre_commit_mode:\n                log(\n                    \"[jupytext] Ignoring unmatched input path {}{}\".format(\n                        nb_file,\n                        f\" for format {args.input_format}\" if args.input_format else \"\",\n                    )\n                )\n                return 0\n            raise\n        if args.output_format:\n            nb_dest = full_path(bp, args.output_format)\n\n    config = load_jupytext_config(os.path.abspath(nb_file))\n\n    # Just acting on metadata / pipe => save in place\n    save_in_place = not nb_dest and not args.sync\n    if save_in_place:\n        nb_dest = nb_file\n\n    if nb_dest == \"-\":\n        args.quiet = True\n\n    # I. ### Read the notebook ###\n    fmt = copy(args.input_format) or {}\n    if not fmt:\n        ext = os.path.splitext(nb_file)[1]\n        if ext:\n            fmt = {\"extension\": ext}\n    if fmt:\n        set_format_options(fmt, args.format_options)\n    log(\n        \"[jupytext] Reading {}{}\".format(\n            nb_file if nb_file != \"-\" else \"stdin\",\n            f\" in format {short_form_one_format(fmt)}\" if \"extension\" in fmt else \"\",\n        )\n    )\n\n    timestamp_checker = TimestampChecker(pre_commit_mode=args.pre_commit_mode)\n    timestamp_checker.get_and_check_timestamp(nb_file)\n    notebook = read(nb_file, fmt=fmt, config=config)\n    if \"extension\" in fmt and \"format_name\" not in fmt:\n        text_representation = notebook.metadata.get(\"jupytext\", {}).get(\"text_representation\", {})\n        if text_representation.get(\"extension\") == fmt[\"extension\"]:\n            fmt[\"format_name\"] = text_representation[\"format_name\"]\n\n    # Compute actual extension when using script/auto, and update nb_dest if necessary\n    dest_fmt = args.output_format\n    if dest_fmt and dest_fmt[\"extension\"] == \".auto\":\n        dest_fmt = check_auto_ext(dest_fmt, notebook.metadata, \"--to\")\n        if not args.output and nb_file != \"-\":\n            nb_dest = full_path(base_path(nb_file, args.input_format), dest_fmt)\n\n    # Set the kernel\n    set_kernel = args.set_kernel\n    if (not set_kernel) and args.execute and notebook.metadata.get(\"kernelspec\", {}).get(\"name\") is None:\n        set_kernel = \"-\"\n\n    if set_kernel:\n        if set_kernel == \"-\":\n            language = (\n                notebook.metadata.get(\"jupytext\", {}).get(\"main_language\") or notebook.metadata[\"kernelspec\"][\"language\"]\n            )\n\n            if not language:\n                raise ValueError(\"Cannot infer a kernel as notebook language is not defined\")\n\n            kernelspec = kernelspec_from_language(language)\n        else:\n            try:\n                kernelspec = get_kernel_spec(set_kernel)\n            except KeyError as err:\n                raise KeyError(f\"Please choose a kernel name among {find_kernel_specs().keys()}\") from err\n\n            kernelspec = {\n                \"name\": args.set_kernel,\n                \"language\": kernelspec.language,\n                \"display_name\": kernelspec.display_name,\n            }\n\n        log(\"[jupytext] Setting kernel {}\".format(kernelspec.get(\"name\")))\n        args.update_metadata[\"kernelspec\"] = kernelspec\n\n    # Read paired notebooks\n    nb_files = [nb_file, nb_dest]\n    if args.sync:\n        # If we are also setting the formats, we take the information\n        # from the --set-formats option\n        if args.set_formats is not None:\n            formats = long_form_multiple_formats(args.set_formats)\n        else:\n            formats = notebook_formats(notebook, config, nb_file, fallback_on_current_fmt=False)\n        set_prefix_and_suffix(fmt, formats, nb_file)\n        try:\n            notebook, inputs_nb_file, outputs_nb_file = load_paired_notebook(\n                notebook, fmt, config, formats, nb_file, log, args.pre_commit_mode, timestamp_checker\n            )\n            nb_files = [inputs_nb_file, outputs_nb_file]\n        except NotAPairedNotebook as err:\n            sys.stderr.write(\"[jupytext] Warning: \" + str(err) + \"\\n\")\n            return 0\n        except InconsistentVersions as err:\n            sys.stderr.write(\"[jupytext] Error: \" + str(err) + \"\\n\")\n            return 1\n\n    # Are we updating a text file that has a metadata filter? #212\n    if args.update_metadata or args.format_options:\n        if notebook.metadata.get(\"jupytext\", {}).get(\"notebook_metadata_filter\") == \"-all\":\n            notebook.metadata.get(\"jupytext\", {}).pop(\"notebook_metadata_filter\")\n\n    # Update the metadata\n    if args.update_metadata:\n        log(f\"[jupytext] Updating notebook metadata with '{json.dumps(args.update_metadata)}'\")\n\n        if \"kernelspec\" in args.update_metadata and \"main_language\" in notebook.metadata.get(\"jupytext\", {}):\n            notebook.metadata[\"jupytext\"].pop(\"main_language\")\n\n        recursive_update(notebook.metadata, args.update_metadata)\n\n    # II. ### Apply commands onto the notebook ###\n    # Pipe the notebook into the desired commands\n    if nb_file == \"-\":\n        prefix = None\n        directory = None\n    else:\n        prefix = os.path.splitext(os.path.basename(nb_file))[0]\n        directory = os.path.dirname(nb_file)\n    for cmd in args.pipe or []:\n        notebook = pipe_notebook(\n            notebook,\n            cmd,\n            args.pipe_fmt,\n            quiet=args.quiet,\n            prefix=prefix,\n            directory=directory,\n            warn_only=args.warn_only,\n        )\n\n    # and/or test the desired commands onto the notebook\n    for cmd in args.check or []:\n        pipe_notebook(\n            notebook,\n            cmd,\n            args.pipe_fmt,\n            update=False,\n            quiet=args.quiet,\n            prefix=prefix,\n            directory=directory,\n            warn_only=args.warn_only,\n        )\n\n    if (\n        args.execute\n        and args.pre_commit_mode\n        and execution_counts_are_in_order(notebook)\n        and not code_cells_have_changed(notebook, nb_files)\n    ):\n        log(f\"[jupytext] Execution of {shlex.quote(nb_file)} skipped as code cells have not changed and outputs are present.\")\n        args.execute = False\n\n    # Execute the notebook\n    if args.execute:\n        kernel_name = notebook.metadata.get(\"kernelspec\", {}).get(\"name\")\n        log(f\"[jupytext] Executing notebook with kernel {kernel_name}\")\n\n        if nb_dest is not None and nb_dest != \"-\":\n            nb_path = os.path.dirname(nb_dest)\n        elif nb_file != \"-\":\n            nb_path = os.path.dirname(nb_file)\n        else:\n            nb_path = None\n\n        run_path = args.run_path or nb_path\n        if args.run_path and not os.path.isdir(run_path):\n            # is this a relative directory?\n            for base_dir in [nb_path, os.getcwd()]:\n                try_path = os.path.join(base_dir, run_path)\n                if os.path.isdir(try_path):\n                    run_path = try_path\n                    break\n            if not os.path.isdir(run_path):\n                raise ValueError(f\"--run-path={args.run_path} is not a valid path\")\n\n        if run_path:\n            resources = {\"metadata\": {\"path\": run_path}}\n        else:\n            resources = {}\n\n        try:\n            from nbconvert.preprocessors import ExecutePreprocessor\n\n            exec_proc = ExecutePreprocessor(timeout=None, kernel_name=kernel_name)\n            exec_proc.preprocess(notebook, resources=resources)\n        except (ImportError, RuntimeError) as err:\n            if args.pre_commit_mode:\n                raise RuntimeError(\n                    \"An error occurred while executing the notebook. Please \"\n                    \"make sure that you have listed 'nbconvert' and 'ipykernel' \"\n                    \"under 'additional_dependencies' in the jupytext hook.\"\n                ) from err\n            raise RuntimeError(\n                \"An error occurred while executing the notebook. Please \"\n                \"make sure that 'nbconvert' and 'ipykernel' are installed.\"\n            ) from err\n\n    # III. ### Possible actions ###\n    # a. Test round trip conversion\n    if args.test or args.test_strict:\n        try:\n            # Round trip from an ipynb document\n            if fmt[\"extension\"] == \".ipynb\":\n                test_round_trip_conversion(\n                    notebook,\n                    dest_fmt,\n                    update=args.update,\n                    allow_expected_differences=not args.test_strict,\n                    stop_on_first_error=args.stop_on_first_error,\n                )\n\n            # Round trip from a text file\n            else:\n                # We read the original text from disk a second time\n                with open(nb_file, encoding=\"utf-8\") as fp:\n                    org_text = fp.read()\n\n                # We also make sure that the text file\n                # has not changed since we first read it!\n                timestamp_checker.check_timestamp(nb_file)\n\n                # If the destination is not ipynb, we convert to/back that format\n                if dest_fmt[\"extension\"] != \".ipynb\":\n                    dest_text = writes(notebook, fmt=dest_fmt)\n                    notebook = reads(dest_text, fmt=dest_fmt)\n\n                text = writes(notebook, fmt=fmt, config=config)\n\n                if args.test_strict:\n                    compare(text, org_text)\n                else:\n                    # we ignore the YAML header in the comparison #414\n                    comment = _SCRIPT_EXTENSIONS.get(fmt[\"extension\"], {}).get(\"comment\", \"\")\n                    # white spaces between the comment char and the YAML delimiters are allowed\n                    if comment:\n                        comment = comment + r\"\\s*\"\n                    yaml_header = re.compile(\n                        r\"^{comment}---\\s*\\n.*\\n{comment}---\\s*\\n\".format(comment=comment),\n                        re.MULTILINE | re.DOTALL,\n                    )\n                    compare(re.sub(yaml_header, \"\", text), re.sub(yaml_header, \"\", org_text))\n\n        except (NotebookDifference, AssertionError) as err:\n            sys.stdout.write(f\"{nb_file}: {str(err)}\")\n            return 1\n        return 0\n\n    # b. Output to the desired file or format\n    untracked_files = 0\n\n    def lazy_write(\n        path,\n        fmt=None,\n        action=None,\n        update_timestamp_only=False,\n        force_update_timestamp=False,\n    ):\n        \"\"\"Write the notebook only if it has changed\"\"\"\n        # Used in tests only\n        if _callback_on_lazy_write is not None:\n            _callback_on_lazy_write(path)\n        if path == \"-\":\n            timestamp_checker.check_all_timestamps()\n            write(notebook, \"-\", fmt=fmt)\n            return\n\n        nonlocal untracked_files\n        if update_timestamp_only:\n            modified = False\n        else:\n            _, ext = os.path.splitext(path)\n            fmt = copy(fmt or {})\n            fmt = long_form_one_format(fmt, update={\"extension\": ext})\n            new_content = writes(notebook, fmt=fmt, config=config)\n            diff = None\n            if not new_content.endswith(\"\\n\"):\n                new_content += \"\\n\"\n            if not os.path.isfile(path):\n                modified = True\n                diff = \"(file did not exist)\"\n            else:\n                # We load the current file from disk\n                # NB: in the --to mode, it might be the first\n                # time we actually read this file\n                timestamp_checker.get_and_check_timestamp(path)\n                with open(path, encoding=\"utf-8\") as fp:\n                    current_content = fp.read()\n\n                timestamp_checker.check_timestamp(path)\n\n                modified = new_content != current_content\n                if modified and args.show_changes:\n                    diff = compare(\n                        new_content,\n                        current_content,\n                        \"\",\n                        \"\",\n                        return_diff=True,\n                    )\n\n        tmp_path = path\n        if modified:\n            # The text representation of the notebook has changed, we write it on disk\n            create_prefix_dir(path, fmt)\n            # Create a temporary file in the same directory as path. Later on we will move\n            # that temporary file back to path (os.replace is atomic on most OS)\n            name, ext = os.path.splitext(path)\n            tmp_path = name + f\"_tmp_jupytext_{os.getpid()}\" + ext\n            with open(tmp_path, \"w\", encoding=\"utf-8\") as fp:\n                fp.write(new_content)\n\n        # We check that none of the input files changed while we were\n        # doing our processing. If they did, we abort as we would\n        # otherwise overwrite the modifications.\n        try:\n            timestamp_checker.check_all_timestamps()\n        except SynchronousModificationError:\n            if modified:\n                os.remove(tmp_path)\n            raise\n\n        # When the content is unchanged, we still need to update the timestamp of\n        # the text file to make sure they remain more recent than the ipynb file, for compatibility with the\n        # Jupytext contents manager for Jupyter\n        if args.use_source_timestamp:\n            if tmp_path != nb_file:\n                log(f\"[jupytext] Setting the timestamp of {shlex.quote(path)} equal to that of {shlex.quote(nb_file)}\")\n                os.utime(tmp_path, (os.stat(nb_file).st_atime, os.stat(nb_file).st_mtime))\n        elif not modified:\n            if path.endswith(\".ipynb\"):\n                # No need to update the timestamp of ipynb files\n                log(f\"[jupytext] Unchanged {shlex.quote(path)}\")\n            elif args.sync and not force_update_timestamp:\n                # if the content is unchanged (and matches ipynb), we don't need\n                # to update the timestamp as the contents manager will not throw in\n                # that case (see the try/catch on read_pair(... must_match=True))\n                log(f\"[jupytext] Unchanged {shlex.quote(path)}\")\n            else:\n                log(f\"[jupytext] Updating the timestamp of {shlex.quote(path)}\")\n                os.utime(path, None)\n\n        if modified:\n            if action is None:\n                message = f\"[jupytext] Updating {shlex.quote(path)}\"\n            else:\n                message = \"[jupytext] Writing {path}{format}{action}\".format(\n                    path=shlex.quote(path),\n                    format=(\" in format \" + short_form_one_format(fmt) if fmt and \"format_name\" in fmt else \"\"),\n                    action=action,\n                )\n            if args.show_changes:\n                message += \" with this change:\\n\" + diff\n\n            log(message)\n            os.replace(tmp_path, path)\n\n        # If we changed the file timestamp, we update our checker accordingly\n        if modified or args.use_source_timestamp or force_update_timestamp:\n            timestamp_checker.update_timestamp(path)\n\n        if args.pre_commit:\n            system(\"git\", \"add\", path)\n\n        if args.pre_commit_mode and is_untracked(path):\n            log(\n                f\"[jupytext] Error: the git index is outdated.\\n\"\n                f\"Please add the paired notebook with:\\n\"\n                f\"    git add {shlex.quote(path)}\"\n            )\n            untracked_files += 1\n\n        return {\"modified\": modified}\n\n    if nb_dest:\n        if args.check_source_is_newer:\n            ts_src = timestamp_checker.check_file_is_newest(nb_file)\n            ts_dest = timestamp_checker.get_and_check_timestamp(nb_dest)\n            if ts_dest is not None and ts_dest > ts_src:\n                raise ValueError(f\"Source {nb_file} is older than destination {nb_dest}\")\n\n        if nb_dest == nb_file and not dest_fmt:\n            dest_fmt = fmt\n\n        # Test consistency between dest name and output format\n        if dest_fmt and nb_dest != \"-\":\n            base_path(nb_dest, dest_fmt)\n\n        # Describe what jupytext is doing\n        if save_in_place:\n            action = \"\"\n        elif os.path.isfile(nb_dest) and args.update:\n            if not nb_dest.endswith(\".ipynb\"):\n                raise ValueError(\"--update is only for ipynb files\")\n            action = \" (destination file updated)\"\n            check_file_version(notebook, nb_file, nb_dest)\n            notebook = combine_inputs_with_outputs(notebook, read(nb_dest), fmt=fmt)\n        elif os.path.isfile(nb_dest):\n            suggest_update = \" [use --update to preserve cell outputs and ids]\" if nb_dest.endswith(\".ipynb\") else \"\"\n            action = f\" (destination file replaced{suggest_update})\"\n        else:\n            action = \"\"\n\n        formats = notebook.metadata.get(\"jupytext\", {}).get(\"formats\")\n        formats = long_form_multiple_formats(formats)\n        if formats:\n            try:\n                base_path_out, _ = find_base_path_and_format(nb_dest, formats)\n            except InconsistentPath:\n                # Drop 'formats' if the destination is not part of the paired notebooks\n                formats = {}\n                notebook.metadata.get(\"jupytext\", {}).pop(\"formats\")\n\n        lazy_write(nb_dest, fmt=dest_fmt, action=action)\n\n        nb_dest_in_pair = formats and any(\n            os.path.exists(alt_path) and os.path.samefile(nb_dest, alt_path)\n            for alt_path, _ in paired_paths(nb_file, fmt, formats)\n        )\n\n        if (\n            nb_dest_in_pair\n            and os.path.isfile(nb_file)\n            and not nb_file.endswith(\".ipynb\")\n            and os.path.isfile(nb_dest)\n            and nb_dest.endswith(\".ipynb\")\n        ):\n            # If the destination is an ipynb file and is in the pair, then we\n            # update the original text file timestamp, as required by our Content Manager\n            # Otherwise Jupyter will refuse to open the paired notebook #335\n            # NB: An alternative is --use-source-timestamp\n            lazy_write(nb_file, update_timestamp_only=True)\n\n    # c. Synchronize paired notebooks\n    elif args.sync:\n        if args.check_source_is_newer:\n            timestamp_checker.check_file_is_newest(nb_file)\n        write_pair(nb_file, formats, lazy_write)\n\n    return untracked_files\n\n\ndef notebooks_in_git_index(fmt):\n    \"\"\"Return the list of modified and deleted ipynb files in the git index that match the given format\"\"\"\n    git_status = system(\"git\", \"status\", \"--porcelain\")\n    re_modified = re.compile(r\"^[AM]+\\s+(?P<name>.*)\", re.MULTILINE)\n    modified_files_in_git_index = re_modified.findall(git_status)\n    files = []\n    for nb_file in modified_files_in_git_index:\n        if nb_file.startswith('\"') and nb_file.endswith('\"'):\n            nb_file = nb_file[1:-1]\n        try:\n            base_path(nb_file, fmt)\n            files.append(nb_file)\n        except InconsistentPath:\n            continue\n    return files\n\n\ndef is_untracked(filepath):\n    \"\"\"Check whether a file was created or modified and needs to be added to the git index\"\"\"\n    if not filepath:\n        return False\n\n    output = system(\"git\", \"ls-files\", filepath).strip()\n    if output == \"\":\n        return True\n\n    output = system(\"git\", \"diff\", filepath).strip()\n    if output != \"\":\n        return True\n\n    return False\n\n\ndef print_paired_paths(nb_file, fmt):\n    \"\"\"Display the paired paths for this notebook\"\"\"\n    formats = get_formats_from_notebook_path(nb_file, fmt)\n    if formats:\n        for path, _ in paired_paths(nb_file, fmt, formats):\n            if path != nb_file:\n                sys.stdout.write(path + \"\\n\")\n\n\ndef set_format_options(fmt, format_options):\n    \"\"\"Apply the desired format options to the format description fmt\"\"\"\n    if not format_options:\n        return\n\n    for opt in format_options:\n        try:\n            key, value = opt.split(\"=\")\n        except ValueError as err:\n            raise ValueError(f\"Format options are expected to be of the form key=value, not '{opt}'\") from err\n\n        if key not in _VALID_FORMAT_OPTIONS:\n            raise ValueError(\n                \"'{}' is not a valid format option. Expected one of '{}'\".format(key, \"', '\".join(_VALID_FORMAT_OPTIONS))\n            )\n\n        if key in _BINARY_FORMAT_OPTIONS:\n            value = str2bool(value)\n\n        fmt[key] = value\n\n\ndef set_prefix_and_suffix(fmt, formats, nb_file):\n    \"\"\"Add prefix and suffix information from jupytext.formats if format and path matches\"\"\"\n    for alt_fmt in long_form_multiple_formats(formats):\n        if alt_fmt[\"extension\"] == fmt[\"extension\"] and fmt.get(\"format_name\") == alt_fmt.get(\"format_name\"):\n            try:\n                base_path(nb_file, alt_fmt)\n                fmt.update(alt_fmt)\n                return\n            except InconsistentPath:\n                continue\n\n\nclass NotAPairedNotebook(ValueError):\n    \"\"\"An error raised when a notebook is not a paired notebook\"\"\"\n\n\nclass InconsistentVersions(ValueError):\n    \"\"\"An error raised when two paired files in the git index contain inconsistent representations\"\"\"\n\n\ndef file_in_git_index(path):\n    if not os.path.isfile(path):\n        return False\n    return system(\"git\", \"status\", \"--porcelain\", path).strip().startswith((\"M\", \"A\"))\n\n\ndef git_timestamp(path):\n    if not os.path.isfile(path):\n        return None\n\n    # Files that are in the git index are considered most recent\n    if file_in_git_index(path):\n        return float(\"inf\")\n\n    # Return the commit timestamp\n    try:\n        git_ts_str = system(\"git\", \"log\", \"-1\", \"--pretty=%ct\", \"--no-show-signature\", path).strip()\n    except SystemExit as err:\n        if err.code == 128:\n            # git not initialized\n            git_ts_str = \"\"\n        else:\n            raise\n\n    if git_ts_str:\n        return float(git_ts_str)\n\n    # The file is not in the git index\n    return get_timestamp(path)\n\n\ndef get_timestamp(path: str) -> Optional[float]:\n    if not os.path.isfile(path):\n        return None\n    return os.stat(path).st_mtime\n\n\nclass SynchronousModificationError(OSError):\n    \"\"\"An error raised when a file was modified while Jupytext was running\"\"\"\n\n\nclass TimestampChecker:\n    \"\"\"\n    This class keeps track of the timestamps of files that have been used by Jupytext\n    when loading a paired notebook. Either the timestamp of each file was consulted to\n    identify the most recent input file, or its content was read.\n    \"\"\"\n\n    def __init__(self, pre_commit_mode: bool = False):\n        self.pre_commit_mode = pre_commit_mode\n        self._timestamps: dict[str, Optional[float]] = {}\n\n    def get_and_check_timestamp(self, path: str) -> Optional[float]:\n        if path in self._timestamps:\n            ts = self.check_timestamp(path)\n        else:\n            ts = get_timestamp(path)\n            self._timestamps[path] = ts\n\n        if self.pre_commit_mode:\n            return git_timestamp(path)\n\n        return ts\n\n    def check_timestamp(self, path: str) -> Optional[float]:\n        if path not in self._timestamps:\n            raise ValueError(\n                f\"The timestamp of {shlex.quote(path)} was not previously recorded. So far Jupytext has only recorded timestamps for {', '.join(shlex.quote(p) for p in self._timestamps)}\"\n            )\n\n        ts = get_timestamp(path)\n        old_ts = self._timestamps[path]\n        if old_ts is None and ts is not None:\n            raise SynchronousModificationError(f\"The file {shlex.quote(path)} was created while Jupytext was running\")\n        if old_ts is not None and ts is None:\n            raise SynchronousModificationError(f\"The file {shlex.quote(path)} was deleted while Jupytext was running\")\n        if ts != old_ts:\n            raise SynchronousModificationError(f\"The file {shlex.quote(path)} was modified while Jupytext was running\")\n\n        return ts\n\n    def update_timestamp(self, path: str):\n        ts = get_timestamp(path)\n        if ts is None:\n            raise FileNotFoundError(f\"The file {shlex.quote(path)} does not exist\")\n        self._timestamps[path] = ts\n\n    def check_all_timestamps(self):\n        for path in self._timestamps:\n            self.check_timestamp(path)\n\n    def check_file_is_newest(self, path: str) -> Optional[float]:\n        \"\"\"Check that the given file is the most recent among all files whose timestamp\n        was recorded by this TimestampChecker. Return its timestamp.\"\"\"\n        ts = self._timestamps[path]\n        assert ts is not None, f\"The timestamp of {shlex.quote(path)} was not previously recorded\"\n        for p, p_ts in self._timestamps.items():\n            if p == path or p_ts is None:\n                continue\n            if p_ts > ts:\n                raise ValueError(f\"Source {shlex.quote(path)} is older than paired file {shlex.quote(p)}\")\n        return ts\n\n\n# If not none, this function is called with the path of each file\n# that Jupytext CLI considers to write back (to be used in tests)\n_callback_on_lazy_write = None\n\n\ndef load_paired_notebook(\n    notebook, fmt, config, formats, nb_file, log, pre_commit_mode: bool, timestamp_checker: TimestampChecker\n):\n    \"\"\"Update the notebook with the inputs and outputs of the most recent paired files\"\"\"\n    if not formats:\n        raise NotAPairedNotebook(f\"{shlex.quote(nb_file)} is not a paired notebook\")\n\n    formats = long_form_multiple_formats(formats)\n    _, fmt_with_prefix_suffix = find_base_path_and_format(nb_file, formats)\n    fmt.update(fmt_with_prefix_suffix)\n\n    def read_one_file(path, fmt):\n        if path == nb_file:\n            return notebook\n\n        log(f\"[jupytext] Loading {shlex.quote(path)}\")\n        timestamp_checker.get_and_check_timestamp(path)\n        return read(path, fmt=fmt, config=config)\n\n    if pre_commit_mode and file_in_git_index(nb_file):\n        # We raise an error if two representations of this notebook in the git index are inconsistent\n        nb_files_in_git_index = sorted(\n            ((alt_path, alt_fmt) for alt_path, alt_fmt in paired_paths(nb_file, fmt, formats) if file_in_git_index(alt_path)),\n            key=lambda x: 0 if x[1][\"extension\"] != \".ipynb\" else 1,\n        )\n\n        if len(nb_files_in_git_index) > 1:\n            path0, fmt0 = nb_files_in_git_index[0]\n            timestamp_checker.get_and_check_timestamp(path0)\n            with open(path0, encoding=\"utf-8\") as fp:\n                text0 = fp.read()\n            for alt_path, alt_fmt in nb_files_in_git_index[1:]:\n                timestamp_checker.get_and_check_timestamp(alt_path)\n                nb = read(alt_path, fmt=alt_fmt, config=config)\n                alt_text = writes(nb, fmt=fmt0, config=config)\n                if alt_text != text0:\n                    diff = compare(alt_text, text0, alt_path, path0, return_diff=True)\n                    raise InconsistentVersions(\n                        f\"{shlex.quote(alt_path)} and {shlex.quote(path0)} are inconsistent.\\n\"\n                        + diff\n                        + f\"\\nPlease revert JUST ONE of the files with EITHER\\n\"\n                        f\"    git reset {shlex.quote(alt_path)} && git checkout -- {shlex.quote(alt_path)}\\nOR\\n\"\n                        f\"    git reset {shlex.quote(path0)} && git checkout -- {shlex.quote(path0)}\\n\"\n                    )\n\n    inputs, outputs = latest_inputs_and_outputs(nb_file, fmt, formats, timestamp_checker.get_and_check_timestamp)\n    notebook = read_pair(inputs, outputs, read_one_file)\n\n    return notebook, inputs.path, outputs.path\n\n\ndef exec_command(command, input=None, capture=False, warn_only=False, quiet=False):\n    \"\"\"Execute the desired command, and pipe the given input into it\"\"\"\n    assert isinstance(command, list)\n    if not quiet:\n        sys.stdout.write(\"[jupytext] Executing {}\\n\".format(\" \".join(command)))\n    process = subprocess.Popen(\n        command,\n        **(dict(stdout=subprocess.PIPE, stdin=subprocess.PIPE) if input is not None else {}),\n    )\n    out, err = process.communicate(input=input)\n    if out and not capture and not quiet:\n        sys.stdout.write(out.decode(\"utf-8\"))\n    if err:\n        sys.stderr.write(err.decode(\"utf-8\"))\n\n    if process.returncode:\n        msg = f\"The command '{' '.join(command)}' exited with code {process.returncode}\"\n        hint = \"\" if warn_only else \" (use --warn-only to turn this error into a warning)\"\n        sys.stderr.write(f\"[jupytext] {'Warning' if warn_only else 'Error'}: {msg}{hint}\\n\")\n        if not warn_only:\n            raise SystemExit(process.returncode)\n\n    return out\n\n\ndef pipe_notebook(\n    notebook,\n    command,\n    fmt=\"py:percent\",\n    update=True,\n    quiet=False,\n    prefix=None,\n    directory=None,\n    warn_only=False,\n):\n    \"\"\"Pipe the notebook, in the desired representation, to the given command. Update the notebook\n    with the returned content if desired.\"\"\"\n    if command in [\"black\", \"flake8\", \"autopep8\"]:\n        command = command + \" -\"\n    elif command in [\"pytest\", \"unittest\"]:\n        command = command + \" {}\"\n\n    fmt = long_form_one_format(fmt, notebook.metadata, auto_ext_requires_language_info=False)\n    fmt = check_auto_ext(fmt, notebook.metadata, \"--pipe-fmt\")\n    text = writes(notebook, fmt)\n\n    command = shlex.split(command)\n    if \"{}\" in command:\n        if prefix is not None:\n            prefix = prefix + \"-\"\n        tmp_file_args = dict(\n            mode=\"w+\",\n            encoding=\"utf8\",\n            prefix=prefix,\n            suffix=fmt[\"extension\"],\n            dir=directory,\n            delete=False,\n        )\n        try:\n            tmp = NamedTemporaryFile(**tmp_file_args)\n        except TypeError:\n            # NamedTemporaryFile does not have an 'encoding' argument on pypy\n            tmp_file_args.pop(\"encoding\")\n            tmp = NamedTemporaryFile(**tmp_file_args)\n        try:\n            tmp.write(text)\n            tmp.close()\n\n            exec_command(\n                [cmd if cmd != \"{}\" else tmp.name for cmd in command],\n                capture=update,\n                quiet=quiet,\n                warn_only=warn_only,\n            )\n\n            if not update:\n                return notebook\n\n            piped_notebook = read(tmp.name, fmt=fmt)\n        finally:\n            os.remove(tmp.name)\n    else:\n        cmd_output = exec_command(\n            command,\n            text.encode(\"utf-8\"),\n            capture=update,\n            warn_only=warn_only,\n            quiet=quiet,\n        )\n\n        if not update:\n            return notebook\n\n        if not cmd_output:\n            sys.stderr.write(\n                \"[jupytext] The command '{}' had no output. As a result, the notebook is empty. \"\n                \"Is this expected? If not, use --check rather than --pipe for this command.\".format(command)\n            )\n\n        piped_notebook = reads(cmd_output.decode(\"utf-8\"), fmt)\n\n    if fmt[\"extension\"] != \".ipynb\":\n        piped_notebook = combine_inputs_with_outputs(piped_notebook, notebook, fmt)\n\n    # Remove jupytext / text_representation entry\n    if \"jupytext\" in notebook.metadata:\n        piped_notebook.metadata[\"jupytext\"] = notebook.metadata[\"jupytext\"]\n    else:\n        piped_notebook.metadata.pop(\"jupytext\", None)\n\n    return piped_notebook\n\n\ndef execution_counts_are_in_order(notebook):\n    \"\"\"Returns True if all the code cells have an execution count, ordered from 1 to N with no missing number\"\"\"\n    expected_execution_count = 1\n    for cell in notebook.cells:\n        if cell.cell_type == \"code\":\n            if cell.execution_count != expected_execution_count:\n                return False\n            expected_execution_count += 1\n    return True\n\n\ndef code_cells_have_changed(notebook, nb_files):\n    \"\"\"The source for the code cells has not changed\"\"\"\n    for nb_file in nb_files:\n        if not os.path.exists(nb_file):\n            return True\n\n        nb_ref = read(nb_file)\n\n        # Are the new code cells equals to those in the file?\n        ref = [cell.source for cell in nb_ref.cells if cell.cell_type == \"code\"]\n        new = [cell.source for cell in notebook.cells if cell.cell_type == \"code\"]\n\n        if ref != new:\n            return True\n\n    return False\n"
  },
  {
    "path": "src/jupytext/combine.py",
    "content": "\"\"\"Combine source and outputs from two notebooks\"\"\"\n\nimport re\nfrom copy import copy\n\nfrom nbformat import NotebookNode\n\nfrom .cell_metadata import _IGNORE_CELL_METADATA\nfrom .formats import long_form_one_format\nfrom .header import _DEFAULT_NOTEBOOK_METADATA\nfrom .metadata_filter import restore_filtered_metadata\n\n_BLANK_LINE = re.compile(r\"^\\s*$\")\n\n\ndef black_invariant(text, chars=None):\n    \"\"\"Remove characters that may be changed when reformatting the text with black\"\"\"\n    if chars is None:\n        chars = [\" \", \"\\t\", \"\\n\", \",\", \"'\", '\"', \"(\", \")\", \"\\\\\"]\n\n    for char in chars:\n        text = text.replace(char, \"\")\n    return text\n\n\ndef same_content(ref, test, endswith=False):\n    \"\"\"Is the content of two cells the same, up to reformatting by black\"\"\"\n    ref = black_invariant(ref)\n    test = black_invariant(test)\n\n    if endswith and test:\n        return ref.endswith(test)\n    return ref == test\n\n\ndef combine_inputs_with_outputs(nb_source, nb_outputs, fmt=None):\n    \"\"\"Return a notebook that combines the text and metadata from the first notebook,\n    with the outputs and metadata of the second notebook.\"\"\"\n    # nbformat version number taken from the notebook with outputs\n    assert nb_outputs.nbformat == nb_source.nbformat, (\n        \"The notebook with outputs is in format {}.{}, please upgrade it to {}.x\".format(\n            nb_outputs.nbformat, nb_outputs.nbformat_minor, nb_source.nbformat\n        )\n    )\n    nb_source.nbformat_minor = nb_outputs.nbformat_minor\n\n    fmt = long_form_one_format(fmt)\n    text_repr = nb_source.metadata.get(\"jupytext\", {}).get(\"text_representation\", {})\n    ext = fmt.get(\"extension\") or text_repr.get(\"extension\")\n    format_name = fmt.get(\"format_name\") or text_repr.get(\"format_name\")\n\n    notebook_metadata_filter = nb_source.metadata.get(\"jupytext\", {}).get(\"notebook_metadata_filter\")\n    if notebook_metadata_filter == \"-all\":\n        nb_metadata = nb_outputs.metadata\n\n    else:\n        nb_metadata = restore_filtered_metadata(\n            nb_source.metadata,\n            nb_outputs.metadata,\n            notebook_metadata_filter,\n            _DEFAULT_NOTEBOOK_METADATA,\n        )\n\n    source_is_md_version_one = ext in [\".md\", \".markdown\", \".Rmd\"] and text_repr.get(\"format_version\") == \"1.0\"\n    if nb_metadata.get(\"jupytext\", {}).get(\"formats\") or ext in [\n        \".md\",\n        \".markdown\",\n        \".Rmd\",\n    ]:\n        nb_metadata.get(\"jupytext\", {}).pop(\"text_representation\", None)\n\n    if not nb_metadata.get(\"jupytext\", {}):\n        nb_metadata.pop(\"jupytext\", {})\n\n    if format_name in [\"nomarker\", \"sphinx\", \"marimo\"] or source_is_md_version_one:\n        cell_metadata_filter = \"-all\"\n    else:\n        cell_metadata_filter = nb_metadata.get(\"jupytext\", {}).get(\"cell_metadata_filter\")\n\n    outputs_map = map_outputs_to_inputs(nb_source.cells, nb_outputs.cells)\n\n    cells = []\n    for source_cell, j in zip(nb_source.cells, outputs_map):\n        if j is None:\n            cells.append(source_cell)\n            continue\n\n        output_cell = nb_outputs.cells[j]\n\n        # Outputs and optional attributes are taken from the notebook with outputs\n        cell = copy(output_cell)\n\n        # Cell text is taken from the source notebook\n        cell.source = source_cell.source\n\n        # We also restore the cell metadata that has been filtered\n        cell.metadata = restore_filtered_metadata(\n            source_cell.metadata,\n            output_cell.metadata,\n            # The 'spin' format does not allow metadata on non-code cells\n            (\"-all\" if format_name == \"spin\" and source_cell.cell_type != \"code\" else cell_metadata_filter),\n            _IGNORE_CELL_METADATA,\n        )\n\n        cells.append(cell)\n\n    # We call NotebookNode rather than new_notebook as we don't want to validate\n    # the notebook (some of the notebook in the collection of test notebooks\n    # do have some invalid properties - probably inherited from an older version\n    # of the notebook format).\n    return NotebookNode(\n        cells=cells,\n        metadata=nb_metadata,\n        nbformat=nb_outputs.nbformat,\n        nbformat_minor=nb_outputs.nbformat_minor,\n    )\n\n\ndef map_outputs_to_inputs(cells_inputs, cells_outputs):\n    \"\"\"Returns a map i->(j or None) that maps the cells with outputs to the input cells\"\"\"\n    n_in = len(cells_inputs)\n    n_out = len(cells_outputs)\n    outputs_map = [None] * n_in\n\n    # First rule: match based on cell type, content, in increasing order, for each cell type\n    first_unmatched_output_per_cell_type = {}\n    for i in range(n_in):\n        cell_input = cells_inputs[i]\n        for j in range(first_unmatched_output_per_cell_type.get(cell_input.cell_type, 0), n_out):\n            cell_output = cells_outputs[j]\n            if cell_input.cell_type == cell_output.cell_type and same_content(cell_input.source, cell_output.source):\n                outputs_map[i] = j\n                first_unmatched_output_per_cell_type[cell_input.cell_type] = j + 1\n                break\n\n    # Second rule: match unused outputs based on cell type and content\n    # Third rule: is the new cell the final part of a previous cell with outputs?\n    unused_ouputs = set(range(n_out)).difference(outputs_map)\n    for endswith in [False, True]:\n        if not unused_ouputs:\n            return outputs_map\n\n        for i in range(n_in):\n            if outputs_map[i] is not None:\n                continue\n            cell_input = cells_inputs[i]\n            for j in unused_ouputs:\n                cell_output = cells_outputs[j]\n                if cell_input.cell_type == cell_output.cell_type and same_content(\n                    cell_output.source, cell_input.source, endswith\n                ):\n                    outputs_map[i] = j\n                    unused_ouputs.remove(j)\n                    break\n\n    # Fourth rule: match based on increasing index (and cell type) for non-empty cells\n    if not unused_ouputs:\n        return outputs_map\n\n    prev_j = -1\n    for i in range(n_in):\n        if outputs_map[i] is not None:\n            prev_j = outputs_map[i]\n            continue\n\n        j = prev_j + 1\n        if j not in unused_ouputs:\n            continue\n\n        cell_input = cells_inputs[i]\n        cell_output = cells_outputs[j]\n        if cell_input.cell_type == cell_output.cell_type and cell_input.source.strip() != \"\":\n            outputs_map[i] = j\n            unused_ouputs.remove(j)\n            prev_j = j\n\n    return outputs_map\n"
  },
  {
    "path": "src/jupytext/compare.py",
    "content": "\"\"\"Compare two Jupyter notebooks\"\"\"\n\nimport difflib\nimport json\nimport os\nimport re\n\nfrom jupytext.marimo import marimo_version\nfrom jupytext.paired_paths import full_path\n\nfrom .cell_metadata import _IGNORE_CELL_METADATA\nfrom .combine import combine_inputs_with_outputs\nfrom .formats import check_auto_ext, long_form_one_format\nfrom .header import _DEFAULT_NOTEBOOK_METADATA\nfrom .jupytext import read, reads, write, writes\nfrom .metadata_filter import filter_metadata\n\n_BLANK_LINE = re.compile(r\"^\\s*$\")\n\n\ndef _multilines(obj):\n    try:\n        lines = obj.splitlines()\n        return lines + [\"\"] if obj.endswith(\"\\n\") else lines\n    except AttributeError:\n        # Remove the final blank space on Python 2.7\n        # return json.dumps(obj, indent=True, sort_keys=True).splitlines()\n        return [line.rstrip() for line in json.dumps(obj, indent=True, sort_keys=True).splitlines()]\n\n\ndef compare(actual, expected, actual_name=\"actual\", expected_name=\"expected\", return_diff=False):\n    \"\"\"Compare two strings, lists or dict-like objects\"\"\"\n    if actual != expected:\n        diff = difflib.unified_diff(\n            _multilines(expected),\n            _multilines(actual),\n            expected_name,\n            actual_name,\n            lineterm=\"\",\n        )\n        if expected_name == \"\" and actual_name == \"\":\n            diff = list(diff)[2:]\n        diff = \"\\n\".join(diff)\n        if return_diff:\n            return diff\n        raise AssertionError(\"\\n\" + diff)\n    return \"\" if return_diff else None\n\n\ndef filtered_cell(cell, preserve_outputs, cell_metadata_filter):\n    \"\"\"Cell type, metadata and source from given cell\"\"\"\n    filtered = {\n        \"cell_type\": cell.cell_type,\n        \"source\": cell.source,\n        \"metadata\": filter_metadata(cell.metadata, cell_metadata_filter, _IGNORE_CELL_METADATA),\n    }\n\n    if preserve_outputs:\n        for key in [\"execution_count\", \"outputs\"]:\n            if key in cell:\n                filtered[key] = cell[key]\n\n    return filtered\n\n\ndef filtered_notebook_metadata(notebook, ignore_kernelspec=False):\n    \"\"\"Notebook metadata, filtered for metadata added by Jupytext itself\"\"\"\n    metadata = filter_metadata(\n        notebook.metadata,\n        notebook.metadata.get(\"jupytext\", {}).get(\"notebook_metadata_filter\"),\n        _DEFAULT_NOTEBOOK_METADATA,\n    )\n\n    # Quarto round-trips may change the kernelspec\n    if ignore_kernelspec:\n        metadata.pop(\"kernelspec\", None)\n\n    if \"jupytext\" in metadata:\n        del metadata[\"jupytext\"]\n    return metadata\n\n\nclass NotebookDifference(Exception):\n    \"\"\"Report notebook differences\"\"\"\n\n\ndef same_content(ref_source, test_source, allow_removed_final_blank_line):\n    \"\"\"Is the content of two cells the same, except for an optional final blank line?\"\"\"\n    if ref_source == test_source:\n        return True\n\n    if not allow_removed_final_blank_line:\n        return False\n\n    # Is ref identical to test, plus one blank line?\n    ref_source = ref_source.splitlines()\n    test_source = test_source.splitlines()\n\n    if not ref_source:\n        return False\n\n    if ref_source[:-1] != test_source:\n        return False\n\n    return _BLANK_LINE.match(ref_source[-1])\n\n\ndef compare_notebooks(\n    notebook_actual,\n    notebook_expected,\n    fmt=None,\n    allow_expected_differences=True,\n    raise_on_first_difference=True,\n    compare_outputs=False,\n    compare_ids=None,\n):\n    \"\"\"Compare the two notebooks, and raise with a meaningful message\n    that explains the differences, if any\"\"\"\n    fmt = long_form_one_format(fmt)\n    format_name = fmt.get(\"format_name\")\n\n    if format_name == \"sphinx\" and notebook_actual.cells and notebook_actual.cells[0].source == \"%matplotlib inline\":\n        notebook_actual.cells = notebook_actual.cells[1:]\n\n    if compare_ids is None:\n        compare_ids = compare_outputs\n\n    modified_cells, modified_cell_metadata = compare_cells(\n        notebook_actual.cells,\n        notebook_expected.cells,\n        raise_on_first_difference,\n        compare_outputs=compare_outputs,\n        compare_ids=compare_ids,\n        cell_metadata_filter=\"-all\"\n        if format_name == \"marimo\"\n        else notebook_actual.get(\"jupytext\", {}).get(\"cell_metadata_filter\"),\n        allow_missing_code_cell_metadata=(allow_expected_differences and format_name in [\"sphinx\", \"marimo\"]),\n        allow_missing_markdown_cell_metadata=(allow_expected_differences and format_name in [\"sphinx\", \"spin\", \"marimo\"]),\n        allow_filtered_cell_metadata=allow_expected_differences,\n        allow_removed_final_blank_line=allow_expected_differences,\n    )\n\n    # Compare notebook metadata\n    modified_metadata = False\n    if fmt.get(\"format_name\") != \"marimo\":\n        try:\n            ignore_kernelspec = fmt.get(\"extension\") == \".qmd\" and allow_expected_differences\n            compare(\n                filtered_notebook_metadata(notebook_actual, ignore_kernelspec),\n                filtered_notebook_metadata(notebook_expected, ignore_kernelspec),\n            )\n        except AssertionError as error:\n            if raise_on_first_difference:\n                raise NotebookDifference(f\"Notebook metadata differ: {str(error)}\")\n            modified_metadata = True\n\n    error = []\n    if modified_cells:\n        error.append(\n            \"Cells {} differ ({}/{})\".format(\n                \",\".join([str(i) for i in modified_cells]),\n                len(modified_cells),\n                len(notebook_expected.cells),\n            )\n        )\n    if modified_cell_metadata:\n        error.append(\"Cell metadata '{}' differ\".format(\"', '\".join([str(i) for i in modified_cell_metadata])))\n    if modified_metadata:\n        error.append(\"Notebook metadata differ\")\n\n    if error:\n        raise NotebookDifference(\" | \".join(error))\n\n\ndef compare_cells(\n    actual_cells,\n    expected_cells,\n    raise_on_first_difference=True,\n    compare_outputs=True,\n    compare_ids=True,\n    cell_metadata_filter=None,\n    allow_missing_code_cell_metadata=False,\n    allow_missing_markdown_cell_metadata=False,\n    allow_filtered_cell_metadata=False,\n    allow_removed_final_blank_line=False,\n):\n    \"\"\"Compare two collection of notebook cells\"\"\"\n    test_cell_iter = iter(actual_cells)\n    modified_cells = set()\n    modified_cell_metadata = set()\n\n    for i, ref_cell in enumerate(expected_cells, 1):\n        try:\n            test_cell = next(test_cell_iter)\n        except StopIteration:\n            if raise_on_first_difference:\n                raise NotebookDifference(f\"No cell corresponding to {ref_cell.cell_type} cell #{i}:\\n{ref_cell.source}\")\n            modified_cells.update(range(i, len(expected_cells) + 1))\n            break\n\n        ref_lines = [line for line in ref_cell.source.splitlines() if not _BLANK_LINE.match(line)]\n        test_lines = []\n\n        # 1. test cell type\n        if ref_cell.cell_type != test_cell.cell_type:\n            if raise_on_first_difference:\n                raise NotebookDifference(\n                    f\"When comparing cell #{i}: \"\n                    f\"expecting a {ref_cell.cell_type} cell, but got a {test_cell.cell_type} cell.\\n\"\n                    f\"Expected content:\\n{ref_cell.source}\\nActual content:\\n{test_cell.source}\"\n                )\n            modified_cells.add(i)\n\n        # Compare cell ids (introduced in nbformat 5.1.0)\n        if compare_ids and test_cell.get(\"id\") != ref_cell.get(\"id\"):\n            if raise_on_first_difference:\n                raise NotebookDifference(\n                    f\"Cell ids differ on {test_cell['cell_type']} cell #{i}: '{test_cell.get('id')}' != '{ref_cell.get('id')}'\"\n                )\n            modified_cells.add(i)\n\n        # 2. test cell metadata\n        if (ref_cell.cell_type == \"code\" and not allow_missing_code_cell_metadata) or (\n            ref_cell.cell_type != \"code\" and not allow_missing_markdown_cell_metadata\n        ):\n            ref_metadata = ref_cell.metadata\n            test_metadata = test_cell.metadata\n            if allow_filtered_cell_metadata:\n                ref_metadata = {key: ref_metadata[key] for key in ref_metadata if key not in _IGNORE_CELL_METADATA}\n                test_metadata = {key: test_metadata[key] for key in test_metadata if key not in _IGNORE_CELL_METADATA}\n\n            if ref_metadata != test_metadata:\n                if raise_on_first_difference:\n                    try:\n                        compare(test_metadata, ref_metadata)\n                    except AssertionError as error:\n                        raise NotebookDifference(\n                            \"Metadata differ on {} cell #{}: {}\\nCell content:\\n{}\".format(\n                                test_cell.cell_type, i, str(error), ref_cell.source\n                            )\n                        )\n                else:\n                    modified_cell_metadata.update(set(test_metadata).difference(ref_metadata))\n                    modified_cell_metadata.update(set(ref_metadata).difference(test_metadata))\n                    for key in set(ref_metadata).intersection(test_metadata):\n                        if ref_metadata[key] != test_metadata[key]:\n                            modified_cell_metadata.add(key)\n\n        test_lines.extend([line for line in test_cell.source.splitlines() if not _BLANK_LINE.match(line)])\n\n        # 3. test cell content\n        if ref_lines != test_lines:\n            if raise_on_first_difference:\n                try:\n                    compare(\"\\n\".join(test_lines), \"\\n\".join(ref_lines))\n                except AssertionError as error:\n                    raise NotebookDifference(f\"Cell content differ on {test_cell.cell_type} cell #{i}: {str(error)}\")\n            else:\n                modified_cells.add(i)\n\n        # 3. bis test entire cell content\n        if not same_content(ref_cell.source, test_cell.source, allow_removed_final_blank_line):\n            if ref_cell.source != test_cell.source:\n                if raise_on_first_difference:\n                    diff = compare(test_cell.source, ref_cell.source, return_diff=True)\n                    raise NotebookDifference(f\"Cell content differ on {test_cell.cell_type} cell #{i}: {diff}\")\n                modified_cells.add(i)\n\n        if not compare_outputs:\n            continue\n\n        if ref_cell.cell_type != \"code\":\n            continue\n\n        ref_cell = filtered_cell(\n            ref_cell,\n            preserve_outputs=compare_outputs,\n            cell_metadata_filter=cell_metadata_filter,\n        )\n        test_cell = filtered_cell(\n            test_cell,\n            preserve_outputs=compare_outputs,\n            cell_metadata_filter=cell_metadata_filter,\n        )\n\n        try:\n            compare(test_cell, ref_cell)\n        except AssertionError as error:\n            if raise_on_first_difference:\n                raise NotebookDifference(\n                    \"Cell outputs differ on {} cell #{}: {}\".format(test_cell[\"cell_type\"], i, str(error))\n                )\n            modified_cells.add(i)\n\n    # More cells in the actual notebook?\n    remaining_cell_count = 0\n    while True:\n        try:\n            test_cell = next(test_cell_iter)\n            if raise_on_first_difference:\n                raise NotebookDifference(f\"Additional {test_cell.cell_type} cell: {test_cell.source}\")\n            remaining_cell_count += 1\n        except StopIteration:\n            break\n\n    if remaining_cell_count and not raise_on_first_difference:\n        modified_cells.update(\n            range(\n                len(expected_cells) + 1,\n                len(expected_cells) + 1 + remaining_cell_count,\n            )\n        )\n\n    return modified_cells, modified_cell_metadata\n\n\ndef test_round_trip_conversion(notebook, fmt, update, allow_expected_differences=True, stop_on_first_error=True):\n    \"\"\"Test round trip conversion for a Jupyter notebook\"\"\"\n    text = writes(notebook, fmt)\n    round_trip = reads(text, fmt)\n\n    if update:\n        round_trip = combine_inputs_with_outputs(round_trip, notebook, fmt)\n\n    compare_notebooks(\n        round_trip,\n        notebook,\n        fmt,\n        allow_expected_differences,\n        raise_on_first_difference=stop_on_first_error,\n    )\n\n\n# The functions below are used in the Jupytext text collection\ndef create_mirror_file_if_missing(mirror_file, notebook, fmt):\n    if not os.path.isfile(mirror_file):\n        write(notebook, mirror_file, fmt=fmt)\n\n\ndef assert_conversion_same_as_mirror(nb_file, fmt, mirror_name, compare_notebook=False):\n    \"\"\"This function is used in the tests\"\"\"\n    dirname, basename = os.path.split(nb_file)\n    file_name, org_ext = os.path.splitext(basename)\n    fmt = long_form_one_format(fmt)\n    notebook = read(nb_file, fmt=fmt)\n    fmt = check_auto_ext(fmt, notebook.metadata, \"\")\n    ext = fmt[\"extension\"]\n    mirror_file = os.path.join(dirname, \"..\", \"..\", \"outputs\", mirror_name, full_path(file_name, fmt))\n\n    # it's better not to have Jupytext metadata in test notebooks:\n    if fmt == \"ipynb\" and \"jupytext\" in notebook.metadata:  # pragma: no cover\n        notebook.metadata.pop(\"jupytext\")\n        write(nb_file, fmt=fmt)\n\n    create_mirror_file_if_missing(mirror_file, notebook, fmt)\n\n    # Compare the text representation of the two notebooks\n    if compare_notebook:\n        # Read and convert the mirror file to the latest nbformat version if necessary\n        nb_mirror = read(mirror_file, as_version=notebook.nbformat)\n        nb_mirror.nbformat_minor = notebook.nbformat_minor\n        compare_notebooks(nb_mirror, notebook)\n        return\n    elif ext == \".ipynb\":\n        notebook = read(mirror_file)\n        fmt.update({\"extension\": org_ext})\n        actual = writes(notebook, fmt)\n        with open(nb_file, encoding=\"utf-8\") as fp:\n            expected = fp.read()\n    else:\n        actual = writes(notebook, fmt)\n        with open(mirror_file, encoding=\"utf-8\") as fp:\n            expected = fp.read()\n\n    if not actual.endswith(\"\\n\"):\n        actual = actual + \"\\n\"\n\n    if fmt.get(\"format_name\") == \"marimo\":\n        lines = expected.splitlines()\n        lines = [\n            # mirror files were generated with marimo 0.17.8\n            f'__generated_with = \"{marimo_version()}\"' if line == '__generated_with = \"0.17.8\"' else line\n            for line in lines\n        ]\n        expected = \"\\n\".join(lines) + \"\\n\"\n\n    compare(actual, expected)\n\n    # Compare the two notebooks\n    if ext != \".ipynb\":\n        notebook = read(nb_file)\n        nb_mirror = read(mirror_file, fmt=fmt)\n\n        if fmt.get(\"format_name\") == \"sphinx\":\n            nb_mirror.cells = nb_mirror.cells[1:]\n            for cell in notebook.cells:\n                cell.metadata = {}\n            for cell in nb_mirror.cells:\n                cell.metadata = {}\n\n        compare_notebooks(nb_mirror, notebook, fmt)\n\n        nb_mirror = combine_inputs_with_outputs(nb_mirror, notebook)\n        compare_notebooks(nb_mirror, notebook, fmt, compare_outputs=True)\n\n\ndef notebook_model(nb):\n    \"\"\"Return a notebook model, with content a\n    dictionary rather than a notebook object.\n    To be used in tests only.\"\"\"\n    return dict(type=\"notebook\", content=json.loads(json.dumps(nb)))\n"
  },
  {
    "path": "src/jupytext/config.py",
    "content": "\"\"\"Find and read Jupytext configuration files\"\"\"\n\nimport json\nimport os\nfrom pathlib import Path\n\ntry:\n    import tomllib\nexcept ImportError:\n    import tomli as tomllib\n\nimport warnings\n\nimport yaml\nfrom traitlets import Bool, Dict, Enum, Float, List, Unicode, Union\nfrom traitlets.config import Configurable\nfrom traitlets.config.loader import PyFileConfigLoader\nfrom traitlets.traitlets import TraitError\nimport typing\nfrom .formats import (\n    NOTEBOOK_EXTENSIONS,\n    get_formats_from_notebook_metadata,\n    long_form_multiple_formats,\n    long_form_one_format,\n    short_form_multiple_formats,\n)\n\n\nclass JupytextConfigurationError(ValueError):\n    \"\"\"Error in the specification of the format for the text notebook\"\"\"\n\n\nJUPYTEXT_CONFIG_FILES = [\n    \"jupytext\",\n    \"jupytext.toml\",\n    \"jupytext.yml\",\n    \"jupytext.yaml\",\n    \"jupytext.json\",\n]\n\nJUPYTEXT_CONFIG_FILES.extend([\".\" + filename for filename in JUPYTEXT_CONFIG_FILES] + [\".jupytext.py\"])\n\nPYPROJECT_FILE = \"pyproject.toml\"\n\nJUPYTEXT_CEILING_DIRECTORIES = [path for path in os.environ.get(\"JUPYTEXT_CEILING_DIRECTORIES\", \"\").split(\":\") if path]\n\n\nclass JupytextConfiguration(Configurable):\n    \"\"\"Jupytext Configuration's options\"\"\"\n\n    formats = Union(\n        [Unicode(), List(Unicode()), List(Dict(Unicode())), Dict(Unicode())],\n        help=\"Save notebooks to these file extensions. \"\n        \"Can be any of ipynb,Rmd,md,jl,py,R,nb.jl,nb.py,nb.R \"\n        \"comma separated. If you want another format than the \"\n        \"default one, append the format name to the extension, \"\n        \"e.g. ipynb,py:percent to save the notebook to \"\n        \"hydrogen/spyder/vscode compatible scripts. \"\n        \"Can also be a list of format dictionaries for first-match pairing.\",\n        config=True,\n    )\n    default_jupytext_formats = Unicode(help=\"Deprecated. Use 'formats' instead\", config=True)\n\n    preferred_jupytext_formats_save = Unicode(\n        help=\"Preferred format when saving notebooks as text, per extension. \"\n        'Use \"jl:percent,py:percent,R:percent\" if you want to save '\n        \"Julia, Python and R scripts in the double percent format and \"\n        'only write \"jupytext_formats\": \"py\" in the notebook metadata.',\n        config=True,\n    )\n\n    preferred_jupytext_formats_read = Unicode(\n        help=\"Preferred format when reading notebooks from text, per \"\n        'extension. Use \"py:sphinx\" if you want to read all python '\n        \"scripts as Sphinx gallery scripts.\",\n        config=True,\n    )\n\n    notebook_metadata_filter = Unicode(\n        help=\"Notebook metadata that should be save in the text representations. \"\n        \"Examples: 'all', '-all', 'widgets,nteract', 'kernelspec,jupytext-all'\",\n        config=True,\n    )\n\n    default_notebook_metadata_filter = Unicode(\"\", help=\"Deprecated. Use 'notebook_metadata_filter' instead\", config=True)\n\n    hide_notebook_metadata = Enum(\n        values=[True, False],\n        allow_none=True,\n        help=\"Should the notebook metadata be wrapped into an HTML comment in the Markdown format?\",\n        config=True,\n    )\n\n    root_level_metadata_as_raw_cell = Bool(\n        True,\n        help=\"Should the root level metadata of text documents (like the fields 'title' or 'author' in \"\n        \"R Markdown document) appear as a raw cell in the notebook (True), or go to the notebook\"\n        \"metadata?\",\n        config=True,\n    )\n\n    root_level_metadata_filter = Unicode(\n        help=\"Notebook metadata that should be promoted to the root level in the text representations. \"\n        \"Examples: 'all', '-all', 'kernelspec,jupytext'\",\n        config=True,\n    )\n\n    cell_metadata_filter = Unicode(\n        help=\"Cell metadata that should be saved in the text representations. Examples: 'all', 'hide_input,hide_output'\",\n        config=True,\n    )\n\n    default_cell_metadata_filter = Unicode(\"\", help=\"Deprecated. Use 'cell_metadata_filter' instead\", config=True)\n\n    comment_magics = Enum(\n        values=[True, False],\n        allow_none=True,\n        help=\"Should Jupyter magic commands be commented out in the text representation?\",\n        config=True,\n    )\n\n    split_at_heading = Bool(\n        False,\n        help=\"Split markdown cells on headings (Markdown and R Markdown formats only)\",\n        config=True,\n    )\n\n    sphinx_convert_rst2md = Bool(\n        False,\n        help=\"When opening a Sphinx Gallery script, convert the reStructuredText to markdown\",\n        config=True,\n    )\n\n    doxygen_equation_markers = Bool(\n        False,\n        help=\"Should equation markers use the DOxygen format? (see https://github.com/mwouts/jupytext/issues/517)\",\n        config=True,\n    )\n\n    outdated_text_notebook_margin = Float(\n        1.0,\n        help=\"Refuse to overwrite inputs of a ipynb notebooks with those of a \"\n        \"text notebook when the text notebook plus margin is older than \"\n        \"the ipynb notebook (NB: This option is ignored by Jupytext CLI)\",\n        config=True,\n    )\n\n    cm_config_log_level = Enum(\n        values=[\"warning\", \"info\", \"info_if_changed\", \"debug\", \"none\"],\n        default_value=\"info_if_changed\",\n        help=\"The log level for config file logs in the Jupytext contents manager\",\n        config=True,\n    )\n\n    cell_markers = Unicode(\n        help='Start and end cell markers for the light format, comma separated. Use \"{{{,}}}\" to mark cells'\n        'as foldable regions in Vim, and \"region,endregion\" to mark cells as Vscode/PyCharm regions',\n        config=True,\n    )\n\n    default_cell_markers = Unicode(help=\"Deprecated. Use 'cell_markers' instead\", config=True)\n\n    notebook_extensions = Union(\n        [List(Unicode(), NOTEBOOK_EXTENSIONS), Unicode()],\n        help=\"A list of notebook extensions\",\n        config=True,\n    )\n\n    custom_cell_magics = Unicode(\n        help='A comma separated list of cell magics. Use e.g. custom_cell_magics = \"configure,local\" '\n        'if you want code cells starting with the Spark magic cell commands \"configure\" and \"local\" '\n        \"to be commented out when converted to scripts.\",\n        config=True,\n    )\n\n    def set_default_format_options(self, format_options, read=False):\n        \"\"\"Set default format option\"\"\"\n        if self.default_notebook_metadata_filter:\n            warnings.warn(\n                \"The option 'default_notebook_metadata_filter' is deprecated. Please use 'notebook_metadata_filter' instead.\",\n                FutureWarning,\n            )\n            format_options.setdefault(\"notebook_metadata_filter\", self.default_notebook_metadata_filter)\n        if self.notebook_metadata_filter:\n            format_options.setdefault(\"notebook_metadata_filter\", self.notebook_metadata_filter)\n        if self.default_cell_metadata_filter:\n            warnings.warn(\n                \"The option 'default_cell_metadata_filter' is deprecated. Please use 'cell_metadata_filter' instead.\",\n                FutureWarning,\n            )\n            format_options.setdefault(\"cell_metadata_filter\", self.default_cell_metadata_filter)\n        if self.root_level_metadata_filter:\n            format_options.setdefault(\"root_level_metadata_filter\", self.root_level_metadata_filter)\n        if self.cell_metadata_filter:\n            format_options.setdefault(\"cell_metadata_filter\", self.cell_metadata_filter)\n        if self.hide_notebook_metadata is not None:\n            format_options.setdefault(\"hide_notebook_metadata\", self.hide_notebook_metadata)\n        if self.root_level_metadata_as_raw_cell is False:\n            format_options.setdefault(\"root_level_metadata_as_raw_cell\", self.root_level_metadata_as_raw_cell)\n        if self.comment_magics is not None:\n            format_options.setdefault(\"comment_magics\", self.comment_magics)\n        if self.split_at_heading:\n            format_options.setdefault(\"split_at_heading\", self.split_at_heading)\n        if self.doxygen_equation_markers:\n            format_options.setdefault(\"doxygen_equation_markers\", self.doxygen_equation_markers)\n        if not read:\n            if self.default_cell_markers:\n                warnings.warn(\n                    \"The option 'default_cell_markers' is deprecated. Please use 'cell_markers' instead.\",\n                    FutureWarning,\n                )\n                format_options.setdefault(\"cell_markers\", self.default_cell_markers)\n            if self.cell_markers:\n                format_options.setdefault(\"cell_markers\", self.cell_markers)\n        if read and self.sphinx_convert_rst2md:\n            format_options.setdefault(\"rst2md\", self.sphinx_convert_rst2md)\n        if self.custom_cell_magics:\n            format_options.setdefault(\"custom_cell_magics\", self.custom_cell_magics)\n\n    def default_formats(self, path):\n        \"\"\"Return the default formats, if they apply to the current path #157\"\"\"\n        from .paired_paths import InconsistentPath, base_path\n\n        if self.default_jupytext_formats:\n            warnings.warn(\n                \"The option 'default_jupytext_formats' is deprecated. Please use 'formats' instead.\",\n                FutureWarning,\n            )\n\n        # formats is a list of paired formats - find the first match\n        for paired_formats in normalize_formats(self.formats or self.default_jupytext_formats):\n            # Check if one of the paired format matches the current path\n            for fmt in long_form_multiple_formats(paired_formats):\n                try:\n                    base_path(path, fmt)\n                    return paired_formats\n                except InconsistentPath:\n                    continue\n        return None\n\n    def __eq__(self, other):\n        for key in self.class_trait_names():\n            if getattr(self, key) != getattr(other, key):\n                return False\n\n        return True\n\n\ndef preferred_format(incomplete_format, preferred_formats):\n    \"\"\"Return the preferred format for the given extension\"\"\"\n    incomplete_format = long_form_one_format(incomplete_format)\n    if \"format_name\" in incomplete_format:\n        return incomplete_format\n\n    for fmt in long_form_multiple_formats(preferred_formats):\n        if (\n            (\n                incomplete_format[\"extension\"] == fmt[\"extension\"]\n                or (\n                    fmt[\"extension\"] == \".auto\"\n                    and incomplete_format[\"extension\"] not in [\".md\", \".markdown\", \".Rmd\", \".ipynb\"]\n                )\n            )\n            and incomplete_format.get(\"suffix\") == fmt.get(\"suffix\", incomplete_format.get(\"suffix\"))\n            and incomplete_format.get(\"prefix\") == fmt.get(\"prefix\", incomplete_format.get(\"prefix\"))\n        ):\n            fmt.update(incomplete_format)\n            return fmt\n\n    return incomplete_format\n\n\ndef global_jupytext_configuration_directories():\n    \"\"\"Return the directories in which Jupytext will search for a configuration file\"\"\"\n\n    config_dirs = []\n\n    if \"XDG_CONFIG_HOME\" in os.environ:\n        config_dirs.extend(os.environ[\"XDG_CONFIG_HOME\"].split(\":\"))\n    elif \"USERPROFILE\" in os.environ:\n        config_dirs.append(os.environ[\"USERPROFILE\"])\n    elif \"HOME\" in os.environ:\n        config_dirs.append(os.path.join(os.environ[\"HOME\"], \".config\"))\n        config_dirs.append(os.environ[\"HOME\"])\n\n    if \"XDG_CONFIG_DIRS\" in os.environ:\n        config_dirs.extend(os.environ[\"XDG_CONFIG_DIRS\"].split(\":\"))\n    elif \"ALLUSERSPROFILE\" in os.environ:\n        config_dirs.append(os.environ[\"ALLUSERSPROFILE\"])\n    else:\n        config_dirs.extend([\"/usr/local/share/\", \"/usr/share/\"])\n\n    for config_dir in config_dirs:\n        yield from [\n            os.path.join(config_dir, \"jupytext\"),\n            config_dir,\n        ]\n\n\ndef find_global_jupytext_configuration_file():\n    \"\"\"Return the global Jupytext configuration file, if any\"\"\"\n\n    for config_dir in global_jupytext_configuration_directories():\n        config_file = find_jupytext_configuration_file(config_dir, False)\n        if config_file:\n            return config_file\n\n    return None\n\n\ndef find_jupytext_configuration_file(path: typing.Union[str, Path], search_parent_dirs=True) -> str:\n    \"\"\"Return the first jupytext configuration file in the current directory, or any parent directory\"\"\"\n\n    path = Path(path).absolute()\n\n    if path.is_dir():\n        for filename in JUPYTEXT_CONFIG_FILES:\n            full_path = path / filename\n            if full_path.is_file():\n                return str(full_path)\n\n    pyproject_path = path / PYPROJECT_FILE\n    if pyproject_path.is_file():\n        with pyproject_path.open() as stream:\n            doc = tomllib.loads(stream.read())\n            if doc.get(\"tool\", {}).get(\"jupytext\") is not None:\n                return str(pyproject_path)\n\n    if not search_parent_dirs:\n        return None\n\n    if JUPYTEXT_CEILING_DIRECTORIES and path.is_dir():\n        for ceiling_dir in JUPYTEXT_CEILING_DIRECTORIES:\n            if Path(ceiling_dir).is_dir() and path.absolute() == Path(ceiling_dir).absolute():\n                return None\n\n    parent_dir = path.parent\n    if parent_dir == path:\n        return find_global_jupytext_configuration_file()\n\n    return find_jupytext_configuration_file(parent_dir, True)\n\n\ndef parse_jupytext_configuration_file(jupytext_config_file, stream=None):\n    \"\"\"Read a Jupytext config file, and return a dict\"\"\"\n    if not jupytext_config_file.endswith(\".py\") and stream is None:\n        with open(jupytext_config_file, encoding=\"utf-8\") as stream:\n            return parse_jupytext_configuration_file(jupytext_config_file, stream.read())\n\n    try:\n        if jupytext_config_file.endswith((\".toml\", \"jupytext\")):\n            doc = tomllib.loads(stream)\n            if jupytext_config_file.endswith(PYPROJECT_FILE):\n                return doc[\"tool\"][\"jupytext\"]\n            else:\n                return doc\n\n        if jupytext_config_file.endswith((\".yml\", \".yaml\")):\n            return yaml.safe_load(stream)\n\n        if jupytext_config_file.endswith(\".json\"):\n            return json.loads(stream)\n\n        return PyFileConfigLoader(jupytext_config_file).load_config()\n    except (ValueError, NameError) as err:\n        raise JupytextConfigurationError(f\"The Jupytext configuration file {jupytext_config_file} is incorrect: {err}\")\n\n\ndef normalize_formats(formats) -> list[str]:\n    \"\"\"Normalize the formats option into a list of string-encoded paired formats\"\"\"\n    # Process formats - can be string, dict, or list\n    if isinstance(formats, str):\n        # Split on semicolon for multiple format groups\n        formats = formats.split(\";\")\n    elif isinstance(formats, dict):\n        # Single dict - wrap in list for uniform processing\n        formats = [formats]\n    elif formats is None:\n        formats = []\n    elif not isinstance(formats, list):\n        raise JupytextConfigurationError(\n            f\"Invalid type for 'formats': {type(formats).__name__}. Expected str, dict, list of str or dict.\"\n        )\n\n    # Each group of paired formats can be a string or a dict\n    string_encoded_pairing_formats = []\n\n    for paired_formats in formats:\n        if isinstance(paired_formats, str):\n            string_encoded_pairing_formats.append(paired_formats)\n        elif isinstance(paired_formats, dict):\n            # Convert dict to format string\n            paired_formats = [\n                (f if not prefix else (prefix[:-1] if prefix.endswith(\"/\") else prefix) + \"///\" + f)\n                for prefix, f in paired_formats.items()\n            ]\n            string_encoded_pairing_formats.append(short_form_multiple_formats(paired_formats))\n        else:\n            raise JupytextConfigurationError(\n                f\"Invalid paired formats: {paired_formats}. Expected str or dict, got {type(paired_formats).__name__}.\"\n            )\n\n    return string_encoded_pairing_formats\n\n\ndef load_jupytext_configuration_file(config_file, stream=None):\n    \"\"\"Read and validate a Jupytext configuration file, and return a JupytextConfiguration object\"\"\"\n    config_dict = parse_jupytext_configuration_file(config_file, stream)\n    config = validate_jupytext_configuration_file(config_file, config_dict)\n    config.formats = normalize_formats(config.formats or config.default_jupytext_formats)\n\n    if isinstance(config.notebook_extensions, str):\n        config.notebook_extensions = config.notebook_extensions.split(\",\")\n    return config\n\n\ndef load_jupytext_config(nb_file):\n    \"\"\"Return the jupytext configuration file in the same folder, or in a parent folder, of the current file, if any\"\"\"\n    config_file = find_jupytext_configuration_file(nb_file)\n    if config_file is None:\n        return None\n    if os.path.isfile(nb_file) and os.path.samefile(config_file, nb_file):\n        return None\n    config_file = find_jupytext_configuration_file(nb_file)\n    return load_jupytext_configuration_file(config_file)\n\n\ndef validate_jupytext_configuration_file(config_file, config_dict):\n    \"\"\"Turn a dict-like config into a JupytextConfiguration object\"\"\"\n    if config_dict is None:\n        return None\n    try:\n        config = JupytextConfiguration(**config_dict)\n    except TraitError as err:\n        raise JupytextConfigurationError(f\"The Jupytext configuration file {config_file} is incorrect: {err}\")\n    invalid_options = set(config_dict).difference(dir(JupytextConfiguration()))\n    if any(invalid_options):\n        raise JupytextConfigurationError(\n            \"The Jupytext configuration file {} is incorrect: options {} are not supported\".format(\n                config_file, \",\".join(invalid_options)\n            )\n        )\n    return config\n\n\ndef notebook_formats(nbk, config, path, fallback_on_current_fmt=True):\n    \"\"\"Return the list of formats for the current notebook\"\"\"\n    metadata = nbk.get(\"metadata\")\n    jupytext_metadata = metadata.get(\"jupytext\", {})\n    formats = jupytext_metadata.get(\"formats\") or metadata.get(\"jupytext_formats\")\n\n    if formats:\n        formats = long_form_multiple_formats(formats, metadata, auto_ext_requires_language_info=False)\n    elif config:\n        current_format = jupytext_metadata.get(\"text_representation\", {\"extension\": os.path.splitext(path)[1]})\n        default_formats = long_form_multiple_formats(\n            config.default_formats(path),\n            metadata,\n            auto_ext_requires_language_info=False,\n        )\n\n        if any(\n            current_format.get(\"extension\") == fmt[\"extension\"]\n            and (\n                \"format_name\" not in fmt\n                or \"format_name\" not in current_format\n                or current_format[\"format_name\"] == fmt.get(\"format_name\")\n            )\n            for fmt in default_formats\n        ):\n            formats = default_formats\n\n    if not formats:\n        if not fallback_on_current_fmt:\n            return None\n        text_repr = jupytext_metadata.get(\"text_representation\", {})\n        ext = os.path.splitext(path)[1]\n        fmt = {\"extension\": ext}\n\n        if ext == text_repr.get(\"extension\") and text_repr.get(\"format_name\"):\n            fmt[\"format_name\"] = text_repr.get(\"format_name\")\n\n        formats = [fmt]\n\n    # Set preferred formats if no format name has been given yet\n    if config:\n        formats = [preferred_format(f, config.preferred_jupytext_formats_save) for f in formats]\n\n    return formats\n\n\ndef get_formats_from_notebook_and_config(notebook, config, nb_file):\n    \"\"\"\n    Get the notebook formats from notebook metadata or config.\n\n    Notebook metadata takes precedence over config. If the notebook metadata contains pairing information,\n    it is used; otherwise, the configuration is used as a fallback.\n\n    Parameters\n    ----------\n    notebook : dict\n        The notebook object (as a dictionary).\n    config : JupytextConfiguration or None\n        The Jupytext configuration object.\n    nb_file : str\n        The path to the notebook file.\n\n    Returns\n    -------\n    list\n        A list of format dictionaries describing the notebook's paired formats.\n    \"\"\"\n    formats = get_formats_from_notebook_metadata(notebook)\n    if formats:\n        return long_form_multiple_formats(formats)\n    else:\n        return notebook_formats(notebook, config, nb_file)\n"
  },
  {
    "path": "src/jupytext/doxygen.py",
    "content": "\"\"\"Convert Markdown equations to doxygen equations and back\nSee https://github.com/mwouts/jupytext/issues/517\"\"\"\n\nimport re\n\n\ndef markdown_to_doxygen(string):\n    \"\"\"Markdown to Doxygen equations\"\"\"\n    long_equations = re.sub(r\"(?<!\\\\)\\$\\$(.*?)(?<!\\\\)\\$\\$\", r\"\\\\f[\\g<1>\\\\f]\", string, flags=re.DOTALL)\n    inline_equations = re.sub(r\"(?<!(\\\\|\\$))\\$(?!\\$)\", r\"\\\\f$\", long_equations)\n    return inline_equations\n\n\ndef doxygen_to_markdown(string):\n    \"\"\"Doxygen to Markdown equations\"\"\"\n    long_equations = re.sub(r\"\\\\f\\[(.*?)\\\\f\\]\", r\"$$\\g<1>$$\", string, flags=re.DOTALL)\n    inline_equations = re.sub(r\"\\\\f\\$\", \"$\", long_equations)\n    return inline_equations\n"
  },
  {
    "path": "src/jupytext/formats.py",
    "content": "\"\"\"\nIn this file the various text notebooks formats are defined. Please contribute\nnew formats here!\n\"\"\"\n\nimport os\nimport re\nimport warnings\n\nimport nbformat\nimport yaml\n\nfrom .cell_reader import (\n    DoublePercentScriptCellReader,\n    HydrogenCellReader,\n    LightScriptCellReader,\n    MarkdownCellReader,\n    RMarkdownCellReader,\n    RScriptCellReader,\n    SphinxGalleryScriptCellReader,\n)\nfrom .cell_to_text import (\n    BareScriptCellExporter,\n    DoublePercentCellExporter,\n    HydrogenCellExporter,\n    LightScriptCellExporter,\n    MarkdownCellExporter,\n    RMarkdownCellExporter,\n    RScriptCellExporter,\n    SphinxGalleryCellExporter,\n)\nfrom .header import header_to_metadata_and_cell, insert_or_test_version_number\nfrom .languages import _COMMENT_CHARS, _SCRIPT_EXTENSIONS, same_language\nfrom .magics import is_magic\nfrom .metadata_filter import metadata_filter_as_string\nfrom .myst import (\n    MYST_FORMAT_NAME,\n    is_myst_available,\n    matches_mystnb,\n    myst_extensions,\n    myst_version,\n)\nfrom .pandoc import is_pandoc_available, pandoc_version\nfrom .stringparser import StringParser\nfrom .version import __version__\n\n\nclass JupytextFormatError(ValueError):\n    \"\"\"Error in the specification of the format for the text notebook\"\"\"\n\n\nclass NotebookFormatDescription:\n    \"\"\"Description of a notebook format\"\"\"\n\n    def __init__(\n        self,\n        format_name,\n        extension,\n        header_prefix,\n        cell_reader_class,\n        cell_exporter_class,\n        current_version_number,\n        header_suffix=\"\",\n        min_readable_version_number=None,\n    ):\n        self.format_name = format_name\n        self.extension = extension\n        self.header_prefix = header_prefix\n        self.header_suffix = header_suffix\n        self.cell_reader_class = cell_reader_class\n        self.cell_exporter_class = cell_exporter_class\n        self.current_version_number = current_version_number\n        self.min_readable_version_number = min_readable_version_number\n\n\nJUPYTEXT_FORMATS = (\n    [\n        NotebookFormatDescription(\n            format_name=\"markdown\",\n            extension=\".md\",\n            header_prefix=\"\",\n            cell_reader_class=MarkdownCellReader,\n            cell_exporter_class=MarkdownCellExporter,\n            # Version 1.0 on 2018-08-31 - jupytext v0.6.0 : Initial version\n            # Version 1.1 on 2019-03-24 - jupytext v1.1.0 : Markdown regions and cell metadata\n            # Version 1.2 on 2019-09-21 - jupytext v1.3.0 : Raw regions are now encoded with HTML comments (#321)\n            # and by default, cell metadata use the key=value representation (#347)\n            # Version 1.3 on 2021-01-24 - jupytext v1.10.0 : Code cells may start with more than three backticks (#712)\n            current_version_number=\"1.3\",\n            min_readable_version_number=\"1.0\",\n        ),\n        NotebookFormatDescription(\n            format_name=\"markdown\",\n            extension=\".markdown\",\n            header_prefix=\"\",\n            cell_reader_class=MarkdownCellReader,\n            cell_exporter_class=MarkdownCellExporter,\n            current_version_number=\"1.2\",\n            min_readable_version_number=\"1.0\",\n        ),\n        NotebookFormatDescription(\n            format_name=\"rmarkdown\",\n            extension=\".Rmd\",\n            header_prefix=\"\",\n            cell_reader_class=RMarkdownCellReader,\n            cell_exporter_class=RMarkdownCellExporter,\n            # Version 1.0 on 2018-08-22 - jupytext v0.5.2 : Initial version\n            # Version 1.1 on 2019-03-24 - jupytext v1.1.0 : Markdown regions and cell metadata\n            # Version 1.2 on 2019-09-21 - jupytext v1.3.0 : Raw regions are now encoded with HTML comments (#321)\n            # and by default, cell metadata use the key=value representation in raw and markdown cells (#347)\n            current_version_number=\"1.2\",\n            min_readable_version_number=\"1.0\",\n        ),\n    ]\n    + [\n        NotebookFormatDescription(\n            format_name=\"light\",\n            extension=ext,\n            header_prefix=_SCRIPT_EXTENSIONS[ext][\"comment\"],\n            header_suffix=_SCRIPT_EXTENSIONS[ext].get(\"comment_suffix\", \"\"),\n            cell_reader_class=LightScriptCellReader,\n            cell_exporter_class=LightScriptCellExporter,\n            # Version 1.5 on 2019-10-19 - jupytext v1.3.0 - Cell metadata represented as key=value by default\n            # Version 1.4 on 2019-03-30 - jupytext v1.1.0 - custom cell markers allowed\n            # Version 1.3 on 2018-09-22 - jupytext v0.7.0rc0 : Metadata are\n            # allowed for all cell types (and then include 'cell_type')\n            # Version 1.2 on 2018-09-05 - jupytext v0.6.3 : Metadata bracket\n            # can be omitted when empty, if previous line is empty #57\n            # Version 1.1 on 2018-08-25 - jupytext v0.6.0 : Cells separated\n            # with one blank line #38\n            # Version 1.0 on 2018-08-22 - jupytext v0.5.2 : Initial version\n            current_version_number=\"1.5\",\n            min_readable_version_number=\"1.1\",\n        )\n        for ext in _SCRIPT_EXTENSIONS\n    ]\n    + [\n        NotebookFormatDescription(\n            format_name=\"nomarker\",\n            extension=ext,\n            header_prefix=_SCRIPT_EXTENSIONS[ext][\"comment\"],\n            header_suffix=_SCRIPT_EXTENSIONS[ext].get(\"comment_suffix\", \"\"),\n            cell_reader_class=LightScriptCellReader,\n            cell_exporter_class=BareScriptCellExporter,\n            current_version_number=\"1.0\",\n            min_readable_version_number=\"1.0\",\n        )\n        for ext in _SCRIPT_EXTENSIONS\n    ]\n    + [\n        NotebookFormatDescription(\n            format_name=\"percent\",\n            extension=ext,\n            header_prefix=_SCRIPT_EXTENSIONS[ext][\"comment\"],\n            header_suffix=_SCRIPT_EXTENSIONS[ext].get(\"comment_suffix\", \"\"),\n            cell_reader_class=DoublePercentScriptCellReader,\n            cell_exporter_class=DoublePercentCellExporter,\n            # Version 1.3 on 2019-09-21 - jupytext v1.3.0: Markdown cells can be quoted using triple quotes #305\n            # and cell metadata are represented as key=value by default\n            # Version 1.2 on 2018-11-18 - jupytext v0.8.6: Jupyter magics are commented by default #126, #132\n            # Version 1.1 on 2018-09-23 - jupytext v0.7.0rc1 : [markdown] and\n            # [raw] for markdown and raw cells.\n            # Version 1.0 on 2018-09-22 - jupytext v0.7.0rc0 : Initial version\n            current_version_number=\"1.3\",\n            min_readable_version_number=\"1.1\",\n        )\n        for ext in _SCRIPT_EXTENSIONS\n    ]\n    + [\n        NotebookFormatDescription(\n            format_name=\"hydrogen\",\n            extension=ext,\n            header_prefix=_SCRIPT_EXTENSIONS[ext][\"comment\"],\n            header_suffix=_SCRIPT_EXTENSIONS[ext].get(\"comment_suffix\", \"\"),\n            cell_reader_class=HydrogenCellReader,\n            cell_exporter_class=HydrogenCellExporter,\n            # Version 1.2 on 2018-12-14 - jupytext v0.9.0: same as percent - only magics are not commented by default\n            current_version_number=\"1.3\",\n            min_readable_version_number=\"1.1\",\n        )\n        for ext in _SCRIPT_EXTENSIONS\n    ]\n    + [\n        NotebookFormatDescription(\n            format_name=\"spin\",\n            extension=ext,\n            header_prefix=\"#'\",\n            cell_reader_class=RScriptCellReader,\n            cell_exporter_class=RScriptCellExporter,\n            # Version 1.0 on 2018-08-22 - jupytext v0.5.2 : Initial version\n            current_version_number=\"1.0\",\n        )\n        for ext in [\".r\", \".R\"]\n    ]\n    + [\n        NotebookFormatDescription(\n            format_name=\"sphinx\",\n            extension=\".py\",\n            header_prefix=\"#\",\n            cell_reader_class=SphinxGalleryScriptCellReader,\n            cell_exporter_class=SphinxGalleryCellExporter,\n            # Version 1.0 on 2018-09-22 - jupytext v0.7.0rc0 : Initial version\n            current_version_number=\"1.1\",\n        ),\n        NotebookFormatDescription(\n            format_name=\"pandoc\",\n            extension=\".md\",\n            header_prefix=\"\",\n            cell_reader_class=None,\n            cell_exporter_class=None,\n            current_version_number=pandoc_version(),\n        ),\n        NotebookFormatDescription(\n            format_name=\"quarto\",\n            extension=\".qmd\",\n            header_prefix=\"\",\n            cell_reader_class=None,\n            cell_exporter_class=None,\n            # Version 1.0 on 2021-09-07 = quarto --version >= 0.2.134,\n            # cf. https://github.com/mwouts/jupytext/issues/837\n            current_version_number=\"1.0\",\n        ),\n        NotebookFormatDescription(\n            format_name=\"marimo\",\n            extension=\".py\",\n            header_prefix=\"\",\n            cell_reader_class=None,\n            cell_exporter_class=None,\n            # Version 1.0 on 2025-09-07\n            current_version_number=\"1.0\",\n        ),\n    ]\n    + [\n        NotebookFormatDescription(\n            format_name=MYST_FORMAT_NAME,\n            extension=ext,\n            header_prefix=\"\",\n            cell_reader_class=None,\n            cell_exporter_class=None,\n            current_version_number=myst_version(),\n        )\n        for ext in myst_extensions()\n    ]\n)\n\nNOTEBOOK_EXTENSIONS = list(dict.fromkeys([\".ipynb\"] + [fmt.extension for fmt in JUPYTEXT_FORMATS]))\nEXTENSION_PREFIXES = [\".lgt\", \".spx\", \".pct\", \".hyd\", \".nb\"]\nFORMATS_WITH_NO_CELL_METADATA = {\"sphinx\", \"nomarker\", \"spin\", \"quarto\", \"marimo\"}\n\n\ndef get_format_implementation(ext, format_name=None):\n    \"\"\"Return the implementation for the desired format\"\"\"\n    # remove pre-extension if any\n    ext = \".\" + ext.split(\".\")[-1]\n\n    formats_for_extension = []\n    for fmt in JUPYTEXT_FORMATS:\n        if fmt.extension == ext:\n            if fmt.format_name == format_name or not format_name:\n                return fmt\n            formats_for_extension.append(fmt.format_name)\n\n    if formats_for_extension:\n        raise JupytextFormatError(\n            \"Format '{}' is not associated to extension '{}'. Please choose one of: {}.\".format(\n                format_name, ext, \", \".join(formats_for_extension)\n            )\n        )\n    raise JupytextFormatError(f\"No format associated to extension '{ext}'\")\n\n\ndef read_metadata(text, ext):\n    \"\"\"Return the header metadata\"\"\"\n    ext = \".\" + ext.split(\".\")[-1]\n    lines = text.splitlines()\n\n    if ext in [\".md\", \".markdown\", \".Rmd\"]:\n        comment = comment_suffix = \"\"\n    else:\n        comment = _SCRIPT_EXTENSIONS.get(ext, {}).get(\"comment\", \"#\")\n        comment_suffix = _SCRIPT_EXTENSIONS.get(ext, {}).get(\"comment_suffix\", \"\")\n\n    metadata, _, _, _ = header_to_metadata_and_cell(lines, comment, comment_suffix, ext)\n    if ext in [\".r\", \".R\"] and not metadata:\n        metadata, _, _, _ = header_to_metadata_and_cell(lines, \"#'\", \"\", ext)\n\n    # metadata in MyST format may be at root level (i.e. not caught above)\n    if not metadata and ext in myst_extensions() and text.startswith(\"---\"):\n        for header in yaml.safe_load_all(text):\n            if not isinstance(header, dict):\n                continue\n            if header.get(\"jupytext\", {}).get(\"text_representation\", {}).get(\"format_name\") == MYST_FORMAT_NAME:\n                return header\n            return metadata\n\n    return metadata\n\n\ndef read_format_from_metadata(text, ext):\n    \"\"\"Return the format of the file, when that information is available from the metadata\"\"\"\n    metadata = read_metadata(text, ext)\n    rearrange_jupytext_metadata(metadata)\n    return format_name_for_ext(metadata, ext, explicit_default=False)\n\n\ndef guess_format(text, ext):\n    \"\"\"Guess the format and format options of the file, given its extension and content\"\"\"\n    metadata = read_metadata(text, ext)\n\n    if \"text_representation\" in metadata.get(\"jupytext\", {}):\n        return format_name_for_ext(metadata, ext), {}\n\n    if is_myst_available() and ext in myst_extensions() and matches_mystnb(text, ext, requires_meta=False):\n        return MYST_FORMAT_NAME, {}\n\n    lines = text.splitlines()\n\n    # Is this a Hydrogen-like script?\n    # Or a Sphinx-gallery script?\n    if ext in _SCRIPT_EXTENSIONS:\n        unescaped_comment = _SCRIPT_EXTENSIONS[ext][\"comment\"]\n        comment = re.escape(unescaped_comment)\n        language = _SCRIPT_EXTENSIONS[ext][\"language\"]\n        twenty_hash_re = re.compile(r\"^#( |)#{19,}\\s*$\")\n        double_percent_re = re.compile(rf\"^{comment}( %%|%%)$\")\n        double_percent_and_space_re = re.compile(rf\"^{comment}( %%|%%)\\s\")\n        nbconvert_script_re = re.compile(rf\"^{comment}( <codecell>| In\\[[0-9 ]*\\]:?)\")\n        vim_folding_markers_re = re.compile(rf\"^{comment}\\s*\" + \"{{{\")\n        vscode_folding_markers_re = re.compile(rf\"^{comment}\\s*region\")\n        marimo_cell_re = re.compile(r\"^@app.cell.*\")\n\n        twenty_hash_count = 0\n        double_percent_count = 0\n        magic_command_count = 0\n        rspin_comment_count = 0\n        vim_folding_markers_count = 0\n        vscode_folding_markers_count = 0\n        marimo_app_count = 0\n\n        parser = StringParser(language=\"R\" if ext in [\".r\", \".R\"] else \"python\")\n        for line in lines:\n            parser.read_line(line)\n            if parser.is_quoted():\n                continue\n\n            # Don't count escaped Jupyter magics (no space between %% and command) as cells\n            if double_percent_re.match(line) or double_percent_and_space_re.match(line) or nbconvert_script_re.match(line):\n                double_percent_count += 1\n\n            if not line.startswith(unescaped_comment) and is_magic(line, language):\n                magic_command_count += 1\n\n            if twenty_hash_re.match(line) and ext == \".py\":\n                twenty_hash_count += 1\n\n            if line.startswith(\"#'\") and ext in [\".R\", \".r\"]:\n                rspin_comment_count += 1\n\n            if vim_folding_markers_re.match(line):\n                vim_folding_markers_count += 1\n\n            if vscode_folding_markers_re.match(line):\n                vscode_folding_markers_count += 1\n\n            if ext == \".py\" and (line in {\"import marimo\", \"app = marimo.App()\"} or marimo_cell_re.match(line)):\n                marimo_app_count += 1\n\n        if double_percent_count >= 1:\n            if magic_command_count:\n                return \"hydrogen\", {}\n            return \"percent\", {}\n\n        if marimo_app_count >= 2:\n            return \"marimo\", {}\n\n        if vim_folding_markers_count:\n            return \"light\", {\"cell_markers\": \"{{{,}}}\"}\n\n        if vscode_folding_markers_count:\n            return \"light\", {\"cell_markers\": \"region,endregion\"}\n\n        if twenty_hash_count >= 2:\n            return \"sphinx\", {}\n\n        if rspin_comment_count >= 1:\n            return \"spin\", {}\n\n    if ext in [\".md\", \".markdown\"]:\n        for line in lines:\n            if line.startswith(\":::\"):  # Pandoc div\n                return \"pandoc\", {}\n\n    # Default format\n    return get_format_implementation(ext).format_name, {}\n\n\ndef divine_format(text):\n    \"\"\"Guess the format of the notebook, based on its content #148\"\"\"\n    try:\n        nbformat.reads(text, as_version=4)\n        return \"ipynb\"\n    except nbformat.reader.NotJSONError:\n        pass\n\n    lines = text.splitlines()\n    for comment in [\"\", \"#\"] + _COMMENT_CHARS:\n        metadata, _, _, _ = header_to_metadata_and_cell(lines, comment, \"\")\n        ext = metadata.get(\"jupytext\", {}).get(\"text_representation\", {}).get(\"extension\")\n        if ext:\n            return ext[1:] + \":\" + guess_format(text, ext)[0]\n\n    # No metadata, but ``` on at least one line => markdown\n    for line in lines:\n        if line == \"```\":\n            return \"md\"\n\n    return \"py:\" + guess_format(text, \".py\")[0]\n\n\ndef check_file_version(notebook, source_path, outputs_path):\n    \"\"\"Raise if file version in source file would override outputs\"\"\"\n    if not insert_or_test_version_number():\n        return\n\n    if source_path == \"-\":\n        # https://github.com/mwouts/jupytext/issues/1282\n        ext = notebook.metadata[\"jupytext\"][\"text_representation\"][\"extension\"]\n    else:\n        _, ext = os.path.splitext(source_path)\n        assert not ext.endswith(\".ipynb\"), f\"source_path={source_path} should be a text file\"\n\n    version = notebook.metadata.get(\"jupytext\", {}).get(\"text_representation\", {}).get(\"format_version\")\n    format_name = format_name_for_ext(notebook.metadata, ext)\n\n    fmt = get_format_implementation(ext, format_name)\n    current = fmt.current_version_number\n\n    # Missing version, still generated by jupytext?\n    if notebook.metadata and not version:\n        version = current\n\n    # Same version? OK\n    if version == fmt.current_version_number:\n        return\n\n    # Version larger than minimum readable version\n    if (fmt.min_readable_version_number or current) <= version <= current:\n        return\n\n    jupytext_version_in_file = (\n        notebook.metadata.get(\"jupytext\", {}).get(\"text_representation\", {}).get(\"jupytext_version\", \"N/A\")\n    )\n\n    raise JupytextFormatError(\n        \"The file {source_path} was generated with jupytext version {jupytext_version_in_file} \"\n        \"but you have {jupytext_version} installed. Please upgrade jupytext to version \"\n        \"{jupytext_version_in_file}, or remove either {source_path} or {output_path}. \"\n        \"This error occurs because {source_path} is in the {format_name} format in version {format_version}, \"\n        \"while jupytext version {jupytext_version} installed at {jupytext_path} can only read the \"\n        \"{format_name} format in versions {min_format_version} to {current_format_version}.\".format(\n            source_path=os.path.basename(source_path),\n            output_path=os.path.basename(outputs_path),\n            format_name=format_name,\n            format_version=version,\n            jupytext_version_in_file=jupytext_version_in_file,\n            jupytext_version=__version__,\n            jupytext_path=os.path.dirname(os.path.dirname(__file__)),\n            min_format_version=fmt.min_readable_version_number or current,\n            current_format_version=current,\n        )\n    )\n\n\ndef format_name_for_ext(metadata, ext, cm_default_formats=None, explicit_default=True):\n    \"\"\"Return the format name for that extension\"\"\"\n    # Is the format information available in the text representation?\n    text_repr = metadata.get(\"jupytext\", {}).get(\"text_representation\", {})\n    if text_repr.get(\"extension\", \"\").endswith(ext) and text_repr.get(\"format_name\"):\n        return text_repr.get(\"format_name\")\n\n    # Format from jupytext.formats\n    formats = metadata.get(\"jupytext\", {}).get(\"formats\", \"\") or cm_default_formats\n    formats = long_form_multiple_formats(formats)\n    for fmt in formats:\n        if fmt[\"extension\"] == ext:\n            if (not explicit_default) or fmt.get(\"format_name\"):\n                return fmt.get(\"format_name\")\n\n    if (not explicit_default) or ext in [\".md\", \".markdown\", \".Rmd\"]:\n        return None\n\n    return get_format_implementation(ext).format_name\n\n\ndef identical_format_path(fmt1, fmt2):\n    \"\"\"Do the two (long representation) of formats target the same file?\"\"\"\n    for key in [\"extension\", \"prefix\", \"suffix\"]:\n        if fmt1.get(key) != fmt2.get(key):\n            return False\n    return True\n\n\ndef update_jupytext_formats_metadata(metadata, new_format):\n    \"\"\"Update the jupytext_format metadata in the Jupyter notebook\"\"\"\n    new_format = long_form_one_format(new_format)\n    formats = long_form_multiple_formats(metadata.get(\"jupytext\", {}).get(\"formats\", \"\"))\n    if not formats:\n        return\n\n    for fmt in formats:\n        if identical_format_path(fmt, new_format):\n            fmt[\"format_name\"] = new_format.get(\"format_name\")\n            break\n\n    metadata.setdefault(\"jupytext\", {})[\"formats\"] = short_form_multiple_formats(formats)\n\n\ndef rearrange_jupytext_metadata(metadata):\n    \"\"\"Convert the jupytext_formats metadata entry to jupytext/formats, etc. See #91\"\"\"\n\n    # Backward compatibility with nbrmd\n    for key in [\"nbrmd_formats\", \"nbrmd_format_version\"]:\n        if key in metadata:\n            metadata[key.replace(\"nbrmd\", \"jupytext\")] = metadata.pop(key)\n\n    jupytext_metadata = metadata.get(\"jupytext\", {})\n\n    if \"jupytext_formats\" in metadata:\n        jupytext_metadata[\"formats\"] = metadata.pop(\"jupytext_formats\")\n    if \"jupytext_format_version\" in metadata:\n        jupytext_metadata[\"text_representation\"] = {\"format_version\": metadata.pop(\"jupytext_format_version\")}\n    if \"main_language\" in metadata:\n        jupytext_metadata[\"main_language\"] = metadata.pop(\"main_language\")\n    for entry in [\"encoding\", \"executable\"]:\n        if entry in metadata:\n            jupytext_metadata[entry] = metadata.pop(entry)\n\n    filters = jupytext_metadata.pop(\"metadata_filter\", {})\n    if \"notebook\" in filters:\n        jupytext_metadata[\"notebook_metadata_filter\"] = filters[\"notebook\"]\n    if \"cells\" in filters:\n        jupytext_metadata[\"cell_metadata_filter\"] = filters[\"cells\"]\n\n    for filter_level in [\"notebook_metadata_filter\", \"cell_metadata_filter\"]:\n        if filter_level in jupytext_metadata:\n            jupytext_metadata[filter_level] = metadata_filter_as_string(jupytext_metadata[filter_level])\n\n    if jupytext_metadata.get(\"text_representation\", {}).get(\"jupytext_version\", \"\").startswith(\"0.\"):\n        formats = jupytext_metadata.get(\"formats\")\n        if formats:\n            jupytext_metadata[\"formats\"] = \",\".join([\".\" + fmt if fmt.rfind(\".\") > 0 else fmt for fmt in formats.split(\",\")])\n\n    # auto to actual extension\n    formats = jupytext_metadata.get(\"formats\")\n    if formats:\n        jupytext_metadata[\"formats\"] = short_form_multiple_formats(long_form_multiple_formats(formats, metadata))\n\n    if jupytext_metadata:\n        metadata[\"jupytext\"] = jupytext_metadata\n\n\ndef long_form_one_format(jupytext_format, metadata=None, update=None, auto_ext_requires_language_info=True):\n    \"\"\"Parse 'sfx.py:percent' into {'suffix':'sfx', 'extension':'py', 'format_name':'percent'}\"\"\"\n    if isinstance(jupytext_format, dict):\n        if update:\n            jupytext_format.update(update)\n        return validate_one_format(jupytext_format)\n\n    if not jupytext_format:\n        return {}\n\n    common_name_to_ext = {\n        \"notebook\": \"ipynb\",\n        \"rmarkdown\": \"Rmd\",\n        \"quarto\": \"qmd\",\n        \"marimo\": \"py\",\n        \"markdown\": \"md\",\n        \"script\": \"auto\",\n        \"c++\": \"cpp\",\n        \"myst\": \"md:myst\",\n        \"pandoc\": \"md:pandoc\",\n    }\n    if jupytext_format.lower() in common_name_to_ext:\n        jupytext_format = common_name_to_ext[jupytext_format.lower()]\n\n    fmt = {}\n\n    if jupytext_format.rfind(\"/\") > 0:\n        fmt[\"prefix\"], jupytext_format = jupytext_format.rsplit(\"/\", 1)\n\n    if jupytext_format.rfind(\":\") >= 0:\n        ext, fmt[\"format_name\"] = jupytext_format.rsplit(\":\", 1)\n        if fmt[\"format_name\"] == \"bare\":\n            warnings.warn(\n                \"The `bare` format has been renamed to `nomarker` - (see https://github.com/mwouts/jupytext/issues/397)\",\n                DeprecationWarning,\n            )\n            fmt[\"format_name\"] = \"nomarker\"\n    elif not jupytext_format or \".\" in jupytext_format or (\".\" + jupytext_format) in NOTEBOOK_EXTENSIONS + [\".auto\"]:\n        ext = jupytext_format\n    elif jupytext_format in _VALID_FORMAT_NAMES:\n        fmt[\"format_name\"] = jupytext_format\n        ext = \"\"\n    else:\n        raise JupytextFormatError(\n            \"'{}' is not a notebook extension (one of {}), nor a notebook format (one of {})\".format(\n                jupytext_format,\n                \", \".join(NOTEBOOK_EXTENSIONS),\n                \", \".join(_VALID_FORMAT_NAMES),\n            )\n        )\n\n    if ext.rfind(\".\") > 0:\n        fmt[\"suffix\"], ext = os.path.splitext(ext)\n\n    if not ext.startswith(\".\"):\n        ext = \".\" + ext\n\n    if ext == \".auto\":\n        ext = auto_ext_from_metadata(metadata) if metadata is not None else \".auto\"\n        if not ext:\n            if auto_ext_requires_language_info:\n                raise JupytextFormatError(\n                    \"No language information in this notebook. Please replace 'auto' with an actual script extension.\"\n                )\n            ext = \".auto\"\n\n    fmt[\"extension\"] = ext\n    if update:\n        fmt.update(update)\n    return validate_one_format(fmt)\n\n\ndef long_form_multiple_formats(\n    jupytext_formats: str, metadata=None, auto_ext_requires_language_info=True\n) -> list[dict[str, str]]:\n    \"\"\"Convert a concise encoding of jupytext.formats to a list of formats, encoded as dictionaries\"\"\"\n    if not jupytext_formats:\n        return []\n\n    if not isinstance(jupytext_formats, list):\n        jupytext_formats = [fmt for fmt in jupytext_formats.split(\",\") if fmt]\n\n    jupytext_formats = [\n        long_form_one_format(\n            fmt,\n            metadata,\n            auto_ext_requires_language_info=auto_ext_requires_language_info,\n        )\n        for fmt in jupytext_formats\n    ]\n\n    if not auto_ext_requires_language_info:\n        jupytext_formats = [fmt for fmt in jupytext_formats if fmt[\"extension\"] != \".auto\"]\n\n    return jupytext_formats\n\n\ndef short_form_one_format(jupytext_format: dict[str, str]) -> str:\n    \"\"\"Represent one jupytext format as a string\"\"\"\n    if not isinstance(jupytext_format, dict):\n        return jupytext_format\n    fmt = jupytext_format[\"extension\"]\n    if \"suffix\" in jupytext_format:\n        fmt = jupytext_format[\"suffix\"] + fmt\n    elif fmt.startswith(\".\"):\n        fmt = fmt[1:]\n\n    if \"prefix\" in jupytext_format:\n        fmt = jupytext_format[\"prefix\"] + \"/\" + fmt\n\n    if jupytext_format.get(\"format_name\"):\n        if jupytext_format[\"extension\"] not in [\n            \".md\",\n            \".markdown\",\n            \".Rmd\",\n        ] or jupytext_format[\"format_name\"] in [\"pandoc\", MYST_FORMAT_NAME]:\n            fmt = fmt + \":\" + jupytext_format[\"format_name\"]\n\n    return fmt\n\n\ndef short_form_multiple_formats(jupytext_formats: list[dict[str, str]]) -> str:\n    \"\"\"Convert jupytext formats, represented as a list of dictionaries, to a comma separated list\"\"\"\n    if not isinstance(jupytext_formats, list):\n        return jupytext_formats\n\n    jupytext_formats = [short_form_one_format(fmt) for fmt in jupytext_formats]\n    return \",\".join(jupytext_formats)\n\n\n_VALID_FORMAT_INFO = [\"extension\", \"format_name\", \"suffix\", \"prefix\"]\n_BINARY_FORMAT_OPTIONS = [\n    \"comment_magics\",\n    \"hide_notebook_metadata\",\n    \"root_level_metadata_as_raw_cell\",\n    \"split_at_heading\",\n    \"rst2md\",\n    \"cell_metadata_json\",\n    \"use_runtools\",\n    \"doxygen_equation_markers\",\n]\n_VALID_FORMAT_OPTIONS = _BINARY_FORMAT_OPTIONS + [\n    \"notebook_metadata_filter\",\n    \"root_level_metadata_filter\",\n    \"cell_metadata_filter\",\n    \"cell_markers\",\n    \"custom_cell_magics\",\n]\n_VALID_FORMAT_NAMES = {fmt.format_name for fmt in JUPYTEXT_FORMATS}\n\n\ndef validate_one_format(jupytext_format: dict[str, str]) -> dict[str, str]:\n    \"\"\"Validate extension and options for the given format\"\"\"\n    if not isinstance(jupytext_format, dict):\n        raise JupytextFormatError(\"Jupytext format should be a dictionary\")\n\n    if \"format_name\" in jupytext_format and jupytext_format[\"format_name\"] not in _VALID_FORMAT_NAMES:\n        raise JupytextFormatError(\n            \"{} is not a valid format name. Please choose one of {}\".format(\n                jupytext_format.get(\"format_name\"), \", \".join(_VALID_FORMAT_NAMES)\n            )\n        )\n\n    for key in jupytext_format:\n        if key not in _VALID_FORMAT_INFO + _VALID_FORMAT_OPTIONS:\n            raise JupytextFormatError(\n                \"Unknown format option '{}' - should be one of '{}'\".format(key, \"', '\".join(_VALID_FORMAT_OPTIONS))\n            )\n        value = jupytext_format[key]\n        if key in _BINARY_FORMAT_OPTIONS:\n            if not isinstance(value, bool):\n                raise JupytextFormatError(f\"Format option '{key}' should be a bool, not '{str(value)}'\")\n\n    if \"extension\" not in jupytext_format:\n        raise JupytextFormatError(\"Missing format extension\")\n    ext = jupytext_format[\"extension\"]\n    if ext not in NOTEBOOK_EXTENSIONS + [\".auto\"]:\n        raise JupytextFormatError(\n            \"Extension '{}' is not a notebook extension. Please use one of '{}'.\".format(\n                ext, \"', '\".join(NOTEBOOK_EXTENSIONS + [\".auto\"])\n            )\n        )\n\n    return jupytext_format\n\n\ndef auto_ext_from_metadata(metadata):\n    \"\"\"Script extension from notebook metadata\"\"\"\n    auto_ext = metadata.get(\"language_info\", {}).get(\"file_extension\")\n\n    # Sage notebooks have \".py\" as the associated extension in \"language_info\",\n    # so we change it to \".sage\" in that case, see #727\n    if auto_ext == \".py\" and metadata.get(\"kernelspec\", {}).get(\"language\") == \"sage\":\n        auto_ext = \".sage\"\n\n    if auto_ext is None:\n        language = metadata.get(\"kernelspec\", {}).get(\"language\") or metadata.get(\"jupytext\", {}).get(\"main_language\")\n        if language:\n            for ext in _SCRIPT_EXTENSIONS:\n                if same_language(language, _SCRIPT_EXTENSIONS[ext][\"language\"]):\n                    auto_ext = ext\n                    break\n\n    if auto_ext == \".r\":\n        return \".R\"\n\n    if auto_ext == \".fs\":\n        return \".fsx\"\n\n    if auto_ext == \".resource\":\n        return \".robot\"\n\n    # Handle ROOT C++ notebooks\n    # https://tinyurl.com/root-cpp-notebook-doc\n    if auto_ext == \".C\":\n        return \".cpp\"\n\n    return auto_ext\n\n\ndef check_auto_ext(fmt, metadata, option):\n    \"\"\"Replace the auto extension with the actual file extension, and raise a ValueError if it cannot be determined\"\"\"\n    if fmt[\"extension\"] != \".auto\":\n        return fmt\n\n    auto_ext = auto_ext_from_metadata(metadata)\n    if auto_ext:\n        fmt = fmt.copy()\n        fmt[\"extension\"] = auto_ext\n        return fmt\n\n    raise ValueError(\n        \"The notebook does not have a 'language_info' metadata. \"\n        \"Please replace 'auto' with the actual language extension in the {} option (currently {}).\".format(\n            option, short_form_one_format(fmt)\n        )\n    )\n\n\ndef formats_with_support_for_cell_metadata():\n    for fmt in JUPYTEXT_FORMATS:\n        if fmt.format_name == \"myst\" and not is_myst_available():\n            continue\n        if fmt.format_name == \"pandoc\" and not is_pandoc_available():\n            continue\n        if fmt.format_name in FORMATS_WITH_NO_CELL_METADATA:\n            continue\n\n        yield f\"{fmt.extension[1:]}:{fmt.format_name}\"\n\n\ndef get_formats_from_notebook_metadata(notebook):\n    \"\"\"\n    Get the pairing information from the notebook metadata.\n\n    Parameters\n    ----------\n    notebook : nbformat.NotebookNode\n        The notebook object whose metadata will be inspected.\n\n    Returns\n    -------\n    formats : None or str\n        The value of the 'formats' field in the 'jupytext' metadata, which can be None or a string.\n    \"\"\"\n    return notebook.metadata.get(\"jupytext\", {}).get(\"formats\")\n"
  },
  {
    "path": "src/jupytext/header.py",
    "content": "\"\"\"Parse header of text notebooks\"\"\"\n\nimport logging\nimport re\n\nimport nbformat\nimport yaml\nfrom nbformat.v4.nbbase import new_raw_cell\nfrom yaml.representer import SafeRepresenter\n\nfrom .languages import (\n    _SCRIPT_EXTENSIONS,\n    comment_lines,\n    default_language_from_metadata_and_ext,\n)\nfrom .metadata_filter import (\n    _DEFAULT_NOTEBOOK_METADATA,\n    _DEFAULT_ROOT_LEVEL_METADATA,\n    _JUPYTER_METADATA_NAMESPACE,\n    filter_metadata,\n)\nfrom .myst import MYST_FORMAT_NAME\nfrom .pep8 import pep8_lines_between_cells\nfrom .version import __version__\n\nSafeRepresenter.add_representer(nbformat.NotebookNode, SafeRepresenter.represent_dict)\n\n_HEADER_RE = re.compile(r\"^---\\s*$\")\n_BLANK_RE = re.compile(r\"^\\s*$\")\n_JUPYTER_RE = re.compile(r\"^jupyter\\s*:\\s*$\")\n_LEFTSPACE_RE = re.compile(r\"^\\s\")\n_UTF8_HEADER = \" -*- coding: utf-8 -*-\"\n\n# Change this to False in tests\nINSERT_AND_CHECK_VERSION_NUMBER = True\n\n\ndef insert_or_test_version_number():\n    \"\"\"Should the format name and version number be inserted in text\n    representations (not in tests!)\"\"\"\n    return INSERT_AND_CHECK_VERSION_NUMBER\n\n\ndef uncomment_line(line, prefix, suffix=\"\"):\n    \"\"\"Remove prefix (and space) from line\"\"\"\n    if prefix:\n        if line.startswith(prefix + \" \"):\n            line = line[len(prefix) + 1 :]\n        elif line.startswith(prefix):\n            line = line[len(prefix) :]\n    if suffix:\n        if line.endswith(suffix + \" \"):\n            line = line[: -(1 + len(suffix))]\n        elif line.endswith(suffix):\n            line = line[: -len(suffix)]\n    return line\n\n\ndef encoding_and_executable(notebook, metadata, ext):\n    \"\"\"Return encoding and executable lines for a notebook, if applicable\"\"\"\n    lines = []\n    comment = _SCRIPT_EXTENSIONS.get(ext, {}).get(\"comment\")\n    jupytext_metadata = metadata.get(\"jupytext\", {})\n\n    if comment is not None and \"executable\" in jupytext_metadata:\n        lines.append(\"#!\" + jupytext_metadata.pop(\"executable\"))\n\n    if comment is not None:\n        if \"encoding\" in jupytext_metadata:\n            lines.append(jupytext_metadata.pop(\"encoding\"))\n        elif default_language_from_metadata_and_ext(metadata, ext) != \"python\":\n            for cell in notebook.cells:\n                try:\n                    cell.source.encode(\"ascii\")\n                except (UnicodeEncodeError, UnicodeDecodeError):\n                    lines.append(comment + _UTF8_HEADER)\n                    break\n\n    return lines\n\n\ndef insert_jupytext_info_and_filter_metadata(metadata, fmt, text_format, unsupported_keys):\n    \"\"\"Update the notebook metadata to include Jupytext information, and filter\n    the notebook metadata according to the default or user filter\"\"\"\n    if insert_or_test_version_number():\n        metadata.setdefault(\"jupytext\", {})[\"text_representation\"] = {\n            \"extension\": fmt[\"extension\"],\n            \"format_name\": text_format.format_name,\n            \"format_version\": text_format.current_version_number,\n            \"jupytext_version\": __version__,\n        }\n\n    if \"jupytext\" in metadata and not metadata[\"jupytext\"]:\n        del metadata[\"jupytext\"]\n\n    notebook_metadata_filter = fmt.get(\"notebook_metadata_filter\")\n    return filter_metadata(\n        metadata,\n        notebook_metadata_filter,\n        _DEFAULT_NOTEBOOK_METADATA,\n        unsupported_keys=unsupported_keys,\n    )\n\n\ndef metadata_and_cell_to_header(notebook, metadata, text_format, fmt, unsupported_keys=None):\n    \"\"\"\n    Return the text header corresponding to a notebook, and remove the\n    first cell of the notebook if it contained the header\n    \"\"\"\n\n    header = []\n\n    lines_to_next_cell = None\n    root_level_metadata = {}\n    root_level_metadata_as_raw_cell = fmt.get(\"root_level_metadata_as_raw_cell\", True)\n\n    if not root_level_metadata_as_raw_cell:\n        root_level_metadata = metadata.get(\"jupytext\", {}).pop(\"root_level_metadata\", {})\n    elif notebook.cells:\n        cell = notebook.cells[0]\n        if cell.cell_type == \"raw\":\n            lines = cell.source.strip(\"\\n\\t \").splitlines()\n            if len(lines) >= 2 and _HEADER_RE.match(lines[0]) and _HEADER_RE.match(lines[-1]):\n                header = lines[1:-1]\n                lines_to_next_cell = cell.metadata.get(\"lines_to_next_cell\")\n                notebook.cells = notebook.cells[1:]\n\n    metadata = insert_jupytext_info_and_filter_metadata(metadata, fmt, text_format, unsupported_keys)\n\n    if metadata:\n        root_level_metadata[\"jupyter\"] = metadata\n\n    if root_level_metadata:\n        header.extend(yaml.safe_dump(root_level_metadata, default_flow_style=False).splitlines())\n\n    if header:\n        header = [\"---\"] + header + [\"---\"]\n\n        if fmt.get(\"hide_notebook_metadata\", False) and text_format.format_name == \"markdown\":\n            header = [\"<!--\", \"\"] + header + [\"\", \"-->\"]\n\n    return (\n        comment_lines(header, text_format.header_prefix, text_format.header_suffix),\n        lines_to_next_cell,\n    )\n\n\ndef recursive_update(target, update, overwrite=True):\n    \"\"\"Update recursively a (nested) dictionary with the content of another.\n    Inspired from https://stackoverflow.com/questions/3232943/update-value-of-a-nested-dictionary-of-varying-depth\n    \"\"\"\n    for key in update:\n        value = update[key]\n        if value is None:\n            del target[key]\n        elif isinstance(value, dict):\n            target[key] = recursive_update(\n                target.get(key, {}),\n                value,\n                overwrite=overwrite,\n            )\n        elif overwrite:\n            target[key] = value\n        else:\n            target.setdefault(key, value)\n    return target\n\n\ndef header_to_metadata_and_cell(lines, header_prefix, header_suffix, ext=None, root_level_metadata_as_raw_cell=True):\n    \"\"\"\n    Return the metadata, a boolean to indicate if a jupyter section was found,\n    the first cell of notebook if some metadata is found outside\n    the jupyter section, and next loc in text\n    \"\"\"\n\n    header = []\n    jupyter = []\n    in_jupyter = False\n    in_html_div = False\n\n    start = 0\n    started = False\n    ended = False\n    metadata = {}\n    i = -1\n\n    comment = \"#\" if header_prefix == \"#'\" else header_prefix\n\n    encoding_re = re.compile(rf\"^[ \\t\\f]*{re.escape(comment)}.*?coding[:=][ \\t]*([-_.a-zA-Z0-9]+)\")\n\n    for i, line in enumerate(lines):\n        if i == 0 and line.startswith(\"#!\"):\n            metadata.setdefault(\"jupytext\", {})[\"executable\"] = line[2:]\n            start = i + 1\n            continue\n        if i == 0 or (i == 1 and not encoding_re.match(lines[0])):\n            encoding = encoding_re.match(line)\n            if encoding:\n                if encoding.group(1) != \"utf-8\":\n                    raise ValueError(\"Encodings other than utf-8 are not supported\")\n                metadata.setdefault(\"jupytext\", {})[\"encoding\"] = line\n                start = i + 1\n                continue\n        if not line.startswith(header_prefix):\n            break\n        if not comment:\n            if line.strip().startswith(\"<!--\"):\n                in_html_div = True\n                continue\n\n        if in_html_div:\n            if ended:\n                if \"-->\" in line:\n                    break\n            if not started and not line.strip():\n                continue\n\n        line = uncomment_line(line, header_prefix, header_suffix)\n        if _HEADER_RE.match(line):\n            if not started:\n                started = True\n                continue\n            ended = True\n            if in_html_div:\n                continue\n            break\n\n        # Stop if there is something else than a YAML header\n        if not started and line.strip():\n            break\n\n        if _JUPYTER_RE.match(line):\n            in_jupyter = True\n        elif line and not _LEFTSPACE_RE.match(line):\n            in_jupyter = False\n\n        if in_jupyter:\n            jupyter.append(line)\n        else:\n            header.append(line)\n\n    if ended:\n        if jupyter:\n            extra_metadata = metadata\n            metadata = yaml.safe_load(\"\\n\".join(jupyter))[\"jupyter\"]\n            recursive_update(metadata, extra_metadata)\n\n        lines_to_next_cell = 1\n        if len(lines) > i + 1:\n            line = uncomment_line(lines[i + 1], header_prefix)\n            if not _BLANK_RE.match(line):\n                lines_to_next_cell = 0\n            else:\n                i = i + 1\n        else:\n            lines_to_next_cell = 0\n\n        if header:\n            if root_level_metadata_as_raw_cell:\n                cell = new_raw_cell(\n                    source=\"\\n\".join([\"---\"] + header + [\"---\"]),\n                    metadata=(\n                        {}\n                        if lines_to_next_cell == pep8_lines_between_cells([\"---\"], lines[i + 1 :], ext)\n                        else {\"lines_to_next_cell\": lines_to_next_cell}\n                    ),\n                )\n            else:\n                cell = None\n                root_level_metadata = yaml.safe_load(\"\\n\".join(header))\n                metadata.setdefault(\"jupytext\", {})[\"root_level_metadata\"] = root_level_metadata\n        else:\n            cell = None\n\n        return metadata, jupyter, cell, i + 1\n\n    return metadata, False, None, start\n\n\ndef default_root_level_metadata_filter(fmt):\n    \"\"\"Return defaults for settings that promote or demote root level metadata.\"\"\"\n    if fmt and fmt.get(\"format_name\") == MYST_FORMAT_NAME:\n        from .myst import _DEFAULT_ROOT_LEVEL_METADATA as default_filter\n    else:\n        default_filter = _DEFAULT_ROOT_LEVEL_METADATA\n    return default_filter\n\n\ndef metadata_to_metadata_and_cell(nb, metadata, fmt, unsupported_keys=None):\n    # stash notebook metadata, including keys promoted to the root level\n    metadata = recursive_update(\n        metadata,\n        filter_metadata(\n            nb.metadata,\n            fmt.get(\"root_level_metadata_filter\", \"\"),\n            default_root_level_metadata_filter(fmt),\n            unsupported_keys=unsupported_keys,\n            remove=True,\n        ),\n    )\n    # move remaining metadata (i.e. frontmatter) to the first notebook cell\n    if nb.metadata and fmt.get(\"root_level_metadata_as_raw_cell\", True):\n        frontmatter = yaml.safe_dump(nb.metadata, sort_keys=False)\n        nb.cells.insert(0, new_raw_cell(\"---\\n\" + frontmatter + \"---\"))\n    # attach the stashed metadata to notebook\n    nb.metadata = metadata\n    return nb\n\n\ndef metadata_and_cell_to_metadata(nb, fmt, unsupported_keys=None):\n    # new metadata from filtered nb.metadata\n    metadata = filter_metadata(\n        nb.metadata,\n        fmt.get(\"root_level_metadata_filter\", \"\"),\n        default_root_level_metadata_filter(fmt),\n        unsupported_keys=unsupported_keys,\n        remove=True,\n    )\n    # remaining nb.metadata moved under namespace key for jupyter metadata\n    if nb.metadata:\n        metadata[_JUPYTER_METADATA_NAMESPACE] = nb.metadata\n    # move first cell frontmatter to the root level of nb.metadata (overwrites)\n    if nb.cells and fmt.get(\"root_level_metadata_as_raw_cell\", True):\n        cell = nb.cells[0]\n        if cell.cell_type == \"raw\":\n            lines = cell.source.strip(\"\\n\\t \").splitlines()\n            if len(lines) >= 2 and _HEADER_RE.match(lines[0]) and _HEADER_RE.match(lines[-1]):\n                try:\n                    frontmatter = next(yaml.safe_load_all(cell.source))\n                except (yaml.parser.ParserError, yaml.scanner.ScannerError):\n                    logging.warning(\"[jupytext] failed to parse YAML in raw cell\")\n                else:\n                    if not isinstance(frontmatter, dict):\n                        logging.warning(\"[jupytext] YAML header in raw cell is not a dictionary\")\n                    else:\n                        nb.cells = nb.cells[1:]\n                        if \"root_level_metadata_filter\" not in fmt and default_root_level_metadata_filter(fmt) == \"all\":\n                            metadata.setdefault(\"jupytext\", {})[\"root_level_metadata_filter\"] = \"-\" + \",-\".join(frontmatter)\n                        metadata = recursive_update(frontmatter, metadata, overwrite=False)\n    nb.metadata = metadata\n    return nb\n"
  },
  {
    "path": "src/jupytext/jupytext.py",
    "content": "\"\"\"Read and write Jupyter notebooks as text files\"\"\"\n\nimport logging\nimport os\nimport sys\nimport warnings\nfrom copy import copy, deepcopy\n\nimport nbformat\nfrom nbformat.v4.nbbase import NotebookNode, new_code_cell, new_notebook\nfrom nbformat.v4.rwbase import NotebookReader, NotebookWriter\n\nfrom .cell_metadata import _IGNORE_CELL_METADATA\nfrom .config import get_formats_from_notebook_and_config, load_jupytext_config\nfrom .formats import (\n    _VALID_FORMAT_OPTIONS,\n    divine_format,\n    format_name_for_ext,\n    get_format_implementation,\n    guess_format,\n    long_form_one_format,\n    read_format_from_metadata,\n    rearrange_jupytext_metadata,\n    update_jupytext_formats_metadata,\n)\nfrom .header import (\n    _JUPYTER_METADATA_NAMESPACE,\n    encoding_and_executable,\n    header_to_metadata_and_cell,\n    insert_jupytext_info_and_filter_metadata,\n    insert_or_test_version_number,\n    metadata_and_cell_to_header,\n    metadata_and_cell_to_metadata,\n    metadata_to_metadata_and_cell,\n)\nfrom .languages import (\n    _SCRIPT_EXTENSIONS,\n    default_language_from_metadata_and_ext,\n    set_main_and_cell_language,\n)\nfrom .metadata_filter import filter_metadata, update_metadata_filters\nfrom .myst import MYST_FORMAT_NAME, myst_extensions, myst_to_notebook, notebook_to_myst\nfrom .pandoc import md_to_notebook, notebook_to_md\nfrom .pep8 import pep8_lines_between_cells\nfrom .quarto import notebook_to_qmd, qmd_to_notebook\nfrom .marimo import notebook_to_marimo_py, marimo_py_to_notebook\nfrom .version import __version__\n\n\nclass NotSupportedNBFormatVersion(NotImplementedError):\n    \"\"\"An error issued when the current notebook format is not supported by this version of Jupytext\"\"\"\n\n\nclass TextNotebookConverter(NotebookReader, NotebookWriter):\n    \"\"\"A class that can read or write a Jupyter notebook as text\"\"\"\n\n    def __init__(self, fmt, config):\n        self.fmt = copy(long_form_one_format(fmt))\n        self.config = config\n        self.ext = self.fmt[\"extension\"]\n        self.implementation = get_format_implementation(self.ext, self.fmt.get(\"format_name\"))\n\n    def update_fmt_with_notebook_options(self, metadata, read=False):\n        \"\"\"Update format options with the values in the notebook metadata, and record those\n        options in the notebook metadata\"\"\"\n        # The settings in the Jupytext configuration file have precedence over the metadata in the notebook\n        # when the notebook is saved. This is because the metadata in the notebook might not be visible\n        # in the text representation when e.g. notebook_metadata_filter=\"-all\", which makes them hard to edit.\n        if not read and self.config is not None:\n            self.config.set_default_format_options(self.fmt, read)\n\n        # Use format options from the notebook if not already set by the config\n        for opt in _VALID_FORMAT_OPTIONS:\n            if opt in metadata.get(\"jupytext\", {}):\n                self.fmt.setdefault(opt, metadata[\"jupytext\"][opt])\n\n        # When we read the notebook we use the values of the config as defaults, as again the text representation\n        # of the notebook might not store the format options when notebook_metadata_filter=\"-all\"\n        if read and self.config is not None:\n            self.config.set_default_format_options(self.fmt, read=read)\n\n        # We save the format options in the notebook metadata\n        for opt in _VALID_FORMAT_OPTIONS:\n            if opt in self.fmt:\n                metadata.setdefault(\"jupytext\", {})[opt] = self.fmt[opt]\n\n        # Is this format the same as that documented in the YAML header? If so, we want to know the format version\n        file_fmt = metadata.get(\"jupytext\", {}).get(\"text_representation\", {})\n        if self.fmt.get(\"extension\") == file_fmt.get(\"extension\") and self.fmt.get(\"format_name\") == file_fmt.get(\n            \"format_name\"\n        ):\n            self.fmt.update(file_fmt)\n\n        # rST to md conversion should happen only once\n        if metadata.get(\"jupytext\", {}).get(\"rst2md\") is True:\n            metadata[\"jupytext\"][\"rst2md\"] = False\n\n    def reads(self, s, **_):\n        \"\"\"Read a notebook represented as text\"\"\"\n        if self.fmt.get(\"format_name\") == \"pandoc\":\n            return md_to_notebook(s)\n\n        if self.fmt.get(\"format_name\") == \"quarto\":\n            return qmd_to_notebook(s)\n\n        if self.fmt.get(\"format_name\") == \"marimo\":\n            return marimo_py_to_notebook(s)\n\n        if self.fmt.get(\"format_name\") == MYST_FORMAT_NAME:\n            nb = myst_to_notebook(s)\n            return self.split_frontmatter(nb)\n\n        lines = s.splitlines()\n\n        cells = []\n        metadata, jupyter_md, header_cell, pos = header_to_metadata_and_cell(\n            lines,\n            self.implementation.header_prefix,\n            self.implementation.header_suffix,\n            self.implementation.extension,\n            self.fmt.get(\n                \"root_level_metadata_as_raw_cell\",\n                (self.config.root_level_metadata_as_raw_cell if self.config is not None else True),\n            ),\n        )\n        default_language = default_language_from_metadata_and_ext(metadata, self.implementation.extension)\n        self.update_fmt_with_notebook_options(metadata, read=True)\n\n        if header_cell:\n            cells.append(header_cell)\n\n        lines = lines[pos:]\n\n        if self.implementation.format_name and self.implementation.format_name.startswith(\"sphinx\"):\n            cells.append(new_code_cell(source=\"%matplotlib inline\"))\n\n        cell_metadata_json = False\n\n        while lines:\n            reader = self.implementation.cell_reader_class(self.fmt, default_language)\n            cell, pos = reader.read(lines)\n            cells.append(cell)\n            cell_metadata_json = cell_metadata_json or reader.cell_metadata_json\n            if pos <= 0:\n                raise Exception(\"Blocked at lines \" + \"\\n\".join(lines[:6]))  # pragma: no cover\n            lines = lines[pos:]\n\n        custom_cell_magics = self.fmt.get(\"custom_cell_magics\", \"\").split(\",\")\n        set_main_and_cell_language(metadata, cells, self.implementation.extension, custom_cell_magics)\n        cell_metadata = set()\n        for cell in cells:\n            cell_metadata.update(cell.metadata.keys())\n        update_metadata_filters(metadata, jupyter_md, cell_metadata)\n\n        if cell_metadata_json:\n            metadata.setdefault(\"jupytext\", {}).setdefault(\"cell_metadata_json\", True)\n\n        if self.implementation.format_name and self.implementation.format_name.startswith(\"sphinx\"):\n            filtered_cells = []\n            for i, cell in enumerate(cells):\n                if (\n                    cell.source == \"\"\n                    and i > 0\n                    and i + 1 < len(cells)\n                    and cells[i - 1].cell_type != \"markdown\"\n                    and cells[i + 1].cell_type != \"markdown\"\n                ):\n                    continue\n                filtered_cells.append(cell)\n            cells = filtered_cells\n\n        return new_notebook(cells=cells, metadata=metadata)\n\n    def filter_notebook(self, nb, metadata, preserve_cell_ids=True):\n        self.update_fmt_with_notebook_options(nb.metadata)\n        unsupported_keys = set()\n        metadata = insert_jupytext_info_and_filter_metadata(\n            metadata, self.fmt, self.implementation, unsupported_keys=unsupported_keys\n        )\n        # We sort the notebook metadata for consistency with v1.16\n        metadata = dict(sorted(metadata.items()))\n\n        cells = []\n        for cell in nb.cells:\n            cell_kwargs = dict(cell)\n            cell_kwargs[\"metadata\"] = filter_metadata(\n                cell.metadata,\n                self.fmt.get(\"cell_metadata_filter\"),\n                _IGNORE_CELL_METADATA,\n                unsupported_keys=unsupported_keys,\n            )\n            if not preserve_cell_ids:\n                cell_kwargs.pop(\"id\", None)\n            elif hasattr(cell, \"id\"):\n                cell_kwargs[\"id\"] = cell.id\n            if cell.cell_type == \"code\":\n                # Drop outputs and execution count\n                cell_kwargs[\"outputs\"] = []\n                cell_kwargs[\"execution_count\"] = None\n\n            cells.append(NotebookNode(**cell_kwargs))\n\n        _warn_on_unsupported_keys(unsupported_keys)\n\n        return NotebookNode(\n            nbformat=nb.nbformat,\n            nbformat_minor=nb.nbformat_minor,\n            metadata=metadata,\n            cells=cells,\n        )\n\n    def writes(self, nb, metadata=None, **kwargs):\n        \"\"\"Return the text representation of the notebook\"\"\"\n        if self.fmt.get(\"format_name\") == \"pandoc\":\n            return notebook_to_md(self.filter_notebook(nb, metadata))\n        if self.fmt.get(\"format_name\") == \"quarto\" or self.ext == \".qmd\":\n            return notebook_to_qmd(self.filter_notebook(nb, metadata))\n        if self.fmt.get(\"format_name\") == \"marimo\":\n            return notebook_to_marimo_py(self.filter_notebook(nb, metadata))\n        if self.fmt.get(\"format_name\") == MYST_FORMAT_NAME or self.ext in myst_extensions(no_md=True):\n            default_lexer_from_language_info = metadata.get(\"language_info\", {}).get(\"pygments_lexer\", None)\n            default_lexer_from_jupytext_metadata = metadata.get(\"jupytext\", {}).pop(\"default_lexer\", None)\n            default_lexer = default_lexer_from_language_info or default_lexer_from_jupytext_metadata\n            nb = self.filter_notebook(nb, metadata)\n            nb = self.merge_frontmatter(nb)\n            return notebook_to_myst(nb, default_lexer=default_lexer)\n\n        # Copy the notebook, in order to be sure we do not modify the original notebook\n        nb = NotebookNode(\n            nbformat=nb.nbformat,\n            nbformat_minor=nb.nbformat_minor,\n            metadata=deepcopy(metadata or nb.metadata),\n            cells=nb.cells,\n        )\n\n        metadata = nb.metadata\n        default_language = default_language_from_metadata_and_ext(metadata, self.implementation.extension, True) or \"python\"\n        self.update_fmt_with_notebook_options(nb.metadata)\n        if \"use_runtools\" not in self.fmt:\n            for cell in nb.cells:\n                if cell.metadata.get(\"hide_input\", False) or cell.metadata.get(\"hide_output\", False):\n                    self.fmt[\"use_runtools\"] = True\n                    break\n\n        header = encoding_and_executable(nb, metadata, self.ext)\n        unsupported_keys = set()\n        header_content, header_lines_to_next_cell = metadata_and_cell_to_header(\n            nb,\n            metadata,\n            self.implementation,\n            self.fmt,\n            unsupported_keys=unsupported_keys,\n        )\n        header.extend(header_content)\n\n        cell_exporters = []\n        looking_for_first_markdown_cell = self.implementation.format_name and self.implementation.format_name.startswith(\n            \"sphinx\"\n        )\n        split_at_heading = self.fmt.get(\"split_at_heading\", False)\n\n        for cell in nb.cells:\n            if looking_for_first_markdown_cell and cell.cell_type == \"markdown\":\n                cell.metadata.setdefault(\"cell_marker\", '\"\"\"')\n                looking_for_first_markdown_cell = False\n\n            cell_exporters.append(\n                self.implementation.cell_exporter_class(cell, default_language, self.fmt, unsupported_keys=unsupported_keys)\n            )\n\n        _warn_on_unsupported_keys(unsupported_keys)\n\n        texts = [cell.cell_to_text() for cell in cell_exporters]\n        lines = []\n\n        # concatenate cells in reverse order to determine how many blank lines (pep8)\n        for i, cell in reversed(list(enumerate(cell_exporters))):\n            text = cell.remove_eoc_marker(texts[i], lines)\n\n            if (\n                i == 0\n                and self.implementation.format_name\n                and self.implementation.format_name.startswith(\"sphinx\")\n                and (text in [[\"%matplotlib inline\"], [\"# %matplotlib inline\"]])\n            ):\n                continue\n\n            lines_to_next_cell = cell.lines_to_next_cell\n            if lines_to_next_cell is None:\n                lines_to_next_cell = pep8_lines_between_cells(text, lines, self.implementation.extension)\n\n            text.extend([\"\"] * lines_to_next_cell)\n\n            # two blank lines between markdown cells in Rmd when those do not have explicit region markers\n            if self.ext in [\".md\", \".markdown\", \".Rmd\"] and not cell.is_code():\n                if (\n                    i + 1 < len(cell_exporters)\n                    and not cell_exporters[i + 1].is_code()\n                    and not texts[i][0].startswith(\"<!-- #\")\n                    and not texts[i + 1][0].startswith(\"<!-- #\")\n                    and (not split_at_heading or not (texts[i + 1] and texts[i + 1][0].startswith(\"#\")))\n                ):\n                    text.append(\"\")\n\n            # \"\" between two consecutive code cells in sphinx\n            if self.implementation.format_name.startswith(\"sphinx\") and cell.is_code():\n                if i + 1 < len(cell_exporters) and cell_exporters[i + 1].is_code():\n                    text.append('\"\"')\n\n            lines = text + lines\n\n        if header_lines_to_next_cell is None:\n            header_lines_to_next_cell = pep8_lines_between_cells(header_content, lines, self.implementation.extension)\n\n        header.extend([\"\"] * header_lines_to_next_cell)\n\n        return \"\\n\".join(header + lines)\n\n    def split_frontmatter(self, nb):\n        \"\"\"Use during self.reads to separate notebook metadata from other frontmatter.\"\"\"\n        unsupported_keys = set()\n        metadata = nb.metadata.pop(_JUPYTER_METADATA_NAMESPACE, {})\n        self.update_fmt_with_notebook_options(\n            {\n                \"jupytext\": {\n                    **metadata.get(\"jupytext\", {}),\n                    **nb.metadata.get(\"jupytext\", {}),\n                },\n            },\n            read=True,\n        )\n        nb = metadata_to_metadata_and_cell(nb, metadata, self.fmt, unsupported_keys)\n        _warn_on_unsupported_keys(unsupported_keys)\n        return nb\n\n    def merge_frontmatter(self, nb):\n        \"\"\"Use during self.writes to rewrite notebook metadata as frontmatter content.\"\"\"\n        unsupported_keys = set()\n        nb = metadata_and_cell_to_metadata(nb, self.fmt, unsupported_keys)\n        _warn_on_unsupported_keys(unsupported_keys)\n        return nb\n\n\ndef reads(text, fmt=None, as_version=nbformat.NO_CONVERT, config=None, **kwargs):\n    \"\"\"\n    Read a notebook from a string\n\n    :param text: the text representation of the notebook\n    :param fmt: (optional) the jupytext format like `md`, `py:percent`, ...\n    :param as_version: see nbformat.reads\n    :param config: (optional) a Jupytext configuration object\n    :param kwargs: (not used) additional parameters for nbformat.reads\n    :return: the notebook\n    \"\"\"\n    fmt = copy(fmt) if fmt else divine_format(text)\n    fmt = long_form_one_format(fmt)\n    ext = fmt[\"extension\"]\n\n    if ext == \".ipynb\":\n        nb = nbformat.reads(text, as_version, **kwargs)\n        (version, version_minor) = nbformat.reader.get_version(nb)\n        if version != 4:\n            warnings.warn(\n                f\"Notebooks in nbformat version {version}.{version_minor} are not supported by Jupytext. \"\n                f\"Please consider converting them to nbformat version 4.x with \"\n                f\"'jupyter nbconvert --to notebook --inplace'\"\n            )\n        return nb\n\n    format_name = read_format_from_metadata(text, ext) or fmt.get(\"format_name\")\n\n    if format_name:\n        format_options = {}\n    else:\n        format_name, format_options = guess_format(text, ext)\n\n    if format_name:\n        fmt[\"format_name\"] = format_name\n\n    fmt.update(format_options)\n    reader = TextNotebookConverter(fmt, config)\n    notebook = reader.reads(text, **kwargs)\n    rearrange_jupytext_metadata(notebook.metadata)\n\n    if format_name and insert_or_test_version_number():\n        notebook.metadata.setdefault(\"jupytext\", {}).setdefault(\"text_representation\", {}).update(\n            {\"extension\": ext, \"format_name\": format_name}\n        )\n\n    return notebook\n\n\ndef read(fp, as_version=nbformat.NO_CONVERT, fmt=None, config=None, **kwargs):\n    \"\"\"Read a notebook from a file name or a file object\n\n    :param fp: a file name or a file object\n    :param as_version: see nbformat.read\n    :param fmt: (optional) the jupytext format like `md`, `py:percent`, ...\n    :param config: (optional) a Jupytext configuration object\n    :param kwargs: (not used) additional parameters for nbformat.read\n    :return: the notebook\n    \"\"\"\n    if as_version != nbformat.NO_CONVERT and not isinstance(as_version, int):\n        raise TypeError(\"Second argument 'as_version' should be either nbformat.NO_CONVERT, or an integer.\")\n\n    if fp == \"-\":\n        text = sys.stdin.read()\n        # Update the input format by reference if missing\n        if isinstance(fmt, dict) and not fmt:\n            fmt.update(long_form_one_format(divine_format(text)))\n        return reads(text, fmt)\n\n    if not hasattr(fp, \"read\"):\n        # Treat fp as a file name\n        fp = str(fp)\n        _, ext = os.path.splitext(fp)\n        fmt = copy(fmt or {})\n        if not isinstance(fmt, dict):\n            fmt = long_form_one_format(fmt)\n        fmt.update({\"extension\": ext})\n        with open(fp, encoding=\"utf-8\") as stream:\n            return read(stream, as_version=as_version, fmt=fmt, config=config, **kwargs)\n\n    if fmt is not None:\n        fmt = long_form_one_format(fmt)\n        if fmt[\"extension\"] == \".ipynb\":\n            notebook = nbformat.read(fp, as_version, **kwargs)\n            rearrange_jupytext_metadata(notebook.metadata)\n            return notebook\n\n    return reads(fp.read(), fmt, config=config, **kwargs)\n\n\ndef writes(notebook, fmt, version=nbformat.NO_CONVERT, config=None, **kwargs):\n    \"\"\"Return the text representation of the notebook\n\n    :param notebook: the notebook\n    :param fmt: the jupytext format like `md`, `py:percent`, ...\n    :param version: see nbformat.writes\n    :param config: (optional) a Jupytext configuration object\n    :param kwargs: (not used) additional parameters for nbformat.writes\n    :return: the text representation of the notebook\n    \"\"\"\n    if version is not nbformat.NO_CONVERT:\n        if not isinstance(version, int):\n            raise TypeError(\"The argument 'version' should be either nbformat.NO_CONVERT, or an integer.\")\n        notebook = nbformat.convert(notebook, version)\n    (version, version_minor) = nbformat.reader.get_version(notebook)\n    if version < 4:\n        raise NotSupportedNBFormatVersion(\n            f\"Notebooks in nbformat version {version}.{version_minor} are not supported by Jupytext. \"\n            f\"Please convert your notebooks to nbformat version 4 with \"\n            f\"'jupyter nbconvert --to notebook --inplace', or call this function with 'version=4'.\"\n        )\n    if version > 4 or (version == 4 and version_minor > 5):\n        warnings.warn(\n            f\"Notebooks in nbformat version {version}.{version_minor} \"\n            f\"have not been tested with Jupytext version {__version__}.\"\n        )\n\n    metadata = deepcopy(notebook.metadata)\n    rearrange_jupytext_metadata(metadata)\n    fmt = copy(fmt)\n    fmt = long_form_one_format(fmt, metadata)\n    ext = fmt[\"extension\"]\n    format_name = fmt.get(\"format_name\")\n\n    if ext == \".ipynb\":\n        return nbformat.writes(\n            drop_text_representation_metadata(notebook, metadata),\n            version,\n            **kwargs,\n        )\n\n    if not format_name:\n        format_name = format_name_for_ext(metadata, ext, explicit_default=False)\n\n    # Since Jupytext==1.17, the default format for\n    # writing a notebook to a script is the percent format\n    if not format_name and \"cell_markers\" not in fmt and ext in _SCRIPT_EXTENSIONS:\n        format_name = \"percent\"\n\n    if format_name:\n        fmt[\"format_name\"] = format_name\n        update_jupytext_formats_metadata(metadata, fmt)\n\n    writer = TextNotebookConverter(fmt, config)\n    return writer.writes(notebook, metadata)\n\n\ndef drop_text_representation_metadata(notebook, metadata=None):\n    \"\"\"When the notebook is saved to an ipynb file, we drop the text_representation metadata\"\"\"\n    if metadata is None:\n        # Make a copy to avoid modification by reference\n        metadata = deepcopy(notebook[\"metadata\"])\n\n    jupytext_metadata = metadata.get(\"jupytext\", {})\n    jupytext_metadata.pop(\"text_representation\", {})\n\n    # Remove the jupytext section if empty\n    if not jupytext_metadata:\n        metadata.pop(\"jupytext\", {})\n\n    return NotebookNode(\n        nbformat=notebook[\"nbformat\"],\n        nbformat_minor=notebook[\"nbformat_minor\"],\n        metadata=metadata,\n        cells=notebook[\"cells\"],\n    )\n\n\ndef write(nb, fp, version=nbformat.NO_CONVERT, fmt=None, config=None, **kwargs):\n    \"\"\"Write a notebook to a file name or a file object\n\n    :param nb: the notebook\n    :param fp: a file name or a file object\n    :param version: see nbformat.write\n    :param fmt: (optional if fp is a file name) the jupytext format like `md`, `py:percent`, ...\n    :param config: (optional) a Jupytext configuration object\n    :param kwargs: (not used) additional parameters for nbformat.write\n    \"\"\"\n    if fp == \"-\":\n        # Use sys.stdout.buffer when possible, and explicit utf-8 encoding, cf. #331\n        content = writes(nb, version=version, fmt=fmt, config=config, **kwargs)\n        try:\n            # Python 3\n            sys.stdout.buffer.write(content.encode(\"utf-8\"))\n        except AttributeError:\n            sys.stdout.write(content.encode(\"utf-8\"))\n        return\n\n    if not hasattr(fp, \"write\"):\n        # Treat fp as a file name\n        fp = str(fp)\n        _, ext = os.path.splitext(fp)\n        fmt = copy(fmt or {})\n        fmt = long_form_one_format(fmt, update={\"extension\": ext})\n        create_prefix_dir(fp, fmt)\n\n        with open(fp, \"w\", encoding=\"utf-8\") as stream:\n            write(nb, stream, version=version, fmt=fmt, config=config, **kwargs)\n            return\n    else:\n        assert fmt is not None, \"'fmt' argument in jupytext.write is mandatory unless fp is a file name\"\n\n    content = writes(nb, version=version, fmt=fmt, config=config, **kwargs)\n    if isinstance(content, bytes):\n        content = content.decode(\"utf8\")\n    fp.write(content)\n    if not content.endswith(\"\\n\"):\n        fp.write(\"\\n\")\n\n\ndef create_prefix_dir(nb_file, fmt):\n    \"\"\"Create directory if fmt has a prefix\"\"\"\n    if \"prefix\" in fmt:\n        nb_dir = os.path.dirname(nb_file) + os.path.sep\n        if not os.path.isdir(nb_dir):\n            logging.log(logging.WARNING, \"[jupytext] creating missing directory %s\", nb_dir)\n            os.makedirs(nb_dir)\n\n\ndef _warn_on_unsupported_keys(unsupported_keys):\n    if unsupported_keys:\n        warnings.warn(f\"The following metadata cannot be exported to the text notebook: {sorted(unsupported_keys)}\")\n\n\ndef get_formats_from_notebook_path(nb_file, fmt=None):\n    \"\"\"\n    Return the paired formats for a given notebook in the extended form.\n\n    Parameters\n    ----------\n    nb_file : str\n        Path to the notebook file.\n    fmt : dict or None, optional\n        The Jupytext format specification (default is None).\n\n    Returns\n    -------\n    list of dict\n        The paired formats in the 'extended form', i.e., as a list of dictionaries\n        where each dictionary fully specifies a format (including extension, format_name, etc.).\n    \"\"\"\n    config = load_jupytext_config(nb_file)\n    notebook = read(nb_file, fmt=fmt, config=config)\n    return get_formats_from_notebook_and_config(notebook, config, nb_file)\n"
  },
  {
    "path": "src/jupytext/kernels.py",
    "content": "\"\"\"Find kernel specifications for a given language\"\"\"\n\nimport os\nimport sys\n\nfrom .languages import same_language\nfrom .reraise import reraise\n\ntry:\n    # I prefer not to take a dependency on jupyter_client\n    from jupyter_client.kernelspec import find_kernel_specs, get_kernel_spec\nexcept ImportError as err:\n    find_kernel_specs = reraise(err)\n    get_kernel_spec = reraise(err)\n\n\ndef set_kernelspec_from_language(notebook):\n    \"\"\"Set the kernel specification based on the 'main_language' metadata\"\"\"\n    language = notebook.metadata.get(\"jupytext\", {}).get(\"main_language\")\n    if \"kernelspec\" not in notebook.metadata and language:\n        try:\n            kernelspec = kernelspec_from_language(language)\n        except ValueError:\n            return\n        notebook.metadata[\"kernelspec\"] = kernelspec\n        notebook.metadata.get(\"jupytext\", {}).pop(\"main_language\")\n\n\ndef kernelspec_from_language(language):\n    \"\"\"Return the python kernel that matches the current env, or the first kernel that matches the given language\"\"\"\n    if language == \"python\":\n        # Return the kernel that matches the current Python executable\n        for name in find_kernel_specs():\n            kernel_specs = get_kernel_spec(name)\n            cmd = kernel_specs.argv[0]\n            if kernel_specs.language == \"python\" and os.path.isfile(cmd) and os.path.samefile(cmd, sys.executable):\n                return {\n                    \"name\": name,\n                    \"language\": language,\n                    \"display_name\": kernel_specs.display_name,\n                }\n        raise ValueError(\n            f\"No kernel found that matches the current python executable {sys.executable}\\n\"\n            + \"Install one with 'python -m ipykernel install --name kernel_name [--user]'\"\n        )\n\n    for name in find_kernel_specs():\n        kernel_specs = get_kernel_spec(name)\n        if same_language(kernel_specs.language, language):\n            return {\n                \"name\": name,\n                \"language\": language,\n                \"display_name\": kernel_specs.display_name,\n            }\n\n    raise ValueError(f\"No kernel found for the language {language}\")\n"
  },
  {
    "path": "src/jupytext/languages.py",
    "content": "\"\"\"Determine notebook or cell language\"\"\"\n\nimport re\n\n# Jupyter magic commands that are also languages\n_JUPYTER_LANGUAGES = [\n    \"R\",\n    \"bash\",\n    \"sh\",\n    \"python\",\n    \"python2\",\n    \"python3\",\n    \"coconut\",\n    \"javascript\",\n    \"js\",\n    \"perl\",\n    \"html\",\n    \"latex\",\n    \"markdown\",\n    \"pypy\",\n    \"ruby\",\n    \"script\",\n    \"svg\",\n    \"matlab\",\n    \"octave\",\n    \"idl\",\n    \"robotframework\",\n    \"sas\",\n    \"spark\",\n    \"sql\",\n    \"cython\",\n    \"haskell\",\n    \"tcl\",\n    \"gnuplot\",\n    \"wolfram language\",\n]\n\n# Supported file extensions (and languages)\n# Please add more languages here (and add a few tests) - see contributing.md\n_SCRIPT_EXTENSIONS = {\n    \".py\": {\"language\": \"python\", \"comment\": \"#\"},\n    \".coco\": {\"language\": \"coconut\", \"comment\": \"#\"},\n    \".R\": {\"language\": \"R\", \"comment\": \"#\"},\n    \".r\": {\"language\": \"R\", \"comment\": \"#\"},\n    \".jl\": {\"language\": \"julia\", \"comment\": \"#\"},\n    \".cpp\": {\"language\": \"c++\", \"comment\": \"//\"},\n    \".ss\": {\"language\": \"scheme\", \"comment\": \";;\"},\n    \".clj\": {\"language\": \"clojure\", \"comment\": \";;\"},\n    \".scm\": {\"language\": \"scheme\", \"comment\": \";;\"},\n    \".sh\": {\"language\": \"bash\", \"comment\": \"#\"},\n    \".ps1\": {\"language\": \"powershell\", \"comment\": \"#\"},\n    \".q\": {\"language\": \"q\", \"comment\": \"/\"},\n    \".m\": {\"language\": \"matlab\", \"comment\": \"%\"},\n    # Unfortunately, Wolfram Mathematica also uses the .m extension which\n    # conflicts with Matlab. To work around this problem we arbitrarily use a\n    # made-up .wolfram extension.\n    \".wolfram\": {\n        \"language\": \"wolfram language\",\n        \"comment\": \"(*\",\n        \"comment_suffix\": \"*)\",\n    },\n    \".pro\": {\"language\": \"idl\", \"comment\": \";\"},\n    \".js\": {\"language\": \"javascript\", \"comment\": \"//\"},\n    \".ts\": {\"language\": \"typescript\", \"comment\": \"//\"},\n    \".scala\": {\"language\": \"scala\", \"comment\": \"//\"},\n    \".rs\": {\"language\": \"rust\", \"comment\": \"//\"},\n    \".robot\": {\"language\": \"robotframework\", \"comment\": \"#\"},\n    \".resource\": {\"language\": \"robotframework\", \"comment\": \"#\"},\n    \".cs\": {\"language\": \"csharp\", \"comment\": \"//\"},\n    \".fsx\": {\"language\": \"fsharp\", \"comment\": \"//\"},\n    \".fs\": {\"language\": \"fsharp\", \"comment\": \"//\"},\n    \".sos\": {\"language\": \"sos\", \"comment\": \"#\"},\n    \".java\": {\"language\": \"java\", \"comment\": \"//\"},\n    \".groovy\": {\"language\": \"groovy\", \"comment\": \"//\"},\n    \".sage\": {\"language\": \"sage\", \"comment\": \"#\"},\n    \".ml\": {\n        \"language\": \"ocaml\",\n        \"comment\": \"(*\",\n        \"comment_suffix\": \"*)\",\n    },  # OCaml only has block comments\n    \".hs\": {\"language\": \"haskell\", \"comment\": \"--\"},\n    \".tcl\": {\"language\": \"tcl\", \"comment\": \"#\"},\n    \".mac\": {\n        \"language\": \"maxima\",\n        \"comment\": \"/*\",\n        \"comment_suffix\": \"*/\",\n    },  # Maxima only has block comments\n    \".gp\": {\"language\": \"gnuplot\", \"comment\": \"#\"},\n    \".do\": {\"language\": \"stata\", \"comment\": \"//\"},\n    \".sas\": {\n        \"language\": \"sas\",\n        \"comment\": \"/*\",\n        \"comment_suffix\": \"*/\",\n    },\n    \".xsh\": {\"language\": \"xonsh\", \"comment\": \"#\"},\n    \".lgt\": {\"language\": \"logtalk\", \"comment\": \"%\"},\n    \".logtalk\": {\"language\": \"logtalk\", \"comment\": \"%\"},\n    \".lua\": {\"language\": \"lua\", \"comment\": \"--\"},\n    \".go\": {\"language\": \"go\", \"comment\": \"//\"},\n}\n\n_COMMENT_CHARS = [\n    _SCRIPT_EXTENSIONS[ext][\"comment\"] for ext in _SCRIPT_EXTENSIONS if _SCRIPT_EXTENSIONS[ext][\"comment\"] != \"#\"\n]\n\n_COMMENT = {_SCRIPT_EXTENSIONS[ext][\"language\"]: _SCRIPT_EXTENSIONS[ext][\"comment\"] for ext in _SCRIPT_EXTENSIONS}\n_JUPYTER_LANGUAGES = set(_JUPYTER_LANGUAGES).union(_COMMENT.keys()).union([\"c#\", \"f#\", \"cs\", \"fs\"])\n_JUPYTER_LANGUAGES_LOWER_AND_UPPER = _JUPYTER_LANGUAGES.union({str.upper(lang) for lang in _JUPYTER_LANGUAGES})\n_GO_DOUBLE_PERCENT_COMMAND = re.compile(r\"^(%%\\s*|%%\\s+-.*)$\")\n\n\ndef default_language_from_metadata_and_ext(metadata, ext, pop_main_language=False):\n    \"\"\"Return the default language given the notebook metadata, and a file extension\"\"\"\n    default_from_ext = _SCRIPT_EXTENSIONS.get(ext, {}).get(\"language\")\n\n    main_language = metadata.get(\"jupytext\", {}).get(\"main_language\")\n    default_language = metadata.get(\"kernelspec\", {}).get(\"language\") or default_from_ext\n    language = main_language or default_language\n\n    if main_language is not None and main_language == default_language and pop_main_language:\n        metadata[\"jupytext\"].pop(\"main_language\")\n\n    if language is None or language in [\"R\", \"sas\"]:\n        return language\n\n    if language.startswith(\"C++\"):\n        return \"c++\"\n\n    return language.lower().replace(\"#\", \"sharp\")\n\n\ndef usual_language_name(language):\n    \"\"\"Return the usual language name (one that may be found in _SCRIPT_EXTENSIONS above)\"\"\"\n    language = language.lower()\n    if language == \"r\":\n        return \"R\"\n    if language.startswith(\"c++\"):\n        return \"c++\"\n    if language == \"octave\":\n        return \"matlab\"\n    if language in [\"cs\", \"c#\"]:\n        return \"csharp\"\n    if language in [\"fs\", \"f#\"]:\n        return \"fsharp\"\n    if language == \"sas\":\n        return \"SAS\"\n    return language\n\n\ndef same_language(kernel_language, language):\n    \"\"\"Are those the same language?\"\"\"\n    return usual_language_name(kernel_language) == usual_language_name(language)\n\n\ndef set_main_and_cell_language(metadata, cells, ext, custom_cell_magics):\n    \"\"\"Set main language for the given collection of cells, and\n    use magics for cells that use other languages\"\"\"\n    main_language = default_language_from_metadata_and_ext(metadata, ext)\n\n    if main_language is None:\n        languages = {\"python\": 0.5}\n        for cell in cells:\n            if \"language\" in cell[\"metadata\"]:\n                language = usual_language_name(cell[\"metadata\"][\"language\"])\n                languages[language] = languages.get(language, 0.0) + 1\n\n        main_language = max(languages, key=languages.get)\n\n    # save main language when no kernel is set\n    if \"language\" not in metadata.get(\"kernelspec\", {}) and cells:\n        metadata.setdefault(\"jupytext\", {})[\"main_language\"] = main_language\n\n    # Remove 'language' meta data and add a magic if not main language\n    for cell in cells:\n        if \"language\" in cell[\"metadata\"]:\n            language = cell[\"metadata\"][\"language\"]\n            if language == main_language:\n                cell[\"metadata\"].pop(\"language\")\n                continue\n\n            if usual_language_name(language) == main_language:\n                continue\n\n            if language in _JUPYTER_LANGUAGES or language in custom_cell_magics:\n                cell[\"metadata\"].pop(\"language\")\n                magic = \"%%\" if main_language != \"csharp\" else \"#!\"\n                if \"magic_args\" in cell[\"metadata\"]:\n                    magic_args = cell[\"metadata\"].pop(\"magic_args\")\n                    cell[\"source\"] = f\"{magic}{language} {magic_args}\\n\" + cell[\"source\"]\n                else:\n                    cell[\"source\"] = f\"{magic}{language}\\n\" + cell[\"source\"]\n\n\ndef cell_language(source, default_language, custom_cell_magics):\n    \"\"\"Return cell language and language options, if any\"\"\"\n    if source:\n        line = source[0]\n        if default_language == \"go\" and _GO_DOUBLE_PERCENT_COMMAND.match(line):\n            return None, None\n        if default_language == \"csharp\":\n            if line.startswith(\"#!\"):\n                lang = line[2:].strip()\n                if lang in _JUPYTER_LANGUAGES:\n                    source.pop(0)\n                    return lang, \"\"\n        elif line.startswith(\"%%\"):\n            magic = line[2:]\n            if \" \" in magic:\n                lang, magic_args = magic.split(\" \", 1)\n            else:\n                lang = magic\n                magic_args = \"\"\n\n            if lang in _JUPYTER_LANGUAGES or lang in custom_cell_magics:\n                source.pop(0)\n                return lang, magic_args\n\n    return None, None\n\n\ndef comment_lines(lines, prefix, suffix=\"\"):\n    \"\"\"Return commented lines\"\"\"\n    if not prefix:\n        return lines\n    if not suffix:\n        return [prefix + \" \" + line if line else prefix for line in lines]\n    return [prefix + \" \" + line + \" \" + suffix if line else prefix + \" \" + suffix for line in lines]\n"
  },
  {
    "path": "src/jupytext/magics.py",
    "content": "\"\"\"Escape Jupyter magics when converting to other formats\"\"\"\n\nimport re\n\nfrom .languages import _COMMENT, _SCRIPT_EXTENSIONS, usual_language_name\nfrom .stringparser import StringParser\n\n\ndef get_comment(ext):\n    return re.escape(_SCRIPT_EXTENSIONS[ext][\"comment\"])\n\n\n# A magic expression is a line or cell or metakernel magic (#94, #61) escaped zero, or multiple times\n_MAGIC_RE = {\n    _SCRIPT_EXTENSIONS[ext][\"language\"]: re.compile(r\"^\\s*({0} |{0})*(%|%%|%%%)[a-zA-Z]\".format(get_comment(ext)))\n    for ext in _SCRIPT_EXTENSIONS\n}\n_MAGIC_FORCE_ESC_RE = {\n    _SCRIPT_EXTENSIONS[ext][\"language\"]: re.compile(\n        r\"^\\s*({0} |{0})*(%|%%|%%%)[a-zA-Z](.*){0}\\s*escape\".format(get_comment(ext))\n    )\n    for ext in _SCRIPT_EXTENSIONS\n}\n_MAGIC_NOT_ESC_RE = {\n    _SCRIPT_EXTENSIONS[ext][\"language\"]: re.compile(\n        r\"^\\s*({0} |{0})*(%|%%|%%%)[a-zA-Z](.*){0}\\s*noescape\".format(get_comment(ext))\n    )\n    for ext in _SCRIPT_EXTENSIONS\n}\n_LINE_CONTINUATION_RE = re.compile(r\".*\\\\\\s*$\")\n\n# Rust magics start with single ':' #351\n_MAGIC_RE[\"rust\"] = re.compile(r\"^(// |//)*:[a-zA-Z]\")\n_MAGIC_FORCE_ESC_RE[\"rust\"] = re.compile(r\"^(// |//)*:[a-zA-Z](.*)//\\s*escape\")\n_MAGIC_FORCE_ESC_RE[\"rust\"] = re.compile(r\"^(// |//)*:[a-zA-Z](.*)//\\s*noescape\")\n\n# C# magics start with '#!'\n_MAGIC_RE[\"csharp\"] = re.compile(r\"^(// |//)*#![a-zA-Z]\")\n_MAGIC_FORCE_ESC_RE[\"csharp\"] = re.compile(r\"^(// |//)*#![a-zA-Z](.*)//\\s*escape\")\n_MAGIC_FORCE_ESC_RE[\"csharp\"] = re.compile(r\"^(// |//)*#![a-zA-Z](.*)//\\s*noescape\")\n\n# Go magics might start with % or ! or !*\n# (in addition, Go NB might use %% or %% -, see \"_GO_DOUBLE_PERCENT_COMMAND\")\n_MAGIC_RE[\"go\"] = re.compile(r\"^(// |//)*(!|!\\*|%|%%|%%%)[a-zA-Z]\")\n\n# Commands starting with a question or exclamation mark have to be escaped\n_PYTHON_HELP_OR_BASH_CMD = re.compile(r\"^\\s*(# |#)*\\s*(\\?|!)\\s*[A-Za-z\\.\\~\\$\\\\\\/\\{\\}]\")\n\n# A bash command not followed by an equal sign or a parenthesis is a magic command\n_PYTHON_MAGIC_CMD = re.compile(\n    r\"^(# |#)*({})($|\\s$|\\s[^=,])\".format(\n        \"|\".join(\n            # posix\n            [\"cat\", \"cd\", \"cp\", \"mv\", \"rm\", \"rmdir\", \"mkdir\"]  # noqa: W504\n            +\n            # windows\n            [\"copy\", \"ddir\", \"echo\", \"ls\", \"ldir\", \"mkdir\", \"ren\", \"rmdir\"]\n        )\n    )\n)\n# Python help commands end with ?\n_IPYTHON_MAGIC_HELP = re.compile(r\"^\\s*(# )*[^\\s]*\\?\\s*$\")\n\n_PYTHON_MAGIC_ASSIGN = re.compile(r\"^(# |#)*\\s*([a-zA-Z_][a-zA-Z_$0-9]*)\\s*=\\s*(%|%%|%%%|!)[a-zA-Z](.*)\")\n\n_SCRIPT_LANGUAGES = [_SCRIPT_EXTENSIONS[ext][\"language\"] for ext in _SCRIPT_EXTENSIONS]\n\n\ndef is_magic(line, language, global_escape_flag=True, explicitly_code=False):\n    \"\"\"Is the current line a (possibly escaped) Jupyter magic, and should it be commented?\"\"\"\n    language = usual_language_name(language)\n    if language in [\"octave\", \"matlab\", \"sas\", \"logtalk\"] or language not in _SCRIPT_LANGUAGES:\n        return False\n    if _MAGIC_FORCE_ESC_RE[language].match(line):\n        return True\n    if not global_escape_flag or _MAGIC_NOT_ESC_RE[language].match(line):\n        return False\n    if _MAGIC_RE[language].match(line):\n        return True\n    if language != \"python\":\n        return False\n    if _PYTHON_HELP_OR_BASH_CMD.match(line):\n        return True\n    if _PYTHON_MAGIC_ASSIGN.match(line):\n        return True\n    if explicitly_code and _IPYTHON_MAGIC_HELP.match(line):\n        return True\n    return _PYTHON_MAGIC_CMD.match(line)\n\n\ndef need_explicit_marker(source, language=\"python\", global_escape_flag=True, explicitly_code=True):\n    \"\"\"Does this code needs an explicit cell marker?\"\"\"\n    if language != \"python\" or not global_escape_flag or not explicitly_code:\n        return False\n\n    parser = StringParser(language)\n    for line in source:\n        if not parser.is_quoted() and is_magic(line, language, global_escape_flag, explicitly_code):\n            if not is_magic(line, language, global_escape_flag, False):\n                return True\n        parser.read_line(line)\n    return False\n\n\ndef comment_magic(source, language=\"python\", global_escape_flag=True, explicitly_code=True):\n    \"\"\"Escape Jupyter magics with '# '\"\"\"\n    parser = StringParser(language)\n    next_is_magic = False\n    for pos, line in enumerate(source):\n        if not parser.is_quoted() and (next_is_magic or is_magic(line, language, global_escape_flag, explicitly_code)):\n            if next_is_magic:\n                # this is the continuation line of a magic command on the previous line,\n                # so we don't want to indent the comment\n                unindented = line\n                indent = \"\"\n            else:\n                unindented = line.lstrip()\n                indent = line[: len(line) - len(unindented)]\n            source[pos] = indent + _COMMENT[language] + \" \" + unindented\n            next_is_magic = language == \"python\" and _LINE_CONTINUATION_RE.match(line)\n        parser.read_line(line)\n    return source\n\n\ndef unesc(line, language):\n    \"\"\"Uncomment once a commented line\"\"\"\n    comment = _COMMENT[language]\n    unindented = line.lstrip()\n    indent = line[: len(line) - len(unindented)]\n    if unindented.startswith(comment + \" \"):\n        return indent + unindented[len(comment) + 1 :]\n    if unindented.startswith(comment):\n        return indent + unindented[len(comment) :]\n    return line\n\n\ndef uncomment_magic(source, language=\"python\", global_escape_flag=True, explicitly_code=True):\n    \"\"\"Unescape Jupyter magics\"\"\"\n    parser = StringParser(language)\n    next_is_magic = False\n    for pos, line in enumerate(source):\n        if not parser.is_quoted() and (next_is_magic or is_magic(line, language, global_escape_flag, explicitly_code)):\n            source[pos] = unesc(line, language)\n            next_is_magic = language == \"python\" and _LINE_CONTINUATION_RE.match(line)\n        parser.read_line(line)\n    return source\n\n\n_ESCAPED_CODE_START = {\n    \".Rmd\": re.compile(r\"^(# |#)*```{.*}\"),\n    \".md\": re.compile(r\"^(# |#)*```\"),\n    \".markdown\": re.compile(r\"^(# |#)*```\"),\n}\n_ESCAPED_CODE_START.update(\n    {ext: re.compile(r\"^({0} |{0})*({0}|{0} )\\+\".format(get_comment(ext))) for ext in _SCRIPT_EXTENSIONS}\n)\n\n\ndef is_escaped_code_start(line, ext):\n    \"\"\"Is the current line a possibly commented code start marker?\"\"\"\n    return _ESCAPED_CODE_START[ext].match(line)\n\n\ndef escape_code_start(source, ext, language=\"python\"):\n    \"\"\"Escape code start with '# '\"\"\"\n    parser = StringParser(language)\n    for pos, line in enumerate(source):\n        if not parser.is_quoted() and is_escaped_code_start(line, ext):\n            source[pos] = _SCRIPT_EXTENSIONS.get(ext, {}).get(\"comment\", \"#\") + \" \" + line\n        parser.read_line(line)\n    return source\n\n\ndef unescape_code_start(source, ext, language=\"python\"):\n    \"\"\"Unescape code start\"\"\"\n    parser = StringParser(language)\n    for pos, line in enumerate(source):\n        if not parser.is_quoted() and is_escaped_code_start(line, ext):\n            unescaped = unesc(line, language)\n            # don't remove comment char if we break the code start...\n            if is_escaped_code_start(unescaped, ext):\n                source[pos] = unescaped\n        parser.read_line(line)\n    return source\n"
  },
  {
    "path": "src/jupytext/marimo.py",
    "content": "\"\"\"Jupyter notebook to Marimo py format and back, using Marimo\"\"\"\n\nimport os\nfrom packaging.version import parse\nimport tempfile\nimport subprocess\nimport nbformat\n\nMARIMO_MIN_VERSION = \"0.16.3\"\n\n\nclass MarimoError(OSError):\n    \"\"\"An error related to Marimo\"\"\"\n\n\ndef is_marimo_available(min_version=MARIMO_MIN_VERSION, max_version=None):\n    \"\"\"Is Marimo available?\"\"\"\n    try:\n        raise_if_marimo_is_not_available(min_version=min_version, max_version=max_version)\n        return True\n    except MarimoError:\n        return False\n\n\ndef raise_if_marimo_is_not_available(min_version=MARIMO_MIN_VERSION, max_version=None):\n    \"\"\"Raise with an informative error message if Marimo is not available\"\"\"\n    version = marimo_version()\n    if version == \"N/A\":\n        raise MarimoError(f\"The Marimo format requires 'marimo>={min_version}', but marimo was not found\")\n\n    if parse(version) < parse(min_version):\n        raise MarimoError(f\"The Marimo format requires 'marimo>={min_version}', but marimo=={version} was found\")\n\n    if max_version and parse(version) > parse(max_version):\n        raise MarimoError(f\"The Marimo format requires 'marimo<={max_version}', but marimo=={version} was found\")\n\n    return version\n\n\ndef marimo_version():\n    \"\"\"Marimo's version number\"\"\"\n    try:\n        return marimo(\"--version\").strip()\n    except OSError:\n        return \"N/A\"\n\n\ndef marimo_py_to_notebook(text):\n    \"\"\"Convert a Marimo script to a Jupyter notebook, using Marimo\"\"\"\n    raise_if_marimo_is_not_available()\n\n    # On Windows, NamedTemporaryFile cannot be reopened with open,\n    # so we keep the file names and close the files\n    tmp_py_file = tempfile.NamedTemporaryFile(suffix=\".py\")\n    tmp_py_file_name = tmp_py_file.name\n    tmp_py_file.close()\n\n    tmp_ipynb_file = tempfile.NamedTemporaryFile(suffix=\".ipynb\")\n    tmp_ipynb_file_name = tmp_ipynb_file.name\n    tmp_ipynb_file.close()\n\n    with open(tmp_py_file_name, \"w\") as fp:\n        fp.write(text)\n\n    marimo(\n        \"export\",\n        \"ipynb\",\n        # Keep the current order to minimize diffs on round trips\n        \"--sort\",\n        \"top-down\",\n        tmp_py_file_name,\n        \"-o\",\n        tmp_ipynb_file_name,\n    )\n\n    notebook = nbformat.read(tmp_ipynb_file_name, as_version=4)\n\n    os.remove(tmp_py_file_name)\n    os.remove(tmp_ipynb_file_name)\n\n    # In the following we revert some of the side effects of the marimo conversion\n    # to ensure stability of the round trip. Not all the side effects are reverted.\n\n    # You can test the round trip for a given document with:\n    #   jupytext --test --to py:marimo your_notebook.ipynb\n    # or with:\n    #   jupytext --test --to ipynb your_marimo_script.py\n\n    # Ideally these round trip issues should be fixed in Marimo itself - please report them at\n    # https://github.com/marimo/marimo/issues and optionally mention @mwouts (author of Jupytext)\n    # in the issue description.\n    import_marimo_cell = \"import marimo as mo\"\n    need_to_remove_import_marimo_cell = False\n\n    for cell in notebook.cells:\n        if cell.cell_type != \"code\":\n            continue\n        matplotlib_inline_comment = \"# '%matplotlib inline' command supported automatically in marimo\"\n        if cell.source.startswith(matplotlib_inline_comment):\n            cell.source = \"%matplotlib inline\" + cell.source.removeprefix(matplotlib_inline_comment)\n        if cell.source == import_marimo_cell:\n            need_to_remove_import_marimo_cell = True\n        if cell.source.startswith(\"# Cell tags:\"):\n            if \"\\n\" not in cell.source:\n                cell.source += \"\\n\"\n            tag_line, cell.source = cell.source.split(\"\\n\", 1)\n            tags = tag_line.removeprefix(\"# Cell tags:\").strip().split(\", \")\n            cell.metadata[\"tags\"] = tags\n\n    if need_to_remove_import_marimo_cell:\n        notebook.cells = [cell for cell in notebook.cells if cell.source != import_marimo_cell]\n\n    return notebook\n\n\ndef notebook_to_marimo_py(notebook):\n    \"\"\"Convert a notebook to its Marimo script\"\"\"\n    raise_if_marimo_is_not_available()\n\n    # On Windows, NamedTemporaryFile cannot be reopened with open,\n    # so we keep the file names and close the files\n    tmp_py_file = tempfile.NamedTemporaryFile(suffix=\".py\", delete=False)\n    tmp_py_file_name = tmp_py_file.name\n    tmp_py_file.close()\n\n    tmp_ipynb_file = tempfile.NamedTemporaryFile(suffix=\".ipynb\", delete=False)\n    tmp_ipynb_file_name = tmp_ipynb_file.name\n    tmp_ipynb_file.close()\n\n    with open(tmp_ipynb_file_name, \"w\") as fp:\n        nbformat.write(notebook, fp)\n\n    marimo(\"convert\", tmp_ipynb_file_name, \"-o\", tmp_py_file_name)\n\n    with open(tmp_py_file_name) as fp:\n        text = fp.read()\n\n    os.remove(tmp_ipynb_file_name)\n    os.remove(tmp_py_file_name)\n\n    return \"\\n\".join(text.splitlines())\n\n\ndef marimo(*args: str):\n    cmd = [\"marimo\"] + list(args)\n\n    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)\n    out, err = proc.communicate()\n    if proc.returncode:\n        raise MarimoError(f\"marimo exited with return code {proc.returncode}\\n{str(err)}\")\n\n    return out.decode(\"utf-8\")\n"
  },
  {
    "path": "src/jupytext/metadata_filter.py",
    "content": "\"\"\"Notebook and cell metadata filtering\"\"\"\n\nfrom copy import copy\n\nfrom .cell_metadata import _JUPYTEXT_CELL_METADATA, is_valid_metadata_key\n\n_DEFAULT_NOTEBOOK_METADATA = \",\".join(\n    [\n        # Preserve Jupytext section\n        \"jupytext\",\n        # Preserve kernel specs\n        \"kernelspec\",\n        # Kernel_info found in Nteract notebooks\n        \"kernel_info\",\n        # Used in MyST notebooks\n        \"orphan\",\n        \"tocdepth\",\n    ]\n)\n_JUPYTER_METADATA_NAMESPACE = \"jupyter\"\n_DEFAULT_ROOT_LEVEL_METADATA = \"-all\"\n\n\ndef metadata_filter_as_dict(metadata_config):\n    \"\"\"Return the metadata filter represented as either None (no filter),\n    or a dictionary with at most two keys: 'additional' and 'excluded',\n    which contain either a list of metadata names, or the string 'all'\"\"\"\n\n    if metadata_config is None:\n        return {}\n\n    if metadata_config is True:\n        return {\"additional\": \"all\"}\n\n    if metadata_config is False:\n        return {\"excluded\": \"all\"}\n\n    if isinstance(metadata_config, dict):\n        assert set(metadata_config) <= {\"additional\", \"excluded\"}\n        return metadata_config\n\n    metadata_keys = metadata_config.split(\",\")\n\n    metadata_config = {}\n\n    for key in metadata_keys:\n        key = key.strip()\n        if key.startswith(\"-\"):\n            metadata_config.setdefault(\"excluded\", []).append(key[1:].strip())\n        elif key.startswith(\"+\"):\n            metadata_config.setdefault(\"additional\", []).append(key[1:].strip())\n        else:\n            metadata_config.setdefault(\"additional\", []).append(key)\n\n    for section in metadata_config:\n        if \"all\" in metadata_config[section]:\n            metadata_config[section] = \"all\"\n        else:\n            metadata_config[section] = [k for k in metadata_config[section] if k]\n\n    return metadata_config\n\n\ndef metadata_filter_as_string(metadata_filter):\n    \"\"\"Convert a filter, represented as a dictionary with 'additional' and 'excluded' entries, to a string\"\"\"\n    if not isinstance(metadata_filter, dict):\n        return metadata_filter\n\n    additional = metadata_filter.get(\"additional\", [])\n    if additional == \"all\":\n        entries = [\"all\"]\n    else:\n        entries = [key for key in additional if key not in _JUPYTEXT_CELL_METADATA]\n\n    excluded = metadata_filter.get(\"excluded\", [])\n    if excluded == \"all\":\n        entries.append(\"-all\")\n    else:\n        entries.extend([\"-\" + e for e in excluded])\n\n    return \",\".join(entries)\n\n\ndef update_metadata_filters(metadata, jupyter_md, cell_metadata):\n    \"\"\"Update or set the notebook and cell metadata filters\"\"\"\n\n    if not jupyter_md:\n        # Set a metadata filter equal to the current metadata in script\n        metadata.setdefault(\"jupytext\", {})[\"notebook_metadata_filter\"] = \"-all\"\n        metadata[\"jupytext\"].setdefault(\n            \"cell_metadata_filter\",\n            metadata_filter_as_string({\"additional\": cell_metadata, \"excluded\": \"all\"}),\n        )\n    elif \"cell_metadata_filter\" in metadata.get(\"jupytext\", {}):\n        # Update the existing metadata filter\n        metadata_filter = metadata_filter_as_dict(metadata.get(\"jupytext\", {})[\"cell_metadata_filter\"])\n        if isinstance(metadata_filter.get(\"excluded\"), list):\n            metadata_filter[\"excluded\"] = [key for key in metadata_filter[\"excluded\"] if key not in cell_metadata]\n        metadata_filter.setdefault(\"additional\", [])\n        if isinstance(metadata_filter.get(\"additional\"), list):\n            for key in cell_metadata:\n                if key not in metadata_filter[\"additional\"]:\n                    metadata_filter[\"additional\"].append(key)\n        metadata.setdefault(\"jupytext\", {})[\"cell_metadata_filter\"] = metadata_filter_as_string(metadata_filter)\n    else:\n        # Update the notebook metadata filter to include existing entries 376\n        nb_md_filter = metadata.get(\"jupytext\", {}).get(\"notebook_metadata_filter\", \"\").split(\",\")\n        nb_md_filter = [key for key in nb_md_filter if key]\n        if \"all\" in nb_md_filter or \"-all\" in nb_md_filter:\n            return\n        for key in metadata:\n            if key in _DEFAULT_NOTEBOOK_METADATA.split(\",\") or key in nb_md_filter or (\"-\" + key) in nb_md_filter:\n                continue\n            nb_md_filter.append(key)\n        if nb_md_filter:\n            metadata.setdefault(\"jupytext\", {})[\"notebook_metadata_filter\"] = \",\".join(nb_md_filter)\n\n\ndef filter_metadata(metadata, user_filter, default_filter=\"\", unsupported_keys=None, **kwargs):\n    \"\"\"Filter the cell or notebook metadata, according to the user preference\"\"\"\n    default_filter = metadata_filter_as_dict(default_filter) or {}\n    user_filter = metadata_filter_as_dict(user_filter) or {}\n\n    default_exclude = default_filter.get(\"excluded\", [])\n    default_include = default_filter.get(\"additional\", [])\n\n    assert not (default_exclude == \"all\" and default_include == \"all\")\n    if isinstance(default_include, list) and default_include and default_exclude == []:\n        default_exclude = \"all\"\n\n    user_exclude = user_filter.get(\"excluded\", [])\n    user_include = user_filter.get(\"additional\", [])\n\n    # notebook default filter = include only few metadata\n    if default_exclude == \"all\":\n        if user_include == \"all\":\n            return subset_metadata(\n                metadata,\n                exclude=user_exclude,\n                unsupported_keys=unsupported_keys,\n                **kwargs,\n            )\n        if user_exclude == \"all\":\n            return subset_metadata(\n                metadata,\n                keep_only=user_include,\n                unsupported_keys=unsupported_keys,\n                **kwargs,\n            )\n        return subset_metadata(\n            metadata,\n            keep_only=set(user_include).union(default_include),\n            exclude=user_exclude,\n            unsupported_keys=unsupported_keys,\n            **kwargs,\n        )\n\n    # cell default filter = all metadata but removed ones\n    if user_include == \"all\":\n        return subset_metadata(\n            metadata,\n            exclude=user_exclude,\n            unsupported_keys=unsupported_keys,\n            **kwargs,\n        )\n    if user_exclude == \"all\":\n        return subset_metadata(\n            metadata,\n            keep_only=user_include,\n            unsupported_keys=unsupported_keys,\n            **kwargs,\n        )\n    # Do not serialize empty tags\n    if \"tags\" in metadata and not metadata[\"tags\"]:\n        metadata = metadata.copy()\n        metadata.pop(\"tags\")\n    return subset_metadata(\n        metadata,\n        exclude=set(user_exclude).union(set(default_exclude).difference(user_include)),\n        unsupported_keys=unsupported_keys,\n        **kwargs,\n    )\n\n\ndef second_level(keys):\n    \"\"\"Return a dictionary with the nested keys, e.g. returns {'I':['a', 'b']} when keys=['I.a', 'I.b']\"\"\"\n    sub_keys = {}\n    for key in keys:\n        if \".\" in key:\n            left, right = key.split(\".\", 1)\n            sub_keys.setdefault(left, []).append(right)\n\n    return sub_keys\n\n\ndef suppress_unsupported_keys(metadata, unsupported_keys=None):\n    # assert isinstance(unsupported_keys, set)\n    if isinstance(unsupported_keys, set):\n        for key in metadata:\n            if not is_valid_metadata_key(key):\n                unsupported_keys.add(key)\n    return [key for key in metadata if is_valid_metadata_key(key)]\n\n\ndef subset_metadata(metadata, keep_only=None, exclude=None, unsupported_keys=None, remove=False):\n    \"\"\"Filter the metadata\"\"\"\n    supported_keys = suppress_unsupported_keys(metadata, unsupported_keys=unsupported_keys)\n    if keep_only is not None:\n        include = [key for key in supported_keys if key in keep_only]\n        filtered_metadata = {key: metadata[key] for key in include}\n        sub_keep_only = second_level(keep_only)\n        keys = [key for key in supported_keys if key in sub_keep_only]\n        for key in keys:\n            filtered_metadata[key] = subset_metadata(\n                metadata[key],\n                keep_only=sub_keep_only[key],\n                unsupported_keys=unsupported_keys,\n                remove=remove,\n            )\n    else:\n        include = supported_keys\n        filtered_metadata = {key: metadata[key] for key in supported_keys}\n\n    if exclude is not None:\n        for key in exclude:\n            if key in filtered_metadata:\n                filtered_metadata.pop(key)\n        sub_exclude = second_level(exclude)\n        for key in sub_exclude:\n            if key in filtered_metadata:\n                filtered_metadata[key] = subset_metadata(\n                    filtered_metadata[key],\n                    exclude=sub_exclude[key],\n                    unsupported_keys=unsupported_keys,\n                    remove=remove,\n                )\n\n    if remove:\n        for key in set(include).difference(exclude or {}):\n            metadata.pop(key, None)\n\n    return filtered_metadata\n\n\ndef restore_filtered_metadata(filtered_metadata, unfiltered_metadata, user_filter, default_filter):\n    \"\"\"Update the filtered metadata with the part of the unfiltered one that matches the filter\"\"\"\n    filtered_unfiltered_metadata = filter_metadata(unfiltered_metadata, user_filter, default_filter)\n\n    metadata = copy(filtered_metadata)\n    for key in unfiltered_metadata:\n        if key not in filtered_unfiltered_metadata:\n            # We don't want to restore the line_to_next_cell metadata from the ipynb file, see #761\n            if key not in _JUPYTEXT_CELL_METADATA:\n                metadata[key] = unfiltered_metadata[key]\n\n    return metadata\n"
  },
  {
    "path": "src/jupytext/myst.py",
    "content": "\"\"\"\nThis module contains round-trip conversion between\nmyst formatted text documents and notebooks.\n\"\"\"\n\nimport json\nimport re\nimport warnings\nfrom textwrap import dedent\n\nimport nbformat as nbf\nimport yaml\nfrom yaml.representer import SafeRepresenter\n\nfrom .cell_to_text import three_backticks_or_more\nfrom .metadata_filter import _JUPYTER_METADATA_NAMESPACE\n\ntry:\n    from markdown_it import MarkdownIt\n    from mdit_py_plugins.front_matter import front_matter_plugin\n    from mdit_py_plugins.myst_blocks import myst_block_plugin\n    from mdit_py_plugins.myst_role import myst_role_plugin\nexcept ImportError:\n    MarkdownIt = None\n\nMYST_FORMAT_NAME = \"myst\"\nCODE_DIRECTIVE = \"{code-cell}\"\nRAW_DIRECTIVE = \"{raw-cell}\"\n_DEFAULT_ROOT_LEVEL_METADATA = \"all\"\n\nSafeRepresenter.add_representer(nbf.NotebookNode, SafeRepresenter.represent_dict)\n\n\ndef is_myst_available():\n    \"\"\"Whether the markdown-it-py package is available.\"\"\"\n    return MarkdownIt is not None\n\n\ndef raise_if_myst_is_not_available():\n    if not is_myst_available():\n        raise ImportError(\"The MyST Markdown format requires python >= 3.6 and markdown-it-py~=1.0\")\n\n\ndef myst_version():\n    \"\"\"The version of myst.\"\"\"\n    return 0.13\n\n\ndef myst_extensions(no_md=False):\n    \"\"\"The allowed extensions for the myst format.\"\"\"\n    if no_md:\n        return [\".myst\", \".mystnb\", \".mnb\"]\n    return [\".md\", \".myst\", \".mystnb\", \".mnb\"]\n\n\ndef get_parser():\n    \"\"\"Return the markdown-it parser to use.\"\"\"\n    parser = (\n        MarkdownIt(\"commonmark\")\n        .enable(\"table\")\n        .use(front_matter_plugin)\n        .use(myst_block_plugin)\n        .use(myst_role_plugin)\n        # we only need to parse block level components (for efficiency)\n        .disable(\"inline\", True)\n    )\n    return parser\n\n\ndef matches_mystnb(\n    text,\n    ext=None,\n    requires_meta=True,\n    code_directive=CODE_DIRECTIVE,\n    raw_directive=RAW_DIRECTIVE,\n):\n    \"\"\"Attempt to distinguish a file as myst, only given its extension and content.\n\n    :param ext: the extension of the file\n    :param requires_meta: requires the file to contain top matter metadata\n    :param code_directive: the name of the directive to search for containing code cells\n    :param raw_directive: the name of the directive to search for containing raw cells\n    \"\"\"\n    # is the extension uniquely associated with myst (i.e. not just .md)\n    if ext and \".\" + (\".\" + ext).rsplit(\".\", 1)[1] in myst_extensions(no_md=True):\n        return True\n\n    # might the text contain metadata front matter\n    if requires_meta and not text.startswith(\"---\"):\n        return False\n\n    try:\n        tokens = get_parser().parse(text + \"\\n\")\n    except (TypeError, ValueError) as err:\n        warnings.warn(f\"myst-parser failed unexpectedly: {err}\")  # pragma: no cover\n        return False\n\n    # Is the format information available in the jupytext text representation?\n    if tokens and tokens[0].type == \"front_matter\":\n        try:\n            metadata = yaml.safe_load(tokens[0].content)\n        except (yaml.parser.ParserError, yaml.scanner.ScannerError):\n            pass\n        else:\n            try:\n                format_name = (\n                    metadata.get(_JUPYTER_METADATA_NAMESPACE, metadata)\n                    .get(\"jupytext\", {})\n                    .get(\"text_representation\", {})\n                    .get(\"format_name\")\n                )\n            except AttributeError:\n                pass\n            else:\n                if format_name == MYST_FORMAT_NAME:\n                    return True\n\n    # is there at least on fenced code block with a code/raw directive language\n    for token in tokens:\n        if token.type == \"fence\" and (token.info.startswith(code_directive) or token.info.startswith(raw_directive)):\n            return True\n\n    return False\n\n\nclass CompactDumper(yaml.SafeDumper):\n    \"\"\"This YAML dumper creates a more compact style for lists\"\"\"\n\n\ndef represent_list(self, data):\n    \"\"\"Compact lists\"\"\"\n    flow_style = not any(isinstance(i, dict) for i in data)\n    return self.represent_sequence(\"tag:yaml.org,2002:seq\", data, flow_style=flow_style)\n\n\ndef represent_dict(self, data):\n    \"\"\"Compact dicts\"\"\"\n    return self.represent_mapping(\"tag:yaml.org,2002:map\", data, flow_style=False)\n\n\nCompactDumper.add_representer(list, represent_list)\nCompactDumper.add_representer(dict, represent_dict)\n\n\ndef dump_yaml_blocks(data, compact=True):\n    \"\"\"Where possible, we try to use a more compact metadata style.\n\n    For blocks with no nested dicts, the block is denoted by starting colons::\n\n        :other: true\n        :tags: [hide-output, show-input]\n\n    For blocks with nesting the block is enlosed by ``---``::\n\n        ---\n        other:\n            more: true\n        tags: [hide-output, show-input]\n        ---\n    \"\"\"\n    string = yaml.dump(data, Dumper=CompactDumper, sort_keys=False)\n    lines = string.splitlines()\n    if compact and all(line and line[0].isalpha() for line in lines):\n        return \"\\n\".join([f\":{line}\" for line in lines]) + \"\\n\\n\"\n    return f\"---\\n{string}---\\n\"\n\n\nclass MystMetadataParsingError(Exception):\n    \"\"\"Error when parsing metadata from myst formatted text\"\"\"\n\n\ndef strip_blank_lines(text):\n    \"\"\"Remove initial blank lines\"\"\"\n    text = text.rstrip()\n    while text and text.startswith(\"\\n\"):\n        text = text[1:]\n    return text\n\n\ndef read_fenced_cell(token, cell_index, cell_type):\n    \"\"\"Parse (and validate) the full directive text.\"\"\"\n    content = token.content\n    error_msg = f\"{cell_type} cell {cell_index} at line {token.map[0] + 1} could not be read: \"\n\n    body_lines, options = parse_directive_options(content, error_msg)\n\n    # remove first line of body if blank\n    # this is to allow space between the options and the content\n    if body_lines and not body_lines[0].strip():\n        body_lines = body_lines[1:]\n\n    return options, body_lines\n\n\ndef parse_directive_options(content, error_msg):\n    \"\"\"Parse (and validate) the directive option section.\"\"\"\n    options = {}\n    if content.startswith(\"---\"):\n        content = \"\\n\".join(content.splitlines()[1:])\n        match = re.search(r\"^-{3,}\", content, re.MULTILINE)\n        if match:\n            yaml_block = content[: match.start()]\n            content = content[match.end() + 1 :]\n        else:\n            yaml_block = content\n            content = \"\"\n        yaml_block = dedent(yaml_block)\n        try:\n            options = yaml.safe_load(yaml_block) or {}\n        except (yaml.parser.ParserError, yaml.scanner.ScannerError) as error:\n            raise MystMetadataParsingError(error_msg + \"Invalid YAML; \" + str(error))\n    elif content.lstrip().startswith(\":\"):\n        content_lines = content.splitlines()  # type: list\n        yaml_lines = []\n        while content_lines:\n            if not content_lines[0].lstrip().startswith(\":\"):\n                break\n            yaml_lines.append(content_lines.pop(0).lstrip()[1:])\n        yaml_block = \"\\n\".join(yaml_lines)\n        content = \"\\n\".join(content_lines)\n        try:\n            options = yaml.safe_load(yaml_block) or {}\n        except (yaml.parser.ParserError, yaml.scanner.ScannerError) as error:\n            raise MystMetadataParsingError(error_msg + \"Invalid YAML; \" + str(error))\n\n    return content.splitlines(), options\n\n\ndef read_cell_metadata(token, cell_index):\n    \"\"\"Return cell metadata\"\"\"\n    metadata = {}\n    if token.content:\n        try:\n            metadata = json.loads(token.content.strip())\n        except Exception as err:\n            raise MystMetadataParsingError(f\"Markdown cell {cell_index} at line {token.map[0] + 1} could not be read: {err}\")\n        if not isinstance(metadata, dict):\n            raise MystMetadataParsingError(f\"Markdown cell {cell_index} at line {token.map[0] + 1} is not a dict\")\n\n    return metadata\n\n\ndef myst_to_notebook(\n    text,\n    code_directive=CODE_DIRECTIVE,\n    raw_directive=RAW_DIRECTIVE,\n    add_source_map=False,\n):\n    \"\"\"Convert text written in the myst format to a notebook.\n\n    :param text: the file text\n    :param code_directive: the name of the directive to search for containing code cells\n    :param raw_directive: the name of the directive to search for containing raw cells\n    :param add_source_map: add a `source_map` key to the notebook metadata,\n        which is a list of the starting source line number for each cell.\n\n    :raises MystMetadataParsingError if the metadata block is not valid JSON/YAML\n\n    NOTE: we assume here that all of these directives are at the top-level,\n    i.e. not nested in other directives.\n    \"\"\"\n    raise_if_myst_is_not_available()\n\n    tokens = get_parser().parse(text + \"\\n\")\n    lines = text.splitlines()\n    md_start_line = 0\n    default_lexer = None\n\n    # get the document metadata\n    metadata_nb = {}\n    if tokens and tokens[0].type == \"front_matter\":\n        metadata = tokens.pop(0)\n        md_start_line = metadata.map[1]\n        try:\n            metadata_nb = yaml.safe_load(metadata.content)\n        except (yaml.parser.ParserError, yaml.scanner.ScannerError) as error:\n            raise MystMetadataParsingError(f\"Notebook metadata: {error}\")\n\n    # create an empty notebook\n    nbf_version = nbf.v4\n    kwargs = {\"metadata\": nbf.from_dict(metadata_nb)}\n    notebook = nbf_version.new_notebook(**kwargs)\n    source_map = []  # this is a list of the starting line number for each cell\n\n    def _flush_markdown(start_line, token, md_metadata):\n        \"\"\"When we find a cell we check if there is preceding text.o\"\"\"\n        endline = token.map[0] if token else len(lines)\n        md_source = strip_blank_lines(\"\\n\".join(lines[start_line:endline]))\n        meta = nbf.from_dict(md_metadata)\n        if md_source:\n            source_map.append(start_line)\n            notebook.cells.append(nbf_version.new_markdown_cell(source=md_source, metadata=meta))\n\n    # iterate through the tokens to identify notebook cells\n    nesting_level = 0\n    md_metadata = {}\n\n    for token in tokens:\n        nesting_level += token.nesting\n\n        if nesting_level != 0:\n            # we ignore fenced block that are nested, e.g. as part of lists, etc\n            continue\n\n        if token.type == \"fence\" and token.info.startswith(code_directive):\n            _flush_markdown(md_start_line, token, md_metadata)\n            options, body_lines = read_fenced_cell(token, len(notebook.cells), \"Code\")\n            assert token.info.startswith(code_directive)\n            lexer = token.info[len(code_directive) :].strip()\n            if lexer:\n                if not default_lexer:\n                    default_lexer = lexer\n                elif lexer != default_lexer:\n                    warnings.warn(f\"All code cells in a MyST notebook must have the same language: {lexer}!={default_lexer}\")\n\n            meta = nbf.from_dict(options)\n            source_map.append(token.map[0] + 1)\n            notebook.cells.append(nbf_version.new_code_cell(source=\"\\n\".join(body_lines), metadata=meta))\n            md_metadata = {}\n            md_start_line = token.map[1]\n\n        elif token.type == \"fence\" and token.info.startswith(raw_directive):\n            _flush_markdown(md_start_line, token, md_metadata)\n            options, body_lines = read_fenced_cell(token, len(notebook.cells), \"Raw\")\n            meta = nbf.from_dict(options)\n            source_map.append(token.map[0] + 1)\n            notebook.cells.append(nbf_version.new_raw_cell(source=\"\\n\".join(body_lines), metadata=meta))\n            md_metadata = {}\n            md_start_line = token.map[1]\n\n        elif token.type == \"myst_block_break\":\n            _flush_markdown(md_start_line, token, md_metadata)\n            md_metadata = read_cell_metadata(token, len(notebook.cells))\n            md_start_line = token.map[1]\n\n    _flush_markdown(md_start_line, None, md_metadata)\n\n    if add_source_map:\n        notebook.metadata[\"source_map\"] = source_map\n\n    if \"language_info\" not in notebook.metadata and default_lexer:\n        has_metadata = bool(notebook.metadata)\n        jupyter_metadata = notebook.metadata.setdefault(_JUPYTER_METADATA_NAMESPACE, {})\n        jupytext_metadata = jupyter_metadata.setdefault(\"jupytext\", {})\n        jupytext_metadata[\"default_lexer\"] = default_lexer\n        if not has_metadata:\n            jupytext_metadata[\"notebook_metadata_filter\"] = \"-all\"\n\n    return notebook\n\n\ndef notebook_to_myst(\n    nb,\n    code_directive=CODE_DIRECTIVE,\n    raw_directive=RAW_DIRECTIVE,\n    default_lexer=None,\n):\n    \"\"\"Parse a notebook to a MyST formatted text document.\n\n    :param nb: the notebook to parse\n    :param code_directive: the name of the directive to use for code cells\n    :param raw_directive: the name of the directive to use for raw cells\n    :param default_lexer: a lexer name to use for annotating code cells\n        (if ``nb.metadata.language_info.pygments_lexer`` is not available)\n    \"\"\"\n    raise_if_myst_is_not_available()\n    string = \"\"\n\n    nb_metadata = nb.metadata\n\n    # we add the pygments lexer as a directive argument, for use by syntax highlighters\n    pygments_lexer = nb_metadata.get(\"language_info\", {}).get(\"pygments_lexer\", None)\n    if pygments_lexer is None:\n        pygments_lexer = default_lexer\n\n    if nb_metadata:\n        string += dump_yaml_blocks(nb_metadata, compact=False)\n\n    last_cell_md = False\n    for i, cell in enumerate(nb.cells):\n        if cell.cell_type == \"markdown\":\n            metadata = cell.metadata\n            if metadata or last_cell_md:\n                if metadata:\n                    string += f\"\\n+++ {json.dumps(metadata)}\\n\"\n                else:\n                    string += \"\\n+++\\n\"\n            string += \"\\n\" + cell.source\n            if not cell.source.endswith(\"\\n\"):\n                string += \"\\n\"\n            last_cell_md = True\n\n        elif cell.cell_type in [\"code\", \"raw\"]:\n            cell_delimiter = three_backticks_or_more(cell.source.splitlines())\n            string += \"\\n{}{}\".format(\n                cell_delimiter,\n                code_directive if cell.cell_type == \"code\" else raw_directive,\n            )\n            if pygments_lexer and cell.cell_type == \"code\":\n                string += f\" {pygments_lexer}\"\n            string += \"\\n\"\n            metadata = cell.metadata\n            if metadata:\n                string += dump_yaml_blocks(metadata)\n            elif cell.source.startswith(\"---\") or cell.source.startswith(\":\"):\n                string += \"\\n\"\n            string += cell.source\n            if not cell.source.endswith(\"\\n\"):\n                string += \"\\n\"\n            string += cell_delimiter + \"\\n\"\n            last_cell_md = False\n\n        else:\n            raise NotImplementedError(f\"cell {i}, type: {cell.cell_type}\")\n\n    if not nb_metadata:\n        # remove initial blank line\n        assert string.startswith(\"\\n\")\n        string = string[1:]\n\n    return string.rstrip() + \"\\n\"\n"
  },
  {
    "path": "src/jupytext/paired_paths.py",
    "content": "\"\"\"List all the paths associated to a given notebook\"\"\"\n\nimport os\n\nfrom .config import find_jupytext_configuration_file\nfrom .formats import (\n    NOTEBOOK_EXTENSIONS,\n    long_form_multiple_formats,\n    long_form_one_format,\n    short_form_multiple_formats,\n    short_form_one_format,\n)\n\n\nclass InconsistentPath(ValueError):\n    \"\"\"An exception raised when the path of a notebook is not consistent with the jupytext.format\n    information it contains\"\"\"\n\n\nclass InconsistentSuffix(InconsistentPath):\n    \"\"\"An exception raised when the suffix of a notebook is not consistent with the suffix specification\n    of a Jupytext format\"\"\"\n\n\nclass InconsistentPrefix(InconsistentPath):\n    \"\"\"An exception raised when the prefix of a notebook is not consistent with the prefix specification\n    of a Jupytext format\"\"\"\n\n\nclass InconsistentPrefixDirectory(InconsistentPath):\n    \"\"\"An exception raised when the directory prefix of a notebook is not consistent with the directory prefix specification\n    of a Jupytext format\"\"\"\n\n\nclass InconsistentPrefixRoot(InconsistentPath):\n    \"\"\"An exception raised when the root prefix of a notebook is not consistent with the root prefix specification\n    of a Jupytext format\"\"\"\n\n\nclass NonNotebookExtension(InconsistentPath):\n    \"\"\"An exception raised when a notebook path does not have a notebook extension\"\"\"\n\n\nclass InconsistentExtension(InconsistentPath):\n    \"\"\"An exception raised when the extension of a notebook is not consistent with the extension specification\n    of a Jupytext format\"\"\"\n\n\ndef split(path, sep):\n    if sep not in path:\n        return \"\", path\n\n    return path.rsplit(sep, 1)\n\n\ndef join(left, right, sep):\n    if left:\n        return left + sep + right\n    return right\n\n\ndef separator(path):\n    \"\"\"Return the local path separator (always / in the contents manager)\"\"\"\n    if os.path.sep == \"\\\\\" and \"\\\\\" in path:\n        return \"\\\\\"\n    return \"/\"\n\n\ndef get_prefix_root_prefix_dir_prefix_file_name(prefix: str) -> tuple[str, str, str]:\n    if \"//\" in prefix:\n        prefix_root, prefix = prefix.rsplit(\"//\", 1)\n    else:\n        prefix_root = \"\"\n    prefix_dir, prefix_file_name = split(prefix, \"/\")\n    return prefix_root, prefix_dir, prefix_file_name\n\n\ndef get_prefix(prefix_root: str, prefix_dir: str, prefix_file_name: str) -> str:\n    if prefix_root:\n        return f\"{prefix_root}//{prefix_dir}/{prefix_file_name}\"\n    if not prefix_dir and not prefix_file_name:\n        return \"\"\n    return f\"{prefix_dir}/{prefix_file_name}\"\n\n\ndef base_path(main_path, fmt, formats=None):\n    \"\"\"Given a path and options for a format (ext, suffix, prefix), return the corresponding base path\"\"\"\n    fmt = long_form_one_format(fmt)\n\n    base, ext = os.path.splitext(main_path)\n    if \"extension\" not in fmt:\n        fmt[\"extension\"] = ext\n        if ext not in NOTEBOOK_EXTENSIONS:\n            raise NonNotebookExtension(\n                \"'{}' is not a notebook. Supported extensions are '{}'.\".format(main_path, \"', '\".join(NOTEBOOK_EXTENSIONS))\n            )\n\n    if ext != fmt[\"extension\"]:\n        raise InconsistentExtension(\n            \"Notebook path '{}' was expected to have extension '{}'\".format(main_path, fmt[\"extension\"])\n        )\n\n    # Is there a format that matches the main path?\n    if formats is None:\n        formats = [fmt]\n\n    for f in formats:\n        if f[\"extension\"] != fmt[\"extension\"]:\n            continue\n        if \"format_name\" in fmt and \"format_name\" in f and f[\"format_name\"] != fmt[\"format_name\"]:\n            continue\n        # extend 'fmt' with the format information (prefix, suffix) from f\n        fmt = {key: fmt.get(key, value) for key, value in f.items()}\n        break\n\n    suffix = fmt.get(\"suffix\")\n    prefix = fmt.get(\"prefix\")\n\n    if suffix:\n        if not base.endswith(suffix):\n            raise InconsistentSuffix(f\"Notebook name '{base}' was expected to end with suffix '{suffix}'\")\n        base = base[: -len(suffix)]\n\n    if not prefix:\n        return base\n\n    (\n        prefix_root,\n        prefix_dir,\n        prefix_file_name,\n    ) = get_prefix_root_prefix_dir_prefix_file_name(prefix)\n    sep = separator(base)\n    notebook_dir, notebook_file_name = split(base, sep)\n\n    base_dir = None\n    config_file = find_jupytext_configuration_file(notebook_dir)\n    if config_file:\n        config_file_dir = os.path.dirname(config_file)\n        if notebook_dir.startswith(config_file_dir):\n            base_dir = config_file_dir\n            notebook_dir = notebook_dir[len(config_file_dir) :]\n\n    if prefix_file_name:\n        if not notebook_file_name.startswith(prefix_file_name):\n            raise InconsistentPrefix(\n                f\"Notebook name '{notebook_file_name}' was expected to start with prefix '{prefix_file_name}'\"\n            )\n        notebook_file_name = notebook_file_name[len(prefix_file_name) :]\n\n    if prefix_dir:\n        parent_notebook_dir = notebook_dir\n        parent_prefix_dir = prefix_dir\n        actual_folders = list()\n        while parent_prefix_dir:\n            parent_prefix_dir, expected_folder = split(parent_prefix_dir, \"/\")\n            if expected_folder == \"..\":\n                if not actual_folders:\n                    raise InconsistentPrefixDirectory(\n                        f\"Notebook directory '{notebook_dir}' does not match prefix '{prefix_dir}'\"\n                    )\n                parent_notebook_dir = join(parent_notebook_dir, actual_folders.pop(), sep)\n            else:\n                parent_notebook_dir, actual_folder = split(parent_notebook_dir, sep)\n                actual_folders.append(actual_folder)\n\n                if actual_folder != expected_folder:\n                    raise InconsistentPrefixDirectory(\n                        f\"Notebook directory '{notebook_dir}' does not match prefix '{prefix_dir}'\"\n                    )\n        notebook_dir = parent_notebook_dir\n\n    if prefix_root:\n        long_prefix_root = sep + prefix_root.replace(\"/\", sep) + sep\n        long_notebook_dir = sep + notebook_dir + sep\n        if long_prefix_root not in long_notebook_dir:\n            raise InconsistentPrefixRoot(f\"Notebook directory '{notebook_dir}' does not match prefix root '{prefix_root}'\")\n        left, right = long_notebook_dir.rsplit(long_prefix_root, 1)\n        notebook_dir = left + sep + \"//\" + right\n\n        # We are going to remove the last char, but we need to insert it back in the end...\n        if not right:\n            sep = notebook_dir[-1]\n        notebook_dir = notebook_dir[len(sep) : -len(sep)]\n\n    if base_dir:\n        notebook_dir = base_dir + notebook_dir\n\n    if not notebook_dir:\n        return notebook_file_name\n\n    return notebook_dir + sep + notebook_file_name\n\n\ndef base_path_and_adjusted_fmt(path: str, fmt: dict[str, str]) -> tuple[str, dict[str, str]]:\n    \"\"\"Return the base path and possibly adjusted Jupytext format\n    that matches the current path\"\"\"\n    assert isinstance(fmt, dict), \"fmt must be a dictionary\"\n    fmt = dict(fmt)  # make a copy\n    prefix = fmt.get(\"prefix\", \"\")\n    (\n        prefix_root,\n        prefix_dir,\n        prefix_file_name,\n    ) = get_prefix_root_prefix_dir_prefix_file_name(prefix)\n\n    try:\n        return base_path(path, fmt), fmt\n    except InconsistentSuffix:\n        del fmt[\"suffix\"]\n        return base_path(path, fmt), fmt\n    except InconsistentPrefixRoot:\n        if not prefix_root:\n            raise\n        fmt[\"prefix\"] = get_prefix(\"\", prefix_dir, prefix_file_name)\n        if not fmt[\"prefix\"]:\n            del fmt[\"prefix\"]\n        return base_path(path, fmt), fmt\n    except InconsistentPrefix:\n        if not prefix_file_name:\n            raise\n        fmt[\"prefix\"] = get_prefix(prefix_root, prefix_dir, \"\")\n        if not fmt[\"prefix\"]:\n            del fmt[\"prefix\"]\n        return base_path(path, fmt), fmt\n    except InconsistentPrefixDirectory:\n        if not prefix_dir:\n            raise\n        fmt[\"prefix\"] = get_prefix(prefix_root, \"\", prefix_file_name)\n        if not fmt[\"prefix\"]:\n            del fmt[\"prefix\"]\n        return base_path(path, fmt), fmt\n\n\ndef full_path(base, fmt):\n    \"\"\"Return the full path for the notebook, given the base path\"\"\"\n    ext = fmt[\"extension\"]\n    suffix = fmt.get(\"suffix\")\n    prefix = fmt.get(\"prefix\")\n\n    full = base\n\n    if prefix:\n        if \"//\" in prefix:\n            prefix_root, prefix = prefix.rsplit(\"//\", 1)\n        else:\n            prefix_root = \"\"\n        prefix_dir, prefix_file_name = split(prefix, \"/\")\n\n        # Local path separator (\\\\ on windows)\n        sep = separator(base)\n        prefix_dir = prefix_dir.replace(\"/\", sep)\n\n        if (prefix_root != \"\") != (\"//\" in base):\n            raise InconsistentPath(\n                \"Notebook base name '{}' is not compatible with fmt={}. Make sure you use prefix roots \"\n                \"in either none, or all of the paired formats\".format(base, short_form_one_format(fmt))\n            )\n        if prefix_root:\n            left, right = base.rsplit(\"//\", 1)\n            right_dir, notebook_file_name = split(right, sep)\n            notebook_dir = left + prefix_root + sep + right_dir\n        else:\n            notebook_dir, notebook_file_name = split(base, sep)\n\n        if prefix_file_name:\n            notebook_file_name = prefix_file_name + notebook_file_name\n\n        if prefix_dir:\n            dotdot = \"..\" + sep\n            while prefix_dir.startswith(dotdot):\n                prefix_dir = prefix_dir[len(dotdot) :]\n                notebook_dir = split(notebook_dir, sep)[0]\n\n            # Do not add a path separator when notebook_dir is '/'\n            if notebook_dir and not notebook_dir.endswith(sep):\n                notebook_dir = notebook_dir + sep\n\n            notebook_dir = notebook_dir + prefix_dir\n\n        if notebook_dir and not notebook_dir.endswith(sep):\n            notebook_dir = notebook_dir + sep\n\n        full = notebook_dir + notebook_file_name\n\n    if suffix:\n        full = full + suffix\n\n    return full + ext\n\n\ndef find_base_path_and_format(main_path, formats: list[dict[str, str]]) -> tuple[str, dict[str, str]]:\n    \"\"\"Return the base path and the format corresponding to the given path\"\"\"\n    for fmt in formats:\n        try:\n            return base_path(main_path, fmt), fmt\n        except InconsistentPath:\n            continue\n\n    ext = os.path.splitext(main_path)[1][1:]\n    raise InconsistentPath(\n        f\"Path '{main_path}' matches none of the export formats: {formats}. \"\n        f\"Please make sure that jupytext.formats covers the current file \"\n        f\"(e.g. add '{ext}' to the export formats).\"\n    )\n\n\ndef paired_paths(main_path, fmt, formats):\n    \"\"\"Return the list of paired notebooks, given main path, and the list of formats\"\"\"\n    if not formats:\n        return [(main_path, {\"extension\": os.path.splitext(main_path)[1]})]\n\n    formats = long_form_multiple_formats(formats)\n\n    # Is there a format that matches the main path?\n    base = base_path(main_path, fmt, formats)\n    paths = [full_path(base, f) for f in formats]\n\n    if main_path not in paths:\n        raise InconsistentPath(\n            \"Paired paths '{}' do not include the current notebook path '{}'. \"\n            \"Current format is '{}', and paired formats are '{}'.\".format(\n                \"','\".join(paths),\n                main_path,\n                short_form_one_format(fmt),\n                short_form_multiple_formats(formats),\n            )\n        )\n\n    if len(paths) > len(set(paths)):\n        raise InconsistentPath(\"Duplicate paired paths for this notebook. Please fix jupytext.formats.\")\n\n    return list(zip(paths, formats))\n"
  },
  {
    "path": "src/jupytext/pairs.py",
    "content": "\"\"\"Functions to read or write paired notebooks\"\"\"\n\nfrom collections import namedtuple\n\nfrom .formats import long_form_multiple_formats, long_form_one_format\nfrom .paired_paths import paired_paths\n\nNotebookFile = namedtuple(\"notebook_file\", \"path fmt timestamp\")\n\n\nclass PairedFilesDiffer(ValueError):\n    \"\"\"An error when the two representations of a paired notebook differ\"\"\"\n\n\ndef latest_inputs_and_outputs(path, fmt, formats, get_timestamp, contents_manager_mode=False):\n    \"\"\"Given a notebook path, its format and paired formats, and a function that\n    returns the timestamp for each (or None if the file does not exist), return\n    the most recent notebook for the inputs and outputs, respectively\"\"\"\n\n    timestamp_inputs = None\n    timestamp_outputs = None\n    inputs_path = None\n    outputs_path = None\n    input_fmt = None\n    output_fmt = None\n\n    fmt = long_form_one_format(fmt)\n    formats = long_form_multiple_formats(formats)\n\n    for alt_path, alt_fmt in paired_paths(path, fmt, formats):\n        # In the contents manager, we don't read another text file if the current notebook is in already in text mode\n        if contents_manager_mode and alt_fmt[\"extension\"] != \".ipynb\" and fmt[\"extension\"] != \".ipynb\":\n            if any(alt_fmt.get(key) != fmt.get(key) for key in [\"extension\", \"suffix\", \"prefix\"]):\n                continue\n\n        timestamp = get_timestamp(alt_path)\n        if timestamp is None:\n            continue\n\n        if alt_fmt[\"extension\"] == \".ipynb\":\n            if timestamp_outputs is None or timestamp > timestamp_outputs:\n                timestamp_outputs = timestamp\n                outputs_path, output_fmt = alt_path, alt_fmt\n        elif timestamp_inputs is None or timestamp > timestamp_inputs:\n            timestamp_inputs = timestamp\n            inputs_path, input_fmt = alt_path, alt_fmt\n\n    if timestamp_inputs is None or (not contents_manager_mode and timestamp_outputs and timestamp_outputs > timestamp_inputs):\n        timestamp_inputs = timestamp_outputs\n        inputs_path, input_fmt = outputs_path, output_fmt\n\n    return (\n        NotebookFile(inputs_path, input_fmt, timestamp_inputs),\n        NotebookFile(outputs_path, output_fmt, timestamp_outputs),\n    )\n"
  },
  {
    "path": "src/jupytext/pandoc.py",
    "content": "\"\"\"Jupyter notebook to Markdown and back, using Pandoc\"\"\"\n\nimport os\nimport subprocess\nimport tempfile\n\n# Copy nbformat reads and writes to avoid them being patched in the contents manager!!\nfrom nbformat import reads as ipynb_reads\nfrom nbformat import writes as ipynb_writes\nfrom packaging.version import parse\n\n\nclass PandocError(OSError):\n    \"\"\"An error related to Pandoc\"\"\"\n\n\ndef pandoc(args, filein=None, fileout=None):\n    \"\"\"Execute pandoc with the given arguments\"\"\"\n    cmd = [\"pandoc\"]\n\n    if filein:\n        cmd.append(filein)\n\n    if fileout:\n        cmd.append(\"-o\")\n        cmd.append(fileout)\n\n    cmd.extend(args.split())\n\n    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)\n    out, err = proc.communicate()\n    if proc.returncode:\n        raise PandocError(f\"pandoc exited with return code {proc.returncode}\\n{str(err)}\")\n    return out.decode(\"utf-8\")\n\n\ndef is_pandoc_available(min_version=\"2.7.2\", max_version=None):\n    \"\"\"Is Pandoc>=2.7.2 available?\"\"\"\n    try:\n        raise_if_pandoc_is_not_available(min_version=min_version, max_version=max_version)\n        return True\n    except PandocError:\n        return False\n\n\ndef raise_if_pandoc_is_not_available(min_version=\"2.7.2\", max_version=None):\n    \"\"\"Raise with an informative error message if pandoc is not available\"\"\"\n    version = pandoc_version()\n    if version == \"N/A\":\n        raise PandocError(f\"The Pandoc Markdown format requires 'pandoc>={min_version}', but pandoc was not found\")\n\n    if parse(version) < parse(min_version):\n        raise PandocError(\n            f\"The Pandoc Markdown format requires 'pandoc>={min_version}', but pandoc version {version} was found\"\n        )\n\n    if max_version and parse(version) > parse(max_version):\n        raise PandocError(\n            f\"The Pandoc Markdown format requires 'pandoc<={max_version}', but pandoc version {version} was found\"\n        )\n\n    return version\n\n\ndef pandoc_version():\n    \"\"\"Pandoc's version number\"\"\"\n    try:\n        return pandoc(\"--version\").splitlines()[0].split()[1]\n    except OSError:\n        return \"N/A\"\n\n\ndef md_to_notebook(text):\n    \"\"\"Convert a Markdown text to a Jupyter notebook, using Pandoc\"\"\"\n    raise_if_pandoc_is_not_available()\n    tmp_file = tempfile.NamedTemporaryFile(delete=False)\n    tmp_file.write(text.encode(\"utf-8\"))\n    tmp_file.close()\n\n    if parse(pandoc_version()) < parse(\"2.11.2\"):\n        pandoc_args = \"--from markdown --to ipynb -s --atx-headers --wrap=preserve --preserve-tabs\"\n    else:\n        pandoc_args = \"--from markdown --to ipynb -s --markdown-headings=atx --wrap=preserve --preserve-tabs\"\n    pandoc(\n        pandoc_args,\n        tmp_file.name,\n        tmp_file.name,\n    )\n\n    with open(tmp_file.name, encoding=\"utf-8\") as opened_file:\n        notebook = ipynb_reads(opened_file.read(), as_version=4)\n    os.unlink(tmp_file.name)\n\n    return notebook\n\n\ndef notebook_to_md(notebook):\n    \"\"\"Convert a notebook to its Markdown representation, using Pandoc\"\"\"\n    raise_if_pandoc_is_not_available()\n    tmp_file = tempfile.NamedTemporaryFile(delete=False)\n    tmp_file.write(ipynb_writes(notebook).encode(\"utf-8\"))\n    tmp_file.close()\n\n    if parse(pandoc_version()) < parse(\"2.11.2\"):\n        pandoc_args = \"--from ipynb --to markdown -s --atx-headers --wrap=preserve --preserve-tabs\"\n    else:\n        pandoc_args = \"--from ipynb --to markdown -s --markdown-headings=atx --wrap=preserve --preserve-tabs\"\n    pandoc(\n        pandoc_args,\n        tmp_file.name,\n        tmp_file.name,\n    )\n\n    with open(tmp_file.name, encoding=\"utf-8\") as opened_file:\n        text = opened_file.read()\n\n    os.unlink(tmp_file.name)\n    return \"\\n\".join(text.splitlines())\n"
  },
  {
    "path": "src/jupytext/pep8.py",
    "content": "\"\"\"Determine how many blank lines should be inserted between two cells\"\"\"\n\nfrom .stringparser import StringParser\n\n\ndef next_instruction_is_function_or_class(lines):\n    \"\"\"Is the first non-empty, non-commented line of the cell either a function or a class?\"\"\"\n    parser = StringParser(\"python\")\n    for i, line in enumerate(lines):\n        if parser.is_quoted():\n            parser.read_line(line)\n            continue\n        parser.read_line(line)\n        if not line.strip():  # empty line\n            if i > 0 and not lines[i - 1].strip():\n                return False\n            continue\n        if line.startswith(\"def \") or line.startswith(\"async \") or line.startswith(\"class \"):\n            return True\n        if line.startswith((\"#\", \"@\", \" \", \")\")):\n            continue\n        return False\n\n    return False\n\n\ndef cell_ends_with_function_or_class(lines):\n    \"\"\"Does the last line of the cell belong to an indented code?\"\"\"\n    non_quoted_lines = []\n    parser = StringParser(\"python\")\n    for line in lines:\n        if not parser.is_quoted():\n            non_quoted_lines.append(line)\n        parser.read_line(line)\n\n    # find the first line, starting from the bottom, that is not indented\n    lines = non_quoted_lines[::-1]\n    for i, line in enumerate(lines):\n        if not line.strip():\n            # two blank lines? we won't need to insert more blank lines below this cell\n            if i > 0 and not lines[i - 1].strip():\n                return False\n            continue\n        if line.startswith((\"#\", \" \", \")\")):\n            continue\n        if line.startswith(\"def \") or line.startswith(\"async \") or line.startswith(\"class \"):\n            return True\n        return False\n\n    return False\n\n\ndef cell_ends_with_code(lines):\n    \"\"\"Is the last line of the cell a line with code?\"\"\"\n    if not lines:\n        return False\n    if not lines[-1].strip():\n        return False\n    if lines[-1].startswith(\"#\"):\n        return False\n    return True\n\n\ndef cell_has_code(lines):\n    \"\"\"Is there any code in this cell?\"\"\"\n    for i, line in enumerate(lines):\n        stripped_line = line.strip()\n        if stripped_line.startswith(\"#\"):\n            continue\n\n        # Two consecutive blank lines?\n        if not stripped_line:\n            if i > 0 and not lines[i - 1].strip():\n                return False\n            continue\n\n        return True\n\n    return False\n\n\ndef pep8_lines_between_cells(prev_lines, next_lines, ext):\n    \"\"\"How many blank lines should be added between the two python paragraphs to make them pep8?\"\"\"\n    if not next_lines:\n        return 1\n    if not prev_lines:\n        return 0\n    if ext != \".py\":\n        return 1\n    if cell_ends_with_function_or_class(prev_lines):\n        return 2 if cell_has_code(next_lines) else 1\n    if cell_ends_with_code(prev_lines) and next_instruction_is_function_or_class(next_lines):\n        return 2\n    return 1\n"
  },
  {
    "path": "src/jupytext/quarto.py",
    "content": "\"\"\"Jupyter notebook to Quarto Markdown and back, using 'quarto convert'\"\"\"\n\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\n\n# Copy nbformat reads and writes to avoid them being patched in the contents manager!!\nfrom nbformat import reads as ipynb_reads\nfrom nbformat import writes as ipynb_writes\nfrom packaging.version import parse\nimport yaml\n\nQUARTO_MIN_VERSION = \"0.2.134\"\n\n\nclass QuartoError(OSError):\n    \"\"\"An error related to Quarto\"\"\"\n\n\ndef quarto(args, filein=None):\n    \"\"\"Execute quarto with the given arguments\"\"\"\n    executable = shutil.which(\"quarto\")\n    if not executable and sys.platform.startswith(\"win\"):\n        # On Windows, try quarto.cmd, see #1406\n        executable = shutil.which(\"quarto.cmd\")\n    if not executable:\n        raise QuartoError(\"Could not find 'quarto' executable\")\n\n    cmd = [executable] + args.split()\n\n    if filein:\n        cmd.append(filein)\n\n    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n    out, err = proc.communicate()\n    if proc.returncode:\n        raise QuartoError(f\"{' '.join(cmd)} exited with return code {proc.returncode}\\n{err.decode('utf-8')}\")\n\n    return out.decode(\"utf-8\")\n\n\ndef is_quarto_available(min_version=QUARTO_MIN_VERSION):\n    \"\"\"Is Quarto available?\"\"\"\n    try:\n        raise_if_quarto_is_not_available(min_version=min_version)\n        return True\n    except QuartoError:\n        return False\n\n\ndef raise_if_quarto_is_not_available(min_version=QUARTO_MIN_VERSION):\n    \"\"\"Raise with an informative error message if quarto is not available\"\"\"\n    version = quarto_version()\n    if version == \"N/A\":\n        raise QuartoError(f\"The Quarto Markdown format requires 'quarto>={min_version}', but quarto was not found\")\n\n    if parse(version) < parse(min_version):\n        raise QuartoError(\n            f\"The Quarto Markdown format requires 'quarto>={min_version}', but quarto version {version} was found\"\n        )\n\n    return version\n\n\ndef quarto_version():\n    \"\"\"Quarto's version number\"\"\"\n    try:\n        return quarto(\"--version\").strip()\n    except OSError:\n        return \"N/A\"\n\n\ndef qmd_to_notebook(text):\n    \"\"\"Convert a Quarto Markdown notebook to a Jupyter notebook\"\"\"\n    raise_if_quarto_is_not_available()\n    tmp_qmd_file = tempfile.NamedTemporaryFile(delete=False, suffix=\".qmd\")\n    tmp_qmd_file.write(text.encode(\"utf-8\"))\n    tmp_qmd_file.close()\n\n    quarto(\"convert --log-level warning\", tmp_qmd_file.name)\n\n    tmp_ipynb_file_name = tmp_qmd_file.name[:-4] + \".ipynb\"\n\n    with open(tmp_ipynb_file_name, encoding=\"utf-8\") as ipynb_file:\n        notebook = ipynb_reads(ipynb_file.read(), as_version=4)\n\n    os.unlink(tmp_qmd_file.name)\n    os.unlink(tmp_ipynb_file_name)\n\n    # Recent version of Quarto duplicate the notebook metadata in a YAML header\n    # If we find such a header, we remove it if it is identical to the notebook metadata\n    if not notebook.cells or notebook.cells[0].cell_type != \"markdown\":\n        return notebook\n\n    cell_source = notebook.cells[0].source.strip()\n    if cell_source.startswith(\"---\") and cell_source.endswith(\"---\"):\n        try:\n            metadata_from_top_cell = yaml.safe_load(cell_source[3:-3])\n        except yaml.YAMLError:\n            pass\n        else:\n            if \"jupyter\" not in metadata_from_top_cell:\n                return notebook\n            if metadata_from_top_cell == {\"jupyter\": \"python3\"}:\n                # Quarto sometimes writes \"jupyter: python3\" instead of the full metadata\n                # We can safely remove this cell\n                del notebook.cells[0]\n                return notebook\n\n            jupyter_metadata = json.dumps(metadata_from_top_cell[\"jupyter\"], sort_keys=True)\n            notebook_metadata = json.dumps(notebook.metadata, sort_keys=True)\n            if jupyter_metadata == notebook_metadata:\n                if set(metadata_from_top_cell.keys()) == {\"jupyter\"}:\n                    # The metadata are identical, we can remove the duplicated cell\n                    del notebook.cells[0]\n                    return notebook\n                else:\n                    # The jupyter metadata are identical, but there are other keys in the YAML header\n                    # We keep the cell, but remove the jupyter key\n                    lines = cell_source.splitlines()\n                    non_jupyter_lines = []\n                    in_jupyter_section = False\n                    for line in lines:\n                        if not (line.startswith(\"  \") or line.startswith(\"\\t\")):\n                            in_jupyter_section = False\n                        if line.rstrip() == \"jupyter:\":\n                            in_jupyter_section = True\n                        if not in_jupyter_section:\n                            non_jupyter_lines.append(line)\n                    notebook.cells[0].source = \"\\n\".join(non_jupyter_lines)\n            else:\n                # The metadata are different, we keep the cell but issue a warning\n                print(\n                    \"Warning: the Quarto Markdown file contains a YAML header that does not match the notebook metadata:\\n\"\n                    f\"Header metadata:\\n{metadata_from_top_cell}\\n\"\n                    f\"Notebook metadata:\\n{notebook_metadata}\",\n                    file=sys.stderr,\n                )\n\n    return notebook\n\n\ndef notebook_to_qmd(notebook):\n    \"\"\"Convert a Jupyter notebook to its Quarto Markdown representation\"\"\"\n    raise_if_quarto_is_not_available()\n    tmp_ipynb_file = tempfile.NamedTemporaryFile(delete=False, suffix=\".ipynb\")\n    tmp_ipynb_file.write(ipynb_writes(notebook).encode(\"utf-8\"))\n    tmp_ipynb_file.close()\n\n    quarto(\"convert --log-level warning\", tmp_ipynb_file.name)\n\n    tmp_qmd_file_name = tmp_ipynb_file.name[:-6] + \".qmd\"\n\n    with open(tmp_qmd_file_name, encoding=\"utf-8\") as qmd_file:\n        text = qmd_file.read()\n\n    os.unlink(tmp_ipynb_file.name)\n    os.unlink(tmp_qmd_file_name)\n\n    return \"\\n\".join(text.splitlines())\n"
  },
  {
    "path": "src/jupytext/reraise.py",
    "content": "\"\"\"Raise the given error at evaluation time\"\"\"\n\n\ndef reraise(error):\n    \"\"\"Return a function that raises the given error when evaluated\"\"\"\n\n    def local_function(*args, **kwargs):\n        raise error\n\n    return local_function\n"
  },
  {
    "path": "src/jupytext/stringparser.py",
    "content": "\"\"\"A simple file parser that can tell whether the first character of a line\nis quoted or not\"\"\"\n\nfrom .languages import _COMMENT\n\n\nclass StringParser:\n    \"\"\"A simple file parser that can tell whether the first character of a line\n    is quoted or not\"\"\"\n\n    single = None\n    triple = None\n    triple_start = None\n\n    def __init__(self, language):\n        self.ignore = language is None\n        self.python = language != \"R\"\n        self.comment = _COMMENT.get(language)\n\n    def is_quoted(self):\n        \"\"\"Is the next line quoted?\"\"\"\n        if self.ignore:\n            return False\n        return self.single or self.triple\n\n    def read_line(self, line):\n        \"\"\"Read a new line\"\"\"\n        if self.ignore:\n            return\n\n        # Do not search for quotes when the line is commented out (and not quoted)\n        if not self.is_quoted() and self.comment is not None and line.lstrip().startswith(self.comment):\n            return\n\n        self.triple_start = -1\n\n        for i, char in enumerate(line):\n            if (\n                self.single is None\n                and self.triple is None\n                and self.comment\n                and self.comment.startswith(char)\n                and line[i:].startswith(self.comment)\n            ):\n                break\n            if char not in ['\"', \"'\"]:\n                continue\n            # Is the char escaped?\n            if line[i - 1 : i] == \"\\\\\":\n                continue\n\n            if self.single == char:\n                self.single = None\n                continue\n            if self.single is not None:\n                continue\n\n            if not self.python:\n                continue\n\n            if line[i - 2 : i + 1] == 3 * char and i >= self.triple_start + 3:\n                # End of a triple quote\n                if self.triple == char:\n                    self.triple = None\n                    self.triple_start = i\n                    continue\n\n                # Are we looking for a different triple quote?\n                if self.triple is not None:\n                    continue\n\n                # Triple quote starting\n                self.triple = char\n                self.triple_start = i\n                continue\n\n            # Inside a multiline quote\n            if self.triple is not None:\n                continue\n\n            self.single = char\n\n        # Line ended\n        if self.python:\n            self.single = None\n"
  },
  {
    "path": "src/jupytext/sync_contentsmanager.py",
    "content": "\"\"\"\nThis file is automatically generated by\ntests/functional/contents_manager/test_async_and_sync_contents_manager_are_in_sync.py\nDo not edit this file manually.\n\"\"\"\n\n\"\"\"\nThis module exposes the TextFileContentsManager that allows to open\ntext files as notebooks\n\"\"\"\n\nimport inspect\nimport itertools\nimport os\n\ntry:\n    import tomllib\nexcept ImportError:\n    import tomli as tomllib\n\nfrom collections import namedtuple\nfrom datetime import timedelta\n\nimport nbformat\nfrom tornado.web import HTTPError\n\nfrom .sync_pairs import read_pair, write_pair\nfrom .config import (\n    JUPYTEXT_CONFIG_FILES,\n    PYPROJECT_FILE,\n    JupytextConfiguration,\n    JupytextConfigurationError,\n    find_global_jupytext_configuration_file,\n    load_jupytext_configuration_file,\n    notebook_formats,\n    preferred_format,\n)\nfrom .formats import (\n    long_form_multiple_formats,\n    short_form_multiple_formats,\n    short_form_one_format,\n)\nfrom .jupytext import drop_text_representation_metadata, reads, writes\nfrom .kernels import set_kernelspec_from_language\nfrom .paired_paths import (\n    InconsistentPath,\n    base_path,\n    base_path_and_adjusted_fmt,\n    find_base_path_and_format,\n    full_path,\n    paired_paths,\n)\nfrom .pairs import PairedFilesDiffer, latest_inputs_and_outputs\n\n\ndef build_sync_jupytext_contents_manager_class(base_contents_manager_class):\n    \"\"\"\n    Derives an synchronous TextFileContentsManager class from the given base class,\n    which is supposed to be synchronous too.\n    \"\"\"\n\n    class SyncJupytextContentsManager(\n        base_contents_manager_class, JupytextConfiguration\n    ):\n        \"\"\"\n        A FileContentsManager Class that reads and stores notebooks to classical\n        Jupyter notebooks (.ipynb), R Markdown notebooks (.Rmd), Julia (.jl),\n        Python (.py) or R scripts (.R)\n        \"\"\"\n\n        def __init__(self, *args, **kwargs):\n            # Dictionary: notebook path => (fmt, formats) where\n            # fmt is the current format, and formats the paired formats.\n            self.paired_notebooks = dict()\n\n            # Configuration cache, useful when notebooks are listed in a given directory\n            self.cached_config = namedtuple(\"cached_config\", \"path config_file config\")\n            self.super = super()\n            self.super.__init__(*args, **kwargs)\n\n        def all_nb_extensions(self, config):\n            \"\"\"All extensions that should be classified as notebooks\"\"\"\n            return [\n                ext if ext.startswith(\".\") else \".\" + ext\n                for ext in config.notebook_extensions\n            ]\n\n        def drop_paired_notebook(self, path):\n            \"\"\"Remove the current notebook from the list of paired notebooks\"\"\"\n            if path not in self.paired_notebooks:\n                return\n\n            fmt, formats = self.paired_notebooks.pop(path)\n            prev_paired_paths = paired_paths(path, fmt, formats)\n            for alt_path, _ in prev_paired_paths:\n                if alt_path in self.paired_notebooks:\n                    self.drop_paired_notebook(alt_path)\n\n        def update_paired_notebooks(self, path, formats):\n            \"\"\"Update the list of paired notebooks to include/update the current pair\"\"\"\n            if not formats:\n                self.drop_paired_notebook(path)\n                return\n\n            formats = long_form_multiple_formats(formats)\n            _, fmt = find_base_path_and_format(path, formats)\n            new_paired_paths = paired_paths(path, fmt, formats)\n            for alt_path, _ in new_paired_paths:\n                self.drop_paired_notebook(alt_path)\n\n            if len(formats) == 1 and set(formats[0]) <= {\"extension\"}:\n                return\n\n            short_formats = short_form_multiple_formats(formats)\n            for alt_path, alt_fmt in new_paired_paths:\n                self.paired_notebooks[alt_path] = (\n                    short_form_one_format(alt_fmt),\n                    short_formats,\n                )\n\n        def create_prefix_dir(self, path, fmt):\n            \"\"\"Create the prefix dir, if missing\"\"\"\n            if \"prefix\" in fmt and \"/\" in path:\n                parent_dir = self.get_parent_dir(path)\n                if not self.dir_exists(parent_dir):\n                    self.create_prefix_dir(parent_dir, fmt)\n                    self.log.info(\"Creating directory %s\", parent_dir)\n                    self.super.save(dict(type=\"directory\"), parent_dir)\n\n        def save(self, model, path=\"\"):\n            \"\"\"Save the file model and return the model with no content.\"\"\"\n            if model[\"type\"] != \"notebook\":\n                return self.super.save(model, path)\n\n            path = path.strip(\"/\")\n            nbk = model[\"content\"]\n            try:\n                config = self.get_config(path)\n                jupytext_formats = notebook_formats(nbk, config, path)\n                _, jupytext_formats = self._drop_formats_if_they_dont_match_path(\n                    path, None, jupytext_formats\n                )\n                self.update_paired_notebooks(path, jupytext_formats)\n\n                def save_one_file(path, fmt):\n                    if \"format_name\" in fmt and fmt[\"extension\"] not in [\n                        \".md\",\n                        \".markdown\",\n                        \".Rmd\",\n                    ]:\n                        self.log.info(\n                            \"Saving %s in format %s:%s\",\n                            os.path.basename(path),\n                            fmt[\"extension\"][1:],\n                            fmt[\"format_name\"],\n                        )\n                    else:\n                        self.log.info(\"Saving %s\", os.path.basename(path))\n\n                    self.create_prefix_dir(path, fmt)\n                    if fmt[\"extension\"] == \".ipynb\":\n                        return self.super.save(\n                            dict(\n                                type=\"notebook\",\n                                content=drop_text_representation_metadata(\n                                    model[\"content\"]\n                                ),\n                            ),\n                            path,\n                        )\n\n                    if (\n                        model[\"content\"][\"metadata\"]\n                        .get(\"jupytext\", {})\n                        .get(\"notebook_metadata_filter\")\n                        == \"-all\"\n                    ):\n                        self.log.warning(\n                            \"Stripping metadata from {} as 'Include Metadata' is off \"\n                            \"(toggle 'Include Metadata' in the Jupytext Menu or Commands if desired)\".format(\n                                path\n                            )\n                        )\n\n                    text_model = dict(\n                        type=\"file\",\n                        format=\"text\",\n                        content=writes(\n                            nbformat.from_dict(model[\"content\"]), fmt=fmt, config=config\n                        ),\n                    )\n\n                    return self.super.save(text_model, path)\n\n                return write_pair(path, jupytext_formats, save_one_file)\n\n            except Exception as e:\n                self.log.error(\"Error while saving file: %s %s\", path, e, exc_info=True)\n                raise HTTPError(500, f\"Unexpected error while saving file: {path} {e}\")\n\n        def _get_with_no_require_hash_argument(\n            self,\n            path,\n            content=True,\n            type=None,\n            format=None,\n            load_alternative_format=True,\n        ):\n            return self._get_with_require_hash_argument(\n                path,\n                content=content,\n                type=type,\n                format=format,\n                require_hash=False,\n                load_alternative_format=load_alternative_format,\n            )\n\n        def _get_with_require_hash_argument(\n            self,\n            path,\n            content=True,\n            type=None,\n            format=None,\n            require_hash=False,\n            load_alternative_format=True,\n        ):\n            \"\"\"Takes a path for an entity and returns its model\"\"\"\n            path = path.strip(\"/\")\n            ext = os.path.splitext(path)[1]\n\n            super_kwargs = {\"content\": content, \"type\": type, \"format\": format}\n            if require_hash:\n                super_kwargs[\"require_hash\"] = require_hash\n\n            # Not a notebook?\n            if (\n                not self.file_exists(path)\n                or self.dir_exists(path)\n                or (type is not None and type != \"notebook\")\n            ):\n                return self.super.get(path, **super_kwargs)\n\n            config = self.get_config(path, use_cache=content is False)\n            if ext not in self.all_nb_extensions(config):\n                return self.super.get(path, **super_kwargs)\n\n            fmt = preferred_format(ext, config.preferred_jupytext_formats_read)\n            if ext == \".ipynb\":\n                super_kwargs[\"type\"] = \"notebook\"\n                model = self.super.get(path, **super_kwargs)\n            else:\n                super_kwargs[\"type\"] = \"file\"\n                super_kwargs[\"format\"] = \"text\"\n                model = self.super.get(path, **super_kwargs)\n                model[\"type\"] = \"notebook\"\n                if content:\n                    # We may need to update these keys, inherited from text files formats\n                    # Cf. https://github.com/mwouts/jupytext/issues/659\n                    model[\"format\"] = \"json\"\n                    model[\"mimetype\"] = None\n                    try:\n                        model[\"content\"] = reads(\n                            model[\"content\"], fmt=fmt, config=config\n                        )\n                        # mark all code cells from text notebooks as 'trusted'\n                        # as they don't have any outputs, cf. #941\n                        for cell in model[\"content\"].cells:\n                            if cell.cell_type == \"code\":\n                                cell[\"metadata\"][\"trusted\"] = True\n\n                    except Exception as err:\n                        self.log.error(\n                            \"Error while reading file: %s %s\", path, err, exc_info=True\n                        )\n                        raise HTTPError(500, str(err))\n\n            if not load_alternative_format:\n                return model\n\n            # We will now read a second file if this is a paired notebooks.\n            if content:\n                nbk = model[\"content\"]\n                formats = nbk.metadata.get(\"jupytext\", {}).get(\n                    \"formats\"\n                ) or config.default_formats(path)\n                formats = long_form_multiple_formats(\n                    formats, nbk.metadata, auto_ext_requires_language_info=False\n                )\n            else:\n                if path not in self.paired_notebooks:\n                    return model\n\n                _, formats = self.paired_notebooks.get(path)\n                formats = long_form_multiple_formats(formats)\n\n            # Compute paired notebooks from formats\n            alt_paths = [(path, fmt)]\n            fmt, formats = self._drop_formats_if_they_dont_match_path(\n                path, fmt, formats\n            )\n            if formats:\n                try:\n                    _, fmt = find_base_path_and_format(path, formats)\n                    alt_paths = paired_paths(path, fmt, formats)\n                    self.update_paired_notebooks(path, formats)\n                except InconsistentPath as err:\n                    self.log.error(\n                        \"Unable to read paired notebook: %s %s\",\n                        path,\n                        err,\n                        exc_info=True,\n                    )\n                    raise HTTPError(\n                        500, f\"Unable to read paired notebook: {path} {err}\"\n                    )\n            else:\n                if path in self.paired_notebooks:\n                    fmt, formats = self.paired_notebooks.get(path)\n                    alt_paths = paired_paths(path, fmt, formats)\n                    formats = long_form_multiple_formats(formats)\n\n            if content and len(alt_paths) > 1 and ext == \".ipynb\":\n                # Apply default options (like saving and reloading would do)\n                jupytext_metadata = model[\"content\"][\"metadata\"].get(\"jupytext\", {})\n                config.set_default_format_options(jupytext_metadata, read=True)\n                if jupytext_metadata:\n                    model[\"content\"][\"metadata\"][\"jupytext\"] = jupytext_metadata\n\n            def get_timestamp(alt_path):\n                # self.exists is not async for AsyncLargeManager,\n                # but MetaManager from fs_manager has an async version\n                exists = self.exists(alt_path)\n                if inspect.isawaitable(exists):\n                    exists = exists\n                if not exists:\n                    return None\n                if alt_path == path:\n                    return model[\"last_modified\"]\n                return (self.super.get(alt_path, content=False))[\"last_modified\"]\n\n            def read_one_file(alt_path, alt_fmt):\n                if alt_path == path:\n                    return model[\"content\"]\n                if alt_path.endswith(\".ipynb\"):\n                    self.log.info(f\"Reading OUTPUTS from {alt_path}\")\n                    return (\n                        self.super.get(\n                            alt_path, content=True, type=\"notebook\", format=format\n                        )\n                    )[\"content\"]\n\n                self.log.info(f\"Reading SOURCE from {alt_path}\")\n                text = (\n                    self.super.get(\n                        alt_path,\n                        content=True,\n                        type=\"file\",\n                        # Don't use the parent format, see https://github.com/mwouts/jupytext/issues/1124\n                        format=None,\n                    )\n                )[\"content\"]\n                return reads(text, fmt=alt_fmt, config=config)\n\n            timestamps = {\n                alt_path: get_timestamp(alt_path)\n                for alt_path, alt_fmt in paired_paths(path, fmt, formats)\n            }\n\n            inputs, outputs = latest_inputs_and_outputs(\n                path,\n                fmt,\n                formats,\n                lambda alt_path: timestamps[alt_path],\n                contents_manager_mode=True,\n            )\n\n            # Modification time of a paired notebook is the timestamp of inputs #118 #978\n            model[\"last_modified\"] = inputs.timestamp\n\n            if require_hash:\n                if (\n                    inputs.path is not None\n                    and outputs.path is not None\n                    and inputs.path != outputs.path\n                ):\n                    model_other = self.super.get(\n                        inputs.path if path == outputs.path else outputs.path,\n                        content=False,\n                        require_hash=True,\n                    )\n                    # The hash of a paired file is the concatenation of\n                    # the hashes of the input and output files\n                    if path == outputs.path:\n                        model[\"hash\"] = model_other[\"hash\"] + model[\"hash\"]\n                    else:\n                        model[\"hash\"] = model[\"hash\"] + model_other[\"hash\"]\n\n            if not content:\n                return model\n\n            # Before we combine the two files, we make sure we're not overwriting ipynb cells\n            # with an outdated text file\n            content = None\n            try:\n                if (\n                    outputs.timestamp\n                    and outputs.timestamp\n                    > inputs.timestamp\n                    + timedelta(seconds=config.outdated_text_notebook_margin)\n                ):\n                    ts_mismatch = \"{out} (last modified {out_last}) is more recent than {src} (last modified {src_last})\".format(\n                        src=inputs.path,\n                        src_last=inputs.timestamp,\n                        out=outputs.path,\n                        out_last=outputs.timestamp,\n                    )\n                    self.log.warning(ts_mismatch)\n\n                    try:\n                        content = read_pair(\n                            inputs, outputs, read_one_file, must_match=True\n                        )\n                        self.log.warning(\n                            \"The inputs in {src} and {out} are identical, so the mismatch in timestamps was ignored\".format(\n                                src=inputs.path, out=outputs.path\n                            )\n                        )\n                    except HTTPError:\n                        raise\n                    except PairedFilesDiffer as diff:\n                        raise HTTPError(\n                            400,\n                            \"\"\"{ts_mismatch}\n\nDifferences (jupytext --diff {src} {out}) are:\n{diff}\nPlease either:\n- open {src} in a text editor, make sure it is up to date, and save it,\n- or delete {src} if not up to date,\n- or increase check margin by adding, say,\noutdated_text_notebook_margin = 5  # default is 1 (second)\nto your jupytext.toml file\n                        \"\"\".format(\n                                ts_mismatch=ts_mismatch,\n                                src=inputs.path,\n                                out=outputs.path,\n                                diff=diff,\n                            ),\n                        )\n            except OverflowError:\n                pass\n\n            if content is not None:\n                model[\"content\"] = content\n            else:\n                try:\n                    model[\"content\"] = read_pair(inputs, outputs, read_one_file)\n                except HTTPError:\n                    raise\n                except Exception as err:\n                    self.log.error(\n                        \"Error while reading file: %s %s\", path, err, exc_info=True\n                    )\n                    raise HTTPError(500, str(err))\n\n            if not outputs.timestamp:\n                set_kernelspec_from_language(model[\"content\"])\n\n            return model\n\n        def new_untitled(self, path=\"\", type=\"\", ext=\"\"):\n            \"\"\"Create a new untitled file or directory in path\n\n            We override the base function because that one does not take the 'ext' argument\n            into account when type==\"notebook\". See https://github.com/mwouts/jupytext/issues/443\n            \"\"\"\n            if type != \"notebook\" and ext != \".ipynb\":\n                return self.super.new_untitled(path, type, ext)\n\n            ext = ext or \".ipynb\"\n            if \":\" in ext:\n                ext, format_name = ext.split(\":\", 1)\n            else:\n                format_name = \"\"\n\n            path = path.strip(\"/\")\n            if not self.dir_exists(path):\n                raise HTTPError(404, \"No such directory: %s\" % path)\n\n            untitled = self.untitled_notebook\n            config = self.get_config(path)\n            name = self.increment_notebook_filename(config, untitled + ext, path)\n            path = f\"{path}/{name}\"\n\n            model = {\"type\": \"notebook\"}\n            if format_name:\n                model[\"format\"] = \"json\"\n                model[\"content\"] = nbformat.v4.nbbase.new_notebook(\n                    metadata={\"jupytext\": {\"formats\": ext + \":\" + format_name}}\n                )\n\n            return self.new(model, path)\n\n        def increment_notebook_filename(self, config, filename, path=\"\"):\n            \"\"\"Increment a notebook filename until it is unique, regardless of extension\"\"\"\n            # Extract the full suffix from the filename (e.g. .tar.gz)\n            path = path.strip(\"/\")\n            basename, dot, ext = filename.partition(\".\")\n            ext = dot + ext\n\n            for i in itertools.count():\n                if i:\n                    insert_i = f\"{i}\"\n                else:\n                    insert_i = \"\"\n                basename_i = basename + insert_i\n                name = basename_i + ext\n                if not any(\n                    self.exists(f\"{path}/{basename_i}{nb_ext}\")\n                    for nb_ext in config.notebook_extensions\n                ):\n                    break\n            return name\n\n        def trust_notebook(self, path):\n            \"\"\"Trust the current notebook\"\"\"\n            if path.endswith(\".ipynb\") or path not in self.paired_notebooks:\n                self.super.trust_notebook(path)\n                return\n\n            fmt, formats = self.paired_notebooks[path]\n            for alt_path, alt_fmt in paired_paths(path, fmt, formats):\n                if alt_fmt[\"extension\"] == \".ipynb\":\n                    self.super.trust_notebook(alt_path)\n\n        def rename_file(self, old_path, new_path):\n            \"\"\"\n            Rename the current file. If the file is a notebook,\n            we rename the paired files as well\n            \"\"\"\n\n            # If the file is not a notebook, we call the parent rename_file method\n            ext = os.path.splitext(old_path)[1]\n            config = self.get_config(old_path, use_cache=True)\n            if ext not in self.all_nb_extensions(config):\n                self.super.rename_file(old_path, new_path)\n                return\n\n            if old_path not in self.paired_notebooks:\n                try:\n                    # we do not know yet if this is a paired notebook (#190)\n                    # -> to get this information we open the notebook\n                    self.log.info(\n                        \"Opening %s to check if it is a paired notebook\", old_path\n                    )\n                    self.get(old_path, content=True)\n                except Exception:\n                    pass\n\n            if old_path not in self.paired_notebooks:\n                self.super.rename_file(old_path, new_path)\n                return\n\n            fmt, formats = self.paired_notebooks.get(old_path)\n            fmt, formats = self._drop_formats_if_they_dont_match_path(\n                new_path, fmt, formats\n            )\n            old_alt_paths = paired_paths(old_path, fmt, formats)\n\n            # Is the new file name consistent with suffix?\n            try:\n                new_base = base_path(new_path, fmt)\n            except HTTPError:\n                raise\n            except Exception as err:\n                self.log.error(\n                    \"Error while renaming file from %s to %s: %s\",\n                    old_path,\n                    new_path,\n                    err,\n                    exc_info=True,\n                )\n                raise HTTPError(500, str(err))\n\n            for old_alt_path, alt_fmt in old_alt_paths:\n                new_alt_path = full_path(new_base, alt_fmt)\n                if self.exists(old_alt_path):\n                    self.create_prefix_dir(new_alt_path, alt_fmt)\n                    self.super.rename_file(old_alt_path, new_alt_path)\n\n            self.drop_paired_notebook(old_path)\n            self.update_paired_notebooks(new_path, formats)\n\n        def get_parent_dir(self, path):\n            \"\"\"The parent directory\"\"\"\n            if \"/\" in path:\n                return path.rsplit(\"/\", 1)[0]\n            # jupyter-fs\n            if \":\" in path and hasattr(self, \"_managers\"):\n                if path.endswith(\":\"):\n                    return \"\"\n                return path.rsplit(\":\", 1)[0] + \":\"\n            return \"\"\n\n        def get_config_file(self, directory):\n            \"\"\"Return the jupytext configuration file, if any\"\"\"\n            for jupytext_config_file in JUPYTEXT_CONFIG_FILES:\n                path = directory + \"/\" + jupytext_config_file\n                if self.file_exists(path):\n                    if not self.allow_hidden and jupytext_config_file.startswith(\".\"):\n                        self.log.warning(\n                            f\"Ignoring config file {path} (see Jupytext issue #964)\"\n                        )\n                        continue\n                    return path\n\n            pyproject_path = directory + \"/\" + PYPROJECT_FILE\n            if self.file_exists(pyproject_path):\n                model = self.get(pyproject_path, type=\"file\")\n                try:\n                    doc = tomllib.loads(model[\"content\"])\n                except tomllib.TOMLDecodeError as e:\n                    self.log.warning(f\"Cannot load {pyproject_path}: {e}\")\n                else:\n                    if doc.get(\"tool\", {}).get(\"jupytext\") is not None:\n                        return pyproject_path\n\n            if not directory:\n                return None\n\n            parent_dir = self.get_parent_dir(directory)\n            return self.get_config_file(parent_dir)\n\n        def load_config_file(\n            self, config_file, *, prev_config_file, prev_config, is_os_path=False\n        ):\n            \"\"\"Load the configuration file\"\"\"\n            if config_file is None:\n                return None\n            if config_file.endswith(\".py\") and not is_os_path:\n                config_file = self._get_os_path(config_file)\n                is_os_path = True\n\n            config_content = None\n            if not is_os_path:\n                try:\n                    model = self.super.get(config_file, content=True, type=\"file\")\n                    config_content = model[\"content\"]\n                except HTTPError:\n                    pass\n\n            config = load_jupytext_configuration_file(config_file, config_content)\n            if config is None:\n                return config\n\n            log_level = config.cm_config_log_level\n            if log_level == \"info_if_changed\":\n                if config_file != prev_config_file or config != prev_config:\n                    log_level = \"info\"\n                else:\n                    log_level = \"none\"\n            if log_level != \"none\":\n                getattr(self.log, log_level)(\n                    \"Loaded Jupytext configuration file at %s\", config_file\n                )\n            return config\n\n        def get_config(self, path, use_cache=False):\n            \"\"\"Return the Jupytext configuration for the given path\"\"\"\n            parent_dir = self.get_parent_dir(path)\n\n            # When listing the notebooks for the tree view, we use a cache for the configuration file\n            # The cache will be refreshed when a notebook is opened or saved, or when we go\n            # to a different directory.\n            if not use_cache or parent_dir != self.cached_config.path:\n                try:\n                    config_file = self.get_config_file(parent_dir)\n                    if config_file:\n                        self.cached_config.config = self.load_config_file(\n                            config_file,\n                            prev_config_file=self.cached_config.config_file,\n                            prev_config=self.cached_config.config,\n                        )\n                    else:\n                        config_file = find_global_jupytext_configuration_file()\n                        self.cached_config.config = self.load_config_file(\n                            config_file,\n                            prev_config_file=self.cached_config.config_file,\n                            prev_config=self.cached_config.config,\n                            is_os_path=True,\n                        )\n                    self.cached_config.config_file = config_file\n                    self.cached_config.path = parent_dir\n                except JupytextConfigurationError as err:\n                    self.log.error(\n                        \"Error while reading config file: %s %s\",\n                        config_file,\n                        err,\n                        exc_info=True,\n                    )\n                    raise HTTPError(500, f\"{err}\")\n\n            if self.cached_config.config is not None:\n                return self.cached_config.config\n            if isinstance(self.notebook_extensions, str):\n                self.notebook_extensions = self.notebook_extensions.split(\",\")\n            return self\n\n        def _drop_formats_if_they_dont_match_path(self, path, fmt, formats):\n            if formats is None:\n                return fmt, formats\n            list_of_formats = long_form_multiple_formats(formats)\n            try:\n                _, _ = find_base_path_and_format(path, list_of_formats)\n            except InconsistentPath:\n                for fmt in list_of_formats:\n                    try:\n                        _, adjusted_format = base_path_and_adjusted_fmt(path, fmt)\n                    except InconsistentPath:\n                        continue\n                    else:\n                        self.log.warning(\n                            \"Notebook %s matches none of the expected formats. \"\n                            'Ignoring formats=\"%s\" and using formats=\"%s\" instead.',\n                            path,\n                            short_form_multiple_formats(formats),\n                            short_form_one_format(adjusted_format),\n                        )\n                        new_formats = [adjusted_format]\n                        if isinstance(formats, list):\n                            return adjusted_format, new_formats\n                        return short_form_one_format(\n                            adjusted_format\n                        ), short_form_multiple_formats(new_formats)\n            return fmt, formats\n\n    if \"require_hash\" in inspect.signature(base_contents_manager_class.get).parameters:\n        SyncJupytextContentsManager.get = (\n            SyncJupytextContentsManager._get_with_require_hash_argument\n        )\n    else:\n        SyncJupytextContentsManager.get = (\n            SyncJupytextContentsManager._get_with_no_require_hash_argument\n        )\n\n    return SyncJupytextContentsManager\n\n\ntry:\n    # The LargeFileManager is taken by default from jupyter_server if available\n    from jupyter_server.services.contents.largefilemanager import LargeFileManager\n\n    TextFileContentsManager = build_sync_jupytext_contents_manager_class(\n        LargeFileManager\n    )\nexcept ImportError:\n    # If we can't find jupyter_server then we take the file manager from notebook\n    # import notebook.transutils needs to happen before notebook.services.contents.filemanager, see #75\n    try:\n        import notebook.transutils  # noqa\n    except ImportError:\n        pass\n\n    try:\n        from notebook.services.contents.largefilemanager import LargeFileManager\n\n        TextFileContentsManager = build_sync_jupytext_contents_manager_class(\n            LargeFileManager\n        )\n    except ImportError:\n        # Older versions of notebook do not have the LargeFileManager #217\n        from notebook.services.contents.filemanager import FileContentsManager\n\n        TextFileContentsManager = build_sync_jupytext_contents_manager_class(\n            FileContentsManager\n        )\n"
  },
  {
    "path": "src/jupytext/sync_pairs.py",
    "content": "\"\"\"\nThis file is automatically generated by\ntests/functional/contents_manager/test_async_and_sync_contents_manager_are_in_sync.py\nDo not edit this file manually.\n\"\"\"\n\nimport jupytext\n\nfrom .combine import combine_inputs_with_outputs\nfrom .compare import compare\nfrom .formats import check_file_version, long_form_multiple_formats\nfrom .paired_paths import find_base_path_and_format, full_path\nfrom .pairs import PairedFilesDiffer\n\n\ndef read_pair(inputs, outputs, read_one_file, must_match=False):\n    \"\"\"Read a notebook given its inputs and outputs path and formats\"\"\"\n    if not outputs.path or outputs.path == inputs.path:\n        return read_one_file(inputs.path, inputs.fmt)\n\n    notebook = read_one_file(inputs.path, inputs.fmt)\n    check_file_version(notebook, inputs.path, outputs.path)\n\n    notebook_with_outputs = read_one_file(outputs.path, outputs.fmt)\n\n    if must_match:\n        in_text = jupytext.writes(notebook, inputs.fmt)\n        out_text = jupytext.writes(notebook_with_outputs, inputs.fmt)\n        diff = compare(out_text, in_text, outputs.path, inputs.path, return_diff=True)\n        if diff:\n            raise PairedFilesDiffer(diff)\n\n    notebook = combine_inputs_with_outputs(\n        notebook, notebook_with_outputs, fmt=inputs.fmt\n    )\n\n    return notebook\n\n\ndef write_pair(path, formats, write_one_file):\n    \"\"\"\n    Call the function 'write_one_file' on each of the paired path/formats\n    \"\"\"\n    formats = long_form_multiple_formats(formats)\n    base, _ = find_base_path_and_format(path, formats)\n\n    # Save as ipynb first\n    return_value = None\n    value = None\n    ipynb_changed = False\n    for fmt in formats[::-1]:\n        if fmt[\"extension\"] != \".ipynb\":\n            continue\n\n        alt_path = full_path(base, fmt)\n        value = write_one_file(alt_path, fmt)\n        ipynb_changed = ipynb_changed or value.get(\"modified\", False)\n        if alt_path == path:\n            return_value = value\n\n    # And then to the other formats, in reverse order so that\n    # the first format is the most recent\n    for fmt in formats[::-1]:\n        if fmt[\"extension\"] == \".ipynb\":\n            continue\n\n        alt_path = full_path(base, fmt)\n        if ipynb_changed:\n            value = write_one_file(alt_path, fmt, force_update_timestamp=True)\n        else:\n            # in the contents manager the write_one_file always writes anyway\n            value = write_one_file(alt_path, fmt)\n        if alt_path == path:\n            return_value = value\n\n    # Update modified timestamp to match that of the pair #207\n    if isinstance(return_value, dict) and \"last_modified\" in return_value:\n        return_value[\"last_modified\"] = value[\"last_modified\"]\n\n    return return_value\n"
  },
  {
    "path": "src/jupytext/version.py",
    "content": "\"\"\"Jupytext's version number\"\"\"\n\n# Must match [N!]N(.N)*[{a|b|rc}N][.postN][.devN], cf. PEP 440\n__version__ = \"1.19.1\"\n"
  },
  {
    "path": "src/jupytext_config/__init__.py",
    "content": ""
  },
  {
    "path": "src/jupytext_config/__main__.py",
    "content": "\"\"\"Main for Jupytext_config\n\nCall with (e.g.)::\n\n    python -m jupytext_config list-default-viewer\n\"\"\"\n\nimport sys\n\nfrom .jupytext_config import main\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n"
  },
  {
    "path": "src/jupytext_config/jupytext_config.py",
    "content": "\"\"\"\nthe code for\njupytext-config set-default-viewer\nand related subcommands\n\"\"\"\n\nimport sys\nfrom argparse import ArgumentParser\nfrom pathlib import Path\n\nimport jupyter_core.paths as jupyter_core_paths\n\nfrom .labconfig import LabConfig\n\n\nclass SubCommand:\n    \"\"\"\n    a subcommand for jupytext-config\n    \"\"\"\n\n    def __init__(self, name, help):\n        self.name = name\n        self.help = help\n\n    def main(self, args):\n        \"\"\"\n        return 0 if all goes well\n        \"\"\"\n        raise NotImplementedError()  # pragma: no cover\n\n\nclass ListDefaultViewer(SubCommand):\n    def __init__(self):\n        super().__init__(\"list-default-viewer\", \"Display current settings in labconfig\")\n\n    def main(self, args):\n        LabConfig(settings_file=args.settings_file).read().list_default_viewer()\n        return 0\n\n    def fill_parser(self, subparser):\n        pass\n\n\nclass SetDefaultViewer(SubCommand):\n    def __init__(self):\n        super().__init__(\"set-default-viewer\", \"Set default viewers for JupyterLab\")\n\n    def main(self, args):\n        LabConfig(settings_file=args.settings_file).read().set_default_viewers(args.doctype).write()\n        return 0\n\n    def fill_parser(self, subparser):\n        subparser.add_argument(\n            \"doctype\",\n            nargs=\"*\",\n            help=f\"the document types to be associated with the notebook editor; defaults to {' '.join(LabConfig.DOCTYPES)}\",\n        )\n\n\nclass UnsetDefaultViewer(SubCommand):\n    def __init__(self):\n        super().__init__(\"unset-default-viewer\", \"Unset default viewers for JupyterLab\")\n\n    def main(self, args):\n        LabConfig(settings_file=args.settings_file).read().unset_default_viewers(args.doctype).write()\n        return 0\n\n    def fill_parser(self, subparser):\n        subparser.add_argument(\n            \"doctype\",\n            nargs=\"*\",\n            help=f\"the document types for which the default viewer will be unset; defaults to {' '.join(LabConfig.DOCTYPES)}\",\n        )\n\n\n# create the subcommands\nSUBCOMMANDS = [\n    ListDefaultViewer(),\n    SetDefaultViewer(),\n    UnsetDefaultViewer(),\n]\n\n\ndef main():\n    parser = ArgumentParser()\n    parser.add_argument(\n        \"--settings-file\",\n        default=Path(jupyter_core_paths.jupyter_config_dir()) / \"labconfig\" / \"default_setting_overrides.json\",\n    )\n    subparsers = parser.add_subparsers(required=True)\n    for subcommand in SUBCOMMANDS:\n        subparser = subparsers.add_parser(subcommand.name, help=subcommand.help)\n        subparser.set_defaults(subcommand=subcommand)\n        subcommand.fill_parser(subparser)\n    args = parser.parse_args(sys.argv[1:] or [\"--help\"])\n    return args.subcommand.main(args)\n"
  },
  {
    "path": "src/jupytext_config/labconfig.py",
    "content": "\"\"\"\nhelper to inspect / initialize jupyterlab labconfig settings\nthat are required to open jupytext notebooks in jupyterlab by default\nwhen these settings are not present, a double click on a jupytext\nnotebook will cause jupyterlab to open it in an editor, i.e. as a text file\n\"\"\"\n\nimport json\nimport logging\nfrom pathlib import Path\n\n\nclass LabConfig:\n    DOCTYPES = [\n        \"python\",\n        \"markdown\",\n        \"myst\",\n        \"r-markdown\",\n        \"quarto\",\n        \"julia\",\n        \"r\",\n    ]\n\n    def __init__(self, *, settings_file, logger=None):\n        self.settings_file = Path(settings_file)\n        self.logger = logger or logging.getLogger(__name__)\n        self.config = {}\n\n    def read(self):\n        \"\"\"\n        read the labconfig settings file\n        \"\"\"\n        if self.settings_file.exists():\n            with self.settings_file.open() as fid:\n                self.config = json.load(fid)\n        else:\n            self.logger.info(f\"Could not read from {self.settings_file} (not found)\")\n\n        return self\n\n    def get_viewers(self):\n        return self.config.setdefault(\"@jupyterlab/docmanager-extension:plugin\", {}).setdefault(\"defaultViewers\", {})\n\n    def list_default_viewer(self):\n        \"\"\"\n        list the current labconfig settings\n        \"\"\"\n        self.logger.debug(f\"Current @jupyterlab/docmanager-extension:plugin in {self.settings_file}\")\n        for key, value in self.get_viewers().items():\n            print(f\"{key}: {value}\")\n\n    def set_default_viewers(self, doctypes=None):\n        if not doctypes:\n            doctypes = self.DOCTYPES\n        for doctype in doctypes:\n            self.set_default_viewer(doctype)\n        return self\n\n    def set_default_viewer(self, doctype):\n        viewers = self.get_viewers()\n        if doctype not in viewers:\n            viewers[doctype] = \"Jupytext Notebook\"\n\n    def unset_default_viewers(self, doctypes=None):\n        if not doctypes:\n            doctypes = self.DOCTYPES\n        for doctype in doctypes:\n            self.unset_default_viewer(doctype)\n        return self\n\n    def unset_default_viewer(self, doctype):\n        viewers = self.get_viewers()\n        if doctype in viewers:\n            del viewers[doctype]\n\n    def write(self):\n        \"\"\"\n        write the labconfig settings file\n        \"\"\"\n        self.settings_file.parent.mkdir(parents=True, exist_ok=True)\n        with self.settings_file.open(\"w\") as fid:\n            json.dump(self.config, fid, indent=2)\n"
  },
  {
    "path": "tests/conftest.py",
    "content": "import contextlib\nimport itertools\nimport os.path\nimport re\nimport sys\nimport unittest.mock as mock\nfrom pathlib import Path\n\nimport pytest\nfrom jupyter_client.kernelspec import find_kernel_specs, get_kernel_spec\nimport nbformat\nfrom nbformat import reads as nb_reads, validate\nfrom nbformat.v4 import nbbase\nfrom nbformat.v4.nbbase import (\n    new_code_cell,\n    new_markdown_cell,\n    new_notebook,\n    new_output,\n)\n\nimport jupytext\nfrom jupytext.cell_reader import rst2md\nfrom jupytext.cli import system, tool_version\nfrom jupytext.formats import formats_with_support_for_cell_metadata\nfrom jupytext.myst import is_myst_available\nfrom jupytext.pandoc import is_pandoc_available\nfrom jupytext.quarto import is_quarto_available\nfrom jupytext.marimo import is_marimo_available\n\n# Pytest's tmpdir is in /tmp (at least for me), so this helps to avoid interferences between\n# global configuration on HOME and the test collection\njupytext.config.JUPYTEXT_CEILING_DIRECTORIES = [\"/tmp/\"]\n\nSAMPLE_NOTEBOOK_PATH = Path(__file__).parent / \"data\" / \"notebooks\" / \"inputs\"\nROOT_PATH = Path(__file__).parent.parent\n\n\ndef nbformat_reads(s, as_version, capture_validation_error=None, **kwargs):\n    \"\"\"Wrapper around nbformat.reads that forces validation\"\"\"\n    nb = nb_reads(s, as_version, capture_validation_error=capture_validation_error, **kwargs)\n    validate(nb)\n    return nb\n\n\n@pytest.fixture(autouse=True)\ndef force_validate_nbformat(monkeypatch):\n    \"\"\"Force validation of nbformat in all tests\"\"\"\n    monkeypatch.setattr(nbformat, \"reads\", nbformat_reads)\n\n\n@pytest.fixture(params=[\"sync\", \"async\"])\ndef cm(request):\n    if request.param == \"sync\":\n        return jupytext.TextFileContentsManager()\n    else:\n        return jupytext.AsyncTextFileContentsManager()\n\n\n@pytest.fixture\ndef no_jupytext_version_number():\n    with mock.patch(\"jupytext.header.INSERT_AND_CHECK_VERSION_NUMBER\", False):\n        yield\n\n\n@pytest.fixture\ndef cwd_tmpdir(tmpdir):\n    # Run the whole test from inside tmpdir\n    with tmpdir.as_cwd():\n        yield tmpdir\n\n\n@pytest.fixture()\ndef cwd_tmp_path(tmp_path):\n    # Run the whole test from inside tmp_path\n    if sys.version_info < (3, 11):\n        with tmp_path.cwd():\n            yield tmp_path\n    else:\n        # https://github.com/mwouts/jupytext/issues/1242\n        with contextlib.chdir(tmp_path):\n            yield tmp_path\n\n\n@pytest.fixture\ndef jupytext_repo_root():\n    \"\"\"The local path of this repo, to use in .pre-commit-config.yaml in tests\"\"\"\n    return str(Path(__file__).parent.parent.resolve())\n\n\n@pytest.fixture\ndef jupytext_repo_rev(jupytext_repo_root):\n    \"\"\"The local revision of this repo, to use in .pre-commit-config.yaml in tests\"\"\"\n    return system(\"git\", \"rev-parse\", \"HEAD\", cwd=jupytext_repo_root).strip()\n\n\n@pytest.fixture()\ndef python_notebook():\n    return new_notebook(\n        cells=[new_markdown_cell(\"A short notebook\")],\n        # We need a Python kernel here otherwise Jupytext is going to add\n        # the information that this is a Python notebook when we sync the\n        # .py and .ipynb files\n        metadata={\n            \"kernelspec\": {\n                \"display_name\": \"Python 3\",\n                \"language\": \"python\",\n                \"name\": \"python_kernel\",\n            },\n            \"language_info\": {\n                \"codemirror_mode\": {\"name\": \"ipython\", \"version\": 3},\n                \"file_extension\": \".py\",\n                \"mimetype\": \"text/x-python\",\n                \"name\": \"python\",\n                \"nbconvert_exporter\": \"python\",\n                \"pygments_lexer\": \"ipython3\",\n                \"version\": \"3.6.4\",\n            },\n        },\n    )\n\n\n@pytest.fixture()\ndef notebook_with_outputs():\n    return new_notebook(\n        cells=[\n            new_code_cell(\n                \"1+1\",\n                execution_count=1,\n                outputs=[\n                    new_output(\n                        data={\"text/plain\": \"2\"},\n                        execution_count=1,\n                        output_type=\"execute_result\",\n                    )\n                ],\n            )\n        ],\n        metadata={\n            \"kernelspec\": {\n                \"display_name\": \"Python 3\",\n                \"language\": \"python\",\n                \"name\": \"python_kernel\",\n            }\n        },\n    )\n\n\n@pytest.fixture(params=list(formats_with_support_for_cell_metadata()))\ndef fmt_with_cell_metadata(request):\n    return request.param\n\n\ndef list_notebooks(path=\"ipynb\", skip=\"\"):\n    \"\"\"All notebooks in the directory notebooks/path,\n    or in the package itself\"\"\"\n    if path == \"ipynb\":\n        return (\n            list_notebooks(\"ipynb_julia\", skip=skip)\n            + list_notebooks(\"ipynb_py\", skip=skip)\n            + list_notebooks(\"ipynb_R\", skip=skip)\n        )\n\n    nb_path = SAMPLE_NOTEBOOK_PATH\n\n    if path == \"ipynb_all\":\n        return itertools.chain(\n            *(list_notebooks(folder.name, skip=skip) for folder in nb_path.iterdir() if folder.name.startswith(\"ipynb_\"))\n        )\n\n    if path == \"all\":\n        return itertools.chain(*(list_notebooks(folder.name, skip=skip) for folder in nb_path.iterdir()))\n\n    if path.startswith(\".\"):\n        nb_path = Path(__file__).parent / \"..\" / path\n    else:\n        nb_path = nb_path / path\n\n    if skip:\n        skip_re = re.compile(\".*\" + skip + \".*\")\n        return [str(nb_file) for nb_file in nb_path.iterdir() if nb_file.is_file() and not skip_re.match(nb_file.name)]\n\n    return [str(nb_file) for nb_file in nb_path.iterdir() if nb_file.is_file()]\n\n\ndef notebook_id_func(nb_file):\n    nb_file = Path(nb_file)\n    if SAMPLE_NOTEBOOK_PATH in nb_file.parents:\n        return str(nb_file.relative_to(SAMPLE_NOTEBOOK_PATH))\n    return str(nb_file.relative_to(ROOT_PATH))\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_all\"), ids=notebook_id_func)\ndef ipynb_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"all\"), ids=notebook_id_func)\ndef any_nb_file(request):\n    return request.param\n\n\n@pytest.fixture\ndef ipynb_py_R_jl_files():\n    return list_notebooks()\n\n\n@pytest.fixture(params=list_notebooks(), ids=notebook_id_func)\ndef ipynb_py_R_jl_file(request):\n    return request.param\n\n\n@pytest.fixture\ndef ipynb_py_R_jl_ext(ipynb_py_R_jl_file):\n    for language in \"py\", \"R\", \"julia\":\n        if f\"{os.path.sep}ipynb_{language}{os.path.sep}\" in ipynb_py_R_jl_file:\n            return \".jl\" if language == \"julia\" else \".\" + language\n\n    raise RuntimeError(f\"language not found for {ipynb_py_R_jl_file}\")\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb\") + list_notebooks(\"Rmd\"), ids=notebook_id_func)\ndef ipynb_or_rmd_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_py\") + list_notebooks(\"ipynb_R\"), ids=notebook_id_func)\ndef ipynb_py_R_file(request):\n    return request.param\n\n\n@pytest.fixture\ndef ipynb_py_files():\n    return list_notebooks(\"ipynb_py\")\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_py\"), ids=notebook_id_func)\ndef ipynb_py_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_py\", skip=\"(raw_cell|R_magic|metadata and long cells)\"), ids=notebook_id_func)\ndef marimo_compatible_ipynb(request):\n    nb = jupytext.read(SAMPLE_NOTEBOOK_PATH / request.param)\n    marimo_text = jupytext.writes(nb, \"auto:marimo\")\n    for line in marimo_text.splitlines():\n        if \"not supported in marimo\" in line:\n            pytest.skip(f\"{request.param} contains features not supported in marimo: {line}\")\n\n    # We'd need to get this one fixed in Marimo\n    if \"flavors of raw cells\" in request.param:\n        pytest.skip(f\"{request.param} contains $ signs in a raw cells, not supported in marimo\")\n\n    if \"jupyter_again\" in request.param:\n        pytest.skip(f\"{request.param} contains '?help', not supported in marimo\")\n\n    if \"nteract_with_parameter\" in request.param:\n        pytest.skip(f\"{request.param} contains both tags and metadata - only tags are supported\")\n\n    if \"jupyterlab-slideshow_1441\" in request.param:\n        pytest.skip(f\"{request.param} contains a line ending with spaces, which is trimmed by marimo\")\n\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_R\"), ids=notebook_id_func)\ndef ipynb_R_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_julia\"), ids=notebook_id_func)\ndef ipynb_julia_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_scheme\"), ids=notebook_id_func)\ndef ipynb_scheme_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_cpp\"), ids=notebook_id_func)\ndef ipynb_cpp_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_all\", skip=\"many hash\"), ids=notebook_id_func)\ndef ipynb_to_light(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"ipynb_all\"), ids=notebook_id_func)\ndef ipynb_to_myst(request):\n    return request.param\n\n\n@pytest.fixture(\n    params=[\n        py_file for py_file in list_notebooks(\"./src/jupytext\") if py_file.endswith(\".py\") and \"folding_markers\" not in py_file\n    ],\n    ids=notebook_id_func,\n)\ndef py_file(request):\n    return request.param\n\n\n@pytest.fixture(\n    params=list_notebooks(\"julia\") + list_notebooks(\"python\") + list_notebooks(\"R\") + list_notebooks(\"ps1\"),\n    ids=notebook_id_func,\n)\ndef script_to_ipynb(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"python\"), ids=notebook_id_func)\ndef python_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"percent\"), ids=notebook_id_func)\ndef percent_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"hydrogen\"), ids=notebook_id_func)\ndef hydrogen_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"R\"), ids=notebook_id_func)\ndef r_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"R_spin\"), ids=notebook_id_func)\ndef r_spin_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"marimo\"), ids=notebook_id_func)\ndef marimo_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"md\"), ids=notebook_id_func)\ndef md_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"myst\"), ids=notebook_id_func)\ndef myst_file(request):\n    return request.param\n\n\n@pytest.fixture(\n    params=list_notebooks(\"ipynb\", skip=\"(functional|Notebook with|flavors|invalid|305|jupyterlab-slideshow)\"),\n    ids=notebook_id_func,\n)\ndef ipynb_to_pandoc(request):\n    return request.param\n\n\n@pytest.fixture(\n    params=list_notebooks(\n        \"ipynb\",\n        skip=\"(functional|Notebook with|plotly_graphs|flavors|complex_metadata|\"\n        \"update83|raw_cell|_66|nteract|LaTeX|invalid|305|text_outputs|ir_notebook|jupyter|with_R_magic)\",\n    ),\n    ids=notebook_id_func,\n)\ndef ipynb_to_quarto(request):\n    return request.param\n\n\n@pytest.fixture(\n    params=list_notebooks(\"ipynb_py\", skip=\"(raw|hash|frozen|magic|html|164|long)\"),\n    ids=notebook_id_func,\n)\ndef ipynb_to_sphinx(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"Rmd\"), ids=notebook_id_func)\ndef rmd_file(request):\n    return request.param\n\n\n@pytest.fixture(params=list_notebooks(\"sphinx\"), ids=notebook_id_func)\ndef sphinx_file(request):\n    return request.param\n\n\ndef pytest_runtest_setup(item):\n    for mark in item.iter_markers():\n        for tool in [\n            \"jupytext\",\n            \"black\",\n            \"isort\",\n            \"flake8\",\n            \"autopep8\",\n            \"jupyter nbconvert\",\n        ]:\n            if mark.name == f\"requires_{tool.replace(' ', '_')}\":\n                if not tool_version(tool):\n                    pytest.skip(f\"{tool} is not installed\")\n        if mark.name == \"requires_sphinx_gallery\":\n            if not rst2md:\n                pytest.skip(\"sphinx_gallery is not available\")\n        if mark.name == \"requires_pandoc\":\n            # The mirror files changed slightly when Pandoc 2.11 was introduced\n            # https://github.com/mwouts/jupytext/commit/c07d919702999056ce47f92b74f63a15c8361c5d\n            # The mirror files changed again when Pandoc 2.16 was introduced\n            # https://github.com/mwouts/jupytext/pull/919/commits/1fa1451ecdaa6ad8d803bcb6fb0c0cf09e5371bf\n            if not is_pandoc_available(min_version=\"3.0\"):\n                pytest.skip(\"pandoc>=3.0 is not available\")\n        if mark.name == \"requires_quarto\":\n            if not is_quarto_available(min_version=\"0.2.0\"):\n                pytest.skip(\"quarto>=0.2 is not available\")\n        if mark.name == \"requires_marimo\":\n            if not is_marimo_available():\n                pytest.skip(\"marimo is not available\")\n        if mark.name == \"requires_no_pandoc\":\n            if is_pandoc_available():\n                pytest.skip(\"Pandoc is installed\")\n        if mark.name == \"requires_ir_kernel\":\n            if not any(get_kernel_spec(name).language == \"R\" for name in find_kernel_specs()):\n                pytest.skip(\"irkernel is not installed\")\n        if mark.name == \"requires_user_kernel_python3\":\n            if \"python_kernel\" not in find_kernel_specs():\n                pytest.skip(\"Please run 'python -m ipykernel install --name python_kernel --user'\")\n        if mark.name == \"requires_myst\":\n            if not is_myst_available():\n                pytest.skip(\"myst_parser not found\")\n        if mark.name == \"requires_no_myst\":\n            if is_myst_available():\n                pytest.skip(\"myst is available\")\n        if mark.name == \"skip_on_windows\":\n            if sys.platform.startswith(\"win\"):\n                pytest.skip(\"Issue 489\")\n        if mark.name == \"pre_commit\":\n            if sys.platform.startswith(\"win\"):\n                pytest.skip(\"OSError: [WinError 193] %1 is not a valid Win32 application\")\n            if not (Path(__file__).parent.parent / \".git\").is_dir():\n                pytest.skip(\"Jupytext folder is not a git repository #814\")\n\n\ndef pytest_collection_modifyitems(config, items):\n    for item in items:\n        if (config.rootdir / \"tests\" / \"external\" / \"pre_commit\") in item.path.parents:\n            item.add_marker(pytest.mark.pre_commit)\n\n\n@pytest.fixture(autouse=True)\ndef cell_id():\n    \"\"\"To make sure that cell ids are distinct we use a global counter.\n    This solves https://github.com/mwouts/jupytext/issues/747\"\"\"\n    local_cell_count = 0\n\n    def enumerate_cell_ids():\n        nonlocal local_cell_count\n        local_cell_count += 1\n        return f\"cell-{local_cell_count}\"\n\n    nbbase.random_cell_id = enumerate_cell_ids\n"
  },
  {
    "path": "tests/data/notebooks/inputs/R/simple_r_script.R",
    "content": "# This is a comment\n\ncars\n\nplot(cars)\n"
  },
  {
    "path": "tests/data/notebooks/inputs/R_spin/knitr-spin.R",
    "content": "#' The below derives from\n#' https://github.com/yihui/knitr/blob/master/inst/examples/knitr-spin.R\n#'\n#' This is a special R script which can be used to generate a report. You can\n#' write normal text in roxygen comments.\n#'\n#' First we set up some options (you do not have to do this):\n\n#+ setup, include=FALSE\nlibrary(knitr)\nopts_chunk$set(fig.path = 'figure/silk-')\n\n#' The report begins here.\n\n#+ test-a, cache=FALSE\n# boring examples as usual\nset.seed(123)\nx = rnorm(5)\nmean(x)\n\n#' You can not use here the special syntax {{code}} to embed inline expressions, e.g.\n{{mean(x) + 2}}\n#' is the mean of x plus 2.\n#' The code itself may contain braces, but these are not checked.  Thus,\n#' perfectly valid (though very strange) R code such as `{{2 + 3}} - {{4 - 5}}`\n#' can lead to errors because `2 + 3}} - {{4 - 5` will be treated as inline code.\n#'\n#' Now we continue writing the report. We can draw plots as well.\n\n#+ test-b, fig.height=5, fig.width=5\npar(mar = c(4, 4, .1, .1)); plot(x)\n\n#' Actually you do not have to write chunk options, in which case knitr will use\n#' default options. For example, the code below has no options attached:\n\nvar(x)\nquantile(x)\n\n#' And you can also write two chunks successively like this:\n\n#+ test-chisq5\nsum(x^2) # chi-square distribution with df 5\n#+ test-chisq4\nsum((x - mean(x))^2) # df is 4 now\n\n#' Done. Call spin('knitr-spin.R') to make silk from sow's ear now and knit a\n#' lovely purse.\n\n# /* you can write comments between /* and */ like C comments (the preceding #\n# is optional)\nSys.sleep(60)\n# */\n\n# /* there is no inline comment; you have to write block comments */\n"
  },
  {
    "path": "tests/data/notebooks/inputs/Rmd/R_sample.Rmd",
    "content": "---\ntitle: \"R Notebook\"\noutput: html_notebook\n---\n\nThis is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code. \n\nTry executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Ctrl+Shift+Enter*. \n\n```{r}\nplot(cars)\n```\n\nAdd a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Ctrl+Alt+I*.\n\nWhen you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Ctrl+Shift+K* to preview the HTML file).\n\nThe preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike *Knit*, *Preview* does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.\n"
  },
  {
    "path": "tests/data/notebooks/inputs/Rmd/chunk_options.Rmd",
    "content": "---\ntitle: \"Test chunk options in Rmd/Jupyter conversion\"\nauthor: \"Marc Wouts\"\ndate: \"June 16, 2018\"\njupyter:\n  kernelspec:\n    display_name: Python\n    language: python\n    name: python3\n---\n\n```{r knitr_setup, include=FALSE}\nknitr::opts_chunk$set(echo = FALSE, fig.width = 10, fig.height = 5)\n```\n\n\n```{python echo=TRUE}\nimport pandas as pd\nx = pd.Series({'A':1, 'B':3, 'C':2})\n```\n\n```{python bar_plot, echo=FALSE, fig.height=5, fig.width=8}\nx.plot(kind='bar', title='Sample plot')\n```\n\n"
  },
  {
    "path": "tests/data/notebooks/inputs/Rmd/ioslides.Rmd",
    "content": "---\ntitle: \"Quick ioslides\"\nsubtitle: \"Slides generated using R, python and ioslides\"\nauthor: \"Marc Wouts\"\ndate: \"June 15, 2018\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n  chunk_output_type: console\n---\n\n## What is ioslides?\n\nThis is the default format in rstudio for building interactive HTML presentations.\n\nEnjoy the [manual](https://rmarkdown.rstudio.com/ioslides_presentation_format.html)!\n\nThese slides can be turned to a single HTML file with either a click on 'knitr' in rstudio, or, command line:\n```bash\nR -e 'rmarkdown::render(\"ioslides.Rmd\")'\n```\n\n## A sample plot\n\n<div style=\"float: left; width: 30%;\">\nHere we create a sample data set for plotting.\n\n```{python echo=TRUE}\nimport pandas as pd\nx = pd.Series({'A':1, 'B':3, 'C':2})\n```\n\nThen, in another column we plot. The R notebook code chunks have many [options](https://yihui.name/knitr/options/).\nFor this plot I chose not to display the source code.\n</div>\n\n<div style=\"float: right; width: 70%;\">\n```{python echo=FALSE, fig.height=5, fig.width=8}\nx.plot(kind='bar', title='Sample plot')\n```\n<div>\n"
  },
  {
    "path": "tests/data/notebooks/inputs/Rmd/knitr-spin.Rmd",
    "content": "The below derives from\nhttps://github.com/yihui/knitr/blob/master/inst/examples/knitr-spin.R\n\nThis is a special R script which can be used to generate a report. You can\nwrite normal text in roxygen comments.\n\nFirst we set up some options (you do not have to do this):\n\n```{r setup, include=FALSE}\nlibrary(knitr)\nopts_chunk$set(fig.path = 'figure/silk-')\n```\n\nThe report begins here.\n\n```{r test-a, cache=FALSE}\n# boring examples as usual\nset.seed(123)\nx = rnorm(5)\nmean(x)\n```\n\nYou can not use here the special syntax {{code}} to embed inline expressions, e.g.\n```{r}\n{{mean(x) + 2}}\n```\nis the mean of x plus 2.\nThe code itself may contain braces, but these are not checked.  Thus,\nperfectly valid (though very strange) R code such as `{{2 + 3}} - {{4 - 5}}`\ncan lead to errors because `2 + 3}} - {{4 - 5` will be treated as inline code.\n\nNow we continue writing the report. We can draw plots as well.\n\n```{r test-b, fig.height=5, fig.width=5}\npar(mar = c(4, 4, .1, .1)); plot(x)\n```\n\nActually you do not have to write chunk options, in which case knitr will use\ndefault options. For example, the code below has no options attached:\n\n```{r}\nvar(x)\nquantile(x)\n```\n\nAnd you can also write two chunks successively like this:\n\n```{r test-chisq5}\nsum(x^2) # chi-square distribution with df 5\n```\n```{r test-chisq4}\nsum((x - mean(x))^2) # df is 4 now\n```\n\nDone. Call spin('knitr-spin.R') to make silk from sow's ear now and knit a\nlovely purse.\n\n```{r}\n# /* you can write comments between /* and */ like C comments (the preceding #\n# is optional)\nSys.sleep(60)\n# */\n```\n\n```{r}\n# /* there is no inline comment; you have to write block comments */\n```\n"
  },
  {
    "path": "tests/data/notebooks/inputs/Rmd/markdown.Rmd",
    "content": "# This is a plain markdown file\n\n```python\n1+1\n```\n\nAnd more comments\n\nAnother comment separated by one line\n\n\nThis is another cell, separated by two or more lines from the previous one.\n\n\nAnd a last markdown cell, followed by a code cell\n```python\n1+1\n```\n"
  },
  {
    "path": "tests/data/notebooks/inputs/hydrogen/hydrogen_latex_html_R_magics.py",
    "content": "# %%\n1 + 1\n\n# %%\nimport pandas as pd\npd.Series({'A':5, 'B':2}).plot()\n\n# %%\n%matplotlib inline\npd.Series({'A':5, 'B':2}).plot(figsize=(3,2))\n\n# %%\n%%html\n<p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>\n\n# %%\n%load_ext rpy2.ipython\n\n# %%\n%%R -w 400 -h 200\nlibrary(ggplot2)\nggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\n\n# %%\n%%latex\n$\\frac{\\pi}{2}$\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_R/R notebook with invalid cell keys.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {},\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAAC2VBMVEUAAAABAQECAgIDAwME\\nBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0PDw8QEBARERETExMUFBQVFRUWFhYXFxcY\\nGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkq\\nKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ4ODg5OTk6Ojo8PDw9PT0/Pz9AQEBB\\nQUFCQkJDQ0NERERGRkZHR0dISEhJSUlLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRV\\nVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZGRlZWVmZmZn\\nZ2doaGhpaWlqampra2tsbGxtbW1ubm5vb29wcHBxcXFycnJzc3N0dHR1dXV2dnZ3d3d4eHh5\\neXl6enp7e3t8fHx9fX1+fn5/f3+AgICBgYGCgoKDg4OEhISFhYWGhoaHh4eIiIiJiYmKioqL\\ni4uMjIyNjY2Ojo6Pj4+RkZGSkpKTk5OUlJSVlZWWlpaXl5eYmJiZmZmampqbm5ucnJydnZ2e\\nnp6fn5+goKChoaGioqKjo6OkpKSlpaWmpqanp6eoqKipqamqqqqrq6usrKytra2urq6vr6+w\\nsLCxsbGysrKzs7O0tLS1tbW2tra3t7e4uLi5ubm6urq7u7u8vLy9vb2+vr6/v7/AwMDBwcHC\\nwsLExMTFxcXGxsbHx8fJycnKysrLy8vMzMzNzc3Ozs7Pz8/Q0NDR0dHS0tLT09PU1NTV1dXW\\n1tbX19fY2NjZ2dna2trb29vc3Nzd3d3e3t7f39/g4ODh4eHi4uLj4+Pk5OTl5eXm5ubn5+fp\\n6enq6urr6+vs7Ozt7e3u7u7v7+/w8PDx8fHy8vLz8/P09PT19fX29vb39/f4+Pj5+fn6+vr7\\n+/v8/Pz9/f3+/v7///9MRAjrAAAACXBIWXMAABJ0AAASdAHeZh94AAAgAElEQVR4nO3d/b+c\\ndX3n8Qvcpdab4q5rt+hSbbtu79Tds3ZZNlvs1h0CHNI2KaEEJQptj7KbkJWYWlCz8YYKARqB\\nFGkOpRoCjaZZMQQhxwrZKmA5G41HotIGhNzn3M7M9RfszJyTOedMrjPv95z5nMzMOa/XD5OZ\\nK4c3X4Y8H2fOYKdJSkRNl7T6AETzISARBQQkooCARBQQkIgCAhJRQEAiCghIRAGFQTqU1dHC\\nYOb1xjsRNlQ4HrQ0GDU0VDgStDQSNTSaDxo6NBY1VBgJGjo6HDVU+tMdD+knWR1OBzOvN97x\\nk1FD6bGgpcGjQUND6aGgpbFXooaKQUM/KUQNpaNBQ4dHgoaOlP50A6n5gOQEJCCJgOQEJCCJ\\ngOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJ\\ngOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJ\\ngOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEJCCJgOQEpFN9d/37crdN\\nPtzbc9mK+4tT7wCpyYDk1PGQnrn38ZWTkPYt3nRgd/eWKXeA1GxAcup4SKV6JiGtv65007tk\\nePIOkJoNSE7zDNLye0o3/bn+yTtAajYgOc0vSMXcttLtwVxf9U7p9okvfOELf30iq8F0NPN6\\n442EDaXDQUujUUNj6WDQUuFk1FAaNHSiGDWU5oOGBt2h73/i5rp9fMMnbw2FtLarq+siZ4eo\\ng/pYIntb9YsjXtp9/8knn/z7I1kdT4czrzfeYNhQejJoaThqaCQ9FrSUDxsqBg0dCRtKx4KG\\njrtDq5Kb/6ZeX96186uzhsSbDdX4Gcmpg39Guj7ZVvf3G/wZaWRg4IPrB36Qpn03nBx/1/ux\\nU29/P8bb3xEByanjIQ3kyi1O0+25o6WHT/VcelVvceodIDUZkJw6HpJZ9pmBZAQkJyCFBCQn\\nIBkBKWYISM4QkIAkhoDkDAEJSGIISM4QkIAkhoDkDAEJSGIISM4QkIAkhoDkDAEJSGIISM4Q\\nkIAkhoDkDAEJSGIISM4QkIAkhoDkDAEJSGIISM4QkIAkhoDkDAEJSGIISM4QkIAkhoDkDAEJ\\nSGIISM7QfIX03E3rPvbJdV4XAKneEJCcofkKqUd/MtCU/k/dLSDFBCSnNoP0weTGe/9qs9mX\\n6m8BKSYgObUdpJ38v3WJGQKSMwQkHZBiApITkIAkApITkIAkApITkIAkApITkIAkApITkIAk\\nApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAk\\nApITkIAkApITkIAkApITkIAkApLTXEB68fO3zLYLgRQ1BCRnqK0h/U1DHwVU09eBFDMEJGeo\\nrSF9MXnPrL8l9fofEKkCUkxAcpobSKubGAJSzBCQnCEg6YAUE5CcgAQkEZCcgAQkEZCcgAQk\\nEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQk\\nEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQk\\nEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQk\\nEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQk\\nEZDqt3VzuS9uDupLD1Tvfng+Q8pnVUiLmdcbrxA2lBaClophQ9lP3myWwoaaP9JjyRz28SYO\\nFvhHqTgaDykbP9+RjObnd6T7k0XrSv3vdUFt+OTk/T/d18TB2vw7UvaZgWQ0XyF9pPzLXPyM\\n1FxAihkCkjMEJB2QYgJS3YAEJC8g1Q1IQPICUt2ABCQvINUNSEDyAlLdgAQkLyDVDUhA8gJS\\n3YAEJC8g1Q1IQPICUt2ABCQvINUNSEDyAlLdgAQkLyDVDUhA8gJS3YAEJC8g1Q1IQPICUt2A\\nBCQvINUNSEDyAlLdgAQkrwUL6eD2B40+AiQgWS1YSLeYH/WzrvzFQAKSaMFC+pPkvT1Ga54r\\nfzGQgCRawJDu9ZeABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyA\\nBCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyA\\nBCQRkJyABCQRkJyABCTR/IH04uOP1vTk3torU7oGSJWAFNP8gXSH+bFA1bb420ACkmj+QPpE\\n8t9qPgFo9Zp6nw+0+oC/DSQgieYTpLtqh5r/pNWJgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCc\\ngAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCc\\ngAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkUTtD6qvzIUCndx2QZhOQYmpjSPc2\\n+rFAm2uHgKQDUkxtDOlTyQVXNtLK/bVDQNIBKaa2hnR7k0NA0gEpJiA5AQlIIiA5AQlIIiA5\\nAQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5\\nAQlIIiA5AQlIIiA5AQlIIiA5Aana3p7LVtxfnHhwfa7cxYPpjsqdp4HUfEBy6nhI+xZvOrC7\\ne8vEoxcGSq28KU13LCvfGwJS8wHJqeMhrb+udNO7ZHjyyv7c3hKk5dO/LPvMQDICklPHQ1p+\\nT+mmP9c/eeXW95de6O24ZPnS1X2Vx6+88MIL/3Qoq2PpcOb1xjs5GDWUnghaGjoeNDSSHg1a\\nyh8e//UzyZ1NDhWbP8x4haihdCxo6Oho0NCxdOgVH1Ixt610ezDXV71yvPvB0u0zj+x7dmNu\\ne/nC2q6uroskSDpz3ZHc1+ojLIzy1XuzgPTwZUdO3d1wZfn2gTVr1tw8nNVoms+83nhjYUPp\\nWNBSfjRqKB0JWipODN2abG5yKG3+MBNLUUNpIWhoNGwozU++R9D4S7viyluqv7c9N3bqbvbL\\nUX5GMuJnJKeO/xmp9s2Gv5/y49KGyXccss8MJCMgOXU8pPLb34+V3/7uu+Fk+fHH/7hy+fbd\\n/U/flnsISM0HJKeOh5Q+1XPpVb3F8uu4o6VHLy3eWbl618rupav2TH5V9pmBZAQkp86H5JV9\\nZiAZAckJSCEByQlIRkCKGQKSMwQkHZBiApITkIAkApITkIAkApITkIAkApITkIAkApITkIAk\\nApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkag2k7++v00sD47/+\\nKZBmDkgxQ50N6abE687mjgQkIyDF1BJI70suvHjmLl986s53mjsSkIyAFFOLID1a53dP/YzU\\ndEAyAlJMQHICEpBEQHICEpBEQHICEpBEQHICEpBEQHICEpBEQHICEpBEQHICEpBEQHICEpBE\\nQHICEpBEQHICEpBEQHICEpBEQHICEpBEQHICEpBEQHICEpBEQHICEpBEQHICEpBEQHICEpBE\\nQHICEpBELYD0/P7fB1KzASlmqIMh3X5WkiS763wBkIyAFDPUwZCuT95x4aU/qvMFQDICUsxQ\\nR0PaVv8LgGQEpJghIBkByQhIMQHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhA\\nEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhA\\nEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhA\\nEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhA\\nEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUgNNpjVcDqWeb3xRqKG\\nRtORoKWxqKF8OjTzb+4779xqr07+tv5Soc5QQxWy/33OomLUUFoIGhrORw2lYyfiIR3PajAd\\nzbzeeMMjUUPpUNDSaNhQenLm3/xK8rP/vtoFP6i/lD8RdKRCMWjoeNhQmg8aOhk1VPrTfSwe\\nUvZ3UV7aGdV9abctud5f4qWdUZu/tMs+M5CMgOQEpJCA5AQkIyDFDAHJGQKSDkgxAckJSEAS\\nAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEAS\\nAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEAS\\nAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEAS\\nAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEASAckJSEAS\\nAckJSEASNQvpa790/nhvfdvPnz9jbwLSeEAKaR5CWp+85tzx3nBunX72fn8SSEZAihlqI0ib\\nxu/UfWnXUEAyAlLMEJCcISDpgBQTkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyA\\nBCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyA\\nBCQRkJyABCQRkJyABCQRkJyABCRRw5D+6T3vnNp5QGokIIU0HyA9k5wz7fOB/tXj49eB5ASk\\nkOYHpFzmdSA5ASkkIDkByQhIMUNAcoaApANSTEByAhKQREByAhKQREByAhKQREByAhKQREBy\\nAhKQREByAhKQREByAhKQREByAhKQREByAhKQREByAhKQREByAhKQREByAhKQREByWpCQfpxJ\\nZG/PZSvuL0482JEr93TtZSAZAamZOgnSq/77l/OnOdq3eNOB3d1bTkFaNlBqqPYykIyA1Eyd\\nBGn5Tydv/pMf1kBaf13ppnfJ8ASk5ZmXgWQEpGbqJEjp4Y3vSM7+7YfHpum6p3TTn+ufgHTJ\\n8qWr+067DCQjIDVTR0Eq9eT7X5f83Nrnq4+LuW2l24O5vvGHzzyy79mNue3TLt9xxRVXXDuW\\nVT4tZF5vvELYUJqPWmp06PmkO3so7EjFoJ2xYhq1FDcU9Q+XDxtKCyMzQ0rTY1cmpW9LfdmQ\\nKm24ctrltV1dXRedvkM1/Ti5vNVHoNgm31I4DdJLn/13yWtWfOC1Z31+4kLta7hS23NjvLTj\\npZ3VwnxpV3jk8n+e/NrGI2l66L+8ZeJa7bsKpTYs580GIHktSEg3nZ+8+oqJ13D3nTVxsfw+\\n92Pl97n7bjiZprfv7n/6ttxDUy4DyQ1IzdRJkJK33/LKqfvf/p+n7j3Vc+lVvcXyC7qjaXrX\\nyu6lq/ZMvQwkNyA1UydB+no6+7LPDKQpAamZOglSM2WfGUhTAlIzASkkIDkByQhIMUNAcoaA\\npANSTEByAhKQREByAhKQREByAhKQREByAhKQREByAhKQREByAhKQREByAhKQREByAhKQREBy\\nAhKQREByAhKQREByAhKQREByAhKQRAakP7twau8GUhMBKaTOhPQfkun9j8yvApITkELqUEhn\\n75/ageyvApITkELqVEjOEJCcgBQSkJyAZASkmCEgOUNA0gEpJiA5AQlIIiA5AQlIIiA5AQlI\\nIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlI\\nIiA5AQlIIiA5AQlIIiA5AQlIIiA5AQlIotMgfav74preACQgAUl0GqRbktP6eWcISE5ACqkT\\nIH0m+dT+mv7RGQKSE5BC6gxIG2c1BCQnIIUEJCcgGQEpZghIzhCQdECKCUhOQAKSCEhOQAKS\\nCEhOQAKSCEhOQAKSCEhOQAKSCEhOQAKSCEhOQAKSCEhOQAKSCEhOQAKSCEhOQAKSCEhOQAKS\\nCEhOQAKSCEhOQAKSCEhOQAKSCEhOQAKSCEhOQAKS6BSkF66e+MygdwDp9IAEJNEpSLuqnxl0\\n1oOzGgKSE5BCamNIjyS/93/H+87shoDkBKSQ2hrSNc0NAckJSCEByQlIRkCKGQKSMwQkHZBi\\nApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAk\\nApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkIAkApITkBrsUFbH0uHM6413Yiho\\n6GR6oumNTX9Q7n0rKr/8wXuTDzQ3N5IebfpI440dCRrKF4OGDhWihtKxoKGjo0FDx9KhV+Ih\\njWY1lhYyrzdePmwozTe98eZkejc3N1dIx5o+0njFsKHsf5+zWYoaSqOWxsKG0sJwPKTs76Lz\\n86Xdv37jo6W+8cSj4+15sbk5Xto5LZSXdtlnnqeQzivfnvZJq7MNSE5ACglITkAyAlLMEJCc\\nISDpgNRsQPIDEpBmDEh+QALSjAHJD0hAmjEg+QEJSDMGJD8gAWnGgOQHJCDNGJD8gASkGQOS\\nH5CANGNA8gMSkGYMSH5AAtKMAckPSECaMSD5AQlIMwYkPyABacaA5AckIM0YkPyABKQZA5If\\nkBY6pAOre2bqdUCyA9JCh9SbzNyvlb8ASE5AWuiQvpC8/9GZ+m75C4DkBCQgrav/BUByAhKQ\\ngBQQkIAEpICABCQgBQQkIAEpICABCUgBAQlIQAoISEACUkBAAhKQAgISkIAUEJCABKSAgAQk\\nIAUEJCABKSAgAQlIAQEJSEAKCEhAAlJAQAISkAICEpCAFBCQgASkgIC0wCDdV/tRQe8FUkRA\\nWmCQ/sXpnxX02fpLQHIC0gKDdO7PPVjT9oP1l4DkBKSFBukXG10CkhOQgCQCkhOQgCQCkhOQ\\ngCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQ\\ngCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQgCQCkhOQFgakx9dN9GogTR0C\\nkg5IU1pU/cygdzW6BCQnIC0MSP85uXNzpb/4dqNLQHIC0kKB9KPZLgHJCUhAEgHJCUhAEgHJ\\nCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJ\\nCUhAEgHJCUhAEgHJCUhAEgHJCUjV9vZctuL+4sSDXR+9YsmHvla6syNX7mkgNR+QnDoe0r7F\\nmw7s7t4y8egjvXufuzu3swRp2UCpISA1H5CcOh7S+utKN71LhqdcunFtCdLy6V+WfWYgGQHJ\\nqeMhLb+ndNOf659yadWnS5AuWb50dR+QAgKSU6dDKua2lW4P5qaY2XXJ99L0mUf2Pbsxt738\\n+Klt27btOJ7VYDqaeb3xhkeihtKh0u3zG28b75eSF2e7NDoUdKTR9GTQUuFE1FAxaOh42FCa\\nDxo6ORY0VPrTfawZSHu6nzh1d8OV5du1XV1dF6md9urG6ocHnTPa6rNQ55av3mv8pd3O7m9W\\nf297bqx0+51du3Y9cSyrk+lI5vXGGxoOGip9Ryrd9iRr7xvv67NeGhkMOtJoeiJoKX88aKhQ\\nDBo6FjaU5oOGTowFDZX+dB9tAFLNmw0PLJl8yzvdMPmOQ/bL0Xb9GekPkx1NL/EzkhM/I52q\\n/Pb3Y+W3v/tuOJmmd12yc2Bg4Edpevvu/qdvyz0EpOYDklPHQ0qf6rn0qt5i+XVc6RvZssp/\\nh72mJGpl99JVeya/KvvMQDICklPnQ/LKPjOQjIDkBKSQgOQEJCMgxQwByRkCkg5IQJJDQNIB\\nCUhyCEg6IAFJDgFJByQgySEg6YAEJDkEJB2QgCSHgKQDEpDkEJB0QAKSHAKSDkhAkkNA0gEJ\\nSHIISDogAUkOAUkHJCDJISDpgAQkOQQkHZCAJIeApAMSkOQQkHRAApIcApIOSECSQ0DSAQlI\\ncghIOiABSQ4BSQckIMkhIOmABCQ5BCQdkIAkh4CkAxKQ5BCQdEACkhwCkg5IQJJDQNIBCUhy\\nCEg6IAFJDgFJByQgySEg6YAEJDkEJB2QgCSHgKQDEpDkEJB0QAKSHAKSDkhAkkNA0gEJSHII\\nSDogAUkOAUm3sCG98vB9mzdv/i0g1R8Ckm5hQ/rzZLyvNb0EJCcgzVNIn02615Xa+FLTS0By\\nAtK8hXR30BKQnIAEJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAE\\nJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAEJBGQnIAE\\nJBGQnIAEJBGQnIA0zyB9ZfN4y4HkDAFJtyAh7Umq3RtzIiBZAWl+QdqZvHtdpZs/92LMiYBk\\nBaT5BunaiaHKJ61GBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJ\\nBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJBCQnIAFJ\\nBCQnIAFJBCQnIAFJBCQnIM0DSN96sNp6IDU0BCTd3EAayyqfFjKvN15hNkNvSqa0amIozUcd\\nKWwo7EjFoJ2xYva/z1kUNxT1D5cPG0oLI/GQXs7qSDqUeb3xjg/O4i8654091T78rfFrJ9Lj\\nQUcaOhY0NJweDloaOxQ0lC8GDb1ciBpKR4OGDo8EDZX/dMdDyv4u2tqXduf8esYQL+2cIV7a\\n6RbOz0hAmvUQkHRAiglITkACkghITkACkghITkACkghITkACkghITkACkghITkACkghITkAC\\nkghITkACkghITkACkghITkACkghITkACkghITkACkghITkACkghITkACkghITkACkghITkAC\\nkghITkDqDEh9j9YJSLMeApJuPkF6OKnbuzKGgOQMAUk3nyBtTv7jlTN31RczhoDkDAFJN78g\\n3dToEJCcISDpgBQTkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQR\\nkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQRkJyABCQR\\nkJyABCQRkJyAFA6p7gf+qPZk/9XrgDQ1IBl1OqRb63/gz2z7RIP/9ECyhoCkaxGktcmiOh/4\\no1pxdfb1q7/d4D89kKwhIOlaBmlLE4ee1SetZg4ByRkCkg5IMQHJCUhAEgHJCUhAEgHJCUhA\\nEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhA\\nEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhA\\nEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhA\\nEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUhAEgHJCUjV9vZctuL+4mmPpl8G\\n0uwDklPHQ9q3eNOB3d1bah9NvwykJgKSU8dDWn9d6aZ3yXDNo+mXgdREQHLqeEjL7ynd9Of6\\nax5NuTx4tNT3szpw6GD1/qqk9+XZd2Kwib942lB6PGhp6FjQ0HB6OGhp7FDQUL4YNPRyIWoo\\nHQ0aOjISNZQOvexDKua2lW4P5vqmP5p6eW1XV9d/TXRflmiJOqp89V4EpL+49tprP/ybmV00\\n5f7lB0dnXz7fxF88bSiNWiqMRQ2lUUvFoJ3RYhq2FDWURi2NFaKG0kL1J5uQl3aVsl+OTvkZ\\nqbn4GcmJn5GMOv3NhuYCkhOQjFr59vdj5fe5+244OeVR9Q6Qmg1ITh0PKX2q59Kreotpuj13\\ndMqjyTtAajIgOXU+JK/sMwPJCEhOQAoJSE5AMgJSzBCQnCEg6YAUE5CcgAQkEZCcgAQkEZCc\\ngAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCc\\ngAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCc\\ngAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgAQkEZCcgBTRc4tun9P9WfTwoq+1+gi1\\nfWrRD1t9hNqu/u1Wn6C20UUfavURavuHRXdMPphbSM923TKn+7Poi11/2+oj1HZT1w9afYTa\\nfveCVp+gttGua1p9hNqe6fqzyQdAan1AMgJSmwUkJyAZnUFIP1zz5Tndn0XfWPOtVh+hti+t\\nebHVR6jtc+tafYLa8ms2tfoItR1Ys2PywdxCIlogAYkoICARBTRXkL67/n252yr39vZctuL+\\n4hz9bRqoeqIduXJPt/o8pXZ99IolH6r8Z612eZImj9Q+z9KeVUsvu+YvR9M2epaqR5p8luYK\\n0jP3Pr6y8sd23+JNB3Z3b5mjv00DVU+0Y9lAqaFWn6fUR3r3Pnd3bmcbPUmTR2qfZ+kbX312\\n344lt7fTs1Q90uSzNIcv7Xoqf2zXX1e66V0yPHd/H7/xE+1Y3upzTOvGte31JKXjR2qzZ+mO\\nD7Tds1Q+0uSzNOeQlt9TuunP9c/d38dvAtIly5eu7mv1Waqt+nR7PUnp+JHa6lkqDFxzZ5s9\\nS+NHmnyW5hpSMbetdHsw1xb/SsYhPfPIvmc35ra3+t4aP4YAAAMmSURBVDAT7brke+31JI0f\\nqZ2epdHFF+c25tvqWZo40pRnaQFCqrThyhaeY0p7up9osydp/EjjtcezVDywf+ey+9rqWZo4\\n0niVZ2kBvrSrtD031sKDVNvZ/c3yL+30JE0cqVKbPEulvnrx8bZ6ltLxI1WqPEsL8M2GShva\\n4mfpB5aMv7/cRk/SqSNVao9nqdyO3OF2epbKlY9UqfIszRWkkYGBD64f+MH4e5aPtcN7ltUT\\n3b67/+nbcg+1+jyl7rpk58DAwI/a6EmaPFL7PEuf/3r/Pzz0Oze107NUPdLkszRXkAYq/6Vq\\nceneUz2XXtXbBv8VrXqiu1Z2L121p9XHKbescqTy/6q5XZ6kySO1z7N033WX/84fbS1/H2qb\\nZ6l6pMlnif+JEFFAQCIKCEhEAQGJKCAgEQUEJKKAgEQUEJCIAgISUUBAIgoISEQBAYkoICAR\\nBQSkzmpr8vAd//anfvnBdP/ic1+/9HDlygM3nn/OL36u8tv/+PvnvvbCv+v+qdYeciEGpM5q\\na/Kf3vax9W85e9ubln9uWbKscuW8i/f+vzXJ/yrdP/oLZ1971x+9/leAdMYDUme1NTn/aJp+\\nJznrz0sPFp/9k/KVt5b/78F/7+z9abouuat09y8TIJ3xgNRZbU02lH954+sKpdtbk2+Wr9xU\\nvrI7+Uya/vq/zJfuFt8MpDMekDqrrcnW8i9v/9Xy7ZZkR/lKb/n+88kH0/S176580W8C6YwH\\npM5qa/Jw+Ze3v7N8uyX5SvnK5vL9fcm1JUi/UfkiIJ35gNRZZUG6vnz/wSkv7d4CpDMekDqr\\nLEjnHkzT0d8463tp+tHkntLlXt5sOPMBqbPKgtT1b9bf9u5kdenCkbe+6g/v/uPX/8qrW3rG\\nBRmQOqssSNs+/bZzfuGWysdUvbD0Z15zQd973tDKIy7MgNTpTdCa2lvf1YqDLOyA1OlNg1T5\\nfwz218maVh1m4QakTm8apEVX33n3Na8676XWHWehBqRObxqkT7/zZ/7ZeVf/uHWnWbABiSgg\\nIBEFBCSigIBEFBCQiAICElFAQCIKCEhEAQGJKCAgEQX0/wGzfpX+X7ybXAAAAABJRU5ErkJg\\ngg==\",\n      \"text/plain\": [\n       \"plot without title\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"library(\\\"ggplot2\\\")\\n\",\n    \"ggplot(mtcars, aes(mpg)) + stat_ecdf()\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"R\",\n   \"language\": \"R\",\n   \"name\": \"ir\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"r\",\n   \"file_extension\": \".r\",\n   \"mimetype\": \"text/x-r-source\",\n   \"name\": \"R\",\n   \"pygments_lexer\": \"r\",\n   \"version\": \"3.5.1\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_R/ir_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is a jupyter notebook that uses the IR kernel.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"55\"\n      ],\n      \"text/latex\": [\n       \"55\"\n      ],\n      \"text/markdown\": [\n       \"55\"\n      ],\n      \"text/plain\": [\n       \"[1] 55\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"sum(1:10)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\\nGMU0FVKti2PVToxiWgqp4u2aaidGIW2FBJUSEgQICQKEBAFCggAhQYCQIEBIECAkCBASBAgJ\\nAoQEAUKCACFBgJAgQEgQICQIEBIECAkChAQBQvoc0/cv4XZCeh/Rd9TiHkI6H1FI3EhI3wZU\\nErcR0rcBhcRthPRtQCFxGyGdj6gjbiSk9xGt2nEPIX2OKSNuJyQIaCskzxpUqqWQXMdQraZC\\nKjU8/FZDIdnroV5CggAhQUBDIblGol5NhWTVjlq1FJJ9JKrVVkhQqaIhvTyuuqPV+mWoIWAU\\nBUPaL7ovy0GGgJEUDGnd9c/b06Pdpu/WQwwBIykYUt9tPx9vu36IIWAkBUP6tuL29/Jbd+7G\\nIWAknpEgoOw10mZ3euQaiakpufy9PHvtttgPMgSMo+w+0vq0j9SvHu0jMS3ubIAAIUGAkCBA\\nSBAgJAgQEgQICQKEBAGVhgSNueGrPB9OSq1Tq3Ve1U5sFvOq9YM81Du1WudV7cRmMa9aP8hD\\nvVOrdV7VTmwW86r1gzzUO7Va51XtxGYxr1o/yEO9U6t1XtVObBbzqvWDPNQ7tVrnVe3EZjGv\\nWj/IQ71Tq3Ve1U5sFvOq9YM81Du1WudV7cRmMa9aP8hDvVOrdV7VTmwW86r1gzzUO7Va51Xt\\nxGYxr1o/yEO9U6t1XtVObBbzqvWDPNQ7tVrnVe3EZjGvWj9IaIqQIEBIECAkCBASBAgJAoQE\\nAUKCACFBgJAgQEgQICQIEBIECAkChAQBQoKASkO6+XuZD+rpY0LrvuvX+1Hn8s3HxOo6bU+L\\nz7NU1Qn7mlfwfNVy0r/b1vUV8W77MaHlaXKLcWdz5mNidZ229Wku/fErtqoT9jWv5Pmq5KT/\\nYdutxp7C37b9+yl/6frt8XcvI0/ow+fEqjpt2+5hf3yufKjshJ3NK3m+6gzpqXscewp/eeqW\\n71+v627z+utzLXP8mlhVp231Nqfj1Ko6YWfzSp6vWkN6GnsKf+nWh/ev11W3O1T0z//XxKo8\\nbV11J+zkLaTc+aozpFW3eXi9IBx7Gt9sDx9fr9//M7qviVV42vbdsroTdnSaV/J8VfSxnVm9\\nXQQux57HH+oM6XAWUnWn7en4qq6+E/Y2r+T5quhjO9N1z6//aKxre6VSe0j1nbZdf3w5V98J\\n+5hX7nzV87H9bV/LgumH2kN6U9Fp2/enf+2rO2Hv83r/TeR8VfOx/Us9Z/7N+3z62r4u/phK\\nPRNbvn2JVnfClt/Sicyrmo/tX+o582++rdrtKlqEqjOk3WK5Oz2o7IR9zuvdhEPqu+N+eDVn\\n/sP7GX88bYtsunqWxz6fKms6bZvPq/i6TtjXvJLnq86Q1sdzvn/bx6tIpXc2fE6sqtO2+1oN\\nq+qEnc0reb7qDGnfn9Yl6/gX7MvHa4BFbavM7xOr6rQ9dF93stV0ws7mlTxfdYb0+s9E3y3q\\nWcV99xHS/nQz87hz+eZ8YrWctu4spJpO2J/zCp2vSkOCtggJAoQEAUKCACFBgJAgQEgQICQI\\nEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQICQKEBAFCggAhQYCQIEBIECAkCBASBAgJAoQE\\nAUKCACFBgJAgQEgQICQIEBIECGl6avmp5rPinE+PkEbgnE+PkEbgnE+PkEbgnFdvs+y65eZw\\nCmT9+cPBnxZd//TXw3XfrYU0Bue8dk9vP8z+6RjS4/HR8vh/V92/Hi6Pj1ZCGoFzXru+2x4O\\nz93iGFK/PWz77vn1Wapb7g/7Zbf59vD5/Q/4pJbnnNeuOyZy9mjTrY7PQvvXh/u/Hr6c/oBP\\nannOee3Wry/Wttvjo/dAjv/pPvzx8HD25yjJOa/e4+trta7fCalqznkDNuvF2zXS6XdnyXz8\\n9vtDIY3AOW/DWz1vl0APx6uhjwunvx++CGkEznntFsdVum+rdh/rc4en4wrD2cONVbvROOe1\\ne367Ano5hvS2T3T8v6dHpyun84enLaUHIY3AOa/e6c6G44u610BW3eLrdobuYffnw0d3NozE\\nOW+HQCrmc9MOIVXM56YdQqqYz007hFQxnxsIEBIECAkChAQBQoIAIUGAkCBASBAgJAgQEgQI\\nCQKEBAFCggAhQYCQIEBIECAkCBASBAgJAoQEAUKCACFBgJAgQEgQICQIEBIECAkC/gNzeDUu\\n0A6vdAAAAABJRU5ErkJggg==\",\n      \"text/plain\": [\n       \"plot without title\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"plot(cars)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"R\",\n   \"language\": \"R\",\n   \"name\": \"ir\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"r\",\n   \"file_extension\": \".r\",\n   \"mimetype\": \"text/x-r-source\",\n   \"name\": \"R\",\n   \"pygments_lexer\": \"r\",\n   \"version\": \"3.5.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_bash/sample_bash_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \" \\u001b[0m\\u001b[01;32mREADME.md\\u001b[0m  \\u001b[01;32m'Sample bash notebook.ipynb'\\u001b[0m   \\u001b[34;42mbinder\\u001b[0m   \\u001b[34;42mdemo\\u001b[0m   \\u001b[34;42mnotebook\\u001b[0m   \\u001b[34;42mslides\\u001b[0m\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"ls\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# https://coderwall.com/p/euwpig/a-better-git-log\\n\",\n    \"git config --global alias.lg \\\"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"* \\u001b[31m64accf1\\u001b[m -\\u001b[33m (HEAD -> master, origin/master, origin/HEAD)\\u001b[m Slides reviewed \\u001b[32m(23 hours ago) \\u001b[1;34m<Marc Wouts>\\u001b[m\\n\",\n      \"* \\u001b[31mbf3d0ab\\u001b[m -\\u001b[33m\\u001b[m README \\u001b[32m(23 hours ago) \\u001b[1;34m<Marc Wouts>\\u001b[m\\n\",\n      \"* \\u001b[31md1116f6\\u001b[m -\\u001b[33m\\u001b[m Use Binder \\u001b[32m(23 hours ago) \\u001b[1;34m<Marc Wouts>\\u001b[m\\n\",\n      \"* \\u001b[31m3526fc6\\u001b[m -\\u001b[33m\\u001b[m Demo notebook has data in the metric explorer \\u001b[32m(23 hours ago) \\u001b[1;34m<Marc Wouts>\\u001b[m\\n\",\n      \"* \\u001b[31mf4139fd\\u001b[m -\\u001b[33m\\u001b[m Ignore more patterns \\u001b[32m(23 hours ago) \\u001b[1;34m<Marc Wouts>\\u001b[m\\n\",\n      \"* \\u001b[31m984ccd1\\u001b[m -\\u001b[33m\\u001b[m Demo script updated \\u001b[32m(2 days ago) \\u001b[1;34m<Marc Wouts>\\u001b[m\\n\",\n      \"* \\u001b[31m6874a22\\u001b[m -\\u001b[33m\\u001b[m Updated final notebook \\u001b[32m(2 days ago) \\u001b[1;34m<Marc Wouts>\\u001b[m\\n\",\n      \"* \\u001b[31ma6b8f88\\u001b[m -\\u001b[33m\\u001b[m Slides and demo are getting ready \\u001b[32m(4 days ago) \\u001b[1;34m<Marc Wouts>\\u001b[m\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"git lg\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Bash\",\n   \"language\": \"bash\",\n   \"name\": \"bash\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"shell\",\n   \"file_extension\": \".sh\",\n   \"mimetype\": \"text/x-sh\",\n   \"name\": \"bash\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_clojure/html-demo.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Clojupyter Demo\\n\",\n    \"\\n\",\n    \"This example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.\\n\",\n    \"This notebook demonstrates some of the more advanced features of Clojupyter.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Displaying HTML\\n\",\n    \"\\n\",\n    \"To display HTML, you'll need to require a clojupyter helper function to change the cell output\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(require '[clojupyter.misc.display :as display])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \">> should print some text\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<ul><li>a <i>emphatic</i> idea</li><li>a <b>bold</b> idea</li><li>an <span style=\\\"text-decoration: underline;\\\">important</span> idea</li></ul>\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"(println \\\">> should print some text\\\")\\n\",\n    \";; displaying html\\n\",\n    \"(display/hiccup-html \\n\",\n    \"    [:ul \\n\",\n    \"     [:li \\\"a \\\" [:i \\\"emphatic\\\"] \\\" idea\\\"]\\n\",\n    \"     [:li \\\"a \\\" [:b \\\"bold\\\"] \\\" idea\\\"]\\n\",\n    \"     [:li \\\"an \\\" [:span {:style \\\"text-decoration: underline;\\\"} \\\"important\\\"] \\\" idea\\\"]])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can also use this to render SVG:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<svg height=\\\"100\\\" width=\\\"100\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><circle cx=\\\"50\\\" cy=\\\"40\\\" fill=\\\"red\\\" r=\\\"40\\\"></circle></svg>\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"(display/hiccup-html\\n\",\n    \"    [:svg {:height 100 :width 100 :xmlns \\\"http://www.w3.org/2000/svg\\\"}\\n\",\n    \"            [:circle {:cx 50 :cy 40 :r 40 :fill \\\"red\\\"}]])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Adding External Clojure Dependencies \\n\",\n    \"\\n\",\n    \"You can fetch external Clojure dependencies using the `clojupyter.misc.helper` namespace. \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(require '[clojupyter.misc.helper :as helper])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(helper/add-dependencies '[org.clojure/data.json \\\"0.2.6\\\"])\\n\",\n    \"(require '[clojure.data.json :as json])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"\\\"{\\\\\\\"a\\\\\\\":1,\\\\\\\"b\\\\\\\":[2,3],\\\\\\\"c\\\\\\\":\\\\\\\"c\\\\\\\"}\\\"\"\n      ]\n     },\n     \"execution_count\": 6,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"(json/write-str {:a 1 :b [2, 3] :c \\\"c\\\"})\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Adding External Javascript Dependency\\n\",\n    \"\\n\",\n    \"Since you can render arbitrary HTML using `display/hiccup-html`, it's pretty easy to use external Javascript libraries to do things like generate charts. Here's an example using [Highcharts](https://www.highcharts.com/).\\n\",\n    \"\\n\",\n    \"First, we use a cell to add javascript to the running notebook:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<script src=\\\"https://code.highcharts.com/highcharts.js\\\"></script>\"\n      ]\n     },\n     \"execution_count\": 7,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"(helper/add-javascript \\\"https://code.highcharts.com/highcharts.js\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now we define a function which takes Clojure data and returns hiccup HTML to display:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"#'user/plot-highchart\"\n      ]\n     },\n     \"execution_count\": 8,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"(defn plot-highchart [highchart-json]\\n\",\n    \"  (let [id (str (java.util.UUID/randomUUID))\\n\",\n    \"        code (format \\\"Highcharts.chart('%s', %s );\\\" id, (json/write-str highchart-json))]\\n\",\n    \"      (display/hiccup-html \\n\",\n    \"        [:div [:div {:id id :style {:background-color \\\"red\\\"}}]\\n\",\n    \"                   [:script code]])))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now we can make generate interactive plots (try hovering over plot):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div><div id=\\\"c10e6020-3269-448a-abca-4c66e9d7ded2\\\" style=\\\"{:background-color &quot;red&quot;}\\\"></div><script>Highcharts.chart('c10e6020-3269-448a-abca-4c66e9d7ded2', {\\\"chart\\\":{\\\"type\\\":\\\"line\\\"},\\\"title\\\":{\\\"text\\\":\\\"Plot of random data\\\"},\\\"series\\\":[{\\\"data\\\":[504.01467712342867,3341.0920547848564,4337.721102300496,6302.792911434946,8478.835205936486,10200.680828376206,10860.870680250395,12647.535717418537,15049.206475253737,15676.723872165207,18067.461740488947,19811.340135162725,21096.880976212426,22976.421542773023,25642.573015763446,27007.92800767133,29018.359691583086,30646.762491414887,31758.620006667774,34250.99208239191,35275.00442612561,36497.80884768278,39369.70265657102,39779.62059714332,41192.8417728236,43797.79229964539,45674.65600549047,46898.57640625968,49270.696741219595,50303.10602406769,52297.24955208905,54275.213212040246,55465.3140193698,58120.32773386899,59637.312036365875,61624.67353717149,62871.769400278805,63892.08493865866,65221.515576763486,67831.50200221328,68846.74284693149,71221.87452589671,73671.13537809922,75102.92070147628,76763.12004283862,77700.8741210995,79426.30785496999,81138.75169106339,82864.90831575713,84300.33411433673,86234.14277900638,89111.33455879882,89655.59709072384,91454.31411329177,93521.50063341322,95135.77588789558,96640.86334301074,97907.3293012478,99908.3303956858,102868.48064585627,103157.91637616762,106283.89759635835,107262.16838623513,109688.15292270857,110714.79604858396,113116.02875155817,113964.73126794913,115280.31817896444,117345.58303545591,118552.3733412588,120557.49394396068,123251.90615516288,124789.74925081071,126249.04944840563,128262.72431601371,129650.54767430482,131297.77144759757,133223.09127112568,135183.65413971254,136585.97641177246,138730.64949844027,140071.0142294564,142188.29772735498,143540.29023221708,144426.11687330576,146105.16720830323,148267.88646976373,150277.81479987688,151141.09908000176,153003.3431721588,155072.9696581508,156655.92582952158,158280.3711263092,159706.54537405443,161359.93965820075,163435.42387206928,165713.3841256729,167283.85675845615,169816.06964090836,170012.91960677365,172080.8763030499,174304.03666415406,176140.11173783313,177896.17563255582,179940.15205100743,180202.76875587768,182986.08348256923,184372.46353280978,186248.80906899288,187216.41085783066,189426.07793621722,192139.7341929141,192981.21095901134,195047.64734643573,196585.76551773504,197796.7618325834,199462.148849989,201091.62102619332,204001.71219627908,205557.41101896286,206415.9047485457,208166.92222289983,209874.72017027094,211177.7886473916,214366.3229511108,214992.2379779765,217308.10540030125,218123.2817908046,221212.51686517545,221654.51601766836,223860.1572121239,225283.34538017176,228029.48196418612,229120.1730726647,231117.9829888751,233249.39160315914,234675.15545798198,235491.17818014944,238299.5227876786,239033.24656573992,240289.35829467155,242970.767737453,245091.72538878422,246296.378077813,248421.57350493365,248911.09927153058,250659.71006829522,252283.46160358287,255223.66110516613,256307.32711035621,257602.19451675512,259983.83935822253,261122.3769899618,263439.38390791597,265190.5522829674,266529.04141042416,268564.9607491242,270764.1768746787,271904.5692232761,273993.77582933835,275073.07383772836,277042.96053805883,279515.30136326957,280797.65731739113,282358.0160048534,283451.32046423934,285564.3928027838,287437.43354272,289471.4173924183,290154.5062227411,292073.7951658812,294162.58051467635,295922.49660802446,296966.7755894963,299830.0359330417,301804.8769498439,303465.4969803359,305289.9640011254,305543.01680491626,307856.9308388182,310129.0552493845,312307.66768587835,313992.7779782305,314161.62006155663,316431.02894629637,317853.2319188793,320664.7487377146,322116.02170962596,324081.70103727945,324796.15855685103,326834.70969894616,328537.6431379544,330525.30135563633,332186.6010860477,334215.02512353973,335315.63099633413,338048.4285277517,338417.288388359,340237.66093010065,341811.12370700826,343834.2252276441,346406.5210595782,346699.0851371947,349971.02414695953,351171.0547181573,352618.8091386837,353591.3556178736,356914.2098216867,357177.94570957863,359817.27074951254,361760.5309487786,363134.5593732308,365222.21748059685,367000.08764656493,367239.99817305355,370225.1635739965,371737.466197717,373040.1133099548,375166.39288538776,377502.7018259677,378650.48863657104,379390.1564232694,381031.4935702718,383400.20322317415,385981.73836711637,387460.51220380137,389410.8054731983,391036.2754409681,391619.5544203977,394427.990075115,395054.5047796959,397663.37176467397,399087.6716151541,400728.9877078095,402892.9969908024,403978.78060487506,405424.41687800223,406991.0859230373,409781.55028031784,410777.7604378193,413030.51461204246,414356.1911620559,415718.29578475223,417378.60523433704,418972.56916596764,421343.4265994993,423265.34525418637,425338.4149348379,425951.0624250249,428687.77532261447,429391.8569370728,431969.9581722627,434027.0976198394,435170.9028441315,437192.58914679487,437988.2527196529,440723.1421268008,442157.63915710396,443843.8116279504,444684.35258398036,447017.66423418646,448517.2745724615,449708.4028733435,451659.3192575042,454729.8302398158,454987.1249944543,457369.54297513445,459369.4671192174,460566.3221037852,461966.7486564694,464833.6188802792,465854.71183226135,467641.85473519086,469346.74599777046,470349.79098731995,472093.21404415276,474516.11768577533,476896.2509671359,478370.1269454932,479351.4983050216,480928.63518084225,483574.0225236888,485464.29029798065,486219.8411249944,488751.43201024225,490457.4711560733,491566.47942520044,493801.9596826314,495865.4140004851,497346.005170896,499257.6432529947,499617.8966079724,502480.0148652829,504117.75863415614,504716.95812769455,507139.48414378415,508648.9315814669,510814.0625825835,512949.1316989036,513180.8844479721,515667.6646849152,516969.94700964796,518800.3068160648,520444.44084157085,522255.0992031512,523445.5125342639,525599.1708250414,527902.4386065033,530165.5072581369,530362.1858912229,532509.3320442596,534306.3615520456,536757.1218461827,538745.6739498102,540098.1078821833,541076.8442744158,543350.826562829,544495.8578937126,546475.5755231146,548899.7583470468,550607.5252251276,552290.9182365085,552812.0687857511,554340.7338300266,556703.4004464688,558956.6588697978,559466.2609892226,561827.9053224806,562916.5387340467,566140.2979527524,566789.5563595418,568948.7864236725,570688.29495597,572412.9196529575,574363.7192463124,575377.9126242327,577484.2888392739,578742.3313398123,581345.5025248317,581857.2585007268,584077.0695911325,585724.2473988207,587550.4935976886,589223.4207645595,590897.2552354323,592546.5199258354,595352.4782291795,596618.174039029,597392.3475525079,599404.5645161764,600960.3298380218,603088.2434583401,604056.4428030935,606454.178257705,608801.7637649794,610320.0019022638,612009.7031431004,613972.6236966931,615832.252907975,616561.2871893878,617997.723154408,620732.1536209593,621353.9830547397,624039.6494815777,625459.8203307786,626708.076484846,629409.9341881764,630842.0752120106,631921.7982042093,634394.0134865238,635608.0044892109,637183.5994772052,639346.8748481671,641068.1743701512,642529.5521880708,643897.2047733518,646336.239335572,648086.2791965032,649221.8120104092,651733.0192353154,652112.0935428357,653969.179753711,655580.3494427068,658393.0649932115,659197.0550959471,661922.2841264056,663348.0490895815,664788.6696069129,665928.4437253256,668933.5654003982,670219.0894085915,672435.1441485254,674254.2404430934,675295.2338771593,676931.9389980978,678004.4421942441,680813.4058059173,682289.0804062975,683760.6160310346,685349.2540421207,688038.7610266891,689267.0473351999,690044.2845966567,692867.3531149945,694091.7822617397,696426.7605128379,697915.7192243482,699688.9996531581,701293.4253586385,702262.5560389161,703815.2501074633,705826.8206538586,708325.4962123404,709877.961270284,710780.5092569572,713094.8224265013,715279.0978081924,715967.6406513803,718691.6291559413,719421.056146365,722084.3325813904,723631.492227222,724902.503576842,726662.9451299297,728728.7062082144,731006.8821182909,731453.3008945928,732781.3949147706,734988.5748285853,736616.9296131044,739469.6285963188,740283.5464702278,741354.49630553,743293.3058891359,745581.578482779,747396.3962045697,749119.4909837384,750041.1864959621,751725.3401889285,753884.493358716,756514.9871613192,757519.797125709,758521.1520802422,760954.5404628674,763050.6210849548,764658.418150831,765686.06540465,768205.9595925831,769213.0796194201,771198.7656467574,773890.3304107873,773993.3509254575,775773.8203537819,777790.3402529897,779210.1692201406,780876.2581905463,782653.771680019,784329.6376762844,787595.2831434422,788179.7689917402,790767.0102475818,792491.039331985,792968.6486128662,794580.216264264,797490.9339066214,799254.7535406261,800192.9878534592,802931.6104949521,804015.590942128,805347.3520138009,808076.7580443149,809924.4201370764,810985.5973869079,811729.2487014576,813896.5842579515,815802.9317715138,816856.468343555,818770.8924743615,820758.7685260916,822364.6589650298,824259.2079762715,825547.4969246442,827957.8394246062,829053.1328543146,830858.6488886084,833118.805667325,834859.0641623057,836125.8949169567,839094.2996642682,839413.6929081706,841442.4261752162,842940.6266809535,845875.3548104116,846481.3241512107,848233.7788662459,850130.0882836317,851904.0403708701,852985.1532841285,855682.718702098,857894.9020380984]},{\\\"data\\\":[858807.6134483254,861231.2075491115,862150.1763137138,864040.2051508732,864933.1029488259,867373.9135353429,869121.8081944748,870397.8082252332,873060.2735987481,874551.1417117086,875733.9768666145,877453.7362750878,880269.3149930733,881561.199345279,883431.4412271567,883869.8899644229,886200.4017822461,887212.1764762056,889709.8335702816,891744.0550901954,892438.5402718696,895188.3502414387,897315.584590776,897942.6004754382,899261.0121014774,901813.27984622,902925.1615334721,905600.9428068157,906080.244728537,908024.7736545467,911172.3196866806,911998.2208209612,914342.0821945261,914725.0867820695,916464.5226283015,919774.6088522797,919830.2009552304,922286.5079569218,923315.768772155,926092.313530708,927057.8086129156,928717.9204648436,931418.7698318363,932636.5350598322,934653.783128736,935531.9719247184,938356.7575470919,939962.5390311012,941400.0553435051,943327.1648246003,943962.1532105431,946351.471177973,947490.3065526247,950042.4791746467,952141.9157668742,952972.6626208407,954364.9473843839,955942.0654673278,958979.5914474002,959267.9102233704,961853.8642943957,963248.0958253284,965595.9203086687,966553.5801993746,967942.5637715829,970997.0382896285,971843.3116927649,973759.3717724846,975393.1145121641,977976.4189494306,978996.5826955226,980836.190884959,981822.6822607788,984185.5627751285,985055.0610634715,987401.8211655738,988925.4709467508,991078.8547187821,992429.4852369678,994759.9449722293,996102.5293064831,998277.7388908035,999915.0926607505,1001009.5527565758,1002954.1504933517,1005217.9734122765,1005993.8677266049,1007357.8947139247,1009095.4881949316,1010863.5854338281,1013040.1293675117,1015704.8654765987,1016153.5304181427,1018080.520559532,1020624.4692005705,1021780.076517329,1023224.7187302569,1024597.1578649601,1027389.5087942124,1029377.8588572943,1030441.2684308165,1032941.6611216274,1033959.0266334319,1035170.0526409665,1038094.6410616635,1038281.5639009859,1041555.7118028128,1043321.6773088006,1043660.6390094358,1045703.0359435258,1048418.1344233706,1049418.4404579313,1051446.2376009524,1053067.9549405824,1055292.4787067904,1055937.5312204354,1057657.5387666975,1060052.2077502778,1061045.1677577887,1062742.2571796088,1065107.1253240579,1066694.5714299239,1067906.7153849474,1070596.822640473,1071621.6142412021,1072996.0752951403,1075438.9725477502,1076255.908630354,1078032.352137454,1080600.9202807408,1082605.3930362049,1083400.7039881188,1085901.9650434572,1086705.8337116,1089025.0253675897,1090068.6498006887,1091860.8701784227,1093701.1625366563,1095997.6441327492,1097658.3975412287,1099036.875522868,1100080.0590509633,1102003.7667912873,1105056.345424372,1106793.6392058528,1108509.7893877197,1109009.2585416469,1111090.6042168154,1112054.0283584937,1114513.4951469968,1115807.8105007722,1117712.3589333878,1120348.3134491858,1120829.6646138988,1123823.7820015159,1125153.3294518103,1127070.6525877728,1128728.1211600536,1130512.7321586495,1131947.3974608665,1133394.4645224074,1134997.511493526,1136509.4205536058,1138790.4546627738,1139664.060000195,1142568.0776992468,1144211.1404588844,1145213.141412192,1147710.2940391952,1149298.9227049337,1150863.9543540336,1152844.381849099,1154084.0222694827,1155769.0296066205,1157788.7339004413,1159417.4865172328,1160322.788855752,1162985.970733094,1163934.8631496562,1165451.0801124603,1168439.4424316313,1168733.5438260692,1171810.0462727507,1173148.2266665953,1174050.2720020977,1176107.4974501217,1178776.8674707997,1180358.861772127,1182096.7735298527,1182477.0600446174,1184958.583924955,1185939.0053809166,1189183.3024968395,1189827.1606755229,1192330.0879128193,1193911.2164014017,1195588.6379698445,1197054.0327972984,1198757.0581785669,1201124.3643055898,1201728.8772212632,1203321.3159375682,1206259.026112234,1207515.030656583,1208080.1002402224,1209918.8225058955,1213130.415508018,1214259.7168228554,1215195.887804841,1217505.8117402876,1219789.5704414523,1220180.522722343,1223017.046170767,1224684.9142322806,1225259.36939849,1227707.0746750329,1228712.7858897815,1230529.77595657,1232650.2292479349,1235084.2182348792,1236974.1224189259,1238275.0415271185,1239453.1360068829,1241468.3559081731,1243633.4097395034,1244723.4720993375,1247184.7952371468,1247611.2972610644,1250640.6886028913,1252103.7944231604,1253299.0778805192,1254861.1025540973,1257427.9252390189,1258784.3031552148,1260848.6438379267,1261698.6394122967,1264092.2354776384,1265847.2888899674,1266427.9577699334,1269444.4352222215,1270712.8347251732,1272610.041310744,1273333.8685998654,1275336.8956101062,1277267.7225311324,1279707.476096105,1281442.5064195804,1282316.0741058735,1283939.0063750907,1286285.3615240513,1288381.4570110864,1289774.9146433927,1291262.2875660527,1293755.6700358107,1294442.0071271418,1297082.2532037362,1298437.677526845,1299180.757335955,1301063.7096198073,1303018.8525357242,1304757.7820661522,1307096.8709328547,1309040.600431058,1309875.356864771,1311213.385210472,1313835.9167839116,1314945.1059120037,1317287.292977638,1319218.5849509593,1320025.4631959489,1322406.011550775,1324319.1059558897,1325905.7763555932,1327420.6366210172,1329282.8194322167,1330452.7067784541,1332589.1479426008,1334191.8655302036,1335234.4044379436,1338230.122747939,1339279.2516825204,1340327.3530998034,1343249.0861495847,1343704.5786053184,1346274.725902786,1347944.7118127663,1350490.064896853,1351665.7015763435,1352260.3957814705,1355250.3672545524,1355946.6283643611,1358038.529079059,1359135.7450185257,1361602.1403755147,1363919.6162871453,1365704.6143336226,1367456.1467602851,1367991.8427756666,1370589.3379907985,1372072.760328367,1374135.262130703,1375230.7701622928,1377235.4707657085,1379528.7781953241,1380130.6583360506,1382551.655164138,1384193.42155001,1385542.1531613711,1387079.9681735644,1389395.9418766112,1391504.2194145839,1392086.6143169573,1394071.8079683664,1395971.169172919,1397749.2109516077,1399521.3440967682,1401112.1889553207,1402615.8019096926,1403912.6640200166,1406467.9249162592,1408407.3036411672,1410370.0238752784,1411916.8422570948,1413437.1099916582,1414943.3362862885,1416840.8076634,1417785.1938366937,1420105.1178491437,1421387.3427246348,1423652.002661006,1425198.0062864604,1426223.3889557288,1429344.2629788115,1430105.2319684394,1431539.210498638,1434108.6056461846,1435803.7760483047,1436585.0666695163,1438236.9737084382,1440821.265097166,1443048.9741500663,1443974.2448927353,1446482.3043724566,1446833.2082074839,1449428.7299904283,1450897.629740599,1452889.0978749688,1454495.2458027133,1455989.1485181954,1457211.1512924216,1459995.8846833608,1460693.3864679686,1462332.64029002,1464350.1526631257,1467135.9987946576,1467630.159033334,1469033.9227493498,1470714.3616971616,1472854.9677452664,1475046.1355789308,1476742.6499903214,1477750.1354289288,1479367.630879295,1482325.9994529681,1483566.3916127612,1484586.6750995854,1486666.825535893,1488153.3658255977,1489555.325258462,1491555.585259371,1493672.4380244336,1495141.050910187,1497793.2775511914,1499516.4517903195,1500444.197605725,1502492.5988676562,1503786.6419630973,1506177.0384597864,1507909.7988754371,1509354.6138217556,1510841.2224878054,1512771.2538495124,1514041.7706457374,1516101.808097858,1517031.1958726328,1519925.2144190678,1521679.9655715148,1522193.665246391,1523814.1549526227,1526989.5321906575,1527737.6272835988,1529405.2306672696,1531231.5902124185,1532708.379847941,1534811.6989086433,1537276.7801082295,1537711.1860783468,1540620.9375758297,1541398.3683693227,1544199.9798827954,1544403.953098318,1546852.5014325613,1548600.8033800996,1549997.6414989317,1551965.4868199741,1554502.8341273807,1555379.6112533964,1557652.2854104785,1559182.5381887073,1560278.2645750623,1561869.7646903102,1563823.4681983034,1566077.600548888,1567713.5933561036,1568878.5678197504,1571741.1900029853,1573119.3621078974,1575154.037279871,1576655.693520369,1577508.6874318635,1580381.6431073446,1580888.246911283,1582180.404405809,1584104.5306066924,1586459.830691733,1588944.8562565132,1589294.7779747166,1591761.181299293,1594127.8441800005,1594723.075804156,1595941.0876660529,1598743.032017021,1600052.3085672567,1602130.5140036664,1603160.448551263,1605391.4347771262,1606357.8827715756,1608984.7150133827,1609658.4193168052,1611383.3411547823,1614230.5840788311,1615518.8250063537,1617373.4580516673,1619451.9133844264,1620330.470071963,1622620.3506487214,1623627.9622716564,1625973.8302216772,1627925.183088148,1629977.14890329,1630315.0801334048,1632266.9987344302,1633807.6326385231,1635994.5884920023,1637097.562115273,1639095.9968204962,1641120.4850029612,1642958.2486156297,1644007.6293166918,1646434.8101248313,1647705.1492663622,1649843.571666941,1651207.1665400735,1653055.2888762592,1655623.5936286596,1657217.562304165,1659287.5056236945,1659547.2401467676,1662547.5944891237,1662829.9260395288,1665137.6459647564,1667304.1829935934,1669539.9166961315,1671215.9663918966,1672716.9670338668,1674295.5327081026,1675497.4418126023,1676875.110525207,1678345.3186367834,1680647.3440738106,1681871.4062381294,1684623.1082505314,1686609.8328689183,1686837.7311058657,1689440.6801734695,1690702.7516588946,1693311.8829391778,1694207.6942260794,1696626.413936077,1697853.3866700125,1699359.321125049,1701965.324888641,1703140.3960478113,1705355.539667997,1706804.4607535051,1708993.219345911,1709395.1137757318,1712451.6581598732,1714041.2231600126,1715927.4232588338]}]} );</script></div>\"\n      ]\n     },\n     \"execution_count\": 9,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"(def raw-data (map #(+ (* 22 (+ % (Math/random)) 78)) (range)))\\n\",\n    \"(def data-1 (take 500 raw-data))\\n\",\n    \"(def data-2 (take 500 (drop 500 raw-data)))\\n\",\n    \"\\n\",\n    \"(plot-highchart {:chart {:type \\\"line\\\"}\\n\",\n    \"                 :title {:text \\\"Plot of random data\\\"}\\n\",\n    \"                 :series [{:data data-1} {:data data-2}]})\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Clojure\",\n   \"language\": \"clojure\",\n   \"name\": \"clojure\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".clj\",\n   \"mimetype\": \"text/x-clojure\",\n   \"name\": \"clojure\",\n   \"version\": \"1.8.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_coconut/coconut_homepage_demo.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Taken from [coconut-lang.org](coconut-lang.org)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"pipeline-style programming\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"hello, world!\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"\\\"hello, world!\\\" |> print\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \" prettier lambdas\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<function __main__.<lambda>(x)>\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"x -> x ** 2\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"partial application\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]\"\n      ]\n     },\n     \"execution_count\": 5,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"range(10) |> map$(pow$(?, 2)) |> list\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"pattern-matching\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0 [1, 2, 3]\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"match [head] + tail in [0, 1, 2, 3]:\\n\",\n    \"    print(head, tail)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"destructuring assignment\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"{\\\"list\\\": [0] + rest} = {\\\"list\\\": [0, 1, 2, 3]}\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"infix notation\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 20,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# 5 `mod` 3 == 2\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"operator functions\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 14,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"product = reduce$(*)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"function composition\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 21,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# (f..g..h)(x, y, z)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"lazy lists\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# (| first_elem() |) :: rest_elems()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"parallel programming\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 17,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"[1.0,\\n\",\n       \" 2.0,\\n\",\n       \" 4.0,\\n\",\n       \" 8.0,\\n\",\n       \" 16.0,\\n\",\n       \" 32.0,\\n\",\n       \" 64.0,\\n\",\n       \" 128.0,\\n\",\n       \" 256.0,\\n\",\n       \" 512.0,\\n\",\n       \" 1024.0,\\n\",\n       \" 2048.0,\\n\",\n       \" 4096.0,\\n\",\n       \" 8192.0,\\n\",\n       \" 16384.0,\\n\",\n       \" 32768.0,\\n\",\n       \" 65536.0,\\n\",\n       \" 131072.0,\\n\",\n       \" 262144.0,\\n\",\n       \" 524288.0,\\n\",\n       \" 1048576.0,\\n\",\n       \" 2097152.0,\\n\",\n       \" 4194304.0,\\n\",\n       \" 8388608.0,\\n\",\n       \" 16777216.0,\\n\",\n       \" 33554432.0,\\n\",\n       \" 67108864.0,\\n\",\n       \" 134217728.0,\\n\",\n       \" 268435456.0,\\n\",\n       \" 536870912.0,\\n\",\n       \" 1073741824.0,\\n\",\n       \" 2147483648.0,\\n\",\n       \" 4294967296.0,\\n\",\n       \" 8589934592.0,\\n\",\n       \" 17179869184.0,\\n\",\n       \" 34359738368.0,\\n\",\n       \" 68719476736.0,\\n\",\n       \" 137438953472.0,\\n\",\n       \" 274877906944.0,\\n\",\n       \" 549755813888.0,\\n\",\n       \" 1099511627776.0,\\n\",\n       \" 2199023255552.0,\\n\",\n       \" 4398046511104.0,\\n\",\n       \" 8796093022208.0,\\n\",\n       \" 17592186044416.0,\\n\",\n       \" 35184372088832.0,\\n\",\n       \" 70368744177664.0,\\n\",\n       \" 140737488355328.0,\\n\",\n       \" 281474976710656.0,\\n\",\n       \" 562949953421312.0,\\n\",\n       \" 1125899906842624.0,\\n\",\n       \" 2251799813685248.0,\\n\",\n       \" 4503599627370496.0,\\n\",\n       \" 9007199254740992.0,\\n\",\n       \" 1.8014398509481984e+16,\\n\",\n       \" 3.602879701896397e+16,\\n\",\n       \" 7.205759403792794e+16,\\n\",\n       \" 1.4411518807585587e+17,\\n\",\n       \" 2.8823037615171174e+17,\\n\",\n       \" 5.764607523034235e+17,\\n\",\n       \" 1.152921504606847e+18,\\n\",\n       \" 2.305843009213694e+18,\\n\",\n       \" 4.611686018427388e+18,\\n\",\n       \" 9.223372036854776e+18,\\n\",\n       \" 1.8446744073709552e+19,\\n\",\n       \" 3.6893488147419103e+19,\\n\",\n       \" 7.378697629483821e+19,\\n\",\n       \" 1.4757395258967641e+20,\\n\",\n       \" 2.9514790517935283e+20,\\n\",\n       \" 5.902958103587057e+20,\\n\",\n       \" 1.1805916207174113e+21,\\n\",\n       \" 2.3611832414348226e+21,\\n\",\n       \" 4.722366482869645e+21,\\n\",\n       \" 9.44473296573929e+21,\\n\",\n       \" 1.888946593147858e+22,\\n\",\n       \" 3.777893186295716e+22,\\n\",\n       \" 7.555786372591432e+22,\\n\",\n       \" 1.5111572745182865e+23,\\n\",\n       \" 3.022314549036573e+23,\\n\",\n       \" 6.044629098073146e+23,\\n\",\n       \" 1.2089258196146292e+24,\\n\",\n       \" 2.4178516392292583e+24,\\n\",\n       \" 4.835703278458517e+24,\\n\",\n       \" 9.671406556917033e+24,\\n\",\n       \" 1.9342813113834067e+25,\\n\",\n       \" 3.8685626227668134e+25,\\n\",\n       \" 7.737125245533627e+25,\\n\",\n       \" 1.5474250491067253e+26,\\n\",\n       \" 3.094850098213451e+26,\\n\",\n       \" 6.189700196426902e+26,\\n\",\n       \" 1.2379400392853803e+27,\\n\",\n       \" 2.4758800785707605e+27,\\n\",\n       \" 4.951760157141521e+27,\\n\",\n       \" 9.903520314283042e+27,\\n\",\n       \" 1.9807040628566084e+28,\\n\",\n       \" 3.961408125713217e+28,\\n\",\n       \" 7.922816251426434e+28,\\n\",\n       \" 1.5845632502852868e+29,\\n\",\n       \" 3.1691265005705735e+29,\\n\",\n       \" 6.338253001141147e+29]\"\n      ]\n     },\n     \"execution_count\": 17,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"range(100) |> parallel_map$(pow$(2)) |> list\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"tail call optimization\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 18,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def factorial(n, acc=1):\\n\",\n    \"    case n:\\n\",\n    \"        match 0:\\n\",\n    \"            return acc\\n\",\n    \"        match _ is int if n > 0:\\n\",\n    \"            return factorial(n-1, acc*n)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"algebraic data types\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 19,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"data Empty()\\n\",\n    \"data Leaf(n)\\n\",\n    \"data Node(l, r)\\n\",\n    \"\\n\",\n    \"def size(Empty()) = 0\\n\",\n    \"\\n\",\n    \"addpattern def size(Leaf(n)) = 1\\n\",\n    \"\\n\",\n    \"addpattern def size(Node(l, r)) = size(l) + size(r)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"and much more!\\n\",\n    \"\\n\",\n    \"Like what you see? Don't forget to star Coconut on GitHub!\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Coconut\",\n   \"language\": \"coconut\",\n   \"name\": \"coconut\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"python\",\n    \"version\": 3\n   },\n   \"file_extension\": \".coco\",\n   \"mimetype\": \"text/x-python3\",\n   \"name\": \"coconut\",\n   \"pygments_lexer\": \"coconut\",\n   \"version\": \"1.4.3-post_dev25\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_cpp/root_cpp.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"f0c19410-7bd1-4b72-9cb3-f042245a06da\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <iostream>\\n\",\n    \"#include <string>\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"a56bd112-a6f7-439e-be2c-0c8f35f3e3e0\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"int k = 4;\\n\",\n    \"std::string foo = \\\"This string says \\\\\\\"foo\\\\\\\"\\\";\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"id\": \"1b206654-b4d6-4865-b114-f43e32b3071b\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"k = 4\\n\",\n      \"This string says \\\"foo\\\"\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"std::cout << \\\"k = \\\" << k << '\\\\n' << foo << '\\\\n';\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"ROOT C++\",\n   \"language\": \"c++\",\n   \"name\": \"root\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"text/x-c++src\",\n   \"file_extension\": \".C\",\n   \"mimetype\": \" text/x-c++src\",\n   \"name\": \"c++\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_cpp/xcpp_by_quantstack.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"[![xeus-cling](images/xeus-cling.png)](https://github.com/QuantStack/xeus-cling/)\\n\",\n    \"\\n\",\n    \"A Jupyter kernel for C++ based on the `cling` C++ interpreter and the `xeus` native implementation of the Jupyter protocol, xeus.\\n\",\n    \"\\n\",\n    \"- GitHub repository: https://github.com/QuantStack/xeus-cling/\\n\",\n    \"- Online documentation: https://xeus-cling.readthedocs.io/\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Usage\\n\",\n    \"\\n\",\n    \"<div style=\\\"background: #efffed;\\n\",\n    \"            border: 1px solid grey;\\n\",\n    \"            margin: 8px 0 8px 0;\\n\",\n    \"            text-align: center;\\n\",\n    \"            padding: 8px; \\\">\\n\",\n    \"    <i class=\\\"fa-play fa\\\" \\n\",\n    \"       style=\\\"font-size: 40px;\\n\",\n    \"              line-height: 40px;\\n\",\n    \"              margin: 8px;\\n\",\n    \"              color: #444;\\\">\\n\",\n    \"    </i>\\n\",\n    \"    <div>\\n\",\n    \"    To run the selected code cell, hit <pre style=\\\"background: #efffed\\\">Shift + Enter</pre>\\n\",\n    \"    </div>\\n\",\n    \"</div>\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Output and error streams\\n\",\n    \"\\n\",\n    \"`std::cout` and `std::cerr` are redirected to the notebook frontend.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <iostream>\\n\",\n    \"\\n\",\n    \"std::cout << \\\"some output\\\" << std::endl;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"std::cerr << \\\"some error\\\" << std::endl;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <stdexcept>\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"throw std::runtime_error(\\\"Unknown exception\\\");\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Omitting the `;` in the last statement of a cell results in an output being printed\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"int j = 5;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"j\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Interpreting the C++ programming language\\n\",\n    \"\\n\",\n    \"`cling` has a broad support of the features of C++. You can define functions, classes, templates, etc ...\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Functions\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"double sqr(double a)\\n\",\n    \"{\\n\",\n    \"    return a * a;\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"double a = 2.5;\\n\",\n    \"double asqr = sqr(a);\\n\",\n    \"asqr\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Classes\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"class Foo\\n\",\n    \"{\\n\",\n    \"public:\\n\",\n    \"\\n\",\n    \"    virtual ~Foo() {}\\n\",\n    \"    \\n\",\n    \"    virtual void print(double value) const\\n\",\n    \"    {\\n\",\n    \"        std::cout << \\\"Foo value = \\\" << value << std::endl;\\n\",\n    \"    }\\n\",\n    \"};\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"Foo bar;\\n\",\n    \"bar.print(1.2);\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Polymorphism\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"class Bar : public Foo\\n\",\n    \"{\\n\",\n    \"public:\\n\",\n    \"\\n\",\n    \"    virtual ~Bar() {}\\n\",\n    \"    \\n\",\n    \"    virtual void print(double value) const\\n\",\n    \"    {\\n\",\n    \"        std::cout << \\\"Bar value = \\\" << 2 * value << std::endl;\\n\",\n    \"    }\\n\",\n    \"};\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"Foo* bar2 = new Bar;\\n\",\n    \"bar2->print(1.2);\\n\",\n    \"delete bar2;\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Templates\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <typeinfo>\\n\",\n    \"\\n\",\n    \"template <class T>\\n\",\n    \"class FooT\\n\",\n    \"{\\n\",\n    \"public:\\n\",\n    \"    \\n\",\n    \"    explicit FooT(const T& t) : m_t(t) {}\\n\",\n    \"    \\n\",\n    \"    void print() const\\n\",\n    \"    {\\n\",\n    \"        std::cout << typeid(T).name() << \\\" m_t = \\\" << m_t << std::endl;\\n\",\n    \"    }\\n\",\n    \"    \\n\",\n    \"private:\\n\",\n    \"    \\n\",\n    \"    T m_t;\\n\",\n    \"};\\n\",\n    \"\\n\",\n    \"template <>\\n\",\n    \"class FooT<int>\\n\",\n    \"{\\n\",\n    \"public:\\n\",\n    \"    \\n\",\n    \"    explicit FooT(const int& t) : m_t(t) {}\\n\",\n    \"    \\n\",\n    \"    void print() const\\n\",\n    \"    {\\n\",\n    \"        std::cout << \\\"m_t = \\\" << m_t << std::endl;\\n\",\n    \"    }\\n\",\n    \"    \\n\",\n    \"private:\\n\",\n    \"    \\n\",\n    \"    int m_t;\\n\",\n    \"};\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"FooT<double> foot1(1.2);\\n\",\n    \"foot1.print();\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"FooT<int> foot2(4);\\n\",\n    \"foot2.print();\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## C++11 / C++14 support\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"class Foo11\\n\",\n    \"{\\n\",\n    \"public:\\n\",\n    \"    \\n\",\n    \"    Foo11() { std::cout << \\\"Foo11 default constructor\\\" << std::endl; }\\n\",\n    \"    Foo11(const Foo11&) { std::cout << \\\"Foo11 copy constructor\\\" << std::endl; }\\n\",\n    \"    Foo11(Foo11&&) { std::cout << \\\"Foo11 move constructor\\\" << std::endl; }\\n\",\n    \"};\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"Foo11 f1;\\n\",\n    \"Foo11 f2(f1);\\n\",\n    \"Foo11 f3(std::move(f1));\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <vector>\\n\",\n    \"\\n\",\n    \"std::vector<int> v = { 1, 2, 3};\\n\",\n    \"auto iter = ++v.begin();\\n\",\n    \"v\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"*iter\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"... and also lambda, universal references, `decltype`, etc ...\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Documentation and completion\\n\",\n    \"\\n\",\n    \" - Documentation for types of the standard library is retrieved on cppreference.com.\\n\",\n    \" - The quick-help feature can also be enabled for user-defined types and third-party libraries. More documentation on this feature is available at https://xeus-cling.readthedocs.io/en/latest/inline_help.html.\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"?std::vector\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Using the `display_data` mechanism\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"For a user-defined type `T`, the rich rendering in the notebook and JupyterLab can be enabled by by implementing the function `xeus::xjson mime_bundle_repr(const T& im)`, which returns the JSON mime bundle for that type.\\n\",\n    \"\\n\",\n    \"More documentation on the rich display system of Jupyter and Xeus-cling is available at https://xeus-cling.readthedocs.io/en/latest/rich_display.html\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Image example\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <string>\\n\",\n    \"#include <fstream>\\n\",\n    \"\\n\",\n    \"#include \\\"xtl/xbase64.hpp\\\"\\n\",\n    \"#include \\\"xeus/xjson.hpp\\\"\\n\",\n    \"\\n\",\n    \"namespace im\\n\",\n    \"{\\n\",\n    \"    struct image\\n\",\n    \"    {   \\n\",\n    \"        inline image(const std::string& filename)\\n\",\n    \"        {\\n\",\n    \"            std::ifstream fin(filename, std::ios::binary);   \\n\",\n    \"            m_buffer << fin.rdbuf();\\n\",\n    \"        }\\n\",\n    \"        \\n\",\n    \"        std::stringstream m_buffer;\\n\",\n    \"    };\\n\",\n    \"    \\n\",\n    \"    xeus::xjson mime_bundle_repr(const image& i)\\n\",\n    \"    {\\n\",\n    \"        auto bundle = xeus::xjson::object();\\n\",\n    \"        bundle[\\\"image/png\\\"] = xtl::base64encode(i.m_buffer.str());\\n\",\n    \"        return bundle;\\n\",\n    \"    }\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"im::image marie(\\\"images/marie.png\\\");\\n\",\n    \"marie\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Audio example\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <string>\\n\",\n    \"#include <fstream>\\n\",\n    \"\\n\",\n    \"#include \\\"xtl/xbase64.hpp\\\"\\n\",\n    \"#include \\\"xeus/xjson.hpp\\\"\\n\",\n    \"\\n\",\n    \"namespace au\\n\",\n    \"{\\n\",\n    \"    struct audio\\n\",\n    \"    {   \\n\",\n    \"        inline audio(const std::string& filename)\\n\",\n    \"        {\\n\",\n    \"            std::ifstream fin(filename, std::ios::binary);   \\n\",\n    \"            m_buffer << fin.rdbuf();\\n\",\n    \"        }\\n\",\n    \"        \\n\",\n    \"        std::stringstream m_buffer;\\n\",\n    \"    };\\n\",\n    \"    \\n\",\n    \"    xeus::xjson mime_bundle_repr(const audio& a)\\n\",\n    \"    {\\n\",\n    \"        auto bundle = xeus::xjson::object();\\n\",\n    \"        bundle[\\\"text/html\\\"] =\\n\",\n    \"           std::string(\\\"<audio controls=\\\\\\\"controls\\\\\\\"><source src=\\\\\\\"data:audio/wav;base64,\\\")\\n\",\n    \"           + xtl::base64encode(a.m_buffer.str()) +\\n\",\n    \"            \\\"\\\\\\\" type=\\\\\\\"audio/wav\\\\\\\" /></audio>\\\";\\n\",\n    \"        return bundle;\\n\",\n    \"    }\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"au::audio drums(\\\"audio/audio.wav\\\");\\n\",\n    \"drums\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Display\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include \\\"xcpp/xdisplay.hpp\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"xcpp::display(drums);\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Update-display\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <string>\\n\",\n    \"#include \\\"xcpp/xdisplay.hpp\\\"\\n\",\n    \"\\n\",\n    \"namespace ht\\n\",\n    \"{\\n\",\n    \"    struct html\\n\",\n    \"    {   \\n\",\n    \"        inline html(const std::string& content)\\n\",\n    \"        {\\n\",\n    \"            m_content = content;\\n\",\n    \"        }\\n\",\n    \"        std::string m_content;\\n\",\n    \"    };\\n\",\n    \"\\n\",\n    \"    xeus::xjson mime_bundle_repr(const html& a)\\n\",\n    \"    {\\n\",\n    \"        auto bundle = xeus::xjson::object();\\n\",\n    \"        bundle[\\\"text/html\\\"] = a.m_content;\\n\",\n    \"        return bundle;\\n\",\n    \"    }\\n\",\n    \"}\\n\",\n    \"\\n\",\n    \"// A red rectangle\\n\",\n    \"ht::html rect(R\\\"(\\n\",\n    \"<div style='\\n\",\n    \"    width: 90px;\\n\",\n    \"    height: 50px;\\n\",\n    \"    line-height: 50px;\\n\",\n    \"    background-color: blue;\\n\",\n    \"    color: white;\\n\",\n    \"    text-align: center;'>\\n\",\n    \"Original\\n\",\n    \"</div>)\\\");\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"xcpp::display(rect, \\\"some_display_id\\\");\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"// Update the rectangle to be blue\\n\",\n    \"rect.m_content = R\\\"(\\n\",\n    \"<div style='\\n\",\n    \"    width: 90px;\\n\",\n    \"    height: 50px;\\n\",\n    \"    line-height: 50px;\\n\",\n    \"    background-color: red;\\n\",\n    \"    color: white;\\n\",\n    \"    text-align: center;'>\\n\",\n    \"Updated\\n\",\n    \"</div>)\\\";\\n\",\n    \"\\n\",\n    \"xcpp::display(rect, \\\"some_display_id\\\", true);\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Magics\\n\",\n    \"\\n\",\n    \"Magics are special commands for the kernel that are not part of the C++ language.\\n\",\n    \"\\n\",\n    \"They are defined with the symbol `%` for a line magic and `%%` for a cell magic.\\n\",\n    \"\\n\",\n    \"More documentation for magics is available at https://xeus-cling.readthedocs.io/en/latest/magics.html.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <algorithm>\\n\",\n    \"#include <vector>\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"std::vector<double> to_shuffle = {1, 2, 3, 4};\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%timeit std::random_shuffle(to_shuffle.begin(), to_shuffle.end());\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"[![xtensor](images/xtensor.png)](https://github.com/QuantStack/xtensor/)\\n\",\n    \"\\n\",\n    \"- GitHub repository: https://github.com/QuantStack/xtensor/\\n\",\n    \"- Online documentation: https://xtensor.readthedocs.io/\\n\",\n    \"- NumPy to xtensor cheat sheet: http://xtensor.readthedocs.io/en/latest/numpy.html\\n\",\n    \"\\n\",\n    \"`xtensor` is a C++ library for manipulating N-D arrays with an API very similar to that of numpy.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <iostream>\\n\",\n    \"\\n\",\n    \"#include \\\"xtensor/xarray.hpp\\\"\\n\",\n    \"#include \\\"xtensor/xio.hpp\\\"\\n\",\n    \"#include \\\"xtensor/xview.hpp\\\"\\n\",\n    \"\\n\",\n    \"xt::xarray<double> arr1\\n\",\n    \"  {{1.0, 2.0, 3.0},\\n\",\n    \"   {2.0, 5.0, 7.0},\\n\",\n    \"   {2.0, 5.0, 7.0}};\\n\",\n    \"\\n\",\n    \"xt::xarray<double> arr2\\n\",\n    \"  {5.0, 6.0, 7.0};\\n\",\n    \"\\n\",\n    \"xt::view(arr1, 1) + arr2\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Together with the C++ Jupyter kernel, `xtensor` offers a similar experience as `NumPy` in the Python Jupyter kernel, including broadcasting and universal functions.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include <iostream>\\n\",\n    \"#include \\\"xtensor/xarray.hpp\\\"\\n\",\n    \"#include \\\"xtensor/xio.hpp\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"xt::xarray<int> arr\\n\",\n    \"  {1, 2, 3, 4, 5, 6, 7, 8, 9};\\n\",\n    \"\\n\",\n    \"arr.reshape({3, 3});\\n\",\n    \"\\n\",\n    \"std::cout << arr;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#include \\\"xtensor-blas/xlinalg.hpp\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"xt::xtensor<double, 2> m = {{1.5, 0.5}, {0.7, 1.0}};\\n\",\n    \"std::cout << \\\"Matrix rank: \\\" << std::endl << xt::linalg::matrix_rank(m) << std::endl;\\n\",\n    \"std::cout << \\\"Matrix inverse: \\\" << std::endl << xt::linalg::inv(m) << std::endl;\\n\",\n    \"std::cout << \\\"Eigen values: \\\" << std::endl << xt::linalg::eigvals(m) << std::endl;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"xt::xarray<double> arg1 = xt::arange<double>(9);\\n\",\n    \"xt::xarray<double> arg2 = xt::arange<double>(18);\\n\",\n    \"\\n\",\n    \"arg1.reshape({3, 3});\\n\",\n    \"arg2.reshape({2, 3, 3});\\n\",\n    \"\\n\",\n    \"std::cout << xt::linalg::dot(arg1, arg2) << std::endl;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"C++14\",\n   \"language\": \"C++14\",\n   \"name\": \"xeus-cling-cpp14\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"text/x-c++src\",\n   \"file_extension\": \".cpp\",\n   \"mimetype\": \"text/x-c++src\",\n   \"name\": \"c++\",\n   \"version\": \"-std=c++14\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_cs/csharp.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We start with...\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Hello World!\\r\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"Console.WriteLine(\\\"Hello World!\\\");\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Then we do a plot with Plotly, following the [Plotting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Plotting%20with%20Xplot.ipynb) example from `dotnet/interactive`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"9a70b50f-ec94-4c20-8fa8-e14290eb0440\\\" style=\\\"width: 900px; height: 500px;\\\"></div>\\r\\n\",\n       \"<script type=\\\"text/javascript\\\">\\r\\n\",\n       \"\\r\\n\",\n       \"var renderPlotly = function() {\\r\\n\",\n       \"    var xplotRequire = requirejs.config({context:'xplot-3.0.1',paths:{plotly:'https://cdn.plot.ly/plotly-1.49.2.min'}});\\r\\n\",\n       \"    xplotRequire(['plotly'], function(Plotly) {\\r\\n\",\n       \"\\n\",\n       \"            var data = [{\\\"type\\\":\\\"bar\\\",\\\"x\\\":[\\\"A\\\",\\\"B\\\",\\\"C\\\"],\\\"y\\\":[1,3,2],\\\"name\\\":\\\"Bar\\\"}];\\n\",\n       \"            var layout = {\\\"title\\\":\\\"A bar plot\\\"};\\n\",\n       \"            Plotly.newPlot('9a70b50f-ec94-4c20-8fa8-e14290eb0440', data, layout);\\n\",\n       \"        \\r\\n\",\n       \"});\\r\\n\",\n       \"};\\r\\n\",\n       \"if ((typeof(requirejs) !==  typeof(Function)) || (typeof(requirejs.config) !== typeof(Function))) { \\r\\n\",\n       \"    var script = document.createElement(\\\"script\\\"); \\r\\n\",\n       \"    script.setAttribute(\\\"src\\\", \\\"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\\\"); \\r\\n\",\n       \"    script.onload = function(){\\r\\n\",\n       \"        renderPlotly();\\r\\n\",\n       \"    };\\r\\n\",\n       \"    document.getElementsByTagName(\\\"head\\\")[0].appendChild(script); \\r\\n\",\n       \"}\\r\\n\",\n       \"else {\\r\\n\",\n       \"    renderPlotly();\\r\\n\",\n       \"}\\r\\n\",\n       \"</script>\\r\\n\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"using XPlot.Plotly;\\n\",\n    \"\\n\",\n    \"var bar = new Graph.Bar\\n\",\n    \"{\\n\",\n    \"    name = \\\"Bar\\\",\\n\",\n    \"    x = new[] {'A', 'B', 'C'},\\n\",\n    \"    y = new[] {1, 3, 2}\\n\",\n    \"};\\n\",\n    \"\\n\",\n    \"var chart = Chart.Plot(new[] {bar});\\n\",\n    \"chart.WithTitle(\\\"A bar plot\\\");\\n\",\n    \"display(chart);\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We also test the math outputs as in the [Math and Latex](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Math%20and%20LaTeX.ipynb) example:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/latex\": [\n       \"\\\\begin{align} e^{i \\\\pi} = -1\\\\end{align}\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"(LaTeXString)@\\\"\\\\begin{align} e^{i \\\\pi} = -1\\\\end{align}\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/latex\": [\n       \"$$e^{i \\\\pi} = -1$$\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"(MathString)@\\\"e^{i \\\\pi} = -1\\\"\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \".NET (C#)\",\n   \"language\": \"C#\",\n   \"name\": \".net-csharp\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".cs\",\n   \"mimetype\": \"text/x-csharp\",\n   \"name\": \"C#\",\n   \"pygments_lexer\": \"csharp\",\n   \"version\": \"8.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 1\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_fs/fsharp.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This notebook was inspired by [Plottting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/fsharp/Docs/Plotting%20with%20Xplot.ipynb).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"open XPlot.Plotly\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div id=\\\"401733f6-77ba-44c5-bb00-14b2beb80964\\\" style=\\\"width: 900px; height: 500px;\\\"></div>\\r\\n\",\n       \"<script type=\\\"text/javascript\\\">\\r\\n\",\n       \"\\r\\n\",\n       \"var renderPlotly = function() {\\r\\n\",\n       \"    var xplotRequire = requirejs.config({context:'xplot-3.0.1',paths:{plotly:'https://cdn.plot.ly/plotly-1.49.2.min'}});\\r\\n\",\n       \"    xplotRequire(['plotly'], function(Plotly) {\\r\\n\",\n       \"\\n\",\n       \"            var data = [{\\\"type\\\":\\\"bar\\\",\\\"x\\\":[\\\"A\\\",\\\"B\\\",\\\"C\\\"],\\\"y\\\":[1,3,2],\\\"name\\\":\\\"Bar 1\\\"}];\\n\",\n       \"            var layout = {\\\"title\\\":\\\"A sample bar plot\\\"};\\n\",\n       \"            Plotly.newPlot('401733f6-77ba-44c5-bb00-14b2beb80964', data, layout);\\n\",\n       \"        \\r\\n\",\n       \"});\\r\\n\",\n       \"};\\r\\n\",\n       \"if ((typeof(requirejs) !==  typeof(Function)) || (typeof(requirejs.config) !== typeof(Function))) { \\r\\n\",\n       \"    var script = document.createElement(\\\"script\\\"); \\r\\n\",\n       \"    script.setAttribute(\\\"src\\\", \\\"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\\\"); \\r\\n\",\n       \"    script.onload = function(){\\r\\n\",\n       \"        renderPlotly();\\r\\n\",\n       \"    };\\r\\n\",\n       \"    document.getElementsByTagName(\\\"head\\\")[0].appendChild(script); \\r\\n\",\n       \"}\\r\\n\",\n       \"else {\\r\\n\",\n       \"    renderPlotly();\\r\\n\",\n       \"}\\r\\n\",\n       \"</script>\\r\\n\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"let bar =\\n\",\n    \"    Bar(\\n\",\n    \"        name = \\\"Bar 1\\\",\\n\",\n    \"        x = [\\\"A\\\"; \\\"B\\\"; \\\"C\\\"],\\n\",\n    \"        y = [1; 3; 2])\\n\",\n    \"\\n\",\n    \"[bar]\\n\",\n    \"|> Chart.Plot\\n\",\n    \"|> Chart.WithTitle \\\"A sample bar plot\\\"\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \".NET (F#)\",\n   \"language\": \"F#\",\n   \"name\": \".net-fsharp\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".fs\",\n   \"mimetype\": \"text/x-fsharp\",\n   \"name\": \"C#\",\n   \"pygments_lexer\": \"fsharp\",\n   \"version\": \"4.5\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_gnuplot/gnuplot_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"17cc3dd3-6209-4c98-baa8-96b1456e0573\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Sample gnuplot notebook\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"7cbebe18-95f7-4523-ae2e-c5b24f904566\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Simple plotting\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"0ba4a2e5-3c3f-47d5-9107-0b9325553659\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\\n\",\n      \"text/plain\": [\n       \"<IPython.core.display.Image object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# Plot sin and cos with different linetypes\\n\",\n    \"\\n\",\n    \"f(x) = sin(x)\\n\",\n    \"g(x) = cos(x)\\n\",\n    \"set xrange[0:2*pi]\\n\",\n    \"set xtics(0, \\\"{/Symbol p}\\\" pi , \\\"2{/Symbol p}\\\" 2*pi)\\n\",\n    \"set ytics 1\\n\",\n    \"plot f(x) linewidth 2 title \\\"sin(x)\\\", \\\\\\n\",\n    \"    g(x) linewidth 2 dashtype \\\"--\\\" title \\\"cos(x)\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"8475a8c3-6687-4259-a60c-bb0e7207caea\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Example of line magic\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"0f857ce4-115b-4b0e-82c8-2e6d70393c7a\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\\n\",\n      \"text/plain\": [\n       \"<IPython.core.display.Image object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"\\n\",\n       \"\\tdummy variable is t for curves, u/v for surfaces\\n\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"%gnuplot inline pngcairo enhanced background rgb \\\"#EEEEEE\\\" size 600, 600\\n\",\n    \"# Parametric plot without border\\n\",\n    \"\\n\",\n    \"reset\\n\",\n    \"set parametric\\n\",\n    \"set size ratio -1\\n\",\n    \"unset border\\n\",\n    \"unset tics\\n\",\n    \"plot f(t), g(t) linewidth 2 notitle\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"gnuplot\",\n   \"language\": \"gnuplot\",\n   \"name\": \"gnuplot\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"Octave\",\n   \"file_extension\": \".gp\",\n   \"help_links\": [\n    {\n     \"text\": \"MetaKernel Magics\",\n     \"url\": \"https://metakernel.readthedocs.io/en/latest/source/README.html\"\n    }\n   ],\n   \"mimetype\": \"text/x-gnuplot\",\n   \"name\": \"gnuplot\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_go/hello_world_gonb.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"8795db3a-af9a-4f03-a68d-019330861b54\",\n   \"metadata\": {},\n   \"source\": [\n    \"A notebook that use [GoNB](https://github.com/janpfeifer/gonb)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"50a2fb21-01b3-46d0-9951-f9a1301a85ca\",\n   \"metadata\": {},\n   \"source\": [\n    \"the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"75d8418d-a918-4cc8-b42e-384db01f21ae\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"func main() {\\n\",\n    \"    fmt.Printf(\\\"Hello World!\\\")\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"3620f46f-efd5-4454-bc29-418297012ce9\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%\\n\",\n    \"fmt.Printf(\\\"Hello World!\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"7fed4a43\",\n   \"metadata\": {},\n   \"source\": [\n    \"%% --who=world can pass flags to main func\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"473e2d02\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import (\\n\",\n    \"    \\\"flag\\\"\\n\",\n    \"    \\\"fmt\\\"\\n\",\n    \")\\n\",\n    \"\\n\",\n    \"var flagWho = flag.String(\\\"who\\\", \\\"\\\", \\\"Your name!\\\")\\n\",\n    \"\\n\",\n    \"%% --who=world\\n\",\n    \"fmt.Printf(\\\"Hello %s!\\\\n\\\", *flagWho)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"b8e8b4ae\",\n   \"metadata\": {},\n   \"source\": [\n    \"%args also can pass flags\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"348efbe1\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%args --who=Wally\\n\",\n    \"\\n\",\n    \"func main() {\\n\",\n    \"    flag.Parse()\\n\",\n    \"    fmt.Printf(\\\"Where is %s?\\\", *flagWho)\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"82f4bb1f-3311-4fca-8025-c54c0305dc64\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import \\\"github.com/janpfeifer/gonb/gonbui\\\"\\n\",\n    \"\\n\",\n    \"%%\\n\",\n    \"gonbui.DisplayHtml(`<span style=\\\"background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;\\\">I 🧡 GoNB!</span>`)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1a5584ff-f346-45cf-95c1-a3e3b7146c6c\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%\\n\",\n    \"gonbui.DisplayMarkdown(\\\"#### Objective\\\\n\\\\n1. Have fun coding **Go**;\\\\n1. Profit...\\\\n\\\"+\\n\",\n    \"                       `$$f(x) = \\\\int_{-\\\\infty}^{\\\\infty} e^{-x^2} dx$$`)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"de996381-d92c-4ce6-a135-50cf39288aa1\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"func init_a() {\\n\",\n    \"    fmt.Println(\\\"init_a\\\")\\n\",\n    \"}\\n\",\n    \"%%\\n\",\n    \"fmt.Println(\\\"main\\\")\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Go (gonb)\",\n   \"language\": \"go\",\n   \"name\": \"gonb\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"\",\n   \"file_extension\": \".go\",\n   \"mimetype\": \"\",\n   \"name\": \"go\",\n   \"nbconvert_exporter\": \"\",\n   \"pygments_lexer\": \"\",\n   \"version\": \"go1.21.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_groovy/tailrecursive-factorial.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# TailRecursive annotation\\n\",\n    \"\\n\",\n    \"Let's check what is the effect of `@TailRecursive` annotation on the simple recursive definition of factorial function.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import groovy.transform.CompileStatic\\n\",\n    \"import groovy.transform.TailRecursive\\n\",\n    \"import groovy.transform.TypeChecked\\n\",\n    \"\\n\",\n    \"@CompileStatic\\n\",\n    \"@TypeChecked\\n\",\n    \"class X {\\n\",\n    \"    static final BigInteger factorial0(int n) {\\n\",\n    \"        (n <= 1) ? 1G : factorial0(n-1).multiply(BigInteger.valueOf(n))\\n\",\n    \"    }\\n\",\n    \"\\n\",\n    \"    static final BigInteger factorial1(int n, BigInteger acc = 1G) {\\n\",\n    \"        (n <= 1) ? acc : factorial1(n-1, acc.multiply(BigInteger.valueOf(n)))\\n\",\n    \"    }\\n\",\n    \"\\n\",\n    \"    @TailRecursive\\n\",\n    \"    static final BigInteger factorial2(int n, BigInteger acc = 1G) {\\n\",\n    \"        (n <= 1) ? acc : factorial2(n-1, acc.multiply(BigInteger.valueOf(n)))\\n\",\n    \"    }\\n\",\n    \"}\\n\",\n    \"\\n\",\n    \"x = new X()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Although we can time the execution of the calls, it is not very accurate; such micro benchmarks should be performed in more controlled environment, such us under [JMH](https://openjdk.java.net/projects/code-tools/jmh/).\\n\",\n    \"\\n\",\n    \"For example, see [blog posts of Szymon Stępniak](https://e.printstacktrace.blog/tail-recursive-methods-in-groovy/).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%timeit\\n\",\n    \"\\n\",\n    \"x.factorial0(19_000).toString().length()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%timeit\\n\",\n    \"\\n\",\n    \"x.factorial1(19_000).toString().length()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%timeit\\n\",\n    \"\\n\",\n    \"x.factorial2(19_000).toString().length()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"The real difference is the use of stack. Non-tail recursive calls exhaust the stack space at some point, whereas tail recursive calls don't add frames to the stack.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"factSize = { n, cl ->\\n\",\n    \"    println \\\"Factorial of ${n} has ${cl(n).toString().length()} digits\\\"\\n\",\n    \"}\\n\",\n    \"\\n\",\n    \"factSize 2_000, x.&factorial0\\n\",\n    \"factSize 2_000, x.&factorial1\\n\",\n    \"factSize 2_000, x.&factorial2\\n\",\n    \"\\n\",\n    \"factSize 100_000, x.&factorial2\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"try {\\n\",\n    \"    factSize 100_000, x.&factorial1\\n\",\n    \"} catch (Throwable e) {\\n\",\n    \"    assert e instanceof StackOverflowError\\n\",\n    \"    println e\\n\",\n    \"}\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"encoding\": \"// -*- coding: utf-8 -*-\",\n   \"formats\": \"ipynb,groovy:light\"\n  },\n  \"kernelspec\": {\n   \"display_name\": \"Groovy\",\n   \"language\": \"groovy\",\n   \"name\": \"groovy\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"groovy\",\n   \"file_extension\": \".groovy\",\n   \"mimetype\": \"\",\n   \"name\": \"Groovy\",\n   \"nbconverter_exporter\": \"\",\n   \"version\": \"2.5.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_haskell/haskell_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"decb6522\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Example Haskell Notebook\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"9c783092\",\n   \"metadata\": {},\n   \"source\": [\n    \"Define a function to add two numbers.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"85e230d8\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f :: Num a => a -> a -> a\\n\",\n    \"f x y = x + y\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"1e2abdf2\",\n   \"metadata\": {},\n   \"source\": [\n    \"Try to use the function\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"812491a6\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"3\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"f 1 2 \"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Haskell\",\n   \"language\": \"haskell\",\n   \"name\": \"haskell\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"ihaskell\",\n   \"file_extension\": \".hs\",\n   \"mimetype\": \"text/x-haskell\",\n   \"name\": \"haskell\",\n   \"pygments_lexer\": \"Haskell\",\n   \"version\": \"8.10.7\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_idl/demo_gdl_fbp.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## GDL demo notebook\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Demonstration of GDL [(gnudatalanguage)](https://github.com/gnudatalanguage/gdl)\\n\",\n    \"\\n\",\n    \"This notebook creates a Shepp-Logan phantom, projects it and then performs an FBP reconstruction.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": []\n    }\n   ],\n   \"source\": [\n    \";; L.A. Shepp and B.F. Logan, “The Fourier reconstruction of a head section,”\\n\",\n    \";; IEEE Trans. Nucl. Sci. 21(3), 21–43 (1974).\\n\",\n    \"function shepplogan, size = size\\n\",\n    \"\\n\",\n    \"  if NOT keyword_set(size) then size = 256\\n\",\n    \"\\n\",\n    \"  phantom = fltarr(size,size)\\n\",\n    \"\\n\",\n    \"  tmp  = (findgen(size)-((size-1)/2.0)) / (size/2.0)\\n\",\n    \"  xcor = rebin(tmp,size,size)\\n\",\n    \"  ycor = rebin(transpose(tmp),size,size)\\n\",\n    \"  tmp  = fltarr(size,size)\\n\",\n    \"  \\n\",\n    \"  aa={cx: 0.0,  cy: 0.0,    maj:0.69,   min:0.92,  theta:  0.0, val: 2.0 }\\n\",\n    \"  bb={cx: 0.0,  cy:-0.0184, maj:0.6624, min:0.874, theta:  0.0, val:-0.98}\\n\",\n    \"  cc={cx: 0.22, cy: 0.0,    maj:0.11,   min:0.31,  theta:-18.0, val:-0.02}\\n\",\n    \"  dd={cx:-0.22, cy: 0.0,    maj:0.16,   min:0.41,  theta: 18.0, val:-0.02}\\n\",\n    \"  ee={cx: 0.0,  cy: 0.35,   maj:0.21,   min:0.25,  theta:  0.0, val:-0.01}\\n\",\n    \"  ff={cx: 0.0,  cy: 0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\\n\",\n    \"  gg={cx: 0.0,  cy:-0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\\n\",\n    \"  hh={cx:-0.08, cy:-0.605,  maj:0.046,  min:0.023, theta:  0.0, val:-0.01}\\n\",\n    \"  ii={cx: 0.0,  cy:-0.605,  maj:0.023,  min:0.023, theta:  0.0, val:-0.01}\\n\",\n    \"  jj={cx: 0.06, cy:-0.605,  maj:0.023,  min:0.046, theta:  0.0, val:-0.01}\\n\",\n    \"\\n\",\n    \"  list = [aa,bb,cc,dd,ee,ff,gg,hh,ii,jj]\\n\",\n    \"  for n = 0, n_elements(list)-1 do begin\\n\",\n    \"\\n\",\n    \"     tmp = ((xcor-list[n].cx) / list[n].maj)^2 $\\n\",\n    \"           + ((ycor-list[n].cy) / list[n].min)^2\\n\",\n    \"     \\n\",\n    \"     if list[n].theta NE 0 then begin\\n\",\n    \"        nx = (size-1) * (list[n].cx + 1) / 2\\n\",\n    \"        ny = (size-1) * (list[n].cy + 1) / 2\\n\",\n    \"        tmp = rot(tmp, -list[n].theta, 1, nx, ny, /interp, /pivot)\\n\",\n    \"     endif\\n\",\n    \"     \\n\",\n    \"     phantom[where(tmp LE 1.0)] += list[n].val\\n\",\n    \"     \\n\",\n    \"  endfor\\n\",\n    \"  \\n\",\n    \"  return, phantom < 1.1\\n\",\n    \"  \\n\",\n    \"end\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": []\n    }\n   ],\n   \"source\": [\n    \";; Enable inline plotting\\n\",\n    \"!inline=1\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\"\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": []\n    }\n   ],\n   \"source\": [\n    \"phantom = shepplogan()\\n\",\n    \"window, 0, xsize=256, ysize=256\\n\",\n    \"tvscl, phantom > 0.95\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now we define simple forward and backprojection functions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": []\n    }\n   ],\n   \"source\": [\n    \"function proj, image, angle\\n\",\n    \"\\n\",\n    \"    sino_size_x = max(size(image,/dim))\\n\",\n    \"    sino_size_y = n_elements(angle)\\n\",\n    \"\\n\",\n    \"    sino = fltarr(sino_size_x, sino_size_y)\\n\",\n    \"    \\n\",\n    \"    for aa=0, n_elements(angle)-1 do begin\\n\",\n    \"    \\n\",\n    \"        sino[*,aa] = total(rot(image, angle[aa], /interp), 2)\\n\",\n    \"    \\n\",\n    \"    endfor\\n\",\n    \"\\n\",\n    \"    return, sino\\n\",\n    \"    \\n\",\n    \"end\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": []\n    }\n   ],\n   \"source\": [\n    \"function back, sino, angle\\n\",\n    \"\\n\",\n    \"    image_size = n_elements(sino[*,0])\\n\",\n    \"    image = fltarr(image_size,image_size)\\n\",\n    \"\\n\",\n    \"    for aa=0, n_elements(angle)-1 do begin\\n\",\n    \"    \\n\",\n    \"        image += rot(rebin(sino[*,aa],[image_size,image_size]), -angle[aa], /interp)\\n\",\n    \"    \\n\",\n    \"    endfor\\n\",\n    \"\\n\",\n    \"    return, image / n_elements(angle)\\n\",\n    \"\\n\",\n    \"end\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This allows us to create a sinogram:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\"\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": []\n    }\n   ],\n   \"source\": [\n    \"angles = findgen(360)\\n\",\n    \"sino = proj(phantom, angles)\\n\",\n    \"window, 0, xsize=256, ysize=360\\n\",\n    \"tvscl, sino\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"On this we can apply a simple FBP reconstruction:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": []\n    }\n   ],\n   \"source\": [\n    \";; G.L. Zeng, “Revisit of the Ramp Filter,”\\n\",\n    \";; IEEE Trans. Nucl. Sci. 62(1), 131–136 (2015).\\n\",\n    \"function fbp, sino, angles\\n\",\n    \"  \\n\",\n    \"  ntot = n_elements(sino[*,0])\\n\",\n    \"  nang = n_elements(sino[0,*])\\n\",\n    \"  npos = ntot / 2 + 1           ; integer division needed !\\n\",\n    \"  nneg = ntot - npos\\n\",\n    \"\\n\",\n    \"  freq = findgen(ntot)\\n\",\n    \"  freq[npos:ntot-1] = REVERSE(freq[1:nneg])\\n\",\n    \"  freq[0] = 1\\n\",\n    \"\\n\",\n    \"  filter = -1 / (!pi * freq)^2\\n\",\n    \"  filter[where(freq mod 2 EQ 0)] *= -0.0\\n\",\n    \"  filter[0] = 0.25\\n\",\n    \"\\n\",\n    \"  filter = abs(fft(filter)) * ntot\\n\",\n    \"  filter[ntot/4:ntot/4+ntot/2-1] *= 0.0\\n\",\n    \"  filter = rebin(filter,ntot,nang)\\n\",\n    \"\\n\",\n    \"  ;; apply filter to the sinogram\\n\",\n    \"  fsino  = fft(sino,  dim=1)\\n\",\n    \"  fsino *= filter\\n\",\n    \"  fsino  = fft(fsino, dim=1, /overwrite, /inverse)\\n\",\n    \"  fsino  = !pi * real_part(fsino)\\n\",\n    \"\\n\",\n    \"  ;; backproject the filtered sinogram\\n\",\n    \"  return, back(fsino, angles)\\n\",\n    \"\\n\",\n    \"end\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAgAAAAEAEAIAAAAaYoVzAACAAElEQVR42u2dabBmVXX+xYGxG3qigQa6mxkC4hARUMuUUjJZIoY4JFAlStQoWprkS6qSlKYqH/IliaaMpDQOKSGKkYAapdUIiFqM4qxMCg3dTTN10zSDoML/wy9V+f3zZJ28Pdx+33vf9Xy6tc8+++yzz97vfdbaz1r7Gc9oNBqNRqPRaDQajUaj0Wg0Go1Go9FoNBqNRqPRaDQajUaj0Wg0Go1Go9FoNBqNRqPRaDQajUaj0Wg0Go1Go9FoNBqNRqPRaDQajUaj0Wg0Go1Go9FoNBqNRqPRaDQajUaj0Wg0Go1Go1Fjp3F3oNGYKfzoRz/60Y9+tO3tPPe5z33uc5877rdpNBqNRqPR2D5oA6Axy7C9aP1MoE2FRqPRmAQcd9xxxx133Mte9rKXvexlixYtWrRo0aOPPvroo4/++te//vWvf73rrrvuuuuu1PzlL3/5y1/+8tnPfvazn/3sPfbYY4899ti4cePGjRu/9a1vfetb37rhhhtuuOGGcb9No7H90QZAY0IxyUR/S9GGQaPRaGw7jj766KOPPvrUU0899dRTly1btmzZMmj9hg0bNmzYsNNOO+20005LlixZsmTJvvvuu+++++6555577rnnE0888cQTTzz88MMPP/zwM5/5zGc+85m777777rvvTpuPPfbYY4899tRTTz311FPU32WXXXbZZRfqr1+/fv369Q888MADDzzw9NNPP/3005gT8+bNmzdv3tq1a9euXbtq1apVq1b95Cc/+clPfjLuEWo0RkUbAI0xYy4R/S1FGwaNRqOReOlLX/rSl770xBNPPPHEE6HjO++888477wz5Xrhw4cKFC6Hyjz/++OOPP45f/ze/+c1vfvObzZs3b968GcMAEv/II4888sgjTz755JNPPomnPw0AWuAp8wX2BPj7Wc961rOe9Sxa2G233XbbbTfMBnYMMEJ4CibHNddcc80113znO9/5zne+M+4RbTT+J9oAaOxQTDPdHwVtEjQajenBySeffPLJJx966KGHHnoolBqKv3LlypUrV0LHodf44CH3jwh45SH0z3nOc57znOdgEnAVWg9xx2B4lkAffiNA6Pkboo+nn7796le/+tWvfoXBwG7DPAEjgf0HTBSMgTvvvPPOO+/EPKBvt99+++233/61r33ta1/72ri/QGN60QZAY8bRpH/r0MZAo9GYS3jhC1/4whe+EHX+8573vOc973lLly5dunQpNP2+++677777Nm3atGnTJqgz6ny8+NSBxHMVMg3ph4JjBmAS8ET891ylJvdC8amDMYCxAcXHeGAPgTrQfag/V6mJYcC9GA+YDUiJiDTg6l577bXXXnvxvtThfX/4wx/+8Ic/vP7666+//vqbbrrppptuGvdXakwL2gBozAia9G9ftDHQaDRmI37nd37nd37nd84666yzzjpr8eLFixcvNr02xX/ooYceeughiDX3QtMh/RBo/OtQavvsodrQdN9FOTTd4hyey1OoY6ERpgV1aB8jAdOCcu8n0DJ7FBgwvounYH4sWLBgwYIFNg9sojz44IMPPvjgv//7v//7v//7VVddddVVV4376zXmMtoAaGwHNN3f8WiToNFoTCZe8IIXvOAFLzjppJNOOukkPP0QawJq77rrrrvuugthD/Uh7lBwqDB031chylBnyq3+h3BnORScv6HpDvmlvsOC6SceeguBMCFcP8sxYzBsvAuBSeA4BD8dsdDy5cuXL19O4DJ1fvCDH/zgBz/4xje+8Y1vfON73/ve9773vXF/1cZcQxsAjW3C7KX+11577bXXXsvfJ5xwwgknnDDuHm0N2gxoNBrjxZFHHnnkkUeec84555xzDpl5oOz42iHEkGB08NDx3QVLZaD4+Mshyuj+uQtiDcXHhGDHADr+dMBU2x59SDzlLnF6UEp2CtATegh9xwzgKj0hHoAW6CHmgaVNjwncRfwDxg8GD0YR77Ju3bp169ZdeOGFF1544c0333zzzTeP+8s3ZjfaAGhsMSaH9JvEjwuTYzy0MdBoNHYkXv/617/+9a9/3ete97rXvQ7aioznnnvuueeee5DEQNahsNBZZDDIgSy5gRzbo2+fOjSackp8F+1Ayi3OoYTeOorAb2GDASJOOU+00IgSPxHqD1mnZZ7o/QrvGPgu2kH2w7hhMmFIUAfJ03777bfffvsxbphSl1122WWXXfa5z33uc5/73LhnQWO2og2AxkgYF+mfBIq/LRiXedDGQKPRmAmg6T/llFNOOeWUFStWrFixAnHLvffee++990L6fdgWPn4I8a4CrUHlob8WyTwhQLstzuFerlpsYzjbDxQcEk/fINnUNPV3TWcHyvYt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\"\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": []\n    }\n   ],\n   \"source\": [\n    \"reconstruction = fbp(sino, angles)\\n\",\n    \"window, 0, xsize=512, ysize=256\\n\",\n    \"\\n\",\n    \"tvscl, [phantom, reconstruction] > 0.8\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### The end\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"IDL [conda env:gdl] *\",\n   \"language\": \"IDL\",\n   \"name\": \"conda-env-gdl-idl\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"idl\",\n   \"file_extension\": \".pro\",\n   \"mimetype\": \"text/x-idl\",\n   \"name\": \"idl\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_java/simple-helloworld.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's define some class.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"class A {\\n\",\n    \"    public void hello() {\\n\",\n    \"        System.out.println(\\\"Hello World\\\");\\n\",\n    \"    }   \\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"And now we call its method.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"new A().hello();\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"You can run it e.g. with `jshell`\\n\",\n    \"\\n\",\n    \"* from command line, as `jshell simple-helloworld.java`\\n\",\n    \"* from jshell's shell with `/open simple-helloworld.java`\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"encoding\": \"// -*- coding: utf-8 -*-\",\n   \"formats\": \"ipynb,java:light\"\n  },\n  \"kernelspec\": {\n   \"display_name\": \"Java\",\n   \"language\": \"java\",\n   \"name\": \"java\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"text/x-java\",\n   \"file_extension\": \".java\",\n   \"mimetype\": \"\",\n   \"name\": \"Java\",\n   \"nbconverter_exporter\": \"\",\n   \"version\": \"1.8.0_121\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_js/ijavascript.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## A notebook that uses IJavascript kernel\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"let x = 5;\\n\",\n    \"const y = 6;\\n\",\n    \"var z = 10;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"11\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"x + y;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"function add(num1, num2) {\\n\",\n    \"    return num1 + num2\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"11\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"add(x, y);\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"const arrowAdd = (num1, num2) => num1 + num2;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"11\"\n      ]\n     },\n     \"execution_count\": 6,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"arrowAdd(x, y);\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"const myCar = {\\n\",\n    \"    color: \\\"blue\\\",\\n\",\n    \"    weight: 850,\\n\",\n    \"    model: \\\"fiat\\\",\\n\",\n    \"    start: () => \\\"car started!\\\",\\n\",\n    \"    doors: [1,2,3,4]\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"color: blue\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"console.log(\\\"color:\\\", myCar.color);\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"start: car started!\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"console.log(\\\"start:\\\", myCar.start());\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 10,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"I'm door 1\\n\",\n      \"I'm door 2\\n\",\n      \"I'm door 3\\n\",\n      \"I'm door 4\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"for (let door of myCar.doors) {\\n\",\n    \"    console.log(\\\"I'm door\\\", door)\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 11,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"{ color: 'blue',\\n\",\n       \"  weight: 850,\\n\",\n       \"  model: 'fiat',\\n\",\n       \"  start: [Function: start],\\n\",\n       \"  doors: [ 1, 2, 3, 4 ] }\"\n      ]\n     },\n     \"execution_count\": 11,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"myCar;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 12,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"class User {\\n\",\n    \"  constructor(name){\\n\",\n    \"    this.name = name;\\n\",\n    \"  }\\n\",\n    \"  sayHello(){\\n\",\n    \"    return \\\"Hello, I'm \\\" + this.name;\\n\",\n    \"  }\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 13,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"\\\"Hello, I'm John\\\"\"\n      ]\n     },\n     \"execution_count\": 13,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"let John = new User(\\\"John\\\");\\n\",\n    \"John.sayHello();\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Javascript (Node.js)\",\n   \"language\": \"javascript\",\n   \"name\": \"javascript\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".js\",\n   \"mimetype\": \"application/javascript\",\n   \"name\": \"javascript\",\n   \"version\": \"11.14.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_julia/julia_benchmark_plotly_barchart.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {\n    \"collapsed\": true\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# IJulia rocks! So does Plotly. Check it out\\n\",\n    \"\\n\",\n    \"using Plotly\\n\",\n    \"api_key = \\\"\\\" # visit https://plot.ly/api to generate an API username and password\\n\",\n    \"username = \\\"\\\"\\n\",\n    \"\\n\",\n    \"Plotly.signin(username, api_key)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 13,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='http://plot.ly/~bpostlethwaiteb/24/700/700' width='750'></iframe>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# Following data taken from http://julialang.org/ frontpage \\n\",\n    \"benchmarks = [\\\"fib\\\", \\\"parse_int\\\", \\\"quicksort3\\\", \\\"mandel\\\", \\\"pi_sum\\\", \\\"rand_mat_stat\\\", \\\"rand_mat_mul\\\"]\\n\",\n    \"platforms = [\\\"Fortran\\\", \\\"Julia\\\", \\\"Python\\\", \\\"R\\\", \\\"Matlab\\\", \\\"Mathematica\\\", \\\"Javascript\\\", \\\"Go\\\"]\\n\",\n    \"\\n\",\n    \"data = {\\n\",\n    \"        platforms[1] => [0.26, 5.03, 1.11, 0.86, 0.80, 0.64, 0.96],\\n\",\n    \"        platforms[2] => [0.91, 1.60, 1.14, 0.85, 1.00, 1.66, 1.01],\\n\",\n    \"        platforms[3] => [30.37, 13.95, 31.98, 14.19, 16.33, 13.52, 3.41 ],\\n\",\n    \"        platforms[4] => [411.36, 59.40, 524.29, 106.97, 15.42, 10.84, 3.98  ],\\n\",\n    \"        platforms[5] => [1992.00, 1463.16, 101.84, 64.58, 1.29, 6.61, 1.10   ],\\n\",\n    \"        platforms[6] => [64.46, 29.54, 35.74, 6.07, 1.32, 4.52, 1.16 ],\\n\",\n    \"        platforms[7] => [2.18, 2.43, 3.51, 3.49, 0.84, 3.28, 14.60],\\n\",\n    \"        platforms[8] => [1.03, 4.79, 1.25, 2.36, 1.41, 8.12, 8.51]\\n\",\n    \"        }\\n\",\n    \"\\n\",\n    \"pdata = [ {\\\"x\\\"=>benchmarks,\\\"y\\\"=>data[k],\\\"bardir\\\"=>\\\"h\\\",\\\"type\\\"=>\\\"bar\\\",\\\"name\\\"=>k} for k = platforms ]\\n\",\n    \"\\n\",\n    \"layout = {\\n\",\n    \"          \\\"title\\\"=> \\\"Julia benchmark comparison (smaller is better, C performance = 1.0)\\\",\\n\",\n    \"          \\\"barmode\\\"=> \\\"group\\\",\\n\",\n    \"          \\\"autosize\\\"=> false,\\n\",\n    \"          \\\"width\\\"=> 900,\\n\",\n    \"          \\\"height\\\"=> 900,\\n\",\n    \"          \\\"titlefont\\\"=>\\n\",\n    \"          {\\n\",\n    \"           \\\"family\\\"=> \\\"Open Sans\\\",\\n\",\n    \"           \\\"size\\\"=> 18,\\n\",\n    \"           \\\"color\\\"=> \\\"rgb(84, 39, 143)\\\"\\n\",\n    \"           },\\n\",\n    \"          \\\"margin\\\"=> {\\\"l\\\"=>160, \\\"pad\\\"=>0},\\n\",\n    \"          \\\"xaxis\\\"=> {\\n\",\n    \"                     \\\"title\\\"=> \\\"Benchmark log-time\\\",\\n\",\n    \"                     \\\"type\\\"=> \\\"log\\\"\\n\",\n    \"                     },\\n\",\n    \"          \\\"yaxis\\\"=> {\\\"title\\\"=> \\\"Benchmark Name\\\"}\\n\",\n    \"          }\\n\",\n    \"\\n\",\n    \"response = Plotly.plot(pdata,[\\\"layout\\\"=>layout])\\n\",\n    \"\\n\",\n    \"# Embed in an iframe within IJulia\\n\",\n    \"s = string(\\\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\\\",\\n\",\n    \"            response[\\\"url\\\"],\\n\",\n    \"            \\\"/700/700' width='750'></iframe>\\\")\\n\",\n    \"display(\\\"text/html\\\", s)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 15,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='http://plot.ly/~bpostlethwaiteb/26/700/700' width='750'></iframe>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# checkout https://plot.ly/api/ for more Julia examples!\\n\",\n    \"# But to show off some other Plotly features:\\n\",\n    \"x = 1:1500\\n\",\n    \"y1 = sin(2*pi*x/1500.) + rand(1500)-0.5\\n\",\n    \"y2 = sin(2*pi*x/1500.)\\n\",\n    \"\\n\",\n    \"fish = {\\\"x\\\"=>x,\\\"y\\\"=> y1,\\n\",\n    \"\\t\\\"type\\\"=>\\\"scatter\\\",\\\"mode\\\"=>\\\"markers\\\",\\n\",\n    \"\\t\\\"marker\\\"=>{\\\"color\\\"=>\\\"rgb(0, 0, 255)\\\",\\\"opacity\\\"=>0.5 } }\\n\",\n    \"\\n\",\n    \"fit = {\\\"x\\\"=> x,\\\"y\\\"=> y2,\\n\",\n    \"\\t\\\"type\\\"=>\\\"scatter\\\", \\\"mode\\\"=>\\\"markers\\\", \\\"opacity\\\"=>0.8,\\n\",\n    \"\\t\\\"marker\\\"=>{\\\"color\\\"=>\\\"rgb(255, 0, 0)\\\"} }\\n\",\n    \"\\n\",\n    \"layout = {\\\"autosize\\\"=> false,\\n\",\n    \"    \\\"width\\\"=> 650, \\\"height\\\"=> 550,\\n\",\n    \"    \\\"title\\\"=>\\\"Fish School\\\",\\n\",\n    \"\\t\\\"xaxis\\\"=>{ \\\"ticks\\\"=> \\\"\\\",\\n\",\n    \"        \\\"gridcolor\\\"=> \\\"white\\\",\\n\",\n    \"        \\\"zerolinecolor\\\"=> \\\"white\\\",    \\n\",\n    \"        \\\"linecolor\\\"=> \\\"white\\\",\\n\",\n    \"        \\\"autorange\\\"=> false,\\n\",\n    \"        \\\"range\\\"=>[0,1500] },\\n\",\n    \"\\t\\\"yaxis\\\"=>{ \\\"ticks\\\"=> \\\"\\\",\\n\",\n    \"        \\\"gridcolor\\\"=> \\\"white\\\",\\n\",\n    \"        \\\"zerolinecolor\\\"=> \\\"white\\\",\\n\",\n    \"\\t\\t\\\"linecolor\\\"=> \\\"white\\\",\\n\",\n    \"        \\\"autorange\\\"=> false,\\n\",\n    \"        \\\"range\\\"=>[-2.2,2.2] },\\n\",\n    \"\\t\\\"plot_bgcolor\\\"=> \\\"rgb(245,245,247)\\\",\\n\",\n    \"    \\\"showlegend\\\"=> false,\\n\",\n    \"    \\\"hovermode\\\"=> \\\"closest\\\"}\\n\",\n    \"\\n\",\n    \"response = Plotly.plot([fish, fit],[\\\"layout\\\"=>layout])\\n\",\n    \"s = string(\\\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\\\",\\n\",\n    \"            response[\\\"url\\\"],\\n\",\n    \"            \\\"/700/700' width='750'></iframe>\\\")\\n\",\n    \"display(\\\"text/html\\\", s)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Julia 1.1.1\",\n   \"language\": \"julia\",\n   \"name\": \"julia-1.1\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".jl\",\n   \"mimetype\": \"application/julia\",\n   \"name\": \"julia\",\n   \"version\": \"1.1.1\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 1\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_julia/julia_functional_geometry.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<script charset=\\\"utf-8\\\">(function ($, undefined) {\\n\",\n       \"\\n\",\n       \"    function createElem(tag, attr, content) {\\n\",\n       \"\\t// TODO: remove jQuery dependency\\n\",\n       \"\\tvar el = $(\\\"<\\\" + tag + \\\"/>\\\").attr(attr);\\n\",\n       \"\\tif (content) {\\n\",\n       \"\\t    el.append(content);\\n\",\n       \"\\t}\\n\",\n       \"\\treturn el[0];\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    // A widget must expose an id field which identifies it to the backend,\\n\",\n       \"    // an elem attribute which is will be added to the DOM, and\\n\",\n       \"    // a getState() method which returns the value to be sent to the backend\\n\",\n       \"    // a sendUpdate() method which sends its current value to the backend\\n\",\n       \"    var Widget = {\\n\",\n       \"\\tid: undefined,\\n\",\n       \"\\telem: undefined,\\n\",\n       \"\\tlabel: undefined,\\n\",\n       \"\\tgetState: function () {\\n\",\n       \"\\t    return this.elem.value;\\n\",\n       \"\\t},\\n\",\n       \"\\tsendUpdate: undefined\\n\",\n       \"    };\\n\",\n       \"\\n\",\n       \"    var Slider = function (typ, id, init) {\\n\",\n       \"\\tvar attr = { type:  \\\"range\\\",\\n\",\n       \"\\t\\t     value: init.value,\\n\",\n       \"\\t\\t     min:   init.min,\\n\",\n       \"\\t\\t     max:   init.max,\\n\",\n       \"\\t\\t     step:  init.step },\\n\",\n       \"\\t    elem = createElem(\\\"input\\\", attr),\\n\",\n       \"\\t    self = this;\\n\",\n       \"\\n\",\n       \"\\telem.onchange = function () {\\n\",\n       \"\\t    self.sendUpdate();\\n\",\n       \"\\t}\\n\",\n       \"\\n\",\n       \"\\tthis.id = id;\\n\",\n       \"\\tthis.elem = elem;\\n\",\n       \"\\tthis.label = init.label;\\n\",\n       \"\\n\",\n       \"\\tInputWidgets.commInitializer(this); // Initialize communication\\n\",\n       \"    }\\n\",\n       \"    Slider.prototype = Widget;\\n\",\n       \"\\n\",\n       \"    var Checkbox = function (typ, id, init) {\\n\",\n       \"\\tvar attr = { type: \\\"checkbox\\\",\\n\",\n       \"\\t\\t     checked: init.value },\\n\",\n       \"\\t    elem = createElem(\\\"input\\\", attr),\\n\",\n       \"\\t    self = this;\\n\",\n       \"\\n\",\n       \"\\tthis.getState = function () {\\n\",\n       \"\\t    return elem.checked;\\n\",\n       \"\\t}\\n\",\n       \"\\telem.onchange = function () {\\n\",\n       \"\\t    self.sendUpdate();\\n\",\n       \"\\t}\\n\",\n       \"\\n\",\n       \"\\tthis.id = id;\\n\",\n       \"\\tthis.elem = elem;\\n\",\n       \"\\tthis.label = init.label;\\n\",\n       \"\\n\",\n       \"\\tInputWidgets.commInitializer(this);\\n\",\n       \"    }\\n\",\n       \"    Checkbox.prototype = Widget;\\n\",\n       \"\\n\",\n       \"    var Button = function (typ, id, init) {\\n\",\n       \"\\tvar attr = { type:    \\\"button\\\",\\n\",\n       \"\\t\\t     value:   init.label },\\n\",\n       \"\\t    elem = createElem(\\\"input\\\", attr),\\n\",\n       \"\\t    self = this;\\n\",\n       \"\\tthis.getState = function () {\\n\",\n       \"\\t    return null;\\n\",\n       \"\\t}\\n\",\n       \"\\telem.onclick = function () {\\n\",\n       \"\\t    self.sendUpdate();\\n\",\n       \"\\t}\\n\",\n       \"\\n\",\n       \"\\tthis.id = id;\\n\",\n       \"\\tthis.elem = elem;\\n\",\n       \"\\tthis.label = init.label;\\n\",\n       \"\\n\",\n       \"\\tInputWidgets.commInitializer(this);\\n\",\n       \"    }\\n\",\n       \"    Button.prototype = Widget;\\n\",\n       \"\\n\",\n       \"    var Text = function (typ, id, init) {\\n\",\n       \"\\tvar attr = { type:  \\\"text\\\",\\n\",\n       \"\\t\\t     placeholder: init.label,\\n\",\n       \"\\t\\t     value: init.value },\\n\",\n       \"\\t    elem = createElem(\\\"input\\\", attr),\\n\",\n       \"\\t    self = this;\\n\",\n       \"\\tthis.getState = function () {\\n\",\n       \"\\t    return elem.value;\\n\",\n       \"\\t}\\n\",\n       \"\\telem.onkeyup = function () {\\n\",\n       \"\\t    self.sendUpdate();\\n\",\n       \"\\t}\\n\",\n       \"\\n\",\n       \"\\tthis.id = id;\\n\",\n       \"\\tthis.elem = elem;\\n\",\n       \"\\tthis.label = init.label;\\n\",\n       \"\\n\",\n       \"\\tInputWidgets.commInitializer(this);\\n\",\n       \"    }\\n\",\n       \"    Text.prototype = Widget;\\n\",\n       \"\\n\",\n       \"    var Textarea = function (typ, id, init) {\\n\",\n       \"\\tvar attr = { placeholder: init.label },\\n\",\n       \"\\t    elem = createElem(\\\"textarea\\\", attr, init.value),\\n\",\n       \"\\t    self = this;\\n\",\n       \"\\tthis.getState = function () {\\n\",\n       \"\\t    return elem.value;\\n\",\n       \"\\t}\\n\",\n       \"\\telem.onchange = function () {\\n\",\n       \"\\t    self.sendUpdate();\\n\",\n       \"\\t}\\n\",\n       \"\\n\",\n       \"\\tthis.id = id;\\n\",\n       \"\\tthis.elem = elem;\\n\",\n       \"\\tthis.label = init.label;\\n\",\n       \"\\n\",\n       \"\\tInputWidgets.commInitializer(this);\\n\",\n       \"    }\\n\",\n       \"    Textarea.prototype = Widget;\\n\",\n       \"\\n\",\n       \"    // RadioButtons\\n\",\n       \"    // Dropdown\\n\",\n       \"    // HTML\\n\",\n       \"    // Latex\\n\",\n       \"\\n\",\n       \"    var InputWidgets = {\\n\",\n       \"\\tSlider: Slider,\\n\",\n       \"\\tCheckbox: Checkbox,\\n\",\n       \"\\tButton: Button,\\n\",\n       \"\\tText: Text,\\n\",\n       \"\\tTextarea: Textarea,\\n\",\n       \"\\tdebug: false,\\n\",\n       \"\\tlog: function () {\\n\",\n       \"\\t    if (InputWidgets.debug) {\\n\",\n       \"\\t\\tconsole.log.apply(console, arguments);\\n\",\n       \"\\t    }\\n\",\n       \"\\t},\\n\",\n       \"\\t// a central way to initialize communication\\n\",\n       \"\\t// for widgets.\\n\",\n       \"\\tcommInitializer: function (widget) {\\n\",\n       \"\\t    widget.sendUpdate = function () {};\\n\",\n       \"\\t}\\n\",\n       \"    };\\n\",\n       \"\\n\",\n       \"    window.InputWidgets = InputWidgets;\\n\",\n       \"\\n\",\n       \"})(jQuery, undefined);\\n\",\n       \"</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<script charset=\\\"utf-8\\\">(function (IPython, $, _, MathJax, Widgets) {\\n\",\n       \"    $.event.special.destroyed = {\\n\",\n       \"\\tremove: function(o) {\\n\",\n       \"\\t    if (o.handler) {\\n\",\n       \"\\t\\to.handler.apply(this, arguments)\\n\",\n       \"\\t    }\\n\",\n       \"\\t}\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    var redrawValue = function (container, type, val) {\\n\",\n       \"\\tvar selector = $(\\\"<div/>\\\");\\n\",\n       \"\\tvar oa = new IPython.OutputArea(_.extend(selector, {\\n\",\n       \"\\t    selector: selector,\\n\",\n       \"\\t    prompt_area: true,\\n\",\n       \"\\t    events: IPython.events,\\n\",\n       \"\\t    keyboard_manager: IPython.keyboard_manager\\n\",\n       \"\\t})); // Hack to work with IPython 2.1.0\\n\",\n       \"\\n\",\n       \"\\tswitch (type) {\\n\",\n       \"\\tcase \\\"image/png\\\":\\n\",\n       \"            var _src = 'data:' + type + ';base64,' + val;\\n\",\n       \"\\t    $(container).find(\\\"img\\\").attr('src', _src);\\n\",\n       \"\\t    break;\\n\",\n       \"\\tdefault:\\n\",\n       \"\\t    var toinsert = IPython.OutputArea.append_map[type].apply(\\n\",\n       \"\\t\\toa, [val, {}, selector]\\n\",\n       \"\\t    );\\n\",\n       \"\\t    $(container).empty().append(toinsert.contents());\\n\",\n       \"\\t    selector.remove();\\n\",\n       \"\\t}\\n\",\n       \"\\tif (type === \\\"text/latex\\\" && MathJax) {\\n\",\n       \"\\t    MathJax.Hub.Queue([\\\"Typeset\\\", MathJax.Hub, toinsert.get(0)]);\\n\",\n       \"\\t}\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"\\n\",\n       \"    $(document).ready(function() {\\n\",\n       \"\\tWidgets.debug = false; // log messages etc in console.\\n\",\n       \"\\tfunction initComm(evt, data) {\\n\",\n       \"\\t    var comm_manager = data.kernel.comm_manager;\\n\",\n       \"\\t    comm_manager.register_target(\\\"Signal\\\", function (comm) {\\n\",\n       \"\\t\\tcomm.on_msg(function (msg) {\\n\",\n       \"\\t\\t    //Widgets.log(\\\"message received\\\", msg);\\n\",\n       \"\\t\\t    var val = msg.content.data.value;\\n\",\n       \"\\t\\t    $(\\\".signal-\\\" + comm.comm_id).each(function() {\\n\",\n       \"\\t\\t\\tvar type = $(this).data(\\\"type\\\");\\n\",\n       \"\\t\\t\\tif (val[type]) {\\n\",\n       \"\\t\\t\\t    redrawValue(this, type, val[type], type);\\n\",\n       \"\\t\\t\\t}\\n\",\n       \"\\t\\t    });\\n\",\n       \"\\t\\t    delete val;\\n\",\n       \"\\t\\t    delete msg.content.data.value;\\n\",\n       \"\\t\\t});\\n\",\n       \"\\t    });\\n\",\n       \"\\n\",\n       \"\\t    // coordinate with Comm and redraw Signals\\n\",\n       \"\\t    // XXX: Test using Reactive here to improve performance\\n\",\n       \"\\t    $([IPython.events]).on(\\n\",\n       \"\\t\\t'output_appended.OutputArea', function (event, type, value, md, toinsert) {\\n\",\n       \"\\t\\t    if (md && md.reactive) {\\n\",\n       \"\\t\\t\\t// console.log(md.comm_id);\\n\",\n       \"\\t\\t\\ttoinsert.addClass(\\\"signal-\\\" + md.comm_id);\\n\",\n       \"\\t\\t\\ttoinsert.data(\\\"type\\\", type);\\n\",\n       \"\\t\\t\\t// Signal back indicating the mimetype required\\n\",\n       \"\\t\\t\\tvar comm_manager = IPython.notebook.kernel.comm_manager;\\n\",\n       \"\\t\\t\\tvar comm = comm_manager.comms[md.comm_id];\\n\",\n       \"\\t\\t\\tcomm.send({action: \\\"subscribe_mime\\\",\\n\",\n       \"\\t\\t\\t\\t   mime: type});\\n\",\n       \"\\t\\t\\ttoinsert.bind(\\\"destroyed\\\", function() {\\n\",\n       \"\\t\\t\\t    comm.send({action: \\\"unsubscribe_mime\\\",\\n\",\n       \"\\t\\t\\t\\t       mime: type});\\n\",\n       \"\\t\\t\\t});\\n\",\n       \"\\t\\t    }\\n\",\n       \"\\t    });\\n\",\n       \"\\n\",\n       \"\\t    // Set up communication for Widgets\\n\",\n       \"\\t    Widgets.commInitializer = function (widget) {\\n\",\n       \"\\t\\tvar comm = comm_manager.new_comm(\\n\",\n       \"\\t\\t    \\\"InputWidget\\\", {widget_id: widget.id}\\n\",\n       \"\\t\\t);\\n\",\n       \"\\t\\twidget.sendUpdate = function () {\\n\",\n       \"\\t\\t    // `this` is a widget here.\\n\",\n       \"\\t\\t    // TODO: I have a feeling there's some\\n\",\n       \"\\t\\t    //       IPython bookkeeping to be done here.\\n\",\n       \"\\t\\t    // Widgets.log(\\\"State changed\\\", this, this.getState());\\n\",\n       \"\\t\\t    comm.send({value: this.getState()});\\n\",\n       \"\\t\\t}\\n\",\n       \"\\t    };\\n\",\n       \"\\t}\\n\",\n       \"\\n\",\n       \"\\ttry {\\n\",\n       \"\\t    // try to initialize right away. otherwise, wait on the status_started event.\\n\",\n       \"\\t    initComm(undefined, IPython.notebook);\\n\",\n       \"\\t} catch (e) {\\n\",\n       \"\\t    $([IPython.events]).on('status_started.Kernel', initComm);\\n\",\n       \"\\t}\\n\",\n       \"    });\\n\",\n       \"})(IPython, jQuery, _, MathJax, InputWidgets);\\n\",\n       \"</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<script>\\n\",\n       \"var cell = $(\\\".container .cell\\\").eq(0), ia = cell.find(\\\".input_area\\\")\\n\",\n       \"if (cell.find(\\\".toggle-button\\\").length == 0) {\\n\",\n       \"ia.after(\\n\",\n       \"    $('<button class=\\\"toggle-button\\\">Toggle hidden code</button>').click(\\n\",\n       \"        function (){ ia.toggle() }\\n\",\n       \"        )\\n\",\n       \"    )\\n\",\n       \"ia.hide()\\n\",\n       \"}\\n\",\n       \"</script>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# This notebook is a semi top-down explanation. This cell needs to be\\n\",\n    \"# executed first so that the operators and helper functions are defined\\n\",\n    \"# All of this is explained in the later half of the notebook\\n\",\n    \"\\n\",\n    \"using Compose, Interact\\n\",\n    \"Compose.set_default_graphic_size(2inch, 2inch)\\n\",\n    \"\\n\",\n    \"points_f = [\\n\",\n    \"    (.1, .1),\\n\",\n    \"    (.9, .1),\\n\",\n    \"    (.9, .2),\\n\",\n    \"    (.2, .2),\\n\",\n    \"    (.2, .4),\\n\",\n    \"    (.6, .4),\\n\",\n    \"    (.6, .5),\\n\",\n    \"    (.2, .5),\\n\",\n    \"    (.2, .9),\\n\",\n    \"    (.1, .9),\\n\",\n    \"    (.1, .1)\\n\",\n    \"]\\n\",\n    \"\\n\",\n    \"f = compose(context(), stroke(\\\"black\\\"), line(points_f))\\n\",\n    \"\\n\",\n    \"rot(pic) = compose(context(rotation=Rotation(-deg2rad(90))), pic)\\n\",\n    \"flip(pic) = compose(context(mirror=Mirror(deg2rad(90), 0.5w, 0.5h)), pic)\\n\",\n    \"above(m, n, p, q) =\\n\",\n    \"    compose(context(),\\n\",\n    \"            (context(0, 0, 1, m/(m+n)), p),\\n\",\n    \"            (context(0, m/(m+n), 1, n/(m+n)), q))\\n\",\n    \"\\n\",\n    \"above(p, q) = above(1, 1, p, q)\\n\",\n    \"\\n\",\n    \"beside(m, n, p, q) =\\n\",\n    \"    compose(context(),\\n\",\n    \"            (context(0, 0, m/(m+n), 1), p),\\n\",\n    \"            (context(m/(m+n), 0, n/(m+n), 1), q))\\n\",\n    \"\\n\",\n    \"beside(p, q) = beside(1, 1, p, q)\\n\",\n    \"\\n\",\n    \"over(p, q) = compose(context(),\\n\",\n    \"                (context(), p), (context(), q))\\n\",\n    \"\\n\",\n    \"rot45(pic) =\\n\",\n    \"    compose(context(0, 0, 1/sqrt(2), 1/sqrt(2),\\n\",\n    \"        rotation=Rotation(-deg2rad(45), 0w, 0h)), pic)\\n\",\n    \"\\n\",\n    \"# Utility function to zoom out and look at the context\\n\",\n    \"zoomout(pic) = compose(context(),\\n\",\n    \"                (context(0.2, 0.2, 0.6, 0.6), pic),\\n\",\n    \"                (context(0.2, 0.2, 0.6, 0.6), fill(nothing), stroke(\\\"black\\\"), strokedash([0.5mm, 0.5mm]),\\n\",\n    \"                    polygon([(0, 0), (1, 0), (1, 1), (0, 1)])))\\n\",\n    \"\\n\",\n    \"function read_path(p_str)\\n\",\n    \"    tokens = [try parsefloat(x) catch symbol(x) end for x in split(p_str, r\\\"[\\\\s,]+\\\")]\\n\",\n    \"    path(tokens)\\n\",\n    \"end\\n\",\n    \"\\n\",\n    \"fish = compose(context(units=UnitBox(260, 260)), stroke(\\\"black\\\"),\\n\",\n    \"            read_path(strip(readall(\\\"fish.path\\\"))))\\n\",\n    \"\\n\",\n    \"rotatable(pic) = @manipulate for θ=0:0.001:2π\\n\",\n    \"    compose(context(rotation=Rotation(θ)), pic)\\n\",\n    \"end\\n\",\n    \"\\n\",\n    \"blank = compose(context())\\n\",\n    \"\\n\",\n    \"fliprot45(pic) = rot45(compose(context(mirror=Mirror(deg2rad(-45))),pic))\\n\",\n    \"\\n\",\n    \"# Hide this cell.\\n\",\n    \"display(MIME(\\\"text/html\\\"), \\\"\\\"\\\"<script>\\n\",\n    \"var cell = \\\\$(\\\".container .cell\\\").eq(0), ia = cell.find(\\\".input_area\\\")\\n\",\n    \"if (cell.find(\\\".toggle-button\\\").length == 0) {\\n\",\n    \"ia.after(\\n\",\n    \"    \\\\$('<button class=\\\"toggle-button\\\">Toggle hidden code</button>').click(\\n\",\n    \"        function (){ ia.toggle() }\\n\",\n    \"        )\\n\",\n    \"    )\\n\",\n    \"ia.hide()\\n\",\n    \"}\\n\",\n    \"</script>\\\"\\\"\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Functional Geometry\\n\",\n    \"*Functional Geometry* is a paper by Peter Henderson ([original (1982)](users.ecs.soton.ac.uk/peter/funcgeo.pdf), [revisited (2002)](https://cs.au.dk/~hosc/local/HOSC-15-4-pp349-365.pdf)) which deconstructs the MC Escher woodcut *Square Limit*\\n\",\n    \"\\n\",\n    \"![Square Limit](http://i.imgur.com/LjRzmNM.png)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"> A picture is an example of a complex object that can be described in terms of its parts.\\n\",\n    \"Yet a picture needs to be rendered on a printer or a screen by a device that expects to\\n\",\n    \"be given a sequence of commands. Programming that sequence of commands directly is\\n\",\n    \"much harder than having an application generate the commands automatically from the\\n\",\n    \"simpler, denotational description.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"A `picture` is a *denotation* of something to draw.\\n\",\n    \"\\n\",\n    \"e.g. The value of f here denotes the picture of the letter F\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Original at http://nbviewer.jupyter.org/github/shashi/ijulia-notebooks/blob/master/funcgeo/Functional%20Geometry.ipynb\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## In conclusion\\n\",\n    \"\\n\",\n    \"We described Escher's *Square Limit* from the description of its smaller parts, which in turn were described in terms of their smaller parts.\\n\",\n    \"\\n\",\n    \"This seemed simple because we chose to talk in terms of an *algebra* to describe pictures. The primitives `rot`, `flip`, `fliprot45`, `above`, `beside` and `over` fit the job perfectly.\\n\",\n    \"\\n\",\n    \"We were able to describe these primitives in terms of `compose` `contexts`, which the Compose library knows how to render.\\n\",\n    \"\\n\",\n    \"Denotation can be an easy way to describe a system as well as a practical implementation method.\\n\",\n    \"\\n\",\n    \"[Abstraction barriers](https://mitpress.mit.edu/sicp/full-text/sicp/book/node29.html) are useful tools that can reduce the cognitive overhead on the programmer. It entails creating layers consisting of functions which only use functions in the same layer or layers below in their own implementation. The layers in our language were:\\n\",\n    \"\\n\",\n    \"    ------------------[ squarelimit ]------------------\\n\",\n    \"    -------------[ quartet, cycle, nonet ]-------------\\n\",\n    \"    ---[ rot, flip, fliprot45, above, beside, over ]---\\n\",\n    \"    -------[ compose, context, line, path,... ]--------\\n\",\n    \"    \\n\",\n    \"Drawing this diagram out is a useful way to begin building any library.\\n\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Julia 1.1.1\",\n   \"language\": \"julia\",\n   \"name\": \"julia-1.1\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".jl\",\n   \"mimetype\": \"application/julia\",\n   \"name\": \"julia\",\n   \"version\": \"1.1.1\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 1\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_logtalk/logtalk_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# An implementation of the Ackermann function\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {\n    \"vscode\": {\n     \"languageId\": \"logtalk\"\n    }\n   },\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"\\u001b[1mtrue\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%%load ack.lgt\\n\",\n    \"\\n\",\n    \":- object(ack).\\n\",\n    \"\\n\",\n    \":- info([\\n\",\n    \"\\tversion is 1:0:0,\\n\",\n    \"\\tauthor is 'Paulo Moura',\\n\",\n    \"\\tdate is 2008-3-31,\\n\",\n    \"\\tcomment is 'Ackermann function (general recursive function).'\\n\",\n    \"]).\\n\",\n    \"\\n\",\n    \":- public(ack/3).\\n\",\n    \":- mode(ack(+integer, +integer, -integer), one).\\n\",\n    \":- info(ack/3, [\\n\",\n    \"\\tcomment is 'Ackermann function.',\\n\",\n    \"\\targnames is ['M', 'N', 'V']\\n\",\n    \"]).\\n\",\n    \"\\n\",\n    \"ack(0, N, V) :-\\n\",\n    \"\\t!,\\n\",\n    \"\\tV is N + 1.\\n\",\n    \"ack(M, 0, V) :-\\n\",\n    \"\\t!,\\n\",\n    \"\\tM2 is M - 1,\\n\",\n    \"\\tack(M2, 1, V).\\n\",\n    \"ack(M, N, V) :-\\n\",\n    \"\\tM2 is M - 1,\\n\",\n    \"\\tN2 is N - 1,\\n\",\n    \"\\tack(M, N2, V2),\\n\",\n    \"\\tack(M2, V2, V).\\n\",\n    \"\\n\",\n    \":- end_object.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Sample query\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {\n    \"vscode\": {\n     \"languageId\": \"logtalk\"\n    }\n   },\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"\\u001b[1mV = 11\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"ack::ack(2, 4, V).\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Logtalk\",\n   \"language\": \"logtalk\",\n   \"name\": \"logtalk_kernel\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"logtalk\",\n   \"file_extension\": \".lgt\",\n   \"mimetype\": \"text/x-logtalk\",\n   \"name\": \"Logtalk\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_lua/lua_example.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Source: https://www.lua.org/pil/19.3.html\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Sort\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Another useful function on arrays is table.sort, which we have seen before. It receives the array to be sorted, plus an optional order function. This order function receives two arguments and must return true if the first argument should come first in the sorted array. If this function is not provided, sort uses the default less-than operation (corresponding to the `<´ operator).\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"A common mistake is to try to order the indices of a table. In a table, the indices form a set, and have no order whatsoever. If you want to order them, you have to copy them to an array and then sort the array. Let us see an example. Suppose that you read a source file and build a table that gives, for each function name, the line where that function is defined; something like this:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"lines = {\\n\",\n    \"    luaH_set = 10,\\n\",\n    \"    luaH_get = 24,\\n\",\n    \"    luaH_present = 48,\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \" Now you want to print these function names in alphabetical order. If you traverse this table with pairs, the names appear in an arbitrary order. However, you cannot sort them directly, because these names are keys of the table. However, when you put these names into an array, then you can sort them. First, you must create an array with those names, then sort it, and finally print the result:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"luaH_get\\n\",\n      \"luaH_present\\n\",\n      \"luaH_set\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"a = {}\\n\",\n    \"for n in pairs(lines) do table.insert(a, n) end\\n\",\n    \"table.sort(a)\\n\",\n    \"for i,n in ipairs(a) do print(n) end\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note that, for Lua, arrays also have no order. But we know how to count, so we get ordered values as long as we access the array with ordered indices. That is why you should always traverse arrays with ipairs, rather than pairs. The first imposes the key order 1, 2, ..., whereas the latter uses the natural arbitrary order of the table.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"As a more advanced solution, we can write an iterator that traverses a table following the order of its keys. An optional parameter f allows the specification of an alternative order. It first sorts the keys into an array, and then iterates on the array. At each step, it returns the key and value from the original table:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"function pairsByKeys (t, f)\\n\",\n    \"    local a = {}\\n\",\n    \"    for n in pairs(t) do table.insert(a, n) end\\n\",\n    \"    table.sort(a, f)\\n\",\n    \"    local i = 0               -- iterator variable\\n\",\n    \"    local iter = function ()  -- iterator function\\n\",\n    \"        i = i + 1\\n\",\n    \"        if a[i] == nil then return nil\\n\",\n    \"        else return a[i], t[a[i]]\\n\",\n    \"        end\\n\",\n    \"    end\\n\",\n    \"    return iter\\n\",\n    \"end\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \" With this function, it is easy to print those function names in alphabetical order. The loop\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"luaH_get\\t24\\n\",\n      \"luaH_present\\t48\\n\",\n      \"luaH_set\\t10\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"for name, line in pairsByKeys(lines) do\\n\",\n    \"    print(name, line)\\n\",\n    \"end\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Lua\",\n   \"language\": \"lua\",\n   \"name\": \"lua\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".lua\",\n   \"mimetype\": \"text/x-lua\",\n   \"name\": \"lua\",\n   \"version\": \"5.4\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_m/octave_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"A markdown cell\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"ans =  2\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"1 + 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"ans =  4\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"% a code cell with comments\\n\",\n    \"2 + 2\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\\n\",\n      \"text/plain\": [\n       \"<IPython.core.display.Image object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"% a simple plot\\n\",\n    \"x = -10:0.1:10;\\n\",\n    \"plot (x, sin (x));\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\\n\",\n      \"text/plain\": [\n       \"<IPython.core.display.Image object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%plot -w 800\\n\",\n    \"% a simple plot with a magic instruction\\n\",\n    \"x = -10:0.1:10;\\n\",\n    \"plot (x, sin (x));\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"And to finish with, a Python cell\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%python\\n\",\n    \"a = 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"2\"\n      ]\n     },\n     \"execution_count\": 6,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"%%python\\n\",\n    \"a + 1\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Octave\",\n   \"language\": \"octave\",\n   \"name\": \"octave\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".m\",\n   \"help_links\": [\n    {\n     \"text\": \"GNU Octave\",\n     \"url\": \"https://www.gnu.org/software/octave/support.html\"\n    },\n    {\n     \"text\": \"Octave Kernel\",\n     \"url\": \"https://github.com/Calysto/octave_kernel\"\n    },\n    {\n     \"text\": \"MetaKernel Magics\",\n     \"url\": \"https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md\"\n    }\n   ],\n   \"mimetype\": \"text/x-octave\",\n   \"name\": \"octave\",\n   \"version\": \"4.2.2\"\n  },\n  \"toc\": {\n   \"base_numbering\": 1,\n   \"nav_menu\": {},\n   \"number_sections\": true,\n   \"sideBar\": true,\n   \"skip_h1_title\": false,\n   \"title_cell\": \"Table of Contents\",\n   \"title_sidebar\": \"Contents\",\n   \"toc_cell\": false,\n   \"toc_position\": {},\n   \"toc_section_display\": true,\n   \"toc_window_display\": false\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_maxima/maxima_example.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"a272759d\",\n   \"metadata\": {},\n   \"source\": [\n    \"## maxima misc\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4f2a00bb\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"kill(all)$\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"8b1434eb\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f(x) := 1/(x^2+l^2)^(3/2);\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"9f3f0afb\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"integrate(f(x), x);\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"3c964efd\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"tex(%)$\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f8b0e578\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Maxima\",\n   \"language\": \"maxima\",\n   \"name\": \"maxima\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"maxima\",\n   \"file_extension\": \".mac\",\n   \"mimetype\": \"text/x-maxima\",\n   \"name\": \"maxima\",\n   \"pygments_lexer\": \"maxima\",\n   \"version\": \"5.43.2\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_ocaml/ocaml_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"0ce05620\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Example of an OCaml notebook\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"id\": \"5c62301c\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"val sum : int -> int -> int = <fun>\\n\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"let sum x y = x + y\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"f89c9670\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's try our function:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"id\": \"d2b696e3\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"- : bool = true\\n\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"sum 3 4 = 7 + 0\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"formats\": \"ipynb:markdown,md\"\n  },\n  \"kernelspec\": {\n   \"display_name\": \"OCaml default\",\n   \"language\": \"OCaml\",\n   \"name\": \"ocaml-jupyter\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"text/x-ocaml\",\n   \"file_extension\": \".ml\",\n   \"mimetype\": \"text/x-ocaml\",\n   \"name\": \"OCaml\",\n   \"nbconverter_exporter\": null,\n   \"pygments_lexer\": \"OCaml\",\n   \"version\": \"4.12.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_ps1/powershell.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is an extract from\\n\",\n    \"https://github.com/Jaykul/Jupyter-PowerShell/blob/master/LiterateDevOps.ipynb\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 30,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"$imageUrl = 'https://upload.wikimedia.org/wikipedia/commons/2/2f/PowerShell_5.0_icon.png'\\n\",\n    \"$ImageData = @{ \\\"png\\\" = (Invoke-WebRequest $imageUrl -UseBasicParsing).RawContentStream.GetBuffer() }\\n\",\n    \"# $ImageData\\n\",\n    \"\\n\",\n    \"Write-Jupyter -InputObject $ImageData -Metadata @{ \\\"image/png\\\" = @{ 'width' = 32 } }\\n\",\n    \"Write-Jupyter -InputObject $ImageData -Metadata @{ \\\"image/png\\\" = @{ 'width' = 64 } }\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"PowerShell\",\n   \"language\": \"PowerShell\",\n   \"name\": \"powershell\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"powershell\",\n   \"file_extension\": \".ps1\",\n   \"mimetype\": \"text/powershell\",\n   \"name\": \"PowerShell\",\n   \"nbconvert_exporter\": null,\n   \"pygments_lexer\": \"powershell\",\n   \"version\": \"5.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/Line_breaks_in_LateX_305.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This cell uses no particular cell marker\\n\",\n    \"\\n\",\n    \"$$\\n\",\n    \"\\\\begin{align}\\n\",\n    \"\\\\dot{x} & = \\\\sigma(y-x)\\\\\\\\\\n\",\n    \"\\\\dot{y} & = \\\\rho x - y - xz \\\\\\\\\\n\",\n    \"\\\\dot{z} & = -\\\\beta z + xy\\n\",\n    \"\\\\end{align}\\n\",\n    \"$$\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This cell uses no particular cell marker, and a single slash in the $\\\\LaTeX$ equation\\n\",\n    \"\\n\",\n    \"$$\\n\",\n    \"\\\\begin{align}\\n\",\n    \"\\\\dot{x} & = \\\\sigma(y-x) \\\\\\n\",\n    \"\\\\dot{y} & = \\\\rho x - y - xz \\\\\\n\",\n    \"\\\\dot{z} & = -\\\\beta z + xy\\n\",\n    \"\\\\end{align}\\n\",\n    \"$$\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"'''\"\n   },\n   \"source\": [\n    \"This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\\n\",\n    \"\\n\",\n    \"$$\\n\",\n    \"\\\\begin{align}\\n\",\n    \"\\\\dot{x} & = \\\\sigma(y-x)\\\\\\\\\\n\",\n    \"\\\\dot{y} & = \\\\rho x - y - xz \\\\\\\\\\n\",\n    \"\\\\dot{z} & = -\\\\beta z + xy\\n\",\n    \"\\\\end{align}\\n\",\n    \"$$\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"celltoolbar\": \"Edit Metadata\",\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.7.4\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/Notebook with function and cell metadata 164.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"2\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"1 + 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"A markdown cell\\n\",\n    \"And below, the cell for function f has non trivial cell metadata. And the next cell as well.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {\n    \"attributes\": {\n     \"classes\": [],\n     \"id\": \"\",\n     \"n\": \"10\"\n    }\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"def f(x):\\n\",\n    \"    return x\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {\n    \"attributes\": {\n     \"classes\": [],\n     \"id\": \"\",\n     \"n\": \"10\"\n    }\n   },\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"5\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"f(5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"More text\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"4\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"2 + 2\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"celltoolbar\": \"Edit Metadata\",\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.6\"\n  },\n  \"toc\": {\n   \"base_numbering\": 1,\n   \"nav_menu\": {},\n   \"number_sections\": true,\n   \"sideBar\": true,\n   \"skip_h1_title\": false,\n   \"title_cell\": \"Table of Contents\",\n   \"title_sidebar\": \"Contents\",\n   \"toc_cell\": false,\n   \"toc_position\": {},\n   \"toc_section_display\": true,\n   \"toc_window_display\": false\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/Notebook with html and latex cells.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<p><a href=\\\"https://github.com/mwouts/jupytext\\\", style=\\\"color: rgb(0,0,255)\\\">Jupytext</a> on GitHub</p>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%%html\\n\",\n    \"<p><a href=\\\"https://github.com/mwouts/jupytext\\\", style=\\\"color: rgb(0,0,255)\\\">Jupytext</a> on GitHub</p>\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/latex\": [\n       \"$\\\\frac{\\\\pi}{2}$\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.Latex object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%%latex\\n\",\n    \"$\\\\frac{\\\\pi}{2}$\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%load_ext rpy2.ipython\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\\n\"\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%%R\\n\",\n    \"library(ggplot2)\\n\",\n    \"ggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<matplotlib.axes._subplots.AxesSubplot at 0x2da0c41a9e8>\"\n      ]\n     },\n     \"execution_count\": 5,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAMYAAACMCAYAAAAnWNZXAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAABSVJREFUeJzt3U2IVXUcxvHnSY2CQogZWvjSLSjEVcIQgasMQjNqEaVFrYJZBRZBWIuwXW0iKAmml1WREBlECRWkUAujGWuhTYKYkZSlLXqHMJ8WTmD5yzniPXPuzP1+YGDu3MOZHxe+/M+5c5m/kwjAv13U9QDAICIMoEAYQIEwgAJhAAXCAAqEARQIAygQBlBY3MZJR0ZG0uv12jg1cEGmpqZOJBmd7bhWwuj1epqcnGzj1MAFsf11k+O4lAIKhAEUCAMotHKP0Ybe1ne7HmFWR57a2PUI6BNWDKBAGECBMIACYQAFwgAKhAEUCAMoEAZQIAygQBhAgTCAAmEABcIACoQBFAgDKBAGUCAMoNA4DNuLbH9m+502BwIGwfmsGFskTbc1CDBIGoVhe7mkjZJeanccYDA0XTGelfSopFP/d4DtcduTtiePHz/el+GArswahu3bJP2QZOpcxyWZSDKWZGx0dNb/gAgMtCYrxlpJt9s+ImmHpHW2X211KqBjs4aR5LEky5P0JG2W9GGS+1qfDOgQf8cACuf1nwiT7JG0p5VJgAHCigEUCAMoEAZQIAygQBhAgTCAAmEABcIACoQBFAgDKBAGUCAMoEAYQIEwgAJhAAXCAAqEARQIAygQBlAgDKBAGECBMIACYQAFwgAKhAEUCAMoEAZQIAygQBhAgTCAAmEABcIACk02p1xhe7ftadsHbG+Zi8GALjXZUemkpEeS7LN9uaQp2x8k+aLl2YDONNmc8rsk+2a+/0XStKRlbQ8GdOm87jFs9yStkfRJG8MAg6Lx5pS2L5P0pqSHkvxcPD8uaVySVq5c2bcB0YJtS7ueoJltP3X2qxutGLaX6HQUryXZWR2TZCLJWJKx0dHRfs4IzLkm70pZ0suSppM80/5IQPearBhrJd0vaZ3tz2e+bm15LqBTs95jJPlYkudgFmBg8JdvoEAYQIEwgAJhAAXCAAqEARQIAygQBlAgDKBAGECBMIACYQAFwgAKhAEUCAMoEAZQIAygQBhAgTCAAmEABcIACoQBFAgDKBAGUCAMoEAYQIEwgAJhAAXCAAqEARQIAygQBlBougffetsHbR+yvbXtoYCuNdmDb5Gk7ZI2SFot6R7bq9seDOhSkxXjBkmHkhxO8qekHZLuaHcsoFtNwlgm6ZszHh+d+RmwYM26OaXqjSlz1kH2uKTxmYe/2j54IYPNgRFJJ/p5Qj/dz7PNO31/PfVkK3uiXtXkoCZhHJW04ozHyyV9+9+DkkxImmg02gCwPZlkrOs5FoqF9no2uZT6VNK1tq+2fbGkzZLebncsoFtN9vk+aftBSe9JWiTplSQHWp8M6FCTSykl2SVpV8uzzLV5c9k3Tyyo19PJWffRwNDjIyFAgTCAwlCHYXut7e1dz4HB0+jmeyGxfb2keyXdLekrSTu7nWhhsD0i6ccskJvWoVgxbF9n+wnb05Ke1+mPuDjJTUme63i8ecf2jbb32N5pe43t/ZL2S/re9vqu5+uHoXhXyvYpSR9JeiDJoZmfHU5yTbeTzU+2JyU9LmmpTr9NuyHJXturJL2eZE2nA/bBUKwYku6UdEzSbtsv2r5Z9WfA0MziJO8neUPSsSR7JSnJlx3P1TdDEUaSt5JskrRK0h5JD0u60vYLtm/pdLj56dQZ3//xn+cWxCXIUFxKVWxfIekuSZuSrOt6nvnE9l+SftPpVfdSSb//85SkS5Is6Wq2fhnaMIBzGYpLKeB8EQZQIAygQBhAgTCAwt/7zRbab6vZ+QAAAABJRU5ErkJggg==\\n\",\n      \"text/plain\": [\n       \"<Figure size 216x144 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%matplotlib inline\\n\",\n    \"import pandas as pd\\n\",\n    \"pd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/Notebook with many hash signs.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"##################################################################\\n\",\n    \"This is a notebook that contains many hash signs.\\n\",\n    \"Hopefully its python representation is not recognized as a Sphinx Gallery script...\\n\",\n    \"##################################################################\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"3\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"some = 1\\n\",\n    \"code = 2\\n\",\n    \"some+code\\n\",\n    \"\\n\",\n    \"##################################################################\\n\",\n    \"# A comment\\n\",\n    \"##################################################################\\n\",\n    \"# Another comment\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"##################################################################\\n\",\n    \"This is a notebook that contains many hash signs.\\n\",\n    \"Hopefully its python representation is not recognized as a Sphinx Gallery script...\\n\",\n    \"##################################################################\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/Notebook with metadata and long cells.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Part one - various cells\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Here we have a markdown cell\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"with two blank lines\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now we have a markdown cell\\n\",\n    \"with a code block inside it\\n\",\n    \"\\n\",\n    \"```python\\n\",\n    \"1 + 1\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"After that cell we'll have a code cell\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"6\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"2 + 2\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"3 + 3\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Followed by a raw cell\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is \\n\",\n    \"the content\\n\",\n    \"of the raw cell\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Part two - cell metadata\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"key\": \"value\"\n   },\n   \"source\": [\n    \"This is a markdown cell with cell metadata `{\\\"key\\\": \\\"value\\\"}`\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {\n    \".class\": null,\n    \"tags\": [\n     \"parameters\"\n    ]\n   },\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'This is a code cell with metadata `{\\\"tags\\\":[\\\"parameters\\\"], \\\".class\\\":null}`'\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"\\\"\\\"\\\"This is a code cell with metadata `{\\\"tags\\\":[\\\"parameters\\\"], \\\".class\\\":null}`\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {\n    \"key\": \"value\"\n   },\n   \"source\": [\n    \"This is a raw cell with cell metadata `{\\\"key\\\": \\\"value\\\"}`\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"celltoolbar\": \"Edit Metadata\",\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/Notebook_with_R_magic.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# A notebook with R cells\\n\",\n    \"\\n\",\n    \"This notebook shows the use of R cells to generate plots\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%load_ext rpy2.ipython\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%R\\n\",\n    \"suppressMessages(require(tidyverse))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\\n\"\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%%R\\n\",\n    \"ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"The default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAZAAAADwCAYAAAAuPDIiAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6sFtNl8auFXGMTP34sNwI/JhkgEtmDz14ySfaRcTIBInmKPE32kxyyE2Tv+thKbEVePDfW/byMM1Kmm0XdObS7oGD/MypMXFPXrCwOtoYjyyn7BV29/MZfsVzpLDdRtuIZnbpXzvlf+ev8MvYr/Gqk4H/kV/G3csdazLuyTMPsbFhzd1UabQbjFvDRmcWJxR3zcfHkVw9GfpbJmeev9F08WW8uDkaslwX6avlWGU6NRKz0g/SHtCy9J30o/ca9zX3Kfc19zn3BXQKRO8ud477hLnAfc1/G9mrzGlrfexZ5GLdn6ZZrrEohI2wVHhZywjbhUWEy8icMCGNCUdiBlq3r+xafL549HQ5jH+an+1y+LlYBifuxAvRN/lVVVOlwlCkdVm9NOL5BE4wkQ2SMlDZU97hX86EilU/lUmkQUztTE6mx1EEPh7OmdqBtAvv8HdWpbrJS6tJj3n0CWdM6busNzRV3S9KTYhqvNiqWmuroiKgYhshMjmhTh9ptWhsF7970j/SbMrsPE1suR5z7DMC+P/Hs+y7ijrQAlhyAgccjbhjPygfeBTjzhNqy28EdkUh8C+DU9+z2v/oyeH791OncxHOs5y2AtTc7nb/f73TWPkD/qwBnjX8BoJ98VVBg/m8AAEAASURBVHgB7V0HgBRV0q4Jm3MkyxIkByUqIoqKICoGxDMhYuLU80yH/5k445kDZ86e6cyYM2BOgOScc9plYXOY8Nf3Znumd5idmd0J2ztbpcP0dL/3uvrr3lf9KpqcTCQkCAgCgoAgIAg0EgFzI9tLc0FAEBAEBAFBQCEgAkQeBEFAEBAEBIEmISACpEmwSSdBQBAQBAQBESDyDAgCgoAgIAg0CQFrk3qFqVN5eTk5HI4wjeZ/GJPJREbxFwAv+ETr2v0jY7yjZrNZ3Ssj3S+j8IK7ZbFYyG63G+bGGe1vC8B43y9glpycbBjMYoWRZhUgFRUVZLPZooJlWloalZWVReVcgU6SmJioHuZ9+/YFahqV4/Hx8eo8NTU1UTlfoJNkZ2cTno2qqqpATaNy3EjPDoRrXl4e7d69OyrXHugkEB4pKSmG+dtKTU1VL2fef+t4xkWABLqbjT8uKqzGYyY9BAFBQBAQBBgBESDyGAgCgoAgIAg0CQERIE2CTToJAoKAICAIiACRZ0AQEAQEAUGgSQiY2Fuh2VKZlJSUEIyC0SAY0YxiJLZarYSPUYzE8FABGcWzB04GcK6IloNFoOfPSM8OjNYwBsOD0SgUFxdHtbW1hmCnIYcQeDymp6cbgsdYYqJZvbCqq6ujNknAk6a0tNQQ907zwjIKPw390TUXWJiQKisrDSNgjfTs4IUrKSnJMM9yU7ywHPzK+v3KZFq1I4FyUm101vBSMpvC87RpXljef1vaMx6es8goGgLNKkA0JuRbEBAEWg8CH8xLox9Wp5DNbiKL2UlWXgCfOdQYL3et5y6E50qjoz8KD68yiiAgCMQAAqt3JijhgUuxO0y0YntCDFxV67wEESCt877LVQsCzYZApxzYSzym1/IamYaa7WaEeGJRYYUIoHQXBASBxiEwaVgJLd+WQAlxTspMttPlo4sbN4C0NgwCIkAMcyuEEUGgdSCQFO+k+8/Z0zouNsavUgRIjN9guTxBwIgIfL8yidbsSqCu+TV0fN8KI7IoPAWBgAiQIECSJoKAIBA+BN77PZXmrExVAy7anEhbiqw0dVRJ+E4gI0UNAbFeRQ1qOZEgIAgAAbjwEiHwg0ss8GfR5iTsFmqBCIgAaYE3TVgWBFoCAhv3xtGfmxJpf0X9aSaZbSB6QjyIUMtEQFRYLfO+CdeCgKER+HF1En38Z5qK96i2menmCXupY7ar9s+FI/fTE9/mcN0OFiT8/wUjDhj6WoS5hhEQAdIwNnJEEBAEmogAhEd5tSvHGob4ZmkKTT3GJSj6dKyhf52xm1ZyKpOC3FoqyItOUbkmXop084OACBA/4MghQUAQaBoCmcmOegLkQKVHmGDENhkO/lQ2bXDpZRgE6isnDcOWMCIICAItGYEx/VA+2kmJcQ5KjnfQuUeKmqol38+GeJcVSEPIyH5BQBBoMgLDulXxCqOIisvN1CnHxll37U0eSzoaFwERIMa9N8KZINCiEejM9o3OueG9BFQv2lNioTiLk7JTHeEdXEZrNAIiQBoNmXQQBASB5kLgpe8zaXNhHJVUmem0QaU0uo9EsTfXvcB5xQbSnOjLuQUBQSBoBH5fl0TLOAljYZmVatg1+JtlKbRrf33jfNCDScOwICACJCwwyiCCgCAQaQQqakxUbfMEHTqc+C1TWKRx9ze+qLD8oSPHBIFWgMCs+Wm0ZGsC7S+30Hkc1De0a5Uhr7pvx2qas8JORbwCMXMQooVlR8dsY9RiNyRgUWBKBEgUQJZTCAJGRQCCY86KFFUZEDx+MC+dOvGk3DbTeF5T+el2uv6kIprL/KYlOejonhVKiBgV29bAlwiQ1nCX5RoFgQYQKOE8VXadMxOyVJVWWagtGU+A4BKyUhxSP72Be9kcu0WB2ByoyzkFAYMg0K1NLbvEasw4OXrczK63NdoO+RYE/CIgKxC/8MhBQSC2EWiXaaMbTymkjxekcVyFncYNKKN4mRVi+6aH8erkUQkjmDKUINASEeiQZaMrTpC65C3x3jU3zyJAmvsOyPkFgSgggPTq8zYkUWWNma4dV0QpCbB2BKZt+6z0ycI02ldmoYlDS6hX+9DVW7C5fLIwlVZxNt5k5uOK4/fp1GiBeZIWxkFAbCDGuRfCiSAQEQR+WZNE7/yeQet2J9D2Yiv956scqg3CRr6f81j9++M8Wro1kfvF0XNzs2grl58NlRBNPnt5Kpeyjac1O+Ppnd8yQh1S+jcTAhEVIJs2baK9e/c206XJaQUBQQAIrN8T73bTRRnZKg6dQMxHIILQSE3wSJpaDuLbwftCpb2lVjc/CAZcvyf0MUPlSfo3DYGICZC7776b5s+fTw8//DAtWLCgadxJL0EgDAhU15oIwXJPfZtFCzYmhmHEljVEl7waFXincb23NI4ykj2CQdvv/Z2bZuOqgZ69dp7s8zNCL/4EflQ1QjW0k5w8rlDLRCD09aiP616xYgWlpaXR6aefTmPHjqXiYjHQ+YBJdkUBAQer+u/5KJf28Rs33nahd7eai2lg5+oonN0Yp0jn4k7IYusiJ3XOqQ0qAK9Nhp0uGrWfXv0xkzJZ4BzXt5y65IUe+X0W21K2FMUpewyCFs8/SmqFaHenpX1HRIBs3bqVNmzYQLfddhtVV1fTNddc48blqaeeovfee0/9fvzxx6lnz57uY5HcMJvNlJhojLdPE7/W4ZOXlxfJSw56bPACcnpmmaD7RqIh7lV6erp6CQl1/KJSzhhqcQkPjGVzmGj1nkw6YYguei7ASYz07IDVxj47q+ebubST9pZvohpHHJkS8igvM8CF82E8oqMGQvpAWZFW9+EvHQGfpKQk3Z7Amw9N1dpAfRW+nO/gBeT9t15TE7rxXw0s/9RDICICBBNRbm6uEiDLly+nWbNm0bXXXqtOPHHiRDr22GPVdmZmZtRWJykpKVReXl7v4pvrR0JCgnrADxwwxptXXJxLB11bG/rbZTgwzcjIoKqqKvXyEep4NZyAz2rGTOl61C1mJ0+FVfzcBf8shPvZKa820fcrE6m00kxjB1RSJkdXB0uYILOysnz+3SzeHM8rrDjK45Qfx/X15LPKTUlkDFKV8MR5dhabyFa9n8dwL0uCPf1B7SDMIDwqKoyRVj05OVkJWO+/davVSjgmFF4EIiJACgoKaOHChYpTPGCVlZ7ax23atCF8QDCw22yh61TVYAH+cTgcUTtXAFYIDzOEbLSuPRA/2lubUfgBNna7PSz4WPmF9OJRxXTvJ7mUm2qjQ7jI0ZmDD/DYgVDxHA/nswPvp1vebsOGbJNSqS3eEk/XjN0XdMW+hu7Vz8rTKo29q3g1wGVkS3g+P+VwlJXlFUTPMlrC50EhJrjvTh65n+LNtkZh4EGj/hb+vsOJT/3RG/8LvIAn72dZw63xI0oPfwhERID06tVLCYmZM2fS2rVrafr06f54kGOCQEQRaM+Bco9fuCui5wh2cBRDwirI4XSpWhBfsXZXPOV097xkBTuWvt1Pa5KV8MC+ylozLd6S6BYgyFoLISUkCIQbgYgIEDB58cUXE/SOUI/gjUBIEGiJCGDC37XRSilxCdSP04kHS2VVJjWJY/Ie1rWS6lTzlGBlFZruzwHHE3nFECq1Ze8o8Ao3XdD+ivpuulh9rN4RTymJThpU4FFvqcbyjyDQRAQiJkDAT3x8fBPZkm6CQPMjgCC3p2ZncfU7E0/6CTSBS6ie2D+w7aSG1WO3vNtGZbmFsPh8cSrddvpeFW3dKcdGx/Yupy+XplJagoMK2KX1sDB4hJ05tJT+3JRE6Uk2JaCuPMGz4igstdBdH+YpfqDSW7K1ki462hj2t+a/y8JBKAhEVICEwpj0FQSaGwGk20DpVBDcgX9fnxSUAIH6iKMblJoK/RCHsoGD+Xq2c3kCjR1QTkO4aBOc3nLTAsdjBINDWqKDHjpvFxVykB5cbpPiPQbyL5ekugP3bLzY2ci87Cszc/LE0Fc+wfAmbWIXAddfR+xen1yZINBkBLwn92Cit3EyvOXr/7AgQOIsngkdbXI48633+NgPWs0rn8VbEjhOQqfrch3y+y/SsiO7rl54oENGkp0VW57zH2DvL08Kd79DykFBwC8CsgLxC48cbM0InHp4Ka86kpWbrZOXEvBeCoZ6ta+iGjtch12Ttp1jT+D9FQy990ca/cErHZvdVf/77kl7VBGlYPo21AYBgN+tSmGhAQ8lovEDSlVFv4bay35BIFgERIAEi5S0a3UIQMXzMKuFiqvTKZ7KGlwxeAPzKWevdZFrBeFgXdVPnA332N7+Pa2QvPC3dclUwRlzXeSkH1Yn02mDXO64dTsb/QXX3fv/sltFf2N1glWKkCAQDgREgIQDRRkjKgjAngBPI7xFFwT5Rq8xtoRVQsU8QQ9lj6jkBG2v63vdrjjasi+O+naoojYZ9e0CmHDzcxxUWhq8rcLb6dCjPKp/Xl+/ktmw7hEgRBVcITAcZGX1Vtf84FZB4TifjNE6EBAB0jruc0xc5X++yuZgOKvyijq0bQ1dPrpYCZNAF/ffH9NZLZSsFEpvc1pzeES1y3QJhB9WJdHbdenE36MM+tsJRdSnY2hpL8b2L6U5K1KYLZfogCdWoNUHrgER6YMLKmn2ilSK41gReORCjSYkCBgVgfC83hj16oSvmEFg6dYEtfpAfAPe0DdwCvA1HIAXiHYfMCs7hisXlEul9OpPsE+4CMIDx7RcUfpjWpvGfq/bnegSAJAA/EnhVQX4DYZOG1xGV4/ZR1M4ieHtZ+6lVI7bEBIEjIqArECMemeEr3oIIAminlDVDp9AZHOYVVwE1F8uMqkcVNovK3tH1bLBWqMKL8+nWjYXbN9nIgufP9gqfnCVVbKjblBkAYZRXE9FHJthZ57yOW+VN2F1JSQItAQERIC0hLskPFKvdtUqmtti4khuVu/E85OrxVX4gwf1vvPTbbTrgOdRP+9ITxAdPKaWbvVkkh3Zw5MUsIKTHj7yZQ5P/hZWnaXQLRP2UofswAboPh2qlWrNYnYo4ZUc76DubTxC4cslKfQzpx5BgGIBp0efdlyxaufvOuSYIGBEBDx/VUbkTngSBOoQgDH7PvYkWrAxiSdnJx12SHVQNS3QfcYZhfTh/FSV3gNpRfQ2js2FsKh7VgclVZ4UICjhuoNLwGrH3/w1g6afXIQh/RJWKg+c4+IVea8O61zlTmWCkrBfLEbSQ9c51+7ilCebE+lwSS/iF1M5aEwERIAY874IVz4QQPDbEU1MOnj6EN+usOmJdiqp9AgNGOk1Qt4qTXhgX3EQZWC1vlghHXnowW671bzqSOIVSW3dObEKwT4hQaAlIuD5a2mJ3AvPgkAdAkhX/tGf6VRWZeZqg1V07hElQXloDepSRUXlVlUdL54D7Y7u6cl1Nbx7BW1it+FSXpXgWG928w2VOrEKLDvFrviEXQb2kQGdPONuKbTSaz9nUjm777bleI2rOKcVEi4KCQJGREAEiBHvivDUKAT2cqbZZ+Zkcx/Xm/z8DUnUp311UEkKx3FeKuSR2rnfSjBeD2TVmEaDCqop0bqf1hamUX5KBQ1v4upHGw/fCXFOunZcEauxUlXKE4yZzCovEGwu932ap7bxD4Th9yuTuTiUxy7jPigbgoABEBABYoCbICyEhkApT7SZXPdbS2GOYk3B5q3CmY/qcbCqSeMI9pLhvWs4kLDhNlrbYL+h3oK7rjdh1ZGXZqO9nBARBM+zHSzYhAQBoyIgT6dR74zwFTQCSM0BY7UrcM+khEm/Tp6VhL+B9leY6YFPc9i116LG+PfZuw+KVPfXP5zHsjnBYhonPizkIlNOVm2Z2VlgMKvYhAQBoyIg2lWj3hnhK2gE4KH1f6cUsmdWFR3RrYIuPbY46LxVt76br1Yudp6wa9gz6pEvcoM+b7gbwtbx9xP30SC24QztUkF/Zffe3u097r/hPp+MJwiEioCsQEJFUPobAgFEbF9+XHDZcvUMq7xVLDxcZGL1kccjS98uWttQb11ybOOvI1r8yXkEAT0CIkD0aMh2q0MgJ9Wm8mu5DPBOrujnCW+HlxSKMa3akcRR7/FcV7xIBTAGA9KKbfEqH9YBVo1N5bQkqMsuJAjEGgKiwoq1OyrX0ygEoPpK4biMeKuDuuXX0L840aJGqM3xJXtLrdttoU174yjYPFnw6Hri2xxasSORthfH0WOcBHIfZwIWEgRiDQFZgcTaHZXraRQCSZyP8cHz9vjss51TvGs5uJBscdu+4P5ckHIeBnDEeIDw7y4WKtkpYs9QgMg/MYNAcH8RMXO5ciHRQKCG8wPe93GOqs+NTLR3nLWXA/E8Z/5jXSIt3soZazmR4eSRB+oFyv12YAF9sXUuVdRW0u2db6AUS7KnYxO3UFL2c15JYGVwBAcHIr4jGOrG+avWc/1wTRDAzTYYymVXXMR7aCVpEYiYF2Ttc7ggf76IeeXcXUf3rOAgw+B4DYYvaSMIhBsBESDhRlTGo//7X5u69BwmOlBpors+yKO7JrlUQz9yZb53uSYH3uzxls7F+mjqMa7khsvLV9NtGx+gwtp9/NZuoo0VW+iNPk9Sgjlw2vaGYIcd456PclmFZFGCYNWOBLKYijlaPfDEnMipTDxZfJ1ccCpwH/DRvU0tTRxSQp8uSlNR5xMGlVCej6y73jw72Pxyx6w8lS0YQms18zrt+H18Xlm5eGMlv42BgAgQY9yHmOLCldvJ49lUpMshtYgTB2pqIUySW4o8dTLmFP+shAfAYNFCVfYq2ly1jXokd20yPgc4zgMRItoqAufG6icYAbJsuz7RYn1eAzE0goMT8WkMQcgh27Ce16VbEkWANAZEaRtVBESARBXu2DkZanH8vCaJ06THcbBbJRugPeVSrRzUpwkJrSqfduWdcmpp9c4E9yRZWOZ5BDsndqSs6n6Uuv94nvRraXv+c5RlzdC6NukbMSJQlWmEVU9SnMfTStvv67tTdi0XgvKosBqTTHFH9S76cO9XVOusocvaX0DJFk/KeF/nwj6kfbfoVH0IjkSJWyFBwKgIeP56jcqh8GVIBJ6ZnaUqAtbazfTnpkS6cOR+6lOnarluXCE9+LkrpxMm7JsnFLqvYfzAMlrGKwCsUmAfuUwX83BE/FjqveVUctZkk9NUQ0eYz6Zsq0cwuQdpxEYi2yLiVVZdCBEuDMWTcrB2hQmDymjptkROymhmTy0bXcYldIOhElspnbxksmrK5azot5KF9EKvhwLac5ATa+rRxfQwBzPCvRhC+ZTDD055EgwP0kYQiAYCzSpA4uPjKTExMRrXSXFxcZSamhqVcwU6idVq5TdNi2H4AS8g3I9gacf+eK5p4TIqIx36n1vSaFhPl42gP8P86t/0E1/9t+/7LtCn5/Ac+2p5PAsPqI14qnfGU01VNpXZKrmIU9PfwveXcwXCKjzmLpUaeF6yPY0G9whsz8DT8siUSoVLTQ3sEMEZ9Ofu/oXiTFZefdjIwf/trS2iTY5tNDxjEI/hn/rxSV++Uo9d/WfWxJGP+BjlWcbV4LkxCj/gxRc+ThjbhMKOQLMKEPxR2mzRCbBKS0ujsjL9H2bYsQx6QAhNs9lsGH40weGaJD2XATUVVheoWTGICx5BHaRRUlwicR099RMFnmrY9SpUfJNYzRNngWByTfb7yrgUbE05j+sq+4pstbChMHQ0lAtDBZPmvIb7xFkglOp4ZeVYTW1to3ht7LNj5rK4ieZEvg7X81ZmKyNntTOoczqcDppd/BNhFTM6awRlx2VpkKtvPDfJyclBjVWvY4R+YLIGhXrvw8UeBBl48uZHe8bDdR673U779++nnJyccA3ZIsdx/VW1SNaF6Ugj8MgXOfTGLxmESnw3vNm2XjDcuXVlYeGyClvBBUeFnn5jBBdgap9VS1mpTpXLCmPmcIJBUC1/3fZ+Pr31W7ri6bb38lmwBUYAaqEi0zoWG9p/JurYcU3gjiG0GJV5BB2ZMZjtN5nUIb4tXdL+POqX2jOoEaevu4vu2Pgw3bN5Jh2/6GxaX7k5qH7SKDoI4IX3mmuuofz8fDrqqKOoXbt29NZbb4X15Lfeeis98sgjYR0zUoMFXIGsWrWKlixZQpWVHo+ScePGUZs2bSLFk4xrAAQQNFfIeaFqbNo7hpP+5HKyJ/RzFVzqxq6qD5yzSxU+wiRv1Rl/m8o+xriRS8bWWrLJznEgSRaPqgt2E6yIbA4XPzYWKOt2x7vtLg2dc3NJCVWXtyFrnQoL7T5dWUXHHNJQj9D34w34/m630taqHexVZaH2CcH9reyo3k2LypZRucNT/+PDvV/SDYdMC50pGSEsCHzxxRc0b9482rlzp1LdrV69mg4//HAaM2ZM2FYj//znP5WGIiwMR3gQbXbweZrvv/+ejj76aJo1axb9+uuv7s+BAy6/fZ+dZGdMIAD1kFXnvQTPKv1vXCQSGLbJaLzw2Fm9h2bv+5EWl604CKsKVv9sLzLTzuL6EsnCvIAHjeDlZdU9vYjXWLkjnpZsSVCrFa2dhQ3gTotnQnaSnexOXUetYQS+OyW29yk8oKb65cA8+r74V6p1eJZR8eY4SjZ7bEIwwNvZjiJkHASwAqmoqKASfjEB9ezZU82LCQkJ9OOPP9LkyZPVyqRv37508803uxl/4oknqFu3btS1a1f617/+5d7/888/09ChQ6l///70t7/9jeOinPTss8/S//73P9UGczCOdenShf7yl7+o86IN2mI8nP8///mPe7xob/hdgcyZM4ceeughmjJlSrT5kvM1MwKosTG8W6VKCJjMto+8dJuKjA6VrS1V2+mCFX9jN14HVToq6dbO19EZ+SepYRGF/eiXOVwMysorjVS2c5jp/BGuP9R+HMTXkcvBbmdHKLjldmUPpR7tPAF2z7JX2EbOVwXBAhvJXRP3KJtNx7RUGtJ7HS1a1I5scUWsH3fQP0flhnoZIfW/cs0/aXX5emVkTzQn0McD/qvcfHPjsmlKu7Pp/i1PKvdlBFBe3fHikM4lncOLwIQJE+jbb7+lzp0705AhQ+iUU06hCy+8UDkRQEsDddaiRYuooKCAxo4dS++//756Ccck/9tvvynnmTPOOIOg2cEYp512Gn366ac0fPhwOvfcc+mzzz6j4uJiZccB51CXvfzyyzRw4ED6v//7P3rzzTdpxIgR9Msvv9D69euVHWbq1Kl05ZVXEpxzok1+zzhp0iR69913o82TnM8gCMCNFcZzGNERvxGM0ToQ6/dvfoJK64zLaPv67vfdAmTOimReeVjZWuEyzK7kQL7dByxqlQOhcO24fapGOY52zvW4924psnLKkTiqqHGtWixmhzL+a5UGpx3Wnea3W0aFlVxdsG0uZSUG500V6FqacnwJr7pWlq+jEnup6m5z2um74l9ofO7x6vdZ+afQ4Wn9qcxeTj2SurIaLzpeik25ltbYBx6LTz75JN1zzz1qsod2ZubMmWpCBx4QBFh9gCAo5s6dS/v27aPc3Fx65pln1H44QUCwQO0FG8oRRxyh9mu2FAga0Nq1a2n37t0EtRk+VVVVqt8FF1ygBMdJJ52kzvH88883i/AAjz4FCKTl7NmzcVx9g3lcqEYAr1+/ftpP+Y5hBPDWH07Ki6vvtVLILq4a6fNlYV9VbX1Vk43VPYucX7Bix0Kd6UStm/pGrEdF3YLEJX7qHaas9EqyJpdysF5+/QMR+mVnwbCifI2ygfRJ6VHvLAmsqmJNmiKOO693DD+6JXU+aJ+2Y1vVTlpftJlybJmUbk3Tdst3lBCAKmrQoEFqFXD++ecTPpdccgl99NFHSp2UkeEJfMWKAOomCBDMn71791Zc4rtTp07KhpKSkuLmHKoxzasNO9EP4+n7jR8/Xq12li5dqlYueMG/7bbb1KpHP0e7B43whk8Bcvzxx1OvXr3Uqa+66qqDWOjQocNB+2SHIBAMAhe2m0QfFX1FKeZkiuOJ9LJ257u7De9eSZ8sTFO2Ftg7+nWsUqsPrcHxiybxm3mFiq14YtuL9OXA/ylj4yE5Nl6R2KhyB1sNuF9uqkOp37R+s/Z+Qc9sfxXWDyq3V9JnA15j99hM7XDYvzFpXLLyetpZs0ep6UZlHkl3d/0/dZ5+Kb2oe1IXquA0LWa2z0BNdWLOsUHx8EfJIrp1w33qmndX76VP+r9KHRM9L3ZBDSKNQkYARu4PP/yQsrOzlU1i2bJldPbZZ6txf/jhB4KNGO7EUE1BvQQbx+uvv06nnnoqwVYCtdQxxxxDZ555JhUWFtKuXbuobdu2NH36dCWcNAaHDRtG1dXVqj/UXW+88QbNnz9fqcfuuusuevvtt5VdBKo0qLMMI0CwBMMHujcYfXCxGt14441q88QT678BasflWxDwh0BXfrv+9rB32IC+nHJY5z8wtY+7eVqigx48dxdtL2MbBU+wXXI8cTtPbXuF1T6e34W2Ynpjzwc0ue1Zqv80Lv8KIzpiSHq0rWEh5Bp2v62EHtzyFE/kLo8uJGl8bdd7dE2nS93nDffGt8U/0uqK9VTldAUr/n7gT+UwgGuF0Hiq533KiA711dC0gWRlT61g6MZ1d9KBOtUX2j+x/SW6r9stwXSVNmFCALaGTZs2UY8ePSgrK4tKS0uV/QH2jq+//lpN4pj4oeoaOXIknXfeeerMWKnAIQnxKPBghTABwcZ81lmuZxhCBPbm22+/XR3DauSxxx5TNha8lCD2BIIIBnWowXAeB2fgPPTQQ91qMNUxiv/4XIGsWLGCYCxCoAwiuMEsCBcBA89f//rXKLIop4o1BHI4OO64rJE+LwslXQd3dbCni411vp4mVY76keOI6qj22uerfjhUSTBOb63eoQZDv128MgiWqh01tKt8IyXZ4inDml6vG8beVr1TeU7lxXtUc64IdKe7ba2zlmp4HD2NyBiq/xnUdn58Hmc3dtlO0GE7n1sougggkBOTPj579uyhvLy8emonqJs++OADFfagj87HqgUv37BjaPMpOD/99NPVp7y8nDR11t133+2+KBjZ8UFgpH48vNwj8LeWg2K1fu5OUdzwKUD69OmjjELQr3Xs2FFJOvAEqYrISy31RRT5lFO1cgTOb3smvbb7vXooXNB2Ur3fvn5AWA1PP5x2Fe4lG7vEIsXItPaTfTU9aF8pR5BfvOp6quGEiPAee7fvc9Q9uYtqB/fbf6y7gzZUbWaBtJf+3fUmGpM9Sh07KmOIcgOw8rmwukizptIgNoyHSqfljqVHtj6rVHhw972qw9RQh5T+ISCAYEJfhPlRP9lrbbQsAtpv/XcgIeBrPKxmwh1hr+cpmG0Tryo8r0pePaDbQ9CMnrAigYvagAEDKD29/huZvl0w23v38h91FFOZYLlpBEIqE7yFwEhmBNIeQu9UJs3FG3TLMCjibU2jnzlu4oa1t1M1T+YgZOl9pPvtdFhacM4cczlVfFFtMQ1NP4yQ9TcYunzVdJpXusjdtH9Kb3q1j8vnHiq1/+56h4WLyxsMEeev9JmpVjvogBXTV0XfKYF1XPZITm2S4B4nlI3fSv6k/XEl1NHeLujo9lDOF6gv1CyY/LxThwTqF6njmGjBk/ffOp7xSKcdwTmLiorU/Bip6zPauD5XIBqTAOPqq69WkZZYlXz33Xfq5sA+snz5cvUbejshQSDSCFTWGZ1ZA6XIznEkFRxHEiyNzjoq2Kbudt6T/h5eaWgE+4UmPLAPqxvwSHXlTdD3tLyxWvOwfY/IHKLUJnDvFIouAn7etRUjEF74BGqHxnpvq+heRXjP5leAwBZyww030B133OE+K3yPEcwCn2Z4Iog9xA2Ne+OXtUn07bIUzgJrptG9y2n8Ya70H+4GUd54eMsz9NP+32lX7V56oNttdHTm8KA4QHnZh7Y+QwdqS+gIzu10R5d/KCMwOm+u3EY3bbiHDnDSv0y2Dbzc+zGKD6FyoMbQpKWX0+bqrSrI7vqO02hyO5eB8XBeabRhG8Cmqq2sHjIp+8egtAFaN/ph/2/0H/bMKq49oJIQ3lpwrfuYv419tfvphnW3q9VJOXt4fdj/FVY5pagup+aOIVRJ3Gfbr1YQw9IHuYc6Ifto+qzoW9pTW8irjDjKjMugjgniEeUGKEY3ECwYitYEXljaij8WIPIrQKBi8V5hwK0MAS6wjeBbqD4CCGp7kxMQalXl5q5MIeSN6qmLmq7fI7K/Pi38hj4s/FIFpuFM92yaSS/1ftRnig09J7s43cgVHDGt0Wz2LBrBuv2Tco5Tu85cdonSxePHnppCenHH/+iKjlO05k36vpETCa6r2ujuO3Pb80rl1CulO3tsZSkh9crOtynNkkJn5I13q4Vgn7hm7W3ufl8WzVW8NmSodzfkjbOXX66EB/ZBMD3EHlt3dJ2umozJPka5G8+rXEwF1k4EgaIRYjue6Xk/wUW4LQs2BADGyluldo3yfTAC8HrCp6kUSt+mnjOS/fwKELiXIVQf6irkXEFUJSQwdNRwNXvttdciyVuLHLuUa2MkcWW58mqXayaiuMt4JdJchPriiGr2kJP22w4EFCDF3KZdfBuOZXCpSuAGi2R/GnVKaM8rhW3qp43jK9ZUbtAONfl7b019mxC0VfA0ggABYaVzbafL1Lb+H/DaJi6XdvNqAIRkhBBqwVAm21JgGwHBQ2sVu9/qaUTmUBrb6biDdOpo0yXpELpeEh3q4ZLtVoaA35kNQuObb74hBA6uW7eOLrvsMkJyL3gZIEjmsMMOa2VwBb5cpPzQEwoYdW9T34VTfzzS2zAax5vi1Wnwho1Yiu5JBe7Tfs9pNM5ZPI1Gz5tI3+77wb2/IJEjZVk1gz4gRJAfw2nKNUK0NFfwVj/h2TQm62jtUJO/x+ccX68vijEF4+6qeNHFUuSzMBmZ4VHT7WbbxZWr/0knL55Mt214QOXh0k40In2IMnTjdwLjBA+qYOn5HW/QX5ZNo+MXTlJeWvp+nxZ+Tectv5LGLPoLIQ5ESBCIRQQsvJK43d+Fbdu2TfkaI8oRqw+sRpAFMhzR6PC0idaSDrrHaHgZJXAJVRQ7KuJa393yq2nK0Qc4EaG9HsRIcQBvNuAZacqPz6VhaYcTdP1QQT3c/XZKrdPxr63YSJesvkG9rUP//weXXj0ifTDlxmdzlLiVTs4ZQ1t4ldEnuQdd1XEqe/24shOAZ6iHttfspAL2aLq03Xk0Ltel2grlevqm9qA0cwqtrlxPBUmd6JVej1F2fP2CSr7Gh+3l5NwTOH36dkKk9987Xko9UrqqpojjGL3wLBUHghxcm6u2qRQg2rUMZ7sGgg0hIM/On0BT251zkCrK17Pz9u6P6YWdb9RFm1epwMBTGC9Eli8qXU7XrJtBWP3B0P/Lgfl0LBeHwgoqVNK8nhA3YAQCP9DpR+NvK5jrBS/gyZsfvPTq4y+CGctXG8RdhDJn4W8fn1hRd1p9gaTtQzZepBBG1LkefERASj0QDaWDv7NSHITIaKPQwLQ+NDPtroPY2Vq9nVItXN2OhQcInkUIjNNURjAmP9T9Xwf1ww4IGC09h88GTdx5fruJdHXfyw5y4w00HCbnhw+9/aBmEJxQt23hawXBDRhp5P/S5jT1G5HhN3a+Sm035h8IolKdahBpUvayCg2YIWgRqzPs02hH9a6g3Ye1PvLdwhCo4hfCMhbsHKHOapqwMQ+hhRdOI5JfAQL1FRIrIs2wUOwh0I1VWUhMqBFsB73r7A3avpbyDUP6zK0vsADcoQIFEXsBQhQ67ByaAIG67bDUvu7LQoT4Y1ufp4WcWqULq+3u7HpjUKlFhrAH2Ky9n7vTlexmm4vmhXUo57qCG69WGApeXIcmu1ZE7hPLRmwhsGc3WV54jt/CWIVdUUn2Gey5WpfBI5QLhccX0qEYNSu6XxUW0pYsWLBApR0OBYSG+saiCquha9Xvj6YKS39e7228tSMX08rKtdSXS67eWTDdEBNdUlKSUpsG6y55gFVQ4xafRxurtlAR58j68cDvNJgn+LYJ+ZwN10wnsH0GAXhYiSCZ49ltJrihuGjltfT9/l949VDE6i24D9fSMI5c15MvFRYM6OmWNDbAF9EQxvDJnveqiHP0gwqwb0pPWsMqwv6s9sMqThMu+nGbsi0qLP+oNZcKy3LHDDJxEkUT1NIsREysnnf2Ozj7gF6FhUBqlK9FJl+YBGAmQHoUvLRj3kValI8//pheeeUV5cQErQ9StyN8oqCgQDkzLVy4kGbMmEE//fSTskljpYL8Wc8995xKsHjkkUdGVF3mdwWSmZlJL7zwgsr6qDeYSzp3/w9xSzoKW8D7h72oWPbWG7eU69hYuYVgOEdMBggeY8s5lboWpY5UIm/2fcrn5UD42NlYD0IOKwiav9HFPtt67zy7zaksjFxJ8byPDc8YRG9nPOO9W37HKgJQW3FWXZByO9kVOE8Z6p4jwSLqgSCuDqVxL774YnrwwQdVzsF//OMf9Oijj6pjqB2CeReOTUjpjqSLcGi67rrrVPVCxOyh0BWyAsDcgLTzKHSFuu1avZFIQO9XgCDjpFbkRH/ycBjQ9ePJtjERQFDe8zteV3aRi9udyxOyR/VTwnmirllzK7vybqfjMo+iW7sEF7iHK/288Fuay2/9CazmuZ2DE4PNRtsQSu245jhccDXKsmZyTY0C7aff717J3d2JFlFCFmnmhQSBxiLg6N2XzLyiMHHGXCevAhxHjAg4BMIkUC4D8+m0adNUavclS5bQvffeq/oilRRWLHAAwMoCAgLlcLEKHTx4sCqlC0GCUAv8RtA38nOhwNUVV1xBGzdudJfeDchMExv4FSDIQY+PUOtDALaBk5dcoHI6YXL+nd/MX+z1qDv/0phFZ7tTebxf+JnyPpre+cqAQL235zN6gEu2QlUEQzMKKt3DiQhDIUSoP9RtBl3HEeX5nBV3Qs5Yjpz3RI37G/tfXW6gFRVrlSvvwJQ+dHPB3/01l2OCgE8EnBNOJwfnuDNxBnNn7z7kHBg4xAGB2ihhi5RREAIQGPBwffXVV5WnF+qiQ3hoqVGQ+Rd9kNMLQdyocrh161aVrxD2atRJx0s/0shD0CDsIlg1sM+LCmKnXwGC/iiOAh0dEtth+YScWLgQodhGYH3lZtbxp7rraCDv0zwuaNSPbSUgeGzpafb+nygYAYKIdggPELyUVpSHJ5vBAPY0m334O3qWgtpOYS+0Twe8GlRbaSQINIgAp3l3jhuvWwc32NJ9APaaiy66SM2nxx57rHKHhsF88uTJygaIwn5YeWAOfvHFF5W6SksdhRogmI8hgLAKQSLHc845RyW4Rc0Q1EzfsmULwc4SSfIrQOBrjhq/0L9B8kHi4TcKwuPihWIXAWS79SiFiFU7SezR5InJ4IU11dTZDoCCFqyoIfIVpxNZUrZSGef1AYK9WWU0nzPcagJIalpoiMl3a0MAhfrw0dcCwaoBdhCsOqC+AqEKIYpJ4feoUaPUyzwyeoOuv/56JWzQXpuTUcsJKxetv2oYoX/M/sZFCUWUX0RGXhBKME6aNElZ/P31k2MtHwEUSELNC40gTOCppVEPnVsqotVv6PRX7RA9t/01un3Tw/Tmnln0wOYnCUF3Gl3eYTIdktCR2nOalD7Jh9Ks/i9ph+RbEGiVCHjXAvGe/GHz0AsDTXhoYGGVogkP7IPXoL691i4S335XIGlpaaper/7EqL17yCGH6HfJdgwisK5yE1nNHCNSp6lCRPVPB/4glKQF7WH3VY1gI/l633d0TJYr1cmnnKVWqyCIEqyfF83mwD2X6yziI97v/4LWVb4FAUGgBSPgV4BMnDhRFY6Cu9jmzZsJqdxB3bt3D/qSkfoE9UOEjIkA8kQ9t/kNxdw/Ov6VkiyupTEq3iGGQqMkcyLhoxEy4mpus/Be0kddo2CTVkIW7ZG8MVhCwsavt/1AVruFjks7ql43VAicu/9nlZ/rJM6bFar3Vr3B5YcgIAg0GgG/AgTLoqVLl9Ls2bPp559/VilNYOEPlr7jAlRPP/20iiMJto+0ix4CKIB00uLzef3gsnbM2vM5fT3wLRUI1ymxPee4Op8e5PTmUGchH9akfE/Mwy1cb+PiVdepALk0Nrb/q+B6N+MI4sNqRaPz2pypbfr9RtqRaatvpJ2c9gPlYFHv4ykO0APBK2w8e4UhtxXoiW0v00cDXnGndFc75R9BIIIIwM6AINdQKFZyYGkY+BUgaAT92rhx49QHv++8805VBB4lbf1RYWGhspVkIcBGR4is/OGHH9Qe+D6jrkg0CDpB6BaNQOADHwRqNie9tO4Zt/AAHxAkH5V8RTd0v0KxdUnm+TT+kBPUpH1IUgd3MSkcHJ05kua1+UoVm+rEx+LNnlw9s5Z9ofpr/8wp+Ymm9bxQ+9ng90vr3lKpSNDAzjmrttbsoEJrMXVP7UJf7J7N+xxuD65astEa50YapcsQ3ODAIR4w0rODCQif5n529JACn2jp3PXn9bWt8eH9tx4Od1bgjrxUMGg3lTCfajw2dQwj9QsoQLyZXbx4sfIc8N6v/w1J/eSTTyrj+y233KI/RO3bt3engccKJ1rRzyhoH61z1btgHz/wEDWFn/Xlm2gdp8fontyFuqUU+Bi5cbvina507doKBL2tTqsbJ9zH1QfWqVKtOeZMFfinP0M6pVJ6XCp8etkjy5Oyvn1CW9pSud3ddE91oXtM904fG2nmVKWW0jy0inlF4rTz2DU1ZHaYVQLHSlfQuFqRqPPysUhTU+5VpHjCJOYrtUqkzhdoXE2gGeVvK9L8QICEIozAX6sWIIEeKBz/4IMPVCXDnTt3qqyq8EfWDO9DhgwhfEDwUUY+rGgQ3kiida5A1wMvisbyM79kMZdevYPfwu0qSd9TPe6jI7nMbCh0Ts5p9NK2/ykbhYntGBnWNJqSN8mN0z/X38MBhAvZG6tWrU4+H/g6t0kPeMpj0o6g3/YvULYKCKeL2vzFPaa/zidnHE/PW18np8nJTsJmOjP3ZMpzZqu+QxIHUI+krkqAIn17/9TeNCChd1Dj+jtnMMcae6+CGbOpbSDMUHfbKM+yNmEbhR/gA568+dF7KTUVe+l3MAKNXoEcPMTBexBoiMCWefPmUVlZGa1evdotQA5uLXuCQeCezTO5GFSpuylSjIQqQKyckn3O4e/R58Wz1bjjMka7x1/PXli/ck107ZwwlH9RNIfOaXO6u01DG6/vfl8d0lY2X7AX1ml5Yxtq7t6fbEmizwe+QVvMnA691kSdrR71poULRj3f6yFaVrZKTRBIVigkCAgCzYuATwFy0003qVWEL9Z27NhBf/+7/3QPCHbBB/T7779HLJuvL/5idR9Ktm7ibLEawXsqHAQ1VbfkAjUU3t70hAldEyCI9dBUS/o2vraRWmR7zS73Ia3UrHuHnw14Vg3JGqjeIJH9wJu0QlDe++W3ICAIRB8BnwIEibjOPvvsBrlBGH2wBC8sodARuLT9+fT76oUq2R/exm/q7F+IB3vGa9fOUBUAEbfRj9/q/3Po3cpYjmSEg9L609zin9md16IC/87KPyWoYS9pfx79ueamOl7NdEvna4LqJ40EAUGgcQj8+eefKr2Ud3Chr1GQXBHtkDY+XORTgMBeodksvE8Eu4XoE71RifzvIekD6aP+r3CNiQ2qst2hbEgPlaCiml+6WJVdxVjLy1dzOvMF7jrk93T9p1JjwYUWwgRBgMEQSue+3+8F2sBp1rty3Qwt+DCYvtJGEGiJCFTYK+ne9f+hpaUrqV9aL7rz0BvreS1G6pogQLp27aoEQ6BzwAMWwsPf4iDQGN7HfQoQ70b634gDQbES5HARii4ChyR2IHzCRRAMWF1ohNQlNWww11NT7SwQGiI49EjKdiwjcOafU5XnoYOdRjZUbCbEUU07xL/rOgpHITkiXsjfeecdVbsDHppInIh4k6lTpypV7ueff64KTMG0gPRSa9asUTVBkA4e7TWngYcffljVEUE+rV69eqkqhojfQ/opffwe1NaocKg/9vLLLysXZdyjyy+/POhbVV/pHUQ3GMRFeAQBVAtoMjT9MJc7bB2vyJJ7VMbQFsC5sCgIGAsBB0/KEB4gZK7+uXheQAbhaPTFF1+oxImPP/64Wh0gkeLpp59Ow4YNIxSUQjzdAw88QBdddBEhhGIXF61C299++025tyMbLxyVrr32WlV6AzVBUJAK2UNQpfDmm28mCJaVK1e6+fF17NNPP1W1Q0444QR3u2A2fK5AEMOBKPKG6I477lB6t4aOy/6WgQBUVjCOa4T0JQvLlh1U0lU7Lt+CgCDgG4GuyZ1pS5Ur9gmOIDm6zNW+e5CqGDh9+nQVFIqXcmQ89y4ohdXCiBEjlEDBcdiUTz2VK2GyjRqrD42gysIxuJy/9NJLamWD+iAog4t07witgPs3CEUCvY9hP1Yqja3/5FOAYLlTUFCAMX1S27Ztfe6XnS0LAZR+RcoQclYrxlHSFelNhAQBQaBxCDzYawZNWDCFUF9mWObhdHO3wE4unTp1UqnZYRLASzmydngXlIJ6CoGjINifUdYWFQyh3urfv7+bSTg2oZ46bBxog9/r1q2jfv36uYtPaV6NKDrlfQwDaedxDxrEhk8BMnDgQMIHhKLtOBnC9x0Oh6qeBeays7ODGF6aGBmBAal9qE18LpVXuYI54YkFtZZGv7GR/aGtzxDqhh+ZPliVnzXrEixq7eRbEGjtCKRZU2nucFf8U2OwOPfcc+mpp55yJ6j1LiilHwvxdeeffz5B8GAuhnDQCCU3UB8dtpNBgwYR7COoFfL+++/Tfq6SiCJTr7zyimqOc3of+/rrr7WhGvVt4iWSS3HnoxvKJOKCIDAQwo84ARQ/wf5wuIJBooaSFsAHyw3uQmp66ByNQHClQ+F7LEmbm0pspfTf3e9QijWZTs06USVOBE+7qvfQSUvOd7OHTLy3FVxHJ+Uc594XqQ28nCCSWHtjitR5gh3XSM8O/gYxkezevTtY9iPaDm/IqGcBPbwRCGoa8OT9tw5DNUrBhkKYKjH/hTJn4S0ff//gsSHCyzrO1VDKE30BKu8xkFJG7yWLv6GGXHz9HfMet6Hffo3oc+fOpUceeUQZbYYOHaqCApFE0Sh5bxq6KNkfPALpnL7khi5X0F87TXELD/Qu5hTs7bjok0ZQd+3gLLlCgoAgEFkEYMdoSHjgzN4FqPTc6IUH9jckPAId04/pb9uvAAGjYABLJUSUgwYPHqxcyvwNKscaRmBT5VaasuTvNOL7kzkl+UsNN2zmIwWJnbhMrSvZIljJi8uhY7NGuLkqrN1Hf1tzC52yZDLduO5ulaPLfVA2BAFBoFUg4NMGol053MlQRAoCJD09neAi9sknn6j6IFob+Q4eARREOmPZxe4Ob+6exQkCu9GJOcaLqUFhqdf6PE63b3xIBRCekTeeEJ2u0fjFF7hTq++tKaLXd31AU9pN0g7LtyAgCLQCBPwKEFQS/Pbbb5V3AAJYYOx54oknlBGnFWAT9kvcxfmrOsS3deeJglpoZcVaQwoQXDwMgw8fertPHNrF59OWapfbIvzeF7H77xQSAeITLNkZMwhAReRPvRToQkPpG2js5jjuV4WF6ESkZIfRDnU87r77biVQmmqxb44LNNI52ye0qRf5nWXNoEGpHlc8I/EaiJe2LEC0GJI4dgUekNI7UBc5Lgi0eAQ0+wQEQVM+3glLWzogPlcgK1asoAkTJij3LwSrwGMIBM+A4uJiFaTS0i+8OfiHjzhSkl+z7jbKTsikkzKOo6OzhjcHKyGf8xFemVy+ajoXeYqjE7JG0vltJoY8pgwgCBgdgcrKyrB4YRn9OoPlz6cA6dOnD/3yyy8qXwpKziKsHgTpC1c4fAs1DYF8jruYNehlw7jxNu0q2BOEheEbfZ9sanfpJwgIAjGAgE8BguvKz8+nq666ig4cOEAfffSR8snv2bOnSmEClZZQwwhsr95Jr+x8h/bWFtF1nS5X2XO11oi7mLnhBdpWs5P+kj2BkGVXSBAQBASBlohAgwIEF4OAleHDh6uCUAh6y83NVb9XrVpVL1ilJV54pHiGp9UpSzxZOOeVLKJ3+j1LHRLaqYJMOFZuL1eJ174v/JWe6/kAHZbmiSiNFF8yriAgCAgC4UbArxEdnlfXXHMNIUwedOaZZ6qEW8jyKOQbgSXlKynDkuY+iBrmy8pWq9+buD4GVD9a1k5kv/35QOCsne7BZEMQEARiGgGkWA9EiPpH0kVftHnzZtq+3eUd6et4uPf5FSBI4eCdTmL9+vUNFpsKN3Mtcbxsa2Y9Tys72d2ZOTPjMtyeS7g2ZL/NDiJrZ0vEQXgWBFobAn+si6NZfyTQ2l1NtxH/+uuvAWFDmpalS5f6bBdtAeJXhTVx4kRC6hLkjwdjCCoEde/e3SfzspOod8qhdHn7yfTE9pcol4XDabnj3HaO3Lhs+lfBDeyFdSt1SGxHQ1IH0Dn5pwlsgoAg0MIRePOnRPphZQJV20z03QoHTTmmggZ1sfm9qoYKSqHTs88+SyhBO378eJXXC6ETJ598ssoRd+SRRyoXYtQGgbMTQi02bdpEt956q3Jw0pyckNZ9/vz5dMYZZygzxIIFC1Sqd+Tagn1bn83XL6N+DvpNpoh+SKI4e/ZsVb3qxBNPVJWt/CUC83Ougw5JMsXmT6aIm6LlzzFKjjNJpnjQn4p7hyRTdEPhc6O5kile99902l/hUegM7FxL144vP4hHfTJFpF1Hlg+ETIwaNUq9qB999NFqrkXJjNdee03V/Lj//vsJMXkoDpWZmUmXXnopPfroo6qIFOZkmBRQ7wOCAdefkcGaDk7W+OOPP9K///1vlaUXwuqKK66gmTNnquzqt99+O3355ZcH8dfYHX5XIBgMcSDjxo1Tn8YOLu0FAUFAEGgNCGSnOnQCxEmVNYGv+sILLyR9QSl9kCHCJ8aMGaNWIkgpBYGCwlDwiNXT6NGjqUuXLsq5CWmmtKJREB5ojxojWhr3yZMnKyGEF8WSkhL9ME3e9ohM3RDINQ8JBQ+sG2+8kbZu3ao7KpuCgCAgCAgCegQmj6pUP3PT7JSf4aCrTnTV2NG38d7WF5S6iEvW6kkr7oTaHlo5Wni/epMW5O29H/WcoNYCQZWFcriY01EeFxlFQklJrwat+8enAIH3FSQddGooRgJJKSQICAKCgCDgG4GCPDs9NuUA/W1sBd0xqZTSkxsss1RvABR32rZtW4N25SFDhqhVxQUXXEBz5swJumog7Neoc37JJZfQH3/8oewdWI3MmDFDVT/EIiEc5NMGgnq5qMOLYlJwGUPxKCx5wmX70BgXG8jBNpClZStVAOLA1L5u7y0Nr0h9iw3EP7JSUKphfDAnSEGphvHxPqK3gXgf8/V7x44dyhAOOwlK38JADqEQLFVXV9cTOv6KUQU7pr6dTxsITqLp0vANo6Z+n34A2Q4fAm/v/pie2fEq1TpqqdxRQe/3e4G6JnUO3wlkJEFAEGhRCCCJLTyt3nnnHZVGCiqoxpCmCtP6+CtGpbVpzLdPAdKYAUJpC2mqNxyFMlagvjiX9qYdqG2kjyOLJ97cvPl5escrXH/cU3b31d3v0b973BRpdpRLYLhXl6EwDV6AkTc+oYwZSl8jPTv4e/H17IRyfaH2NRI+4MUXPtGaZ0LF0lf/++67z9duQ+xrUIBcfPHF7nKI8DdGHixtknn33XcJvshC4UUAiRb1AgS5tIQEAUFAEDAqAj4FyL333ks33dTwmy+8B8JB8FsOlzdAIH6wlDNKnAPehvB27c3PuXln0N2bH6MkcyKZTWa6sdOVB7UJdJ2hHPfmJ5SxQumLsgF4LozCj9GeHeBjFGy0t32j8IO/K/DkzU+4VrMYW3uRbsozHkrfppwv0n18ChD4HOMjFF0Ezsg/iboldybUG++VfCihAJWQICBk6FhBAAAZlElEQVQIGAeBhtxmjcNhdDnxKUCiy4KcTY/AgNQ++p+yLQgIAgZBINZWD+GA1WccSDgGljEEAUFAEBAEYhsBESCxfX/l6gQBQUAQiBgCIkAiBq0MLAgIAoJAbCMgAiS2769cnSAgCAgCEUNABEjEoJWBBQFBQBCIbQREgMT2/ZWrEwQEAUEgYgiIAIkYtDKwICAICAKxjYAIkNi+v3J1goAgIAhEDAERIBGDVgYWBAQBQSC2ERABEtv3V65OEBAEBIGIISACJGLQysCCgCAgCMQ2AiJAYvv+ytUJAoKAIBAxBESARAxaGVgQEAQEgdhGQARIbN9fuTpBQBAQBCKGgAiQiEErAwsCgoAgENsIiACJ7fsrVycICAKCQMQQEAESMWhlYEFAEBAEYhsBESCxfX/l6gQBQUAQiBgCIkAiBq0MLAgIAoJAbCMgAiS2769cnSAgCAgCEUNABEjEoJWBBQFBQBCIbQREgMT2/ZWrEwQEAUEgYgiIAIkYtDKwICAICAKxjYAIkNi+v3J1goAgIAhEDIGICRC73U5Lly6lkpKSiDEvAwsCgoAgIAg0HwIRESAQHtdddx2tWbOG7r33Xpo/f37zXaGcWRAQBAQBQSAiCFgjMWphYSGdddZZNGrUKOrRowd9+eWXNGTIEHWqBQsW0KpVq9T2yJEjKTMzMxIsHDSm1Wql5OTkg/Y3x464uDiyWCyG4Qe8gICREchsNlNCQgLh2whkpGfHZDIRPkZ5lnF/8DwbhR/wYjR8jPAMR4qHiMwYbdq0IXywEnn77bfp5JNPdvO/bds2ghABDRs2jOLj493HIrmBSTLc53Lu3UNksZIpO7tRrIMXPOS++HGWlRGVlRLl5ZOpbmJv1OBNaKxN1JogacIQYe0CfjBpAyMjUCSenaZel4aJr2enqWOG2s9I+GjPsDc+Npst1MuU/j4QMDmZfOwPeRdu2J133kmDBg2i008/3ed4e/fupWjd2LS0NCot5Yk5TJT4zv/IsmkTmXjM6rEnUe3Io4MeOTExUb2x7du3r14f89YtlPS/N4gcDqLqaiqf/k/ihvXaROKH9sdWU1MTieEbPWY2C+SKigqqqqpqdN9IdAj3sxMKjxCueXl5tHv37lCGCVtfCLSUlBQqw4uPASg1NVW9eHj/reMZz8nJMQCHscVCRHQEDp4AZ8yYQaNHj25QeLRkGK2LF5F1+XIy7ysiU20Nxf/wHZl37wr5kpKfe1qNad5fTKaqSkr45quQx5QBBAFBQBCIFAIRUWHNnj2blixZot5KZs2aRQMHDqRLLrkkUtcQ9XExuVO17u3Y6VoxhMqIIyuLLHtYLcbES0MyF+4NdUjpLwgIAoJAxBCIiAAZM2YM4ROrZOt2KMXzZG8qLiYnDL0OJzk6dAz5cm3de5Bp/wEy11STk20ANUeMCHlMGUAQEAQEgUghEBEBEilmjTKuMzeXKqZdRfE/fkcOtq3UHnEUG9Ndnkyh8Fhz6mnkzMhgu0oJ2Xv2IvuhPUMZTvoKAoKAIBBRBESANBFeJ7sfV5/q2zmgiUOy3spEtceMbnJ36SgICAKCQDQREAESTbQDnMtUXk4J771NFvawsbMbdNUFU8Kyskl89RWyruHYG3arrvrLeWQ77PAAnAQ+DO+zxPffIfMe5rXTIWpcDtwI3FFaCAKCQMwgIALEQLcy5f57yFTnSms6sJ/iv5tDNceHZkuK/+oLsq5YRlpEReLbb1JFm7bkaNcupCtXvNb51ps4XU3cTz9Q7ahjQxpTOgsCgkDLQkBeGQ10v5zp6W5uTLxasGza6P7d1A3ElmjCQxvDvH2rttnkb4cug4CJBUk4eG0yM9JREBAEmgUBWYH4gd362y8UxzEfptpaqrj0cqLEJHfruC8+o/h5v6sVQ8XUS8nRrbv7mL8Ny+pVZH39v1Rba6OkLgVUycZ4jRzZuWTiNDCY8BHdaW/fQTvU5G97j55kXbfWLUTgHmzrfmiTx9M6OtMzyanxyg4E9k6dtUPyLQgIAq0EAVmBNHCj437/lRI/+YisGzeQedtWSnrpBWVDQHPr4oWU8P1cMnO0NN6+k194lkzBRAYX76Okl19QAgkiwrJxIyVwRLtG5t07tU2CPcHJHl6hEtRKtcOPVG7BDl7hlE+7kigzK9RhqXLKRcp12da5gKrHjafaY8X4HzKoMoAg0MIQkBVIAzcMkzvUSCCsCMwV5WQqOUDOrGyyLl3ifqNXDfgf64Z1VMuGb39k5eBKPWFcy9o1nl3Iq1X3y8TR/FY+VjtylOd4E7eqz5hI+ISVEhKp4uprwzqkDCYICAItC4FWL0CsvNLARO3g+IuakyeoN3/cQvshh5B1GQsKzVDM6hpnqmtFANWSddlSz2TPaiF7x07uO2/mVUvih++TqbyCKtnryXGoS2Vk69LV3QYbUFMhpkQjR3qaSmWC3zjmSPPYRJAfK5HzZFk2bSAHryAqsZLQZc+FULMuXaz2VU08u573VtyvP1Pcj9/ztdip/Mq/hWUFwjo4iv9uNpl37CDbwMPYs2sQ2BYSBASBVoRAqxYg8FCKVxOrjZwIBDRbWIicqm5/LUeBmzlzsHXDenJw8jo1KXOqaFDtcSeQZfMmdo1dTc64eI4HmUAOdmVVxGqqlGefcm3zv8kvPstBh1eSA8KjQwelSuIMkm7hUz3Ok6kYyRkhOLRViLmo0DPO44+ReecOdQwutEmsNqv8q8t+ApVa4jtvqRUTIuMTq6qp6sKLVF/LqpWU8PGHKjUKxk594F4qu3kGb6S6x27KRvKT/1EuvGqlxDhU8erJ1n9AU4aSPoKAINBCEWjVAsTKBm33CoPVVRAImgCBDaL67HOouoEbW8WGc18U9+f8ekIAbeJ4dVDNAsSM9O/IFrp/v+oKQWHlCb6G7QgaacID35Ytm7Xdrsm67pc6xnYZjayLF3vUbbxSMe/1ZGqN++VHJTzQFv2QfBnXbRvsqs+ijdHYbxNnyoXwAEHVh9WPCJDGoijtBYGWjUBsGNH5jT7ul58o/vNPyYRJOkiyt2uvJnutuYntHMGSefVqSuKVRtIzTxLnHnd3c7InlTchSSLIyWmveQZ3H3bwikZTi6mduvoXqpX+N6uzPD25td01eaMfYjpUTi41CC+kWN2mkTMnr14/eGE5dGmtsZqxfPs1WRg7QpLIIMmpSzOvzl23OguyuzQTBASBGECg5QsQnhCTn36CEngCTPjhO0p+/lmlegrq3nAqdo0wOdtz87Sf/r+5jknyf19UHlqIf0BQnSZEbJzDCoTxtAnfzkkS1b6kZFU/RNsP92DYPTRycp0Q7Rj2VeuSKdYc7okeR5tqXdBezejjydGWgwNZUEEoll/3D21IqmaVnIMN/04WRlDTVZ14EjkKuriOc9LGlPvuJgu7JEOIJD/NwpCj4YOhynPOU0LLzuo9W5++VHXmpGC6SRtBQBCIIQRavArLxEWZ8BatqaLM7CkFdUpNx44Bb1PciuVuewPUO1YOuguGEmd/za/9deobdODocUR724YMI7j/gjAeCJO9ldVaUI0pjysWeNoxfMdzrEll/4FoyjVAWC2ktlz945csptpT2LDPFLfcE02ONnHr2EOLxqtjMKZX/P1617b3vzj2fzd771W/LWzfQdZfMxevAkG1BrWZvXcf9dvfP878NlT27wf8NZFjgoAgEOMItPwVSDyrgczatMsTtokvie0XerKwbYN+/IHtCPXVW84UL0MyeynpycQrjbjff+PiUcv0u0mvvlEHWCg4eXUBUsd0qie1LzHBc0xtuf6BcHGy8dlNum21ErHb3IccXqsjU1mZ+1igDbgfW+f9QdYli/iEamRXF3YA0GcRNuF8oooKBKccFwQEgToEdLNXy8TEybYBE3sdadOiiYs72Tp3dl9M3OxvKIE9rbg+KrEFgiouuZzTpLtUSpVTplLyfx51C5wK/q2RiT2gUmY+7AoeZO+s2iFDOJbiLHUYnlPWhX+qMZFBF2ore99+6piNg/YcLHTMO7arcaFWqj3+RHXMwcZyJ7yfsGLiPfhUn3KaOoZ/qjhWI+ndt1z2DBaC5Vdf5z5WPeEMworJzuVeTSwkKy6+zH3M7wbbNZJUpcN9ih/7r7ziueyvrm1WZUGNpmGHcZAYUUgQEAQEgWAQaPECxMxqGFQIxGSsUcKc2VTZy6WGiecJE6ohjeL4tyZAHBzPUTbjTo4I30D2tpxcUGdcjmebgKYWI34zt6xbp+p0QGAR11cu/9ddZF69kogD6tw2hbqTVPz9OjKvX8dqLjZY18WA4JBaAfE+jVdM3Ig1gVswCJ5RZRx/Am8te9funDolUe3HP0gfX3rnPWTmIlaIWdGnVXE38rER9/vvZC7i0rtYecBDi92MzTt3chR5B1ap8cqMBZXGj8MaRxbm2842DSFBQBAQBAIh0OIFiAqmg8qqziah3qbrIshx8SjQRGWlbhwO8rRibyJt9eBuVNcPY2mTq5mLPBHUYzpy9Oyt+1V/01duLKeF+7PKjTQ7NRu1sWLSkzMvn+z88UnxCeTgTLqNogRWnwGfOkxMlexpZa0rfsUrK6jQTHXOyooX5ikchBrxZlYBQjDrgyXDMbaMIQgIAsZAoP6MaAyeGsWF45DOrELqrdQw8DQi1utX6mI0qsef4hqPBQkiu6vYeygYqh15jLIHOFjlhBxSVRylrtRPwXRuoI0zJ5ccySkelRG74tYOHtZA6/Dsrh00mHNqpZODXYhxHTVQsdUJIXv3Q8nBzgaw2yATsJ1VbKiEGCrB5pTMLs4J775NqQ/dRzDWCwkCgkDsIcCaDb1VNboXuJffUG0cwxEOsiDtCLug2mCLqEs5oo0Le0Yq6/rLeH+jhAD3sWzfxgbyJPekq43ZlG9T4V5K4QhutQrgAbDCqT7p5MhXIeTVGbyrnGwg91W7PYEj3LHWqmZXYNh0QiW4NUPVphGy/1ZeOk37GfA7m+08FRxbU6VTPQbsFMEGaZzUspTtVkYgM68m89h1encwyTujwLCJn5cUfjkpa4RTRyTZSkWgLvPkfb/iWe2co1NRR5KH1jR2i1JhmXkyh6rKgbxTXhOdvd+ABu8b3vyJJwFnYycBnnDtBV0aHLfxBzgWg+0amgDBNZh0sSiNHy/IHjzp+LsOJ688FLE7cjgIubr0AsR04EA4hpUxBAFBwGAItBgBkvDeO5z0kI2+vGJxsEBQyQTDpK+P1j2BLcDGQYVxnLvKxPYHlcDxaFaVxRjVHHucCrJ0sM3GxHaf6tPOiLErlMsRBAQBINAiBIh58ybOJ8X5nrSANxYiVnZpbYm5l6onTiLzkKGUgGU2VkbsxRVrBDsKouFRL93BDgEOeLgJCQKCQMwh0CIECNxpkfVWEyBYhcC1NizEdg6Xayy750ZpMnfyBGtGLimOoo9VgqFeM9bH6jXKdQkCrR2BFiFA4B2ElOqmao7ngDsqv73b+vYP+d4hmjvp+Wc4Pzsby/cVUdn0m8gphraQcZUBBAFBoHUg0CIECGI9ED1t/XMBG9HtHLfBwoMN3KFS0kvPk4XjFTRK/OBdV5S2tkO+BQFBQBAQBBpEoFkFCFzrEnXR1g1yqR0Ioe52HAscuPjVI3Y/1JOFXU8PaqNvEKZtKwtECzsARONcwbAMXkC4H0Yg8IPnAjgZgXw+O83EGFxU8THKswMY8NwYhR/w4gufZoxWaKYnJTqnbda/0Bp2Gw1XHEgguODL7+2rbh0wkBLYNdjMMQeIkajlLLTVrNaKNGFyhD+/Nz+RPm9D42uCA/fDCAR+EANipDgQo9wrPDfJbD8zCj+YrEFG4QeCDDx586M940Z4vmOJh2YVIM0NpG3ocH59SiDU9EBNcxtHbQsJAoKAICAIBIdAqxYggMg28DD1CQ4uaSUICAKCgCCgIdDic2FpFyLfgoAgIAgIAtFFQARIdPGWswkCgoAgEDMIiACJmVspFyIICAKCQHQREAESXbzlbIKAICAIxAwCIkBi5lbKhQgCgoAgEF0EmrUeSHQv1ThnW758OS1YsIAuvPBC4zBlIE5ee+01GjRoEPXtK6V1vW/LAU6N/9RTT9FNN93kfUh+MwJz5sxRsWUnnnii4BEFBGQFEgWQvU+xZcsW9aB775ffLgQwCWzevFng8IFAORdNe/fdd30ckV1AYMmSJfTnn38KGFFCQARIlICW0wgCgoAgEGsIiAqrGe4o3iKRaqFNmzbNcHbjnxLlWpGSAqVSheojgNQ/27dvp86dO9c/IL8UAsWczw55r1AWWSjyCIgAiTzGcgZBQBAQBGISgVafyiTad7WaqyquX7/efdo+ffq4t2XDhcCmTZvU6iOPa8AIeRBYt24d4fnRqEuXLiqxovZbvok2bNigMGnbtq3AEQUERIBEAWT9KWDke/PNN6lXr15qtwgQPTpEd999t8Jm/vz5NGnSJBo8WBJcagjBOKypaD7++GN64YUXRIBo4PD3s88+q7JcFxUV0cCBA+mkk07SHZXNSCAgAiQSqPoZc+3atXT22WdT7969KTMz00/L1ndoxYoVhLT7p59+Oo0dO1ZNlq0PhYavGM8N6KOPPqLzzz+f2rdv33DjVnhk4cKF9OijjxJsaC+//LIIkCg8AyJAogCy/hQQIKtWraKvv/6akpKS6MYbb9QfbtXbW7duVSqI2267TalqrrnmmlaNh6+Lr6yspA8//JBefPFFX4db9b5zzz2Xpk6dyhWqa+mee+5p1VhE6+JFgEQL6brzTJ8+XQkOFL25+eabCZNmp06dosyFMU8H75nc3FyCAEGw5axZs+jaa681JrPNxBViZMaMGaNUNc3EgiFPa7fb1arjiSeeIARbPvbYY/T4448bktdYYkriQKJ8N9966y0qKSlRZ0UFQHFV9dyAgoICdxlbCFi8bQvVR+D7779XAqT+XvmFv6X8/Hz1AoLnKFqVTls78rICifIT0L9/f7r//vspIyODhg8fLv7qOvzhWIDYmJkzZxJUfVitCdVHYN++fSTeafUxwS+og4cMGUIPPvggVXCJ6rPOOuvgRrIn7AhIHEjYIQ08IFQ1eEOK4zrsQgcjgLdJYKPV2z64hewRBHwjgL8r1I3HRyjyCIgAiTzGcgZBQBAQBGISARHTMXlb5aIEAUFAEIg8AiJAIo+xnEEQEAQEgZhEQARITN7W6FwUvKQ0j7LonFHOIggIAkZCQASIke5GC+Flz549hII9yMUErzJ8Fi9eHFbuP/vsM5XKxHvQ0047jeAKHSmCAf+uu+5Sw2Mb3nJCgoAg4BsBESC+cZG9fhB44IEHVK6hnTt3qsJP119/PV100UV+erScQ3CTfeWVV1oOw8KpINCMCIgAaUbwW+qpkSoCCevwDZoyZQo9/fTTahvZYqdNm0Zdu3alHj16qLxNOPDjjz/S5MmT6aijjlKlahGFD3I4HPSPf/xD7evYsSNNnDixXsZZ1SiIfxo670MPPUS33HILHX744dShQwe677773KMh3UXPnj3VMaTAeO+99+iGG25Q9TaQawqECOfLLrtM1d8YMWKEOuYeQDYEgVaOgAiQVv4ANOXyb731VkLKdaQdOfPMM9UbO2qYgz799FOVBHHlypX0ySefENpCSMBeAtXTc889R3/88Qf98MMP9P7779Nvv/1GaLt06VKV5h7jIl1HY6mh82JFgZQoGHPevHkq2y8Ken355Zfq/L/++qsSHMgvVVpaSg8//LASNG+88YZiAW3HjRunrheZk59//vnGsibtBYGYRUAi0WP21kbuwhAJjQkZkz2EBNJoQ+2DNBsffPCBSkcCNRcIqxRM0iBE3vft21dtn3HGGTR37lxC7iIIFQgXZFMtLCxUhnlUJGwM+TvvqaeeSllZWeqDdBf79+9X/CNaGZXr8IFNxxfFx8er7MAIahw9enSThJuvcWWfIBALCMgKJBbuYpSv4YorrlAJ65Bz6Oqrr1YCAvaQZcuWEd74u3fvrtLVI2U96nu0a9dOcag3SFutVlV6FCsRqLVWr16tUrijjgMi9RtL/s6rLy5ksVjU+MnJyUo9pZ2nocjlxMREQh+Q1lfrI9+CQGtHQARIa38CmnD9e/fupRkzZrgnYFTKQwZU1OmGSmvXrl0qFxHe/J955hn3BAxhgXawK0DlBMGBtPbnnXce3XHHHTRs2DClyvJOhIc+EBD+yN95ffWbMGGCss9gNbJt2zb65ptvVDOsOOB9JSQICAKBERAVVmCMpIUXAlA5wSAOdRBUQ1BTvfTSS5Senq5cb1E578gjj1T7MVFDsGCFgZUIhATe5EeOHKkEB+wf55xzjnIDxsQNWwpUYxhXIxQJwgoHqjLQxRdfrAz12nFM/qhe6Ou8Whvvb5znuOOOU+c74ogjqF+/fiozMtRZKGoFPn/66SfvbvJbEBAEdAhILiwdGLLZOASwkkCJVRjTvamqqkolRNTUP1hpPPnkk8pGAoO6t40DKwxM3qGS93kbGg+CCyupUaNGqSawb8CArjkDgEdkeBUSBASBhhGQFUjD2MiRAAhAOPgSHugG24EvQh9v4YF24RAeGKeh8+KYnuDSC0M+ijNBhQWbCAIiNRLhoSEh34JAwwjICqRhbORIGBGAiyxiR2B4NwphBQXXXtSmRzyIpI83yp0RPloKAiJAWsqdEj4FAUFAEDAYAuKFZbAbIuwIAoKAINBSEBAB0lLulPApCAgCgoDBEBABYrAbIuwIAoKAINBSEBAB0lLulPApCAgCgoDBEPh/+Zffm3hNE1UAAAAASUVORK5CYII=\\n\"\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%%R -w 400 -h 240\\n\",\n    \"ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 2\",\n   \"language\": \"python\",\n   \"name\": \"python2\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 2\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython2\",\n   \"version\": \"2.7.11\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/Notebook_with_more_R_magic_111.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%load_ext rpy2.ipython\\n\",\n    \"import pandas as pd\\n\",\n    \"\\n\",\n    \"df = pd.DataFrame(\\n\",\n    \"    {\\n\",\n    \"        \\\"Letter\\\": [\\\"a\\\", \\\"a\\\", \\\"a\\\", \\\"b\\\", \\\"b\\\", \\\"b\\\", \\\"c\\\", \\\"c\\\", \\\"c\\\"],\\n\",\n    \"        \\\"X\\\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\\n\",\n    \"        \\\"Y\\\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\\n\",\n    \"        \\\"Z\\\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\\n\",\n    \"    }\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"C:\\\\Users\\\\Marco\\\\AppData\\\\Local\\\\conda\\\\conda\\\\envs\\\\python3\\\\lib\\\\site-packages\\\\rpy2-2.9.4-py3.6-win-amd64.egg\\\\rpy2\\\\robjects\\\\pandas2ri.py:191: FutureWarning: from_items is deprecated. Please use DataFrame.from_dict(dict(items), ...) instead. DataFrame.from_dict(OrderedDict(items)) may be used to preserve the key order.\\n\",\n      \"  res = PandasDataFrame.from_items(items)\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"image/png\": \"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\\n\"\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%%R -i df\\n\",\n    \"library(\\\"ggplot2\\\")\\n\",\n    \"ggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/The flavors of raw cells.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {\n    \"raw_mimetype\": \"text/latex\"\n   },\n   \"source\": [\n    \"$1+1$\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {\n    \"raw_mimetype\": \"text/restructuredtext\"\n   },\n   \"source\": [\n    \":math:`1+1`\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {\n    \"raw_mimetype\": \"text/html\"\n   },\n   \"source\": [\n    \"<b>Bold text<b>\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {\n    \"raw_mimetype\": \"text/markdown\"\n   },\n   \"source\": [\n    \"**Bold text**\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {\n    \"raw_mimetype\": \"text/x-python\"\n   },\n   \"source\": [\n    \"1 + 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Not formatted\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"celltoolbar\": \"Format de la Cellule Texte Brut\",\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.7.3\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/cat_variable.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"cat = 42\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.4\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/convert_to_py_then_test_with_update83.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {\n    \"scrolled\": false\n   },\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"asdf\\n\",\n      \"CPU times: user 132 µs, sys: 57 µs, total: 189 µs\\n\",\n      \"Wall time: 188 µs\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"%%time\\n\",\n    \"\\n\",\n    \"print('asdf')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Thanks for jupytext!\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"collapsed\": true\n   },\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.5.3\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/frozen_cell.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {\n    \"ExecuteTime\": {\n     \"end_time\": \"2018-10-17T10:31:56.160823Z\",\n     \"start_time\": \"2018-10-17T10:31:56.157308Z\"\n    }\n   },\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"I'm a regular cell so I run and print!\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"# This is an unfrozen cell. Works as usual.\\n\",\n    \"print(\\\"I'm a regular cell so I run and print!\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"deletable\": false,\n    \"editable\": false,\n    \"run_control\": {\n     \"frozen\": true\n    }\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# This is an frozen cell\\n\",\n    \"print(\\\"I'm frozen so Im not executed :(\\\")\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.7.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/jupyter.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Jupyter notebook\\n\",\n    \"\\n\",\n    \"This notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"3\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"a = 1\\n\",\n    \"b = 2\\n\",\n    \"a + b\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now we return a few tuples\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {\n    \"scrolled\": true\n   },\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"(1, 2)\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"a, b\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"(1, 2, 3)\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"a, b, a+b\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"And this is already the end of the notebook\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.4\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/jupyter_again.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"c = '''\\n\",\n    \"title: \\\"Quick test\\\"\\n\",\n    \"output:\\n\",\n    \"  ioslides_presentation:\\n\",\n    \"    widescreen: true\\n\",\n    \"    smaller: true\\n\",\n    \"editor_options:\\n\",\n    \"     chunk_output_type console\\n\",\n    \"'''\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"author: Marc Wouts\\n\",\n      \"date: June 15, 2018\\n\",\n      \"editor_options: chunk_output_type console\\n\",\n      \"output:\\n\",\n      \"  ioslides_presentation: {smaller: true, widescreen: true}\\n\",\n      \"subtitle: Slides generated using R, python and ioslides\\n\",\n      \"title: Quick ioslides\\n\",\n      \"\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import yaml\\n\",\n    \"print(yaml.dump(yaml.load(c)))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"?next\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.5\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/jupyter_with_raw_cell_in_body.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"6\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"1+2+3\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is a raw cell\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is a markdown cell\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"celltoolbar\": \"Edit Metadata\",\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/jupyter_with_raw_cell_on_top.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"title: Quick test\\n\",\n    \"output:\\n\",\n    \"  ioslides_presentation:\\n\",\n    \"    widescreen: true\\n\",\n    \"    smaller: true\\n\",\n    \"editor_options:\\n\",\n    \"  chunk_output_type: console\\n\",\n    \"---\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"6\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"1+2+3\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.5\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/jupyter_with_raw_cell_with_invalid_yaml.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"title: Exception: Test\\n\",\n    \"---\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"6\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"1 + 2 + 3\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.12.9\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/jupyterlab-slideshow_1441.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"7f0da6ff-9da5-453c-8515-88fabeb03582\",\n   \"metadata\": {\n    \"@deathbeds/jupyterlab-fonts\": {\n     \"styles\": {\n      \"\": {\n       \"body[data-jp-deck-mode='presenting'] &\": {\n        \"right\": \"0\",\n        \"top\": \"30%\",\n        \"width\": \"25%\",\n        \"z-index\": 1\n       }\n      }\n     }\n    },\n    \"jupyterlab-slideshow\": {\n     \"layer\": \"slide\"\n    }\n   },\n   \"source\": [\n    \"> **Note**\\n\",\n    \"> \\n\",\n    \"> `slide` layer with a `top` of `30%`\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"@deathbeds/jupyterlab-fonts\": {\n   \"styles\": {}\n  },\n  \"foo\": \"x\",\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.11.5\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/notebook_with_complex_metadata.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"collapsed\": true\n   },\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.5.1\"\n  },\n  \"widgets\": {\n   \"state\": {\n    \"a65a11f142ca44eebc913788d256adcb\": {\n     \"views\": [\n      {\n       \"cell_index\": 92\n      }\n     ]\n    }\n   },\n   \"version\": \"1.2.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/nteract_with_parameter.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {\n    \"collapsed\": false,\n    \"inputHidden\": false,\n    \"outputHidden\": false,\n    \"tags\": [\n     \"parameters\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"param = 4\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {\n    \"collapsed\": false,\n    \"inputHidden\": false,\n    \"outputHidden\": false\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import pandas as pd\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {\n    \"collapsed\": false,\n    \"inputHidden\": false,\n    \"outputHidden\": false\n   },\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>A</th>\\n\",\n       \"      <th>B</th>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>x</th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>x0</th>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>7</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>x1</th>\\n\",\n       \"      <td>2</td>\\n\",\n       \"      <td>4</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"    A  B\\n\",\n       \"x       \\n\",\n       \"x0  1  7\\n\",\n       \"x1  2  4\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\\n\",\n    \"                  index=pd.Index(['x0', 'x1'], name='x'))\\n\",\n    \"df\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {\n    \"collapsed\": false,\n    \"inputHidden\": false,\n    \"outputHidden\": false\n   },\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<matplotlib.axes._subplots.AxesSubplot at 0x1634278f240>\"\n      ]\n     },\n     \"execution_count\": 5,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    },\n    {\n     \"data\": {\n      \"image/png\": \"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\\n\",\n      \"text/plain\": [\n       \"<Figure size 432x288 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"%matplotlib inline\\n\",\n    \"df.plot(kind='bar')\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernel_info\": {\n   \"name\": \"python3\"\n  },\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.6\"\n  },\n  \"nteract\": {\n   \"version\": \"0.11.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/plotly_graphs.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This notebook contains complex outputs, including plotly javascript graphs.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Interactive plots\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"        <script type=\\\"text/javascript\\\">\\n\",\n       \"        window.PlotlyConfig = {MathJaxConfig: 'local'};\\n\",\n       \"        if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \\\"STIX-Web\\\"}});}\\n\",\n       \"        if (typeof require !== 'undefined') {\\n\",\n       \"        require.undef(\\\"plotly\\\");\\n\",\n       \"        requirejs.config({\\n\",\n       \"            paths: {\\n\",\n       \"                'plotly': ['https://cdn.plot.ly/plotly-latest.min']\\n\",\n       \"            }\\n\",\n       \"        });\\n\",\n       \"        require(['plotly'], function(Plotly) {\\n\",\n       \"            window._Plotly = Plotly;\\n\",\n       \"        });\\n\",\n       \"        }\\n\",\n       \"        </script>\\n\",\n       \"        \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import plotly.offline as offline\\n\",\n    \"offline.init_notebook_mode(connected=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"application/vnd.plotly.v1+json\": {\n       \"config\": {\n        \"plotlyServerURL\": \"https://plot.ly\"\n       },\n       \"data\": [\n        {\n         \"type\": \"bar\",\n         \"y\": [\n          2,\n          3,\n          1\n         ]\n        }\n       ],\n       \"layout\": {\n        \"template\": {\n         \"data\": {\n          \"bar\": [\n           {\n            \"error_x\": {\n             \"color\": \"#2a3f5f\"\n            },\n            \"error_y\": {\n             \"color\": \"#2a3f5f\"\n            },\n            \"marker\": {\n             \"line\": {\n              \"color\": \"#E5ECF6\",\n              \"width\": 0.5\n             }\n            },\n            \"type\": \"bar\"\n           }\n          ],\n          \"barpolar\": [\n           {\n            \"marker\": {\n             \"line\": {\n              \"color\": \"#E5ECF6\",\n              \"width\": 0.5\n             }\n            },\n            \"type\": \"barpolar\"\n           }\n          ],\n          \"carpet\": [\n           {\n            \"aaxis\": {\n             \"endlinecolor\": \"#2a3f5f\",\n             \"gridcolor\": \"white\",\n             \"linecolor\": \"white\",\n             \"minorgridcolor\": \"white\",\n             \"startlinecolor\": \"#2a3f5f\"\n            },\n            \"baxis\": {\n             \"endlinecolor\": \"#2a3f5f\",\n             \"gridcolor\": \"white\",\n             \"linecolor\": \"white\",\n             \"minorgridcolor\": \"white\",\n             \"startlinecolor\": \"#2a3f5f\"\n            },\n            \"type\": \"carpet\"\n           }\n          ],\n          \"choropleth\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"type\": \"choropleth\"\n           }\n          ],\n          \"contour\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"contour\"\n           }\n          ],\n          \"contourcarpet\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"type\": \"contourcarpet\"\n           }\n          ],\n          \"heatmap\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"heatmap\"\n           }\n          ],\n          \"heatmapgl\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"heatmapgl\"\n           }\n          ],\n          \"histogram\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"histogram\"\n           }\n          ],\n          \"histogram2d\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"histogram2d\"\n           }\n          ],\n          \"histogram2dcontour\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"histogram2dcontour\"\n           }\n          ],\n          \"mesh3d\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"type\": \"mesh3d\"\n           }\n          ],\n          \"parcoords\": [\n           {\n            \"line\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"parcoords\"\n           }\n          ],\n          \"scatter\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatter\"\n           }\n          ],\n          \"scatter3d\": [\n           {\n            \"line\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatter3d\"\n           }\n          ],\n          \"scattercarpet\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattercarpet\"\n           }\n          ],\n          \"scattergeo\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattergeo\"\n           }\n          ],\n          \"scattergl\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattergl\"\n           }\n          ],\n          \"scattermapbox\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattermapbox\"\n           }\n          ],\n          \"scatterpolar\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatterpolar\"\n           }\n          ],\n          \"scatterpolargl\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatterpolargl\"\n           }\n          ],\n          \"scatterternary\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatterternary\"\n           }\n          ],\n          \"surface\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"surface\"\n           }\n          ],\n          \"table\": [\n           {\n            \"cells\": {\n             \"fill\": {\n              \"color\": \"#EBF0F8\"\n             },\n             \"line\": {\n              \"color\": \"white\"\n             }\n            },\n            \"header\": {\n             \"fill\": {\n              \"color\": \"#C8D4E3\"\n             },\n             \"line\": {\n              \"color\": \"white\"\n             }\n            },\n            \"type\": \"table\"\n           }\n          ]\n         },\n         \"layout\": {\n          \"annotationdefaults\": {\n           \"arrowcolor\": \"#2a3f5f\",\n           \"arrowhead\": 0,\n           \"arrowwidth\": 1\n          },\n          \"colorscale\": {\n           \"diverging\": [\n            [\n             0,\n             \"#8e0152\"\n            ],\n            [\n             0.1,\n             \"#c51b7d\"\n            ],\n            [\n             0.2,\n             \"#de77ae\"\n            ],\n            [\n             0.3,\n             \"#f1b6da\"\n            ],\n            [\n             0.4,\n             \"#fde0ef\"\n            ],\n            [\n             0.5,\n             \"#f7f7f7\"\n            ],\n            [\n             0.6,\n             \"#e6f5d0\"\n            ],\n            [\n             0.7,\n             \"#b8e186\"\n            ],\n            [\n             0.8,\n             \"#7fbc41\"\n            ],\n            [\n             0.9,\n             \"#4d9221\"\n            ],\n            [\n             1,\n             \"#276419\"\n            ]\n           ],\n           \"sequential\": [\n            [\n             0,\n             \"#0d0887\"\n            ],\n            [\n             0.1111111111111111,\n             \"#46039f\"\n            ],\n            [\n             0.2222222222222222,\n             \"#7201a8\"\n            ],\n            [\n             0.3333333333333333,\n             \"#9c179e\"\n            ],\n            [\n             0.4444444444444444,\n             \"#bd3786\"\n            ],\n            [\n             0.5555555555555556,\n             \"#d8576b\"\n            ],\n            [\n             0.6666666666666666,\n             \"#ed7953\"\n            ],\n            [\n             0.7777777777777778,\n             \"#fb9f3a\"\n            ],\n            [\n             0.8888888888888888,\n             \"#fdca26\"\n            ],\n            [\n             1,\n             \"#f0f921\"\n            ]\n           ],\n           \"sequentialminus\": [\n            [\n             0,\n             \"#0d0887\"\n            ],\n            [\n             0.1111111111111111,\n             \"#46039f\"\n            ],\n            [\n             0.2222222222222222,\n             \"#7201a8\"\n            ],\n            [\n             0.3333333333333333,\n             \"#9c179e\"\n            ],\n            [\n             0.4444444444444444,\n             \"#bd3786\"\n            ],\n            [\n             0.5555555555555556,\n             \"#d8576b\"\n            ],\n            [\n             0.6666666666666666,\n             \"#ed7953\"\n            ],\n            [\n             0.7777777777777778,\n             \"#fb9f3a\"\n            ],\n            [\n             0.8888888888888888,\n             \"#fdca26\"\n            ],\n            [\n             1,\n             \"#f0f921\"\n            ]\n           ]\n          },\n          \"colorway\": [\n           \"#636efa\",\n           \"#EF553B\",\n           \"#00cc96\",\n           \"#ab63fa\",\n           \"#FFA15A\",\n           \"#19d3f3\",\n           \"#FF6692\",\n           \"#B6E880\",\n           \"#FF97FF\",\n           \"#FECB52\"\n          ],\n          \"font\": {\n           \"color\": \"#2a3f5f\"\n          },\n          \"geo\": {\n           \"bgcolor\": \"white\",\n           \"lakecolor\": \"white\",\n           \"landcolor\": \"#E5ECF6\",\n           \"showlakes\": true,\n           \"showland\": true,\n           \"subunitcolor\": \"white\"\n          },\n          \"hoverlabel\": {\n           \"align\": \"left\"\n          },\n          \"hovermode\": \"closest\",\n          \"mapbox\": {\n           \"style\": \"light\"\n          },\n          \"paper_bgcolor\": \"white\",\n          \"plot_bgcolor\": \"#E5ECF6\",\n          \"polar\": {\n           \"angularaxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           },\n           \"bgcolor\": \"#E5ECF6\",\n           \"radialaxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           }\n          },\n          \"scene\": {\n           \"xaxis\": {\n            \"backgroundcolor\": \"#E5ECF6\",\n            \"gridcolor\": \"white\",\n            \"gridwidth\": 2,\n            \"linecolor\": \"white\",\n            \"showbackground\": true,\n            \"ticks\": \"\",\n            \"zerolinecolor\": \"white\"\n           },\n           \"yaxis\": {\n            \"backgroundcolor\": \"#E5ECF6\",\n            \"gridcolor\": \"white\",\n            \"gridwidth\": 2,\n            \"linecolor\": \"white\",\n            \"showbackground\": true,\n            \"ticks\": \"\",\n            \"zerolinecolor\": \"white\"\n           },\n           \"zaxis\": {\n            \"backgroundcolor\": \"#E5ECF6\",\n            \"gridcolor\": \"white\",\n            \"gridwidth\": 2,\n            \"linecolor\": \"white\",\n            \"showbackground\": true,\n            \"ticks\": \"\",\n            \"zerolinecolor\": \"white\"\n           }\n          },\n          \"shapedefaults\": {\n           \"line\": {\n            \"color\": \"#2a3f5f\"\n           }\n          },\n          \"ternary\": {\n           \"aaxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           },\n           \"baxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           },\n           \"bgcolor\": \"#E5ECF6\",\n           \"caxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           }\n          },\n          \"title\": {\n           \"x\": 0.05\n          },\n          \"xaxis\": {\n           \"automargin\": true,\n           \"gridcolor\": \"white\",\n           \"linecolor\": \"white\",\n           \"ticks\": \"\",\n           \"zerolinecolor\": \"white\",\n           \"zerolinewidth\": 2\n          },\n          \"yaxis\": {\n           \"automargin\": true,\n           \"gridcolor\": \"white\",\n           \"linecolor\": \"white\",\n           \"ticks\": \"\",\n           \"zerolinecolor\": \"white\",\n           \"zerolinewidth\": 2\n          }\n         }\n        },\n        \"title\": {\n         \"text\": \"bar plot\"\n        }\n       }\n      },\n      \"text/html\": [\n       \"<div>\\n\",\n       \"        \\n\",\n       \"        \\n\",\n       \"            <div id=\\\"1af74b35-f060-4c3c-9ef2-a0457158eda7\\\" class=\\\"plotly-graph-div\\\" style=\\\"height:525px; width:100%;\\\"></div>\\n\",\n       \"            <script type=\\\"text/javascript\\\">\\n\",\n       \"                require([\\\"plotly\\\"], function(Plotly) {\\n\",\n       \"                    window.PLOTLYENV=window.PLOTLYENV || {};\\n\",\n       \"                    \\n\",\n       \"                if (document.getElementById(\\\"1af74b35-f060-4c3c-9ef2-a0457158eda7\\\")) {\\n\",\n       \"                    Plotly.newPlot(\\n\",\n       \"                        '1af74b35-f060-4c3c-9ef2-a0457158eda7',\\n\",\n       \"                        [{\\\"type\\\": \\\"bar\\\", \\\"y\\\": [2, 3, 1]}],\\n\",\n       \"                        {\\\"template\\\": {\\\"data\\\": {\\\"bar\\\": [{\\\"error_x\\\": {\\\"color\\\": \\\"#2a3f5f\\\"}, \\\"error_y\\\": {\\\"color\\\": \\\"#2a3f5f\\\"}, \\\"marker\\\": {\\\"line\\\": {\\\"color\\\": \\\"#E5ECF6\\\", \\\"width\\\": 0.5}}, \\\"type\\\": \\\"bar\\\"}], \\\"barpolar\\\": [{\\\"marker\\\": {\\\"line\\\": {\\\"color\\\": \\\"#E5ECF6\\\", \\\"width\\\": 0.5}}, \\\"type\\\": \\\"barpolar\\\"}], \\\"carpet\\\": [{\\\"aaxis\\\": {\\\"endlinecolor\\\": \\\"#2a3f5f\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"minorgridcolor\\\": \\\"white\\\", \\\"startlinecolor\\\": \\\"#2a3f5f\\\"}, \\\"baxis\\\": {\\\"endlinecolor\\\": \\\"#2a3f5f\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"minorgridcolor\\\": \\\"white\\\", \\\"startlinecolor\\\": \\\"#2a3f5f\\\"}, \\\"type\\\": \\\"carpet\\\"}], \\\"choropleth\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"type\\\": \\\"choropleth\\\"}], \\\"contour\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"contour\\\"}], \\\"contourcarpet\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"type\\\": \\\"contourcarpet\\\"}], \\\"heatmap\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"heatmap\\\"}], \\\"heatmapgl\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"heatmapgl\\\"}], \\\"histogram\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"histogram\\\"}], \\\"histogram2d\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"histogram2d\\\"}], \\\"histogram2dcontour\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"histogram2dcontour\\\"}], \\\"mesh3d\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"type\\\": \\\"mesh3d\\\"}], \\\"parcoords\\\": [{\\\"line\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"parcoords\\\"}], \\\"scatter\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatter\\\"}], \\\"scatter3d\\\": [{\\\"line\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatter3d\\\"}], \\\"scattercarpet\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scattercarpet\\\"}], \\\"scattergeo\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scattergeo\\\"}], \\\"scattergl\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scattergl\\\"}], \\\"scattermapbox\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scattermapbox\\\"}], \\\"scatterpolar\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatterpolar\\\"}], \\\"scatterpolargl\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatterpolargl\\\"}], \\\"scatterternary\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatterternary\\\"}], \\\"surface\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"surface\\\"}], \\\"table\\\": [{\\\"cells\\\": {\\\"fill\\\": {\\\"color\\\": \\\"#EBF0F8\\\"}, \\\"line\\\": {\\\"color\\\": \\\"white\\\"}}, \\\"header\\\": {\\\"fill\\\": {\\\"color\\\": \\\"#C8D4E3\\\"}, \\\"line\\\": {\\\"color\\\": \\\"white\\\"}}, \\\"type\\\": \\\"table\\\"}]}, \\\"layout\\\": {\\\"annotationdefaults\\\": {\\\"arrowcolor\\\": \\\"#2a3f5f\\\", \\\"arrowhead\\\": 0, \\\"arrowwidth\\\": 1}, \\\"colorscale\\\": {\\\"diverging\\\": [[0, \\\"#8e0152\\\"], [0.1, \\\"#c51b7d\\\"], [0.2, \\\"#de77ae\\\"], [0.3, \\\"#f1b6da\\\"], [0.4, \\\"#fde0ef\\\"], [0.5, \\\"#f7f7f7\\\"], [0.6, \\\"#e6f5d0\\\"], [0.7, \\\"#b8e186\\\"], [0.8, \\\"#7fbc41\\\"], [0.9, \\\"#4d9221\\\"], [1, \\\"#276419\\\"]], \\\"sequential\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"sequentialminus\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]]}, \\\"colorway\\\": [\\\"#636efa\\\", \\\"#EF553B\\\", \\\"#00cc96\\\", \\\"#ab63fa\\\", \\\"#FFA15A\\\", \\\"#19d3f3\\\", \\\"#FF6692\\\", \\\"#B6E880\\\", \\\"#FF97FF\\\", \\\"#FECB52\\\"], \\\"font\\\": {\\\"color\\\": \\\"#2a3f5f\\\"}, \\\"geo\\\": {\\\"bgcolor\\\": \\\"white\\\", \\\"lakecolor\\\": \\\"white\\\", \\\"landcolor\\\": \\\"#E5ECF6\\\", \\\"showlakes\\\": true, \\\"showland\\\": true, \\\"subunitcolor\\\": \\\"white\\\"}, \\\"hoverlabel\\\": {\\\"align\\\": \\\"left\\\"}, \\\"hovermode\\\": \\\"closest\\\", \\\"mapbox\\\": {\\\"style\\\": \\\"light\\\"}, \\\"paper_bgcolor\\\": \\\"white\\\", \\\"plot_bgcolor\\\": \\\"#E5ECF6\\\", \\\"polar\\\": {\\\"angularaxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}, \\\"bgcolor\\\": \\\"#E5ECF6\\\", \\\"radialaxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}}, \\\"scene\\\": {\\\"xaxis\\\": {\\\"backgroundcolor\\\": \\\"#E5ECF6\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"gridwidth\\\": 2, \\\"linecolor\\\": \\\"white\\\", \\\"showbackground\\\": true, \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\"}, \\\"yaxis\\\": {\\\"backgroundcolor\\\": \\\"#E5ECF6\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"gridwidth\\\": 2, \\\"linecolor\\\": \\\"white\\\", \\\"showbackground\\\": true, \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\"}, \\\"zaxis\\\": {\\\"backgroundcolor\\\": \\\"#E5ECF6\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"gridwidth\\\": 2, \\\"linecolor\\\": \\\"white\\\", \\\"showbackground\\\": true, \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\"}}, \\\"shapedefaults\\\": {\\\"line\\\": {\\\"color\\\": \\\"#2a3f5f\\\"}}, \\\"ternary\\\": {\\\"aaxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}, \\\"baxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}, \\\"bgcolor\\\": \\\"#E5ECF6\\\", \\\"caxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}}, \\\"title\\\": {\\\"x\\\": 0.05}, \\\"xaxis\\\": {\\\"automargin\\\": true, \\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\", \\\"zerolinewidth\\\": 2}, \\\"yaxis\\\": {\\\"automargin\\\": true, \\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\", \\\"zerolinewidth\\\": 2}}}, \\\"title\\\": {\\\"text\\\": \\\"bar plot\\\"}},\\n\",\n       \"                        {\\\"responsive\\\": true}\\n\",\n       \"                    ).then(function(){\\n\",\n       \"                            \\n\",\n       \"var gd = document.getElementById('1af74b35-f060-4c3c-9ef2-a0457158eda7');\\n\",\n       \"var x = new MutationObserver(function (mutations, observer) {{\\n\",\n       \"        var display = window.getComputedStyle(gd).display;\\n\",\n       \"        if (!display || display === 'none') {{\\n\",\n       \"            console.log([gd, 'removed!']);\\n\",\n       \"            Plotly.purge(gd);\\n\",\n       \"            observer.disconnect();\\n\",\n       \"        }}\\n\",\n       \"}});\\n\",\n       \"\\n\",\n       \"// Listen for the removal of the full notebook cells\\n\",\n       \"var notebookContainer = gd.closest('#notebook-container');\\n\",\n       \"if (notebookContainer) {{\\n\",\n       \"    x.observe(notebookContainer, {childList: true});\\n\",\n       \"}}\\n\",\n       \"\\n\",\n       \"// Listen for the clearing of the current output cell\\n\",\n       \"var outputEl = gd.closest('.output');\\n\",\n       \"if (outputEl) {{\\n\",\n       \"    x.observe(outputEl, {childList: true});\\n\",\n       \"}}\\n\",\n       \"\\n\",\n       \"                        })\\n\",\n       \"                };\\n\",\n       \"                });\\n\",\n       \"            </script>\\n\",\n       \"        </div>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"application/vnd.plotly.v1+json\": {\n       \"config\": {\n        \"plotlyServerURL\": \"https://plot.ly\"\n       },\n       \"data\": [\n        {\n         \"marker\": {\n          \"color\": \"purple\"\n         },\n         \"type\": \"bar\",\n         \"y\": [\n          2,\n          3,\n          1\n         ]\n        }\n       ],\n       \"layout\": {\n        \"template\": {\n         \"data\": {\n          \"bar\": [\n           {\n            \"error_x\": {\n             \"color\": \"#2a3f5f\"\n            },\n            \"error_y\": {\n             \"color\": \"#2a3f5f\"\n            },\n            \"marker\": {\n             \"line\": {\n              \"color\": \"#E5ECF6\",\n              \"width\": 0.5\n             }\n            },\n            \"type\": \"bar\"\n           }\n          ],\n          \"barpolar\": [\n           {\n            \"marker\": {\n             \"line\": {\n              \"color\": \"#E5ECF6\",\n              \"width\": 0.5\n             }\n            },\n            \"type\": \"barpolar\"\n           }\n          ],\n          \"carpet\": [\n           {\n            \"aaxis\": {\n             \"endlinecolor\": \"#2a3f5f\",\n             \"gridcolor\": \"white\",\n             \"linecolor\": \"white\",\n             \"minorgridcolor\": \"white\",\n             \"startlinecolor\": \"#2a3f5f\"\n            },\n            \"baxis\": {\n             \"endlinecolor\": \"#2a3f5f\",\n             \"gridcolor\": \"white\",\n             \"linecolor\": \"white\",\n             \"minorgridcolor\": \"white\",\n             \"startlinecolor\": \"#2a3f5f\"\n            },\n            \"type\": \"carpet\"\n           }\n          ],\n          \"choropleth\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"type\": \"choropleth\"\n           }\n          ],\n          \"contour\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"contour\"\n           }\n          ],\n          \"contourcarpet\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"type\": \"contourcarpet\"\n           }\n          ],\n          \"heatmap\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"heatmap\"\n           }\n          ],\n          \"heatmapgl\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"heatmapgl\"\n           }\n          ],\n          \"histogram\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"histogram\"\n           }\n          ],\n          \"histogram2d\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"histogram2d\"\n           }\n          ],\n          \"histogram2dcontour\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"histogram2dcontour\"\n           }\n          ],\n          \"mesh3d\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"type\": \"mesh3d\"\n           }\n          ],\n          \"parcoords\": [\n           {\n            \"line\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"parcoords\"\n           }\n          ],\n          \"scatter\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatter\"\n           }\n          ],\n          \"scatter3d\": [\n           {\n            \"line\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatter3d\"\n           }\n          ],\n          \"scattercarpet\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattercarpet\"\n           }\n          ],\n          \"scattergeo\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattergeo\"\n           }\n          ],\n          \"scattergl\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattergl\"\n           }\n          ],\n          \"scattermapbox\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scattermapbox\"\n           }\n          ],\n          \"scatterpolar\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatterpolar\"\n           }\n          ],\n          \"scatterpolargl\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatterpolargl\"\n           }\n          ],\n          \"scatterternary\": [\n           {\n            \"marker\": {\n             \"colorbar\": {\n              \"outlinewidth\": 0,\n              \"ticks\": \"\"\n             }\n            },\n            \"type\": \"scatterternary\"\n           }\n          ],\n          \"surface\": [\n           {\n            \"colorbar\": {\n             \"outlinewidth\": 0,\n             \"ticks\": \"\"\n            },\n            \"colorscale\": [\n             [\n              0,\n              \"#0d0887\"\n             ],\n             [\n              0.1111111111111111,\n              \"#46039f\"\n             ],\n             [\n              0.2222222222222222,\n              \"#7201a8\"\n             ],\n             [\n              0.3333333333333333,\n              \"#9c179e\"\n             ],\n             [\n              0.4444444444444444,\n              \"#bd3786\"\n             ],\n             [\n              0.5555555555555556,\n              \"#d8576b\"\n             ],\n             [\n              0.6666666666666666,\n              \"#ed7953\"\n             ],\n             [\n              0.7777777777777778,\n              \"#fb9f3a\"\n             ],\n             [\n              0.8888888888888888,\n              \"#fdca26\"\n             ],\n             [\n              1,\n              \"#f0f921\"\n             ]\n            ],\n            \"type\": \"surface\"\n           }\n          ],\n          \"table\": [\n           {\n            \"cells\": {\n             \"fill\": {\n              \"color\": \"#EBF0F8\"\n             },\n             \"line\": {\n              \"color\": \"white\"\n             }\n            },\n            \"header\": {\n             \"fill\": {\n              \"color\": \"#C8D4E3\"\n             },\n             \"line\": {\n              \"color\": \"white\"\n             }\n            },\n            \"type\": \"table\"\n           }\n          ]\n         },\n         \"layout\": {\n          \"annotationdefaults\": {\n           \"arrowcolor\": \"#2a3f5f\",\n           \"arrowhead\": 0,\n           \"arrowwidth\": 1\n          },\n          \"colorscale\": {\n           \"diverging\": [\n            [\n             0,\n             \"#8e0152\"\n            ],\n            [\n             0.1,\n             \"#c51b7d\"\n            ],\n            [\n             0.2,\n             \"#de77ae\"\n            ],\n            [\n             0.3,\n             \"#f1b6da\"\n            ],\n            [\n             0.4,\n             \"#fde0ef\"\n            ],\n            [\n             0.5,\n             \"#f7f7f7\"\n            ],\n            [\n             0.6,\n             \"#e6f5d0\"\n            ],\n            [\n             0.7,\n             \"#b8e186\"\n            ],\n            [\n             0.8,\n             \"#7fbc41\"\n            ],\n            [\n             0.9,\n             \"#4d9221\"\n            ],\n            [\n             1,\n             \"#276419\"\n            ]\n           ],\n           \"sequential\": [\n            [\n             0,\n             \"#0d0887\"\n            ],\n            [\n             0.1111111111111111,\n             \"#46039f\"\n            ],\n            [\n             0.2222222222222222,\n             \"#7201a8\"\n            ],\n            [\n             0.3333333333333333,\n             \"#9c179e\"\n            ],\n            [\n             0.4444444444444444,\n             \"#bd3786\"\n            ],\n            [\n             0.5555555555555556,\n             \"#d8576b\"\n            ],\n            [\n             0.6666666666666666,\n             \"#ed7953\"\n            ],\n            [\n             0.7777777777777778,\n             \"#fb9f3a\"\n            ],\n            [\n             0.8888888888888888,\n             \"#fdca26\"\n            ],\n            [\n             1,\n             \"#f0f921\"\n            ]\n           ],\n           \"sequentialminus\": [\n            [\n             0,\n             \"#0d0887\"\n            ],\n            [\n             0.1111111111111111,\n             \"#46039f\"\n            ],\n            [\n             0.2222222222222222,\n             \"#7201a8\"\n            ],\n            [\n             0.3333333333333333,\n             \"#9c179e\"\n            ],\n            [\n             0.4444444444444444,\n             \"#bd3786\"\n            ],\n            [\n             0.5555555555555556,\n             \"#d8576b\"\n            ],\n            [\n             0.6666666666666666,\n             \"#ed7953\"\n            ],\n            [\n             0.7777777777777778,\n             \"#fb9f3a\"\n            ],\n            [\n             0.8888888888888888,\n             \"#fdca26\"\n            ],\n            [\n             1,\n             \"#f0f921\"\n            ]\n           ]\n          },\n          \"colorway\": [\n           \"#636efa\",\n           \"#EF553B\",\n           \"#00cc96\",\n           \"#ab63fa\",\n           \"#FFA15A\",\n           \"#19d3f3\",\n           \"#FF6692\",\n           \"#B6E880\",\n           \"#FF97FF\",\n           \"#FECB52\"\n          ],\n          \"font\": {\n           \"color\": \"#2a3f5f\"\n          },\n          \"geo\": {\n           \"bgcolor\": \"white\",\n           \"lakecolor\": \"white\",\n           \"landcolor\": \"#E5ECF6\",\n           \"showlakes\": true,\n           \"showland\": true,\n           \"subunitcolor\": \"white\"\n          },\n          \"hoverlabel\": {\n           \"align\": \"left\"\n          },\n          \"hovermode\": \"closest\",\n          \"mapbox\": {\n           \"style\": \"light\"\n          },\n          \"paper_bgcolor\": \"white\",\n          \"plot_bgcolor\": \"#E5ECF6\",\n          \"polar\": {\n           \"angularaxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           },\n           \"bgcolor\": \"#E5ECF6\",\n           \"radialaxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           }\n          },\n          \"scene\": {\n           \"xaxis\": {\n            \"backgroundcolor\": \"#E5ECF6\",\n            \"gridcolor\": \"white\",\n            \"gridwidth\": 2,\n            \"linecolor\": \"white\",\n            \"showbackground\": true,\n            \"ticks\": \"\",\n            \"zerolinecolor\": \"white\"\n           },\n           \"yaxis\": {\n            \"backgroundcolor\": \"#E5ECF6\",\n            \"gridcolor\": \"white\",\n            \"gridwidth\": 2,\n            \"linecolor\": \"white\",\n            \"showbackground\": true,\n            \"ticks\": \"\",\n            \"zerolinecolor\": \"white\"\n           },\n           \"zaxis\": {\n            \"backgroundcolor\": \"#E5ECF6\",\n            \"gridcolor\": \"white\",\n            \"gridwidth\": 2,\n            \"linecolor\": \"white\",\n            \"showbackground\": true,\n            \"ticks\": \"\",\n            \"zerolinecolor\": \"white\"\n           }\n          },\n          \"shapedefaults\": {\n           \"line\": {\n            \"color\": \"#2a3f5f\"\n           }\n          },\n          \"ternary\": {\n           \"aaxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           },\n           \"baxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           },\n           \"bgcolor\": \"#E5ECF6\",\n           \"caxis\": {\n            \"gridcolor\": \"white\",\n            \"linecolor\": \"white\",\n            \"ticks\": \"\"\n           }\n          },\n          \"title\": {\n           \"x\": 0.05\n          },\n          \"xaxis\": {\n           \"automargin\": true,\n           \"gridcolor\": \"white\",\n           \"linecolor\": \"white\",\n           \"ticks\": \"\",\n           \"zerolinecolor\": \"white\",\n           \"zerolinewidth\": 2\n          },\n          \"yaxis\": {\n           \"automargin\": true,\n           \"gridcolor\": \"white\",\n           \"linecolor\": \"white\",\n           \"ticks\": \"\",\n           \"zerolinecolor\": \"white\",\n           \"zerolinewidth\": 2\n          }\n         }\n        },\n        \"title\": {\n         \"text\": \"bar plot\"\n        }\n       }\n      },\n      \"text/html\": [\n       \"<div>\\n\",\n       \"        \\n\",\n       \"        \\n\",\n       \"            <div id=\\\"57e8e21f-a2f4-4fdd-a1d2-3dfae2e7e09c\\\" class=\\\"plotly-graph-div\\\" style=\\\"height:525px; width:100%;\\\"></div>\\n\",\n       \"            <script type=\\\"text/javascript\\\">\\n\",\n       \"                require([\\\"plotly\\\"], function(Plotly) {\\n\",\n       \"                    window.PLOTLYENV=window.PLOTLYENV || {};\\n\",\n       \"                    \\n\",\n       \"                if (document.getElementById(\\\"57e8e21f-a2f4-4fdd-a1d2-3dfae2e7e09c\\\")) {\\n\",\n       \"                    Plotly.newPlot(\\n\",\n       \"                        '57e8e21f-a2f4-4fdd-a1d2-3dfae2e7e09c',\\n\",\n       \"                        [{\\\"marker\\\": {\\\"color\\\": \\\"purple\\\"}, \\\"type\\\": \\\"bar\\\", \\\"y\\\": [2, 3, 1]}],\\n\",\n       \"                        {\\\"template\\\": {\\\"data\\\": {\\\"bar\\\": [{\\\"error_x\\\": {\\\"color\\\": \\\"#2a3f5f\\\"}, \\\"error_y\\\": {\\\"color\\\": \\\"#2a3f5f\\\"}, \\\"marker\\\": {\\\"line\\\": {\\\"color\\\": \\\"#E5ECF6\\\", \\\"width\\\": 0.5}}, \\\"type\\\": \\\"bar\\\"}], \\\"barpolar\\\": [{\\\"marker\\\": {\\\"line\\\": {\\\"color\\\": \\\"#E5ECF6\\\", \\\"width\\\": 0.5}}, \\\"type\\\": \\\"barpolar\\\"}], \\\"carpet\\\": [{\\\"aaxis\\\": {\\\"endlinecolor\\\": \\\"#2a3f5f\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"minorgridcolor\\\": \\\"white\\\", \\\"startlinecolor\\\": \\\"#2a3f5f\\\"}, \\\"baxis\\\": {\\\"endlinecolor\\\": \\\"#2a3f5f\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"minorgridcolor\\\": \\\"white\\\", \\\"startlinecolor\\\": \\\"#2a3f5f\\\"}, \\\"type\\\": \\\"carpet\\\"}], \\\"choropleth\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"type\\\": \\\"choropleth\\\"}], \\\"contour\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"contour\\\"}], \\\"contourcarpet\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"type\\\": \\\"contourcarpet\\\"}], \\\"heatmap\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"heatmap\\\"}], \\\"heatmapgl\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"heatmapgl\\\"}], \\\"histogram\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"histogram\\\"}], \\\"histogram2d\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"histogram2d\\\"}], \\\"histogram2dcontour\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"histogram2dcontour\\\"}], \\\"mesh3d\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"type\\\": \\\"mesh3d\\\"}], \\\"parcoords\\\": [{\\\"line\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"parcoords\\\"}], \\\"scatter\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatter\\\"}], \\\"scatter3d\\\": [{\\\"line\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatter3d\\\"}], \\\"scattercarpet\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scattercarpet\\\"}], \\\"scattergeo\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scattergeo\\\"}], \\\"scattergl\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scattergl\\\"}], \\\"scattermapbox\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scattermapbox\\\"}], \\\"scatterpolar\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatterpolar\\\"}], \\\"scatterpolargl\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatterpolargl\\\"}], \\\"scatterternary\\\": [{\\\"marker\\\": {\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}}, \\\"type\\\": \\\"scatterternary\\\"}], \\\"surface\\\": [{\\\"colorbar\\\": {\\\"outlinewidth\\\": 0, \\\"ticks\\\": \\\"\\\"}, \\\"colorscale\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"type\\\": \\\"surface\\\"}], \\\"table\\\": [{\\\"cells\\\": {\\\"fill\\\": {\\\"color\\\": \\\"#EBF0F8\\\"}, \\\"line\\\": {\\\"color\\\": \\\"white\\\"}}, \\\"header\\\": {\\\"fill\\\": {\\\"color\\\": \\\"#C8D4E3\\\"}, \\\"line\\\": {\\\"color\\\": \\\"white\\\"}}, \\\"type\\\": \\\"table\\\"}]}, \\\"layout\\\": {\\\"annotationdefaults\\\": {\\\"arrowcolor\\\": \\\"#2a3f5f\\\", \\\"arrowhead\\\": 0, \\\"arrowwidth\\\": 1}, \\\"colorscale\\\": {\\\"diverging\\\": [[0, \\\"#8e0152\\\"], [0.1, \\\"#c51b7d\\\"], [0.2, \\\"#de77ae\\\"], [0.3, \\\"#f1b6da\\\"], [0.4, \\\"#fde0ef\\\"], [0.5, \\\"#f7f7f7\\\"], [0.6, \\\"#e6f5d0\\\"], [0.7, \\\"#b8e186\\\"], [0.8, \\\"#7fbc41\\\"], [0.9, \\\"#4d9221\\\"], [1, \\\"#276419\\\"]], \\\"sequential\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]], \\\"sequentialminus\\\": [[0.0, \\\"#0d0887\\\"], [0.1111111111111111, \\\"#46039f\\\"], [0.2222222222222222, \\\"#7201a8\\\"], [0.3333333333333333, \\\"#9c179e\\\"], [0.4444444444444444, \\\"#bd3786\\\"], [0.5555555555555556, \\\"#d8576b\\\"], [0.6666666666666666, \\\"#ed7953\\\"], [0.7777777777777778, \\\"#fb9f3a\\\"], [0.8888888888888888, \\\"#fdca26\\\"], [1.0, \\\"#f0f921\\\"]]}, \\\"colorway\\\": [\\\"#636efa\\\", \\\"#EF553B\\\", \\\"#00cc96\\\", \\\"#ab63fa\\\", \\\"#FFA15A\\\", \\\"#19d3f3\\\", \\\"#FF6692\\\", \\\"#B6E880\\\", \\\"#FF97FF\\\", \\\"#FECB52\\\"], \\\"font\\\": {\\\"color\\\": \\\"#2a3f5f\\\"}, \\\"geo\\\": {\\\"bgcolor\\\": \\\"white\\\", \\\"lakecolor\\\": \\\"white\\\", \\\"landcolor\\\": \\\"#E5ECF6\\\", \\\"showlakes\\\": true, \\\"showland\\\": true, \\\"subunitcolor\\\": \\\"white\\\"}, \\\"hoverlabel\\\": {\\\"align\\\": \\\"left\\\"}, \\\"hovermode\\\": \\\"closest\\\", \\\"mapbox\\\": {\\\"style\\\": \\\"light\\\"}, \\\"paper_bgcolor\\\": \\\"white\\\", \\\"plot_bgcolor\\\": \\\"#E5ECF6\\\", \\\"polar\\\": {\\\"angularaxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}, \\\"bgcolor\\\": \\\"#E5ECF6\\\", \\\"radialaxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}}, \\\"scene\\\": {\\\"xaxis\\\": {\\\"backgroundcolor\\\": \\\"#E5ECF6\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"gridwidth\\\": 2, \\\"linecolor\\\": \\\"white\\\", \\\"showbackground\\\": true, \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\"}, \\\"yaxis\\\": {\\\"backgroundcolor\\\": \\\"#E5ECF6\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"gridwidth\\\": 2, \\\"linecolor\\\": \\\"white\\\", \\\"showbackground\\\": true, \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\"}, \\\"zaxis\\\": {\\\"backgroundcolor\\\": \\\"#E5ECF6\\\", \\\"gridcolor\\\": \\\"white\\\", \\\"gridwidth\\\": 2, \\\"linecolor\\\": \\\"white\\\", \\\"showbackground\\\": true, \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\"}}, \\\"shapedefaults\\\": {\\\"line\\\": {\\\"color\\\": \\\"#2a3f5f\\\"}}, \\\"ternary\\\": {\\\"aaxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}, \\\"baxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}, \\\"bgcolor\\\": \\\"#E5ECF6\\\", \\\"caxis\\\": {\\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\"}}, \\\"title\\\": {\\\"x\\\": 0.05}, \\\"xaxis\\\": {\\\"automargin\\\": true, \\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\", \\\"zerolinewidth\\\": 2}, \\\"yaxis\\\": {\\\"automargin\\\": true, \\\"gridcolor\\\": \\\"white\\\", \\\"linecolor\\\": \\\"white\\\", \\\"ticks\\\": \\\"\\\", \\\"zerolinecolor\\\": \\\"white\\\", \\\"zerolinewidth\\\": 2}}}, \\\"title\\\": {\\\"text\\\": \\\"bar plot\\\"}},\\n\",\n       \"                        {\\\"responsive\\\": true}\\n\",\n       \"                    ).then(function(){\\n\",\n       \"                            \\n\",\n       \"var gd = document.getElementById('57e8e21f-a2f4-4fdd-a1d2-3dfae2e7e09c');\\n\",\n       \"var x = new MutationObserver(function (mutations, observer) {{\\n\",\n       \"        var display = window.getComputedStyle(gd).display;\\n\",\n       \"        if (!display || display === 'none') {{\\n\",\n       \"            console.log([gd, 'removed!']);\\n\",\n       \"            Plotly.purge(gd);\\n\",\n       \"            observer.disconnect();\\n\",\n       \"        }}\\n\",\n       \"}});\\n\",\n       \"\\n\",\n       \"// Listen for the removal of the full notebook cells\\n\",\n       \"var notebookContainer = gd.closest('#notebook-container');\\n\",\n       \"if (notebookContainer) {{\\n\",\n       \"    x.observe(notebookContainer, {childList: true});\\n\",\n       \"}}\\n\",\n       \"\\n\",\n       \"// Listen for the clearing of the current output cell\\n\",\n       \"var outputEl = gd.closest('.output');\\n\",\n       \"if (outputEl) {{\\n\",\n       \"    x.observe(outputEl, {childList: true});\\n\",\n       \"}}\\n\",\n       \"\\n\",\n       \"                        })\\n\",\n       \"                };\\n\",\n       \"                });\\n\",\n       \"            </script>\\n\",\n       \"        </div>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"import plotly.graph_objects as go\\n\",\n    \"fig = go.Figure(\\n\",\n    \"    data=[go.Bar(y=[2, 3, 1])],\\n\",\n    \"    layout=go.Layout(title=\\\"bar plot\\\"))\\n\",\n    \"fig.show()\\n\",\n    \"fig.data[0].marker = dict(color='purple')\\n\",\n    \"fig\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.7.4\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/raw_cell_with_complex_yaml_like_content.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"b32297a4\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"\\n\",\n    \"This is a complex paragraph\\n\",\n    \"that is split over multiple lines.\\n\",\n    \"\\n\",\n    \"It also includes blank lines.\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"---\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"id\": \"0b3bde0a\",\n   \"source\": [\n    \"print(\\\"Hello, World!\\\")\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"name\": \"python\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/raw_cell_with_non_dict_yaml_content.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"b32297a4\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"Content.\\n\",\n    \"---\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"id\": \"0b3bde0a\",\n   \"source\": [\n    \"print(\\\"Hello, World!\\\")\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"name\": \"python\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/sample_rise_notebook_66.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"slideshow\": {\n     \"slide_type\": \"slide\"\n    }\n   },\n   \"source\": [\n    \"A markdown cell\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"slideshow\": {\n     \"slide_type\": \"\"\n    }\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"1+1\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_style\": \"center\",\n    \"slideshow\": {\n     \"slide_type\": \"fragment\"\n    }\n   },\n   \"source\": [\n    \"Markdown cell two\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_py/text_outputs_and_images.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This notebook contains outputs of many different types: text, HTML, plots and errors.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Text outputs\\n\",\n    \"\\n\",\n    \"Using `print`, `sys.stdout` and `sys.stderr`\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import sys\\n\",\n    \"print('using print')\\n\",\n    \"sys.stdout.write('using sys.stdout.write')\\n\",\n    \"sys.stderr.write('using sys.stderr.write')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import logging\\n\",\n    \"logging.debug('Debug')\\n\",\n    \"logging.info('Info')\\n\",\n    \"logging.warning('Warning')\\n\",\n    \"logging.error('Error')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# HTML outputs\\n\",\n    \"\\n\",\n    \"Using `pandas`. Here we find two representations: both text and HTML.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>0</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>4</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   0\\n\",\n       \"0  4\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"import pandas as pd\\n\",\n    \"pd.DataFrame([4])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>0</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>5</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   0\\n\",\n       \"0  5\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>0</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>6</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   0\\n\",\n       \"0  6\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from IPython.display import display\\n\",\n    \"display(pd.DataFrame([5]))\\n\",\n    \"display(pd.DataFrame([6]))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Images\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%matplotlib inline\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAC40lEQVR4nO3YQQqEQAwAQWfx/1/OfsD1prZL1dFcgtAEZs3MBvR8nl4AOCZOiBInRIkTosQJUfvZcG3LUy5cbLZZR99dTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBC1n07X3LTGO822nl6Bf/AjM5cTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiNpPp7NuWuOl/B4u5HJClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEqDUzT+8AHHA5IUqcECVOiBInRIkTosQJUV9CQA7NqGQ33wAAAABJRU5ErkJggg==\\n\",\n      \"text/plain\": [\n       \"<Figure size 432x288 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {\n      \"needs_background\": \"light\"\n     },\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAC3klEQVR4nO3YMYrEQAwAQevw/7+syw/j7OzepSocJUoawczuHkDPz9sLANfECVHihChxQpQ4Ieq8G84xvnLhn+2xc/XuckKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oSo83Y6+9Aan2l33l6BL+ZyQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHn7XTnoTWAv1xOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcECVOiBInRIkTosQJUeKEKHFClDghSpwQJU6IEidEiROixAlR4oQocUKUOCFKnBAlTogSJ0SJE6LECVHihChxQpQ4IUqcEDW7+/YOwAWXE6LECVHihChxQpQ4IUqcEPULaDUOzB7yGqYAAAAASUVORK5CYII=\\n\",\n      \"text/plain\": [\n       \"<Figure size 432x288 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {\n      \"needs_background\": \"light\"\n     },\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# First plot\\n\",\n    \"from matplotlib import pyplot as plt\\n\",\n    \"import numpy as np\\n\",\n    \"w, h = 3, 3\\n\",\n    \"data = np.zeros((h, w, 3), dtype=np.uint8)\\n\",\n    \"data[0,:] = [0,255,0]\\n\",\n    \"data[1,:] = [0,0,255]\\n\",\n    \"data[2,:] = [0,255,0]\\n\",\n    \"data[1:3,1:3] = [255, 0, 0]\\n\",\n    \"plt.imshow(data)\\n\",\n    \"plt.axis('off')\\n\",\n    \"plt.show()\\n\",\n    \"# Second plot\\n\",\n    \"data[1:3,1:3] = [255, 255, 0]\\n\",\n    \"plt.imshow(data)\\n\",\n    \"plt.axis('off')\\n\",\n    \"plt.show()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Errors\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"ename\": \"NameError\",\n     \"evalue\": \"name 'undefined_variable' is not defined\",\n     \"output_type\": \"error\",\n     \"traceback\": [\n      \"\\u001b[1;31m---------------------------------------------------------------------------\\u001b[0m\",\n      \"\\u001b[1;31mNameError\\u001b[0m                                 Traceback (most recent call last)\",\n      \"\\u001b[1;32m<ipython-input-7-4c6d5bf4bce5>\\u001b[0m in \\u001b[0;36m<module>\\u001b[1;34m\\u001b[0m\\n\\u001b[1;32m----> 1\\u001b[1;33m \\u001b[0mundefined_variable\\u001b[0m\\u001b[1;33m\\u001b[0m\\u001b[1;33m\\u001b[0m\\u001b[0m\\n\\u001b[0m\",\n      \"\\u001b[1;31mNameError\\u001b[0m: name 'undefined_variable' is not defined\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"undefined_variable\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.7.4\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_q/kalman_filter_and_visualization.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 32,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plt: .p.import`matplotlib.pyplot\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 33,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"filter: {\\n\",\n    \"    t: ([] x: `float $ x; xh: `float $ x; p: (count x) # R: var x);\\n\",\n    \"    (first t), iterate[R; R]\\\\[first t; 1 _ t] \\n\",\n    \"    }\\n\",\n    \"\\n\",\n    \"iterate: {[Q; R; x; y]\\n\",\n    \"    x[`p]+: Q;\\n\",\n    \"    k: x[`p] % R + x[`p];\\n\",\n    \"    `x`xh`p ! (y[`x]; x[`xh] + k * y[`x] - x[`xh]; (1 - k) * x[`p])\\n\",\n    \"    }\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 36,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"price: 100 + sums 0.5 - (n:50)?1.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 37,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"output:filter price\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 38,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\",\n      \"text/plain\": [\n       \"<Figure size 460.8x345.6 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"plt[`:plot][til n; output`x; `label pykw \\\"price\\\"];\\n\",\n    \"plt[`:plot][til n; output`xh;`label pykw \\\"forecast\\\"];\\n\",\n    \"plt[`:legend][];\\n\",\n    \"plt[`:show][];\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Q 3.5\",\n   \"language\": \"q\",\n   \"name\": \"qpk\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".q\",\n   \"mimetype\": \"text/x-q\",\n   \"name\": \"q\",\n   \"version\": \"3.6.0\"\n  },\n  \"toc\": {\n   \"base_numbering\": 1,\n   \"nav_menu\": {},\n   \"number_sections\": true,\n   \"sideBar\": true,\n   \"skip_h1_title\": false,\n   \"title_cell\": \"Table of Contents\",\n   \"title_sidebar\": \"Contents\",\n   \"toc_cell\": false,\n   \"toc_position\": {},\n   \"toc_section_display\": true,\n   \"toc_window_display\": false\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_robot/simple_robot_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"*** Settings ***\\n\",\n    \"\\n\",\n    \"Library  Collections\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"*** Keywords ***\\n\",\n    \"\\n\",\n    \"Head\\n\",\n    \"    [Arguments]  ${list}\\n\",\n    \"    ${value}=  Get from list  ${list}  0\\n\",\n    \"    [Return]  ${value}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"lines_to_next_cell\": 0\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"*** Tasks ***\\n\",\n    \"\\n\",\n    \"Get head\\n\",\n    \"    ${array}=  Create list  1  2  3  4  5\\n\",\n    \"    ${head}=  Head  ${array}\\n\",\n    \"    Should be equal  ${head}  1\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Robot Framework\",\n   \"language\": \"robotframework\",\n   \"name\": \"robotkernel\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"robotframework\",\n   \"file_extension\": \".robot\",\n   \"mimetype\": \"text/plain\",\n   \"name\": \"robotframework\",\n   \"pygments_lexer\": \"robotframework\"\n  },\n  \"pycharm\": {\n   \"stem_cell\": {\n    \"cell_type\": \"raw\",\n    \"metadata\": {\n     \"collapsed\": false\n    },\n    \"source\": []\n   }\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_rust/evcxr_jupyter_tour.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Tour of the EvCxR Jupyter Kernel\\n\",\n    \"For those not already familiar with Jupyter notebook, it lets you write code into \\\"cells\\\" like the box below. Cells can alternatively contain markdown, like this text here. Each code cell is compiled and executed separately, but variables, defined functions etc persist between cells.\\n\",\n    \"\\n\",\n    \"## Printing to outputs and evaluating expressions\\n\",\n    \"Lets print something to stdout and stderr then return a final expression to see how that's presented. Note that stdout and stderr are separate streams, so may not appear in the same order is their respective print statements.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Hello error\\n\"\n     ]\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Hello world\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"\\\"Hello world\\\"\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"println!(\\\"Hello world\\\");\\n\",\n    \"eprintln!(\\\"Hello error\\\");\\n\",\n    \"format!(\\\"Hello {}\\\", \\\"world\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Assigning and making use of variables\\n\",\n    \"We define a variable `message`, then in the subsequent cell, modify the string and finally print it out. We could also do all this in the one cell if we wanted.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"let mut message = \\\"Hello \\\".to_owned();\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"message.push_str(\\\"world!\\\");\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"\\\"Hello world!\\\"\"\n      ]\n     },\n     \"execution_count\": 5,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"message\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Defining and redefining functions\\n\",\n    \"Next we'll define a function\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"pub fn fib(x: i32) -> i32 {\\n\",\n    \"    if x <= 2 {0} else {fib(x - 2) + fib(x - 1)}\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\"\n      ]\n     },\n     \"execution_count\": 7,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"(1..13).map(fib).collect::<Vec<i32>>()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Hmm, that doesn't look right. Lets redefine the function. In practice, we'd go back and edit the function above and reevaluate it, but here, lets redefine it in a separate cell.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"pub fn fib(x: i32) -> i32 {\\n\",\n    \"    if x <= 2 {2} else {fib(x - 2) + fib(x - 1)}\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"[2, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288]\"\n      ]\n     },\n     \"execution_count\": 9,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"let values = (1..13).map(fib).collect::<Vec<i32>>();\\n\",\n    \"values\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Spawning a separate thread and communicating with it\\n\",\n    \"We can spawn a thread to do stuff in the background, then continue executing code in other cells.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 10,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"use std::sync::{Mutex, Arc};\\n\",\n    \"let counter = Arc::new(Mutex::new(0i32));\\n\",\n    \"std::thread::spawn({\\n\",\n    \"    let counter = Arc::clone(&counter);\\n\",\n    \"    move || {\\n\",\n    \"        for i in 1..300 {\\n\",\n    \"            *counter.lock().unwrap() += 1;\\n\",\n    \"            std::thread::sleep(std::time::Duration::from_millis(100));\\n\",\n    \"        }\\n\",\n    \"}});\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 11,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"17\"\n      ]\n     },\n     \"execution_count\": 11,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"*counter.lock().unwrap()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 12,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"29\"\n      ]\n     },\n     \"execution_count\": 12,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"*counter.lock().unwrap()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Loading external crates\\n\",\n    \"We can load external crates. This one takes a while to compile, but once it's compiled, subsequent cells shouldn't need to recompile it, so it should be much quicker.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 14,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"\\\"AQIDBA==\\\"\"\n      ]\n     },\n     \"execution_count\": 14,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \":dep base64 = \\\"0.10.1\\\"\\n\",\n    \"base64::encode(&vec![1, 2, 3, 4])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Customizing how types are displayed\\n\",\n    \"We can also customize how our types are displayed, including presenting them as HTML. Here's an example where we define a custom display function for a type `Matrix`.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"use std::fmt::Debug;\\n\",\n    \"pub struct Matrix<T> {pub values: Vec<T>, pub row_size: usize}\\n\",\n    \"impl<T: Debug> Matrix<T> {\\n\",\n    \"    pub fn evcxr_display(&self) {\\n\",\n    \"        let mut html = String::new();\\n\",\n    \"        html.push_str(\\\"<table>\\\");\\n\",\n    \"        for r in 0..(self.values.len() / self.row_size) {\\n\",\n    \"            html.push_str(\\\"<tr>\\\");\\n\",\n    \"            for c in 0..self.row_size {\\n\",\n    \"                html.push_str(\\\"<td>\\\");\\n\",\n    \"                html.push_str(&format!(\\\"{:?}\\\", self.values[r * self.row_size + c]));\\n\",\n    \"                html.push_str(\\\"</td>\\\");\\n\",\n    \"            }\\n\",\n    \"            html.push_str(\\\"</tr>\\\");            \\n\",\n    \"        }\\n\",\n    \"        html.push_str(\\\"</table>\\\");\\n\",\n    \"        println!(\\\"EVCXR_BEGIN_CONTENT text/html\\\\n{}\\\\nEVCXR_END_CONTENT\\\", html);\\n\",\n    \"    }\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<table><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>4</td><td>5</td><td>6</td></tr><tr><td>7</td><td>8</td><td>9</td></tr></table>\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"let m = Matrix {values: vec![1,2,3,4,5,6,7,8,9], row_size: 3};\\n\",\n    \"m\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"We can also return images, we just need to base64 encode them. First, we set up code for displaying RGB and grayscale images.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"extern crate image;\\n\",\n    \"extern crate base64;\\n\",\n    \"pub trait EvcxrResult {fn evcxr_display(&self);}\\n\",\n    \"impl EvcxrResult for image::RgbImage {\\n\",\n    \"    fn evcxr_display(&self) {\\n\",\n    \"        let mut buffer = Vec::new();\\n\",\n    \"        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\\n\",\n    \"            image::ColorType::RGB(8)).unwrap();\\n\",\n    \"        let img = base64::encode(&buffer);\\n\",\n    \"        println!(\\\"EVCXR_BEGIN_CONTENT image/png\\\\n{}\\\\nEVCXR_END_CONTENT\\\", img);        \\n\",\n    \"    }\\n\",\n    \"}\\n\",\n    \"impl EvcxrResult for image::GrayImage {\\n\",\n    \"    fn evcxr_display(&self) {\\n\",\n    \"        let mut buffer = Vec::new();\\n\",\n    \"        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\\n\",\n    \"            image::ColorType::Gray(8)).unwrap();\\n\",\n    \"        let img = base64::encode(&buffer);\\n\",\n    \"        println!(\\\"EVCXR_BEGIN_CONTENT image/png\\\\n{}\\\\nEVCXR_END_CONTENT\\\", img);        \\n\",\n    \"    }\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"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\"\n     },\n     \"execution_count\": 5,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"image::ImageBuffer::from_fn(256, 256, |x, y| {\\n\",\n    \"    if (x as i32 - y as i32).abs() < 3 {\\n\",\n    \"        image::Rgb([0, 0, 255])\\n\",\n    \"    } else {\\n\",\n    \"        image::Rgb([0, 0, 0])\\n\",\n    \"    }\\n\",\n    \"})\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Display of compilation errors\\n\",\n    \"Here's how compilation errors are presented. Here we forgot an & and passed a String instead of an &str.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 17,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"ename\": \"Error\",\n     \"evalue\": \"mismatched types\",\n     \"output_type\": \"error\",\n     \"traceback\": [\n      \"s.push_str(format!(\\\"foo {}\\\", 42));\",\n      \"\\u001b[91m           ^^^^^^^^^^^^^^^^^^^^^\\u001b[0m \\u001b[94mexpected &str, found struct `std::string::String`\\u001b[0m\",\n      \"mismatched types\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"let mut s = String::new();\\n\",\n    \"s.push_str(format!(\\\"foo {}\\\", 42));\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Seeing what variables have been defined\\n\",\n    \"We can print a table of defined variables and their types with the :vars command.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 19,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<table><tr><th>Variable</th><th>Type</th></tr><tr><td>counter</td><td>std::sync::Arc&lt;std::sync::Mutex&lt;i32&gt;&gt;</td><tr><tr><td>message</td><td>String</td><tr><tr><td>m</td><td>user_code_13::Matrix&lt;i32&gt;</td><tr><tr><td>values</td><td>std::vec::Vec&lt;i32&gt;</td><tr></table>\"\n      ],\n      \"text/plain\": [\n       \"counter: std::sync::Arc<std::sync::Mutex<i32>>\\n\",\n       \"message: String\\n\",\n       \"m: user_code_13::Matrix<i32>\\n\",\n       \"values: std::vec::Vec<i32>\\n\"\n      ]\n     },\n     \"execution_count\": 19,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \":vars\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Other built-in commands can be found via :help\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \":vars             List bound variables and their types\\n\",\n       \":opt [level]      Toggle/set optimization level\\n\",\n       \":explain          Print explanation of last error\\n\",\n       \":clear            Clear all state, keeping compilation cache\\n\",\n       \":dep              Add dependency. e.g. :dep regex = \\\"1.0\\\"\\n\",\n       \":version          Print Evcxr version\\n\",\n       \":preserve_vars_on_panic [0|1]  Try to keep vars on panic\\n\",\n       \"\\n\",\n       \"Mostly for development / debugging purposes:\\n\",\n       \":last_compile_dir Print the directory in which we last compiled\\n\",\n       \":timing           Toggle printing of how long evaluations take\\n\",\n       \":last_error_json  Print the last compilation error as JSON (for debugging)\\n\",\n       \":time_passes      Toggle printing of rustc pass times (requires nightly)\\n\",\n       \":internal_debug   Toggle various internal debugging code\\n\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \":help\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Rust\",\n   \"language\": \"rust\",\n   \"name\": \"rust\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"rust\",\n   \"file_extension\": \".rs\",\n   \"mimetype\": \"text/rust\",\n   \"name\": \"Rust\",\n   \"pygment_lexer\": \"rust\",\n   \"version\": \"\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_sage/sage_print_hello.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"print(\\\"Hello world\\\")\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"SageMath 9.2\",\n   \"language\": \"sage\",\n   \"name\": \"sagemath\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.9.1\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_sas/sas.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"14a71cf0-4339-4ae6-982d-7dda15f3810e\",\n   \"metadata\": {},\n   \"source\": [\n    \"# SAS Notebooks with jupytext\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"47346888-e79f-4205-82fd-3a5fdfde9b4d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"proc sql;\\n\",\n    \"    select *\\n\",\n    \"    from sashelp.cars (obs=10)\\n\",\n    \"    ;\\n\",\n    \"quit; \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c96b0faf-26fe-4245-a1d9-78dee30b19c3\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%let name = \\\"Jupytext\\\";\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"56cafffb-e397-4c3b-97ab-c6970149b6bc\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%put &name;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"bbc273c9-8690-450d-bd9b-2d075d512437\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"/* Note when defining macros \\\"%macro\\\" cannot be the first line of text in the cell */\\n\",\n    \"%macro test;\\n\",\n    \"    data temp;\\n\",\n    \"        set sashelp.cars;\\n\",\n    \"        name = \\\"testx\\\";\\n\",\n    \"    run; \\n\",\n    \"    proc print data = temp (obs=10);\\n\",\n    \"    run; \\n\",\n    \"%mend test;\\n\",\n    \"\\n\",\n    \"%test\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"SAS\",\n   \"language\": \"sas\",\n   \"name\": \"sas\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"sas\",\n   \"file_extension\": \".sas\",\n   \"mimetype\": \"text/x-sas\",\n   \"name\": \"sas\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_scala/simple_scala_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"defined object SampleObject\\n\",\n       \"result = 3\\n\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"3\"\n      ]\n     },\n     \"execution_count\": 5,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"// This is just a simple scala notebook\\n\",\n    \"\\n\",\n    \"object SampleObject {\\n\",\n    \"    def calculation(x: Int, y: Int): Int = x + y\\n\",\n    \"}\\n\",\n    \"\\n\",\n    \"val result = SampleObject.calculation(1, 2)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"30\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"println(result * 10)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Apache Toree - Scala\",\n   \"language\": \"scala\",\n   \"name\": \"apache_toree_scala\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"text/x-scala\",\n   \"file_extension\": \".scala\",\n   \"mimetype\": \"text/x-scala\",\n   \"name\": \"scala\",\n   \"pygments_lexer\": \"scala\",\n   \"version\": \"2.11.12\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_scheme/Reference Guide for Calysto Scheme.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<img src=\\\"images/logo-64x64.png\\\"/>\\n\",\n    \"<h1>Reference Guide for Calysto Scheme</h1>\\n\",\n    \"\\n\",\n    \"[Calysto Scheme](https://github.com/Calysto/calysto_scheme) is a real Scheme programming language, with full support for continuations, including call/cc. It can also use all Python libraries. Also has some extensions that make it more useful (stepper-debugger, choose/fail, stack traces), or make it better integrated with Python.\\n\",\n    \"\\n\",\n    \"In Jupyter notebooks, because Calysto Scheme uses [MetaKernel](https://github.com/Calysto/metakernel/blob/master/README.rst), it has a fully-supported set of \\\"magics\\\"---meta-commands for additional functionality. This includes running Scheme in parallel. See all of the [MetaKernel Magics](https://github.com/Calysto/metakernel/blob/master/metakernel/magics/README.md).\\n\",\n    \"\\n\",\n    \"Calysto Scheme is written in Scheme, and then translated into Python (and other backends). The entire functionality lies in a single Python file: https://github.com/Calysto/calysto_scheme/blob/master/calysto_scheme/scheme.py However, you can easily install it (see below).\\n\",\n    \"\\n\",\n    \"Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\\n\",\n    \"\\n\",\n    \"## Installation\\n\",\n    \"\\n\",\n    \"You can install Calysto Scheme with Python3:\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"pip3 install --upgrade calysto-scheme --user -U\\n\",\n    \"python3 -m calysto_kernel install --user\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"or in the system kernel folder with:\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"sudo pip3 install --upgrade calysto-scheme -U\\n\",\n    \"sudo python3 -m calysto_kernel install\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"Change pip3/python3 to use a different pip or Python. The version of Python used will determine how Calysto Scheme is run.\\n\",\n    \"\\n\",\n    \"Use it in the console, qtconsole, or notebook with IPython 3:\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"ipython console --kernel calysto_scheme\\n\",\n    \"ipython qtconsole --kernel calysto_scheme\\n\",\n    \"ipython notebook --kernel calysto_scheme\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"In addition to all of the following items, Calysto Scheme also has access to all of Python's builtin functions, and all of Python's libraries. For example, you can use `(complex 3 2)` to create a complex number by calling Python's complex function.\\n\",\n    \"\\n\",\n    \"## Jupyter Enhancements\\n\",\n    \"\\n\",\n    \"When you run Calysto Scheme in Jupyter (console, notebook, qtconsole, etc.) you get:\\n\",\n    \"\\n\",\n    \"* TAB completions of Scheme functions and variable names\\n\",\n    \"* display of rich media\\n\",\n    \"* stepper/debugger\\n\",\n    \"* magics (% macros)\\n\",\n    \"* shell commands (! command)\\n\",\n    \"* LaTeX equations\\n\",\n    \"* LaTeX-style variables\\n\",\n    \"* Python integration\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### LaTeX-style variables\\n\",\n    \"\\n\",\n    \"Calysto Scheme allows you to use LaTeX-style variables in code. For example, if you type:\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"\\\\beta\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"with the cursor right after the 'a' in beta, and then press TAB, it will turn into the unicode character:\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"β\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"There are nearly 1300 different symbols defined (thanks to the Julia language) and documented here:\\n\",\n    \"\\n\",\n    \"http://docs.julialang.org/en/release-0.4/manual/unicode-input/#man-unicode-input\\n\",\n    \"\\n\",\n    \"Calysto Scheme may not implement all of those. Some useful and suggestive ones:\\n\",\n    \"\\n\",\n    \"* \\\\pi - π\\n\",\n    \"* \\\\Pi - Π\\n\",\n    \"* \\\\Sigma - Σ\\n\",\n    \"* \\\\_i - subscript i, such as vectorᵢ\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define α 67)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"α\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define i 2)\\n\",\n    \"(define vectorᵢ (vector-ref (vector 0 6 3 2) i))\\n\",\n    \"vectorᵢ\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Rich media\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(import \\\"calysto.display\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(calysto.display.HTML \\\"This is <b>bold</b>, <i>italics</i>, <u>underlined</u>.\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(import \\\"calysto.graphics\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define canvas (calysto.graphics.Canvas))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define ball (calysto.graphics.Circle '(150 150) 100))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(ball.draw canvas)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Shell commands\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"! ls /tmp\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Stepper/Debugger\\n\",\n    \"\\n\",\n    \"Here is what the debugger looks like:\\n\",\n    \"\\n\",\n    \"<img src=\\\"images/stepper_debugger.png\\\">\\n\",\n    \"\\n\",\n    \"It has breakpoints (click in left margin). You must press Stop to exit the debugger.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"```scheme\\n\",\n    \"%%debug\\n\",\n    \"\\n\",\n    \"(begin\\n\",\n    \" (define x 1)\\n\",\n    \" (set! x 2)\\n\",\n    \")\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Python Integration\\n\",\n    \"\\n\",\n    \"You can import and use any Python library in Calysto Scheme.\\n\",\n    \"\\n\",\n    \"In addition, if you wish, you can execute expressions and statements in a Python environment:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(python-eval \\\"1 + 2\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(python-exec \\n\",\n    \"\\\"\\n\",\n    \"def mypyfunc(a, b):\\n\",\n    \"    return a * b\\n\",\n    \"\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is a shared environment with Scheme:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(mypyfunc 4 5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"You can use `func` to turn a Scheme procedure into a Python function, and `define!` to put it into the shared environment with Python:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define! mypyfunc2 (func (lambda (n) n)))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(python-eval \\\"mypyfunc2(34)\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Differences Between Languages\\n\",\n    \"\\n\",\n    \"## Major differences between Scheme and Python\\n\",\n    \"\\n\",\n    \"1. In Scheme, double quotes are used for strings and may contain newlines\\n\",\n    \"1. In Scheme, a single quote is short for (quote ...) and means \\\"literal\\\"\\n\",\n    \"1. In Scheme, everything is an expression and has a return value\\n\",\n    \"1. Python does not support macros (e.g., extending syntax)\\n\",\n    \"1. In Python, \\\"if X\\\" is false if X is None, False, [], (,) or 0. In Scheme, \\\"if X\\\" is only false if X is #f or 0\\n\",\n    \"1. Calysto Scheme uses continuations, not the call stack. However, for debugging there is a pseudo-stack when an error is raised. You can turn that off with (use-stack-trace #f)\\n\",\n    \"1. Scheme procedures are not Python functions, but there are means to use one as the other.\\n\",\n    \"\\n\",\n    \"## Major Differences Between Calysto Scheme and other Schemes\\n\",\n    \"\\n\",\n    \"1. define-syntax works slightly differently\\n\",\n    \"1. In Calysto Scheme, #(...) is short for '#(...)\\n\",\n    \"1. Calysto Scheme is missing many standard functions (see list at bottom)\\n\",\n    \"1. Calysto Scheme has a built-in amb operator called `choose`\\n\",\n    \"1. For debugging there is a pseudo-stack when errors are raised in Calysto Scheme. You can turn that off with (use-stack-trace #f)\\n\",\n    \"\\n\",\n    \"### Stack Trace\\n\",\n    \"\\n\",\n    \"Calysto Scheme acts as if it has a call stack, for easier debugging. For example:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define fact\\n\",\n    \"    (lambda (n)\\n\",\n    \"      (if (= n 1)\\n\",\n    \"           q\\n\",\n    \"           (* n (fact (- n 1))))))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(fact 5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"To turn off the stack trace on error:\\n\",\n    \"\\n\",\n    \"```scheme\\n\",\n    \"(use-stack-trace #f)\\n\",\n    \"```\\n\",\n    \"That will allow infinite recursive loops without keeping track of the \\\"stack\\\".\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Calysto Scheme Variables\\n\",\n    \"\\n\",\n    \"## SCHEMEPATH\\n\",\n    \"SCHEMEPATH is a list of search directories used with (load NAME). This is a reference, so you should append to it rather than attempting to redefine it.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"SCHEMEPATH\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(set-cdr! (cdr SCHEMEPATH) (list \\\"/var/modules\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"SCHEMEPATH\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Getting Started\\n\",\n    \"\\n\",\n    \"Note that you can use the word `lambda` or \\\\lambda and then press [TAB]\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define factorial\\n\",\n    \"  (λ (n)\\n\",\n    \"     (cond\\n\",\n    \"      ((zero? n) 1)\\n\",\n    \"      (else (* n (factorial (- n 1)))))))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(factorial 5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## define-syntax\\n\",\n    \"(define-syntax NAME RULES): a method for creating macros\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define-syntax time \\n\",\n    \"  [(time ?exp) (let ((start (current-time)))\\n\",\n    \"                 ?exp\\n\",\n    \"                 (- (current-time) start))])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(time (car '(1 2 3 4)))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \";;---------------------------------------------------------------------\\n\",\n    \";; collect is like list comprehension in Python\\n\",\n    \"\\n\",\n    \"(define-syntax collect\\n\",\n    \"  [(collect ?exp for ?var in ?list)\\n\",\n    \"   (filter-map (lambda (?var) ?exp) (lambda (?var) #t) ?list)]\\n\",\n    \"  [(collect ?exp for ?var in ?list if ?condition)\\n\",\n    \"   (filter-map (lambda (?var) ?exp) (lambda (?var) ?condition) ?list)])\\n\",\n    \"\\n\",\n    \"(define filter-map\\n\",\n    \"  (lambda (f pred? values)\\n\",\n    \"    (if (null? values)\\n\",\n    \"      '()\\n\",\n    \"      (if (pred? (car values))\\n\",\n    \"          (cons (f (car values)) (filter-map f pred? (cdr values)))\\n\",\n    \"          (filter-map f pred? (cdr values))))))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(collect (* n n) for n in (range 10))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(collect (* n n) for n in (range 5 20 3))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(collect (* n n) for n in (range 10) if (> n 5))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \";;---------------------------------------------------------------------\\n\",\n    \";; for loops\\n\",\n    \"\\n\",\n    \"(define-syntax for\\n\",\n    \"  [(for ?exp times do . ?bodies)\\n\",\n    \"   (for-repeat ?exp (lambda () . ?bodies))]\\n\",\n    \"  [(for ?var in ?exp do . ?bodies)\\n\",\n    \"   (for-iterate1 ?exp (lambda (?var) . ?bodies))]\\n\",\n    \"  [(for ?var at (?i) in ?exp do . ?bodies)\\n\",\n    \"   (for-iterate2 0 ?exp (lambda (?var ?i) . ?bodies))]\\n\",\n    \"  [(for ?var at (?i ?j . ?rest) in ?exp do . ?bodies)\\n\",\n    \"   (for ?var at (?i) in ?exp do\\n\",\n    \"     (for ?var at (?j . ?rest) in ?var do . ?bodies))])\\n\",\n    \"\\n\",\n    \"(define for-repeat\\n\",\n    \"  (lambda (n f)\\n\",\n    \"    (if (< n 1)\\n\",\n    \"      'done\\n\",\n    \"      (begin\\n\",\n    \"        (f)\\n\",\n    \"        (for-repeat (- n 1) f)))))\\n\",\n    \"\\n\",\n    \"(define for-iterate1\\n\",\n    \"  (lambda (values f)\\n\",\n    \"    (if (null? values)\\n\",\n    \"      'done\\n\",\n    \"      (begin\\n\",\n    \"        (f (car values))\\n\",\n    \"        (for-iterate1 (cdr values) f)))))\\n\",\n    \"\\n\",\n    \"(define for-iterate2\\n\",\n    \"  (lambda (i values f)\\n\",\n    \"    (if (null? values)\\n\",\n    \"      'done\\n\",\n    \"      (begin\\n\",\n    \"        (f (car values) i)\\n\",\n    \"        (for-iterate2 (+ i 1) (cdr values) f)))))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define matrix2d\\n\",\n    \"  '((10 20)\\n\",\n    \"    (30 40)\\n\",\n    \"    (50 60)\\n\",\n    \"    (70 80)))\\n\",\n    \"\\n\",\n    \"(define matrix3d\\n\",\n    \"  '(((10 20 30) (40 50 60))\\n\",\n    \"    ((70 80 90) (100 110 120))\\n\",\n    \"    ((130 140 150) (160 170 180))\\n\",\n    \"    ((190 200 210) (220 230 240))))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(begin \\n\",\n    \" (define hello 0)\\n\",\n    \" (for 5 times do (set! hello (+ hello 1)))\\n\",\n    \" hello\\n\",\n    \" )\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(for sym in '(a b c d) do (define x 1) (set! x sym) (print x))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(for n in (range 10 20 2) do (print n))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(for n at (i j) in matrix2d do (print (list n 'coords: i j)))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(for n at (i j k) in matrix3d do (print (list n 'coords: i j k)))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(define-syntax scons\\n\",\n    \"  [(scons ?x ?y) (cons ?x (lambda () ?y))])\\n\",\n    \"\\n\",\n    \"(define scar car)\\n\",\n    \"\\n\",\n    \"(define scdr\\n\",\n    \"  (lambda (s)\\n\",\n    \"    (let ((result ((cdr s))))\\n\",\n    \"      (set-cdr! s (lambda () result))\\n\",\n    \"      result)))\\n\",\n    \"\\n\",\n    \"(define first\\n\",\n    \"  (lambda (n s)\\n\",\n    \"    (if (= n 0)\\n\",\n    \"      '()\\n\",\n    \"      (cons (scar s) (first (- n 1) (scdr s))))))\\n\",\n    \"\\n\",\n    \"(define nth\\n\",\n    \"  (lambda (n s)\\n\",\n    \"    (if (= n 0)\\n\",\n    \"      (scar s)\\n\",\n    \"      (nth (- n 1) (scdr s)))))\\n\",\n    \"\\n\",\n    \"(define smap\\n\",\n    \"  (lambda (f s)\\n\",\n    \"    (scons (f (scar s)) (smap f (scdr s)))))\\n\",\n    \"\\n\",\n    \"(define ones (scons 1 ones))\\n\",\n    \"\\n\",\n    \"(define nats (scons 0 (combine nats + ones)))\\n\",\n    \"\\n\",\n    \"(define combine\\n\",\n    \"  (lambda (s1 op s2)\\n\",\n    \"    (scons (op (scar s1) (scar s2)) (combine (scdr s1) op (scdr s2)))))\\n\",\n    \"\\n\",\n    \"(define fibs (scons 1 (scons 1 (combine fibs + (scdr fibs)))))\\n\",\n    \"\\n\",\n    \"(define facts (scons 1 (combine facts * (scdr nats))))\\n\",\n    \"\\n\",\n    \"(define ! (lambda (n) (nth n facts)))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(! 5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(nth 10 facts)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(nth 20 fibs)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(first 30 fibs)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## for-each\\n\",\n    \"(for-each PROCEDURE LIST): apply PROCEDURE to each item in LIST; like `map` but don't return results\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(for-each (lambda (n) (print n)) '(3 4 5))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## format\\n\",\n    \"(format STRING ITEM ...): format the string with ITEMS as arguments\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(format \\\"This uses formatting ~a ~s ~%\\\" 'apple 'apple)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## func\\n\",\n    \"\\n\",\n    \"Turns a lambda into a Python function.\\n\",\n    \"\\n\",\n    \"(func (lambda ...))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(func (lambda (n) n))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## There's more!\\n\",\n    \"\\n\",\n    \"Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Calysto Scheme (Python)\",\n   \"language\": \"scheme\",\n   \"name\": \"calysto_scheme\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"scheme\"\n   },\n   \"mimetype\": \"text/x-scheme\",\n   \"name\": \"scheme\",\n   \"pygments_lexer\": \"scheme\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_sos/jupytext_replication.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"Collapsed\": \"false\",\n    \"kernel\": \"SoS\"\n   },\n   \"source\": [\n    \"# Text SOS-kernel with Jupytext\\n\",\n    \"\\n\",\n    \"## What is SOS kernel\\n\",\n    \"\\n\",\n    \"SoS consists of a ployglot notebook that allows the use of multiple kernels in one Jupyter notebook, and a workflow system that is designed for daily computational research. Basically,\\n\",\n    \"\\n\",\n    \"- SoS Polyglot Notebook is a Jupyter Notebook with a SoS kernel.\\n\",\n    \"- SoS Notebook serves as a super kernel to all other Jupyter kernels and allows the use of multiple kernels in one Jupyter notebook.\\n\",\n    \"- SoS Workflow System is a Python based workflow system that is designed to be readable, shareable, and suitable for daily data analysis.\\n\",\n    \"- SoS Workflow System can be used from command line or use SoS Notebook as its IDE.\\n\",\n    \"\\n\",\n    \"![](https://vatlab.github.io/sos-docs/doc/media/SoS_Notebook_and_Workflow.png)\\n\",\n    \"\\n\",\n    \"### How to install SOS-kernel\\n\",\n    \"\\n\",\n    \"Please follow this [link](https://vatlab.github.io/sos-docs/running.html#Conda-installation) to setup SOS\\n\",\n    \"\\n\",\n    \"I run some issue with the latest version of R on my Mac, so I had to install an earlier version of R\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"conda install -c r r=3.5.1\\n\",\n    \"conda install sos-notebook jupyterlab-sos sos-papermill -c conda-forge\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"## Related issue with Jupytext\\n\",\n    \"\\n\",\n    \"Jupytext works fine with Python/R kernel but converts code cells into markdown cells when using the SOS kernel.\\n\",\n    \"\\n\",\n    \"cf the image below. It is a code cell. After saving the notebook and restart it, it converted the code cell into markdown\\n\",\n    \"\\n\",\n    \"<img width=\\\"734\\\" alt=\\\"Screenshot 2020-03-13 at 10 51 18\\\" src=\\\"https://user-images.githubusercontent.com/33351426/76610049-9e704600-6518-11ea-861e-b4f691d1a478.png\\\">\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"Collapsed\": \"false\",\n    \"kernel\": \"SoS\"\n   },\n   \"source\": [\n    \"## Step 1\\n\",\n    \"\\n\",\n    \"Please, choose SOS Kernel and then, in the cell code, choose SOS (or any other kernel available), the outcome is the same.\\n\",\n    \"\\n\",\n    \"![](https://drive.google.com/uc?export=view&id=1OtyxfwoRyVK23XHnmd9JR-crBgHBL5mt)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"Collapsed\": \"false\",\n    \"kernel\": \"SoS\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import pandas as pd \\n\",\n    \"import numpy as np\\n\",\n    \"\\n\",\n    \"pd.DataFrame({\\n\",\n    \"    'x': np.random.random(10),\\n\",\n    \"    'y': np.random.random(10),\\n\",\n    \"})\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"Collapsed\": \"false\",\n    \"kernel\": \"python3\"\n   },\n   \"source\": [\n    \"## Step 2\\n\",\n    \"\\n\",\n    \"Now, pair it with Jupytex\\n\",\n    \"\\n\",\n    \"![](https://drive.google.com/uc?export=view&id=1Wtx-YPAXY8HWHqzCcy4iIgHpzt_9emEn)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"Collapsed\": \"false\",\n    \"kernel\": \"python3\"\n   },\n   \"source\": [\n    \"### Step 3\\n\",\n    \"\\n\",\n    \"Save the notebook, restart and clear all, **save**, then Shut down kernel. Close the notebook and reopen\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"Collapsed\": \"false\",\n    \"kernel\": \"python3\"\n   },\n   \"source\": [\n    \"### Step 4\\n\",\n    \"\\n\",\n    \"Reopen the notebook. Here is the outcome\\n\",\n    \"\\n\",\n    \"![](https://drive.google.com/uc?export=view&id=12C70unbSPv0gHCZaCICEUy7kO7wM93JH)\\n\",\n    \"\\n\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"SoS\",\n   \"language\": \"sos\",\n   \"name\": \"sos\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"sos\",\n   \"file_extension\": \".sos\",\n   \"mimetype\": \"text/x-sos\",\n   \"name\": \"sos\",\n   \"nbconvert_exporter\": \"sos_notebook.converter.SoS_Exporter\",\n   \"pygments_lexer\": \"sos\"\n  },\n  \"sos\": {\n   \"kernels\": [\n    [\n     \"python3\",\n     \"python3\",\n     \"python3\",\n     \"\",\n     \"\"\n    ]\n   ],\n   \"version\": \"0.20.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_stata/stata_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"a4033377\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"// This notebook uses the stata_kernel: https://github.com/kylebarron/stata_kernel\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"5f4a41aa-92fb-4344-accf-fca4df13d0b1\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(1978 Automobile Data)\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"use http://www.stata-press.com/data/r13/auto\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"id\": \"3f8bc0a3-2e04-4025-97b6-fe07b341d359\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"\\n\",\n      \"    Variable |        Obs        Mean    Std. dev.       Min        Max\\n\",\n      \"-------------+---------------------------------------------------------\\n\",\n      \"        make |          0\\n\",\n      \"       price |         74    6165.257    2949.496       3291      15906\\n\",\n      \"         mpg |         74     21.2973    5.785503         12         41\\n\",\n      \"       rep78 |         69    3.405797    .9899323          1          5\\n\",\n      \"    headroom |         74    2.993243    .8459948        1.5          5\\n\",\n      \"-------------+---------------------------------------------------------\\n\",\n      \"       trunk |         74    13.75676    4.277404          5         23\\n\",\n      \"      weight |         74    3019.459    777.1936       1760       4840\\n\",\n      \"      length |         74    187.9324    22.26634        142        233\\n\",\n      \"        turn |         74    39.64865    4.399354         31         51\\n\",\n      \"displacement |         74    197.2973    91.83722         79        425\\n\",\n      \"-------------+---------------------------------------------------------\\n\",\n      \"  gear_ratio |         74    3.014865    .4562871       2.19       3.89\\n\",\n      \"     foreign |         74    .2972973    .4601885          0          1\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"summarize\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"id\": \"ce932414-a959-40e7-ab27-b59f9dc2a5af\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"This front-end cannot display the desired image type.\"\n      ]\n     },\n     \"metadata\": {\n      \"image/svg+xml\": {\n       \"height\": 436,\n       \"width\": 600\n      },\n      \"text/html\": {\n       \"height\": 436,\n       \"width\": 600\n      }\n     },\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"\\n\",\n      \"    format\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"This front-end cannot display the desired image type.\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"    format\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"scatter weight length\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Stata\",\n   \"language\": \"stata\",\n   \"name\": \"stata\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"stata\",\n   \"file_extension\": \".do\",\n   \"mimetype\": \"text/x-stata\",\n   \"name\": \"stata\",\n   \"version\": \"15.1\"\n  },\n  \"widgets\": {\n   \"application/vnd.jupyter.widget-state+json\": {\n    \"state\": {},\n    \"version_major\": 2,\n    \"version_minor\": 0\n   }\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_tcl/tcl_test.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Assign Values\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"a = 1\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"set a 1\\n\",\n    \"puts \\\"a = $a\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Loop\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"I inside first loop: 0\\n\",\n      \"I inside first loop: 1\\n\",\n      \"I inside first loop: 2\\n\",\n      \"I inside first loop: 3\\n\",\n      \"I inside first loop: 4\\n\",\n      \"I inside first loop: 5\\n\",\n      \"I inside first loop: 6\\n\",\n      \"I inside first loop: 7\\n\",\n      \"I inside first loop: 8\\n\",\n      \"I inside first loop: 9\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"for {set i 0} {$i < 10} {incr i} {\\n\",\n    \"    puts \\\"I inside first loop: $i\\\"\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Tcl\",\n   \"language\": \"tcl\",\n   \"name\": \"tcljupyter\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".tcl\",\n   \"mimetype\": \"txt/x-tcl\",\n   \"name\": \"tcl\",\n   \"version\": \"8.6.11\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_ts/itypescript.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"hi\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"11\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"let x: number = 5;\\n\",\n    \"const y: number = 6;\\n\",\n    \"var z: string = \\\"hi\\\";\\n\",\n    \"console.log(z);\\n\",\n    \"x + y;\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"11\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"function add(num1: number, num2: number): number {\\n\",\n    \"    return num1 + num2\\n\",\n    \"}\\n\",\n    \"add(x, y);\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"11\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"const arrowAdd = (num1: number, num2: number) => num1 + num2;\\n\",\n    \"arrowAdd(x, y);\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"\\\"Hello, I'm John\\\"\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"class User {\\n\",\n    \"  constructor(private name: string) {\\n\",\n    \"    this.name = name;\\n\",\n    \"  }\\n\",\n    \"  sayHello(): string {\\n\",\n    \"    return \\\"Hello, I'm \\\" + this.name;\\n\",\n    \"  }\\n\",\n    \"}\\n\",\n    \"let John: User;\\n\",\n    \"John = new User(\\\"John\\\");\\n\",\n    \"John.sayHello();\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Typescript 3.5\",\n   \"language\": \"typescript\",\n   \"name\": \"typescript\"\n  },\n  \"language_info\": {\n   \"file_extension\": \".ts\",\n   \"mimetype\": \"application/x-typescript\",\n   \"name\": \"typescript\",\n   \"version\": \"3.5.1\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_wolfram/wolfram.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"f48fe6fa\",\n   \"metadata\": {},\n   \"source\": [\n    \"**Note:** The `language_info` `file_extension` in this notebook should be `.m`, but it was deliberately changed to `.wolfram` to avoid conflicts with Matlab which is using the same extension.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"19ffc137\",\n   \"metadata\": {},\n   \"source\": [\n    \"We start with...\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"17c5b20c\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"Print[\\\"Hello, World!\\\"];\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"2b9e8c46\",\n   \"metadata\": {},\n   \"source\": [\n    \"Then we draw the first example plot from the [ListPlot](https://reference.wolfram.com/language/ref/ListPlot.html) reference:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"7c4dfdc2\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div><img alt=\\\"Output\\\" src=\\\"data:image/png;base64,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\\\"></div>\"\n      ],\n      \"text/plain\": [\n       \"-Graphics-\"\n      ]\n     },\n     \"execution_count\": 2,\n     \"metadata\": {\n      \"text/html\": [],\n      \"text/plain\": []\n     },\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"ListPlot[Prime[Range[25]]]\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"0e549b21\",\n   \"metadata\": {},\n   \"source\": [\n    \"We also test the math outputs as in the [Simplify](https://reference.wolfram.com/language/ref/Simplify.html) example:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"id\": \"5c2010aa\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div><img alt=\\\"Output\\\" src=\\\"data:image/png;base64,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\\\"></div>\"\n      ],\n      \"text/plain\": [\n       \"    1          -1 + 2 x               2\\n\",\n       \"--------- - -------------- + -------------------\\n\",\n       \"3 (1 + x)               2                     2\\n\",\n       \"            6 (1 - x + x )          (-1 + 2 x)\\n\",\n       \"                             3 (1 + -----------)\\n\",\n       \"                                         3\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {\n      \"text/html\": [],\n      \"text/plain\": []\n     },\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"D[Integrate[1/(x^3 + 1), x], x]\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Wolfram Language 13.1\",\n   \"language\": \"Wolfram Language\",\n   \"name\": \"wolframlanguage13.1\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"mathematica\",\n   \"file_extension\": \".wolfram\",\n   \"mimetype\": \"application/vnd.wolfram.m\",\n   \"name\": \"Wolfram Language\",\n   \"pygments_lexer\": \"mathematica\",\n   \"version\": \"12.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ipynb_xonsh/xonsh_example.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"35196\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"len($(curl -L https://xon.sh))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"xonsh_example.ipynb\\n\",\n      \"\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"for filename in `.*`:\\n\",\n    \"    print(filename)\\n\",\n    \"    du -sh @(filename)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Xonsh\",\n   \"language\": \"xonsh\",\n   \"name\": \"xonsh\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"shell\",\n   \"file_extension\": \".xsh\",\n   \"mimetype\": \"text/x-sh\",\n   \"name\": \"xonsh\",\n   \"pygments_lexer\": \"xonsh\",\n   \"version\": \"0.14.4\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/julia/julia_sample_script.jl",
    "content": "# -*- coding: utf-8 -*-\n# From https://juliabyexample.helpmanual.io/\n\n# function to calculate the volume of a sphere\nfunction sphere_vol(r)\n    # julia allows Unicode names (in UTF-8 encoding)\n    # so either \"pi\" or the symbol π can be used\n    return 4/3*pi*r^3\nend\n\n# functions can also be defined more succinctly\nquadratic(a, sqr_term, b) = (-b + sqr_term) / 2a\n\n# calculates x for 0 = a*x^2+b*x+c, arguments types can be defined in function definitions\nfunction quadratic2(a::Float64, b::Float64, c::Float64)\n    # unlike other languages 2a is equivalent to 2*a\n    # a^2 is used instead of a**2 or pow(a,2)\n    sqr_term = sqrt(b^2-4a*c)\n    r1 = quadratic(a, sqr_term, b)\n    r2 = quadratic(a, -sqr_term, b)\n    # multiple values can be returned from a function using tuples\n    # if the return keyword is omitted, the last term is returned\n    r1, r2\nend\n\nvol = sphere_vol(3)\n# @printf allows number formatting but does not automatically append the \\n to statements, see below\n@printf \"volume = %0.3f\\n\" vol\n#> volume = 113.097\n\nquad1, quad2 = quadratic2(2.0, -2.0, -12.0)\nprintln(\"result 1: \", quad1)\n#> result 1: 3.0\nprintln(\"result 2: \", quad2)\n#> result 2: -2.0\n"
  },
  {
    "path": "tests/data/notebooks/inputs/marimo/basic_marimo_example.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    This is a simple marimo notebook\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    x = 1\n    return (x,)\n\n\n@app.cell\ndef _(x):\n    y = x+1\n    y\n    return\n\n\n@app.cell\ndef _():\n    import marimo as mo\n    return (mo,)\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/inputs/md/jupytext_markdown.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n# Markdown, code and raw cells\n\n## Markdown cells\n\nThis is a Markdown cell. Markdown cells end with either a code cell, or two consecutive blank lines in the text.\n\nIf you prefer that Markdown headings define new cells, have a look at the `split_at_heading` option.\n\nIndented code is accepted, and consecutive blank lines there do not break Markdown cells:\n\n    def f(x):\n        return 1\n\n\n    def h(x):\n        return f(x)+2\n\n\n## Code cells\n\n```python\n\"\"\"This code cell starts with ` ```python`\"\"\"\n1 + 1\n```\n\n## Raw cells\n\nRaw cells are delimited with `<!-- #raw -->` and <!-- #endraw -->, like here:\n<!-- #raw -->\nthis is a raw cell\n<!-- #endraw -->\n\n# Protected Markdown cells\n\nIf you want to include code blocks (or two consecutive blank lines) in a Markdown cell, use explicit Markdown cell delimiters `<!-- #region -->` and `<!-- #endregion -->`.\n\n<!-- #region -->\nThis Markdown cell has two consecutive blank lines\n\n\nAnd then a code block which is not a Jupyter code cell:\n```python\n2 + 2\n```\n<!-- #endregion -->\n\n# Metadata\n\nMetadata are supported for all cell types.\n\n## Markdown cells\n\n<!-- #region Region title key=\"value\" -->\nA cell with a title and additional metadata.\n<!-- #endregion -->\n\n## Code cells\n\n```python tags=[\"parameters\"]\na = 2\n```\n"
  },
  {
    "path": "tests/data/notebooks/inputs/md/plain_markdown.md",
    "content": "---\ntitle: A sample document\n---\n\nThis document is a plain Markdown document that was not created from a notebook.\nWe use this document to test that inputing a Markdown file into Jupytext, and then converting the\nresulting notebook to a Markdown file using nbconvert, is the identity\n\nAnother paragraph\n\n# A header\n\nIndented code\n\n    def f(x):\n        return 1\n\n\n    def h(x):\n        return f(x)+2\n\n\nA Python code snippet\n\n```python\n\"\"\"This code cell starts with ` ```python`\"\"\"\n1 + 1\n```\n\nCode snippet without an explicit language\n```\necho 'Hello world'\n```\n\nMarkdown comments\n<!-- #comment -->\n\nVS Code region markers\n\n<!-- #region -->\nThis Markdown cell has two consecutive blank lines\n\n\nAnd continues here\n<!-- #endregion -->\n"
  },
  {
    "path": "tests/data/notebooks/inputs/myst/fenced_code_vs_code_cells.md",
    "content": "# Fenced code\n\n## No language\n\n```\n# a generic code instruction\n1 + 1\n```\n\n## Python\n\n```python\n1 + 1\n```\n\n## Bash\n\n```python\necho Hi\n```\n\n# Code cells\n\n```{code-cell} ipython3\n# This code gets executed in notebooks\n1 + 1\n```\n"
  },
  {
    "path": "tests/data/notebooks/inputs/myst/reference_link.md",
    "content": "This documents contains a code cell to make sure it is recognized as a MyST document.\n\n```{code-cell} ipython3\n1 + 1\n```\n\nThis is a [reference-link to the issue][].\n\n:::{note}\nThis note is key... not sure why.\n:::\n\n[reference-link to the issue]: <https://github.com/mwouts/jupytext/issues/789>\n"
  },
  {
    "path": "tests/data/notebooks/inputs/percent/hydrogen.py",
    "content": "# %%\nimport pandas as pd\n\n# %% Display a data frame\ndf = pd.DataFrame({'A': [1, 2], 'B': [3, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n\n# %% Pandas plot {\"tags\": [\"parameters\"]}\ndf.plot(kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/inputs/ps1/build.ps1",
    "content": "# This file originates from\n# https://github.com/MicrosoftDocs/PowerShell-Docs/blob/staging/build.ps1\n\nparam(\n    [switch]$SkipCabs,\n    [switch]$ShowProgress\n)\n\n# Turning off the progress display, by default\n$global:ProgressPreference = 'SilentlyContinue'\nif ($ShowProgress) { $ProgressPreference = 'Continue' }\n\n[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12\n$tempDir = [System.IO.Path]::GetTempPath()\n\n# Pandoc source URL\n$panDocVersion = \"2.7.3\"\n$pandocSourceURL = \"https://github.com/jgm/pandoc/releases/download/$panDocVersion/pandoc-$panDocVersion-windows-x86_64.zip\"\n\n$pandocDestinationPath = New-Item (Join-Path $tempDir \"pandoc\") -ItemType Directory -Force\n$pandocZipPath = Join-Path $pandocDestinationPath \"pandoc-$panDocVersion-windows-x86_64.zip\"\nInvoke-WebRequest -Uri $pandocSourceURL -OutFile $pandocZipPath\n\nExpand-Archive -Path $pandocZipPath -DestinationPath $pandocDestinationPath -Force\n$pandocExePath = Join-Path (Join-Path $pandocDestinationPath \"pandoc-$panDocVersion-windows-x86_64\") \"pandoc.exe\"\n\n# Install ThreadJob if not available\n$threadJob = Get-Module ThreadJob -ListAvailable\nif ($null -eq $threadjob) {\n    Install-Module ThreadJob -RequiredVersion 1.1.2 -Scope CurrentUser -Force\n}\n\n# Find the reference folder path w.r.t the script\n$ReferenceDocset = Join-Path $PSScriptRoot 'reference'\n\n# Go through all the directories in the reference folder\n$jobs = [System.Collections.Generic.List[object]]::new()\n$excludeList = 'module', 'media', 'docs-conceptual', 'mapping', 'bread', '7'\nGet-ChildItem $ReferenceDocset -Directory -Exclude $excludeList | ForEach-Object -Process {\n    $job = Start-ThreadJob -Name $_.Name -ArgumentList @($SkipCabs,$pandocExePath,$PSScriptRoot,$_) -ScriptBlock {\n        param($SkipCabs, $pandocExePath, $WorkingDirectory, $DocSet)\n\n        $tempDir = [System.IO.Path]::GetTempPath()\n        $workingDir = Join-Path $tempDir $DocSet.Name\n        $workingDir = New-Item -ItemType Directory -Path $workingDir -Force\n        Set-Location $WorkingDir\n\n        function Get-ContentWithoutHeader {\n            param(\n                $path\n            )\n\n            $doc = Get-Content $path -Encoding UTF8\n            $start = $end = -1\n\n            # search the first 30 lines for the Yaml header\n            # no yaml header in our docset will ever be that long\n\n            for ($x = 0; $x -lt 30; $x++) {\n                if ($doc[$x] -eq '---') {\n                    if ($start -eq -1) {\n                        $start = $x\n                    }\n                    else {\n                        if ($end -eq -1) {\n                            $end = $x + 1\n                            break\n                        }\n                    }\n                }\n            }\n            if ($end -gt $start) {\n                Write-Output ($doc[$end..$($doc.count)] -join \"`r`n\")\n            }\n            else {\n                Write-Output ($doc -join \"`r`n\")\n            }\n        }\n\n        $Version = $DocSet.Name\n        Write-Verbose -Verbose \"Version = $Version\"\n\n        $VersionFolder = $DocSet.FullName\n        Write-Verbose -Verbose \"VersionFolder = $VersionFolder\"\n\n        # For each of the directories, go through each module folder\n        Get-ChildItem $VersionFolder -Directory | ForEach-Object -Process {\n            $ModuleName = $_.Name\n            Write-Verbose -Verbose \"ModuleName = $ModuleName\"\n\n            $ModulePath = Join-Path $VersionFolder $ModuleName\n            Write-Verbose -Verbose \"ModulePath = $ModulePath\"\n\n            $LandingPage = Join-Path $ModulePath \"$ModuleName.md\"\n            Write-Verbose -Verbose \"LandingPage = $LandingPage\"\n\n            $MamlOutputFolder = Join-Path \"$WorkingDirectory\\maml\" \"$Version\\$ModuleName\"\n            Write-Verbose -Verbose \"MamlOutputFolder = $MamlOutputFolder\"\n\n            $CabOutputFolder = Join-Path \"$WorkingDirectory\\updatablehelp\" \"$Version\\$ModuleName\"\n            Write-Verbose -Verbose \"CabOutputFolder = $CabOutputFolder\"\n\n            if (-not (Test-Path $MamlOutputFolder)) {\n                New-Item $MamlOutputFolder -ItemType Directory -Force > $null\n            }\n\n            # Process the about topics if any\n            $AboutFolder = Join-Path $ModulePath \"About\"\n\n            if (Test-Path $AboutFolder) {\n                Write-Verbose -Verbose \"AboutFolder = $AboutFolder\"\n                Get-ChildItem \"$aboutfolder/about_*.md\" | ForEach-Object {\n                    $aboutFileFullName = $_.FullName\n                    $aboutFileOutputName = \"$($_.BaseName).help.txt\"\n                    $aboutFileOutputFullName = Join-Path $MamlOutputFolder $aboutFileOutputName\n\n                    $pandocArgs = @(\n                        \"--from=gfm\",\n                        \"--to=plain+multiline_tables\",\n                        \"--columns=75\",\n                        \"--output=$aboutFileOutputFullName\",\n                        \"--quiet\"\n                    )\n\n                    Get-ContentWithoutHeader $aboutFileFullName | & $pandocExePath $pandocArgs\n                }\n            }\n\n            try {\n                # For each module, create a single maml help file\n                # Adding warningaction=stop to throw errors for all warnings, erroraction=stop to make them terminating errors\n                New-ExternalHelp -Path $ModulePath -OutputPath $MamlOutputFolder -Force -WarningAction Stop -ErrorAction Stop\n\n                # For each module, create update-help help files (cab and helpinfo.xml files)\n                if (-not $SkipCabs) {\n                    $cabInfo = New-ExternalHelpCab -CabFilesFolder $MamlOutputFolder -LandingPagePath $LandingPage -OutputFolder $CabOutputFolder\n\n                    # Only output the cab fileinfo object\n                    if ($cabInfo.Count -eq 8) { $cabInfo[-1].FullName }\n                }\n            }\n            catch {\n                Write-Error -Message \"PlatyPS failure: $ModuleName -- $Version\" -Exception $_\n            }\n        }\n\n        Remove-Item $workingDir -Force -ErrorAction SilentlyContinue\n    }\n    Write-Verbose -Verbose \"Started job for $($_.Name)\"\n    $jobs += $job\n}\n\n$null = $jobs | Wait-Job\n\n# Variable to collect any errors in during processing\n$allErrors = [System.Collections.Generic.List[string]]::new()\nforeach ($job in $jobs) {\n    Write-Verbose -Verbose \"$($job.Name) output:\"\n    if ($job.Verbose.Count -gt 0) {\n        foreach ($verboseMessage in $job.Verbose) {\n            Write-Verbose -Verbose $verboseMessage\n        }\n    }\n\n    if ($job.State -eq \"Failed\") {\n        $allErrors += \"$($job.Name) failed due to unhandled exception\"\n    }\n\n    if ($job.Error.Count -gt 0) {\n        $allErrors += \"$($job.Name) failed with errors:\"\n        $allErrors += $job.Error.ReadAll()\n    }\n}\n\n# If the above block, produced any errors, throw and fail the job\nif ($allErrors.Count -gt 0) {\n    $allErrors\n    throw \"There are errors during platyPS run!`nPlease fix your markdown to comply with the schema: https://github.com/PowerShell/platyPS/blob/master/platyPS.schema.md\"\n}\n"
  },
  {
    "path": "tests/data/notebooks/inputs/python/light_sample.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     formats: ipynb,py:light\n# ---\n\n# # Sample notebook\n\na = 1\nb = 2\na + b\n"
  },
  {
    "path": "tests/data/notebooks/inputs/python/python_notebook_sample.py",
    "content": "# # Specifications for Jupyter notebooks as python scripts\n\n# ## Markdown cells\n\n# Markdown cells are escaped with a single quote. Two consecutive\n# cells are separated with a blank line.\n\n# ## Code cells\n\n# Python code and adjacent comments are mapped to cell codes.\n\n# For instance, this is a code cell that starts with a\n# code comment, where we define a variable\na = 1\n\n# A cell with another variable\nb = 2\n\n\n# In this cell we define a function\ndef f(x):\n    return x + 1\n\n\n# Now simple function calls\nc = f(b)\na * b + c\n\n\n# Line breaks in code cells are supported but then the cell need to have\n# metadata and an end-of-cell marker. Metadata information in json format,\n# escaped with '#+' or '# +'\n\n# +\ndef g(x):\n    return x + 2\n\n\nd = 4\n# -\n\n# One more cell\na * b + g(c) + d\n\n# ## Raw cells, and cells active in py or ipynb only\n\n# Raw cells are commented code cells with metadata \"active\": \"\".\n\n# + {\"active\": \"\"}\n# This is a raw cell\n# -\n\n# Actually, using the \"active\" key you can have cells active in Jupyter\n# and inactive in python scripts\n\n# + {\"active\": \"py\"}\n1 + 1  # done only in py script, inactive (raw) in ipynb\n\n# + {\"active\": \"ipynb\"}\n# 2 + 2 # active in ipynb only\n"
  },
  {
    "path": "tests/data/notebooks/inputs/sphinx/plot_notebook.py",
    "content": "# -*- coding: utf-8 -*-\n\"\"\"\nNotebook styled examples\n========================\n\nThe gallery is capable of transforming Python files into reStructuredText files\nwith a notebook structure. For this to be used you need to respect some syntax\nrules.\n\nIt makes a lot of sense to contrast this output rst file with the\n:download:`original Python script <plot_notebook.py>` to get better feeling of\nthe necessary file structure.\n\nAnything before the Python script docstring is ignored by sphinx-gallery and\nwill not appear in the rst file, nor will it be executed.\nThis Python docstring requires an reStructuredText title to name the file and\ncorrectly build the reference links.\n\nOnce you close the docstring you would be writing Python code. This code gets\nexecuted by sphinx gallery shows the plots and attaches the generating code.\nNevertheless you can break your code into blocks and give the rendered file\na notebook style. In this case you have to include a code comment breaker\na line of at least 20 hashes and then every comment start with the a new hash.\n\nAs in this example we start by first writing this module\nstyle docstring, then for the first code block we write the example file author\nand script license continued by the import modules instructions.\n\nOriginal script from:\nhttps://sphinx-gallery.readthedocs.io/en/latest/tutorials/plot_notebook.html\n\"\"\"\n\n# Code source: Óscar Nájera\n# License: BSD 3 clause\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n##############################################################################\n# This code block is executed, although it produces no output. Lines starting\n# with a simple hash are code comment and get treated as part of the code\n# block. To include this new comment string we started the new block with a\n# long line of hashes.\n#\n# The sphinx-gallery parser will assume everything after this splitter and that\n# continues to start with a **comment hash and space** (respecting code style)\n# is text that has to be rendered in\n# html format. Keep in mind to always keep your comments always together by\n# comment hashes. That means to break a paragraph you still need to comment\n# that line break.\n#\n# In this example the next block of code produces some plotable data. Code is\n# executed, figure is saved and then code is presented next, followed by the\n# inlined figure.\n\nx = np.linspace(-np.pi, np.pi, 300)\nxx, yy = np.meshgrid(x, x)\nz = np.cos(xx) + np.cos(yy)\n\nplt.figure()\nplt.imshow(z)\nplt.colorbar()\nplt.xlabel('$x$')\nplt.ylabel('$y$')\n\n###########################################################################\n# Again it is possible to continue the discussion with a new Python string. This\n# time to introduce the next code block generates 2 separate figures.\n\nplt.figure()\nplt.imshow(z, cmap=plt.cm.get_cmap('hot'))\nplt.figure()\nplt.imshow(z, cmap=plt.cm.get_cmap('Spectral'), interpolation='none')\n\n##########################################################################\n# There's some subtle differences between rendered html rendered comment\n# strings and code comment strings which I'll demonstrate below. (Some of this\n# only makes sense if you look at the\n# :download:`raw Python script <plot_notebook.py>`)\n#\n# Comments in comment blocks remain nested in the text.\n\n\ndef dummy():\n    \"\"\"Dummy function to make sure docstrings don't get rendered as text\"\"\"\n    pass\n\n# Code comments not preceded by the hash splitter are left in code blocks.\n\nstring = \"\"\"\nTriple-quoted string which tries to break parser but doesn't.\n\"\"\"\n\n############################################################################\n# Output of the script is captured:\n\nprint('Some output from Python')\n\n############################################################################\n# Finally, I'll call ``show`` at the end just so someone running the Python\n# code directly will see the plots; this is not necessary for creating the docs\n\nplt.show()\n\n############################################################################\n# You can also include :math:`math` inline, or as separate equations:\n#\n# .. math::\n#\n#    \\exp(j\\pi) = -1\n#\n# You can also insert images:\n#\n# .. image:: http://www.sphinx-doc.org/en/stable/_static/sphinxheader.png\n#    :alt: Sphinx header\n#\n"
  },
  {
    "path": "tests/data/notebooks/outputs/Rmd_to_ipynb/R_sample.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"title: \\\"R Notebook\\\"\\n\",\n    \"output: html_notebook\\n\",\n    \"---\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code. \\n\",\n    \"\\n\",\n    \"Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Ctrl+Shift+Enter*. \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plot(cars)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Ctrl+Alt+I*.\\n\",\n    \"\\n\",\n    \"When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Ctrl+Shift+K* to preview the HTML file).\\n\",\n    \"\\n\",\n    \"The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike *Knit*, *Preview* does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"-all\",\n   \"main_language\": \"R\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/Rmd_to_ipynb/chunk_options.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"title: \\\"Test chunk options in Rmd/Jupyter conversion\\\"\\n\",\n    \"author: \\\"Marc Wouts\\\"\\n\",\n    \"date: \\\"June 16, 2018\\\"\\n\",\n    \"---\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"lines_to_next_cell\": 2,\n    \"name\": \"knitr_setup\",\n    \"tags\": [\n     \"remove_cell\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"%%R\\n\",\n    \"knitr::opts_chunk$set(echo = FALSE, fig.width = 10, fig.height = 5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"echo\": true\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import pandas as pd\\n\",\n    \"x = pd.Series({'A':1, 'B':3, 'C':2})\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"fig.height\": 5,\n    \"fig.width\": 8,\n    \"lines_to_next_cell\": 0,\n    \"name\": \"bar_plot\",\n    \"tags\": [\n     \"remove_input\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"x.plot(kind='bar', title='Sample plot')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/Rmd_to_ipynb/ioslides.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"title: \\\"Quick ioslides\\\"\\n\",\n    \"subtitle: \\\"Slides generated using R, python and ioslides\\\"\\n\",\n    \"author: \\\"Marc Wouts\\\"\\n\",\n    \"date: \\\"June 15, 2018\\\"\\n\",\n    \"output:\\n\",\n    \"  ioslides_presentation:\\n\",\n    \"    widescreen: true\\n\",\n    \"    smaller: true\\n\",\n    \"editor_options:\\n\",\n    \"  chunk_output_type: console\\n\",\n    \"---\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## What is ioslides?\\n\",\n    \"\\n\",\n    \"This is the default format in rstudio for building interactive HTML presentations.\\n\",\n    \"\\n\",\n    \"Enjoy the [manual](https://rmarkdown.rstudio.com/ioslides_presentation_format.html)!\\n\",\n    \"\\n\",\n    \"These slides can be turned to a single HTML file with either a click on 'knitr' in rstudio, or, command line:\\n\",\n    \"```bash\\n\",\n    \"R -e 'rmarkdown::render(\\\"ioslides.Rmd\\\")'\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"## A sample plot\\n\",\n    \"\\n\",\n    \"<div style=\\\"float: left; width: 30%;\\\">\\n\",\n    \"Here we create a sample data set for plotting.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"echo\": true\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import pandas as pd\\n\",\n    \"x = pd.Series({'A':1, 'B':3, 'C':2})\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"lines_to_next_cell\": 0\n   },\n   \"source\": [\n    \"Then, in another column we plot. The R notebook code chunks have many [options](https://yihui.name/knitr/options/).\\n\",\n    \"For this plot I chose not to display the source code.\\n\",\n    \"</div>\\n\",\n    \"\\n\",\n    \"<div style=\\\"float: right; width: 70%;\\\">\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"fig.height\": 5,\n    \"fig.width\": 8,\n    \"lines_to_next_cell\": 0,\n    \"tags\": [\n     \"remove_input\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"x.plot(kind='bar', title='Sample plot')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"<div>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"echo,tags,fig.width,fig.height,-all\",\n   \"main_language\": \"python\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/Rmd_to_ipynb/knitr-spin.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"The below derives from\\n\",\n    \"https://github.com/yihui/knitr/blob/master/inst/examples/knitr-spin.R\\n\",\n    \"\\n\",\n    \"This is a special R script which can be used to generate a report. You can\\n\",\n    \"write normal text in roxygen comments.\\n\",\n    \"\\n\",\n    \"First we set up some options (you do not have to do this):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"name\": \"setup\",\n    \"tags\": [\n     \"remove_cell\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"library(knitr)\\n\",\n    \"opts_chunk$set(fig.path = 'figure/silk-')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"The report begins here.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"cache\": false,\n    \"name\": \"test-a\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# boring examples as usual\\n\",\n    \"set.seed(123)\\n\",\n    \"x = rnorm(5)\\n\",\n    \"mean(x)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"lines_to_next_cell\": 0\n   },\n   \"source\": [\n    \"You can not use here the special syntax {{code}} to embed inline expressions, e.g.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"lines_to_next_cell\": 0\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"{{mean(x) + 2}}\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"is the mean of x plus 2.\\n\",\n    \"The code itself may contain braces, but these are not checked.  Thus,\\n\",\n    \"perfectly valid (though very strange) R code such as `{{2 + 3}} - {{4 - 5}}`\\n\",\n    \"can lead to errors because `2 + 3}} - {{4 - 5` will be treated as inline code.\\n\",\n    \"\\n\",\n    \"Now we continue writing the report. We can draw plots as well.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"fig.height\": 5,\n    \"fig.width\": 5,\n    \"name\": \"test-b\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"par(mar = c(4, 4, .1, .1)); plot(x)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Actually you do not have to write chunk options, in which case knitr will use\\n\",\n    \"default options. For example, the code below has no options attached:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"var(x)\\n\",\n    \"quantile(x)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"And you can also write two chunks successively like this:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"lines_to_next_cell\": 0,\n    \"name\": \"test-chisq5\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"sum(x^2) # chi-square distribution with df 5\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"name\": \"test-chisq4\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"sum((x - mean(x))^2) # df is 4 now\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Done. Call spin('knitr-spin.R') to make silk from sow's ear now and knit a\\n\",\n    \"lovely purse.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# /* you can write comments between /* and */ like C comments (the preceding #\\n\",\n    \"# is optional)\\n\",\n    \"Sys.sleep(60)\\n\",\n    \"# */\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# /* there is no inline comment; you have to write block comments */\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"tags,name,fig.width,cache,fig.height,-all\",\n   \"main_language\": \"R\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/Rmd_to_ipynb/markdown.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# This is a plain markdown file\\n\",\n    \"\\n\",\n    \"```python\\n\",\n    \"1+1\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"And more comments\\n\",\n    \"\\n\",\n    \"Another comment separated by one line\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is another cell, separated by two or more lines from the previous one.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"And a last markdown cell, followed by a code cell\\n\",\n    \"```python\\n\",\n    \"1+1\\n\",\n    \"```\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"-all\",\n   \"main_language\": \"python\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/Line_breaks_in_LateX_305.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\nThis cell uses no particular cell marker\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n\n\nThis cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x) \\\n\\dot{y} & = \\rho x - y - xz \\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n\n\nThis cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/Notebook with function and cell metadata 164.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\n1 + 1\n```\n\nA markdown cell\nAnd below, the cell for function f has non trivial cell metadata. And the next cell as well.\n\n```{python attributes={'classes': [], 'id': '', 'n': '10'}}\ndef f(x):\n    return x\n```\n\n```{python attributes={'classes': [], 'id': '', 'n': '10'}}\nf(5)\n```\n\nMore text\n\n```{python}\n2 + 2\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/Notebook with html and latex cells.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{html}\n<p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>\n```\n\n```{latex}\n$\\frac{\\pi}{2}$\n```\n\n```{python}\n# %load_ext rpy2.ipython\n```\n\n```{r}\nlibrary(ggplot2)\nggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\n```\n\n```{python}\n# %matplotlib inline\nimport pandas as pd\npd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/Notebook with many hash signs.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n##################################################################\nThis is a notebook that contains many hash signs.\nHopefully its python representation is not recognized as a Sphinx Gallery script...\n##################################################################\n\n```{python}\nsome = 1\ncode = 2\nsome+code\n\n##################################################################\n# A comment\n##################################################################\n# Another comment\n```\n\n##################################################################\nThis is a notebook that contains many hash signs.\nHopefully its python representation is not recognized as a Sphinx Gallery script...\n##################################################################\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/Notebook with metadata and long cells.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n# Part one - various cells\n\n<!-- #region -->\nHere we have a markdown cell\n\n\nwith two blank lines\n<!-- #endregion -->\n\nNow we have a markdown cell\nwith a code block inside it\n\n```python\n1 + 1\n```\n\nAfter that cell we'll have a code cell\n\n```{python}\n2 + 2\n\n\n3 + 3\n```\n\nFollowed by a raw cell\n\n```{python active=\"\", eval=FALSE}\nThis is \nthe content\nof the raw cell\n```\n\n# Part two - cell metadata\n\n<!-- #region key=\"value\" -->\nThis is a markdown cell with cell metadata `{\"key\": \"value\"}`\n<!-- #endregion -->\n\n```{python .class=None, tags=c(\"parameters\")}\n\"\"\"This is a code cell with metadata `{\"tags\":[\"parameters\"], \".class\":null}`\"\"\"\n```\n\n```{python key=\"value\", active=\"\", eval=FALSE}\nThis is a raw cell with cell metadata `{\"key\": \"value\"}`\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/Notebook_with_R_magic.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 2\n    language: python\n    name: python2\n---\n\n# A notebook with R cells\n\nThis notebook shows the use of R cells to generate plots\n\n```{python}\n# %load_ext rpy2.ipython\n```\n\n```{r}\nsuppressMessages(require(tidyverse))\n```\n\n```{r}\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n\nThe default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\n\n```{r magic_args=\"-w 400 -h 240\"}\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/Notebook_with_more_R_magic_111.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\n# %load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n```\n\n```{r magic_args=\"-i df\"}\nlibrary(\"ggplot2\")\nggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/R notebook with invalid cell keys.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: R\n    language: R\n    name: ir\n---\n\nThis notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\n```{r}\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/Reference Guide for Calysto Scheme.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Calysto Scheme (Python)\n    language: scheme\n    name: calysto_scheme\n---\n\n<img src=\"images/logo-64x64.png\"/>\n<h1>Reference Guide for Calysto Scheme</h1>\n\n[Calysto Scheme](https://github.com/Calysto/calysto_scheme) is a real Scheme programming language, with full support for continuations, including call/cc. It can also use all Python libraries. Also has some extensions that make it more useful (stepper-debugger, choose/fail, stack traces), or make it better integrated with Python.\n\nIn Jupyter notebooks, because Calysto Scheme uses [MetaKernel](https://github.com/Calysto/metakernel/blob/master/README.rst), it has a fully-supported set of \"magics\"---meta-commands for additional functionality. This includes running Scheme in parallel. See all of the [MetaKernel Magics](https://github.com/Calysto/metakernel/blob/master/metakernel/magics/README.md).\n\nCalysto Scheme is written in Scheme, and then translated into Python (and other backends). The entire functionality lies in a single Python file: https://github.com/Calysto/calysto_scheme/blob/master/calysto_scheme/scheme.py However, you can easily install it (see below).\n\nPlease see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n\n## Installation\n\nYou can install Calysto Scheme with Python3:\n\n```\npip3 install --upgrade calysto-scheme --user -U\npython3 -m calysto_kernel install --user\n```\n\nor in the system kernel folder with:\n\n```\nsudo pip3 install --upgrade calysto-scheme -U\nsudo python3 -m calysto_kernel install\n```\n\nChange pip3/python3 to use a different pip or Python. The version of Python used will determine how Calysto Scheme is run.\n\nUse it in the console, qtconsole, or notebook with IPython 3:\n\n```\nipython console --kernel calysto_scheme\nipython qtconsole --kernel calysto_scheme\nipython notebook --kernel calysto_scheme\n```\n\nIn addition to all of the following items, Calysto Scheme also has access to all of Python's builtin functions, and all of Python's libraries. For example, you can use `(complex 3 2)` to create a complex number by calling Python's complex function.\n\n## Jupyter Enhancements\n\nWhen you run Calysto Scheme in Jupyter (console, notebook, qtconsole, etc.) you get:\n\n* TAB completions of Scheme functions and variable names\n* display of rich media\n* stepper/debugger\n* magics (% macros)\n* shell commands (! command)\n* LaTeX equations\n* LaTeX-style variables\n* Python integration\n\n\n### LaTeX-style variables\n\nCalysto Scheme allows you to use LaTeX-style variables in code. For example, if you type:\n\n```\n\\beta\n```\n\nwith the cursor right after the 'a' in beta, and then press TAB, it will turn into the unicode character:\n\n```\nβ\n```\n\nThere are nearly 1300 different symbols defined (thanks to the Julia language) and documented here:\n\nhttp://docs.julialang.org/en/release-0.4/manual/unicode-input/#man-unicode-input\n\nCalysto Scheme may not implement all of those. Some useful and suggestive ones:\n\n* \\pi - π\n* \\Pi - Π\n* \\Sigma - Σ\n* \\_i - subscript i, such as vectorᵢ\n\n```{scheme}\n(define α 67)\n```\n\n```{scheme}\nα\n```\n\n```{scheme}\n(define i 2)\n(define vectorᵢ (vector-ref (vector 0 6 3 2) i))\nvectorᵢ\n```\n\n### Rich media\n\n```{scheme}\n(import \"calysto.display\")\n```\n\n```{scheme}\n(calysto.display.HTML \"This is <b>bold</b>, <i>italics</i>, <u>underlined</u>.\")\n```\n\n```{scheme}\n(import \"calysto.graphics\")\n```\n\n```{scheme}\n(define canvas (calysto.graphics.Canvas))\n```\n\n```{scheme}\n(define ball (calysto.graphics.Circle '(150 150) 100))\n```\n\n```{scheme}\n(ball.draw canvas)\n```\n\n### Shell commands\n\n```{scheme}\n! ls /tmp\n```\n\n### Stepper/Debugger\n\nHere is what the debugger looks like:\n\n<img src=\"images/stepper_debugger.png\">\n\nIt has breakpoints (click in left margin). You must press Stop to exit the debugger.\n\n\n```scheme\n%%debug\n\n(begin\n (define x 1)\n (set! x 2)\n)\n```\n\n\n### Python Integration\n\nYou can import and use any Python library in Calysto Scheme.\n\nIn addition, if you wish, you can execute expressions and statements in a Python environment:\n\n```{scheme}\n(python-eval \"1 + 2\")\n```\n\n```{scheme}\n(python-exec \n\"\ndef mypyfunc(a, b):\n    return a * b\n\")\n```\n\nThis is a shared environment with Scheme:\n\n```{scheme}\n(mypyfunc 4 5)\n```\n\nYou can use `func` to turn a Scheme procedure into a Python function, and `define!` to put it into the shared environment with Python:\n\n```{scheme}\n(define! mypyfunc2 (func (lambda (n) n)))\n```\n\n```{scheme}\n(python-eval \"mypyfunc2(34)\")\n```\n\n# Differences Between Languages\n\n## Major differences between Scheme and Python\n\n1. In Scheme, double quotes are used for strings and may contain newlines\n1. In Scheme, a single quote is short for (quote ...) and means \"literal\"\n1. In Scheme, everything is an expression and has a return value\n1. Python does not support macros (e.g., extending syntax)\n1. In Python, \"if X\" is false if X is None, False, [], (,) or 0. In Scheme, \"if X\" is only false if X is #f or 0\n1. Calysto Scheme uses continuations, not the call stack. However, for debugging there is a pseudo-stack when an error is raised. You can turn that off with (use-stack-trace #f)\n1. Scheme procedures are not Python functions, but there are means to use one as the other.\n\n## Major Differences Between Calysto Scheme and other Schemes\n\n1. define-syntax works slightly differently\n1. In Calysto Scheme, #(...) is short for '#(...)\n1. Calysto Scheme is missing many standard functions (see list at bottom)\n1. Calysto Scheme has a built-in amb operator called `choose`\n1. For debugging there is a pseudo-stack when errors are raised in Calysto Scheme. You can turn that off with (use-stack-trace #f)\n\n### Stack Trace\n\nCalysto Scheme acts as if it has a call stack, for easier debugging. For example:\n\n```{scheme}\n(define fact\n    (lambda (n)\n      (if (= n 1)\n           q\n           (* n (fact (- n 1))))))\n```\n\n```{scheme}\n(fact 5)\n```\n\nTo turn off the stack trace on error:\n\n```scheme\n(use-stack-trace #f)\n```\nThat will allow infinite recursive loops without keeping track of the \"stack\".\n\n\n# Calysto Scheme Variables\n\n## SCHEMEPATH\nSCHEMEPATH is a list of search directories used with (load NAME). This is a reference, so you should append to it rather than attempting to redefine it.\n\n```{scheme}\nSCHEMEPATH\n```\n\n```{scheme}\n(set-cdr! (cdr SCHEMEPATH) (list \"/var/modules\"))\n```\n\n```{scheme}\nSCHEMEPATH\n```\n\n## Getting Started\n\nNote that you can use the word `lambda` or \\lambda and then press [TAB]\n\n```{scheme}\n(define factorial\n  (λ (n)\n     (cond\n      ((zero? n) 1)\n      (else (* n (factorial (- n 1)))))))\n```\n\n```{scheme}\n(factorial 5)\n```\n\n## define-syntax\n(define-syntax NAME RULES): a method for creating macros\n\n```{scheme}\n(define-syntax time \n  [(time ?exp) (let ((start (current-time)))\n                 ?exp\n                 (- (current-time) start))])\n```\n\n```{scheme}\n(time (car '(1 2 3 4)))\n```\n\n```{scheme}\n;;---------------------------------------------------------------------\n;; collect is like list comprehension in Python\n\n(define-syntax collect\n  [(collect ?exp for ?var in ?list)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) #t) ?list)]\n  [(collect ?exp for ?var in ?list if ?condition)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) ?condition) ?list)])\n\n(define filter-map\n  (lambda (f pred? values)\n    (if (null? values)\n      '()\n      (if (pred? (car values))\n          (cons (f (car values)) (filter-map f pred? (cdr values)))\n          (filter-map f pred? (cdr values))))))\n```\n\n```{scheme}\n(collect (* n n) for n in (range 10))\n```\n\n```{scheme}\n(collect (* n n) for n in (range 5 20 3))\n```\n\n```{scheme}\n(collect (* n n) for n in (range 10) if (> n 5))\n```\n\n```{scheme}\n;;---------------------------------------------------------------------\n;; for loops\n\n(define-syntax for\n  [(for ?exp times do . ?bodies)\n   (for-repeat ?exp (lambda () . ?bodies))]\n  [(for ?var in ?exp do . ?bodies)\n   (for-iterate1 ?exp (lambda (?var) . ?bodies))]\n  [(for ?var at (?i) in ?exp do . ?bodies)\n   (for-iterate2 0 ?exp (lambda (?var ?i) . ?bodies))]\n  [(for ?var at (?i ?j . ?rest) in ?exp do . ?bodies)\n   (for ?var at (?i) in ?exp do\n     (for ?var at (?j . ?rest) in ?var do . ?bodies))])\n\n(define for-repeat\n  (lambda (n f)\n    (if (< n 1)\n      'done\n      (begin\n        (f)\n        (for-repeat (- n 1) f)))))\n\n(define for-iterate1\n  (lambda (values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values))\n        (for-iterate1 (cdr values) f)))))\n\n(define for-iterate2\n  (lambda (i values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values) i)\n        (for-iterate2 (+ i 1) (cdr values) f)))))\n```\n\n```{scheme}\n(define matrix2d\n  '((10 20)\n    (30 40)\n    (50 60)\n    (70 80)))\n\n(define matrix3d\n  '(((10 20 30) (40 50 60))\n    ((70 80 90) (100 110 120))\n    ((130 140 150) (160 170 180))\n    ((190 200 210) (220 230 240))))\n```\n\n```{scheme}\n(begin \n (define hello 0)\n (for 5 times do (set! hello (+ hello 1)))\n hello\n )\n```\n\n```{scheme}\n(for sym in '(a b c d) do (define x 1) (set! x sym) (print x))\n```\n\n```{scheme}\n(for n in (range 10 20 2) do (print n))\n```\n\n```{scheme}\n(for n at (i j) in matrix2d do (print (list n 'coords: i j)))\n```\n\n```{scheme}\n(for n at (i j k) in matrix3d do (print (list n 'coords: i j k)))\n```\n\n```{scheme}\n(define-syntax scons\n  [(scons ?x ?y) (cons ?x (lambda () ?y))])\n\n(define scar car)\n\n(define scdr\n  (lambda (s)\n    (let ((result ((cdr s))))\n      (set-cdr! s (lambda () result))\n      result)))\n\n(define first\n  (lambda (n s)\n    (if (= n 0)\n      '()\n      (cons (scar s) (first (- n 1) (scdr s))))))\n\n(define nth\n  (lambda (n s)\n    (if (= n 0)\n      (scar s)\n      (nth (- n 1) (scdr s)))))\n\n(define smap\n  (lambda (f s)\n    (scons (f (scar s)) (smap f (scdr s)))))\n\n(define ones (scons 1 ones))\n\n(define nats (scons 0 (combine nats + ones)))\n\n(define combine\n  (lambda (s1 op s2)\n    (scons (op (scar s1) (scar s2)) (combine (scdr s1) op (scdr s2)))))\n\n(define fibs (scons 1 (scons 1 (combine fibs + (scdr fibs)))))\n\n(define facts (scons 1 (combine facts * (scdr nats))))\n\n(define ! (lambda (n) (nth n facts)))\n```\n\n```{scheme}\n(! 5)\n```\n\n```{scheme}\n(nth 10 facts)\n```\n\n```{scheme}\n(nth 20 fibs)\n```\n\n```{scheme}\n(first 30 fibs)\n```\n\n## for-each\n(for-each PROCEDURE LIST): apply PROCEDURE to each item in LIST; like `map` but don't return results\n\n```{scheme}\n(for-each (lambda (n) (print n)) '(3 4 5))\n```\n\n## format\n(format STRING ITEM ...): format the string with ITEMS as arguments\n\n```{scheme}\n(format \"This uses formatting ~a ~s ~%\" 'apple 'apple)\n```\n\n## func\n\nTurns a lambda into a Python function.\n\n(func (lambda ...))\n\n```{scheme}\n(func (lambda (n) n))\n```\n\n## There's more!\n\nPlease see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/The flavors of raw cells.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python raw_mimetype=\"text/latex\", active=\"\", eval=FALSE}\n$1+1$\n```\n\n```{python raw_mimetype=\"text/restructuredtext\", active=\"\", eval=FALSE}\n:math:`1+1`\n```\n\n```{python raw_mimetype=\"text/html\", active=\"\", eval=FALSE}\n<b>Bold text<b>\n```\n\n```{python raw_mimetype=\"text/markdown\", active=\"\", eval=FALSE}\n**Bold text**\n```\n\n```{python raw_mimetype=\"text/x-python\", active=\"\", eval=FALSE}\n1 + 1\n```\n\n```{python active=\"\", eval=FALSE}\nNot formatted\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/cat_variable.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\ncat = 42\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/coconut_homepage_demo.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Coconut\n    language: coconut\n    name: coconut\n---\n\nTaken from [coconut-lang.org](coconut-lang.org)\n\n\npipeline-style programming\n\n```{coconut}\n\"hello, world!\" |> print\n```\n\n prettier lambdas\n\n```{coconut}\nx -> x ** 2\n```\n\npartial application\n\n```{coconut}\nrange(10) |> map$(pow$(?, 2)) |> list\n```\n\npattern-matching\n\n```{coconut}\nmatch [head] + tail in [0, 1, 2, 3]:\n    print(head, tail)\n```\n\ndestructuring assignment\n\n```{coconut}\n{\"list\": [0] + rest} = {\"list\": [0, 1, 2, 3]}\n```\n\ninfix notation\n\n```{coconut}\n# 5 `mod` 3 == 2\n```\n\noperator functions\n\n```{coconut}\nproduct = reduce$(*)\n```\n\nfunction composition\n\n```{coconut}\n# (f..g..h)(x, y, z)\n```\n\nlazy lists\n\n```{coconut}\n# (| first_elem() |) :: rest_elems()\n```\n\nparallel programming\n\n```{coconut}\nrange(100) |> parallel_map$(pow$(2)) |> list\n```\n\ntail call optimization\n\n```{coconut}\ndef factorial(n, acc=1):\n    case n:\n        match 0:\n            return acc\n        match _ is int if n > 0:\n            return factorial(n-1, acc*n)\n```\n\nalgebraic data types\n\n```{coconut}\ndata Empty()\ndata Leaf(n)\ndata Node(l, r)\n\ndef size(Empty()) = 0\n\naddpattern def size(Leaf(n)) = 1\n\naddpattern def size(Node(l, r)) = size(l) + size(r)\n```\n\nand much more!\n\nLike what you see? Don't forget to star Coconut on GitHub!\n\n```{coconut}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/convert_to_py_then_test_with_update83.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\n# %%time\n\nprint('asdf')\n```\n\nThanks for jupytext!\n\n```{python}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/csharp.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: .NET (C#)\n    language: C#\n    name: .net-csharp\n---\n\nWe start with...\n\n```{csharp}\nConsole.WriteLine(\"Hello World!\");\n```\n\nThen we do a plot with Plotly, following the [Plotting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Plotting%20with%20Xplot.ipynb) example from `dotnet/interactive`:\n\n```{csharp}\nusing XPlot.Plotly;\n\nvar bar = new Graph.Bar\n{\n    name = \"Bar\",\n    x = new[] {'A', 'B', 'C'},\n    y = new[] {1, 3, 2}\n};\n\nvar chart = Chart.Plot(new[] {bar});\nchart.WithTitle(\"A bar plot\");\ndisplay(chart);\n```\n\nWe also test the math outputs as in the [Math and Latex](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Math%20and%20LaTeX.ipynb) example:\n\n```{csharp}\n(LaTeXString)@\"\\begin{align} e^{i \\pi} = -1\\end{align}\"\n```\n\n```{csharp}\n(MathString)@\"e^{i \\pi} = -1\"\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/demo_gdl_fbp.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: IDL [conda env:gdl] *\n    language: IDL\n    name: conda-env-gdl-idl\n---\n\n## GDL demo notebook\n\n\nDemonstration of GDL [(gnudatalanguage)](https://github.com/gnudatalanguage/gdl)\n\nThis notebook creates a Shepp-Logan phantom, projects it and then performs an FBP reconstruction.\n\n```{idl}\n;; L.A. Shepp and B.F. Logan, “The Fourier reconstruction of a head section,”\n;; IEEE Trans. Nucl. Sci. 21(3), 21–43 (1974).\nfunction shepplogan, size = size\n\n  if NOT keyword_set(size) then size = 256\n\n  phantom = fltarr(size,size)\n\n  tmp  = (findgen(size)-((size-1)/2.0)) / (size/2.0)\n  xcor = rebin(tmp,size,size)\n  ycor = rebin(transpose(tmp),size,size)\n  tmp  = fltarr(size,size)\n  \n  aa={cx: 0.0,  cy: 0.0,    maj:0.69,   min:0.92,  theta:  0.0, val: 2.0 }\n  bb={cx: 0.0,  cy:-0.0184, maj:0.6624, min:0.874, theta:  0.0, val:-0.98}\n  cc={cx: 0.22, cy: 0.0,    maj:0.11,   min:0.31,  theta:-18.0, val:-0.02}\n  dd={cx:-0.22, cy: 0.0,    maj:0.16,   min:0.41,  theta: 18.0, val:-0.02}\n  ee={cx: 0.0,  cy: 0.35,   maj:0.21,   min:0.25,  theta:  0.0, val:-0.01}\n  ff={cx: 0.0,  cy: 0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  gg={cx: 0.0,  cy:-0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  hh={cx:-0.08, cy:-0.605,  maj:0.046,  min:0.023, theta:  0.0, val:-0.01}\n  ii={cx: 0.0,  cy:-0.605,  maj:0.023,  min:0.023, theta:  0.0, val:-0.01}\n  jj={cx: 0.06, cy:-0.605,  maj:0.023,  min:0.046, theta:  0.0, val:-0.01}\n\n  list = [aa,bb,cc,dd,ee,ff,gg,hh,ii,jj]\n  for n = 0, n_elements(list)-1 do begin\n\n     tmp = ((xcor-list[n].cx) / list[n].maj)^2 $\n           + ((ycor-list[n].cy) / list[n].min)^2\n     \n     if list[n].theta NE 0 then begin\n        nx = (size-1) * (list[n].cx + 1) / 2\n        ny = (size-1) * (list[n].cy + 1) / 2\n        tmp = rot(tmp, -list[n].theta, 1, nx, ny, /interp, /pivot)\n     endif\n     \n     phantom[where(tmp LE 1.0)] += list[n].val\n     \n  endfor\n  \n  return, phantom < 1.1\n  \nend\n```\n\n```{idl}\n;; Enable inline plotting\n!inline=1\n```\n\n```{idl}\nphantom = shepplogan()\nwindow, 0, xsize=256, ysize=256\ntvscl, phantom > 0.95\n```\n\nNow we define simple forward and backprojection functions:\n\n```{idl}\nfunction proj, image, angle\n\n    sino_size_x = max(size(image,/dim))\n    sino_size_y = n_elements(angle)\n\n    sino = fltarr(sino_size_x, sino_size_y)\n    \n    for aa=0, n_elements(angle)-1 do begin\n    \n        sino[*,aa] = total(rot(image, angle[aa], /interp), 2)\n    \n    endfor\n\n    return, sino\n    \nend\n```\n\n```{idl}\nfunction back, sino, angle\n\n    image_size = n_elements(sino[*,0])\n    image = fltarr(image_size,image_size)\n\n    for aa=0, n_elements(angle)-1 do begin\n    \n        image += rot(rebin(sino[*,aa],[image_size,image_size]), -angle[aa], /interp)\n    \n    endfor\n\n    return, image / n_elements(angle)\n\nend\n```\n\nThis allows us to create a sinogram:\n\n```{idl}\nangles = findgen(360)\nsino = proj(phantom, angles)\nwindow, 0, xsize=256, ysize=360\ntvscl, sino\n```\n\nOn this we can apply a simple FBP reconstruction:\n\n```{idl}\n;; G.L. Zeng, “Revisit of the Ramp Filter,”\n;; IEEE Trans. Nucl. Sci. 62(1), 131–136 (2015).\nfunction fbp, sino, angles\n  \n  ntot = n_elements(sino[*,0])\n  nang = n_elements(sino[0,*])\n  npos = ntot / 2 + 1           ; integer division needed !\n  nneg = ntot - npos\n\n  freq = findgen(ntot)\n  freq[npos:ntot-1] = REVERSE(freq[1:nneg])\n  freq[0] = 1\n\n  filter = -1 / (!pi * freq)^2\n  filter[where(freq mod 2 EQ 0)] *= -0.0\n  filter[0] = 0.25\n\n  filter = abs(fft(filter)) * ntot\n  filter[ntot/4:ntot/4+ntot/2-1] *= 0.0\n  filter = rebin(filter,ntot,nang)\n\n  ;; apply filter to the sinogram\n  fsino  = fft(sino,  dim=1)\n  fsino *= filter\n  fsino  = fft(fsino, dim=1, /overwrite, /inverse)\n  fsino  = !pi * real_part(fsino)\n\n  ;; backproject the filtered sinogram\n  return, back(fsino, angles)\n\nend\n```\n\n```{idl}\nreconstruction = fbp(sino, angles)\nwindow, 0, xsize=512, ysize=256\n\ntvscl, [phantom, reconstruction] > 0.8\n```\n\n### The end\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/evcxr_jupyter_tour.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Rust\n    language: rust\n    name: rust\n---\n\n# Tour of the EvCxR Jupyter Kernel\nFor those not already familiar with Jupyter notebook, it lets you write code into \"cells\" like the box below. Cells can alternatively contain markdown, like this text here. Each code cell is compiled and executed separately, but variables, defined functions etc persist between cells.\n\n## Printing to outputs and evaluating expressions\nLets print something to stdout and stderr then return a final expression to see how that's presented. Note that stdout and stderr are separate streams, so may not appear in the same order is their respective print statements.\n\n```{rust}\nprintln!(\"Hello world\");\neprintln!(\"Hello error\");\nformat!(\"Hello {}\", \"world\")\n```\n\n## Assigning and making use of variables\nWe define a variable `message`, then in the subsequent cell, modify the string and finally print it out. We could also do all this in the one cell if we wanted.\n\n```{rust}\nlet mut message = \"Hello \".to_owned();\n```\n\n```{rust}\nmessage.push_str(\"world!\");\n```\n\n```{rust}\nmessage\n```\n\n## Defining and redefining functions\nNext we'll define a function\n\n```{rust}\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {0} else {fib(x - 2) + fib(x - 1)}\n}\n```\n\n```{rust}\n(1..13).map(fib).collect::<Vec<i32>>()\n```\n\nHmm, that doesn't look right. Lets redefine the function. In practice, we'd go back and edit the function above and reevaluate it, but here, lets redefine it in a separate cell.\n\n```{rust}\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {2} else {fib(x - 2) + fib(x - 1)}\n}\n```\n\n```{rust}\nlet values = (1..13).map(fib).collect::<Vec<i32>>();\nvalues\n```\n\n## Spawning a separate thread and communicating with it\nWe can spawn a thread to do stuff in the background, then continue executing code in other cells.\n\n```{rust}\nuse std::sync::{Mutex, Arc};\nlet counter = Arc::new(Mutex::new(0i32));\nstd::thread::spawn({\n    let counter = Arc::clone(&counter);\n    move || {\n        for i in 1..300 {\n            *counter.lock().unwrap() += 1;\n            std::thread::sleep(std::time::Duration::from_millis(100));\n        }\n}});\n```\n\n```{rust}\n*counter.lock().unwrap()\n```\n\n```{rust}\n*counter.lock().unwrap()\n```\n\n## Loading external crates\nWe can load external crates. This one takes a while to compile, but once it's compiled, subsequent cells shouldn't need to recompile it, so it should be much quicker.\n\n```{rust}\n// :dep base64 = \"0.10.1\"\nbase64::encode(&vec![1, 2, 3, 4])\n```\n\n## Customizing how types are displayed\nWe can also customize how our types are displayed, including presenting them as HTML. Here's an example where we define a custom display function for a type `Matrix`.\n\n```{rust}\nuse std::fmt::Debug;\npub struct Matrix<T> {pub values: Vec<T>, pub row_size: usize}\nimpl<T: Debug> Matrix<T> {\n    pub fn evcxr_display(&self) {\n        let mut html = String::new();\n        html.push_str(\"<table>\");\n        for r in 0..(self.values.len() / self.row_size) {\n            html.push_str(\"<tr>\");\n            for c in 0..self.row_size {\n                html.push_str(\"<td>\");\n                html.push_str(&format!(\"{:?}\", self.values[r * self.row_size + c]));\n                html.push_str(\"</td>\");\n            }\n            html.push_str(\"</tr>\");            \n        }\n        html.push_str(\"</table>\");\n        println!(\"EVCXR_BEGIN_CONTENT text/html\\n{}\\nEVCXR_END_CONTENT\", html);\n    }\n}\n```\n\n```{rust}\nlet m = Matrix {values: vec![1,2,3,4,5,6,7,8,9], row_size: 3};\nm\n```\n\nWe can also return images, we just need to base64 encode them. First, we set up code for displaying RGB and grayscale images.\n\n```{rust}\nextern crate image;\nextern crate base64;\npub trait EvcxrResult {fn evcxr_display(&self);}\nimpl EvcxrResult for image::RgbImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::RGB(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\nimpl EvcxrResult for image::GrayImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::Gray(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\n```\n\n```{rust}\nimage::ImageBuffer::from_fn(256, 256, |x, y| {\n    if (x as i32 - y as i32).abs() < 3 {\n        image::Rgb([0, 0, 255])\n    } else {\n        image::Rgb([0, 0, 0])\n    }\n})\n```\n\n## Display of compilation errors\nHere's how compilation errors are presented. Here we forgot an & and passed a String instead of an &str.\n\n```{rust}\nlet mut s = String::new();\ns.push_str(format!(\"foo {}\", 42));\n```\n\n## Seeing what variables have been defined\nWe can print a table of defined variables and their types with the :vars command.\n\n```{rust}\n// :vars\n```\n\nOther built-in commands can be found via :help\n\n```{rust}\n// :help\n```\n\n```{rust}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/frozen_cell.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n```\n\n```{python deletable=FALSE, editable=FALSE, run_control={'frozen': True}, eval=FALSE}\n# This is an frozen cell\nprint(\"I'm frozen so Im not executed :(\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/fsharp.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: .NET (F#)\n    language: F#\n    name: .net-fsharp\n---\n\nThis notebook was inspired by [Plottting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/fsharp/Docs/Plotting%20with%20Xplot.ipynb).\n\n```{fsharp}\nopen XPlot.Plotly\n```\n\n```{fsharp}\nlet bar =\n    Bar(\n        name = \"Bar 1\",\n        x = [\"A\"; \"B\"; \"C\"],\n        y = [1; 3; 2])\n\n[bar]\n|> Chart.Plot\n|> Chart.WithTitle \"A sample bar plot\"\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/gnuplot_notebook.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: gnuplot\n    language: gnuplot\n    name: gnuplot\n---\n\n# Sample gnuplot notebook\n\n\n## Simple plotting\n\n```{gnuplot}\n# Plot sin and cos with different linetypes\n\nf(x) = sin(x)\ng(x) = cos(x)\nset xrange[0:2*pi]\nset xtics(0, \"{/Symbol p}\" pi , \"2{/Symbol p}\" 2*pi)\nset ytics 1\nplot f(x) linewidth 2 title \"sin(x)\", \\\n    g(x) linewidth 2 dashtype \"--\" title \"cos(x)\"\n```\n\n## Example of line magic\n\n```{gnuplot}\n# %gnuplot inline pngcairo enhanced background rgb \"#EEEEEE\" size 600, 600\n# Parametric plot without border\n\nreset\nset parametric\nset size ratio -1\nunset border\nunset tics\nplot f(t), g(t) linewidth 2 notitle\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/haskell_notebook.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Haskell\n    language: haskell\n    name: haskell\n---\n\n# Example Haskell Notebook\n\n\nDefine a function to add two numbers.\n\n```{haskell}\nf :: Num a => a -> a -> a\nf x y = x + y\n```\n\nTry to use the function\n\n```{haskell}\nf 1 2 \n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/hello_world_gonb.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Go (gonb)\n    language: go\n    name: gonb\n---\n\nA notebook that use [GoNB](https://github.com/janpfeifer/gonb)\n\n\nthe code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb)\n\n```{go}\nfunc main() {\n    fmt.Printf(\"Hello World!\")\n}\n```\n\n```{go}\n%%\nfmt.Printf(\"Hello World!\")\n```\n\n%% --who=world can pass flags to main func\n\n```{go}\nimport (\n    \"flag\"\n    \"fmt\"\n)\n\nvar flagWho = flag.String(\"who\", \"\", \"Your name!\")\n\n%% --who=world\nfmt.Printf(\"Hello %s!\\n\", *flagWho)\n```\n\n%args also can pass flags\n\n```{go}\n// %args --who=Wally\n\nfunc main() {\n    flag.Parse()\n    fmt.Printf(\"Where is %s?\", *flagWho)\n}\n```\n\n```{go}\nimport \"github.com/janpfeifer/gonb/gonbui\"\n\n%%\ngonbui.DisplayHtml(`<span style=\"background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;\">I 🧡 GoNB!</span>`)\n```\n\n```{go}\n%%\ngonbui.DisplayMarkdown(\"#### Objective\\n\\n1. Have fun coding **Go**;\\n1. Profit...\\n\"+\n                       `$$f(x) = \\int_{-\\infty}^{\\infty} e^{-x^2} dx$$`)\n```\n\n```{go}\nfunc init_a() {\n    fmt.Println(\"init_a\")\n}\n%%\nfmt.Println(\"main\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/html-demo.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Clojure\n    language: clojure\n    name: clojure\n---\n\n# Clojupyter Demo\n\nThis example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.\nThis notebook demonstrates some of the more advanced features of Clojupyter.\n\n\n## Displaying HTML\n\nTo display HTML, you'll need to require a clojupyter helper function to change the cell output\n\n```{clojure}\n(require '[clojupyter.misc.display :as display])\n```\n\n```{clojure}\n(println \">> should print some text\")\n;; displaying html\n(display/hiccup-html \n    [:ul \n     [:li \"a \" [:i \"emphatic\"] \" idea\"]\n     [:li \"a \" [:b \"bold\"] \" idea\"]\n     [:li \"an \" [:span {:style \"text-decoration: underline;\"} \"important\"] \" idea\"]])\n```\n\nWe can also use this to render SVG:\n\n```{clojure}\n(display/hiccup-html\n    [:svg {:height 100 :width 100 :xmlns \"http://www.w3.org/2000/svg\"}\n            [:circle {:cx 50 :cy 40 :r 40 :fill \"red\"}]])\n```\n\n## Adding External Clojure Dependencies \n\nYou can fetch external Clojure dependencies using the `clojupyter.misc.helper` namespace. \n\n```{clojure}\n(require '[clojupyter.misc.helper :as helper])\n```\n\n```{clojure}\n(helper/add-dependencies '[org.clojure/data.json \"0.2.6\"])\n(require '[clojure.data.json :as json])\n```\n\n```{clojure}\n(json/write-str {:a 1 :b [2, 3] :c \"c\"})\n```\n\n## Adding External Javascript Dependency\n\nSince you can render arbitrary HTML using `display/hiccup-html`, it's pretty easy to use external Javascript libraries to do things like generate charts. Here's an example using [Highcharts](https://www.highcharts.com/).\n\nFirst, we use a cell to add javascript to the running notebook:\n\n```{clojure}\n(helper/add-javascript \"https://code.highcharts.com/highcharts.js\")\n```\n\nNow we define a function which takes Clojure data and returns hiccup HTML to display:\n\n```{clojure}\n(defn plot-highchart [highchart-json]\n  (let [id (str (java.util.UUID/randomUUID))\n        code (format \"Highcharts.chart('%s', %s );\" id, (json/write-str highchart-json))]\n      (display/hiccup-html \n        [:div [:div {:id id :style {:background-color \"red\"}}]\n                   [:script code]])))\n```\n\nNow we can make generate interactive plots (try hovering over plot):\n\n```{clojure}\n(def raw-data (map #(+ (* 22 (+ % (Math/random)) 78)) (range)))\n(def data-1 (take 500 raw-data))\n(def data-2 (take 500 (drop 500 raw-data)))\n\n(plot-highchart {:chart {:type \"line\"}\n                 :title {:text \"Plot of random data\"}\n                 :series [{:data data-1} {:data data-2}]})\n```\n\n```{clojure}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/ijavascript.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Javascript (Node.js)\n    language: javascript\n    name: javascript\n---\n\n## A notebook that uses IJavascript kernel\n\n```{javascript}\nlet x = 5;\nconst y = 6;\nvar z = 10;\n```\n\n```{javascript}\nx + y;\n```\n\n```{javascript}\nfunction add(num1, num2) {\n    return num1 + num2\n}\n```\n\n```{javascript}\nadd(x, y);\n```\n\n```{javascript}\nconst arrowAdd = (num1, num2) => num1 + num2;\n```\n\n```{javascript}\narrowAdd(x, y);\n```\n\n```{javascript}\nconst myCar = {\n    color: \"blue\",\n    weight: 850,\n    model: \"fiat\",\n    start: () => \"car started!\",\n    doors: [1,2,3,4]\n}\n```\n\n```{javascript}\nconsole.log(\"color:\", myCar.color);\n```\n\n```{javascript}\nconsole.log(\"start:\", myCar.start());\n```\n\n```{javascript}\nfor (let door of myCar.doors) {\n    console.log(\"I'm door\", door)\n}\n```\n\n```{javascript}\nmyCar;\n```\n\n```{javascript}\nclass User {\n  constructor(name){\n    this.name = name;\n  }\n  sayHello(){\n    return \"Hello, I'm \" + this.name;\n  }\n}\n```\n\n```{javascript}\nlet John = new User(\"John\");\nJohn.sayHello();\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/ir_notebook.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: R\n    language: R\n    name: ir\n---\n\nThis is a jupyter notebook that uses the IR kernel.\n\n```{r}\nsum(1:10)\n```\n\n```{r}\nplot(cars)\n```\n\n```{r}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/itypescript.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Typescript 3.5\n    language: typescript\n    name: typescript\n---\n\n```{typescript}\nlet x: number = 5;\nconst y: number = 6;\nvar z: string = \"hi\";\nconsole.log(z);\nx + y;\n```\n\n```{typescript}\nfunction add(num1: number, num2: number): number {\n    return num1 + num2\n}\nadd(x, y);\n```\n\n```{typescript}\nconst arrowAdd = (num1: number, num2: number) => num1 + num2;\narrowAdd(x, y);\n```\n\n```{typescript}\nclass User {\n  constructor(private name: string) {\n    this.name = name;\n  }\n  sayHello(): string {\n    return \"Hello, I'm \" + this.name;\n  }\n}\nlet John: User;\nJohn = new User(\"John\");\nJohn.sayHello();\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/julia_benchmark_plotly_barchart.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: julia-1.1\n---\n\n```{julia}\n# IJulia rocks! So does Plotly. Check it out\n\nusing Plotly\napi_key = \"\" # visit https://plot.ly/api to generate an API username and password\nusername = \"\"\n\nPlotly.signin(username, api_key)\n```\n\n```{julia}\n# Following data taken from http://julialang.org/ frontpage \nbenchmarks = [\"fib\", \"parse_int\", \"quicksort3\", \"mandel\", \"pi_sum\", \"rand_mat_stat\", \"rand_mat_mul\"]\nplatforms = [\"Fortran\", \"Julia\", \"Python\", \"R\", \"Matlab\", \"Mathematica\", \"Javascript\", \"Go\"]\n\ndata = {\n        platforms[1] => [0.26, 5.03, 1.11, 0.86, 0.80, 0.64, 0.96],\n        platforms[2] => [0.91, 1.60, 1.14, 0.85, 1.00, 1.66, 1.01],\n        platforms[3] => [30.37, 13.95, 31.98, 14.19, 16.33, 13.52, 3.41 ],\n        platforms[4] => [411.36, 59.40, 524.29, 106.97, 15.42, 10.84, 3.98  ],\n        platforms[5] => [1992.00, 1463.16, 101.84, 64.58, 1.29, 6.61, 1.10   ],\n        platforms[6] => [64.46, 29.54, 35.74, 6.07, 1.32, 4.52, 1.16 ],\n        platforms[7] => [2.18, 2.43, 3.51, 3.49, 0.84, 3.28, 14.60],\n        platforms[8] => [1.03, 4.79, 1.25, 2.36, 1.41, 8.12, 8.51]\n        }\n\npdata = [ {\"x\"=>benchmarks,\"y\"=>data[k],\"bardir\"=>\"h\",\"type\"=>\"bar\",\"name\"=>k} for k = platforms ]\n\nlayout = {\n          \"title\"=> \"Julia benchmark comparison (smaller is better, C performance = 1.0)\",\n          \"barmode\"=> \"group\",\n          \"autosize\"=> false,\n          \"width\"=> 900,\n          \"height\"=> 900,\n          \"titlefont\"=>\n          {\n           \"family\"=> \"Open Sans\",\n           \"size\"=> 18,\n           \"color\"=> \"rgb(84, 39, 143)\"\n           },\n          \"margin\"=> {\"l\"=>160, \"pad\"=>0},\n          \"xaxis\"=> {\n                     \"title\"=> \"Benchmark log-time\",\n                     \"type\"=> \"log\"\n                     },\n          \"yaxis\"=> {\"title\"=> \"Benchmark Name\"}\n          }\n\nresponse = Plotly.plot(pdata,[\"layout\"=>layout])\n\n# Embed in an iframe within IJulia\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n\n```{julia}\n# checkout https://plot.ly/api/ for more Julia examples!\n# But to show off some other Plotly features:\nx = 1:1500\ny1 = sin(2*pi*x/1500.) + rand(1500)-0.5\ny2 = sin(2*pi*x/1500.)\n\nfish = {\"x\"=>x,\"y\"=> y1,\n\t\"type\"=>\"scatter\",\"mode\"=>\"markers\",\n\t\"marker\"=>{\"color\"=>\"rgb(0, 0, 255)\",\"opacity\"=>0.5 } }\n\nfit = {\"x\"=> x,\"y\"=> y2,\n\t\"type\"=>\"scatter\", \"mode\"=>\"markers\", \"opacity\"=>0.8,\n\t\"marker\"=>{\"color\"=>\"rgb(255, 0, 0)\"} }\n\nlayout = {\"autosize\"=> false,\n    \"width\"=> 650, \"height\"=> 550,\n    \"title\"=>\"Fish School\",\n\t\"xaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",    \n        \"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[0,1500] },\n\t\"yaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",\n\t\t\"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[-2.2,2.2] },\n\t\"plot_bgcolor\"=> \"rgb(245,245,247)\",\n    \"showlegend\"=> false,\n    \"hovermode\"=> \"closest\"}\n\nresponse = Plotly.plot([fish, fit],[\"layout\"=>layout])\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/julia_functional_geometry.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: julia-1.1\n---\n\n```{julia}\n# This notebook is a semi top-down explanation. This cell needs to be\n# executed first so that the operators and helper functions are defined\n# All of this is explained in the later half of the notebook\n\nusing Compose, Interact\nCompose.set_default_graphic_size(2inch, 2inch)\n\npoints_f = [\n    (.1, .1),\n    (.9, .1),\n    (.9, .2),\n    (.2, .2),\n    (.2, .4),\n    (.6, .4),\n    (.6, .5),\n    (.2, .5),\n    (.2, .9),\n    (.1, .9),\n    (.1, .1)\n]\n\nf = compose(context(), stroke(\"black\"), line(points_f))\n\nrot(pic) = compose(context(rotation=Rotation(-deg2rad(90))), pic)\nflip(pic) = compose(context(mirror=Mirror(deg2rad(90), 0.5w, 0.5h)), pic)\nabove(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, 1, m/(m+n)), p),\n            (context(0, m/(m+n), 1, n/(m+n)), q))\n\nabove(p, q) = above(1, 1, p, q)\n\nbeside(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, m/(m+n), 1), p),\n            (context(m/(m+n), 0, n/(m+n), 1), q))\n\nbeside(p, q) = beside(1, 1, p, q)\n\nover(p, q) = compose(context(),\n                (context(), p), (context(), q))\n\nrot45(pic) =\n    compose(context(0, 0, 1/sqrt(2), 1/sqrt(2),\n        rotation=Rotation(-deg2rad(45), 0w, 0h)), pic)\n\n# Utility function to zoom out and look at the context\nzoomout(pic) = compose(context(),\n                (context(0.2, 0.2, 0.6, 0.6), pic),\n                (context(0.2, 0.2, 0.6, 0.6), fill(nothing), stroke(\"black\"), strokedash([0.5mm, 0.5mm]),\n                    polygon([(0, 0), (1, 0), (1, 1), (0, 1)])))\n\nfunction read_path(p_str)\n    tokens = [try parsefloat(x) catch symbol(x) end for x in split(p_str, r\"[\\s,]+\")]\n    path(tokens)\nend\n\nfish = compose(context(units=UnitBox(260, 260)), stroke(\"black\"),\n            read_path(strip(readall(\"fish.path\"))))\n\nrotatable(pic) = @manipulate for θ=0:0.001:2π\n    compose(context(rotation=Rotation(θ)), pic)\nend\n\nblank = compose(context())\n\nfliprot45(pic) = rot45(compose(context(mirror=Mirror(deg2rad(-45))),pic))\n\n# Hide this cell.\ndisplay(MIME(\"text/html\"), \"\"\"<script>\nvar cell = \\$(\".container .cell\").eq(0), ia = cell.find(\".input_area\")\nif (cell.find(\".toggle-button\").length == 0) {\nia.after(\n    \\$('<button class=\"toggle-button\">Toggle hidden code</button>').click(\n        function (){ ia.toggle() }\n        )\n    )\nia.hide()\n}\n</script>\"\"\")\n```\n\n# Functional Geometry\n*Functional Geometry* is a paper by Peter Henderson ([original (1982)](users.ecs.soton.ac.uk/peter/funcgeo.pdf), [revisited (2002)](https://cs.au.dk/~hosc/local/HOSC-15-4-pp349-365.pdf)) which deconstructs the MC Escher woodcut *Square Limit*\n\n![Square Limit](http://i.imgur.com/LjRzmNM.png)\n\n\n> A picture is an example of a complex object that can be described in terms of its parts.\nYet a picture needs to be rendered on a printer or a screen by a device that expects to\nbe given a sequence of commands. Programming that sequence of commands directly is\nmuch harder than having an application generate the commands automatically from the\nsimpler, denotational description.\n\n\nA `picture` is a *denotation* of something to draw.\n\ne.g. The value of f here denotes the picture of the letter F\n\n\nOriginal at http://nbviewer.jupyter.org/github/shashi/ijulia-notebooks/blob/master/funcgeo/Functional%20Geometry.ipynb\n\n\n## In conclusion\n\nWe described Escher's *Square Limit* from the description of its smaller parts, which in turn were described in terms of their smaller parts.\n\nThis seemed simple because we chose to talk in terms of an *algebra* to describe pictures. The primitives `rot`, `flip`, `fliprot45`, `above`, `beside` and `over` fit the job perfectly.\n\nWe were able to describe these primitives in terms of `compose` `contexts`, which the Compose library knows how to render.\n\nDenotation can be an easy way to describe a system as well as a practical implementation method.\n\n[Abstraction barriers](https://mitpress.mit.edu/sicp/full-text/sicp/book/node29.html) are useful tools that can reduce the cognitive overhead on the programmer. It entails creating layers consisting of functions which only use functions in the same layer or layers below in their own implementation. The layers in our language were:\n\n    ------------------[ squarelimit ]------------------\n    -------------[ quartet, cycle, nonet ]-------------\n    ---[ rot, flip, fliprot45, above, beside, over ]---\n    -------[ compose, context, line, path,... ]--------\n    \nDrawing this diagram out is a useful way to begin building any library.\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/jupyter.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n# Jupyter notebook\n\nThis notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n\n```{python}\na = 1\nb = 2\na + b\n```\n\nNow we return a few tuples\n\n```{python}\na, b\n```\n\n```{python}\na, b, a+b\n```\n\nAnd this is already the end of the notebook\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/jupyter_again.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n```\n\n```{python}\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n```\n\n```{python}\n# ?next\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/jupyter_with_raw_cell_in_body.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\n1+2+3\n```\n\n```{python active=\"\", eval=FALSE}\nThis is a raw cell\n```\n\nThis is a markdown cell\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/jupyter_with_raw_cell_on_top.Rmd",
    "content": "---\ntitle: Quick test\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n  chunk_output_type: console\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\n1+2+3\n```\n\n```{python}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/jupyter_with_raw_cell_with_invalid_yaml.Rmd",
    "content": "---\ntitle: Exception: Test\njupyter:\n  kernelspec:\n    display_name: Python 3 (ipykernel)\n    language: python\n    name: python3\n---\n\n```{python}\n1 + 2 + 3\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/jupyterlab-slideshow_1441.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3 (ipykernel)\n    language: python\n    name: python3\n---\n\n<!-- #region @deathbeds/jupyterlab-fonts={\"styles\": {\"\": {\"body[data-jp-deck-mode='presenting'] &\": {\"right\": \"0\", \"top\": \"30%\", \"width\": \"25%\", \"z-index\": 1}}}} jupyterlab-slideshow={\"layer\": \"slide\"} -->\n> **Note**\n> \n> `slide` layer with a `top` of `30%`\n<!-- #endregion -->\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/jupytext_replication.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: SoS\n    language: sos\n    name: sos\n---\n\n<!-- #region Collapsed=\"false\" kernel=\"SoS\" -->\n# Text SOS-kernel with Jupytext\n\n## What is SOS kernel\n\nSoS consists of a ployglot notebook that allows the use of multiple kernels in one Jupyter notebook, and a workflow system that is designed for daily computational research. Basically,\n\n- SoS Polyglot Notebook is a Jupyter Notebook with a SoS kernel.\n- SoS Notebook serves as a super kernel to all other Jupyter kernels and allows the use of multiple kernels in one Jupyter notebook.\n- SoS Workflow System is a Python based workflow system that is designed to be readable, shareable, and suitable for daily data analysis.\n- SoS Workflow System can be used from command line or use SoS Notebook as its IDE.\n\n![](https://vatlab.github.io/sos-docs/doc/media/SoS_Notebook_and_Workflow.png)\n\n### How to install SOS-kernel\n\nPlease follow this [link](https://vatlab.github.io/sos-docs/running.html#Conda-installation) to setup SOS\n\nI run some issue with the latest version of R on my Mac, so I had to install an earlier version of R\n\n```\nconda install -c r r=3.5.1\nconda install sos-notebook jupyterlab-sos sos-papermill -c conda-forge\n```\n\n## Related issue with Jupytext\n\nJupytext works fine with Python/R kernel but converts code cells into markdown cells when using the SOS kernel.\n\ncf the image below. It is a code cell. After saving the notebook and restart it, it converted the code cell into markdown\n\n<img width=\"734\" alt=\"Screenshot 2020-03-13 at 10 51 18\" src=\"https://user-images.githubusercontent.com/33351426/76610049-9e704600-6518-11ea-861e-b4f691d1a478.png\">\n<!-- #endregion -->\n\n<!-- #region Collapsed=\"false\" kernel=\"SoS\" -->\n## Step 1\n\nPlease, choose SOS Kernel and then, in the cell code, choose SOS (or any other kernel available), the outcome is the same.\n\n![](https://drive.google.com/uc?export=view&id=1OtyxfwoRyVK23XHnmd9JR-crBgHBL5mt)\n<!-- #endregion -->\n\n```{sos Collapsed=\"false\", kernel=\"SoS\"}\nimport pandas as pd \nimport numpy as np\n\npd.DataFrame({\n    'x': np.random.random(10),\n    'y': np.random.random(10),\n})\n```\n\n<!-- #region Collapsed=\"false\" kernel=\"python3\" -->\n## Step 2\n\nNow, pair it with Jupytex\n\n![](https://drive.google.com/uc?export=view&id=1Wtx-YPAXY8HWHqzCcy4iIgHpzt_9emEn)\n<!-- #endregion -->\n\n<!-- #region Collapsed=\"false\" kernel=\"python3\" -->\n### Step 3\n\nSave the notebook, restart and clear all, **save**, then Shut down kernel. Close the notebook and reopen\n<!-- #endregion -->\n\n<!-- #region Collapsed=\"false\" kernel=\"python3\" -->\n### Step 4\n\nReopen the notebook. Here is the outcome\n\n![](https://drive.google.com/uc?export=view&id=12C70unbSPv0gHCZaCICEUy7kO7wM93JH)\n\n\n<!-- #endregion -->\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/kalman_filter_and_visualization.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Q 3.5\n    language: q\n    name: qpk\n---\n\n```{q}\nplt: .p.import`matplotlib.pyplot\n```\n\n```{q}\nfilter: {\n    t: ([] x: `float $ x; xh: `float $ x; p: (count x) # R: var x);\n    (first t), iterate[R; R]\\[first t; 1 _ t] \n    }\n\niterate: {[Q; R; x; y]\n    x[`p]+: Q;\n    k: x[`p] % R + x[`p];\n    `x`xh`p ! (y[`x]; x[`xh] + k * y[`x] - x[`xh]; (1 - k) * x[`p])\n    }\n```\n\n```{q}\nprice: 100 + sums 0.5 - (n:50)?1.\n```\n\n```{q}\noutput:filter price\n```\n\n```{q}\nplt[`:plot][til n; output`x; `label pykw \"price\"];\nplt[`:plot][til n; output`xh;`label pykw \"forecast\"];\nplt[`:legend][];\nplt[`:show][];\n```\n\n```{q}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/logtalk_notebook.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Logtalk\n    language: logtalk\n    name: logtalk_kernel\n---\n\n# An implementation of the Ackermann function\n\n```{logtalk vscode={'languageId': 'logtalk'}}\n%%load ack.lgt\n\n:- object(ack).\n\n:- info([\n\tversion is 1:0:0,\n\tauthor is 'Paulo Moura',\n\tdate is 2008-3-31,\n\tcomment is 'Ackermann function (general recursive function).'\n]).\n\n:- public(ack/3).\n:- mode(ack(+integer, +integer, -integer), one).\n:- info(ack/3, [\n\tcomment is 'Ackermann function.',\n\targnames is ['M', 'N', 'V']\n]).\n\nack(0, N, V) :-\n\t!,\n\tV is N + 1.\nack(M, 0, V) :-\n\t!,\n\tM2 is M - 1,\n\tack(M2, 1, V).\nack(M, N, V) :-\n\tM2 is M - 1,\n\tN2 is N - 1,\n\tack(M, N2, V2),\n\tack(M2, V2, V).\n\n:- end_object.\n```\n\n## Sample query\n\n```{logtalk vscode={'languageId': 'logtalk'}}\nack::ack(2, 4, V).\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/lua_example.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Lua\n    language: lua\n    name: lua\n---\n\nSource: https://www.lua.org/pil/19.3.html\n\n\n# Sort\n\n\nAnother useful function on arrays is table.sort, which we have seen before. It receives the array to be sorted, plus an optional order function. This order function receives two arguments and must return true if the first argument should come first in the sorted array. If this function is not provided, sort uses the default less-than operation (corresponding to the `<´ operator).\n\n\nA common mistake is to try to order the indices of a table. In a table, the indices form a set, and have no order whatsoever. If you want to order them, you have to copy them to an array and then sort the array. Let us see an example. Suppose that you read a source file and build a table that gives, for each function name, the line where that function is defined; something like this:\n\n```{lua}\nlines = {\n    luaH_set = 10,\n    luaH_get = 24,\n    luaH_present = 48,\n}\n```\n\n Now you want to print these function names in alphabetical order. If you traverse this table with pairs, the names appear in an arbitrary order. However, you cannot sort them directly, because these names are keys of the table. However, when you put these names into an array, then you can sort them. First, you must create an array with those names, then sort it, and finally print the result:\n\n```{lua}\na = {}\nfor n in pairs(lines) do table.insert(a, n) end\ntable.sort(a)\nfor i,n in ipairs(a) do print(n) end\n```\n\nNote that, for Lua, arrays also have no order. But we know how to count, so we get ordered values as long as we access the array with ordered indices. That is why you should always traverse arrays with ipairs, rather than pairs. The first imposes the key order 1, 2, ..., whereas the latter uses the natural arbitrary order of the table.\n\n\nAs a more advanced solution, we can write an iterator that traverses a table following the order of its keys. An optional parameter f allows the specification of an alternative order. It first sorts the keys into an array, and then iterates on the array. At each step, it returns the key and value from the original table:\n\n```{lua}\nfunction pairsByKeys (t, f)\n    local a = {}\n    for n in pairs(t) do table.insert(a, n) end\n    table.sort(a, f)\n    local i = 0               -- iterator variable\n    local iter = function ()  -- iterator function\n        i = i + 1\n        if a[i] == nil then return nil\n        else return a[i], t[a[i]]\n        end\n    end\n    return iter\nend\n```\n\n With this function, it is easy to print those function names in alphabetical order. The loop\n\n```{lua}\nfor name, line in pairsByKeys(lines) do\n    print(name, line)\nend\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/maxima_example.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Maxima\n    language: maxima\n    name: maxima\n---\n\n## maxima misc\n\n```{maxima}\nkill(all)$\n```\n\n```{maxima}\nf(x) := 1/(x^2+l^2)^(3/2);\n```\n\n```{maxima}\nintegrate(f(x), x);\n```\n\n```{maxima}\ntex(%)$\n```\n\n```{maxima}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/notebook_with_complex_metadata.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/nteract_with_parameter.Rmd",
    "content": "---\njupyter:\n  kernel_info:\n    name: python3\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python inputHidden=FALSE, outputHidden=FALSE, tags=c(\"parameters\")}\nparam = 4\n```\n\n```{python inputHidden=FALSE, outputHidden=FALSE}\nimport pandas as pd\n```\n\n```{python inputHidden=FALSE, outputHidden=FALSE}\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n```\n\n```{python inputHidden=FALSE, outputHidden=FALSE}\n# %matplotlib inline\ndf.plot(kind='bar')\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/ocaml_notebook.Rmd",
    "content": "---\njupyter:\n  jupytext:\n    formats: ipynb:markdown,md\n  kernelspec:\n    display_name: OCaml default\n    language: OCaml\n    name: ocaml-jupyter\n---\n\n# Example of an OCaml notebook\n\n```{ocaml}\nlet sum x y = x + y\n```\n\nLet's try our function:\n\n```{ocaml}\nsum 3 4 = 7 + 0\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/octave_notebook.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Octave\n    language: octave\n    name: octave\n---\n\nA markdown cell\n\n```{octave}\n1 + 1\n```\n\n```{octave}\n% a code cell with comments\n2 + 2\n```\n\n```{octave}\n% a simple plot\nx = -10:0.1:10;\nplot (x, sin (x));\n```\n\n```{octave}\n%plot -w 800\n% a simple plot with a magic instruction\nx = -10:0.1:10;\nplot (x, sin (x));\n```\n\nAnd to finish with, a Python cell\n\n```{python}\na = 1\n```\n\n```{python}\na + 1\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/plotly_graphs.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\nThis notebook contains complex outputs, including plotly javascript graphs.\n\n\n# Interactive plots\n\n\nWe use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n\n```{python}\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n```\n\n```{python}\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/powershell.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: PowerShell\n    language: PowerShell\n    name: powershell\n---\n\nThis is an extract from\nhttps://github.com/Jaykul/Jupyter-PowerShell/blob/master/LiterateDevOps.ipynb\n\n```{powershell}\n$imageUrl = 'https://upload.wikimedia.org/wikipedia/commons/2/2f/PowerShell_5.0_icon.png'\n$ImageData = @{ \"png\" = (Invoke-WebRequest $imageUrl -UseBasicParsing).RawContentStream.GetBuffer() }\n# $ImageData\n\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 32 } }\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 64 } }\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/raw_cell_with_complex_yaml_like_content.Rmd",
    "content": "---\n\nThis is a complex paragraph\nthat is split over multiple lines.\n\nIt also includes blank lines.\n\n\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\nprint(\"Hello, World!\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/raw_cell_with_non_dict_yaml_content.Rmd",
    "content": "---\nContent.\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```{python}\nprint(\"Hello, World!\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/root_cpp.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: ROOT C++\n    language: c++\n    name: root\n---\n\n```{c++}\n#include <iostream>\n#include <string>\n```\n\n```{c++}\nint k = 4;\nstd::string foo = \"This string says \\\"foo\\\"\";\n```\n\n```{c++}\nstd::cout << \"k = \" << k << '\\n' << foo << '\\n';\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/sage_print_hello.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: SageMath 9.2\n    language: sage\n    name: sagemath\n---\n\n```{sage}\nprint(\"Hello world\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/sample_bash_notebook.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Bash\n    language: bash\n    name: bash\n---\n\n```{bash}\nls\n```\n\n```{bash}\n# https://coderwall.com/p/euwpig/a-better-git-log\ngit config --global alias.lg \"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\"\n```\n\n```{bash}\ngit lg\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/sample_rise_notebook_66.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n<!-- #region slideshow={\"slide_type\": \"slide\"} -->\nA markdown cell\n<!-- #endregion -->\n\n```{python slideshow={'slide_type': ''}}\n1+1\n```\n\n<!-- #region cell_style=\"center\" slideshow={\"slide_type\": \"fragment\"} -->\nMarkdown cell two\n<!-- #endregion -->\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/sas.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: SAS\n    language: sas\n    name: sas\n---\n\n# SAS Notebooks with jupytext\n\n```{sas}\nproc sql;\n    select *\n    from sashelp.cars (obs=10)\n    ;\nquit; \n```\n\n```{sas}\n%let name = \"Jupytext\";\n```\n\n```{sas}\n%put &name;\n```\n\n```{sas}\n/* Note when defining macros \"%macro\" cannot be the first line of text in the cell */\n%macro test;\n    data temp;\n        set sashelp.cars;\n        name = \"testx\";\n    run; \n    proc print data = temp (obs=10);\n    run; \n%mend test;\n\n%test\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/simple-helloworld.Rmd",
    "content": "---\njupyter:\n  jupytext:\n    encoding: '// -*- coding: utf-8 -*-'\n    formats: ipynb,java:light\n  kernelspec:\n    display_name: Java\n    language: java\n    name: java\n---\n\nLet's define some class.\n\n```{java}\nclass A {\n    public void hello() {\n        System.out.println(\"Hello World\");\n    }   \n}\n```\n\nAnd now we call its method.\n\n```{java}\nnew A().hello();\n```\n\nYou can run it e.g. with `jshell`\n\n* from command line, as `jshell simple-helloworld.java`\n* from jshell's shell with `/open simple-helloworld.java`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/simple_robot_notebook.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Robot Framework\n    language: robotframework\n    name: robotkernel\n---\n\n```{robotframework}\n*** Settings ***\n\nLibrary  Collections\n```\n\n```{robotframework}\n*** Keywords ***\n\nHead\n    [Arguments]  ${list}\n    ${value}=  Get from list  ${list}  0\n    [Return]  ${value}\n```\n\n```{robotframework}\n*** Tasks ***\n\nGet head\n    ${array}=  Create list  1  2  3  4  5\n    ${head}=  Head  ${array}\n    Should be equal  ${head}  1\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/simple_scala_notebook.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Apache Toree - Scala\n    language: scala\n    name: apache_toree_scala\n---\n\n```{scala}\n// This is just a simple scala notebook\n\nobject SampleObject {\n    def calculation(x: Int, y: Int): Int = x + y\n}\n\nval result = SampleObject.calculation(1, 2)\n```\n\n```{scala}\nprintln(result * 10)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/stata_notebook.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Stata\n    language: stata\n    name: stata\n---\n\n```{stata}\n// This notebook uses the stata_kernel: https://github.com/kylebarron/stata_kernel\n```\n\n```{stata}\nuse http://www.stata-press.com/data/r13/auto\n```\n\n```{stata}\nsummarize\n```\n\n```{stata}\nscatter weight length\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/tailrecursive-factorial.Rmd",
    "content": "---\njupyter:\n  jupytext:\n    encoding: '// -*- coding: utf-8 -*-'\n    formats: ipynb,groovy:light\n  kernelspec:\n    display_name: Groovy\n    language: groovy\n    name: groovy\n---\n\n# TailRecursive annotation\n\nLet's check what is the effect of `@TailRecursive` annotation on the simple recursive definition of factorial function.\n\n```{groovy}\nimport groovy.transform.CompileStatic\nimport groovy.transform.TailRecursive\nimport groovy.transform.TypeChecked\n\n@CompileStatic\n@TypeChecked\nclass X {\n    static final BigInteger factorial0(int n) {\n        (n <= 1) ? 1G : factorial0(n-1).multiply(BigInteger.valueOf(n))\n    }\n\n    static final BigInteger factorial1(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial1(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n\n    @TailRecursive\n    static final BigInteger factorial2(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial2(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n}\n\nx = new X()\n```\n\nAlthough we can time the execution of the calls, it is not very accurate; such micro benchmarks should be performed in more controlled environment, such us under [JMH](https://openjdk.java.net/projects/code-tools/jmh/).\n\nFor example, see [blog posts of Szymon Stępniak](https://e.printstacktrace.blog/tail-recursive-methods-in-groovy/).\n\n```{groovy}\n// %%timeit\n\nx.factorial0(19_000).toString().length()\n```\n\n```{groovy}\n// %%timeit\n\nx.factorial1(19_000).toString().length()\n```\n\n```{groovy}\n// %%timeit\n\nx.factorial2(19_000).toString().length()\n```\n\nThe real difference is the use of stack. Non-tail recursive calls exhaust the stack space at some point, whereas tail recursive calls don't add frames to the stack.\n\n```{groovy}\nfactSize = { n, cl ->\n    println \"Factorial of ${n} has ${cl(n).toString().length()} digits\"\n}\n\nfactSize 2_000, x.&factorial0\nfactSize 2_000, x.&factorial1\nfactSize 2_000, x.&factorial2\n\nfactSize 100_000, x.&factorial2\n```\n\n```{groovy}\ntry {\n    factSize 100_000, x.&factorial1\n} catch (Throwable e) {\n    assert e instanceof StackOverflowError\n    println e\n}\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/tcl_test.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Tcl\n    language: tcl\n    name: tcljupyter\n---\n\n# Assign Values\n\n```{tcl}\nset a 1\nputs \"a = $a\"\n```\n\n# Loop\n\n```{tcl}\nfor {set i 0} {$i < 10} {incr i} {\n    puts \"I inside first loop: $i\"\n}\n```\n\n```{tcl}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/text_outputs_and_images.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\nThis notebook contains outputs of many different types: text, HTML, plots and errors.\n\n\n# Text outputs\n\nUsing `print`, `sys.stdout` and `sys.stderr`\n\n```{python}\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n```\n\n```{python}\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n```\n\n# HTML outputs\n\nUsing `pandas`. Here we find two representations: both text and HTML.\n\n```{python}\nimport pandas as pd\npd.DataFrame([4])\n```\n\n```{python}\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n```\n\n# Images\n\n```{python}\n# %matplotlib inline\n```\n\n```{python}\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n```\n\n# Errors\n\n```{python}\nundefined_variable\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/wolfram.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Wolfram Language 13.1\n    language: Wolfram Language\n    name: wolframlanguage13.1\n---\n\n**Note:** The `language_info` `file_extension` in this notebook should be `.m`, but it was deliberately changed to `.wolfram` to avoid conflicts with Matlab which is using the same extension.\n\n\nWe start with...\n\n```{wolfram language}\nPrint[\"Hello, World!\"];\n```\n\nThen we draw the first example plot from the [ListPlot](https://reference.wolfram.com/language/ref/ListPlot.html) reference:\n\n```{wolfram language}\nListPlot[Prime[Range[25]]]\n```\n\nWe also test the math outputs as in the [Simplify](https://reference.wolfram.com/language/ref/Simplify.html) example:\n\n```{wolfram language}\nD[Integrate[1/(x^3 + 1), x], x]\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/xcpp_by_quantstack.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: C++14\n    language: C++14\n    name: xeus-cling-cpp14\n---\n\n[![xeus-cling](images/xeus-cling.png)](https://github.com/QuantStack/xeus-cling/)\n\nA Jupyter kernel for C++ based on the `cling` C++ interpreter and the `xeus` native implementation of the Jupyter protocol, xeus.\n\n- GitHub repository: https://github.com/QuantStack/xeus-cling/\n- Online documentation: https://xeus-cling.readthedocs.io/\n\n\n## Usage\n\n<div style=\"background: #efffed;\n            border: 1px solid grey;\n            margin: 8px 0 8px 0;\n            text-align: center;\n            padding: 8px; \">\n    <i class=\"fa-play fa\" \n       style=\"font-size: 40px;\n              line-height: 40px;\n              margin: 8px;\n              color: #444;\">\n    </i>\n    <div>\n    To run the selected code cell, hit <pre style=\"background: #efffed\">Shift + Enter</pre>\n    </div>\n</div>\n\n\n## Output and error streams\n\n`std::cout` and `std::cerr` are redirected to the notebook frontend.\n\n```{c++}\n#include <iostream>\n\nstd::cout << \"some output\" << std::endl;\n```\n\n```{c++}\nstd::cerr << \"some error\" << std::endl;\n```\n\n```{c++}\n#include <stdexcept>\n```\n\n```{c++}\nthrow std::runtime_error(\"Unknown exception\");\n```\n\nOmitting the `;` in the last statement of a cell results in an output being printed\n\n```{c++}\nint j = 5;\n```\n\n```{c++}\nj\n```\n\n# Interpreting the C++ programming language\n\n`cling` has a broad support of the features of C++. You can define functions, classes, templates, etc ...\n\n\n## Functions\n\n```{c++}\ndouble sqr(double a)\n{\n    return a * a;\n}\n```\n\n```{c++}\ndouble a = 2.5;\ndouble asqr = sqr(a);\nasqr\n```\n\n## Classes\n\n```{c++}\nclass Foo\n{\npublic:\n\n    virtual ~Foo() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Foo value = \" << value << std::endl;\n    }\n};\n```\n\n```{c++}\nFoo bar;\nbar.print(1.2);\n```\n\n## Polymorphism\n\n```{c++}\nclass Bar : public Foo\n{\npublic:\n\n    virtual ~Bar() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Bar value = \" << 2 * value << std::endl;\n    }\n};\n```\n\n```{c++}\nFoo* bar2 = new Bar;\nbar2->print(1.2);\ndelete bar2;\n```\n\n## Templates\n\n```{c++}\n#include <typeinfo>\n\ntemplate <class T>\nclass FooT\n{\npublic:\n    \n    explicit FooT(const T& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << typeid(T).name() << \" m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    T m_t;\n};\n\ntemplate <>\nclass FooT<int>\n{\npublic:\n    \n    explicit FooT(const int& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << \"m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    int m_t;\n};\n```\n\n```{c++}\nFooT<double> foot1(1.2);\nfoot1.print();\n```\n\n```{c++}\nFooT<int> foot2(4);\nfoot2.print();\n```\n\n## C++11 / C++14 support\n\n```{c++}\nclass Foo11\n{\npublic:\n    \n    Foo11() { std::cout << \"Foo11 default constructor\" << std::endl; }\n    Foo11(const Foo11&) { std::cout << \"Foo11 copy constructor\" << std::endl; }\n    Foo11(Foo11&&) { std::cout << \"Foo11 move constructor\" << std::endl; }\n};\n```\n\n```{c++}\nFoo11 f1;\nFoo11 f2(f1);\nFoo11 f3(std::move(f1));\n```\n\n```{c++}\n#include <vector>\n\nstd::vector<int> v = { 1, 2, 3};\nauto iter = ++v.begin();\nv\n```\n\n```{c++}\n*iter\n```\n\n... and also lambda, universal references, `decltype`, etc ...\n\n\n## Documentation and completion\n\n - Documentation for types of the standard library is retrieved on cppreference.com.\n - The quick-help feature can also be enabled for user-defined types and third-party libraries. More documentation on this feature is available at https://xeus-cling.readthedocs.io/en/latest/inline_help.html.\n\n\n```{c++}\n?std::vector\n```\n\n## Using the `display_data` mechanism\n\n\nFor a user-defined type `T`, the rich rendering in the notebook and JupyterLab can be enabled by by implementing the function `xeus::xjson mime_bundle_repr(const T& im)`, which returns the JSON mime bundle for that type.\n\nMore documentation on the rich display system of Jupyter and Xeus-cling is available at https://xeus-cling.readthedocs.io/en/latest/rich_display.html\n\n\n### Image example\n\n```{c++}\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace im\n{\n    struct image\n    {   \n        inline image(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const image& i)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"image/png\"] = xtl::base64encode(i.m_buffer.str());\n        return bundle;\n    }\n}\n```\n\n```{c++}\nim::image marie(\"images/marie.png\");\nmarie\n```\n\n### Audio example\n\n```{c++}\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace au\n{\n    struct audio\n    {   \n        inline audio(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const audio& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] =\n           std::string(\"<audio controls=\\\"controls\\\"><source src=\\\"data:audio/wav;base64,\")\n           + xtl::base64encode(a.m_buffer.str()) +\n            \"\\\" type=\\\"audio/wav\\\" /></audio>\";\n        return bundle;\n    }\n}\n```\n\n```{c++}\nau::audio drums(\"audio/audio.wav\");\ndrums\n```\n\n### Display\n\n```{c++}\n#include \"xcpp/xdisplay.hpp\"\n```\n\n```{c++}\nxcpp::display(drums);\n```\n\n### Update-display\n\n```{c++}\n#include <string>\n#include \"xcpp/xdisplay.hpp\"\n\nnamespace ht\n{\n    struct html\n    {   \n        inline html(const std::string& content)\n        {\n            m_content = content;\n        }\n        std::string m_content;\n    };\n\n    xeus::xjson mime_bundle_repr(const html& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] = a.m_content;\n        return bundle;\n    }\n}\n\n// A red rectangle\nht::html rect(R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: blue;\n    color: white;\n    text-align: center;'>\nOriginal\n</div>)\");\n```\n\n```{c++}\nxcpp::display(rect, \"some_display_id\");\n```\n\n```{c++}\n// Update the rectangle to be blue\nrect.m_content = R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: red;\n    color: white;\n    text-align: center;'>\nUpdated\n</div>)\";\n\nxcpp::display(rect, \"some_display_id\", true);\n```\n\n## Magics\n\nMagics are special commands for the kernel that are not part of the C++ language.\n\nThey are defined with the symbol `%` for a line magic and `%%` for a cell magic.\n\nMore documentation for magics is available at https://xeus-cling.readthedocs.io/en/latest/magics.html.\n\n```{c++}\n#include <algorithm>\n#include <vector>\n```\n\n```{c++}\nstd::vector<double> to_shuffle = {1, 2, 3, 4};\n```\n\n```{c++}\n// %timeit std::random_shuffle(to_shuffle.begin(), to_shuffle.end());\n```\n\n[![xtensor](images/xtensor.png)](https://github.com/QuantStack/xtensor/)\n\n- GitHub repository: https://github.com/QuantStack/xtensor/\n- Online documentation: https://xtensor.readthedocs.io/\n- NumPy to xtensor cheat sheet: http://xtensor.readthedocs.io/en/latest/numpy.html\n\n`xtensor` is a C++ library for manipulating N-D arrays with an API very similar to that of numpy.\n\n```{c++}\n#include <iostream>\n\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n#include \"xtensor/xview.hpp\"\n\nxt::xarray<double> arr1\n  {{1.0, 2.0, 3.0},\n   {2.0, 5.0, 7.0},\n   {2.0, 5.0, 7.0}};\n\nxt::xarray<double> arr2\n  {5.0, 6.0, 7.0};\n\nxt::view(arr1, 1) + arr2\n```\n\nTogether with the C++ Jupyter kernel, `xtensor` offers a similar experience as `NumPy` in the Python Jupyter kernel, including broadcasting and universal functions.\n\n```{c++}\n#include <iostream>\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n```\n\n```{c++}\nxt::xarray<int> arr\n  {1, 2, 3, 4, 5, 6, 7, 8, 9};\n\narr.reshape({3, 3});\n\nstd::cout << arr;\n```\n\n```{c++}\n#include \"xtensor-blas/xlinalg.hpp\"\n```\n\n```{c++}\nxt::xtensor<double, 2> m = {{1.5, 0.5}, {0.7, 1.0}};\nstd::cout << \"Matrix rank: \" << std::endl << xt::linalg::matrix_rank(m) << std::endl;\nstd::cout << \"Matrix inverse: \" << std::endl << xt::linalg::inv(m) << std::endl;\nstd::cout << \"Eigen values: \" << std::endl << xt::linalg::eigvals(m) << std::endl;\n```\n\n```{c++}\nxt::xarray<double> arg1 = xt::arange<double>(9);\nxt::xarray<double> arg2 = xt::arange<double>(18);\n\narg1.reshape({3, 3});\narg2.reshape({2, 3, 3});\n\nstd::cout << xt::linalg::dot(arg1, arg2) << std::endl;\n```\n\n```{c++}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_Rmd/xonsh_example.Rmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Xonsh\n    language: xonsh\n    name: xonsh\n---\n\n```{xonsh}\nlen($(curl -L https://xon.sh))\n```\n\n```{xonsh}\nfor filename in `.*`:\n    print(filename)\n    du -sh @(filename)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/Line_breaks_in_LateX_305.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# This cell uses no particular cell marker\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x)\\\\\n# \\dot{y} & = \\rho x - y - xz \\\\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# %% [markdown]\n# This cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x) \\\n# \\dot{y} & = \\rho x - y - xz \\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# %% [markdown]\n'''\nThis cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n'''\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/Notebook with function and cell metadata 164.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n1 + 1\n\n\n# %% [markdown]\n# A markdown cell\n# And below, the cell for function f has non trivial cell metadata. And the next cell as well.\n\n# %% attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\ndef f(x):\n    return x\n\n\n# %% attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\nf(5)\n\n# %% [markdown]\n# More text\n\n# %%\n2 + 2\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/Notebook with html and latex cells.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n%%html\n<p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>\n\n# %%\n%%latex\n$\\frac{\\pi}{2}$\n\n# %%\n%load_ext rpy2.ipython\n\n# %%\n%%R\nlibrary(ggplot2)\nggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\n\n# %%\n%matplotlib inline\nimport pandas as pd\npd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/Notebook with many hash signs.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# ##################################################################\n# This is a notebook that contains many hash signs.\n# Hopefully its python representation is not recognized as a Sphinx Gallery script...\n# ##################################################################\n\n# %%\nsome = 1\ncode = 2\nsome+code\n\n##################################################################\n# A comment\n##################################################################\n# Another comment\n\n# %% [markdown]\n# ##################################################################\n# This is a notebook that contains many hash signs.\n# Hopefully its python representation is not recognized as a Sphinx Gallery script...\n# ##################################################################\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/Notebook with metadata and long cells.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# # Part one - various cells\n\n# %% [markdown]\n# Here we have a markdown cell\n#\n#\n# with two blank lines\n\n# %% [markdown]\n# Now we have a markdown cell\n# with a code block inside it\n#\n# ```python\n# 1 + 1\n# ```\n#\n# After that cell we'll have a code cell\n\n# %%\n2 + 2\n\n\n3 + 3\n\n# %% [markdown]\n# Followed by a raw cell\n\n# %% [raw]\n# This is \n# the content\n# of the raw cell\n\n# %% [markdown]\n# # Part two - cell metadata\n\n# %% [markdown] key=\"value\"\n# This is a markdown cell with cell metadata `{\"key\": \"value\"}`\n\n# %% .class tags=[\"parameters\"]\n\"\"\"This is a code cell with metadata `{\"tags\":[\"parameters\"], \".class\":null}`\"\"\"\n\n# %% [raw] key=\"value\"\n# This is a raw cell with cell metadata `{\"key\": \"value\"}`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/Notebook_with_R_magic.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 2\n#     language: python\n#     name: python2\n# ---\n\n# %% [markdown]\n# # A notebook with R cells\n#\n# This notebook shows the use of R cells to generate plots\n\n# %%\n%load_ext rpy2.ipython\n\n# %%\n%%R\nsuppressMessages(require(tidyverse))\n\n# %%\n%%R\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n\n# %% [markdown]\n# The default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\n\n# %%\n%%R -w 400 -h 240\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/Notebook_with_more_R_magic_111.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n%load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n\n# %%\n%%R -i df\nlibrary(\"ggplot2\")\nggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/R notebook with invalid cell keys.R",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# %% [markdown]\n# This notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\n# %%\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/Reference Guide for Calysto Scheme.ss",
    "content": ";; -*- coding: utf-8 -*-\n;; ---\n;; jupyter:\n;;   kernelspec:\n;;     display_name: Calysto Scheme (Python)\n;;     language: scheme\n;;     name: calysto_scheme\n;; ---\n\n;; %% [markdown]\n;; <img src=\"images/logo-64x64.png\"/>\n;; <h1>Reference Guide for Calysto Scheme</h1>\n;;\n;; [Calysto Scheme](https://github.com/Calysto/calysto_scheme) is a real Scheme programming language, with full support for continuations, including call/cc. It can also use all Python libraries. Also has some extensions that make it more useful (stepper-debugger, choose/fail, stack traces), or make it better integrated with Python.\n;;\n;; In Jupyter notebooks, because Calysto Scheme uses [MetaKernel](https://github.com/Calysto/metakernel/blob/master/README.rst), it has a fully-supported set of \"magics\"---meta-commands for additional functionality. This includes running Scheme in parallel. See all of the [MetaKernel Magics](https://github.com/Calysto/metakernel/blob/master/metakernel/magics/README.md).\n;;\n;; Calysto Scheme is written in Scheme, and then translated into Python (and other backends). The entire functionality lies in a single Python file: https://github.com/Calysto/calysto_scheme/blob/master/calysto_scheme/scheme.py However, you can easily install it (see below).\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n;;\n;; ## Installation\n;;\n;; You can install Calysto Scheme with Python3:\n;;\n;; ```\n;; pip3 install --upgrade calysto-scheme --user -U\n;; python3 -m calysto_kernel install --user\n;; ```\n;;\n;; or in the system kernel folder with:\n;;\n;; ```\n;; sudo pip3 install --upgrade calysto-scheme -U\n;; sudo python3 -m calysto_kernel install\n;; ```\n;;\n;; Change pip3/python3 to use a different pip or Python. The version of Python used will determine how Calysto Scheme is run.\n;;\n;; Use it in the console, qtconsole, or notebook with IPython 3:\n;;\n;; ```\n;; ipython console --kernel calysto_scheme\n;; ipython qtconsole --kernel calysto_scheme\n;; ipython notebook --kernel calysto_scheme\n;; ```\n;;\n;; In addition to all of the following items, Calysto Scheme also has access to all of Python's builtin functions, and all of Python's libraries. For example, you can use `(complex 3 2)` to create a complex number by calling Python's complex function.\n;;\n;; ## Jupyter Enhancements\n;;\n;; When you run Calysto Scheme in Jupyter (console, notebook, qtconsole, etc.) you get:\n;;\n;; * TAB completions of Scheme functions and variable names\n;; * display of rich media\n;; * stepper/debugger\n;; * magics (% macros)\n;; * shell commands (! command)\n;; * LaTeX equations\n;; * LaTeX-style variables\n;; * Python integration\n\n;; %% [markdown]\n;; ### LaTeX-style variables\n;;\n;; Calysto Scheme allows you to use LaTeX-style variables in code. For example, if you type:\n;;\n;; ```\n;; \\beta\n;; ```\n;;\n;; with the cursor right after the 'a' in beta, and then press TAB, it will turn into the unicode character:\n;;\n;; ```\n;; β\n;; ```\n;;\n;; There are nearly 1300 different symbols defined (thanks to the Julia language) and documented here:\n;;\n;; http://docs.julialang.org/en/release-0.4/manual/unicode-input/#man-unicode-input\n;;\n;; Calysto Scheme may not implement all of those. Some useful and suggestive ones:\n;;\n;; * \\pi - π\n;; * \\Pi - Π\n;; * \\Sigma - Σ\n;; * \\_i - subscript i, such as vectorᵢ\n\n;; %%\n(define α 67)\n\n;; %%\nα\n\n;; %%\n(define i 2)\n(define vectorᵢ (vector-ref (vector 0 6 3 2) i))\nvectorᵢ\n\n;; %% [markdown]\n;; ### Rich media\n\n;; %%\n(import \"calysto.display\")\n\n;; %%\n(calysto.display.HTML \"This is <b>bold</b>, <i>italics</i>, <u>underlined</u>.\")\n\n;; %%\n(import \"calysto.graphics\")\n\n;; %%\n(define canvas (calysto.graphics.Canvas))\n\n;; %%\n(define ball (calysto.graphics.Circle '(150 150) 100))\n\n;; %%\n(ball.draw canvas)\n\n;; %% [markdown]\n;; ### Shell commands\n\n;; %%\n! ls /tmp\n\n;; %% [markdown]\n;; ### Stepper/Debugger\n;;\n;; Here is what the debugger looks like:\n;;\n;; <img src=\"images/stepper_debugger.png\">\n;;\n;; It has breakpoints (click in left margin). You must press Stop to exit the debugger.\n\n;; %% [markdown]\n;; ```scheme\n;; %%debug\n;;\n;; (begin\n;;  (define x 1)\n;;  (set! x 2)\n;; )\n;; ```\n\n;; %% [markdown]\n;; ### Python Integration\n;;\n;; You can import and use any Python library in Calysto Scheme.\n;;\n;; In addition, if you wish, you can execute expressions and statements in a Python environment:\n\n;; %%\n(python-eval \"1 + 2\")\n\n;; %%\n(python-exec \n\"\ndef mypyfunc(a, b):\n    return a * b\n\")\n\n;; %% [markdown]\n;; This is a shared environment with Scheme:\n\n;; %%\n(mypyfunc 4 5)\n\n;; %% [markdown]\n;; You can use `func` to turn a Scheme procedure into a Python function, and `define!` to put it into the shared environment with Python:\n\n;; %%\n(define! mypyfunc2 (func (lambda (n) n)))\n\n;; %%\n(python-eval \"mypyfunc2(34)\")\n\n;; %% [markdown]\n;; # Differences Between Languages\n;;\n;; ## Major differences between Scheme and Python\n;;\n;; 1. In Scheme, double quotes are used for strings and may contain newlines\n;; 1. In Scheme, a single quote is short for (quote ...) and means \"literal\"\n;; 1. In Scheme, everything is an expression and has a return value\n;; 1. Python does not support macros (e.g., extending syntax)\n;; 1. In Python, \"if X\" is false if X is None, False, [], (,) or 0. In Scheme, \"if X\" is only false if X is #f or 0\n;; 1. Calysto Scheme uses continuations, not the call stack. However, for debugging there is a pseudo-stack when an error is raised. You can turn that off with (use-stack-trace #f)\n;; 1. Scheme procedures are not Python functions, but there are means to use one as the other.\n;;\n;; ## Major Differences Between Calysto Scheme and other Schemes\n;;\n;; 1. define-syntax works slightly differently\n;; 1. In Calysto Scheme, #(...) is short for '#(...)\n;; 1. Calysto Scheme is missing many standard functions (see list at bottom)\n;; 1. Calysto Scheme has a built-in amb operator called `choose`\n;; 1. For debugging there is a pseudo-stack when errors are raised in Calysto Scheme. You can turn that off with (use-stack-trace #f)\n;;\n;; ### Stack Trace\n;;\n;; Calysto Scheme acts as if it has a call stack, for easier debugging. For example:\n\n;; %%\n(define fact\n    (lambda (n)\n      (if (= n 1)\n           q\n           (* n (fact (- n 1))))))\n\n;; %%\n(fact 5)\n\n;; %% [markdown]\n;; To turn off the stack trace on error:\n;;\n;; ```scheme\n;; (use-stack-trace #f)\n;; ```\n;; That will allow infinite recursive loops without keeping track of the \"stack\".\n\n;; %% [markdown]\n;; # Calysto Scheme Variables\n;;\n;; ## SCHEMEPATH\n;; SCHEMEPATH is a list of search directories used with (load NAME). This is a reference, so you should append to it rather than attempting to redefine it.\n\n;; %%\nSCHEMEPATH\n\n;; %%\n(set-cdr! (cdr SCHEMEPATH) (list \"/var/modules\"))\n\n;; %%\nSCHEMEPATH\n\n;; %% [markdown]\n;; ## Getting Started\n;;\n;; Note that you can use the word `lambda` or \\lambda and then press [TAB]\n\n;; %%\n(define factorial\n  (λ (n)\n     (cond\n      ((zero? n) 1)\n      (else (* n (factorial (- n 1)))))))\n\n;; %%\n(factorial 5)\n\n;; %% [markdown]\n;; ## define-syntax\n;; (define-syntax NAME RULES): a method for creating macros\n\n;; %%\n(define-syntax time \n  [(time ?exp) (let ((start (current-time)))\n                 ?exp\n                 (- (current-time) start))])\n\n;; %%\n(time (car '(1 2 3 4)))\n\n;; %%\n;;---------------------------------------------------------------------\n;; collect is like list comprehension in Python\n\n(define-syntax collect\n  [(collect ?exp for ?var in ?list)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) #t) ?list)]\n  [(collect ?exp for ?var in ?list if ?condition)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) ?condition) ?list)])\n\n(define filter-map\n  (lambda (f pred? values)\n    (if (null? values)\n      '()\n      (if (pred? (car values))\n          (cons (f (car values)) (filter-map f pred? (cdr values)))\n          (filter-map f pred? (cdr values))))))\n\n;; %%\n(collect (* n n) for n in (range 10))\n\n;; %%\n(collect (* n n) for n in (range 5 20 3))\n\n;; %%\n(collect (* n n) for n in (range 10) if (> n 5))\n\n;; %%\n;;---------------------------------------------------------------------\n;; for loops\n\n(define-syntax for\n  [(for ?exp times do . ?bodies)\n   (for-repeat ?exp (lambda () . ?bodies))]\n  [(for ?var in ?exp do . ?bodies)\n   (for-iterate1 ?exp (lambda (?var) . ?bodies))]\n  [(for ?var at (?i) in ?exp do . ?bodies)\n   (for-iterate2 0 ?exp (lambda (?var ?i) . ?bodies))]\n  [(for ?var at (?i ?j . ?rest) in ?exp do . ?bodies)\n   (for ?var at (?i) in ?exp do\n     (for ?var at (?j . ?rest) in ?var do . ?bodies))])\n\n(define for-repeat\n  (lambda (n f)\n    (if (< n 1)\n      'done\n      (begin\n        (f)\n        (for-repeat (- n 1) f)))))\n\n(define for-iterate1\n  (lambda (values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values))\n        (for-iterate1 (cdr values) f)))))\n\n(define for-iterate2\n  (lambda (i values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values) i)\n        (for-iterate2 (+ i 1) (cdr values) f)))))\n\n;; %%\n(define matrix2d\n  '((10 20)\n    (30 40)\n    (50 60)\n    (70 80)))\n\n(define matrix3d\n  '(((10 20 30) (40 50 60))\n    ((70 80 90) (100 110 120))\n    ((130 140 150) (160 170 180))\n    ((190 200 210) (220 230 240))))\n\n;; %%\n(begin \n (define hello 0)\n (for 5 times do (set! hello (+ hello 1)))\n hello\n )\n\n;; %%\n(for sym in '(a b c d) do (define x 1) (set! x sym) (print x))\n\n;; %%\n(for n in (range 10 20 2) do (print n))\n\n;; %%\n(for n at (i j) in matrix2d do (print (list n 'coords: i j)))\n\n;; %%\n(for n at (i j k) in matrix3d do (print (list n 'coords: i j k)))\n\n;; %%\n(define-syntax scons\n  [(scons ?x ?y) (cons ?x (lambda () ?y))])\n\n(define scar car)\n\n(define scdr\n  (lambda (s)\n    (let ((result ((cdr s))))\n      (set-cdr! s (lambda () result))\n      result)))\n\n(define first\n  (lambda (n s)\n    (if (= n 0)\n      '()\n      (cons (scar s) (first (- n 1) (scdr s))))))\n\n(define nth\n  (lambda (n s)\n    (if (= n 0)\n      (scar s)\n      (nth (- n 1) (scdr s)))))\n\n(define smap\n  (lambda (f s)\n    (scons (f (scar s)) (smap f (scdr s)))))\n\n(define ones (scons 1 ones))\n\n(define nats (scons 0 (combine nats + ones)))\n\n(define combine\n  (lambda (s1 op s2)\n    (scons (op (scar s1) (scar s2)) (combine (scdr s1) op (scdr s2)))))\n\n(define fibs (scons 1 (scons 1 (combine fibs + (scdr fibs)))))\n\n(define facts (scons 1 (combine facts * (scdr nats))))\n\n(define ! (lambda (n) (nth n facts)))\n\n;; %%\n(! 5)\n\n;; %%\n(nth 10 facts)\n\n;; %%\n(nth 20 fibs)\n\n;; %%\n(first 30 fibs)\n\n;; %% [markdown]\n;; ## for-each\n;; (for-each PROCEDURE LIST): apply PROCEDURE to each item in LIST; like `map` but don't return results\n\n;; %%\n(for-each (lambda (n) (print n)) '(3 4 5))\n\n;; %% [markdown]\n;; ## format\n;; (format STRING ITEM ...): format the string with ITEMS as arguments\n\n;; %%\n(format \"This uses formatting ~a ~s ~%\" 'apple 'apple)\n\n;; %% [markdown]\n;; ## func\n;;\n;; Turns a lambda into a Python function.\n;;\n;; (func (lambda ...))\n\n;; %%\n(func (lambda (n) n))\n\n;; %% [markdown]\n;; ## There's more!\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/The flavors of raw cells.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [raw] raw_mimetype=\"text/latex\"\n# $1+1$\n\n# %% [raw] raw_mimetype=\"text/restructuredtext\"\n# :math:`1+1`\n\n# %% [raw] raw_mimetype=\"text/html\"\n# <b>Bold text<b>\n\n# %% [raw] raw_mimetype=\"text/markdown\"\n# **Bold text**\n\n# %% [raw] raw_mimetype=\"text/x-python\"\n# 1 + 1\n\n# %% [raw]\n# Not formatted\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/cat_variable.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\ncat = 42\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/coconut_homepage_demo.coco",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Coconut\n#     language: coconut\n#     name: coconut\n# ---\n\n# %% [markdown]\n# Taken from [coconut-lang.org](coconut-lang.org)\n\n# %% [markdown]\n# pipeline-style programming\n\n# %%\n\"hello, world!\" |> print\n\n# %% [markdown]\n#  prettier lambdas\n\n# %%\nx -> x ** 2\n\n# %% [markdown]\n# partial application\n\n# %%\nrange(10) |> map$(pow$(?, 2)) |> list\n\n# %% [markdown]\n# pattern-matching\n\n# %%\nmatch [head] + tail in [0, 1, 2, 3]:\n    print(head, tail)\n\n# %% [markdown]\n# destructuring assignment\n\n# %%\n{\"list\": [0] + rest} = {\"list\": [0, 1, 2, 3]}\n\n# %% [markdown]\n# infix notation\n\n# %%\n# 5 `mod` 3 == 2\n\n# %% [markdown]\n# operator functions\n\n# %%\nproduct = reduce$(*)\n\n# %% [markdown]\n# function composition\n\n# %%\n# (f..g..h)(x, y, z)\n\n# %% [markdown]\n# lazy lists\n\n# %%\n# (| first_elem() |) :: rest_elems()\n\n# %% [markdown]\n# parallel programming\n\n# %%\nrange(100) |> parallel_map$(pow$(2)) |> list\n\n# %% [markdown]\n# tail call optimization\n\n# %%\ndef factorial(n, acc=1):\n    case n:\n        match 0:\n            return acc\n        match _ is int if n > 0:\n            return factorial(n-1, acc*n)\n\n# %% [markdown]\n# algebraic data types\n\n# %%\ndata Empty()\ndata Leaf(n)\ndata Node(l, r)\n\ndef size(Empty()) = 0\n\naddpattern def size(Leaf(n)) = 1\n\naddpattern def size(Node(l, r)) = size(l) + size(r)\n\n# %% [markdown]\n# and much more!\n#\n# Like what you see? Don't forget to star Coconut on GitHub!\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/convert_to_py_then_test_with_update83.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n%%time\n\nprint('asdf')\n\n# %% [markdown]\n# Thanks for jupytext!\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/csharp.cs",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: .NET (C#)\n//     language: C#\n//     name: .net-csharp\n// ---\n\n// %% [markdown]\n// We start with...\n\n// %%\nConsole.WriteLine(\"Hello World!\");\n\n// %% [markdown]\n// Then we do a plot with Plotly, following the [Plotting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Plotting%20with%20Xplot.ipynb) example from `dotnet/interactive`:\n\n// %%\nusing XPlot.Plotly;\n\nvar bar = new Graph.Bar\n{\n    name = \"Bar\",\n    x = new[] {'A', 'B', 'C'},\n    y = new[] {1, 3, 2}\n};\n\nvar chart = Chart.Plot(new[] {bar});\nchart.WithTitle(\"A bar plot\");\ndisplay(chart);\n\n// %% [markdown]\n// We also test the math outputs as in the [Math and Latex](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Math%20and%20LaTeX.ipynb) example:\n\n// %%\n(LaTeXString)@\"\\begin{align} e^{i \\pi} = -1\\end{align}\"\n\n// %%\n(MathString)@\"e^{i \\pi} = -1\"\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/demo_gdl_fbp.pro",
    "content": "; -*- coding: utf-8 -*-\n; ---\n; jupyter:\n;   kernelspec:\n;     display_name: IDL [conda env:gdl] *\n;     language: IDL\n;     name: conda-env-gdl-idl\n; ---\n\n; %% [markdown]\n; ## GDL demo notebook\n\n; %% [markdown]\n; Demonstration of GDL [(gnudatalanguage)](https://github.com/gnudatalanguage/gdl)\n;\n; This notebook creates a Shepp-Logan phantom, projects it and then performs an FBP reconstruction.\n\n; %%\n;; L.A. Shepp and B.F. Logan, “The Fourier reconstruction of a head section,”\n;; IEEE Trans. Nucl. Sci. 21(3), 21–43 (1974).\nfunction shepplogan, size = size\n\n  if NOT keyword_set(size) then size = 256\n\n  phantom = fltarr(size,size)\n\n  tmp  = (findgen(size)-((size-1)/2.0)) / (size/2.0)\n  xcor = rebin(tmp,size,size)\n  ycor = rebin(transpose(tmp),size,size)\n  tmp  = fltarr(size,size)\n  \n  aa={cx: 0.0,  cy: 0.0,    maj:0.69,   min:0.92,  theta:  0.0, val: 2.0 }\n  bb={cx: 0.0,  cy:-0.0184, maj:0.6624, min:0.874, theta:  0.0, val:-0.98}\n  cc={cx: 0.22, cy: 0.0,    maj:0.11,   min:0.31,  theta:-18.0, val:-0.02}\n  dd={cx:-0.22, cy: 0.0,    maj:0.16,   min:0.41,  theta: 18.0, val:-0.02}\n  ee={cx: 0.0,  cy: 0.35,   maj:0.21,   min:0.25,  theta:  0.0, val:-0.01}\n  ff={cx: 0.0,  cy: 0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  gg={cx: 0.0,  cy:-0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  hh={cx:-0.08, cy:-0.605,  maj:0.046,  min:0.023, theta:  0.0, val:-0.01}\n  ii={cx: 0.0,  cy:-0.605,  maj:0.023,  min:0.023, theta:  0.0, val:-0.01}\n  jj={cx: 0.06, cy:-0.605,  maj:0.023,  min:0.046, theta:  0.0, val:-0.01}\n\n  list = [aa,bb,cc,dd,ee,ff,gg,hh,ii,jj]\n  for n = 0, n_elements(list)-1 do begin\n\n     tmp = ((xcor-list[n].cx) / list[n].maj)^2 $\n           + ((ycor-list[n].cy) / list[n].min)^2\n     \n     if list[n].theta NE 0 then begin\n        nx = (size-1) * (list[n].cx + 1) / 2\n        ny = (size-1) * (list[n].cy + 1) / 2\n        tmp = rot(tmp, -list[n].theta, 1, nx, ny, /interp, /pivot)\n     endif\n     \n     phantom[where(tmp LE 1.0)] += list[n].val\n     \n  endfor\n  \n  return, phantom < 1.1\n  \nend\n\n; %%\n;; Enable inline plotting\n!inline=1\n\n; %%\nphantom = shepplogan()\nwindow, 0, xsize=256, ysize=256\ntvscl, phantom > 0.95\n\n; %% [markdown]\n; Now we define simple forward and backprojection functions:\n\n; %%\nfunction proj, image, angle\n\n    sino_size_x = max(size(image,/dim))\n    sino_size_y = n_elements(angle)\n\n    sino = fltarr(sino_size_x, sino_size_y)\n    \n    for aa=0, n_elements(angle)-1 do begin\n    \n        sino[*,aa] = total(rot(image, angle[aa], /interp), 2)\n    \n    endfor\n\n    return, sino\n    \nend\n\n; %%\nfunction back, sino, angle\n\n    image_size = n_elements(sino[*,0])\n    image = fltarr(image_size,image_size)\n\n    for aa=0, n_elements(angle)-1 do begin\n    \n        image += rot(rebin(sino[*,aa],[image_size,image_size]), -angle[aa], /interp)\n    \n    endfor\n\n    return, image / n_elements(angle)\n\nend\n\n; %% [markdown]\n; This allows us to create a sinogram:\n\n; %%\nangles = findgen(360)\nsino = proj(phantom, angles)\nwindow, 0, xsize=256, ysize=360\ntvscl, sino\n\n; %% [markdown]\n; On this we can apply a simple FBP reconstruction:\n\n; %%\n;; G.L. Zeng, “Revisit of the Ramp Filter,”\n;; IEEE Trans. Nucl. Sci. 62(1), 131–136 (2015).\nfunction fbp, sino, angles\n  \n  ntot = n_elements(sino[*,0])\n  nang = n_elements(sino[0,*])\n  npos = ntot / 2 + 1           ; integer division needed !\n  nneg = ntot - npos\n\n  freq = findgen(ntot)\n  freq[npos:ntot-1] = REVERSE(freq[1:nneg])\n  freq[0] = 1\n\n  filter = -1 / (!pi * freq)^2\n  filter[where(freq mod 2 EQ 0)] *= -0.0\n  filter[0] = 0.25\n\n  filter = abs(fft(filter)) * ntot\n  filter[ntot/4:ntot/4+ntot/2-1] *= 0.0\n  filter = rebin(filter,ntot,nang)\n\n  ;; apply filter to the sinogram\n  fsino  = fft(sino,  dim=1)\n  fsino *= filter\n  fsino  = fft(fsino, dim=1, /overwrite, /inverse)\n  fsino  = !pi * real_part(fsino)\n\n  ;; backproject the filtered sinogram\n  return, back(fsino, angles)\n\nend\n\n; %%\nreconstruction = fbp(sino, angles)\nwindow, 0, xsize=512, ysize=256\n\ntvscl, [phantom, reconstruction] > 0.8\n\n; %% [markdown]\n; ### The end\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/evcxr_jupyter_tour.rs",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Rust\n//     language: rust\n//     name: rust\n// ---\n\n// %% [markdown]\n// # Tour of the EvCxR Jupyter Kernel\n// For those not already familiar with Jupyter notebook, it lets you write code into \"cells\" like the box below. Cells can alternatively contain markdown, like this text here. Each code cell is compiled and executed separately, but variables, defined functions etc persist between cells.\n//\n// ## Printing to outputs and evaluating expressions\n// Lets print something to stdout and stderr then return a final expression to see how that's presented. Note that stdout and stderr are separate streams, so may not appear in the same order is their respective print statements.\n\n// %%\nprintln!(\"Hello world\");\neprintln!(\"Hello error\");\nformat!(\"Hello {}\", \"world\")\n\n// %% [markdown]\n// ## Assigning and making use of variables\n// We define a variable `message`, then in the subsequent cell, modify the string and finally print it out. We could also do all this in the one cell if we wanted.\n\n// %%\nlet mut message = \"Hello \".to_owned();\n\n// %%\nmessage.push_str(\"world!\");\n\n// %%\nmessage\n\n// %% [markdown]\n// ## Defining and redefining functions\n// Next we'll define a function\n\n// %%\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {0} else {fib(x - 2) + fib(x - 1)}\n}\n\n// %%\n(1..13).map(fib).collect::<Vec<i32>>()\n\n// %% [markdown]\n// Hmm, that doesn't look right. Lets redefine the function. In practice, we'd go back and edit the function above and reevaluate it, but here, lets redefine it in a separate cell.\n\n// %%\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {2} else {fib(x - 2) + fib(x - 1)}\n}\n\n// %%\nlet values = (1..13).map(fib).collect::<Vec<i32>>();\nvalues\n\n// %% [markdown]\n// ## Spawning a separate thread and communicating with it\n// We can spawn a thread to do stuff in the background, then continue executing code in other cells.\n\n// %%\nuse std::sync::{Mutex, Arc};\nlet counter = Arc::new(Mutex::new(0i32));\nstd::thread::spawn({\n    let counter = Arc::clone(&counter);\n    move || {\n        for i in 1..300 {\n            *counter.lock().unwrap() += 1;\n            std::thread::sleep(std::time::Duration::from_millis(100));\n        }\n}});\n\n// %%\n*counter.lock().unwrap()\n\n// %%\n*counter.lock().unwrap()\n\n// %% [markdown]\n// ## Loading external crates\n// We can load external crates. This one takes a while to compile, but once it's compiled, subsequent cells shouldn't need to recompile it, so it should be much quicker.\n\n// %%\n:dep base64 = \"0.10.1\"\nbase64::encode(&vec![1, 2, 3, 4])\n\n// %% [markdown]\n// ## Customizing how types are displayed\n// We can also customize how our types are displayed, including presenting them as HTML. Here's an example where we define a custom display function for a type `Matrix`.\n\n// %%\nuse std::fmt::Debug;\npub struct Matrix<T> {pub values: Vec<T>, pub row_size: usize}\nimpl<T: Debug> Matrix<T> {\n    pub fn evcxr_display(&self) {\n        let mut html = String::new();\n        html.push_str(\"<table>\");\n        for r in 0..(self.values.len() / self.row_size) {\n            html.push_str(\"<tr>\");\n            for c in 0..self.row_size {\n                html.push_str(\"<td>\");\n                html.push_str(&format!(\"{:?}\", self.values[r * self.row_size + c]));\n                html.push_str(\"</td>\");\n            }\n            html.push_str(\"</tr>\");            \n        }\n        html.push_str(\"</table>\");\n        println!(\"EVCXR_BEGIN_CONTENT text/html\\n{}\\nEVCXR_END_CONTENT\", html);\n    }\n}\n\n// %%\nlet m = Matrix {values: vec![1,2,3,4,5,6,7,8,9], row_size: 3};\nm\n\n// %% [markdown]\n// We can also return images, we just need to base64 encode them. First, we set up code for displaying RGB and grayscale images.\n\n// %%\nextern crate image;\nextern crate base64;\npub trait EvcxrResult {fn evcxr_display(&self);}\nimpl EvcxrResult for image::RgbImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::RGB(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\nimpl EvcxrResult for image::GrayImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::Gray(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\n\n// %%\nimage::ImageBuffer::from_fn(256, 256, |x, y| {\n    if (x as i32 - y as i32).abs() < 3 {\n        image::Rgb([0, 0, 255])\n    } else {\n        image::Rgb([0, 0, 0])\n    }\n})\n\n// %% [markdown]\n// ## Display of compilation errors\n// Here's how compilation errors are presented. Here we forgot an & and passed a String instead of an &str.\n\n// %%\nlet mut s = String::new();\ns.push_str(format!(\"foo {}\", 42));\n\n// %% [markdown]\n// ## Seeing what variables have been defined\n// We can print a table of defined variables and their types with the :vars command.\n\n// %%\n:vars\n\n// %% [markdown]\n// Other built-in commands can be found via :help\n\n// %%\n:help\n\n// %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/frozen_cell.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n\n# %% deletable=false editable=false run_control={\"frozen\": true}\n# # This is an frozen cell\n# print(\"I'm frozen so Im not executed :(\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/fsharp.fsx",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: .NET (F#)\n//     language: F#\n//     name: .net-fsharp\n// ---\n\n// %% [markdown]\n// This notebook was inspired by [Plottting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/fsharp/Docs/Plotting%20with%20Xplot.ipynb).\n\n// %%\nopen XPlot.Plotly\n\n// %%\nlet bar =\n    Bar(\n        name = \"Bar 1\",\n        x = [\"A\"; \"B\"; \"C\"],\n        y = [1; 3; 2])\n\n[bar]\n|> Chart.Plot\n|> Chart.WithTitle \"A sample bar plot\"\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/gnuplot_notebook.gp",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: gnuplot\n#     language: gnuplot\n#     name: gnuplot\n# ---\n\n# %% [markdown]\n# # Sample gnuplot notebook\n\n# %% [markdown]\n# ## Simple plotting\n\n# %%\n# Plot sin and cos with different linetypes\n\nf(x) = sin(x)\ng(x) = cos(x)\nset xrange[0:2*pi]\nset xtics(0, \"{/Symbol p}\" pi , \"2{/Symbol p}\" 2*pi)\nset ytics 1\nplot f(x) linewidth 2 title \"sin(x)\", \\\n    g(x) linewidth 2 dashtype \"--\" title \"cos(x)\"\n\n# %% [markdown]\n# ## Example of line magic\n\n# %%\n%gnuplot inline pngcairo enhanced background rgb \"#EEEEEE\" size 600, 600\n# Parametric plot without border\n\nreset\nset parametric\nset size ratio -1\nunset border\nunset tics\nplot f(t), g(t) linewidth 2 notitle\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/haskell_notebook.hs",
    "content": "-- ---\n-- jupyter:\n--   kernelspec:\n--     display_name: Haskell\n--     language: haskell\n--     name: haskell\n-- ---\n\n-- %% [markdown]\n-- # Example Haskell Notebook\n\n-- %% [markdown]\n-- Define a function to add two numbers.\n\n-- %%\nf :: Num a => a -> a -> a\nf x y = x + y\n\n-- %% [markdown]\n-- Try to use the function\n\n-- %%\nf 1 2 \n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/hello_world_gonb.go",
    "content": "// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Go (gonb)\n//     language: go\n//     name: gonb\n// ---\n\n// %% [markdown]\n// A notebook that use [GoNB](https://github.com/janpfeifer/gonb)\n\n// %% [markdown]\n// the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb)\n\n// %%\nfunc main() {\n    fmt.Printf(\"Hello World!\")\n}\n\n// %%\n//gonb:%%\nfmt.Printf(\"Hello World!\")\n\n// %% [markdown]\n// //gonb:%% --who=world can pass flags to main func\n\n// %%\nimport (\n    \"flag\"\n    \"fmt\"\n)\n\nvar flagWho = flag.String(\"who\", \"\", \"Your name!\")\n\n//gonb:%% --who=world\nfmt.Printf(\"Hello %s!\\n\", *flagWho)\n\n// %% [markdown]\n// %args also can pass flags\n\n// %%\n%args --who=Wally\n\nfunc main() {\n    flag.Parse()\n    fmt.Printf(\"Where is %s?\", *flagWho)\n}\n\n// %%\nimport \"github.com/janpfeifer/gonb/gonbui\"\n\n//gonb:%%\ngonbui.DisplayHtml(`<span style=\"background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;\">I 🧡 GoNB!</span>`)\n\n// %%\n//gonb:%%\ngonbui.DisplayMarkdown(\"#### Objective\\n\\n1. Have fun coding **Go**;\\n1. Profit...\\n\"+\n                       `$$f(x) = \\int_{-\\infty}^{\\infty} e^{-x^2} dx$$`)\n\n// %%\nfunc init_a() {\n    fmt.Println(\"init_a\")\n}\n//gonb:%%\nfmt.Println(\"main\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/html-demo.clj",
    "content": ";; ---\n;; jupyter:\n;;   kernelspec:\n;;     display_name: Clojure\n;;     language: clojure\n;;     name: clojure\n;; ---\n\n;; %% [markdown]\n;; # Clojupyter Demo\n;;\n;; This example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.\n;; This notebook demonstrates some of the more advanced features of Clojupyter.\n\n;; %% [markdown]\n;; ## Displaying HTML\n;;\n;; To display HTML, you'll need to require a clojupyter helper function to change the cell output\n\n;; %%\n(require '[clojupyter.misc.display :as display])\n\n;; %%\n(println \">> should print some text\")\n;; displaying html\n(display/hiccup-html \n    [:ul \n     [:li \"a \" [:i \"emphatic\"] \" idea\"]\n     [:li \"a \" [:b \"bold\"] \" idea\"]\n     [:li \"an \" [:span {:style \"text-decoration: underline;\"} \"important\"] \" idea\"]])\n\n;; %% [markdown]\n;; We can also use this to render SVG:\n\n;; %%\n(display/hiccup-html\n    [:svg {:height 100 :width 100 :xmlns \"http://www.w3.org/2000/svg\"}\n            [:circle {:cx 50 :cy 40 :r 40 :fill \"red\"}]])\n\n;; %% [markdown]\n;; ## Adding External Clojure Dependencies \n;;\n;; You can fetch external Clojure dependencies using the `clojupyter.misc.helper` namespace. \n\n;; %%\n(require '[clojupyter.misc.helper :as helper])\n\n;; %%\n(helper/add-dependencies '[org.clojure/data.json \"0.2.6\"])\n(require '[clojure.data.json :as json])\n\n;; %%\n(json/write-str {:a 1 :b [2, 3] :c \"c\"})\n\n;; %% [markdown]\n;; ## Adding External Javascript Dependency\n;;\n;; Since you can render arbitrary HTML using `display/hiccup-html`, it's pretty easy to use external Javascript libraries to do things like generate charts. Here's an example using [Highcharts](https://www.highcharts.com/).\n;;\n;; First, we use a cell to add javascript to the running notebook:\n\n;; %%\n(helper/add-javascript \"https://code.highcharts.com/highcharts.js\")\n\n;; %% [markdown]\n;; Now we define a function which takes Clojure data and returns hiccup HTML to display:\n\n;; %%\n(defn plot-highchart [highchart-json]\n  (let [id (str (java.util.UUID/randomUUID))\n        code (format \"Highcharts.chart('%s', %s );\" id, (json/write-str highchart-json))]\n      (display/hiccup-html \n        [:div [:div {:id id :style {:background-color \"red\"}}]\n                   [:script code]])))\n\n;; %% [markdown]\n;; Now we can make generate interactive plots (try hovering over plot):\n\n;; %%\n(def raw-data (map #(+ (* 22 (+ % (Math/random)) 78)) (range)))\n(def data-1 (take 500 raw-data))\n(def data-2 (take 500 (drop 500 raw-data)))\n\n(plot-highchart {:chart {:type \"line\"}\n                 :title {:text \"Plot of random data\"}\n                 :series [{:data data-1} {:data data-2}]})\n\n;; %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/ijavascript.js",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Javascript (Node.js)\n//     language: javascript\n//     name: javascript\n// ---\n\n// %% [markdown]\n// ## A notebook that uses IJavascript kernel\n\n// %%\nlet x = 5;\nconst y = 6;\nvar z = 10;\n\n// %%\nx + y;\n\n// %%\nfunction add(num1, num2) {\n    return num1 + num2\n}\n\n// %%\nadd(x, y);\n\n// %%\nconst arrowAdd = (num1, num2) => num1 + num2;\n\n// %%\narrowAdd(x, y);\n\n// %%\nconst myCar = {\n    color: \"blue\",\n    weight: 850,\n    model: \"fiat\",\n    start: () => \"car started!\",\n    doors: [1,2,3,4]\n}\n\n// %%\nconsole.log(\"color:\", myCar.color);\n\n// %%\nconsole.log(\"start:\", myCar.start());\n\n// %%\nfor (let door of myCar.doors) {\n    console.log(\"I'm door\", door)\n}\n\n// %%\nmyCar;\n\n// %%\nclass User {\n  constructor(name){\n    this.name = name;\n  }\n  sayHello(){\n    return \"Hello, I'm \" + this.name;\n  }\n}\n\n// %%\nlet John = new User(\"John\");\nJohn.sayHello();\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/ir_notebook.R",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# %% [markdown]\n# This is a jupyter notebook that uses the IR kernel.\n\n# %%\nsum(1:10)\n\n# %%\nplot(cars)\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/itypescript.ts",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Typescript 3.5\n//     language: typescript\n//     name: typescript\n// ---\n\n// %%\nlet x: number = 5;\nconst y: number = 6;\nvar z: string = \"hi\";\nconsole.log(z);\nx + y;\n\n// %%\nfunction add(num1: number, num2: number): number {\n    return num1 + num2\n}\nadd(x, y);\n\n// %%\nconst arrowAdd = (num1: number, num2: number) => num1 + num2;\narrowAdd(x, y);\n\n// %%\nclass User {\n  constructor(private name: string) {\n    this.name = name;\n  }\n  sayHello(): string {\n    return \"Hello, I'm \" + this.name;\n  }\n}\nlet John: User;\nJohn = new User(\"John\");\nJohn.sayHello();\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/julia_benchmark_plotly_barchart.jl",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Julia 1.1.1\n#     language: julia\n#     name: julia-1.1\n# ---\n\n# %%\n# IJulia rocks! So does Plotly. Check it out\n\nusing Plotly\napi_key = \"\" # visit https://plot.ly/api to generate an API username and password\nusername = \"\"\n\nPlotly.signin(username, api_key)\n\n# %%\n# Following data taken from http://julialang.org/ frontpage \nbenchmarks = [\"fib\", \"parse_int\", \"quicksort3\", \"mandel\", \"pi_sum\", \"rand_mat_stat\", \"rand_mat_mul\"]\nplatforms = [\"Fortran\", \"Julia\", \"Python\", \"R\", \"Matlab\", \"Mathematica\", \"Javascript\", \"Go\"]\n\ndata = {\n        platforms[1] => [0.26, 5.03, 1.11, 0.86, 0.80, 0.64, 0.96],\n        platforms[2] => [0.91, 1.60, 1.14, 0.85, 1.00, 1.66, 1.01],\n        platforms[3] => [30.37, 13.95, 31.98, 14.19, 16.33, 13.52, 3.41 ],\n        platforms[4] => [411.36, 59.40, 524.29, 106.97, 15.42, 10.84, 3.98  ],\n        platforms[5] => [1992.00, 1463.16, 101.84, 64.58, 1.29, 6.61, 1.10   ],\n        platforms[6] => [64.46, 29.54, 35.74, 6.07, 1.32, 4.52, 1.16 ],\n        platforms[7] => [2.18, 2.43, 3.51, 3.49, 0.84, 3.28, 14.60],\n        platforms[8] => [1.03, 4.79, 1.25, 2.36, 1.41, 8.12, 8.51]\n        }\n\npdata = [ {\"x\"=>benchmarks,\"y\"=>data[k],\"bardir\"=>\"h\",\"type\"=>\"bar\",\"name\"=>k} for k = platforms ]\n\nlayout = {\n          \"title\"=> \"Julia benchmark comparison (smaller is better, C performance = 1.0)\",\n          \"barmode\"=> \"group\",\n          \"autosize\"=> false,\n          \"width\"=> 900,\n          \"height\"=> 900,\n          \"titlefont\"=>\n          {\n           \"family\"=> \"Open Sans\",\n           \"size\"=> 18,\n           \"color\"=> \"rgb(84, 39, 143)\"\n           },\n          \"margin\"=> {\"l\"=>160, \"pad\"=>0},\n          \"xaxis\"=> {\n                     \"title\"=> \"Benchmark log-time\",\n                     \"type\"=> \"log\"\n                     },\n          \"yaxis\"=> {\"title\"=> \"Benchmark Name\"}\n          }\n\nresponse = Plotly.plot(pdata,[\"layout\"=>layout])\n\n# Embed in an iframe within IJulia\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n\n# %%\n# checkout https://plot.ly/api/ for more Julia examples!\n# But to show off some other Plotly features:\nx = 1:1500\ny1 = sin(2*pi*x/1500.) + rand(1500)-0.5\ny2 = sin(2*pi*x/1500.)\n\nfish = {\"x\"=>x,\"y\"=> y1,\n\t\"type\"=>\"scatter\",\"mode\"=>\"markers\",\n\t\"marker\"=>{\"color\"=>\"rgb(0, 0, 255)\",\"opacity\"=>0.5 } }\n\nfit = {\"x\"=> x,\"y\"=> y2,\n\t\"type\"=>\"scatter\", \"mode\"=>\"markers\", \"opacity\"=>0.8,\n\t\"marker\"=>{\"color\"=>\"rgb(255, 0, 0)\"} }\n\nlayout = {\"autosize\"=> false,\n    \"width\"=> 650, \"height\"=> 550,\n    \"title\"=>\"Fish School\",\n\t\"xaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",    \n        \"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[0,1500] },\n\t\"yaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",\n\t\t\"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[-2.2,2.2] },\n\t\"plot_bgcolor\"=> \"rgb(245,245,247)\",\n    \"showlegend\"=> false,\n    \"hovermode\"=> \"closest\"}\n\nresponse = Plotly.plot([fish, fit],[\"layout\"=>layout])\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/julia_functional_geometry.jl",
    "content": "# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Julia 1.1.1\n#     language: julia\n#     name: julia-1.1\n# ---\n\n# %%\n# This notebook is a semi top-down explanation. This cell needs to be\n# executed first so that the operators and helper functions are defined\n# All of this is explained in the later half of the notebook\n\nusing Compose, Interact\nCompose.set_default_graphic_size(2inch, 2inch)\n\npoints_f = [\n    (.1, .1),\n    (.9, .1),\n    (.9, .2),\n    (.2, .2),\n    (.2, .4),\n    (.6, .4),\n    (.6, .5),\n    (.2, .5),\n    (.2, .9),\n    (.1, .9),\n    (.1, .1)\n]\n\nf = compose(context(), stroke(\"black\"), line(points_f))\n\nrot(pic) = compose(context(rotation=Rotation(-deg2rad(90))), pic)\nflip(pic) = compose(context(mirror=Mirror(deg2rad(90), 0.5w, 0.5h)), pic)\nabove(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, 1, m/(m+n)), p),\n            (context(0, m/(m+n), 1, n/(m+n)), q))\n\nabove(p, q) = above(1, 1, p, q)\n\nbeside(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, m/(m+n), 1), p),\n            (context(m/(m+n), 0, n/(m+n), 1), q))\n\nbeside(p, q) = beside(1, 1, p, q)\n\nover(p, q) = compose(context(),\n                (context(), p), (context(), q))\n\nrot45(pic) =\n    compose(context(0, 0, 1/sqrt(2), 1/sqrt(2),\n        rotation=Rotation(-deg2rad(45), 0w, 0h)), pic)\n\n# Utility function to zoom out and look at the context\nzoomout(pic) = compose(context(),\n                (context(0.2, 0.2, 0.6, 0.6), pic),\n                (context(0.2, 0.2, 0.6, 0.6), fill(nothing), stroke(\"black\"), strokedash([0.5mm, 0.5mm]),\n                    polygon([(0, 0), (1, 0), (1, 1), (0, 1)])))\n\nfunction read_path(p_str)\n    tokens = [try parsefloat(x) catch symbol(x) end for x in split(p_str, r\"[\\s,]+\")]\n    path(tokens)\nend\n\nfish = compose(context(units=UnitBox(260, 260)), stroke(\"black\"),\n            read_path(strip(readall(\"fish.path\"))))\n\nrotatable(pic) = @manipulate for θ=0:0.001:2π\n    compose(context(rotation=Rotation(θ)), pic)\nend\n\nblank = compose(context())\n\nfliprot45(pic) = rot45(compose(context(mirror=Mirror(deg2rad(-45))),pic))\n\n# Hide this cell.\ndisplay(MIME(\"text/html\"), \"\"\"<script>\nvar cell = \\$(\".container .cell\").eq(0), ia = cell.find(\".input_area\")\nif (cell.find(\".toggle-button\").length == 0) {\nia.after(\n    \\$('<button class=\"toggle-button\">Toggle hidden code</button>').click(\n        function (){ ia.toggle() }\n        )\n    )\nia.hide()\n}\n</script>\"\"\")\n\n# %% [markdown]\n# # Functional Geometry\n# *Functional Geometry* is a paper by Peter Henderson ([original (1982)](users.ecs.soton.ac.uk/peter/funcgeo.pdf), [revisited (2002)](https://cs.au.dk/~hosc/local/HOSC-15-4-pp349-365.pdf)) which deconstructs the MC Escher woodcut *Square Limit*\n#\n# ![Square Limit](http://i.imgur.com/LjRzmNM.png)\n\n# %% [markdown]\n# > A picture is an example of a complex object that can be described in terms of its parts.\n# Yet a picture needs to be rendered on a printer or a screen by a device that expects to\n# be given a sequence of commands. Programming that sequence of commands directly is\n# much harder than having an application generate the commands automatically from the\n# simpler, denotational description.\n\n# %% [markdown]\n# A `picture` is a *denotation* of something to draw.\n#\n# e.g. The value of f here denotes the picture of the letter F\n\n# %% [markdown]\n# Original at http://nbviewer.jupyter.org/github/shashi/ijulia-notebooks/blob/master/funcgeo/Functional%20Geometry.ipynb\n\n# %% [markdown]\n# ## In conclusion\n#\n# We described Escher's *Square Limit* from the description of its smaller parts, which in turn were described in terms of their smaller parts.\n#\n# This seemed simple because we chose to talk in terms of an *algebra* to describe pictures. The primitives `rot`, `flip`, `fliprot45`, `above`, `beside` and `over` fit the job perfectly.\n#\n# We were able to describe these primitives in terms of `compose` `contexts`, which the Compose library knows how to render.\n#\n# Denotation can be an easy way to describe a system as well as a practical implementation method.\n#\n# [Abstraction barriers](https://mitpress.mit.edu/sicp/full-text/sicp/book/node29.html) are useful tools that can reduce the cognitive overhead on the programmer. It entails creating layers consisting of functions which only use functions in the same layer or layers below in their own implementation. The layers in our language were:\n#\n#     ------------------[ squarelimit ]------------------\n#     -------------[ quartet, cycle, nonet ]-------------\n#     ---[ rot, flip, fliprot45, above, beside, over ]---\n#     -------[ compose, context, line, path,... ]--------\n#     \n# Drawing this diagram out is a useful way to begin building any library.\n#\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/jupyter.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# # Jupyter notebook\n#\n# This notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n\n# %%\na = 1\nb = 2\na + b\n\n# %% [markdown]\n# Now we return a few tuples\n\n# %%\na, b\n\n# %%\na, b, a+b\n\n# %% [markdown]\n# And this is already the end of the notebook\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/jupyter_again.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n\n# %%\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n\n# %%\n?next\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/jupyter_with_raw_cell_in_body.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n1+2+3\n\n# %% [raw]\n# This is a raw cell\n\n# %% [markdown]\n# This is a markdown cell\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/jupyter_with_raw_cell_on_top.py",
    "content": "# ---\n# title: Quick test\n# output:\n#   ioslides_presentation:\n#     widescreen: true\n#     smaller: true\n# editor_options:\n#   chunk_output_type: console\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n1+2+3\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/jupyter_with_raw_cell_with_invalid_yaml.py",
    "content": "# ---\n# title: Exception: Test\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n# %%\n1 + 2 + 3\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/jupyterlab-slideshow_1441.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown] @deathbeds/jupyterlab-fonts={\"styles\": {\"\": {\"body[data-jp-deck-mode='presenting'] &\": {\"right\": \"0\", \"top\": \"30%\", \"width\": \"25%\", \"z-index\": 1}}}} jupyterlab-slideshow={\"layer\": \"slide\"}\n# > **Note**\n# > \n# > `slide` layer with a `top` of `30%`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/jupytext_replication.sos",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: SoS\n#     language: sos\n#     name: sos\n# ---\n\n# %% [markdown] Collapsed=\"false\" kernel=\"SoS\"\n# # Text SOS-kernel with Jupytext\n#\n# ## What is SOS kernel\n#\n# SoS consists of a ployglot notebook that allows the use of multiple kernels in one Jupyter notebook, and a workflow system that is designed for daily computational research. Basically,\n#\n# - SoS Polyglot Notebook is a Jupyter Notebook with a SoS kernel.\n# - SoS Notebook serves as a super kernel to all other Jupyter kernels and allows the use of multiple kernels in one Jupyter notebook.\n# - SoS Workflow System is a Python based workflow system that is designed to be readable, shareable, and suitable for daily data analysis.\n# - SoS Workflow System can be used from command line or use SoS Notebook as its IDE.\n#\n# ![](https://vatlab.github.io/sos-docs/doc/media/SoS_Notebook_and_Workflow.png)\n#\n# ### How to install SOS-kernel\n#\n# Please follow this [link](https://vatlab.github.io/sos-docs/running.html#Conda-installation) to setup SOS\n#\n# I run some issue with the latest version of R on my Mac, so I had to install an earlier version of R\n#\n# ```\n# conda install -c r r=3.5.1\n# conda install sos-notebook jupyterlab-sos sos-papermill -c conda-forge\n# ```\n#\n# ## Related issue with Jupytext\n#\n# Jupytext works fine with Python/R kernel but converts code cells into markdown cells when using the SOS kernel.\n#\n# cf the image below. It is a code cell. After saving the notebook and restart it, it converted the code cell into markdown\n#\n# <img width=\"734\" alt=\"Screenshot 2020-03-13 at 10 51 18\" src=\"https://user-images.githubusercontent.com/33351426/76610049-9e704600-6518-11ea-861e-b4f691d1a478.png\">\n\n# %% [markdown] Collapsed=\"false\" kernel=\"SoS\"\n# ## Step 1\n#\n# Please, choose SOS Kernel and then, in the cell code, choose SOS (or any other kernel available), the outcome is the same.\n#\n# ![](https://drive.google.com/uc?export=view&id=1OtyxfwoRyVK23XHnmd9JR-crBgHBL5mt)\n\n# %% Collapsed=\"false\" kernel=\"SoS\"\nimport pandas as pd \nimport numpy as np\n\npd.DataFrame({\n    'x': np.random.random(10),\n    'y': np.random.random(10),\n})\n\n# %% [markdown] Collapsed=\"false\" kernel=\"python3\"\n# ## Step 2\n#\n# Now, pair it with Jupytex\n#\n# ![](https://drive.google.com/uc?export=view&id=1Wtx-YPAXY8HWHqzCcy4iIgHpzt_9emEn)\n\n# %% [markdown] Collapsed=\"false\" kernel=\"python3\"\n# ### Step 3\n#\n# Save the notebook, restart and clear all, **save**, then Shut down kernel. Close the notebook and reopen\n\n# %% [markdown] Collapsed=\"false\" kernel=\"python3\"\n# ### Step 4\n#\n# Reopen the notebook. Here is the outcome\n#\n# ![](https://drive.google.com/uc?export=view&id=12C70unbSPv0gHCZaCICEUy7kO7wM93JH)\n#\n#\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/kalman_filter_and_visualization.q",
    "content": "/ ---\n/ jupyter:\n/   kernelspec:\n/     display_name: Q 3.5\n/     language: q\n/     name: qpk\n/ ---\n\n/ %%\nplt: .p.import`matplotlib.pyplot\n\n/ %%\nfilter: {\n    t: ([] x: `float $ x; xh: `float $ x; p: (count x) # R: var x);\n    (first t), iterate[R; R]\\[first t; 1 _ t] \n    }\n\niterate: {[Q; R; x; y]\n    x[`p]+: Q;\n    k: x[`p] % R + x[`p];\n    `x`xh`p ! (y[`x]; x[`xh] + k * y[`x] - x[`xh]; (1 - k) * x[`p])\n    }\n\n/ %%\nprice: 100 + sums 0.5 - (n:50)?1.\n\n/ %%\noutput:filter price\n\n/ %%\nplt[`:plot][til n; output`x; `label pykw \"price\"];\nplt[`:plot][til n; output`xh;`label pykw \"forecast\"];\nplt[`:legend][];\nplt[`:show][];\n\n/ %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/logtalk_notebook.lgt",
    "content": "% ---\n% jupyter:\n%   kernelspec:\n%     display_name: Logtalk\n%     language: logtalk\n%     name: logtalk_kernel\n% ---\n\n% %% [markdown]\n% # An implementation of the Ackermann function\n\n% %% vscode={\"languageId\": \"logtalk\"}\n%%load ack.lgt\n\n:- object(ack).\n\n:- info([\n\tversion is 1:0:0,\n\tauthor is 'Paulo Moura',\n\tdate is 2008-3-31,\n\tcomment is 'Ackermann function (general recursive function).'\n]).\n\n:- public(ack/3).\n:- mode(ack(+integer, +integer, -integer), one).\n:- info(ack/3, [\n\tcomment is 'Ackermann function.',\n\targnames is ['M', 'N', 'V']\n]).\n\nack(0, N, V) :-\n\t!,\n\tV is N + 1.\nack(M, 0, V) :-\n\t!,\n\tM2 is M - 1,\n\tack(M2, 1, V).\nack(M, N, V) :-\n\tM2 is M - 1,\n\tN2 is N - 1,\n\tack(M, N2, V2),\n\tack(M2, V2, V).\n\n:- end_object.\n\n% %% [markdown]\n% ## Sample query\n\n% %% vscode={\"languageId\": \"logtalk\"}\nack::ack(2, 4, V).\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/lua_example.lua",
    "content": "-- -*- coding: utf-8 -*-\n-- ---\n-- jupyter:\n--   kernelspec:\n--     display_name: Lua\n--     language: lua\n--     name: lua\n-- ---\n\n-- %% [markdown]\n-- Source: https://www.lua.org/pil/19.3.html\n\n-- %% [markdown]\n-- # Sort\n\n-- %% [markdown]\n-- Another useful function on arrays is table.sort, which we have seen before. It receives the array to be sorted, plus an optional order function. This order function receives two arguments and must return true if the first argument should come first in the sorted array. If this function is not provided, sort uses the default less-than operation (corresponding to the `<´ operator).\n\n-- %% [markdown]\n-- A common mistake is to try to order the indices of a table. In a table, the indices form a set, and have no order whatsoever. If you want to order them, you have to copy them to an array and then sort the array. Let us see an example. Suppose that you read a source file and build a table that gives, for each function name, the line where that function is defined; something like this:\n\n-- %%\nlines = {\n    luaH_set = 10,\n    luaH_get = 24,\n    luaH_present = 48,\n}\n\n-- %% [markdown]\n--  Now you want to print these function names in alphabetical order. If you traverse this table with pairs, the names appear in an arbitrary order. However, you cannot sort them directly, because these names are keys of the table. However, when you put these names into an array, then you can sort them. First, you must create an array with those names, then sort it, and finally print the result:\n\n-- %%\na = {}\nfor n in pairs(lines) do table.insert(a, n) end\ntable.sort(a)\nfor i,n in ipairs(a) do print(n) end\n\n-- %% [markdown]\n-- Note that, for Lua, arrays also have no order. But we know how to count, so we get ordered values as long as we access the array with ordered indices. That is why you should always traverse arrays with ipairs, rather than pairs. The first imposes the key order 1, 2, ..., whereas the latter uses the natural arbitrary order of the table.\n\n-- %% [markdown]\n-- As a more advanced solution, we can write an iterator that traverses a table following the order of its keys. An optional parameter f allows the specification of an alternative order. It first sorts the keys into an array, and then iterates on the array. At each step, it returns the key and value from the original table:\n\n-- %%\nfunction pairsByKeys (t, f)\n    local a = {}\n    for n in pairs(t) do table.insert(a, n) end\n    table.sort(a, f)\n    local i = 0               -- iterator variable\n    local iter = function ()  -- iterator function\n        i = i + 1\n        if a[i] == nil then return nil\n        else return a[i], t[a[i]]\n        end\n    end\n    return iter\nend\n\n-- %% [markdown]\n--  With this function, it is easy to print those function names in alphabetical order. The loop\n\n-- %%\nfor name, line in pairsByKeys(lines) do\n    print(name, line)\nend\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/maxima_example.mac",
    "content": "/* --- */\n/* jupyter: */\n/*   kernelspec: */\n/*     display_name: Maxima */\n/*     language: maxima */\n/*     name: maxima */\n/* --- */\n\n/* %% [markdown] */\n/* ## maxima misc */\n\n/* %% */\nkill(all)$\n\n/* %% */\nf(x) := 1/(x^2+l^2)^(3/2);\n\n/* %% */\nintegrate(f(x), x);\n\n/* %% */\ntex(%)$\n\n/* %% */\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/notebook_with_complex_metadata.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/nteract_with_parameter.py",
    "content": "# ---\n# jupyter:\n#   kernel_info:\n#     name: python3\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% inputHidden=false outputHidden=false tags=[\"parameters\"]\nparam = 4\n\n# %% inputHidden=false outputHidden=false\nimport pandas as pd\n\n# %% inputHidden=false outputHidden=false\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n\n# %% inputHidden=false outputHidden=false\n%matplotlib inline\ndf.plot(kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/ocaml_notebook.ml",
    "content": "(* --- *)\n(* jupyter: *)\n(*   jupytext: *)\n(*     formats: ipynb:markdown,md *)\n(*   kernelspec: *)\n(*     display_name: OCaml default *)\n(*     language: OCaml *)\n(*     name: ocaml-jupyter *)\n(* --- *)\n\n(* %% [markdown] *)\n(* # Example of an OCaml notebook *)\n\n(* %% *)\nlet sum x y = x + y\n\n(* %% [markdown] *)\n(* Let's try our function: *)\n\n(* %% *)\nsum 3 4 = 7 + 0\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/octave_notebook.m",
    "content": "% ---\n% jupyter:\n%   kernelspec:\n%     display_name: Octave\n%     language: octave\n%     name: octave\n% ---\n\n% %% [markdown]\n% A markdown cell\n\n% %%\n1 + 1\n\n% %%\n% a code cell with comments\n2 + 2\n\n% %%\n% a simple plot\nx = -10:0.1:10;\nplot (x, sin (x));\n\n% %%\n%plot -w 800\n% a simple plot with a magic instruction\nx = -10:0.1:10;\nplot (x, sin (x));\n\n% %% [markdown]\n% And to finish with, a Python cell\n\n% %%\n%%python\na = 1\n\n% %%\n%%python\na + 1\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/plotly_graphs.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# This notebook contains complex outputs, including plotly javascript graphs.\n\n# %% [markdown]\n# # Interactive plots\n\n# %% [markdown]\n# We use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n\n# %%\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n\n# %%\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/powershell.ps1",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: PowerShell\n#     language: PowerShell\n#     name: powershell\n# ---\n\n# %% [markdown]\n# This is an extract from\n# https://github.com/Jaykul/Jupyter-PowerShell/blob/master/LiterateDevOps.ipynb\n\n# %%\n$imageUrl = 'https://upload.wikimedia.org/wikipedia/commons/2/2f/PowerShell_5.0_icon.png'\n$ImageData = @{ \"png\" = (Invoke-WebRequest $imageUrl -UseBasicParsing).RawContentStream.GetBuffer() }\n# $ImageData\n\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 32 } }\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 64 } }\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/raw_cell_with_complex_yaml_like_content.py",
    "content": "# ---\n#\n# This is a complex paragraph\n# that is split over multiple lines.\n#\n# It also includes blank lines.\n#\n#\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/raw_cell_with_non_dict_yaml_content.py",
    "content": "# ---\n# Content.\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/root_cpp.cpp",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: ROOT C++\n//     language: c++\n//     name: root\n// ---\n\n// %%\n#include <iostream>\n#include <string>\n\n// %%\nint k = 4;\nstd::string foo = \"This string says \\\"foo\\\"\";\n\n// %%\nstd::cout << \"k = \" << k << '\\n' << foo << '\\n';\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/sage_print_hello.sage",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: SageMath 9.2\n#     language: sage\n#     name: sagemath\n# ---\n\n# %%\nprint(\"Hello world\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/sample_bash_notebook.sh",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Bash\n#     language: bash\n#     name: bash\n# ---\n\n# %%\nls\n\n# %%\n# https://coderwall.com/p/euwpig/a-better-git-log\ngit config --global alias.lg \"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\"\n\n# %%\ngit lg\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/sample_rise_notebook_66.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown] slideshow={\"slide_type\": \"slide\"}\n# A markdown cell\n\n# %% slideshow={\"slide_type\": \"\"}\n1+1\n\n# %% [markdown] cell_style=\"center\" slideshow={\"slide_type\": \"fragment\"}\n# Markdown cell two\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/sas.sas",
    "content": "/* --- */\n/* jupyter: */\n/*   kernelspec: */\n/*     display_name: SAS */\n/*     language: sas */\n/*     name: sas */\n/* --- */\n\n/* %% [markdown] */\n/* # SAS Notebooks with jupytext */\n\n/* %% */\nproc sql;\n    select *\n    from sashelp.cars (obs=10)\n    ;\nquit; \n\n/* %% */\n%let name = \"Jupytext\";\n\n/* %% */\n%put &name;\n\n/* %% */\n/* Note when defining macros \"%macro\" cannot be the first line of text in the cell */\n%macro test;\n    data temp;\n        set sashelp.cars;\n        name = \"testx\";\n    run; \n    proc print data = temp (obs=10);\n    run; \n%mend test;\n\n%test\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/simple-helloworld.java",
    "content": "// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   jupytext:\n//     formats: ipynb,java:hydrogen\n//   kernelspec:\n//     display_name: Java\n//     language: java\n//     name: java\n// ---\n\n// %% [markdown]\n// Let's define some class.\n\n// %%\nclass A {\n    public void hello() {\n        System.out.println(\"Hello World\");\n    }   \n}\n\n// %% [markdown]\n// And now we call its method.\n\n// %%\nnew A().hello();\n\n// %% [markdown]\n// You can run it e.g. with `jshell`\n//\n// * from command line, as `jshell simple-helloworld.java`\n// * from jshell's shell with `/open simple-helloworld.java`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/simple_robot_notebook.robot",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Robot Framework\n#     language: robotframework\n#     name: robotkernel\n# ---\n\n# %%\n*** Settings ***\n\nLibrary  Collections\n\n# %%\n*** Keywords ***\n\nHead\n    [Arguments]  ${list}\n    ${value}=  Get from list  ${list}  0\n    [Return]  ${value}\n\n# %%\n*** Tasks ***\n\nGet head\n    ${array}=  Create list  1  2  3  4  5\n    ${head}=  Head  ${array}\n    Should be equal  ${head}  1\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/simple_scala_notebook.scala",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Apache Toree - Scala\n//     language: scala\n//     name: apache_toree_scala\n// ---\n\n// %%\n// This is just a simple scala notebook\n\nobject SampleObject {\n    def calculation(x: Int, y: Int): Int = x + y\n}\n\nval result = SampleObject.calculation(1, 2)\n\n// %%\nprintln(result * 10)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/stata_notebook.do",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Stata\n//     language: stata\n//     name: stata\n// ---\n\n// %%\n// This notebook uses the stata_kernel: https://github.com/kylebarron/stata_kernel\n\n// %%\nuse http://www.stata-press.com/data/r13/auto\n\n// %%\nsummarize\n\n// %%\nscatter weight length\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/tailrecursive-factorial.groovy",
    "content": "// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   jupytext:\n//     formats: ipynb,groovy:hydrogen\n//   kernelspec:\n//     display_name: Groovy\n//     language: groovy\n//     name: groovy\n// ---\n\n// %% [markdown]\n// # TailRecursive annotation\n//\n// Let's check what is the effect of `@TailRecursive` annotation on the simple recursive definition of factorial function.\n\n// %%\nimport groovy.transform.CompileStatic\nimport groovy.transform.TailRecursive\nimport groovy.transform.TypeChecked\n\n@CompileStatic\n@TypeChecked\nclass X {\n    static final BigInteger factorial0(int n) {\n        (n <= 1) ? 1G : factorial0(n-1).multiply(BigInteger.valueOf(n))\n    }\n\n    static final BigInteger factorial1(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial1(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n\n    @TailRecursive\n    static final BigInteger factorial2(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial2(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n}\n\nx = new X()\n\n// %% [markdown]\n// Although we can time the execution of the calls, it is not very accurate; such micro benchmarks should be performed in more controlled environment, such us under [JMH](https://openjdk.java.net/projects/code-tools/jmh/).\n//\n// For example, see [blog posts of Szymon Stępniak](https://e.printstacktrace.blog/tail-recursive-methods-in-groovy/).\n\n// %%\n%%timeit\n\nx.factorial0(19_000).toString().length()\n\n// %%\n%%timeit\n\nx.factorial1(19_000).toString().length()\n\n// %%\n%%timeit\n\nx.factorial2(19_000).toString().length()\n\n// %% [markdown]\n// The real difference is the use of stack. Non-tail recursive calls exhaust the stack space at some point, whereas tail recursive calls don't add frames to the stack.\n\n// %%\nfactSize = { n, cl ->\n    println \"Factorial of ${n} has ${cl(n).toString().length()} digits\"\n}\n\nfactSize 2_000, x.&factorial0\nfactSize 2_000, x.&factorial1\nfactSize 2_000, x.&factorial2\n\nfactSize 100_000, x.&factorial2\n\n// %%\ntry {\n    factSize 100_000, x.&factorial1\n} catch (Throwable e) {\n    assert e instanceof StackOverflowError\n    println e\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/tcl_test.tcl",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Tcl\n#     language: tcl\n#     name: tcljupyter\n# ---\n\n# %% [markdown]\n# # Assign Values\n\n# %%\nset a 1\nputs \"a = $a\"\n\n# %% [markdown]\n# # Loop\n\n# %%\nfor {set i 0} {$i < 10} {incr i} {\n    puts \"I inside first loop: $i\"\n}\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/text_outputs_and_images.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# This notebook contains outputs of many different types: text, HTML, plots and errors.\n\n# %% [markdown]\n# # Text outputs\n#\n# Using `print`, `sys.stdout` and `sys.stderr`\n\n# %%\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n\n# %%\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n\n# %% [markdown]\n# # HTML outputs\n#\n# Using `pandas`. Here we find two representations: both text and HTML.\n\n# %%\nimport pandas as pd\npd.DataFrame([4])\n\n# %%\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n\n# %% [markdown]\n# # Images\n\n# %%\n%matplotlib inline\n\n# %%\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n\n# %% [markdown]\n# # Errors\n\n# %%\nundefined_variable\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/wolfram.wolfram",
    "content": "(* --- *)\n(* jupyter: *)\n(*   kernelspec: *)\n(*     display_name: Wolfram Language 13.1 *)\n(*     language: Wolfram Language *)\n(*     name: wolframlanguage13.1 *)\n(* --- *)\n\n(* %% [markdown] *)\n(* **Note:** The `language_info` `file_extension` in this notebook should be `.m`, but it was deliberately changed to `.wolfram` to avoid conflicts with Matlab which is using the same extension. *)\n\n(* %% [markdown] *)\n(* We start with... *)\n\n(* %% *)\nPrint[\"Hello, World!\"];\n\n(* %% [markdown] *)\n(* Then we draw the first example plot from the [ListPlot](https://reference.wolfram.com/language/ref/ListPlot.html) reference: *)\n\n(* %% *)\nListPlot[Prime[Range[25]]]\n\n(* %% [markdown] *)\n(* We also test the math outputs as in the [Simplify](https://reference.wolfram.com/language/ref/Simplify.html) example: *)\n\n(* %% *)\nD[Integrate[1/(x^3 + 1), x], x]\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/xcpp_by_quantstack.cpp",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: C++14\n//     language: C++14\n//     name: xeus-cling-cpp14\n// ---\n\n// %% [markdown]\n// [![xeus-cling](images/xeus-cling.png)](https://github.com/QuantStack/xeus-cling/)\n//\n// A Jupyter kernel for C++ based on the `cling` C++ interpreter and the `xeus` native implementation of the Jupyter protocol, xeus.\n//\n// - GitHub repository: https://github.com/QuantStack/xeus-cling/\n// - Online documentation: https://xeus-cling.readthedocs.io/\n\n// %% [markdown]\n// ## Usage\n//\n// <div style=\"background: #efffed;\n//             border: 1px solid grey;\n//             margin: 8px 0 8px 0;\n//             text-align: center;\n//             padding: 8px; \">\n//     <i class=\"fa-play fa\" \n//        style=\"font-size: 40px;\n//               line-height: 40px;\n//               margin: 8px;\n//               color: #444;\">\n//     </i>\n//     <div>\n//     To run the selected code cell, hit <pre style=\"background: #efffed\">Shift + Enter</pre>\n//     </div>\n// </div>\n\n// %% [markdown]\n// ## Output and error streams\n//\n// `std::cout` and `std::cerr` are redirected to the notebook frontend.\n\n// %%\n#include <iostream>\n\nstd::cout << \"some output\" << std::endl;\n\n// %%\nstd::cerr << \"some error\" << std::endl;\n\n// %%\n#include <stdexcept>\n\n// %%\nthrow std::runtime_error(\"Unknown exception\");\n\n// %% [markdown]\n// Omitting the `;` in the last statement of a cell results in an output being printed\n\n// %%\nint j = 5;\n\n// %%\nj\n\n// %% [markdown]\n// # Interpreting the C++ programming language\n//\n// `cling` has a broad support of the features of C++. You can define functions, classes, templates, etc ...\n\n// %% [markdown]\n// ## Functions\n\n// %%\ndouble sqr(double a)\n{\n    return a * a;\n}\n\n// %%\ndouble a = 2.5;\ndouble asqr = sqr(a);\nasqr\n\n// %% [markdown]\n// ## Classes\n\n// %%\nclass Foo\n{\npublic:\n\n    virtual ~Foo() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Foo value = \" << value << std::endl;\n    }\n};\n\n// %%\nFoo bar;\nbar.print(1.2);\n\n// %% [markdown]\n// ## Polymorphism\n\n// %%\nclass Bar : public Foo\n{\npublic:\n\n    virtual ~Bar() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Bar value = \" << 2 * value << std::endl;\n    }\n};\n\n// %%\nFoo* bar2 = new Bar;\nbar2->print(1.2);\ndelete bar2;\n\n// %% [markdown]\n// ## Templates\n\n// %%\n#include <typeinfo>\n\ntemplate <class T>\nclass FooT\n{\npublic:\n    \n    explicit FooT(const T& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << typeid(T).name() << \" m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    T m_t;\n};\n\ntemplate <>\nclass FooT<int>\n{\npublic:\n    \n    explicit FooT(const int& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << \"m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    int m_t;\n};\n\n// %%\nFooT<double> foot1(1.2);\nfoot1.print();\n\n// %%\nFooT<int> foot2(4);\nfoot2.print();\n\n// %% [markdown]\n// ## C++11 / C++14 support\n\n// %%\nclass Foo11\n{\npublic:\n    \n    Foo11() { std::cout << \"Foo11 default constructor\" << std::endl; }\n    Foo11(const Foo11&) { std::cout << \"Foo11 copy constructor\" << std::endl; }\n    Foo11(Foo11&&) { std::cout << \"Foo11 move constructor\" << std::endl; }\n};\n\n// %%\nFoo11 f1;\nFoo11 f2(f1);\nFoo11 f3(std::move(f1));\n\n// %%\n#include <vector>\n\nstd::vector<int> v = { 1, 2, 3};\nauto iter = ++v.begin();\nv\n\n// %%\n*iter\n\n// %% [markdown]\n// ... and also lambda, universal references, `decltype`, etc ...\n\n// %% [markdown]\n// ## Documentation and completion\n//\n//  - Documentation for types of the standard library is retrieved on cppreference.com.\n//  - The quick-help feature can also be enabled for user-defined types and third-party libraries. More documentation on this feature is available at https://xeus-cling.readthedocs.io/en/latest/inline_help.html.\n//\n\n// %%\n?std::vector\n\n// %% [markdown]\n// ## Using the `display_data` mechanism\n\n// %% [markdown]\n// For a user-defined type `T`, the rich rendering in the notebook and JupyterLab can be enabled by by implementing the function `xeus::xjson mime_bundle_repr(const T& im)`, which returns the JSON mime bundle for that type.\n//\n// More documentation on the rich display system of Jupyter and Xeus-cling is available at https://xeus-cling.readthedocs.io/en/latest/rich_display.html\n\n// %% [markdown]\n// ### Image example\n\n// %%\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace im\n{\n    struct image\n    {   \n        inline image(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const image& i)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"image/png\"] = xtl::base64encode(i.m_buffer.str());\n        return bundle;\n    }\n}\n\n// %%\nim::image marie(\"images/marie.png\");\nmarie\n\n// %% [markdown]\n// ### Audio example\n\n// %%\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace au\n{\n    struct audio\n    {   \n        inline audio(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const audio& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] =\n           std::string(\"<audio controls=\\\"controls\\\"><source src=\\\"data:audio/wav;base64,\")\n           + xtl::base64encode(a.m_buffer.str()) +\n            \"\\\" type=\\\"audio/wav\\\" /></audio>\";\n        return bundle;\n    }\n}\n\n// %%\nau::audio drums(\"audio/audio.wav\");\ndrums\n\n// %% [markdown]\n// ### Display\n\n// %%\n#include \"xcpp/xdisplay.hpp\"\n\n// %%\nxcpp::display(drums);\n\n// %% [markdown]\n// ### Update-display\n\n// %%\n#include <string>\n#include \"xcpp/xdisplay.hpp\"\n\nnamespace ht\n{\n    struct html\n    {   \n        inline html(const std::string& content)\n        {\n            m_content = content;\n        }\n        std::string m_content;\n    };\n\n    xeus::xjson mime_bundle_repr(const html& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] = a.m_content;\n        return bundle;\n    }\n}\n\n// A red rectangle\nht::html rect(R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: blue;\n    color: white;\n    text-align: center;'>\nOriginal\n</div>)\");\n\n// %%\nxcpp::display(rect, \"some_display_id\");\n\n// %%\n// Update the rectangle to be blue\nrect.m_content = R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: red;\n    color: white;\n    text-align: center;'>\nUpdated\n</div>)\";\n\nxcpp::display(rect, \"some_display_id\", true);\n\n// %% [markdown]\n// ## Magics\n//\n// Magics are special commands for the kernel that are not part of the C++ language.\n//\n// They are defined with the symbol `%` for a line magic and `%%` for a cell magic.\n//\n// More documentation for magics is available at https://xeus-cling.readthedocs.io/en/latest/magics.html.\n\n// %%\n#include <algorithm>\n#include <vector>\n\n// %%\nstd::vector<double> to_shuffle = {1, 2, 3, 4};\n\n// %%\n%timeit std::random_shuffle(to_shuffle.begin(), to_shuffle.end());\n\n// %% [markdown]\n// [![xtensor](images/xtensor.png)](https://github.com/QuantStack/xtensor/)\n//\n// - GitHub repository: https://github.com/QuantStack/xtensor/\n// - Online documentation: https://xtensor.readthedocs.io/\n// - NumPy to xtensor cheat sheet: http://xtensor.readthedocs.io/en/latest/numpy.html\n//\n// `xtensor` is a C++ library for manipulating N-D arrays with an API very similar to that of numpy.\n\n// %%\n#include <iostream>\n\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n#include \"xtensor/xview.hpp\"\n\nxt::xarray<double> arr1\n  {{1.0, 2.0, 3.0},\n   {2.0, 5.0, 7.0},\n   {2.0, 5.0, 7.0}};\n\nxt::xarray<double> arr2\n  {5.0, 6.0, 7.0};\n\nxt::view(arr1, 1) + arr2\n\n// %% [markdown]\n// Together with the C++ Jupyter kernel, `xtensor` offers a similar experience as `NumPy` in the Python Jupyter kernel, including broadcasting and universal functions.\n\n// %%\n#include <iostream>\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n\n// %%\nxt::xarray<int> arr\n  {1, 2, 3, 4, 5, 6, 7, 8, 9};\n\narr.reshape({3, 3});\n\nstd::cout << arr;\n\n// %%\n#include \"xtensor-blas/xlinalg.hpp\"\n\n// %%\nxt::xtensor<double, 2> m = {{1.5, 0.5}, {0.7, 1.0}};\nstd::cout << \"Matrix rank: \" << std::endl << xt::linalg::matrix_rank(m) << std::endl;\nstd::cout << \"Matrix inverse: \" << std::endl << xt::linalg::inv(m) << std::endl;\nstd::cout << \"Eigen values: \" << std::endl << xt::linalg::eigvals(m) << std::endl;\n\n// %%\nxt::xarray<double> arg1 = xt::arange<double>(9);\nxt::xarray<double> arg2 = xt::arange<double>(18);\n\narg1.reshape({3, 3});\narg2.reshape({2, 3, 3});\n\nstd::cout << xt::linalg::dot(arg1, arg2) << std::endl;\n\n// %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_hydrogen/xonsh_example.xsh",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Xonsh\n#     language: xonsh\n#     name: xonsh\n# ---\n\n# %%\nlen($(curl -L https://xon.sh))\n\n# %%\nfor filename in `.*`:\n    print(filename)\n    du -sh @(filename)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/Line_breaks_in_LateX_305.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    This cell uses no particular cell marker\n\n    $$\n    \\begin{align}\n    \\dot{x} & = \\sigma(y-x)\\\\\n    \\dot{y} & = \\rho x - y - xz \\\\\n    \\dot{z} & = -\\beta z + xy\n    \\end{align}\n    $$\n    \"\"\")\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    This cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n\n    $$\n    \\begin{align}\n    \\dot{x} & = \\sigma(y-x) \\\n    \\dot{y} & = \\rho x - y - xz \\\n    \\dot{z} & = -\\beta z + xy\n    \\end{align}\n    $$\n    \"\"\")\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n    $$\n    \\begin{align}\n    \\dot{x} & = \\sigma(y-x)\\\\\n    \\dot{y} & = \\rho x - y - xz \\\\\n    \\dot{z} & = -\\beta z + xy\n    \\end{align}\n    $$\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    import marimo as mo\n    return (mo,)\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/Notebook with function and cell metadata 164.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell\ndef _():\n    1 + 1\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    A markdown cell\n    And below, the cell for function f has non trivial cell metadata. And the next cell as well.\n    \"\"\")\n    return\n\n\n@app.function\ndef f(x):\n    return x\n\n\n@app.cell\ndef _():\n    f(5)\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    More text\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    2 + 2\n    return\n\n\n@app.cell\ndef _():\n    import marimo as mo\n    return (mo,)\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/Notebook with many hash signs.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    ##################################################################\n    This is a notebook that contains many hash signs.\n    Hopefully its python representation is not recognized as a Sphinx Gallery script...\n    ##################################################################\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    some = 1\n    code = 2\n    some+code\n\n    ##################################################################\n    # A comment\n    ##################################################################\n    # Another comment\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    ##################################################################\n    This is a notebook that contains many hash signs.\n    Hopefully its python representation is not recognized as a Sphinx Gallery script...\n    ##################################################################\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    import marimo as mo\n    return (mo,)\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/cat_variable.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell\ndef _():\n    cat = 42\n    return\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/frozen_cell.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell\ndef _():\n    # This is an unfrozen cell. Works as usual.\n    print(\"I'm a regular cell so I run and print!\")\n    return\n\n\n@app.cell\ndef _():\n    # This is an frozen cell\n    print(\"I'm frozen so Im not executed :(\")\n    return\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/jupyter.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    # Jupyter notebook\n\n    This notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    a = 1\n    b = 2\n    a + b\n    return a, b\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    Now we return a few tuples\n    \"\"\")\n    return\n\n\n@app.cell\ndef _(a, b):\n    a, b\n    return\n\n\n@app.cell\ndef _(a, b):\n    a, b, a+b\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    And this is already the end of the notebook\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    import marimo as mo\n    return (mo,)\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/notebook_with_complex_metadata.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell\ndef _():\n    return\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/plotly_graphs.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    This notebook contains complex outputs, including plotly javascript graphs.\n    \"\"\")\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    # Interactive plots\n    \"\"\")\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    We use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    import plotly.offline as offline\n    offline.init_notebook_mode(connected=True)\n    return\n\n\n@app.cell\ndef _():\n    import plotly.graph_objects as go\n    fig = go.Figure(\n        data=[go.Bar(y=[2, 3, 1])],\n        layout=go.Layout(title=\"bar plot\"))\n    fig.show()\n    fig.data[0].marker = dict(color='purple')\n    fig\n    return\n\n\n@app.cell\ndef _():\n    import marimo as mo\n    return (mo,)\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/sample_rise_notebook_66.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    A markdown cell\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    1+1\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    Markdown cell two\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    import marimo as mo\n    return (mo,)\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_marimo/text_outputs_and_images.py",
    "content": "import marimo\n\n__generated_with = \"0.17.8\"\napp = marimo.App()\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    This notebook contains outputs of many different types: text, HTML, plots and errors.\n    \"\"\")\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    # Text outputs\n\n    Using `print`, `sys.stdout` and `sys.stderr`\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    import sys\n    print('using print')\n    sys.stdout.write('using sys.stdout.write')\n    sys.stderr.write('using sys.stderr.write')\n    return\n\n\n@app.cell\ndef _():\n    import logging\n    logging.debug('Debug')\n    logging.info('Info')\n    logging.warning('Warning')\n    logging.error('Error')\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    # HTML outputs\n\n    Using `pandas`. Here we find two representations: both text and HTML.\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    import pandas as pd\n    pd.DataFrame([4])\n    return (pd,)\n\n\n@app.cell\ndef _(pd):\n    from IPython.display import display\n    display(pd.DataFrame([5]))\n    display(pd.DataFrame([6]))\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    # Images\n    \"\"\")\n    return\n\n\n@app.cell\ndef _():\n    # '%matplotlib inline' command supported automatically in marimo\n    return\n\n\n@app.cell\ndef _():\n    # First plot\n    from matplotlib import pyplot as plt\n    import numpy as np\n    w, h = 3, 3\n    data = np.zeros((h, w, 3), dtype=np.uint8)\n    data[0,:] = [0,255,0]\n    data[1,:] = [0,0,255]\n    data[2,:] = [0,255,0]\n    data[1:3,1:3] = [255, 0, 0]\n    plt.imshow(data)\n    plt.axis('off')\n    plt.show()\n    # Second plot\n    data[1:3,1:3] = [255, 255, 0]\n    plt.imshow(data)\n    plt.axis('off')\n    plt.show()\n    return\n\n\n@app.cell(hide_code=True)\ndef _(mo):\n    mo.md(r\"\"\"\n    # Errors\n    \"\"\")\n    return\n\n\n@app.cell\ndef _(undefined_variable):\n    undefined_variable\n    return\n\n\n@app.cell\ndef _():\n    import marimo as mo\n    return (mo,)\n\n\nif __name__ == \"__main__\":\n    app.run()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/Line_breaks_in_LateX_305.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\nThis cell uses no particular cell marker\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n\n\nThis cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x) \\\n\\dot{y} & = \\rho x - y - xz \\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n\n\nThis cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/Notebook with function and cell metadata 164.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\n1 + 1\n```\n\nA markdown cell\nAnd below, the cell for function f has non trivial cell metadata. And the next cell as well.\n\n```python attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\ndef f(x):\n    return x\n```\n\n```python attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\nf(5)\n```\n\nMore text\n\n```python\n2 + 2\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/Notebook with html and latex cells.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```html\n<p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>\n```\n\n```latex\n$\\frac{\\pi}{2}$\n```\n\n```python\n%load_ext rpy2.ipython\n```\n\n```R\nlibrary(ggplot2)\nggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\n```\n\n```python\n%matplotlib inline\nimport pandas as pd\npd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/Notebook with many hash signs.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n##################################################################\nThis is a notebook that contains many hash signs.\nHopefully its python representation is not recognized as a Sphinx Gallery script...\n##################################################################\n\n```python\nsome = 1\ncode = 2\nsome+code\n\n##################################################################\n# A comment\n##################################################################\n# Another comment\n```\n\n##################################################################\nThis is a notebook that contains many hash signs.\nHopefully its python representation is not recognized as a Sphinx Gallery script...\n##################################################################\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/Notebook with metadata and long cells.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n# Part one - various cells\n\n<!-- #region -->\nHere we have a markdown cell\n\n\nwith two blank lines\n<!-- #endregion -->\n\n<!-- #region -->\nNow we have a markdown cell\nwith a code block inside it\n\n```python\n1 + 1\n```\n\nAfter that cell we'll have a code cell\n<!-- #endregion -->\n\n```python\n2 + 2\n\n\n3 + 3\n```\n\nFollowed by a raw cell\n\n<!-- #raw -->\nThis is \nthe content\nof the raw cell\n<!-- #endraw -->\n\n# Part two - cell metadata\n\n<!-- #region key=\"value\" -->\nThis is a markdown cell with cell metadata `{\"key\": \"value\"}`\n<!-- #endregion -->\n\n```python .class tags=[\"parameters\"]\n\"\"\"This is a code cell with metadata `{\"tags\":[\"parameters\"], \".class\":null}`\"\"\"\n```\n\n<!-- #raw key=\"value\" -->\nThis is a raw cell with cell metadata `{\"key\": \"value\"}`\n<!-- #endraw -->\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/Notebook_with_R_magic.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 2\n    language: python\n    name: python2\n---\n\n# A notebook with R cells\n\nThis notebook shows the use of R cells to generate plots\n\n```python\n%load_ext rpy2.ipython\n```\n\n```R\nsuppressMessages(require(tidyverse))\n```\n\n```R\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n\nThe default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\n\n```R magic_args=\"-w 400 -h 240\"\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/Notebook_with_more_R_magic_111.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\n%load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n```\n\n```R magic_args=\"-i df\"\nlibrary(\"ggplot2\")\nggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/R notebook with invalid cell keys.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: R\n    language: R\n    name: ir\n---\n\nThis notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\n```R\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/Reference Guide for Calysto Scheme.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Calysto Scheme (Python)\n    language: scheme\n    name: calysto_scheme\n---\n\n<img src=\"images/logo-64x64.png\"/>\n<h1>Reference Guide for Calysto Scheme</h1>\n\n[Calysto Scheme](https://github.com/Calysto/calysto_scheme) is a real Scheme programming language, with full support for continuations, including call/cc. It can also use all Python libraries. Also has some extensions that make it more useful (stepper-debugger, choose/fail, stack traces), or make it better integrated with Python.\n\nIn Jupyter notebooks, because Calysto Scheme uses [MetaKernel](https://github.com/Calysto/metakernel/blob/master/README.rst), it has a fully-supported set of \"magics\"---meta-commands for additional functionality. This includes running Scheme in parallel. See all of the [MetaKernel Magics](https://github.com/Calysto/metakernel/blob/master/metakernel/magics/README.md).\n\nCalysto Scheme is written in Scheme, and then translated into Python (and other backends). The entire functionality lies in a single Python file: https://github.com/Calysto/calysto_scheme/blob/master/calysto_scheme/scheme.py However, you can easily install it (see below).\n\nPlease see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n\n## Installation\n\nYou can install Calysto Scheme with Python3:\n\n```\npip3 install --upgrade calysto-scheme --user -U\npython3 -m calysto_kernel install --user\n```\n\nor in the system kernel folder with:\n\n```\nsudo pip3 install --upgrade calysto-scheme -U\nsudo python3 -m calysto_kernel install\n```\n\nChange pip3/python3 to use a different pip or Python. The version of Python used will determine how Calysto Scheme is run.\n\nUse it in the console, qtconsole, or notebook with IPython 3:\n\n```\nipython console --kernel calysto_scheme\nipython qtconsole --kernel calysto_scheme\nipython notebook --kernel calysto_scheme\n```\n\nIn addition to all of the following items, Calysto Scheme also has access to all of Python's builtin functions, and all of Python's libraries. For example, you can use `(complex 3 2)` to create a complex number by calling Python's complex function.\n\n## Jupyter Enhancements\n\nWhen you run Calysto Scheme in Jupyter (console, notebook, qtconsole, etc.) you get:\n\n* TAB completions of Scheme functions and variable names\n* display of rich media\n* stepper/debugger\n* magics (% macros)\n* shell commands (! command)\n* LaTeX equations\n* LaTeX-style variables\n* Python integration\n\n\n### LaTeX-style variables\n\nCalysto Scheme allows you to use LaTeX-style variables in code. For example, if you type:\n\n```\n\\beta\n```\n\nwith the cursor right after the 'a' in beta, and then press TAB, it will turn into the unicode character:\n\n```\nβ\n```\n\nThere are nearly 1300 different symbols defined (thanks to the Julia language) and documented here:\n\nhttp://docs.julialang.org/en/release-0.4/manual/unicode-input/#man-unicode-input\n\nCalysto Scheme may not implement all of those. Some useful and suggestive ones:\n\n* \\pi - π\n* \\Pi - Π\n* \\Sigma - Σ\n* \\_i - subscript i, such as vectorᵢ\n\n```scheme\n(define α 67)\n```\n\n```scheme\nα\n```\n\n```scheme\n(define i 2)\n(define vectorᵢ (vector-ref (vector 0 6 3 2) i))\nvectorᵢ\n```\n\n### Rich media\n\n```scheme\n(import \"calysto.display\")\n```\n\n```scheme\n(calysto.display.HTML \"This is <b>bold</b>, <i>italics</i>, <u>underlined</u>.\")\n```\n\n```scheme\n(import \"calysto.graphics\")\n```\n\n```scheme\n(define canvas (calysto.graphics.Canvas))\n```\n\n```scheme\n(define ball (calysto.graphics.Circle '(150 150) 100))\n```\n\n```scheme\n(ball.draw canvas)\n```\n\n### Shell commands\n\n```scheme\n! ls /tmp\n```\n\n### Stepper/Debugger\n\nHere is what the debugger looks like:\n\n<img src=\"images/stepper_debugger.png\">\n\nIt has breakpoints (click in left margin). You must press Stop to exit the debugger.\n\n<!-- #region -->\n```scheme\n%%debug\n\n(begin\n (define x 1)\n (set! x 2)\n)\n```\n<!-- #endregion -->\n\n### Python Integration\n\nYou can import and use any Python library in Calysto Scheme.\n\nIn addition, if you wish, you can execute expressions and statements in a Python environment:\n\n```scheme\n(python-eval \"1 + 2\")\n```\n\n```scheme\n(python-exec \n\"\ndef mypyfunc(a, b):\n    return a * b\n\")\n```\n\nThis is a shared environment with Scheme:\n\n```scheme\n(mypyfunc 4 5)\n```\n\nYou can use `func` to turn a Scheme procedure into a Python function, and `define!` to put it into the shared environment with Python:\n\n```scheme\n(define! mypyfunc2 (func (lambda (n) n)))\n```\n\n```scheme\n(python-eval \"mypyfunc2(34)\")\n```\n\n# Differences Between Languages\n\n## Major differences between Scheme and Python\n\n1. In Scheme, double quotes are used for strings and may contain newlines\n1. In Scheme, a single quote is short for (quote ...) and means \"literal\"\n1. In Scheme, everything is an expression and has a return value\n1. Python does not support macros (e.g., extending syntax)\n1. In Python, \"if X\" is false if X is None, False, [], (,) or 0. In Scheme, \"if X\" is only false if X is #f or 0\n1. Calysto Scheme uses continuations, not the call stack. However, for debugging there is a pseudo-stack when an error is raised. You can turn that off with (use-stack-trace #f)\n1. Scheme procedures are not Python functions, but there are means to use one as the other.\n\n## Major Differences Between Calysto Scheme and other Schemes\n\n1. define-syntax works slightly differently\n1. In Calysto Scheme, #(...) is short for '#(...)\n1. Calysto Scheme is missing many standard functions (see list at bottom)\n1. Calysto Scheme has a built-in amb operator called `choose`\n1. For debugging there is a pseudo-stack when errors are raised in Calysto Scheme. You can turn that off with (use-stack-trace #f)\n\n### Stack Trace\n\nCalysto Scheme acts as if it has a call stack, for easier debugging. For example:\n\n```scheme\n(define fact\n    (lambda (n)\n      (if (= n 1)\n           q\n           (* n (fact (- n 1))))))\n```\n\n```scheme\n(fact 5)\n```\n\n<!-- #region -->\nTo turn off the stack trace on error:\n\n```scheme\n(use-stack-trace #f)\n```\nThat will allow infinite recursive loops without keeping track of the \"stack\".\n<!-- #endregion -->\n\n# Calysto Scheme Variables\n\n## SCHEMEPATH\nSCHEMEPATH is a list of search directories used with (load NAME). This is a reference, so you should append to it rather than attempting to redefine it.\n\n```scheme\nSCHEMEPATH\n```\n\n```scheme\n(set-cdr! (cdr SCHEMEPATH) (list \"/var/modules\"))\n```\n\n```scheme\nSCHEMEPATH\n```\n\n## Getting Started\n\nNote that you can use the word `lambda` or \\lambda and then press [TAB]\n\n```scheme\n(define factorial\n  (λ (n)\n     (cond\n      ((zero? n) 1)\n      (else (* n (factorial (- n 1)))))))\n```\n\n```scheme\n(factorial 5)\n```\n\n## define-syntax\n(define-syntax NAME RULES): a method for creating macros\n\n```scheme\n(define-syntax time \n  [(time ?exp) (let ((start (current-time)))\n                 ?exp\n                 (- (current-time) start))])\n```\n\n```scheme\n(time (car '(1 2 3 4)))\n```\n\n```scheme\n;;---------------------------------------------------------------------\n;; collect is like list comprehension in Python\n\n(define-syntax collect\n  [(collect ?exp for ?var in ?list)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) #t) ?list)]\n  [(collect ?exp for ?var in ?list if ?condition)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) ?condition) ?list)])\n\n(define filter-map\n  (lambda (f pred? values)\n    (if (null? values)\n      '()\n      (if (pred? (car values))\n          (cons (f (car values)) (filter-map f pred? (cdr values)))\n          (filter-map f pred? (cdr values))))))\n```\n\n```scheme\n(collect (* n n) for n in (range 10))\n```\n\n```scheme\n(collect (* n n) for n in (range 5 20 3))\n```\n\n```scheme\n(collect (* n n) for n in (range 10) if (> n 5))\n```\n\n```scheme\n;;---------------------------------------------------------------------\n;; for loops\n\n(define-syntax for\n  [(for ?exp times do . ?bodies)\n   (for-repeat ?exp (lambda () . ?bodies))]\n  [(for ?var in ?exp do . ?bodies)\n   (for-iterate1 ?exp (lambda (?var) . ?bodies))]\n  [(for ?var at (?i) in ?exp do . ?bodies)\n   (for-iterate2 0 ?exp (lambda (?var ?i) . ?bodies))]\n  [(for ?var at (?i ?j . ?rest) in ?exp do . ?bodies)\n   (for ?var at (?i) in ?exp do\n     (for ?var at (?j . ?rest) in ?var do . ?bodies))])\n\n(define for-repeat\n  (lambda (n f)\n    (if (< n 1)\n      'done\n      (begin\n        (f)\n        (for-repeat (- n 1) f)))))\n\n(define for-iterate1\n  (lambda (values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values))\n        (for-iterate1 (cdr values) f)))))\n\n(define for-iterate2\n  (lambda (i values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values) i)\n        (for-iterate2 (+ i 1) (cdr values) f)))))\n```\n\n```scheme\n(define matrix2d\n  '((10 20)\n    (30 40)\n    (50 60)\n    (70 80)))\n\n(define matrix3d\n  '(((10 20 30) (40 50 60))\n    ((70 80 90) (100 110 120))\n    ((130 140 150) (160 170 180))\n    ((190 200 210) (220 230 240))))\n```\n\n```scheme\n(begin \n (define hello 0)\n (for 5 times do (set! hello (+ hello 1)))\n hello\n )\n```\n\n```scheme\n(for sym in '(a b c d) do (define x 1) (set! x sym) (print x))\n```\n\n```scheme\n(for n in (range 10 20 2) do (print n))\n```\n\n```scheme\n(for n at (i j) in matrix2d do (print (list n 'coords: i j)))\n```\n\n```scheme\n(for n at (i j k) in matrix3d do (print (list n 'coords: i j k)))\n```\n\n```scheme\n(define-syntax scons\n  [(scons ?x ?y) (cons ?x (lambda () ?y))])\n\n(define scar car)\n\n(define scdr\n  (lambda (s)\n    (let ((result ((cdr s))))\n      (set-cdr! s (lambda () result))\n      result)))\n\n(define first\n  (lambda (n s)\n    (if (= n 0)\n      '()\n      (cons (scar s) (first (- n 1) (scdr s))))))\n\n(define nth\n  (lambda (n s)\n    (if (= n 0)\n      (scar s)\n      (nth (- n 1) (scdr s)))))\n\n(define smap\n  (lambda (f s)\n    (scons (f (scar s)) (smap f (scdr s)))))\n\n(define ones (scons 1 ones))\n\n(define nats (scons 0 (combine nats + ones)))\n\n(define combine\n  (lambda (s1 op s2)\n    (scons (op (scar s1) (scar s2)) (combine (scdr s1) op (scdr s2)))))\n\n(define fibs (scons 1 (scons 1 (combine fibs + (scdr fibs)))))\n\n(define facts (scons 1 (combine facts * (scdr nats))))\n\n(define ! (lambda (n) (nth n facts)))\n```\n\n```scheme\n(! 5)\n```\n\n```scheme\n(nth 10 facts)\n```\n\n```scheme\n(nth 20 fibs)\n```\n\n```scheme\n(first 30 fibs)\n```\n\n## for-each\n(for-each PROCEDURE LIST): apply PROCEDURE to each item in LIST; like `map` but don't return results\n\n```scheme\n(for-each (lambda (n) (print n)) '(3 4 5))\n```\n\n## format\n(format STRING ITEM ...): format the string with ITEMS as arguments\n\n```scheme\n(format \"This uses formatting ~a ~s ~%\" 'apple 'apple)\n```\n\n## func\n\nTurns a lambda into a Python function.\n\n(func (lambda ...))\n\n```scheme\n(func (lambda (n) n))\n```\n\n## There's more!\n\nPlease see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/The flavors of raw cells.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n<!-- #raw raw_mimetype=\"text/latex\" -->\n$1+1$\n<!-- #endraw -->\n\n<!-- #raw raw_mimetype=\"text/restructuredtext\" -->\n:math:`1+1`\n<!-- #endraw -->\n\n<!-- #raw raw_mimetype=\"text/html\" -->\n<b>Bold text<b>\n<!-- #endraw -->\n\n<!-- #raw raw_mimetype=\"text/markdown\" -->\n**Bold text**\n<!-- #endraw -->\n\n<!-- #raw raw_mimetype=\"text/x-python\" -->\n1 + 1\n<!-- #endraw -->\n\n<!-- #raw -->\nNot formatted\n<!-- #endraw -->\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/cat_variable.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\ncat = 42\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/coconut_homepage_demo.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Coconut\n    language: coconut\n    name: coconut\n---\n\nTaken from [coconut-lang.org](coconut-lang.org)\n\n\npipeline-style programming\n\n```coconut\n\"hello, world!\" |> print\n```\n\n prettier lambdas\n\n```coconut\nx -> x ** 2\n```\n\npartial application\n\n```coconut\nrange(10) |> map$(pow$(?, 2)) |> list\n```\n\npattern-matching\n\n```coconut\nmatch [head] + tail in [0, 1, 2, 3]:\n    print(head, tail)\n```\n\ndestructuring assignment\n\n```coconut\n{\"list\": [0] + rest} = {\"list\": [0, 1, 2, 3]}\n```\n\ninfix notation\n\n```coconut\n# 5 `mod` 3 == 2\n```\n\noperator functions\n\n```coconut\nproduct = reduce$(*)\n```\n\nfunction composition\n\n```coconut\n# (f..g..h)(x, y, z)\n```\n\nlazy lists\n\n```coconut\n# (| first_elem() |) :: rest_elems()\n```\n\nparallel programming\n\n```coconut\nrange(100) |> parallel_map$(pow$(2)) |> list\n```\n\ntail call optimization\n\n```coconut\ndef factorial(n, acc=1):\n    case n:\n        match 0:\n            return acc\n        match _ is int if n > 0:\n            return factorial(n-1, acc*n)\n```\n\nalgebraic data types\n\n```coconut\ndata Empty()\ndata Leaf(n)\ndata Node(l, r)\n\ndef size(Empty()) = 0\n\naddpattern def size(Leaf(n)) = 1\n\naddpattern def size(Node(l, r)) = size(l) + size(r)\n```\n\nand much more!\n\nLike what you see? Don't forget to star Coconut on GitHub!\n\n```coconut\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/convert_to_py_then_test_with_update83.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\n%%time\n\nprint('asdf')\n```\n\nThanks for jupytext!\n\n```python\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/csharp.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: .NET (C#)\n    language: C#\n    name: .net-csharp\n---\n\nWe start with...\n\n```csharp\nConsole.WriteLine(\"Hello World!\");\n```\n\nThen we do a plot with Plotly, following the [Plotting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Plotting%20with%20Xplot.ipynb) example from `dotnet/interactive`:\n\n```csharp\nusing XPlot.Plotly;\n\nvar bar = new Graph.Bar\n{\n    name = \"Bar\",\n    x = new[] {'A', 'B', 'C'},\n    y = new[] {1, 3, 2}\n};\n\nvar chart = Chart.Plot(new[] {bar});\nchart.WithTitle(\"A bar plot\");\ndisplay(chart);\n```\n\nWe also test the math outputs as in the [Math and Latex](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Math%20and%20LaTeX.ipynb) example:\n\n```csharp\n(LaTeXString)@\"\\begin{align} e^{i \\pi} = -1\\end{align}\"\n```\n\n```csharp\n(MathString)@\"e^{i \\pi} = -1\"\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/demo_gdl_fbp.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: IDL [conda env:gdl] *\n    language: IDL\n    name: conda-env-gdl-idl\n---\n\n## GDL demo notebook\n\n\nDemonstration of GDL [(gnudatalanguage)](https://github.com/gnudatalanguage/gdl)\n\nThis notebook creates a Shepp-Logan phantom, projects it and then performs an FBP reconstruction.\n\n```idl\n;; L.A. Shepp and B.F. Logan, “The Fourier reconstruction of a head section,”\n;; IEEE Trans. Nucl. Sci. 21(3), 21–43 (1974).\nfunction shepplogan, size = size\n\n  if NOT keyword_set(size) then size = 256\n\n  phantom = fltarr(size,size)\n\n  tmp  = (findgen(size)-((size-1)/2.0)) / (size/2.0)\n  xcor = rebin(tmp,size,size)\n  ycor = rebin(transpose(tmp),size,size)\n  tmp  = fltarr(size,size)\n  \n  aa={cx: 0.0,  cy: 0.0,    maj:0.69,   min:0.92,  theta:  0.0, val: 2.0 }\n  bb={cx: 0.0,  cy:-0.0184, maj:0.6624, min:0.874, theta:  0.0, val:-0.98}\n  cc={cx: 0.22, cy: 0.0,    maj:0.11,   min:0.31,  theta:-18.0, val:-0.02}\n  dd={cx:-0.22, cy: 0.0,    maj:0.16,   min:0.41,  theta: 18.0, val:-0.02}\n  ee={cx: 0.0,  cy: 0.35,   maj:0.21,   min:0.25,  theta:  0.0, val:-0.01}\n  ff={cx: 0.0,  cy: 0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  gg={cx: 0.0,  cy:-0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  hh={cx:-0.08, cy:-0.605,  maj:0.046,  min:0.023, theta:  0.0, val:-0.01}\n  ii={cx: 0.0,  cy:-0.605,  maj:0.023,  min:0.023, theta:  0.0, val:-0.01}\n  jj={cx: 0.06, cy:-0.605,  maj:0.023,  min:0.046, theta:  0.0, val:-0.01}\n\n  list = [aa,bb,cc,dd,ee,ff,gg,hh,ii,jj]\n  for n = 0, n_elements(list)-1 do begin\n\n     tmp = ((xcor-list[n].cx) / list[n].maj)^2 $\n           + ((ycor-list[n].cy) / list[n].min)^2\n     \n     if list[n].theta NE 0 then begin\n        nx = (size-1) * (list[n].cx + 1) / 2\n        ny = (size-1) * (list[n].cy + 1) / 2\n        tmp = rot(tmp, -list[n].theta, 1, nx, ny, /interp, /pivot)\n     endif\n     \n     phantom[where(tmp LE 1.0)] += list[n].val\n     \n  endfor\n  \n  return, phantom < 1.1\n  \nend\n```\n\n```idl\n;; Enable inline plotting\n!inline=1\n```\n\n```idl\nphantom = shepplogan()\nwindow, 0, xsize=256, ysize=256\ntvscl, phantom > 0.95\n```\n\nNow we define simple forward and backprojection functions:\n\n```idl\nfunction proj, image, angle\n\n    sino_size_x = max(size(image,/dim))\n    sino_size_y = n_elements(angle)\n\n    sino = fltarr(sino_size_x, sino_size_y)\n    \n    for aa=0, n_elements(angle)-1 do begin\n    \n        sino[*,aa] = total(rot(image, angle[aa], /interp), 2)\n    \n    endfor\n\n    return, sino\n    \nend\n```\n\n```idl\nfunction back, sino, angle\n\n    image_size = n_elements(sino[*,0])\n    image = fltarr(image_size,image_size)\n\n    for aa=0, n_elements(angle)-1 do begin\n    \n        image += rot(rebin(sino[*,aa],[image_size,image_size]), -angle[aa], /interp)\n    \n    endfor\n\n    return, image / n_elements(angle)\n\nend\n```\n\nThis allows us to create a sinogram:\n\n```idl\nangles = findgen(360)\nsino = proj(phantom, angles)\nwindow, 0, xsize=256, ysize=360\ntvscl, sino\n```\n\nOn this we can apply a simple FBP reconstruction:\n\n```idl\n;; G.L. Zeng, “Revisit of the Ramp Filter,”\n;; IEEE Trans. Nucl. Sci. 62(1), 131–136 (2015).\nfunction fbp, sino, angles\n  \n  ntot = n_elements(sino[*,0])\n  nang = n_elements(sino[0,*])\n  npos = ntot / 2 + 1           ; integer division needed !\n  nneg = ntot - npos\n\n  freq = findgen(ntot)\n  freq[npos:ntot-1] = REVERSE(freq[1:nneg])\n  freq[0] = 1\n\n  filter = -1 / (!pi * freq)^2\n  filter[where(freq mod 2 EQ 0)] *= -0.0\n  filter[0] = 0.25\n\n  filter = abs(fft(filter)) * ntot\n  filter[ntot/4:ntot/4+ntot/2-1] *= 0.0\n  filter = rebin(filter,ntot,nang)\n\n  ;; apply filter to the sinogram\n  fsino  = fft(sino,  dim=1)\n  fsino *= filter\n  fsino  = fft(fsino, dim=1, /overwrite, /inverse)\n  fsino  = !pi * real_part(fsino)\n\n  ;; backproject the filtered sinogram\n  return, back(fsino, angles)\n\nend\n```\n\n```idl\nreconstruction = fbp(sino, angles)\nwindow, 0, xsize=512, ysize=256\n\ntvscl, [phantom, reconstruction] > 0.8\n```\n\n### The end\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/evcxr_jupyter_tour.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Rust\n    language: rust\n    name: rust\n---\n\n# Tour of the EvCxR Jupyter Kernel\nFor those not already familiar with Jupyter notebook, it lets you write code into \"cells\" like the box below. Cells can alternatively contain markdown, like this text here. Each code cell is compiled and executed separately, but variables, defined functions etc persist between cells.\n\n## Printing to outputs and evaluating expressions\nLets print something to stdout and stderr then return a final expression to see how that's presented. Note that stdout and stderr are separate streams, so may not appear in the same order is their respective print statements.\n\n```rust\nprintln!(\"Hello world\");\neprintln!(\"Hello error\");\nformat!(\"Hello {}\", \"world\")\n```\n\n## Assigning and making use of variables\nWe define a variable `message`, then in the subsequent cell, modify the string and finally print it out. We could also do all this in the one cell if we wanted.\n\n```rust\nlet mut message = \"Hello \".to_owned();\n```\n\n```rust\nmessage.push_str(\"world!\");\n```\n\n```rust\nmessage\n```\n\n## Defining and redefining functions\nNext we'll define a function\n\n```rust\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {0} else {fib(x - 2) + fib(x - 1)}\n}\n```\n\n```rust\n(1..13).map(fib).collect::<Vec<i32>>()\n```\n\nHmm, that doesn't look right. Lets redefine the function. In practice, we'd go back and edit the function above and reevaluate it, but here, lets redefine it in a separate cell.\n\n```rust\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {2} else {fib(x - 2) + fib(x - 1)}\n}\n```\n\n```rust\nlet values = (1..13).map(fib).collect::<Vec<i32>>();\nvalues\n```\n\n## Spawning a separate thread and communicating with it\nWe can spawn a thread to do stuff in the background, then continue executing code in other cells.\n\n```rust\nuse std::sync::{Mutex, Arc};\nlet counter = Arc::new(Mutex::new(0i32));\nstd::thread::spawn({\n    let counter = Arc::clone(&counter);\n    move || {\n        for i in 1..300 {\n            *counter.lock().unwrap() += 1;\n            std::thread::sleep(std::time::Duration::from_millis(100));\n        }\n}});\n```\n\n```rust\n*counter.lock().unwrap()\n```\n\n```rust\n*counter.lock().unwrap()\n```\n\n## Loading external crates\nWe can load external crates. This one takes a while to compile, but once it's compiled, subsequent cells shouldn't need to recompile it, so it should be much quicker.\n\n```rust\n:dep base64 = \"0.10.1\"\nbase64::encode(&vec![1, 2, 3, 4])\n```\n\n## Customizing how types are displayed\nWe can also customize how our types are displayed, including presenting them as HTML. Here's an example where we define a custom display function for a type `Matrix`.\n\n```rust\nuse std::fmt::Debug;\npub struct Matrix<T> {pub values: Vec<T>, pub row_size: usize}\nimpl<T: Debug> Matrix<T> {\n    pub fn evcxr_display(&self) {\n        let mut html = String::new();\n        html.push_str(\"<table>\");\n        for r in 0..(self.values.len() / self.row_size) {\n            html.push_str(\"<tr>\");\n            for c in 0..self.row_size {\n                html.push_str(\"<td>\");\n                html.push_str(&format!(\"{:?}\", self.values[r * self.row_size + c]));\n                html.push_str(\"</td>\");\n            }\n            html.push_str(\"</tr>\");            \n        }\n        html.push_str(\"</table>\");\n        println!(\"EVCXR_BEGIN_CONTENT text/html\\n{}\\nEVCXR_END_CONTENT\", html);\n    }\n}\n```\n\n```rust\nlet m = Matrix {values: vec![1,2,3,4,5,6,7,8,9], row_size: 3};\nm\n```\n\nWe can also return images, we just need to base64 encode them. First, we set up code for displaying RGB and grayscale images.\n\n```rust\nextern crate image;\nextern crate base64;\npub trait EvcxrResult {fn evcxr_display(&self);}\nimpl EvcxrResult for image::RgbImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::RGB(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\nimpl EvcxrResult for image::GrayImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::Gray(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\n```\n\n```rust\nimage::ImageBuffer::from_fn(256, 256, |x, y| {\n    if (x as i32 - y as i32).abs() < 3 {\n        image::Rgb([0, 0, 255])\n    } else {\n        image::Rgb([0, 0, 0])\n    }\n})\n```\n\n## Display of compilation errors\nHere's how compilation errors are presented. Here we forgot an & and passed a String instead of an &str.\n\n```rust\nlet mut s = String::new();\ns.push_str(format!(\"foo {}\", 42));\n```\n\n## Seeing what variables have been defined\nWe can print a table of defined variables and their types with the :vars command.\n\n```rust\n:vars\n```\n\nOther built-in commands can be found via :help\n\n```rust\n:help\n```\n\n```rust\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/frozen_cell.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n```\n\n```python deletable=false editable=false run_control={\"frozen\": true}\n# This is an frozen cell\nprint(\"I'm frozen so Im not executed :(\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/fsharp.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: .NET (F#)\n    language: F#\n    name: .net-fsharp\n---\n\nThis notebook was inspired by [Plottting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/fsharp/Docs/Plotting%20with%20Xplot.ipynb).\n\n```fsharp\nopen XPlot.Plotly\n```\n\n```fsharp\nlet bar =\n    Bar(\n        name = \"Bar 1\",\n        x = [\"A\"; \"B\"; \"C\"],\n        y = [1; 3; 2])\n\n[bar]\n|> Chart.Plot\n|> Chart.WithTitle \"A sample bar plot\"\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/gnuplot_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: gnuplot\n    language: gnuplot\n    name: gnuplot\n---\n\n# Sample gnuplot notebook\n\n\n## Simple plotting\n\n```gnuplot\n# Plot sin and cos with different linetypes\n\nf(x) = sin(x)\ng(x) = cos(x)\nset xrange[0:2*pi]\nset xtics(0, \"{/Symbol p}\" pi , \"2{/Symbol p}\" 2*pi)\nset ytics 1\nplot f(x) linewidth 2 title \"sin(x)\", \\\n    g(x) linewidth 2 dashtype \"--\" title \"cos(x)\"\n```\n\n## Example of line magic\n\n```gnuplot\n%gnuplot inline pngcairo enhanced background rgb \"#EEEEEE\" size 600, 600\n# Parametric plot without border\n\nreset\nset parametric\nset size ratio -1\nunset border\nunset tics\nplot f(t), g(t) linewidth 2 notitle\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/haskell_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Haskell\n    language: haskell\n    name: haskell\n---\n\n# Example Haskell Notebook\n\n\nDefine a function to add two numbers.\n\n```haskell\nf :: Num a => a -> a -> a\nf x y = x + y\n```\n\nTry to use the function\n\n```haskell\nf 1 2 \n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/hello_world_gonb.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Go (gonb)\n    language: go\n    name: gonb\n---\n\nA notebook that use [GoNB](https://github.com/janpfeifer/gonb)\n\n\nthe code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb)\n\n```go\nfunc main() {\n    fmt.Printf(\"Hello World!\")\n}\n```\n\n```go\n%%\nfmt.Printf(\"Hello World!\")\n```\n\n%% --who=world can pass flags to main func\n\n```go\nimport (\n    \"flag\"\n    \"fmt\"\n)\n\nvar flagWho = flag.String(\"who\", \"\", \"Your name!\")\n\n%% --who=world\nfmt.Printf(\"Hello %s!\\n\", *flagWho)\n```\n\n%args also can pass flags\n\n```go\n%args --who=Wally\n\nfunc main() {\n    flag.Parse()\n    fmt.Printf(\"Where is %s?\", *flagWho)\n}\n```\n\n```go\nimport \"github.com/janpfeifer/gonb/gonbui\"\n\n%%\ngonbui.DisplayHtml(`<span style=\"background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;\">I 🧡 GoNB!</span>`)\n```\n\n```go\n%%\ngonbui.DisplayMarkdown(\"#### Objective\\n\\n1. Have fun coding **Go**;\\n1. Profit...\\n\"+\n                       `$$f(x) = \\int_{-\\infty}^{\\infty} e^{-x^2} dx$$`)\n```\n\n```go\nfunc init_a() {\n    fmt.Println(\"init_a\")\n}\n%%\nfmt.Println(\"main\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/html-demo.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Clojure\n    language: clojure\n    name: clojure\n---\n\n# Clojupyter Demo\n\nThis example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.\nThis notebook demonstrates some of the more advanced features of Clojupyter.\n\n\n## Displaying HTML\n\nTo display HTML, you'll need to require a clojupyter helper function to change the cell output\n\n```clojure\n(require '[clojupyter.misc.display :as display])\n```\n\n```clojure\n(println \">> should print some text\")\n;; displaying html\n(display/hiccup-html \n    [:ul \n     [:li \"a \" [:i \"emphatic\"] \" idea\"]\n     [:li \"a \" [:b \"bold\"] \" idea\"]\n     [:li \"an \" [:span {:style \"text-decoration: underline;\"} \"important\"] \" idea\"]])\n```\n\nWe can also use this to render SVG:\n\n```clojure\n(display/hiccup-html\n    [:svg {:height 100 :width 100 :xmlns \"http://www.w3.org/2000/svg\"}\n            [:circle {:cx 50 :cy 40 :r 40 :fill \"red\"}]])\n```\n\n## Adding External Clojure Dependencies \n\nYou can fetch external Clojure dependencies using the `clojupyter.misc.helper` namespace. \n\n```clojure\n(require '[clojupyter.misc.helper :as helper])\n```\n\n```clojure\n(helper/add-dependencies '[org.clojure/data.json \"0.2.6\"])\n(require '[clojure.data.json :as json])\n```\n\n```clojure\n(json/write-str {:a 1 :b [2, 3] :c \"c\"})\n```\n\n## Adding External Javascript Dependency\n\nSince you can render arbitrary HTML using `display/hiccup-html`, it's pretty easy to use external Javascript libraries to do things like generate charts. Here's an example using [Highcharts](https://www.highcharts.com/).\n\nFirst, we use a cell to add javascript to the running notebook:\n\n```clojure\n(helper/add-javascript \"https://code.highcharts.com/highcharts.js\")\n```\n\nNow we define a function which takes Clojure data and returns hiccup HTML to display:\n\n```clojure\n(defn plot-highchart [highchart-json]\n  (let [id (str (java.util.UUID/randomUUID))\n        code (format \"Highcharts.chart('%s', %s );\" id, (json/write-str highchart-json))]\n      (display/hiccup-html \n        [:div [:div {:id id :style {:background-color \"red\"}}]\n                   [:script code]])))\n```\n\nNow we can make generate interactive plots (try hovering over plot):\n\n```clojure\n(def raw-data (map #(+ (* 22 (+ % (Math/random)) 78)) (range)))\n(def data-1 (take 500 raw-data))\n(def data-2 (take 500 (drop 500 raw-data)))\n\n(plot-highchart {:chart {:type \"line\"}\n                 :title {:text \"Plot of random data\"}\n                 :series [{:data data-1} {:data data-2}]})\n```\n\n```clojure\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/ijavascript.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Javascript (Node.js)\n    language: javascript\n    name: javascript\n---\n\n## A notebook that uses IJavascript kernel\n\n```javascript\nlet x = 5;\nconst y = 6;\nvar z = 10;\n```\n\n```javascript\nx + y;\n```\n\n```javascript\nfunction add(num1, num2) {\n    return num1 + num2\n}\n```\n\n```javascript\nadd(x, y);\n```\n\n```javascript\nconst arrowAdd = (num1, num2) => num1 + num2;\n```\n\n```javascript\narrowAdd(x, y);\n```\n\n```javascript\nconst myCar = {\n    color: \"blue\",\n    weight: 850,\n    model: \"fiat\",\n    start: () => \"car started!\",\n    doors: [1,2,3,4]\n}\n```\n\n```javascript\nconsole.log(\"color:\", myCar.color);\n```\n\n```javascript\nconsole.log(\"start:\", myCar.start());\n```\n\n```javascript\nfor (let door of myCar.doors) {\n    console.log(\"I'm door\", door)\n}\n```\n\n```javascript\nmyCar;\n```\n\n```javascript\nclass User {\n  constructor(name){\n    this.name = name;\n  }\n  sayHello(){\n    return \"Hello, I'm \" + this.name;\n  }\n}\n```\n\n```javascript\nlet John = new User(\"John\");\nJohn.sayHello();\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/ir_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: R\n    language: R\n    name: ir\n---\n\nThis is a jupyter notebook that uses the IR kernel.\n\n```R\nsum(1:10)\n```\n\n```R\nplot(cars)\n```\n\n```R\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/itypescript.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Typescript 3.5\n    language: typescript\n    name: typescript\n---\n\n```typescript\nlet x: number = 5;\nconst y: number = 6;\nvar z: string = \"hi\";\nconsole.log(z);\nx + y;\n```\n\n```typescript\nfunction add(num1: number, num2: number): number {\n    return num1 + num2\n}\nadd(x, y);\n```\n\n```typescript\nconst arrowAdd = (num1: number, num2: number) => num1 + num2;\narrowAdd(x, y);\n```\n\n```typescript\nclass User {\n  constructor(private name: string) {\n    this.name = name;\n  }\n  sayHello(): string {\n    return \"Hello, I'm \" + this.name;\n  }\n}\nlet John: User;\nJohn = new User(\"John\");\nJohn.sayHello();\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/julia_benchmark_plotly_barchart.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: julia-1.1\n---\n\n```julia\n# IJulia rocks! So does Plotly. Check it out\n\nusing Plotly\napi_key = \"\" # visit https://plot.ly/api to generate an API username and password\nusername = \"\"\n\nPlotly.signin(username, api_key)\n```\n\n```julia\n# Following data taken from http://julialang.org/ frontpage \nbenchmarks = [\"fib\", \"parse_int\", \"quicksort3\", \"mandel\", \"pi_sum\", \"rand_mat_stat\", \"rand_mat_mul\"]\nplatforms = [\"Fortran\", \"Julia\", \"Python\", \"R\", \"Matlab\", \"Mathematica\", \"Javascript\", \"Go\"]\n\ndata = {\n        platforms[1] => [0.26, 5.03, 1.11, 0.86, 0.80, 0.64, 0.96],\n        platforms[2] => [0.91, 1.60, 1.14, 0.85, 1.00, 1.66, 1.01],\n        platforms[3] => [30.37, 13.95, 31.98, 14.19, 16.33, 13.52, 3.41 ],\n        platforms[4] => [411.36, 59.40, 524.29, 106.97, 15.42, 10.84, 3.98  ],\n        platforms[5] => [1992.00, 1463.16, 101.84, 64.58, 1.29, 6.61, 1.10   ],\n        platforms[6] => [64.46, 29.54, 35.74, 6.07, 1.32, 4.52, 1.16 ],\n        platforms[7] => [2.18, 2.43, 3.51, 3.49, 0.84, 3.28, 14.60],\n        platforms[8] => [1.03, 4.79, 1.25, 2.36, 1.41, 8.12, 8.51]\n        }\n\npdata = [ {\"x\"=>benchmarks,\"y\"=>data[k],\"bardir\"=>\"h\",\"type\"=>\"bar\",\"name\"=>k} for k = platforms ]\n\nlayout = {\n          \"title\"=> \"Julia benchmark comparison (smaller is better, C performance = 1.0)\",\n          \"barmode\"=> \"group\",\n          \"autosize\"=> false,\n          \"width\"=> 900,\n          \"height\"=> 900,\n          \"titlefont\"=>\n          {\n           \"family\"=> \"Open Sans\",\n           \"size\"=> 18,\n           \"color\"=> \"rgb(84, 39, 143)\"\n           },\n          \"margin\"=> {\"l\"=>160, \"pad\"=>0},\n          \"xaxis\"=> {\n                     \"title\"=> \"Benchmark log-time\",\n                     \"type\"=> \"log\"\n                     },\n          \"yaxis\"=> {\"title\"=> \"Benchmark Name\"}\n          }\n\nresponse = Plotly.plot(pdata,[\"layout\"=>layout])\n\n# Embed in an iframe within IJulia\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n\n```julia\n# checkout https://plot.ly/api/ for more Julia examples!\n# But to show off some other Plotly features:\nx = 1:1500\ny1 = sin(2*pi*x/1500.) + rand(1500)-0.5\ny2 = sin(2*pi*x/1500.)\n\nfish = {\"x\"=>x,\"y\"=> y1,\n\t\"type\"=>\"scatter\",\"mode\"=>\"markers\",\n\t\"marker\"=>{\"color\"=>\"rgb(0, 0, 255)\",\"opacity\"=>0.5 } }\n\nfit = {\"x\"=> x,\"y\"=> y2,\n\t\"type\"=>\"scatter\", \"mode\"=>\"markers\", \"opacity\"=>0.8,\n\t\"marker\"=>{\"color\"=>\"rgb(255, 0, 0)\"} }\n\nlayout = {\"autosize\"=> false,\n    \"width\"=> 650, \"height\"=> 550,\n    \"title\"=>\"Fish School\",\n\t\"xaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",    \n        \"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[0,1500] },\n\t\"yaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",\n\t\t\"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[-2.2,2.2] },\n\t\"plot_bgcolor\"=> \"rgb(245,245,247)\",\n    \"showlegend\"=> false,\n    \"hovermode\"=> \"closest\"}\n\nresponse = Plotly.plot([fish, fit],[\"layout\"=>layout])\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/julia_functional_geometry.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: julia-1.1\n---\n\n```julia\n# This notebook is a semi top-down explanation. This cell needs to be\n# executed first so that the operators and helper functions are defined\n# All of this is explained in the later half of the notebook\n\nusing Compose, Interact\nCompose.set_default_graphic_size(2inch, 2inch)\n\npoints_f = [\n    (.1, .1),\n    (.9, .1),\n    (.9, .2),\n    (.2, .2),\n    (.2, .4),\n    (.6, .4),\n    (.6, .5),\n    (.2, .5),\n    (.2, .9),\n    (.1, .9),\n    (.1, .1)\n]\n\nf = compose(context(), stroke(\"black\"), line(points_f))\n\nrot(pic) = compose(context(rotation=Rotation(-deg2rad(90))), pic)\nflip(pic) = compose(context(mirror=Mirror(deg2rad(90), 0.5w, 0.5h)), pic)\nabove(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, 1, m/(m+n)), p),\n            (context(0, m/(m+n), 1, n/(m+n)), q))\n\nabove(p, q) = above(1, 1, p, q)\n\nbeside(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, m/(m+n), 1), p),\n            (context(m/(m+n), 0, n/(m+n), 1), q))\n\nbeside(p, q) = beside(1, 1, p, q)\n\nover(p, q) = compose(context(),\n                (context(), p), (context(), q))\n\nrot45(pic) =\n    compose(context(0, 0, 1/sqrt(2), 1/sqrt(2),\n        rotation=Rotation(-deg2rad(45), 0w, 0h)), pic)\n\n# Utility function to zoom out and look at the context\nzoomout(pic) = compose(context(),\n                (context(0.2, 0.2, 0.6, 0.6), pic),\n                (context(0.2, 0.2, 0.6, 0.6), fill(nothing), stroke(\"black\"), strokedash([0.5mm, 0.5mm]),\n                    polygon([(0, 0), (1, 0), (1, 1), (0, 1)])))\n\nfunction read_path(p_str)\n    tokens = [try parsefloat(x) catch symbol(x) end for x in split(p_str, r\"[\\s,]+\")]\n    path(tokens)\nend\n\nfish = compose(context(units=UnitBox(260, 260)), stroke(\"black\"),\n            read_path(strip(readall(\"fish.path\"))))\n\nrotatable(pic) = @manipulate for θ=0:0.001:2π\n    compose(context(rotation=Rotation(θ)), pic)\nend\n\nblank = compose(context())\n\nfliprot45(pic) = rot45(compose(context(mirror=Mirror(deg2rad(-45))),pic))\n\n# Hide this cell.\ndisplay(MIME(\"text/html\"), \"\"\"<script>\nvar cell = \\$(\".container .cell\").eq(0), ia = cell.find(\".input_area\")\nif (cell.find(\".toggle-button\").length == 0) {\nia.after(\n    \\$('<button class=\"toggle-button\">Toggle hidden code</button>').click(\n        function (){ ia.toggle() }\n        )\n    )\nia.hide()\n}\n</script>\"\"\")\n```\n\n# Functional Geometry\n*Functional Geometry* is a paper by Peter Henderson ([original (1982)](users.ecs.soton.ac.uk/peter/funcgeo.pdf), [revisited (2002)](https://cs.au.dk/~hosc/local/HOSC-15-4-pp349-365.pdf)) which deconstructs the MC Escher woodcut *Square Limit*\n\n![Square Limit](http://i.imgur.com/LjRzmNM.png)\n\n\n> A picture is an example of a complex object that can be described in terms of its parts.\nYet a picture needs to be rendered on a printer or a screen by a device that expects to\nbe given a sequence of commands. Programming that sequence of commands directly is\nmuch harder than having an application generate the commands automatically from the\nsimpler, denotational description.\n\n\nA `picture` is a *denotation* of something to draw.\n\ne.g. The value of f here denotes the picture of the letter F\n\n\nOriginal at http://nbviewer.jupyter.org/github/shashi/ijulia-notebooks/blob/master/funcgeo/Functional%20Geometry.ipynb\n\n\n## In conclusion\n\nWe described Escher's *Square Limit* from the description of its smaller parts, which in turn were described in terms of their smaller parts.\n\nThis seemed simple because we chose to talk in terms of an *algebra* to describe pictures. The primitives `rot`, `flip`, `fliprot45`, `above`, `beside` and `over` fit the job perfectly.\n\nWe were able to describe these primitives in terms of `compose` `contexts`, which the Compose library knows how to render.\n\nDenotation can be an easy way to describe a system as well as a practical implementation method.\n\n[Abstraction barriers](https://mitpress.mit.edu/sicp/full-text/sicp/book/node29.html) are useful tools that can reduce the cognitive overhead on the programmer. It entails creating layers consisting of functions which only use functions in the same layer or layers below in their own implementation. The layers in our language were:\n\n    ------------------[ squarelimit ]------------------\n    -------------[ quartet, cycle, nonet ]-------------\n    ---[ rot, flip, fliprot45, above, beside, over ]---\n    -------[ compose, context, line, path,... ]--------\n    \nDrawing this diagram out is a useful way to begin building any library.\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/jupyter.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n# Jupyter notebook\n\nThis notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n\n```python\na = 1\nb = 2\na + b\n```\n\nNow we return a few tuples\n\n```python\na, b\n```\n\n```python\na, b, a+b\n```\n\nAnd this is already the end of the notebook\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/jupyter_again.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n```\n\n```python\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n```\n\n```python\n?next\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/jupyter_with_raw_cell_in_body.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\n1+2+3\n```\n\n<!-- #raw -->\nThis is a raw cell\n<!-- #endraw -->\n\nThis is a markdown cell\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/jupyter_with_raw_cell_on_top.md",
    "content": "---\ntitle: Quick test\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n  chunk_output_type: console\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\n1+2+3\n```\n\n```python\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/jupyter_with_raw_cell_with_invalid_yaml.md",
    "content": "---\ntitle: Exception: Test\njupyter:\n  kernelspec:\n    display_name: Python 3 (ipykernel)\n    language: python\n    name: python3\n---\n\n```python\n1 + 2 + 3\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/jupyterlab-slideshow_1441.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3 (ipykernel)\n    language: python\n    name: python3\n---\n\n<!-- #region @deathbeds/jupyterlab-fonts={\"styles\": {\"\": {\"body[data-jp-deck-mode='presenting'] &\": {\"right\": \"0\", \"top\": \"30%\", \"width\": \"25%\", \"z-index\": 1}}}} jupyterlab-slideshow={\"layer\": \"slide\"} -->\n> **Note**\n> \n> `slide` layer with a `top` of `30%`\n<!-- #endregion -->\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/jupytext_replication.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: SoS\n    language: sos\n    name: sos\n---\n\n<!-- #region Collapsed=\"false\" kernel=\"SoS\" -->\n# Text SOS-kernel with Jupytext\n\n## What is SOS kernel\n\nSoS consists of a ployglot notebook that allows the use of multiple kernels in one Jupyter notebook, and a workflow system that is designed for daily computational research. Basically,\n\n- SoS Polyglot Notebook is a Jupyter Notebook with a SoS kernel.\n- SoS Notebook serves as a super kernel to all other Jupyter kernels and allows the use of multiple kernels in one Jupyter notebook.\n- SoS Workflow System is a Python based workflow system that is designed to be readable, shareable, and suitable for daily data analysis.\n- SoS Workflow System can be used from command line or use SoS Notebook as its IDE.\n\n![](https://vatlab.github.io/sos-docs/doc/media/SoS_Notebook_and_Workflow.png)\n\n### How to install SOS-kernel\n\nPlease follow this [link](https://vatlab.github.io/sos-docs/running.html#Conda-installation) to setup SOS\n\nI run some issue with the latest version of R on my Mac, so I had to install an earlier version of R\n\n```\nconda install -c r r=3.5.1\nconda install sos-notebook jupyterlab-sos sos-papermill -c conda-forge\n```\n\n## Related issue with Jupytext\n\nJupytext works fine with Python/R kernel but converts code cells into markdown cells when using the SOS kernel.\n\ncf the image below. It is a code cell. After saving the notebook and restart it, it converted the code cell into markdown\n\n<img width=\"734\" alt=\"Screenshot 2020-03-13 at 10 51 18\" src=\"https://user-images.githubusercontent.com/33351426/76610049-9e704600-6518-11ea-861e-b4f691d1a478.png\">\n<!-- #endregion -->\n\n<!-- #region Collapsed=\"false\" kernel=\"SoS\" -->\n## Step 1\n\nPlease, choose SOS Kernel and then, in the cell code, choose SOS (or any other kernel available), the outcome is the same.\n\n![](https://drive.google.com/uc?export=view&id=1OtyxfwoRyVK23XHnmd9JR-crBgHBL5mt)\n<!-- #endregion -->\n\n```sos Collapsed=\"false\" kernel=\"SoS\"\nimport pandas as pd \nimport numpy as np\n\npd.DataFrame({\n    'x': np.random.random(10),\n    'y': np.random.random(10),\n})\n```\n\n<!-- #region Collapsed=\"false\" kernel=\"python3\" -->\n## Step 2\n\nNow, pair it with Jupytex\n\n![](https://drive.google.com/uc?export=view&id=1Wtx-YPAXY8HWHqzCcy4iIgHpzt_9emEn)\n<!-- #endregion -->\n\n<!-- #region Collapsed=\"false\" kernel=\"python3\" -->\n### Step 3\n\nSave the notebook, restart and clear all, **save**, then Shut down kernel. Close the notebook and reopen\n<!-- #endregion -->\n\n<!-- #region Collapsed=\"false\" kernel=\"python3\" -->\n### Step 4\n\nReopen the notebook. Here is the outcome\n\n![](https://drive.google.com/uc?export=view&id=12C70unbSPv0gHCZaCICEUy7kO7wM93JH)\n\n\n<!-- #endregion -->\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/kalman_filter_and_visualization.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Q 3.5\n    language: q\n    name: qpk\n---\n\n```q\nplt: .p.import`matplotlib.pyplot\n```\n\n```q\nfilter: {\n    t: ([] x: `float $ x; xh: `float $ x; p: (count x) # R: var x);\n    (first t), iterate[R; R]\\[first t; 1 _ t] \n    }\n\niterate: {[Q; R; x; y]\n    x[`p]+: Q;\n    k: x[`p] % R + x[`p];\n    `x`xh`p ! (y[`x]; x[`xh] + k * y[`x] - x[`xh]; (1 - k) * x[`p])\n    }\n```\n\n```q\nprice: 100 + sums 0.5 - (n:50)?1.\n```\n\n```q\noutput:filter price\n```\n\n```q\nplt[`:plot][til n; output`x; `label pykw \"price\"];\nplt[`:plot][til n; output`xh;`label pykw \"forecast\"];\nplt[`:legend][];\nplt[`:show][];\n```\n\n```q\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/logtalk_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Logtalk\n    language: logtalk\n    name: logtalk_kernel\n---\n\n# An implementation of the Ackermann function\n\n```logtalk vscode={\"languageId\": \"logtalk\"}\n%%load ack.lgt\n\n:- object(ack).\n\n:- info([\n\tversion is 1:0:0,\n\tauthor is 'Paulo Moura',\n\tdate is 2008-3-31,\n\tcomment is 'Ackermann function (general recursive function).'\n]).\n\n:- public(ack/3).\n:- mode(ack(+integer, +integer, -integer), one).\n:- info(ack/3, [\n\tcomment is 'Ackermann function.',\n\targnames is ['M', 'N', 'V']\n]).\n\nack(0, N, V) :-\n\t!,\n\tV is N + 1.\nack(M, 0, V) :-\n\t!,\n\tM2 is M - 1,\n\tack(M2, 1, V).\nack(M, N, V) :-\n\tM2 is M - 1,\n\tN2 is N - 1,\n\tack(M, N2, V2),\n\tack(M2, V2, V).\n\n:- end_object.\n```\n\n## Sample query\n\n```logtalk vscode={\"languageId\": \"logtalk\"}\nack::ack(2, 4, V).\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/lua_example.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Lua\n    language: lua\n    name: lua\n---\n\nSource: https://www.lua.org/pil/19.3.html\n\n\n# Sort\n\n\nAnother useful function on arrays is table.sort, which we have seen before. It receives the array to be sorted, plus an optional order function. This order function receives two arguments and must return true if the first argument should come first in the sorted array. If this function is not provided, sort uses the default less-than operation (corresponding to the `<´ operator).\n\n\nA common mistake is to try to order the indices of a table. In a table, the indices form a set, and have no order whatsoever. If you want to order them, you have to copy them to an array and then sort the array. Let us see an example. Suppose that you read a source file and build a table that gives, for each function name, the line where that function is defined; something like this:\n\n```lua\nlines = {\n    luaH_set = 10,\n    luaH_get = 24,\n    luaH_present = 48,\n}\n```\n\n Now you want to print these function names in alphabetical order. If you traverse this table with pairs, the names appear in an arbitrary order. However, you cannot sort them directly, because these names are keys of the table. However, when you put these names into an array, then you can sort them. First, you must create an array with those names, then sort it, and finally print the result:\n\n```lua\na = {}\nfor n in pairs(lines) do table.insert(a, n) end\ntable.sort(a)\nfor i,n in ipairs(a) do print(n) end\n```\n\nNote that, for Lua, arrays also have no order. But we know how to count, so we get ordered values as long as we access the array with ordered indices. That is why you should always traverse arrays with ipairs, rather than pairs. The first imposes the key order 1, 2, ..., whereas the latter uses the natural arbitrary order of the table.\n\n\nAs a more advanced solution, we can write an iterator that traverses a table following the order of its keys. An optional parameter f allows the specification of an alternative order. It first sorts the keys into an array, and then iterates on the array. At each step, it returns the key and value from the original table:\n\n```lua\nfunction pairsByKeys (t, f)\n    local a = {}\n    for n in pairs(t) do table.insert(a, n) end\n    table.sort(a, f)\n    local i = 0               -- iterator variable\n    local iter = function ()  -- iterator function\n        i = i + 1\n        if a[i] == nil then return nil\n        else return a[i], t[a[i]]\n        end\n    end\n    return iter\nend\n```\n\n With this function, it is easy to print those function names in alphabetical order. The loop\n\n```lua\nfor name, line in pairsByKeys(lines) do\n    print(name, line)\nend\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/maxima_example.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Maxima\n    language: maxima\n    name: maxima\n---\n\n## maxima misc\n\n```maxima\nkill(all)$\n```\n\n```maxima\nf(x) := 1/(x^2+l^2)^(3/2);\n```\n\n```maxima\nintegrate(f(x), x);\n```\n\n```maxima\ntex(%)$\n```\n\n```maxima\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/notebook_with_complex_metadata.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/nteract_with_parameter.md",
    "content": "---\njupyter:\n  kernel_info:\n    name: python3\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python inputHidden=false outputHidden=false tags=[\"parameters\"]\nparam = 4\n```\n\n```python inputHidden=false outputHidden=false\nimport pandas as pd\n```\n\n```python inputHidden=false outputHidden=false\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n```\n\n```python inputHidden=false outputHidden=false\n%matplotlib inline\ndf.plot(kind='bar')\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/ocaml_notebook.md",
    "content": "---\njupyter:\n  jupytext:\n    formats: ipynb:markdown,md\n  kernelspec:\n    display_name: OCaml default\n    language: OCaml\n    name: ocaml-jupyter\n---\n\n# Example of an OCaml notebook\n\n```ocaml\nlet sum x y = x + y\n```\n\nLet's try our function:\n\n```ocaml\nsum 3 4 = 7 + 0\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/octave_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Octave\n    language: octave\n    name: octave\n---\n\nA markdown cell\n\n```octave\n1 + 1\n```\n\n```octave\n% a code cell with comments\n2 + 2\n```\n\n```octave\n% a simple plot\nx = -10:0.1:10;\nplot (x, sin (x));\n```\n\n```octave\n%plot -w 800\n% a simple plot with a magic instruction\nx = -10:0.1:10;\nplot (x, sin (x));\n```\n\nAnd to finish with, a Python cell\n\n```python\na = 1\n```\n\n```python\na + 1\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/plotly_graphs.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\nThis notebook contains complex outputs, including plotly javascript graphs.\n\n\n# Interactive plots\n\n\nWe use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n\n```python\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n```\n\n```python\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/powershell.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: PowerShell\n    language: PowerShell\n    name: powershell\n---\n\nThis is an extract from\nhttps://github.com/Jaykul/Jupyter-PowerShell/blob/master/LiterateDevOps.ipynb\n\n```powershell\n$imageUrl = 'https://upload.wikimedia.org/wikipedia/commons/2/2f/PowerShell_5.0_icon.png'\n$ImageData = @{ \"png\" = (Invoke-WebRequest $imageUrl -UseBasicParsing).RawContentStream.GetBuffer() }\n# $ImageData\n\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 32 } }\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 64 } }\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/raw_cell_with_complex_yaml_like_content.md",
    "content": "---\n\nThis is a complex paragraph\nthat is split over multiple lines.\n\nIt also includes blank lines.\n\n\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\nprint(\"Hello, World!\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/raw_cell_with_non_dict_yaml_content.md",
    "content": "---\nContent.\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python\nprint(\"Hello, World!\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/root_cpp.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: ROOT C++\n    language: c++\n    name: root\n---\n\n```c++\n#include <iostream>\n#include <string>\n```\n\n```c++\nint k = 4;\nstd::string foo = \"This string says \\\"foo\\\"\";\n```\n\n```c++\nstd::cout << \"k = \" << k << '\\n' << foo << '\\n';\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/sage_print_hello.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: SageMath 9.2\n    language: sage\n    name: sagemath\n---\n\n```sage\nprint(\"Hello world\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/sample_bash_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Bash\n    language: bash\n    name: bash\n---\n\n```bash\nls\n```\n\n```bash\n# https://coderwall.com/p/euwpig/a-better-git-log\ngit config --global alias.lg \"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\"\n```\n\n```bash\ngit lg\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/sample_rise_notebook_66.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n<!-- #region slideshow={\"slide_type\": \"slide\"} -->\nA markdown cell\n<!-- #endregion -->\n\n```python slideshow={\"slide_type\": \"\"}\n1+1\n```\n\n<!-- #region cell_style=\"center\" slideshow={\"slide_type\": \"fragment\"} -->\nMarkdown cell two\n<!-- #endregion -->\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/sas.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: SAS\n    language: sas\n    name: sas\n---\n\n# SAS Notebooks with jupytext\n\n```sas\nproc sql;\n    select *\n    from sashelp.cars (obs=10)\n    ;\nquit; \n```\n\n```sas\n%let name = \"Jupytext\";\n```\n\n```sas\n%put &name;\n```\n\n```sas\n/* Note when defining macros \"%macro\" cannot be the first line of text in the cell */\n%macro test;\n    data temp;\n        set sashelp.cars;\n        name = \"testx\";\n    run; \n    proc print data = temp (obs=10);\n    run; \n%mend test;\n\n%test\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/simple-helloworld.md",
    "content": "---\njupyter:\n  jupytext:\n    encoding: '// -*- coding: utf-8 -*-'\n    formats: ipynb,java:light\n  kernelspec:\n    display_name: Java\n    language: java\n    name: java\n---\n\nLet's define some class.\n\n```java\nclass A {\n    public void hello() {\n        System.out.println(\"Hello World\");\n    }   \n}\n```\n\nAnd now we call its method.\n\n```java\nnew A().hello();\n```\n\nYou can run it e.g. with `jshell`\n\n* from command line, as `jshell simple-helloworld.java`\n* from jshell's shell with `/open simple-helloworld.java`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/simple_robot_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Robot Framework\n    language: robotframework\n    name: robotkernel\n---\n\n```robotframework\n*** Settings ***\n\nLibrary  Collections\n```\n\n```robotframework\n*** Keywords ***\n\nHead\n    [Arguments]  ${list}\n    ${value}=  Get from list  ${list}  0\n    [Return]  ${value}\n```\n\n```robotframework\n*** Tasks ***\n\nGet head\n    ${array}=  Create list  1  2  3  4  5\n    ${head}=  Head  ${array}\n    Should be equal  ${head}  1\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/simple_scala_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Apache Toree - Scala\n    language: scala\n    name: apache_toree_scala\n---\n\n```scala\n// This is just a simple scala notebook\n\nobject SampleObject {\n    def calculation(x: Int, y: Int): Int = x + y\n}\n\nval result = SampleObject.calculation(1, 2)\n```\n\n```scala\nprintln(result * 10)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/stata_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Stata\n    language: stata\n    name: stata\n---\n\n```stata\n// This notebook uses the stata_kernel: https://github.com/kylebarron/stata_kernel\n```\n\n```stata\nuse http://www.stata-press.com/data/r13/auto\n```\n\n```stata\nsummarize\n```\n\n```stata\nscatter weight length\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/tailrecursive-factorial.md",
    "content": "---\njupyter:\n  jupytext:\n    encoding: '// -*- coding: utf-8 -*-'\n    formats: ipynb,groovy:light\n  kernelspec:\n    display_name: Groovy\n    language: groovy\n    name: groovy\n---\n\n# TailRecursive annotation\n\nLet's check what is the effect of `@TailRecursive` annotation on the simple recursive definition of factorial function.\n\n```groovy\nimport groovy.transform.CompileStatic\nimport groovy.transform.TailRecursive\nimport groovy.transform.TypeChecked\n\n@CompileStatic\n@TypeChecked\nclass X {\n    static final BigInteger factorial0(int n) {\n        (n <= 1) ? 1G : factorial0(n-1).multiply(BigInteger.valueOf(n))\n    }\n\n    static final BigInteger factorial1(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial1(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n\n    @TailRecursive\n    static final BigInteger factorial2(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial2(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n}\n\nx = new X()\n```\n\nAlthough we can time the execution of the calls, it is not very accurate; such micro benchmarks should be performed in more controlled environment, such us under [JMH](https://openjdk.java.net/projects/code-tools/jmh/).\n\nFor example, see [blog posts of Szymon Stępniak](https://e.printstacktrace.blog/tail-recursive-methods-in-groovy/).\n\n```groovy\n%%timeit\n\nx.factorial0(19_000).toString().length()\n```\n\n```groovy\n%%timeit\n\nx.factorial1(19_000).toString().length()\n```\n\n```groovy\n%%timeit\n\nx.factorial2(19_000).toString().length()\n```\n\nThe real difference is the use of stack. Non-tail recursive calls exhaust the stack space at some point, whereas tail recursive calls don't add frames to the stack.\n\n```groovy\nfactSize = { n, cl ->\n    println \"Factorial of ${n} has ${cl(n).toString().length()} digits\"\n}\n\nfactSize 2_000, x.&factorial0\nfactSize 2_000, x.&factorial1\nfactSize 2_000, x.&factorial2\n\nfactSize 100_000, x.&factorial2\n```\n\n```groovy\ntry {\n    factSize 100_000, x.&factorial1\n} catch (Throwable e) {\n    assert e instanceof StackOverflowError\n    println e\n}\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/tcl_test.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Tcl\n    language: tcl\n    name: tcljupyter\n---\n\n# Assign Values\n\n```tcl\nset a 1\nputs \"a = $a\"\n```\n\n# Loop\n\n```tcl\nfor {set i 0} {$i < 10} {incr i} {\n    puts \"I inside first loop: $i\"\n}\n```\n\n```tcl\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/text_outputs_and_images.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\nThis notebook contains outputs of many different types: text, HTML, plots and errors.\n\n\n# Text outputs\n\nUsing `print`, `sys.stdout` and `sys.stderr`\n\n```python\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n```\n\n```python\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n```\n\n# HTML outputs\n\nUsing `pandas`. Here we find two representations: both text and HTML.\n\n```python\nimport pandas as pd\npd.DataFrame([4])\n```\n\n```python\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n```\n\n# Images\n\n```python\n%matplotlib inline\n```\n\n```python\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n```\n\n# Errors\n\n```python\nundefined_variable\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/wolfram.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Wolfram Language 13.1\n    language: Wolfram Language\n    name: wolframlanguage13.1\n---\n\n**Note:** The `language_info` `file_extension` in this notebook should be `.m`, but it was deliberately changed to `.wolfram` to avoid conflicts with Matlab which is using the same extension.\n\n\nWe start with...\n\n```wolfram language\nPrint[\"Hello, World!\"];\n```\n\nThen we draw the first example plot from the [ListPlot](https://reference.wolfram.com/language/ref/ListPlot.html) reference:\n\n```wolfram language\nListPlot[Prime[Range[25]]]\n```\n\nWe also test the math outputs as in the [Simplify](https://reference.wolfram.com/language/ref/Simplify.html) example:\n\n```wolfram language\nD[Integrate[1/(x^3 + 1), x], x]\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/xcpp_by_quantstack.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: C++14\n    language: C++14\n    name: xeus-cling-cpp14\n---\n\n[![xeus-cling](images/xeus-cling.png)](https://github.com/QuantStack/xeus-cling/)\n\nA Jupyter kernel for C++ based on the `cling` C++ interpreter and the `xeus` native implementation of the Jupyter protocol, xeus.\n\n- GitHub repository: https://github.com/QuantStack/xeus-cling/\n- Online documentation: https://xeus-cling.readthedocs.io/\n\n\n## Usage\n\n<div style=\"background: #efffed;\n            border: 1px solid grey;\n            margin: 8px 0 8px 0;\n            text-align: center;\n            padding: 8px; \">\n    <i class=\"fa-play fa\" \n       style=\"font-size: 40px;\n              line-height: 40px;\n              margin: 8px;\n              color: #444;\">\n    </i>\n    <div>\n    To run the selected code cell, hit <pre style=\"background: #efffed\">Shift + Enter</pre>\n    </div>\n</div>\n\n\n## Output and error streams\n\n`std::cout` and `std::cerr` are redirected to the notebook frontend.\n\n```c++\n#include <iostream>\n\nstd::cout << \"some output\" << std::endl;\n```\n\n```c++\nstd::cerr << \"some error\" << std::endl;\n```\n\n```c++\n#include <stdexcept>\n```\n\n```c++\nthrow std::runtime_error(\"Unknown exception\");\n```\n\nOmitting the `;` in the last statement of a cell results in an output being printed\n\n```c++\nint j = 5;\n```\n\n```c++\nj\n```\n\n# Interpreting the C++ programming language\n\n`cling` has a broad support of the features of C++. You can define functions, classes, templates, etc ...\n\n\n## Functions\n\n```c++\ndouble sqr(double a)\n{\n    return a * a;\n}\n```\n\n```c++\ndouble a = 2.5;\ndouble asqr = sqr(a);\nasqr\n```\n\n## Classes\n\n```c++\nclass Foo\n{\npublic:\n\n    virtual ~Foo() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Foo value = \" << value << std::endl;\n    }\n};\n```\n\n```c++\nFoo bar;\nbar.print(1.2);\n```\n\n## Polymorphism\n\n```c++\nclass Bar : public Foo\n{\npublic:\n\n    virtual ~Bar() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Bar value = \" << 2 * value << std::endl;\n    }\n};\n```\n\n```c++\nFoo* bar2 = new Bar;\nbar2->print(1.2);\ndelete bar2;\n```\n\n## Templates\n\n```c++\n#include <typeinfo>\n\ntemplate <class T>\nclass FooT\n{\npublic:\n    \n    explicit FooT(const T& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << typeid(T).name() << \" m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    T m_t;\n};\n\ntemplate <>\nclass FooT<int>\n{\npublic:\n    \n    explicit FooT(const int& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << \"m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    int m_t;\n};\n```\n\n```c++\nFooT<double> foot1(1.2);\nfoot1.print();\n```\n\n```c++\nFooT<int> foot2(4);\nfoot2.print();\n```\n\n## C++11 / C++14 support\n\n```c++\nclass Foo11\n{\npublic:\n    \n    Foo11() { std::cout << \"Foo11 default constructor\" << std::endl; }\n    Foo11(const Foo11&) { std::cout << \"Foo11 copy constructor\" << std::endl; }\n    Foo11(Foo11&&) { std::cout << \"Foo11 move constructor\" << std::endl; }\n};\n```\n\n```c++\nFoo11 f1;\nFoo11 f2(f1);\nFoo11 f3(std::move(f1));\n```\n\n```c++\n#include <vector>\n\nstd::vector<int> v = { 1, 2, 3};\nauto iter = ++v.begin();\nv\n```\n\n```c++\n*iter\n```\n\n... and also lambda, universal references, `decltype`, etc ...\n\n\n## Documentation and completion\n\n - Documentation for types of the standard library is retrieved on cppreference.com.\n - The quick-help feature can also be enabled for user-defined types and third-party libraries. More documentation on this feature is available at https://xeus-cling.readthedocs.io/en/latest/inline_help.html.\n\n\n```c++\n?std::vector\n```\n\n## Using the `display_data` mechanism\n\n\nFor a user-defined type `T`, the rich rendering in the notebook and JupyterLab can be enabled by by implementing the function `xeus::xjson mime_bundle_repr(const T& im)`, which returns the JSON mime bundle for that type.\n\nMore documentation on the rich display system of Jupyter and Xeus-cling is available at https://xeus-cling.readthedocs.io/en/latest/rich_display.html\n\n\n### Image example\n\n```c++\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace im\n{\n    struct image\n    {   \n        inline image(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const image& i)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"image/png\"] = xtl::base64encode(i.m_buffer.str());\n        return bundle;\n    }\n}\n```\n\n```c++\nim::image marie(\"images/marie.png\");\nmarie\n```\n\n### Audio example\n\n```c++\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace au\n{\n    struct audio\n    {   \n        inline audio(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const audio& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] =\n           std::string(\"<audio controls=\\\"controls\\\"><source src=\\\"data:audio/wav;base64,\")\n           + xtl::base64encode(a.m_buffer.str()) +\n            \"\\\" type=\\\"audio/wav\\\" /></audio>\";\n        return bundle;\n    }\n}\n```\n\n```c++\nau::audio drums(\"audio/audio.wav\");\ndrums\n```\n\n### Display\n\n```c++\n#include \"xcpp/xdisplay.hpp\"\n```\n\n```c++\nxcpp::display(drums);\n```\n\n### Update-display\n\n```c++\n#include <string>\n#include \"xcpp/xdisplay.hpp\"\n\nnamespace ht\n{\n    struct html\n    {   \n        inline html(const std::string& content)\n        {\n            m_content = content;\n        }\n        std::string m_content;\n    };\n\n    xeus::xjson mime_bundle_repr(const html& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] = a.m_content;\n        return bundle;\n    }\n}\n\n// A red rectangle\nht::html rect(R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: blue;\n    color: white;\n    text-align: center;'>\nOriginal\n</div>)\");\n```\n\n```c++\nxcpp::display(rect, \"some_display_id\");\n```\n\n```c++\n// Update the rectangle to be blue\nrect.m_content = R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: red;\n    color: white;\n    text-align: center;'>\nUpdated\n</div>)\";\n\nxcpp::display(rect, \"some_display_id\", true);\n```\n\n## Magics\n\nMagics are special commands for the kernel that are not part of the C++ language.\n\nThey are defined with the symbol `%` for a line magic and `%%` for a cell magic.\n\nMore documentation for magics is available at https://xeus-cling.readthedocs.io/en/latest/magics.html.\n\n```c++\n#include <algorithm>\n#include <vector>\n```\n\n```c++\nstd::vector<double> to_shuffle = {1, 2, 3, 4};\n```\n\n```c++\n%timeit std::random_shuffle(to_shuffle.begin(), to_shuffle.end());\n```\n\n[![xtensor](images/xtensor.png)](https://github.com/QuantStack/xtensor/)\n\n- GitHub repository: https://github.com/QuantStack/xtensor/\n- Online documentation: https://xtensor.readthedocs.io/\n- NumPy to xtensor cheat sheet: http://xtensor.readthedocs.io/en/latest/numpy.html\n\n`xtensor` is a C++ library for manipulating N-D arrays with an API very similar to that of numpy.\n\n```c++\n#include <iostream>\n\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n#include \"xtensor/xview.hpp\"\n\nxt::xarray<double> arr1\n  {{1.0, 2.0, 3.0},\n   {2.0, 5.0, 7.0},\n   {2.0, 5.0, 7.0}};\n\nxt::xarray<double> arr2\n  {5.0, 6.0, 7.0};\n\nxt::view(arr1, 1) + arr2\n```\n\nTogether with the C++ Jupyter kernel, `xtensor` offers a similar experience as `NumPy` in the Python Jupyter kernel, including broadcasting and universal functions.\n\n```c++\n#include <iostream>\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n```\n\n```c++\nxt::xarray<int> arr\n  {1, 2, 3, 4, 5, 6, 7, 8, 9};\n\narr.reshape({3, 3});\n\nstd::cout << arr;\n```\n\n```c++\n#include \"xtensor-blas/xlinalg.hpp\"\n```\n\n```c++\nxt::xtensor<double, 2> m = {{1.5, 0.5}, {0.7, 1.0}};\nstd::cout << \"Matrix rank: \" << std::endl << xt::linalg::matrix_rank(m) << std::endl;\nstd::cout << \"Matrix inverse: \" << std::endl << xt::linalg::inv(m) << std::endl;\nstd::cout << \"Eigen values: \" << std::endl << xt::linalg::eigvals(m) << std::endl;\n```\n\n```c++\nxt::xarray<double> arg1 = xt::arange<double>(9);\nxt::xarray<double> arg2 = xt::arange<double>(18);\n\narg1.reshape({3, 3});\narg2.reshape({2, 3, 3});\n\nstd::cout << xt::linalg::dot(arg1, arg2) << std::endl;\n```\n\n```c++\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_md/xonsh_example.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Xonsh\n    language: xonsh\n    name: xonsh\n---\n\n```xonsh\nlen($(curl -L https://xon.sh))\n```\n\n```xonsh\nfor filename in `.*`:\n    print(filename)\n    du -sh @(filename)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/Line_breaks_in_LateX_305.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\nThis cell uses no particular cell marker\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n\n+++\n\nThis cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x) \\\n\\dot{y} & = \\rho x - y - xz \\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n\n+++\n\nThis cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/Notebook with function and cell metadata 164.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\n1 + 1\n```\n\nA markdown cell\nAnd below, the cell for function f has non trivial cell metadata. And the next cell as well.\n\n```{code-cell} ipython3\n---\nattributes:\n  classes: []\n  id: ''\n  n: '10'\n---\ndef f(x):\n    return x\n```\n\n```{code-cell} ipython3\n---\nattributes:\n  classes: []\n  id: ''\n  n: '10'\n---\nf(5)\n```\n\nMore text\n\n```{code-cell} ipython3\n2 + 2\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/Notebook with html and latex cells.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\n%%html\n<p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>\n```\n\n```{code-cell} ipython3\n%%latex\n$\\frac{\\pi}{2}$\n```\n\n```{code-cell} ipython3\n%load_ext rpy2.ipython\n```\n\n```{code-cell} ipython3\n%%R\nlibrary(ggplot2)\nggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\n```\n\n```{code-cell} ipython3\n%matplotlib inline\nimport pandas as pd\npd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/Notebook with many hash signs.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n##################################################################\nThis is a notebook that contains many hash signs.\nHopefully its python representation is not recognized as a Sphinx Gallery script...\n##################################################################\n\n```{code-cell} ipython3\nsome = 1\ncode = 2\nsome+code\n\n##################################################################\n# A comment\n##################################################################\n# Another comment\n```\n\n##################################################################\nThis is a notebook that contains many hash signs.\nHopefully its python representation is not recognized as a Sphinx Gallery script...\n##################################################################\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/Notebook with metadata and long cells.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n# Part one - various cells\n\n+++\n\nHere we have a markdown cell\n\n\nwith two blank lines\n\n+++\n\nNow we have a markdown cell\nwith a code block inside it\n\n```python\n1 + 1\n```\n\nAfter that cell we'll have a code cell\n\n```{code-cell} ipython3\n2 + 2\n\n\n3 + 3\n```\n\nFollowed by a raw cell\n\n```{raw-cell}\nThis is \nthe content\nof the raw cell\n```\n\n# Part two - cell metadata\n\n+++ {\"key\": \"value\"}\n\nThis is a markdown cell with cell metadata `{\"key\": \"value\"}`\n\n```{code-cell} ipython3\n---\n.class: null\ntags: [parameters]\n---\n\"\"\"This is a code cell with metadata `{\"tags\":[\"parameters\"], \".class\":null}`\"\"\"\n```\n\n```{raw-cell}\n:key: value\n\nThis is a raw cell with cell metadata `{\"key\": \"value\"}`\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/Notebook_with_R_magic.md",
    "content": "---\nkernelspec:\n  display_name: Python 2\n  language: python\n  name: python2\n---\n\n# A notebook with R cells\n\nThis notebook shows the use of R cells to generate plots\n\n```{code-cell} ipython2\n%load_ext rpy2.ipython\n```\n\n```{code-cell} ipython2\n%%R\nsuppressMessages(require(tidyverse))\n```\n\n```{code-cell} ipython2\n%%R\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n\nThe default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\n\n```{code-cell} ipython2\n%%R -w 400 -h 240\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/Notebook_with_more_R_magic_111.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\n%load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n```\n\n```{code-cell} ipython3\n%%R -i df\nlibrary(\"ggplot2\")\nggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/R notebook with invalid cell keys.md",
    "content": "---\nkernelspec:\n  display_name: R\n  language: R\n  name: ir\n---\n\nThis notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\n```{code-cell} r\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/Reference Guide for Calysto Scheme.md",
    "content": "---\nkernelspec:\n  display_name: Calysto Scheme (Python)\n  language: scheme\n  name: calysto_scheme\n---\n\n<img src=\"images/logo-64x64.png\"/>\n<h1>Reference Guide for Calysto Scheme</h1>\n\n[Calysto Scheme](https://github.com/Calysto/calysto_scheme) is a real Scheme programming language, with full support for continuations, including call/cc. It can also use all Python libraries. Also has some extensions that make it more useful (stepper-debugger, choose/fail, stack traces), or make it better integrated with Python.\n\nIn Jupyter notebooks, because Calysto Scheme uses [MetaKernel](https://github.com/Calysto/metakernel/blob/master/README.rst), it has a fully-supported set of \"magics\"---meta-commands for additional functionality. This includes running Scheme in parallel. See all of the [MetaKernel Magics](https://github.com/Calysto/metakernel/blob/master/metakernel/magics/README.md).\n\nCalysto Scheme is written in Scheme, and then translated into Python (and other backends). The entire functionality lies in a single Python file: https://github.com/Calysto/calysto_scheme/blob/master/calysto_scheme/scheme.py However, you can easily install it (see below).\n\nPlease see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n\n## Installation\n\nYou can install Calysto Scheme with Python3:\n\n```\npip3 install --upgrade calysto-scheme --user -U\npython3 -m calysto_kernel install --user\n```\n\nor in the system kernel folder with:\n\n```\nsudo pip3 install --upgrade calysto-scheme -U\nsudo python3 -m calysto_kernel install\n```\n\nChange pip3/python3 to use a different pip or Python. The version of Python used will determine how Calysto Scheme is run.\n\nUse it in the console, qtconsole, or notebook with IPython 3:\n\n```\nipython console --kernel calysto_scheme\nipython qtconsole --kernel calysto_scheme\nipython notebook --kernel calysto_scheme\n```\n\nIn addition to all of the following items, Calysto Scheme also has access to all of Python's builtin functions, and all of Python's libraries. For example, you can use `(complex 3 2)` to create a complex number by calling Python's complex function.\n\n## Jupyter Enhancements\n\nWhen you run Calysto Scheme in Jupyter (console, notebook, qtconsole, etc.) you get:\n\n* TAB completions of Scheme functions and variable names\n* display of rich media\n* stepper/debugger\n* magics (% macros)\n* shell commands (! command)\n* LaTeX equations\n* LaTeX-style variables\n* Python integration\n\n+++\n\n### LaTeX-style variables\n\nCalysto Scheme allows you to use LaTeX-style variables in code. For example, if you type:\n\n```\n\\beta\n```\n\nwith the cursor right after the 'a' in beta, and then press TAB, it will turn into the unicode character:\n\n```\nβ\n```\n\nThere are nearly 1300 different symbols defined (thanks to the Julia language) and documented here:\n\nhttp://docs.julialang.org/en/release-0.4/manual/unicode-input/#man-unicode-input\n\nCalysto Scheme may not implement all of those. Some useful and suggestive ones:\n\n* \\pi - π\n* \\Pi - Π\n* \\Sigma - Σ\n* \\_i - subscript i, such as vectorᵢ\n\n```{code-cell} scheme\n(define α 67)\n```\n\n```{code-cell} scheme\nα\n```\n\n```{code-cell} scheme\n(define i 2)\n(define vectorᵢ (vector-ref (vector 0 6 3 2) i))\nvectorᵢ\n```\n\n### Rich media\n\n```{code-cell} scheme\n(import \"calysto.display\")\n```\n\n```{code-cell} scheme\n(calysto.display.HTML \"This is <b>bold</b>, <i>italics</i>, <u>underlined</u>.\")\n```\n\n```{code-cell} scheme\n(import \"calysto.graphics\")\n```\n\n```{code-cell} scheme\n(define canvas (calysto.graphics.Canvas))\n```\n\n```{code-cell} scheme\n(define ball (calysto.graphics.Circle '(150 150) 100))\n```\n\n```{code-cell} scheme\n(ball.draw canvas)\n```\n\n### Shell commands\n\n```{code-cell} scheme\n! ls /tmp\n```\n\n### Stepper/Debugger\n\nHere is what the debugger looks like:\n\n<img src=\"images/stepper_debugger.png\">\n\nIt has breakpoints (click in left margin). You must press Stop to exit the debugger.\n\n+++\n\n```scheme\n%%debug\n\n(begin\n (define x 1)\n (set! x 2)\n)\n```\n\n+++\n\n### Python Integration\n\nYou can import and use any Python library in Calysto Scheme.\n\nIn addition, if you wish, you can execute expressions and statements in a Python environment:\n\n```{code-cell} scheme\n(python-eval \"1 + 2\")\n```\n\n```{code-cell} scheme\n(python-exec \n\"\ndef mypyfunc(a, b):\n    return a * b\n\")\n```\n\nThis is a shared environment with Scheme:\n\n```{code-cell} scheme\n(mypyfunc 4 5)\n```\n\nYou can use `func` to turn a Scheme procedure into a Python function, and `define!` to put it into the shared environment with Python:\n\n```{code-cell} scheme\n(define! mypyfunc2 (func (lambda (n) n)))\n```\n\n```{code-cell} scheme\n(python-eval \"mypyfunc2(34)\")\n```\n\n# Differences Between Languages\n\n## Major differences between Scheme and Python\n\n1. In Scheme, double quotes are used for strings and may contain newlines\n1. In Scheme, a single quote is short for (quote ...) and means \"literal\"\n1. In Scheme, everything is an expression and has a return value\n1. Python does not support macros (e.g., extending syntax)\n1. In Python, \"if X\" is false if X is None, False, [], (,) or 0. In Scheme, \"if X\" is only false if X is #f or 0\n1. Calysto Scheme uses continuations, not the call stack. However, for debugging there is a pseudo-stack when an error is raised. You can turn that off with (use-stack-trace #f)\n1. Scheme procedures are not Python functions, but there are means to use one as the other.\n\n## Major Differences Between Calysto Scheme and other Schemes\n\n1. define-syntax works slightly differently\n1. In Calysto Scheme, #(...) is short for '#(...)\n1. Calysto Scheme is missing many standard functions (see list at bottom)\n1. Calysto Scheme has a built-in amb operator called `choose`\n1. For debugging there is a pseudo-stack when errors are raised in Calysto Scheme. You can turn that off with (use-stack-trace #f)\n\n### Stack Trace\n\nCalysto Scheme acts as if it has a call stack, for easier debugging. For example:\n\n```{code-cell} scheme\n(define fact\n    (lambda (n)\n      (if (= n 1)\n           q\n           (* n (fact (- n 1))))))\n```\n\n```{code-cell} scheme\n(fact 5)\n```\n\nTo turn off the stack trace on error:\n\n```scheme\n(use-stack-trace #f)\n```\nThat will allow infinite recursive loops without keeping track of the \"stack\".\n\n+++\n\n# Calysto Scheme Variables\n\n## SCHEMEPATH\nSCHEMEPATH is a list of search directories used with (load NAME). This is a reference, so you should append to it rather than attempting to redefine it.\n\n```{code-cell} scheme\nSCHEMEPATH\n```\n\n```{code-cell} scheme\n(set-cdr! (cdr SCHEMEPATH) (list \"/var/modules\"))\n```\n\n```{code-cell} scheme\nSCHEMEPATH\n```\n\n## Getting Started\n\nNote that you can use the word `lambda` or \\lambda and then press [TAB]\n\n```{code-cell} scheme\n(define factorial\n  (λ (n)\n     (cond\n      ((zero? n) 1)\n      (else (* n (factorial (- n 1)))))))\n```\n\n```{code-cell} scheme\n(factorial 5)\n```\n\n## define-syntax\n(define-syntax NAME RULES): a method for creating macros\n\n```{code-cell} scheme\n(define-syntax time \n  [(time ?exp) (let ((start (current-time)))\n                 ?exp\n                 (- (current-time) start))])\n```\n\n```{code-cell} scheme\n(time (car '(1 2 3 4)))\n```\n\n```{code-cell} scheme\n;;---------------------------------------------------------------------\n;; collect is like list comprehension in Python\n\n(define-syntax collect\n  [(collect ?exp for ?var in ?list)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) #t) ?list)]\n  [(collect ?exp for ?var in ?list if ?condition)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) ?condition) ?list)])\n\n(define filter-map\n  (lambda (f pred? values)\n    (if (null? values)\n      '()\n      (if (pred? (car values))\n          (cons (f (car values)) (filter-map f pred? (cdr values)))\n          (filter-map f pred? (cdr values))))))\n```\n\n```{code-cell} scheme\n(collect (* n n) for n in (range 10))\n```\n\n```{code-cell} scheme\n(collect (* n n) for n in (range 5 20 3))\n```\n\n```{code-cell} scheme\n(collect (* n n) for n in (range 10) if (> n 5))\n```\n\n```{code-cell} scheme\n;;---------------------------------------------------------------------\n;; for loops\n\n(define-syntax for\n  [(for ?exp times do . ?bodies)\n   (for-repeat ?exp (lambda () . ?bodies))]\n  [(for ?var in ?exp do . ?bodies)\n   (for-iterate1 ?exp (lambda (?var) . ?bodies))]\n  [(for ?var at (?i) in ?exp do . ?bodies)\n   (for-iterate2 0 ?exp (lambda (?var ?i) . ?bodies))]\n  [(for ?var at (?i ?j . ?rest) in ?exp do . ?bodies)\n   (for ?var at (?i) in ?exp do\n     (for ?var at (?j . ?rest) in ?var do . ?bodies))])\n\n(define for-repeat\n  (lambda (n f)\n    (if (< n 1)\n      'done\n      (begin\n        (f)\n        (for-repeat (- n 1) f)))))\n\n(define for-iterate1\n  (lambda (values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values))\n        (for-iterate1 (cdr values) f)))))\n\n(define for-iterate2\n  (lambda (i values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values) i)\n        (for-iterate2 (+ i 1) (cdr values) f)))))\n```\n\n```{code-cell} scheme\n(define matrix2d\n  '((10 20)\n    (30 40)\n    (50 60)\n    (70 80)))\n\n(define matrix3d\n  '(((10 20 30) (40 50 60))\n    ((70 80 90) (100 110 120))\n    ((130 140 150) (160 170 180))\n    ((190 200 210) (220 230 240))))\n```\n\n```{code-cell} scheme\n(begin \n (define hello 0)\n (for 5 times do (set! hello (+ hello 1)))\n hello\n )\n```\n\n```{code-cell} scheme\n(for sym in '(a b c d) do (define x 1) (set! x sym) (print x))\n```\n\n```{code-cell} scheme\n(for n in (range 10 20 2) do (print n))\n```\n\n```{code-cell} scheme\n(for n at (i j) in matrix2d do (print (list n 'coords: i j)))\n```\n\n```{code-cell} scheme\n(for n at (i j k) in matrix3d do (print (list n 'coords: i j k)))\n```\n\n```{code-cell} scheme\n(define-syntax scons\n  [(scons ?x ?y) (cons ?x (lambda () ?y))])\n\n(define scar car)\n\n(define scdr\n  (lambda (s)\n    (let ((result ((cdr s))))\n      (set-cdr! s (lambda () result))\n      result)))\n\n(define first\n  (lambda (n s)\n    (if (= n 0)\n      '()\n      (cons (scar s) (first (- n 1) (scdr s))))))\n\n(define nth\n  (lambda (n s)\n    (if (= n 0)\n      (scar s)\n      (nth (- n 1) (scdr s)))))\n\n(define smap\n  (lambda (f s)\n    (scons (f (scar s)) (smap f (scdr s)))))\n\n(define ones (scons 1 ones))\n\n(define nats (scons 0 (combine nats + ones)))\n\n(define combine\n  (lambda (s1 op s2)\n    (scons (op (scar s1) (scar s2)) (combine (scdr s1) op (scdr s2)))))\n\n(define fibs (scons 1 (scons 1 (combine fibs + (scdr fibs)))))\n\n(define facts (scons 1 (combine facts * (scdr nats))))\n\n(define ! (lambda (n) (nth n facts)))\n```\n\n```{code-cell} scheme\n(! 5)\n```\n\n```{code-cell} scheme\n(nth 10 facts)\n```\n\n```{code-cell} scheme\n(nth 20 fibs)\n```\n\n```{code-cell} scheme\n(first 30 fibs)\n```\n\n## for-each\n(for-each PROCEDURE LIST): apply PROCEDURE to each item in LIST; like `map` but don't return results\n\n```{code-cell} scheme\n(for-each (lambda (n) (print n)) '(3 4 5))\n```\n\n## format\n(format STRING ITEM ...): format the string with ITEMS as arguments\n\n```{code-cell} scheme\n(format \"This uses formatting ~a ~s ~%\" 'apple 'apple)\n```\n\n## func\n\nTurns a lambda into a Python function.\n\n(func (lambda ...))\n\n```{code-cell} scheme\n(func (lambda (n) n))\n```\n\n## There's more!\n\nPlease see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/The flavors of raw cells.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{raw-cell}\n:raw_mimetype: text/latex\n\n$1+1$\n```\n\n```{raw-cell}\n:raw_mimetype: text/restructuredtext\n\n:math:`1+1`\n```\n\n```{raw-cell}\n:raw_mimetype: text/html\n\n<b>Bold text<b>\n```\n\n```{raw-cell}\n:raw_mimetype: text/markdown\n\n**Bold text**\n```\n\n```{raw-cell}\n:raw_mimetype: text/x-python\n\n1 + 1\n```\n\n```{raw-cell}\nNot formatted\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/cat_variable.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\ncat = 42\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/coconut_homepage_demo.md",
    "content": "---\nkernelspec:\n  display_name: Coconut\n  language: coconut\n  name: coconut\n---\n\nTaken from [coconut-lang.org](coconut-lang.org)\n\n+++\n\npipeline-style programming\n\n```{code-cell} coconut\n\"hello, world!\" |> print\n```\n\n prettier lambdas\n\n```{code-cell} coconut\nx -> x ** 2\n```\n\npartial application\n\n```{code-cell} coconut\nrange(10) |> map$(pow$(?, 2)) |> list\n```\n\npattern-matching\n\n```{code-cell} coconut\nmatch [head] + tail in [0, 1, 2, 3]:\n    print(head, tail)\n```\n\ndestructuring assignment\n\n```{code-cell} coconut\n{\"list\": [0] + rest} = {\"list\": [0, 1, 2, 3]}\n```\n\ninfix notation\n\n```{code-cell} coconut\n# 5 `mod` 3 == 2\n```\n\noperator functions\n\n```{code-cell} coconut\nproduct = reduce$(*)\n```\n\nfunction composition\n\n```{code-cell} coconut\n# (f..g..h)(x, y, z)\n```\n\nlazy lists\n\n```{code-cell} coconut\n# (| first_elem() |) :: rest_elems()\n```\n\nparallel programming\n\n```{code-cell} coconut\nrange(100) |> parallel_map$(pow$(2)) |> list\n```\n\ntail call optimization\n\n```{code-cell} coconut\ndef factorial(n, acc=1):\n    case n:\n        match 0:\n            return acc\n        match _ is int if n > 0:\n            return factorial(n-1, acc*n)\n```\n\nalgebraic data types\n\n```{code-cell} coconut\ndata Empty()\ndata Leaf(n)\ndata Node(l, r)\n\ndef size(Empty()) = 0\n\naddpattern def size(Leaf(n)) = 1\n\naddpattern def size(Node(l, r)) = size(l) + size(r)\n```\n\nand much more!\n\nLike what you see? Don't forget to star Coconut on GitHub!\n\n```{code-cell} coconut\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/convert_to_py_then_test_with_update83.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\n%%time\n\nprint('asdf')\n```\n\nThanks for jupytext!\n\n```{code-cell} ipython3\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/csharp.md",
    "content": "---\nkernelspec:\n  display_name: .NET (C#)\n  language: C#\n  name: .net-csharp\n---\n\nWe start with...\n\n```{code-cell} csharp\nConsole.WriteLine(\"Hello World!\");\n```\n\nThen we do a plot with Plotly, following the [Plotting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Plotting%20with%20Xplot.ipynb) example from `dotnet/interactive`:\n\n```{code-cell} csharp\nusing XPlot.Plotly;\n\nvar bar = new Graph.Bar\n{\n    name = \"Bar\",\n    x = new[] {'A', 'B', 'C'},\n    y = new[] {1, 3, 2}\n};\n\nvar chart = Chart.Plot(new[] {bar});\nchart.WithTitle(\"A bar plot\");\ndisplay(chart);\n```\n\nWe also test the math outputs as in the [Math and Latex](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Math%20and%20LaTeX.ipynb) example:\n\n```{code-cell} csharp\n(LaTeXString)@\"\\begin{align} e^{i \\pi} = -1\\end{align}\"\n```\n\n```{code-cell} csharp\n(MathString)@\"e^{i \\pi} = -1\"\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/demo_gdl_fbp.md",
    "content": "---\nkernelspec:\n  display_name: IDL [conda env:gdl] *\n  language: IDL\n  name: conda-env-gdl-idl\n---\n\n## GDL demo notebook\n\n+++\n\nDemonstration of GDL [(gnudatalanguage)](https://github.com/gnudatalanguage/gdl)\n\nThis notebook creates a Shepp-Logan phantom, projects it and then performs an FBP reconstruction.\n\n```{code-cell}\n;; L.A. Shepp and B.F. Logan, “The Fourier reconstruction of a head section,”\n;; IEEE Trans. Nucl. Sci. 21(3), 21–43 (1974).\nfunction shepplogan, size = size\n\n  if NOT keyword_set(size) then size = 256\n\n  phantom = fltarr(size,size)\n\n  tmp  = (findgen(size)-((size-1)/2.0)) / (size/2.0)\n  xcor = rebin(tmp,size,size)\n  ycor = rebin(transpose(tmp),size,size)\n  tmp  = fltarr(size,size)\n  \n  aa={cx: 0.0,  cy: 0.0,    maj:0.69,   min:0.92,  theta:  0.0, val: 2.0 }\n  bb={cx: 0.0,  cy:-0.0184, maj:0.6624, min:0.874, theta:  0.0, val:-0.98}\n  cc={cx: 0.22, cy: 0.0,    maj:0.11,   min:0.31,  theta:-18.0, val:-0.02}\n  dd={cx:-0.22, cy: 0.0,    maj:0.16,   min:0.41,  theta: 18.0, val:-0.02}\n  ee={cx: 0.0,  cy: 0.35,   maj:0.21,   min:0.25,  theta:  0.0, val:-0.01}\n  ff={cx: 0.0,  cy: 0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  gg={cx: 0.0,  cy:-0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  hh={cx:-0.08, cy:-0.605,  maj:0.046,  min:0.023, theta:  0.0, val:-0.01}\n  ii={cx: 0.0,  cy:-0.605,  maj:0.023,  min:0.023, theta:  0.0, val:-0.01}\n  jj={cx: 0.06, cy:-0.605,  maj:0.023,  min:0.046, theta:  0.0, val:-0.01}\n\n  list = [aa,bb,cc,dd,ee,ff,gg,hh,ii,jj]\n  for n = 0, n_elements(list)-1 do begin\n\n     tmp = ((xcor-list[n].cx) / list[n].maj)^2 $\n           + ((ycor-list[n].cy) / list[n].min)^2\n     \n     if list[n].theta NE 0 then begin\n        nx = (size-1) * (list[n].cx + 1) / 2\n        ny = (size-1) * (list[n].cy + 1) / 2\n        tmp = rot(tmp, -list[n].theta, 1, nx, ny, /interp, /pivot)\n     endif\n     \n     phantom[where(tmp LE 1.0)] += list[n].val\n     \n  endfor\n  \n  return, phantom < 1.1\n  \nend\n```\n\n```{code-cell}\n;; Enable inline plotting\n!inline=1\n```\n\n```{code-cell}\nphantom = shepplogan()\nwindow, 0, xsize=256, ysize=256\ntvscl, phantom > 0.95\n```\n\nNow we define simple forward and backprojection functions:\n\n```{code-cell}\nfunction proj, image, angle\n\n    sino_size_x = max(size(image,/dim))\n    sino_size_y = n_elements(angle)\n\n    sino = fltarr(sino_size_x, sino_size_y)\n    \n    for aa=0, n_elements(angle)-1 do begin\n    \n        sino[*,aa] = total(rot(image, angle[aa], /interp), 2)\n    \n    endfor\n\n    return, sino\n    \nend\n```\n\n```{code-cell}\nfunction back, sino, angle\n\n    image_size = n_elements(sino[*,0])\n    image = fltarr(image_size,image_size)\n\n    for aa=0, n_elements(angle)-1 do begin\n    \n        image += rot(rebin(sino[*,aa],[image_size,image_size]), -angle[aa], /interp)\n    \n    endfor\n\n    return, image / n_elements(angle)\n\nend\n```\n\nThis allows us to create a sinogram:\n\n```{code-cell}\nangles = findgen(360)\nsino = proj(phantom, angles)\nwindow, 0, xsize=256, ysize=360\ntvscl, sino\n```\n\nOn this we can apply a simple FBP reconstruction:\n\n```{code-cell}\n;; G.L. Zeng, “Revisit of the Ramp Filter,”\n;; IEEE Trans. Nucl. Sci. 62(1), 131–136 (2015).\nfunction fbp, sino, angles\n  \n  ntot = n_elements(sino[*,0])\n  nang = n_elements(sino[0,*])\n  npos = ntot / 2 + 1           ; integer division needed !\n  nneg = ntot - npos\n\n  freq = findgen(ntot)\n  freq[npos:ntot-1] = REVERSE(freq[1:nneg])\n  freq[0] = 1\n\n  filter = -1 / (!pi * freq)^2\n  filter[where(freq mod 2 EQ 0)] *= -0.0\n  filter[0] = 0.25\n\n  filter = abs(fft(filter)) * ntot\n  filter[ntot/4:ntot/4+ntot/2-1] *= 0.0\n  filter = rebin(filter,ntot,nang)\n\n  ;; apply filter to the sinogram\n  fsino  = fft(sino,  dim=1)\n  fsino *= filter\n  fsino  = fft(fsino, dim=1, /overwrite, /inverse)\n  fsino  = !pi * real_part(fsino)\n\n  ;; backproject the filtered sinogram\n  return, back(fsino, angles)\n\nend\n```\n\n```{code-cell}\nreconstruction = fbp(sino, angles)\nwindow, 0, xsize=512, ysize=256\n\ntvscl, [phantom, reconstruction] > 0.8\n```\n\n### The end\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/evcxr_jupyter_tour.md",
    "content": "---\nkernelspec:\n  display_name: Rust\n  language: rust\n  name: rust\n---\n\n# Tour of the EvCxR Jupyter Kernel\nFor those not already familiar with Jupyter notebook, it lets you write code into \"cells\" like the box below. Cells can alternatively contain markdown, like this text here. Each code cell is compiled and executed separately, but variables, defined functions etc persist between cells.\n\n## Printing to outputs and evaluating expressions\nLets print something to stdout and stderr then return a final expression to see how that's presented. Note that stdout and stderr are separate streams, so may not appear in the same order is their respective print statements.\n\n```{code-cell}\nprintln!(\"Hello world\");\neprintln!(\"Hello error\");\nformat!(\"Hello {}\", \"world\")\n```\n\n## Assigning and making use of variables\nWe define a variable `message`, then in the subsequent cell, modify the string and finally print it out. We could also do all this in the one cell if we wanted.\n\n```{code-cell}\nlet mut message = \"Hello \".to_owned();\n```\n\n```{code-cell}\nmessage.push_str(\"world!\");\n```\n\n```{code-cell}\nmessage\n```\n\n## Defining and redefining functions\nNext we'll define a function\n\n```{code-cell}\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {0} else {fib(x - 2) + fib(x - 1)}\n}\n```\n\n```{code-cell}\n(1..13).map(fib).collect::<Vec<i32>>()\n```\n\nHmm, that doesn't look right. Lets redefine the function. In practice, we'd go back and edit the function above and reevaluate it, but here, lets redefine it in a separate cell.\n\n```{code-cell}\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {2} else {fib(x - 2) + fib(x - 1)}\n}\n```\n\n```{code-cell}\nlet values = (1..13).map(fib).collect::<Vec<i32>>();\nvalues\n```\n\n## Spawning a separate thread and communicating with it\nWe can spawn a thread to do stuff in the background, then continue executing code in other cells.\n\n```{code-cell}\nuse std::sync::{Mutex, Arc};\nlet counter = Arc::new(Mutex::new(0i32));\nstd::thread::spawn({\n    let counter = Arc::clone(&counter);\n    move || {\n        for i in 1..300 {\n            *counter.lock().unwrap() += 1;\n            std::thread::sleep(std::time::Duration::from_millis(100));\n        }\n}});\n```\n\n```{code-cell}\n*counter.lock().unwrap()\n```\n\n```{code-cell}\n*counter.lock().unwrap()\n```\n\n## Loading external crates\nWe can load external crates. This one takes a while to compile, but once it's compiled, subsequent cells shouldn't need to recompile it, so it should be much quicker.\n\n```{code-cell}\n\n:dep base64 = \"0.10.1\"\nbase64::encode(&vec![1, 2, 3, 4])\n```\n\n## Customizing how types are displayed\nWe can also customize how our types are displayed, including presenting them as HTML. Here's an example where we define a custom display function for a type `Matrix`.\n\n```{code-cell}\nuse std::fmt::Debug;\npub struct Matrix<T> {pub values: Vec<T>, pub row_size: usize}\nimpl<T: Debug> Matrix<T> {\n    pub fn evcxr_display(&self) {\n        let mut html = String::new();\n        html.push_str(\"<table>\");\n        for r in 0..(self.values.len() / self.row_size) {\n            html.push_str(\"<tr>\");\n            for c in 0..self.row_size {\n                html.push_str(\"<td>\");\n                html.push_str(&format!(\"{:?}\", self.values[r * self.row_size + c]));\n                html.push_str(\"</td>\");\n            }\n            html.push_str(\"</tr>\");            \n        }\n        html.push_str(\"</table>\");\n        println!(\"EVCXR_BEGIN_CONTENT text/html\\n{}\\nEVCXR_END_CONTENT\", html);\n    }\n}\n```\n\n```{code-cell}\nlet m = Matrix {values: vec![1,2,3,4,5,6,7,8,9], row_size: 3};\nm\n```\n\nWe can also return images, we just need to base64 encode them. First, we set up code for displaying RGB and grayscale images.\n\n```{code-cell}\nextern crate image;\nextern crate base64;\npub trait EvcxrResult {fn evcxr_display(&self);}\nimpl EvcxrResult for image::RgbImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::RGB(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\nimpl EvcxrResult for image::GrayImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::Gray(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\n```\n\n```{code-cell}\nimage::ImageBuffer::from_fn(256, 256, |x, y| {\n    if (x as i32 - y as i32).abs() < 3 {\n        image::Rgb([0, 0, 255])\n    } else {\n        image::Rgb([0, 0, 0])\n    }\n})\n```\n\n## Display of compilation errors\nHere's how compilation errors are presented. Here we forgot an & and passed a String instead of an &str.\n\n```{code-cell}\nlet mut s = String::new();\ns.push_str(format!(\"foo {}\", 42));\n```\n\n## Seeing what variables have been defined\nWe can print a table of defined variables and their types with the :vars command.\n\n```{code-cell}\n\n:vars\n```\n\nOther built-in commands can be found via :help\n\n```{code-cell}\n\n:help\n```\n\n```{code-cell}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/frozen_cell.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n```\n\n```{code-cell} ipython3\n---\ndeletable: false\neditable: false\nrun_control:\n  frozen: true\n---\n# This is an frozen cell\nprint(\"I'm frozen so Im not executed :(\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/fsharp.md",
    "content": "---\nkernelspec:\n  display_name: .NET (F#)\n  language: F#\n  name: .net-fsharp\n---\n\nThis notebook was inspired by [Plottting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/fsharp/Docs/Plotting%20with%20Xplot.ipynb).\n\n```{code-cell} fsharp\nopen XPlot.Plotly\n```\n\n```{code-cell} fsharp\nlet bar =\n    Bar(\n        name = \"Bar 1\",\n        x = [\"A\"; \"B\"; \"C\"],\n        y = [1; 3; 2])\n\n[bar]\n|> Chart.Plot\n|> Chart.WithTitle \"A sample bar plot\"\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/gnuplot_notebook.md",
    "content": "---\nkernelspec:\n  display_name: gnuplot\n  language: gnuplot\n  name: gnuplot\n---\n\n# Sample gnuplot notebook\n\n+++\n\n## Simple plotting\n\n```{code-cell}\n# Plot sin and cos with different linetypes\n\nf(x) = sin(x)\ng(x) = cos(x)\nset xrange[0:2*pi]\nset xtics(0, \"{/Symbol p}\" pi , \"2{/Symbol p}\" 2*pi)\nset ytics 1\nplot f(x) linewidth 2 title \"sin(x)\", \\\n    g(x) linewidth 2 dashtype \"--\" title \"cos(x)\"\n```\n\n## Example of line magic\n\n```{code-cell}\n%gnuplot inline pngcairo enhanced background rgb \"#EEEEEE\" size 600, 600\n# Parametric plot without border\n\nreset\nset parametric\nset size ratio -1\nunset border\nunset tics\nplot f(t), g(t) linewidth 2 notitle\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/haskell_notebook.md",
    "content": "---\nkernelspec:\n  display_name: Haskell\n  language: haskell\n  name: haskell\n---\n\n# Example Haskell Notebook\n\n+++\n\nDefine a function to add two numbers.\n\n```{code-cell} Haskell\nf :: Num a => a -> a -> a\nf x y = x + y\n```\n\nTry to use the function\n\n```{code-cell} Haskell\nf 1 2 \n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/hello_world_gonb.md",
    "content": "---\nkernelspec:\n  display_name: Go (gonb)\n  language: go\n  name: gonb\n---\n\nA notebook that use [GoNB](https://github.com/janpfeifer/gonb)\n\n+++\n\nthe code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb)\n\n```{code-cell}\nfunc main() {\n    fmt.Printf(\"Hello World!\")\n}\n```\n\n```{code-cell}\n%%\nfmt.Printf(\"Hello World!\")\n```\n\n%% --who=world can pass flags to main func\n\n```{code-cell}\nimport (\n    \"flag\"\n    \"fmt\"\n)\n\nvar flagWho = flag.String(\"who\", \"\", \"Your name!\")\n\n%% --who=world\nfmt.Printf(\"Hello %s!\\n\", *flagWho)\n```\n\n%args also can pass flags\n\n```{code-cell}\n%args --who=Wally\n\nfunc main() {\n    flag.Parse()\n    fmt.Printf(\"Where is %s?\", *flagWho)\n}\n```\n\n```{code-cell}\nimport \"github.com/janpfeifer/gonb/gonbui\"\n\n%%\ngonbui.DisplayHtml(`<span style=\"background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;\">I 🧡 GoNB!</span>`)\n```\n\n```{code-cell}\n%%\ngonbui.DisplayMarkdown(\"#### Objective\\n\\n1. Have fun coding **Go**;\\n1. Profit...\\n\"+\n                       `$$f(x) = \\int_{-\\infty}^{\\infty} e^{-x^2} dx$$`)\n```\n\n```{code-cell}\nfunc init_a() {\n    fmt.Println(\"init_a\")\n}\n%%\nfmt.Println(\"main\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/ijavascript.md",
    "content": "---\nkernelspec:\n  display_name: Javascript (Node.js)\n  language: javascript\n  name: javascript\n---\n\n## A notebook that uses IJavascript kernel\n\n```{code-cell}\nlet x = 5;\nconst y = 6;\nvar z = 10;\n```\n\n```{code-cell}\nx + y;\n```\n\n```{code-cell}\nfunction add(num1, num2) {\n    return num1 + num2\n}\n```\n\n```{code-cell}\nadd(x, y);\n```\n\n```{code-cell}\nconst arrowAdd = (num1, num2) => num1 + num2;\n```\n\n```{code-cell}\narrowAdd(x, y);\n```\n\n```{code-cell}\nconst myCar = {\n    color: \"blue\",\n    weight: 850,\n    model: \"fiat\",\n    start: () => \"car started!\",\n    doors: [1,2,3,4]\n}\n```\n\n```{code-cell}\nconsole.log(\"color:\", myCar.color);\n```\n\n```{code-cell}\nconsole.log(\"start:\", myCar.start());\n```\n\n```{code-cell}\nfor (let door of myCar.doors) {\n    console.log(\"I'm door\", door)\n}\n```\n\n```{code-cell}\nmyCar;\n```\n\n```{code-cell}\nclass User {\n  constructor(name){\n    this.name = name;\n  }\n  sayHello(){\n    return \"Hello, I'm \" + this.name;\n  }\n}\n```\n\n```{code-cell}\nlet John = new User(\"John\");\nJohn.sayHello();\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/ir_notebook.md",
    "content": "---\nkernelspec:\n  display_name: R\n  language: R\n  name: ir\n---\n\nThis is a jupyter notebook that uses the IR kernel.\n\n```{code-cell} r\nsum(1:10)\n```\n\n```{code-cell} r\nplot(cars)\n```\n\n```{code-cell} r\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/itypescript.md",
    "content": "---\nkernelspec:\n  display_name: Typescript 3.5\n  language: typescript\n  name: typescript\n---\n\n```{code-cell}\nlet x: number = 5;\nconst y: number = 6;\nvar z: string = \"hi\";\nconsole.log(z);\nx + y;\n```\n\n```{code-cell}\nfunction add(num1: number, num2: number): number {\n    return num1 + num2\n}\nadd(x, y);\n```\n\n```{code-cell}\nconst arrowAdd = (num1: number, num2: number) => num1 + num2;\narrowAdd(x, y);\n```\n\n```{code-cell}\nclass User {\n  constructor(private name: string) {\n    this.name = name;\n  }\n  sayHello(): string {\n    return \"Hello, I'm \" + this.name;\n  }\n}\nlet John: User;\nJohn = new User(\"John\");\nJohn.sayHello();\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/julia_benchmark_plotly_barchart.md",
    "content": "---\nkernelspec:\n  display_name: Julia 1.1.1\n  language: julia\n  name: julia-1.1\n---\n\n```{code-cell}\n# IJulia rocks! So does Plotly. Check it out\n\nusing Plotly\napi_key = \"\" # visit https://plot.ly/api to generate an API username and password\nusername = \"\"\n\nPlotly.signin(username, api_key)\n```\n\n```{code-cell}\n# Following data taken from http://julialang.org/ frontpage \nbenchmarks = [\"fib\", \"parse_int\", \"quicksort3\", \"mandel\", \"pi_sum\", \"rand_mat_stat\", \"rand_mat_mul\"]\nplatforms = [\"Fortran\", \"Julia\", \"Python\", \"R\", \"Matlab\", \"Mathematica\", \"Javascript\", \"Go\"]\n\ndata = {\n        platforms[1] => [0.26, 5.03, 1.11, 0.86, 0.80, 0.64, 0.96],\n        platforms[2] => [0.91, 1.60, 1.14, 0.85, 1.00, 1.66, 1.01],\n        platforms[3] => [30.37, 13.95, 31.98, 14.19, 16.33, 13.52, 3.41 ],\n        platforms[4] => [411.36, 59.40, 524.29, 106.97, 15.42, 10.84, 3.98  ],\n        platforms[5] => [1992.00, 1463.16, 101.84, 64.58, 1.29, 6.61, 1.10   ],\n        platforms[6] => [64.46, 29.54, 35.74, 6.07, 1.32, 4.52, 1.16 ],\n        platforms[7] => [2.18, 2.43, 3.51, 3.49, 0.84, 3.28, 14.60],\n        platforms[8] => [1.03, 4.79, 1.25, 2.36, 1.41, 8.12, 8.51]\n        }\n\npdata = [ {\"x\"=>benchmarks,\"y\"=>data[k],\"bardir\"=>\"h\",\"type\"=>\"bar\",\"name\"=>k} for k = platforms ]\n\nlayout = {\n          \"title\"=> \"Julia benchmark comparison (smaller is better, C performance = 1.0)\",\n          \"barmode\"=> \"group\",\n          \"autosize\"=> false,\n          \"width\"=> 900,\n          \"height\"=> 900,\n          \"titlefont\"=>\n          {\n           \"family\"=> \"Open Sans\",\n           \"size\"=> 18,\n           \"color\"=> \"rgb(84, 39, 143)\"\n           },\n          \"margin\"=> {\"l\"=>160, \"pad\"=>0},\n          \"xaxis\"=> {\n                     \"title\"=> \"Benchmark log-time\",\n                     \"type\"=> \"log\"\n                     },\n          \"yaxis\"=> {\"title\"=> \"Benchmark Name\"}\n          }\n\nresponse = Plotly.plot(pdata,[\"layout\"=>layout])\n\n# Embed in an iframe within IJulia\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n\n```{code-cell}\n# checkout https://plot.ly/api/ for more Julia examples!\n# But to show off some other Plotly features:\nx = 1:1500\ny1 = sin(2*pi*x/1500.) + rand(1500)-0.5\ny2 = sin(2*pi*x/1500.)\n\nfish = {\"x\"=>x,\"y\"=> y1,\n\t\"type\"=>\"scatter\",\"mode\"=>\"markers\",\n\t\"marker\"=>{\"color\"=>\"rgb(0, 0, 255)\",\"opacity\"=>0.5 } }\n\nfit = {\"x\"=> x,\"y\"=> y2,\n\t\"type\"=>\"scatter\", \"mode\"=>\"markers\", \"opacity\"=>0.8,\n\t\"marker\"=>{\"color\"=>\"rgb(255, 0, 0)\"} }\n\nlayout = {\"autosize\"=> false,\n    \"width\"=> 650, \"height\"=> 550,\n    \"title\"=>\"Fish School\",\n\t\"xaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",    \n        \"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[0,1500] },\n\t\"yaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",\n\t\t\"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[-2.2,2.2] },\n\t\"plot_bgcolor\"=> \"rgb(245,245,247)\",\n    \"showlegend\"=> false,\n    \"hovermode\"=> \"closest\"}\n\nresponse = Plotly.plot([fish, fit],[\"layout\"=>layout])\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/jupyter.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n# Jupyter notebook\n\nThis notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n\n```{code-cell} ipython3\na = 1\nb = 2\na + b\n```\n\nNow we return a few tuples\n\n```{code-cell} ipython3\na, b\n```\n\n```{code-cell} ipython3\na, b, a+b\n```\n\nAnd this is already the end of the notebook\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/jupyter_again.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n```\n\n```{code-cell} ipython3\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n```\n\n```{code-cell} ipython3\n?next\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/jupyter_with_raw_cell_in_body.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\n1+2+3\n```\n\n```{raw-cell}\nThis is a raw cell\n```\n\nThis is a markdown cell\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/jupyter_with_raw_cell_on_top.md",
    "content": "---\ntitle: Quick test\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n  chunk_output_type: console\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\njupytext:\n  root_level_metadata_filter: -title,-output,-editor_options\n---\n\n```{code-cell} ipython3\n1+2+3\n```\n\n```{code-cell} ipython3\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/jupyter_with_raw_cell_with_invalid_yaml.md",
    "content": "---\nkernelspec:\n  display_name: Python 3 (ipykernel)\n  language: python\n  name: python3\n---\n\n```{raw-cell}\n\n---\ntitle: Exception: Test\n---\n```\n\n```{code-cell} ipython3\n1 + 2 + 3\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/jupyterlab-slideshow_1441.md",
    "content": "---\nkernelspec:\n  display_name: Python 3 (ipykernel)\n  language: python\n  name: python3\n---\n\n+++ {\"@deathbeds/jupyterlab-fonts\": {\"styles\": {\"\": {\"body[data-jp-deck-mode='presenting'] &\": {\"right\": \"0\", \"top\": \"30%\", \"width\": \"25%\", \"z-index\": 1}}}}, \"jupyterlab-slideshow\": {\"layer\": \"slide\"}}\n\n> **Note**\n> \n> `slide` layer with a `top` of `30%`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/jupytext_replication.md",
    "content": "---\nkernelspec:\n  display_name: SoS\n  language: sos\n  name: sos\n---\n\n+++ {\"Collapsed\": \"false\", \"kernel\": \"SoS\"}\n\n# Text SOS-kernel with Jupytext\n\n## What is SOS kernel\n\nSoS consists of a ployglot notebook that allows the use of multiple kernels in one Jupyter notebook, and a workflow system that is designed for daily computational research. Basically,\n\n- SoS Polyglot Notebook is a Jupyter Notebook with a SoS kernel.\n- SoS Notebook serves as a super kernel to all other Jupyter kernels and allows the use of multiple kernels in one Jupyter notebook.\n- SoS Workflow System is a Python based workflow system that is designed to be readable, shareable, and suitable for daily data analysis.\n- SoS Workflow System can be used from command line or use SoS Notebook as its IDE.\n\n![](https://vatlab.github.io/sos-docs/doc/media/SoS_Notebook_and_Workflow.png)\n\n### How to install SOS-kernel\n\nPlease follow this [link](https://vatlab.github.io/sos-docs/running.html#Conda-installation) to setup SOS\n\nI run some issue with the latest version of R on my Mac, so I had to install an earlier version of R\n\n```\nconda install -c r r=3.5.1\nconda install sos-notebook jupyterlab-sos sos-papermill -c conda-forge\n```\n\n## Related issue with Jupytext\n\nJupytext works fine with Python/R kernel but converts code cells into markdown cells when using the SOS kernel.\n\ncf the image below. It is a code cell. After saving the notebook and restart it, it converted the code cell into markdown\n\n<img width=\"734\" alt=\"Screenshot 2020-03-13 at 10 51 18\" src=\"https://user-images.githubusercontent.com/33351426/76610049-9e704600-6518-11ea-861e-b4f691d1a478.png\">\n\n+++ {\"Collapsed\": \"false\", \"kernel\": \"SoS\"}\n\n## Step 1\n\nPlease, choose SOS Kernel and then, in the cell code, choose SOS (or any other kernel available), the outcome is the same.\n\n![](https://drive.google.com/uc?export=view&id=1OtyxfwoRyVK23XHnmd9JR-crBgHBL5mt)\n\n```{code-cell} sos\n:Collapsed: 'false'\n:kernel: SoS\n\nimport pandas as pd \nimport numpy as np\n\npd.DataFrame({\n    'x': np.random.random(10),\n    'y': np.random.random(10),\n})\n```\n\n+++ {\"Collapsed\": \"false\", \"kernel\": \"python3\"}\n\n## Step 2\n\nNow, pair it with Jupytex\n\n![](https://drive.google.com/uc?export=view&id=1Wtx-YPAXY8HWHqzCcy4iIgHpzt_9emEn)\n\n+++ {\"Collapsed\": \"false\", \"kernel\": \"python3\"}\n\n### Step 3\n\nSave the notebook, restart and clear all, **save**, then Shut down kernel. Close the notebook and reopen\n\n+++ {\"Collapsed\": \"false\", \"kernel\": \"python3\"}\n\n### Step 4\n\nReopen the notebook. Here is the outcome\n\n![](https://drive.google.com/uc?export=view&id=12C70unbSPv0gHCZaCICEUy7kO7wM93JH)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/kalman_filter_and_visualization.md",
    "content": "---\nkernelspec:\n  display_name: Q 3.5\n  language: q\n  name: qpk\n---\n\n```{code-cell}\nplt: .p.import`matplotlib.pyplot\n```\n\n```{code-cell}\nfilter: {\n    t: ([] x: `float $ x; xh: `float $ x; p: (count x) # R: var x);\n    (first t), iterate[R; R]\\[first t; 1 _ t] \n    }\n\niterate: {[Q; R; x; y]\n    x[`p]+: Q;\n    k: x[`p] % R + x[`p];\n    `x`xh`p ! (y[`x]; x[`xh] + k * y[`x] - x[`xh]; (1 - k) * x[`p])\n    }\n```\n\n```{code-cell}\nprice: 100 + sums 0.5 - (n:50)?1.\n```\n\n```{code-cell}\noutput:filter price\n```\n\n```{code-cell}\nplt[`:plot][til n; output`x; `label pykw \"price\"];\nplt[`:plot][til n; output`xh;`label pykw \"forecast\"];\nplt[`:legend][];\nplt[`:show][];\n```\n\n```{code-cell}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/logtalk_notebook.md",
    "content": "---\nkernelspec:\n  display_name: Logtalk\n  language: logtalk\n  name: logtalk_kernel\n---\n\n# An implementation of the Ackermann function\n\n```{code-cell}\n---\nvscode:\n  languageId: logtalk\n---\n%%load ack.lgt\n\n:- object(ack).\n\n:- info([\n\tversion is 1:0:0,\n\tauthor is 'Paulo Moura',\n\tdate is 2008-3-31,\n\tcomment is 'Ackermann function (general recursive function).'\n]).\n\n:- public(ack/3).\n:- mode(ack(+integer, +integer, -integer), one).\n:- info(ack/3, [\n\tcomment is 'Ackermann function.',\n\targnames is ['M', 'N', 'V']\n]).\n\nack(0, N, V) :-\n\t!,\n\tV is N + 1.\nack(M, 0, V) :-\n\t!,\n\tM2 is M - 1,\n\tack(M2, 1, V).\nack(M, N, V) :-\n\tM2 is M - 1,\n\tN2 is N - 1,\n\tack(M, N2, V2),\n\tack(M2, V2, V).\n\n:- end_object.\n```\n\n## Sample query\n\n```{code-cell}\n---\nvscode:\n  languageId: logtalk\n---\nack::ack(2, 4, V).\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/lua_example.md",
    "content": "---\nkernelspec:\n  display_name: Lua\n  language: lua\n  name: lua\n---\n\nSource: https://www.lua.org/pil/19.3.html\n\n+++\n\n# Sort\n\n+++\n\nAnother useful function on arrays is table.sort, which we have seen before. It receives the array to be sorted, plus an optional order function. This order function receives two arguments and must return true if the first argument should come first in the sorted array. If this function is not provided, sort uses the default less-than operation (corresponding to the `<´ operator).\n\n+++\n\nA common mistake is to try to order the indices of a table. In a table, the indices form a set, and have no order whatsoever. If you want to order them, you have to copy them to an array and then sort the array. Let us see an example. Suppose that you read a source file and build a table that gives, for each function name, the line where that function is defined; something like this:\n\n```{code-cell}\nlines = {\n    luaH_set = 10,\n    luaH_get = 24,\n    luaH_present = 48,\n}\n```\n\n Now you want to print these function names in alphabetical order. If you traverse this table with pairs, the names appear in an arbitrary order. However, you cannot sort them directly, because these names are keys of the table. However, when you put these names into an array, then you can sort them. First, you must create an array with those names, then sort it, and finally print the result:\n\n```{code-cell}\na = {}\nfor n in pairs(lines) do table.insert(a, n) end\ntable.sort(a)\nfor i,n in ipairs(a) do print(n) end\n```\n\nNote that, for Lua, arrays also have no order. But we know how to count, so we get ordered values as long as we access the array with ordered indices. That is why you should always traverse arrays with ipairs, rather than pairs. The first imposes the key order 1, 2, ..., whereas the latter uses the natural arbitrary order of the table.\n\n+++\n\nAs a more advanced solution, we can write an iterator that traverses a table following the order of its keys. An optional parameter f allows the specification of an alternative order. It first sorts the keys into an array, and then iterates on the array. At each step, it returns the key and value from the original table:\n\n```{code-cell}\nfunction pairsByKeys (t, f)\n    local a = {}\n    for n in pairs(t) do table.insert(a, n) end\n    table.sort(a, f)\n    local i = 0               -- iterator variable\n    local iter = function ()  -- iterator function\n        i = i + 1\n        if a[i] == nil then return nil\n        else return a[i], t[a[i]]\n        end\n    end\n    return iter\nend\n```\n\n With this function, it is easy to print those function names in alphabetical order. The loop\n\n```{code-cell}\nfor name, line in pairsByKeys(lines) do\n    print(name, line)\nend\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/maxima_example.md",
    "content": "---\nkernelspec:\n  display_name: Maxima\n  language: maxima\n  name: maxima\n---\n\n## maxima misc\n\n```{code-cell} maxima\nkill(all)$\n```\n\n```{code-cell} maxima\nf(x) := 1/(x^2+l^2)^(3/2);\n```\n\n```{code-cell} maxima\nintegrate(f(x), x);\n```\n\n```{code-cell} maxima\ntex(%)$\n```\n\n```{code-cell} maxima\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/notebook_with_complex_metadata.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/nteract_with_parameter.md",
    "content": "---\nkernel_info:\n  name: python3\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{code-cell} ipython3\n:inputHidden: false\n:outputHidden: false\n:tags: [parameters]\n\nparam = 4\n```\n\n```{code-cell} ipython3\n:inputHidden: false\n:outputHidden: false\n\nimport pandas as pd\n```\n\n```{code-cell} ipython3\n:inputHidden: false\n:outputHidden: false\n\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n```\n\n```{code-cell} ipython3\n:inputHidden: false\n:outputHidden: false\n\n%matplotlib inline\ndf.plot(kind='bar')\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/ocaml_notebook.md",
    "content": "---\njupytext:\n  formats: ipynb:markdown,md:myst\nkernelspec:\n  display_name: OCaml default\n  language: OCaml\n  name: ocaml-jupyter\n---\n\n# Example of an OCaml notebook\n\n```{code-cell} OCaml\nlet sum x y = x + y\n```\n\nLet's try our function:\n\n```{code-cell} OCaml\nsum 3 4 = 7 + 0\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/octave_notebook.md",
    "content": "---\nkernelspec:\n  display_name: Octave\n  language: octave\n  name: octave\n---\n\nA markdown cell\n\n```{code-cell}\n1 + 1\n```\n\n```{code-cell}\n% a code cell with comments\n2 + 2\n```\n\n```{code-cell}\n% a simple plot\nx = -10:0.1:10;\nplot (x, sin (x));\n```\n\n```{code-cell}\n%plot -w 800\n% a simple plot with a magic instruction\nx = -10:0.1:10;\nplot (x, sin (x));\n```\n\nAnd to finish with, a Python cell\n\n```{code-cell}\n%%python\na = 1\n```\n\n```{code-cell}\n%%python\na + 1\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/plotly_graphs.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\nThis notebook contains complex outputs, including plotly javascript graphs.\n\n+++\n\n# Interactive plots\n\n+++\n\nWe use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n\n```{code-cell} ipython3\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n```\n\n```{code-cell} ipython3\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/powershell.md",
    "content": "---\nkernelspec:\n  display_name: PowerShell\n  language: PowerShell\n  name: powershell\n---\n\nThis is an extract from\nhttps://github.com/Jaykul/Jupyter-PowerShell/blob/master/LiterateDevOps.ipynb\n\n```{code-cell} powershell\n$imageUrl = 'https://upload.wikimedia.org/wikipedia/commons/2/2f/PowerShell_5.0_icon.png'\n$ImageData = @{ \"png\" = (Invoke-WebRequest $imageUrl -UseBasicParsing).RawContentStream.GetBuffer() }\n# $ImageData\n\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 32 } }\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 64 } }\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/raw_cell_with_complex_yaml_like_content.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{raw-cell}\n\n---\n\nThis is a complex paragraph\nthat is split over multiple lines.\n\nIt also includes blank lines.\n\n\n---\n```\n\n```{code-cell}\nprint(\"Hello, World!\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/raw_cell_with_non_dict_yaml_content.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n```{raw-cell}\n\n---\nContent.\n---\n```\n\n```{code-cell}\nprint(\"Hello, World!\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/root_cpp.md",
    "content": "---\nkernelspec:\n  display_name: ROOT C++\n  language: c++\n  name: root\n---\n\n```{code-cell}\n#include <iostream>\n#include <string>\n```\n\n```{code-cell}\nint k = 4;\nstd::string foo = \"This string says \\\"foo\\\"\";\n```\n\n```{code-cell}\nstd::cout << \"k = \" << k << '\\n' << foo << '\\n';\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/sage_print_hello.md",
    "content": "---\nkernelspec:\n  display_name: SageMath 9.2\n  language: sage\n  name: sagemath\n---\n\n```{code-cell} ipython3\nprint(\"Hello world\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/sample_bash_notebook.md",
    "content": "---\nkernelspec:\n  display_name: Bash\n  language: bash\n  name: bash\n---\n\n```{code-cell}\nls\n```\n\n```{code-cell}\n# https://coderwall.com/p/euwpig/a-better-git-log\ngit config --global alias.lg \"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\"\n```\n\n```{code-cell}\ngit lg\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/sample_rise_notebook_66.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n+++ {\"slideshow\": {\"slide_type\": \"slide\"}}\n\nA markdown cell\n\n```{code-cell} ipython3\n---\nslideshow:\n  slide_type: ''\n---\n1+1\n```\n\n+++ {\"cell_style\": \"center\", \"slideshow\": {\"slide_type\": \"fragment\"}}\n\nMarkdown cell two\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/sas.md",
    "content": "---\nkernelspec:\n  display_name: SAS\n  language: sas\n  name: sas\n---\n\n# SAS Notebooks with jupytext\n\n```{code-cell}\nproc sql;\n    select *\n    from sashelp.cars (obs=10)\n    ;\nquit; \n```\n\n```{code-cell}\n%let name = \"Jupytext\";\n```\n\n```{code-cell}\n%put &name;\n```\n\n```{code-cell}\n/* Note when defining macros \"%macro\" cannot be the first line of text in the cell */\n%macro test;\n    data temp;\n        set sashelp.cars;\n        name = \"testx\";\n    run; \n    proc print data = temp (obs=10);\n    run; \n%mend test;\n\n%test\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/simple-helloworld.md",
    "content": "---\njupytext:\n  encoding: '// -*- coding: utf-8 -*-'\n  formats: ipynb,java:light\nkernelspec:\n  display_name: Java\n  language: java\n  name: java\n---\n\nLet's define some class.\n\n```{code-cell}\nclass A {\n    public void hello() {\n        System.out.println(\"Hello World\");\n    }   \n}\n```\n\nAnd now we call its method.\n\n```{code-cell}\nnew A().hello();\n```\n\nYou can run it e.g. with `jshell`\n\n* from command line, as `jshell simple-helloworld.java`\n* from jshell's shell with `/open simple-helloworld.java`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/simple_robot_notebook.md",
    "content": "---\nkernelspec:\n  display_name: Robot Framework\n  language: robotframework\n  name: robotkernel\n---\n\n```{code-cell} robotframework\n*** Settings ***\n\nLibrary  Collections\n```\n\n```{code-cell} robotframework\n*** Keywords ***\n\nHead\n    [Arguments]  ${list}\n    ${value}=  Get from list  ${list}  0\n    [Return]  ${value}\n```\n\n```{code-cell} robotframework\n*** Tasks ***\n\nGet head\n    ${array}=  Create list  1  2  3  4  5\n    ${head}=  Head  ${array}\n    Should be equal  ${head}  1\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/simple_scala_notebook.md",
    "content": "---\nkernelspec:\n  display_name: Apache Toree - Scala\n  language: scala\n  name: apache_toree_scala\n---\n\n```{code-cell} scala\n// This is just a simple scala notebook\n\nobject SampleObject {\n    def calculation(x: Int, y: Int): Int = x + y\n}\n\nval result = SampleObject.calculation(1, 2)\n```\n\n```{code-cell} scala\nprintln(result * 10)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/stata_notebook.md",
    "content": "---\nkernelspec:\n  display_name: Stata\n  language: stata\n  name: stata\n---\n\n```{code-cell}\n// This notebook uses the stata_kernel: https://github.com/kylebarron/stata_kernel\n```\n\n```{code-cell}\nuse http://www.stata-press.com/data/r13/auto\n```\n\n```{code-cell}\nsummarize\n```\n\n```{code-cell}\nscatter weight length\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/tailrecursive-factorial.md",
    "content": "---\njupytext:\n  encoding: '// -*- coding: utf-8 -*-'\n  formats: ipynb,groovy:light\nkernelspec:\n  display_name: Groovy\n  language: groovy\n  name: groovy\n---\n\n# TailRecursive annotation\n\nLet's check what is the effect of `@TailRecursive` annotation on the simple recursive definition of factorial function.\n\n```{code-cell}\nimport groovy.transform.CompileStatic\nimport groovy.transform.TailRecursive\nimport groovy.transform.TypeChecked\n\n@CompileStatic\n@TypeChecked\nclass X {\n    static final BigInteger factorial0(int n) {\n        (n <= 1) ? 1G : factorial0(n-1).multiply(BigInteger.valueOf(n))\n    }\n\n    static final BigInteger factorial1(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial1(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n\n    @TailRecursive\n    static final BigInteger factorial2(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial2(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n}\n\nx = new X()\n```\n\nAlthough we can time the execution of the calls, it is not very accurate; such micro benchmarks should be performed in more controlled environment, such us under [JMH](https://openjdk.java.net/projects/code-tools/jmh/).\n\nFor example, see [blog posts of Szymon Stępniak](https://e.printstacktrace.blog/tail-recursive-methods-in-groovy/).\n\n```{code-cell}\n%%timeit\n\nx.factorial0(19_000).toString().length()\n```\n\n```{code-cell}\n%%timeit\n\nx.factorial1(19_000).toString().length()\n```\n\n```{code-cell}\n%%timeit\n\nx.factorial2(19_000).toString().length()\n```\n\nThe real difference is the use of stack. Non-tail recursive calls exhaust the stack space at some point, whereas tail recursive calls don't add frames to the stack.\n\n```{code-cell}\nfactSize = { n, cl ->\n    println \"Factorial of ${n} has ${cl(n).toString().length()} digits\"\n}\n\nfactSize 2_000, x.&factorial0\nfactSize 2_000, x.&factorial1\nfactSize 2_000, x.&factorial2\n\nfactSize 100_000, x.&factorial2\n```\n\n```{code-cell}\ntry {\n    factSize 100_000, x.&factorial1\n} catch (Throwable e) {\n    assert e instanceof StackOverflowError\n    println e\n}\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/tcl_test.md",
    "content": "---\nkernelspec:\n  display_name: Tcl\n  language: tcl\n  name: tcljupyter\n---\n\n# Assign Values\n\n```{code-cell}\nset a 1\nputs \"a = $a\"\n```\n\n# Loop\n\n```{code-cell}\nfor {set i 0} {$i < 10} {incr i} {\n    puts \"I inside first loop: $i\"\n}\n```\n\n```{code-cell}\n\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/text_outputs_and_images.md",
    "content": "---\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\nThis notebook contains outputs of many different types: text, HTML, plots and errors.\n\n+++\n\n# Text outputs\n\nUsing `print`, `sys.stdout` and `sys.stderr`\n\n```{code-cell} ipython3\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n```\n\n```{code-cell} ipython3\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n```\n\n# HTML outputs\n\nUsing `pandas`. Here we find two representations: both text and HTML.\n\n```{code-cell} ipython3\nimport pandas as pd\npd.DataFrame([4])\n```\n\n```{code-cell} ipython3\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n```\n\n# Images\n\n```{code-cell} ipython3\n%matplotlib inline\n```\n\n```{code-cell} ipython3\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n```\n\n# Errors\n\n```{code-cell} ipython3\nundefined_variable\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/wolfram.md",
    "content": "---\nkernelspec:\n  display_name: Wolfram Language 13.1\n  language: Wolfram Language\n  name: wolframlanguage13.1\n---\n\n**Note:** The `language_info` `file_extension` in this notebook should be `.m`, but it was deliberately changed to `.wolfram` to avoid conflicts with Matlab which is using the same extension.\n\n+++\n\nWe start with...\n\n```{code-cell} mathematica\nPrint[\"Hello, World!\"];\n```\n\nThen we draw the first example plot from the [ListPlot](https://reference.wolfram.com/language/ref/ListPlot.html) reference:\n\n```{code-cell} mathematica\nListPlot[Prime[Range[25]]]\n```\n\nWe also test the math outputs as in the [Simplify](https://reference.wolfram.com/language/ref/Simplify.html) example:\n\n```{code-cell} mathematica\nD[Integrate[1/(x^3 + 1), x], x]\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_myst/xonsh_example.md",
    "content": "---\nkernelspec:\n  display_name: Xonsh\n  language: xonsh\n  name: xonsh\n---\n\n```{code-cell} xonsh\nlen($(curl -L https://xon.sh))\n```\n\n```{code-cell} xonsh\nfor filename in `.*`:\n    print(filename)\n    du -sh @(filename)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/Notebook_with_R_magic.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 2\n    language: python\n    name: python2\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .markdown}\n# A notebook with R cells\n\nThis notebook shows the use of R cells to generate plots\n:::\n\n::: {.cell .code}\n``` python\n%load_ext rpy2.ipython\n```\n:::\n\n::: {.cell .code}\n``` python\n%%R\nsuppressMessages(require(tidyverse))\n```\n:::\n\n::: {.cell .code}\n``` python\n%%R\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n:::\n\n::: {.cell .markdown}\nThe default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\n:::\n\n::: {.cell .code}\n``` python\n%%R -w 400 -h 240\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/Notebook_with_more_R_magic_111.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` python\n%load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n```\n:::\n\n::: {.cell .code}\n``` python\n%%R -i df\nlibrary(\"ggplot2\")\nggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/cat_variable.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` python\ncat = 42\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/convert_to_py_then_test_with_update83.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` python\n%%time\n\nprint('asdf')\n```\n:::\n\n::: {.cell .markdown}\nThanks for jupytext!\n:::\n\n::: {.cell .code}\n``` python\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/frozen_cell.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` python\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n```\n:::\n\n::: {.cell .code deletable=\"false\" editable=\"false\" run_control=\"{\\\"frozen\\\":true}\"}\n``` python\n# This is an frozen cell\nprint(\"I'm frozen so Im not executed :(\")\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/ir_notebook.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: R\n    language: R\n    name: ir\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .markdown}\nThis is a jupyter notebook that uses the IR kernel.\n:::\n\n::: {.cell .code}\n``` R\nsum(1:10)\n```\n:::\n\n::: {.cell .code}\n``` R\nplot(cars)\n```\n:::\n\n::: {.cell .code}\n``` R\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/julia_benchmark_plotly_barchart.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: julia-1.1\n  nbformat: 4\n  nbformat_minor: 1\n---\n\n::: {.cell .code}\n``` julia\n# IJulia rocks! So does Plotly. Check it out\n\nusing Plotly\napi_key = \"\" # visit https://plot.ly/api to generate an API username and password\nusername = \"\"\n\nPlotly.signin(username, api_key)\n```\n:::\n\n::: {.cell .code}\n``` julia\n# Following data taken from http://julialang.org/ frontpage \nbenchmarks = [\"fib\", \"parse_int\", \"quicksort3\", \"mandel\", \"pi_sum\", \"rand_mat_stat\", \"rand_mat_mul\"]\nplatforms = [\"Fortran\", \"Julia\", \"Python\", \"R\", \"Matlab\", \"Mathematica\", \"Javascript\", \"Go\"]\n\ndata = {\n        platforms[1] => [0.26, 5.03, 1.11, 0.86, 0.80, 0.64, 0.96],\n        platforms[2] => [0.91, 1.60, 1.14, 0.85, 1.00, 1.66, 1.01],\n        platforms[3] => [30.37, 13.95, 31.98, 14.19, 16.33, 13.52, 3.41 ],\n        platforms[4] => [411.36, 59.40, 524.29, 106.97, 15.42, 10.84, 3.98  ],\n        platforms[5] => [1992.00, 1463.16, 101.84, 64.58, 1.29, 6.61, 1.10   ],\n        platforms[6] => [64.46, 29.54, 35.74, 6.07, 1.32, 4.52, 1.16 ],\n        platforms[7] => [2.18, 2.43, 3.51, 3.49, 0.84, 3.28, 14.60],\n        platforms[8] => [1.03, 4.79, 1.25, 2.36, 1.41, 8.12, 8.51]\n        }\n\npdata = [ {\"x\"=>benchmarks,\"y\"=>data[k],\"bardir\"=>\"h\",\"type\"=>\"bar\",\"name\"=>k} for k = platforms ]\n\nlayout = {\n          \"title\"=> \"Julia benchmark comparison (smaller is better, C performance = 1.0)\",\n          \"barmode\"=> \"group\",\n          \"autosize\"=> false,\n          \"width\"=> 900,\n          \"height\"=> 900,\n          \"titlefont\"=>\n          {\n           \"family\"=> \"Open Sans\",\n           \"size\"=> 18,\n           \"color\"=> \"rgb(84, 39, 143)\"\n           },\n          \"margin\"=> {\"l\"=>160, \"pad\"=>0},\n          \"xaxis\"=> {\n                     \"title\"=> \"Benchmark log-time\",\n                     \"type\"=> \"log\"\n                     },\n          \"yaxis\"=> {\"title\"=> \"Benchmark Name\"}\n          }\n\nresponse = Plotly.plot(pdata,[\"layout\"=>layout])\n\n# Embed in an iframe within IJulia\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n:::\n\n::: {.cell .code}\n``` julia\n# checkout https://plot.ly/api/ for more Julia examples!\n# But to show off some other Plotly features:\nx = 1:1500\ny1 = sin(2*pi*x/1500.) + rand(1500)-0.5\ny2 = sin(2*pi*x/1500.)\n\nfish = {\"x\"=>x,\"y\"=> y1,\n\t\"type\"=>\"scatter\",\"mode\"=>\"markers\",\n\t\"marker\"=>{\"color\"=>\"rgb(0, 0, 255)\",\"opacity\"=>0.5 } }\n\nfit = {\"x\"=> x,\"y\"=> y2,\n\t\"type\"=>\"scatter\", \"mode\"=>\"markers\", \"opacity\"=>0.8,\n\t\"marker\"=>{\"color\"=>\"rgb(255, 0, 0)\"} }\n\nlayout = {\"autosize\"=> false,\n    \"width\"=> 650, \"height\"=> 550,\n    \"title\"=>\"Fish School\",\n\t\"xaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",    \n        \"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[0,1500] },\n\t\"yaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",\n\t\t\"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[-2.2,2.2] },\n\t\"plot_bgcolor\"=> \"rgb(245,245,247)\",\n    \"showlegend\"=> false,\n    \"hovermode\"=> \"closest\"}\n\nresponse = Plotly.plot([fish, fit],[\"layout\"=>layout])\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/jupyter.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .markdown}\n# Jupyter notebook\n\nThis notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n:::\n\n::: {.cell .code}\n``` python\na = 1\nb = 2\na + b\n```\n:::\n\n::: {.cell .markdown}\nNow we return a few tuples\n:::\n\n::: {.cell .code}\n``` python\na, b\n```\n:::\n\n::: {.cell .code}\n``` python\na, b, a+b\n```\n:::\n\n::: {.cell .markdown}\nAnd this is already the end of the notebook\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/jupyter_again.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` python\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n```\n:::\n\n::: {.cell .code}\n``` python\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n```\n:::\n\n::: {.cell .code}\n``` python\n?next\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/jupyter_with_raw_cell_in_body.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` python\n1+2+3\n```\n:::\n\n::: {.cell .raw}\n```{=ipynb}\nThis is a raw cell\n```\n:::\n\n::: {.cell .markdown}\nThis is a markdown cell\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/jupyter_with_raw_cell_on_top.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .raw}\n```{=ipynb}\n---\ntitle: Quick test\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n  chunk_output_type: console\n---\n```\n:::\n\n::: {.cell .code}\n``` python\n1+2+3\n```\n:::\n\n::: {.cell .code}\n``` python\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/notebook_with_complex_metadata.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` python\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/nteract_with_parameter.md",
    "content": "---\njupyter:\n  kernel_info:\n    name: python3\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code inputHidden=\"false\" outputHidden=\"false\" tags=\"[\\\"parameters\\\"]\"}\n``` python\nparam = 4\n```\n:::\n\n::: {.cell .code inputHidden=\"false\" outputHidden=\"false\"}\n``` python\nimport pandas as pd\n```\n:::\n\n::: {.cell .code inputHidden=\"false\" outputHidden=\"false\"}\n``` python\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n```\n:::\n\n::: {.cell .code inputHidden=\"false\" outputHidden=\"false\"}\n``` python\n%matplotlib inline\ndf.plot(kind='bar')\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/plotly_graphs.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .markdown}\nThis notebook contains complex outputs, including plotly javascript graphs.\n:::\n\n::: {.cell .markdown}\n# Interactive plots\n:::\n\n::: {.cell .markdown}\nWe use Plotly\\'s connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n:::\n\n::: {.cell .code}\n``` python\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n```\n:::\n\n::: {.cell .code}\n``` python\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/raw_cell_with_complex_yaml_like_content.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 5\n---\n\n::: {#b32297a4 .cell .raw}\n```{=ipynb}\n---\n\nThis is a complex paragraph\nthat is split over multiple lines.\n\nIt also includes blank lines.\n\n\n---\n```\n:::\n\n::: {#0b3bde0a .cell .code}\n``` python\nprint(\"Hello, World!\")\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/raw_cell_with_non_dict_yaml_content.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 5\n---\n\n::: {#b32297a4 .cell .raw}\n```{=ipynb}\n---\nContent.\n---\n```\n:::\n\n::: {#0b3bde0a .cell .code}\n``` python\nprint(\"Hello, World!\")\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/sample_rise_notebook_66.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .markdown slideshow=\"{\\\"slide_type\\\":\\\"slide\\\"}\"}\nA markdown cell\n:::\n\n::: {.cell .code slideshow=\"{\\\"slide_type\\\":\\\"\\\"}\"}\n``` python\n1+1\n```\n:::\n\n::: {.cell .markdown cell_style=\"center\" slideshow=\"{\\\"slide_type\\\":\\\"fragment\\\"}\"}\nMarkdown cell two\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_pandoc/text_outputs_and_images.md",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .markdown}\nThis notebook contains outputs of many different types: text, HTML, plots and errors.\n:::\n\n::: {.cell .markdown}\n# Text outputs\n\nUsing `print`, `sys.stdout` and `sys.stderr`\n:::\n\n::: {.cell .code}\n``` python\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n```\n:::\n\n::: {.cell .code}\n``` python\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n```\n:::\n\n::: {.cell .markdown}\n# HTML outputs\n\nUsing `pandas`. Here we find two representations: both text and HTML.\n:::\n\n::: {.cell .code}\n``` python\nimport pandas as pd\npd.DataFrame([4])\n```\n:::\n\n::: {.cell .code}\n``` python\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n```\n:::\n\n::: {.cell .markdown}\n# Images\n:::\n\n::: {.cell .code}\n``` python\n%matplotlib inline\n```\n:::\n\n::: {.cell .code}\n``` python\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n```\n:::\n\n::: {.cell .markdown}\n# Errors\n:::\n\n::: {.cell .code}\n``` python\nundefined_variable\n```\n:::\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/Line_breaks_in_LateX_305.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# This cell uses no particular cell marker\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x)\\\\\n# \\dot{y} & = \\rho x - y - xz \\\\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# %% [markdown]\n# This cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x) \\\n# \\dot{y} & = \\rho x - y - xz \\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# %% [markdown]\nr'''\nThis cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n'''\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/Notebook with function and cell metadata 164.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n1 + 1\n\n\n# %% [markdown]\n# A markdown cell\n# And below, the cell for function f has non trivial cell metadata. And the next cell as well.\n\n# %% attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\ndef f(x):\n    return x\n\n\n# %% attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\nf(5)\n\n# %% [markdown]\n# More text\n\n# %%\n2 + 2\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/Notebook with html and latex cells.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% language=\"html\"\n# <p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>\n\n# %% language=\"latex\"\n# $\\frac{\\pi}{2}$\n\n# %%\n# %load_ext rpy2.ipython\n\n# %% language=\"R\"\n# library(ggplot2)\n# ggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\n\n# %%\n# %matplotlib inline\nimport pandas as pd\npd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/Notebook with many hash signs.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# ##################################################################\n# This is a notebook that contains many hash signs.\n# Hopefully its python representation is not recognized as a Sphinx Gallery script...\n# ##################################################################\n\n# %%\nsome = 1\ncode = 2\nsome+code\n\n##################################################################\n# A comment\n##################################################################\n# Another comment\n\n# %% [markdown]\n# ##################################################################\n# This is a notebook that contains many hash signs.\n# Hopefully its python representation is not recognized as a Sphinx Gallery script...\n# ##################################################################\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/Notebook with metadata and long cells.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# # Part one - various cells\n\n# %% [markdown]\n# Here we have a markdown cell\n#\n#\n# with two blank lines\n\n# %% [markdown]\n# Now we have a markdown cell\n# with a code block inside it\n#\n# ```python\n# 1 + 1\n# ```\n#\n# After that cell we'll have a code cell\n\n# %%\n2 + 2\n\n\n3 + 3\n\n# %% [markdown]\n# Followed by a raw cell\n\n# %% [raw]\n# This is \n# the content\n# of the raw cell\n\n# %% [markdown]\n# # Part two - cell metadata\n\n# %% [markdown] key=\"value\"\n# This is a markdown cell with cell metadata `{\"key\": \"value\"}`\n\n# %% .class tags=[\"parameters\"]\n\"\"\"This is a code cell with metadata `{\"tags\":[\"parameters\"], \".class\":null}`\"\"\"\n\n# %% [raw] key=\"value\"\n# This is a raw cell with cell metadata `{\"key\": \"value\"}`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/Notebook_with_R_magic.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 2\n#     language: python\n#     name: python2\n# ---\n\n# %% [markdown]\n# # A notebook with R cells\n#\n# This notebook shows the use of R cells to generate plots\n\n# %%\n# %load_ext rpy2.ipython\n\n# %% language=\"R\"\n# suppressMessages(require(tidyverse))\n\n# %% language=\"R\"\n# ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n\n# %% [markdown]\n# The default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\n\n# %% magic_args=\"-w 400 -h 240\" language=\"R\"\n# ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/Notebook_with_more_R_magic_111.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n# %load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n\n# %% magic_args=\"-i df\" language=\"R\"\n# library(\"ggplot2\")\n# ggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/R notebook with invalid cell keys.R",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# %% [markdown]\n# This notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\n# %%\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/R notebook with invalid cell keys.low.r",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# %% [markdown]\n# This notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\n# %%\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/Reference Guide for Calysto Scheme.scm",
    "content": ";; -*- coding: utf-8 -*-\n;; ---\n;; jupyter:\n;;   kernelspec:\n;;     display_name: Calysto Scheme (Python)\n;;     language: scheme\n;;     name: calysto_scheme\n;; ---\n\n;; %% [markdown]\n;; <img src=\"images/logo-64x64.png\"/>\n;; <h1>Reference Guide for Calysto Scheme</h1>\n;;\n;; [Calysto Scheme](https://github.com/Calysto/calysto_scheme) is a real Scheme programming language, with full support for continuations, including call/cc. It can also use all Python libraries. Also has some extensions that make it more useful (stepper-debugger, choose/fail, stack traces), or make it better integrated with Python.\n;;\n;; In Jupyter notebooks, because Calysto Scheme uses [MetaKernel](https://github.com/Calysto/metakernel/blob/master/README.rst), it has a fully-supported set of \"magics\"---meta-commands for additional functionality. This includes running Scheme in parallel. See all of the [MetaKernel Magics](https://github.com/Calysto/metakernel/blob/master/metakernel/magics/README.md).\n;;\n;; Calysto Scheme is written in Scheme, and then translated into Python (and other backends). The entire functionality lies in a single Python file: https://github.com/Calysto/calysto_scheme/blob/master/calysto_scheme/scheme.py However, you can easily install it (see below).\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n;;\n;; ## Installation\n;;\n;; You can install Calysto Scheme with Python3:\n;;\n;; ```\n;; pip3 install --upgrade calysto-scheme --user -U\n;; python3 -m calysto_kernel install --user\n;; ```\n;;\n;; or in the system kernel folder with:\n;;\n;; ```\n;; sudo pip3 install --upgrade calysto-scheme -U\n;; sudo python3 -m calysto_kernel install\n;; ```\n;;\n;; Change pip3/python3 to use a different pip or Python. The version of Python used will determine how Calysto Scheme is run.\n;;\n;; Use it in the console, qtconsole, or notebook with IPython 3:\n;;\n;; ```\n;; ipython console --kernel calysto_scheme\n;; ipython qtconsole --kernel calysto_scheme\n;; ipython notebook --kernel calysto_scheme\n;; ```\n;;\n;; In addition to all of the following items, Calysto Scheme also has access to all of Python's builtin functions, and all of Python's libraries. For example, you can use `(complex 3 2)` to create a complex number by calling Python's complex function.\n;;\n;; ## Jupyter Enhancements\n;;\n;; When you run Calysto Scheme in Jupyter (console, notebook, qtconsole, etc.) you get:\n;;\n;; * TAB completions of Scheme functions and variable names\n;; * display of rich media\n;; * stepper/debugger\n;; * magics (% macros)\n;; * shell commands (! command)\n;; * LaTeX equations\n;; * LaTeX-style variables\n;; * Python integration\n\n;; %% [markdown]\n;; ### LaTeX-style variables\n;;\n;; Calysto Scheme allows you to use LaTeX-style variables in code. For example, if you type:\n;;\n;; ```\n;; \\beta\n;; ```\n;;\n;; with the cursor right after the 'a' in beta, and then press TAB, it will turn into the unicode character:\n;;\n;; ```\n;; β\n;; ```\n;;\n;; There are nearly 1300 different symbols defined (thanks to the Julia language) and documented here:\n;;\n;; http://docs.julialang.org/en/release-0.4/manual/unicode-input/#man-unicode-input\n;;\n;; Calysto Scheme may not implement all of those. Some useful and suggestive ones:\n;;\n;; * \\pi - π\n;; * \\Pi - Π\n;; * \\Sigma - Σ\n;; * \\_i - subscript i, such as vectorᵢ\n\n;; %%\n(define α 67)\n\n;; %%\nα\n\n;; %%\n(define i 2)\n(define vectorᵢ (vector-ref (vector 0 6 3 2) i))\nvectorᵢ\n\n;; %% [markdown]\n;; ### Rich media\n\n;; %%\n(import \"calysto.display\")\n\n;; %%\n(calysto.display.HTML \"This is <b>bold</b>, <i>italics</i>, <u>underlined</u>.\")\n\n;; %%\n(import \"calysto.graphics\")\n\n;; %%\n(define canvas (calysto.graphics.Canvas))\n\n;; %%\n(define ball (calysto.graphics.Circle '(150 150) 100))\n\n;; %%\n(ball.draw canvas)\n\n;; %% [markdown]\n;; ### Shell commands\n\n;; %%\n! ls /tmp\n\n;; %% [markdown]\n;; ### Stepper/Debugger\n;;\n;; Here is what the debugger looks like:\n;;\n;; <img src=\"images/stepper_debugger.png\">\n;;\n;; It has breakpoints (click in left margin). You must press Stop to exit the debugger.\n\n;; %% [markdown]\n;; ```scheme\n;; %%debug\n;;\n;; (begin\n;;  (define x 1)\n;;  (set! x 2)\n;; )\n;; ```\n\n;; %% [markdown]\n;; ### Python Integration\n;;\n;; You can import and use any Python library in Calysto Scheme.\n;;\n;; In addition, if you wish, you can execute expressions and statements in a Python environment:\n\n;; %%\n(python-eval \"1 + 2\")\n\n;; %%\n(python-exec \n\"\ndef mypyfunc(a, b):\n    return a * b\n\")\n\n;; %% [markdown]\n;; This is a shared environment with Scheme:\n\n;; %%\n(mypyfunc 4 5)\n\n;; %% [markdown]\n;; You can use `func` to turn a Scheme procedure into a Python function, and `define!` to put it into the shared environment with Python:\n\n;; %%\n(define! mypyfunc2 (func (lambda (n) n)))\n\n;; %%\n(python-eval \"mypyfunc2(34)\")\n\n;; %% [markdown]\n;; # Differences Between Languages\n;;\n;; ## Major differences between Scheme and Python\n;;\n;; 1. In Scheme, double quotes are used for strings and may contain newlines\n;; 1. In Scheme, a single quote is short for (quote ...) and means \"literal\"\n;; 1. In Scheme, everything is an expression and has a return value\n;; 1. Python does not support macros (e.g., extending syntax)\n;; 1. In Python, \"if X\" is false if X is None, False, [], (,) or 0. In Scheme, \"if X\" is only false if X is #f or 0\n;; 1. Calysto Scheme uses continuations, not the call stack. However, for debugging there is a pseudo-stack when an error is raised. You can turn that off with (use-stack-trace #f)\n;; 1. Scheme procedures are not Python functions, but there are means to use one as the other.\n;;\n;; ## Major Differences Between Calysto Scheme and other Schemes\n;;\n;; 1. define-syntax works slightly differently\n;; 1. In Calysto Scheme, #(...) is short for '#(...)\n;; 1. Calysto Scheme is missing many standard functions (see list at bottom)\n;; 1. Calysto Scheme has a built-in amb operator called `choose`\n;; 1. For debugging there is a pseudo-stack when errors are raised in Calysto Scheme. You can turn that off with (use-stack-trace #f)\n;;\n;; ### Stack Trace\n;;\n;; Calysto Scheme acts as if it has a call stack, for easier debugging. For example:\n\n;; %%\n(define fact\n    (lambda (n)\n      (if (= n 1)\n           q\n           (* n (fact (- n 1))))))\n\n;; %%\n(fact 5)\n\n;; %% [markdown]\n;; To turn off the stack trace on error:\n;;\n;; ```scheme\n;; (use-stack-trace #f)\n;; ```\n;; That will allow infinite recursive loops without keeping track of the \"stack\".\n\n;; %% [markdown]\n;; # Calysto Scheme Variables\n;;\n;; ## SCHEMEPATH\n;; SCHEMEPATH is a list of search directories used with (load NAME). This is a reference, so you should append to it rather than attempting to redefine it.\n\n;; %%\nSCHEMEPATH\n\n;; %%\n(set-cdr! (cdr SCHEMEPATH) (list \"/var/modules\"))\n\n;; %%\nSCHEMEPATH\n\n;; %% [markdown]\n;; ## Getting Started\n;;\n;; Note that you can use the word `lambda` or \\lambda and then press [TAB]\n\n;; %%\n(define factorial\n  (λ (n)\n     (cond\n      ((zero? n) 1)\n      (else (* n (factorial (- n 1)))))))\n\n;; %%\n(factorial 5)\n\n;; %% [markdown]\n;; ## define-syntax\n;; (define-syntax NAME RULES): a method for creating macros\n\n;; %%\n(define-syntax time \n  [(time ?exp) (let ((start (current-time)))\n                 ?exp\n                 (- (current-time) start))])\n\n;; %%\n(time (car '(1 2 3 4)))\n\n;; %%\n;;---------------------------------------------------------------------\n;; collect is like list comprehension in Python\n\n(define-syntax collect\n  [(collect ?exp for ?var in ?list)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) #t) ?list)]\n  [(collect ?exp for ?var in ?list if ?condition)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) ?condition) ?list)])\n\n(define filter-map\n  (lambda (f pred? values)\n    (if (null? values)\n      '()\n      (if (pred? (car values))\n          (cons (f (car values)) (filter-map f pred? (cdr values)))\n          (filter-map f pred? (cdr values))))))\n\n;; %%\n(collect (* n n) for n in (range 10))\n\n;; %%\n(collect (* n n) for n in (range 5 20 3))\n\n;; %%\n(collect (* n n) for n in (range 10) if (> n 5))\n\n;; %%\n;;---------------------------------------------------------------------\n;; for loops\n\n(define-syntax for\n  [(for ?exp times do . ?bodies)\n   (for-repeat ?exp (lambda () . ?bodies))]\n  [(for ?var in ?exp do . ?bodies)\n   (for-iterate1 ?exp (lambda (?var) . ?bodies))]\n  [(for ?var at (?i) in ?exp do . ?bodies)\n   (for-iterate2 0 ?exp (lambda (?var ?i) . ?bodies))]\n  [(for ?var at (?i ?j . ?rest) in ?exp do . ?bodies)\n   (for ?var at (?i) in ?exp do\n     (for ?var at (?j . ?rest) in ?var do . ?bodies))])\n\n(define for-repeat\n  (lambda (n f)\n    (if (< n 1)\n      'done\n      (begin\n        (f)\n        (for-repeat (- n 1) f)))))\n\n(define for-iterate1\n  (lambda (values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values))\n        (for-iterate1 (cdr values) f)))))\n\n(define for-iterate2\n  (lambda (i values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values) i)\n        (for-iterate2 (+ i 1) (cdr values) f)))))\n\n;; %%\n(define matrix2d\n  '((10 20)\n    (30 40)\n    (50 60)\n    (70 80)))\n\n(define matrix3d\n  '(((10 20 30) (40 50 60))\n    ((70 80 90) (100 110 120))\n    ((130 140 150) (160 170 180))\n    ((190 200 210) (220 230 240))))\n\n;; %%\n(begin \n (define hello 0)\n (for 5 times do (set! hello (+ hello 1)))\n hello\n )\n\n;; %%\n(for sym in '(a b c d) do (define x 1) (set! x sym) (print x))\n\n;; %%\n(for n in (range 10 20 2) do (print n))\n\n;; %%\n(for n at (i j) in matrix2d do (print (list n 'coords: i j)))\n\n;; %%\n(for n at (i j k) in matrix3d do (print (list n 'coords: i j k)))\n\n;; %%\n(define-syntax scons\n  [(scons ?x ?y) (cons ?x (lambda () ?y))])\n\n(define scar car)\n\n(define scdr\n  (lambda (s)\n    (let ((result ((cdr s))))\n      (set-cdr! s (lambda () result))\n      result)))\n\n(define first\n  (lambda (n s)\n    (if (= n 0)\n      '()\n      (cons (scar s) (first (- n 1) (scdr s))))))\n\n(define nth\n  (lambda (n s)\n    (if (= n 0)\n      (scar s)\n      (nth (- n 1) (scdr s)))))\n\n(define smap\n  (lambda (f s)\n    (scons (f (scar s)) (smap f (scdr s)))))\n\n(define ones (scons 1 ones))\n\n(define nats (scons 0 (combine nats + ones)))\n\n(define combine\n  (lambda (s1 op s2)\n    (scons (op (scar s1) (scar s2)) (combine (scdr s1) op (scdr s2)))))\n\n(define fibs (scons 1 (scons 1 (combine fibs + (scdr fibs)))))\n\n(define facts (scons 1 (combine facts * (scdr nats))))\n\n(define ! (lambda (n) (nth n facts)))\n\n;; %%\n(! 5)\n\n;; %%\n(nth 10 facts)\n\n;; %%\n(nth 20 fibs)\n\n;; %%\n(first 30 fibs)\n\n;; %% [markdown]\n;; ## for-each\n;; (for-each PROCEDURE LIST): apply PROCEDURE to each item in LIST; like `map` but don't return results\n\n;; %%\n(for-each (lambda (n) (print n)) '(3 4 5))\n\n;; %% [markdown]\n;; ## format\n;; (format STRING ITEM ...): format the string with ITEMS as arguments\n\n;; %%\n(format \"This uses formatting ~a ~s ~%\" 'apple 'apple)\n\n;; %% [markdown]\n;; ## func\n;;\n;; Turns a lambda into a Python function.\n;;\n;; (func (lambda ...))\n\n;; %%\n(func (lambda (n) n))\n\n;; %% [markdown]\n;; ## There's more!\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/Reference Guide for Calysto Scheme.ss",
    "content": ";; -*- coding: utf-8 -*-\n;; ---\n;; jupyter:\n;;   kernelspec:\n;;     display_name: Calysto Scheme (Python)\n;;     language: scheme\n;;     name: calysto_scheme\n;; ---\n\n;; %% [markdown]\n;; <img src=\"images/logo-64x64.png\"/>\n;; <h1>Reference Guide for Calysto Scheme</h1>\n;;\n;; [Calysto Scheme](https://github.com/Calysto/calysto_scheme) is a real Scheme programming language, with full support for continuations, including call/cc. It can also use all Python libraries. Also has some extensions that make it more useful (stepper-debugger, choose/fail, stack traces), or make it better integrated with Python.\n;;\n;; In Jupyter notebooks, because Calysto Scheme uses [MetaKernel](https://github.com/Calysto/metakernel/blob/master/README.rst), it has a fully-supported set of \"magics\"---meta-commands for additional functionality. This includes running Scheme in parallel. See all of the [MetaKernel Magics](https://github.com/Calysto/metakernel/blob/master/metakernel/magics/README.md).\n;;\n;; Calysto Scheme is written in Scheme, and then translated into Python (and other backends). The entire functionality lies in a single Python file: https://github.com/Calysto/calysto_scheme/blob/master/calysto_scheme/scheme.py However, you can easily install it (see below).\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n;;\n;; ## Installation\n;;\n;; You can install Calysto Scheme with Python3:\n;;\n;; ```\n;; pip3 install --upgrade calysto-scheme --user -U\n;; python3 -m calysto_kernel install --user\n;; ```\n;;\n;; or in the system kernel folder with:\n;;\n;; ```\n;; sudo pip3 install --upgrade calysto-scheme -U\n;; sudo python3 -m calysto_kernel install\n;; ```\n;;\n;; Change pip3/python3 to use a different pip or Python. The version of Python used will determine how Calysto Scheme is run.\n;;\n;; Use it in the console, qtconsole, or notebook with IPython 3:\n;;\n;; ```\n;; ipython console --kernel calysto_scheme\n;; ipython qtconsole --kernel calysto_scheme\n;; ipython notebook --kernel calysto_scheme\n;; ```\n;;\n;; In addition to all of the following items, Calysto Scheme also has access to all of Python's builtin functions, and all of Python's libraries. For example, you can use `(complex 3 2)` to create a complex number by calling Python's complex function.\n;;\n;; ## Jupyter Enhancements\n;;\n;; When you run Calysto Scheme in Jupyter (console, notebook, qtconsole, etc.) you get:\n;;\n;; * TAB completions of Scheme functions and variable names\n;; * display of rich media\n;; * stepper/debugger\n;; * magics (% macros)\n;; * shell commands (! command)\n;; * LaTeX equations\n;; * LaTeX-style variables\n;; * Python integration\n\n;; %% [markdown]\n;; ### LaTeX-style variables\n;;\n;; Calysto Scheme allows you to use LaTeX-style variables in code. For example, if you type:\n;;\n;; ```\n;; \\beta\n;; ```\n;;\n;; with the cursor right after the 'a' in beta, and then press TAB, it will turn into the unicode character:\n;;\n;; ```\n;; β\n;; ```\n;;\n;; There are nearly 1300 different symbols defined (thanks to the Julia language) and documented here:\n;;\n;; http://docs.julialang.org/en/release-0.4/manual/unicode-input/#man-unicode-input\n;;\n;; Calysto Scheme may not implement all of those. Some useful and suggestive ones:\n;;\n;; * \\pi - π\n;; * \\Pi - Π\n;; * \\Sigma - Σ\n;; * \\_i - subscript i, such as vectorᵢ\n\n;; %%\n(define α 67)\n\n;; %%\nα\n\n;; %%\n(define i 2)\n(define vectorᵢ (vector-ref (vector 0 6 3 2) i))\nvectorᵢ\n\n;; %% [markdown]\n;; ### Rich media\n\n;; %%\n(import \"calysto.display\")\n\n;; %%\n(calysto.display.HTML \"This is <b>bold</b>, <i>italics</i>, <u>underlined</u>.\")\n\n;; %%\n(import \"calysto.graphics\")\n\n;; %%\n(define canvas (calysto.graphics.Canvas))\n\n;; %%\n(define ball (calysto.graphics.Circle '(150 150) 100))\n\n;; %%\n(ball.draw canvas)\n\n;; %% [markdown]\n;; ### Shell commands\n\n;; %%\n! ls /tmp\n\n;; %% [markdown]\n;; ### Stepper/Debugger\n;;\n;; Here is what the debugger looks like:\n;;\n;; <img src=\"images/stepper_debugger.png\">\n;;\n;; It has breakpoints (click in left margin). You must press Stop to exit the debugger.\n\n;; %% [markdown]\n;; ```scheme\n;; %%debug\n;;\n;; (begin\n;;  (define x 1)\n;;  (set! x 2)\n;; )\n;; ```\n\n;; %% [markdown]\n;; ### Python Integration\n;;\n;; You can import and use any Python library in Calysto Scheme.\n;;\n;; In addition, if you wish, you can execute expressions and statements in a Python environment:\n\n;; %%\n(python-eval \"1 + 2\")\n\n;; %%\n(python-exec \n\"\ndef mypyfunc(a, b):\n    return a * b\n\")\n\n;; %% [markdown]\n;; This is a shared environment with Scheme:\n\n;; %%\n(mypyfunc 4 5)\n\n;; %% [markdown]\n;; You can use `func` to turn a Scheme procedure into a Python function, and `define!` to put it into the shared environment with Python:\n\n;; %%\n(define! mypyfunc2 (func (lambda (n) n)))\n\n;; %%\n(python-eval \"mypyfunc2(34)\")\n\n;; %% [markdown]\n;; # Differences Between Languages\n;;\n;; ## Major differences between Scheme and Python\n;;\n;; 1. In Scheme, double quotes are used for strings and may contain newlines\n;; 1. In Scheme, a single quote is short for (quote ...) and means \"literal\"\n;; 1. In Scheme, everything is an expression and has a return value\n;; 1. Python does not support macros (e.g., extending syntax)\n;; 1. In Python, \"if X\" is false if X is None, False, [], (,) or 0. In Scheme, \"if X\" is only false if X is #f or 0\n;; 1. Calysto Scheme uses continuations, not the call stack. However, for debugging there is a pseudo-stack when an error is raised. You can turn that off with (use-stack-trace #f)\n;; 1. Scheme procedures are not Python functions, but there are means to use one as the other.\n;;\n;; ## Major Differences Between Calysto Scheme and other Schemes\n;;\n;; 1. define-syntax works slightly differently\n;; 1. In Calysto Scheme, #(...) is short for '#(...)\n;; 1. Calysto Scheme is missing many standard functions (see list at bottom)\n;; 1. Calysto Scheme has a built-in amb operator called `choose`\n;; 1. For debugging there is a pseudo-stack when errors are raised in Calysto Scheme. You can turn that off with (use-stack-trace #f)\n;;\n;; ### Stack Trace\n;;\n;; Calysto Scheme acts as if it has a call stack, for easier debugging. For example:\n\n;; %%\n(define fact\n    (lambda (n)\n      (if (= n 1)\n           q\n           (* n (fact (- n 1))))))\n\n;; %%\n(fact 5)\n\n;; %% [markdown]\n;; To turn off the stack trace on error:\n;;\n;; ```scheme\n;; (use-stack-trace #f)\n;; ```\n;; That will allow infinite recursive loops without keeping track of the \"stack\".\n\n;; %% [markdown]\n;; # Calysto Scheme Variables\n;;\n;; ## SCHEMEPATH\n;; SCHEMEPATH is a list of search directories used with (load NAME). This is a reference, so you should append to it rather than attempting to redefine it.\n\n;; %%\nSCHEMEPATH\n\n;; %%\n(set-cdr! (cdr SCHEMEPATH) (list \"/var/modules\"))\n\n;; %%\nSCHEMEPATH\n\n;; %% [markdown]\n;; ## Getting Started\n;;\n;; Note that you can use the word `lambda` or \\lambda and then press [TAB]\n\n;; %%\n(define factorial\n  (λ (n)\n     (cond\n      ((zero? n) 1)\n      (else (* n (factorial (- n 1)))))))\n\n;; %%\n(factorial 5)\n\n;; %% [markdown]\n;; ## define-syntax\n;; (define-syntax NAME RULES): a method for creating macros\n\n;; %%\n(define-syntax time \n  [(time ?exp) (let ((start (current-time)))\n                 ?exp\n                 (- (current-time) start))])\n\n;; %%\n(time (car '(1 2 3 4)))\n\n;; %%\n;;---------------------------------------------------------------------\n;; collect is like list comprehension in Python\n\n(define-syntax collect\n  [(collect ?exp for ?var in ?list)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) #t) ?list)]\n  [(collect ?exp for ?var in ?list if ?condition)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) ?condition) ?list)])\n\n(define filter-map\n  (lambda (f pred? values)\n    (if (null? values)\n      '()\n      (if (pred? (car values))\n          (cons (f (car values)) (filter-map f pred? (cdr values)))\n          (filter-map f pred? (cdr values))))))\n\n;; %%\n(collect (* n n) for n in (range 10))\n\n;; %%\n(collect (* n n) for n in (range 5 20 3))\n\n;; %%\n(collect (* n n) for n in (range 10) if (> n 5))\n\n;; %%\n;;---------------------------------------------------------------------\n;; for loops\n\n(define-syntax for\n  [(for ?exp times do . ?bodies)\n   (for-repeat ?exp (lambda () . ?bodies))]\n  [(for ?var in ?exp do . ?bodies)\n   (for-iterate1 ?exp (lambda (?var) . ?bodies))]\n  [(for ?var at (?i) in ?exp do . ?bodies)\n   (for-iterate2 0 ?exp (lambda (?var ?i) . ?bodies))]\n  [(for ?var at (?i ?j . ?rest) in ?exp do . ?bodies)\n   (for ?var at (?i) in ?exp do\n     (for ?var at (?j . ?rest) in ?var do . ?bodies))])\n\n(define for-repeat\n  (lambda (n f)\n    (if (< n 1)\n      'done\n      (begin\n        (f)\n        (for-repeat (- n 1) f)))))\n\n(define for-iterate1\n  (lambda (values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values))\n        (for-iterate1 (cdr values) f)))))\n\n(define for-iterate2\n  (lambda (i values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values) i)\n        (for-iterate2 (+ i 1) (cdr values) f)))))\n\n;; %%\n(define matrix2d\n  '((10 20)\n    (30 40)\n    (50 60)\n    (70 80)))\n\n(define matrix3d\n  '(((10 20 30) (40 50 60))\n    ((70 80 90) (100 110 120))\n    ((130 140 150) (160 170 180))\n    ((190 200 210) (220 230 240))))\n\n;; %%\n(begin \n (define hello 0)\n (for 5 times do (set! hello (+ hello 1)))\n hello\n )\n\n;; %%\n(for sym in '(a b c d) do (define x 1) (set! x sym) (print x))\n\n;; %%\n(for n in (range 10 20 2) do (print n))\n\n;; %%\n(for n at (i j) in matrix2d do (print (list n 'coords: i j)))\n\n;; %%\n(for n at (i j k) in matrix3d do (print (list n 'coords: i j k)))\n\n;; %%\n(define-syntax scons\n  [(scons ?x ?y) (cons ?x (lambda () ?y))])\n\n(define scar car)\n\n(define scdr\n  (lambda (s)\n    (let ((result ((cdr s))))\n      (set-cdr! s (lambda () result))\n      result)))\n\n(define first\n  (lambda (n s)\n    (if (= n 0)\n      '()\n      (cons (scar s) (first (- n 1) (scdr s))))))\n\n(define nth\n  (lambda (n s)\n    (if (= n 0)\n      (scar s)\n      (nth (- n 1) (scdr s)))))\n\n(define smap\n  (lambda (f s)\n    (scons (f (scar s)) (smap f (scdr s)))))\n\n(define ones (scons 1 ones))\n\n(define nats (scons 0 (combine nats + ones)))\n\n(define combine\n  (lambda (s1 op s2)\n    (scons (op (scar s1) (scar s2)) (combine (scdr s1) op (scdr s2)))))\n\n(define fibs (scons 1 (scons 1 (combine fibs + (scdr fibs)))))\n\n(define facts (scons 1 (combine facts * (scdr nats))))\n\n(define ! (lambda (n) (nth n facts)))\n\n;; %%\n(! 5)\n\n;; %%\n(nth 10 facts)\n\n;; %%\n(nth 20 fibs)\n\n;; %%\n(first 30 fibs)\n\n;; %% [markdown]\n;; ## for-each\n;; (for-each PROCEDURE LIST): apply PROCEDURE to each item in LIST; like `map` but don't return results\n\n;; %%\n(for-each (lambda (n) (print n)) '(3 4 5))\n\n;; %% [markdown]\n;; ## format\n;; (format STRING ITEM ...): format the string with ITEMS as arguments\n\n;; %%\n(format \"This uses formatting ~a ~s ~%\" 'apple 'apple)\n\n;; %% [markdown]\n;; ## func\n;;\n;; Turns a lambda into a Python function.\n;;\n;; (func (lambda ...))\n\n;; %%\n(func (lambda (n) n))\n\n;; %% [markdown]\n;; ## There's more!\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/The flavors of raw cells.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [raw] raw_mimetype=\"text/latex\"\n# $1+1$\n\n# %% [raw] raw_mimetype=\"text/restructuredtext\"\n# :math:`1+1`\n\n# %% [raw] raw_mimetype=\"text/html\"\n# <b>Bold text<b>\n\n# %% [raw] raw_mimetype=\"text/markdown\"\n# **Bold text**\n\n# %% [raw] raw_mimetype=\"text/x-python\"\n# 1 + 1\n\n# %% [raw]\n# Not formatted\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/cat_variable.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\ncat = 42\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/coconut_homepage_demo.coco",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Coconut\n#     language: coconut\n#     name: coconut\n# ---\n\n# %% [markdown]\n# Taken from [coconut-lang.org](coconut-lang.org)\n\n# %% [markdown]\n# pipeline-style programming\n\n# %%\n\"hello, world!\" |> print\n\n# %% [markdown]\n#  prettier lambdas\n\n# %%\nx -> x ** 2\n\n# %% [markdown]\n# partial application\n\n# %%\nrange(10) |> map$(pow$(?, 2)) |> list\n\n# %% [markdown]\n# pattern-matching\n\n# %%\nmatch [head] + tail in [0, 1, 2, 3]:\n    print(head, tail)\n\n# %% [markdown]\n# destructuring assignment\n\n# %%\n{\"list\": [0] + rest} = {\"list\": [0, 1, 2, 3]}\n\n# %% [markdown]\n# infix notation\n\n# %%\n# 5 `mod` 3 == 2\n\n# %% [markdown]\n# operator functions\n\n# %%\nproduct = reduce$(*)\n\n# %% [markdown]\n# function composition\n\n# %%\n# (f..g..h)(x, y, z)\n\n# %% [markdown]\n# lazy lists\n\n# %%\n# (| first_elem() |) :: rest_elems()\n\n# %% [markdown]\n# parallel programming\n\n# %%\nrange(100) |> parallel_map$(pow$(2)) |> list\n\n# %% [markdown]\n# tail call optimization\n\n# %%\ndef factorial(n, acc=1):\n    case n:\n        match 0:\n            return acc\n        match _ is int if n > 0:\n            return factorial(n-1, acc*n)\n\n# %% [markdown]\n# algebraic data types\n\n# %%\ndata Empty()\ndata Leaf(n)\ndata Node(l, r)\n\ndef size(Empty()) = 0\n\naddpattern def size(Leaf(n)) = 1\n\naddpattern def size(Node(l, r)) = size(l) + size(r)\n\n# %% [markdown]\n# and much more!\n#\n# Like what you see? Don't forget to star Coconut on GitHub!\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/convert_to_py_then_test_with_update83.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n# %%time\n\nprint('asdf')\n\n# %% [markdown]\n# Thanks for jupytext!\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/csharp.cs",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: .NET (C#)\n//     language: C#\n//     name: .net-csharp\n// ---\n\n// %% [markdown]\n// We start with...\n\n// %%\nConsole.WriteLine(\"Hello World!\");\n\n// %% [markdown]\n// Then we do a plot with Plotly, following the [Plotting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Plotting%20with%20Xplot.ipynb) example from `dotnet/interactive`:\n\n// %%\nusing XPlot.Plotly;\n\nvar bar = new Graph.Bar\n{\n    name = \"Bar\",\n    x = new[] {'A', 'B', 'C'},\n    y = new[] {1, 3, 2}\n};\n\nvar chart = Chart.Plot(new[] {bar});\nchart.WithTitle(\"A bar plot\");\ndisplay(chart);\n\n// %% [markdown]\n// We also test the math outputs as in the [Math and Latex](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Math%20and%20LaTeX.ipynb) example:\n\n// %%\n(LaTeXString)@\"\\begin{align} e^{i \\pi} = -1\\end{align}\"\n\n// %%\n(MathString)@\"e^{i \\pi} = -1\"\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/demo_gdl_fbp.pro",
    "content": "; -*- coding: utf-8 -*-\n; ---\n; jupyter:\n;   kernelspec:\n;     display_name: IDL [conda env:gdl] *\n;     language: IDL\n;     name: conda-env-gdl-idl\n; ---\n\n; %% [markdown]\n; ## GDL demo notebook\n\n; %% [markdown]\n; Demonstration of GDL [(gnudatalanguage)](https://github.com/gnudatalanguage/gdl)\n;\n; This notebook creates a Shepp-Logan phantom, projects it and then performs an FBP reconstruction.\n\n; %%\n;; L.A. Shepp and B.F. Logan, “The Fourier reconstruction of a head section,”\n;; IEEE Trans. Nucl. Sci. 21(3), 21–43 (1974).\nfunction shepplogan, size = size\n\n  if NOT keyword_set(size) then size = 256\n\n  phantom = fltarr(size,size)\n\n  tmp  = (findgen(size)-((size-1)/2.0)) / (size/2.0)\n  xcor = rebin(tmp,size,size)\n  ycor = rebin(transpose(tmp),size,size)\n  tmp  = fltarr(size,size)\n  \n  aa={cx: 0.0,  cy: 0.0,    maj:0.69,   min:0.92,  theta:  0.0, val: 2.0 }\n  bb={cx: 0.0,  cy:-0.0184, maj:0.6624, min:0.874, theta:  0.0, val:-0.98}\n  cc={cx: 0.22, cy: 0.0,    maj:0.11,   min:0.31,  theta:-18.0, val:-0.02}\n  dd={cx:-0.22, cy: 0.0,    maj:0.16,   min:0.41,  theta: 18.0, val:-0.02}\n  ee={cx: 0.0,  cy: 0.35,   maj:0.21,   min:0.25,  theta:  0.0, val:-0.01}\n  ff={cx: 0.0,  cy: 0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  gg={cx: 0.0,  cy:-0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  hh={cx:-0.08, cy:-0.605,  maj:0.046,  min:0.023, theta:  0.0, val:-0.01}\n  ii={cx: 0.0,  cy:-0.605,  maj:0.023,  min:0.023, theta:  0.0, val:-0.01}\n  jj={cx: 0.06, cy:-0.605,  maj:0.023,  min:0.046, theta:  0.0, val:-0.01}\n\n  list = [aa,bb,cc,dd,ee,ff,gg,hh,ii,jj]\n  for n = 0, n_elements(list)-1 do begin\n\n     tmp = ((xcor-list[n].cx) / list[n].maj)^2 $\n           + ((ycor-list[n].cy) / list[n].min)^2\n     \n     if list[n].theta NE 0 then begin\n        nx = (size-1) * (list[n].cx + 1) / 2\n        ny = (size-1) * (list[n].cy + 1) / 2\n        tmp = rot(tmp, -list[n].theta, 1, nx, ny, /interp, /pivot)\n     endif\n     \n     phantom[where(tmp LE 1.0)] += list[n].val\n     \n  endfor\n  \n  return, phantom < 1.1\n  \nend\n\n; %%\n;; Enable inline plotting\n!inline=1\n\n; %%\nphantom = shepplogan()\nwindow, 0, xsize=256, ysize=256\ntvscl, phantom > 0.95\n\n; %% [markdown]\n; Now we define simple forward and backprojection functions:\n\n; %%\nfunction proj, image, angle\n\n    sino_size_x = max(size(image,/dim))\n    sino_size_y = n_elements(angle)\n\n    sino = fltarr(sino_size_x, sino_size_y)\n    \n    for aa=0, n_elements(angle)-1 do begin\n    \n        sino[*,aa] = total(rot(image, angle[aa], /interp), 2)\n    \n    endfor\n\n    return, sino\n    \nend\n\n; %%\nfunction back, sino, angle\n\n    image_size = n_elements(sino[*,0])\n    image = fltarr(image_size,image_size)\n\n    for aa=0, n_elements(angle)-1 do begin\n    \n        image += rot(rebin(sino[*,aa],[image_size,image_size]), -angle[aa], /interp)\n    \n    endfor\n\n    return, image / n_elements(angle)\n\nend\n\n; %% [markdown]\n; This allows us to create a sinogram:\n\n; %%\nangles = findgen(360)\nsino = proj(phantom, angles)\nwindow, 0, xsize=256, ysize=360\ntvscl, sino\n\n; %% [markdown]\n; On this we can apply a simple FBP reconstruction:\n\n; %%\n;; G.L. Zeng, “Revisit of the Ramp Filter,”\n;; IEEE Trans. Nucl. Sci. 62(1), 131–136 (2015).\nfunction fbp, sino, angles\n  \n  ntot = n_elements(sino[*,0])\n  nang = n_elements(sino[0,*])\n  npos = ntot / 2 + 1           ; integer division needed !\n  nneg = ntot - npos\n\n  freq = findgen(ntot)\n  freq[npos:ntot-1] = REVERSE(freq[1:nneg])\n  freq[0] = 1\n\n  filter = -1 / (!pi * freq)^2\n  filter[where(freq mod 2 EQ 0)] *= -0.0\n  filter[0] = 0.25\n\n  filter = abs(fft(filter)) * ntot\n  filter[ntot/4:ntot/4+ntot/2-1] *= 0.0\n  filter = rebin(filter,ntot,nang)\n\n  ;; apply filter to the sinogram\n  fsino  = fft(sino,  dim=1)\n  fsino *= filter\n  fsino  = fft(fsino, dim=1, /overwrite, /inverse)\n  fsino  = !pi * real_part(fsino)\n\n  ;; backproject the filtered sinogram\n  return, back(fsino, angles)\n\nend\n\n; %%\nreconstruction = fbp(sino, angles)\nwindow, 0, xsize=512, ysize=256\n\ntvscl, [phantom, reconstruction] > 0.8\n\n; %% [markdown]\n; ### The end\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/evcxr_jupyter_tour.rs",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Rust\n//     language: rust\n//     name: rust\n// ---\n\n// %% [markdown]\n// # Tour of the EvCxR Jupyter Kernel\n// For those not already familiar with Jupyter notebook, it lets you write code into \"cells\" like the box below. Cells can alternatively contain markdown, like this text here. Each code cell is compiled and executed separately, but variables, defined functions etc persist between cells.\n//\n// ## Printing to outputs and evaluating expressions\n// Lets print something to stdout and stderr then return a final expression to see how that's presented. Note that stdout and stderr are separate streams, so may not appear in the same order is their respective print statements.\n\n// %%\nprintln!(\"Hello world\");\neprintln!(\"Hello error\");\nformat!(\"Hello {}\", \"world\")\n\n// %% [markdown]\n// ## Assigning and making use of variables\n// We define a variable `message`, then in the subsequent cell, modify the string and finally print it out. We could also do all this in the one cell if we wanted.\n\n// %%\nlet mut message = \"Hello \".to_owned();\n\n// %%\nmessage.push_str(\"world!\");\n\n// %%\nmessage\n\n// %% [markdown]\n// ## Defining and redefining functions\n// Next we'll define a function\n\n// %%\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {0} else {fib(x - 2) + fib(x - 1)}\n}\n\n// %%\n(1..13).map(fib).collect::<Vec<i32>>()\n\n// %% [markdown]\n// Hmm, that doesn't look right. Lets redefine the function. In practice, we'd go back and edit the function above and reevaluate it, but here, lets redefine it in a separate cell.\n\n// %%\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {2} else {fib(x - 2) + fib(x - 1)}\n}\n\n// %%\nlet values = (1..13).map(fib).collect::<Vec<i32>>();\nvalues\n\n// %% [markdown]\n// ## Spawning a separate thread and communicating with it\n// We can spawn a thread to do stuff in the background, then continue executing code in other cells.\n\n// %%\nuse std::sync::{Mutex, Arc};\nlet counter = Arc::new(Mutex::new(0i32));\nstd::thread::spawn({\n    let counter = Arc::clone(&counter);\n    move || {\n        for i in 1..300 {\n            *counter.lock().unwrap() += 1;\n            std::thread::sleep(std::time::Duration::from_millis(100));\n        }\n}});\n\n// %%\n*counter.lock().unwrap()\n\n// %%\n*counter.lock().unwrap()\n\n// %% [markdown]\n// ## Loading external crates\n// We can load external crates. This one takes a while to compile, but once it's compiled, subsequent cells shouldn't need to recompile it, so it should be much quicker.\n\n// %%\n// :dep base64 = \"0.10.1\"\nbase64::encode(&vec![1, 2, 3, 4])\n\n// %% [markdown]\n// ## Customizing how types are displayed\n// We can also customize how our types are displayed, including presenting them as HTML. Here's an example where we define a custom display function for a type `Matrix`.\n\n// %%\nuse std::fmt::Debug;\npub struct Matrix<T> {pub values: Vec<T>, pub row_size: usize}\nimpl<T: Debug> Matrix<T> {\n    pub fn evcxr_display(&self) {\n        let mut html = String::new();\n        html.push_str(\"<table>\");\n        for r in 0..(self.values.len() / self.row_size) {\n            html.push_str(\"<tr>\");\n            for c in 0..self.row_size {\n                html.push_str(\"<td>\");\n                html.push_str(&format!(\"{:?}\", self.values[r * self.row_size + c]));\n                html.push_str(\"</td>\");\n            }\n            html.push_str(\"</tr>\");            \n        }\n        html.push_str(\"</table>\");\n        println!(\"EVCXR_BEGIN_CONTENT text/html\\n{}\\nEVCXR_END_CONTENT\", html);\n    }\n}\n\n// %%\nlet m = Matrix {values: vec![1,2,3,4,5,6,7,8,9], row_size: 3};\nm\n\n// %% [markdown]\n// We can also return images, we just need to base64 encode them. First, we set up code for displaying RGB and grayscale images.\n\n// %%\nextern crate image;\nextern crate base64;\npub trait EvcxrResult {fn evcxr_display(&self);}\nimpl EvcxrResult for image::RgbImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::RGB(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\nimpl EvcxrResult for image::GrayImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::Gray(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\n\n// %%\nimage::ImageBuffer::from_fn(256, 256, |x, y| {\n    if (x as i32 - y as i32).abs() < 3 {\n        image::Rgb([0, 0, 255])\n    } else {\n        image::Rgb([0, 0, 0])\n    }\n})\n\n// %% [markdown]\n// ## Display of compilation errors\n// Here's how compilation errors are presented. Here we forgot an & and passed a String instead of an &str.\n\n// %%\nlet mut s = String::new();\ns.push_str(format!(\"foo {}\", 42));\n\n// %% [markdown]\n// ## Seeing what variables have been defined\n// We can print a table of defined variables and their types with the :vars command.\n\n// %%\n// :vars\n\n// %% [markdown]\n// Other built-in commands can be found via :help\n\n// %%\n// :help\n\n// %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/frozen_cell.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n\n# %% deletable=false editable=false run_control={\"frozen\": true}\n# # This is an frozen cell\n# print(\"I'm frozen so Im not executed :(\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/fsharp.fsx",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: .NET (F#)\n//     language: F#\n//     name: .net-fsharp\n// ---\n\n// %% [markdown]\n// This notebook was inspired by [Plottting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/fsharp/Docs/Plotting%20with%20Xplot.ipynb).\n\n// %%\nopen XPlot.Plotly\n\n// %%\nlet bar =\n    Bar(\n        name = \"Bar 1\",\n        x = [\"A\"; \"B\"; \"C\"],\n        y = [1; 3; 2])\n\n[bar]\n|> Chart.Plot\n|> Chart.WithTitle \"A sample bar plot\"\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/gnuplot_notebook.gp",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: gnuplot\n#     language: gnuplot\n#     name: gnuplot\n# ---\n\n# %% [markdown]\n# # Sample gnuplot notebook\n\n# %% [markdown]\n# ## Simple plotting\n\n# %%\n# Plot sin and cos with different linetypes\n\nf(x) = sin(x)\ng(x) = cos(x)\nset xrange[0:2*pi]\nset xtics(0, \"{/Symbol p}\" pi , \"2{/Symbol p}\" 2*pi)\nset ytics 1\nplot f(x) linewidth 2 title \"sin(x)\", \\\n    g(x) linewidth 2 dashtype \"--\" title \"cos(x)\"\n\n# %% [markdown]\n# ## Example of line magic\n\n# %%\n# %gnuplot inline pngcairo enhanced background rgb \"#EEEEEE\" size 600, 600\n# Parametric plot without border\n\nreset\nset parametric\nset size ratio -1\nunset border\nunset tics\nplot f(t), g(t) linewidth 2 notitle\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/haskell_notebook.hs",
    "content": "-- ---\n-- jupyter:\n--   kernelspec:\n--     display_name: Haskell\n--     language: haskell\n--     name: haskell\n-- ---\n\n-- %% [markdown]\n-- # Example Haskell Notebook\n\n-- %% [markdown]\n-- Define a function to add two numbers.\n\n-- %%\nf :: Num a => a -> a -> a\nf x y = x + y\n\n-- %% [markdown]\n-- Try to use the function\n\n-- %%\nf 1 2 \n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/hello_world_gonb.go",
    "content": "// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Go (gonb)\n//     language: go\n//     name: gonb\n// ---\n\n// %% [markdown]\n// A notebook that use [GoNB](https://github.com/janpfeifer/gonb)\n\n// %% [markdown]\n// the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb)\n\n// %%\nfunc main() {\n    fmt.Printf(\"Hello World!\")\n}\n\n// %%\n//gonb:%%\nfmt.Printf(\"Hello World!\")\n\n// %% [markdown]\n// //gonb:%% --who=world can pass flags to main func\n\n// %%\nimport (\n    \"flag\"\n    \"fmt\"\n)\n\nvar flagWho = flag.String(\"who\", \"\", \"Your name!\")\n\n//gonb:%% --who=world\nfmt.Printf(\"Hello %s!\\n\", *flagWho)\n\n// %% [markdown]\n// %args also can pass flags\n\n// %%\n// %args --who=Wally\n\nfunc main() {\n    flag.Parse()\n    fmt.Printf(\"Where is %s?\", *flagWho)\n}\n\n// %%\nimport \"github.com/janpfeifer/gonb/gonbui\"\n\n//gonb:%%\ngonbui.DisplayHtml(`<span style=\"background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;\">I 🧡 GoNB!</span>`)\n\n// %%\n//gonb:%%\ngonbui.DisplayMarkdown(\"#### Objective\\n\\n1. Have fun coding **Go**;\\n1. Profit...\\n\"+\n                       `$$f(x) = \\int_{-\\infty}^{\\infty} e^{-x^2} dx$$`)\n\n// %%\nfunc init_a() {\n    fmt.Println(\"init_a\")\n}\n//gonb:%%\nfmt.Println(\"main\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/html-demo.clj",
    "content": ";; ---\n;; jupyter:\n;;   kernelspec:\n;;     display_name: Clojure\n;;     language: clojure\n;;     name: clojure\n;; ---\n\n;; %% [markdown]\n;; # Clojupyter Demo\n;;\n;; This example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.\n;; This notebook demonstrates some of the more advanced features of Clojupyter.\n\n;; %% [markdown]\n;; ## Displaying HTML\n;;\n;; To display HTML, you'll need to require a clojupyter helper function to change the cell output\n\n;; %%\n(require '[clojupyter.misc.display :as display])\n\n;; %%\n(println \">> should print some text\")\n;; displaying html\n(display/hiccup-html \n    [:ul \n     [:li \"a \" [:i \"emphatic\"] \" idea\"]\n     [:li \"a \" [:b \"bold\"] \" idea\"]\n     [:li \"an \" [:span {:style \"text-decoration: underline;\"} \"important\"] \" idea\"]])\n\n;; %% [markdown]\n;; We can also use this to render SVG:\n\n;; %%\n(display/hiccup-html\n    [:svg {:height 100 :width 100 :xmlns \"http://www.w3.org/2000/svg\"}\n            [:circle {:cx 50 :cy 40 :r 40 :fill \"red\"}]])\n\n;; %% [markdown]\n;; ## Adding External Clojure Dependencies \n;;\n;; You can fetch external Clojure dependencies using the `clojupyter.misc.helper` namespace. \n\n;; %%\n(require '[clojupyter.misc.helper :as helper])\n\n;; %%\n(helper/add-dependencies '[org.clojure/data.json \"0.2.6\"])\n(require '[clojure.data.json :as json])\n\n;; %%\n(json/write-str {:a 1 :b [2, 3] :c \"c\"})\n\n;; %% [markdown]\n;; ## Adding External Javascript Dependency\n;;\n;; Since you can render arbitrary HTML using `display/hiccup-html`, it's pretty easy to use external Javascript libraries to do things like generate charts. Here's an example using [Highcharts](https://www.highcharts.com/).\n;;\n;; First, we use a cell to add javascript to the running notebook:\n\n;; %%\n(helper/add-javascript \"https://code.highcharts.com/highcharts.js\")\n\n;; %% [markdown]\n;; Now we define a function which takes Clojure data and returns hiccup HTML to display:\n\n;; %%\n(defn plot-highchart [highchart-json]\n  (let [id (str (java.util.UUID/randomUUID))\n        code (format \"Highcharts.chart('%s', %s );\" id, (json/write-str highchart-json))]\n      (display/hiccup-html \n        [:div [:div {:id id :style {:background-color \"red\"}}]\n                   [:script code]])))\n\n;; %% [markdown]\n;; Now we can make generate interactive plots (try hovering over plot):\n\n;; %%\n(def raw-data (map #(+ (* 22 (+ % (Math/random)) 78)) (range)))\n(def data-1 (take 500 raw-data))\n(def data-2 (take 500 (drop 500 raw-data)))\n\n(plot-highchart {:chart {:type \"line\"}\n                 :title {:text \"Plot of random data\"}\n                 :series [{:data data-1} {:data data-2}]})\n\n;; %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/ijavascript.js",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Javascript (Node.js)\n//     language: javascript\n//     name: javascript\n// ---\n\n// %% [markdown]\n// ## A notebook that uses IJavascript kernel\n\n// %%\nlet x = 5;\nconst y = 6;\nvar z = 10;\n\n// %%\nx + y;\n\n// %%\nfunction add(num1, num2) {\n    return num1 + num2\n}\n\n// %%\nadd(x, y);\n\n// %%\nconst arrowAdd = (num1, num2) => num1 + num2;\n\n// %%\narrowAdd(x, y);\n\n// %%\nconst myCar = {\n    color: \"blue\",\n    weight: 850,\n    model: \"fiat\",\n    start: () => \"car started!\",\n    doors: [1,2,3,4]\n}\n\n// %%\nconsole.log(\"color:\", myCar.color);\n\n// %%\nconsole.log(\"start:\", myCar.start());\n\n// %%\nfor (let door of myCar.doors) {\n    console.log(\"I'm door\", door)\n}\n\n// %%\nmyCar;\n\n// %%\nclass User {\n  constructor(name){\n    this.name = name;\n  }\n  sayHello(){\n    return \"Hello, I'm \" + this.name;\n  }\n}\n\n// %%\nlet John = new User(\"John\");\nJohn.sayHello();\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/ir_notebook.R",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# %% [markdown]\n# This is a jupyter notebook that uses the IR kernel.\n\n# %%\nsum(1:10)\n\n# %%\nplot(cars)\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/ir_notebook.low.r",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# %% [markdown]\n# This is a jupyter notebook that uses the IR kernel.\n\n# %%\nsum(1:10)\n\n# %%\nplot(cars)\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/itypescript.ts",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Typescript 3.5\n//     language: typescript\n//     name: typescript\n// ---\n\n// %%\nlet x: number = 5;\nconst y: number = 6;\nvar z: string = \"hi\";\nconsole.log(z);\nx + y;\n\n// %%\nfunction add(num1: number, num2: number): number {\n    return num1 + num2\n}\nadd(x, y);\n\n// %%\nconst arrowAdd = (num1: number, num2: number) => num1 + num2;\narrowAdd(x, y);\n\n// %%\nclass User {\n  constructor(private name: string) {\n    this.name = name;\n  }\n  sayHello(): string {\n    return \"Hello, I'm \" + this.name;\n  }\n}\nlet John: User;\nJohn = new User(\"John\");\nJohn.sayHello();\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/julia_benchmark_plotly_barchart.jl",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Julia 1.1.1\n#     language: julia\n#     name: julia-1.1\n# ---\n\n# %%\n# IJulia rocks! So does Plotly. Check it out\n\nusing Plotly\napi_key = \"\" # visit https://plot.ly/api to generate an API username and password\nusername = \"\"\n\nPlotly.signin(username, api_key)\n\n# %%\n# Following data taken from http://julialang.org/ frontpage \nbenchmarks = [\"fib\", \"parse_int\", \"quicksort3\", \"mandel\", \"pi_sum\", \"rand_mat_stat\", \"rand_mat_mul\"]\nplatforms = [\"Fortran\", \"Julia\", \"Python\", \"R\", \"Matlab\", \"Mathematica\", \"Javascript\", \"Go\"]\n\ndata = {\n        platforms[1] => [0.26, 5.03, 1.11, 0.86, 0.80, 0.64, 0.96],\n        platforms[2] => [0.91, 1.60, 1.14, 0.85, 1.00, 1.66, 1.01],\n        platforms[3] => [30.37, 13.95, 31.98, 14.19, 16.33, 13.52, 3.41 ],\n        platforms[4] => [411.36, 59.40, 524.29, 106.97, 15.42, 10.84, 3.98  ],\n        platforms[5] => [1992.00, 1463.16, 101.84, 64.58, 1.29, 6.61, 1.10   ],\n        platforms[6] => [64.46, 29.54, 35.74, 6.07, 1.32, 4.52, 1.16 ],\n        platforms[7] => [2.18, 2.43, 3.51, 3.49, 0.84, 3.28, 14.60],\n        platforms[8] => [1.03, 4.79, 1.25, 2.36, 1.41, 8.12, 8.51]\n        }\n\npdata = [ {\"x\"=>benchmarks,\"y\"=>data[k],\"bardir\"=>\"h\",\"type\"=>\"bar\",\"name\"=>k} for k = platforms ]\n\nlayout = {\n          \"title\"=> \"Julia benchmark comparison (smaller is better, C performance = 1.0)\",\n          \"barmode\"=> \"group\",\n          \"autosize\"=> false,\n          \"width\"=> 900,\n          \"height\"=> 900,\n          \"titlefont\"=>\n          {\n           \"family\"=> \"Open Sans\",\n           \"size\"=> 18,\n           \"color\"=> \"rgb(84, 39, 143)\"\n           },\n          \"margin\"=> {\"l\"=>160, \"pad\"=>0},\n          \"xaxis\"=> {\n                     \"title\"=> \"Benchmark log-time\",\n                     \"type\"=> \"log\"\n                     },\n          \"yaxis\"=> {\"title\"=> \"Benchmark Name\"}\n          }\n\nresponse = Plotly.plot(pdata,[\"layout\"=>layout])\n\n# Embed in an iframe within IJulia\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n\n# %%\n# checkout https://plot.ly/api/ for more Julia examples!\n# But to show off some other Plotly features:\nx = 1:1500\ny1 = sin(2*pi*x/1500.) + rand(1500)-0.5\ny2 = sin(2*pi*x/1500.)\n\nfish = {\"x\"=>x,\"y\"=> y1,\n\t\"type\"=>\"scatter\",\"mode\"=>\"markers\",\n\t\"marker\"=>{\"color\"=>\"rgb(0, 0, 255)\",\"opacity\"=>0.5 } }\n\nfit = {\"x\"=> x,\"y\"=> y2,\n\t\"type\"=>\"scatter\", \"mode\"=>\"markers\", \"opacity\"=>0.8,\n\t\"marker\"=>{\"color\"=>\"rgb(255, 0, 0)\"} }\n\nlayout = {\"autosize\"=> false,\n    \"width\"=> 650, \"height\"=> 550,\n    \"title\"=>\"Fish School\",\n\t\"xaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",    \n        \"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[0,1500] },\n\t\"yaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",\n\t\t\"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[-2.2,2.2] },\n\t\"plot_bgcolor\"=> \"rgb(245,245,247)\",\n    \"showlegend\"=> false,\n    \"hovermode\"=> \"closest\"}\n\nresponse = Plotly.plot([fish, fit],[\"layout\"=>layout])\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/julia_functional_geometry.jl",
    "content": "# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Julia 1.1.1\n#     language: julia\n#     name: julia-1.1\n# ---\n\n# %%\n# This notebook is a semi top-down explanation. This cell needs to be\n# executed first so that the operators and helper functions are defined\n# All of this is explained in the later half of the notebook\n\nusing Compose, Interact\nCompose.set_default_graphic_size(2inch, 2inch)\n\npoints_f = [\n    (.1, .1),\n    (.9, .1),\n    (.9, .2),\n    (.2, .2),\n    (.2, .4),\n    (.6, .4),\n    (.6, .5),\n    (.2, .5),\n    (.2, .9),\n    (.1, .9),\n    (.1, .1)\n]\n\nf = compose(context(), stroke(\"black\"), line(points_f))\n\nrot(pic) = compose(context(rotation=Rotation(-deg2rad(90))), pic)\nflip(pic) = compose(context(mirror=Mirror(deg2rad(90), 0.5w, 0.5h)), pic)\nabove(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, 1, m/(m+n)), p),\n            (context(0, m/(m+n), 1, n/(m+n)), q))\n\nabove(p, q) = above(1, 1, p, q)\n\nbeside(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, m/(m+n), 1), p),\n            (context(m/(m+n), 0, n/(m+n), 1), q))\n\nbeside(p, q) = beside(1, 1, p, q)\n\nover(p, q) = compose(context(),\n                (context(), p), (context(), q))\n\nrot45(pic) =\n    compose(context(0, 0, 1/sqrt(2), 1/sqrt(2),\n        rotation=Rotation(-deg2rad(45), 0w, 0h)), pic)\n\n# Utility function to zoom out and look at the context\nzoomout(pic) = compose(context(),\n                (context(0.2, 0.2, 0.6, 0.6), pic),\n                (context(0.2, 0.2, 0.6, 0.6), fill(nothing), stroke(\"black\"), strokedash([0.5mm, 0.5mm]),\n                    polygon([(0, 0), (1, 0), (1, 1), (0, 1)])))\n\nfunction read_path(p_str)\n    tokens = [try parsefloat(x) catch symbol(x) end for x in split(p_str, r\"[\\s,]+\")]\n    path(tokens)\nend\n\nfish = compose(context(units=UnitBox(260, 260)), stroke(\"black\"),\n            read_path(strip(readall(\"fish.path\"))))\n\nrotatable(pic) = @manipulate for θ=0:0.001:2π\n    compose(context(rotation=Rotation(θ)), pic)\nend\n\nblank = compose(context())\n\nfliprot45(pic) = rot45(compose(context(mirror=Mirror(deg2rad(-45))),pic))\n\n# Hide this cell.\ndisplay(MIME(\"text/html\"), \"\"\"<script>\nvar cell = \\$(\".container .cell\").eq(0), ia = cell.find(\".input_area\")\nif (cell.find(\".toggle-button\").length == 0) {\nia.after(\n    \\$('<button class=\"toggle-button\">Toggle hidden code</button>').click(\n        function (){ ia.toggle() }\n        )\n    )\nia.hide()\n}\n</script>\"\"\")\n\n# %% [markdown]\n# # Functional Geometry\n# *Functional Geometry* is a paper by Peter Henderson ([original (1982)](users.ecs.soton.ac.uk/peter/funcgeo.pdf), [revisited (2002)](https://cs.au.dk/~hosc/local/HOSC-15-4-pp349-365.pdf)) which deconstructs the MC Escher woodcut *Square Limit*\n#\n# ![Square Limit](http://i.imgur.com/LjRzmNM.png)\n\n# %% [markdown]\n# > A picture is an example of a complex object that can be described in terms of its parts.\n# Yet a picture needs to be rendered on a printer or a screen by a device that expects to\n# be given a sequence of commands. Programming that sequence of commands directly is\n# much harder than having an application generate the commands automatically from the\n# simpler, denotational description.\n\n# %% [markdown]\n# A `picture` is a *denotation* of something to draw.\n#\n# e.g. The value of f here denotes the picture of the letter F\n\n# %% [markdown]\n# Original at http://nbviewer.jupyter.org/github/shashi/ijulia-notebooks/blob/master/funcgeo/Functional%20Geometry.ipynb\n\n# %% [markdown]\n# ## In conclusion\n#\n# We described Escher's *Square Limit* from the description of its smaller parts, which in turn were described in terms of their smaller parts.\n#\n# This seemed simple because we chose to talk in terms of an *algebra* to describe pictures. The primitives `rot`, `flip`, `fliprot45`, `above`, `beside` and `over` fit the job perfectly.\n#\n# We were able to describe these primitives in terms of `compose` `contexts`, which the Compose library knows how to render.\n#\n# Denotation can be an easy way to describe a system as well as a practical implementation method.\n#\n# [Abstraction barriers](https://mitpress.mit.edu/sicp/full-text/sicp/book/node29.html) are useful tools that can reduce the cognitive overhead on the programmer. It entails creating layers consisting of functions which only use functions in the same layer or layers below in their own implementation. The layers in our language were:\n#\n#     ------------------[ squarelimit ]------------------\n#     -------------[ quartet, cycle, nonet ]-------------\n#     ---[ rot, flip, fliprot45, above, beside, over ]---\n#     -------[ compose, context, line, path,... ]--------\n#     \n# Drawing this diagram out is a useful way to begin building any library.\n#\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/jupyter.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# # Jupyter notebook\n#\n# This notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n\n# %%\na = 1\nb = 2\na + b\n\n# %% [markdown]\n# Now we return a few tuples\n\n# %%\na, b\n\n# %%\na, b, a+b\n\n# %% [markdown]\n# And this is already the end of the notebook\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/jupyter_again.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n\n# %%\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n\n# %%\n# ?next\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/jupyter_with_raw_cell_in_body.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n1+2+3\n\n# %% [raw]\n# This is a raw cell\n\n# %% [markdown]\n# This is a markdown cell\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/jupyter_with_raw_cell_on_top.py",
    "content": "# ---\n# title: Quick test\n# output:\n#   ioslides_presentation:\n#     widescreen: true\n#     smaller: true\n# editor_options:\n#   chunk_output_type: console\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n1+2+3\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/jupyter_with_raw_cell_with_invalid_yaml.py",
    "content": "# ---\n# title: Exception: Test\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n# %%\n1 + 2 + 3\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/jupyterlab-slideshow_1441.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown] @deathbeds/jupyterlab-fonts={\"styles\": {\"\": {\"body[data-jp-deck-mode='presenting'] &\": {\"right\": \"0\", \"top\": \"30%\", \"width\": \"25%\", \"z-index\": 1}}}} jupyterlab-slideshow={\"layer\": \"slide\"}\n# > **Note**\n# > \n# > `slide` layer with a `top` of `30%`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/jupytext_replication.sos",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: SoS\n#     language: sos\n#     name: sos\n# ---\n\n# %% [markdown] Collapsed=\"false\" kernel=\"SoS\"\n# # Text SOS-kernel with Jupytext\n#\n# ## What is SOS kernel\n#\n# SoS consists of a ployglot notebook that allows the use of multiple kernels in one Jupyter notebook, and a workflow system that is designed for daily computational research. Basically,\n#\n# - SoS Polyglot Notebook is a Jupyter Notebook with a SoS kernel.\n# - SoS Notebook serves as a super kernel to all other Jupyter kernels and allows the use of multiple kernels in one Jupyter notebook.\n# - SoS Workflow System is a Python based workflow system that is designed to be readable, shareable, and suitable for daily data analysis.\n# - SoS Workflow System can be used from command line or use SoS Notebook as its IDE.\n#\n# ![](https://vatlab.github.io/sos-docs/doc/media/SoS_Notebook_and_Workflow.png)\n#\n# ### How to install SOS-kernel\n#\n# Please follow this [link](https://vatlab.github.io/sos-docs/running.html#Conda-installation) to setup SOS\n#\n# I run some issue with the latest version of R on my Mac, so I had to install an earlier version of R\n#\n# ```\n# conda install -c r r=3.5.1\n# conda install sos-notebook jupyterlab-sos sos-papermill -c conda-forge\n# ```\n#\n# ## Related issue with Jupytext\n#\n# Jupytext works fine with Python/R kernel but converts code cells into markdown cells when using the SOS kernel.\n#\n# cf the image below. It is a code cell. After saving the notebook and restart it, it converted the code cell into markdown\n#\n# <img width=\"734\" alt=\"Screenshot 2020-03-13 at 10 51 18\" src=\"https://user-images.githubusercontent.com/33351426/76610049-9e704600-6518-11ea-861e-b4f691d1a478.png\">\n\n# %% [markdown] Collapsed=\"false\" kernel=\"SoS\"\n# ## Step 1\n#\n# Please, choose SOS Kernel and then, in the cell code, choose SOS (or any other kernel available), the outcome is the same.\n#\n# ![](https://drive.google.com/uc?export=view&id=1OtyxfwoRyVK23XHnmd9JR-crBgHBL5mt)\n\n# %% Collapsed=\"false\" kernel=\"SoS\"\nimport pandas as pd \nimport numpy as np\n\npd.DataFrame({\n    'x': np.random.random(10),\n    'y': np.random.random(10),\n})\n\n# %% [markdown] Collapsed=\"false\" kernel=\"python3\"\n# ## Step 2\n#\n# Now, pair it with Jupytex\n#\n# ![](https://drive.google.com/uc?export=view&id=1Wtx-YPAXY8HWHqzCcy4iIgHpzt_9emEn)\n\n# %% [markdown] Collapsed=\"false\" kernel=\"python3\"\n# ### Step 3\n#\n# Save the notebook, restart and clear all, **save**, then Shut down kernel. Close the notebook and reopen\n\n# %% [markdown] Collapsed=\"false\" kernel=\"python3\"\n# ### Step 4\n#\n# Reopen the notebook. Here is the outcome\n#\n# ![](https://drive.google.com/uc?export=view&id=12C70unbSPv0gHCZaCICEUy7kO7wM93JH)\n#\n#\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/kalman_filter_and_visualization.q",
    "content": "/ ---\n/ jupyter:\n/   kernelspec:\n/     display_name: Q 3.5\n/     language: q\n/     name: qpk\n/ ---\n\n/ %%\nplt: .p.import`matplotlib.pyplot\n\n/ %%\nfilter: {\n    t: ([] x: `float $ x; xh: `float $ x; p: (count x) # R: var x);\n    (first t), iterate[R; R]\\[first t; 1 _ t] \n    }\n\niterate: {[Q; R; x; y]\n    x[`p]+: Q;\n    k: x[`p] % R + x[`p];\n    `x`xh`p ! (y[`x]; x[`xh] + k * y[`x] - x[`xh]; (1 - k) * x[`p])\n    }\n\n/ %%\nprice: 100 + sums 0.5 - (n:50)?1.\n\n/ %%\noutput:filter price\n\n/ %%\nplt[`:plot][til n; output`x; `label pykw \"price\"];\nplt[`:plot][til n; output`xh;`label pykw \"forecast\"];\nplt[`:legend][];\nplt[`:show][];\n\n/ %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/logtalk_notebook.lgt",
    "content": "% ---\n% jupyter:\n%   kernelspec:\n%     display_name: Logtalk\n%     language: logtalk\n%     name: logtalk_kernel\n% ---\n\n% %% [markdown]\n% # An implementation of the Ackermann function\n\n% %% vscode={\"languageId\": \"logtalk\"}\n%%load ack.lgt\n\n:- object(ack).\n\n:- info([\n\tversion is 1:0:0,\n\tauthor is 'Paulo Moura',\n\tdate is 2008-3-31,\n\tcomment is 'Ackermann function (general recursive function).'\n]).\n\n:- public(ack/3).\n:- mode(ack(+integer, +integer, -integer), one).\n:- info(ack/3, [\n\tcomment is 'Ackermann function.',\n\targnames is ['M', 'N', 'V']\n]).\n\nack(0, N, V) :-\n\t!,\n\tV is N + 1.\nack(M, 0, V) :-\n\t!,\n\tM2 is M - 1,\n\tack(M2, 1, V).\nack(M, N, V) :-\n\tM2 is M - 1,\n\tN2 is N - 1,\n\tack(M, N2, V2),\n\tack(M2, V2, V).\n\n:- end_object.\n\n% %% [markdown]\n% ## Sample query\n\n% %% vscode={\"languageId\": \"logtalk\"}\nack::ack(2, 4, V).\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/lua_example.lua",
    "content": "-- -*- coding: utf-8 -*-\n-- ---\n-- jupyter:\n--   kernelspec:\n--     display_name: Lua\n--     language: lua\n--     name: lua\n-- ---\n\n-- %% [markdown]\n-- Source: https://www.lua.org/pil/19.3.html\n\n-- %% [markdown]\n-- # Sort\n\n-- %% [markdown]\n-- Another useful function on arrays is table.sort, which we have seen before. It receives the array to be sorted, plus an optional order function. This order function receives two arguments and must return true if the first argument should come first in the sorted array. If this function is not provided, sort uses the default less-than operation (corresponding to the `<´ operator).\n\n-- %% [markdown]\n-- A common mistake is to try to order the indices of a table. In a table, the indices form a set, and have no order whatsoever. If you want to order them, you have to copy them to an array and then sort the array. Let us see an example. Suppose that you read a source file and build a table that gives, for each function name, the line where that function is defined; something like this:\n\n-- %%\nlines = {\n    luaH_set = 10,\n    luaH_get = 24,\n    luaH_present = 48,\n}\n\n-- %% [markdown]\n--  Now you want to print these function names in alphabetical order. If you traverse this table with pairs, the names appear in an arbitrary order. However, you cannot sort them directly, because these names are keys of the table. However, when you put these names into an array, then you can sort them. First, you must create an array with those names, then sort it, and finally print the result:\n\n-- %%\na = {}\nfor n in pairs(lines) do table.insert(a, n) end\ntable.sort(a)\nfor i,n in ipairs(a) do print(n) end\n\n-- %% [markdown]\n-- Note that, for Lua, arrays also have no order. But we know how to count, so we get ordered values as long as we access the array with ordered indices. That is why you should always traverse arrays with ipairs, rather than pairs. The first imposes the key order 1, 2, ..., whereas the latter uses the natural arbitrary order of the table.\n\n-- %% [markdown]\n-- As a more advanced solution, we can write an iterator that traverses a table following the order of its keys. An optional parameter f allows the specification of an alternative order. It first sorts the keys into an array, and then iterates on the array. At each step, it returns the key and value from the original table:\n\n-- %%\nfunction pairsByKeys (t, f)\n    local a = {}\n    for n in pairs(t) do table.insert(a, n) end\n    table.sort(a, f)\n    local i = 0               -- iterator variable\n    local iter = function ()  -- iterator function\n        i = i + 1\n        if a[i] == nil then return nil\n        else return a[i], t[a[i]]\n        end\n    end\n    return iter\nend\n\n-- %% [markdown]\n--  With this function, it is easy to print those function names in alphabetical order. The loop\n\n-- %%\nfor name, line in pairsByKeys(lines) do\n    print(name, line)\nend\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/maxima_example.mac",
    "content": "/* --- */\n/* jupyter: */\n/*   kernelspec: */\n/*     display_name: Maxima */\n/*     language: maxima */\n/*     name: maxima */\n/* --- */\n\n/* %% [markdown] */\n/* ## maxima misc */\n\n/* %% */\nkill(all)$\n\n/* %% */\nf(x) := 1/(x^2+l^2)^(3/2);\n\n/* %% */\nintegrate(f(x), x);\n\n/* %% */\ntex(%)$\n\n/* %% */\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/notebook_with_complex_metadata.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/nteract_with_parameter.py",
    "content": "# ---\n# jupyter:\n#   kernel_info:\n#     name: python3\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% inputHidden=false outputHidden=false tags=[\"parameters\"]\nparam = 4\n\n# %% inputHidden=false outputHidden=false\nimport pandas as pd\n\n# %% inputHidden=false outputHidden=false\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n\n# %% inputHidden=false outputHidden=false\n# %matplotlib inline\ndf.plot(kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/ocaml_notebook.ml",
    "content": "(* --- *)\n(* jupyter: *)\n(*   jupytext: *)\n(*     formats: ipynb:markdown,md *)\n(*   kernelspec: *)\n(*     display_name: OCaml default *)\n(*     language: OCaml *)\n(*     name: ocaml-jupyter *)\n(* --- *)\n\n(* %% [markdown] *)\n(* # Example of an OCaml notebook *)\n\n(* %% *)\nlet sum x y = x + y\n\n(* %% [markdown] *)\n(* Let's try our function: *)\n\n(* %% *)\nsum 3 4 = 7 + 0\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/octave_notebook.m",
    "content": "% ---\n% jupyter:\n%   kernelspec:\n%     display_name: Octave\n%     language: octave\n%     name: octave\n% ---\n\n% %% [markdown]\n% A markdown cell\n\n% %%\n1 + 1\n\n% %%\n% a code cell with comments\n2 + 2\n\n% %%\n% a simple plot\nx = -10:0.1:10;\nplot (x, sin (x));\n\n% %%\n%plot -w 800\n% a simple plot with a magic instruction\nx = -10:0.1:10;\nplot (x, sin (x));\n\n% %% [markdown]\n% And to finish with, a Python cell\n\n% %% language=\"python\"\n% a = 1\n\n% %% language=\"python\"\n% a + 1\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/plotly_graphs.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# This notebook contains complex outputs, including plotly javascript graphs.\n\n# %% [markdown]\n# # Interactive plots\n\n# %% [markdown]\n# We use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n\n# %%\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n\n# %%\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/powershell.ps1",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: PowerShell\n#     language: PowerShell\n#     name: powershell\n# ---\n\n# %% [markdown]\n# This is an extract from\n# https://github.com/Jaykul/Jupyter-PowerShell/blob/master/LiterateDevOps.ipynb\n\n# %%\n$imageUrl = 'https://upload.wikimedia.org/wikipedia/commons/2/2f/PowerShell_5.0_icon.png'\n$ImageData = @{ \"png\" = (Invoke-WebRequest $imageUrl -UseBasicParsing).RawContentStream.GetBuffer() }\n# $ImageData\n\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 32 } }\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 64 } }\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/raw_cell_with_complex_yaml_like_content.py",
    "content": "# ---\n#\n# This is a complex paragraph\n# that is split over multiple lines.\n#\n# It also includes blank lines.\n#\n#\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/raw_cell_with_non_dict_yaml_content.py",
    "content": "# ---\n# Content.\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/root_cpp.cpp",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: ROOT C++\n//     language: c++\n//     name: root\n// ---\n\n// %%\n#include <iostream>\n#include <string>\n\n// %%\nint k = 4;\nstd::string foo = \"This string says \\\"foo\\\"\";\n\n// %%\nstd::cout << \"k = \" << k << '\\n' << foo << '\\n';\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/sage_print_hello.sage",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: SageMath 9.2\n#     language: sage\n#     name: sagemath\n# ---\n\n# %%\nprint(\"Hello world\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/sample_bash_notebook.sh",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Bash\n#     language: bash\n#     name: bash\n# ---\n\n# %%\nls\n\n# %%\n# https://coderwall.com/p/euwpig/a-better-git-log\ngit config --global alias.lg \"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\"\n\n# %%\ngit lg\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/sample_rise_notebook_66.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown] slideshow={\"slide_type\": \"slide\"}\n# A markdown cell\n\n# %% slideshow={\"slide_type\": \"\"}\n1+1\n\n# %% [markdown] cell_style=\"center\" slideshow={\"slide_type\": \"fragment\"}\n# Markdown cell two\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/sas.sas",
    "content": "/* --- */\n/* jupyter: */\n/*   kernelspec: */\n/*     display_name: SAS */\n/*     language: sas */\n/*     name: sas */\n/* --- */\n\n/* %% [markdown] */\n/* # SAS Notebooks with jupytext */\n\n/* %% */\nproc sql;\n    select *\n    from sashelp.cars (obs=10)\n    ;\nquit; \n\n/* %% */\n%let name = \"Jupytext\";\n\n/* %% */\n%put &name;\n\n/* %% */\n/* Note when defining macros \"%macro\" cannot be the first line of text in the cell */\n%macro test;\n    data temp;\n        set sashelp.cars;\n        name = \"testx\";\n    run; \n    proc print data = temp (obs=10);\n    run; \n%mend test;\n\n%test\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/simple-helloworld.java",
    "content": "// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   jupytext:\n//     formats: ipynb,java:percent\n//   kernelspec:\n//     display_name: Java\n//     language: java\n//     name: java\n// ---\n\n// %% [markdown]\n// Let's define some class.\n\n// %%\nclass A {\n    public void hello() {\n        System.out.println(\"Hello World\");\n    }   \n}\n\n// %% [markdown]\n// And now we call its method.\n\n// %%\nnew A().hello();\n\n// %% [markdown]\n// You can run it e.g. with `jshell`\n//\n// * from command line, as `jshell simple-helloworld.java`\n// * from jshell's shell with `/open simple-helloworld.java`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/simple_robot_notebook.robot",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Robot Framework\n#     language: robotframework\n#     name: robotkernel\n# ---\n\n# %%\n*** Settings ***\n\nLibrary  Collections\n\n# %%\n*** Keywords ***\n\nHead\n    [Arguments]  ${list}\n    ${value}=  Get from list  ${list}  0\n    [Return]  ${value}\n\n# %%\n*** Tasks ***\n\nGet head\n    ${array}=  Create list  1  2  3  4  5\n    ${head}=  Head  ${array}\n    Should be equal  ${head}  1\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/simple_scala_notebook.scala",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Apache Toree - Scala\n//     language: scala\n//     name: apache_toree_scala\n// ---\n\n// %%\n// This is just a simple scala notebook\n\nobject SampleObject {\n    def calculation(x: Int, y: Int): Int = x + y\n}\n\nval result = SampleObject.calculation(1, 2)\n\n// %%\nprintln(result * 10)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/stata_notebook.do",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Stata\n//     language: stata\n//     name: stata\n// ---\n\n// %%\n// This notebook uses the stata_kernel: https://github.com/kylebarron/stata_kernel\n\n// %%\nuse http://www.stata-press.com/data/r13/auto\n\n// %%\nsummarize\n\n// %%\nscatter weight length\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/tailrecursive-factorial.groovy",
    "content": "// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   jupytext:\n//     formats: ipynb,groovy:percent\n//   kernelspec:\n//     display_name: Groovy\n//     language: groovy\n//     name: groovy\n// ---\n\n// %% [markdown]\n// # TailRecursive annotation\n//\n// Let's check what is the effect of `@TailRecursive` annotation on the simple recursive definition of factorial function.\n\n// %%\nimport groovy.transform.CompileStatic\nimport groovy.transform.TailRecursive\nimport groovy.transform.TypeChecked\n\n@CompileStatic\n@TypeChecked\nclass X {\n    static final BigInteger factorial0(int n) {\n        (n <= 1) ? 1G : factorial0(n-1).multiply(BigInteger.valueOf(n))\n    }\n\n    static final BigInteger factorial1(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial1(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n\n    @TailRecursive\n    static final BigInteger factorial2(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial2(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n}\n\nx = new X()\n\n// %% [markdown]\n// Although we can time the execution of the calls, it is not very accurate; such micro benchmarks should be performed in more controlled environment, such us under [JMH](https://openjdk.java.net/projects/code-tools/jmh/).\n//\n// For example, see [blog posts of Szymon Stępniak](https://e.printstacktrace.blog/tail-recursive-methods-in-groovy/).\n\n// %%\n// %%timeit\n\nx.factorial0(19_000).toString().length()\n\n// %%\n// %%timeit\n\nx.factorial1(19_000).toString().length()\n\n// %%\n// %%timeit\n\nx.factorial2(19_000).toString().length()\n\n// %% [markdown]\n// The real difference is the use of stack. Non-tail recursive calls exhaust the stack space at some point, whereas tail recursive calls don't add frames to the stack.\n\n// %%\nfactSize = { n, cl ->\n    println \"Factorial of ${n} has ${cl(n).toString().length()} digits\"\n}\n\nfactSize 2_000, x.&factorial0\nfactSize 2_000, x.&factorial1\nfactSize 2_000, x.&factorial2\n\nfactSize 100_000, x.&factorial2\n\n// %%\ntry {\n    factSize 100_000, x.&factorial1\n} catch (Throwable e) {\n    assert e instanceof StackOverflowError\n    println e\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/tcl_test.tcl",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Tcl\n#     language: tcl\n#     name: tcljupyter\n# ---\n\n# %% [markdown]\n# # Assign Values\n\n# %%\nset a 1\nputs \"a = $a\"\n\n# %% [markdown]\n# # Loop\n\n# %%\nfor {set i 0} {$i < 10} {incr i} {\n    puts \"I inside first loop: $i\"\n}\n\n# %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/text_outputs_and_images.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# This notebook contains outputs of many different types: text, HTML, plots and errors.\n\n# %% [markdown]\n# # Text outputs\n#\n# Using `print`, `sys.stdout` and `sys.stderr`\n\n# %%\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n\n# %%\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n\n# %% [markdown]\n# # HTML outputs\n#\n# Using `pandas`. Here we find two representations: both text and HTML.\n\n# %%\nimport pandas as pd\npd.DataFrame([4])\n\n# %%\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n\n# %% [markdown]\n# # Images\n\n# %%\n# %matplotlib inline\n\n# %%\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n\n# %% [markdown]\n# # Errors\n\n# %%\nundefined_variable\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/wolfram.wolfram",
    "content": "(* --- *)\n(* jupyter: *)\n(*   kernelspec: *)\n(*     display_name: Wolfram Language 13.1 *)\n(*     language: Wolfram Language *)\n(*     name: wolframlanguage13.1 *)\n(* --- *)\n\n(* %% [markdown] *)\n(* **Note:** The `language_info` `file_extension` in this notebook should be `.m`, but it was deliberately changed to `.wolfram` to avoid conflicts with Matlab which is using the same extension. *)\n\n(* %% [markdown] *)\n(* We start with... *)\n\n(* %% *)\nPrint[\"Hello, World!\"];\n\n(* %% [markdown] *)\n(* Then we draw the first example plot from the [ListPlot](https://reference.wolfram.com/language/ref/ListPlot.html) reference: *)\n\n(* %% *)\nListPlot[Prime[Range[25]]]\n\n(* %% [markdown] *)\n(* We also test the math outputs as in the [Simplify](https://reference.wolfram.com/language/ref/Simplify.html) example: *)\n\n(* %% *)\nD[Integrate[1/(x^3 + 1), x], x]\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/xcpp_by_quantstack.cpp",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: C++14\n//     language: C++14\n//     name: xeus-cling-cpp14\n// ---\n\n// %% [markdown]\n// [![xeus-cling](images/xeus-cling.png)](https://github.com/QuantStack/xeus-cling/)\n//\n// A Jupyter kernel for C++ based on the `cling` C++ interpreter and the `xeus` native implementation of the Jupyter protocol, xeus.\n//\n// - GitHub repository: https://github.com/QuantStack/xeus-cling/\n// - Online documentation: https://xeus-cling.readthedocs.io/\n\n// %% [markdown]\n// ## Usage\n//\n// <div style=\"background: #efffed;\n//             border: 1px solid grey;\n//             margin: 8px 0 8px 0;\n//             text-align: center;\n//             padding: 8px; \">\n//     <i class=\"fa-play fa\" \n//        style=\"font-size: 40px;\n//               line-height: 40px;\n//               margin: 8px;\n//               color: #444;\">\n//     </i>\n//     <div>\n//     To run the selected code cell, hit <pre style=\"background: #efffed\">Shift + Enter</pre>\n//     </div>\n// </div>\n\n// %% [markdown]\n// ## Output and error streams\n//\n// `std::cout` and `std::cerr` are redirected to the notebook frontend.\n\n// %%\n#include <iostream>\n\nstd::cout << \"some output\" << std::endl;\n\n// %%\nstd::cerr << \"some error\" << std::endl;\n\n// %%\n#include <stdexcept>\n\n// %%\nthrow std::runtime_error(\"Unknown exception\");\n\n// %% [markdown]\n// Omitting the `;` in the last statement of a cell results in an output being printed\n\n// %%\nint j = 5;\n\n// %%\nj\n\n// %% [markdown]\n// # Interpreting the C++ programming language\n//\n// `cling` has a broad support of the features of C++. You can define functions, classes, templates, etc ...\n\n// %% [markdown]\n// ## Functions\n\n// %%\ndouble sqr(double a)\n{\n    return a * a;\n}\n\n// %%\ndouble a = 2.5;\ndouble asqr = sqr(a);\nasqr\n\n// %% [markdown]\n// ## Classes\n\n// %%\nclass Foo\n{\npublic:\n\n    virtual ~Foo() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Foo value = \" << value << std::endl;\n    }\n};\n\n// %%\nFoo bar;\nbar.print(1.2);\n\n// %% [markdown]\n// ## Polymorphism\n\n// %%\nclass Bar : public Foo\n{\npublic:\n\n    virtual ~Bar() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Bar value = \" << 2 * value << std::endl;\n    }\n};\n\n// %%\nFoo* bar2 = new Bar;\nbar2->print(1.2);\ndelete bar2;\n\n// %% [markdown]\n// ## Templates\n\n// %%\n#include <typeinfo>\n\ntemplate <class T>\nclass FooT\n{\npublic:\n    \n    explicit FooT(const T& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << typeid(T).name() << \" m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    T m_t;\n};\n\ntemplate <>\nclass FooT<int>\n{\npublic:\n    \n    explicit FooT(const int& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << \"m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    int m_t;\n};\n\n// %%\nFooT<double> foot1(1.2);\nfoot1.print();\n\n// %%\nFooT<int> foot2(4);\nfoot2.print();\n\n// %% [markdown]\n// ## C++11 / C++14 support\n\n// %%\nclass Foo11\n{\npublic:\n    \n    Foo11() { std::cout << \"Foo11 default constructor\" << std::endl; }\n    Foo11(const Foo11&) { std::cout << \"Foo11 copy constructor\" << std::endl; }\n    Foo11(Foo11&&) { std::cout << \"Foo11 move constructor\" << std::endl; }\n};\n\n// %%\nFoo11 f1;\nFoo11 f2(f1);\nFoo11 f3(std::move(f1));\n\n// %%\n#include <vector>\n\nstd::vector<int> v = { 1, 2, 3};\nauto iter = ++v.begin();\nv\n\n// %%\n*iter\n\n// %% [markdown]\n// ... and also lambda, universal references, `decltype`, etc ...\n\n// %% [markdown]\n// ## Documentation and completion\n//\n//  - Documentation for types of the standard library is retrieved on cppreference.com.\n//  - The quick-help feature can also be enabled for user-defined types and third-party libraries. More documentation on this feature is available at https://xeus-cling.readthedocs.io/en/latest/inline_help.html.\n//\n\n// %%\n?std::vector\n\n// %% [markdown]\n// ## Using the `display_data` mechanism\n\n// %% [markdown]\n// For a user-defined type `T`, the rich rendering in the notebook and JupyterLab can be enabled by by implementing the function `xeus::xjson mime_bundle_repr(const T& im)`, which returns the JSON mime bundle for that type.\n//\n// More documentation on the rich display system of Jupyter and Xeus-cling is available at https://xeus-cling.readthedocs.io/en/latest/rich_display.html\n\n// %% [markdown]\n// ### Image example\n\n// %%\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace im\n{\n    struct image\n    {   \n        inline image(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const image& i)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"image/png\"] = xtl::base64encode(i.m_buffer.str());\n        return bundle;\n    }\n}\n\n// %%\nim::image marie(\"images/marie.png\");\nmarie\n\n// %% [markdown]\n// ### Audio example\n\n// %%\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace au\n{\n    struct audio\n    {   \n        inline audio(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const audio& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] =\n           std::string(\"<audio controls=\\\"controls\\\"><source src=\\\"data:audio/wav;base64,\")\n           + xtl::base64encode(a.m_buffer.str()) +\n            \"\\\" type=\\\"audio/wav\\\" /></audio>\";\n        return bundle;\n    }\n}\n\n// %%\nau::audio drums(\"audio/audio.wav\");\ndrums\n\n// %% [markdown]\n// ### Display\n\n// %%\n#include \"xcpp/xdisplay.hpp\"\n\n// %%\nxcpp::display(drums);\n\n// %% [markdown]\n// ### Update-display\n\n// %%\n#include <string>\n#include \"xcpp/xdisplay.hpp\"\n\nnamespace ht\n{\n    struct html\n    {   \n        inline html(const std::string& content)\n        {\n            m_content = content;\n        }\n        std::string m_content;\n    };\n\n    xeus::xjson mime_bundle_repr(const html& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] = a.m_content;\n        return bundle;\n    }\n}\n\n// A red rectangle\nht::html rect(R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: blue;\n    color: white;\n    text-align: center;'>\nOriginal\n</div>)\");\n\n// %%\nxcpp::display(rect, \"some_display_id\");\n\n// %%\n// Update the rectangle to be blue\nrect.m_content = R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: red;\n    color: white;\n    text-align: center;'>\nUpdated\n</div>)\";\n\nxcpp::display(rect, \"some_display_id\", true);\n\n// %% [markdown]\n// ## Magics\n//\n// Magics are special commands for the kernel that are not part of the C++ language.\n//\n// They are defined with the symbol `%` for a line magic and `%%` for a cell magic.\n//\n// More documentation for magics is available at https://xeus-cling.readthedocs.io/en/latest/magics.html.\n\n// %%\n#include <algorithm>\n#include <vector>\n\n// %%\nstd::vector<double> to_shuffle = {1, 2, 3, 4};\n\n// %%\n// %timeit std::random_shuffle(to_shuffle.begin(), to_shuffle.end());\n\n// %% [markdown]\n// [![xtensor](images/xtensor.png)](https://github.com/QuantStack/xtensor/)\n//\n// - GitHub repository: https://github.com/QuantStack/xtensor/\n// - Online documentation: https://xtensor.readthedocs.io/\n// - NumPy to xtensor cheat sheet: http://xtensor.readthedocs.io/en/latest/numpy.html\n//\n// `xtensor` is a C++ library for manipulating N-D arrays with an API very similar to that of numpy.\n\n// %%\n#include <iostream>\n\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n#include \"xtensor/xview.hpp\"\n\nxt::xarray<double> arr1\n  {{1.0, 2.0, 3.0},\n   {2.0, 5.0, 7.0},\n   {2.0, 5.0, 7.0}};\n\nxt::xarray<double> arr2\n  {5.0, 6.0, 7.0};\n\nxt::view(arr1, 1) + arr2\n\n// %% [markdown]\n// Together with the C++ Jupyter kernel, `xtensor` offers a similar experience as `NumPy` in the Python Jupyter kernel, including broadcasting and universal functions.\n\n// %%\n#include <iostream>\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n\n// %%\nxt::xarray<int> arr\n  {1, 2, 3, 4, 5, 6, 7, 8, 9};\n\narr.reshape({3, 3});\n\nstd::cout << arr;\n\n// %%\n#include \"xtensor-blas/xlinalg.hpp\"\n\n// %%\nxt::xtensor<double, 2> m = {{1.5, 0.5}, {0.7, 1.0}};\nstd::cout << \"Matrix rank: \" << std::endl << xt::linalg::matrix_rank(m) << std::endl;\nstd::cout << \"Matrix inverse: \" << std::endl << xt::linalg::inv(m) << std::endl;\nstd::cout << \"Eigen values: \" << std::endl << xt::linalg::eigvals(m) << std::endl;\n\n// %%\nxt::xarray<double> arg1 = xt::arange<double>(9);\nxt::xarray<double> arg2 = xt::arange<double>(18);\n\narg1.reshape({3, 3});\narg2.reshape({2, 3, 3});\n\nstd::cout << xt::linalg::dot(arg1, arg2) << std::endl;\n\n// %%\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_percent/xonsh_example.xsh",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Xonsh\n#     language: xonsh\n#     name: xonsh\n# ---\n\n# %%\nlen($(curl -L https://xon.sh))\n\n# %%\nfor filename in `.*`:\n    print(filename)\n    du -sh @(filename)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_quarto/Notebook_with_more_R_magic_111.qmd",
    "content": "---\njupyter: python3\n---\n\n```{python}\n%load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n```\n\n```{python}\n%%R -i df\nlibrary(\"ggplot2\")\nggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_quarto/cat_variable.qmd",
    "content": "---\njupyter: python3\n---\n\n```{python}\ncat = 42\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_quarto/frozen_cell.qmd",
    "content": "---\njupyter: python3\n---\n\n```{python}\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n```\n\n```{python}\n#| deletable: false\n#| editable: false\n#| run_control: {frozen: true}\n# This is an frozen cell\nprint(\"I'm frozen so Im not executed :(\")\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_quarto/julia_benchmark_plotly_barchart.qmd",
    "content": "---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: julia-1.1\n---\n\n```{julia}\n# IJulia rocks! So does Plotly. Check it out\n\nusing Plotly\napi_key = \"\" # visit https://plot.ly/api to generate an API username and password\nusername = \"\"\n\nPlotly.signin(username, api_key)\n```\n\n```{julia}\n# Following data taken from http://julialang.org/ frontpage \nbenchmarks = [\"fib\", \"parse_int\", \"quicksort3\", \"mandel\", \"pi_sum\", \"rand_mat_stat\", \"rand_mat_mul\"]\nplatforms = [\"Fortran\", \"Julia\", \"Python\", \"R\", \"Matlab\", \"Mathematica\", \"Javascript\", \"Go\"]\n\ndata = {\n        platforms[1] => [0.26, 5.03, 1.11, 0.86, 0.80, 0.64, 0.96],\n        platforms[2] => [0.91, 1.60, 1.14, 0.85, 1.00, 1.66, 1.01],\n        platforms[3] => [30.37, 13.95, 31.98, 14.19, 16.33, 13.52, 3.41 ],\n        platforms[4] => [411.36, 59.40, 524.29, 106.97, 15.42, 10.84, 3.98  ],\n        platforms[5] => [1992.00, 1463.16, 101.84, 64.58, 1.29, 6.61, 1.10   ],\n        platforms[6] => [64.46, 29.54, 35.74, 6.07, 1.32, 4.52, 1.16 ],\n        platforms[7] => [2.18, 2.43, 3.51, 3.49, 0.84, 3.28, 14.60],\n        platforms[8] => [1.03, 4.79, 1.25, 2.36, 1.41, 8.12, 8.51]\n        }\n\npdata = [ {\"x\"=>benchmarks,\"y\"=>data[k],\"bardir\"=>\"h\",\"type\"=>\"bar\",\"name\"=>k} for k = platforms ]\n\nlayout = {\n          \"title\"=> \"Julia benchmark comparison (smaller is better, C performance = 1.0)\",\n          \"barmode\"=> \"group\",\n          \"autosize\"=> false,\n          \"width\"=> 900,\n          \"height\"=> 900,\n          \"titlefont\"=>\n          {\n           \"family\"=> \"Open Sans\",\n           \"size\"=> 18,\n           \"color\"=> \"rgb(84, 39, 143)\"\n           },\n          \"margin\"=> {\"l\"=>160, \"pad\"=>0},\n          \"xaxis\"=> {\n                     \"title\"=> \"Benchmark log-time\",\n                     \"type\"=> \"log\"\n                     },\n          \"yaxis\"=> {\"title\"=> \"Benchmark Name\"}\n          }\n\nresponse = Plotly.plot(pdata,[\"layout\"=>layout])\n\n# Embed in an iframe within IJulia\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n\n```{julia}\n# checkout https://plot.ly/api/ for more Julia examples!\n# But to show off some other Plotly features:\nx = 1:1500\ny1 = sin(2*pi*x/1500.) + rand(1500)-0.5\ny2 = sin(2*pi*x/1500.)\n\nfish = {\"x\"=>x,\"y\"=> y1,\n\t\"type\"=>\"scatter\",\"mode\"=>\"markers\",\n\t\"marker\"=>{\"color\"=>\"rgb(0, 0, 255)\",\"opacity\"=>0.5 } }\n\nfit = {\"x\"=> x,\"y\"=> y2,\n\t\"type\"=>\"scatter\", \"mode\"=>\"markers\", \"opacity\"=>0.8,\n\t\"marker\"=>{\"color\"=>\"rgb(255, 0, 0)\"} }\n\nlayout = {\"autosize\"=> false,\n    \"width\"=> 650, \"height\"=> 550,\n    \"title\"=>\"Fish School\",\n\t\"xaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",    \n        \"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[0,1500] },\n\t\"yaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",\n\t\t\"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[-2.2,2.2] },\n\t\"plot_bgcolor\"=> \"rgb(245,245,247)\",\n    \"showlegend\"=> false,\n    \"hovermode\"=> \"closest\"}\n\nresponse = Plotly.plot([fish, fit],[\"layout\"=>layout])\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n```\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/Line_breaks_in_LateX_305.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This cell uses no particular cell marker\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x)\\\\\n# \\dot{y} & = \\rho x - y - xz \\\\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# This cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x) \\\n# \\dot{y} & = \\rho x - y - xz \\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# + [markdown]\n'''\nThis cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n'''\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/Notebook with function and cell metadata 164.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n1 + 1\n\n\n# A markdown cell\n# And below, the cell for function f has non trivial cell metadata. And the next cell as well.\n\n# + attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\ndef f(x):\n    return x\n\n\n# + attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\nf(5)\n# -\n\n# More text\n\n2 + 2\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/Notebook with html and latex cells.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# + language=\"html\"\n# <p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>\n\n# + language=\"latex\"\n# $\\frac{\\pi}{2}$\n# -\n\n# %load_ext rpy2.ipython\n\n# + language=\"R\"\n# library(ggplot2)\n# ggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\n# -\n\n# %matplotlib inline\nimport pandas as pd\npd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/Notebook with metadata and long cells.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# # Part one - various cells\n\n# Here we have a markdown cell\n#\n#\n# with two blank lines\n\n# Now we have a markdown cell\n# with a code block inside it\n#\n# ```python\n# 1 + 1\n# ```\n#\n# After that cell we'll have a code cell\n\n# +\n2 + 2\n\n\n3 + 3\n# -\n\n# Followed by a raw cell\n\n# + active=\"\"\n# This is \n# the content\n# of the raw cell\n# -\n\n# # Part two - cell metadata\n\n# + [markdown] key=\"value\"\n# This is a markdown cell with cell metadata `{\"key\": \"value\"}`\n\n# + .class tags=[\"parameters\"]\n\"\"\"This is a code cell with metadata `{\"tags\":[\"parameters\"], \".class\":null}`\"\"\"\n\n# + key=\"value\" active=\"\"\n# This is a raw cell with cell metadata `{\"key\": \"value\"}`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/Notebook_with_R_magic.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 2\n#     language: python\n#     name: python2\n# ---\n\n# # A notebook with R cells\n#\n# This notebook shows the use of R cells to generate plots\n\n# %load_ext rpy2.ipython\n\n# + language=\"R\"\n# suppressMessages(require(tidyverse))\n\n# + language=\"R\"\n# ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n# -\n\n# The default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\n\n# + magic_args=\"-w 400 -h 240\" language=\"R\"\n# ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/Notebook_with_more_R_magic_111.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# +\n# %load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n\n# + magic_args=\"-i df\" language=\"R\"\n# library(\"ggplot2\")\n# ggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/R notebook with invalid cell keys.R",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# This notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/R notebook with invalid cell keys.low.r",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# This notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/Reference Guide for Calysto Scheme.scm",
    "content": ";; -*- coding: utf-8 -*-\n;; ---\n;; jupyter:\n;;   kernelspec:\n;;     display_name: Calysto Scheme (Python)\n;;     language: scheme\n;;     name: calysto_scheme\n;; ---\n\n;; <img src=\"images/logo-64x64.png\"/>\n;; <h1>Reference Guide for Calysto Scheme</h1>\n;;\n;; [Calysto Scheme](https://github.com/Calysto/calysto_scheme) is a real Scheme programming language, with full support for continuations, including call/cc. It can also use all Python libraries. Also has some extensions that make it more useful (stepper-debugger, choose/fail, stack traces), or make it better integrated with Python.\n;;\n;; In Jupyter notebooks, because Calysto Scheme uses [MetaKernel](https://github.com/Calysto/metakernel/blob/master/README.rst), it has a fully-supported set of \"magics\"---meta-commands for additional functionality. This includes running Scheme in parallel. See all of the [MetaKernel Magics](https://github.com/Calysto/metakernel/blob/master/metakernel/magics/README.md).\n;;\n;; Calysto Scheme is written in Scheme, and then translated into Python (and other backends). The entire functionality lies in a single Python file: https://github.com/Calysto/calysto_scheme/blob/master/calysto_scheme/scheme.py However, you can easily install it (see below).\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n;;\n;; ## Installation\n;;\n;; You can install Calysto Scheme with Python3:\n;;\n;; ```\n;; pip3 install --upgrade calysto-scheme --user -U\n;; python3 -m calysto_kernel install --user\n;; ```\n;;\n;; or in the system kernel folder with:\n;;\n;; ```\n;; sudo pip3 install --upgrade calysto-scheme -U\n;; sudo python3 -m calysto_kernel install\n;; ```\n;;\n;; Change pip3/python3 to use a different pip or Python. The version of Python used will determine how Calysto Scheme is run.\n;;\n;; Use it in the console, qtconsole, or notebook with IPython 3:\n;;\n;; ```\n;; ipython console --kernel calysto_scheme\n;; ipython qtconsole --kernel calysto_scheme\n;; ipython notebook --kernel calysto_scheme\n;; ```\n;;\n;; In addition to all of the following items, Calysto Scheme also has access to all of Python's builtin functions, and all of Python's libraries. For example, you can use `(complex 3 2)` to create a complex number by calling Python's complex function.\n;;\n;; ## Jupyter Enhancements\n;;\n;; When you run Calysto Scheme in Jupyter (console, notebook, qtconsole, etc.) you get:\n;;\n;; * TAB completions of Scheme functions and variable names\n;; * display of rich media\n;; * stepper/debugger\n;; * magics (% macros)\n;; * shell commands (! command)\n;; * LaTeX equations\n;; * LaTeX-style variables\n;; * Python integration\n\n;; ### LaTeX-style variables\n;;\n;; Calysto Scheme allows you to use LaTeX-style variables in code. For example, if you type:\n;;\n;; ```\n;; \\beta\n;; ```\n;;\n;; with the cursor right after the 'a' in beta, and then press TAB, it will turn into the unicode character:\n;;\n;; ```\n;; β\n;; ```\n;;\n;; There are nearly 1300 different symbols defined (thanks to the Julia language) and documented here:\n;;\n;; http://docs.julialang.org/en/release-0.4/manual/unicode-input/#man-unicode-input\n;;\n;; Calysto Scheme may not implement all of those. Some useful and suggestive ones:\n;;\n;; * \\pi - π\n;; * \\Pi - Π\n;; * \\Sigma - Σ\n;; * \\_i - subscript i, such as vectorᵢ\n\n(define α 67)\n\nα\n\n(define i 2)\n(define vectorᵢ (vector-ref (vector 0 6 3 2) i))\nvectorᵢ\n\n;; ### Rich media\n\n(import \"calysto.display\")\n\n(calysto.display.HTML \"This is <b>bold</b>, <i>italics</i>, <u>underlined</u>.\")\n\n(import \"calysto.graphics\")\n\n(define canvas (calysto.graphics.Canvas))\n\n(define ball (calysto.graphics.Circle '(150 150) 100))\n\n(ball.draw canvas)\n\n;; ### Shell commands\n\n! ls /tmp\n\n;; ### Stepper/Debugger\n;;\n;; Here is what the debugger looks like:\n;;\n;; <img src=\"images/stepper_debugger.png\">\n;;\n;; It has breakpoints (click in left margin). You must press Stop to exit the debugger.\n\n;; ```scheme\n;; ;; %%debug\n;;\n;; (begin\n;;  (define x 1)\n;;  (set! x 2)\n;; )\n;; ```\n\n;; ### Python Integration\n;;\n;; You can import and use any Python library in Calysto Scheme.\n;;\n;; In addition, if you wish, you can execute expressions and statements in a Python environment:\n\n(python-eval \"1 + 2\")\n\n(python-exec \n\"\ndef mypyfunc(a, b):\n    return a * b\n\")\n\n;; This is a shared environment with Scheme:\n\n(mypyfunc 4 5)\n\n;; You can use `func` to turn a Scheme procedure into a Python function, and `define!` to put it into the shared environment with Python:\n\n(define! mypyfunc2 (func (lambda (n) n)))\n\n(python-eval \"mypyfunc2(34)\")\n\n;; # Differences Between Languages\n;;\n;; ## Major differences between Scheme and Python\n;;\n;; 1. In Scheme, double quotes are used for strings and may contain newlines\n;; 1. In Scheme, a single quote is short for (quote ...) and means \"literal\"\n;; 1. In Scheme, everything is an expression and has a return value\n;; 1. Python does not support macros (e.g., extending syntax)\n;; 1. In Python, \"if X\" is false if X is None, False, [], (,) or 0. In Scheme, \"if X\" is only false if X is #f or 0\n;; 1. Calysto Scheme uses continuations, not the call stack. However, for debugging there is a pseudo-stack when an error is raised. You can turn that off with (use-stack-trace #f)\n;; 1. Scheme procedures are not Python functions, but there are means to use one as the other.\n;;\n;; ## Major Differences Between Calysto Scheme and other Schemes\n;;\n;; 1. define-syntax works slightly differently\n;; 1. In Calysto Scheme, #(...) is short for '#(...)\n;; 1. Calysto Scheme is missing many standard functions (see list at bottom)\n;; 1. Calysto Scheme has a built-in amb operator called `choose`\n;; 1. For debugging there is a pseudo-stack when errors are raised in Calysto Scheme. You can turn that off with (use-stack-trace #f)\n;;\n;; ### Stack Trace\n;;\n;; Calysto Scheme acts as if it has a call stack, for easier debugging. For example:\n\n(define fact\n    (lambda (n)\n      (if (= n 1)\n           q\n           (* n (fact (- n 1))))))\n\n(fact 5)\n\n;; To turn off the stack trace on error:\n;;\n;; ```scheme\n;; (use-stack-trace #f)\n;; ```\n;; That will allow infinite recursive loops without keeping track of the \"stack\".\n\n;; # Calysto Scheme Variables\n;;\n;; ## SCHEMEPATH\n;; SCHEMEPATH is a list of search directories used with (load NAME). This is a reference, so you should append to it rather than attempting to redefine it.\n\nSCHEMEPATH\n\n(set-cdr! (cdr SCHEMEPATH) (list \"/var/modules\"))\n\nSCHEMEPATH\n\n;; ## Getting Started\n;;\n;; Note that you can use the word `lambda` or \\lambda and then press [TAB]\n\n(define factorial\n  (λ (n)\n     (cond\n      ((zero? n) 1)\n      (else (* n (factorial (- n 1)))))))\n\n(factorial 5)\n\n;; ## define-syntax\n;; (define-syntax NAME RULES): a method for creating macros\n\n(define-syntax time \n  [(time ?exp) (let ((start (current-time)))\n                 ?exp\n                 (- (current-time) start))])\n\n(time (car '(1 2 3 4)))\n\n;; +\n;;---------------------------------------------------------------------\n;; collect is like list comprehension in Python\n\n(define-syntax collect\n  [(collect ?exp for ?var in ?list)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) #t) ?list)]\n  [(collect ?exp for ?var in ?list if ?condition)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) ?condition) ?list)])\n\n(define filter-map\n  (lambda (f pred? values)\n    (if (null? values)\n      '()\n      (if (pred? (car values))\n          (cons (f (car values)) (filter-map f pred? (cdr values)))\n          (filter-map f pred? (cdr values))))))\n;; -\n\n(collect (* n n) for n in (range 10))\n\n(collect (* n n) for n in (range 5 20 3))\n\n(collect (* n n) for n in (range 10) if (> n 5))\n\n;; +\n;;---------------------------------------------------------------------\n;; for loops\n\n(define-syntax for\n  [(for ?exp times do . ?bodies)\n   (for-repeat ?exp (lambda () . ?bodies))]\n  [(for ?var in ?exp do . ?bodies)\n   (for-iterate1 ?exp (lambda (?var) . ?bodies))]\n  [(for ?var at (?i) in ?exp do . ?bodies)\n   (for-iterate2 0 ?exp (lambda (?var ?i) . ?bodies))]\n  [(for ?var at (?i ?j . ?rest) in ?exp do . ?bodies)\n   (for ?var at (?i) in ?exp do\n     (for ?var at (?j . ?rest) in ?var do . ?bodies))])\n\n(define for-repeat\n  (lambda (n f)\n    (if (< n 1)\n      'done\n      (begin\n        (f)\n        (for-repeat (- n 1) f)))))\n\n(define for-iterate1\n  (lambda (values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values))\n        (for-iterate1 (cdr values) f)))))\n\n(define for-iterate2\n  (lambda (i values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values) i)\n        (for-iterate2 (+ i 1) (cdr values) f)))))\n\n;; +\n(define matrix2d\n  '((10 20)\n    (30 40)\n    (50 60)\n    (70 80)))\n\n(define matrix3d\n  '(((10 20 30) (40 50 60))\n    ((70 80 90) (100 110 120))\n    ((130 140 150) (160 170 180))\n    ((190 200 210) (220 230 240))))\n;; -\n\n(begin \n (define hello 0)\n (for 5 times do (set! hello (+ hello 1)))\n hello\n )\n\n(for sym in '(a b c d) do (define x 1) (set! x sym) (print x))\n\n(for n in (range 10 20 2) do (print n))\n\n(for n at (i j) in matrix2d do (print (list n 'coords: i j)))\n\n(for n at (i j k) in matrix3d do (print (list n 'coords: i j k)))\n\n;; +\n(define-syntax scons\n  [(scons ?x ?y) (cons ?x (lambda () ?y))])\n\n(define scar car)\n\n(define scdr\n  (lambda (s)\n    (let ((result ((cdr s))))\n      (set-cdr! s (lambda () result))\n      result)))\n\n(define first\n  (lambda (n s)\n    (if (= n 0)\n      '()\n      (cons (scar s) (first (- n 1) (scdr s))))))\n\n(define nth\n  (lambda (n s)\n    (if (= n 0)\n      (scar s)\n      (nth (- n 1) (scdr s)))))\n\n(define smap\n  (lambda (f s)\n    (scons (f (scar s)) (smap f (scdr s)))))\n\n(define ones (scons 1 ones))\n\n(define nats (scons 0 (combine nats + ones)))\n\n(define combine\n  (lambda (s1 op s2)\n    (scons (op (scar s1) (scar s2)) (combine (scdr s1) op (scdr s2)))))\n\n(define fibs (scons 1 (scons 1 (combine fibs + (scdr fibs)))))\n\n(define facts (scons 1 (combine facts * (scdr nats))))\n\n(define ! (lambda (n) (nth n facts)))\n;; -\n\n(! 5)\n\n(nth 10 facts)\n\n(nth 20 fibs)\n\n(first 30 fibs)\n\n;; ## for-each\n;; (for-each PROCEDURE LIST): apply PROCEDURE to each item in LIST; like `map` but don't return results\n\n(for-each (lambda (n) (print n)) '(3 4 5))\n\n;; ## format\n;; (format STRING ITEM ...): format the string with ITEMS as arguments\n\n(format \"This uses formatting ~a ~s ~%\" 'apple 'apple)\n\n;; ## func\n;;\n;; Turns a lambda into a Python function.\n;;\n;; (func (lambda ...))\n\n(func (lambda (n) n))\n\n;; ## There's more!\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/Reference Guide for Calysto Scheme.ss",
    "content": ";; -*- coding: utf-8 -*-\n;; ---\n;; jupyter:\n;;   kernelspec:\n;;     display_name: Calysto Scheme (Python)\n;;     language: scheme\n;;     name: calysto_scheme\n;; ---\n\n;; <img src=\"images/logo-64x64.png\"/>\n;; <h1>Reference Guide for Calysto Scheme</h1>\n;;\n;; [Calysto Scheme](https://github.com/Calysto/calysto_scheme) is a real Scheme programming language, with full support for continuations, including call/cc. It can also use all Python libraries. Also has some extensions that make it more useful (stepper-debugger, choose/fail, stack traces), or make it better integrated with Python.\n;;\n;; In Jupyter notebooks, because Calysto Scheme uses [MetaKernel](https://github.com/Calysto/metakernel/blob/master/README.rst), it has a fully-supported set of \"magics\"---meta-commands for additional functionality. This includes running Scheme in parallel. See all of the [MetaKernel Magics](https://github.com/Calysto/metakernel/blob/master/metakernel/magics/README.md).\n;;\n;; Calysto Scheme is written in Scheme, and then translated into Python (and other backends). The entire functionality lies in a single Python file: https://github.com/Calysto/calysto_scheme/blob/master/calysto_scheme/scheme.py However, you can easily install it (see below).\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n;;\n;; ## Installation\n;;\n;; You can install Calysto Scheme with Python3:\n;;\n;; ```\n;; pip3 install --upgrade calysto-scheme --user -U\n;; python3 -m calysto_kernel install --user\n;; ```\n;;\n;; or in the system kernel folder with:\n;;\n;; ```\n;; sudo pip3 install --upgrade calysto-scheme -U\n;; sudo python3 -m calysto_kernel install\n;; ```\n;;\n;; Change pip3/python3 to use a different pip or Python. The version of Python used will determine how Calysto Scheme is run.\n;;\n;; Use it in the console, qtconsole, or notebook with IPython 3:\n;;\n;; ```\n;; ipython console --kernel calysto_scheme\n;; ipython qtconsole --kernel calysto_scheme\n;; ipython notebook --kernel calysto_scheme\n;; ```\n;;\n;; In addition to all of the following items, Calysto Scheme also has access to all of Python's builtin functions, and all of Python's libraries. For example, you can use `(complex 3 2)` to create a complex number by calling Python's complex function.\n;;\n;; ## Jupyter Enhancements\n;;\n;; When you run Calysto Scheme in Jupyter (console, notebook, qtconsole, etc.) you get:\n;;\n;; * TAB completions of Scheme functions and variable names\n;; * display of rich media\n;; * stepper/debugger\n;; * magics (% macros)\n;; * shell commands (! command)\n;; * LaTeX equations\n;; * LaTeX-style variables\n;; * Python integration\n\n;; ### LaTeX-style variables\n;;\n;; Calysto Scheme allows you to use LaTeX-style variables in code. For example, if you type:\n;;\n;; ```\n;; \\beta\n;; ```\n;;\n;; with the cursor right after the 'a' in beta, and then press TAB, it will turn into the unicode character:\n;;\n;; ```\n;; β\n;; ```\n;;\n;; There are nearly 1300 different symbols defined (thanks to the Julia language) and documented here:\n;;\n;; http://docs.julialang.org/en/release-0.4/manual/unicode-input/#man-unicode-input\n;;\n;; Calysto Scheme may not implement all of those. Some useful and suggestive ones:\n;;\n;; * \\pi - π\n;; * \\Pi - Π\n;; * \\Sigma - Σ\n;; * \\_i - subscript i, such as vectorᵢ\n\n(define α 67)\n\nα\n\n(define i 2)\n(define vectorᵢ (vector-ref (vector 0 6 3 2) i))\nvectorᵢ\n\n;; ### Rich media\n\n(import \"calysto.display\")\n\n(calysto.display.HTML \"This is <b>bold</b>, <i>italics</i>, <u>underlined</u>.\")\n\n(import \"calysto.graphics\")\n\n(define canvas (calysto.graphics.Canvas))\n\n(define ball (calysto.graphics.Circle '(150 150) 100))\n\n(ball.draw canvas)\n\n;; ### Shell commands\n\n! ls /tmp\n\n;; ### Stepper/Debugger\n;;\n;; Here is what the debugger looks like:\n;;\n;; <img src=\"images/stepper_debugger.png\">\n;;\n;; It has breakpoints (click in left margin). You must press Stop to exit the debugger.\n\n;; ```scheme\n;; ;; %%debug\n;;\n;; (begin\n;;  (define x 1)\n;;  (set! x 2)\n;; )\n;; ```\n\n;; ### Python Integration\n;;\n;; You can import and use any Python library in Calysto Scheme.\n;;\n;; In addition, if you wish, you can execute expressions and statements in a Python environment:\n\n(python-eval \"1 + 2\")\n\n(python-exec \n\"\ndef mypyfunc(a, b):\n    return a * b\n\")\n\n;; This is a shared environment with Scheme:\n\n(mypyfunc 4 5)\n\n;; You can use `func` to turn a Scheme procedure into a Python function, and `define!` to put it into the shared environment with Python:\n\n(define! mypyfunc2 (func (lambda (n) n)))\n\n(python-eval \"mypyfunc2(34)\")\n\n;; # Differences Between Languages\n;;\n;; ## Major differences between Scheme and Python\n;;\n;; 1. In Scheme, double quotes are used for strings and may contain newlines\n;; 1. In Scheme, a single quote is short for (quote ...) and means \"literal\"\n;; 1. In Scheme, everything is an expression and has a return value\n;; 1. Python does not support macros (e.g., extending syntax)\n;; 1. In Python, \"if X\" is false if X is None, False, [], (,) or 0. In Scheme, \"if X\" is only false if X is #f or 0\n;; 1. Calysto Scheme uses continuations, not the call stack. However, for debugging there is a pseudo-stack when an error is raised. You can turn that off with (use-stack-trace #f)\n;; 1. Scheme procedures are not Python functions, but there are means to use one as the other.\n;;\n;; ## Major Differences Between Calysto Scheme and other Schemes\n;;\n;; 1. define-syntax works slightly differently\n;; 1. In Calysto Scheme, #(...) is short for '#(...)\n;; 1. Calysto Scheme is missing many standard functions (see list at bottom)\n;; 1. Calysto Scheme has a built-in amb operator called `choose`\n;; 1. For debugging there is a pseudo-stack when errors are raised in Calysto Scheme. You can turn that off with (use-stack-trace #f)\n;;\n;; ### Stack Trace\n;;\n;; Calysto Scheme acts as if it has a call stack, for easier debugging. For example:\n\n(define fact\n    (lambda (n)\n      (if (= n 1)\n           q\n           (* n (fact (- n 1))))))\n\n(fact 5)\n\n;; To turn off the stack trace on error:\n;;\n;; ```scheme\n;; (use-stack-trace #f)\n;; ```\n;; That will allow infinite recursive loops without keeping track of the \"stack\".\n\n;; # Calysto Scheme Variables\n;;\n;; ## SCHEMEPATH\n;; SCHEMEPATH is a list of search directories used with (load NAME). This is a reference, so you should append to it rather than attempting to redefine it.\n\nSCHEMEPATH\n\n(set-cdr! (cdr SCHEMEPATH) (list \"/var/modules\"))\n\nSCHEMEPATH\n\n;; ## Getting Started\n;;\n;; Note that you can use the word `lambda` or \\lambda and then press [TAB]\n\n(define factorial\n  (λ (n)\n     (cond\n      ((zero? n) 1)\n      (else (* n (factorial (- n 1)))))))\n\n(factorial 5)\n\n;; ## define-syntax\n;; (define-syntax NAME RULES): a method for creating macros\n\n(define-syntax time \n  [(time ?exp) (let ((start (current-time)))\n                 ?exp\n                 (- (current-time) start))])\n\n(time (car '(1 2 3 4)))\n\n;; +\n;;---------------------------------------------------------------------\n;; collect is like list comprehension in Python\n\n(define-syntax collect\n  [(collect ?exp for ?var in ?list)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) #t) ?list)]\n  [(collect ?exp for ?var in ?list if ?condition)\n   (filter-map (lambda (?var) ?exp) (lambda (?var) ?condition) ?list)])\n\n(define filter-map\n  (lambda (f pred? values)\n    (if (null? values)\n      '()\n      (if (pred? (car values))\n          (cons (f (car values)) (filter-map f pred? (cdr values)))\n          (filter-map f pred? (cdr values))))))\n;; -\n\n(collect (* n n) for n in (range 10))\n\n(collect (* n n) for n in (range 5 20 3))\n\n(collect (* n n) for n in (range 10) if (> n 5))\n\n;; +\n;;---------------------------------------------------------------------\n;; for loops\n\n(define-syntax for\n  [(for ?exp times do . ?bodies)\n   (for-repeat ?exp (lambda () . ?bodies))]\n  [(for ?var in ?exp do . ?bodies)\n   (for-iterate1 ?exp (lambda (?var) . ?bodies))]\n  [(for ?var at (?i) in ?exp do . ?bodies)\n   (for-iterate2 0 ?exp (lambda (?var ?i) . ?bodies))]\n  [(for ?var at (?i ?j . ?rest) in ?exp do . ?bodies)\n   (for ?var at (?i) in ?exp do\n     (for ?var at (?j . ?rest) in ?var do . ?bodies))])\n\n(define for-repeat\n  (lambda (n f)\n    (if (< n 1)\n      'done\n      (begin\n        (f)\n        (for-repeat (- n 1) f)))))\n\n(define for-iterate1\n  (lambda (values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values))\n        (for-iterate1 (cdr values) f)))))\n\n(define for-iterate2\n  (lambda (i values f)\n    (if (null? values)\n      'done\n      (begin\n        (f (car values) i)\n        (for-iterate2 (+ i 1) (cdr values) f)))))\n\n;; +\n(define matrix2d\n  '((10 20)\n    (30 40)\n    (50 60)\n    (70 80)))\n\n(define matrix3d\n  '(((10 20 30) (40 50 60))\n    ((70 80 90) (100 110 120))\n    ((130 140 150) (160 170 180))\n    ((190 200 210) (220 230 240))))\n;; -\n\n(begin \n (define hello 0)\n (for 5 times do (set! hello (+ hello 1)))\n hello\n )\n\n(for sym in '(a b c d) do (define x 1) (set! x sym) (print x))\n\n(for n in (range 10 20 2) do (print n))\n\n(for n at (i j) in matrix2d do (print (list n 'coords: i j)))\n\n(for n at (i j k) in matrix3d do (print (list n 'coords: i j k)))\n\n;; +\n(define-syntax scons\n  [(scons ?x ?y) (cons ?x (lambda () ?y))])\n\n(define scar car)\n\n(define scdr\n  (lambda (s)\n    (let ((result ((cdr s))))\n      (set-cdr! s (lambda () result))\n      result)))\n\n(define first\n  (lambda (n s)\n    (if (= n 0)\n      '()\n      (cons (scar s) (first (- n 1) (scdr s))))))\n\n(define nth\n  (lambda (n s)\n    (if (= n 0)\n      (scar s)\n      (nth (- n 1) (scdr s)))))\n\n(define smap\n  (lambda (f s)\n    (scons (f (scar s)) (smap f (scdr s)))))\n\n(define ones (scons 1 ones))\n\n(define nats (scons 0 (combine nats + ones)))\n\n(define combine\n  (lambda (s1 op s2)\n    (scons (op (scar s1) (scar s2)) (combine (scdr s1) op (scdr s2)))))\n\n(define fibs (scons 1 (scons 1 (combine fibs + (scdr fibs)))))\n\n(define facts (scons 1 (combine facts * (scdr nats))))\n\n(define ! (lambda (n) (nth n facts)))\n;; -\n\n(! 5)\n\n(nth 10 facts)\n\n(nth 20 fibs)\n\n(first 30 fibs)\n\n;; ## for-each\n;; (for-each PROCEDURE LIST): apply PROCEDURE to each item in LIST; like `map` but don't return results\n\n(for-each (lambda (n) (print n)) '(3 4 5))\n\n;; ## format\n;; (format STRING ITEM ...): format the string with ITEMS as arguments\n\n(format \"This uses formatting ~a ~s ~%\" 'apple 'apple)\n\n;; ## func\n;;\n;; Turns a lambda into a Python function.\n;;\n;; (func (lambda ...))\n\n(func (lambda (n) n))\n\n;; ## There's more!\n;;\n;; Please see [Calysto Scheme Language](Calysto%20Scheme%20Language.ipynb) for more details on the Calysto Scheme language.\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/The flavors of raw cells.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# + raw_mimetype=\"text/latex\" active=\"\"\n# $1+1$\n\n# + raw_mimetype=\"text/restructuredtext\" active=\"\"\n# :math:`1+1`\n\n# + raw_mimetype=\"text/html\" active=\"\"\n# <b>Bold text<b>\n\n# + raw_mimetype=\"text/markdown\" active=\"\"\n# **Bold text**\n\n# + raw_mimetype=\"text/x-python\" active=\"\"\n# 1 + 1\n\n# + active=\"\"\n# Not formatted\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/cat_variable.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\ncat = 42\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/coconut_homepage_demo.coco",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Coconut\n#     language: coconut\n#     name: coconut\n# ---\n\n# Taken from [coconut-lang.org](coconut-lang.org)\n\n# pipeline-style programming\n\n\"hello, world!\" |> print\n\n#  prettier lambdas\n\nx -> x ** 2\n\n# partial application\n\nrange(10) |> map$(pow$(?, 2)) |> list\n\n# pattern-matching\n\nmatch [head] + tail in [0, 1, 2, 3]:\n    print(head, tail)\n\n# destructuring assignment\n\n{\"list\": [0] + rest} = {\"list\": [0, 1, 2, 3]}\n\n# infix notation\n\n# +\n# 5 `mod` 3 == 2\n# -\n\n# operator functions\n\nproduct = reduce$(*)\n\n# function composition\n\n# +\n# (f..g..h)(x, y, z)\n# -\n\n# lazy lists\n\n# +\n# (| first_elem() |) :: rest_elems()\n# -\n\n# parallel programming\n\nrange(100) |> parallel_map$(pow$(2)) |> list\n\n# tail call optimization\n\ndef factorial(n, acc=1):\n    case n:\n        match 0:\n            return acc\n        match _ is int if n > 0:\n            return factorial(n-1, acc*n)\n\n# algebraic data types\n\n# +\ndata Empty()\ndata Leaf(n)\ndata Node(l, r)\n\ndef size(Empty()) = 0\n\naddpattern def size(Leaf(n)) = 1\n\naddpattern def size(Node(l, r)) = size(l) + size(r)\n# -\n\n# and much more!\n#\n# Like what you see? Don't forget to star Coconut on GitHub!\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/convert_to_py_then_test_with_update83.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# +\n# %%time\n\nprint('asdf')\n# -\n\n# Thanks for jupytext!\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/csharp.cs",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: .NET (C#)\n//     language: C#\n//     name: .net-csharp\n// ---\n\n// We start with...\n\nConsole.WriteLine(\"Hello World!\");\n\n// Then we do a plot with Plotly, following the [Plotting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Plotting%20with%20Xplot.ipynb) example from `dotnet/interactive`:\n\n// +\nusing XPlot.Plotly;\n\nvar bar = new Graph.Bar\n{\n    name = \"Bar\",\n    x = new[] {'A', 'B', 'C'},\n    y = new[] {1, 3, 2}\n};\n\nvar chart = Chart.Plot(new[] {bar});\nchart.WithTitle(\"A bar plot\");\ndisplay(chart);\n// -\n\n// We also test the math outputs as in the [Math and Latex](https://github.com/dotnet/interactive/blob/master/NotebookExamples/csharp/Docs/Math%20and%20LaTeX.ipynb) example:\n\n(LaTeXString)@\"\\begin{align} e^{i \\pi} = -1\\end{align}\"\n\n(MathString)@\"e^{i \\pi} = -1\"\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/demo_gdl_fbp.pro",
    "content": "; -*- coding: utf-8 -*-\n; ---\n; jupyter:\n;   kernelspec:\n;     display_name: IDL [conda env:gdl] *\n;     language: IDL\n;     name: conda-env-gdl-idl\n; ---\n\n; ## GDL demo notebook\n\n; Demonstration of GDL [(gnudatalanguage)](https://github.com/gnudatalanguage/gdl)\n;\n; This notebook creates a Shepp-Logan phantom, projects it and then performs an FBP reconstruction.\n\n; +\n;; L.A. Shepp and B.F. Logan, “The Fourier reconstruction of a head section,”\n;; IEEE Trans. Nucl. Sci. 21(3), 21–43 (1974).\nfunction shepplogan, size = size\n\n  if NOT keyword_set(size) then size = 256\n\n  phantom = fltarr(size,size)\n\n  tmp  = (findgen(size)-((size-1)/2.0)) / (size/2.0)\n  xcor = rebin(tmp,size,size)\n  ycor = rebin(transpose(tmp),size,size)\n  tmp  = fltarr(size,size)\n  \n  aa={cx: 0.0,  cy: 0.0,    maj:0.69,   min:0.92,  theta:  0.0, val: 2.0 }\n  bb={cx: 0.0,  cy:-0.0184, maj:0.6624, min:0.874, theta:  0.0, val:-0.98}\n  cc={cx: 0.22, cy: 0.0,    maj:0.11,   min:0.31,  theta:-18.0, val:-0.02}\n  dd={cx:-0.22, cy: 0.0,    maj:0.16,   min:0.41,  theta: 18.0, val:-0.02}\n  ee={cx: 0.0,  cy: 0.35,   maj:0.21,   min:0.25,  theta:  0.0, val:-0.01}\n  ff={cx: 0.0,  cy: 0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  gg={cx: 0.0,  cy:-0.1,    maj:0.046,  min:0.046, theta:  0.0, val:-0.01}\n  hh={cx:-0.08, cy:-0.605,  maj:0.046,  min:0.023, theta:  0.0, val:-0.01}\n  ii={cx: 0.0,  cy:-0.605,  maj:0.023,  min:0.023, theta:  0.0, val:-0.01}\n  jj={cx: 0.06, cy:-0.605,  maj:0.023,  min:0.046, theta:  0.0, val:-0.01}\n\n  list = [aa,bb,cc,dd,ee,ff,gg,hh,ii,jj]\n  for n = 0, n_elements(list)-1 do begin\n\n     tmp = ((xcor-list[n].cx) / list[n].maj)^2 $\n           + ((ycor-list[n].cy) / list[n].min)^2\n     \n     if list[n].theta NE 0 then begin\n        nx = (size-1) * (list[n].cx + 1) / 2\n        ny = (size-1) * (list[n].cy + 1) / 2\n        tmp = rot(tmp, -list[n].theta, 1, nx, ny, /interp, /pivot)\n     endif\n     \n     phantom[where(tmp LE 1.0)] += list[n].val\n     \n  endfor\n  \n  return, phantom < 1.1\n  \nend\n; -\n\n;; Enable inline plotting\n!inline=1\n\nphantom = shepplogan()\nwindow, 0, xsize=256, ysize=256\ntvscl, phantom > 0.95\n\n; Now we define simple forward and backprojection functions:\n\n; +\nfunction proj, image, angle\n\n    sino_size_x = max(size(image,/dim))\n    sino_size_y = n_elements(angle)\n\n    sino = fltarr(sino_size_x, sino_size_y)\n    \n    for aa=0, n_elements(angle)-1 do begin\n    \n        sino[*,aa] = total(rot(image, angle[aa], /interp), 2)\n    \n    endfor\n\n    return, sino\n    \nend\n\n; +\nfunction back, sino, angle\n\n    image_size = n_elements(sino[*,0])\n    image = fltarr(image_size,image_size)\n\n    for aa=0, n_elements(angle)-1 do begin\n    \n        image += rot(rebin(sino[*,aa],[image_size,image_size]), -angle[aa], /interp)\n    \n    endfor\n\n    return, image / n_elements(angle)\n\nend\n; -\n\n; This allows us to create a sinogram:\n\nangles = findgen(360)\nsino = proj(phantom, angles)\nwindow, 0, xsize=256, ysize=360\ntvscl, sino\n\n; On this we can apply a simple FBP reconstruction:\n\n; +\n;; G.L. Zeng, “Revisit of the Ramp Filter,”\n;; IEEE Trans. Nucl. Sci. 62(1), 131–136 (2015).\nfunction fbp, sino, angles\n  \n  ntot = n_elements(sino[*,0])\n  nang = n_elements(sino[0,*])\n  npos = ntot / 2 + 1           ; integer division needed !\n  nneg = ntot - npos\n\n  freq = findgen(ntot)\n  freq[npos:ntot-1] = REVERSE(freq[1:nneg])\n  freq[0] = 1\n\n  filter = -1 / (!pi * freq)^2\n  filter[where(freq mod 2 EQ 0)] *= -0.0\n  filter[0] = 0.25\n\n  filter = abs(fft(filter)) * ntot\n  filter[ntot/4:ntot/4+ntot/2-1] *= 0.0\n  filter = rebin(filter,ntot,nang)\n\n  ;; apply filter to the sinogram\n  fsino  = fft(sino,  dim=1)\n  fsino *= filter\n  fsino  = fft(fsino, dim=1, /overwrite, /inverse)\n  fsino  = !pi * real_part(fsino)\n\n  ;; backproject the filtered sinogram\n  return, back(fsino, angles)\n\nend\n\n; +\nreconstruction = fbp(sino, angles)\nwindow, 0, xsize=512, ysize=256\n\ntvscl, [phantom, reconstruction] > 0.8\n; -\n\n; ### The end\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/evcxr_jupyter_tour.rs",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Rust\n//     language: rust\n//     name: rust\n// ---\n\n// # Tour of the EvCxR Jupyter Kernel\n// For those not already familiar with Jupyter notebook, it lets you write code into \"cells\" like the box below. Cells can alternatively contain markdown, like this text here. Each code cell is compiled and executed separately, but variables, defined functions etc persist between cells.\n//\n// ## Printing to outputs and evaluating expressions\n// Lets print something to stdout and stderr then return a final expression to see how that's presented. Note that stdout and stderr are separate streams, so may not appear in the same order is their respective print statements.\n\nprintln!(\"Hello world\");\neprintln!(\"Hello error\");\nformat!(\"Hello {}\", \"world\")\n\n// ## Assigning and making use of variables\n// We define a variable `message`, then in the subsequent cell, modify the string and finally print it out. We could also do all this in the one cell if we wanted.\n\nlet mut message = \"Hello \".to_owned();\n\nmessage.push_str(\"world!\");\n\nmessage\n\n// ## Defining and redefining functions\n// Next we'll define a function\n\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {0} else {fib(x - 2) + fib(x - 1)}\n}\n\n(1..13).map(fib).collect::<Vec<i32>>()\n\n// Hmm, that doesn't look right. Lets redefine the function. In practice, we'd go back and edit the function above and reevaluate it, but here, lets redefine it in a separate cell.\n\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {2} else {fib(x - 2) + fib(x - 1)}\n}\n\nlet values = (1..13).map(fib).collect::<Vec<i32>>();\nvalues\n\n// ## Spawning a separate thread and communicating with it\n// We can spawn a thread to do stuff in the background, then continue executing code in other cells.\n\nuse std::sync::{Mutex, Arc};\nlet counter = Arc::new(Mutex::new(0i32));\nstd::thread::spawn({\n    let counter = Arc::clone(&counter);\n    move || {\n        for i in 1..300 {\n            *counter.lock().unwrap() += 1;\n            std::thread::sleep(std::time::Duration::from_millis(100));\n        }\n}});\n\n*counter.lock().unwrap()\n\n*counter.lock().unwrap()\n\n// ## Loading external crates\n// We can load external crates. This one takes a while to compile, but once it's compiled, subsequent cells shouldn't need to recompile it, so it should be much quicker.\n\n// :dep base64 = \"0.10.1\"\nbase64::encode(&vec![1, 2, 3, 4])\n\n// ## Customizing how types are displayed\n// We can also customize how our types are displayed, including presenting them as HTML. Here's an example where we define a custom display function for a type `Matrix`.\n\nuse std::fmt::Debug;\npub struct Matrix<T> {pub values: Vec<T>, pub row_size: usize}\nimpl<T: Debug> Matrix<T> {\n    pub fn evcxr_display(&self) {\n        let mut html = String::new();\n        html.push_str(\"<table>\");\n        for r in 0..(self.values.len() / self.row_size) {\n            html.push_str(\"<tr>\");\n            for c in 0..self.row_size {\n                html.push_str(\"<td>\");\n                html.push_str(&format!(\"{:?}\", self.values[r * self.row_size + c]));\n                html.push_str(\"</td>\");\n            }\n            html.push_str(\"</tr>\");            \n        }\n        html.push_str(\"</table>\");\n        println!(\"EVCXR_BEGIN_CONTENT text/html\\n{}\\nEVCXR_END_CONTENT\", html);\n    }\n}\n\nlet m = Matrix {values: vec![1,2,3,4,5,6,7,8,9], row_size: 3};\nm\n\n// We can also return images, we just need to base64 encode them. First, we set up code for displaying RGB and grayscale images.\n\nextern crate image;\nextern crate base64;\npub trait EvcxrResult {fn evcxr_display(&self);}\nimpl EvcxrResult for image::RgbImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::RGB(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\nimpl EvcxrResult for image::GrayImage {\n    fn evcxr_display(&self) {\n        let mut buffer = Vec::new();\n        image::png::PNGEncoder::new(&mut buffer).encode(&**self, self.width(), self.height(),\n            image::ColorType::Gray(8)).unwrap();\n        let img = base64::encode(&buffer);\n        println!(\"EVCXR_BEGIN_CONTENT image/png\\n{}\\nEVCXR_END_CONTENT\", img);        \n    }\n}\n\nimage::ImageBuffer::from_fn(256, 256, |x, y| {\n    if (x as i32 - y as i32).abs() < 3 {\n        image::Rgb([0, 0, 255])\n    } else {\n        image::Rgb([0, 0, 0])\n    }\n})\n\n// ## Display of compilation errors\n// Here's how compilation errors are presented. Here we forgot an & and passed a String instead of an &str.\n\nlet mut s = String::new();\ns.push_str(format!(\"foo {}\", 42));\n\n// ## Seeing what variables have been defined\n// We can print a table of defined variables and their types with the :vars command.\n\n// :vars\n\n// Other built-in commands can be found via :help\n\n// :help\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/frozen_cell.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n\n# + deletable=false editable=false run_control={\"frozen\": true}\n# # This is an frozen cell\n# print(\"I'm frozen so Im not executed :(\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/fsharp.fsx",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: .NET (F#)\n//     language: F#\n//     name: .net-fsharp\n// ---\n\n// This notebook was inspired by [Plottting with XPlot](https://github.com/dotnet/interactive/blob/master/NotebookExamples/fsharp/Docs/Plotting%20with%20Xplot.ipynb).\n\nopen XPlot.Plotly\n\n// +\nlet bar =\n    Bar(\n        name = \"Bar 1\",\n        x = [\"A\"; \"B\"; \"C\"],\n        y = [1; 3; 2])\n\n[bar]\n|> Chart.Plot\n|> Chart.WithTitle \"A sample bar plot\"\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/gnuplot_notebook.gp",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: gnuplot\n#     language: gnuplot\n#     name: gnuplot\n# ---\n\n# # Sample gnuplot notebook\n\n# ## Simple plotting\n\n# +\n# Plot sin and cos with different linetypes\n\nf(x) = sin(x)\ng(x) = cos(x)\nset xrange[0:2*pi]\nset xtics(0, \"{/Symbol p}\" pi , \"2{/Symbol p}\" 2*pi)\nset ytics 1\nplot f(x) linewidth 2 title \"sin(x)\", \\\n    g(x) linewidth 2 dashtype \"--\" title \"cos(x)\"\n# -\n\n# ## Example of line magic\n\n# +\n# %gnuplot inline pngcairo enhanced background rgb \"#EEEEEE\" size 600, 600\n# Parametric plot without border\n\nreset\nset parametric\nset size ratio -1\nunset border\nunset tics\nplot f(t), g(t) linewidth 2 notitle\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/haskell_notebook.hs",
    "content": "-- ---\n-- jupyter:\n--   kernelspec:\n--     display_name: Haskell\n--     language: haskell\n--     name: haskell\n-- ---\n\n-- # Example Haskell Notebook\n\n-- Define a function to add two numbers.\n\nf :: Num a => a -> a -> a\nf x y = x + y\n\n-- Try to use the function\n\nf 1 2 \n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/hello_world_gonb.go",
    "content": "// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Go (gonb)\n//     language: go\n//     name: gonb\n// ---\n\n// A notebook that use [GoNB](https://github.com/janpfeifer/gonb)\n\n// the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb)\n\nfunc main() {\n    fmt.Printf(\"Hello World!\")\n}\n\n//gonb:%%\nfmt.Printf(\"Hello World!\")\n\n// //gonb:%% --who=world can pass flags to main func\n\n// +\nimport (\n    \"flag\"\n    \"fmt\"\n)\n\nvar flagWho = flag.String(\"who\", \"\", \"Your name!\")\n\n//gonb:%% --who=world\nfmt.Printf(\"Hello %s!\\n\", *flagWho)\n// -\n\n// // %args also can pass flags\n\n// +\n// %args --who=Wally\n\nfunc main() {\n    flag.Parse()\n    fmt.Printf(\"Where is %s?\", *flagWho)\n}\n\n// +\nimport \"github.com/janpfeifer/gonb/gonbui\"\n\n//gonb:%%\ngonbui.DisplayHtml(`<span style=\"background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;\">I 🧡 GoNB!</span>`)\n// -\n\n//gonb:%%\ngonbui.DisplayMarkdown(\"#### Objective\\n\\n1. Have fun coding **Go**;\\n1. Profit...\\n\"+\n                       `$$f(x) = \\int_{-\\infty}^{\\infty} e^{-x^2} dx$$`)\n\nfunc init_a() {\n    fmt.Println(\"init_a\")\n}\n//gonb:%%\nfmt.Println(\"main\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/html-demo.clj",
    "content": ";; ---\n;; jupyter:\n;;   kernelspec:\n;;     display_name: Clojure\n;;     language: clojure\n;;     name: clojure\n;; ---\n\n;; # Clojupyter Demo\n;;\n;; This example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.\n;; This notebook demonstrates some of the more advanced features of Clojupyter.\n\n;; ## Displaying HTML\n;;\n;; To display HTML, you'll need to require a clojupyter helper function to change the cell output\n\n(require '[clojupyter.misc.display :as display])\n\n(println \">> should print some text\")\n;; displaying html\n(display/hiccup-html \n    [:ul \n     [:li \"a \" [:i \"emphatic\"] \" idea\"]\n     [:li \"a \" [:b \"bold\"] \" idea\"]\n     [:li \"an \" [:span {:style \"text-decoration: underline;\"} \"important\"] \" idea\"]])\n\n;; We can also use this to render SVG:\n\n(display/hiccup-html\n    [:svg {:height 100 :width 100 :xmlns \"http://www.w3.org/2000/svg\"}\n            [:circle {:cx 50 :cy 40 :r 40 :fill \"red\"}]])\n\n;; ## Adding External Clojure Dependencies \n;;\n;; You can fetch external Clojure dependencies using the `clojupyter.misc.helper` namespace. \n\n(require '[clojupyter.misc.helper :as helper])\n\n(helper/add-dependencies '[org.clojure/data.json \"0.2.6\"])\n(require '[clojure.data.json :as json])\n\n(json/write-str {:a 1 :b [2, 3] :c \"c\"})\n\n;; ## Adding External Javascript Dependency\n;;\n;; Since you can render arbitrary HTML using `display/hiccup-html`, it's pretty easy to use external Javascript libraries to do things like generate charts. Here's an example using [Highcharts](https://www.highcharts.com/).\n;;\n;; First, we use a cell to add javascript to the running notebook:\n\n(helper/add-javascript \"https://code.highcharts.com/highcharts.js\")\n\n;; Now we define a function which takes Clojure data and returns hiccup HTML to display:\n\n(defn plot-highchart [highchart-json]\n  (let [id (str (java.util.UUID/randomUUID))\n        code (format \"Highcharts.chart('%s', %s );\" id, (json/write-str highchart-json))]\n      (display/hiccup-html \n        [:div [:div {:id id :style {:background-color \"red\"}}]\n                   [:script code]])))\n\n;; Now we can make generate interactive plots (try hovering over plot):\n\n;; +\n(def raw-data (map #(+ (* 22 (+ % (Math/random)) 78)) (range)))\n(def data-1 (take 500 raw-data))\n(def data-2 (take 500 (drop 500 raw-data)))\n\n(plot-highchart {:chart {:type \"line\"}\n                 :title {:text \"Plot of random data\"}\n                 :series [{:data data-1} {:data data-2}]})\n;; -\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/ijavascript.js",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Javascript (Node.js)\n//     language: javascript\n//     name: javascript\n// ---\n\n// ## A notebook that uses IJavascript kernel\n\nlet x = 5;\nconst y = 6;\nvar z = 10;\n\nx + y;\n\nfunction add(num1, num2) {\n    return num1 + num2\n}\n\nadd(x, y);\n\nconst arrowAdd = (num1, num2) => num1 + num2;\n\narrowAdd(x, y);\n\nconst myCar = {\n    color: \"blue\",\n    weight: 850,\n    model: \"fiat\",\n    start: () => \"car started!\",\n    doors: [1,2,3,4]\n}\n\nconsole.log(\"color:\", myCar.color);\n\nconsole.log(\"start:\", myCar.start());\n\nfor (let door of myCar.doors) {\n    console.log(\"I'm door\", door)\n}\n\nmyCar;\n\nclass User {\n  constructor(name){\n    this.name = name;\n  }\n  sayHello(){\n    return \"Hello, I'm \" + this.name;\n  }\n}\n\nlet John = new User(\"John\");\nJohn.sayHello();\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/ir_notebook.R",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# This is a jupyter notebook that uses the IR kernel.\n\nsum(1:10)\n\nplot(cars)\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/ir_notebook.low.r",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: R\n#     language: R\n#     name: ir\n# ---\n\n# This is a jupyter notebook that uses the IR kernel.\n\nsum(1:10)\n\nplot(cars)\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/itypescript.ts",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Typescript 3.5\n//     language: typescript\n//     name: typescript\n// ---\n\nlet x: number = 5;\nconst y: number = 6;\nvar z: string = \"hi\";\nconsole.log(z);\nx + y;\n\nfunction add(num1: number, num2: number): number {\n    return num1 + num2\n}\nadd(x, y);\n\nconst arrowAdd = (num1: number, num2: number) => num1 + num2;\narrowAdd(x, y);\n\nclass User {\n  constructor(private name: string) {\n    this.name = name;\n  }\n  sayHello(): string {\n    return \"Hello, I'm \" + this.name;\n  }\n}\nlet John: User;\nJohn = new User(\"John\");\nJohn.sayHello();\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/julia_benchmark_plotly_barchart.jl",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Julia 1.1.1\n#     language: julia\n#     name: julia-1.1\n# ---\n\n# +\n# IJulia rocks! So does Plotly. Check it out\n\nusing Plotly\napi_key = \"\" # visit https://plot.ly/api to generate an API username and password\nusername = \"\"\n\nPlotly.signin(username, api_key)\n\n# +\n# Following data taken from http://julialang.org/ frontpage \nbenchmarks = [\"fib\", \"parse_int\", \"quicksort3\", \"mandel\", \"pi_sum\", \"rand_mat_stat\", \"rand_mat_mul\"]\nplatforms = [\"Fortran\", \"Julia\", \"Python\", \"R\", \"Matlab\", \"Mathematica\", \"Javascript\", \"Go\"]\n\ndata = {\n        platforms[1] => [0.26, 5.03, 1.11, 0.86, 0.80, 0.64, 0.96],\n        platforms[2] => [0.91, 1.60, 1.14, 0.85, 1.00, 1.66, 1.01],\n        platforms[3] => [30.37, 13.95, 31.98, 14.19, 16.33, 13.52, 3.41 ],\n        platforms[4] => [411.36, 59.40, 524.29, 106.97, 15.42, 10.84, 3.98  ],\n        platforms[5] => [1992.00, 1463.16, 101.84, 64.58, 1.29, 6.61, 1.10   ],\n        platforms[6] => [64.46, 29.54, 35.74, 6.07, 1.32, 4.52, 1.16 ],\n        platforms[7] => [2.18, 2.43, 3.51, 3.49, 0.84, 3.28, 14.60],\n        platforms[8] => [1.03, 4.79, 1.25, 2.36, 1.41, 8.12, 8.51]\n        }\n\npdata = [ {\"x\"=>benchmarks,\"y\"=>data[k],\"bardir\"=>\"h\",\"type\"=>\"bar\",\"name\"=>k} for k = platforms ]\n\nlayout = {\n          \"title\"=> \"Julia benchmark comparison (smaller is better, C performance = 1.0)\",\n          \"barmode\"=> \"group\",\n          \"autosize\"=> false,\n          \"width\"=> 900,\n          \"height\"=> 900,\n          \"titlefont\"=>\n          {\n           \"family\"=> \"Open Sans\",\n           \"size\"=> 18,\n           \"color\"=> \"rgb(84, 39, 143)\"\n           },\n          \"margin\"=> {\"l\"=>160, \"pad\"=>0},\n          \"xaxis\"=> {\n                     \"title\"=> \"Benchmark log-time\",\n                     \"type\"=> \"log\"\n                     },\n          \"yaxis\"=> {\"title\"=> \"Benchmark Name\"}\n          }\n\nresponse = Plotly.plot(pdata,[\"layout\"=>layout])\n\n# Embed in an iframe within IJulia\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n\n# +\n# checkout https://plot.ly/api/ for more Julia examples!\n# But to show off some other Plotly features:\nx = 1:1500\ny1 = sin(2*pi*x/1500.) + rand(1500)-0.5\ny2 = sin(2*pi*x/1500.)\n\nfish = {\"x\"=>x,\"y\"=> y1,\n\t\"type\"=>\"scatter\",\"mode\"=>\"markers\",\n\t\"marker\"=>{\"color\"=>\"rgb(0, 0, 255)\",\"opacity\"=>0.5 } }\n\nfit = {\"x\"=> x,\"y\"=> y2,\n\t\"type\"=>\"scatter\", \"mode\"=>\"markers\", \"opacity\"=>0.8,\n\t\"marker\"=>{\"color\"=>\"rgb(255, 0, 0)\"} }\n\nlayout = {\"autosize\"=> false,\n    \"width\"=> 650, \"height\"=> 550,\n    \"title\"=>\"Fish School\",\n\t\"xaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",    \n        \"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[0,1500] },\n\t\"yaxis\"=>{ \"ticks\"=> \"\",\n        \"gridcolor\"=> \"white\",\n        \"zerolinecolor\"=> \"white\",\n\t\t\"linecolor\"=> \"white\",\n        \"autorange\"=> false,\n        \"range\"=>[-2.2,2.2] },\n\t\"plot_bgcolor\"=> \"rgb(245,245,247)\",\n    \"showlegend\"=> false,\n    \"hovermode\"=> \"closest\"}\n\nresponse = Plotly.plot([fish, fit],[\"layout\"=>layout])\ns = string(\"<iframe height='750' id='igraph' scrolling='no' seamless='seamless' src='\",\n            response[\"url\"],\n            \"/700/700' width='750'></iframe>\")\ndisplay(\"text/html\", s)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/julia_functional_geometry.jl",
    "content": "# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Julia 1.1.1\n#     language: julia\n#     name: julia-1.1\n# ---\n\n# +\n# This notebook is a semi top-down explanation. This cell needs to be\n# executed first so that the operators and helper functions are defined\n# All of this is explained in the later half of the notebook\n\nusing Compose, Interact\nCompose.set_default_graphic_size(2inch, 2inch)\n\npoints_f = [\n    (.1, .1),\n    (.9, .1),\n    (.9, .2),\n    (.2, .2),\n    (.2, .4),\n    (.6, .4),\n    (.6, .5),\n    (.2, .5),\n    (.2, .9),\n    (.1, .9),\n    (.1, .1)\n]\n\nf = compose(context(), stroke(\"black\"), line(points_f))\n\nrot(pic) = compose(context(rotation=Rotation(-deg2rad(90))), pic)\nflip(pic) = compose(context(mirror=Mirror(deg2rad(90), 0.5w, 0.5h)), pic)\nabove(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, 1, m/(m+n)), p),\n            (context(0, m/(m+n), 1, n/(m+n)), q))\n\nabove(p, q) = above(1, 1, p, q)\n\nbeside(m, n, p, q) =\n    compose(context(),\n            (context(0, 0, m/(m+n), 1), p),\n            (context(m/(m+n), 0, n/(m+n), 1), q))\n\nbeside(p, q) = beside(1, 1, p, q)\n\nover(p, q) = compose(context(),\n                (context(), p), (context(), q))\n\nrot45(pic) =\n    compose(context(0, 0, 1/sqrt(2), 1/sqrt(2),\n        rotation=Rotation(-deg2rad(45), 0w, 0h)), pic)\n\n# Utility function to zoom out and look at the context\nzoomout(pic) = compose(context(),\n                (context(0.2, 0.2, 0.6, 0.6), pic),\n                (context(0.2, 0.2, 0.6, 0.6), fill(nothing), stroke(\"black\"), strokedash([0.5mm, 0.5mm]),\n                    polygon([(0, 0), (1, 0), (1, 1), (0, 1)])))\n\nfunction read_path(p_str)\n    tokens = [try parsefloat(x) catch symbol(x) end for x in split(p_str, r\"[\\s,]+\")]\n    path(tokens)\nend\n\nfish = compose(context(units=UnitBox(260, 260)), stroke(\"black\"),\n            read_path(strip(readall(\"fish.path\"))))\n\nrotatable(pic) = @manipulate for θ=0:0.001:2π\n    compose(context(rotation=Rotation(θ)), pic)\nend\n\nblank = compose(context())\n\nfliprot45(pic) = rot45(compose(context(mirror=Mirror(deg2rad(-45))),pic))\n\n# Hide this cell.\ndisplay(MIME(\"text/html\"), \"\"\"<script>\nvar cell = \\$(\".container .cell\").eq(0), ia = cell.find(\".input_area\")\nif (cell.find(\".toggle-button\").length == 0) {\nia.after(\n    \\$('<button class=\"toggle-button\">Toggle hidden code</button>').click(\n        function (){ ia.toggle() }\n        )\n    )\nia.hide()\n}\n</script>\"\"\")\n# -\n\n# # Functional Geometry\n# *Functional Geometry* is a paper by Peter Henderson ([original (1982)](users.ecs.soton.ac.uk/peter/funcgeo.pdf), [revisited (2002)](https://cs.au.dk/~hosc/local/HOSC-15-4-pp349-365.pdf)) which deconstructs the MC Escher woodcut *Square Limit*\n#\n# ![Square Limit](http://i.imgur.com/LjRzmNM.png)\n\n# > A picture is an example of a complex object that can be described in terms of its parts.\n# Yet a picture needs to be rendered on a printer or a screen by a device that expects to\n# be given a sequence of commands. Programming that sequence of commands directly is\n# much harder than having an application generate the commands automatically from the\n# simpler, denotational description.\n\n# A `picture` is a *denotation* of something to draw.\n#\n# e.g. The value of f here denotes the picture of the letter F\n\n# Original at http://nbviewer.jupyter.org/github/shashi/ijulia-notebooks/blob/master/funcgeo/Functional%20Geometry.ipynb\n\n# ## In conclusion\n#\n# We described Escher's *Square Limit* from the description of its smaller parts, which in turn were described in terms of their smaller parts.\n#\n# This seemed simple because we chose to talk in terms of an *algebra* to describe pictures. The primitives `rot`, `flip`, `fliprot45`, `above`, `beside` and `over` fit the job perfectly.\n#\n# We were able to describe these primitives in terms of `compose` `contexts`, which the Compose library knows how to render.\n#\n# Denotation can be an easy way to describe a system as well as a practical implementation method.\n#\n# [Abstraction barriers](https://mitpress.mit.edu/sicp/full-text/sicp/book/node29.html) are useful tools that can reduce the cognitive overhead on the programmer. It entails creating layers consisting of functions which only use functions in the same layer or layers below in their own implementation. The layers in our language were:\n#\n#     ------------------[ squarelimit ]------------------\n#     -------------[ quartet, cycle, nonet ]-------------\n#     ---[ rot, flip, fliprot45, above, beside, over ]---\n#     -------[ compose, context, line, path,... ]--------\n#     \n# Drawing this diagram out is a useful way to begin building any library.\n#\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/jupyter.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# # Jupyter notebook\n#\n# This notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n\na = 1\nb = 2\na + b\n\n# Now we return a few tuples\n\na, b\n\na, b, a+b\n\n# And this is already the end of the notebook\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/jupyter_again.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n\n# ?next\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/jupyter_with_raw_cell_in_body.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n1+2+3\n\n# + active=\"\"\n# This is a raw cell\n# -\n\n# This is a markdown cell\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/jupyter_with_raw_cell_on_top.py",
    "content": "# ---\n# title: Quick test\n# output:\n#   ioslides_presentation:\n#     widescreen: true\n#     smaller: true\n# editor_options:\n#   chunk_output_type: console\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n1+2+3\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/jupyter_with_raw_cell_with_invalid_yaml.py",
    "content": "# ---\n# title: Exception: Test\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n1 + 2 + 3\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/jupyterlab-slideshow_1441.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n# + [markdown] @deathbeds/jupyterlab-fonts={\"styles\": {\"\": {\"body[data-jp-deck-mode='presenting'] &\": {\"right\": \"0\", \"top\": \"30%\", \"width\": \"25%\", \"z-index\": 1}}}} jupyterlab-slideshow={\"layer\": \"slide\"}\n# > **Note**\n# > \n# > `slide` layer with a `top` of `30%`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/jupytext_replication.sos",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: SoS\n#     language: sos\n#     name: sos\n# ---\n\n# + [markdown] Collapsed=\"false\" kernel=\"SoS\"\n# # Text SOS-kernel with Jupytext\n#\n# ## What is SOS kernel\n#\n# SoS consists of a ployglot notebook that allows the use of multiple kernels in one Jupyter notebook, and a workflow system that is designed for daily computational research. Basically,\n#\n# - SoS Polyglot Notebook is a Jupyter Notebook with a SoS kernel.\n# - SoS Notebook serves as a super kernel to all other Jupyter kernels and allows the use of multiple kernels in one Jupyter notebook.\n# - SoS Workflow System is a Python based workflow system that is designed to be readable, shareable, and suitable for daily data analysis.\n# - SoS Workflow System can be used from command line or use SoS Notebook as its IDE.\n#\n# ![](https://vatlab.github.io/sos-docs/doc/media/SoS_Notebook_and_Workflow.png)\n#\n# ### How to install SOS-kernel\n#\n# Please follow this [link](https://vatlab.github.io/sos-docs/running.html#Conda-installation) to setup SOS\n#\n# I run some issue with the latest version of R on my Mac, so I had to install an earlier version of R\n#\n# ```\n# conda install -c r r=3.5.1\n# conda install sos-notebook jupyterlab-sos sos-papermill -c conda-forge\n# ```\n#\n# ## Related issue with Jupytext\n#\n# Jupytext works fine with Python/R kernel but converts code cells into markdown cells when using the SOS kernel.\n#\n# cf the image below. It is a code cell. After saving the notebook and restart it, it converted the code cell into markdown\n#\n# <img width=\"734\" alt=\"Screenshot 2020-03-13 at 10 51 18\" src=\"https://user-images.githubusercontent.com/33351426/76610049-9e704600-6518-11ea-861e-b4f691d1a478.png\">\n\n# + [markdown] Collapsed=\"false\" kernel=\"SoS\"\n# ## Step 1\n#\n# Please, choose SOS Kernel and then, in the cell code, choose SOS (or any other kernel available), the outcome is the same.\n#\n# ![](https://drive.google.com/uc?export=view&id=1OtyxfwoRyVK23XHnmd9JR-crBgHBL5mt)\n\n# + Collapsed=\"false\" kernel=\"SoS\"\nimport pandas as pd \nimport numpy as np\n\npd.DataFrame({\n    'x': np.random.random(10),\n    'y': np.random.random(10),\n})\n\n# + [markdown] Collapsed=\"false\" kernel=\"python3\"\n# ## Step 2\n#\n# Now, pair it with Jupytex\n#\n# ![](https://drive.google.com/uc?export=view&id=1Wtx-YPAXY8HWHqzCcy4iIgHpzt_9emEn)\n\n# + [markdown] Collapsed=\"false\" kernel=\"python3\"\n# ### Step 3\n#\n# Save the notebook, restart and clear all, **save**, then Shut down kernel. Close the notebook and reopen\n\n# + [markdown] Collapsed=\"false\" kernel=\"python3\"\n# ### Step 4\n#\n# Reopen the notebook. Here is the outcome\n#\n# ![](https://drive.google.com/uc?export=view&id=12C70unbSPv0gHCZaCICEUy7kO7wM93JH)\n#\n#\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/kalman_filter_and_visualization.q",
    "content": "/ ---\n/ jupyter:\n/   kernelspec:\n/     display_name: Q 3.5\n/     language: q\n/     name: qpk\n/ ---\n\nplt: .p.import`matplotlib.pyplot\n\n/ +\nfilter: {\n    t: ([] x: `float $ x; xh: `float $ x; p: (count x) # R: var x);\n    (first t), iterate[R; R]\\[first t; 1 _ t] \n    }\n\niterate: {[Q; R; x; y]\n    x[`p]+: Q;\n    k: x[`p] % R + x[`p];\n    `x`xh`p ! (y[`x]; x[`xh] + k * y[`x] - x[`xh]; (1 - k) * x[`p])\n    }\n/ -\n\nprice: 100 + sums 0.5 - (n:50)?1.\n\noutput:filter price\n\nplt[`:plot][til n; output`x; `label pykw \"price\"];\nplt[`:plot][til n; output`xh;`label pykw \"forecast\"];\nplt[`:legend][];\nplt[`:show][];\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/logtalk_notebook.lgt",
    "content": "% ---\n% jupyter:\n%   kernelspec:\n%     display_name: Logtalk\n%     language: logtalk\n%     name: logtalk_kernel\n% ---\n\n% # An implementation of the Ackermann function\n\n% + vscode={\"languageId\": \"logtalk\"}\n%%load ack.lgt\n\n:- object(ack).\n\n:- info([\n\tversion is 1:0:0,\n\tauthor is 'Paulo Moura',\n\tdate is 2008-3-31,\n\tcomment is 'Ackermann function (general recursive function).'\n]).\n\n:- public(ack/3).\n:- mode(ack(+integer, +integer, -integer), one).\n:- info(ack/3, [\n\tcomment is 'Ackermann function.',\n\targnames is ['M', 'N', 'V']\n]).\n\nack(0, N, V) :-\n\t!,\n\tV is N + 1.\nack(M, 0, V) :-\n\t!,\n\tM2 is M - 1,\n\tack(M2, 1, V).\nack(M, N, V) :-\n\tM2 is M - 1,\n\tN2 is N - 1,\n\tack(M, N2, V2),\n\tack(M2, V2, V).\n\n:- end_object.\n% -\n\n% ## Sample query\n\n% + vscode={\"languageId\": \"logtalk\"}\nack::ack(2, 4, V).\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/lua_example.lua",
    "content": "-- -*- coding: utf-8 -*-\n-- ---\n-- jupyter:\n--   kernelspec:\n--     display_name: Lua\n--     language: lua\n--     name: lua\n-- ---\n\n-- Source: https://www.lua.org/pil/19.3.html\n\n-- # Sort\n\n-- Another useful function on arrays is table.sort, which we have seen before. It receives the array to be sorted, plus an optional order function. This order function receives two arguments and must return true if the first argument should come first in the sorted array. If this function is not provided, sort uses the default less-than operation (corresponding to the `<´ operator).\n\n-- A common mistake is to try to order the indices of a table. In a table, the indices form a set, and have no order whatsoever. If you want to order them, you have to copy them to an array and then sort the array. Let us see an example. Suppose that you read a source file and build a table that gives, for each function name, the line where that function is defined; something like this:\n\nlines = {\n    luaH_set = 10,\n    luaH_get = 24,\n    luaH_present = 48,\n}\n\n--  Now you want to print these function names in alphabetical order. If you traverse this table with pairs, the names appear in an arbitrary order. However, you cannot sort them directly, because these names are keys of the table. However, when you put these names into an array, then you can sort them. First, you must create an array with those names, then sort it, and finally print the result:\n\na = {}\nfor n in pairs(lines) do table.insert(a, n) end\ntable.sort(a)\nfor i,n in ipairs(a) do print(n) end\n\n-- Note that, for Lua, arrays also have no order. But we know how to count, so we get ordered values as long as we access the array with ordered indices. That is why you should always traverse arrays with ipairs, rather than pairs. The first imposes the key order 1, 2, ..., whereas the latter uses the natural arbitrary order of the table.\n\n-- As a more advanced solution, we can write an iterator that traverses a table following the order of its keys. An optional parameter f allows the specification of an alternative order. It first sorts the keys into an array, and then iterates on the array. At each step, it returns the key and value from the original table:\n\nfunction pairsByKeys (t, f)\n    local a = {}\n    for n in pairs(t) do table.insert(a, n) end\n    table.sort(a, f)\n    local i = 0               -- iterator variable\n    local iter = function ()  -- iterator function\n        i = i + 1\n        if a[i] == nil then return nil\n        else return a[i], t[a[i]]\n        end\n    end\n    return iter\nend\n\n--  With this function, it is easy to print those function names in alphabetical order. The loop\n\nfor name, line in pairsByKeys(lines) do\n    print(name, line)\nend\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/maxima_example.mac",
    "content": "/* --- */\n/* jupyter: */\n/*   kernelspec: */\n/*     display_name: Maxima */\n/*     language: maxima */\n/*     name: maxima */\n/* --- */\n\n/* ## maxima misc */\n\nkill(all)$\n\nf(x) := 1/(x^2+l^2)^(3/2);\n\nintegrate(f(x), x);\n\ntex(%)$\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/notebook_with_complex_metadata.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/nteract_with_parameter.py",
    "content": "# ---\n# jupyter:\n#   kernel_info:\n#     name: python3\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# + inputHidden=false outputHidden=false tags=[\"parameters\"]\nparam = 4\n\n# + inputHidden=false outputHidden=false\nimport pandas as pd\n\n# + inputHidden=false outputHidden=false\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n\n# + inputHidden=false outputHidden=false\n# %matplotlib inline\ndf.plot(kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/ocaml_notebook.ml",
    "content": "(* --- *)\n(* jupyter: *)\n(*   jupytext: *)\n(*     formats: ipynb:markdown,md *)\n(*   kernelspec: *)\n(*     display_name: OCaml default *)\n(*     language: OCaml *)\n(*     name: ocaml-jupyter *)\n(* --- *)\n\n(* # Example of an OCaml notebook *)\n\nlet sum x y = x + y\n\n(* Let's try our function: *)\n\nsum 3 4 = 7 + 0\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/octave_notebook.m",
    "content": "% ---\n% jupyter:\n%   kernelspec:\n%     display_name: Octave\n%     language: octave\n%     name: octave\n% ---\n\n% A markdown cell\n\n1 + 1\n\n% a code cell with comments\n2 + 2\n\n% a simple plot\nx = -10:0.1:10;\nplot (x, sin (x));\n\n%plot -w 800\n% a simple plot with a magic instruction\nx = -10:0.1:10;\nplot (x, sin (x));\n\n% And to finish with, a Python cell\n\n% + language=\"python\"\n% a = 1\n\n% + language=\"python\"\n% a + 1\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/plotly_graphs.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This notebook contains complex outputs, including plotly javascript graphs.\n\n# # Interactive plots\n\n# We use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/powershell.ps1",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: PowerShell\n#     language: PowerShell\n#     name: powershell\n# ---\n\n# This is an extract from\n# https://github.com/Jaykul/Jupyter-PowerShell/blob/master/LiterateDevOps.ipynb\n\n# +\n$imageUrl = 'https://upload.wikimedia.org/wikipedia/commons/2/2f/PowerShell_5.0_icon.png'\n$ImageData = @{ \"png\" = (Invoke-WebRequest $imageUrl -UseBasicParsing).RawContentStream.GetBuffer() }\n# $ImageData\n\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 32 } }\nWrite-Jupyter -InputObject $ImageData -Metadata @{ \"image/png\" = @{ 'width' = 64 } }\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/raw_cell_with_complex_yaml_like_content.py",
    "content": "# ---\n#\n# This is a complex paragraph\n# that is split over multiple lines.\n#\n# It also includes blank lines.\n#\n#\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/raw_cell_with_non_dict_yaml_content.py",
    "content": "# ---\n# Content.\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/root_cpp.cpp",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: ROOT C++\n//     language: c++\n//     name: root\n// ---\n\n#include <iostream>\n#include <string>\n\nint k = 4;\nstd::string foo = \"This string says \\\"foo\\\"\";\n\nstd::cout << \"k = \" << k << '\\n' << foo << '\\n';\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/sage_print_hello.sage",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: SageMath 9.2\n#     language: sage\n#     name: sagemath\n# ---\n\nprint(\"Hello world\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/sample_bash_notebook.sh",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Bash\n#     language: bash\n#     name: bash\n# ---\n\nls\n\n# https://coderwall.com/p/euwpig/a-better-git-log\ngit config --global alias.lg \"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\"\n\ngit lg\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/sample_rise_notebook_66.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# + [markdown] slideshow={\"slide_type\": \"slide\"}\n# A markdown cell\n\n# + slideshow={\"slide_type\": \"\"}\n1+1\n\n# + [markdown] cell_style=\"center\" slideshow={\"slide_type\": \"fragment\"}\n# Markdown cell two\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/sas.sas",
    "content": "/* --- */\n/* jupyter: */\n/*   kernelspec: */\n/*     display_name: SAS */\n/*     language: sas */\n/*     name: sas */\n/* --- */\n\n/* # SAS Notebooks with jupytext */\n\nproc sql;\n    select *\n    from sashelp.cars (obs=10)\n    ;\nquit; \n\n%let name = \"Jupytext\";\n\n%put &name;\n\n/* +\n/* Note when defining macros \"%macro\" cannot be the first line of text in the cell */\n%macro test;\n    data temp;\n        set sashelp.cars;\n        name = \"testx\";\n    run; \n    proc print data = temp (obs=10);\n    run; \n%mend test;\n\n%test\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/simple-helloworld.java",
    "content": "// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   jupytext:\n//     formats: ipynb,java:light\n//   kernelspec:\n//     display_name: Java\n//     language: java\n//     name: java\n// ---\n\n// Let's define some class.\n\nclass A {\n    public void hello() {\n        System.out.println(\"Hello World\");\n    }   \n}\n\n// And now we call its method.\n\nnew A().hello();\n\n// You can run it e.g. with `jshell`\n//\n// * from command line, as `jshell simple-helloworld.java`\n// * from jshell's shell with `/open simple-helloworld.java`\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/simple_robot_notebook.robot",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Robot Framework\n#     language: robotframework\n#     name: robotkernel\n# ---\n\n# +\n*** Settings ***\n\nLibrary  Collections\n\n# +\n*** Keywords ***\n\nHead\n    [Arguments]  ${list}\n    ${value}=  Get from list  ${list}  0\n    [Return]  ${value}\n\n# +\n*** Tasks ***\n\nGet head\n    ${array}=  Create list  1  2  3  4  5\n    ${head}=  Head  ${array}\n    Should be equal  ${head}  1\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/simple_scala_notebook.scala",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Apache Toree - Scala\n//     language: scala\n//     name: apache_toree_scala\n// ---\n\n// +\n// This is just a simple scala notebook\n\nobject SampleObject {\n    def calculation(x: Int, y: Int): Int = x + y\n}\n\nval result = SampleObject.calculation(1, 2)\n// -\n\nprintln(result * 10)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/stata_notebook.do",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Stata\n//     language: stata\n//     name: stata\n// ---\n\n// +\n// This notebook uses the stata_kernel: https://github.com/kylebarron/stata_kernel\n// -\n\nuse http://www.stata-press.com/data/r13/auto\n\nsummarize\n\nscatter weight length\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/tailrecursive-factorial.groovy",
    "content": "// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   jupytext:\n//     formats: ipynb,groovy:light\n//   kernelspec:\n//     display_name: Groovy\n//     language: groovy\n//     name: groovy\n// ---\n\n// # TailRecursive annotation\n//\n// Let's check what is the effect of `@TailRecursive` annotation on the simple recursive definition of factorial function.\n\n// +\nimport groovy.transform.CompileStatic\nimport groovy.transform.TailRecursive\nimport groovy.transform.TypeChecked\n\n@CompileStatic\n@TypeChecked\nclass X {\n    static final BigInteger factorial0(int n) {\n        (n <= 1) ? 1G : factorial0(n-1).multiply(BigInteger.valueOf(n))\n    }\n\n    static final BigInteger factorial1(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial1(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n\n    @TailRecursive\n    static final BigInteger factorial2(int n, BigInteger acc = 1G) {\n        (n <= 1) ? acc : factorial2(n-1, acc.multiply(BigInteger.valueOf(n)))\n    }\n}\n\nx = new X()\n// -\n\n// Although we can time the execution of the calls, it is not very accurate; such micro benchmarks should be performed in more controlled environment, such us under [JMH](https://openjdk.java.net/projects/code-tools/jmh/).\n//\n// For example, see [blog posts of Szymon Stępniak](https://e.printstacktrace.blog/tail-recursive-methods-in-groovy/).\n\n// +\n// %%timeit\n\nx.factorial0(19_000).toString().length()\n\n// +\n// %%timeit\n\nx.factorial1(19_000).toString().length()\n\n// +\n// %%timeit\n\nx.factorial2(19_000).toString().length()\n// -\n\n// The real difference is the use of stack. Non-tail recursive calls exhaust the stack space at some point, whereas tail recursive calls don't add frames to the stack.\n\n// +\nfactSize = { n, cl ->\n    println \"Factorial of ${n} has ${cl(n).toString().length()} digits\"\n}\n\nfactSize 2_000, x.&factorial0\nfactSize 2_000, x.&factorial1\nfactSize 2_000, x.&factorial2\n\nfactSize 100_000, x.&factorial2\n// -\n\ntry {\n    factSize 100_000, x.&factorial1\n} catch (Throwable e) {\n    assert e instanceof StackOverflowError\n    println e\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/tcl_test.tcl",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Tcl\n#     language: tcl\n#     name: tcljupyter\n# ---\n\n# # Assign Values\n\nset a 1\nputs \"a = $a\"\n\n# # Loop\n\nfor {set i 0} {$i < 10} {incr i} {\n    puts \"I inside first loop: $i\"\n}\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/text_outputs_and_images.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This notebook contains outputs of many different types: text, HTML, plots and errors.\n\n# # Text outputs\n#\n# Using `print`, `sys.stdout` and `sys.stderr`\n\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n\n# # HTML outputs\n#\n# Using `pandas`. Here we find two representations: both text and HTML.\n\nimport pandas as pd\npd.DataFrame([4])\n\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n\n# # Images\n\n# %matplotlib inline\n\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n\n# # Errors\n\nundefined_variable\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/wolfram.wolfram",
    "content": "(* --- *)\n(* jupyter: *)\n(*   kernelspec: *)\n(*     display_name: Wolfram Language 13.1 *)\n(*     language: Wolfram Language *)\n(*     name: wolframlanguage13.1 *)\n(* --- *)\n\n(* **Note:** The `language_info` `file_extension` in this notebook should be `.m`, but it was deliberately changed to `.wolfram` to avoid conflicts with Matlab which is using the same extension. *)\n\n(* We start with... *)\n\nPrint[\"Hello, World!\"];\n\n(* Then we draw the first example plot from the [ListPlot](https://reference.wolfram.com/language/ref/ListPlot.html) reference: *)\n\nListPlot[Prime[Range[25]]]\n\n(* We also test the math outputs as in the [Simplify](https://reference.wolfram.com/language/ref/Simplify.html) example: *)\n\nD[Integrate[1/(x^3 + 1), x], x]\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/xcpp_by_quantstack.cpp",
    "content": "// ---\n// jupyter:\n//   kernelspec:\n//     display_name: C++14\n//     language: C++14\n//     name: xeus-cling-cpp14\n// ---\n\n// [![xeus-cling](images/xeus-cling.png)](https://github.com/QuantStack/xeus-cling/)\n//\n// A Jupyter kernel for C++ based on the `cling` C++ interpreter and the `xeus` native implementation of the Jupyter protocol, xeus.\n//\n// - GitHub repository: https://github.com/QuantStack/xeus-cling/\n// - Online documentation: https://xeus-cling.readthedocs.io/\n\n// ## Usage\n//\n// <div style=\"background: #efffed;\n//             border: 1px solid grey;\n//             margin: 8px 0 8px 0;\n//             text-align: center;\n//             padding: 8px; \">\n//     <i class=\"fa-play fa\" \n//        style=\"font-size: 40px;\n//               line-height: 40px;\n//               margin: 8px;\n//               color: #444;\">\n//     </i>\n//     <div>\n//     To run the selected code cell, hit <pre style=\"background: #efffed\">Shift + Enter</pre>\n//     </div>\n// </div>\n\n// ## Output and error streams\n//\n// `std::cout` and `std::cerr` are redirected to the notebook frontend.\n\n// +\n#include <iostream>\n\nstd::cout << \"some output\" << std::endl;\n// -\n\nstd::cerr << \"some error\" << std::endl;\n\n#include <stdexcept>\n\nthrow std::runtime_error(\"Unknown exception\");\n\n// Omitting the `;` in the last statement of a cell results in an output being printed\n\nint j = 5;\n\nj\n\n// # Interpreting the C++ programming language\n//\n// `cling` has a broad support of the features of C++. You can define functions, classes, templates, etc ...\n\n// ## Functions\n\ndouble sqr(double a)\n{\n    return a * a;\n}\n\ndouble a = 2.5;\ndouble asqr = sqr(a);\nasqr\n\n// ## Classes\n\nclass Foo\n{\npublic:\n\n    virtual ~Foo() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Foo value = \" << value << std::endl;\n    }\n};\n\nFoo bar;\nbar.print(1.2);\n\n// ## Polymorphism\n\nclass Bar : public Foo\n{\npublic:\n\n    virtual ~Bar() {}\n    \n    virtual void print(double value) const\n    {\n        std::cout << \"Bar value = \" << 2 * value << std::endl;\n    }\n};\n\nFoo* bar2 = new Bar;\nbar2->print(1.2);\ndelete bar2;\n\n// ## Templates\n\n// +\n#include <typeinfo>\n\ntemplate <class T>\nclass FooT\n{\npublic:\n    \n    explicit FooT(const T& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << typeid(T).name() << \" m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    T m_t;\n};\n\ntemplate <>\nclass FooT<int>\n{\npublic:\n    \n    explicit FooT(const int& t) : m_t(t) {}\n    \n    void print() const\n    {\n        std::cout << \"m_t = \" << m_t << std::endl;\n    }\n    \nprivate:\n    \n    int m_t;\n};\n// -\n\nFooT<double> foot1(1.2);\nfoot1.print();\n\nFooT<int> foot2(4);\nfoot2.print();\n\n// ## C++11 / C++14 support\n\nclass Foo11\n{\npublic:\n    \n    Foo11() { std::cout << \"Foo11 default constructor\" << std::endl; }\n    Foo11(const Foo11&) { std::cout << \"Foo11 copy constructor\" << std::endl; }\n    Foo11(Foo11&&) { std::cout << \"Foo11 move constructor\" << std::endl; }\n};\n\nFoo11 f1;\nFoo11 f2(f1);\nFoo11 f3(std::move(f1));\n\n// +\n#include <vector>\n\nstd::vector<int> v = { 1, 2, 3};\nauto iter = ++v.begin();\nv\n// -\n\n*iter\n\n// ... and also lambda, universal references, `decltype`, etc ...\n\n// ## Documentation and completion\n//\n//  - Documentation for types of the standard library is retrieved on cppreference.com.\n//  - The quick-help feature can also be enabled for user-defined types and third-party libraries. More documentation on this feature is available at https://xeus-cling.readthedocs.io/en/latest/inline_help.html.\n//\n\n?std::vector\n\n// ## Using the `display_data` mechanism\n\n// For a user-defined type `T`, the rich rendering in the notebook and JupyterLab can be enabled by by implementing the function `xeus::xjson mime_bundle_repr(const T& im)`, which returns the JSON mime bundle for that type.\n//\n// More documentation on the rich display system of Jupyter and Xeus-cling is available at https://xeus-cling.readthedocs.io/en/latest/rich_display.html\n\n// ### Image example\n\n// +\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace im\n{\n    struct image\n    {   \n        inline image(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const image& i)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"image/png\"] = xtl::base64encode(i.m_buffer.str());\n        return bundle;\n    }\n}\n// -\n\nim::image marie(\"images/marie.png\");\nmarie\n\n// ### Audio example\n\n// +\n#include <string>\n#include <fstream>\n\n#include \"xtl/xbase64.hpp\"\n#include \"xeus/xjson.hpp\"\n\nnamespace au\n{\n    struct audio\n    {   \n        inline audio(const std::string& filename)\n        {\n            std::ifstream fin(filename, std::ios::binary);   \n            m_buffer << fin.rdbuf();\n        }\n        \n        std::stringstream m_buffer;\n    };\n    \n    xeus::xjson mime_bundle_repr(const audio& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] =\n           std::string(\"<audio controls=\\\"controls\\\"><source src=\\\"data:audio/wav;base64,\")\n           + xtl::base64encode(a.m_buffer.str()) +\n            \"\\\" type=\\\"audio/wav\\\" /></audio>\";\n        return bundle;\n    }\n}\n// -\n\nau::audio drums(\"audio/audio.wav\");\ndrums\n\n// ### Display\n\n#include \"xcpp/xdisplay.hpp\"\n\nxcpp::display(drums);\n\n// ### Update-display\n\n// +\n#include <string>\n#include \"xcpp/xdisplay.hpp\"\n\nnamespace ht\n{\n    struct html\n    {   \n        inline html(const std::string& content)\n        {\n            m_content = content;\n        }\n        std::string m_content;\n    };\n\n    xeus::xjson mime_bundle_repr(const html& a)\n    {\n        auto bundle = xeus::xjson::object();\n        bundle[\"text/html\"] = a.m_content;\n        return bundle;\n    }\n}\n\n// A red rectangle\nht::html rect(R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: blue;\n    color: white;\n    text-align: center;'>\nOriginal\n</div>)\");\n// -\n\nxcpp::display(rect, \"some_display_id\");\n\n// +\n// Update the rectangle to be blue\nrect.m_content = R\"(\n<div style='\n    width: 90px;\n    height: 50px;\n    line-height: 50px;\n    background-color: red;\n    color: white;\n    text-align: center;'>\nUpdated\n</div>)\";\n\nxcpp::display(rect, \"some_display_id\", true);\n// -\n\n// ## Magics\n//\n// Magics are special commands for the kernel that are not part of the C++ language.\n//\n// They are defined with the symbol `%` for a line magic and `%%` for a cell magic.\n//\n// More documentation for magics is available at https://xeus-cling.readthedocs.io/en/latest/magics.html.\n\n#include <algorithm>\n#include <vector>\n\nstd::vector<double> to_shuffle = {1, 2, 3, 4};\n\n// %timeit std::random_shuffle(to_shuffle.begin(), to_shuffle.end());\n\n// [![xtensor](images/xtensor.png)](https://github.com/QuantStack/xtensor/)\n//\n// - GitHub repository: https://github.com/QuantStack/xtensor/\n// - Online documentation: https://xtensor.readthedocs.io/\n// - NumPy to xtensor cheat sheet: http://xtensor.readthedocs.io/en/latest/numpy.html\n//\n// `xtensor` is a C++ library for manipulating N-D arrays with an API very similar to that of numpy.\n\n// +\n#include <iostream>\n\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n#include \"xtensor/xview.hpp\"\n\nxt::xarray<double> arr1\n  {{1.0, 2.0, 3.0},\n   {2.0, 5.0, 7.0},\n   {2.0, 5.0, 7.0}};\n\nxt::xarray<double> arr2\n  {5.0, 6.0, 7.0};\n\nxt::view(arr1, 1) + arr2\n// -\n\n// Together with the C++ Jupyter kernel, `xtensor` offers a similar experience as `NumPy` in the Python Jupyter kernel, including broadcasting and universal functions.\n\n#include <iostream>\n#include \"xtensor/xarray.hpp\"\n#include \"xtensor/xio.hpp\"\n\n// +\nxt::xarray<int> arr\n  {1, 2, 3, 4, 5, 6, 7, 8, 9};\n\narr.reshape({3, 3});\n\nstd::cout << arr;\n// -\n\n#include \"xtensor-blas/xlinalg.hpp\"\n\nxt::xtensor<double, 2> m = {{1.5, 0.5}, {0.7, 1.0}};\nstd::cout << \"Matrix rank: \" << std::endl << xt::linalg::matrix_rank(m) << std::endl;\nstd::cout << \"Matrix inverse: \" << std::endl << xt::linalg::inv(m) << std::endl;\nstd::cout << \"Eigen values: \" << std::endl << xt::linalg::eigvals(m) << std::endl;\n\n// +\nxt::xarray<double> arg1 = xt::arange<double>(9);\nxt::xarray<double> arg2 = xt::arange<double>(18);\n\narg1.reshape({3, 3});\narg2.reshape({2, 3, 3});\n\nstd::cout << xt::linalg::dot(arg1, arg2) << std::endl;\n// -\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script/xonsh_example.xsh",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Xonsh\n#     language: xonsh\n#     name: xonsh\n# ---\n\nlen($(curl -L https://xon.sh))\n\nfor filename in `.*`:\n    print(filename)\n    du -sh @(filename)\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/Line_breaks_in_LateX_305.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This cell uses no particular cell marker\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x)\\\\\n# \\dot{y} & = \\rho x - y - xz \\\\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# This cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x) \\\n# \\dot{y} & = \\rho x - y - xz \\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# {{{ [markdown]\n'''\nThis cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n'''\n# }}}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/Notebook with function and cell metadata 164.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n1 + 1\n\n\n# A markdown cell\n# And below, the cell for function f has non trivial cell metadata. And the next cell as well.\n\n# {{{ attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\ndef f(x):\n    return x\n# }}}\n\n\n# {{{ attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\nf(5)\n# }}}\n\n# More text\n\n2 + 2\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/Notebook with html and latex cells.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# {{{ language=\"html\"\n# <p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>\n# }}}\n\n# {{{ language=\"latex\"\n# $\\frac{\\pi}{2}$\n# }}}\n\n# %load_ext rpy2.ipython\n\n# {{{ language=\"R\"\n# library(ggplot2)\n# ggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\n# }}}\n\n# %matplotlib inline\nimport pandas as pd\npd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/Notebook with many hash signs.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# ##################################################################\n# This is a notebook that contains many hash signs.\n# Hopefully its python representation is not recognized as a Sphinx Gallery script...\n# ##################################################################\n\n# {{{\nsome = 1\ncode = 2\nsome+code\n\n##################################################################\n# A comment\n##################################################################\n# Another comment\n# }}}\n\n# ##################################################################\n# This is a notebook that contains many hash signs.\n# Hopefully its python representation is not recognized as a Sphinx Gallery script...\n# ##################################################################\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/Notebook with metadata and long cells.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# # Part one - various cells\n\n# Here we have a markdown cell\n#\n#\n# with two blank lines\n\n# Now we have a markdown cell\n# with a code block inside it\n#\n# ```python\n# 1 + 1\n# ```\n#\n# After that cell we'll have a code cell\n\n# {{{\n2 + 2\n\n\n3 + 3\n# }}}\n\n# Followed by a raw cell\n\n# {{{ active=\"\"\n# This is \n# the content\n# of the raw cell\n# }}}\n\n# # Part two - cell metadata\n\n# {{{ [markdown] key=\"value\"\n# This is a markdown cell with cell metadata `{\"key\": \"value\"}`\n# }}}\n\n# {{{ .class tags=[\"parameters\"]\n\"\"\"This is a code cell with metadata `{\"tags\":[\"parameters\"], \".class\":null}`\"\"\"\n# }}}\n\n# {{{ key=\"value\" active=\"\"\n# This is a raw cell with cell metadata `{\"key\": \"value\"}`\n# }}}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/Notebook_with_R_magic.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 2\n#     language: python\n#     name: python2\n# ---\n\n# # A notebook with R cells\n#\n# This notebook shows the use of R cells to generate plots\n\n# %load_ext rpy2.ipython\n\n# {{{ language=\"R\"\n# suppressMessages(require(tidyverse))\n# }}}\n\n# {{{ language=\"R\"\n# ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n# }}}\n\n# The default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\n\n# {{{ magic_args=\"-w 400 -h 240\" language=\"R\"\n# ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n# }}}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/Notebook_with_more_R_magic_111.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# {{{\n# %load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n# }}}\n\n# {{{ magic_args=\"-i df\" language=\"R\"\n# library(\"ggplot2\")\n# ggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n# }}}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/The flavors of raw cells.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# {{{ raw_mimetype=\"text/latex\" active=\"\"\n# $1+1$\n# }}}\n\n# {{{ raw_mimetype=\"text/restructuredtext\" active=\"\"\n# :math:`1+1`\n# }}}\n\n# {{{ raw_mimetype=\"text/html\" active=\"\"\n# <b>Bold text<b>\n# }}}\n\n# {{{ raw_mimetype=\"text/markdown\" active=\"\"\n# **Bold text**\n# }}}\n\n# {{{ raw_mimetype=\"text/x-python\" active=\"\"\n# 1 + 1\n# }}}\n\n# {{{ active=\"\"\n# Not formatted\n# }}}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/cat_variable.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\ncat = 42\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/convert_to_py_then_test_with_update83.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# {{{\n# %%time\n\nprint('asdf')\n# }}}\n\n# Thanks for jupytext!\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/frozen_cell.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n\n# {{{ deletable=false editable=false run_control={\"frozen\": true}\n# # This is an frozen cell\n# print(\"I'm frozen so Im not executed :(\")\n# }}}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/jupyter.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# # Jupyter notebook\n#\n# This notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n\na = 1\nb = 2\na + b\n\n# Now we return a few tuples\n\na, b\n\na, b, a+b\n\n# And this is already the end of the notebook\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/jupyter_again.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n\n# ?next\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/jupyter_with_raw_cell_in_body.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n1+2+3\n\n# {{{ active=\"\"\n# This is a raw cell\n# }}}\n\n# This is a markdown cell\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/jupyter_with_raw_cell_on_top.py",
    "content": "# ---\n# title: Quick test\n# output:\n#   ioslides_presentation:\n#     widescreen: true\n#     smaller: true\n# editor_options:\n#   chunk_output_type: console\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n1+2+3\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/jupyter_with_raw_cell_with_invalid_yaml.py",
    "content": "# ---\n# title: Exception: Test\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n1 + 2 + 3\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/jupyterlab-slideshow_1441.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n# {{{ [markdown] @deathbeds/jupyterlab-fonts={\"styles\": {\"\": {\"body[data-jp-deck-mode='presenting'] &\": {\"right\": \"0\", \"top\": \"30%\", \"width\": \"25%\", \"z-index\": 1}}}} jupyterlab-slideshow={\"layer\": \"slide\"}\n# > **Note**\n# > \n# > `slide` layer with a `top` of `30%`\n# }}}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/notebook_with_complex_metadata.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/nteract_with_parameter.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernel_info:\n#     name: python3\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# {{{ inputHidden=false outputHidden=false tags=[\"parameters\"]\nparam = 4\n# }}}\n\n# {{{ inputHidden=false outputHidden=false\nimport pandas as pd\n# }}}\n\n# {{{ inputHidden=false outputHidden=false\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n# }}}\n\n# {{{ inputHidden=false outputHidden=false\n# %matplotlib inline\ndf.plot(kind='bar')\n# }}}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/plotly_graphs.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This notebook contains complex outputs, including plotly javascript graphs.\n\n# # Interactive plots\n\n# We use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/raw_cell_with_complex_yaml_like_content.py",
    "content": "# ---\n#\n# This is a complex paragraph\n# that is split over multiple lines.\n#\n# It also includes blank lines.\n#\n#\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/raw_cell_with_non_dict_yaml_content.py",
    "content": "# ---\n# Content.\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/sample_rise_notebook_66.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# {{{ [markdown] slideshow={\"slide_type\": \"slide\"}\n# A markdown cell\n# }}}\n\n# {{{ slideshow={\"slide_type\": \"\"}\n1+1\n# }}}\n\n# {{{ [markdown] cell_style=\"center\" slideshow={\"slide_type\": \"fragment\"}\n# Markdown cell two\n# }}}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vim_folding_markers/text_outputs_and_images.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '{{{,}}}'\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This notebook contains outputs of many different types: text, HTML, plots and errors.\n\n# # Text outputs\n#\n# Using `print`, `sys.stdout` and `sys.stderr`\n\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n\n# # HTML outputs\n#\n# Using `pandas`. Here we find two representations: both text and HTML.\n\nimport pandas as pd\npd.DataFrame([4])\n\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n\n# # Images\n\n# %matplotlib inline\n\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n\n# # Errors\n\nundefined_variable\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/Line_breaks_in_LateX_305.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This cell uses no particular cell marker\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x)\\\\\n# \\dot{y} & = \\rho x - y - xz \\\\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# This cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x) \\\n# \\dot{y} & = \\rho x - y - xz \\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n# region [markdown]\n'''\nThis cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n'''\n# endregion\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/Notebook with function and cell metadata 164.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n1 + 1\n\n\n# A markdown cell\n# And below, the cell for function f has non trivial cell metadata. And the next cell as well.\n\n# region attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\ndef f(x):\n    return x\n# endregion\n\n\n# region attributes={\"classes\": [], \"id\": \"\", \"n\": \"10\"}\nf(5)\n# endregion\n\n# More text\n\n2 + 2\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/Notebook with html and latex cells.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# region language=\"html\"\n# <p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>\n# endregion\n\n# region language=\"latex\"\n# $\\frac{\\pi}{2}$\n# endregion\n\n# %load_ext rpy2.ipython\n\n# region language=\"R\"\n# library(ggplot2)\n# ggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\n# endregion\n\n# %matplotlib inline\nimport pandas as pd\npd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/Notebook with many hash signs.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# ##################################################################\n# This is a notebook that contains many hash signs.\n# Hopefully its python representation is not recognized as a Sphinx Gallery script...\n# ##################################################################\n\n# region\nsome = 1\ncode = 2\nsome+code\n\n##################################################################\n# A comment\n##################################################################\n# Another comment\n# endregion\n\n# ##################################################################\n# This is a notebook that contains many hash signs.\n# Hopefully its python representation is not recognized as a Sphinx Gallery script...\n# ##################################################################\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/Notebook with metadata and long cells.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# # Part one - various cells\n\n# Here we have a markdown cell\n#\n#\n# with two blank lines\n\n# Now we have a markdown cell\n# with a code block inside it\n#\n# ```python\n# 1 + 1\n# ```\n#\n# After that cell we'll have a code cell\n\n# region\n2 + 2\n\n\n3 + 3\n# endregion\n\n# Followed by a raw cell\n\n# region active=\"\"\n# This is \n# the content\n# of the raw cell\n# endregion\n\n# # Part two - cell metadata\n\n# region [markdown] key=\"value\"\n# This is a markdown cell with cell metadata `{\"key\": \"value\"}`\n# endregion\n\n# region .class tags=[\"parameters\"]\n\"\"\"This is a code cell with metadata `{\"tags\":[\"parameters\"], \".class\":null}`\"\"\"\n# endregion\n\n# region key=\"value\" active=\"\"\n# This is a raw cell with cell metadata `{\"key\": \"value\"}`\n# endregion\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/Notebook_with_R_magic.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 2\n#     language: python\n#     name: python2\n# ---\n\n# # A notebook with R cells\n#\n# This notebook shows the use of R cells to generate plots\n\n# %load_ext rpy2.ipython\n\n# region language=\"R\"\n# suppressMessages(require(tidyverse))\n# endregion\n\n# region language=\"R\"\n# ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n# endregion\n\n# The default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size\n\n# region magic_args=\"-w 400 -h 240\" language=\"R\"\n# ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n# endregion\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/Notebook_with_more_R_magic_111.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# region\n# %load_ext rpy2.ipython\nimport pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Letter\": [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"],\n        \"X\": [4, 3, 5, 2, 1, 7, 7, 5, 9],\n        \"Y\": [0, 4, 3, 6, 7, 10, 11, 9, 13],\n        \"Z\": [1, 2, 3, 1, 2, 3, 1, 2, 3],\n    }\n)\n# endregion\n\n# region magic_args=\"-i df\" language=\"R\"\n# library(\"ggplot2\")\n# ggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n# endregion\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/The flavors of raw cells.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# region raw_mimetype=\"text/latex\" active=\"\"\n# $1+1$\n# endregion\n\n# region raw_mimetype=\"text/restructuredtext\" active=\"\"\n# :math:`1+1`\n# endregion\n\n# region raw_mimetype=\"text/html\" active=\"\"\n# <b>Bold text<b>\n# endregion\n\n# region raw_mimetype=\"text/markdown\" active=\"\"\n# **Bold text**\n# endregion\n\n# region raw_mimetype=\"text/x-python\" active=\"\"\n# 1 + 1\n# endregion\n\n# region active=\"\"\n# Not formatted\n# endregion\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/cat_variable.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\ncat = 42\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/convert_to_py_then_test_with_update83.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# region\n# %%time\n\nprint('asdf')\n# endregion\n\n# Thanks for jupytext!\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/frozen_cell.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This is an unfrozen cell. Works as usual.\nprint(\"I'm a regular cell so I run and print!\")\n\n# region deletable=false editable=false run_control={\"frozen\": true}\n# # This is an frozen cell\n# print(\"I'm frozen so Im not executed :(\")\n# endregion\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/jupyter.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# # Jupyter notebook\n#\n# This notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n\na = 1\nb = 2\na + b\n\n# Now we return a few tuples\n\na, b\n\na, b, a+b\n\n# And this is already the end of the notebook\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/jupyter_again.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n\n# ?next\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/jupyter_with_raw_cell_in_body.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n1+2+3\n\n# region active=\"\"\n# This is a raw cell\n# endregion\n\n# This is a markdown cell\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/jupyter_with_raw_cell_on_top.py",
    "content": "# ---\n# title: Quick test\n# output:\n#   ioslides_presentation:\n#     widescreen: true\n#     smaller: true\n# editor_options:\n#   chunk_output_type: console\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n1+2+3\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/jupyter_with_raw_cell_with_invalid_yaml.py",
    "content": "# ---\n# title: Exception: Test\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n1 + 2 + 3\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/jupyterlab-slideshow_1441.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n# region [markdown] @deathbeds/jupyterlab-fonts={\"styles\": {\"\": {\"body[data-jp-deck-mode='presenting'] &\": {\"right\": \"0\", \"top\": \"30%\", \"width\": \"25%\", \"z-index\": 1}}}} jupyterlab-slideshow={\"layer\": \"slide\"}\n# > **Note**\n# > \n# > `slide` layer with a `top` of `30%`\n# endregion\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/notebook_with_complex_metadata.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/nteract_with_parameter.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernel_info:\n#     name: python3\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# region inputHidden=false outputHidden=false tags=[\"parameters\"]\nparam = 4\n# endregion\n\n# region inputHidden=false outputHidden=false\nimport pandas as pd\n# endregion\n\n# region inputHidden=false outputHidden=false\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n# endregion\n\n# region inputHidden=false outputHidden=false\n# %matplotlib inline\ndf.plot(kind='bar')\n# endregion\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/plotly_graphs.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This notebook contains complex outputs, including plotly javascript graphs.\n\n# # Interactive plots\n\n# We use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/raw_cell_with_complex_yaml_like_content.py",
    "content": "# ---\n#\n# This is a complex paragraph\n# that is split over multiple lines.\n#\n# It also includes blank lines.\n#\n#\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/raw_cell_with_non_dict_yaml_content.py",
    "content": "# ---\n# Content.\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nprint(\"Hello, World!\")\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/sample_rise_notebook_66.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# region [markdown] slideshow={\"slide_type\": \"slide\"}\n# A markdown cell\n# endregion\n\n# region slideshow={\"slide_type\": \"\"}\n1+1\n# endregion\n\n# region [markdown] cell_style=\"center\" slideshow={\"slide_type\": \"fragment\"}\n# Markdown cell two\n# endregion\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_script_vscode_folding_markers/text_outputs_and_images.py",
    "content": "# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: region,endregion\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# This notebook contains outputs of many different types: text, HTML, plots and errors.\n\n# # Text outputs\n#\n# Using `print`, `sys.stdout` and `sys.stderr`\n\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n\n# # HTML outputs\n#\n# Using `pandas`. Here we find two representations: both text and HTML.\n\nimport pandas as pd\npd.DataFrame([4])\n\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n\n# # Images\n\n# %matplotlib inline\n\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n\n# # Errors\n\nundefined_variable\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/Line_breaks_in_LateX_305.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\"\"\"\nThis cell uses no particular cell marker\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n\"\"\"\n\n###############################################################################\n# This cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n#\n# $$\n# \\begin{align}\n# \\dot{x} & = \\sigma(y-x) \\\n# \\dot{y} & = \\rho x - y - xz \\\n# \\dot{z} & = -\\beta z + xy\n# \\end{align}\n# $$\n\n'''\nThis cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n\n$$\n\\begin{align}\n\\dot{x} & = \\sigma(y-x)\\\\\n\\dot{y} & = \\rho x - y - xz \\\\\n\\dot{z} & = -\\beta z + xy\n\\end{align}\n$$\n'''\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/cat_variable.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\ncat = 42\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/convert_to_py_then_test_with_update83.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %%time\n\nprint('asdf')\n\n\"\"\"\nThanks for jupytext!\n\"\"\"\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/jupyter.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\"\"\"\n# Jupyter notebook\n\nThis notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition:\n\"\"\"\n\na = 1\nb = 2\na + b\n\n###############################################################################\n# Now we return a few tuples\n\na, b\n\n\"\"\na, b, a+b\n\n###############################################################################\n# And this is already the end of the notebook\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/jupyter_again.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nc = '''\ntitle: \"Quick test\"\noutput:\n  ioslides_presentation:\n    widescreen: true\n    smaller: true\neditor_options:\n     chunk_output_type console\n'''\n\n\"\"\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n\n\"\"\n# ?next\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/jupyterlab-slideshow_1441.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3 (ipykernel)\n#     language: python\n#     name: python3\n# ---\n\n\"\"\"\n> **Note**\n> \n> `slide` layer with a `top` of `30%`\n\"\"\"\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/notebook_with_complex_metadata.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/nteract_with_parameter.py",
    "content": "# ---\n# jupyter:\n#   kernel_info:\n#     name: python3\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nparam = 4\n\n\"\"\nimport pandas as pd\n\n\"\"\ndf = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n\n\"\"\n# %matplotlib inline\ndf.plot(kind='bar')\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/plotly_graphs.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\"\"\"\nThis notebook contains complex outputs, including plotly javascript graphs.\n\"\"\"\n\n###############################################################################\n# # Interactive plots\n\n###############################################################################\n# We use Plotly's connected mode to make the notebook lighter - when connected, the notebook downloads the `plotly.js` library from the web.\n\nimport plotly.offline as offline\noffline.init_notebook_mode(connected=True)\n\n\"\"\nimport plotly.graph_objects as go\nfig = go.Figure(\n    data=[go.Bar(y=[2, 3, 1])],\n    layout=go.Layout(title=\"bar plot\"))\nfig.show()\nfig.data[0].marker = dict(color='purple')\nfig\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/sample_rise_notebook_66.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\"\"\"\nA markdown cell\n\"\"\"\n\n1+1\n\n###############################################################################\n# Markdown cell two\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_sphinx/text_outputs_and_images.py",
    "content": "# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n\"\"\"\nThis notebook contains outputs of many different types: text, HTML, plots and errors.\n\"\"\"\n\n###############################################################################\n# # Text outputs\n#\n# Using `print`, `sys.stdout` and `sys.stderr`\n\nimport sys\nprint('using print')\nsys.stdout.write('using sys.stdout.write')\nsys.stderr.write('using sys.stderr.write')\n\n\"\"\nimport logging\nlogging.debug('Debug')\nlogging.info('Info')\nlogging.warning('Warning')\nlogging.error('Error')\n\n###############################################################################\n# # HTML outputs\n#\n# Using `pandas`. Here we find two representations: both text and HTML.\n\nimport pandas as pd\npd.DataFrame([4])\n\n\"\"\nfrom IPython.display import display\ndisplay(pd.DataFrame([5]))\ndisplay(pd.DataFrame([6]))\n\n###############################################################################\n# # Images\n\n# %matplotlib inline\n\n\"\"\n# First plot\nfrom matplotlib import pyplot as plt\nimport numpy as np\nw, h = 3, 3\ndata = np.zeros((h, w, 3), dtype=np.uint8)\ndata[0,:] = [0,255,0]\ndata[1,:] = [0,0,255]\ndata[2,:] = [0,255,0]\ndata[1:3,1:3] = [255, 0, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n# Second plot\ndata[1:3,1:3] = [255, 255, 0]\nplt.imshow(data)\nplt.axis('off')\nplt.show()\n\n###############################################################################\n# # Errors\n\nundefined_variable\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_spin/R notebook with invalid cell keys.R",
    "content": "#' ---\n#' jupyter:\n#'   kernelspec:\n#'     display_name: R\n#'     language: R\n#'     name: ir\n#' ---\n\n#' This notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_spin/R notebook with invalid cell keys.low.r",
    "content": "#' ---\n#' jupyter:\n#'   kernelspec:\n#'     display_name: R\n#'     language: R\n#'     name: ir\n#' ---\n\n#' This notebook was created with IRKernel 0.8.12, and is not completely valid, as the code cell below contains an unexpected 'source' entry. This did cause https://github.com/mwouts/jupytext/issues/234. Note that the problem is solved when one upgrades to IRKernel 1.0.0.\n\nlibrary(\"ggplot2\")\nggplot(mtcars, aes(mpg)) + stat_ecdf()\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_spin/ir_notebook.R",
    "content": "#' ---\n#' jupyter:\n#'   kernelspec:\n#'     display_name: R\n#'     language: R\n#'     name: ir\n#' ---\n\n#' This is a jupyter notebook that uses the IR kernel.\n\nsum(1:10)\n\nplot(cars)\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/ipynb_to_spin/ir_notebook.low.r",
    "content": "#' ---\n#' jupyter:\n#'   kernelspec:\n#'     display_name: R\n#'     language: R\n#'     name: ir\n#' ---\n\n#' This is a jupyter notebook that uses the IR kernel.\n\nsum(1:10)\n\nplot(cars)\n\n\n"
  },
  {
    "path": "tests/data/notebooks/outputs/md_to_ipynb/jupytext_markdown.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Markdown, code and raw cells\\n\",\n    \"\\n\",\n    \"## Markdown cells\\n\",\n    \"\\n\",\n    \"This is a Markdown cell. Markdown cells end with either a code cell, or two consecutive blank lines in the text.\\n\",\n    \"\\n\",\n    \"If you prefer that Markdown headings define new cells, have a look at the `split_at_heading` option.\\n\",\n    \"\\n\",\n    \"Indented code is accepted, and consecutive blank lines there do not break Markdown cells:\\n\",\n    \"\\n\",\n    \"    def f(x):\\n\",\n    \"        return 1\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"    def h(x):\\n\",\n    \"        return f(x)+2\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"## Code cells\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"\\\"\\\"\\\"This code cell starts with ` ```python`\\\"\\\"\\\"\\n\",\n    \"1 + 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"lines_to_next_cell\": 0\n   },\n   \"source\": [\n    \"## Raw cells\\n\",\n    \"\\n\",\n    \"Raw cells are delimited with `<!-- #raw -->` and <!-- #endraw -->, like here:\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"this is a raw cell\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Protected Markdown cells\\n\",\n    \"\\n\",\n    \"If you want to include code blocks (or two consecutive blank lines) in a Markdown cell, use explicit Markdown cell delimiters `<!-- #region -->` and `<!-- #endregion -->`.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This Markdown cell has two consecutive blank lines\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"And then a code block which is not a Jupyter code cell:\\n\",\n    \"```python\\n\",\n    \"2 + 2\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Metadata\\n\",\n    \"\\n\",\n    \"Metadata are supported for all cell types.\\n\",\n    \"\\n\",\n    \"## Markdown cells\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"key\": \"value\",\n    \"title\": \"Region title\"\n   },\n   \"source\": [\n    \"A cell with a title and additional metadata.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Code cells\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"parameters\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"a = 2\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/md_to_ipynb/plain_markdown.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"title: A sample document\\n\",\n    \"---\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This document is a plain Markdown document that was not created from a notebook.\\n\",\n    \"We use this document to test that inputing a Markdown file into Jupytext, and then converting the\\n\",\n    \"resulting notebook to a Markdown file using nbconvert, is the identity\\n\",\n    \"\\n\",\n    \"Another paragraph\\n\",\n    \"\\n\",\n    \"# A header\\n\",\n    \"\\n\",\n    \"Indented code\\n\",\n    \"\\n\",\n    \"    def f(x):\\n\",\n    \"        return 1\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"    def h(x):\\n\",\n    \"        return f(x)+2\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"A Python code snippet\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"\\\"\\\"\\\"This code cell starts with ` ```python`\\\"\\\"\\\"\\n\",\n    \"1 + 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Code snippet without an explicit language\\n\",\n    \"```\\n\",\n    \"echo 'Hello world'\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"Markdown comments\\n\",\n    \"<!-- #comment -->\\n\",\n    \"\\n\",\n    \"VS Code region markers\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This Markdown cell has two consecutive blank lines\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"And continues here\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"-all\",\n   \"main_language\": \"python\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/myst_to_ipynb/fenced_code_vs_code_cells.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"cell-1\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Fenced code\\n\",\n    \"\\n\",\n    \"## No language\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"# a generic code instruction\\n\",\n    \"1 + 1\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"## Python\\n\",\n    \"\\n\",\n    \"```python\\n\",\n    \"1 + 1\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"## Bash\\n\",\n    \"\\n\",\n    \"```python\\n\",\n    \"echo Hi\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"# Code cells\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"cell-2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# This code gets executed in notebooks\\n\",\n    \"1 + 1\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"default_lexer\": \"ipython3\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/myst_to_ipynb/reference_link.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"cell-1\",\n   \"metadata\": {},\n   \"source\": [\n    \"This documents contains a code cell to make sure it is recognized as a MyST document.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"cell-2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"1 + 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"cell-3\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is a [reference-link to the issue][].\\n\",\n    \"\\n\",\n    \":::{note}\\n\",\n    \"This note is key... not sure why.\\n\",\n    \":::\\n\",\n    \"\\n\",\n    \"[reference-link to the issue]: <https://github.com/mwouts/jupytext/issues/789>\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"default_lexer\": \"ipython3\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/script_to_ipynb/basic_marimo_example.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"Hbol\",\n   \"metadata\": {\n    \"marimo\": {\n     \"config\": {\n      \"hide_code\": true\n     }\n    }\n   },\n   \"source\": [\n    \"This is a simple marimo notebook\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"MJUe\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"x = 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"vblA\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"y = x+1\\n\",\n    \"y\"\n   ]\n  }\n ],\n \"metadata\": {},\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/script_to_ipynb/build.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This file originates from\\n\",\n    \"https://github.com/MicrosoftDocs/PowerShell-Docs/blob/staging/build.ps1\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"param(\\n\",\n    \"    [switch]$SkipCabs,\\n\",\n    \"    [switch]$ShowProgress\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Turning off the progress display, by default\\n\",\n    \"$global:ProgressPreference = 'SilentlyContinue'\\n\",\n    \"if ($ShowProgress) { $ProgressPreference = 'Continue' }\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12\\n\",\n    \"$tempDir = [System.IO.Path]::GetTempPath()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Pandoc source URL\\n\",\n    \"$panDocVersion = \\\"2.7.3\\\"\\n\",\n    \"$pandocSourceURL = \\\"https://github.com/jgm/pandoc/releases/download/$panDocVersion/pandoc-$panDocVersion-windows-x86_64.zip\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"$pandocDestinationPath = New-Item (Join-Path $tempDir \\\"pandoc\\\") -ItemType Directory -Force\\n\",\n    \"$pandocZipPath = Join-Path $pandocDestinationPath \\\"pandoc-$panDocVersion-windows-x86_64.zip\\\"\\n\",\n    \"Invoke-WebRequest -Uri $pandocSourceURL -OutFile $pandocZipPath\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"Expand-Archive -Path $pandocZipPath -DestinationPath $pandocDestinationPath -Force\\n\",\n    \"$pandocExePath = Join-Path (Join-Path $pandocDestinationPath \\\"pandoc-$panDocVersion-windows-x86_64\\\") \\\"pandoc.exe\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Install ThreadJob if not available\\n\",\n    \"$threadJob = Get-Module ThreadJob -ListAvailable\\n\",\n    \"if ($null -eq $threadjob) {\\n\",\n    \"    Install-Module ThreadJob -RequiredVersion 1.1.2 -Scope CurrentUser -Force\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Find the reference folder path w.r.t the script\\n\",\n    \"$ReferenceDocset = Join-Path $PSScriptRoot 'reference'\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Go through all the directories in the reference folder\\n\",\n    \"$jobs = [System.Collections.Generic.List[object]]::new()\\n\",\n    \"$excludeList = 'module', 'media', 'docs-conceptual', 'mapping', 'bread', '7'\\n\",\n    \"Get-ChildItem $ReferenceDocset -Directory -Exclude $excludeList | ForEach-Object -Process {\\n\",\n    \"    $job = Start-ThreadJob -Name $_.Name -ArgumentList @($SkipCabs,$pandocExePath,$PSScriptRoot,$_) -ScriptBlock {\\n\",\n    \"        param($SkipCabs, $pandocExePath, $WorkingDirectory, $DocSet)\\n\",\n    \"\\n\",\n    \"        $tempDir = [System.IO.Path]::GetTempPath()\\n\",\n    \"        $workingDir = Join-Path $tempDir $DocSet.Name\\n\",\n    \"        $workingDir = New-Item -ItemType Directory -Path $workingDir -Force\\n\",\n    \"        Set-Location $WorkingDir\\n\",\n    \"\\n\",\n    \"        function Get-ContentWithoutHeader {\\n\",\n    \"            param(\\n\",\n    \"                $path\\n\",\n    \"            )\\n\",\n    \"\\n\",\n    \"            $doc = Get-Content $path -Encoding UTF8\\n\",\n    \"            $start = $end = -1\\n\",\n    \"\\n\",\n    \"            # search the first 30 lines for the Yaml header\\n\",\n    \"            # no yaml header in our docset will ever be that long\\n\",\n    \"\\n\",\n    \"            for ($x = 0; $x -lt 30; $x++) {\\n\",\n    \"                if ($doc[$x] -eq '---') {\\n\",\n    \"                    if ($start -eq -1) {\\n\",\n    \"                        $start = $x\\n\",\n    \"                    }\\n\",\n    \"                    else {\\n\",\n    \"                        if ($end -eq -1) {\\n\",\n    \"                            $end = $x + 1\\n\",\n    \"                            break\\n\",\n    \"                        }\\n\",\n    \"                    }\\n\",\n    \"                }\\n\",\n    \"            }\\n\",\n    \"            if ($end -gt $start) {\\n\",\n    \"                Write-Output ($doc[$end..$($doc.count)] -join \\\"`r`n\\\")\\n\",\n    \"            }\\n\",\n    \"            else {\\n\",\n    \"                Write-Output ($doc -join \\\"`r`n\\\")\\n\",\n    \"            }\\n\",\n    \"        }\\n\",\n    \"\\n\",\n    \"        $Version = $DocSet.Name\\n\",\n    \"        Write-Verbose -Verbose \\\"Version = $Version\\\"\\n\",\n    \"\\n\",\n    \"        $VersionFolder = $DocSet.FullName\\n\",\n    \"        Write-Verbose -Verbose \\\"VersionFolder = $VersionFolder\\\"\\n\",\n    \"\\n\",\n    \"        # For each of the directories, go through each module folder\\n\",\n    \"        Get-ChildItem $VersionFolder -Directory | ForEach-Object -Process {\\n\",\n    \"            $ModuleName = $_.Name\\n\",\n    \"            Write-Verbose -Verbose \\\"ModuleName = $ModuleName\\\"\\n\",\n    \"\\n\",\n    \"            $ModulePath = Join-Path $VersionFolder $ModuleName\\n\",\n    \"            Write-Verbose -Verbose \\\"ModulePath = $ModulePath\\\"\\n\",\n    \"\\n\",\n    \"            $LandingPage = Join-Path $ModulePath \\\"$ModuleName.md\\\"\\n\",\n    \"            Write-Verbose -Verbose \\\"LandingPage = $LandingPage\\\"\\n\",\n    \"\\n\",\n    \"            $MamlOutputFolder = Join-Path \\\"$WorkingDirectory\\\\maml\\\" \\\"$Version\\\\$ModuleName\\\"\\n\",\n    \"            Write-Verbose -Verbose \\\"MamlOutputFolder = $MamlOutputFolder\\\"\\n\",\n    \"\\n\",\n    \"            $CabOutputFolder = Join-Path \\\"$WorkingDirectory\\\\updatablehelp\\\" \\\"$Version\\\\$ModuleName\\\"\\n\",\n    \"            Write-Verbose -Verbose \\\"CabOutputFolder = $CabOutputFolder\\\"\\n\",\n    \"\\n\",\n    \"            if (-not (Test-Path $MamlOutputFolder)) {\\n\",\n    \"                New-Item $MamlOutputFolder -ItemType Directory -Force > $null\\n\",\n    \"            }\\n\",\n    \"\\n\",\n    \"            # Process the about topics if any\\n\",\n    \"            $AboutFolder = Join-Path $ModulePath \\\"About\\\"\\n\",\n    \"\\n\",\n    \"            if (Test-Path $AboutFolder) {\\n\",\n    \"                Write-Verbose -Verbose \\\"AboutFolder = $AboutFolder\\\"\\n\",\n    \"                Get-ChildItem \\\"$aboutfolder/about_*.md\\\" | ForEach-Object {\\n\",\n    \"                    $aboutFileFullName = $_.FullName\\n\",\n    \"                    $aboutFileOutputName = \\\"$($_.BaseName).help.txt\\\"\\n\",\n    \"                    $aboutFileOutputFullName = Join-Path $MamlOutputFolder $aboutFileOutputName\\n\",\n    \"\\n\",\n    \"                    $pandocArgs = @(\\n\",\n    \"                        \\\"--from=gfm\\\",\\n\",\n    \"                        \\\"--to=plain+multiline_tables\\\",\\n\",\n    \"                        \\\"--columns=75\\\",\\n\",\n    \"                        \\\"--output=$aboutFileOutputFullName\\\",\\n\",\n    \"                        \\\"--quiet\\\"\\n\",\n    \"                    )\\n\",\n    \"\\n\",\n    \"                    Get-ContentWithoutHeader $aboutFileFullName | & $pandocExePath $pandocArgs\\n\",\n    \"                }\\n\",\n    \"            }\\n\",\n    \"\\n\",\n    \"            try {\\n\",\n    \"                # For each module, create a single maml help file\\n\",\n    \"                # Adding warningaction=stop to throw errors for all warnings, erroraction=stop to make them terminating errors\\n\",\n    \"                New-ExternalHelp -Path $ModulePath -OutputPath $MamlOutputFolder -Force -WarningAction Stop -ErrorAction Stop\\n\",\n    \"\\n\",\n    \"                # For each module, create update-help help files (cab and helpinfo.xml files)\\n\",\n    \"                if (-not $SkipCabs) {\\n\",\n    \"                    $cabInfo = New-ExternalHelpCab -CabFilesFolder $MamlOutputFolder -LandingPagePath $LandingPage -OutputFolder $CabOutputFolder\\n\",\n    \"\\n\",\n    \"                    # Only output the cab fileinfo object\\n\",\n    \"                    if ($cabInfo.Count -eq 8) { $cabInfo[-1].FullName }\\n\",\n    \"                }\\n\",\n    \"            }\\n\",\n    \"            catch {\\n\",\n    \"                Write-Error -Message \\\"PlatyPS failure: $ModuleName -- $Version\\\" -Exception $_\\n\",\n    \"            }\\n\",\n    \"        }\\n\",\n    \"\\n\",\n    \"        Remove-Item $workingDir -Force -ErrorAction SilentlyContinue\\n\",\n    \"    }\\n\",\n    \"    Write-Verbose -Verbose \\\"Started job for $($_.Name)\\\"\\n\",\n    \"    $jobs += $job\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"$null = $jobs | Wait-Job\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Variable to collect any errors in during processing\\n\",\n    \"$allErrors = [System.Collections.Generic.List[string]]::new()\\n\",\n    \"foreach ($job in $jobs) {\\n\",\n    \"    Write-Verbose -Verbose \\\"$($job.Name) output:\\\"\\n\",\n    \"    if ($job.Verbose.Count -gt 0) {\\n\",\n    \"        foreach ($verboseMessage in $job.Verbose) {\\n\",\n    \"            Write-Verbose -Verbose $verboseMessage\\n\",\n    \"        }\\n\",\n    \"    }\\n\",\n    \"\\n\",\n    \"    if ($job.State -eq \\\"Failed\\\") {\\n\",\n    \"        $allErrors += \\\"$($job.Name) failed due to unhandled exception\\\"\\n\",\n    \"    }\\n\",\n    \"\\n\",\n    \"    if ($job.Error.Count -gt 0) {\\n\",\n    \"        $allErrors += \\\"$($job.Name) failed with errors:\\\"\\n\",\n    \"        $allErrors += $job.Error.ReadAll()\\n\",\n    \"    }\\n\",\n    \"}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# If the above block, produced any errors, throw and fail the job\\n\",\n    \"if ($allErrors.Count -gt 0) {\\n\",\n    \"    $allErrors\\n\",\n    \"    throw \\\"There are errors during platyPS run!`nPlease fix your markdown to comply with the schema: https://github.com/PowerShell/platyPS/blob/master/platyPS.schema.md\\\"\\n\",\n    \"}\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"-all\",\n   \"main_language\": \"powershell\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/script_to_ipynb/hydrogen.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import pandas as pd\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"title\": \"Display a data frame\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]},\\n\",\n    \"                  index=pd.Index(['x0', 'x1'], name='x'))\\n\",\n    \"df\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"parameters\"\n    ],\n    \"title\": \"Pandas plot\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"df.plot(kind='bar')\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"title,tags,-all\",\n   \"cell_metadata_json\": true,\n   \"main_language\": \"python\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/script_to_ipynb/hydrogen_latex_html_R_magics.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"1 + 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import pandas as pd\\n\",\n    \"pd.Series({'A':5, 'B':2}).plot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%matplotlib inline\\n\",\n    \"pd.Series({'A':5, 'B':2}).plot(figsize=(3,2))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%html\\n\",\n    \"<p><a href=\\\"https://github.com/mwouts/jupytext\\\", style=\\\"color: rgb(0,0,255)\\\">Jupytext</a> on GitHub</p>\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%load_ext rpy2.ipython\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%R -w 400 -h 200\\n\",\n    \"library(ggplot2)\\n\",\n    \"ggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%%latex\\n\",\n    \"$\\\\frac{\\\\pi}{2}$\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"-all\",\n   \"main_language\": \"python\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/script_to_ipynb/julia_sample_script.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"From https://juliabyexample.helpmanual.io/\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# function to calculate the volume of a sphere\\n\",\n    \"function sphere_vol(r)\\n\",\n    \"    # julia allows Unicode names (in UTF-8 encoding)\\n\",\n    \"    # so either \\\"pi\\\" or the symbol π can be used\\n\",\n    \"    return 4/3*pi*r^3\\n\",\n    \"end\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# functions can also be defined more succinctly\\n\",\n    \"quadratic(a, sqr_term, b) = (-b + sqr_term) / 2a\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# calculates x for 0 = a*x^2+b*x+c, arguments types can be defined in function definitions\\n\",\n    \"function quadratic2(a::Float64, b::Float64, c::Float64)\\n\",\n    \"    # unlike other languages 2a is equivalent to 2*a\\n\",\n    \"    # a^2 is used instead of a**2 or pow(a,2)\\n\",\n    \"    sqr_term = sqrt(b^2-4a*c)\\n\",\n    \"    r1 = quadratic(a, sqr_term, b)\\n\",\n    \"    r2 = quadratic(a, -sqr_term, b)\\n\",\n    \"    # multiple values can be returned from a function using tuples\\n\",\n    \"    # if the return keyword is omitted, the last term is returned\\n\",\n    \"    r1, r2\\n\",\n    \"end\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"vol = sphere_vol(3)\\n\",\n    \"# @printf allows number formatting but does not automatically append the \\\\n to statements, see below\\n\",\n    \"@printf \\\"volume = %0.3f\\\\n\\\" vol\\n\",\n    \"#> volume = 113.097\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"quad1, quad2 = quadratic2(2.0, -2.0, -12.0)\\n\",\n    \"println(\\\"result 1: \\\", quad1)\\n\",\n    \"#> result 1: 3.0\\n\",\n    \"println(\\\"result 2: \\\", quad2)\\n\",\n    \"#> result 2: -2.0\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"-all\",\n   \"encoding\": \"# -*- coding: utf-8 -*-\",\n   \"main_language\": \"julia\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}"
  },
  {
    "path": "tests/data/notebooks/outputs/script_to_ipynb/knitr-spin.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"The below derives from\\n\",\n    \"https://github.com/yihui/knitr/blob/master/inst/examples/knitr-spin.R\\n\",\n    \"\\n\",\n    \"This is a special R script which can be used to generate a report. You can\\n\",\n    \"write normal text in roxygen comments.\\n\",\n    \"\\n\",\n    \"First we set up some options (you do not have to do this):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"hide_input\": true,\n    \"hide_output\": true,\n    \"name\": \"setup\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"library(knitr)\\n\",\n    \"opts_chunk$set(fig.path = 'figure/silk-')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"The report begins here.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"cache\": false,\n    \"name\": \"test-a\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# boring examples as usual\\n\",\n    \"set.seed(123)\\n\",\n    \"x = rnorm(5)\\n\",\n    \"mean(x)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"lines_to_next_cell\": 0\n   },\n   \"source\": [\n    \"You can not use here the special syntax {{code}} to embed inline expressions, e.g.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"lines_to_next_cell\": 0\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"{{mean(x) + 2}}\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"is the mean of x plus 2.\\n\",\n    \"The code itself may contain braces, but these are not checked.  Thus,\\n\",\n    \"perfectly valid (though very strange) R code such as `{{2 + 3}} - {{4 - 5}}`\\n\",\n    \"can lead to errors because `2 + 3}} - {{4 - 5` will be treated as inline code.\\n\",\n    \"\\n\",\n    \"Now we continue writing the report. We can draw plots as well.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"fig.height\": 5,\n    \"fig.width\": 5,\n    \"name\": \"test-b\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"par(mar = c(4, 4, .1, .1)); plot(x)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Actually you do not have to write chunk options, in which case knitr will use\\n\",\n    \"default options. For example, the code below has no options attached:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"var(x)\\n\",\n    \"quantile(x)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"And you can also write two chunks successively like this:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"lines_to_next_cell\": 0,\n    \"name\": \"test-chisq5\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"sum(x^2) # chi-square distribution with df 5\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"name\": \"test-chisq4\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"sum((x - mean(x))^2) # df is 4 now\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Done. Call spin('knitr-spin.R') to make silk from sow's ear now and knit a\\n\",\n    \"lovely purse.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# /* you can write comments between /* and */ like C comments (the preceding #\\n\",\n    \"# is optional)\\n\",\n    \"Sys.sleep(60)\\n\",\n    \"# */\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# /* there is no inline comment; you have to write block comments */\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"name,hide_input,fig.width,fig.height,cache,hide_output,-all\",\n   \"main_language\": \"R\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/script_to_ipynb/light_sample.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Sample notebook\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"a = 1\\n\",\n    \"b = 2\\n\",\n    \"a + b\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"formats\": \"ipynb,py:light\",\n   \"main_language\": \"python\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}"
  },
  {
    "path": "tests/data/notebooks/outputs/script_to_ipynb/python_notebook_sample.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Specifications for Jupyter notebooks as python scripts\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Markdown cells\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Markdown cells are escaped with a single quote. Two consecutive\\n\",\n    \"cells are separated with a blank line.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Code cells\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Python code and adjacent comments are mapped to cell codes.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# For instance, this is a code cell that starts with a\\n\",\n    \"# code comment, where we define a variable\\n\",\n    \"a = 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# A cell with another variable\\n\",\n    \"b = 2\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# In this cell we define a function\\n\",\n    \"def f(x):\\n\",\n    \"    return x + 1\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Now simple function calls\\n\",\n    \"c = f(b)\\n\",\n    \"a * b + c\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Line breaks in code cells are supported but then the cell need to have\\n\",\n    \"metadata and an end-of-cell marker. Metadata information in json format,\\n\",\n    \"escaped with '#+' or '# +'\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def g(x):\\n\",\n    \"    return x + 2\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"d = 4\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# One more cell\\n\",\n    \"a * b + g(c) + d\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Raw cells, and cells active in py or ipynb only\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Raw cells are commented code cells with metadata \\\"active\\\": \\\"\\\".\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is a raw cell\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Actually, using the \\\"active\\\" key you can have cells active in Jupyter\\n\",\n    \"and inactive in python scripts\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {\n    \"active\": \"py\"\n   },\n   \"source\": [\n    \"1 + 1  # done only in py script, inactive (raw) in ipynb\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"active\": \"ipynb\"\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"2 + 2 # active in ipynb only\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"active,-all\",\n   \"cell_metadata_json\": true,\n   \"main_language\": \"python\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/script_to_ipynb/simple_r_script.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is a comment\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"cars\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plot(cars)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"-all\",\n   \"main_language\": \"R\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}"
  },
  {
    "path": "tests/data/notebooks/outputs/sphinx-rst2md_to_ipynb/plot_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%matplotlib inline\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"\\\"\\\"\\\"\"\n   },\n   \"source\": [\n    \"# Notebook styled examples\\n\",\n    \"\\n\",\n    \"The gallery is capable of transforming Python files into reStructuredText files\\n\",\n    \"with a notebook structure. For this to be used you need to respect some syntax\\n\",\n    \"rules.\\n\",\n    \"\\n\",\n    \"It makes a lot of sense to contrast this output rst file with the\\n\",\n    \":download:`original Python script <plot_notebook.py>` to get better feeling of\\n\",\n    \"the necessary file structure.\\n\",\n    \"\\n\",\n    \"Anything before the Python script docstring is ignored by sphinx-gallery and\\n\",\n    \"will not appear in the rst file, nor will it be executed.\\n\",\n    \"This Python docstring requires an reStructuredText title to name the file and\\n\",\n    \"correctly build the reference links.\\n\",\n    \"\\n\",\n    \"Once you close the docstring you would be writing Python code. This code gets\\n\",\n    \"executed by sphinx gallery shows the plots and attaches the generating code.\\n\",\n    \"Nevertheless you can break your code into blocks and give the rendered file\\n\",\n    \"a notebook style. In this case you have to include a code comment breaker\\n\",\n    \"a line of at least 20 hashes and then every comment start with the a new hash.\\n\",\n    \"\\n\",\n    \"As in this example we start by first writing this module\\n\",\n    \"style docstring, then for the first code block we write the example file author\\n\",\n    \"and script license continued by the import modules instructions.\\n\",\n    \"\\n\",\n    \"Original script from:\\n\",\n    \"https://sphinx-gallery.readthedocs.io/en/latest/tutorials/plot_notebook.html\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Code source: Óscar Nájera\\n\",\n    \"# License: BSD 3 clause\\n\",\n    \"\\n\",\n    \"import numpy as np\\n\",\n    \"import matplotlib.pyplot as plt\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"##############################################################################\"\n   },\n   \"source\": [\n    \"This code block is executed, although it produces no output. Lines starting\\n\",\n    \"with a simple hash are code comment and get treated as part of the code\\n\",\n    \"block. To include this new comment string we started the new block with a\\n\",\n    \"long line of hashes.\\n\",\n    \"\\n\",\n    \"The sphinx-gallery parser will assume everything after this splitter and that\\n\",\n    \"continues to start with a **comment hash and space** (respecting code style)\\n\",\n    \"is text that has to be rendered in\\n\",\n    \"html format. Keep in mind to always keep your comments always together by\\n\",\n    \"comment hashes. That means to break a paragraph you still need to comment\\n\",\n    \"that line break.\\n\",\n    \"\\n\",\n    \"In this example the next block of code produces some plotable data. Code is\\n\",\n    \"executed, figure is saved and then code is presented next, followed by the\\n\",\n    \"inlined figure.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"x = np.linspace(-np.pi, np.pi, 300)\\n\",\n    \"xx, yy = np.meshgrid(x, x)\\n\",\n    \"z = np.cos(xx) + np.cos(yy)\\n\",\n    \"\\n\",\n    \"plt.figure()\\n\",\n    \"plt.imshow(z)\\n\",\n    \"plt.colorbar()\\n\",\n    \"plt.xlabel('$x$')\\n\",\n    \"plt.ylabel('$y$')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"###########################################################################\"\n   },\n   \"source\": [\n    \"Again it is possible to continue the discussion with a new Python string. This\\n\",\n    \"time to introduce the next code block generates 2 separate figures.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plt.figure()\\n\",\n    \"plt.imshow(z, cmap=plt.cm.get_cmap('hot'))\\n\",\n    \"plt.figure()\\n\",\n    \"plt.imshow(z, cmap=plt.cm.get_cmap('Spectral'), interpolation='none')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"##########################################################################\"\n   },\n   \"source\": [\n    \"There's some subtle differences between rendered html rendered comment\\n\",\n    \"strings and code comment strings which I'll demonstrate below. (Some of this\\n\",\n    \"only makes sense if you look at the\\n\",\n    \":download:`raw Python script <plot_notebook.py>`)\\n\",\n    \"\\n\",\n    \"Comments in comment blocks remain nested in the text.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"\\n\",\n    \"def dummy():\\n\",\n    \"    \\\"\\\"\\\"Dummy function to make sure docstrings don't get rendered as text\\\"\\\"\\\"\\n\",\n    \"    pass\\n\",\n    \"\\n\",\n    \"# Code comments not preceded by the hash splitter are left in code blocks.\\n\",\n    \"\\n\",\n    \"string = \\\"\\\"\\\"\\n\",\n    \"Triple-quoted string which tries to break parser but doesn't.\\n\",\n    \"\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"############################################################################\"\n   },\n   \"source\": [\n    \"Output of the script is captured:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"print('Some output from Python')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"############################################################################\"\n   },\n   \"source\": [\n    \"Finally, I'll call ``show`` at the end just so someone running the Python\\n\",\n    \"code directly will see the plots; this is not necessary for creating the docs\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plt.show()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"############################################################################\"\n   },\n   \"source\": [\n    \"You can also include $math$ inline, or as separate equations:\\n\",\n    \"\\n\",\n    \"\\\\begin{align}\\\\exp(j\\\\pi) = -1\\\\end{align}\\n\",\n    \"\\n\",\n    \"You can also insert images:\\n\",\n    \"\\n\",\n    \"<img src=\\\"http://www.sphinx-doc.org/en/stable/_static/sphinxheader.png\\\" alt=\\\"Sphinx header\\\">\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"-all\",\n   \"encoding\": \"# -*- coding: utf-8 -*-\",\n   \"main_language\": \"python\",\n   \"notebook_metadata_filter\": \"-all\",\n   \"rst2md\": false\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/data/notebooks/outputs/sphinx_to_ipynb/plot_notebook.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%matplotlib inline\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"\\\"\\\"\\\"\"\n   },\n   \"source\": [\n    \"Notebook styled examples\\n\",\n    \"========================\\n\",\n    \"\\n\",\n    \"The gallery is capable of transforming Python files into reStructuredText files\\n\",\n    \"with a notebook structure. For this to be used you need to respect some syntax\\n\",\n    \"rules.\\n\",\n    \"\\n\",\n    \"It makes a lot of sense to contrast this output rst file with the\\n\",\n    \":download:`original Python script <plot_notebook.py>` to get better feeling of\\n\",\n    \"the necessary file structure.\\n\",\n    \"\\n\",\n    \"Anything before the Python script docstring is ignored by sphinx-gallery and\\n\",\n    \"will not appear in the rst file, nor will it be executed.\\n\",\n    \"This Python docstring requires an reStructuredText title to name the file and\\n\",\n    \"correctly build the reference links.\\n\",\n    \"\\n\",\n    \"Once you close the docstring you would be writing Python code. This code gets\\n\",\n    \"executed by sphinx gallery shows the plots and attaches the generating code.\\n\",\n    \"Nevertheless you can break your code into blocks and give the rendered file\\n\",\n    \"a notebook style. In this case you have to include a code comment breaker\\n\",\n    \"a line of at least 20 hashes and then every comment start with the a new hash.\\n\",\n    \"\\n\",\n    \"As in this example we start by first writing this module\\n\",\n    \"style docstring, then for the first code block we write the example file author\\n\",\n    \"and script license continued by the import modules instructions.\\n\",\n    \"\\n\",\n    \"Original script from:\\n\",\n    \"https://sphinx-gallery.readthedocs.io/en/latest/tutorials/plot_notebook.html\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Code source: Óscar Nájera\\n\",\n    \"# License: BSD 3 clause\\n\",\n    \"\\n\",\n    \"import numpy as np\\n\",\n    \"import matplotlib.pyplot as plt\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"##############################################################################\"\n   },\n   \"source\": [\n    \"This code block is executed, although it produces no output. Lines starting\\n\",\n    \"with a simple hash are code comment and get treated as part of the code\\n\",\n    \"block. To include this new comment string we started the new block with a\\n\",\n    \"long line of hashes.\\n\",\n    \"\\n\",\n    \"The sphinx-gallery parser will assume everything after this splitter and that\\n\",\n    \"continues to start with a **comment hash and space** (respecting code style)\\n\",\n    \"is text that has to be rendered in\\n\",\n    \"html format. Keep in mind to always keep your comments always together by\\n\",\n    \"comment hashes. That means to break a paragraph you still need to comment\\n\",\n    \"that line break.\\n\",\n    \"\\n\",\n    \"In this example the next block of code produces some plotable data. Code is\\n\",\n    \"executed, figure is saved and then code is presented next, followed by the\\n\",\n    \"inlined figure.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"x = np.linspace(-np.pi, np.pi, 300)\\n\",\n    \"xx, yy = np.meshgrid(x, x)\\n\",\n    \"z = np.cos(xx) + np.cos(yy)\\n\",\n    \"\\n\",\n    \"plt.figure()\\n\",\n    \"plt.imshow(z)\\n\",\n    \"plt.colorbar()\\n\",\n    \"plt.xlabel('$x$')\\n\",\n    \"plt.ylabel('$y$')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"###########################################################################\"\n   },\n   \"source\": [\n    \"Again it is possible to continue the discussion with a new Python string. This\\n\",\n    \"time to introduce the next code block generates 2 separate figures.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plt.figure()\\n\",\n    \"plt.imshow(z, cmap=plt.cm.get_cmap('hot'))\\n\",\n    \"plt.figure()\\n\",\n    \"plt.imshow(z, cmap=plt.cm.get_cmap('Spectral'), interpolation='none')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"##########################################################################\"\n   },\n   \"source\": [\n    \"There's some subtle differences between rendered html rendered comment\\n\",\n    \"strings and code comment strings which I'll demonstrate below. (Some of this\\n\",\n    \"only makes sense if you look at the\\n\",\n    \":download:`raw Python script <plot_notebook.py>`)\\n\",\n    \"\\n\",\n    \"Comments in comment blocks remain nested in the text.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"\\n\",\n    \"def dummy():\\n\",\n    \"    \\\"\\\"\\\"Dummy function to make sure docstrings don't get rendered as text\\\"\\\"\\\"\\n\",\n    \"    pass\\n\",\n    \"\\n\",\n    \"# Code comments not preceded by the hash splitter are left in code blocks.\\n\",\n    \"\\n\",\n    \"string = \\\"\\\"\\\"\\n\",\n    \"Triple-quoted string which tries to break parser but doesn't.\\n\",\n    \"\\\"\\\"\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"############################################################################\"\n   },\n   \"source\": [\n    \"Output of the script is captured:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"print('Some output from Python')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"############################################################################\"\n   },\n   \"source\": [\n    \"Finally, I'll call ``show`` at the end just so someone running the Python\\n\",\n    \"code directly will see the plots; this is not necessary for creating the docs\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plt.show()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {\n    \"cell_marker\": \"############################################################################\"\n   },\n   \"source\": [\n    \"You can also include :math:`math` inline, or as separate equations:\\n\",\n    \"\\n\",\n    \".. math::\\n\",\n    \"\\n\",\n    \"   \\\\exp(j\\\\pi) = -1\\n\",\n    \"\\n\",\n    \"You can also insert images:\\n\",\n    \"\\n\",\n    \".. image:: http://www.sphinx-doc.org/en/stable/_static/sphinxheader.png\\n\",\n    \"   :alt: Sphinx header\\n\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"jupytext\": {\n   \"cell_metadata_filter\": \"-all\",\n   \"encoding\": \"# -*- coding: utf-8 -*-\",\n   \"main_language\": \"python\",\n   \"notebook_metadata_filter\": \"-all\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "tests/external/cli/test_black.py",
    "content": "import os\nfrom copy import deepcopy\nfrom shutil import copyfile\n\nimport pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_notebook\n\nfrom jupytext import read, write\nfrom jupytext.cli import jupytext, pipe_notebook, system\nfrom jupytext.combine import black_invariant\nfrom jupytext.compare import compare, compare_cells, compare_notebooks\nfrom jupytext.header import _DEFAULT_NOTEBOOK_METADATA\n\n\n@pytest.mark.requires_black\ndef test_apply_black_on_python_notebooks(tmpdir, cwd_tmpdir, ipynb_py_file):\n    if \"cell metadata\" in ipynb_py_file:\n        pytest.skip()\n    copyfile(ipynb_py_file, \"notebook.ipynb\")\n\n    jupytext(args=[\"notebook.ipynb\", \"--to\", \"py:percent\"])\n    system(\"black\", \"notebook.py\")\n    jupytext(args=[\"notebook.py\", \"--to\", \"ipynb\", \"--update\"])\n\n    nb1 = read(ipynb_py_file)\n    nb2 = read(\"notebook.ipynb\")\n    nb3 = read(\"notebook.py\")\n\n    assert len(nb1.cells) == len(nb2.cells)\n    assert len(nb1.cells) == len(nb3.cells)\n    for c1, c2 in zip(nb1.cells, nb2.cells):\n        # same content (almost)\n        assert black_invariant(c1.source) == black_invariant(c2.source)\n        # python representation is pep8\n        assert \"lines_to_next_cell\" not in c2.metadata\n        # outputs are preserved\n        assert c1.cell_type == c2.cell_type\n        if c1.cell_type == \"code\":\n            compare(c1.outputs, c2.outputs)\n\n    compare(nb1.metadata, nb2.metadata)\n\n\ndef test_black_invariant():\n    text_org = \"\"\"long_string = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\\\n              \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\n\"\"\"\n    text_black = \"\"\"long_string = (\n    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n    \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\n)\n\"\"\"\n    assert black_invariant(text_org) == black_invariant(text_black)\n\n\n@pytest.mark.requires_black\ndef test_pipe_into_black():\n    nb_org = new_notebook(cells=[new_code_cell(\"1        +1\", id=\"cell-id\")])\n    nb_dest = new_notebook(cells=[new_code_cell(\"1 + 1\", id=\"cell-id\")])\n\n    nb_pipe = pipe_notebook(nb_org, \"black\")\n    compare_notebooks(nb_pipe, nb_dest, allow_expected_differences=False, compare_ids=True)\n\n\n@pytest.mark.requires_autopep8\ndef test_pipe_into_autopep8():\n    nb_org = new_notebook(cells=[new_code_cell(\"1        +1\", id=\"cell-id\")])\n    nb_dest = new_notebook(cells=[new_code_cell(\"1 + 1\", id=\"cell-id\")])\n\n    nb_pipe = pipe_notebook(nb_org, \"autopep8 -\")\n    compare_notebooks(nb_pipe, nb_dest, allow_expected_differences=False, compare_ids=True)\n\n\n@pytest.mark.requires_flake8\ndef test_pipe_into_flake8():\n    # Notebook OK\n    nb = new_notebook(cells=[new_code_cell(\"# correct code\\n1 + 1\")])\n    pipe_notebook(nb, \"flake8\", update=False)\n\n    # Notebook not OK\n    nb = new_notebook(cells=[new_code_cell(\"incorrect code\")])\n    with pytest.raises(SystemExit):\n        pipe_notebook(nb, \"flake8\", update=False)\n\n\n@pytest.mark.requires_black\n@pytest.mark.requires_flake8\ndef test_apply_black_through_jupytext(tmpdir, python_notebook):\n    # Load real notebook metadata to get the 'auto' extension in --pipe-fmt to work\n    metadata = python_notebook.metadata\n\n    nb_org = new_notebook(cells=[new_code_cell(\"1        +1\", id=\"cell-id\")], metadata=metadata)\n    nb_black = new_notebook(cells=[new_code_cell(\"1 + 1\", id=\"cell-id\")], metadata=metadata)\n\n    tmp_ipynb = str(tmpdir.mkdir(\"notebook_folder\").join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.mkdir(\"script_folder\").join(\"notebook.py\"))\n\n    # Black in place\n    write(nb_org, tmp_ipynb)\n    jupytext([tmp_ipynb, \"--pipe\", \"black\"])\n    nb_now = read(tmp_ipynb)\n    compare_notebooks(nb_now, nb_black, compare_ids=True)\n\n    # Write to another folder using dots\n    write(nb_org, tmp_ipynb)\n    jupytext([tmp_ipynb, \"--to\", \"../script_folder//py:percent\", \"--pipe\", \"black\"])\n    assert os.path.isfile(tmp_py)\n    nb_now = read(tmp_py)\n    nb_now.metadata = metadata\n    compare_notebooks(nb_now, nb_black)\n    os.remove(tmp_py)\n\n    # Map to another folder based on file name\n    write(nb_org, tmp_ipynb)\n    jupytext(\n        [\n            tmp_ipynb,\n            \"--from\",\n            \"notebook_folder//ipynb\",\n            \"--to\",\n            \"script_folder//py:percent\",\n            \"--pipe\",\n            \"black\",\n            \"--check\",\n            \"flake8\",\n        ]\n    )\n    assert os.path.isfile(tmp_py)\n    nb_now = read(tmp_py)\n    nb_now.metadata = metadata\n    compare_notebooks(nb_now, nb_black)\n\n\n@pytest.mark.requires_black\ndef test_apply_black_and_sync_on_paired_notebook(tmpdir, cwd_tmpdir, python_notebook):\n    # Load real notebook metadata to get the 'auto' extension in --pipe-fmt to work\n    metadata = python_notebook.metadata\n    metadata[\"jupytext\"] = {\"formats\": \"ipynb,py\"}\n    assert \"language_info\" in metadata\n\n    nb_org = new_notebook(cells=[new_code_cell(\"1        +1\", id=\"cell-id\")], metadata=metadata)\n    nb_black = new_notebook(cells=[new_code_cell(\"1 + 1\", id=\"cell-id\")], metadata=metadata)\n\n    # Black in place\n    write(nb_org, \"notebook.ipynb\")\n    jupytext([\"notebook.ipynb\", \"--pipe\", \"black\", \"--sync\"])\n\n    nb_now = read(\"notebook.ipynb\")\n    compare_notebooks(nb_now, nb_black, compare_ids=True)\n    assert \"language_info\" in nb_now.metadata\n\n    nb_now = read(\"notebook.py\")\n    nb_now.metadata[\"jupytext\"].pop(\"text_representation\")\n    nb_black.metadata = {\n        key: nb_black.metadata[key] for key in nb_black.metadata if key in _DEFAULT_NOTEBOOK_METADATA.split(\",\")\n    }\n    compare_notebooks(nb_now, nb_black)\n\n\n@pytest.mark.requires_black\ndef test_apply_black_on_markdown_notebook(tmpdir):\n    text = \"\"\"---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  language_info:\n    codemirror_mode:\n      name: ipython\n      version: 3\n    file_extension: .py\n    mimetype: text/x-python\n    name: python\n    nbconvert_exporter: python\n    pygments_lexer: ipython3\n    version: 3.7.4\n---\n\n```python\n1    +     \\\n2+3\\\n+4\n```\n\"\"\"\n    tmp_md = str(tmpdir.join(\"test.md\"))\n    with open(tmp_md, \"w\") as fp:\n        fp.write(text)\n\n    jupytext([tmp_md, \"--pipe\", \"black\"])\n\n    nb = read(tmp_md)\n    compare_cells(nb.cells, [new_code_cell(\"1 + 2 + 3 + 4\")], compare_ids=False)\n\n\n@pytest.mark.requires_black\ndef test_black_through_tempfile(\n    tmpdir,\n    text=\"\"\"```python\n1 +    2 \\\n+ 3\n```\n\"\"\",\n    black=\"\"\"```python\n1 + 2 + 3\n```\n\"\"\",\n):\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n    with open(tmp_md, \"w\") as fp:\n        fp.write(text)\n    jupytext([tmp_md, \"--pipe\", \"black {}\"])\n    with open(tmp_md) as fp:\n        compare(fp.read(), black)\n\n\n@pytest.mark.requires_black\ndef test_pipe_black_removes_lines_to_next_cell_metadata(\n    tmpdir,\n    cwd_tmpdir,\n    text=\"\"\"# %%\ndef func():\n    return 42\n# %%\nfunc()\"\"\",\n):\n    tmpdir.join(\"notebook.py\").write(text)\n    jupytext([\"--set-formats\", \"ipynb,py:percent\", \"notebook.py\"])\n\n    nb = read(tmpdir.join(\"notebook.ipynb\"))\n    assert nb.cells[0].metadata[\"lines_to_next_cell\"] == 0\n\n    jupytext([\"--sync\", \"notebook.py\", \"--pipe\", \"black\"])\n    nb = read(tmpdir.join(\"notebook.ipynb\"))\n    assert \"lines_to_next_cell\" not in nb.cells[0].metadata\n\n    new_text = tmpdir.join(\"notebook.py\").read()\n    assert \"\\n\\n# %%\\nfunc()\" in new_text\n\n\n@pytest.mark.requires_black\n@pytest.mark.parametrize(\n    \"code,black_should_fail\",\n    [(\"myvar = %dont_format_me\", False), (\"incomplete_instruction = (...\", True)],\n)\ndef test_pipe_black_uses_warn_only_781(tmpdir, cwd_tmpdir, code, black_should_fail, python_notebook, capsys):\n    nb = python_notebook\n    nb.cells.append(new_code_cell(code))\n    write(nb, \"notebook.ipynb\")\n\n    if not black_should_fail:\n        jupytext([\"--pipe\", \"black\", \"notebook.ipynb\"])\n        return\n\n    with pytest.raises(SystemExit):\n        jupytext([\"--pipe\", \"black\", \"notebook.ipynb\"])\n\n    out, err = capsys.readouterr()\n    assert \"Error: The command 'black -' exited with code\" in err\n    assert \"--warn-only\" in err\n\n    # With warn-only we just get a warning\n    jupytext([\"--pipe\", \"black\", \"notebook.ipynb\", \"--warn-only\"])\n    out, err = capsys.readouterr()\n    assert \"Warning: The command 'black -' exited with code\" in err\n\n    # If black fails the notebook should be left unchanged\n    actual = read(\"notebook.ipynb\")\n    compare_notebooks(actual, nb)\n\n\n@pytest.mark.requires_black\ndef test_pipe_black_preserve_outputs(notebook_with_outputs, tmpdir, cwd_tmpdir, capsys):\n    write(notebook_with_outputs, \"test.ipynb\")\n    jupytext([\"--pipe\", \"black\", \"test.ipynb\"])\n\n    # Outputs are preserved\n    nb = read(\"test.ipynb\")\n    expected = deepcopy(notebook_with_outputs)\n    expected.cells[0].source = \"1 + 1\"\n    compare_notebooks(nb, expected)\n\n    # No mention of --update\n    out, err = capsys.readouterr()\n    assert not err\n    assert \"replaced\" not in out\n    assert \"--update\" not in out\n"
  },
  {
    "path": "tests/external/cli/test_cli_check.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_notebook\n\nfrom jupytext import write\nfrom jupytext.cli import jupytext\n\n\n@pytest.fixture\ndef non_black_notebook(python_notebook):\n    return new_notebook(metadata=python_notebook.metadata, cells=[new_code_cell(\"1+1\")])\n\n\n@pytest.mark.requires_black\ndef test_check_notebooks_left_or_right_black(python_notebook, tmpdir, cwd_tmpdir):\n    write(python_notebook, str(tmpdir / \"nb1.ipynb\"))\n    write(python_notebook, str(tmpdir / \"nb2.ipynb\"))\n\n    jupytext([\"*.ipynb\", \"--check\", \"black --check {}\"])\n    jupytext([\"--check\", \"black --check {}\", \"*.ipynb\"])\n\n\n@pytest.mark.requires_black\ndef test_check_notebooks_left_or_right_not_black(non_black_notebook, tmpdir, cwd_tmpdir):\n    write(non_black_notebook, str(tmpdir / \"nb1.ipynb\"))\n    write(non_black_notebook, str(tmpdir / \"nb2.ipynb\"))\n\n    with pytest.raises(SystemExit):\n        jupytext([\"*.ipynb\", \"--check\", \"black --check {}\"])\n\n    with pytest.raises(SystemExit):\n        jupytext([\"--check\", \"black --check {}\", \"*.ipynb\"])\n"
  },
  {
    "path": "tests/external/cli/test_isort.py",
    "content": "import pytest\n\nfrom jupytext import reads, writes\nfrom jupytext.cli import pipe_notebook\nfrom jupytext.compare import compare\n\n\n@pytest.mark.requires_isort\ndef test_pipe_into_isort():\n    text_org = \"\"\"# %%\nimport numpy as np\nnp.array([1,2,3])\n\n# %%\nimport pandas as pd\npd.Series([1,2,3])\n\n# %%\n# This is a comment on the second import\nimport pandas as pd\npd.Series([4,5,6])\n\"\"\"\n\n    text_target = \"\"\"# %%\nimport numpy as np\n# This is a comment on the second import\nimport pandas as pd\n\nnp.array([1,2,3])\n\n# %%\npd.Series([1,2,3])\n\n# %%\npd.Series([4,5,6])\n\"\"\"\n\n    nb_org = reads(text_org, fmt=\"py:percent\")\n    nb_pipe = pipe_notebook(nb_org, 'isort - --treat-comment-as-code \"# %%\" --float-to-top')\n    text_actual = writes(nb_pipe, \"py:percent\")\n    compare(text_actual, text_target)\n"
  },
  {
    "path": "tests/external/conftest.py",
    "content": "import pytest\nfrom git import Repo\n\n\n@pytest.fixture\ndef tmp_repo(tmpdir):\n    repo = Repo.init(str(tmpdir))\n    return repo\n"
  },
  {
    "path": "tests/external/contents_manager/test_contentsmanager_external.py",
    "content": "import re\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\n\nimport jupytext\nfrom jupytext.compare import compare_notebooks, notebook_model\n\npytestmark = pytest.mark.asyncio\n\n\n@pytest.mark.requires_pandoc\nasync def test_save_load_paired_md_pandoc_notebook(ipynb_py_R_jl_file, tmpdir, cm):\n    if re.match(r\".*(functional|Notebook with|flavors|invalid|305|jupyterlab-slideshow).*\", ipynb_py_R_jl_file):\n        pytest.skip()\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_md = \"notebook.md\"\n\n    cm.root_dir = str(tmpdir)\n\n    # open ipynb, save with cm, reopen\n    nb = jupytext.read(ipynb_py_R_jl_file)\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,md:pandoc\"}\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n    nb_md = await ensure_async(cm.get(tmp_md))\n\n    compare_notebooks(nb_md[\"content\"], nb, \"md:pandoc\")\n    assert nb_md[\"content\"].metadata[\"jupytext\"][\"formats\"] == \"ipynb,md:pandoc\"\n\n\n@pytest.mark.requires_quarto\nasync def test_save_load_paired_qmd_notebook(ipynb_py_R_jl_file, tmpdir, cm):\n    if re.match(\n        r\".*(functional|Notebook with|plotly_graphs|flavors|complex_metadata|\"\n        \"update83|raw_cell|_66|nteract|LaTeX|invalid|305|text_outputs|ir_notebook|jupyter|with_R_magic).*\",\n        ipynb_py_R_jl_file,\n    ):\n        pytest.skip()\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_qmd = \"notebook.qmd\"\n\n    cm.root_dir = str(tmpdir)\n\n    # open ipynb, save with cm, reopen\n    nb = jupytext.read(ipynb_py_R_jl_file)\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,qmd\"}\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n    nb_md = await ensure_async(cm.get(tmp_qmd))\n\n    compare_notebooks(nb_md[\"content\"], nb, \"qmd\")\n    assert nb_md[\"content\"].metadata[\"jupytext\"][\"formats\"] == \"ipynb,qmd\"\n"
  },
  {
    "path": "tests/external/docs/test_using_cli.py",
    "content": "import os\nimport shlex\n\nimport pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_notebook\n\nimport jupytext\nfrom jupytext.cli import jupytext as jupytext_cli\n\ndoc_path = os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"..\", \"docs\")\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.requires_black\n@pytest.mark.requires_myst\n@pytest.mark.skipif(not os.path.isdir(doc_path), reason=\"Documentation folder is missing\")\ndef test_jupytext_commands_in_the_documentation_work(tmpdir):\n    # Read the documentation as a bash notebook\n    using_cli = os.path.join(doc_path, \"using-cli.md\")\n    assert os.path.isfile(using_cli)\n    using_cli_nb = jupytext.read(using_cli)\n\n    # Run the commands in tmpdir on a sample notebook\n    jupytext.write(new_notebook(cells=[new_code_cell(\"1+1\")]), str(tmpdir.join(\"notebook.ipynb\")))\n    os.chdir(str(tmpdir))\n\n    cmd_tested = 0\n    for cell in using_cli_nb.cells:\n        if cell.cell_type != \"code\":\n            continue\n        if not cell.source.startswith(\"jupytext\"):\n            continue\n        for cmd in cell.source.splitlines():\n            if not cmd.startswith(\"jupytext\"):\n                continue\n\n            # Do not test commands that involve reading a notebook from stdin\n            if \"read ipynb from stdin\" in cmd:\n                continue\n\n            # We can't run pytest inside pytest\n            if \"pytest {}\" in cmd:\n                continue\n\n            # We need to remove the comments that may follow the jupytext command\n            if \"#\" in cmd:\n                left, comment = cmd.rsplit(\"#\", 1)\n                if '\"' not in comment:\n                    cmd = left\n\n            print(f\"Testing: {cmd}\")\n            args = shlex.split(cmd)[1:]\n            assert not jupytext_cli(args), cmd\n            cmd_tested += 1\n\n    assert cmd_tested >= 10\n"
  },
  {
    "path": "tests/external/jupyter_fs/test_jupyter_fs.py",
    "content": "import logging\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare_cells, notebook_model\n\n\n@pytest.fixture(params=[\"sync\", \"async\"])\ndef cm_from_fs_meta_manager(tmpdir, request):\n    try:\n        from jupyterfs.metamanager import MetaManager, SyncMetaManager\n    except ImportError:\n        pytest.skip(\"jupyterfs is not available\")\n\n    if request.param == \"sync\":\n        cm_class = jupytext.build_sync_jupytext_contents_manager_class(SyncMetaManager)\n    else:\n        cm_class = jupytext.build_async_jupytext_contents_manager_class(MetaManager)\n\n    logger = logging.getLogger(\"jupyter-fs\")\n    cm = cm_class(parent=None, log=logger)\n    cm.initResource(\n        {\n            \"url\": f\"osfs://{tmpdir}\",\n        }\n    )\n    return cm\n\n\n@pytest.mark.asyncio\nasync def test_jupytext_jupyter_fs_metamanager(cm_from_fs_meta_manager):\n    \"\"\"Test the basic get/save functions of Jupytext with a fs manager\n    https://github.com/mwouts/jupytext/issues/618\"\"\"\n    cm = cm_from_fs_meta_manager\n    # the hash that corresponds to the osfs\n    osfs = [h for h in cm._managers if h != \"\"][0]\n\n    # save a few files\n    text = \"some text\\n\"\n    await ensure_async(cm.save(dict(type=\"file\", content=text, format=\"text\"), path=osfs + \":text.md\"))\n    nb = new_notebook(cells=[new_markdown_cell(\"A markdown cell\"), new_code_cell(\"1 + 1\")])\n    await ensure_async(cm.save(notebook_model(nb), osfs + \":notebook.ipynb\"))\n    await ensure_async(cm.save(notebook_model(nb), osfs + \":text_notebook.md\"))\n\n    # list the directory\n    directory = await ensure_async(cm.get(osfs + \":/\"))\n    assert {file[\"name\"] for file in directory[\"content\"]} == {\n        \"text.md\",\n        \"text_notebook.md\",\n        \"notebook.ipynb\",\n    }\n\n    # get the files\n    model = await ensure_async(cm.get(osfs + \":/text.md\", type=\"file\"))\n    assert model[\"type\"] == \"file\"\n    assert model[\"content\"] == text\n\n    model = await ensure_async(cm.get(osfs + \":text.md\", type=\"notebook\"))\n    assert model[\"type\"] == \"notebook\"\n    # We only compare the cells, as kernelspecs are added to the notebook metadata\n    compare_cells(model[\"content\"].cells, [new_markdown_cell(text.strip())], compare_ids=False)\n\n    for nb_file in [\"notebook.ipynb\", \"text_notebook.md\"]:\n        model = await ensure_async(cm.get(osfs + \":\" + nb_file))\n        assert model[\"type\"] == \"notebook\"\n        actual_cells = model[\"content\"].cells\n\n        # saving adds 'trusted=True' to the code cell metadata\n        for cell in actual_cells:\n            cell.metadata = {}\n        compare_cells(actual_cells, nb.cells, compare_ids=False)\n\n\n@pytest.mark.asyncio\nasync def test_config_jupytext_jupyter_fs_meta_manager(tmpdir, cm_from_fs_meta_manager):\n    \"\"\"Test the configuration of Jupytext with a fs manager\"\"\"\n    tmpdir.join(\"jupytext.toml\").write('formats = \"ipynb,py\"')\n    cm = cm_from_fs_meta_manager\n    # the hash that corresponds to the osfs\n    osfs = [h for h in cm._managers if h != \"\"][0]\n\n    # save a few files\n    nb = new_notebook()\n    await ensure_async(cm.save(dict(type=\"file\", content=\"text\", format=\"text\"), path=osfs + \":text.md\"))\n    await ensure_async(cm.save(notebook_model(nb), osfs + \":script.py\"))\n    await ensure_async(cm.save(notebook_model(nb), osfs + \":text_notebook.md\"))\n    await ensure_async(cm.save(notebook_model(nb), osfs + \":notebook.ipynb\"))\n\n    # list the directory\n    directory = await ensure_async(cm.get(osfs + \":/\"))\n    assert {file[\"name\"] for file in directory[\"content\"]} == {\n        \"jupytext.toml\",\n        \"text.md\",\n        \"text_notebook.md\",\n        \"notebook.ipynb\",\n        \"notebook.py\",\n        \"script.py\",\n        \"script.ipynb\",\n    }\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_0_ipynb_to_py.py",
    "content": "import pytest\nfrom git.exc import HookExecutionError\nfrom nbformat.v4.nbbase import new_markdown_cell, new_notebook\nfrom pre_commit.main import main as pre_commit\n\nfrom jupytext import read, write\nfrom jupytext.cli import jupytext\nfrom jupytext.compare import compare_cells\n\n\ndef test_pre_commit_hook_ipynb_to_py(tmpdir, cwd_tmpdir, tmp_repo, jupytext_repo_root, jupytext_repo_rev):\n    \"\"\"Here we document and test the expected behavior of the pre-commit hook in the\n    directional (--to) mode. Note that here, the ipynb file is always the source for\n    updates - i.e. changes on the .py file will not trigger the hook.\n    \"\"\"\n    # set up the tmpdir repo with pre-commit\n    pre_commit_config_yaml = f\"\"\"\nrepos:\n- repo: {jupytext_repo_root}\n  rev: {jupytext_repo_rev}\n  hooks:\n  - id: jupytext\n    args: [--from, ipynb, --to, \"py:percent\"]\n\"\"\"\n\n    tmpdir.join(\".pre-commit-config.yaml\").write(pre_commit_config_yaml)\n    tmp_repo.git.add(\".pre-commit-config.yaml\")\n    pre_commit([\"install\", \"--install-hooks\"])\n\n    # write test notebook and output file\n    nb = new_notebook(cells=[new_markdown_cell(\"A short notebook\")])\n    write(nb, \"test.ipynb\")\n    jupytext([\"--from\", \"ipynb\", \"--to\", \"py:percent\", \"test.ipynb\"])\n\n    tmp_repo.git.add(\".\")\n    tmp_repo.index.commit(\"test\")\n\n    # make a change to the notebook\n    nb = new_notebook(cells=[new_markdown_cell(\"Some other text\")])\n    write(nb, \"test.ipynb\")\n\n    tmp_repo.git.add(\"test.ipynb\")\n    # now a commit will fail, and keep failing until we add the new\n    # changes made to the existing output to the index ourselves\n    with pytest.raises(HookExecutionError, match=\"files were modified by this hook\"):\n        tmp_repo.index.commit(\"fails\")\n\n    with pytest.raises(HookExecutionError, match=\"git add test.py\"):\n        tmp_repo.index.commit(\"fails again\")\n\n    # once we add the changes, it will pass\n    tmp_repo.git.add(\"test.py\")\n    tmp_repo.index.commit(\"succeeds\")\n\n    assert \"test.ipynb\" in tmp_repo.tree()\n    assert \"test.py\" in tmp_repo.tree()\n\n    # Updating the .py file is possible\n    nb = new_notebook(cells=[new_markdown_cell(\"Some updated text\")])\n    write(nb, \"test.py\", fmt=\"py:percent\")\n    tmp_repo.index.commit(\"update py version\")\n\n    # But it won't change the ipynb file (if you want that, use the --sync mode)\n    nb = read(\"test.ipynb\")\n    compare_cells(nb.cells, [new_markdown_cell(\"Some other text\")], compare_ids=False)\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_1_sync.py",
    "content": "import shutil\n\nimport pytest\nfrom git.exc import HookExecutionError\nfrom nbformat.v4.nbbase import new_markdown_cell\nfrom pre_commit.main import main as pre_commit\n\nfrom jupytext import read, write\nfrom jupytext.cli import jupytext\n\n\ndef test_pre_commit_hook_sync(\n    tmpdir,\n    cwd_tmpdir,\n    tmp_repo,\n    jupytext_repo_root,\n    jupytext_repo_rev,\n    python_notebook,\n):\n    pre_commit_config_yaml = f\"\"\"\nrepos:\n- repo: {jupytext_repo_root}\n  rev: {jupytext_repo_rev}\n  hooks:\n  - id: jupytext\n    args: [--sync]\n\"\"\"\n    tmpdir.join(\".pre-commit-config.yaml\").write(pre_commit_config_yaml)\n\n    tmp_repo.git.add(\".pre-commit-config.yaml\")\n    pre_commit([\"install\", \"--install-hooks\", \"-f\"])\n\n    # write a test notebook and sync it to py:percent\n    nb = python_notebook\n    write(nb, \"test.ipynb\")\n\n    jupytext([\"--set-formats\", \"ipynb,py:percent\", \"test.ipynb\"])\n\n    # try to commit it, should fail because the py version hasn't been added\n    tmp_repo.git.add(\"test.ipynb\")\n    with pytest.raises(\n        HookExecutionError,\n        match=\"git add test.py\",\n    ):\n        tmp_repo.index.commit(\"failing\")\n\n    # add the py file, now the commit will succeed\n    tmp_repo.git.add(\"test.py\")\n    tmp_repo.index.commit(\"passing\")\n    assert \"test.ipynb\" in tmp_repo.tree()\n    assert \"test.py\" in tmp_repo.tree()\n\n    # modify the ipynb file\n    nb = read(\"test.ipynb\")\n    nb.cells.append(new_markdown_cell(\"A new cell\"))\n    write(nb, \"test.ipynb\")\n\n    tmp_repo.git.add(\"test.ipynb\")\n\n    # We try to commit one more time, this updates the py file\n    with pytest.raises(\n        HookExecutionError,\n        match=\"files were modified by this hook\",\n    ):\n        tmp_repo.index.commit(\"failing\")\n\n    # the text file has been updated\n    assert \"A new cell\" in tmpdir.join(\"test.py\").read()\n\n    # trying to commit should fail again because we forgot to add the .py version\n    with pytest.raises(HookExecutionError, match=\"git add test.py\"):\n        tmp_repo.index.commit(\"still failing\")\n\n    nb = read(\"test.ipynb\")\n    assert len(nb.cells) == 2\n\n    # add the text file, now the commit will succeed\n    tmp_repo.git.add(\"test.py\")\n    tmp_repo.index.commit(\"passing\")\n\n    # modify the .py file\n    nb.cells.append(new_markdown_cell(\"A third cell\"))\n    write(nb, \"test.py\", fmt=\"py:percent\")\n    tmp_repo.git.add(\"test.py\")\n\n    # the pre-commit hook will update the .ipynb file\n    with pytest.raises(HookExecutionError, match=\"git add test.ipynb\"):\n        tmp_repo.index.commit(\"failing\")\n\n    tmp_repo.git.add(\"test.ipynb\")\n    tmp_repo.index.commit(\"passing\")\n\n    nb = read(\"test.ipynb\")\n    assert len(nb.cells) == 3\n\n    # finally we move the paired notebook to a subfolder\n    tmpdir.mkdir(\"subfolder\")\n    shutil.move(\"test.py\", \"subfolder\")\n    shutil.move(\"test.ipynb\", \"subfolder\")\n\n    # adding both files works on the first commit as notebooks are in sync\n    tmp_repo.git.add(\"subfolder/test.ipynb\")\n    tmp_repo.git.add(\"subfolder/test.py\")\n    tmp_repo.index.commit(\"passing\")\n\n    # and we don't get any error or message when we run 'pre-commit run --all'\n    status = pre_commit([\"run\", \"--all\"])\n    assert status == 0\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_1_sync_with_config.py",
    "content": "import pytest\nfrom git.exc import HookExecutionError\nfrom nbformat.v4.nbbase import new_markdown_cell\nfrom pre_commit.main import main as pre_commit\n\nfrom jupytext import TextFileContentsManager, read\n\n\ndef test_pre_commit_hook_sync_with_config(\n    tmpdir,\n    cwd_tmpdir,\n    tmp_repo,\n    jupytext_repo_root,\n    jupytext_repo_rev,\n    python_notebook,\n):\n    pre_commit_config_yaml = f\"\"\"\nrepos:\n- repo: {jupytext_repo_root}\n  rev: {jupytext_repo_rev}\n  hooks:\n  - id: jupytext\n    args: [--sync]\n\"\"\"\n    tmpdir.join(\".pre-commit-config.yaml\").write(pre_commit_config_yaml)\n\n    tmp_repo.git.add(\".pre-commit-config.yaml\")\n    pre_commit([\"install\", \"--install-hooks\", \"-f\"])\n\n    tmpdir.join(\"jupytext.toml\").write('formats = \"ipynb,py:percent\"\\n')\n\n    # create a test notebook and save it in Jupyter\n    nb = python_notebook\n    cm = TextFileContentsManager()\n    cm.root_dir = str(tmpdir)\n    cm.save(dict(type=\"notebook\", content=nb), \"test.ipynb\")\n\n    # Assert that \"text_representation\" is in the Jupytext metadata #900\n    assert \"text_representation\" in tmpdir.join(\"test.py\").read()\n    # But not in the ipynb notebook\n    assert \"text_representation\" not in tmpdir.join(\"test.ipynb\").read()\n\n    # try to commit it, should fail as the py version hasn't been added\n    tmp_repo.git.add(\"test.ipynb\")\n    with pytest.raises(\n        HookExecutionError,\n        match=\"git add test.py\",\n    ):\n        tmp_repo.index.commit(\"failing\")\n\n    # add the py file, now the commit will succeed\n    tmp_repo.git.add(\"test.py\")\n    tmp_repo.index.commit(\"passing\")\n    assert \"test.ipynb\" in tmp_repo.tree()\n    assert \"test.py\" in tmp_repo.tree()\n\n    # The text representation metadata is still in the py file\n    assert \"text_representation\" in tmpdir.join(\"test.py\").read()\n    # But not in the ipynb notebook\n    assert \"text_representation\" not in tmpdir.join(\"test.ipynb\").read()\n\n    # modify the ipynb file in Jupyter\n    # Reload the notebook\n    nb = cm.get(\"test.ipynb\")[\"content\"]\n    nb.cells.append(new_markdown_cell(\"A new cell\"))\n    cm.save(dict(type=\"notebook\", content=nb), \"test.ipynb\")\n\n    # The text representation metadata is in the py file\n    assert \"text_representation\" in tmpdir.join(\"test.py\").read()\n    # But not in the ipynb notebook\n    assert \"text_representation\" not in tmpdir.join(\"test.ipynb\").read()\n\n    # the text file has been updated (and the ipynb file as well)\n    assert \"A new cell\" in tmpdir.join(\"test.py\").read()\n    nb = read(\"test.ipynb\")\n    assert len(nb.cells) == 2\n\n    # add both files, the commit will succeed\n    tmp_repo.git.add(\"test.ipynb\")\n    tmp_repo.git.add(\"test.py\")\n    tmp_repo.index.commit(\"passing\")\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_1_sync_with_no_config.py",
    "content": "from copy import deepcopy\n\nimport pytest\nfrom git.exc import HookExecutionError\nfrom nbformat.v4.nbbase import new_markdown_cell\nfrom pre_commit.main import main as pre_commit\n\nimport jupytext\nfrom jupytext import TextFileContentsManager\nfrom jupytext.compare import compare_notebooks\n\n\ndef test_pre_commit_hook_sync_with_no_config(\n    tmpdir,\n    cwd_tmpdir,\n    tmp_repo,\n    jupytext_repo_root,\n    jupytext_repo_rev,\n    notebook_with_outputs,\n):\n    \"\"\"In this test we reproduce the setting from https://github.com/mwouts/jupytext/issues/967\"\"\"\n    pre_commit_config_yaml = f\"\"\"\nrepos:\n- repo: {jupytext_repo_root}\n  rev: {jupytext_repo_rev}\n  hooks:\n  - id: jupytext\n    args: [\n      '--sync',\n      '--set-formats',\n      'ipynb,py:percent',\n      '--show-changes',\n      '--'\n    ]\n\"\"\"\n    # Save a sample notebook with outputs in Jupyter\n    nb = deepcopy(notebook_with_outputs)\n    (tmpdir / \"notebooks\").mkdir()\n    cm = TextFileContentsManager()\n    cm.root_dir = str(tmpdir)\n    cm.save(dict(type=\"notebook\", content=nb), \"nb.ipynb\")\n\n    # Add it to git\n    tmp_repo.git.add(\"nb.ipynb\")\n    tmp_repo.index.commit(\"Notebook with outputs\")\n\n    # Configure the pre-commit hook\n    tmpdir.join(\".pre-commit-config.yaml\").write(pre_commit_config_yaml)\n    tmp_repo.git.add(\".pre-commit-config.yaml\")\n    pre_commit([\"install\", \"--install-hooks\", \"-f\"])\n\n    # Modify and save the notebook\n    nb.cells.append(new_markdown_cell(\"New markdown cell\"))\n    cm.save(dict(type=\"notebook\", content=nb), \"nb.ipynb\")\n\n    # No .py file at the moment\n    assert not (tmpdir / \"nb.py\").exists()\n\n    # try to commit it, should fail as the py version hasn't been added\n    tmp_repo.git.add(\"nb.ipynb\")\n    with pytest.raises(\n        HookExecutionError,\n        match=\"git add nb.py\",\n    ):\n        tmp_repo.index.commit(\"failing\")\n\n    # Now the .py file is present\n    assert \"New markdown cell\" in tmpdir.join(\"nb.py\").read()\n\n    # add the ipynb and the py file, now the commit will succeed\n    tmp_repo.git.add(\"nb.ipynb\")\n    tmp_repo.git.add(\"nb.py\")\n    tmp_repo.index.commit(\"passing\")\n    assert \"nb.ipynb\" in tmp_repo.tree()\n    assert \"nb.py\" in tmp_repo.tree()\n\n    # The notebook on disk is the same as the original, except for the new cell added\n    nb = jupytext.read(tmpdir / \"nb.ipynb\")\n    extra_cell = nb.cells.pop()\n    assert extra_cell.cell_type == \"markdown\"\n    assert extra_cell.source == \"New markdown cell\"\n    compare_notebooks(\n        nb,\n        notebook_with_outputs,\n        compare_ids=True,\n        compare_outputs=True,\n    )\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_2_sync_nbstripout.py",
    "content": "import pytest\nfrom git.exc import HookExecutionError\nfrom pre_commit.main import main as pre_commit\n\nfrom jupytext import read, write\nfrom jupytext.cli import jupytext\n\n\ndef test_pre_commit_hook_sync_nbstripout(\n    tmpdir,\n    cwd_tmpdir,\n    tmp_repo,\n    jupytext_repo_root,\n    jupytext_repo_rev,\n    notebook_with_outputs,\n):\n    \"\"\"Here we sync the ipynb notebook with a Markdown file and also apply nbstripout.\"\"\"\n    pre_commit_config_yaml = f\"\"\"\nrepos:\n- repo: {jupytext_repo_root}\n  rev: {jupytext_repo_rev}\n  hooks:\n  - id: jupytext\n    args: [--sync]\n\n- repo: https://github.com/kynan/nbstripout\n  rev: 0.5.0\n  hooks:\n  - id: nbstripout\n\"\"\"\n\n    tmpdir.join(\".pre-commit-config.yaml\").write(pre_commit_config_yaml)\n\n    tmp_repo.git.add(\".pre-commit-config.yaml\")\n    pre_commit([\"install\", \"--install-hooks\", \"-f\"])\n\n    # write a test notebook\n    write(notebook_with_outputs, \"test.ipynb\")\n\n    # We pair the notebook to a md file\n    jupytext([\"--set-formats\", \"ipynb,md\", \"test.ipynb\"])\n\n    # try to commit it, should fail because\n    # 1. the md version hasn't been added\n    # 2. the notebook has outputs\n    tmp_repo.git.add(\"test.ipynb\")\n    with pytest.raises(\n        HookExecutionError,\n        match=\"files were modified by this hook\",\n    ):\n        tmp_repo.index.commit(\"failing\")\n\n    # Add the two files\n    tmp_repo.git.add(\"test.ipynb\")\n    tmp_repo.git.add(\"test.md\")\n\n    # now the commit will succeed\n    tmp_repo.index.commit(\"passing\")\n    assert \"test.ipynb\" in tmp_repo.tree()\n    assert \"test.md\" in tmp_repo.tree()\n\n    # the ipynb file has no outputs on disk\n    nb = read(\"test.ipynb\")\n    assert not nb.cells[0].outputs\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_3_sync_black_nbstripout.py",
    "content": "import pytest\nfrom git.exc import HookExecutionError\nfrom pre_commit.main import main as pre_commit\n\nfrom jupytext import read, write\nimport sys\n\n\n@pytest.mark.skipif(sys.version_info >= (3, 14), reason=\"this test fails on Python 3.14\")\ndef test_pre_commit_hook_sync_black_nbstripout(\n    tmpdir,\n    cwd_tmpdir,\n    tmp_repo,\n    jupytext_repo_root,\n    jupytext_repo_rev,\n    notebook_with_outputs,\n):\n    \"\"\"Here we sync the ipynb notebook with a py:percent file and also apply black and nbstripout.\"\"\"\n    pre_commit_config_yaml = f\"\"\"\nrepos:\n- repo: {jupytext_repo_root}\n  rev: {jupytext_repo_rev}\n  hooks:\n  - id: jupytext\n    args: [--sync, --pipe, black]\n    additional_dependencies:\n    - black==22.3.0  # Matches hook\n\n- repo: https://github.com/psf/black\n  rev: 22.3.0\n  hooks:\n  - id: black\n\n- repo: https://github.com/kynan/nbstripout\n  rev: 0.5.0\n  hooks:\n  - id: nbstripout\n\"\"\"\n    tmpdir.join(\".pre-commit-config.yaml\").write(pre_commit_config_yaml)\n\n    tmp_repo.git.add(\".pre-commit-config.yaml\")\n    pre_commit([\"install\", \"--install-hooks\", \"-f\"])\n\n    tmpdir.join(\"jupytext.toml\").write('formats = \"ipynb,py:percent\"')\n    tmp_repo.git.add(\"jupytext.toml\")\n    tmp_repo.index.commit(\"pair notebooks\")\n\n    # write a test notebook\n    write(notebook_with_outputs, \"test.ipynb\")\n\n    # try to commit it, should fail because\n    # 1. the py version hasn't been added\n    # 2. the first cell is '1+1' which is not black compliant\n    # 3. the notebook has outputs\n    tmp_repo.git.add(\"test.ipynb\")\n    with pytest.raises(\n        HookExecutionError,\n        match=\"files were modified by this hook\",\n    ):\n        tmp_repo.index.commit(\"failing\")\n\n    # Add the two files\n    tmp_repo.git.add(\"test.ipynb\")\n    tmp_repo.git.add(\"test.py\")\n\n    # now the commit will succeed\n    tmp_repo.index.commit(\"passing\")\n    assert \"test.ipynb\" in tmp_repo.tree()\n    assert \"test.py\" in tmp_repo.tree()\n\n    # the first cell was reformatted\n    nb = read(\"test.ipynb\")\n    assert nb.cells[0].source == \"1 + 1\"\n\n    # the ipynb file has no outputs\n    assert not nb.cells[0].outputs\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_4_sync_execute.py",
    "content": "import pytest\nfrom git.exc import HookExecutionError\nfrom nbformat.v4.nbbase import new_code_cell\nfrom pre_commit.main import main as pre_commit\n\nfrom jupytext import read, write\n\n\n@pytest.mark.requires_user_kernel_python3\ndef test_pre_commit_hook_sync_execute(\n    tmpdir,\n    cwd_tmpdir,\n    tmp_repo,\n    jupytext_repo_root,\n    jupytext_repo_rev,\n    notebook_with_outputs,\n):\n    \"\"\"Here we sync the ipynb notebook with a py:percent file and execute it (this is probably not a very\n    recommendable hook!)\"\"\"\n    pre_commit_config_yaml = f\"\"\"\nrepos:\n- repo: {jupytext_repo_root}\n  rev: {jupytext_repo_rev}\n  hooks:\n  - id: jupytext\n    args: [--sync, --execute, --show-changes]\n    additional_dependencies:\n    - nbconvert\n\"\"\"\n    tmpdir.join(\".pre-commit-config.yaml\").write(pre_commit_config_yaml)\n\n    tmp_repo.git.add(\".pre-commit-config.yaml\")\n    pre_commit([\"install\", \"--install-hooks\", \"-f\"])\n\n    # simple notebook with kernel 'user_kernel_python3'\n    nb = notebook_with_outputs\n    nb.cells = [new_code_cell(\"3+4\")]\n\n    # pair it to a py file and write it to disk\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,py:percent\"}\n    write(nb, \"test.ipynb\")\n\n    # try to commit it, should fail because\n    # 1. the py version hasn't been added\n    # 2. the outputs are missing\n    tmp_repo.git.add(\"test.ipynb\")\n    with pytest.raises(\n        HookExecutionError,\n        match=\"files were modified by this hook\",\n    ):\n        tmp_repo.index.commit(\"failing\")\n\n    # Add the two files\n    tmp_repo.git.add(\"test.ipynb\")\n    tmp_repo.git.add(\"test.py\")\n\n    # now the commit will succeed\n    tmp_repo.index.commit(\"passing\")\n    assert \"test.ipynb\" in tmp_repo.tree()\n    assert \"test.py\" in tmp_repo.tree()\n\n    # the first cell has the expected output\n    nb = read(\"test.ipynb\")\n    assert nb.cells[0].outputs[0][\"data\"][\"text/plain\"] == \"7\"\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_5_reformat_markdown.py",
    "content": "import pytest\nfrom git.exc import HookExecutionError\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\nfrom pre_commit.main import main as pre_commit\n\nfrom jupytext import read, write\n\n\n@pytest.mark.requires_pandoc\ndef test_pre_commit_hook_sync_reformat_code_and_markdown(\n    tmpdir,\n    cwd_tmpdir,\n    tmp_repo,\n    jupytext_repo_root,\n    jupytext_repo_rev,\n    notebook_with_outputs,\n):\n    \"\"\"Here we sync the ipynb notebook with a py:percent file and also apply black and pandoc to reformat both\n    code and markdown cells.\n    \"\"\"\n    pre_commit_config_yaml = f\"\"\"\nrepos:\n- repo: {jupytext_repo_root}\n  rev: {jupytext_repo_rev}\n  hooks:\n  - id: jupytext\n    args: [--sync, --pipe-fmt, ipynb, --pipe, 'pandoc --from ipynb --to ipynb --markdown-headings=atx', --show-changes]\n  - id: jupytext\n    args: [--sync, --pipe, black, --show-changes]\n    additional_dependencies:\n    - black==22.3.0  # Matches black hook below\n\n- repo: https://github.com/psf/black\n  rev: 22.3.0\n  hooks:\n  - id: black\n\"\"\"\n    tmpdir.join(\".pre-commit-config.yaml\").write(pre_commit_config_yaml)\n\n    tmp_repo.git.add(\".pre-commit-config.yaml\")\n    pre_commit([\"install\", \"--install-hooks\", \"-f\"])\n\n    tmpdir.join(\"jupytext.toml\").write('formats = \"ipynb,py:percent\"')\n    tmp_repo.git.add(\"jupytext.toml\")\n    tmp_repo.index.commit(\"pair notebooks\")\n\n    # write a test notebook\n    notebook = new_notebook(\n        cells=[\n            new_code_cell(\"1+1\"),\n            new_markdown_cell(\n                \"\"\"This is a complex markdown cell\n\n# With a h1 header\n## And a h2 header\n\n| And       | A  | Table |\n| --------- | ---| ----- |\n| 0         | 1  | 2     |\n\n!!!WARNING!!! This hook does not seem compatible with\nexplicit paragraph breaks (two spaces at the end of a line).\n\nAnd a VERY long line.\n\"\"\".replace(\"VERY \", \"very \" * 51)\n            ),\n        ],\n        metadata=notebook_with_outputs.metadata,\n    )\n\n    write(notebook, \"test.ipynb\")\n\n    # try to commit it, should fail because\n    # 1. the py version hasn't been added\n    # 2. the first cell is '1+1' which is not black compliant\n    # 3. the second cell needs to be wrapped\n    tmp_repo.git.add(\"test.ipynb\")\n    with pytest.raises(\n        HookExecutionError,\n        match=\"files were modified by this hook\",\n    ):\n        tmp_repo.index.commit(\"failing\")\n\n    # Add the two files\n    tmp_repo.git.add(\"test.ipynb\")\n    tmp_repo.git.add(\"test.py\")\n\n    # now the commit will succeed\n    tmp_repo.index.commit(\"passing\")\n    assert \"test.ipynb\" in tmp_repo.tree()\n    assert \"test.py\" in tmp_repo.tree()\n\n    # both the code and the markdown cells were reformatted\n    nb = read(\"test.ipynb\")\n    assert nb.cells[0].source == \"1 + 1\"\n\n    print(nb.cells[1].source)\n    assert (\n        nb.cells[1].source\n        == \"\"\"This is a complex markdown cell\n\n# With a h1 header\n\n## And a h2 header\n\n| And | A   | Table |\n|-----|-----|-------|\n| 0   | 1   | 2     |\n\n!!!WARNING!!! This hook does not seem compatible with explicit paragraph\nbreaks (two spaces at the end of a line).\n\nAnd a very very very very very very very very very very very very very\nvery very very very very very very very very very very very very very\nvery very very very very very very very very very very very very very\nvery very very very very very very very very very long line.\"\"\"\n    )\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_mode.py",
    "content": "import os\nimport time\n\nimport pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nfrom jupytext import read, write\nfrom jupytext.cli import get_timestamp, git_timestamp, is_untracked, jupytext\n\n\ndef test_is_untracked(tmpdir, cwd_tmpdir, tmp_repo):\n    # make a test file\n    file = \"test.txt\"\n    tmpdir.join(file).write(\"test file\\n\")\n\n    # untracked\n    assert is_untracked(file)\n\n    # added, not committed\n    tmp_repo.git.add(file)\n    assert not is_untracked(file)\n\n    # committed\n    tmp_repo.index.commit(\"test\")\n    assert not is_untracked(file)\n\n    # changed\n    tmpdir.join(file).write(\"modified file\\n\")\n    assert is_untracked(file)\n\n    # added, not committed\n    tmp_repo.git.add(file)\n    assert not is_untracked(file)\n\n\ndef test_ignore_unmatched_ignores(tmpdir, cwd_tmpdir):\n    # Unmatched file\n    file = \"test.txt\"\n    tmpdir.join(file).write(\"Hello\\n\")\n\n    # Run jupytext\n    status = jupytext([\"--from\", \"ipynb\", \"--to\", \"py:percent\", \"--pre-commit-mode\", file])\n\n    assert status == 0\n    assert not tmpdir.join(\"test.py\").exists()\n\n\ndef test_alert_untracked_alerts(tmpdir, cwd_tmpdir, tmp_repo, capsys):\n    file = \"test.py\"\n    tmpdir.join(file).write(\"print('hello')\\n\")\n\n    # Run jupytext\n    status = jupytext([\"--from\", \".py\", \"--to\", \"ipynb\", \"--pre-commit-mode\", file])\n\n    assert status != 0\n    assert tmpdir.join(\"test.ipynb\").exists()\n\n    out = capsys.readouterr()\n    assert \"git add test.ipynb\" in out.out\n\n\ndef test_alert_untracked_alerts_when_using_sync(tmpdir, cwd_tmpdir, tmp_repo, capsys):\n    tmpdir.join(\"test.py\").write(\"print('hello')\\n\")\n    tmp_repo.git.add(\"test.py\")\n\n    tmpdir.join(\"jupytext.toml\").write('formats = \"ipynb,py\"')\n\n    # Run jupytext\n    status = jupytext([\"--sync\", \"--pre-commit-mode\", \"test.py\"])\n\n    assert status != 0\n    assert tmpdir.join(\"test.ipynb\").exists()\n\n    out = capsys.readouterr()\n    assert \"git add test.ipynb\" in out.out\n\n\ndef test_alert_untracked_alerts_for_modified(tmpdir, cwd_tmpdir, tmp_repo, capsys):\n    # write test notebook\n    nb = new_notebook(cells=[new_markdown_cell(\"A short notebook\")])\n    write(nb, \"test.ipynb\")\n\n    # write existing output\n    tmpdir.join(\"test.py\").write(\"# Hello\")\n\n    # track output file\n    tmp_repo.git.add(\"test.py\")\n\n    # Run jupytext\n    status = jupytext([\"--from\", \"ipynb\", \"--to\", \"py:percent\", \"--pre-commit-mode\", \"test.ipynb\"])\n\n    assert status == 1\n    out = capsys.readouterr()\n    assert \"git add test.py\" in out.out\n\n\ndef test_alert_inconsistent_versions(tmpdir, cwd_tmpdir, tmp_repo, capsys):\n    \"\"\"Jupytext refuses to sync two inconsistent notebooks\"\"\"\n    write(new_notebook(cells=[new_markdown_cell(\"A short py notebook\")]), \"test.py\")\n    write(\n        new_notebook(\n            cells=[new_markdown_cell(\"Another ipynb notebook\")],\n            metadata={\"jupytext\": {\"formats\": \"ipynb,py\"}},\n        ),\n        \"test.ipynb\",\n    )\n\n    # Add them both\n    tmp_repo.git.add(\"test.py\")\n    tmp_repo.git.add(\"test.ipynb\")\n\n    # Run jupytext\n    status = jupytext([\"--sync\", \"--pre-commit-mode\", \"test.ipynb\"])\n\n    # The diff should be visible\n    assert status == 1\n    out = capsys.readouterr()\n    assert (\n        \"\"\"--- test.py\n+++ test.ipynb\"\"\"\n        in out.err\n    )\n    assert \"\"\"-# A short py notebook\n+# Another ipynb notebook\n\"\"\"\n    assert \"Error: test.ipynb and test.py are inconsistent\" in out.err\n    assert \"git reset test.py && git checkout -- test.py\" in out.err\n    assert \"git reset test.ipynb && git checkout -- test.ipynb\" in out.err\n\n\ndef test_pre_commit_local_config(tmpdir, cwd_tmpdir, tmp_repo, python_notebook, capsys):\n    tmpdir.join(\"jupytext.toml\").write_text(\n        \"\"\"notebook_metadata_filter = \"-all\"\ncell_metadata_filter = \"-all\"\nformats = \"ipynb,py:percent\"\n\"\"\",\n        encoding=\"utf-8\",\n    )\n\n    write(python_notebook, str(tmpdir.join(\"test.ipynb\")))\n\n    # create the paired file\n    jupytext([\"--sync\", \"test.ipynb\"])\n\n    print(\"--------- test.ipynb ---------\")\n    print(tmpdir.join(\"test.ipynb\").read_text(\"utf-8\"))\n    print(\"--------- test.py ---------\")\n    print(tmpdir.join(\"test.py\").read_text(\"utf-8\"))\n\n    tmp_repo.git.add(\".\")\n\n    capsys.readouterr()\n    exit_code = jupytext([\"--pre-commit-mode\", \"--sync\", \"test.ipynb\", \"--show-changes\"])\n\n    out, err = capsys.readouterr()\n    assert not err, err\n    assert \"updating test\" not in out.lower(), out\n    assert exit_code == 0, out\n\n\ndef test_git_timestamp(tmpdir, cwd_tmpdir, tmp_repo):\n    # No commit yet => return the file timestamp\n    tmpdir.join(\"file_1\").write(\"\")\n    assert git_timestamp(\"file_1\") == get_timestamp(\"file_1\")\n\n    # Staged files are always considered more recent than committed files, i.e timestamp==inf\n    time.sleep(0.1)\n    tmpdir.join(\"file_2\").write(\"\")\n    tmp_repo.git.add(\".\")\n\n    assert get_timestamp(\"file_1\") < get_timestamp(\"file_2\")\n    assert git_timestamp(\"file_1\") == git_timestamp(\"file_2\") == float(\"inf\")\n\n    tmp_repo.index.commit(\"Add file_1 and file_2\")\n    assert get_timestamp(\"file_1\") < get_timestamp(\"file_2\")\n    assert git_timestamp(\"file_1\") == git_timestamp(\"file_2\") < float(\"inf\")\n    assert git_timestamp(\"file_1\") < get_timestamp(\"file_1\") + 1 < git_timestamp(\"file_1\") + 2\n\n    # Git timestamps have a resolution of 1 sec, so if we want to see\n    # different git timestamps between file_1 and file_2 we need this:\n    time.sleep(1.2)\n\n    # Here we just touch the file (content unchanged). The git timestamp is not modified\n    tmpdir.join(\"file_1\").write(\"\")\n    assert get_timestamp(\"file_1\") > get_timestamp(\"file_2\")\n    assert git_timestamp(\"file_1\") == git_timestamp(\"file_2\") < float(\"inf\")\n\n    # When we modify the file then its \"git_timestamp\" becomes inf again\n    tmpdir.join(\"file_1\").write(\"modified\")\n    assert get_timestamp(\"file_1\") > get_timestamp(\"file_2\")\n    assert float(\"inf\") == git_timestamp(\"file_1\") > git_timestamp(\"file_2\")\n\n    tmp_repo.git.add(\".\")\n    assert float(\"inf\") == git_timestamp(\"file_1\") > git_timestamp(\"file_2\")\n\n    # When the file is committed its timestamp is the commit timestamp\n    tmp_repo.index.commit(\"Update file_1\")\n    assert float(\"inf\") > git_timestamp(\"file_1\") > git_timestamp(\"file_2\")\n\n    # If a file is not in the git repo then we return its timestamp\n    tmpdir.join(\"file_3\").write(\"\")\n    assert git_timestamp(\"file_3\") == get_timestamp(\"file_3\")\n\n\n@pytest.mark.parametrize(\"commit_order\", [[\"test.py\", \"test.ipynb\"], [\"test.ipynb\", \"test.py\"]])\n@pytest.mark.parametrize(\"sync_file\", [\"test.py\", \"test.ipynb\"])\ndef test_sync_pre_commit_mode_respects_commit_order_780(\n    tmpdir,\n    cwd_tmpdir,\n    tmp_repo,\n    python_notebook,\n    commit_order,\n    sync_file,\n):\n    file_1, file_2 = commit_order\n\n    nb = python_notebook\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,py:percent\"}\n    nb.cells = [new_code_cell(\"1 + 1\")]\n    write(nb, file_1)\n\n    tmp_repo.git.add(file_1)\n    tmp_repo.index.commit(file_1)\n\n    # This needs to >1 sec because commit timestamps have a one-second resolution\n    time.sleep(1.2)\n\n    nb.cells = [new_code_cell(\"2 + 2\")]\n    write(nb, file_2)\n\n    tmp_repo.git.add(file_2)\n    tmp_repo.index.commit(file_2)\n\n    # Invert file timestamps\n    ts_1 = os.stat(file_1).st_mtime\n    ts_2 = os.stat(file_2).st_mtime\n    os.utime(file_1, (ts_2, ts_2))\n    os.utime(file_2, (ts_1, ts_1))\n\n    jupytext([\"--sync\", \"--pre-commit-mode\", sync_file])\n\n    for file in commit_order:\n        nb = read(file)\n        assert nb.cells[0].source == \"2 + 2\", file\n\n\n@pytest.mark.requires_user_kernel_python3\ndef test_skip_execution(tmpdir, cwd_tmpdir, tmp_repo, python_notebook, capsys):\n    write(\n        new_notebook(cells=[new_code_cell(\"1 + 1\")], metadata=python_notebook.metadata),\n        \"test.ipynb\",\n    )\n    tmp_repo.index.add(\"test.ipynb\")\n\n    jupytext([\"--execute\", \"--pre-commit-mode\", \"test.ipynb\"])\n    captured = capsys.readouterr()\n    assert \"Executing notebook\" in captured.out\n\n    nb = read(\"test.ipynb\")\n    assert nb.cells[0].execution_count == 1\n\n    jupytext([\"--execute\", \"--pre-commit-mode\", \"test.ipynb\"])\n    captured = capsys.readouterr()\n    assert \"skipped\" in captured.out\n"
  },
  {
    "path": "tests/external/pre_commit/test_pre_commit_scripts.py",
    "content": "import os\nimport stat\nimport unittest.mock as mock\n\nimport pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nfrom jupytext import read, write\nfrom jupytext.cli import jupytext, system\nfrom jupytext.compare import compare_cells, compare_notebooks\n\n\ndef git_in_tmpdir(tmpdir):\n    \"\"\"Return a function that will execute git instruction in the desired directory\"\"\"\n\n    def git(*args):\n        out = system(\"git\", *args, cwd=str(tmpdir))\n        print(out)\n        return out\n\n    git(\"init\", \"--initial-branch\", \"main\")\n    git(\"status\")\n    git(\"config\", \"user.name\", \"jupytext-test-cli\")\n    git(\"config\", \"user.email\", \"jupytext@tests.com\")\n\n    return git\n\n\ndef system_in_tmpdir(tmpdir):\n    \"\"\"Return a function that will execute system commands in the desired directory\"\"\"\n\n    def system_(*args):\n        return system(*args, cwd=str(tmpdir))\n\n    return system_\n\n\ndef test_pre_commit_hook(tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"nb with spaces.ipynb\"))\n    tmp_py = str(tmpdir.join(\"nb with spaces.py\"))\n    nb = new_notebook(cells=[])\n\n    git = git_in_tmpdir(tmpdir)\n    hook = str(tmpdir.join(\".git/hooks/pre-commit\"))\n    with open(hook, \"w\") as fp:\n        fp.write(\"#!/bin/sh\\njupytext --to py:percent --pre-commit\\n\")\n\n    st = os.stat(hook)\n    os.chmod(hook, st.st_mode | stat.S_IEXEC)\n\n    write(nb, tmp_ipynb)\n    assert os.path.isfile(tmp_ipynb)\n    assert not os.path.isfile(tmp_py)\n\n    git(\"add\", \"nb with spaces.ipynb\")\n    git(\"status\")\n    git(\"commit\", \"-m\", \"created\")\n    git(\"status\")\n\n    assert \"nb with spaces.py\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n    assert os.path.isfile(tmp_py)\n\n\ndef test_sync_with_pre_commit_hook(tmpdir):\n    # Init git and create a pre-commit hook\n    git = git_in_tmpdir(tmpdir)\n    hook = str(tmpdir.join(\".git/hooks/pre-commit\"))\n    with open(hook, \"w\") as fp:\n        fp.write(\"#!/bin/sh\\njupytext --sync --pre-commit\\n\")\n\n    st = os.stat(hook)\n    os.chmod(hook, st.st_mode | stat.S_IEXEC)\n\n    # Create a notebook that is not paired\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n    nb = new_notebook(cells=[new_markdown_cell(\"A short notebook\")])\n    write(nb, tmp_ipynb)\n    assert os.path.isfile(tmp_ipynb)\n    assert not os.path.isfile(tmp_md)\n\n    git(\"add\", \"notebook.ipynb\")\n    git(\"status\")\n    git(\"commit\", \"-m\", \"created\")\n    git(\"status\")\n\n    assert \"notebook.ipynb\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n    assert \"notebook.md\" not in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n\n    assert os.path.isfile(tmp_ipynb)\n    assert not os.path.exists(tmp_md)\n\n    # Pair the notebook\n    jupytext([\"--set-formats\", \"ipynb,md\", tmp_ipynb])\n\n    # Remove the md file (it will be regenerated by the pre-commit hook)\n    os.remove(tmp_md)\n\n    # Commit the ipynb file\n    git(\"add\", \"notebook.ipynb\")\n    git(\"status\")\n    git(\"commit\", \"-m\", \"paired\")\n    git(\"status\")\n\n    # The pre-commit script should have created and committed the md file\n    assert \"notebook.ipynb\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n    assert \"notebook.md\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n    assert os.path.isfile(tmp_md)\n    nb_md = read(tmp_md)\n    compare_notebooks(nb_md, nb)\n\n    # Edit the md file\n    with open(tmp_md) as fp:\n        md_text = fp.read()\n\n    with open(tmp_md, \"w\") as fp:\n        fp.write(md_text.replace(\"A short notebook\", \"Notebook was edited\"))\n\n    # commit the md file\n    git(\"add\", \"notebook.md\")\n    git(\"status\")\n    git(\"commit\", \"-m\", \"edited md\")\n    git(\"status\")\n\n    # The pre-commit script should have sync and committed the ipynb file\n    assert \"notebook.ipynb\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n    assert \"notebook.md\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n\n    nb = read(tmp_ipynb)\n    compare_cells(nb.cells, [new_markdown_cell(\"Notebook was edited\")], compare_ids=False)\n\n    # create and commit a jpg file\n    tmp_jpg = str(tmpdir.join(\"image.jpg\"))\n    with open(tmp_jpg, \"wb\") as fp:\n        fp.write(b\"\")\n    git(\"add\", \"image.jpg\")\n    git(\"commit\", \"-m\", \"added image\")\n\n\ndef test_pre_commit_hook_in_subfolder(tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"nb with spaces.ipynb\"))\n    tmp_py = str(tmpdir.join(\"python\", \"nb with spaces.py\"))\n    nb = new_notebook(cells=[])\n\n    git = git_in_tmpdir(tmpdir)\n    hook = str(tmpdir.join(\".git/hooks/pre-commit\"))\n    with open(hook, \"w\") as fp:\n        fp.write(\"#!/bin/sh\\njupytext --from ipynb --to python//py:percent --pre-commit\\n\")\n\n    st = os.stat(hook)\n    os.chmod(hook, st.st_mode | stat.S_IEXEC)\n\n    write(nb, tmp_ipynb)\n    assert os.path.isfile(tmp_ipynb)\n    assert not os.path.isfile(tmp_py)\n\n    git(\"add\", \"nb with spaces.ipynb\")\n    git(\"status\")\n    git(\"commit\", \"-m\", \"created\")\n    git(\"status\")\n\n    assert \"nb with spaces.py\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n    assert os.path.isfile(tmp_py)\n\n\ndef test_pre_commit_hook_py_to_ipynb_and_md(tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"nb with spaces.ipynb\"))\n    tmp_py = str(tmpdir.join(\"nb with spaces.py\"))\n    tmp_md = str(tmpdir.join(\"nb with spaces.md\"))\n    nb = new_notebook(cells=[])\n\n    git = git_in_tmpdir(tmpdir)\n    hook = str(tmpdir.join(\".git/hooks/pre-commit\"))\n    with open(hook, \"w\") as fp:\n        fp.write(\n            \"#!/bin/sh\\njupytext --from py:percent --to ipynb --pre-commit\\njupytext --from py:percent --to md --pre-commit\\n\"\n        )\n\n    st = os.stat(hook)\n    os.chmod(hook, st.st_mode | stat.S_IEXEC)\n\n    write(nb, tmp_py)\n    assert os.path.isfile(tmp_py)\n    assert not os.path.isfile(tmp_ipynb)\n    assert not os.path.isfile(tmp_md)\n\n    git(\"add\", \"nb with spaces.py\")\n    git(\"status\")\n    git(\"commit\", \"-m\", \"created\")\n    git(\"status\")\n\n    assert \"nb with spaces.ipynb\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n    assert \"nb with spaces.md\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_md)\n\n\n@pytest.mark.requires_black\n@pytest.mark.requires_flake8\ndef test_pre_commit_hook_sync_black_flake8(tmpdir, python_notebook):\n    # Load real notebook metadata to get the 'auto' extension in --pipe-fmt to work\n    metadata = python_notebook.metadata\n\n    git = git_in_tmpdir(tmpdir)\n    hook = str(tmpdir.join(\".git/hooks/pre-commit\"))\n    with open(hook, \"w\") as fp:\n        fp.write(\n            \"#!/bin/sh\\n\"\n            \"# Pair ipynb notebooks to a python file, reformat content with black, and run flake8\\n\"\n            \"# Note: this hook only acts on ipynb files. When pulling, run 'jupytext --sync' to \"\n            \"update the ipynb file.\\n\"\n            \"jupytext --pre-commit --from ipynb --set-formats ipynb,py --pipe black --check flake8\\n\"\n        )\n\n    st = os.stat(hook)\n    os.chmod(hook, st.st_mode | stat.S_IEXEC)\n\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n    nb = new_notebook(cells=[new_code_cell(source=\"1+    1\")], metadata=metadata)\n\n    write(nb, tmp_ipynb)\n    git(\"add\", \"notebook.ipynb\")\n    git(\"status\")\n    git(\"commit\", \"-m\", \"created\")\n    git(\"status\")\n    assert os.path.isfile(tmp_py)\n    assert os.path.isfile(tmp_ipynb)\n    with open(tmp_py) as fp:\n        assert fp.read().splitlines()[-1] == \"1 + 1\"\n\n    nb = new_notebook(\n        cells=[new_code_cell(source='\"\"\"trailing   \\nwhitespace\"\"\"    ')],\n        metadata=metadata,\n    )\n    write(nb, tmp_ipynb)\n    git(\"add\", \"notebook.ipynb\")\n    git(\"status\")\n    with open(tmp_py) as fp:\n        assert fp.read().splitlines()[-1] == \"1 + 1\"\n\n\n@pytest.mark.requires_flake8\ndef test_pre_commit_hook_sync_flake8(tmpdir, python_notebook):\n    \"\"\"This test was extracted from test_pre_commit_hook_sync_black_flake8 to make sure that the\n    pre-commit stops the commit when flake8 fails\"\"\"\n    metadata = python_notebook.metadata\n\n    git = git_in_tmpdir(tmpdir)\n    hook = str(tmpdir.join(\".git/hooks/pre-commit\"))\n    with open(hook, \"w\") as fp:\n        fp.write(\n            \"#!/bin/sh\\n\"\n            \"# Pair ipynb notebooks to a python file, and run flake8\\n\"\n            \"# Note: this hook only acts on ipynb files. When pulling, run 'jupytext --sync' to \"\n            \"update the ipynb file.\\n\"\n            \"jupytext --pre-commit --from ipynb --set-formats ipynb,py --check flake8\\n\"\n        )\n\n    st = os.stat(hook)\n    os.chmod(hook, st.st_mode | stat.S_IEXEC)\n\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    nb = new_notebook(\n        cells=[new_code_cell(source='\"\"\"trailing   \\nwhitespace\"\"\"    ')],\n        metadata=metadata,\n    )\n    write(nb, tmp_ipynb)\n    git(\"add\", \"notebook.ipynb\")\n    git(\"status\")\n    with pytest.raises(SystemExit):  # not flake8\n        git(\"commit\", \"-m\", \"created\")\n\n\n@pytest.mark.filterwarnings(\"ignore:The --pre-commit argument is deprecated\")\ndef test_manual_call_of_pre_commit_hook(tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n    nb = new_notebook(cells=[])\n    os.chdir(str(tmpdir))\n\n    git = git_in_tmpdir(tmpdir)\n\n    def hook():\n        with mock.patch(\"jupytext.cli.system\", system_in_tmpdir(tmpdir)):\n            jupytext([\"--to\", \"py\", \"--pre-commit\"])\n\n    write(nb, tmp_ipynb)\n    assert os.path.isfile(tmp_ipynb)\n    assert not os.path.isfile(tmp_py)\n\n    git(\"add\", \"notebook.ipynb\")\n    git(\"status\")\n    hook()\n    git(\"commit\", \"-m\", \"created\")\n    git(\"status\")\n\n    assert \"notebook.py\" in git(\"ls-tree\", \"-r\", \"main\", \"--name-only\")\n    assert os.path.isfile(tmp_py)\n\n\ndef test_pre_commit_hook_with_subfolders_issue_506(tmpdir):\n    \"\"\"I have the following directory structure, where the nb/test.ipynb is paired with the py/test.py.\n\n    ├── nb\n    │   └── test.ipynb\n    └── py\n        └── test.py\n    \"\"\"\n\n    nb_file = tmpdir.mkdir(\"nb\").join(\"test.ipynb\")\n    py_file = tmpdir.mkdir(\"py\").join(\"test.py\")\n\n    \"\"\"The notebook and Python file are paired with \"jupytext\": {\"formats\": \"py//py,nb//ipynb\"}.\n        (using jupytext --set-formats py//py,nb//ipynb nb/test.ipynb)\"\"\"\n    write(\n        new_notebook(\n            cells=[new_markdown_cell(\"A Markdown cell\")],\n            metadata={\"jupytext\": {\"formats\": \"py//py,nb//ipynb\"}},\n        ),\n        str(py_file),\n    )\n\n    \"\"\"This works fine when syncing with jupytext --sync nb/test.ipynb\n    but when syncing with jupytext --sync --pre-commit I get the following exception: (...)\"\"\"\n    git = git_in_tmpdir(tmpdir)\n    hook = str(tmpdir.join(\".git/hooks/pre-commit\"))\n    with open(hook, \"w\") as fp:\n        fp.write(\"#!/bin/sh\\njupytext --sync --pre-commit\\n\")\n\n    st = os.stat(hook)\n    os.chmod(hook, st.st_mode | stat.S_IEXEC)\n\n    assert not os.path.isfile(str(nb_file))\n\n    git(\"add\", \"py/test.py\")\n    git(\"status\")\n    git(\"commit\", \"-m\", \"notebook created\")\n    git(\"status\")\n\n    assert os.path.isfile(str(nb_file))\n    assert read(str(nb_file)).cells[0].source == \"A Markdown cell\"\n\n\n@pytest.mark.requires_pandoc\ndef test_wrap_markdown_cell(tmpdir):\n    \"\"\"Use a pre-commit hook to sync a notebook to a script paired in a tree, and reformat\n    the markdown cells using pandoc\"\"\"\n\n    tmpdir.join(\"jupytext.toml\").write(\n        \"\"\"# By default, the notebooks in this repository are in the notebooks subfolder\n    # and they are paired to scripts in the script subfolder.\n    formats = \"notebooks///ipynb,scripts///py:percent\"\n    \"\"\"\n    )\n\n    git = git_in_tmpdir(tmpdir)\n    hook = str(tmpdir.join(\".git/hooks/pre-commit\"))\n    with open(hook, \"w\") as fp:\n        fp.write(\n            \"#!/bin/sh\\n\"\n            \"jupytext --pre-commit --sync --pipe-fmt ipynb --pipe \\\\\\n\"\n            \"    'pandoc --from ipynb --to ipynb --markdown-headings=atx'\\n\"\n        )\n\n    st = os.stat(hook)\n    os.chmod(hook, st.st_mode | stat.S_IEXEC)\n\n    nb_file = tmpdir.mkdir(\"notebooks\").mkdir(\"subfolder\").join(\"wrap_markdown.ipynb\")\n    long_text = \"This is a \" + (\"very \" * 24) + \"long sentence.\"\n    nb = new_notebook(cells=[new_markdown_cell(long_text)])\n    write(nb, str(nb_file))\n\n    nb = read(str(nb_file))\n    assert nb.cells[0].source == long_text\n\n    git(\"add\", str(nb_file))\n    git(\"commit\", \"-m\", \"'notebook with long cells'\")\n\n    py_text = tmpdir.join(\"scripts\").join(\"subfolder\").join(\"wrap_markdown.py\").read()\n    assert \"This is a very very\" in py_text\n    for line in py_text.splitlines():\n        assert len(line) <= 79\n\n    nb = read(nb_file, as_version=4)\n    text = nb.cells[0].source\n    assert len(text.splitlines()) >= 2\n    assert text != long_text\n"
  },
  {
    "path": "tests/external/round_trip/test_mirror_external.py",
    "content": "import pytest\n\nfrom jupytext.compare import assert_conversion_same_as_mirror\n\n\"\"\"---------------------------------------------------------------------------------\n\nPart I: ipynb -> fmt -> ipynb\n\n---------------------------------------------------------------------------------\"\"\"\n\n\n@pytest.mark.requires_pandoc\ndef test_ipynb_to_pandoc(ipynb_to_pandoc, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_to_pandoc, \"md:pandoc\", \"ipynb_to_pandoc\")\n\n\n@pytest.mark.requires_quarto\ndef test_ipynb_to_quarto(\n    ipynb_to_quarto,\n    no_jupytext_version_number,\n):\n    assert_conversion_same_as_mirror(ipynb_to_quarto, \"qmd\", \"ipynb_to_quarto\")\n\n\n@pytest.mark.requires_sphinx_gallery\ndef test_ipynb_to_python_sphinx(ipynb_to_sphinx, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_to_sphinx, \"py:sphinx\", \"ipynb_to_sphinx\")\n\n\n\"\"\"---------------------------------------------------------------------------------\n\nPart II: text -> ipynb -> text\n\n---------------------------------------------------------------------------------\"\"\"\n\n\ndef test_Rmd_to_ipynb(rmd_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(rmd_file, \"ipynb\", \"Rmd_to_ipynb\")\n\n\n@pytest.mark.requires_sphinx_gallery\ndef test_sphinx_to_ipynb(sphinx_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(sphinx_file, \"ipynb:sphinx\", \"sphinx_to_ipynb\")\n\n\n@pytest.mark.requires_sphinx_gallery\ndef test_sphinx_md_to_ipynb(sphinx_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(\n        sphinx_file,\n        {\"extension\": \".ipynb\", \"format_name\": \"sphinx\", \"rst2md\": True},\n        \"sphinx-rst2md_to_ipynb\",\n        compare_notebook=True,\n    )\n"
  },
  {
    "path": "tests/external/rst2md/test_rst2md.py",
    "content": "import os\n\nimport pytest\nfrom nbformat.v4.nbbase import new_markdown_cell, new_notebook\n\nfrom jupytext import TextFileContentsManager, read, write\nfrom jupytext.cli import jupytext\n\n\n@pytest.mark.requires_sphinx_gallery\ndef test_rst2md(tmpdir, cwd_tmpdir):\n    tmp_py = \"notebook.py\"\n    tmp_ipynb = \"notebook.ipynb\"\n\n    # Write notebook in sphinx format\n    nb = new_notebook(\n        cells=[\n            new_markdown_cell(\"A short sphinx notebook\"),\n            new_markdown_cell(\":math:`1+1`\"),\n        ]\n    )\n    write(nb, tmp_py, fmt=\"py:sphinx\")\n\n    jupytext(\n        [\n            tmp_py,\n            \"--from\",\n            \"py:sphinx\",\n            \"--to\",\n            \"ipynb\",\n            \"--opt\",\n            \"rst2md=True\",\n            \"--opt\",\n            \"cell_metadata_filter=-all\",\n        ]\n    )\n\n    assert os.path.isfile(tmp_ipynb)\n    nb = read(tmp_ipynb)\n\n    assert nb.metadata[\"jupytext\"][\"cell_metadata_filter\"] == \"-all\"\n    assert nb.metadata[\"jupytext\"][\"rst2md\"] is False\n\n    # Was rst to md conversion effective?\n    assert nb.cells[2].source == \"$1+1$\"\n\n\n@pytest.mark.requires_sphinx_gallery\ndef test_rst2md_option(tmpdir):\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n\n    # Write notebook in sphinx format\n    nb = new_notebook(\n        cells=[\n            new_markdown_cell(\"A short sphinx notebook\"),\n            new_markdown_cell(\":math:`1+1`\"),\n        ]\n    )\n    write(nb, tmp_py, fmt=\"py:sphinx\")\n\n    cm = TextFileContentsManager()\n    cm.sphinx_convert_rst2md = True\n    cm.root_dir = str(tmpdir)\n\n    nb2 = cm.get(\"notebook.py\")[\"content\"]\n\n    # Was rst to md conversion effective?\n    assert nb2.cells[2].source == \"$1+1$\"\n    assert nb2.metadata[\"jupytext\"][\"rst2md\"] is False\n"
  },
  {
    "path": "tests/external/simple_external_notebooks/test_read_simple_pandoc.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.compare import compare, compare_notebooks\nfrom jupytext.pandoc import PandocError\n\n\n@pytest.mark.requires_pandoc\ndef test_pandoc_implicit(\n    cell_id,\n    markdown=\"\"\"# Lorem ipsum\n\n**Lorem ipsum** dolor sit amet, consectetur adipiscing elit. Nunc luctus\nbibendum felis dictum sodales.\n\n``` code\nprint(\"hello\")\n```\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md:pandoc\")\n    markdown2 = jupytext.writes(nb, \"md\")\n\n    nb2 = jupytext.reads(markdown2, \"md\")\n    compare_notebooks(nb2, nb)\n\n    markdown3 = jupytext.writes(nb2, \"md\")\n    compare(markdown3, markdown2)\n\n\n@pytest.mark.requires_pandoc\ndef test_pandoc_explicit(\n    markdown=\"\"\"::: {#cell_id .cell .markdown}\n# Lorem\n\n**Lorem ipsum** dolor sit amet, consectetur adipiscing elit. Nunc luctus\nbibendum felis dictum sodales.\n:::\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(\"\\n\".join(markdown2.splitlines()[12:]), markdown)\n\n\n@pytest.mark.requires_pandoc\ndef test_pandoc_utf8_in_md(\n    markdown=\"\"\"::: {#cell_id .cell .markdown}\n# Utf-8 support\n\nThis is the greek letter $\\\\pi$: π\n:::\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(\"\\n\".join(markdown2.splitlines()[12:]), markdown)\n\n\n@pytest.mark.requires_pandoc\ndef test_pandoc_utf8_in_nb(\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\n                \"\"\"# Utf-8 support\n\nThis is the greek letter $\\\\pi$: π\"\"\"\n            )\n        ]\n    ),\n):\n    markdown = jupytext.writes(nb, \"md:pandoc\")\n    nb2 = jupytext.reads(markdown, \"md:pandoc\")\n    nb2.metadata.pop(\"jupytext\")\n    compare_notebooks(nb, nb2, \"md:pandoc\")\n\n\n@pytest.mark.requires_no_pandoc\ndef test_meaningfull_error_when_pandoc_is_missing(tmpdir):\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    jupytext.write(new_notebook(), str(nb_file))\n\n    with pytest.raises(PandocError, match=\"The Pandoc Markdown format requires 'pandoc>=2.7.2'\"):\n        jupytext_cli([str(nb_file), \"--to\", \"md:pandoc\"])\n"
  },
  {
    "path": "tests/external/simple_external_notebooks/test_read_simple_quarto.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks\n\n\n@pytest.mark.requires_quarto\ndef test_qmd_to_ipynb(\n    qmd=\"\"\"Some text\n\n```{python}\n1 + 1\n```\n\"\"\",\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\"Some text\"),\n            new_code_cell(\"1 + 1\"),\n        ],\n        metadata={\n            \"kernelspec\": {\n                \"display_name\": \"python_kernel\",\n                \"language\": \"python\",\n                \"name\": \"python_kernel\",\n            }\n        },\n    ),\n):\n    nb2 = jupytext.reads(qmd, \"qmd\")\n    compare_notebooks(nb2, nb, fmt=\"qmd\")\n\n    # after a round trip we do get a yaml header.\n    # here we remove it to make the comparison\n    qmd2 = jupytext.writes(nb, \"qmd\")\n    qmd2_without_header = qmd2.rsplit(\"---\\n\\n\", 1)[1]\n    compare(qmd2_without_header, qmd)\n"
  },
  {
    "path": "tests/external/test_marimo.py",
    "content": "from jupytext.marimo import marimo_py_to_notebook, notebook_to_marimo_py, marimo_version\nimport pytest\nfrom nbformat.v4.nbbase import new_notebook, new_code_cell\nfrom jupytext.compare import compare, compare_notebooks\nfrom jupytext.formats import guess_format\n\n\n@pytest.fixture\ndef py_marimo() -> str:\n    return f\"\"\"import marimo\n\n__generated_with = \"{marimo_version()}\"\napp = marimo.App()\n\n\n@app.cell\ndef _():\n    x = 1\n    return\n\n\nif __name__ == \"__main__\":\n    app.run()\"\"\"\n\n\n@pytest.fixture\ndef notebook():\n    return new_notebook(cells=[new_code_cell(\"x = 1\")])\n\n\ndef test_guess_format(py_marimo):\n    assert guess_format(py_marimo, \".py\") == (\"marimo\", {})\n\n\n@pytest.mark.requires_marimo\ndef test_notebook_to_py_marimo(py_marimo, notebook):\n    actual = notebook_to_marimo_py(notebook)\n    compare(actual, py_marimo)\n\n\n@pytest.mark.requires_marimo\ndef test_marimo_py_to_notebook(py_marimo, notebook):\n    actual = marimo_py_to_notebook(py_marimo)\n    compare_notebooks(actual, notebook)\n"
  },
  {
    "path": "tests/functional/cli/test_cli.py",
    "content": "import os\nimport sys\nimport time\nimport unittest.mock as mock\nimport warnings\nfrom argparse import ArgumentTypeError\nfrom io import StringIO\nfrom shutil import copyfile\nfrom subprocess import check_call\n\nimport nbformat\nimport pytest\nfrom jupyter_client.kernelspec import find_kernel_specs, get_kernel_spec\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nfrom jupytext import __version__, read, reads, write, writes\nfrom jupytext.cli import jupytext, parse_jupytext_args, str2bool, system\nfrom jupytext.compare import compare, compare_notebooks\nfrom jupytext.formats import JupytextFormatError, long_form_one_format\nfrom jupytext.myst import is_myst_available\nfrom jupytext.paired_paths import InconsistentPath, paired_paths\nfrom jupytext.pandoc import is_pandoc_available\n\n\ndef test_str2bool():\n    assert str2bool(\"d\") is None\n    assert str2bool(\"TRUE\") is True\n    assert str2bool(\"0\") is False\n    with pytest.raises(ArgumentTypeError):\n        str2bool(\"UNEXPECTED\")\n\n\ndef test_cli_single_file(ipynb_py_R_jl_file):\n    assert parse_jupytext_args([ipynb_py_R_jl_file] + [\"--to\", \"py\"]).notebooks == [ipynb_py_R_jl_file]\n\n\ndef test_cli_multiple_files(ipynb_py_R_jl_files):\n    assert parse_jupytext_args(ipynb_py_R_jl_files + [\"--to\", \"py\"]).notebooks == ipynb_py_R_jl_files\n\n\ndef test_convert_single_file_in_place(ipynb_py_file, tmpdir):\n    nb_org = str(tmpdir.join(os.path.basename(ipynb_py_file)))\n    copyfile(ipynb_py_file, nb_org)\n\n    base, ext = os.path.splitext(nb_org)\n    nb_other = base + \".py\"\n\n    jupytext([nb_org, \"--to\", \"py\"])\n\n    nb1 = read(nb_org)\n    nb2 = read(nb_other)\n\n    compare_notebooks(nb2, nb1)\n\n\ndef test_convert_single_file_in_place_m(ipynb_py_file, tmpdir):\n    nb_org = str(tmpdir.join(os.path.basename(ipynb_py_file)))\n    copyfile(ipynb_py_file, nb_org)\n\n    base, ext = os.path.splitext(nb_org)\n\n    for fmt_ext in (\"py\", \"Rmd\"):\n        nb_other = base + \".\" + fmt_ext\n\n        check_call([sys.executable, \"-m\", \"jupytext\", nb_org, \"--to\", fmt_ext])\n\n        nb1 = read(nb_org)\n        nb2 = read(nb_other)\n\n        compare_notebooks(nb2, nb1)\n\n\ndef test_convert_single_file(ipynb_or_rmd_file, tmpdir, capsys):\n    nb_org = str(tmpdir.join(os.path.basename(ipynb_or_rmd_file)))\n    copyfile(ipynb_or_rmd_file, nb_org)\n\n    nb1 = read(ipynb_or_rmd_file)\n    pynb = writes(nb1, \"py\")\n    jupytext([nb_org, \"--to\", \"py\", \"-o\", \"-\"])\n\n    out, err = capsys.readouterr()\n    assert err == \"\"\n    compare(out, pynb)\n\n\ndef test_jupytext_version(capsys):\n    jupytext([\"--version\"])\n\n    out, err = capsys.readouterr()\n    assert err == \"\"\n    compare(out, __version__ + \"\\n\")\n\n\ndef test_wildcard(tmpdir):\n    nb1_ipynb = str(tmpdir.join(\"nb1.ipynb\"))\n    nb2_ipynb = str(tmpdir.join(\"nb2.ipynb\"))\n\n    nb1_py = str(tmpdir.join(\"nb1.py\"))\n    nb2_py = str(tmpdir.join(\"nb2.py\"))\n\n    write(new_notebook(metadata={\"notebook\": 1}), nb1_ipynb)\n    write(new_notebook(metadata={\"notebook\": 2}), nb2_ipynb)\n\n    os.chdir(str(tmpdir))\n    jupytext([\"nb*.ipynb\", \"--to\", \"py\"])\n\n    assert os.path.isfile(nb1_py)\n    assert os.path.isfile(nb2_py)\n\n    with pytest.raises(IOError):\n        jupytext([\"nb3.ipynb\", \"--to\", \"py\"])\n\n\ndef test_to_cpluplus(ipynb_cpp_file, tmpdir, capsys):\n    nb_org = str(tmpdir.join(os.path.basename(ipynb_cpp_file)))\n    copyfile(ipynb_cpp_file, nb_org)\n    nb1 = read(nb_org)\n\n    text_cpp = writes(nb1, \"cpp\")\n    jupytext([nb_org, \"--to\", \"c++\", \"--output\", \"-\"])\n\n    out, err = capsys.readouterr()\n    assert err == \"\"\n    compare(out, text_cpp)\n\n\ndef test_convert_multiple_file(ipynb_py_files, tmpdir):\n    nb_orgs = []\n    nb_others = []\n\n    for nb_file in ipynb_py_files:\n        nb_org = str(tmpdir.join(os.path.basename(nb_file)))\n        base, ext = os.path.splitext(nb_org)\n        nb_other = base + \".py\"\n        copyfile(nb_file, nb_org)\n        nb_orgs.append(nb_org)\n        nb_others.append(nb_other)\n\n    jupytext(nb_orgs + [\"--to\", \"py\"])\n\n    for nb_org, nb_other in zip(nb_orgs, nb_others):\n        nb1 = read(nb_org)\n        nb2 = read(nb_other)\n        compare_notebooks(nb2, nb1)\n\n\ndef test_error_not_notebook_ext_input(tmpdir, capsys):\n    tmp_file = str(tmpdir.join(\"notebook.ext\"))\n    with open(tmp_file, \"w\") as fp:\n        fp.write(\"\\n\")\n\n    with pytest.raises(InconsistentPath, match=\"is not a notebook. Supported extensions are\"):\n        jupytext([tmp_file, \"--to\", \"py\"])\n\n\n@pytest.fixture\ndef tmp_ipynb(tmpdir):\n    tmp_file = str(tmpdir.join(\"notebook.ipynb\"))\n    write(new_notebook(), tmp_file)\n    return tmp_file\n\n\n@pytest.fixture\ndef tmp_py(tmpdir):\n    tmp_file = str(tmpdir.join(\"notebook.py\"))\n    with open(tmp_file, \"w\") as fp:\n        fp.write(\"\\n\")\n    return tmp_file\n\n\ndef test_error_not_notebook_ext_to(tmp_ipynb):\n    with pytest.raises(JupytextFormatError, match=\"'ext' is not a notebook extension\"):\n        jupytext([tmp_ipynb, \"--to\", \"ext\"])\n\n\ndef test_error_not_notebook_ext_output(tmp_ipynb, tmpdir):\n    with pytest.raises(\n        JupytextFormatError,\n        match=\"Extension '.ext' is not a notebook extension. Please use one of\",\n    ):\n        jupytext([tmp_ipynb, \"-o\", str(tmpdir.join(\"not.ext\"))])\n\n\ndef test_error_not_same_ext(tmp_ipynb, tmpdir):\n    with pytest.raises(InconsistentPath):\n        jupytext([tmp_ipynb, \"--to\", \"py\", \"-o\", str(tmpdir.join(\"not.md\"))])\n\n\ndef test_error_no_action(tmp_ipynb):\n    with pytest.raises(ValueError, match=\"Please provide one of\"):\n        jupytext([tmp_ipynb])\n\n\ndef test_error_update_not_ipynb(tmp_py):\n    with pytest.raises(ValueError, match=\"--update is only for ipynb files\"):\n        jupytext([tmp_py, \"--to\", \"py\", \"--update\"])\n\n\ndef test_error_multiple_input(tmp_ipynb):\n    with pytest.raises(ValueError, match=\"Please input a single notebook when using --output\"):\n        jupytext([tmp_ipynb, tmp_ipynb, \"--to\", \"py\", \"-o\", \"notebook.py\"])\n\n\ndef test_error_opt_missing_equal(tmp_ipynb):\n    with pytest.raises(ValueError, match=\"key=value\"):\n        jupytext([tmp_ipynb, \"--to\", \"py\", \"--opt\", \"missing_equal\"])\n\n\ndef test_error_unknown_opt(tmp_ipynb):\n    with pytest.raises(ValueError, match=\"is not a valid format option\"):\n        jupytext([tmp_ipynb, \"--to\", \"py\", \"--opt\", \"unknown=true\"])\n\n\ndef test_combine_same_version_ok(tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_nbpy = str(tmpdir.join(\"notebook.py\"))\n    tmp_rmd = str(tmpdir.join(\"notebook.Rmd\"))\n\n    with open(tmp_nbpy, \"w\") as fp:\n        fp.write(\n            \"\"\"# ---\n# jupyter:\n#   jupytext_formats: ipynb,py\n#   jupytext_format_version: '1.2'\n# ---\n\n# New cell\n\"\"\"\n        )\n\n    nb = new_notebook(metadata={\"jupytext_formats\": \"ipynb,py\"})\n    write(nb, tmp_ipynb)\n\n    # to jupyter notebook\n    jupytext([tmp_nbpy, \"--to\", \"ipynb\", \"--update\"])\n    # test round trip\n    jupytext([tmp_nbpy, \"--to\", \"notebook\", \"--test\"])\n    # test ipynb to rmd\n    jupytext([tmp_ipynb, \"--to\", \"rmarkdown\"])\n\n    nb = read(tmp_ipynb)\n    cells = nb[\"cells\"]\n    assert len(cells) == 1\n    assert cells[0].cell_type == \"markdown\"\n    assert cells[0].source == \"New cell\"\n\n    nb = read(tmp_rmd)\n    cells = nb[\"cells\"]\n    assert len(cells) == 1\n    assert cells[0].cell_type == \"markdown\"\n    assert cells[0].source == \"New cell\"\n\n\ndef test_combine_lower_version_raises(tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_nbpy = str(tmpdir.join(\"notebook.py\"))\n\n    with open(tmp_nbpy, \"w\") as fp:\n        fp.write(\n            \"\"\"# ---\n# jupyter:\n#   jupytext:\n#     formats: ipynb,py:light\n#     text_representation:\n#       extension: .py\n#       format_name: light\n#       format_version: '55.4'\n#       jupytext_version: 42.1.1\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# New cell\n\"\"\"\n        )\n\n    nb = new_notebook(metadata={\"jupytext_formats\": \"ipynb,py\"})\n    write(nb, tmp_ipynb)\n\n    with pytest.raises(\n        ValueError,\n        match=\"The file notebook.py was generated with jupytext version 42.1.1 but you have .* installed. \"\n        \"Please upgrade jupytext to version 42.1.1, or remove either notebook.py or notebook.ipynb. \"\n        \"This error occurs because notebook.py is in the light format in version 55.4, \"\n        \"while jupytext version .* installed at .* can only read the light format in versions .*\",\n    ):\n        jupytext([tmp_nbpy, \"--to\", \"ipynb\", \"--update\"])\n\n\ndef test_ipynb_to_py_then_update_test(ipynb_py_file, tmpdir):\n    \"\"\"Reproduce https://github.com/mwouts/jupytext/issues/83\"\"\"\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_nbpy = str(tmpdir.join(\"notebook.py\"))\n\n    copyfile(ipynb_py_file, tmp_ipynb)\n\n    jupytext([\"--to\", \"py\", tmp_ipynb])\n    jupytext([\"--test\", \"--update\", \"--to\", \"ipynb\", tmp_nbpy])\n\n\ndef test_test_to_ipynb_ignore_version_number_414(\n    tmpdir,\n    text=\"\"\"# ---\n# jupyter:\n#   jupytext:\n#     text_representation:\n#       extension: .py\n#       format_name: light\n#       format_version: '1.4'\n#       jupytext_version: 1.1.0\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# A short markdown cell\n\n# Followed by a code cell\n2 + 2\n\"\"\",\n):\n    tmp_py = str(tmpdir.join(\"script.py\"))\n    with open(tmp_py, \"w\") as fp:\n        fp.write(text)\n\n    assert jupytext([\"--test\", \"--to\", \"ipynb\", tmp_py]) == 0\n\n\ndef test_convert_to_percent_format(ipynb_py_file, tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_nbpy = str(tmpdir.join(\"notebook.py\"))\n\n    copyfile(ipynb_py_file, tmp_ipynb)\n\n    jupytext([\"--to\", \"py:percent\", tmp_ipynb])\n\n    with open(tmp_nbpy) as stream:\n        py_script = stream.read()\n        assert \"format_name: percent\" in py_script\n\n    nb1 = read(tmp_ipynb)\n    nb2 = read(tmp_nbpy)\n\n    compare_notebooks(nb2, nb1)\n\n\ndef test_convert_to_percent_format_and_keep_magics(ipynb_py_file, tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_nbpy = str(tmpdir.join(\"notebook.py\"))\n\n    copyfile(ipynb_py_file, tmp_ipynb)\n\n    jupytext([\"--to\", \"py:percent\", \"--opt\", \"comment_magics=False\", tmp_ipynb])\n\n    with open(tmp_nbpy) as stream:\n        py_script = stream.read()\n        assert \"format_name: percent\" in py_script\n        assert \"comment_magics: false\" in py_script\n        assert \"# %%time\" not in py_script\n\n    nb1 = read(tmp_ipynb)\n    nb2 = read(tmp_nbpy)\n\n    compare_notebooks(nb2, nb1)\n\n\ndef test_set_formats(python_file, tmpdir):\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n\n    copyfile(python_file, tmp_py)\n\n    jupytext([tmp_py, \"--set-formats\", \"ipynb,py:light\"])\n    nb = read(tmp_ipynb)\n    assert nb.metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:light\"\n\n\ndef test_update_metadata(python_file, tmpdir, capsys):\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n\n    copyfile(python_file, tmp_py)\n\n    jupytext(\n        [\n            \"--to\",\n            \"ipynb\",\n            tmp_py,\n            \"--update-metadata\",\n            '{\"jupytext\":{\"formats\":\"ipynb,py:light\"}}',\n        ]\n    )\n\n    nb = read(tmp_ipynb)\n    assert nb.metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:light\"\n\n    jupytext([\"--to\", \"py\", tmp_ipynb, \"--update-metadata\", '{\"jupytext\":{\"formats\":null}}'])\n\n    nb = read(tmp_py)\n    assert \"formats\" not in nb.metadata[\"jupytext\"]\n\n    with pytest.raises(SystemExit):\n        jupytext([\"--to\", \"ipynb\", tmp_py, \"--update-metadata\", '{\"incorrect\": \"JSON\"'])\n\n    out, err = capsys.readouterr()\n    assert \"invalid\" in err\n\n\n@pytest.mark.requires_user_kernel_python3\ndef test_set_kernel_inplace(python_file, tmpdir):\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n\n    copyfile(python_file, tmp_py)\n\n    jupytext([tmp_py, \"--set-kernel\", \"-\"])\n\n    nb = read(tmp_py)\n    kernel_name = nb.metadata[\"kernelspec\"][\"name\"]\n    cmd = get_kernel_spec(kernel_name).argv[0]\n    assert cmd == \"python\" or os.path.samefile(cmd, sys.executable)\n\n\n@pytest.mark.requires_user_kernel_python3\ndef test_set_kernel_auto(python_file, tmpdir):\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n\n    copyfile(python_file, tmp_py)\n\n    jupytext([\"--to\", \"ipynb\", tmp_py, \"--set-kernel\", \"-\"])\n\n    nb = read(tmp_ipynb)\n    kernel_name = nb.metadata[\"kernelspec\"][\"name\"]\n    cmd = get_kernel_spec(kernel_name).argv[0]\n    assert cmd == \"python\" or os.path.samefile(cmd, sys.executable)\n\n\n@pytest.mark.requires_user_kernel_python3\ndef test_set_kernel_with_name(python_file, tmpdir):\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n\n    copyfile(python_file, tmp_py)\n\n    for kernel in find_kernel_specs():\n        jupytext([\"--to\", \"ipynb\", tmp_py, \"--set-kernel\", kernel])\n\n        nb = read(tmp_ipynb)\n        assert nb.metadata[\"kernelspec\"][\"name\"] == kernel\n\n    with pytest.raises(KeyError):\n        jupytext([\"--to\", \"ipynb\", tmp_py, \"--set-kernel\", \"non_existing_env\"])\n\n\ndef test_paired_paths(ipynb_py_file, tmpdir, capsys):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    nb = read(ipynb_py_file)\n    nb.metadata.setdefault(\"jupytext\", {})[\"formats\"] = \"ipynb,_light.py,_percent.py:percent\"\n    write(nb, tmp_ipynb)\n\n    jupytext([\"--paired-paths\", tmp_ipynb])\n\n    out, err = capsys.readouterr()\n    assert not err\n\n    formats = nb.metadata.get(\"jupytext\", {}).get(\"formats\")\n    assert set(out.splitlines()).union([tmp_ipynb]) == {path for path, _ in paired_paths(tmp_ipynb, \"ipynb\", formats)}\n\n\ndef test_sync(ipynb_py_file, tmpdir, cwd_tmpdir, capsys):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_py = \"notebook.py\"\n    tmp_rmd = \"notebook.Rmd\"\n    nb = read(ipynb_py_file)\n    write(nb, tmp_ipynb)\n\n    # Test that sync issues a warning when the notebook is not paired\n    jupytext([\"--sync\", tmp_ipynb])\n    _, err = capsys.readouterr()\n    assert \"is not a paired notebook\" in err\n\n    # Now with a pairing information\n    nb.metadata.setdefault(\"jupytext\", {})[\"formats\"] = \"py,Rmd,ipynb\"\n    write(nb, tmp_ipynb)\n\n    # Test that missing files are created\n    jupytext([\"--sync\", tmp_ipynb])\n\n    assert os.path.isfile(tmp_py)\n    compare_notebooks(read(tmp_py), nb)\n\n    assert os.path.isfile(tmp_rmd)\n    compare_notebooks(read(tmp_rmd), nb, \"Rmd\")\n\n    write(nb, tmp_rmd, fmt=\"Rmd\")\n    jupytext([\"--sync\", tmp_ipynb])\n\n    nb2 = read(tmp_ipynb)\n    compare_notebooks(nb2, nb, \"Rmd\", compare_outputs=True)\n\n    write(nb, tmp_py, fmt=\"py\")\n    jupytext([\"--sync\", tmp_ipynb])\n\n    nb2 = read(tmp_ipynb)\n    compare_notebooks(nb2, nb, compare_outputs=True)\n\n    # Finally we recreate the ipynb\n    os.remove(tmp_ipynb)\n\n    time.sleep(0.1)\n    jupytext([\"--sync\", tmp_py])\n\n    nb2 = read(tmp_ipynb)\n    compare_notebooks(nb2, nb)\n\n    # ipynb must be older than py file, otherwise our Contents Manager will complain\n    assert os.path.getmtime(tmp_ipynb) <= os.path.getmtime(tmp_py)\n\n\n@pytest.mark.requires_pandoc\ndef test_sync_pandoc(ipynb_to_pandoc, tmpdir, cwd_tmpdir, capsys):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_md = \"notebook.md\"\n    nb = read(ipynb_to_pandoc)\n    write(nb, tmp_ipynb)\n\n    # Test that sync issues a warning when the notebook is not paired\n    jupytext([\"--sync\", tmp_ipynb])\n    _, err = capsys.readouterr()\n    assert \"is not a paired notebook\" in err\n\n    # Now with a pairing information\n    nb.metadata.setdefault(\"jupytext\", {})[\"formats\"] = \"ipynb,md:pandoc\"\n    write(nb, tmp_ipynb)\n\n    # Test that missing files are created\n    jupytext([\"--sync\", tmp_ipynb])\n\n    assert os.path.isfile(tmp_md)\n    compare_notebooks(read(tmp_md), nb, \"md:pandoc\")\n\n    with open(tmp_md) as fp:\n        assert \"pandoc\" in fp.read()\n\n\ndef test_cli_can_infer_jupytext_format(ipynb_py_R_jl_file, ipynb_py_R_jl_ext, tmpdir, cwd_tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_text = \"notebook\" + ipynb_py_R_jl_ext\n    nb = read(ipynb_py_R_jl_file)\n\n    # Light format to Jupyter notebook\n    write(nb, tmp_text)\n    jupytext([\"--to\", \"notebook\", tmp_text])\n    nb2 = read(tmp_ipynb)\n    compare_notebooks(nb2, nb)\n\n    # Percent format to Jupyter notebook\n    write(nb, tmp_text, fmt=ipynb_py_R_jl_ext + \":percent\")\n    jupytext([\"--to\", \"notebook\", tmp_text])\n    nb2 = read(tmp_ipynb)\n    compare_notebooks(nb2, nb)\n\n\ndef test_cli_to_script(ipynb_py_R_jl_file, ipynb_py_R_jl_ext, tmpdir, cwd_tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_text = \"notebook\" + ipynb_py_R_jl_ext\n    nb = read(ipynb_py_R_jl_file)\n\n    write(nb, tmp_ipynb)\n    jupytext([\"--to\", \"script\", tmp_ipynb])\n    nb2 = read(tmp_text)\n    compare_notebooks(nb2, nb)\n\n\ndef test_cli_to_auto(ipynb_py_R_jl_file, ipynb_py_R_jl_ext, tmpdir, cwd_tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_text = \"notebook\" + ipynb_py_R_jl_ext\n    nb = read(ipynb_py_R_jl_file)\n\n    write(nb, tmp_ipynb)\n    jupytext([\"--to\", \"auto\", tmp_ipynb])\n    nb2 = read(tmp_text)\n    compare_notebooks(nb2, nb)\n\n\ndef test_cli_can_infer_jupytext_format_from_stdin(ipynb_py_file, tmpdir, cwd_tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_py = \"notebook.py\"\n    tmp_rmd = \"notebook.Rmd\"\n    nb = read(ipynb_py_file)\n\n    # read ipynb notebook on stdin, write to python\n    with open(ipynb_py_file) as fp, mock.patch(\"sys.stdin\", fp):\n        jupytext([\"--to\", \"py:percent\", \"-o\", tmp_py])\n    nb2 = read(tmp_py)\n    compare_notebooks(nb2, nb)\n\n    # read python notebook on stdin, write to ipynb\n    with open(tmp_py) as fp, mock.patch(\"sys.stdin\", fp):\n        jupytext([\"-o\", tmp_ipynb])\n    nb2 = read(tmp_ipynb)\n    compare_notebooks(nb2, nb)\n\n    # read ipynb notebook on stdin, write to R markdown\n    with open(ipynb_py_file) as fp, mock.patch(\"sys.stdin\", fp):\n        jupytext([\"-o\", tmp_rmd])\n    nb2 = read(tmp_rmd)\n    compare_notebooks(nb2, nb, \"Rmd\")\n\n    # read markdown notebook on stdin, write to ipynb\n    with open(tmp_rmd) as fp, mock.patch(\"sys.stdin\", fp):\n        jupytext([\"-o\", tmp_ipynb])\n    nb2 = read(tmp_ipynb)\n    compare_notebooks(nb2, nb, \"Rmd\")\n\n\n@pytest.mark.requires_user_kernel_python3\ndef test_set_kernel_works_with_pipes_326(capsys):\n    md = \"\"\"```python\n1 + 1\n```\"\"\"\n\n    with mock.patch(\"sys.stdin\", StringIO(md)):\n        jupytext([\"--to\", \"ipynb\", \"--set-kernel\", \"-\", \"-\"])\n\n    out, err = capsys.readouterr()\n    assert err == \"\"\n    nb = reads(out, \"ipynb\")\n    assert \"kernelspec\" in nb.metadata\n\n\n@pytest.mark.filterwarnings(\"ignore:The --pre-commit argument is deprecated\")\ndef test_cli_expect_errors(tmp_ipynb):\n    with pytest.raises(ValueError):\n        jupytext([])\n    with pytest.raises(ValueError):\n        jupytext([\"--sync\"])\n    with pytest.raises(ValueError):\n        jupytext([tmp_ipynb, tmp_ipynb, \"--paired-paths\"])\n    with pytest.raises(ValueError):\n        jupytext([\"--pre-commit\", \"notebook.ipynb\"])\n    with pytest.raises(ValueError):\n        jupytext([\"notebook.ipynb\", \"--from\", \"py:percent\", \"--to\", \"md\"])\n    with pytest.raises(ValueError):\n        jupytext([])\n    with pytest.raises((SystemExit, TypeError)):  # SystemExit on Windows, TypeError on Linux\n        system(\"jupytext\", [\"notebook.ipynb\", \"--from\", \"py:percent\", \"--to\", \"md\"])\n\n\n@pytest.mark.filterwarnings(\n    \"error\",\n    \"ignore:You might have passed a file name to the '--to' option, \"\n    \"when a format description was expected. \"\n    \"Maybe you want to use the '-o' option instead?\",\n)\ndef test_format_prefix_suffix(tmpdir, cwd_tmpdir):\n    os.makedirs(\"notebooks\")\n    tmp_ipynb = \"notebooks/notebook_name.ipynb\"\n    tmp_py = \"scripts/notebook_name.py\"\n    write(new_notebook(), tmp_ipynb)\n\n    jupytext([tmp_ipynb, \"--to\", \"../scripts//py\"])\n    assert os.path.isfile(tmp_py)\n    os.remove(tmp_py)\n\n    jupytext([tmp_ipynb, \"--to\", \"scripts//py\", \"--from\", \"notebooks//ipynb\"])\n    assert os.path.isfile(tmp_py)\n    os.remove(tmp_py)\n\n    tmp_ipynb = \"notebooks/nb_prefix_notebook_name.ipynb\"\n    tmp_py = \"scripts/script_prefix_notebook_name.py\"\n    write(new_notebook(), tmp_ipynb)\n\n    jupytext(\n        [\n            tmp_ipynb,\n            \"--to\",\n            \"scripts/script_prefix_/py\",\n            \"--from\",\n            \"notebooks/nb_prefix_/ipynb\",\n        ]\n    )\n    assert os.path.isfile(tmp_py)\n    os.remove(tmp_py)\n\n    tmp_ipynb = \"notebooks/nb_prefix_notebook_name_nb_suffix.ipynb\"\n    tmp_py = \"scripts/script_prefix_notebook_name_script_suffix.py\"\n    write(new_notebook(), tmp_ipynb)\n\n    jupytext(\n        [\n            tmp_ipynb,\n            \"--to\",\n            \"scripts/script_prefix_/_script_suffix.py\",\n            \"--from\",\n            \"notebooks/nb_prefix_/_nb_suffix.ipynb\",\n        ]\n    )\n    assert os.path.isfile(tmp_py)\n    os.remove(tmp_py)\n\n\ndef test_cli_sync_file_with_suffix(tmpdir, cwd_tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_pct_py = \"notebook.pct.py\"\n    tmp_lgt_py = \"notebook.lgt.py\"\n    tmp_rmd = \"notebook.Rmd\"\n    nb = new_notebook(\n        cells=[new_code_cell(source=\"1+1\")],\n        metadata={\"jupytext\": {\"formats\": \"ipynb,.pct.py:percent,.lgt.py:light,Rmd\"}},\n    )\n\n    write(nb, tmp_pct_py, fmt=\".pct.py:percent\")\n    jupytext([\"--sync\", tmp_pct_py])\n    assert os.path.isfile(tmp_lgt_py)\n    assert os.path.isfile(tmp_rmd)\n    assert os.path.isfile(tmp_ipynb)\n\n    jupytext([\"--sync\", tmp_lgt_py])\n    jupytext([\"--sync\", tmp_ipynb])\n\n    with open(tmp_lgt_py) as fp:\n        assert fp.read().splitlines()[-2:] == [\"\", \"1+1\"]\n    with open(tmp_pct_py) as fp:\n        fp.read().splitlines()[-3:] == [\"\", \"# %%\", \"1+1\"]\n    with open(tmp_rmd) as fp:\n        fp.read().splitlines()[-4:] == [\"\", \"```{python}\", \"1+1\", \"```\"]\n\n\ndef test_cli_sync_file_with_prefix_974(tmp_path, python_notebook):\n    \"\"\"Only the files that are in the example directory and that start with 'example' should be paired\"\"\"\n    (tmp_path / \"pyproject.toml\").write_text(\n        \"\"\"[tool.jupytext]\nformats = \"examples//example/ipynb,examples//example/py:percent\"\n\"\"\"\n    )\n\n    write(python_notebook, tmp_path / \"example_notebook.ipynb\")\n    (tmp_path / \"examples\" / \"folder1\").mkdir(parents=True)\n    write(python_notebook, tmp_path / \"examples/folder1/utils.py\")\n    write(python_notebook, tmp_path / \"examples/folder1/example_paired.ipynb\")\n\n    jupytext(\n        [\n            \"--sync\",\n            str(tmp_path / \"example_notebook.ipynb\"),\n            str(tmp_path / \"examples/folder1/utils.py\"),\n            str(tmp_path / \"examples/folder1/example_paired.ipynb\"),\n        ]\n    )\n\n    assert not (tmp_path / \"example_notebook.py\").exists(), \"Not in the 'examples' directory\"\n    assert not (tmp_path / \"examples/folder1/utils_not_paired.ipynb\").exists(), \"Not with the 'example' prefix\"\n    assert (tmp_path / \"examples/folder1/example_paired.py\").exists(), \"Paired\"\n\n\ndef test_remove_jupytext_metadata(tmpdir, cwd_tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    nb = new_notebook(\n        metadata={\n            \"jupytext\": {\n                \"main_language\": \"python\",\n                \"text_representation\": {\n                    \"extension\": \".md\",\n                    \"format_name\": \"markdown\",\n                    \"format_version\": \"1.0\",\n                    \"jupytext_version\": \"0.8.6\",\n                },\n            }\n        }\n    )\n\n    nbformat.write(nb, tmp_ipynb, version=nbformat.NO_CONVERT)\n    # Jupytext removes the 'text_representation' information from the notebook\n    jupytext([tmp_ipynb, \"--update-metadata\", '{\"jupytext\":{\"main_language\":null}}'])\n    nb2 = read(tmp_ipynb)\n    assert not nb2.metadata\n\n    nbformat.write(nb, tmp_ipynb, version=nbformat.NO_CONVERT)\n    jupytext([tmp_ipynb, \"--set-formats\", \"ipynb,py:light\"])\n\n    nb2 = read(tmp_ipynb)\n    assert nb2.metadata == {\"jupytext\": {\"formats\": \"ipynb,py:light\", \"main_language\": \"python\"}}\n\n\n@pytest.mark.parametrize(\"fmt\", [\"py:light\", \"py:percent\", \"md\"])\ndef test_convert_and_update_preserves_notebook(ipynb_py_file, fmt, tmpdir, cwd_tmpdir):\n    # cannot encode magic parameters in markdown yet\n    if (\"magic\" in ipynb_py_file or \"LateX\" in ipynb_py_file) and fmt == \"md\":\n        return\n\n    tmp_ipynb = \"notebook.ipynb\"\n    copyfile(ipynb_py_file, tmp_ipynb)\n    ext = long_form_one_format(fmt)[\"extension\"]\n    tmp_text = \"notebook\" + ext\n\n    jupytext([\"--to\", fmt, tmp_ipynb])\n    jupytext([\"--to\", \"ipynb\", \"--update\", tmp_text])\n\n    nb_org = read(ipynb_py_file)\n    nb_now = read(tmp_ipynb)\n\n    # The cell marker changes from \"\"\" to r\"\"\" on the LateX notebook #836\n    if \"LateX\" in ipynb_py_file and fmt == \"py:percent\":\n        last_cell = nb_now.cells[-1]\n        last_cell.metadata[\"cell_marker\"] = last_cell.metadata[\"cell_marker\"][1:]\n\n    compare(nb_now, nb_org)\n\n\ndef test_incorrect_notebook_causes_early_exit(tmpdir, cwd_tmpdir):\n    incorrect_ipynb = \"incorrect.ipynb\"\n    incorrect_md = \"incorrect.md\"\n    with open(incorrect_ipynb, \"w\") as fp:\n        fp.write('{\"nbformat\": 4, \"nbformat_minor\": 2, \"metadata\": {INCORRECT}, \"cells\": []}')\n\n    correct_ipynb = \"correct.ipynb\"\n    correct_md = \"correct.md\"\n    with open(correct_ipynb, \"w\") as fp:\n        fp.write('{\"nbformat\": 4, \"nbformat_minor\": 2, \"metadata\": {}, \"cells\": []}')\n\n    with pytest.raises(nbformat.reader.NotJSONError, match=\"Notebook does not appear to be JSON\"):\n        jupytext([incorrect_ipynb, correct_ipynb, \"--to\", \"md\"])\n\n    assert not os.path.exists(incorrect_md)\n    assert not os.path.exists(correct_md)\n\n\ndef test_warn_only_skips_incorrect_notebook(tmpdir, cwd_tmpdir, capsys):\n    incorrect_ipynb = \"incorrect.ipynb\"\n    incorrect_md = \"incorrect.md\"\n    with open(incorrect_ipynb, \"w\") as fp:\n        fp.write('{\"nbformat\": 4, \"nbformat_minor\": 2, \"metadata\": {INCORRECT}, \"cells\": []}')\n\n    correct_ipynb = \"correct.ipynb\"\n    correct_md = \"correct.md\"\n    with open(correct_ipynb, \"w\") as fp:\n        fp.write('{\"nbformat\": 4, \"nbformat_minor\": 2, \"metadata\": {}, \"cells\": []}')\n\n    jupytext([incorrect_ipynb, correct_ipynb, \"--to\", \"md\", \"--warn-only\"])\n\n    _, err = capsys.readouterr()\n    assert \"Notebook does not appear to be JSON\" in str(err)\n\n    assert not os.path.exists(incorrect_md)\n    assert os.path.exists(correct_md)\n\n\n@pytest.mark.parametrize(\"fmt\", [\"md\", \"Rmd\", \"py\", \"py:percent\", \"py:hydrogen\"])\ndef test_339_ipynb(tmpdir, cwd_tmpdir, fmt):\n    tmp_ipynb = \"test.ipynb\"\n    nb = new_notebook(cells=[new_code_cell(\"cat = 42\")])\n    nbformat.write(nb, tmp_ipynb)\n\n    assert jupytext([tmp_ipynb, \"--to\", fmt, \"--test-strict\"]) == 0\n\n\ndef test_339_py(tmpdir, cwd_tmpdir):\n    \"\"\"Test that an incorrect round trip conversion on the text file is detected\"\"\"\n    tmp_py = \"test.py\"\n    with open(tmp_py, \"w\") as fp:\n        fp.write(\n            \"\"\"# %%\ncat = 42\n\"\"\"\n        )\n\n    def erroneous_is_magic(line, language, comment_magics, explicitly_code):\n        return \"cat\" in line\n\n    with mock.patch(\"jupytext.magics.is_magic\", erroneous_is_magic):\n        assert jupytext([tmp_py, \"--to\", \"ipynb\", \"--test-strict\"]) != 0\n\n\ndef test_339_require_to(tmpdir, cwd_tmpdir):\n    \"\"\"Test that the `--to` argument is asked for when a `--test` command is provided\"\"\"\n    with pytest.raises(ValueError, match=\"--to\"):\n        jupytext([\"test.py\", \"--test-strict\"])\n\n\ndef test_399_to_script_then_set_formats(tmpdir, cwd_tmpdir):\n    nb = new_notebook(cells=[new_code_cell(\"1 + 1\")])\n    tmp_py = \"notebook_first.py\"\n    tmp_ipynb = \"notebook_first.ipynb\"\n    nbformat.write(nb, tmp_ipynb)\n\n    jupytext([\"--to\", \"py:percent\", tmp_ipynb])\n    assert os.path.isfile(tmp_py)\n\n    jupytext([\"--set-formats\", \"ipynb,py:percent\", tmp_ipynb])\n\n\ndef test_set_format_with_subfolder(tmpdir, cwd_tmpdir):\n    \"\"\"Here we reproduce issue #450\"\"\"\n    py = \"\"\"# %% [markdown]\n# A short notebook\n\"\"\"\n\n    tmpdir.mkdir(\"python_scripts\").join(\"01_tabular_data_exploration.py\").write(py)\n\n    jupytext(\n        [\n            \"--set-formats\",\n            \"python_scripts//py:percent,notebooks//ipynb\",\n            \"python_scripts/01_tabular_data_exploration.py\",\n        ]\n    )\n\n\ndef skip_if_format_missing(format_name):\n    \"\"\"Check whether MyST or Pandoc are available and skip if not\"\"\"\n    if format_name == \"md:myst\" and not is_myst_available():\n        pytest.skip(\"MyST markdown is not available\")\n    elif format_name == \"md:pandoc\" and not is_pandoc_available():\n        pytest.skip(\"Pandoc is not available\")\n\n\n@pytest.mark.parametrize(\"format_name\", [\"md\", \"md:myst\", \"md:pandoc\"])\ndef test_create_header_with_set_formats(format_name, cwd_tmpdir, tmpdir):\n    \"\"\"Test jupytext --set-formats <format_name> #485\"\"\"\n\n    skip_if_format_missing(format_name)\n\n    tmpdir.join(\"notebook.md\").write(\"\\n\")\n\n    jupytext([\"--set-formats\", format_name, \"notebook.md\"])\n\n    nb = read(\"notebook.md\")\n    assert nb[\"metadata\"][\"jupytext\"][\"formats\"] == format_name\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.parametrize(\"format_name\", [\"md\", \"md:myst\", \"md:pandoc\", \"py:light\", \"py:percent\"])\ndef test_create_header_with_set_formats_and_set_kernel(format_name, tmpdir, cwd_tmpdir):\n    \"\"\"Test jupytext --set-formats <format_name> --set-kernel - #485\"\"\"\n\n    skip_if_format_missing(format_name)\n\n    ext = format_name.split(\":\")[0]\n    tmp_nb = \"notebook.\" + ext\n    tmpdir.join(tmp_nb).write(\"\\n\")\n\n    jupytext([\"--set-formats\", format_name, \"--set-kernel\", \"-\", tmp_nb])\n\n    nb = read(tmp_nb)\n    assert nb[\"metadata\"][\"jupytext\"][\"formats\"] == format_name\n    assert \"kernelspec\" in nb[\"metadata\"]\n\n\ndef test_set_option_split_at_heading(tmpdir, cwd_tmpdir):\n    tmp_rmd = tmpdir.join(\"notebook.Rmd\")\n    tmp_rmd.write(\n        \"\"\"A paragraph\n\n# H1 Header\n\"\"\"\n    )\n\n    jupytext([\"notebook.Rmd\", \"--opt\", \"split_at_heading=true\"])\n    assert \"split_at_heading: true\" in tmp_rmd.read()\n    nb = read(\"notebook.Rmd\")\n\n    nb_expected = new_notebook(cells=[new_markdown_cell(\"A paragraph\"), new_markdown_cell(\"# H1 Header\")])\n    compare_notebooks(nb, nb_expected)\n\n\ndef test_pair_in_tree(tmpdir):\n    nb_file = tmpdir.mkdir(\"notebooks\").mkdir(\"subfolder\").join(\"example.ipynb\")\n    py_file = tmpdir.mkdir(\"scripts\").mkdir(\"subfolder\").join(\"example.py\")\n\n    write(new_notebook(cells=[new_markdown_cell(\"A markdown cell\")]), str(nb_file))\n\n    jupytext([\"--set-formats\", \"notebooks///ipynb,scripts///py:percent\", str(nb_file)])\n\n    assert py_file.exists()\n    assert \"A markdown cell\" in py_file.read()\n\n\ndef test_pair_in_tree_and_parent(tmpdir):\n    nb_file = tmpdir.mkdir(\"notebooks\").mkdir(\"subfolder\").mkdir(\"a\").mkdir(\"b\").join(\"example.ipynb\")\n    py_file = tmpdir.mkdir(\"scripts\").mkdir(\"subfolder\").mkdir(\"c\").join(\"example.py\")\n\n    write(new_notebook(cells=[new_markdown_cell(\"A markdown cell\")]), str(nb_file))\n\n    jupytext([\"--set-formats\", \"notebooks//a/b//ipynb,scripts//c//py:percent\", str(nb_file)])\n\n    assert py_file.exists()\n    assert \"A markdown cell\" in py_file.read()\n\n\n@pytest.mark.requires_pandoc\ndef test_sync_pipe_config(tmpdir):\n    \"\"\"Sync a notebook to a script paired in a tree, and reformat the markdown cells using pandoc\"\"\"\n\n    tmpdir.join(\"jupytext.toml\").write(\n        \"\"\"# By default, the notebooks in this repository are in the notebooks subfolder\n# and they are paired to scripts in the script subfolder.\nformats = \"notebooks///ipynb,scripts///py:percent\"\n\"\"\"\n    )\n\n    nb_file = tmpdir.mkdir(\"notebooks\").join(\"wrap_markdown.ipynb\")\n    long_text = \"This is a \" + (\"very \" * 24) + \"long sentence.\"\n    assert len(long_text) > 100\n    nb = new_notebook(cells=[new_markdown_cell(long_text)])\n    write(nb, str(nb_file))\n\n    jupytext(\n        [\n            \"--sync\",\n            \"--pipe-fmt\",\n            \"ipynb\",\n            \"--pipe\",\n            \"pandoc --from ipynb --to ipynb --markdown-headings=atx\",\n            str(nb_file),\n        ]\n    )\n\n    py_text = tmpdir.join(\"scripts\").join(\"wrap_markdown.py\").read()\n    assert \"This is a very very\" in py_text\n    for line in py_text.splitlines():\n        assert len(line) <= 79\n\n    nb = read(nb_file, as_version=4)\n    text = nb.cells[0].source\n    assert len(text.splitlines()) == 3\n    assert text != long_text\n\n\ndef test_sync_script_dotdot_folder_564(tmpdir):\n    \"\"\"Reproduce the setting of issue #564\"\"\"\n    nb_file = tmpdir.mkdir(\"colabs\").mkdir(\"colabs\").join(\"rigid_object_tutorial.ipynb\")\n    py_file = tmpdir.join(\"colabs\").mkdir(\"nb_python\").join(\"rigid_object_tutorial.py\")\n    py_file.write(\"1 + 1\\n\")\n\n    jupytext([\"--set-formats\", \"../nb_python//py:percent,../colabs//ipynb\", str(py_file)])\n\n    assert nb_file.exists()\n\n    jupytext([\"--sync\", str(py_file)])\n    jupytext([\"--sync\", str(nb_file)])\n\n\ndef test_jupytext_to_file_emits_a_warning(tmpdir):\n    \"\"\"The user may type\n        jupytext notebook.ipynb --to script.py\n    meaning\n        jupytext notebook.ipynb -o script.py\n    \"\"\"\n    os.chdir(str(tmpdir))\n\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    write(new_notebook(), str(nb_file))\n\n    with warnings.catch_warnings():\n        warnings.simplefilter(\"error\")\n        jupytext([\"notebook.ipynb\", \"-o\", \"script.py\"])\n\n    with pytest.warns(UserWarning, match=\"Maybe you want to use the '-o' option\"):\n        jupytext([\"notebook.ipynb\", \"--to\", \"script.py\"])\n\n\ndef test_jupytext_set_formats_file_gives_an_informative_error(tmpdir, cwd_tmpdir):\n    \"\"\"The user may type\n        jupytext --set-formats notebook.md\n    meaning\n        jupytext --sync notebook.md\n    \"\"\"\n    cfg_file = tmpdir.join(\"jupytext.toml\")\n    cfg_file.write('formats = \"md,ipynb,py:percent\"')\n\n    md_file = tmpdir.join(\"notebook.md\")\n    py_file = tmpdir.join(\"notebook.py\")\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    md_file.write(\"Some text\")\n\n    with warnings.catch_warnings():\n        warnings.simplefilter(\"error\")\n        jupytext([\"--sync\", \"notebook.md\"])\n\n    assert py_file.exists()\n    assert nb_file.exists()\n\n    with pytest.raises(ValueError, match=\"jupytext --sync notebook.md\"):\n        jupytext([\"--set-formats\", \"notebook.md\"])\n\n    # Remove the config file, otherwise test_jupytext_jupyter_fs_metamanager fails later on!\n    cfg_file.remove()\n\n\ndef test_diff(tmpdir, cwd_tmpdir, capsys):\n    write(new_notebook(cells=[new_code_cell(\"1 + 1\")]), \"test.ipynb\")\n    write(new_notebook(cells=[new_code_cell(\"2 + 2\")]), \"test.py\", fmt=\"py:percent\")\n\n    jupytext([\"--diff\", \"test.py\", \"test.ipynb\"])\n    captured = capsys.readouterr()\n    assert \"-2 + 2\\n+1 + 1\" in captured.out\n\n\ndef test_show_changes(tmpdir, cwd_tmpdir, capsys):\n    write(new_notebook(cells=[new_code_cell(\"1 + 1\")]), \"test.ipynb\")\n    write(new_notebook(cells=[new_code_cell(\"2 + 2\")]), \"test.py\", fmt=\"py:percent\")\n\n    jupytext([\"--to\", \"py:percent\", \"test.ipynb\", \"--show-changes\"])\n    captured = capsys.readouterr()\n    assert \"-2 + 2\\n+1 + 1\" in captured.out\n\n\ndef test_glob_recursive(tmpdir, cwd_tmpdir):\n    tmpdir.mkdir(\"subfolder\").join(\"test.py\").write(\"1 + 1\\n\")\n    tmpdir.join(\"test.py\").write(\"2 + 2\\n\")\n    jupytext([\"--to\", \"ipynb\", \"**/*.py\"])\n\n    assert tmpdir.join(\"test.ipynb\").isfile()\n    assert tmpdir.join(\"subfolder\").join(\"test.ipynb\").isfile()\n\n\ndef test_jupytext_sync_preserves_cell_ids(tmpdir, cwd_tmpdir, notebook_with_outputs):\n    write(notebook_with_outputs, \"test.ipynb\")\n\n    # Sync with a py file, this should not change the cell id\n    jupytext([\"--set-formats\", \"ipynb,py:percent\", \"test.ipynb\"])\n    nb = read(\"test.ipynb\")\n    assert nb.cells[0].source == \"1+1\"\n    assert nb.cells[0].id == notebook_with_outputs.cells[0].id\n\n    # Change the py file and sync. This should not change the cell id neither\n    py_nb = tmpdir.join(\"test.py\")\n    py = py_nb.read()\n    py_nb.write(py.replace(\"1+1\", \"2+2\"))\n\n    jupytext([\"--sync\", \"test.ipynb\"])\n    nb = read(\"test.ipynb\")\n    assert nb.cells[0].source == \"2+2\"\n    assert nb.cells[0].id == notebook_with_outputs.cells[0].id\n\n\ndef test_jupytext_update_preserves_cell_ids(tmpdir, cwd_tmpdir, notebook_with_outputs):\n    write(notebook_with_outputs, \"test.ipynb\")\n\n    # Sync with a py file, this should not change the cell id\n    jupytext([\"--to\", \"py:percent\", \"test.ipynb\"])\n    nb = read(\"test.ipynb\")\n    assert nb.cells[0].source == \"1+1\"\n    assert nb.cells[0].id == notebook_with_outputs.cells[0].id\n\n    # Change the py file and update the ipynb file.\n    # This should not change the cell id neither\n    py_nb = tmpdir.join(\"test.py\")\n    py = py_nb.read()\n    py_nb.write(py.replace(\"1+1\", \"2+2\"))\n\n    jupytext([\"--to\", \"notebook\", \"--update\", \"test.py\"])\n    nb = read(\"test.ipynb\")\n    assert nb.cells[0].source == \"2+2\"\n    assert nb.cells[0].id == notebook_with_outputs.cells[0].id\n\n\ndef test_jupytext_to_ipynb_suggests_update(tmpdir, cwd_tmpdir, capsys):\n    tmpdir.join(\"test.py\").write(\"1 + 1\\n\")\n    jupytext([\"--to\", \"ipynb\", \"test.py\"])\n    capture = capsys.readouterr()\n    assert \"update\" not in capture.out\n\n    jupytext([\"--to\", \"ipynb\", \"test.py\"])\n    capture = capsys.readouterr()\n    assert \"update\" in capture.out\n\n\n@pytest.mark.parametrize(\"formats\", [\"\", \"py:percent\", \"py\", \"py:percent,ipynb\"])\ndef test_jupytext_to_ipynb_does_not_update_timestamp_if_output_not_in_pair(\n    tmpdir, cwd_tmpdir, python_notebook, capsys, formats\n):\n    # Write a text notebook\n    nb = python_notebook\n    if formats:\n        nb.metadata[\"jupytext\"] = {\"formats\": formats}\n\n    test_py = tmpdir.join(\"test.py\")\n    write(nb, str(test_py))\n\n    # make it read-only\n    test_py.chmod(0o444)\n\n    # py -> ipynb\n    if \"ipynb\" not in formats:\n        jupytext([\"--to\", \"ipynb\", \"test.py\"])\n    else:\n        jupytext([\"--to\", \"ipynb\", \"test.py\", \"-o\", \"another.ipynb\"])\n\n    capture = capsys.readouterr()\n    assert \"Updating the timestamp\" not in capture.out\n\n\n@pytest.mark.parametrize(\"formats\", [\"py:percent\", \"py\", None])\ndef test_jupytext_to_ipynb_does_not_update_timestamp_if_not_paired(tmpdir, cwd_tmpdir, python_notebook, capsys, formats):\n    # Write a text notebook\n    nb = python_notebook\n    if formats:\n        nb.metadata[\"jupytext\"] = {\"formats\": formats}\n\n    test_py = tmpdir.join(\"test.py\")\n    write(nb, str(test_py))\n\n    # make it read-only\n    test_py.chmod(0o444)\n\n    # py -> ipynb\n    jupytext([\"--to\", \"ipynb\", \"test.py\"])\n\n    capture = capsys.readouterr()\n    assert \"Updating the timestamp\" not in capture.out\n\n\n@pytest.mark.asyncio\n@pytest.mark.parametrize(\"formats\", [\"ipynb,py\", \"py:percent\", \"py:light\", None])\nasync def test_use_source_timestamp(tmpdir, cwd_tmpdir, python_notebook, capsys, formats, cm):\n    # Write a text notebook\n    nb = python_notebook\n    if formats:\n        nb.metadata[\"jupytext\"] = {\"formats\": formats}\n\n    test_py = tmpdir.join(\"test.py\")\n    test_ipynb = tmpdir.join(\"test.ipynb\")\n    write(nb, str(test_py))\n    src_timestamp = test_py.stat().mtime\n\n    # Wait...\n    time.sleep(0.1)\n\n    # py -> ipynb\n    jupytext([\"--to\", \"ipynb\", \"test.py\", \"--use-source-timestamp\"])\n\n    capture = capsys.readouterr()\n    assert \"Updating the timestamp\" not in capture.out\n\n    dest_timestamp = test_ipynb.stat().mtime\n    # on Mac OS the dest_timestamp is truncated at the microsecond (#790)\n    assert src_timestamp - 1e-6 <= dest_timestamp <= src_timestamp\n\n    # Make sure that we can open the file in Jupyter\n\n    cm.outdated_text_notebook_margin = 0.001\n    cm.root_dir = str(tmpdir)\n\n    # No error here\n    await ensure_async(cm.get(\"test.ipynb\"))\n\n    # But now if we don't use --use-source-timestamp\n    jupytext([\"--to\", \"ipynb\", \"test.py\"])\n    os.utime(test_py, (src_timestamp, src_timestamp))\n\n    # Then we can't open paired notebooks\n    if formats == \"ipynb,py:percent\":\n        from tornado.web import HTTPError\n\n        with pytest.raises(HTTPError, match=\"is more recent than test.py\"):\n            await ensure_async(cm.get(\"test.ipynb\"))\n    else:\n        await ensure_async(cm.get(\"test.ipynb\"))\n\n\ndef test_round_trip_with_null_metadata_792(tmpdir, cwd_tmpdir, python_notebook):\n    nb = python_notebook\n    nb.metadata.kernelspec = {\n        \"argv\": [\"python\", \"-m\", \"ipykernel_launcher\", \"-f\", \"{connection_file}\"],\n        \"display_name\": \"Python 3\",\n        \"env\": None,\n        \"interrupt_mode\": \"signal\",\n        \"language\": \"python\",\n        \"metadata\": None,\n        \"name\": \"python3\",\n    }\n    write(nb, \"test.ipynb\")\n    jupytext([\"--to\", \"py:percent\", \"test.ipynb\"])\n    jupytext([\"--to\", \"ipynb\", \"test.py\"])\n    nb = read(\"test.ipynb\")\n    assert nb.metadata.kernelspec.env is None\n\n\ndef test_set_shebang_with_update_metadata(tmp_path, python_notebook):\n    tmp_py = tmp_path / \"nb.py\"\n    write(python_notebook, tmp_py, fmt=\"py:percent\")\n\n    jupytext(\n        [\n            str(tmp_py),\n            \"--update-metadata\",\n            '{\"jupytext\":{\"executable\":\"/usr/bin/python\"}}',\n        ]\n    )\n\n    assert tmp_py.read_text().startswith(\"#!/usr/bin/python\")\n\n\n@pytest.mark.parametrize(\"compare_ids\", [False, True])\n@pytest.mark.parametrize(\"compare_outputs\", [False, True])\ndef test_set_formats_does_not_override_existing_ipynb(tmp_path, notebook_with_outputs, compare_ids, compare_outputs):\n    tmp_py = tmp_path / \"nb.py\"\n    tmp_ipynb = tmp_path / \"nb.ipynb\"\n    write(notebook_with_outputs, tmp_ipynb)\n\n    jupytext([str(tmp_ipynb), \"--set-formats\", \"ipynb,py:percent\"])\n    jupytext([str(tmp_py), \"--set-formats\", \"ipynb,py:percent\"])\n\n    nb = read(tmp_ipynb)\n    compare_notebooks(\n        nb,\n        notebook_with_outputs,\n        compare_ids=compare_ids,\n        compare_outputs=compare_outputs,\n    )\n\n\n@pytest.mark.requires_myst\n@pytest.mark.parametrize(\n    \"header\",\n    [\n        \"\",\n        \"\"\"---\njupytext:\n  text_representation:\n    extension: .md\n    format_name: myst\nkernelspec:\n  display_name: ipython3\n  language: python\n  name: ipython3\n---\n\n\"\"\",\n    ],\n)\ndef test_lexer_is_preserved_in_round_trips(\n    tmp_path,\n    no_jupytext_version_number,\n    header,\n    text=\"\"\"```{code-cell} ipython3\n1 + 1\n```\n\"\"\",\n):\n    text = header + text\n    tmp_md = tmp_path / \"notebook.md\"\n    tmp_md.write_text(text)\n\n    jupytext([\"--to\", \"myst\", str(tmp_md)])\n\n    assert tmp_md.read_text() == text\n\n\n@pytest.mark.requires_black\ndef test_pipe_with_quiet_does_not_print(tmp_path, capsys):\n    tmp_py = tmp_path / \"nb.py\"\n    tmp_py.write_text(\"# %%\\n1+1\\n\")\n\n    jupytext([\"--quiet\", \"--pipe\", \"black\", str(tmp_py)])\n    captured = capsys.readouterr()\n    assert captured.out == \"\"\n    assert captured.err == \"\"\n\n    assert tmp_py.read_text() == \"# %%\\n1 + 1\\n\"\n\n\ndef test_update_formats_1386(python_notebook, tmp_path, capsys):\n    \"\"\"\n    Test that we can change the formats in an already paired notebook\n    \"\"\"\n    tmp_py = tmp_path / \"notebook.py\"\n    tmp_md = tmp_path / \"notebook.md\"\n    tmp_ipynb = tmp_path / \"notebook.ipynb\"\n    write(python_notebook, tmp_py, fmt=\"py:percent\")\n\n    formats = \"py:percent,md\"\n    jupytext([str(tmp_py), \"--set-formats\", formats])\n\n    # We need to update all the files, not only their timestamps\n    capture = capsys.readouterr()\n    assert \"Updating the timestamp\" not in capture.out\n\n    # Each paired file should have the new formats\n    assert read(tmp_py)[\"metadata\"][\"jupytext\"][\"formats\"] == formats\n    assert read(tmp_md)[\"metadata\"][\"jupytext\"][\"formats\"] == formats\n\n    # The issue occurred when the py file was older than the md file\n    current_time = time.time()\n    os.utime(tmp_py, (current_time - 1, current_time - 1))\n    os.utime(tmp_md, (current_time, current_time))\n\n    formats = \"ipynb,py:percent,md\"\n    jupytext([str(tmp_py), \"--set-formats\", formats])\n\n    # We need to update all the files, not only their timestamps\n    capture = capsys.readouterr()\n    assert \"Updating the timestamp\" not in capture.out\n\n    # And each paired file should have the new formats\n    assert read(tmp_py)[\"metadata\"][\"jupytext\"][\"formats\"] == formats\n    assert read(tmp_md)[\"metadata\"][\"jupytext\"][\"formats\"] == formats\n    assert read(tmp_ipynb)[\"metadata\"][\"jupytext\"][\"formats\"] == formats\n\n\ndef test_paired_paths_from_notebook_metadata(tmp_path, python_notebook, capsys):\n    ipynb_notebook_path = tmp_path / \"notebook.ipynb\"\n    python_notebook.metadata[\"jupytext\"] = {\"formats\": \"ipynb,py:percent,md\"}\n    write(python_notebook, ipynb_notebook_path)\n\n    jupytext([str(ipynb_notebook_path), \"--paired-paths\"])\n\n    capture = capsys.readouterr()\n\n    paired_paths = capture.out.strip().split(\"\\n\")\n\n    assert paired_paths == [\n        str(tmp_path / \"notebook.py\"),\n        str(tmp_path / \"notebook.md\"),\n    ], paired_paths\n\n\ndef test_paired_paths_from_config(tmp_path, python_notebook, capsys):\n    ipynb_notebook_path = tmp_path / \"notebook.ipynb\"\n    write(python_notebook, ipynb_notebook_path)\n    (tmp_path / \"jupytext.toml\").write_text('''formats=\"ipynb,py:percent,md\"''')\n\n    jupytext([str(ipynb_notebook_path), \"--paired-paths\"])\n\n    capture = capsys.readouterr()\n\n    paired_paths = capture.out.strip().split(\"\\n\")\n\n    assert paired_paths == [\n        str(tmp_path / \"notebook.py\"),\n        str(tmp_path / \"notebook.md\"),\n    ], paired_paths\n\n\n@pytest.mark.parametrize(\"with_config\", [False, True])\ndef test_sync_keeps_simple_python_file_unchanged(tmp_path, with_config: bool):\n    \"\"\"Test that jupytext --sync on a simple Python file leaves it unchanged,\n    even if a Jupytext configuration has formats=ipynb,py:percent\n    \"\"\"\n    # Create a simple Python file without jupytext metadata\n    if with_config:\n        config_file = tmp_path / \"jupytext.toml\"\n        config_file.write_text('formats = \"ipynb,py:percent\"')\n\n    py_file = tmp_path / \"simple.py\"\n    py_content = '''#!/usr/bin/env python3\n\"\"\"A simple Python script\"\"\"\n\ndef hello():\n    print(\"Hello, world!\")\n\nif __name__ == \"__main__\":\n    hello()\n'''\n    py_file.write_text(py_content)\n\n    # Record original timestamp and content\n    original_mtime = py_file.stat().st_mtime\n    original_content = py_file.read_text()\n\n    # Wait a bit to ensure timestamp would change if file was modified\n    time.sleep(0.1)\n\n    # Run jupytext --sync on the file\n    jupytext([\"--sync\", str(py_file)])\n\n    # Verify file is unchanged\n    final_mtime = py_file.stat().st_mtime\n    final_content = py_file.read_text()\n\n    assert final_mtime == original_mtime, \"File timestamp should be unchanged\"\n    assert final_content == original_content, \"File content should be unchanged\"\n\n    # Verify no additional files were created\n    files_in_dir = list(tmp_path.iterdir())\n    if with_config:\n        assert len(files_in_dir) == 2, f\"Expected only 2 files, found: {[f.name for f in files_in_dir]}\"\n        assert set(files_in_dir) == {py_file, config_file}\n    else:\n        assert len(files_in_dir) == 1, f\"Expected only 1 file, found: {[f.name for f in files_in_dir]}\"\n        assert files_in_dir[0] == py_file\n\n\ndef test_set_formats_pairing_in_subfolders(tmp_path, python_notebook):\n    \"\"\"Test that jupytext --set-formats works with subfolders, including on Windows (#1028)\"\"\"\n\n    ipynb_notebook_dir = tmp_path / \"notebooks\" / \"subfolder\"\n    ipynb_notebook_dir.mkdir(parents=True)\n    ipynb_notebook_path = ipynb_notebook_dir / \"notebook.ipynb\"\n\n    write(python_notebook, ipynb_notebook_path)\n\n    jupytext([str(ipynb_notebook_path), \"--set-formats\", \"notebooks///ipynb,scripts///py:percent\"])\n\n    assert (tmp_path / \"scripts\" / \"subfolder\" / \"notebook.py\").exists()\n\n\ndef test_sync_in_subfolders(tmp_path, python_notebook):\n    \"\"\"Test that jupytext --sync works with subfolders, including on Windows (#1028)\"\"\"\n    ipynb_notebook_dir = tmp_path / \"notebooks\" / \"subfolder\"\n    ipynb_notebook_dir.mkdir(parents=True)\n    ipynb_notebook_path = ipynb_notebook_dir / \"notebook.ipynb\"\n    write(python_notebook, ipynb_notebook_path)\n\n    (tmp_path / \"jupytext.toml\").write_text(\"\"\"[formats]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n\"\"\")\n\n    jupytext([str(ipynb_notebook_path), \"--sync\"])\n\n    assert (tmp_path / \"scripts\" / \"subfolder\" / \"notebook.py\").exists()\n"
  },
  {
    "path": "tests/functional/cli/test_cli_config.py",
    "content": "import nbformat\nimport pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_notebook\n\nfrom jupytext.cli import jupytext\nfrom jupytext.compare import compare\nfrom jupytext.header import header_to_metadata_and_cell\nfrom jupytext.jupytext import read, write\n\n\ndef test_pairing_through_config_leaves_ipynb_unmodified(tmpdir):\n    cfg_file = tmpdir.join(\".jupytext.yml\")\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    py_file = tmpdir.join(\"notebook.py\")\n\n    cfg_file.write(\"formats: 'ipynb,py'\\n\")\n    nbformat.write(new_notebook(), str(nb_file))\n\n    jupytext([str(nb_file), \"--sync\"])\n\n    assert nb_file.isfile()\n    assert py_file.isfile()\n\n    nb = nbformat.read(nb_file, as_version=4)\n    assert \"jupytext\" not in nb.metadata\n\n\ndef test_formats(tmpdir):\n    tmpdir.join(\".jupytext\").write(\n        '''# Default pairing\nformats = \"ipynb,py\"'''\n    )\n    test = tmpdir.join(\"test.py\")\n    test.write(\"1 + 1\\n\")\n\n    jupytext([str(test), \"--sync\"])\n\n    assert tmpdir.join(\"test.ipynb\").isfile()\n\n\ndef test_formats_with_suffix(tmpdir):\n    tmpdir.join(\".jupytext\").write('formats = \"ipynb,.nb.py\"')\n    test = tmpdir.join(\"test.py\")\n    test.write(\"1 + 1\\n\")\n\n    test_nb = tmpdir.join(\"test.nb.py\")\n    test_nb.write(\"1 + 1\\n\")\n\n    jupytext([str(test), \"--sync\"])\n    assert not tmpdir.join(\"test.ipynb\").isfile()\n\n    jupytext([str(test_nb), \"--sync\"])\n    assert tmpdir.join(\"test.ipynb\").isfile()\n\n\ndef test_formats_does_not_apply_to_config_file(tmpdir):\n    config = tmpdir.join(\".jupytext.py\")\n    config.write('c.formats = \"ipynb,py\"')\n    test = tmpdir.join(\"test.py\")\n    test.write(\"1 + 1\\n\")\n\n    jupytext([str(test), str(config), \"--sync\"])\n\n    assert tmpdir.join(\"test.ipynb\").isfile()\n    assert not tmpdir.join(\".jupytext.ipynb\").isfile()\n\n\ndef test_preferred_jupytext_formats_save(tmpdir):\n    tmpdir.join(\".jupytext.yml\").write(\"preferred_jupytext_formats_save: jl:percent\")\n    tmp_ipynb = tmpdir.join(\"notebook.ipynb\")\n    tmp_jl = tmpdir.join(\"notebook.jl\")\n\n    nb = new_notebook(cells=[new_code_cell(\"1 + 1\")], metadata={\"jupytext\": {\"formats\": \"ipynb,jl\"}})\n\n    write(nb, str(tmp_ipynb))\n    jupytext([str(tmp_ipynb), \"--sync\"])\n\n    with open(str(tmp_jl)) as stream:\n        text_jl = stream.read()\n\n    # Parse the YAML header\n    metadata, _, _, _ = header_to_metadata_and_cell(text_jl.splitlines(), \"#\", \"\")\n    assert metadata[\"jupytext\"][\"formats\"] == \"ipynb,jl:percent\"\n\n\n@pytest.mark.parametrize(\n    \"config\",\n    [\n        # Way 1: preferred_jupytext_formats_save + formats\n        \"\"\"preferred_jupytext_formats_save: \"python//py:percent\"\nformats: \"ipynb,python//py\"\n\"\"\",\n        # Way 2: formats\n        \"formats: ipynb,python//py:percent\",\n    ],\n)\ndef test_save_using_preferred_and_default_format(config, tmpdir):\n    tmpdir.join(\".jupytext.yml\").write(config)\n    tmp_ipynb = tmpdir.join(\"notebook.ipynb\")\n    tmp_py = tmpdir.join(\"python\").join(\"notebook.py\")\n\n    nb = new_notebook(cells=[new_code_cell(\"1 + 1\")])\n\n    write(nb, str(tmp_ipynb))\n    jupytext([str(tmp_ipynb), \"--sync\"])\n\n    # read py file\n    nb_py = read(str(tmp_py))\n    assert nb_py.metadata[\"jupytext\"][\"text_representation\"][\"format_name\"] == \"percent\"\n\n\ndef test_hide_notebook_metadata(tmpdir, no_jupytext_version_number):\n    tmpdir.join(\".jupytext\").write(\"hide_notebook_metadata = true\")\n    tmp_ipynb = tmpdir.join(\"notebook.ipynb\")\n    tmp_md = tmpdir.join(\"notebook.md\")\n\n    nb = new_notebook(cells=[new_code_cell(\"1 + 1\")], metadata={\"jupytext\": {\"formats\": \"ipynb,md\"}})\n\n    write(nb, str(tmp_ipynb))\n    jupytext([str(tmp_ipynb), \"--sync\"])\n\n    with open(str(tmp_md)) as stream:\n        text_md = stream.read()\n\n    compare(\n        text_md,\n        \"\"\"<!--\n\n---\njupyter:\n  jupytext:\n    formats: ipynb,md\n    hide_notebook_metadata: true\n---\n\n-->\n\n```python\n1 + 1\n```\n\"\"\",\n    )\n\n\ndef test_cli_config_on_windows_issue_629(tmpdir):\n    cfg_file = tmpdir.join(\"jupytext.yml\")\n    cfg_file.write(\n        \"\"\"formats: \"notebooks///ipynb,scripts///py:percent\"\nnotebook_metadata_filter: \"jupytext\"\n\"\"\"\n    )\n\n    tmpdir.mkdir(\"scripts\").join(\"test.py\").write(\"# %%\\n 1+1\\n\")\n\n    jupytext([\"--sync\", str(tmpdir.join(\"scripts\").join(\"*.py\"))])\n\n    assert tmpdir.join(\"notebooks\").join(\"test.ipynb\").exists()\n\n\ndef test_sync_config_does_not_create_formats_metadata(tmpdir, cwd_tmpdir, python_notebook):\n    tmpdir.join(\"jupytext.yml\").write(\n        \"\"\"formats: \"ipynb,py:percent\"\n\"\"\"\n    )\n\n    write(python_notebook, \"test.ipynb\")\n    jupytext([\"--sync\", \"test.ipynb\"])\n\n    nb = read(\"test.py\")\n    assert \"formats\" not in nb.metadata[\"jupytext\"]\n\n\ndef test_multiple_formats_771(tmpdir, cwd_tmpdir, python_notebook):\n    tmpdir.join(\"jupytext.toml\").write(\n        \"\"\"formats = \"notebooks///ipynb,notebooks///py,scripts///py:percent\"\n\"\"\"\n    )\n    notebooks_dir = tmpdir.mkdir(\"notebooks\")\n    scripts_dir = tmpdir.join(\"scripts\")\n\n    write(python_notebook, str(notebooks_dir.join(\"notebook.ipynb\")))\n    jupytext([\"--sync\", \"notebooks/notebook.ipynb\"])\n\n    assert notebooks_dir.join(\"notebook.py\").isfile()\n    assert scripts_dir.join(\"notebook.py\").isfile()\n\n    notebooks_dir.join(\"module.py\").write(\"1 + 1\\n\")\n    jupytext([\"--sync\", \"notebooks/module.py\"])\n\n    assert notebooks_dir.join(\"module.ipynb\").isfile()\n    assert scripts_dir.join(\"module.py\").isfile()\n"
  },
  {
    "path": "tests/functional/cli/test_source_is_newer.py",
    "content": "\"\"\"\nHere we test the --check-source-is-newer option of the jupytext CLI\n\"\"\"\n\nimport os\nfrom jupytext import cli\nfrom jupytext import write\n\nimport pytest\n\n\ndef test_check_source_is_newer_when_using_jupytext_to(tmp_path, python_notebook):\n    tmp_ipynb = tmp_path / \"notebook.ipynb\"\n    tmp_py = tmp_path / \"notebook.py\"\n    write(python_notebook, tmp_ipynb, fmt=\"ipynb\")\n\n    # First, we convert the .ipynb to .py\n    cli.jupytext([str(tmp_ipynb), \"--to\", \"py\", \"--check-source-is-newer\"])\n    assert tmp_py.exists()\n\n    # Now, we modify the .py file so that it is more recent than the .ipynb file\n    text = tmp_py.read_text() + \"\\n# A new comment\"\n    tmp_py.write_text(text)\n\n    # We can convert the .py to .ipynb because the .py is more recent than the .ipynb\n    cli.jupytext([str(tmp_py), \"--to\", \"ipynb\", \"--check-source-is-newer\"])\n\n    # We modify the .ipynb file so that it is more recent than the .py file\n    text = tmp_ipynb.read_text().replace(\"A new comment\", \"Another new comment\")\n    tmp_ipynb.write_text(text)\n\n    # Now, trying to convert the .py to .ipynb raises an error because the .py is older than the .ipynb\n    with pytest.raises(ValueError, match=r\"Source .*notebook\\.py.* is older than destination .*notebook\\.ipynb.*\"):\n        cli.jupytext([str(tmp_py), \"--to\", \"ipynb\", \"--check-source-is-newer\"])\n\n\ndef test_check_source_is_newer_when_using_jupytext_sync(tmp_path, python_notebook):\n    tmp_ipynb = tmp_path / \"notebook.ipynb\"\n    tmp_py = tmp_path / \"notebook.py\"\n    write(python_notebook, tmp_ipynb, fmt=\"ipynb\")\n\n    # First, we turn the notebook into a paired notebook\n    cli.jupytext([str(tmp_ipynb), \"--set-formats\", \"ipynb,py\", \"--check-source-is-newer\"])\n    assert tmp_py.exists()\n\n    # Running sync on the .py file works as .py is always more recent after a --sync operation\n    cli.jupytext([str(tmp_py), \"--sync\", \"--check-source-is-newer\"])\n\n    # Make .ipynb slightly older again to ensure .py is newer\n    stat = os.stat(tmp_ipynb)\n    os.utime(tmp_ipynb, (stat.st_atime, stat.st_mtime - 1))\n\n    # Now, trying to sync the .ipynb to .py raises an error because .ipynb is older than .py\n    with pytest.raises(ValueError, match=r\"Source .*notebook\\.ipynb.* is older than paired file .*notebook\\.py.*\"):\n        cli.jupytext([str(tmp_ipynb), \"--sync\", \"--check-source-is-newer\"])\n\n    # We modify the .ipynb file so that it is more recent than the .py file\n    text = tmp_ipynb.read_text().replace(\"A short notebook\", \"A short notebook with a modification\")\n    tmp_ipynb.write_text(text)\n\n    # Make .py slightly older to ensure .ipynb is newer\n    stat = os.stat(tmp_py)\n    os.utime(tmp_py, (stat.st_atime, stat.st_mtime - 1))\n\n    # Now, trying to sync the .py to .ipynb raises an error because the .py is older than the .ipynb\n    with pytest.raises(ValueError, match=r\"Source .*notebook\\.py.* is older than paired file .*notebook\\.ipynb.*\"):\n        cli.jupytext([str(tmp_py), \"--sync\", \"--check-source-is-newer\"])\n\n    # Running sync on the .ipynb file works as .ipynb is now more recent than .py\n    cli.jupytext([str(tmp_ipynb), \"--sync\", \"--check-source-is-newer\"])\n"
  },
  {
    "path": "tests/functional/cli/test_synchronous_changes.py",
    "content": "\"\"\"\nThese tests ensure that Jupytext raises an error when a file loaded by Jupytext\nchanges while Jupytext is running.\n\nTo make the simultaneous change occur in the tests, we monkey-patch the function `create_prefix_dir`\nwhich is called just before writing the file back to disk.\n\"\"\"\n\nfrom jupytext import cli\nfrom jupytext import write\n\nimport pytest\n\n\ndef test_jupytext_sync_raises_on_synchronous_edits(tmp_path, python_notebook, monkeypatch):\n    (tmp_path / \"jupytext.toml\").write_text(\"\"\"formats = \"ipynb,py\" \"\"\")\n\n    tmp_py = tmp_path / \"notebook.py\"\n    tmp_ipynb = tmp_path / \"notebook.ipynb\"\n    write(python_notebook, tmp_py, fmt=\"py:percent\")\n\n    def edit_py_file(path):\n        text = tmp_py.read_text() + \"\\n# A new comment\"\n        tmp_py.write_text(text)\n\n    # The print statements help to see which Jupytext actions correspond to which test\n    print(\"Testing a synchronous edit on a .py file that does not have a .ipynb counterpart\")\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", edit_py_file)\n    with pytest.raises(\n        cli.SynchronousModificationError, match=r\"The file .*notebook\\.py.* was modified while Jupytext was running\"\n    ):\n        cli.jupytext([str(tmp_py), \"--sync\"])\n\n    assert not tmp_ipynb.exists()\n\n    print(\"Testing the normal sync command that creates the .ipynb file\")\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", None)\n    cli.jupytext([str(tmp_py), \"--sync\"])\n    assert tmp_ipynb.exists()\n\n    print(\"Testing a synchronous edit on a .py file that does have a .ipynb counterpart\")\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", edit_py_file)\n    with pytest.raises(\n        cli.SynchronousModificationError, match=r\"The file .*notebook\\.py.* was modified while Jupytext was running\"\n    ):\n        cli.jupytext([str(tmp_py), \"--sync\"])\n\n    print(\"Testing a synchronous deletion of the .ipynb file\")\n\n    def rm_ipynb_file(path):\n        tmp_ipynb.unlink()\n\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", rm_ipynb_file)\n    with pytest.raises(\n        cli.SynchronousModificationError, match=r\"The file .*notebook\\.ipynb.* was deleted while Jupytext was running\"\n    ):\n        cli.jupytext([str(tmp_py), \"--sync\"])\n\n    assert not tmp_ipynb.exists()\n\n    print(\"Testing a synchronous creation of the .ipynb file\")\n\n    def create_ipynb_file(path):\n        tmp_ipynb.write_text(\"{}\")\n\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", create_ipynb_file)\n    with pytest.raises(\n        cli.SynchronousModificationError, match=r\"The file .*notebook\\.ipynb.* was created while Jupytext was running\"\n    ):\n        cli.jupytext([str(tmp_py), \"--sync\"])\n\n\ndef test_jupytext_to_raises_on_synchronous_edits(tmp_path, python_notebook, monkeypatch):\n    tmp_py = tmp_path / \"notebook.py\"\n    tmp_ipynb = tmp_path / \"notebook.ipynb\"\n    write(python_notebook, tmp_py, fmt=\"py:percent\")\n\n    def edit_py_file(path):\n        text = tmp_py.read_text() + \"\\n# A new comment\"\n        tmp_py.write_text(text)\n\n    # The print statements help to see which Jupytext actions correspond to which test\n    print(\"Testing a synchronous edit on a .py file\")\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", edit_py_file)\n    with pytest.raises(\n        cli.SynchronousModificationError, match=r\"The file .*notebook\\.py.* was modified while Jupytext was running\"\n    ):\n        cli.jupytext([str(tmp_py), \"--to\", \"ipynb\"])\n\n    assert not tmp_ipynb.exists()\n\n    print(\"Testing the normal to command that creates the .ipynb file\")\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", None)\n    cli.jupytext([str(tmp_py), \"--to\", \"ipynb\"])\n    assert tmp_ipynb.exists()\n\n    print(\"Testing a synchronous edit on a .py file that is not paired to a .ipynb file\")\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", edit_py_file)\n    # This one works as the .py file is not paired, so it is not read\n    cli.jupytext([str(tmp_ipynb), \"--to\", \"py\"])\n\n    print(\"Turning the .py file into a paired notebook\")\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", None)\n    cli.jupytext([str(tmp_ipynb), \"--set-formats\", \"ipynb,py\"])\n\n    print(\"Testing a synchronous edit on a paired .py file\")\n    monkeypatch.setattr(cli, \"_callback_on_lazy_write\", edit_py_file)\n    with pytest.raises(\n        cli.SynchronousModificationError, match=r\"The file .*notebook\\.py.* was modified while Jupytext was running\"\n    ):\n        cli.jupytext([str(tmp_py), \"--to\", \"ipynb\"])\n"
  },
  {
    "path": "tests/functional/config/test_config.py",
    "content": "import os\nfrom pathlib import Path\nfrom contextlib import contextmanager\n\nimport pytest\n\nfrom jupytext.config import (\n    find_jupytext_configuration_file,\n    load_jupytext_configuration_file,\n    notebook_formats,\n)\nfrom jupytext.jupytext import load_jupytext_config, read\n\n\n@contextmanager\ndef change_dir(path):\n    \"\"\"Context manager to temporarily change directory.\"\"\"\n    old_cwd = os.getcwd()\n    try:\n        os.chdir(path)\n        yield\n    finally:\n        os.chdir(old_cwd)\n\n\n@pytest.fixture\ndef temp_folder_tree(tmp_path):\n    \"\"\"\n    Fixture that creates a temporary folder tree.\n    tmp_path is a pytest built-in fixture that auto-cleans up.\n    \"\"\"\n    # Create folder structure\n    (tmp_path / \"subdir\").mkdir()\n\n    # Create some files\n    (tmp_path / \"jupytext.toml\").write_text(\"\")\n    (tmp_path / \"subdir\" / \"notebook.ipynb\").write_text(\"\")\n\n    return tmp_path\n\n\ndef test_issue_1440(temp_folder_tree):\n    \"\"\"Test that jupytext finds the config file even in parent of cwd\"\"\"\n    notebook = Path(\"notebook.ipynb\")\n    notebook_str = str(notebook)\n    expected_toml = str(temp_folder_tree / \"jupytext.toml\")\n    with change_dir(temp_folder_tree / \"subdir\"):\n        assert notebook.exists()\n        config_file_from_path = find_jupytext_configuration_file(notebook)\n        assert config_file_from_path == expected_toml\n        config_file_from_str = find_jupytext_configuration_file(notebook_str)\n        assert config_file_from_str == expected_toml\n\n\ndef test_find_jupytext_configuration_file(tmpdir):\n    nested = tmpdir.mkdir(\"nested\")\n\n    # Start with no configuration\n    assert find_jupytext_configuration_file(str(nested)) is None\n\n    # Configuration file in the parent directory\n    root_config = tmpdir.join(\"jupytext.yml\")\n    root_config.write(\"\\n\")\n    assert os.path.samefile(find_jupytext_configuration_file(str(tmpdir)), str(root_config))\n    assert os.path.samefile(find_jupytext_configuration_file(str(nested)), str(root_config))\n\n    # Local pyproject file\n    pyproject_config = nested.join(\"pyproject.toml\")\n    pyproject_config.write(\"[tool.jupytext]\\n\")\n    assert os.path.samefile(find_jupytext_configuration_file(str(tmpdir)), str(root_config))\n    assert os.path.samefile(find_jupytext_configuration_file(str(nested)), str(pyproject_config))\n\n    # Local configuration file\n    local_config = nested.join(\".jupytext\")\n    local_config.write(\"\\n\")\n    assert os.path.samefile(find_jupytext_configuration_file(str(tmpdir)), str(root_config))\n    assert os.path.samefile(find_jupytext_configuration_file(str(nested)), str(local_config))\n\n\ndef test_jupytext_py_is_not_a_configuration_file(tmpdir):\n    jupytext_py = tmpdir.join(\"jupytext.py\")\n    jupytext_py.write(\"# Not a config file!\")\n\n    assert find_jupytext_configuration_file(str(tmpdir)) is None\n\n    dot_jupytext_py = tmpdir.join(\".jupytext.py\")\n    dot_jupytext_py.write(\"# This is a config file!\")\n\n    assert find_jupytext_configuration_file(str(tmpdir)) == str(dot_jupytext_py)\n\n\n@pytest.mark.parametrize(\n    \"config_file\",\n    [\n        \"pyproject.toml\",\n        \"jupytext\",\n        \"jupytext.toml\",\n        \"jupytext.yml\",\n        \"jupytext.json\",\n        \"jupytext.py\",\n    ],\n)\ndef test_load_jupytext_configuration_file(tmpdir, config_file):\n    full_config_path = tmpdir.join(config_file)\n\n    if config_file == \"pyproject.toml\":\n        full_config_path.write(\n            \"\"\"[tool.jupytext]\nformats = \"ipynb,py:percent\"\nnotebook_metadata_filter = \"all\"\ncell_metadata_filter = \"all\"\n\"\"\"\n        )\n    elif config_file.endswith((\"jupytext\", \".toml\")):\n        full_config_path.write(\n            \"\"\"formats = \"ipynb,py:percent\"\nnotebook_metadata_filter = \"all\"\ncell_metadata_filter = \"all\"\n\"\"\"\n        )\n    elif config_file.endswith(\".yml\"):\n        full_config_path.write(\n            \"\"\"formats: ipynb,py:percent\nnotebook_metadata_filter: all\ncell_metadata_filter: all\n\"\"\"\n        )\n    elif config_file.endswith(\".json\"):\n        full_config_path.write(\n            \"\"\"{\"formats\": \"ipynb,py:percent\",\n\"notebook_metadata_filter\": \"all\",\n\"cell_metadata_filter\": \"all\"\n}\n\"\"\"\n        )\n    elif config_file.endswith(\".py\"):\n        full_config_path.write(\n            \"\"\"c.formats = \"ipynb,py:percent\"\nc.notebook_metadata_filter = \"all\"\nc.cell_metadata_filter = \"all\"\n\"\"\"\n        )\n\n    config = load_jupytext_configuration_file(str(full_config_path))\n    assert config.formats == [\"ipynb,py:percent\"]\n    assert config.notebook_metadata_filter == \"all\"\n    assert config.cell_metadata_filter == \"all\"\n\n\n@pytest.mark.parametrize(\n    \"content_toml,formats_short_form\",\n    [\n        (\n            \"\"\"# always pair ipynb notebooks to py:percent files\nformats = \"ipynb,py:percent\"\n\"\"\",\n            \"ipynb,py:percent\",\n        ),\n        (\n            \"\"\"# always pair ipynb notebooks to py:percent files\nformats = \"ipynb,py:percent\"\n\"\"\",\n            \"ipynb,py:percent\",\n        ),\n        (\n            \"\"\"# Pair notebooks in subfolders of 'notebooks' to scripts in subfolders of 'scripts'\n[formats]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n\"\"\",\n            \"notebooks///ipynb,scripts///py:percent\",\n        ),\n        (\n            \"\"\"# Pair notebooks in subfolders of 'notebooks' to scripts in subfolders of 'scripts'\n[formats]\n\"notebooks\" = \"ipynb\"\n\"scripts\" = \"py:percent\"\n\"\"\",\n            \"notebooks///ipynb,scripts///py:percent\",\n        ),\n        (\n            \"\"\"# Pair local notebooks to scripts in 'notebooks_py' and md files in 'notebooks_md'\n[formats]\n\"\" = \"ipynb\"\n\"notebooks_py\" = \"py:percent\"\n\"notebooks_md\" = \"md:myst\"\n\"\"\",\n            \"ipynb,notebooks_py///py:percent,notebooks_md///md:myst\",\n        ),\n    ],\n)\ndef test_jupytext_formats(tmpdir, content_toml, formats_short_form):\n    jupytext_toml = tmpdir.join(\"jupytext.toml\")\n    jupytext_toml.write(content_toml)\n\n    config = load_jupytext_configuration_file(str(jupytext_toml))\n    assert config.formats == [formats_short_form]\n\n\ndef test_deprecated_formats_cause_warning(tmpdir, content_toml=\"default_jupytext_formats = 'ipynb,md'\"):\n    jupytext_toml = tmpdir.join(\"jupytext.toml\")\n    jupytext_toml.write(content_toml)\n\n    config = load_jupytext_configuration_file(str(jupytext_toml))\n    with pytest.warns(FutureWarning, match=\"use 'formats'\"):\n        assert config.default_formats(str(tmpdir.join(\"test.md\"))) == \"ipynb,md\"\n\n\n@pytest.mark.parametrize(\n    \"option_name\",\n    [\"notebook_metadata_filter\", \"cell_metadata_filter\", \"cell_markers\"],\n)\ndef test_deprecated_options_cause_warning(tmpdir, option_name):\n    jupytext_toml = tmpdir.join(\"jupytext.toml\")\n    jupytext_toml.write(f\"default_{option_name} = 'value'\")\n    config = load_jupytext_configuration_file(str(jupytext_toml))\n    fmt = {}\n    with pytest.warns(FutureWarning, match=f\"use '{option_name}'\"):\n        config.set_default_format_options(fmt)\n        assert fmt[option_name] == \"value\"\n\n\ndef test_simple_py_file_is_not_paired(tmp_path):\n    py_file = tmp_path / \"simple.py\"\n    py_file.write_text('print(\"Hello, world!\")')\n\n    config_file = tmp_path / \"jupytext.toml\"\n    config_file.write_text('formats = \"ipynb,py:percent\"')\n\n    notebook = read(str(py_file))\n    config_file = load_jupytext_config(str(config_file))\n\n    formats = notebook_formats(notebook, config_file, str(py_file))\n    assert formats == [{\"extension\": \".py\", \"format_name\": \"light\"}], formats\n\n\ndef test_pairing_groups(tmp_path):\n    \"\"\"Test list-based formats for subset-specific pairing\"\"\"\n    jupytext_toml = tmp_path / \"jupytext.toml\"\n    jupytext_toml.write_text(\"\"\"\n[[formats]]\n\"notebooks/tutorials/\" = \"ipynb\"\n\"docs/tutorials/\" = \"md\"\n\"scripts/tutorials/\" = \"py:percent\"\n\n[[formats]]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n\"\"\")\n\n    config = load_jupytext_configuration_file(str(jupytext_toml))\n\n    # Formats should be a list of str\n    assert isinstance(config.formats, list)\n    assert len(config.formats) == 2\n    assert all(isinstance(f, str) for f in config.formats)\n\n    # Test that default_formats returns the correct formats based on path\n    # Tutorial notebook should match first format (tutorials)\n    tutorial_notebook = str(tmp_path / \"notebooks\" / \"tutorials\" / \"getting_started.ipynb\")\n    assert (\n        config.default_formats(tutorial_notebook)\n        == \"notebooks/tutorials///ipynb,docs/tutorials///md,scripts/tutorials///py:percent\"\n    )\n\n    # Regular notebook should match second format (main)\n    regular_notebook = str(tmp_path / \"notebooks\" / \"hello.ipynb\")\n    assert config.default_formats(regular_notebook) == \"notebooks///ipynb,scripts///py:percent\"\n\n\ndef test_pairing_groups_multiple_groups(tmp_path):\n    \"\"\"Test multiple format sets with list-based formats\"\"\"\n    jupytext_toml = tmp_path / \"jupytext.toml\"\n    jupytext_toml.write_text(\"\"\"\n[[formats]]\n\"notebooks/tutorials/\" = \"ipynb\"\n\"docs/tutorials/\" = \"md\"\n\n[[formats]]\n\"notebooks/examples/\" = \"ipynb\"\n\"docs/examples/\" = \"md:myst\"\n\n[[formats]]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n\"\"\")\n\n    config = load_jupytext_configuration_file(str(jupytext_toml))\n\n    # Check formats is a list of dicts\n    assert isinstance(config.formats, list)\n    assert len(config.formats) == 3\n\n    # Test that the correct format is selected based on path (first match wins)\n    tutorial_notebook = str(tmp_path / \"notebooks\" / \"tutorials\" / \"intro.ipynb\")\n    assert config.default_formats(tutorial_notebook) == \"notebooks/tutorials///ipynb,docs/tutorials///md\"\n\n    example_notebook = str(tmp_path / \"notebooks\" / \"examples\" / \"demo.ipynb\")\n    assert config.default_formats(example_notebook) == \"notebooks/examples///ipynb,docs/examples///md:myst\"\n\n    # Regular notebook should use the last (default) format\n    regular_notebook = str(tmp_path / \"notebooks\" / \"regular.ipynb\")\n    assert config.default_formats(regular_notebook) == \"notebooks///ipynb,scripts///py:percent\"\n\n\ndef test_formats_list_without_default(tmp_path):\n    \"\"\"Test list-based formats without a default catchall\"\"\"\n    jupytext_toml = tmp_path / \"jupytext.toml\"\n    jupytext_toml.write_text(\"\"\"\n[[formats]]\n\"notebooks/tutorials/\" = \"ipynb\"\n\"docs/tutorials/\" = \"md\"\n\"\"\")\n\n    config = load_jupytext_configuration_file(str(jupytext_toml))\n\n    # Formats should be a list\n    assert isinstance(config.formats, list)\n    assert len(config.formats) == 1\n\n    # Matching notebook should work\n    tutorial_notebook = str(tmp_path / \"notebooks\" / \"tutorials\" / \"getting_started.ipynb\")\n    assert config.default_formats(tutorial_notebook) == \"notebooks/tutorials///ipynb,docs/tutorials///md\"\n\n    # Non-matching notebook should return None\n    other_notebook = str(tmp_path / \"notebooks\" / \"other.ipynb\")\n    assert config.default_formats(other_notebook) is None\n\n\ndef test_formats_list_yaml(tmp_path):\n    \"\"\"Test list-based formats with YAML config\"\"\"\n    jupytext_yml = tmp_path / \"jupytext.yml\"\n    jupytext_yml.write_text(\"\"\"\nformats:\n  - notebooks/tutorials/: ipynb\n    docs/tutorials/: md\n  - notebooks/: ipynb\n    scripts/: py:percent\n\"\"\")\n\n    config = load_jupytext_configuration_file(str(jupytext_yml))\n\n    # Formats should be a list\n    assert isinstance(config.formats, list)\n    assert len(config.formats) == 2\n\n\ndef test_formats_list_json(tmp_path):\n    \"\"\"Test list-based formats with JSON config\"\"\"\n    jupytext_json = tmp_path / \"jupytext.json\"\n    jupytext_json.write_text(\"\"\"{\n  \"formats\": [\n    {\n      \"notebooks/tutorials/\": \"ipynb\",\n      \"docs/tutorials/\": \"md\"\n    },\n    {\n      \"notebooks/\": \"ipynb\",\n      \"scripts/\": \"py:percent\"\n    }\n  ]\n}\n\"\"\")\n\n    config = load_jupytext_configuration_file(str(jupytext_json))\n\n    # Formats should be a list\n    assert isinstance(config.formats, list)\n    assert len(config.formats) == 2\n\n\ndef test_formats_semicolon_separated(tmp_path):\n    \"\"\"Test semicolon-separated format strings\"\"\"\n    jupytext_toml = tmp_path / \"jupytext.toml\"\n    jupytext_toml.write_text(\"\"\"\nformats = \"notebooks///ipynb,scripts///py:percent;ipynb,py:percent\"\n\"\"\")\n\n    config = load_jupytext_configuration_file(str(jupytext_toml))\n\n    # Formats should be split into a list\n    assert isinstance(config.formats, list)\n    assert len(config.formats) == 2\n    assert config.formats[0] == \"notebooks///ipynb,scripts///py:percent\"\n    assert config.formats[1] == \"ipynb,py:percent\"\n\n    # Test that the correct format is selected based on path\n    notebook_in_notebooks = str(tmp_path / \"notebooks\" / \"test.ipynb\")\n    assert config.default_formats(notebook_in_notebooks) == \"notebooks///ipynb,scripts///py:percent\"\n\n    notebook_elsewhere = str(tmp_path / \"test.ipynb\")\n    assert config.default_formats(notebook_elsewhere) == \"ipynb,py:percent\"\n\n\ndef test_formats_toml_list_of_strings(tmp_path):\n    \"\"\"Test TOML list with string format specifications\"\"\"\n    jupytext_toml = tmp_path / \"jupytext.toml\"\n    jupytext_toml.write_text(\"\"\"\nformats = [\n    \"notebooks///ipynb,scripts///py:percent\",\n    \"ipynb,py:percent\"\n]\n\"\"\")\n\n    config = load_jupytext_configuration_file(str(jupytext_toml))\n\n    # Formats should be a list\n    assert isinstance(config.formats, list)\n    assert len(config.formats) == 2\n    assert config.formats[0] == \"notebooks///ipynb,scripts///py:percent\"\n    assert config.formats[1] == \"ipynb,py:percent\"\n\n    # Test that the correct format is selected based on path\n    notebook_in_notebooks = str(tmp_path / \"notebooks\" / \"test.ipynb\")\n    assert config.default_formats(notebook_in_notebooks) == \"notebooks///ipynb,scripts///py:percent\"\n\n    notebook_elsewhere = str(tmp_path / \"test.ipynb\")\n    assert config.default_formats(notebook_elsewhere) == \"ipynb,py:percent\"\n"
  },
  {
    "path": "tests/functional/contents_manager/test_async_and_sync_contents_manager_are_in_sync.py",
    "content": "from pathlib import Path\n\nimport pytest\nfrom black import FileMode, format_str\n\nfrom jupytext.async_contentsmanager import __file__ as async_contentsmanager_file\nfrom jupytext.async_pairs import __file__ as async_pairs_file\nfrom jupytext.sync_contentsmanager import __file__ as sync_contentsmanager_file\nfrom jupytext.sync_pairs import __file__ as sync_pairs_file\n\n\ndef generate_sync_code_from_async_code(async_code: str) -> str:\n    # No async methods\n    sync_code = async_code.replace(\"async def\", \"def\")\n\n    # Don't await\n    sync_code = sync_code.replace(\"await \", \"\")\n\n    # Rename the contents manager\n    sync_code = sync_code.replace(\"AsyncLargeFileManager\", \"LargeFileManager\")\n    sync_code = sync_code.replace(\"AsyncJupytextContentsManager\", \"SyncJupytextContentsManager\")\n    sync_code = sync_code.replace(\"AsyncTextFileContentsManager\", \"TextFileContentsManager\")\n    sync_code = sync_code.replace(\"asynchronous\", \"synchronous\")\n    sync_code = sync_code.replace(\"async_\", \"sync_\")\n\n    # Add a header\n    sync_code = f'''\"\"\"\nThis file is automatically generated by\ntests/functional/contents_manager/test_async_and_sync_contents_manager_are_in_sync.py\nDo not edit this file manually.\n\"\"\"\n\n{sync_code}'''\n    sync_code = format_str(sync_code, mode=FileMode())\n\n    return sync_code\n\n\n@pytest.mark.parametrize(\n    \"async_file, sync_file\",\n    [\n        (async_contentsmanager_file, sync_contentsmanager_file),\n        (async_pairs_file, sync_pairs_file),\n    ],\n)\ndef test_async_and_sync_files_are_in_sync(async_file, sync_file):\n    async_code = Path(async_file).read_text()\n    sync_code = generate_sync_code_from_async_code(async_code)\n\n    actual_sync_code = Path(sync_file).read_text()\n    try:\n        assert actual_sync_code == sync_code\n    except AssertionError:\n        Path(sync_file).write_text(sync_code)\n        raise\n"
  },
  {
    "path": "tests/functional/docs/test_changelog.py",
    "content": "import re\nimport sys\nfrom pathlib import Path\n\nimport pytest\nfrom jupytext.version import __version__\n\n\ndef replace_issue_number_with_links(text):\n    return re.sub(\n        r\"([^\\[-])#([0-9]+)\",\n        r\"\\1[#\\2](https://github.com/mwouts/jupytext/issues/\\2)\",\n        text,\n    )\n\n\n@pytest.mark.parametrize(\n    \"input,output\",\n    [\n        (\n            \"Issue #535\",\n            \"Issue [#535](https://github.com/mwouts/jupytext/issues/535)\",\n        ),\n        (\n            \"Multiline\\ntext (#123)\",\n            \"Multiline\\ntext ([#123](https://github.com/mwouts/jupytext/issues/123))\",\n        ),\n        (\n            \"(#123) and [Another-project-#535](https://custom_url)\",\n            \"([#123](https://github.com/mwouts/jupytext/issues/123)) and [Another-project-#535](https://custom_url)\",\n        ),\n    ],\n)\ndef test_replace_issue_numbers_with_links(input, output):\n    assert replace_issue_number_with_links(input) == output\n\n\n@pytest.mark.skipif(sys.version_info < (3, 5), reason=\"'PosixPath' object has no attribute 'read_text'\")\ndef test_update_changelog():\n    changelog_file = Path(__file__).parent.parent.parent.parent / \"CHANGELOG.md\"\n    cur_text = changelog_file.read_text()\n    new_text = replace_issue_number_with_links(cur_text)\n    if cur_text != new_text:\n        changelog_file.write_text(new_text)  # pragma: no cover\n\n\ndef test_version_matches_changelog():\n    root_path = Path(__file__).parent.parent.parent.parent\n    changelog_file = root_path / \"CHANGELOG.md\"\n\n    # Read version from version.py\n    current_version = __version__\n\n    # Read first version from CHANGELOG.md\n    changelog_text = changelog_file.read_text()\n    prev_line = \"\"\n    for line in changelog_text.splitlines():\n        if not line.startswith(\"--------\"):\n            prev_line = line\n            continue\n\n        changelog_version = prev_line.split(\"(\")[0].strip()\n        assert current_version == changelog_version, (\n            f\"Version mismatch: version.py has {current_version}, but CHANGELOG.md has {changelog_version}\"\n        )\n\n        return\n\n    raise ValueError(\"No version found in CHANGELOG.md\")\n\n\ndef test_version_pep440_compliance():\n    pep440_regex = r\"^(?:(?:0|[1-9]\\d*)\\.){2}(?:0|[1-9]\\d*)(?:[abc]|rc)?(?:\\d+)?(?:\\.post\\d+)?(?:\\.dev\\d+)?$\"\n    assert re.match(pep440_regex, __version__), f\"Version {__version__} is not PEP 440 compliant\"\n"
  },
  {
    "path": "tests/functional/docs/test_doc_files_are_notebooks.py",
    "content": "from pathlib import Path\n\nimport pytest\n\nfrom jupytext import read\n\n\ndef documentation_files():\n    for path in (Path(__file__).parent / \"../../../docs\").iterdir():\n        if path.suffix == \".md\":\n            yield path\n\n\n@pytest.mark.parametrize(\n    \"doc_file\",\n    documentation_files(),\n    ids=[doc_file.stem for doc_file in documentation_files()],\n)\ndef test_doc_files_are_notebooks(doc_file):\n    nb = read(doc_file)\n\n    # count how many cell types\n    counts = {\"markdown\": 0, \"raw\": 0, \"code\": 0}\n    for cell in nb.cells:\n        counts[cell.cell_type] += 1\n\n    assert counts[\"raw\"] <= 1\n"
  },
  {
    "path": "tests/functional/metadata/test_metadata_filter.py",
    "content": "from copy import deepcopy\n\nimport pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_notebook\n\nfrom jupytext import reads, writes\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.compare import compare, compare_notebooks\nfrom jupytext.metadata_filter import filter_metadata, metadata_filter_as_dict\n\n\ndef to_dict(keys):\n    return {key: None for key in keys}\n\n\n@pytest.mark.parametrize(\n    \"metadata_filter_string,metadata_filter_dict\",\n    [\n        (\n            \"all, -widgets,-varInspector\",\n            {\"additional\": \"all\", \"excluded\": [\"widgets\", \"varInspector\"]},\n        ),\n        (\"toc\", {\"additional\": [\"toc\"]}),\n        (\"+ toc\", {\"additional\": [\"toc\"]}),\n        (\"preserve,-all\", {\"additional\": [\"preserve\"], \"excluded\": \"all\"}),\n        (\n            \"ExecuteTime, autoscroll, -hide_output\",\n            {\"additional\": [\"ExecuteTime\", \"autoscroll\"], \"excluded\": [\"hide_output\"]},\n        ),\n    ],\n)\ndef test_string_to_dict_conversion(metadata_filter_string, metadata_filter_dict):\n    assert metadata_filter_as_dict(metadata_filter_string) == metadata_filter_dict\n\n\ndef test_metadata_filter_as_dict():\n    assert metadata_filter_as_dict(True) == metadata_filter_as_dict(\"all\")\n    assert metadata_filter_as_dict(False) == metadata_filter_as_dict(\"-all\")\n    assert metadata_filter_as_dict({\"excluded\": \"all\"}) == metadata_filter_as_dict(\"-all\")\n\n\ndef test_metadata_filter_default():\n    assert filter_metadata(to_dict([\"technical\", \"user\", \"preserve\"]), None, \"-technical\") == to_dict([\"user\", \"preserve\"])\n    assert filter_metadata(to_dict([\"technical\", \"user\", \"preserve\"]), None, \"preserve,-all\") == to_dict([\"preserve\"])\n\n\ndef test_metadata_filter_user_plus_default():\n    assert filter_metadata(to_dict([\"technical\", \"user\", \"preserve\"]), \"-user\", \"-technical\") == to_dict([\"preserve\"])\n    assert filter_metadata(to_dict([\"technical\", \"user\", \"preserve\"]), \"all,-user\", \"-technical\") == to_dict(\n        [\"preserve\", \"technical\"]\n    )\n    assert filter_metadata(to_dict([\"technical\", \"user\", \"preserve\"]), \"user\", \"preserve,-all\") == to_dict(\n        [\"user\", \"preserve\"]\n    )\n\n\ndef test_metadata_filter_user_overrides_default():\n    assert filter_metadata(to_dict([\"technical\", \"user\", \"preserve\"]), \"all,-user\", \"-technical\") == to_dict(\n        [\"technical\", \"preserve\"]\n    )\n    assert filter_metadata(to_dict([\"technical\", \"user\", \"preserve\"]), \"user,-all\", \"preserve\") == to_dict([\"user\"])\n\n\ndef test_negative_cell_metadata_filter():\n    assert filter_metadata(to_dict([\"exectime\"]), \"-linesto\", \"-exectime\") == to_dict([])\n\n\ndef test_cell_metadata_filter_is_updated():\n    text = \"\"\"---\njupyter:\n  jupytext:\n    cell_metadata_filter: -all\n---\n\n```{r cache=FALSE}\n1+1\n```\n\"\"\"\n    nb = reads(text, \"Rmd\")\n    assert nb.metadata[\"jupytext\"][\"cell_metadata_filter\"] == \"cache,-all\"\n\n    text2 = writes(nb, \"Rmd\")\n    assert text.splitlines()[-3:] == text2.splitlines()[-3:]\n\n\ndef test_notebook_metadata_all():\n    nb = new_notebook(\n        metadata={\n            \"user_metadata\": [1, 2, 3],\n            \"jupytext\": {\"notebook_metadata_filter\": \"all\"},\n        }\n    )\n    text = writes(nb, \"md\")\n    assert \"user_metadata\" in text\n\n\ndef test_notebook_metadata_none():\n    nb = new_notebook(metadata={\"jupytext\": {\"notebook_metadata_filter\": \"-all\"}})\n    text = writes(nb, \"md\")\n    assert \"---\" not in text\n\n\ndef test_filter_nested_metadata():\n    metadata = {\"I\": {\"1\": {\"a\": 1, \"b\": 2}}}\n\n    assert filter_metadata(metadata, \"I\", \"-all\") == {\"I\": {\"1\": {\"a\": 1, \"b\": 2}}}\n    assert filter_metadata(metadata, \"-I\") == {}\n\n    assert filter_metadata(metadata, \"I.1.a\", \"-all\") == {\"I\": {\"1\": {\"a\": 1}}}\n    assert filter_metadata(metadata, \"-I.1.b\") == {\"I\": {\"1\": {\"a\": 1}}}\n\n    assert filter_metadata(metadata, \"-I.1.b\", \"I\") == {\"I\": {\"1\": {\"a\": 1}}}\n\n    # That one is not supported yet\n    # assert filter_metadata(metadata, 'I.1.a', '-I') == {'I': {'1': {'a': 1}}}\n\n\ndef test_filter_out_execution_metadata():\n    nb = new_notebook(\n        cells=[\n            new_code_cell(\n                \"1 + 1\",\n                metadata={\n                    \"execution\": {\n                        \"iopub.execute_input\": \"2020-10-12T19:13:45.306603Z\",\n                        \"iopub.status.busy\": \"2020-10-12T19:13:45.306233Z\",\n                        \"iopub.status.idle\": \"2020-10-12T19:13:45.316103Z\",\n                        \"shell.execute_reply\": \"2020-10-12T19:13:45.315429Z\",\n                        \"shell.execute_reply.started\": \"2020-10-12T19:13:45.306577Z\",\n                    }\n                },\n            )\n        ]\n    )\n\n    text = writes(nb, fmt=\"py:percent\")\n    assert \"execution\" not in text\n\n\ndef test_default_config_has_priority_over_current_metadata(\n    tmpdir,\n    text=\"\"\"# %% some_metadata_key=5\n1 + 1\n\"\"\",\n):\n    py_file = tmpdir.join(\"notebook.py\")\n    py_file.write(text)\n\n    cfg_file = tmpdir.join(\"jupytext.toml\")\n    cfg_file.write(\n        \"\"\"cell_metadata_filter = \"-some_metadata_key\"\n\"\"\"\n    )\n\n    jupytext_cli([str(py_file), \"--to\", \"py\"])\n    assert (\n        py_file.read()\n        == \"\"\"# %%\n1 + 1\n\"\"\"\n    )\n\n\n@pytest.mark.requires_myst\ndef test_metadata_filter_in_notebook_757():\n    md = \"\"\"---\njupytext:\n  cell_metadata_filter: all,-hidden,-heading_collapsed\n  notebook_metadata_filter: all,-language_info,-toc,-jupytext.text_representation.jupytext_version,-jupytext.text_representation.format_version\n  text_representation:\n    extension: .md\n    format_name: myst\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\nnbhosting:\n  title: 'Exercice: Taylor'\n---\n\n```python\n1 + 1\n```\n\"\"\"  # noqa\n    nb = reads(md, fmt=\"md:myst\")\n    assert nb.metadata[\"jupytext\"][\"notebook_metadata_filter\"] == \",\".join(\n        [\n            \"all\",\n            \"-language_info\",\n            \"-toc\",\n            \"-jupytext.text_representation.jupytext_version\",\n            \"-jupytext.text_representation.format_version\",\n        ]\n    )\n    md2 = writes(nb, fmt=\"md:myst\")\n    compare(md2, md)\n\n    for fmt in [\"py:light\", \"py:percent\", \"md\"]:\n        text = writes(nb, fmt=fmt)\n        nb2 = reads(text, fmt=fmt)\n        compare_notebooks(nb2, nb, fmt=fmt)\n        ref_metadata = deepcopy(nb.metadata)\n        del ref_metadata[\"jupytext\"][\"text_representation\"]\n        del nb2.metadata[\"jupytext\"][\"text_representation\"]\n        compare(nb2.metadata, ref_metadata)\n"
  },
  {
    "path": "tests/functional/metadata/test_metadata_filters_from_config.py",
    "content": "import nbformat\nimport pytest\nimport yaml\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.compare import compare, compare_notebooks\nfrom jupytext.header import _JUPYTER_METADATA_NAMESPACE\n\n\ndef test_metadata_filters_from_config(tmpdir):\n    cfg_file = tmpdir.join(\"jupytext.toml\")\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    md_file = tmpdir.join(\"notebook.md\")\n\n    cfg_file.write(\n        \"\"\"notebook_metadata_filter = \"-all\"\ncell_metadata_filter = \"-all\"\n\"\"\"\n    )\n    nb = new_notebook(\n        cells=[new_markdown_cell(\"A markdown cell\")],\n        metadata={\n            \"kernelspec\": {\n                \"display_name\": \"Python [conda env:.conda-week1]\",\n                \"language\": \"python\",\n                \"name\": \"conda-env-.conda-week1-py\",\n            },\n            \"language_info\": {\n                \"codemirror_mode\": {\"name\": \"ipython\", \"version\": 3},\n                \"file_extension\": \".py\",\n                \"mimetype\": \"text/x-python\",\n                \"name\": \"python\",\n                \"nbconvert_exporter\": \"python\",\n                \"pygments_lexer\": \"ipython3\",\n                \"version\": \"3.8.3\",\n            },\n            \"nbsphinx\": {\"execute\": \"never\"},\n        },\n    )\n    nbformat.write(nb, str(nb_file))\n\n    jupytext_cli([str(nb_file), \"--to\", \"md\"])\n    md = md_file.read()\n\n    compare(md, \"A markdown cell\\n\")\n\n    jupytext_cli([str(md_file), \"--to\", \"notebook\", \"--update\"])\n    nb2 = nbformat.read(str(nb_file), as_version=4)\n    compare_notebooks(nb2, nb)\n\n\n@pytest.mark.requires_myst\ndef test_root_level_metadata_filters_from_config(tmpdir):\n    cfg_file = tmpdir.join(\"jupytext.toml\")\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    md_file = tmpdir.join(\"notebook.md\")\n\n    cfg_file.write(\n        \"\"\"root_level_metadata_filter = \"-all\"\n\"\"\"\n    )\n    nb = new_notebook(\n        cells=[new_code_cell(\"1 + 1\")],\n        metadata={\n            \"language_info\": {\n                \"name\": \"python\",\n                \"pygments_lexer\": \"ipython3\",\n            },\n        },\n    )\n    nbformat.write(nb, str(nb_file))\n\n    jupytext_cli([str(nb_file), \"--to\", \"md:myst\"])\n    header = next(yaml.safe_load_all(md_file.read()))\n    assert list(header) == [_JUPYTER_METADATA_NAMESPACE]\n\n    jupytext_cli([str(md_file), \"--to\", \"notebook\", \"--update\"])\n    nb2 = nbformat.read(str(nb_file), as_version=4)\n    compare_notebooks(nb2, nb)\n"
  },
  {
    "path": "tests/functional/others/invalid_file_896.md",
    "content": "---\r\njupytext:\r\n  formats: ipynb,md:myst\r\n  text_representation:\r\n    extension: .md\r\n    format_name: myst\r\n    format_version: 0.13\r\n    jupytext_version: 1.11.5\r\nkernelspec:\r\n  display_name: Python 3 (ipykernel)\r\n  language: python\r\n  name: python3\r\n---\r\nEt voil!\r\n"
  },
  {
    "path": "tests/functional/others/test_active_cells.py",
    "content": "import pytest\nfrom nbformat import NotebookNode\n\nimport jupytext\nfrom jupytext.compare import compare, compare_cells\n\nHEADER = {\n    \".py\": \"\"\"# ---\n# jupyter:\n#   jupytext:\n#     main_language: python\n# ---\n\n\"\"\",\n    \".R\": \"\"\"# ---\n# jupyter:\n#   jupytext:\n#     main_language: python\n# ---\n\n\"\"\",\n    \".md\": \"\"\"---\njupyter:\n  jupytext:\n    main_language: python\n---\n\n\"\"\",\n    \".Rmd\": \"\"\"---\njupyter:\n  jupytext:\n    main_language: python\n---\n\n\"\"\",\n}\n\nACTIVE_ALL = {\n    \".py\": \"\"\"# %% active=\"ipynb,py,R,Rmd\"\n# This cell is active in all extensions\n\"\"\",\n    \".Rmd\": \"\"\"```{python active=\"ipynb,py,R,Rmd\"}\n# This cell is active in all extensions\n```\n\"\"\",\n    \".md\": \"\"\"```python active=\"ipynb,py,R,Rmd\"\n# This cell is active in all extensions\n```\n\"\"\",\n    \".R\": \"\"\"# %% active=\"ipynb,py,R,Rmd\"\n# This cell is active in all extensions\n\"\"\",\n    \".ipynb\": {\n        \"cell_type\": \"code\",\n        \"source\": \"# This cell is active in all extensions\",\n        \"metadata\": {\"active\": \"ipynb,py,R,Rmd\"},\n        \"execution_count\": None,\n        \"outputs\": [],\n    },\n}\n\n\ndef check_active_cell(ext, active_dict):\n    text = (\"\" if ext == \".py\" else HEADER[ext]) + active_dict[ext]\n    nb = jupytext.reads(text, ext)\n    assert len(nb.cells) == 1\n    compare(jupytext.writes(nb, ext), text)\n    cell = NotebookNode(active_dict[\".ipynb\"])\n    compare_cells(nb.cells, [cell], compare_ids=False)\n\n\n@pytest.mark.parametrize(\"ext\", [\".Rmd\", \".md\", \".py\", \".R\"])\ndef test_active_all(ext, no_jupytext_version_number):\n    check_active_cell(ext, ACTIVE_ALL)\n\n\nACTIVE_IPYNB = {\n    \".py\": \"\"\"# %% active=\"ipynb\"\n# # This cell is active only in ipynb\n# %matplotlib inline\n\"\"\",\n    \".Rmd\": \"\"\"```{python active=\"ipynb\", eval=FALSE}\n# This cell is active only in ipynb\n%matplotlib inline\n```\n\"\"\",\n    \".md\": \"\"\"```python active=\"ipynb\"\n# This cell is active only in ipynb\n%matplotlib inline\n```\n\"\"\",\n    \".R\": \"\"\"# %% active=\"ipynb\"\n# # This cell is active only in ipynb\n# %matplotlib inline\n\"\"\",\n    \".ipynb\": {\n        \"cell_type\": \"code\",\n        \"source\": \"# This cell is active only in ipynb\\n%matplotlib inline\",\n        \"metadata\": {\"active\": \"ipynb\"},\n        \"execution_count\": None,\n        \"outputs\": [],\n    },\n}\n\n\n@pytest.mark.parametrize(\"ext\", [\".Rmd\", \".md\", \".py\", \".R\"])\ndef test_active_ipynb(ext, no_jupytext_version_number):\n    check_active_cell(ext, ACTIVE_IPYNB)\n\n\nACTIVE_IPYNB_RMD_USING_TAG = {\n    \".py\": \"\"\"# %% tags=[\"active-ipynb-Rmd\"]\n# # This cell is active only in ipynb and Rmd\n# %matplotlib inline\n\"\"\",\n    \".Rmd\": \"\"\"```{python tags=c(\"active-ipynb-Rmd\")}\n# This cell is active only in ipynb and Rmd\n# %matplotlib inline\n```\n\"\"\",\n    \".md\": \"\"\"```python tags=[\"active-ipynb-Rmd\"]\n# This cell is active only in ipynb and Rmd\n%matplotlib inline\n```\n\"\"\",\n    \".R\": \"\"\"# %% tags=[\"active-ipynb-Rmd\"]\n# # This cell is active only in ipynb and Rmd\n# %matplotlib inline\n\"\"\",\n    \".ipynb\": {\n        \"cell_type\": \"code\",\n        \"source\": \"# This cell is active only in ipynb and Rmd\\n%matplotlib inline\",\n        \"metadata\": {\"tags\": [\"active-ipynb-Rmd\"]},\n        \"execution_count\": None,\n        \"outputs\": [],\n    },\n}\n\n\n@pytest.mark.parametrize(\"ext\", [\".Rmd\", \".md\", \".py\", \".R\"])\ndef test_active_ipynb_rmd_using_tags(ext, no_jupytext_version_number):\n    check_active_cell(ext, ACTIVE_IPYNB_RMD_USING_TAG)\n\n\nACTIVE_IPYNB_RSPIN = {\n    \".R\": \"\"\"#+ active=\"ipynb\", eval=FALSE\n# # This cell is active only in ipynb\n# 1 + 1\n\"\"\",\n    \".ipynb\": {\n        \"cell_type\": \"code\",\n        \"source\": \"# This cell is active only in ipynb\\n1 + 1\",\n        \"metadata\": {\"active\": \"ipynb\"},\n        \"execution_count\": None,\n        \"outputs\": [],\n    },\n}\n\n\ndef test_active_ipynb_rspin(no_jupytext_version_number):\n    nb = jupytext.reads(ACTIVE_IPYNB_RSPIN[\".R\"], \"R:spin\")\n    assert len(nb.cells) == 1\n    compare(jupytext.writes(nb, \"R:spin\"), ACTIVE_IPYNB_RSPIN[\".R\"])\n    cell = NotebookNode(ACTIVE_IPYNB_RSPIN[\".ipynb\"])\n    compare_cells(nb.cells, [cell], compare_ids=False)\n\n\nACTIVE_PY_IPYNB = {\n    \".py\": \"\"\"# %% active=\"ipynb,py\"\n# This cell is active in py and ipynb extensions\n\"\"\",\n    \".Rmd\": \"\"\"```{python active=\"ipynb,py\", eval=FALSE}\n# This cell is active in py and ipynb extensions\n```\n\"\"\",\n    \".md\": \"\"\"```python active=\"ipynb,py\"\n# This cell is active in py and ipynb extensions\n```\n\"\"\",\n    \".R\": \"\"\"# %% active=\"ipynb,py\"\n# # This cell is active in py and ipynb extensions\n\"\"\",\n    \".ipynb\": {\n        \"cell_type\": \"code\",\n        \"source\": \"# This cell is active in py and ipynb extensions\",\n        \"metadata\": {\"active\": \"ipynb,py\"},\n        \"execution_count\": None,\n        \"outputs\": [],\n    },\n}\n\n\n@pytest.mark.parametrize(\"ext\", [\".Rmd\", \".md\", \".py\", \".R\"])\ndef test_active_py_ipynb(ext, no_jupytext_version_number):\n    check_active_cell(ext, ACTIVE_PY_IPYNB)\n\n\nACTIVE_PY_R_IPYNB = {\n    \".py\": \"\"\"# %% active=\"ipynb,py,R\"\n# This cell is active in py, R and ipynb extensions\n\"\"\",\n    \".Rmd\": \"\"\"```{python active=\"ipynb,py,R\", eval=FALSE}\n# This cell is active in py, R and ipynb extensions\n```\n\"\"\",\n    \".R\": \"\"\"# %% active=\"ipynb,py,R\"\n# This cell is active in py, R and ipynb extensions\n\"\"\",\n    \".ipynb\": {\n        \"cell_type\": \"code\",\n        \"source\": \"# This cell is active in py, R and ipynb extensions\",\n        \"metadata\": {\"active\": \"ipynb,py,R\"},\n        \"execution_count\": None,\n        \"outputs\": [],\n    },\n}\n\n\n@pytest.mark.parametrize(\"ext\", [\".Rmd\", \".py\", \".R\"])\ndef test_active_py_r_ipynb(ext, no_jupytext_version_number):\n    check_active_cell(ext, ACTIVE_PY_R_IPYNB)\n\n\nACTIVE_RMD = {\n    \".py\": \"\"\"# %% active=\"Rmd\"\n# # This cell is active in Rmd only\n\"\"\",\n    \".Rmd\": \"\"\"```{python active=\"Rmd\"}\n# This cell is active in Rmd only\n```\n\"\"\",\n    \".R\": \"\"\"# %% active=\"Rmd\"\n# # This cell is active in Rmd only\n\"\"\",\n    \".ipynb\": {\n        \"cell_type\": \"raw\",\n        \"source\": \"# This cell is active in Rmd only\",\n        \"metadata\": {\"active\": \"Rmd\"},\n    },\n}\n\n\n@pytest.mark.parametrize(\"ext\", [\".Rmd\", \".py\", \".R\"])\ndef test_active_rmd(ext, no_jupytext_version_number):\n    check_active_cell(ext, ACTIVE_RMD)\n\n\nACTIVE_NOT_INCLUDE_RMD = {\n    \".py\": \"\"\"# %% tags=[\"remove_cell\"] active=\"Rmd\"\n# # This cell is active in Rmd only\n\"\"\",\n    \".Rmd\": \"\"\"```{python include=FALSE, active=\"Rmd\"}\n# This cell is active in Rmd only\n```\n\"\"\",\n    \".R\": \"\"\"# %% tags=[\"remove_cell\"] active=\"Rmd\"\n# # This cell is active in Rmd only\n\"\"\",\n    \".ipynb\": {\n        \"cell_type\": \"raw\",\n        \"source\": \"# This cell is active in Rmd only\",\n        \"metadata\": {\"active\": \"Rmd\", \"tags\": [\"remove_cell\"]},\n    },\n}\n\n\n@pytest.mark.parametrize(\"ext\", [\".Rmd\", \".py\", \".R\"])\ndef test_active_not_include_rmd(ext, no_jupytext_version_number):\n    check_active_cell(ext, ACTIVE_NOT_INCLUDE_RMD)\n\n\ndef test_active_cells_from_py_percent(\n    text=\"\"\"# %% active=\"py\"\nprint('should only be displayed in py file')\n\n# %% tags=[\"active-py\"]\nprint('should only be displayed in py file')\n\n# %% active=\"ipynb\"\n# print('only in jupyter')\n\"\"\",\n):\n    \"\"\"Example taken from https://github.com/mwouts/jupytext/issues/477\"\"\"\n    nb = jupytext.reads(text, \"py:percent\")\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[1].cell_type == \"raw\"\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[2].source == \"print('only in jupyter')\"\n\n    text2 = jupytext.writes(nb, \"py:percent\")\n    compare(text2, text)\n\n\ndef test_comments_work_in_active_cells_from_py_percent_1131(\n    text=\"\"\"# %% tags=[\"active-py\"]\n# this is a comment\n\"\"\",\n):\n    nb = jupytext.reads(text, \"py:percent\")\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"# this is a comment\"\n\n    text2 = jupytext.writes(nb, \"py:percent\")\n    compare(text2, text)\n\n\ndef test_comments_work_in_active_cells_from_py_light_1131(\n    text=\"\"\"# + tags=[\"active-py\"]\n# this is a comment\n\"\"\",\n):\n    nb = jupytext.reads(text, \"py:light\")\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"# this is a comment\"\n\n    text2 = jupytext.writes(nb, \"py:light\")\n    compare(text2, text)\n\n\ndef test_comments_plus_code_work_in_active_cells_from_py_percent_1131(\n    text=\"\"\"# %% tags=[\"active-py\"]\n# this is a comment\n1 + 1\n\"\"\",\n):\n    nb = jupytext.reads(text, \"py:percent\")\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"# this is a comment\\n1 + 1\"\n\n    text2 = jupytext.writes(nb, \"py:percent\")\n    compare(text2, text)\n\n\ndef test_comments_plus_code_work_in_active_cells_from_py_light_1131(\n    text=\"\"\"# + tags=[\"active-py\"]\n# this is a comment\n1 + 1\n\"\"\",\n):\n    nb = jupytext.reads(text, \"py:light\")\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"# this is a comment\\n1 + 1\"\n\n    text2 = jupytext.writes(nb, \"py:light\")\n    compare(text2, text)\n\n\ndef test_active_cells_from_py_light(\n    text=\"\"\"# + active=\"py\"\nprint('should only be displayed in py file')\n\n# + tags=[\"active-py\"]\nprint('should only be displayed in py file')\n\n# + active=\"ipynb\"\n# print('only in jupyter')\n\"\"\",\n):\n    \"\"\"Example adapted from https://github.com/mwouts/jupytext/issues/477\"\"\"\n    nb = jupytext.reads(text, \"py:light\")\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[1].cell_type == \"raw\"\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[2].source == \"print('only in jupyter')\"\n\n    text2 = jupytext.writes(nb, \"py\")\n    compare(text2, text)\n"
  },
  {
    "path": "tests/functional/others/test_auto_ext.py",
    "content": "import pytest\n\nfrom jupytext import read, reads, writes\nfrom jupytext.formats import JupytextFormatError, auto_ext_from_metadata\n\n\ndef test_auto_in_fmt(ipynb_py_R_file):\n    nb = read(ipynb_py_R_file)\n    auto_ext = auto_ext_from_metadata(nb.metadata)\n    fmt = auto_ext[1:] + \":percent\"\n    text = writes(nb, \"auto:percent\")\n\n    assert \"auto\" not in text\n\n    nb2 = reads(text, fmt)\n    assert nb2.metadata[\"jupytext\"][\"text_representation\"][\"extension\"]\n    assert nb2.metadata[\"jupytext\"][\"text_representation\"][\"format_name\"] == \"percent\"\n\n    del nb.metadata[\"language_info\"]\n    del nb.metadata[\"kernelspec\"]\n    with pytest.raises(JupytextFormatError):\n        writes(nb, \"auto:percent\")\n\n\ndef test_auto_from_kernelspecs_works(ipynb_file):\n    nb = read(ipynb_file)\n    language_info = nb.metadata.pop(\"language_info\")\n    expected_ext = language_info.get(\"file_extension\")\n    if not expected_ext:\n        pytest.skip(\"No file_extension in language_info\")\n    if expected_ext == \".r\":\n        expected_ext = \".R\"\n    elif expected_ext == \".fs\":\n        expected_ext = \".fsx\"\n    elif expected_ext == \".C\":\n        # ROOT-flavored C++ notebooks have a .C extension in the language_info, see PR #1384\n        expected_ext = \".cpp\"\n    auto_ext = auto_ext_from_metadata(nb.metadata)\n    if auto_ext == \".sage\":\n        pytest.skip(\"Sage notebooks have Python in their language_info metadata, see #727\")\n    assert auto_ext == expected_ext\n\n\ndef test_auto_in_formats(ipynb_py_R_jl_file):\n    if any(pattern in ipynb_py_R_jl_file for pattern in [\"plotly\", \"julia\"]):\n        pytest.skip()\n    nb = read(ipynb_py_R_jl_file)\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,auto:percent\"}\n    fmt = auto_ext_from_metadata(nb.metadata)[1:] + \":percent\"\n    expected_formats = \"ipynb,\" + fmt\n\n    text = writes(nb, \"ipynb\")\n    assert \"auto\" not in text\n    nb2 = reads(text, \"ipynb\")\n    assert nb2.metadata[\"jupytext\"][\"formats\"] == expected_formats\n\n    text = writes(nb, \"auto:percent\")\n    assert \"auto\" not in text\n    nb2 = reads(text, fmt)\n    assert nb2.metadata[\"jupytext\"][\"formats\"] == expected_formats\n\n    del nb.metadata[\"language_info\"]\n    del nb.metadata[\"kernelspec\"]\n    with pytest.raises(JupytextFormatError):\n        writes(nb, \"ipynb\")\n    with pytest.raises(JupytextFormatError):\n        writes(nb, \"auto:percent\")\n"
  },
  {
    "path": "tests/functional/others/test_cell_markers.py",
    "content": "from nbformat.v4.nbbase import new_raw_cell\n\nfrom jupytext import reads, writes\nfrom jupytext.cli import jupytext\n\n\ndef test_set_cell_markers_cli(tmpdir, cwd_tmpdir):\n    tmpdir.join(\"test.py\").write(\"# %% [markdown]\\n# A Markdown cell\\n\")\n    jupytext([\"--format-options\", 'cell_markers=\"\"\"', \"test.py\"])\n    py = tmpdir.join(\"test.py\").read()\n    assert py.endswith('# %% [markdown]\\n\"\"\"\\nA Markdown cell\\n\"\"\"\\n')\n\n\ndef test_add_cell_to_script_with_cell_markers(\n    no_jupytext_version_number,\n    py='''# ---\n# jupyter:\n#   jupytext:\n#     formats: py:percent\n#     cell_markers: '\"\"\"'\n# ---\n''',\n):\n    nb = reads(py, fmt=\"py:percent\")\n    nb.cells = [new_raw_cell(\"A raw cell\")]\n    py2 = writes(nb, fmt=\"py:percent\")\n    assert py2.endswith(\n        '''# %% [raw]\n\"\"\"\nA raw cell\n\"\"\"\n'''\n    )\n"
  },
  {
    "path": "tests/functional/others/test_cell_metadata.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell\n\nimport jupytext\nfrom jupytext.cell_metadata import (\n    _IGNORE_CELL_METADATA,\n    RMarkdownOptionParsingError,\n    is_valid_metadata_key,\n    metadata_to_rmd_options,\n    metadata_to_text,\n    parse_key_equal_value,\n    parse_rmd_options,\n    rmd_options_to_metadata,\n    text_to_metadata,\n    try_eval_metadata,\n)\nfrom jupytext.combine import combine_inputs_with_outputs\nfrom jupytext.compare import compare, compare_notebooks\nfrom jupytext.metadata_filter import filter_metadata\n\n\ndef r_options_language_metadata():\n    yield from [\n        (\"r\", \"R\", {}),\n        (\n            'r plot_1, dpi=72, fig.path=\"fig_path/\"',\n            \"R\",\n            {\"name\": \"plot_1\", \"dpi\": 72, \"fig.path\": \"fig_path/\"},\n        ),\n        (\n            'r plot_1, bool=TRUE, fig.path=\"fig_path/\"',\n            \"R\",\n            {\"name\": \"plot_1\", \"bool\": True, \"fig.path\": \"fig_path/\"},\n        ),\n        (\"r echo=FALSE\", \"R\", {\"tags\": [\"remove_input\"]}),\n        (\"r plot_1, echo=TRUE\", \"R\", {\"name\": \"plot_1\", \"echo\": True}),\n        (\n            \"python echo=if a==5 then TRUE else FALSE\",\n            \"python\",\n            {\"echo\": \"#R_CODE#if a==5 then TRUE else FALSE\"},\n        ),\n        (\n            'python noname, tags=c(\"a\", \"b\", \"c\"), echo={sum(a+c(1,2))>1}',\n            \"python\",\n            {\n                \"name\": \"noname\",\n                \"tags\": [\"a\", \"b\", \"c\"],\n                \"echo\": \"#R_CODE#{sum(a+c(1,2))>1}\",\n            },\n        ),\n        ('python active=\"ipynb,py\"', \"python\", {\"active\": \"ipynb,py\"}),\n        (\n            'python include=FALSE, active=\"Rmd\"',\n            \"python\",\n            {\"active\": \"Rmd\", \"tags\": [\"remove_cell\"]},\n        ),\n        (\n            'r chunk_name, include=FALSE, active=\"Rmd\"',\n            \"R\",\n            {\"name\": \"chunk_name\", \"active\": \"Rmd\", \"tags\": [\"remove_cell\"]},\n        ),\n        ('python tags=c(\"parameters\")', \"python\", {\"tags\": [\"parameters\"]}),\n    ]\n\n\n@pytest.mark.parametrize(\"options,language, metadata\", r_options_language_metadata())\ndef test_parse_rmd_options(options, language, metadata):\n    compare(rmd_options_to_metadata(options), (language, metadata))\n\n\n@pytest.mark.parametrize(\"options,language, metadata\", r_options_language_metadata())\ndef test_build_options(options, language, metadata):\n    compare(metadata_to_rmd_options(*(language, metadata)), options)\n\n\n@pytest.mark.parametrize(\"options,language, metadata\", r_options_language_metadata())\ndef test_build_options_random_order(options, language, metadata):\n    # Older python has no respect for order...\n    # assert to_chunk_options(metadata) == options\n\n    def split_and_strip(opt):\n        {o.strip() for o in opt.split(\",\")}\n\n    assert split_and_strip(metadata_to_rmd_options(*(language, metadata))) == split_and_strip(options)\n\n\n@pytest.mark.parametrize(\"options\", [\"a={)\", \"name, name2\", \"a=}\", \"b=]\", \"c=[\"])\ndef test_parsing_error(options):\n    with pytest.raises(RMarkdownOptionParsingError):\n        parse_rmd_options(options)\n\n\ndef test_ignore_metadata():\n    metadata = {\"trusted\": True, \"tags\": [\"remove_input\"]}\n    metadata = filter_metadata(metadata, None, _IGNORE_CELL_METADATA)\n    assert metadata_to_rmd_options(\"R\", metadata) == \"r echo=FALSE\"\n\n\ndef test_filter_metadata():\n    assert filter_metadata({\"scrolled\": True}, None, _IGNORE_CELL_METADATA) == {}\n\n\ndef test_try_eval_metadata():\n    metadata = {\"list\": 'list(\"a\",5)', \"c\": \"c(1,2,3)\"}\n    try_eval_metadata(metadata, \"list\")\n    try_eval_metadata(metadata, \"c\")\n    assert metadata == {\"list\": [\"a\", 5], \"c\": [1, 2, 3]}\n\n\ndef test_language_no_metadata(text=\"python\", value=(\"python\", {})):\n    compare(text_to_metadata(text), value)\n    assert metadata_to_text(*value) == text.strip()\n\n\ndef test_only_metadata(text='key=\"value\"', value=(\"\", {\"key\": \"value\"})):\n    compare(text_to_metadata(text), value)\n    assert metadata_to_text(*value) == text\n\n\ndef test_only_metadata_2(text='key=\"value\"', value=(\"\", {\"key\": \"value\"})):\n    compare(text_to_metadata(text, allow_title=True), value)\n    assert metadata_to_text(*value) == text\n\n\ndef test_no_language(text=\".class\", value=(\"\", {\".class\": None})):\n    compare(text_to_metadata(text), value)\n    assert metadata_to_text(*value) == text\n\n\ndef test_language_metadata_no_space(text='python{\"a\":1}', value=(\"python\", {\"a\": 1})):\n    compare(text_to_metadata(text), value)\n    assert metadata_to_text(*value) == \"python a=1\"\n\n\ndef test_title_no_metadata(text=\"title\", value=(\"title\", {})):\n    compare(text_to_metadata(text, allow_title=True), value)\n    assert metadata_to_text(*value) == text.strip()\n\n\ndef test_simple_metadata(\n    text='python string=\"value\" number=1.0 array=[\"a\", \"b\"]',\n    value=(\"python\", {\"string\": \"value\", \"number\": 1.0, \"array\": [\"a\", \"b\"]}),\n):\n    compare(text_to_metadata(text), value)\n    assert metadata_to_text(*value) == text\n\n\ndef test_simple_metadata_with_spaces(\n    text='python string = \"value\" number = 1.0 array = [\"a\",  \"b\"]',\n    value=(\"python\", {\"string\": \"value\", \"number\": 1.0, \"array\": [\"a\", \"b\"]}),\n):\n    compare(text_to_metadata(text), value)\n    assert metadata_to_text(*value) == 'python string=\"value\" number=1.0 array=[\"a\", \"b\"]'\n\n\ndef test_title_and_relax_json(\n    text=\"cell title string='value' number=1.0 array=['a', \\\"b\\\"]\",\n    value=(\"cell title\", {\"string\": \"value\", \"number\": 1.0, \"array\": [\"a\", \"b\"]}),\n):\n    compare(text_to_metadata(text, allow_title=True), value)\n    assert metadata_to_text(*value) == 'cell title string=\"value\" number=1.0 array=[\"a\", \"b\"]'\n\n\ndef test_title_and_json_dict(\n    text='cell title {\"string\": \"value\", \"number\": 1.0, \"array\": [\"a\", \"b\"]}',\n    value=(\"cell title\", {\"string\": \"value\", \"number\": 1.0, \"array\": [\"a\", \"b\"]}),\n):\n    compare(text_to_metadata(text, allow_title=True), value)\n    assert metadata_to_text(*value) == 'cell title string=\"value\" number=1.0 array=[\"a\", \"b\"]'\n\n\n@pytest.mark.parametrize(\"allow_title\", [True, False])\ndef test_attribute(allow_title):\n    text = \".class\"\n    value = (\"\", {\".class\": None})\n    compare(text_to_metadata(text, allow_title), value)\n    assert metadata_to_text(*value) == text\n\n\ndef test_language_and_attribute(text=\"python .class\", value=(\"python\", {\".class\": None})):\n    compare(text_to_metadata(text), value)\n    assert metadata_to_text(*value) == text\n\n\ndef test_title_and_attribute(text=\"This is my title. .class\", value=(\"This is my title.\", {\".class\": None})):\n    compare(text_to_metadata(text, allow_title=True), value)\n    assert metadata_to_text(*value) == text\n\n\ndef test_values_with_equal_signs_inside(text='python string=\"value=5\"', value=(\"python\", {\"string\": \"value=5\"})):\n    compare(text_to_metadata(text), value)\n    assert metadata_to_text(*value) == text\n\n\ndef test_incorrectly_encoded(text=\"this is an incorrect expression d={{4 b=3\"):\n    value = text_to_metadata(text, allow_title=True)\n    assert metadata_to_text(*value) == text\n\n\ndef test_incorrectly_encoded_json(text='this is an incorrect expression {\"d\": \"}'):\n    value = text_to_metadata(text, allow_title=True)\n    assert metadata_to_text(*value) == text\n\n\ndef test_parse_key_value():\n    assert parse_key_equal_value(\"key='value' key2=5.0\") == {\n        \"key\": \"value\",\n        \"key2\": 5.0,\n    }\n\n\ndef test_parse_key_value_key():\n    assert parse_key_equal_value(\"key='value' key2\") == {\n        \"key\": \"value\",\n        \"key2\": None,\n    }\n\n\n@pytest.mark.parametrize(\"key\", [\"ok\", \"also.ok\", \"all_right_55\", \"not,ok\", \"unexpected,key\"])\ndef test_is_valid_metadata_key(key):\n    assert is_valid_metadata_key(key) == (\",\" not in key)\n\n\n@pytest.fixture()\ndef notebook_with_unsupported_key_in_metadata(python_notebook):\n    nb = python_notebook\n    nb.cells.append(new_markdown_cell(\"text\", metadata={\"unexpected,key\": True}))\n    return nb\n\n\ndef test_unsupported_key_in_metadata(notebook_with_unsupported_key_in_metadata, fmt_with_cell_metadata):\n    \"\"\"Notebook metadata that can't be parsed in text notebook cannot go to the text file,\n    but it should still remain available in the ipynb file for paired notebooks.\"\"\"\n    with pytest.warns(\n        UserWarning,\n        match=\"The following metadata cannot be exported to the text notebook\",\n    ):\n        text = jupytext.writes(notebook_with_unsupported_key_in_metadata, fmt_with_cell_metadata)\n    assert \"unexpected\" not in text\n    nb_text = jupytext.reads(text, fmt=fmt_with_cell_metadata)\n    nb = combine_inputs_with_outputs(nb_text, notebook_with_unsupported_key_in_metadata, fmt=fmt_with_cell_metadata)\n    assert nb.cells[-1].metadata == {\"unexpected,key\": True}\n\n\n@pytest.fixture()\ndef notebook_with_collapsed_cell(python_notebook):\n    nb = python_notebook\n    nb.cells.append(new_markdown_cell(\"## Data\", metadata={\"jp-MarkdownHeadingCollapsed\": True}))\n    return nb\n\n\ndef test_notebook_with_collapsed_cell(notebook_with_collapsed_cell, fmt_with_cell_metadata):\n    text = jupytext.writes(notebook_with_collapsed_cell, fmt_with_cell_metadata)\n    assert \"MarkdownHeadingCollapsed\" in text\n    nb = jupytext.reads(text, fmt=fmt_with_cell_metadata)\n    compare_notebooks(nb, notebook_with_collapsed_cell, fmt=fmt_with_cell_metadata)\n\n\ndef test_empty_tags_are_not_saved_in_text_notebooks(no_jupytext_version_number, python_notebook, fmt=\"py:percent\"):\n    nb = python_notebook\n    nb.cells.append(new_code_cell(metadata={\"tags\": []}))\n    text = jupytext.writes(nb, fmt=fmt)\n    assert \"tags\" not in text\n    nb_text = jupytext.reads(text, fmt=fmt)\n    nb2 = combine_inputs_with_outputs(nb_text, nb, fmt=fmt)\n    assert nb2.cells[-1].metadata[\"tags\"] == []\n"
  },
  {
    "path": "tests/functional/others/test_cell_tags_are_preserved.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell\n\nfrom jupytext import reads, writes\nfrom jupytext.formats import formats_with_support_for_cell_metadata, is_myst_available\n\n\n@pytest.fixture()\ndef notebook_with_tags(python_notebook):\n    nb = python_notebook\n    nb.cells = [\n        new_code_cell(\"1 + 1\", metadata={\"tags\": [\"tag1\"]}),\n        new_markdown_cell(\"some text\", metadata={\"tags\": [\"tag2\"]}),\n    ]\n    return nb\n\n\n@pytest.mark.parametrize(\"fmt\", [\"py:percent\", \"py:light\", \"md:markdown\", \"md:myst\", \"Rmd:rmarkdown\"])\ndef test_main_formats_support_cell_metadata(fmt):\n    if fmt == \"md:myst\" and not is_myst_available():\n        pytest.skip(\"myst is not available\")\n    assert fmt in set(formats_with_support_for_cell_metadata())\n\n\ndef test_tags_are_preserved(notebook_with_tags, fmt_with_cell_metadata):\n    text = writes(notebook_with_tags, fmt_with_cell_metadata)\n    nb = reads(text, fmt_with_cell_metadata)\n    assert nb.cells[0][\"metadata\"][\"tags\"] == [\"tag1\"]\n    assert nb.cells[1][\"metadata\"][\"tags\"] == [\"tag2\"]\n"
  },
  {
    "path": "tests/functional/others/test_cells.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_markdown_cell\n\nfrom jupytext.cell_reader import (\n    LightScriptCellReader,\n    RMarkdownCellReader,\n    paragraph_is_fully_commented,\n    uncomment,\n)\nfrom jupytext.cell_to_text import RMarkdownCellExporter\n\n\n@pytest.mark.parametrize(\n    \"lines\",\n    [\n        \"# text\",\n        \"\"\"# # %%R\n# # comment\n# 1 + 1\n# 2 + 2\n\"\"\",\n    ],\n)\ndef test_paragraph_is_fully_commented(lines):\n    assert paragraph_is_fully_commented(lines.splitlines(), comment=\"#\", main_language=\"python\")\n\n\ndef test_paragraph_is_not_fully_commented(lines=\"# text\\nnot fully commented out\"):\n    assert not paragraph_is_fully_commented(lines.splitlines(), comment=\"#\", main_language=\"python\")\n\n\ndef test_uncomment():\n    assert uncomment([\"# line one\", \"#line two\", \"line three\"], \"#\") == [\n        \"line one\",\n        \"line two\",\n        \"line three\",\n    ]\n    assert uncomment([\"# line one\", \"#line two\", \"line three\"], \"\") == [\n        \"# line one\",\n        \"#line two\",\n        \"line three\",\n    ]\n\n\ndef test_text_to_code_cell():\n    text = \"\"\"```{python}\n1+2+3\n```\n\"\"\"\n    lines = text.splitlines()\n    cell, pos = RMarkdownCellReader().read(lines)\n\n    assert cell.cell_type == \"code\"\n    assert cell.source == \"1+2+3\"\n    assert cell.metadata == {\"language\": \"python\"}\n    assert lines[pos:] == []\n\n\ndef test_text_to_code_cell_empty_code():\n    text = \"\"\"```{python}\n```\n\"\"\"\n    lines = text.splitlines()\n    cell, pos = RMarkdownCellReader().read(lines)\n\n    assert cell.cell_type == \"code\"\n    assert cell.source == \"\"\n    assert cell.metadata == {\"language\": \"python\"}\n    assert lines[pos:] == []\n\n\ndef test_text_to_code_cell_empty_code_no_blank_line():\n    text = \"\"\"```{python}\n```\n\"\"\"\n    lines = text.splitlines()\n    cell, pos = RMarkdownCellReader().read(lines)\n\n    assert cell.cell_type == \"code\"\n    assert cell.source == \"\"\n    assert cell.metadata == {\"language\": \"python\"}\n    assert lines[pos:] == []\n\n\ndef test_text_to_markdown_cell():\n    text = \"\"\"This is\na markdown cell\n\n```{python}\n1+2+3\n```\n\"\"\"\n    lines = text.splitlines()\n    cell, pos = RMarkdownCellReader().read(lines)\n\n    assert cell.cell_type == \"markdown\"\n    assert cell.source == \"This is\\na markdown cell\"\n    assert cell.metadata == {}\n    assert pos == 3\n\n\ndef test_text_to_markdown_no_blank_line():\n    text = \"\"\"This is\na markdown cell\n```{python}\n1+2+3\n```\n\"\"\"\n    lines = text.splitlines()\n    cell, pos = RMarkdownCellReader().read(lines)\n\n    assert cell.cell_type == \"markdown\"\n    assert cell.source == \"This is\\na markdown cell\"\n    assert cell.metadata == {\"lines_to_next_cell\": 0}\n    assert pos == 2\n\n\ndef test_text_to_markdown_two_blank_line():\n    text = \"\"\"\n\n```{python}\n1+2+3\n```\n\"\"\"\n    lines = text.splitlines()\n    cell, pos = RMarkdownCellReader().read(lines)\n\n    assert cell.cell_type == \"markdown\"\n    assert cell.source == \"\"\n    assert cell.metadata == {}\n    assert pos == 2\n\n\ndef test_text_to_markdown_one_blank_line():\n    text = \"\"\"\n```{python}\n1+2+3\n```\n\"\"\"\n    lines = text.splitlines()\n    cell, pos = RMarkdownCellReader().read(lines)\n\n    assert cell.cell_type == \"markdown\"\n    assert cell.source == \"\"\n    assert cell.metadata == {\"lines_to_next_cell\": 0}\n    assert pos == 1\n\n\ndef test_empty_markdown_to_text():\n    cell = new_markdown_cell(source=\"\")\n    text = RMarkdownCellExporter(cell, \"python\").cell_to_text()\n    assert text == [\"\"]\n\n\ndef test_text_to_cell_py():\n    text = \"1+1\\n\"\n    lines = text.splitlines()\n    cell, pos = LightScriptCellReader().read(lines)\n    assert cell.cell_type == \"code\"\n    assert cell.source == \"1+1\"\n    assert cell.metadata == {}\n    assert pos == 1\n\n\ndef test_text_to_cell_py2():\n    text = \"\"\"def f(x):\n    return x+1\"\"\"\n    lines = text.splitlines()\n    cell, pos = LightScriptCellReader().read(lines)\n    assert cell.cell_type == \"code\"\n    assert cell.source == \"\"\"def f(x):\\n    return x+1\"\"\"\n    assert cell.metadata == {}\n    assert pos == 2\n\n\ndef test_code_to_cell():\n    text = \"\"\"def f(x):\n    return x+1\"\"\"\n    lines = text.splitlines()\n    cell, pos = LightScriptCellReader().read(lines)\n    assert cell.cell_type == \"code\"\n    assert cell.source == \"\"\"def f(x):\\n    return x+1\"\"\"\n    assert cell.metadata == {}\n    assert pos == 2\n\n\ndef test_uncomment_ocaml():\n    assert uncomment([\"(* ## *)\"], \"(*\", \"*)\") == [\"##\"]\n    assert uncomment([\"(*##*)\"], \"(*\", \"*)\") == [\"##\"]\n"
  },
  {
    "path": "tests/functional/others/test_combine.py",
    "content": "from copy import deepcopy\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.combine import combine_inputs_with_outputs\nfrom jupytext.compare import compare, compare_notebooks\n\n\ndef test_combine():\n    nb_source = new_notebook(\n        cells=[\n            new_markdown_cell(\"Markdown text\"),\n            new_code_cell(\"a=3\"),\n            new_code_cell(\"a+1\"),\n            new_code_cell(\"a+1\"),\n            new_markdown_cell(\"Markdown text\"),\n            new_code_cell(\"a+2\"),\n        ]\n    )\n\n    nb_outputs = new_notebook(\n        cells=[\n            new_markdown_cell(\"Markdown text\"),\n            new_code_cell(\"a=3\"),\n            new_code_cell(\"a+1\"),\n            new_code_cell(\"a+2\"),\n            new_markdown_cell(\"Markdown text\"),\n        ]\n    )\n\n    nb_outputs.cells[2].outputs = [\"4\"]\n    nb_outputs.cells[3].outputs = [\"5\"]\n\n    nb_source = combine_inputs_with_outputs(nb_source, nb_outputs)\n\n    assert nb_source.cells[2].outputs == [\"4\"]\n    assert nb_source.cells[3].outputs == []\n    assert nb_source.cells[5].outputs == [\"5\"]\n\n\n@pytest.mark.asyncio\nasync def test_read_text_and_combine_with_outputs(tmpdir, cm):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_script = \"notebook.py\"\n\n    with open(str(tmpdir.join(tmp_script)), \"w\") as fp:\n        fp.write(\n            \"\"\"# ---\n# jupyter:\n#   jupytext_formats: ipynb,py:light\n# ---\n\n1+1\n\n2+2\n\n3+3\n\"\"\"\n        )\n\n    with open(str(tmpdir.join(tmp_ipynb)), \"w\") as fp:\n        fp.write(\n            \"\"\"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"2\"\n      ]\n     },\n     \"execution_count\": 1,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"1+1\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"6\"\n      ]\n     },\n     \"execution_count\": 3,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"3+3\"\n   ]\n  }\n ],\n \"metadata\": {},\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n\"\"\"\n        )\n\n    # create contents manager\n    cm.root_dir = str(tmpdir)\n\n    # load notebook from script\n    model = await ensure_async(cm.get(tmp_script))\n    nb = model[\"content\"]\n\n    assert nb.cells[0][\"source\"] == \"1+1\"\n    assert nb.cells[1][\"source\"] == \"2+2\"\n    assert nb.cells[2][\"source\"] == \"3+3\"\n\n    # No output for the second cell, which is not in the ipynb\n    assert nb.cells[0][\"outputs\"]\n    assert not nb.cells[1][\"outputs\"]\n    assert nb.cells[2][\"outputs\"]\n\n    assert len(nb.cells) == 3\n\n\ndef test_combine_stable(ipynb_file):\n    nb_org = jupytext.read(ipynb_file)\n    nb_source = deepcopy(nb_org)\n    nb_outputs = deepcopy(nb_org)\n\n    for cell in nb_source.cells:\n        cell.outputs = []\n\n    nb_source = combine_inputs_with_outputs(nb_source, nb_outputs)\n    compare_notebooks(nb_source, nb_org)\n\n\ndef test_combine_reorder():\n    nb_source = new_notebook(\n        cells=[\n            new_markdown_cell(\"Markdown text\"),\n            new_code_cell(\"1+1\"),\n            new_code_cell(\"2+2\"),\n            new_code_cell(\"3+3\"),\n            new_markdown_cell(\"Markdown text\"),\n            new_code_cell(\"4+4\"),\n        ]\n    )\n\n    nb_outputs = new_notebook(\n        cells=[\n            new_markdown_cell(\"Markdown text\"),\n            new_code_cell(\"2+2\"),\n            new_code_cell(\"4+4\"),\n            new_code_cell(\"1+1\"),\n            new_code_cell(\"3+3\"),\n            new_markdown_cell(\"Markdown text\"),\n        ]\n    )\n\n    nb_outputs.cells[1].outputs = [\"4\"]\n    nb_outputs.cells[2].outputs = [\"8\"]\n    nb_outputs.cells[3].outputs = [\"2\"]\n    nb_outputs.cells[4].outputs = [\"6\"]\n\n    nb_source = combine_inputs_with_outputs(nb_source, nb_outputs)\n\n    assert nb_source.cells[1].outputs == [\"2\"]\n    assert nb_source.cells[2].outputs == [\"4\"]\n    assert nb_source.cells[3].outputs == [\"6\"]\n    assert nb_source.cells[5].outputs == [\"8\"]\n\n\ndef test_combine_split():\n    nb_source = new_notebook(cells=[new_code_cell(\"1+1\"), new_code_cell(\"2+2\")])\n\n    nb_outputs = new_notebook(cells=[new_code_cell(\"1+1\\n2+2\")])\n\n    nb_outputs.cells[0].outputs = [\"4\"]\n\n    nb_source = combine_inputs_with_outputs(nb_source, nb_outputs)\n\n    assert nb_source.cells[0].outputs == []\n    assert nb_source.cells[1].outputs == [\"4\"]\n\n\ndef test_combine_refactor():\n    nb_source = new_notebook(cells=[new_code_cell(\"a=1\"), new_code_cell(\"a+1\"), new_code_cell(\"a+2\")])\n\n    nb_outputs = new_notebook(cells=[new_code_cell(\"b=1\"), new_code_cell(\"b+1\"), new_code_cell(\"b+2\")])\n\n    nb_outputs.cells[1].outputs = [\"2\"]\n    nb_outputs.cells[2].outputs = [\"3\"]\n\n    nb_source = combine_inputs_with_outputs(nb_source, nb_outputs)\n\n    assert nb_source.cells[0].outputs == []\n    assert nb_source.cells[1].outputs == [\"2\"]\n    assert nb_source.cells[2].outputs == [\"3\"]\n\n\ndef test_combine_attachments():\n    nb_source = new_notebook(cells=[new_markdown_cell(\"![image.png](attachment:image.png)\")])\n\n    nb_outputs = new_notebook(\n        cells=[\n            new_markdown_cell(\n                \"![image.png](attachment:image.png)\",\n                attachments={\"image.png\": {\"image/png\": \"SOME_LONG_IMAGE_CODE...==\"}},\n            )\n        ]\n    )\n\n    nb_source = combine_inputs_with_outputs(nb_source, nb_outputs)\n    compare(nb_source, nb_outputs)\n"
  },
  {
    "path": "tests/functional/others/test_custom_cell_magics.py",
    "content": "import nbformat\nfrom nbformat.v4.nbbase import new_code_cell, new_notebook\n\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.compare import compare_notebooks\nfrom jupytext.languages import _JUPYTER_LANGUAGES_LOWER_AND_UPPER\n\n\ndef test_custom_cell_magics(\n    tmpdir,\n    nb=new_notebook(\n        cells=[\n            new_code_cell(\"%%sql -o tables -q\\n SHOW TABLES\"),\n            new_code_cell(\n                \"\"\"%%configure -f\n{\"executorMemory\": \"3072M\", \"executorCores\": 4, \"numExecutors\":10}\"\"\"\n            ),\n            new_code_cell(\"%%local\\na=1\"),\n        ]\n    ),\n):\n    cfg_file = tmpdir.join(\"jupytext.toml\")\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    py_file = tmpdir.join(\"notebook.py\")\n\n    cfg_file.write('custom_cell_magics = \"configure,local\"')\n    assert \"configure\" not in _JUPYTER_LANGUAGES_LOWER_AND_UPPER\n    assert \"logs\" not in _JUPYTER_LANGUAGES_LOWER_AND_UPPER\n\n    nbformat.write(nb, str(nb_file))\n\n    jupytext_cli([str(nb_file), \"--to\", \"py\"])\n    py = py_file.read()\n\n    for line in py.splitlines():\n        if line:\n            assert line.startswith(\"# \"), line\n\n    jupytext_cli([str(py_file), \"--to\", \"notebook\"])\n    nb2 = nbformat.read(str(nb_file), as_version=4)\n\n    compare_notebooks(nb2, nb)\n"
  },
  {
    "path": "tests/functional/others/test_doxygen.py",
    "content": "import nbformat\nimport pytest\n\nimport jupytext\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.compare import compare, compare_notebooks\nfrom jupytext.doxygen import doxygen_to_markdown, markdown_to_doxygen\n\nSAMPLE_MARKDOWN = \"\"\"A latex formula $$1+1$$, another one $$2+2\n$$\n\nAn inline formula $3+3$\n\"\"\"\n\nSAMPLE_DOXYGEN = \"\"\"A latex formula \\\\f[1+1\\\\f], another one \\\\f[2+2\n\\\\f]\n\nAn inline formula \\\\f$3+3\\\\f$\n\"\"\"\n\n\ndef test_markdown_to_doxygen():\n    compare(markdown_to_doxygen(SAMPLE_MARKDOWN), SAMPLE_DOXYGEN)\n\n\ndef test_doxygen_to_markdown():\n    compare(doxygen_to_markdown(SAMPLE_DOXYGEN), SAMPLE_MARKDOWN)\n\n\n@pytest.mark.parametrize(\n    \"latex,doxygen\",\n    [\n        (\"$$\", \"$$\"),\n        (\"$1+1$\", \"\\\\f$1+1\\\\f$\"),\n        (\"$1\\\\$ $\", \"\\\\f$1\\\\$ \\\\f$\"),\n        (\"$$2+2$$\", \"\\\\f[2+2\\\\f]\"),\n        (\"$$2+2$$ then $$3+3$$\", \"\\\\f[2+2\\\\f] then \\\\f[3+3\\\\f]\"),\n        (\"$$2+2\\n$$\", \"\\\\f[2+2\\n\\\\f]\"),\n        (\"$$1\\\\$+2\\\\$=3\\\\$$$\", \"\\\\f[1\\\\$+2\\\\$=3\\\\$\\\\f]\"),\n    ],\n)\ndef test_simple_equations_to_doxygen_and_back(latex, doxygen):\n    assert markdown_to_doxygen(latex) == doxygen\n    assert doxygen_to_markdown(doxygen) == latex\n\n\ndef test_doxygen_equation_markers(tmpdir):\n    cfg_file = tmpdir.join(\"jupytext.toml\")\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    md_file = tmpdir.join(\"notebook.md\")\n\n    cfg_file.write(\"hide_notebook_metadata = true\\ndoxygen_equation_markers = true\")\n    nb = jupytext.reads(SAMPLE_MARKDOWN, \"md\")\n    del nb.metadata[\"jupytext\"]\n    nbformat.write(nb, str(nb_file))\n\n    jupytext_cli([str(nb_file), \"--to\", \"md\"])\n    md = md_file.read()\n\n    # Doxygen equation markers\n    assert \"$$\" not in md\n    assert \"\\\\f[\" in md\n    assert \"\\\\f]\" in md\n    assert \"\\\\f$\" in md\n    assert \"\\\\f$\" in md\n\n    # Metadata hidden\n    assert md.startswith(\"<!--\\n\\n---\\n\")\n\n    jupytext_cli([str(md_file), \"--to\", \"notebook\"])\n    nb2 = nbformat.read(str(nb_file), as_version=4)\n\n    compare_notebooks(nb2, nb)\n"
  },
  {
    "path": "tests/functional/others/test_hide_remove_input_outputs_rmarkdown.py",
    "content": "import pytest\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks\n\n\n@pytest.mark.parametrize(\n    \"md,rmd\",\n    [\n        ('tags=[\"remove_cell\"]', \"include=FALSE\"),\n        ('tags=[\"remove_output\"]', \"results='hide'\"),\n        ('tags=[\"remove_output\"]', 'results=\"hide\"'),\n        ('tags=[\"remove_input\"]', \"echo=FALSE\"),\n    ],\n)\ndef test_jupyter_book_options_to_rmarkdown(md, rmd):\n    \"\"\"By default, Jupyter Book tags are mapped to R Markdown options, and vice versa #337\"\"\"\n    md = (\n        \"```python \"\n        + md\n        + \"\"\"\n1 + 1\n```\n\"\"\"\n    )\n\n    rmd = (\n        \"```{python \"\n        + rmd\n        + \"\"\"}\n1 + 1\n```\n\"\"\"\n    )\n\n    nb_md = jupytext.reads(md, \"md\")\n    nb_rmd = jupytext.reads(rmd, \"Rmd\")\n    compare_notebooks(nb_rmd, nb_md)\n\n    md2 = jupytext.writes(nb_rmd, \"md\")\n    compare(md2, md)\n\n    rmd = rmd.replace('\"hide\"', \"'hide'\")\n    rmd2 = jupytext.writes(nb_md, \"Rmd\")\n    compare(rmd2, rmd)\n\n\n@pytest.mark.parametrize(\n    \"md,rmd\",\n    [\n        (\"hide_input=true hide_output=true\", \"include=FALSE\"),\n        (\"hide_output=true\", \"results='hide'\"),\n        (\"hide_output=true\", 'results=\"hide\"'),\n        (\"hide_input=true\", \"echo=FALSE\"),\n    ],\n)\ndef test_runtools_options_to_rmarkdown(md, rmd):\n    \"\"\"Options set by the runtools extension are mapped to the corresponding R Markdown options\n    https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/runtools/readme.html\n    \"\"\"\n    md = (\n        \"```python \"\n        + md\n        + \"\"\"\n1 + 1\n```\n\"\"\"\n    )\n\n    rmd = (\n        \"```{python \"\n        + rmd\n        + \"\"\"}\n1 + 1\n```\n\"\"\"\n    )\n\n    nb_md = jupytext.reads(md, \"md\")\n    nb_rmd = jupytext.reads(rmd, fmt={\"extension\": \".Rmd\", \"use_runtools\": True})\n    compare_notebooks(nb_rmd, nb_md)\n\n    md2 = jupytext.writes(nb_rmd, \"md\")\n    compare(md2, md)\n\n    rmd = rmd.replace('\"hide\"', \"'hide'\")\n    rmd2 = jupytext.writes(nb_md, \"Rmd\")\n    compare(rmd2, rmd)\n"
  },
  {
    "path": "tests/functional/others/test_invalid_file.py",
    "content": "\"\"\"Jupytext should refuse to open a file with invalid content\"\"\"\n\nfrom pathlib import Path\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\nfrom tornado.web import HTTPError\n\nfrom jupytext import read\nfrom jupytext.cli import jupytext as jupytext_cli\n\n\n@pytest.fixture\ndef invalid_md_file():\n    return Path(__file__).parent / \"invalid_file_896.md\"\n\n\n@pytest.mark.skip_on_windows\ndef test_read_invalid_md_file_fails(invalid_md_file):\n    with open(invalid_md_file) as fp:\n        with pytest.raises(UnicodeDecodeError):\n            read(fp)\n\n\ndef test_convert_invalid_md_file_fails(invalid_md_file):\n    with pytest.raises(UnicodeDecodeError):\n        jupytext_cli([\"--to\", \"ipynb\", str(invalid_md_file)])\n\n\n@pytest.mark.asyncio\nasync def test_open_invalid_md_file_fails(invalid_md_file, tmp_path, cm):\n    cm.root_dir = str(invalid_md_file.parent)\n\n    with pytest.raises(HTTPError, match=\"invalid_file_896.md is not UTF-8 encoded\"):\n        await ensure_async(cm.get(invalid_md_file.name))\n"
  },
  {
    "path": "tests/functional/others/test_jupytext_errors.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_notebook\n\nimport jupytext\nfrom jupytext.formats import JupytextFormatError\n\n\ndef test_read_wrong_ext(tmpdir, nb_file=\"notebook.ext\"):\n    nb_file = tmpdir.join(nb_file)\n    nb_file.write(\"{}\")\n    with pytest.raises(JupytextFormatError):\n        jupytext.read(str(nb_file))\n\n\ndef test_write_wrong_ext(tmpdir, nb_file=\"notebook.ext\"):\n    nb_file = str(tmpdir.join(nb_file))\n    with pytest.raises(JupytextFormatError):\n        jupytext.write(new_notebook(), nb_file)\n"
  },
  {
    "path": "tests/functional/others/test_jupytext_read.py",
    "content": "import pytest\n\nimport jupytext\nfrom jupytext.compare import compare_notebooks\n\n\ndef test_as_version_has_appropriate_type():\n    with pytest.raises(TypeError):\n        jupytext.read(\"script.py\", \"py:percent\")\n\n\ndef test_read_file_with_explicit_fmt(tmpdir):\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n\n    with open(tmp_py, \"w\") as fp:\n        fp.write(\n            \"\"\"# %%\n1 + 1\n\"\"\"\n        )\n\n    nb1 = jupytext.read(tmp_py)\n    nb2 = jupytext.read(tmp_py, fmt=\"py:percent\")\n\n    compare_notebooks(nb2, nb1)\n"
  },
  {
    "path": "tests/functional/others/test_nbformat_version.py",
    "content": "import pytest\nfrom nbformat import writes as nbformat_writes\nfrom nbformat.v3.nbbase import new_code_cell, new_notebook, new_text_cell, new_worksheet\nfrom nbformat.v4.nbbase import new_markdown_cell\nfrom nbformat.v4.nbbase import new_notebook as new_notebook_v4\n\nfrom jupytext import reads, writes\nfrom jupytext.jupytext import NotSupportedNBFormatVersion\n\n\n@pytest.fixture()\ndef sample_notebook_v3():\n    return new_notebook(worksheets=[new_worksheet(cells=[new_code_cell(\"1 + 1\"), new_text_cell(\"markdown\", \"Hi\")])])\n\n\n@pytest.fixture()\ndef sample_notebook_v3_json(sample_notebook_v3):\n    return nbformat_writes(sample_notebook_v3)\n\n\n@pytest.fixture()\ndef sample_notebook_v4_99():\n    nb = new_notebook_v4(cells=[new_markdown_cell(\"Hi\")])\n    nb[\"nbformat_minor\"] = 99\n    return nb\n\n\ndef test_jupytext_can_read_nbformat_3(\n    sample_notebook_v3_json,\n):\n    with pytest.warns(Warning, match=\"jupyter nbconvert --to notebook --inplace\"):\n        nb = reads(sample_notebook_v3_json, fmt=\"ipynb\")\n        assert nb[\"nbformat\"] == 3\n\n    nb = reads(sample_notebook_v3_json, as_version=4, fmt=\"ipynb\")\n    assert nb[\"nbformat\"] == 4\n\n\n@pytest.mark.parametrize(\"fmt\", [\"py:light\", \"py:percent\", \"md\"])\ndef test_jupytext_gives_a_meaningful_error_when_writing_nbformat_3(sample_notebook_v3, fmt):\n    with pytest.raises(\n        NotSupportedNBFormatVersion,\n        match=\"Notebooks in nbformat version 3.0 are not supported by Jupytext\",\n    ):\n        writes(sample_notebook_v3, fmt=fmt)\n\n    writes(sample_notebook_v3, version=4, fmt=fmt)\n\n\n@pytest.mark.parametrize(\"fmt\", [\"py:light\", \"py:percent\", \"md\"])\ndef test_jupytext_gives_a_meaningful_error_when_writing_nbformat_4_99(sample_notebook_v4_99, fmt):\n    with pytest.warns(\n        Warning,\n        match=\"Notebooks in nbformat version 4.99 have not been tested\",\n    ):\n        writes(sample_notebook_v4_99, fmt=fmt)\n"
  },
  {
    "path": "tests/functional/others/test_preserve_empty_cells.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks\n\n\n@pytest.mark.parametrize(\"blank_lines\", range(1, 6))\ndef test_file_with_blank_lines(blank_lines):\n    py_script = \"\"\"# Markdown cell{0}\n# Another one{0}\n\"\"\".format(\"\\n\".join([\"\"] * blank_lines))\n\n    notebook = jupytext.reads(py_script, \"py\")\n    py_script2 = jupytext.writes(notebook, \"py\")\n    compare(py_script2, py_script)\n\n\n@pytest.mark.parametrize(\"blank_cells\", range(1, 3))\ndef test_notebook_with_empty_cells(blank_cells):\n    notebook = new_notebook(\n        cells=[new_markdown_cell(\"markdown cell one\")]\n        + [new_code_cell(\"\") for i in range(blank_cells)]\n        + [new_markdown_cell(\"markdown cell two\")]\n        + [new_code_cell(\"\") for i in range(blank_cells)],\n        metadata={\"jupytext\": {\"main_language\": \"python\"}},\n    )\n\n    script = jupytext.writes(notebook, \"py\")\n    notebook2 = jupytext.reads(script, \"py\")\n\n    compare_notebooks(notebook2, notebook)\n"
  },
  {
    "path": "tests/functional/others/test_pytest.py",
    "content": "import pytest\n\nfrom jupytext.cli import jupytext\n\n\ndef test_run_pytest_ok(\n    tmpdir,\n    text=\"\"\"This is a notebook with a test that is supposed to pass\n```python\ndef test_ok():\n    assert True\n```\n\"\"\",\n):\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n    with open(tmp_md, \"w\") as fp:\n        fp.write(text)\n    jupytext([tmp_md, \"--check\", \"pytest\"])\n\n\ndef test_run_pytest_fail(\n    tmpdir,\n    capsys,\n    text=\"\"\"This is a notebook with a test that should not pass\n```python\ndef test_fail():\n    assert False\n```\n\"\"\",\n):\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n    with open(tmp_md, \"w\") as fp:\n        fp.write(text)\n    with pytest.raises(SystemExit):\n        jupytext([tmp_md, \"--check\", \"pytest\"])\n"
  },
  {
    "path": "tests/functional/others/test_raw_strings.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare\n\n\ndef test_markdown_cell_with_backslash_is_encoded_with_raw_string(\n    nb=new_notebook(cells=[new_markdown_cell(r\"A $\\LaTeX$ expression\")]),\n    py=r'''# %% [markdown]\nr\"\"\"\nA $\\LaTeX$ expression\n\"\"\"\n''',\n):\n    nb.metadata[\"jupytext\"] = {\n        \"cell_markers\": '\"\"\"',\n        \"notebook_metadata_filter\": \"-all\",\n    }\n    py2 = jupytext.writes(nb, \"py:percent\")\n    compare(py2, py)\n\n\n@pytest.mark.parametrize(\"r\", [\"r\", \"R\"])\n@pytest.mark.parametrize(\"triple_quote\", ['\"\"\"', \"'''\"])\n@pytest.mark.parametrize(\"expr\", [\"$\\\\LaTeX$\", \"common\"])\ndef test_raw_string_is_stable_over_round_trip(r, triple_quote, expr):\n    py = f\"\"\"# %% [markdown]\n{r}{triple_quote}\nA {expr} expression\n{triple_quote}\n\"\"\"\n\n    nb = jupytext.reads(py, \"py:percent\")\n\n    (cell,) = nb.cells\n    assert cell.cell_type == \"markdown\"\n    assert cell.source == f\"A {expr} expression\"\n    assert cell.metadata[\"cell_marker\"] == f\"{r}{triple_quote}\"\n\n    py2 = jupytext.writes(nb, \"py:percent\")\n    compare(py2, py)\n"
  },
  {
    "path": "tests/functional/others/test_read_write_functions.py",
    "content": "from io import StringIO\nfrom pathlib import Path\n\nimport nbformat\nfrom nbformat.v4.nbbase import new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks\n\n\ndef test_simple_hook(tmpdir):\n    nb_file = str(tmpdir.join(\"notebook.ipynb\"))\n    md_file = str(tmpdir.join(\"notebook.md\"))\n    nbformat.write(new_notebook(cells=[new_markdown_cell(\"Some text\")]), nb_file)\n\n    nb = jupytext.read(nb_file)\n    jupytext.write(nb, md_file)\n\n    with open(md_file) as fp:\n        text = fp.read()\n\n    assert \"Some text\" in text.splitlines()\n\n\ndef test_simple_hook_with_explicit_format(tmpdir):\n    nb_file = str(tmpdir.join(\"notebook.ipynb\"))\n    py_file = str(tmpdir.join(\"notebook.py\"))\n    nbformat.write(new_notebook(cells=[new_markdown_cell(\"Some text\")]), nb_file)\n\n    nb = jupytext.read(nb_file)\n    jupytext.write(nb, py_file, fmt=\"py:percent\")\n\n    with open(py_file) as fp:\n        text = fp.read()\n\n    assert \"# %% [markdown]\" in text.splitlines()\n    assert \"# Some text\" in text.splitlines()\n\n\ndef test_no_error_on_path_object(tmpdir):\n    nb_file = Path(str(tmpdir.join(\"notebook.ipynb\")))\n    md_file = nb_file.with_suffix(\".md\")\n    nbformat.write(new_notebook(cells=[new_markdown_cell(\"Some text\")]), str(nb_file))\n\n    nb = jupytext.read(nb_file)\n    jupytext.write(nb, md_file)\n\n\ndef test_read_ipynb_from_stream():\n    def stream():\n        return StringIO(\n            \"\"\"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"metadata\": {},\n   \"source\": [\n    \"1 + 1\"\n   ],\n    \"outputs\": [],\n    \"execution_count\": null\n  }\n ],\n \"metadata\": {},\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n\"\"\"\n        )\n\n    nb = jupytext.read(stream())\n    nb2 = jupytext.read(stream(), fmt=\"ipynb\")\n    compare(nb2, nb)\n\n\ndef test_read_py_percent_from_stream():\n    def stream():\n        return StringIO(\n            \"\"\"# %%\n1 + 1\n\"\"\"\n        )\n\n    nb = jupytext.read(stream())\n    nb2 = jupytext.read(stream(), fmt=\"py:percent\")\n    compare_notebooks(nb2, nb)\n"
  },
  {
    "path": "tests/functional/others/test_remove_encoding.py",
    "content": "import pytest\nfrom jupyter_server.utils import ensure_async\n\n\n@pytest.mark.asyncio\nasync def test_remove_encoding_907(tmp_path, python_notebook, cm):\n    # Pair all notebooks to py:percent files\n    (tmp_path / \"jupytext.toml\").write_text('formats=\"ipynb,py:percent\"')\n\n    # Create a contents manager\n    cm.root_dir = str(tmp_path)\n\n    # Save the notebook in Jupyter\n    await ensure_async(cm.save(dict(type=\"notebook\", content=python_notebook), path=\"nb.ipynb\"))\n\n    # No encoding is present in the py file\n    py = (tmp_path / \"nb.py\").read_text()\n    assert \"coding\" not in py\n\n    # Add the encoding line\n    py = \"# -*- coding: utf-8 -*-\\n\" + py\n    (tmp_path / \"nb.py\").write_text(py)\n\n    # Reload the notebook\n    nb = (await ensure_async(cm.get(\"nb.ipynb\")))[\"content\"]\n    assert \"encoding\" in nb.metadata[\"jupytext\"]\n\n    # Save the notebook\n    await ensure_async(cm.save(dict(type=\"notebook\", content=nb), path=\"nb.ipynb\"))\n\n    # The encoding is still present in the py file\n    py = (tmp_path / \"nb.py\").read_text()\n    assert py.startswith(\"# -*- coding: utf-8 -*-\")\n\n    # Remove the encoding (mock ipyupgrade)\n    py = \"\\n\".join(py.splitlines()[1:])\n    (tmp_path / \"nb.py\").write_text(py)\n\n    # Reload the notebook - the encoding is not there anymore\n    nb = (await ensure_async(cm.get(\"nb.ipynb\")))[\"content\"]\n    assert \"encoding\" not in nb.metadata[\"jupytext\"]\n\n    # Save the notebook - the encoding is not there anymore\n    py = (tmp_path / \"nb.py\").read_text()\n    assert \"coding\" not in py\n"
  },
  {
    "path": "tests/functional/others/test_sample_notebooks_are_normalized.py",
    "content": "import nbformat\nimport pytest\nfrom packaging import version\n\nimport jupytext\n\n\n@pytest.mark.skipif(\n    version.parse(nbformat.__version__) <= version.parse(\"5.7\"),\n    reason=\"normalize is not available\",\n)\ndef test_sample_notebooks_are_normalized(any_nb_file):\n    if \"myst/\" in any_nb_file and not jupytext.myst.is_myst_available():\n        pytest.skip(\"myst_parser not found\")\n    if \"marimo/\" in any_nb_file and not jupytext.marimo.is_marimo_available():\n        pytest.skip(\"marimo not found\")\n    nb = jupytext.read(any_nb_file)\n\n    changes, normalized_nb = nbformat.validator.normalize(nb)\n    nbformat.validate(normalized_nb)\n\n    if changes:  # pragma: no cover\n        with open(any_nb_file, \"w\") as fp:\n            jupytext.write(normalized_nb, fp)\n\n        assert not changes\n\n    nbformat.validate(nb)\n"
  },
  {
    "path": "tests/functional/others/test_save_multiple.py",
    "content": "import os\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_notebook\nfrom nbformat.validator import NotebookValidationError\nfrom tornado.web import HTTPError\n\nimport jupytext\nfrom jupytext.compare import compare_notebooks, notebook_model\n\npytestmark = pytest.mark.asyncio\n\n\nasync def test_rmd_is_ok(ipynb_file, tmpdir, cm):\n    nb = jupytext.read(ipynb_file)\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_rmd = \"notebook.Rmd\"\n\n    nb.metadata.setdefault(\"jupytext\", {})[\"formats\"] = \"ipynb,Rmd\"\n\n    cm.root_dir = str(tmpdir)\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    nb2 = jupytext.read(str(tmpdir.join(tmp_rmd)))\n\n    compare_notebooks(nb2, nb, \"Rmd\")\n\n\nasync def test_ipynb_is_ok(rmd_file, tmpdir, cm):\n    nb = jupytext.read(rmd_file)\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_rmd = \"notebook.Rmd\"\n\n    cm.root_dir = str(tmpdir)\n    cm.formats = \"ipynb,Rmd\"\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_rmd))\n\n    nb2 = jupytext.read(str(tmpdir.join(tmp_ipynb)))\n    compare_notebooks(nb2, nb)\n\n\nasync def test_all_files_created(ipynb_py_file, tmpdir, cm):\n    nb = jupytext.read(ipynb_py_file)\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_rmd = \"notebook.Rmd\"\n    tmp_py = \"notebook.py\"\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,Rmd,py\"}\n\n    cm.root_dir = str(tmpdir)\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    nb2 = jupytext.read(str(tmpdir.join(tmp_py)))\n    compare_notebooks(nb2, nb)\n\n    nb3 = jupytext.read(str(tmpdir.join(tmp_rmd)))\n    compare_notebooks(nb3, nb, \"Rmd\")\n\n\nasync def test_no_files_created_on_no_format(tmpdir, cm):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_rmd = \"notebook.Rmd\"\n    tmp_py = \"notebook.py\"\n\n    cm.root_dir = str(tmpdir)\n    cm.formats = \"\"\n\n    await ensure_async(\n        cm.save(\n            model=notebook_model(new_notebook(nbformat=4, metadata=dict())),\n            path=tmp_ipynb,\n        )\n    )\n\n    assert not os.path.isfile(str(tmpdir.join(tmp_py)))\n    assert not os.path.isfile(str(tmpdir.join(tmp_rmd)))\n\n\nasync def test_raise_on_wrong_format(tmpdir, cm):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n\n    cm.root_dir = str(tmpdir)\n\n    with pytest.raises(HTTPError):\n        await ensure_async(\n            cm.save(\n                path=tmp_ipynb,\n                model=dict(\n                    type=\"notebook\",\n                    content=new_notebook(nbformat=4, metadata=dict(jupytext_formats=[\".doc\"])),\n                ),\n            )\n        )\n\n\nasync def test_no_rmd_on_not_notebook(tmpdir, cm):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_rmd = \"notebook.Rmd\"\n\n    cm.root_dir = str(tmpdir)\n    cm.formats = \"ipynb,Rmd\"\n\n    with pytest.raises(HTTPError):\n        await ensure_async(cm.save(model=dict(type=\"not notebook\", content=new_notebook()), path=tmp_ipynb))\n    assert not os.path.isfile(str(tmpdir.join(tmp_rmd)))\n\n\nasync def test_no_rmd_on_not_v4(tmpdir, cm):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_rmd = \"notebook.Rmd\"\n\n    cm.root_dir = str(tmpdir)\n    cm.formats = \"ipynb,Rmd\"\n\n    with pytest.raises(NotebookValidationError):\n        await ensure_async(cm.save(model=notebook_model(new_notebook(nbformat=3)), path=tmp_rmd))\n\n    assert not os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n"
  },
  {
    "path": "tests/functional/others/test_trust_notebook.py",
    "content": "import os\nimport shutil\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_code_cell, new_output\n\nfrom jupytext.compare import compare_notebooks\n\npytestmark = pytest.mark.asyncio\n\n\nasync def test_py_notebooks_are_trusted(python_file, cm):\n    root, file = os.path.split(python_file)\n    cm.root_dir = root\n    nb = await ensure_async(cm.get(file))\n    for cell in nb[\"content\"].cells:\n        assert cell.metadata.get(\"trusted\", True)\n\n\nasync def test_rmd_notebooks_are_trusted(rmd_file, cm):\n    root, file = os.path.split(rmd_file)\n    cm.root_dir = root\n    nb = await ensure_async(cm.get(file))\n    for cell in nb[\"content\"].cells:\n        assert cell.metadata.get(\"trusted\", True)\n\n\n@pytest.mark.skip(reason=\"Fails intermittently on CI, see #1346\")\nasync def test_ipynb_notebooks_can_be_trusted(ipynb_py_file, tmpdir, no_jupytext_version_number, cm):\n    if \"hash sign\" in ipynb_py_file:\n        pytest.skip()\n    root, file = os.path.split(ipynb_py_file)\n    tmp_ipynb = str(tmpdir.join(file))\n    py_file = file.replace(\".ipynb\", \".py\")\n    tmp_py = str(tmpdir.join(py_file))\n    shutil.copy(ipynb_py_file, tmp_ipynb)\n\n    cm.formats = \"ipynb,py\"\n    cm.root_dir = str(tmpdir)\n    model = await ensure_async(cm.get(file))\n    await ensure_async(cm.save(model, py_file))\n\n    # Unsign and test notebook\n    nb = model[\"content\"]\n    for cell in nb.cells:\n        cell.metadata.pop(\"trusted\", True)\n\n    cm.notary.unsign(nb)\n\n    model = await ensure_async(cm.get(file))\n    for cell in model[\"content\"].cells:\n        assert \"trusted\" not in cell.metadata or not cell.metadata[\"trusted\"] or not cell.outputs\n\n    # Trust and reload\n    await ensure_async(cm.trust_notebook(py_file))\n\n    model = await ensure_async(cm.get(file))\n    for cell in model[\"content\"].cells:\n        assert cell.metadata.get(\"trusted\", True)\n\n    # Remove py file, content should be the same\n    os.remove(tmp_py)\n    nb2 = await ensure_async(cm.get(file))\n    for cell in nb2[\"content\"].cells:\n        assert cell.metadata.get(\"trusted\", True)\n\n    compare_notebooks(nb2[\"content\"], model[\"content\"])\n\n    # Just for coverage\n    await ensure_async(cm.trust_notebook(file))\n\n\n@pytest.mark.skip(reason=\"Fails intermittently on CI, see #1346\")\nasync def test_ipynb_notebooks_can_be_trusted_even_with_metadata_filter(ipynb_py_file, tmpdir, no_jupytext_version_number, cm):\n    if \"hash sign\" in ipynb_py_file:\n        pytest.skip()\n    root, file = os.path.split(ipynb_py_file)\n    tmp_ipynb = str(tmpdir.join(file))\n    py_file = file.replace(\".ipynb\", \".py\")\n    tmp_py = str(tmpdir.join(py_file))\n    shutil.copy(ipynb_py_file, tmp_ipynb)\n\n    cm.formats = \"ipynb,py\"\n    cm.notebook_metadata_filter = \"all\"\n    cm.cell_metadata_filter = \"-all\"\n    cm.root_dir = str(tmpdir)\n    model = await ensure_async(cm.get(file))\n    await ensure_async(cm.save(model, py_file))\n\n    # Unsign notebook\n    nb = model[\"content\"]\n    for cell in nb.cells:\n        cell.metadata.pop(\"trusted\", True)\n\n    cm.notary.unsign(nb)\n\n    # Trust and reload\n    await ensure_async(cm.trust_notebook(py_file))\n\n    model = await ensure_async(cm.get(file))\n    for cell in model[\"content\"].cells:\n        assert cell.metadata.get(\"trusted\", True)\n\n    # Remove py file, content should be the same\n    os.remove(tmp_py)\n    nb2 = await ensure_async(cm.get(file))\n    for cell in nb2[\"content\"].cells:\n        assert cell.metadata.get(\"trusted\", True)\n\n    compare_notebooks(nb2[\"content\"], model[\"content\"])\n\n\nasync def test_text_notebooks_can_be_trusted(percent_file, tmpdir, no_jupytext_version_number, cm):\n    root, file = os.path.split(percent_file)\n    py_file = str(tmpdir.join(file))\n    shutil.copy(percent_file, py_file)\n\n    cm.root_dir = str(tmpdir)\n    model = await ensure_async(cm.get(file))\n    model[\"type\"] == \"notebook\"\n    await ensure_async(cm.save(model, file))\n\n    # Unsign notebook\n    nb = model[\"content\"]\n    for cell in nb.cells:\n        cell.metadata.pop(\"trusted\", True)\n\n    cm.notary.unsign(nb)\n\n    # Trust and reload\n    await ensure_async(cm.trust_notebook(file))\n\n    model = await ensure_async(cm.get(file))\n    for cell in model[\"content\"].cells:\n        assert cell.metadata.get(\"trusted\", True)\n\n\n# This test started failing on Windows on 2025-04-26\n# https://github.com/mwouts/jupytext/actions/runs/14683344298/job/41208822220?pr=1380\n@pytest.mark.skip_on_windows\nasync def test_simple_notebook_is_trusted(tmpdir, python_notebook, cm):\n    cm.root_dir = str(tmpdir)\n\n    nb = python_notebook\n    cm.notary.unsign(nb)\n\n    # All cells are trusted in this notebook\n    assert cm.notary.check_cells(nb)\n    # Yet the notebook is not in the database of trusted notebooks\n    assert not cm.notary.check_signature(nb)\n\n    # Save the notebook using the CM\n    await ensure_async(cm.save(dict(type=\"notebook\", content=nb), \"test.ipynb\"))\n\n    # The notebook is safe so it should have been trusted before getting saved to disk\n    nb = (await ensure_async(cm.get(\"test.ipynb\")))[\"content\"]\n    assert cm.notary.check_signature(nb)\n\n\n@pytest.mark.requires_myst\nasync def test_myst_notebook_is_trusted_941(\n    tmp_path,\n    cm,\n    myst=\"\"\"---\njupytext:\n  formats: md:myst\n  text_representation:\n    extension: .md\n    format_name: myst\n    format_version: 0.13\n    jupytext_version: 1.11.5\nkernelspec:\n  display_name: itables\n  language: python\n  name: itables\n---\n\n# Downsampling\n\n```{code-cell} ipython3\nfrom itables import init_notebook_mode, show\n\ninit_notebook_mode(all_interactive=True)\n```\n\"\"\",\n):\n    cm.root_dir = str(tmp_path)\n\n    test_md = tmp_path / \"test.md\"\n    test_md.write_text(myst)\n\n    nb = (await ensure_async(cm.get(\"test.md\")))[\"content\"]\n\n    # All cells are trusted in this notebook\n    assert cm.notary.check_cells(nb)\n\n\n@pytest.mark.requires_myst\nasync def test_paired_notebook_with_outputs_is_not_trusted_941(tmp_path, python_notebook, cm):\n    cm.root_dir = str(tmp_path)\n\n    nb = python_notebook\n    nb.cells.append(new_code_cell(source=\"1+1\", outputs=[new_output(\"execute_result\")]))\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,md:myst\"}\n    cm.notary.unsign(nb)\n    await ensure_async(cm.save(model=dict(type=\"notebook\", content=nb), path=\"test.ipynb\"))\n\n    nb = (await ensure_async(cm.get(\"test.md\")))[\"content\"]\n    assert not cm.notary.check_cells(nb)\n    assert not cm.notary.check_signature(nb)\n"
  },
  {
    "path": "tests/functional/others/test_unicode.py",
    "content": "from nbformat.v4.nbbase import new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare\n\n\ndef test_notebook_contents_is_unicode(ipynb_file):\n    nb = jupytext.read(ipynb_file)\n\n    for cell in nb.cells:\n        assert isinstance(cell.source, str)\n\n\ndef test_rmd_notebook_contents_is_unicode(rmd_file):\n    nb = jupytext.read(rmd_file)\n\n    for cell in nb.cells:\n        assert isinstance(cell.source, str)\n\n\ndef test_write_non_ascii(tmpdir):\n    nb = jupytext.reads(\"Non-ascii contênt\", \"Rmd\")\n    jupytext.write(nb, str(tmpdir.join(\"notebook.Rmd\")))\n    jupytext.write(nb, str(tmpdir.join(\"notebook.ipynb\")))\n\n\ndef test_no_encoding_in_python_scripts(no_jupytext_version_number):\n    \"\"\"No UTF encoding should not be added to Python scripts\"\"\"\n    nb = new_notebook(\n        cells=[new_markdown_cell(\"α\")],\n        metadata={\n            \"kernelspec\": {\n                \"display_name\": \"Python 3\",\n                \"language\": \"python\",\n                \"name\": \"python3\",\n            },\n        },\n    )\n\n    # Saving to and reading from py creates an encoding\n    py_light = jupytext.writes(nb, \"py:light\")\n    compare(\n        py_light,\n        \"\"\"# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# α\n\"\"\",\n    )\n\n\ndef test_encoding_in_scripts_only(no_jupytext_version_number):\n    \"\"\"UTF encoding should not be added to markdown files\"\"\"\n    nb = new_notebook(\n        cells=[new_markdown_cell(\"α\")],\n        metadata={\n            \"encoding\": \"# -*- coding: utf-8 -*-\",\n            \"kernelspec\": {\n                \"display_name\": \"Python 3\",\n                \"language\": \"python\",\n                \"name\": \"python3\",\n            },\n        },\n    )\n\n    # Saving to and reading from py creates an encoding\n    py_light = jupytext.writes(nb, \"py:light\")\n    compare(\n        py_light,\n        \"\"\"# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# α\n\"\"\",\n    )\n    nb = jupytext.reads(py_light, \"py:light\")\n    assert \"encoding\" in nb.metadata[\"jupytext\"]\n\n    py_percent = jupytext.writes(nb, \"py:percent\")\n    compare(\n        py_percent,\n        \"\"\"# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\n# %% [markdown]\n# α\n\"\"\",\n    )\n\n    md = jupytext.writes(nb, \"md\")\n    compare(\n        md,\n        \"\"\"---\njupyter:\n  jupytext:\n    encoding: '# -*- coding: utf-8 -*-'\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\nα\n\"\"\",\n    )\n\n    rmd = jupytext.writes(nb, \"Rmd\")\n    compare(\n        rmd,\n        \"\"\"---\njupyter:\n  jupytext:\n    encoding: '# -*- coding: utf-8 -*-'\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\nα\n\"\"\",\n    )\n"
  },
  {
    "path": "tests/functional/others/test_write_does_not_modify_notebook.py",
    "content": "from copy import deepcopy\n\nimport pytest\n\nfrom jupytext import read, write, writes\nfrom jupytext.compare import compare\nfrom jupytext.formats import long_form_one_format\n\n\n@pytest.mark.parametrize(\n    \"fmt\",\n    [\"auto:light\", \"auto:percent\", \"md\", \".Rmd\", \".ipynb\"],\n)\ndef test_write_notebook_does_not_change_it(ipynb_py_R_jl_file, fmt, tmpdir):\n    nb_org = read(ipynb_py_R_jl_file)\n    nb_org_copied = deepcopy(nb_org)\n    ext = long_form_one_format(fmt, nb_org.metadata)[\"extension\"]\n\n    writes(nb_org, fmt)\n    compare(nb_org, nb_org_copied)\n\n    tmp_dest = str(tmpdir.join(\"notebook\" + ext))\n    write(nb_org, tmp_dest, fmt=fmt)\n    compare(nb_org, nb_org_copied)\n"
  },
  {
    "path": "tests/functional/round_trip/test_jupytext_nbconvert_round_trip.py",
    "content": "import pytest\n\nimport jupytext\nfrom jupytext.header import header_to_metadata_and_cell\n\n\n@pytest.mark.requires_nbconvert\ndef test_markdown_jupytext_nbconvert_is_identity(md_file):\n    \"\"\"Test that a Markdown file, converted to a notebook, then\n    exported back to Markdown with nbconvert, yields the original file\"\"\"\n    if \"jupytext\" in md_file:\n        pytest.skip()\n\n    with open(md_file) as fp:\n        md_org = fp.read()\n\n    nb = jupytext.reads(md_org, \"md\")\n    import nbconvert\n\n    md_nbconvert, _ = nbconvert.export(nbconvert.MarkdownExporter, nb)\n\n    # Our expectations\n    md_expected = md_org.splitlines()\n    # #region and #endregion comments are removed\n    md_expected = [line for line in md_expected if line not in [\"<!-- #region -->\", \"<!-- #endregion -->\"]]\n    # language is not inserted by nbconvert\n    md_expected = [\"```\" if line.startswith(\"```\") else line for line in md_expected]\n    # nbconvert inserts no empty line after the YAML header (which is in a Raw cell)\n    md_expected = \"\\n\".join(md_expected).replace(\"---\\n\\n\", \"---\\n\") + \"\\n\"\n\n    # an extra blank line is inserted before code cells\n    md_nbconvert = md_nbconvert.replace(\"\\n\\n```\", \"\\n```\")\n\n    jupytext.compare.compare(md_nbconvert, md_expected)\n\n\n@pytest.mark.requires_nbconvert\ndef test_jupytext_markdown_similar_to_nbconvert(ipynb_py_R_jl_file):\n    \"\"\"Test that the nbconvert export for a notebook matches Jupytext's one\"\"\"\n    if \"magic\" in ipynb_py_R_jl_file or \"html\" in ipynb_py_R_jl_file:\n        pytest.skip()\n\n    nb = jupytext.read(ipynb_py_R_jl_file)\n\n    # Remove cell outputs and metadata\n    for cell in nb.cells:\n        if \"outputs\" in cell:\n            cell.outputs = []\n        if \"metadata\" in cell:\n            cell.metadata = {}\n\n    md_jupytext = jupytext.writes(nb, fmt=\"md\")\n\n    import nbconvert\n\n    md_nbconvert, _ = nbconvert.export(nbconvert.MarkdownExporter, nb)\n\n    # our expectations\n\n    # nbconvert file has no YAML header\n    md_jupytext_lines = md_jupytext.splitlines()\n    _, _, raw_cell, pos = header_to_metadata_and_cell(md_jupytext_lines, \"\", \"\")\n    md_jupytext = \"\\n\".join(md_jupytext_lines[pos:]) + \"\\n\"\n    if raw_cell is not None:\n        md_jupytext = raw_cell.source + \"\\n\\n\" + md_jupytext\n\n    # region comments are not in nbconvert\n    md_jupytext = md_jupytext.replace(\"<!-- #region -->\\n\", \"\").replace(\"<!-- #endregion -->\\n\", \"\")\n\n    # Jupytext uses HTML comments to keep track of raw cells\n    md_jupytext = (\n        md_jupytext.replace(\"\\n<!-- #raw -->\\n\", \"\").replace(\"<!-- #raw -->\\n\", \"\").replace(\"\\n<!-- #endraw -->\\n\", \"\")\n    )\n\n    # nbconvert file may start with an empty line\n    md_jupytext = md_jupytext.lstrip(\"\\n\")\n    md_nbconvert = md_nbconvert.lstrip(\"\\n\")\n\n    # Jupytext may not always have two blank lines between cells like Jupyter nbconvert\n    md_jupytext = md_jupytext.replace(\"\\n\\n\\n\", \"\\n\\n\")\n    md_nbconvert = md_nbconvert.replace(\"\\n\\n\\n\", \"\\n\\n\")\n\n    jupytext.compare.compare(md_nbconvert, md_jupytext)\n"
  },
  {
    "path": "tests/functional/round_trip/test_mirror.py",
    "content": "\"\"\"Here we generate mirror representation of py, Rmd and ipynb files\nas py or ipynb, and make sure that these representations minimally\nchange on new releases.\n\"\"\"\n\nimport os\nimport re\n\nimport pytest\nfrom nbformat.v4.nbbase import new_notebook\n\nimport jupytext\nfrom jupytext.compare import (\n    assert_conversion_same_as_mirror,\n    compare_notebooks,\n    create_mirror_file_if_missing,\n)\nfrom jupytext.formats import auto_ext_from_metadata\nfrom jupytext.languages import _SCRIPT_EXTENSIONS\n\n\ndef test_create_mirror_file_if_missing(tmpdir, no_jupytext_version_number):\n    py_file = str(tmpdir.join(\"notebook.py\"))\n    assert not os.path.isfile(py_file)\n    create_mirror_file_if_missing(py_file, new_notebook(), \"py\")\n    assert os.path.isfile(py_file)\n\n\n\"\"\"---------------------------------------------------------------------------------\n\nPart I: ipynb -> fmt -> ipynb\n\n---------------------------------------------------------------------------------\"\"\"\n\n\ndef test_ipynb_to_percent(ipynb_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_file, \"auto:percent\", \"ipynb_to_percent\")\n\n\ndef test_ipynb_to_hydrogen(ipynb_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_file, \"auto:hydrogen\", \"ipynb_to_hydrogen\")\n\n\ndef test_ipynb_to_light(ipynb_to_light, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_to_light, \"auto:light\", \"ipynb_to_script\")\n\n\n@pytest.mark.requires_marimo\ndef test_ipynb_to_marimo(marimo_compatible_ipynb, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(\n        marimo_compatible_ipynb,\n        \"auto:marimo\",\n        \"ipynb_to_marimo\",\n    )\n\n\ndef test_ipynb_to_md(ipynb_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_file, \"md\", \"ipynb_to_md\")\n\n\ndef test_ipynb_to_Rmd(ipynb_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_file, \"Rmd\", \"ipynb_to_Rmd\")\n\n\n@pytest.mark.requires_myst\ndef test_ipynb_to_myst(ipynb_file, no_jupytext_version_number):\n    if re.match(r\".*(html-demo|julia_functional_geometry|xcpp_by_quantstack).*\", ipynb_file):\n        pytest.skip()\n    assert_conversion_same_as_mirror(ipynb_file, \"md:myst\", \"ipynb_to_myst\")\n\n\n\"\"\"---------------------------------------------------------------------------------\n\nPart II: text -> ipynb -> text\n\n---------------------------------------------------------------------------------\"\"\"\n\n\ndef test_script_to_ipynb(script_to_ipynb, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(script_to_ipynb, \"ipynb:light\", \"script_to_ipynb\")\n\n\ndef test_percent_to_ipynb(percent_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(percent_file, \"ipynb:percent\", \"script_to_ipynb\")\n\n\ndef test_hydrogen_to_ipynb(hydrogen_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(hydrogen_file, \"ipynb:hydrogen\", \"script_to_ipynb\")\n\n\ndef test_spin_to_ipynb(r_spin_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(r_spin_file, \"ipynb:spin\", \"script_to_ipynb\")\n\n\n@pytest.mark.requires_marimo\ndef test_marimo_to_ipynb(marimo_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(marimo_file, \"ipynb:marimo\", \"script_to_ipynb\")\n\n\ndef test_md_to_ipynb(md_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(md_file, \"ipynb\", \"md_to_ipynb\")\n\n\n@pytest.mark.requires_myst\ndef test_myst_file_has_myst_format(myst_file):\n    with open(myst_file) as f:\n        text = f.read()\n    fmt = jupytext.guess_format(text, \".md\")\n    assert fmt == (\"myst\", {})\n\n\n@pytest.mark.requires_myst\ndef test_myst_to_ipynb(myst_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(myst_file, \"ipynb:myst\", \"myst_to_ipynb\")\n\n\n\"\"\"---------------------------------------------------------------------------------\n\nPart III: More specific round trip tests\n\n---------------------------------------------------------------------------------\"\"\"\n\n\ndef test_ipynb_to_percent_to_light(ipynb_file):\n    nb = jupytext.read(ipynb_file)\n    pct = jupytext.writes(nb, \"auto:percent\")\n    auto_ext = auto_ext_from_metadata(nb.metadata)\n    comment = _SCRIPT_EXTENSIONS[auto_ext][\"comment\"]\n    lgt = (\n        pct.replace(comment + \" %%\\n\", comment + \" +\\n\")\n        .replace(comment + \" %% \", comment + \" + \")\n        .replace(\n            comment + \"       format_name: percent\",\n            comment + \"       format_name: light\",\n        )\n    )\n    nb2 = jupytext.reads(lgt, auto_ext)\n    compare_notebooks(nb2, nb)\n\n\ndef test_ipynb_to_python_vim(ipynb_py_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(\n        ipynb_py_file,\n        {\"extension\": \".py\", \"cell_markers\": \"{{{,}}}\"},\n        \"ipynb_to_script_vim_folding_markers\",\n    )\n\n\ndef test_ipynb_to_python_vscode(ipynb_py_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(\n        ipynb_py_file,\n        {\"extension\": \".py\", \"cell_markers\": \"region,endregion\"},\n        \"ipynb_to_script_vscode_folding_markers\",\n    )\n\n\ndef test_ipynb_to_r_light(ipynb_R_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_R_file, \".low.r:light\", \"ipynb_to_script\")\n\n\ndef test_ipynb_to_r_percent(ipynb_R_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_R_file, \".low.r:percent\", \"ipynb_to_percent\")\n\n\ndef test_ipynb_to_R_spin(ipynb_R_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_R_file, \"R:spin\", \"ipynb_to_spin\")\n\n\ndef test_ipynb_to_r_spin(ipynb_R_file, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_R_file, \".low.r:spin\", \"ipynb_to_spin\")\n\n\n@pytest.mark.parametrize(\"extension\", (\"ss\", \"scm\"))\ndef test_ipynb_to_scheme_light(ipynb_scheme_file, extension, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_scheme_file, f\"{extension}:light\", \"ipynb_to_script\")\n\n\n@pytest.mark.parametrize(\"extension\", (\"ss\", \"scm\"))\ndef test_ipynb_to_scheme_percent(ipynb_scheme_file, extension, no_jupytext_version_number):\n    assert_conversion_same_as_mirror(ipynb_scheme_file, f\"{extension}:percent\", \"ipynb_to_percent\")\n"
  },
  {
    "path": "tests/functional/round_trip/test_myst_header.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import new_notebook, new_raw_cell\n\nfrom jupytext import reads, writes\nfrom jupytext.compare import compare, compare_notebooks\nfrom jupytext.config import load_jupytext_configuration_file\nfrom jupytext.header import _JUPYTER_METADATA_NAMESPACE\nfrom jupytext.myst import dump_yaml_blocks\n\n\n@pytest.mark.requires_myst\ndef test_myst_header_is_stable_1247_using_inline_filter(\n    md=\"\"\"---\njupytext:\n  formats: md:myst\n  notebook_metadata_filter: -jupytext.text_representation.jupytext_version,settings,mystnb\n  text_representation:\n    extension: .md\n    format_name: myst\n    format_version: 0.13\nkernelspec:\n  display_name: Python 3 (ipykernel)\n  language: python\n  name: python3\nmystnb:\n  execution_mode: 'off'\nsettings:\n  output_matplotlib_strings: remove\n---\n\"\"\",\n):\n    nb = reads(md, fmt=\"md\")\n    md2 = writes(nb, fmt=\"md\")\n\n    compare(md2, md)\n\n\n@pytest.mark.requires_myst\ndef test_myst_header_is_stable_1247_using_config(\n    jupytext_toml_content=\"\"\"notebook_metadata_filter = \"-jupytext.text_representation.jupytext_version,settings,mystnb\"\n\"\"\",\n    md=\"\"\"---\njupytext:\n  formats: md:myst\n  text_representation:\n    extension: .md\n    format_name: myst\n    format_version: 0.13\nkernelspec:\n  display_name: Python 3 (ipykernel)\n  language: python\n  name: python3\nmystnb:\n  execution_mode: 'off'\nsettings:\n  output_matplotlib_strings: remove\n---\n\"\"\",\n):\n    config = load_jupytext_configuration_file(\"jupytext.toml\", jupytext_toml_content)\n\n    nb = reads(md, fmt=\"md\", config=config)\n    md2 = writes(nb, fmt=\"md\", config=config)\n\n    compare(md2, md)\n\n\n@pytest.mark.requires_myst\ndef test_myst_frontmatter_metadata_combo(no_jupytext_version_number):\n    # ---\n    # foo: bar\n    # jupyter: <- subkeys become notebook metadata\n    #   lorem: ipsum\n    # ---\n    frontmatter = {\"foo\": \"bar\"}\n    metadata = {\"lorem\": \"ipsum\"}\n    md = dump_yaml_blocks(\n        {**frontmatter, _JUPYTER_METADATA_NAMESPACE: metadata},\n        compact=False,\n    )\n    config = load_jupytext_configuration_file(\n        \"jupytext.toml\",\n        \"\\n\".join(\n            (\n                'notebook_metadata_filter = \"all,-jupytext\"',\n                'root_level_metadata_filter = \"-all\"',\n            )\n        ),\n    )\n    actual_nb = reads(md, fmt=\"md:myst\", config=config)\n    expected_nb = new_notebook(\n        metadata=metadata,\n        cells=[\n            new_raw_cell(dump_yaml_blocks(frontmatter, compact=False).strip()),\n        ],\n    )\n    compare_notebooks(actual_nb, expected_nb)\n    # {\n    #   \"cells\": [\n    #     {\n    #        \"cell_type\": \"raw\",\n    #        \"source\": \"---\\nfoo: bar\\n---\",  <- merge with metadata in frontmatter\n    #        ...\n    #     }\n    #   ],\n    #   \"metadata\": {\"foo\": \"baz\"},\n    #   ...\n    # }\n    actual_md = writes(actual_nb, fmt=\"md:myst\", config=config)\n    expected_md = md\n    compare(actual_md, expected_md)\n"
  },
  {
    "path": "tests/functional/round_trip/test_read_all_py.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_identity_source_write_read(py_file):\n    with open(py_file) as fp:\n        py = fp.read()\n\n    nb = jupytext.reads(py, \"py\")\n    py2 = jupytext.writes(nb, \"py\")\n\n    compare(py2, py)\n"
  },
  {
    "path": "tests/functional/round_trip/test_rmd_to_ipynb.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_identity_write_read(rmd_file, no_jupytext_version_number):\n    \"\"\"Test that writing the notebook with ipynb, and read again, yields identity\"\"\"\n\n    with open(rmd_file) as fp:\n        rmd = fp.read()\n\n    nb = jupytext.reads(rmd, \"Rmd\")\n    rmd2 = jupytext.writes(nb, \"Rmd\")\n\n    compare(rmd2, rmd)\n\n\ndef test_two_blank_lines_as_cell_separator():\n    rmd = \"\"\"Some markdown\ntext\n\n\nAnd a new cell\n\"\"\"\n\n    nb = jupytext.reads(rmd, \"Rmd\")\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"Some markdown\\ntext\"\n    assert nb.cells[1].source == \"And a new cell\"\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_ipynb_to_R.py",
    "content": "import nbformat\nimport pytest\n\nimport jupytext\nfrom jupytext.compare import compare_notebooks\n\n\n@pytest.mark.parametrize(\"ext\", [\".r\", \".R\"])\ndef test_identity_source_write_read(ipynb_R_file, ext):\n    \"\"\"\n    Test that writing the notebook with R, and read again,\n    is the same as removing outputs\n    \"\"\"\n\n    with open(ipynb_R_file) as fp:\n        nb1 = nbformat.read(fp, as_version=4)\n\n    R = jupytext.writes(nb1, ext)\n    nb2 = jupytext.reads(R, ext)\n\n    compare_notebooks(nb2, nb1)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_ipynb_to_myst.py",
    "content": "import json\nimport unittest.mock as mock\nfrom textwrap import dedent\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_notebook\nfrom tornado.web import HTTPError\n\nimport jupytext\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.compare import compare\nfrom jupytext.formats import (\n    JupytextFormatError,\n    get_format_implementation,\n    guess_format,\n)\nfrom jupytext.myst import (\n    CODE_DIRECTIVE,\n    MystMetadataParsingError,\n    matches_mystnb,\n    myst_extensions,\n    myst_to_notebook,\n)\n\n\n@pytest.mark.requires_myst\ndef test_bad_notebook_metadata():\n    \"\"\"Test exception raised if notebook metadata cannot be parsed.\"\"\"\n    with pytest.raises(MystMetadataParsingError):\n        myst_to_notebook(\n            dedent(\n                \"\"\"\\\n            ---\n            {{a\n            ---\n            \"\"\"\n            )\n        )\n\n\n@pytest.mark.requires_myst\ndef test_bad_code_metadata():\n    \"\"\"Test exception raised if cell metadata cannot be parsed.\"\"\"\n    with pytest.raises(MystMetadataParsingError):\n        myst_to_notebook(\n            dedent(\n                \"\"\"\\\n            ```{0}\n            ---\n            {{a\n            ---\n            ```\n            \"\"\"\n            ).format(CODE_DIRECTIVE)\n        )\n\n\n@pytest.mark.requires_myst\ndef test_bad_markdown_metadata():\n    \"\"\"Test exception raised if markdown metadata cannot be parsed.\"\"\"\n    with pytest.raises(MystMetadataParsingError):\n        myst_to_notebook(\n            dedent(\n                \"\"\"\\\n            +++ {{a\n            \"\"\"\n            )\n        )\n\n\n@pytest.mark.requires_myst\ndef test_bad_markdown_metadata2():\n    \"\"\"Test exception raised if markdown metadata is not a dict.\"\"\"\n    with pytest.raises(MystMetadataParsingError):\n        myst_to_notebook(\n            dedent(\n                \"\"\"\\\n            +++ [1, 2]\n            \"\"\"\n            )\n        )\n\n\n@pytest.mark.requires_myst\ndef test_matches_mystnb():\n    assert matches_mystnb(\"\") is False\n    assert matches_mystnb(\"```{code-cell}\\n```\") is False\n    assert matches_mystnb(\"---\\njupytext: true\\n---\") is False\n    for ext in myst_extensions(no_md=True):\n        assert matches_mystnb(\"\", ext=ext) is True\n    text = dedent(\n        \"\"\"\\\n        ---\n        {{a\n        ---\n        ```{code-cell}\n        :b: {{c\n        ```\n        \"\"\"\n    )\n    assert matches_mystnb(text) is True\n    text = dedent(\n        \"\"\"\\\n        ---\n        jupyter:\n            jupytext:\n                text_representation:\n                    format_name: myst\n                    extension: .md\n        ---\n        \"\"\"\n    )\n    assert matches_mystnb(text) is True\n    text = dedent(\n        \"\"\"\\\n        ---\n        jupytext:\n            text_representation:\n                format_name: myst\n                extension: .md\n        ---\n        \"\"\"\n    )\n    assert matches_mystnb(text) is True\n    text = dedent(\n        \"\"\"\\\n        ---\n        a: 1\n        ---\n        > ```{code-cell}\n          ```\n        \"\"\"\n    )\n    assert matches_mystnb(text) is True\n    assert guess_format(text, \".md\") == (\"myst\", {})\n\n\ndef test_not_installed():\n    with mock.patch(\"jupytext.formats.JUPYTEXT_FORMATS\", return_value=[]):\n        with pytest.raises(JupytextFormatError):\n            get_format_implementation(\".myst\")\n\n\n@pytest.mark.requires_myst\ndef test_add_source_map():\n    notebook = myst_to_notebook(\n        dedent(\n            \"\"\"\\\n            ---\n            a: 1\n            ---\n            abc\n            +++\n            def\n            ```{0}\n            ---\n            b: 2\n            ---\n            c = 3\n            ```\n            xyz\n            \"\"\"\n        ).format(CODE_DIRECTIVE),\n        add_source_map=True,\n    )\n    assert notebook.metadata.source_map == [3, 5, 7, 12]\n\n\nPLEASE_INSTALL_MYST = \"The MyST Markdown format requires .*\"\n\n\n@pytest.mark.requires_no_myst\ndef test_meaningfull_error_write_myst_missing(tmpdir):\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    jupytext.write(new_notebook(), str(nb_file))\n\n    with pytest.raises(ImportError, match=PLEASE_INSTALL_MYST):\n        jupytext_cli([str(nb_file), \"--to\", \"md:myst\"])\n\n\n@pytest.mark.asyncio\n@pytest.mark.requires_no_myst\nasync def test_meaningfull_error_open_myst_missing(tmpdir, cm):\n    md_file = tmpdir.join(\"notebook.md\")\n    md_file.write(\n        \"\"\"---\njupytext:\n  text_representation:\n    extension: '.md'\n    format_name: myst\nkernelspec:\n  display_name: Python 3\n  language: python\n  name: python3\n---\n\n1 + 1\n\"\"\"\n    )\n\n    with pytest.raises(ImportError, match=PLEASE_INSTALL_MYST):\n        jupytext_cli([str(md_file), \"--to\", \"ipynb\"])\n\n    cm.root_dir = str(tmpdir)\n\n    with pytest.raises(HTTPError, match=PLEASE_INSTALL_MYST):\n        await ensure_async(cm.get(\"notebook.md\"))\n\n\n@pytest.mark.asyncio\n@pytest.mark.requires_myst\n@pytest.mark.parametrize(\"language_info\", [\"none\", \"std\", \"no_pygments_lexer\"])\nasync def test_myst_representation_same_cli_or_contents_manager(tmpdir, cwd_tmpdir, cm, notebook_with_outputs, language_info):\n    \"\"\"This test gives some information on #759. As of Jupytext 1.11.1, in the MyST Markdown format,\n    the code cells have an ipython3 lexer when the notebook \"language_info\" metadata has \"ipython3\"\n    as the pygments_lexer. This information comes from the kernel and ATM it is not clear how the user\n    can choose to include it or not in the md file.\"\"\"\n\n    nb = notebook_with_outputs\n    if language_info != \"none\":\n        nb[\"metadata\"][\"language_info\"] = {\n            \"codemirror_mode\": {\"name\": \"ipython\", \"version\": 3},\n            \"file_extension\": \".py\",\n            \"mimetype\": \"text/x-python\",\n            \"name\": \"python\",\n            \"nbconvert_exporter\": \"python\",\n            \"pygments_lexer\": \"ipython3\",\n            \"version\": \"3.7.3\",\n        }\n    if language_info == \"no_pygments_lexer\":\n        del nb[\"metadata\"][\"language_info\"][\"pygments_lexer\"]\n\n    # Writing the notebook with the Python API\n    text_api = jupytext.writes(nb, fmt=\"md:myst\")\n\n    # How do code cells look like?\n    code_cells = {line for line in text_api.splitlines() if line.startswith(\"```{code-cell\")}\n\n    if language_info == \"std\":\n        assert code_cells == {\"```{code-cell} ipython3\"}\n    else:\n        assert code_cells == {\"```{code-cell}\"}\n\n    # We get the same file with the command line jupytext\n    tmpdir.mkdir(\"cli\").join(\"notebook.ipynb\").write(json.dumps(nb))\n    jupytext_cli([\"--to\", \"md:myst\", \"cli/notebook.ipynb\"])\n    text_cli = tmpdir.join(\"cli\").join(\"notebook.md\").read()\n\n    compare(text_cli, text_api)\n\n    # Or with the contents manager\n    cm.formats = \"ipynb,md:myst\"\n    cm.root_dir = str(tmpdir.mkdir(\"contents_manager\"))\n\n    await ensure_async(cm.save(model=dict(content=nb, type=\"notebook\"), path=\"notebook.ipynb\"))\n    text_cm = tmpdir.join(\"contents_manager\").join(\"notebook.md\").read()\n\n    compare(text_cm, text_api)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_ipynb_to_py.py",
    "content": "import nbformat\n\nimport jupytext\nfrom jupytext.compare import compare_notebooks\n\n\ndef test_identity_source_write_read(ipynb_py_file):\n    \"\"\"Test that writing the notebook with jupytext, and read again,\n    is the same as removing outputs\"\"\"\n\n    with open(ipynb_py_file) as fp:\n        nb1 = nbformat.read(fp, as_version=4)\n\n    py = jupytext.writes(nb1, \"py\")\n    nb2 = jupytext.reads(py, \"py\")\n\n    compare_notebooks(nb2, nb1)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_ipynb_to_rmd.py",
    "content": "import nbformat\n\nimport jupytext\nfrom jupytext.compare import compare_notebooks\n\n\ndef test_identity_source_write_read(ipynb_py_R_jl_file):\n    \"\"\"Test that writing the notebook with rmd, and read again,\n    is the same as removing outputs\"\"\"\n\n    with open(ipynb_py_R_jl_file) as fp:\n        nb1 = nbformat.read(fp, as_version=4)\n\n    rmd = jupytext.writes(nb1, \"Rmd\")\n    nb2 = jupytext.reads(rmd, \"Rmd\")\n\n    compare_notebooks(nb2, nb1, \"Rmd\")\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_knitr_spin.py",
    "content": "import jupytext\n\n\ndef test_jupytext_same_as_knitr_spin(r_spin_file, tmpdir):\n    nb = jupytext.read(r_spin_file)\n    rmd_jupytext = jupytext.writes(nb, \"Rmd\")\n\n    # Rmd file generated with spin(hair='R/spin.R', knit=FALSE)\n    rmd_file = r_spin_file.replace(\"R_spin\", \"Rmd\").replace(\".R\", \".Rmd\")\n\n    with open(rmd_file) as fp:\n        rmd_spin = fp.read()\n\n    assert rmd_spin == rmd_jupytext\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_dotnet_try_markdown.py",
    "content": "import jupytext\nfrom jupytext.cell_metadata import parse_key_equal_value\nfrom jupytext.compare import compare\n\n\ndef test_parse_metadata():\n    assert parse_key_equal_value(\"--key value --key-2 .\\\\a\\\\b.cs\") == {\n        \"incorrectly_encoded_metadata\": \"--key value --key-2 .\\\\a\\\\b.cs\"\n    }\n\n\ndef test_parse_double_hyphen_metadata():\n    assert parse_key_equal_value(\"--key1 value1 --key2 value2\") == {\n        \"incorrectly_encoded_metadata\": \"--key1 value1 --key2 value2\"\n    }\n\n\ndef test_read_dotnet_try_markdown(\n    md=\"\"\"This is a dotnet/try Markdown file, inspired\nfrom this [post](https://devblogs.microsoft.com/dotnet/creating-interactive-net-documentation/)\n\n``` cs --region methods --source-file .\\\\myapp\\\\Program.cs --project .\\\\myapp\\\\myapp.csproj\nvar name =\"Rain\";\nConsole.WriteLine($\"Hello {name.ToUpper()}!\");\n```\n\"\"\",\n):\n    # Read the notebook\n    nb = jupytext.reads(md, fmt=\".md\")\n    assert nb.metadata[\"jupytext\"][\"main_language\"] == \"csharp\"\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert (\n        nb.cells[1].source\n        == \"\"\"var name =\"Rain\";\nConsole.WriteLine($\"Hello {name.ToUpper()}!\");\"\"\"\n    )\n    compare(\n        nb.cells[1].metadata,\n        {\n            \"language\": \"cs\",\n            \"incorrectly_encoded_metadata\": \"--region methods --source-file .\\\\myapp\\\\Program.cs --project .\\\\myapp\\\\myapp.csproj\",  # noqa: E501\n        },\n    )\n\n    # Round trip to Markdown\n    md2 = jupytext.writes(nb, \"md\")\n    compare(md2, md.replace(\"``` cs\", \"```cs\"))\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_empty_text_notebook.py",
    "content": "import pytest\nfrom nbformat.notebooknode import NotebookNode\n\nimport jupytext\nfrom jupytext.formats import NOTEBOOK_EXTENSIONS\nfrom jupytext.myst import is_myst_available, myst_extensions\nfrom jupytext.quarto import is_quarto_available\n\n\n@pytest.mark.parametrize(\"ext\", sorted(set(NOTEBOOK_EXTENSIONS) - {\".ipynb\"}))\ndef test_read_empty_text_notebook(ext, tmp_path):\n    if ext == \".qmd\" and not is_quarto_available(min_version=\"0.2.0\"):\n        pytest.skip(\"quarto is not available\")\n    if ext in myst_extensions(no_md=True) and not is_myst_available():\n        pytest.skip(\"MyST is not available\")\n\n    empty_nb = (tmp_path / \"notebook\").with_suffix(ext)\n    empty_nb.touch()\n\n    nb = jupytext.read(empty_nb)\n\n    assert isinstance(nb, NotebookNode)\n    assert not nb.cells\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_folding_markers.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\n# region Folding markers as cell boundaries\n# region Sub-region with metadata {\"key\": \"value\"}\ndef test_mark_cell_with_vim_folding_markers(\n    script=\"\"\"# This is a markdown cell\n\n# {{{ And this is a foldable code region with metadata {\"key\": \"value\"}\na = 1\n\nb = 2\n\nc = 3\n# }}}\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    assert nb.metadata[\"jupytext\"][\"cell_markers\"] == \"{{{,}}}\"\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"This is a markdown cell\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"a = 1\\n\\nb = 2\\n\\nc = 3\"\n    assert nb.cells[1].metadata == {\n        \"title\": \"And this is a foldable code region with metadata\",\n        \"key\": \"value\",\n    }\n\n    script2 = jupytext.writes(nb, \"py\")\n    compare(script2, script)\n\n\n# endregion\n\n\ndef test_mark_cell_with_vscode_pycharm_folding_markers(\n    script=\"\"\"# This is a markdown cell\n\n# region And this is a foldable code region with metadata {\"key\": \"value\"}\na = 1\n\nb = 2\n\nc = 3\n# endregion\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"This is a markdown cell\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"a = 1\\n\\nb = 2\\n\\nc = 3\"\n    assert nb.cells[1].metadata == {\n        \"title\": \"And this is a foldable code region with metadata\",\n        \"key\": \"value\",\n    }\n\n    script2 = jupytext.writes(nb, \"py\")\n    compare(script2, script)\n\n\ndef test_mark_cell_with_no_title_and_inner_region(\n    script=\"\"\"# This is a markdown cell\n\n# region {\"key\": \"value\"}\na = 1\n\n# region An inner region\nb = 2\n# endregion\n\ndef f(x):\n    return x + 1\n\n\n# endregion\n\n\nd = 4\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"This is a markdown cell\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == '# region {\"key\": \"value\"}\\na = 1'\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[2].metadata[\"title\"] == \"An inner region\"\n    assert nb.cells[2].source == \"b = 2\"\n    assert nb.cells[3].cell_type == \"code\"\n    assert nb.cells[3].source == \"def f(x):\\n    return x + 1\"\n    assert nb.cells[4].cell_type == \"code\"\n    assert nb.cells[4].source == \"# endregion\"\n    assert nb.cells[5].cell_type == \"code\"\n    assert nb.cells[5].source == \"d = 4\"\n    assert len(nb.cells) == 6\n\n    script2 = jupytext.writes(nb, \"py\")\n    compare(script2, script)\n\n\n# endregion\n\n\ndef test_adjacent_regions(\n    script=\"\"\"# region global\n# region innermost\na = 1\n\nb = 2\n# endregion\n# endregion\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"code\"\n    assert nb.cells[0].source == \"# region global\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"a = 1\\n\\nb = 2\"\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[2].source == \"# endregion\"\n\n    script2 = jupytext.writes(nb, \"py\")\n    compare(script2, script)\n\n\ndef test_indented_markers_are_ignored(\n    script=\"\"\"# region global\n    # region indented\na = 1\n\nb = 2\n    # endregion\n# endregion\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n\n    script2 = jupytext.writes(nb, \"py\")\n    compare(script2, script)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_incomplete_rmd.py",
    "content": "import jupytext\n\n\ndef test_incomplete_header(\n    rmd=\"\"\"---\ntitle: Incomplete header\n\n```{python}\n1+1\n```\n\"\"\",\n):\n    nb = jupytext.reads(rmd, \"Rmd\")\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"---\\ntitle: Incomplete header\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"1+1\"\n\n\ndef test_code_in_markdown_block(\n    rmd=\"\"\"```{python}\na = 1\nb = 2\na + b\n```\n\n```python\n'''Code here goes to a Markdown cell'''\n\n\n'''even if we have two blank lines above'''\n```\n\n```{bash}\nls -l\n```\n\"\"\",\n):\n    nb = jupytext.reads(rmd, \"Rmd\")\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"code\"\n    assert nb.cells[0].source == \"a = 1\\nb = 2\\na + b\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert (\n        nb.cells[1].source\n        == \"\"\"```python\n'''Code here goes to a Markdown cell'''\n\n\n'''even if we have two blank lines above'''\n```\"\"\"\n    )\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[2].source == \"%%bash\\nls -l\"\n\n\ndef test_unterminated_header(\n    rmd=\"\"\"---\ntitle: Unterminated header\n\n```{python}\n1+3\n```\n\nsome text\n\n```{r}\n1+4\n```\n\n```{python not_terminated}\n1+5\n\"\"\",\n):\n    nb = jupytext.reads(rmd, \"Rmd\")\n    assert len(nb.cells) == 5\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"---\\ntitle: Unterminated header\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"1+3\"\n    assert nb.cells[2].cell_type == \"markdown\"\n    assert nb.cells[2].source == \"some text\"\n    assert nb.cells[3].cell_type == \"code\"\n    assert nb.cells[3].source == \"%%R\\n1+4\"\n    assert nb.cells[4].cell_type == \"code\"\n    assert nb.cells[4].metadata == {\"name\": \"not_terminated\"}\n    assert nb.cells[4].source == \"1+5\"\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_R.py",
    "content": "import pytest\n\nimport jupytext\nfrom jupytext.compare import compare\n\n\n@pytest.mark.parametrize(\"ext\", [\".r\", \".R\"])\ndef test_read_simple_file(\n    ext,\n    rnb=\"\"\"#' ---\n#' title: Simple file\n#' ---\n\n#' Here we have some text\n#' And below we have some R code\n\nf <- function(x) {\n    x + 1\n    }\n\n\nh <- function(y)\n    y + 1\n\"\"\",\n):\n    nb = jupytext.reads(rnb, ext)\n    assert len(nb.cells) == 4\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: Simple file\\n---\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"Here we have some text\\nAnd below we have some R code\"\n    assert nb.cells[2].cell_type == \"code\"\n    compare(\n        nb.cells[2].source,\n        \"\"\"f <- function(x) {\n    x + 1\n    }\"\"\",\n    )\n    assert nb.cells[3].cell_type == \"code\"\n    compare(\n        nb.cells[3].source,\n        \"\"\"h <- function(y)\n    y + 1\"\"\",\n    )\n\n    rnb2 = jupytext.writes(nb, ext)\n    compare(rnb2, rnb)\n\n\n@pytest.mark.parametrize(\"ext\", [\".r\", \".R\"])\ndef test_read_less_simple_file(\n    ext,\n    rnb=\"\"\"#' ---\n#' title: Less simple file\n#' ---\n\n#' Here we have some text\n#' And below we have some R code\n\n# This is a comment about function f\nf <- function(x) {\n\n    return(x+1)}\n\n\n# And a comment on h\nh <- function(y) {\n    return(y-1)\n}\n\"\"\",\n):\n    nb = jupytext.reads(rnb, ext)\n\n    assert len(nb.cells) == 4\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: Less simple file\\n---\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"Here we have some text\\nAnd below we have some R code\"\n    assert nb.cells[2].cell_type == \"code\"\n    compare(\n        nb.cells[2].source,\n        \"\"\"# This is a comment about function f\nf <- function(x) {\n\n    return(x+1)}\"\"\",\n    )\n    assert nb.cells[3].cell_type == \"code\"\n    compare(\n        nb.cells[3].source,\n        \"\"\"# And a comment on h\nh <- function(y) {\n    return(y-1)\n}\"\"\",\n    )\n\n    rnb2 = jupytext.writes(nb, ext)\n    compare(rnb2, rnb)\n\n\n@pytest.mark.parametrize(\"ext\", [\".r\", \".R\"])\ndef test_no_space_after_code(\n    ext,\n    rnb=\"\"\"# -*- coding: utf-8 -*-\n#' Markdown cell\n\nf <- function(x)\n{\n    return(x+1)\n}\n\n#' And a new cell, and non ascii contênt\n\"\"\",\n):\n    nb = jupytext.reads(rnb, ext)\n\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"Markdown cell\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert (\n        nb.cells[1].source\n        == \"\"\"f <- function(x)\n{\n    return(x+1)\n}\"\"\"\n    )\n    assert nb.cells[2].cell_type == \"markdown\"\n    assert nb.cells[2].source == \"And a new cell, and non ascii contênt\"\n\n    rnb2 = jupytext.writes(nb, ext)\n    compare(rnb2, rnb)\n\n\n@pytest.mark.parametrize(\"ext\", [\".r\", \".R\"])\ndef test_read_write_script(\n    ext,\n    rnb=\"\"\"#!/usr/bin/env Rscript\n# coding=utf-8\nprint('Hello world')\n\"\"\",\n):\n    nb = jupytext.reads(rnb, ext)\n    rnb2 = jupytext.writes(nb, ext)\n    compare(rnb2, rnb)\n\n\n@pytest.mark.parametrize(\"ext\", [\".r\", \".R\"])\ndef test_escape_start_pattern(\n    ext,\n    rnb=\"\"\"#' The code start pattern '#+' can\n#' appear in code and markdown cells.\n\n#' In markdown cells it is escaped like here:\n#' #+ fig.width=12\n\n# In code cells like this one, it is also escaped\n# #+ cell_name language=\"python\"\n1 + 1\n\"\"\",\n):\n    nb = jupytext.reads(rnb, ext)\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[2].cell_type == \"code\"\n    assert (\n        nb.cells[1].source\n        == \"\"\"In markdown cells it is escaped like here:\n#+ fig.width=12\"\"\"\n    )\n    assert (\n        nb.cells[2].source\n        == \"\"\"# In code cells like this one, it is also escaped\n#+ cell_name language=\"python\"\n1 + 1\"\"\"\n    )\n    rnb2 = jupytext.writes(nb, ext)\n    compare(rnb2, rnb)\n\n\n@pytest.mark.parametrize(\"ext\", [\".r\", \".R\"])\ndef test_read_simple_r(\n    ext,\n    text=\"\"\"# This is a very simple R file\n# I expect to get three cells here.\n#\n# The first one is markdown. The two others\n# are code cells\n\ncars\n\nplot(cars)\n\"\"\",\n):\n    nb = jupytext.reads(text, ext)\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[1].source == \"cars\"\n    assert nb.cells[2].source == \"plot(cars)\"\n    text2 = jupytext.writes(nb, ext)\n    compare(text2, text)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_clojure.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_read_simple_file(\n    script=\"\"\";; ---\n;; title: Simple file\n;; ---\n\n;; Here we have some text\n;; And below we have some code\n\n((fn\n  []\n  (println \"Hello World\")))\n\"\"\",\n):\n    nb = jupytext.reads(script, \"clj\")\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: Simple file\\n---\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"Here we have some text\\nAnd below we have some code\"\n    assert nb.cells[2].cell_type == \"code\"\n    compare(\n        nb.cells[2].source,\n        \"\"\"((fn\n  []\n  (println \"Hello World\")))\"\"\",\n    )\n\n    script2 = jupytext.writes(nb, \"clj\")\n    compare(script2, script)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_csharp.py",
    "content": "import pytest\n\nimport jupytext\nfrom jupytext.compare import compare\n\n\n@pytest.mark.parametrize(\"lang\", [\"cs\", \"c#\", \"csharp\"])\ndef test_simple_cs(lang):\n    source = \"\"\"// A Hello World! program in C#.\nConsole.WriteLine(\"Hello World!\");\n\"\"\"\n    md = \"\"\"```{lang}\n{source}\n```\n\"\"\".format(lang=lang, source=source)\n    nb = jupytext.reads(md, \"md\")\n    assert nb.metadata[\"jupytext\"][\"main_language\"] == \"csharp\"\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n\n    cs = jupytext.writes(nb, \"cs\")\n    assert source in cs\n    if lang != \"csharp\":\n        assert cs.startswith(f'// %% language=\"{lang}\"')\n\n    md2 = jupytext.writes(nb, \"md\")\n    compare(md2, md)\n\n\n@pytest.mark.parametrize(\"lang\", [\"cs\", \"c#\", \"csharp\"])\ndef test_csharp_magics(no_jupytext_version_number, lang):\n    md = \"\"\"```{lang}\n#!html\n<b>Hello!</b>\n```\n\"\"\".format(lang=lang)\n    nb = jupytext.reads(md, \"md\")\n    nb.metadata[\"jupytext\"].pop(\"notebook_metadata_filter\")\n    nb.metadata[\"jupytext\"].pop(\"cell_metadata_filter\")\n    assert nb.metadata[\"jupytext\"][\"main_language\"] == \"csharp\"\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n\n    cs = jupytext.writes(nb, \"cs\")\n    assert all(line.startswith(\"//\") for line in cs.splitlines()), cs\n\n    md2 = jupytext.writes(nb, \"md\")\n    md_expected = \"\"\"---\njupyter:\n  jupytext:\n    main_language: csharp\n---\n\n```html\n<b>Hello!</b>\n```\n\"\"\"\n    compare(md2, md_expected)\n\n\ndef test_read_html_cell_from_md(no_jupytext_version_number):\n    md = \"\"\"---\njupyter:\n  jupytext:\n    main_language: csharp\n---\n\n```html\n<b>Hello!</b>\n```\n\"\"\"\n\n    nb = jupytext.reads(md, \"md\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n    compare(nb.cells[0].source, \"#!html\\n<b>Hello!</b>\")\n\n    md2 = jupytext.writes(nb, \"md\")\n    compare(md2, md)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_go.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_read_simple_file(\n    go=\"\"\"// -*- coding: utf-8 -*-\n// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Go (gonb)\n//     language: go\n//     name: gonb\n// ---\n\n// A notebook that use [GoNB](https://github.com/janpfeifer/gonb)\n\n// the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb)\n\nfunc main() {\n    fmt.Printf(\"Hello World!\")\n}\n\"\"\",\n):\n    nb = jupytext.reads(go, \"go:light\")\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[2].cell_type == \"code\"\n\n\ndef test_read_go_notebook_with_percent_percent_and_arguments(\n    go=\"\"\"// %% [markdown]\n// # Square Function\n//\n// Defines a function $f(x) = x^2$\n\n// %%\nfunc Square(x float64) float64 {\n        return x*x\n}\n\n// %% [markdown]\n// # Examples\n//\n// ## Example A: $x = 3$\n\n// %%\nvar x = flag.Float64(\"x\", 0.0, \"value of x to feed f(x)\")\n\n//gonb:%% -x=3\nfmt.Printf(\"Square(%g)=%g\\n\", *x, Square(*x))\n\n// %% [markdown]\n// ## Example B: $x = 4$\n\n// %%\n//gonb:%% -x=4\nfmt.Printf(\"Square(%g)=%g\\n\", *x, Square(*x))\n\"\"\",\n):\n    nb = jupytext.reads(go, \"go\")\n    for cell in nb.cells:\n        assert \"gonb\" not in cell.source, cell.source\n\n    go2 = jupytext.writes(nb, \"go\")\n    compare(go2, go)\n\n\ndef test_read_go_notebook_with_magic_main(\n    go=\"\"\"// %%\npackage square\n\n// %% [markdown]\n// # Defining a $x^2$ function\n// It returns x*x.\n\n// %%\nfunc Square(x float64) float64 {\n  return x * x\n}\n\n// %% [markdown]\n// # Examples\n//\n// ## Example A: $x = 3$\n\n// %%\nvar x = flag.Float64(\"x\", 0.0, \"Value of x\")\n\nfunc example() {\n  fmt.Printf(\"Square(%g)=%g\\n\", *x, Square(*x))\n}\n// %main example -x=3\n\n// %% [markdown]\n// ## Example B: $x = 4$\n\n// %%\n// %main example -x=4\n\"\"\",\n):\n    nb = jupytext.reads(go, \"go\")\n    for cell in nb.cells:\n        assert \"gonb\" not in cell.source, cell.source\n\n    go2 = jupytext.writes(nb, \"go\")\n    compare(go2, go)\n\n\ndef test_commented_magic(\n    go=\"\"\"// %%\n// This is a commented magic\n// //gonb:%%\n\n// %% [markdown]\n// This is a commented magic in a markdown cell\n// // //gonb:%%\n\"\"\",\n):\n    nb = jupytext.reads(go, \"go\")\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"code\"\n    assert (\n        nb.cells[0].source\n        == \"\"\"// This is a commented magic\n// %%\"\"\"\n    )\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert (\n        nb.cells[1].source\n        == \"\"\"This is a commented magic in a markdown cell\n// %%\"\"\"\n    )\n    go2 = jupytext.writes(nb, \"go\")\n    compare(go2, go)\n\n\ndef test_magic_commands_are_commented(\n    go=\"\"\"// %%\n// !*rm -f go.work && go work init && go work use . ${HOME}/Projects/gopjrt\n// %goworkfix\n// %env LD_LIBRARY_PATH=/usr/local/lib\n\"\"\",\n):\n    nb = jupytext.reads(go, \"go:percent\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n    assert (\n        nb.cells[0].source\n        == \"\"\"!*rm -f go.work && go work init && go work use . ${HOME}/Projects/gopjrt\n%goworkfix\n%env LD_LIBRARY_PATH=/usr/local/lib\"\"\"\n    )\n\n    go2 = jupytext.writes(nb, \"go\")\n    compare(go2, go)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_groovy.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_read_simple_file(\n    script=\"\"\"// ---\n// title: Simple file\n// ---\n\n// Here we have some text\n// And below we have some code\n\nprintln(\"Hello World\")\n\"\"\",\n):\n    nb = jupytext.reads(script, \"groovy\")\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: Simple file\\n---\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"Here we have some text\\nAnd below we have some code\"\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[2].source == \"\"\"println(\"Hello World\")\"\"\"\n\n    script2 = jupytext.writes(nb, \"groovy\")\n    compare(script2, script)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_hydrogen.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_read_simple_file(\n    script=\"\"\"# ---\n# title: Simple file\n# ---\n\n# %% [markdown]\n# This is a markdown cell\n\n# %% [raw]\n# This is a raw cell\n\n# %%% sub-cell title\n# This is a sub-cell\n\n# %%%% sub-sub-cell title\n# This is a sub-sub-cell\n\n# %% And now a code cell\n1 + 2 + 3 + 4\n5\n6\n%%pylab inline\n\n7\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py:hydrogen\")\n    assert len(nb.cells) == 6\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: Simple file\\n---\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"This is a markdown cell\"\n    assert nb.cells[2].cell_type == \"raw\"\n    assert nb.cells[2].source == \"This is a raw cell\"\n    assert nb.cells[3].cell_type == \"code\"\n    assert nb.cells[3].source == \"# This is a sub-cell\"\n    assert nb.cells[3].metadata[\"title\"] == \"sub-cell title\"\n    assert nb.cells[4].cell_type == \"code\"\n    assert nb.cells[4].source == \"# This is a sub-sub-cell\"\n    assert nb.cells[4].metadata[\"title\"] == \"sub-sub-cell title\"\n    assert nb.cells[5].cell_type == \"code\"\n    compare(\n        nb.cells[5].source,\n        \"\"\"1 + 2 + 3 + 4\n5\n6\n%%pylab inline\n\n7\"\"\",\n    )\n    assert nb.cells[5].metadata == {\"title\": \"And now a code cell\"}\n\n    script2 = jupytext.writes(nb, \"py:hydrogen\")\n    compare(script2, script)\n\n\ndef test_read_cell_with_metadata(\n    script=\"\"\"# %% a code cell with parameters {\"tags\": [\"parameters\"]}\na = 3\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py:hydrogen\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n    assert nb.cells[0].source == \"a = 3\"\n    assert nb.cells[0].metadata == {\n        \"title\": \"a code cell with parameters\",\n        \"tags\": [\"parameters\"],\n    }\n\n    script2 = jupytext.writes(nb, \"py:hydrogen\")\n    compare(script2, script)\n\n\ndef test_read_nbconvert_script(\n    script=\"\"\"\n# coding: utf-8\n\n# A markdown cell\n\n# In[1]:\n\n\n%pylab inline\nimport pandas as pd\n\npd.options.display.max_rows = 6\npd.options.display.max_columns = 20\n\n\n# Another markdown cell\n\n# In[2]:\n\n\n1 + 1\n\n\n# Again, a markdown cell\n\n# In[33]:\n\n\n2 + 2\n\n\n# <codecell>\n\n\n3 + 3\n\"\"\",\n):\n    assert jupytext.formats.guess_format(script, \".py\")[0] == \"hydrogen\"\n    nb = jupytext.reads(script, \".py\")\n    assert len(nb.cells) == 5\n\n\ndef test_read_remove_blank_lines(\n    script=\"\"\"# %%\nimport pandas as pd\n\n# %% Display a data frame\ndf = pd.DataFrame({'A': [1, 2], 'B': [3, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n\n# %% Pandas plot {\"tags\": [\"parameters\"]}\ndf.plot(kind='bar')\n\n\n# %% sample class\nclass MyClass:\n    pass\n\n\n# %% a function\ndef f(x):\n    return 42 * x\n\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    assert len(nb.cells) == 5\n    for i in range(5):\n        assert nb.cells[i].cell_type == \"code\"\n        assert not nb.cells[i].source.startswith(\"\\n\")\n        assert not nb.cells[i].source.endswith(\"\\n\")\n\n    script2 = jupytext.writes(nb, \"py:hydrogen\")\n    compare(script2, script)\n\n\ndef test_no_crash_on_square_bracket(\n    script=\"\"\"# %% In [2]\nprint('Hello')\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    script2 = jupytext.writes(nb, \"py:hydrogen\")\n    compare(script2, script)\n\n\ndef test_nbconvert_cell(\n    script=\"\"\"# In[2]:\nprint('Hello')\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    script2 = jupytext.writes(nb, \"py:hydrogen\")\n    expected = \"\"\"# %%\nprint('Hello')\n\"\"\"\n    compare(script2, expected)\n\n\ndef test_nbformat_v3_nbpy_cell(\n    script=\"\"\"# <codecell>\nprint('Hello')\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    script2 = jupytext.writes(nb, \"py:hydrogen\")\n    expected = \"\"\"# %%\nprint('Hello')\n\"\"\"\n    compare(script2, expected)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_ipynb.py",
    "content": "import nbformat\nfrom nbformat.v4.nbbase import new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare\n\n\ndef test_save_ipynb_with_jupytext_has_final_newline(tmpdir):\n    nb = new_notebook()\n    file_jupytext = str(tmpdir.join(\"jupytext.ipynb\"))\n    file_nbformat = str(tmpdir.join(\"nbformat.ipynb\"))\n\n    jupytext.write(nb, file_jupytext)\n    with open(file_nbformat, \"w\") as fp:\n        nbformat.write(nb, fp)\n\n    with open(file_jupytext) as fp:\n        text_jupytext = fp.read()\n\n    with open(file_nbformat) as fp:\n        text_nbformat = fp.read()\n\n    compare(text_jupytext, text_nbformat)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_java.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_read_simple_file(\n    script=\"\"\"// ---\n// title: Simple file\n// ---\n\n// Here we have some text\n// And below we have some code\n\nSystem.out.println(\"Hello World\");\n\"\"\",\n):\n    nb = jupytext.reads(script, \"java\")\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: Simple file\\n---\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"Here we have some text\\nAnd below we have some code\"\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[2].source == \"\"\"System.out.println(\"Hello World\");\"\"\"\n\n    script2 = jupytext.writes(nb, \"java\")\n    compare(script2, script)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_julia.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_read_simple_file(\n    julia='''\"\"\"\n   cube(x)\n\nCompute the cube of `x`, ``x^3``.\n\n# Examples\n```jldoctest\njulia> cube(2)\n8\n```\n\"\"\"\nfunction cube(x)\n   x^3\nend\n\ncube(x)\n\n# And a markdown comment\n''',\n):\n    nb = jupytext.reads(julia, \"jl\")\n    assert nb.metadata[\"jupytext\"][\"main_language\"] == \"julia\"\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"code\"\n    assert (\n        nb.cells[0].source\n        == '''\"\"\"\n   cube(x)\n\nCompute the cube of `x`, ``x^3``.\n\n# Examples\n```jldoctest\njulia> cube(2)\n8\n```\n\"\"\"\nfunction cube(x)\n   x^3\nend'''\n    )\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"cube(x)\"\n    assert nb.cells[2].cell_type == \"markdown\"\n    compare(nb.cells[2].source, \"And a markdown comment\")\n\n    julia2 = jupytext.writes(nb, \"jl\")\n    compare(julia2, julia)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_markdown.py",
    "content": "from nbformat.v4.nbbase import (\n    new_code_cell,\n    new_markdown_cell,\n    new_notebook,\n    new_raw_cell,\n)\n\nimport jupytext\nfrom jupytext.combine import combine_inputs_with_outputs\nfrom jupytext.compare import compare, compare_cells, compare_notebooks\n\n\ndef test_read_mostly_py_markdown_file(\n    markdown=\"\"\"---\ntitle: Simple file\n---\n\n```python\nimport numpy as np\nx = np.arange(0, 2*math.pi, eps)\n```\n\n```python\nx = np.arange(0,1,eps)\ny = np.abs(x)-.5\n```\n\nThis is\na Markdown cell\n\n```\n# followed by a code cell with no language info\n```\n\n```\n# another code cell\n\n\n# with two blank lines\n```\n\nAnd the same markdown cell continues\n\n<!-- #raw -->\nthis is a raw cell\n<!-- #endraw -->\n\n```R\nls()\n```\n\n```R\ncat(stringi::stri_rand_lipsum(3), sep='\\n\\n')\n```\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    assert nb.metadata[\"jupytext\"][\"main_language\"] == \"python\"\n    compare_cells(\n        nb.cells,\n        [\n            new_raw_cell(\"---\\ntitle: Simple file\\n---\"),\n            new_code_cell(\"import numpy as np\\nx = np.arange(0, 2*math.pi, eps)\"),\n            new_code_cell(\"x = np.arange(0,1,eps)\\ny = np.abs(x)-.5\"),\n            new_markdown_cell(\n                \"\"\"This is\na Markdown cell\n\n```\n# followed by a code cell with no language info\n```\n\n```\n# another code cell\n\n\n# with two blank lines\n```\n\nAnd the same markdown cell continues\"\"\"\n            ),\n            new_raw_cell(\"this is a raw cell\"),\n            new_code_cell(\"%%R\\nls()\"),\n            new_code_cell(\"%%R\\ncat(stringi::stri_rand_lipsum(3), sep='\\n\\n')\"),\n        ],\n        compare_ids=False,\n    )\n\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_read_md_and_markdown_regions(\n    markdown=\"\"\"Some text\n\n<!-- #md -->\nA\n\n\nlong\ncell\n<!-- #endmd -->\n\n<!-- #markdown -->\nAnother\n\n\nlong\ncell\n<!-- #endmarkdown -->\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    assert nb.metadata[\"jupytext\"][\"main_language\"] == \"python\"\n    compare_cells(\n        nb.cells,\n        [\n            new_markdown_cell(\"Some text\"),\n            new_markdown_cell(\n                \"\"\"A\n\n\nlong\ncell\"\"\",\n                metadata={\"region_name\": \"md\"},\n            ),\n            new_markdown_cell(\n                \"\"\"Another\n\n\nlong\ncell\"\"\",\n                metadata={\"region_name\": \"markdown\"},\n            ),\n        ],\n        compare_ids=False,\n    )\n\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_read_mostly_R_markdown_file(\n    markdown=\"\"\"```R\nls()\n```\n\n```R\ncat(stringi::stri_rand_lipsum(3), sep='\\n\\n')\n```\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    assert nb.metadata[\"jupytext\"][\"main_language\"] == \"R\"\n    compare_cells(\n        nb.cells,\n        [\n            new_code_cell(\"ls()\"),\n            new_code_cell(\"cat(stringi::stri_rand_lipsum(3), sep='\\n\\n')\"),\n        ],\n        compare_ids=False,\n    )\n\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_read_markdown_file_no_language(\n    markdown=\"\"\"```\nls\n```\n\n```\necho 'Hello World'\n```\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_read_julia_notebook(\n    markdown=\"\"\"```julia\n1 + 1\n```\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    assert nb.metadata[\"jupytext\"][\"main_language\"] == \"julia\"\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_split_on_header(\n    markdown=\"\"\"A paragraph\n\n# H1 Header\n\n## H2 Header\n\nAnother paragraph\n\"\"\",\n):\n    fmt = {\"extension\": \".md\", \"split_at_heading\": True}\n    nb = jupytext.reads(markdown, fmt)\n    assert nb.cells[0].source == \"A paragraph\"\n    assert nb.cells[1].source == \"# H1 Header\"\n    assert nb.cells[2].source == \"## H2 Header\\n\\nAnother paragraph\"\n    assert len(nb.cells) == 3\n    markdown2 = jupytext.writes(nb, fmt)\n    compare(markdown2, markdown)\n\n\ndef test_split_on_header_after_two_blank_lines(\n    markdown=\"\"\"A paragraph\n\n\n# H1 Header\n\"\"\",\n):\n    fmt = {\"extension\": \".Rmd\", \"split_at_heading\": True}\n    nb = jupytext.reads(markdown, fmt)\n    markdown2 = jupytext.writes(nb, fmt)\n    compare(markdown2, markdown)\n\n\ndef test_split_at_heading_in_metadata(\n    markdown=\"\"\"---\njupyter:\n  jupytext:\n    split_at_heading: true\n---\n\nA paragraph\n\n# H1 Header\n\"\"\",\n    nb_expected=new_notebook(cells=[new_markdown_cell(\"A paragraph\"), new_markdown_cell(\"# H1 Header\")]),\n):\n    nb = jupytext.reads(markdown, \".md\")\n    compare_notebooks(nb, nb_expected)\n\n\ndef test_code_cell_with_metadata(\n    markdown=\"\"\"```python tags=[\"parameters\"]\na = 1\nb = 2\n```\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    compare_cells(\n        nb.cells,\n        [new_code_cell(source=\"a = 1\\nb = 2\", metadata={\"tags\": [\"parameters\"]})],\n        compare_ids=False,\n    )\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_raw_cell_with_metadata_json(\n    markdown=\"\"\"<!-- #raw {\"key\": \"value\"} -->\nraw content\n<!-- #endraw -->\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    compare_cells(\n        nb.cells,\n        [new_raw_cell(source=\"raw content\", metadata={\"key\": \"value\"})],\n        compare_ids=False,\n    )\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_raw_cell_with_metadata(\n    markdown=\"\"\"<!-- #raw key=\"value\" -->\nraw content\n<!-- #endraw -->\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    compare_cells(\n        nb.cells,\n        [new_raw_cell(source=\"raw content\", metadata={\"key\": \"value\"})],\n        compare_ids=False,\n    )\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_read_raw_cell_markdown_version_1_1(\n    markdown=\"\"\"---\njupyter:\n  jupytext:\n    text_representation:\n      extension: .md\n      format_name: markdown\n      format_version: '1.1'\n      jupytext_version: 1.1.0\n---\n\n```key=\"value\"\nraw content\n```\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    compare_cells(\n        nb.cells,\n        [new_raw_cell(source=\"raw content\", metadata={\"key\": \"value\"})],\n        compare_ids=False,\n    )\n    md2 = jupytext.writes(nb, \"md\")\n    assert \"format_version: '1.1'\" not in md2\n\n\ndef test_read_raw_cell_markdown_version_1_1_with_mimetype(\n    header=\"\"\"---\njupyter:\n  jupytext:\n    text_representation:\n      extension: .md\n      format_name: markdown\n      format_version: '1.1'\n      jupytext_version: 1.1.0-rc0\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\"\"\",\n    markdown_11=\"\"\"```raw_mimetype=\"text/restructuredtext\"\n.. meta::\n   :description: Topic: Integrated Development Environments, Difficulty: Easy, Category: Tools\n   :keywords: python, introduction, IDE, PyCharm, VSCode, Jupyter, recommendation, tools\n```\n\"\"\",\n    markdown_12=\"\"\"<!-- #raw raw_mimetype=\"text/restructuredtext\" -->\n.. meta::\n   :description: Topic: Integrated Development Environments, Difficulty: Easy, Category: Tools\n   :keywords: python, introduction, IDE, PyCharm, VSCode, Jupyter, recommendation, tools\n<!-- #endraw -->\n\"\"\",\n):\n    nb = jupytext.reads(header + \"\\n\" + markdown_11, \"md\")\n    compare_cells(\n        nb.cells,\n        [\n            new_raw_cell(\n                source=\"\"\".. meta::\n   :description: Topic: Integrated Development Environments, Difficulty: Easy, Category: Tools\n   :keywords: python, introduction, IDE, PyCharm, VSCode, Jupyter, recommendation, tools\"\"\",\n                metadata={\"raw_mimetype\": \"text/restructuredtext\"},\n            )\n        ],\n        compare_ids=False,\n    )\n    md2 = jupytext.writes(nb, \"md\")\n    assert \"format_version: '1.1'\" not in md2\n    nb.metadata[\"jupytext\"][\"notebook_metadata_filter\"] = \"-all\"\n    md2 = jupytext.writes(nb, \"md\")\n    compare(md2, markdown_12)\n\n\ndef test_markdown_cell_with_metadata_json(\n    markdown=\"\"\"<!-- #region {\"key\": \"value\"} -->\nA long\n\n\nmarkdown cell\n<!-- #endregion -->\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    compare_cells(\n        nb.cells,\n        [new_markdown_cell(source=\"A long\\n\\n\\nmarkdown cell\", metadata={\"key\": \"value\"})],\n        compare_ids=False,\n    )\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_markdown_cell_with_metadata(\n    markdown=\"\"\"<!-- #region key=\"value\" -->\nA long\n\n\nmarkdown cell\n<!-- #endregion -->\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    compare_cells(\n        nb.cells,\n        [new_markdown_cell(source=\"A long\\n\\n\\nmarkdown cell\", metadata={\"key\": \"value\"})],\n        compare_ids=False,\n    )\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_two_markdown_cells(\n    markdown=\"\"\"# A header\n\n<!-- #region -->\nA long\n\n\nmarkdown cell\n<!-- #endregion -->\n\"\"\",\n):\n    nb = jupytext.reads(markdown, \"md\")\n    compare_cells(\n        nb.cells,\n        [\n            new_markdown_cell(source=\"# A header\"),\n            new_markdown_cell(source=\"A long\\n\\n\\nmarkdown cell\"),\n        ],\n        compare_ids=False,\n    )\n    markdown2 = jupytext.writes(nb, \"md\")\n    compare(markdown2, markdown)\n\n\ndef test_combine_md_version_one():\n    markdown = \"\"\"---\njupyter:\n  jupytext:\n    text_representation:\n      extension: .md\n      format_name: markdown\n      format_version: '1.0'\n      jupytext_version: 1.0.0\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\nA short markdown cell\n\n```\na raw cell\n```\n\n```python\n1 + 1\n```\n\"\"\"\n    # notebook read from markdown file in version 1.0\n    nb_source = jupytext.reads(markdown, \"md\")\n\n    # actual notebook has metadata\n    nb_meta = jupytext.reads(markdown, \"md\")\n    for cell in nb_meta.cells:\n        cell.metadata = {\"key\": \"value\"}\n\n    nb_source = combine_inputs_with_outputs(nb_source, nb_meta)\n    for cell in nb_source.cells:\n        assert cell.metadata == {\"key\": \"value\"}, cell.source\n\n\ndef test_jupyter_cell_is_not_split():\n    text = \"\"\"Here we have a markdown\nfile with a jupyter code cell\n\n```python\n1 + 1\n\n\n2 + 2\n```\n\nthe code cell should become a Jupyter cell.\n\"\"\"\n    nb = jupytext.reads(text, \"md\")\n    assert nb.cells[0].cell_type == \"markdown\"\n    compare(\n        nb.cells[0].source,\n        \"\"\"Here we have a markdown\nfile with a jupyter code cell\"\"\",\n    )\n\n    assert nb.cells[1].cell_type == \"code\"\n    compare(\n        nb.cells[1].source,\n        \"\"\"1 + 1\n\n\n2 + 2\"\"\",\n    )\n\n    assert nb.cells[2].cell_type == \"markdown\"\n    compare(nb.cells[2].source, \"the code cell should become a Jupyter cell.\")\n    assert len(nb.cells) == 3\n\n\ndef test_indented_code_is_not_split():\n    text = \"\"\"Here we have a markdown\nfile with an indented code cell\n\n    1 + 1\n\n\n    2 + 2\n\nthe code cell should not become a Jupyter cell,\nnor be split into two pieces.\"\"\"\n    nb = jupytext.reads(text, \"md\")\n    compare(nb.cells[0].source, text)\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert len(nb.cells) == 1\n\n\ndef test_non_jupyter_code_is_not_split():\n    text = \"\"\"Here we have a markdown\nfile with a non-jupyter code cell\n\n```{.python}\n1 + 1\n\n\n2 + 2\n```\n\nthe code cell should not become a Jupyter cell,\nnor be split into two pieces.\"\"\"\n    nb = jupytext.reads(text, \"md\")\n    compare(nb.cells[0].source, text)\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert len(nb.cells) == 1\n\n\ndef test_read_markdown_idl(\n    no_jupytext_version_number,\n    text=\"\"\"---\njupyter:\n  kernelspec:\n    display_name: IDL [conda env:gdl] *\n    language: IDL\n    name: conda-env-gdl-idl\n---\n\n# A sample IDL Markdown notebook\n\n```idl\na = 1\n```\n\"\"\",\n):\n    nb = jupytext.reads(text, \"md\")\n    assert len(nb.cells) == 2\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"a = 1\"\n\n    text2 = jupytext.writes(nb, \"md\")\n    compare(text2, text)\n\n\ndef test_read_markdown_IDL(\n    no_jupytext_version_number,\n    text=\"\"\"---\njupyter:\n  kernelspec:\n    display_name: IDL [conda env:gdl] *\n    language: IDL\n    name: conda-env-gdl-idl\n---\n\n# A sample IDL Markdown notebook\n\n```IDL\na = 1\n```\n\"\"\",\n):\n    nb = jupytext.reads(text, \"md\")\n    assert len(nb.cells) == 2\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"a = 1\"\n\n    text2 = jupytext.writes(nb, \"md\")\n    compare(text2, text)\n\n\ndef test_inactive_cell(\n    text=\"\"\"```python active=\"md\"\n# This becomes a raw cell in Jupyter\n```\n\"\"\",\n    expected=new_notebook(cells=[new_raw_cell(\"# This becomes a raw cell in Jupyter\", metadata={\"active\": \"md\"})]),\n):\n    nb = jupytext.reads(text, \"md\")\n    compare_notebooks(nb, expected)\n    text2 = jupytext.writes(nb, \"md\")\n    compare(text2, text)\n\n\ndef test_inactive_cell_using_tag(\n    text=\"\"\"```python tags=[\"active-md\"]\n# This becomes a raw cell in Jupyter\n```\n\"\"\",\n    expected=new_notebook(cells=[new_raw_cell(\"# This becomes a raw cell in Jupyter\", metadata={\"tags\": [\"active-md\"]})]),\n):\n    nb = jupytext.reads(text, \"md\")\n    compare_notebooks(nb, expected)\n    text2 = jupytext.writes(nb, \"md\")\n    compare(text2, text)\n\n\ndef test_inactive_cell_using_noeval(\n    text=\"\"\"This is text\n\n```python .noeval\n# This is python code.\n# It should not become a code cell\n```\n\"\"\",\n):\n    expected = new_notebook(cells=[new_markdown_cell(text[:-1])])\n    nb = jupytext.reads(text, \"md\")\n    compare_notebooks(nb, expected)\n    text2 = jupytext.writes(nb, \"md\")\n    compare(text2, text)\n\n\ndef test_noeval_followed_by_code_works(\n    text=\"\"\"```python .noeval\n# Not a code cell in Jupyter\n```\n\n```python\n1 + 1\n```\n\"\"\",\n    expected=new_notebook(\n        cells=[\n            new_markdown_cell(\n                \"\"\"```python .noeval\n# Not a code cell in Jupyter\n```\"\"\"\n            ),\n            new_code_cell(\"1 + 1\"),\n        ]\n    ),\n):\n    nb = jupytext.reads(text, \"md\")\n    compare_notebooks(nb, expected)\n    text2 = jupytext.writes(nb, \"md\")\n    compare(text2, text)\n\n\ndef test_markdown_cell_with_code_works(\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\n                \"\"\"```python\n1 + 1\n```\"\"\"\n            )\n        ]\n    ),\n):\n    text = jupytext.writes(nb, \"md\")\n    nb2 = jupytext.reads(text, \"md\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_markdown_cell_with_noeval_code_works(\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\n                \"\"\"```python .noeval\n1 + 1\n```\"\"\"\n            )\n        ]\n    ),\n):\n    text = jupytext.writes(nb, \"md\")\n    nb2 = jupytext.reads(text, \"md\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_two_markdown_cell_with_code_works(\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\n                \"\"\"```python\n1 + 1\n```\"\"\"\n            ),\n            new_markdown_cell(\n                \"\"\"```python\n2 + 2\n```\"\"\"\n            ),\n        ]\n    ),\n):\n    text = jupytext.writes(nb, \"md\")\n    nb2 = jupytext.reads(text, \"md\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_two_markdown_cell_with_no_language_code_works(\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\n                \"\"\"```\n1 + 1\n```\"\"\"\n            ),\n            new_markdown_cell(\n                \"\"\"```\n2 + 2\n```\"\"\"\n            ),\n        ]\n    ),\n):\n    text = jupytext.writes(nb, \"md\")\n    nb2 = jupytext.reads(text, \"md\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_markdown_cell_with_code_inside_multiline_string_419(\n    text='''```python\nreadme = \"\"\"\nabove\n\n```python\nx = 2\n```\n\nbelow\n\"\"\"\n```\n''',\n):\n    \"\"\"A code cell containing triple backticks is converted to a code cell encapsulated with four backticks\"\"\"\n    nb = jupytext.reads(text, \"md\")\n    compare(jupytext.writes(nb, \"md\"), \"`\" + text[:-1] + \"`\\n\")\n    assert len(nb.cells) == 1\n\n\ndef test_notebook_with_python3_magic(\n    no_jupytext_version_number,\n    nb=new_notebook(\n        metadata={\n            \"kernelspec\": {\n                \"display_name\": \"Python 3\",\n                \"language\": \"python\",\n                \"name\": \"python3\",\n            }\n        },\n        cells=[\n            new_code_cell(\"%%python2\\na = 1\\nprint a\"),\n            new_code_cell(\"%%python3\\nb = 2\\nprint(b)\"),\n        ],\n    ),\n    text=\"\"\"---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n```python2\na = 1\nprint a\n```\n\n```python3\nb = 2\nprint(b)\n```\n\"\"\",\n):\n    md = jupytext.writes(nb, \"md\")\n    compare(md, text)\n\n    nb2 = jupytext.reads(md, \"md\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_update_metadata_filter(\n    no_jupytext_version_number,\n    org=\"\"\"---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  extra:\n    key: value\n---\n\"\"\",\n    target=\"\"\"---\njupyter:\n  extra:\n    key: value\n  jupytext:\n    notebook_metadata_filter: extra\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\"\"\",\n):\n    nb = jupytext.reads(org, \"md\")\n    text = jupytext.writes(nb, \"md\")\n    compare(text, target)\n\n\ndef test_update_metadata_filter_2(\n    no_jupytext_version_number,\n    org=\"\"\"---\njupyter:\n  jupytext:\n    notebook_metadata_filter: -extra\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  extra:\n    key: value\n---\n\"\"\",\n    target=\"\"\"---\njupyter:\n  jupytext:\n    notebook_metadata_filter: -extra\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\"\"\",\n):\n    nb = jupytext.reads(org, \"md\")\n    text = jupytext.writes(nb, \"md\")\n    compare(text, target)\n\n\ndef test_custom_metadata(\n    no_jupytext_version_number,\n    nb=new_notebook(\n        metadata={\n            \"author\": \"John Doe\",\n            \"title\": \"Some serious math\",\n            \"jupytext\": {\"notebook_metadata_filter\": \"title,author\"},\n            \"kernelspec\": {\n                \"display_name\": \"Python 3\",\n                \"language\": \"python\",\n                \"name\": \"python3\",\n            },\n        }\n    ),\n    md=\"\"\"---\njupyter:\n  author: John Doe\n  jupytext:\n    notebook_metadata_filter: title,author\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  title: Some serious math\n---\n\"\"\",\n):\n    \"\"\"Here we test the addition of custom metadata, cf. https://github.com/mwouts/jupytext/issues/469\"\"\"\n    md2 = jupytext.writes(nb, \"md\")\n    compare(md2, md)\n    nb2 = jupytext.reads(md, \"md\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_hide_notebook_metadata(\n    no_jupytext_version_number,\n    nb=new_notebook(\n        metadata={\n            \"jupytext\": {\"hide_notebook_metadata\": True},\n            \"kernelspec\": {\n                \"display_name\": \"Python 3\",\n                \"language\": \"python\",\n                \"name\": \"python3\",\n            },\n        }\n    ),\n    md=\"\"\"<!--\n\n---\njupyter:\n  jupytext:\n    hide_notebook_metadata: true\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n---\n\n-->\n\"\"\",\n):\n    \"\"\"Test the hide_notebook_metadata option\"\"\"\n    md2 = jupytext.writes(nb, \"md\")\n    compare(md2, md)\n    nb2 = jupytext.reads(md, \"md\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_notebook_with_empty_header_1070(\n    md=\"\"\"---\n\n---\n\nThis file has empty frontmatter.\n\"\"\",\n):\n    nb = jupytext.reads(md, fmt=\"md:markdown\")\n    md2 = jupytext.writes(nb, \"md\")\n    compare(md2, md)\n    nb2 = jupytext.reads(md, \"md\")\n    compare_notebooks(nb2, nb)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_matlab.py",
    "content": "from nbformat.v4.nbbase import new_code_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks\n\n\ndef test_hide_code_tag(\n    no_jupytext_version_number,\n    nb=new_notebook(\n        metadata={\"jupytext\": {\"main_language\": \"matlab\"}},\n        cells=[new_code_cell(\"1 + 1\", metadata={\"tags\": [\"hide_code\"]})],\n    ),\n    text=\"\"\"% %% tags=[\"hide_code\"]\n1 + 1\n\"\"\",\n):\n    text2 = jupytext.writes(nb, \"m\")\n    compare(text2, text)\n    nb2 = jupytext.reads(text, \"m\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_hide_code_tag_percent_format(\n    no_jupytext_version_number,\n    nb=new_notebook(\n        metadata={\"jupytext\": {\"main_language\": \"matlab\"}},\n        cells=[new_code_cell(\"1 + 1\", metadata={\"tags\": [\"hide_code\"]})],\n    ),\n    text=\"\"\"% %% tags=[\"hide_code\"]\n1 + 1\n\"\"\",\n):\n    text2 = jupytext.writes(nb, \"m:percent\")\n    compare(text2, text)\n    nb2 = jupytext.reads(text, \"m:percent\")\n    compare_notebooks(nb2, nb)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_nomarker.py",
    "content": "import os\n\nimport pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nfrom jupytext import reads, write, writes\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.combine import combine_inputs_with_outputs\nfrom jupytext.compare import compare\n\n\ndef test_write_reload_simple_notebook():\n    nb1 = new_notebook(\n        cells=[\n            new_markdown_cell(\"A markdown cell\", metadata={\"md\": \"value\"}),\n            new_code_cell(\"1 + 1\"),\n            new_markdown_cell(\"A markdown cell\", metadata={\"md\": \"value\"}),\n            new_code_cell(\n                \"\"\"def f(x):\n    return x\"\"\",\n                metadata={\"md\": \"value\"},\n            ),\n            new_markdown_cell(\"A markdown cell\", metadata={\"md\": \"value\"}),\n            new_code_cell(\n                \"\"\"def g(x):\n    return x\n\n\ndef h(x):\n    return x\n\"\"\",\n                metadata={\"md\": \"value\"},\n            ),\n        ]\n    )\n\n    text = writes(nb1, \"py:nomarker\")\n    nb2 = reads(text, \"py:nomarker\")\n    nb2 = combine_inputs_with_outputs(nb2, nb1, \"py:nomarker\")\n    nb2.metadata.pop(\"jupytext\")\n\n    assert len(nb2.cells) == 7\n    nb1.cells = nb1.cells[:5]\n    nb2.cells = nb2.cells[:5]\n    compare(nb2, nb1)\n\n    with pytest.warns(DeprecationWarning, match=\"nomarker\"):\n        text = writes(nb2, \"py:bare\")\n    with pytest.warns(DeprecationWarning, match=\"nomarker\"):\n        nb3 = reads(text, \"py:bare\")\n    with pytest.warns(DeprecationWarning, match=\"nomarker\"):\n        nb3 = combine_inputs_with_outputs(nb3, nb2, \"py:bare\")\n    nb3.metadata.pop(\"jupytext\")\n\n    compare(nb3, nb2)\n\n\ndef test_jupytext_cli_bare(tmpdir):\n    tmp_py = str(tmpdir.join(\"test.py\"))\n    tmp_ipynb = str(tmpdir.join(\"test.ipynb\"))\n    write(new_notebook(cells=[new_code_cell(\"1 + 1\")]), tmp_ipynb)\n    with pytest.warns(DeprecationWarning, match=\"nomarker\"):\n        jupytext_cli([tmp_ipynb, \"--to\", \"py:bare\"])\n    assert os.path.isfile(tmp_py)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_ocaml.py",
    "content": "from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks\n\n\ndef test_read_simple_code(\n    no_jupytext_version_number,\n    ml=\"\"\"(* %% *)\nlet sum x y = x + y\n\"\"\",\n    nb=new_notebook(\n        cells=[\n            new_code_cell(\"\"\"let sum x y = x + y\"\"\"),\n        ]\n    ),\n):\n    nb2 = jupytext.reads(ml, \"ml:percent\")\n    compare_notebooks(nb2, nb)\n    ml2 = jupytext.writes(nb, \"ml:percent\")\n    compare(ml2, ml)\n\n\ndef test_read_simple_markdown(\n    no_jupytext_version_number,\n    ml=\"\"\"(* %% [markdown] *)\n(* # Example of an OCaml notebook *)\n\"\"\",\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\"# Example of an OCaml notebook\"),\n        ]\n    ),\n):\n    nb2 = jupytext.reads(ml, \"ml:percent\")\n    compare_notebooks(nb2, nb)\n    ml2 = jupytext.writes(nb, \"ml:percent\")\n    compare(ml2, ml)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_percent.py",
    "content": "import os\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import (\n    new_code_cell,\n    new_markdown_cell,\n    new_notebook,\n    new_raw_cell,\n)\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks, notebook_model\n\n\ndef test_read_simple_file(\n    script=\"\"\"# ---\n# title: Simple file\n# ---\n\n# %% [markdown]\n# This is a markdown cell\n\n# %% [md]\n# This is also a markdown cell\n\n# %% [raw]\n# This is a raw cell\n\n# %%% sub-cell title\n# This is a sub-cell\n\n# %%%% sub-sub-cell title\n# This is a sub-sub-cell\n\n# %% And now a code cell\n1 + 2 + 3 + 4\n5\n6\n# %%magic # this is a commented magic, not a cell\n\n7\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py:percent\")\n    compare_notebooks(\n        new_notebook(\n            cells=[\n                new_raw_cell(\"---\\ntitle: Simple file\\n---\"),\n                new_markdown_cell(\"This is a markdown cell\"),\n                new_markdown_cell(\"This is also a markdown cell\", metadata={\"region_name\": \"md\"}),\n                new_raw_cell(\"This is a raw cell\"),\n                new_code_cell(\n                    \"# This is a sub-cell\",\n                    metadata={\"title\": \"sub-cell title\", \"cell_depth\": 1},\n                ),\n                new_code_cell(\n                    \"# This is a sub-sub-cell\",\n                    metadata={\"title\": \"sub-sub-cell title\", \"cell_depth\": 2},\n                ),\n                new_code_cell(\n                    \"\"\"1 + 2 + 3 + 4\n5\n6\n%%magic # this is a commented magic, not a cell\n\n7\"\"\",\n                    metadata={\"title\": \"And now a code cell\"},\n                ),\n            ]\n        ),\n        nb,\n    )\n\n    script2 = jupytext.writes(nb, \"py:percent\")\n    compare(script2, script)\n\n\ndef test_read_cell_with_metadata(\n    script=\"\"\"# %% a code cell with parameters {\"tags\": [\"parameters\"]}\na = 3\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py:percent\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n    assert nb.cells[0].source == \"a = 3\"\n    assert nb.cells[0].metadata == {\n        \"title\": \"a code cell with parameters\",\n        \"tags\": [\"parameters\"],\n    }\n\n    script2 = jupytext.writes(nb, \"py:percent\")\n    compare(script2, script)\n\n\ndef test_read_nbconvert_script(\n    script=\"\"\"\n# coding: utf-8\n\n# A markdown cell\n\n# In[1]:\n\n\nimport pandas as pd\n\npd.options.display.max_rows = 6\npd.options.display.max_columns = 20\n\n\n# Another markdown cell\n\n# In[2]:\n\n\n1 + 1\n\n\n# Again, a markdown cell\n\n# In[33]:\n\n\n2 + 2\n\n\n# <codecell>\n\n\n3 + 3\n\"\"\",\n):\n    assert jupytext.formats.guess_format(script, \".py\")[0] == \"percent\"\n    nb = jupytext.reads(script, \".py\")\n    assert len(nb.cells) == 5\n\n\ndef test_read_remove_blank_lines(\n    script=\"\"\"# %%\nimport pandas as pd\n\n# %% Display a data frame\ndf = pd.DataFrame({'A': [1, 2], 'B': [3, 4]},\n                  index=pd.Index(['x0', 'x1'], name='x'))\ndf\n\n# %% Pandas plot {\"tags\": [\"parameters\"]}\ndf.plot(kind='bar')\n\n\n# %% sample class\nclass MyClass:\n    pass\n\n\n# %% a function\ndef f(x):\n    return 42 * x\n\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    assert len(nb.cells) == 5\n    for i in range(5):\n        assert nb.cells[i].cell_type == \"code\"\n        assert not nb.cells[i].source.startswith(\"\\n\")\n        assert not nb.cells[i].source.endswith(\"\\n\")\n\n    script2 = jupytext.writes(nb, \"py:percent\")\n    compare(script2, script)\n\n\ndef test_no_crash_on_square_bracket(\n    script=\"\"\"# %% In [2]\nprint('Hello')\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    script2 = jupytext.writes(nb, \"py:percent\")\n    compare(script2, script)\n\n\ndef test_nbconvert_cell(\n    script=\"\"\"# In[2]:\nprint('Hello')\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    script2 = jupytext.writes(nb, \"py:percent\")\n    expected = \"\"\"# %%\nprint('Hello')\n\"\"\"\n    compare(script2, expected)\n\n\ndef test_nbformat_v3_nbpy_cell(\n    script=\"\"\"# <codecell>\nprint('Hello')\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py\")\n    script2 = jupytext.writes(nb, \"py:percent\")\n    expected = \"\"\"# %%\nprint('Hello')\n\"\"\"\n    compare(script2, expected)\n\n\ndef test_multiple_empty_cells():\n    nb = new_notebook(\n        cells=[new_code_cell(), new_code_cell(), new_code_cell()],\n        metadata={\"jupytext\": {\"notebook_metadata_filter\": \"-all\"}},\n    )\n    text = jupytext.writes(nb, \"py:percent\")\n    expected = \"\"\"# %%\n\n# %%\n\n# %%\n\"\"\"\n    compare(text, expected)\n    nb2 = jupytext.reads(text, \"py:percent\")\n    nb2.metadata = nb.metadata\n    compare_notebooks(nb2, nb)\n\n\ndef test_first_cell_markdown_191():\n    text = \"\"\"# %% [markdown]\n# Docstring\n\n# %%\nfrom math import pi\n\n# %% [markdown]\n# Another markdown cell\n\"\"\"\n\n    nb = jupytext.reads(text, \"py\")\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[2].cell_type == \"markdown\"\n\n\ndef test_multiline_comments_in_markdown_1():\n    text = \"\"\"# %% [markdown]\n'''\na\nlong\ncell\n'''\n\"\"\"\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"a\\nlong\\ncell\"\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_multiline_comments_in_markdown_2():\n    text = '''# %% [markdown]\n\"\"\"\na\nlong\ncell\n\"\"\"\n'''\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"a\\nlong\\ncell\"\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_multiline_comments_format_option():\n    text = '''# %% [markdown]\n\"\"\"\na\nlong\ncell\n\"\"\"\n'''\n    nb = new_notebook(\n        cells=[new_markdown_cell(\"a\\nlong\\ncell\")],\n        metadata={\"jupytext\": {\"cell_markers\": '\"\"\"', \"notebook_metadata_filter\": \"-all\"}},\n    )\n    py = jupytext.writes(nb, \"py:percent\")\n    compare(py, text)\n\n\ndef test_multiline_comments_in_raw_cell():\n    text = '''# %% [raw]\n\"\"\"\nsome\ntext\n\"\"\"\n'''\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"some\\ntext\"\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_multiline_comments_in_markdown_cell_no_line_return():\n    text = '''# %% [markdown]\n\"\"\"a\nlong\ncell\"\"\"\n'''\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"a\\nlong\\ncell\"\n\n\ndef test_multiline_comments_in_markdown_cell_is_robust_to_additional_cell_marker():\n    text = '''# %% [markdown]\n\"\"\"\nsome text, and a fake cell marker\n# %% [raw]\n\"\"\"\n'''\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"some text, and a fake cell marker\\n# %% [raw]\"\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\n@pytest.mark.asyncio\nasync def test_cell_markers_option_in_contents_manager(tmpdir, cm):\n    tmp_ipynb = tmpdir / \"notebook.ipynb\"\n    tmp_py = tmpdir / \"notebook.py\"\n\n    cm.root_dir = str(tmpdir)\n\n    nb = new_notebook(\n        cells=[new_code_cell(\"1 + 1\"), new_markdown_cell(\"a\\nlong\\ncell\")],\n        metadata={\n            \"jupytext\": {\n                \"formats\": \"ipynb,py:percent\",\n                \"notebook_metadata_filter\": \"-all\",\n                \"cell_markers\": \"'''\",\n            }\n        },\n    )\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_py)\n\n    with open(tmp_py) as fp:\n        text = fp.read()\n\n    compare(\n        text,\n        \"\"\"# %%\n1 + 1\n\n# %% [markdown]\n'''\na\nlong\ncell\n'''\n\"\"\",\n    )\n\n    nb2 = jupytext.read(tmp_py)\n    compare_notebooks(nb, nb2)\n\n\n@pytest.mark.asyncio\nasync def test_cell_markers_in_config(tmpdir, python_notebook, cm):\n    (tmpdir / \"jupytext.toml\").write('''cell_markers = '\"\"\"'\\n''')\n\n    cm.root_dir = str(tmpdir)\n    nb = python_notebook\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,py:percent\"}\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    text = (tmpdir / \"notebook.py\").read()\n    assert (\n        '''# %% [markdown]\n\"\"\"\nA short notebook\n\"\"\"\n'''\n        in text\n    )\n\n    nb2 = jupytext.read(tmpdir / \"notebook.py\")\n    compare_notebooks(nb, nb2)\n\n\n@pytest.mark.asyncio\nasync def test_cell_markers_in_contents_manager(tmpdir, cm):\n    tmp_ipynb = tmpdir / \"notebook.ipynb\"\n    tmp_py = tmpdir / \"notebook.py\"\n\n    cm.root_dir = str(tmpdir)\n    cm.cell_markers = \"'''\"\n\n    nb = new_notebook(\n        cells=[new_code_cell(\"1 + 1\"), new_markdown_cell(\"a\\nlong\\ncell\")],\n        metadata={\n            \"jupytext\": {\n                \"formats\": \"ipynb,py:percent\",\n                \"notebook_metadata_filter\": \"-all\",\n            }\n        },\n    )\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_py)\n\n    with open(tmp_py) as fp:\n        text = fp.read()\n\n    compare(\n        text,\n        \"\"\"# %%\n1 + 1\n\n# %% [markdown]\n'''\na\nlong\ncell\n'''\n\"\"\",\n    )\n\n    nb2 = jupytext.read(tmp_py)\n    compare_notebooks(nb, nb2)\n\n\n@pytest.mark.asyncio\nasync def test_cell_markers_in_contents_manager_does_not_impact_light_format(tmpdir, cm):\n    tmp_ipynb = tmpdir / \"notebook.ipynb\"\n    tmp_py = tmpdir / \"notebook.py\"\n\n    cm.root_dir = str(tmpdir)\n    cm.cell_markers = \"'''\"\n\n    nb = new_notebook(\n        cells=[new_code_cell(\"1 + 1\"), new_markdown_cell(\"a\\nlong\\ncell\")],\n        metadata={\n            \"jupytext\": {\n                \"formats\": \"ipynb,py:light\",\n                \"notebook_metadata_filter\": \"-all\",\n            }\n        },\n    )\n    with pytest.warns(UserWarning, match=\"Ignored cell markers\"):\n        await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_py)\n\n    with open(tmp_py) as fp:\n        text = fp.read()\n\n    compare(\n        text,\n        \"\"\"1 + 1\n\n# a\n# long\n# cell\n\"\"\",\n    )\n\n    nb2 = jupytext.read(tmp_py)\n    compare_notebooks(nb, nb2)\n\n\ndef test_single_triple_quote_works(\n    no_jupytext_version_number,\n    text='''# ---\n# jupyter:\n#   jupytext:\n#     cell_markers: '\"\"\"'\n#     formats: ipynb,py:percent\n#     text_representation:\n#       extension: .py\n#       format_name: percent\n# ---\n\n# %%\nprint(\"hello\")\n''',\n    notebook=new_notebook(cells=[new_code_cell('print(\"hello\")')]),\n):\n    compare_notebooks(jupytext.reads(text, \"py\"), notebook)\n\n\ndef test_docstring_with_quadruple_quote(\n    nb=new_notebook(\n        cells=[\n            new_code_cell(\n                '''def fun_1(df):\n  \"\"\"\"\n  docstring starting with 4 double quotes and ending with 3\n  \"\"\"\n  return df'''\n            ),\n            new_code_cell(\n                '''def fun_2(df):\n  \"\"\"\n  docstring\n  \"\"\"\n  return df'''\n            ),\n        ]\n    ),\n):\n    \"\"\"Reproduces https://github.com/mwouts/jupytext/issues/460\"\"\"\n    py = jupytext.writes(nb, \"py:percent\")\n    nb2 = jupytext.reads(py, \"py\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_cell_marker_has_same_indentation_as_code(\n    text=\"\"\"# %%\nif __name__ == '__main__':\n    print(1)\n\n    # %%\n    # INDENTED COMMENT\n    print(2)\n\"\"\",\n    nb_expected=new_notebook(\n        cells=[\n            new_code_cell(\n                \"\"\"if __name__ == '__main__':\n    print(1)\"\"\"\n            ),\n            new_code_cell(\n                \"\"\"    # INDENTED COMMENT\n    print(2)\"\"\"\n            ),\n        ]\n    ),\n):\n    \"\"\"The cell marker should have the same indentation as the first code line. See issue #562\"\"\"\n    nb_actual = jupytext.reads(text, fmt=\"py:percent\")\n    compare_notebooks(nb_actual, nb_expected)\n    text_actual = jupytext.writes(nb_actual, fmt=\"py:percent\")\n    compare(text_actual, text)\n\n\n@pytest.mark.parametrize(\"space_in_gonb\", [False, True])\ndef test_read_simple_gonb_cell_with_double_percent(\n    space_in_gonb,\n    go_percent=\"\"\"// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Go (gonb)\n//     language: go\n//     name: gonb\n// ---\n\n// %%\n//gonb:%%\nfmt.Printf(\"Hello World!\")\n\"\"\",\n):\n    \"\"\"The cell marker should have the same indentation as the first code line. See issue #562\"\"\"\n    if space_in_gonb:\n        go_percent = go_percent.replace(\"//gonb:%%\", \"// gonb:%%\")\n    nb = jupytext.reads(go_percent, fmt=\"go:percent\")\n    assert len(nb.cells) == 1\n    (cell,) = nb.cells\n    assert cell.cell_type == \"code\", cell.cell_type\n    assert (\n        cell.source\n        == \"\"\"%%\nfmt.Printf(\"Hello World!\")\"\"\"\n    )\n\n\ndef test_write_simple_gonb_cell_with_double_percent(\n    no_jupytext_version_number,\n    go_percent=\"\"\"// ---\n// jupyter:\n//   kernelspec:\n//     display_name: Go (gonb)\n//     language: go\n//     name: gonb\n// ---\n\n// %%\n//gonb:%%\nfmt.Printf(\"Hello World!\")\n\"\"\",\n):\n    \"\"\"The cell marker should have the same indentation as the first code line. See issue #562\"\"\"\n    nb = jupytext.reads(go_percent, fmt=\"go:percent\")\n    go = jupytext.writes(nb, fmt=\"go:percent\")\n    compare(go, go_percent)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_python.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import (\n    new_code_cell,\n    new_markdown_cell,\n    new_notebook,\n    new_raw_cell,\n)\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks\n\n\ndef test_read_simple_file(\n    pynb=\"\"\"# ---\n# title: Simple file\n# ---\n\n# Here we have some text\n# And below we have some python code\n\ndef f(x):\n    return x+1\n\n\ndef h(y):\n    return y-1\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    assert len(nb.cells) == 4\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: Simple file\\n---\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"Here we have some text\\nAnd below we have some python code\"\n    assert nb.cells[2].cell_type == \"code\"\n    compare(\n        nb.cells[2].source,\n        \"\"\"def f(x):\n    return x+1\"\"\",\n    )\n    assert nb.cells[3].cell_type == \"code\"\n    compare(\n        nb.cells[3].source,\n        \"\"\"def h(y):\n    return y-1\"\"\",\n    )\n\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_read_less_simple_file(\n    pynb=\"\"\"# ---\n# title: Less simple file\n# ---\n\n# Here we have some text\n# And below we have some python code\n\n# This is a comment about function f\ndef f(x):\n    return x+1\n\n\n# And a comment on h\ndef h(y):\n    return y-1\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n\n    assert len(nb.cells) == 4\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: Less simple file\\n---\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"Here we have some text\\nAnd below we have some python code\"\n    assert nb.cells[2].cell_type == \"code\"\n    compare(\n        nb.cells[2].source,\n        \"# This is a comment about function f\\ndef f(x):\\n    return x+1\",\n    )\n    assert nb.cells[3].cell_type == \"code\"\n    compare(nb.cells[3].source, \"\"\"# And a comment on h\\ndef h(y):\\n    return y-1\"\"\")\n\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_indented_comment(\n    text=\"\"\"def f():\n    return 1\n\n    # f returns 1\n\n\ndef g():\n    return 2\n\n\n# h returns 3\ndef h():\n    return 3\n\"\"\",\n    ref=new_notebook(\n        cells=[\n            new_code_cell(\n                \"\"\"def f():\n    return 1\n\n    # f returns 1\"\"\"\n            ),\n            new_code_cell(\"def g():\\n    return 2\"),\n            new_code_cell(\"# h returns 3\\ndef h():\\n    return 3\"),\n        ]\n    ),\n):\n    nb = jupytext.reads(text, \"py\")\n    compare_notebooks(nb, ref)\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_non_pep8(\n    text=\"\"\"def f():\n    return 1\ndef g():\n    return 2\n\ndef h():\n    return 3\n\"\"\",\n    ref=new_notebook(\n        cells=[\n            new_code_cell(\n                \"def f():\\n    return 1\\ndef g():\\n    return 2\",\n                metadata={\"lines_to_next_cell\": 1},\n            ),\n            new_code_cell(\"def h():\\n    return 3\"),\n        ]\n    ),\n):\n    nb = jupytext.reads(text, \"py\")\n    compare_notebooks(nb, ref)\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_read_non_pep8_file(\n    pynb=\"\"\"# ---\n# title: Non-pep8 file\n# ---\n\n# This file is non-pep8 as the function below has\n# two consecutive blank lines in its body\n\ndef f(x):\n\n\n    return x+1\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: Non-pep8 file\\n---\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"This file is non-pep8 as the function below has\\ntwo consecutive blank lines in its body\"\n    assert nb.cells[2].cell_type == \"code\"\n    compare(nb.cells[2].source, \"def f(x):\\n\\n\\n    return x+1\")\n\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_read_cell_two_blank_lines(\n    pynb=\"\"\"# ---\n# title: cell with two consecutive blank lines\n# ---\n\n# +\na = 1\n\n\na + 2\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: cell with two consecutive blank lines\\n---\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"a = 1\\n\\n\\na + 2\"\n\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_read_cell_explicit_start(\n    pynb=\"\"\"\nimport pandas as pd\n# +\ndef data():\n    return pd.DataFrame({'A': [0, 1]})\n\n\ndata()\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_read_complex_cells(\n    pynb=\"\"\"import pandas as pd\n\n# +\ndef data():\n    return pd.DataFrame({'A': [0, 1]})\n\n\ndata()\n\n# +\ndef data2():\n    return pd.DataFrame({'B': [0, 1]})\n\n\ndata2()\n\n# +\n# Finally we have a cell with only comments\n# This cell should remain a code cell and not get converted\n# to markdown\n\n# + {\"endofcell\": \"--\"}\n# This cell has an enumeration in it that should not\n# match the endofcell marker!\n# - item 1\n# - item 2\n# -\n# --\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    assert len(nb.cells) == 5\n    assert nb.cells[0].cell_type == \"code\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[3].cell_type == \"code\"\n    assert nb.cells[4].cell_type == \"code\"\n    assert (\n        nb.cells[3].source\n        == \"\"\"# Finally we have a cell with only comments\n# This cell should remain a code cell and not get converted\n# to markdown\"\"\"\n    )\n    assert (\n        nb.cells[4].source\n        == \"\"\"# This cell has an enumeration in it that should not\n# match the endofcell marker!\n# - item 1\n# - item 2\n# -\"\"\"\n    )\n\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_read_prev_function(\n    pynb=\"\"\"def test_read_cell_explicit_start_end(pynb='''\nimport pandas as pd\n# +\ndef data():\n    return pd.DataFrame({'A': [0, 1]})\n\n\ndata()\n'''):\n    nb = jupytext.reads(pynb, 'py')\n    pynb2 = jupytext.writes(nb, 'py')\n    compare(pynb2, pynb)\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_read_cell_with_one_blank_line_end(\n    pynb=\"\"\"import pandas\n\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    assert len(nb.cells) == 1\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_read_code_cell_fully_commented(\n    pynb=\"\"\"# +\n# This is a code cell that\n# only contains comments\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n    assert (\n        nb.cells[0].source\n        == \"\"\"# This is a code cell that\n# only contains comments\"\"\"\n    )\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_file_with_two_blank_line_end(\n    pynb=\"\"\"import pandas\n\n\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_one_blank_lines_after_endofcell(\n    pynb=\"\"\"# +\n# This is a code cell with explicit end of cell\n1 + 1\n\n2 + 2\n# -\n\n# This cell is a cell with implicit start\n1 + 1\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"code\"\n    assert (\n        nb.cells[0].source\n        == \"\"\"# This is a code cell with explicit end of cell\n1 + 1\n\n2 + 2\"\"\"\n    )\n    assert nb.cells[1].cell_type == \"code\"\n    assert (\n        nb.cells[1].source\n        == \"\"\"# This cell is a cell with implicit start\n1 + 1\"\"\"\n    )\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_two_cells_with_explicit_start(\n    pynb=\"\"\"# +\n# Cell one\n1 + 1\n\n1 + 1\n\n# +\n# Cell two\n2 + 2\n\n2 + 2\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"code\"\n    assert (\n        nb.cells[0].source\n        == \"\"\"# Cell one\n1 + 1\n\n1 + 1\"\"\"\n    )\n    assert nb.cells[1].cell_type == \"code\"\n    assert (\n        nb.cells[1].source\n        == \"\"\"# Cell two\n2 + 2\n\n2 + 2\"\"\"\n    )\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_escape_start_pattern(\n    pynb=\"\"\"# The code start pattern '# +' can\n# appear in code and markdown cells.\n\n# In markdown cells it is escaped like here:\n# # + {\"sample_metadata\": \"value\"}\n\n# In code cells like this one, it is also escaped\n# # + {\"sample_metadata\": \"value\"}\n1 + 1\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[2].cell_type == \"code\"\n    assert (\n        nb.cells[1].source\n        == \"\"\"In markdown cells it is escaped like here:\n# + {\"sample_metadata\": \"value\"}\"\"\"\n    )\n    assert (\n        nb.cells[2].source\n        == \"\"\"# In code cells like this one, it is also escaped\n# + {\"sample_metadata\": \"value\"}\n1 + 1\"\"\"\n    )\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_dictionary_with_blank_lines_not_broken(\n    pynb=\"\"\"# This is a markdown cell, and below\n# we have a long dictionary with blank lines\n# inside it\n\ndictionary = {\n    'a': 'A',\n    'b': 'B',\n\n    # and the end\n    'z': 'Z'}\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert (\n        nb.cells[0].source\n        == \"\"\"This is a markdown cell, and below\nwe have a long dictionary with blank lines\ninside it\"\"\"\n    )\n    assert (\n        nb.cells[1].source\n        == \"\"\"dictionary = {\n    'a': 'A',\n    'b': 'B',\n\n    # and the end\n    'z': 'Z'}\"\"\"\n    )\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_isolated_cell_with_magic(\n    pynb=\"\"\"# ---\n# title: cell with isolated jupyter magic\n# ---\n\n# A magic command included in a markdown\n# paragraph is code\n#\n# %matplotlib inline\n\n# a code block may start with\n# a magic command, like this one:\n\n# %matplotlib inline\n\n# or that one\n\n# %matplotlib inline\n1 + 1\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n\n    assert len(nb.cells) == 6\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"---\\ntitle: cell with isolated jupyter magic\\n---\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[2].cell_type == \"markdown\"\n    assert nb.cells[3].cell_type == \"code\"\n    assert nb.cells[3].source == \"%matplotlib inline\"\n    assert nb.cells[4].cell_type == \"markdown\"\n    assert nb.cells[5].cell_type == \"code\"\n    assert nb.cells[5].source == \"%matplotlib inline\\n1 + 1\"\n\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_ipython_help_are_commented_297(\n    text=\"\"\"# This is a markdown cell\n# that ends with a question: float?\n\n# The next cell is also a markdown cell,\n# because it has no code marker:\n\n# float?\n\n# +\n# float?\n\n# +\n# float??\n\n# +\n# Finally a question in a code\n# # cell?\n\"\"\",\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\"This is a markdown cell\\nthat ends with a question: float?\"),\n            new_markdown_cell(\"The next cell is also a markdown cell,\\nbecause it has no code marker:\"),\n            new_markdown_cell(\"float?\"),\n            new_code_cell(\"float?\"),\n            new_code_cell(\"float??\"),\n            new_code_cell(\"# Finally a question in a code\\n# cell?\"),\n        ]\n    ),\n):\n    nb2 = jupytext.reads(text, \"py\")\n    compare_notebooks(nb2, nb)\n\n    text2 = jupytext.writes(nb2, \"py\")\n    compare(text2, text)\n\n\ndef test_questions_in_unmarked_cells_are_not_uncommented_297(\n    text=\"\"\"# This cell has no explicit marker\n# question?\n1 + 2\n\"\"\",\n    nb=new_notebook(\n        cells=[\n            new_code_cell(\n                \"# This cell has no explicit marker\\n# question?\\n1 + 2\",\n                metadata={\"comment_questions\": False},\n            )\n        ]\n    ),\n):\n    nb2 = jupytext.reads(text, \"py\")\n    compare_notebooks(nb2, nb)\n\n    text2 = jupytext.writes(nb2, \"py\")\n    compare(text2, text)\n\n\ndef test_read_multiline_comment(\n    pynb=\"\"\"'''This is a multiline\ncomment with \"quotes\", 'single quotes'\n# and comments\nand line breaks\n\n\nand it ends here'''\n\n\n1 + 1\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n\n    assert len(nb.cells) == 2\n    assert nb.cells[0].cell_type == \"code\"\n    assert (\n        nb.cells[0].source\n        == \"\"\"'''This is a multiline\ncomment with \"quotes\", 'single quotes'\n# and comments\nand line breaks\n\n\nand it ends here'''\"\"\"\n    )\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"1 + 1\"\n\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_no_space_after_code(\n    pynb=\"\"\"# -*- coding: utf-8 -*-\n# Markdown cell\n\ndef f(x):\n    return x+1\n\n# And a new cell, and non ascii contênt\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n\n    assert len(nb.cells) == 3\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"Markdown cell\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"def f(x):\\n    return x+1\"\n    assert nb.cells[2].cell_type == \"markdown\"\n    assert nb.cells[2].source == \"And a new cell, and non ascii contênt\"\n\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_read_write_script(\n    pynb=\"\"\"#!/usr/bin/env python\n# coding=utf-8\nprint('Hello world')\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    pynb2 = jupytext.writes(nb, \"py\")\n    compare(pynb2, pynb)\n\n\ndef test_read_write_script_with_metadata_241(\n    no_jupytext_version_number,\n    pynb=\"\"\"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n#   jupytext:\n#     text_representation:\n#       extension: .py\n#       format_name: light\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\na = 2\n\na + 1\n\"\"\",\n):\n    nb = jupytext.reads(pynb, \"py\")\n    assert \"executable\" in nb.metadata[\"jupytext\"]\n    assert \"encoding\" in nb.metadata[\"jupytext\"]\n    pynb2 = jupytext.writes(nb, \"py\")\n\n    compare(pynb2, pynb)\n\n\ndef test_notebook_blank_lines(\n    script=\"\"\"# +\n# This is a comment\n# followed by two variables\na = 3\n\nb = 4\n# -\n\n# New cell is a variable\nc = 5\n\n\n# +\n# Now we have two functions\ndef f(x):\n    return x + x\n\n\ndef g(x):\n    return x + x + x\n\n\n# -\n\n\n# A commented block that is two lines away\n# from previous cell\n\n# A function again\ndef h(x):\n    return x + 1\n\n\n# variable\nd = 6\n\"\"\",\n):\n    notebook = jupytext.reads(script, \"py\")\n    assert len(notebook.cells) >= 6\n    for cell in notebook.cells:\n        lines = cell.source.splitlines()\n        if len(lines) != 1:\n            assert lines[0], cell.source\n            assert lines[-1], cell.source\n\n    script2 = jupytext.writes(notebook, \"py\")\n\n    compare(script2, script)\n\n\ndef test_notebook_two_blank_lines_before_next_cell(\n    script=\"\"\"# +\n# This is cell with a function\n\ndef f(x):\n    return 4\n\n\n# +\n# Another cell\nc = 5\n\n\ndef g(x):\n    return 6\n\n\n# +\n# Final cell\n\n1 + 1\n\"\"\",\n):\n    notebook = jupytext.reads(script, \"py\")\n    assert len(notebook.cells) == 3\n    for cell in notebook.cells:\n        lines = cell.source.splitlines()\n        if len(lines) != 1:\n            assert lines[0]\n            assert lines[-1]\n\n    script2 = jupytext.writes(notebook, \"py\")\n\n    compare(script2, script)\n\n\ndef test_notebook_one_blank_line_between_cells(\n    script=\"\"\"# +\n1 + 1\n\n2 + 2\n\n# +\n3 + 3\n\n4 + 4\n\n# +\n5 + 5\n\n\ndef g(x):\n    return 6\n\n\n# +\n7 + 7\n\n\ndef h(x):\n    return 8\n\n\n# +\ndef i(x):\n    return 9\n\n\n10 + 10\n\n\n# +\ndef j(x):\n    return 11\n\n\n12 + 12\n\"\"\",\n):\n    notebook = jupytext.reads(script, \"py\")\n    for cell in notebook.cells:\n        lines = cell.source.splitlines()\n        assert lines[0]\n        assert lines[-1]\n        assert not cell.metadata, cell.source\n\n    script2 = jupytext.writes(notebook, \"py\")\n\n    compare(script2, script)\n\n\ndef test_notebook_with_magic_and_bash_cells(\n    script=\"\"\"# This is a test for issue #181\n\n# %load_ext line_profiler\n\n# !head -4 data/president_heights.csv\n\"\"\",\n):\n    notebook = jupytext.reads(script, \"py\")\n    for cell in notebook.cells:\n        lines = cell.source.splitlines()\n        assert lines[0]\n        assert lines[-1]\n        assert not cell.metadata, cell.source\n\n    script2 = jupytext.writes(notebook, \"py\")\n\n    compare(script2, script)\n\n\ndef test_notebook_no_line_to_next_cell(\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\"Markdown cell #1\"),\n            new_code_cell(\"%load_ext line_profiler\"),\n            new_markdown_cell(\"Markdown cell #2\"),\n            new_code_cell(\"%lprun -f ...\"),\n            new_markdown_cell(\"Markdown cell #3\"),\n            new_code_cell(\"# And a function!\\ndef f(x):\\n    return 5\"),\n        ]\n    ),\n):\n    script = jupytext.writes(nb, \"py\")\n    nb2 = jupytext.reads(script, \"py\")\n    nb2.metadata.pop(\"jupytext\")\n\n    compare_notebooks(nb2, nb)\n\n\ndef test_notebook_one_blank_line_before_first_markdown_cell(\n    script=\"\"\"\n# This is a markdown cell\n\n1 + 1\n\"\"\",\n):\n    notebook = jupytext.reads(script, \"py\")\n    script2 = jupytext.writes(notebook, \"py\")\n    compare(script2, script)\n\n    assert len(notebook.cells) == 3\n    for cell in notebook.cells:\n        lines = cell.source.splitlines()\n        if len(lines):\n            assert lines[0]\n            assert lines[-1]\n\n\ndef test_read_markdown_cell_with_triple_quote_307(\n    script=\"\"\"# This script test that commented triple quotes '''\n# do not impede the correct identification of Markdown cells\n\n# Here is Markdown cell number 2 '''\n\"\"\",\n):\n    notebook = jupytext.reads(script, \"py\")\n    assert len(notebook.cells) == 2\n    assert notebook.cells[0].cell_type == \"markdown\"\n    assert (\n        notebook.cells[0].source\n        == \"\"\"This script test that commented triple quotes '''\ndo not impede the correct identification of Markdown cells\"\"\"\n    )\n    assert notebook.cells[1].cell_type == \"markdown\"\n    assert notebook.cells[1].source == \"Here is Markdown cell number 2 '''\"\n\n    script2 = jupytext.writes(notebook, \"py\")\n    compare(script2, script)\n\n\ndef test_read_explicit_markdown_cell_with_triple_quote_307(\n    script=\"\"\"# {{{ [md] {\"special\": \"metadata\"}\n# some text '''\n# }}}\n\nprint('hello world')\n\n# {{{ [md] {\"special\": \"metadata\"}\n# more text '''\n# }}}\n\"\"\",\n):\n    notebook = jupytext.reads(script, \"py\")\n    assert len(notebook.cells) == 3\n    assert notebook.cells[0].cell_type == \"markdown\"\n    assert notebook.cells[0].source == \"some text '''\"\n    assert notebook.cells[1].cell_type == \"code\"\n    assert notebook.cells[1].source == \"print('hello world')\"\n    assert notebook.cells[2].cell_type == \"markdown\"\n    assert notebook.cells[2].source == \"more text '''\"\n\n    script2 = jupytext.writes(notebook, \"py\")\n    compare(script2, script)\n\n\ndef test_round_trip_markdown_cell_with_magic():\n    notebook = new_notebook(\n        cells=[new_markdown_cell(\"IPython has magic commands like\\n%quickref\")],\n        metadata={\"jupytext\": {\"main_language\": \"python\"}},\n    )\n    text = jupytext.writes(notebook, \"py\")\n    notebook2 = jupytext.reads(text, \"py\")\n    compare_notebooks(notebook2, notebook)\n\n\ndef test_round_trip_python_with_js_cell():\n    notebook = new_notebook(\n        cells=[\n            new_code_cell(\n                \"\"\"import notebook.nbextensions\nnotebook.nbextensions.install_nbextension('index.js', user=True)\"\"\"\n            ),\n            new_code_cell(\n                \"\"\"%%javascript\nJupyter.utils.load_extensions('jupytext')\"\"\"\n            ),\n        ]\n    )\n    text = jupytext.writes(notebook, \"py\")\n    notebook2 = jupytext.reads(text, \"py\")\n    compare_notebooks(notebook2, notebook)\n\n\ndef test_round_trip_python_with_js_cell_no_cell_metadata():\n    notebook = new_notebook(\n        cells=[\n            new_code_cell(\n                \"\"\"import notebook.nbextensions\nnotebook.nbextensions.install_nbextension('index.js', user=True)\"\"\"\n            ),\n            new_code_cell(\n                \"\"\"%%javascript\nJupyter.utils.load_extensions('jupytext')\"\"\"\n            ),\n        ],\n        metadata={\n            \"jupytext\": {\n                \"notebook_metadata_filter\": \"-all\",\n                \"cell_metadata_filter\": \"-all\",\n            }\n        },\n    )\n    text = jupytext.writes(notebook, \"py\")\n    notebook2 = jupytext.reads(text, \"py\")\n    compare_notebooks(notebook2, notebook)\n\n\ndef test_raw_with_metadata(\n    text=\"\"\"# + key=\"value\" active=\"\"\n# Raw cell\n# # Commented line\n\"\"\",\n    notebook=new_notebook(cells=[new_raw_cell(\"Raw cell\\n# Commented line\", metadata={\"key\": \"value\"})]),\n):\n    nb2 = jupytext.reads(text, \"py\")\n    compare_notebooks(nb2, notebook)\n    text2 = jupytext.writes(nb2, \"py\")\n    compare(text2, text)\n\n\ndef test_raw_with_metadata_2(\n    no_jupytext_version_number,\n    text=\"\"\"# + [raw] key=\"value\"\n# Raw cell\n# # Commented line\n\"\"\",\n    notebook=new_notebook(cells=[new_raw_cell(\"Raw cell\\n# Commented line\", metadata={\"key\": \"value\"})]),\n):\n    nb2 = jupytext.reads(text, \"py\")\n    compare_notebooks(nb2, notebook)\n\n\ndef test_markdown_with_metadata(\n    text=\"\"\"# + [markdown] key=\"value\"\n# Markdown cell\n\"\"\",\n    notebook=new_notebook(cells=[new_markdown_cell(\"Markdown cell\", metadata={\"key\": \"value\"})]),\n):\n    nb2 = jupytext.reads(text, \"py\")\n    compare_notebooks(nb2, notebook)\n    text2 = jupytext.writes(nb2, \"py\")\n    compare(text2, text)\n\n\ndef test_multiline_comments_in_markdown_1():\n    text = \"\"\"# + [markdown]\n'''\na\nlong\ncell\n'''\n\"\"\"\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"a\\nlong\\ncell\"\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_multiline_comments_in_markdown_2():\n    text = '''# + [markdown]\n\"\"\"\na\nlong\ncell\n\"\"\"\n'''\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"a\\nlong\\ncell\"\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_multiline_comments_in_raw_cell():\n    text = '''# + active=\"\"\n\"\"\"\nsome\ntext\n\"\"\"\n'''\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"raw\"\n    assert nb.cells[0].source == \"some\\ntext\"\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_multiline_comments_in_markdown_cell_no_line_return():\n    text = '''# + [md]\n\"\"\"a\nlong\ncell\"\"\"\n'''\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"a\\nlong\\ncell\"\n\n\ndef test_multiline_comments_in_markdown_cell_is_robust_to_additional_cell_marker():\n    text = '''# + [md]\n\"\"\"\nsome text, and a fake cell marker\n# + [raw]\n\"\"\"\n'''\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[0].source == \"some text, and a fake cell marker\\n# + [raw]\"\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_active_tag(\n    text=\"\"\"# + tags=[\"active-py\"]\ninterpreter = 'python'\n\n# + tags=[\"active-ipynb\"]\n# interpreter = 'ipython'\n\"\"\",\n    ref=new_notebook(\n        cells=[\n            new_raw_cell(\"interpreter = 'python'\", metadata={\"tags\": [\"active-py\"]}),\n            new_code_cell(\"interpreter = 'ipython'\", metadata={\"tags\": [\"active-ipynb\"]}),\n        ]\n    ),\n):\n    nb = jupytext.reads(text, \"py\")\n    compare_notebooks(nb, ref)\n    py = jupytext.writes(nb, \"py\")\n    compare(py, text)\n\n\ndef test_indented_bash_command(\n    no_jupytext_version_number,\n    nb=new_notebook(\n        cells=[\n            new_code_cell(\n                \"\"\"try:\n    !echo jo\n    pass\nexcept:\n    pass\"\"\"\n            )\n        ]\n    ),\n    text=\"\"\"try:\n    # !echo jo\n    pass\nexcept:\n    pass\n\"\"\",\n):\n    \"\"\"Reproduces https://github.com/mwouts/jupytext/issues/437\"\"\"\n    py = jupytext.writes(nb, \"py:light\")\n    compare(py, text)\n    nb2 = jupytext.reads(py, \"py\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_two_raw_cells_are_preserved(nb=new_notebook(cells=[new_raw_cell(\"---\\nX\\n---\"), new_raw_cell(\"Y\")])):\n    \"\"\"Test the pattern described at https://github.com/mwouts/jupytext/issues/466\"\"\"\n    py = jupytext.writes(nb, \"py\")\n    nb2 = jupytext.reads(py, \"py\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_no_metadata_on_multiline_decorator(\n    text=\"\"\"import pytest\n\n\n@pytest.mark.parametrize(\n    \"arg\",\n    [\n        'a',\n        'b',\n        'c'\n    ],\n)\ndef test_arg(arg):\n    assert isinstance(arg, str)\n\"\"\",\n):\n    \"\"\"Applying black on the code of jupytext 1.4.2 turns some pytest parameters into multi-lines ones, and\n    causes a few failures in test_pep8.py:test_no_metadata_when_py_is_pep8\"\"\"\n    nb = jupytext.reads(text, \"py\")\n    assert len(nb.cells) == 2\n    for cell in nb.cells:\n        assert cell.cell_type == \"code\"\n    assert nb.cells[0].source == \"import pytest\"\n    assert nb.cells[0].metadata == {}\n\n\n@pytest.mark.parametrize(\n    \"script,cell\",\n    [\n        (\n            \"\"\"if True:\n    # # !rm file 1\n    # !rm file 2\n\"\"\",\n            \"\"\"if True:\n    # !rm file 1\n    !rm file 2\"\"\",\n        ),\n        (\n            \"\"\"# +\nif True:\n    # help?\n    # ?help\n    # # ?help\n    # # help?\n\"\"\",\n            \"\"\"if True:\n    help?\n    ?help\n    # ?help\n    # help?\"\"\",\n        ),\n    ],\n)\ndef test_indented_magic_commands(script, cell):\n    nb = jupytext.reads(script, \"py\")\n    assert len(nb.cells) == 1\n    assert nb.cells[0].cell_type == \"code\"\n    compare(nb.cells[0].source, cell)\n    assert nb.cells[0].metadata == {}\n    compare(jupytext.writes(nb, \"py\"), script)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_rmd.py",
    "content": "import re\nfrom time import sleep\n\nimport nbformat\nimport pytest\nfrom nbformat.v4.nbbase import (\n    new_code_cell,\n    new_markdown_cell,\n    new_notebook,\n    new_raw_cell,\n)\n\nimport jupytext\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.compare import compare, compare_cells, compare_notebooks\n\n\ndef test_read_mostly_py_rmd_file(\n    rmd=\"\"\"---\ntitle: Simple file\n---\n\n```{python, echo=TRUE}\nimport numpy as np\nx = np.arange(0, 2*math.pi, eps)\n```\n\n```{python, echo=TRUE}\nx = np.arange(0,1,eps)\ny = np.abs(x)-.5\n```\n\n```{r}\nls()\n```\n\n```{r, results=\"asis\", magic_args=\"-i x\"}\ncat(stringi::stri_rand_lipsum(3), sep='\\n\\n')\n```\n\"\"\",\n):\n    nb = jupytext.reads(rmd, \"Rmd\")\n    compare_cells(\n        nb.cells,\n        [\n            new_raw_cell(\"---\\ntitle: Simple file\\n---\"),\n            new_code_cell(\n                \"import numpy as np\\nx = np.arange(0, 2*math.pi, eps)\",\n                metadata={\"echo\": True},\n            ),\n            new_code_cell(\"x = np.arange(0,1,eps)\\ny = np.abs(x)-.5\", metadata={\"echo\": True}),\n            new_code_cell(\"%%R\\nls()\"),\n            new_code_cell(\n                \"%%R -i x\\ncat(stringi::stri_rand_lipsum(3), sep='\\n\\n')\",\n                metadata={\"results\": \"asis\"},\n            ),\n        ],\n        compare_ids=False,\n    )\n\n    rmd2 = jupytext.writes(nb, \"Rmd\")\n    rmd2 = re.sub(r\"```{r \", \"```{r, \", rmd2)\n    rmd2 = re.sub(r\"```{python \", \"```{python, \", rmd2)\n    compare(rmd2, rmd)\n\n\ndef test_markdown_cell_with_code_works(\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\n                \"\"\"```python\n1 + 1\n```\"\"\"\n            )\n        ]\n    ),\n):\n    text = jupytext.writes(nb, \"Rmd\")\n    nb2 = jupytext.reads(text, \"Rmd\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_two_markdown_cell_with_code_works(\n    nb=new_notebook(\n        cells=[\n            new_markdown_cell(\n                \"\"\"```python\n1 + 1\n```\"\"\"\n            ),\n            new_markdown_cell(\n                \"\"\"```python\n2 + 2\n```\"\"\"\n            ),\n        ]\n    ),\n):\n    text = jupytext.writes(nb, \"Rmd\")\n    nb2 = jupytext.reads(text, \"Rmd\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_tags_in_rmd(\n    rmd=\"\"\"---\njupyter:\n  jupytext:\n    text_representation:\n      extension: .Rmd\n      format_name: rmarkdown\n      format_version: '1.1'\n      jupytext_version: 1.2.3\n---\n\n```{python tags=c(\"parameters\")}\np = 1\n```\n\"\"\",\n    nb=new_notebook(cells=[new_code_cell(\"p = 1\", metadata={\"tags\": [\"parameters\"]})]),\n):\n    nb2 = jupytext.reads(rmd, \"Rmd\")\n    compare_notebooks(nb2, nb)\n\n\ndef round_trip_cell_metadata(cell_metadata):\n    nb = new_notebook(\n        metadata={\"jupytext\": {\"main_language\": \"python\"}},\n        cells=[new_code_cell(\"1 + 1\", metadata=cell_metadata)],\n    )\n    text = jupytext.writes(nb, \"Rmd\")\n    nb2 = jupytext.reads(text, \"Rmd\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_comma_in_metadata(cell_metadata={\"a\": \"b, c\"}):\n    round_trip_cell_metadata(cell_metadata)\n\n\ndef test_dict_in_metadata(cell_metadata={\"a\": {\"b\": \"c\"}}):\n    round_trip_cell_metadata(cell_metadata)\n\n\ndef test_list_in_metadata(cell_metadata={\"d\": [\"e\"]}):\n    round_trip_cell_metadata(cell_metadata)\n\n\n@pytest.mark.parametrize(\"root_level_metadata_as_raw_cell\", [True, False])\ndef test_root_level_metadata_as_raw_cell(\n    tmpdir,\n    root_level_metadata_as_raw_cell,\n    rmd=\"\"\"---\nauthor: R Markdown document author\ntitle: R Markdown notebook title\n---\n\n```{r}\n1 + 1\n```\n\"\"\",\n):\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    rmd_file = tmpdir.join(\"notebook.Rmd\")\n    cfg_file = tmpdir.join(\"jupytext.toml\")\n\n    cfg_file.write(\"root_level_metadata_as_raw_cell = {}\".format(\"true\" if root_level_metadata_as_raw_cell else \"false\"))\n    rmd_file.write(rmd)\n\n    jupytext_cli([str(rmd_file), \"--to\", \"ipynb\"])\n\n    nb = nbformat.read(str(nb_file), as_version=4)\n\n    if root_level_metadata_as_raw_cell:\n        compare_cells(\n            nb.cells,\n            [\n                new_raw_cell(\n                    \"\"\"---\nauthor: R Markdown document author\ntitle: R Markdown notebook title\n---\"\"\"\n                ),\n                new_code_cell(\"1 + 1\"),\n            ],\n            compare_ids=False,\n        )\n    else:\n        compare_cells(nb.cells, [new_code_cell(\"1 + 1\")], compare_ids=False)\n        assert nb.metadata[\"jupytext\"][\"root_level_metadata\"] == {\n            \"title\": \"R Markdown notebook title\",\n            \"author\": \"R Markdown document author\",\n        }\n\n    # Writing back to Rmd should preserve the original document\n    jupytext_cli([str(nb_file), \"--to\", \"Rmd\"])\n    compare(rmd_file.read(), rmd)\n\n\ndef test_pair_rmd_file_with_cell_tags_and_options(tmpdir, cwd_tmpdir, no_jupytext_version_number):\n    rmd = \"\"\"```{r plot_1, dpi=72}\nplot(3:30)\n```\n\"\"\"\n    rmd_file = tmpdir.join(\"test.Rmd\")\n    rmd_file.write(rmd)\n\n    # Pair Rmd with ipynb\n    jupytext_cli([\"--set-formats\", \"ipynb,Rmd\", \"test.Rmd\"])\n\n    # Wait so that ipynb will be more recent\n    sleep(0.2)\n\n    # Modify the ipynb file\n    nb_file = tmpdir.join(\"test.ipynb\")\n    nb = nbformat.read(nb_file, as_version=4)\n    nb.cells[0].source = \"plot(4:40)\"\n    nb_file.write(nbformat.writes(nb))\n\n    # Sync the two files\n    jupytext_cli([\"--sync\", \"test.Rmd\"])\n\n    # Remove the header\n    rmd2 = rmd_file.read()\n    rmd2 = rmd2.rsplit(\"---\\n\\n\")[1]\n\n    # The new code chunk has the new code, and options are still there\n    compare(rmd2, rmd.replace(\"3\", \"4\"))\n\n\ndef test_apostrophe_in_parameter_1079(\n    rmd=\"\"\"```{python some-name, param=\"Problem's\"}\na = 1\n```\n\"\"\",\n):\n    nb = jupytext.reads(rmd, fmt=\"Rmd\")\n    rmd2 = jupytext.writes(nb, fmt=\"Rmd\")\n    compare(rmd2, rmd)\n    nb2 = jupytext.reads(rmd, fmt=\"Rmd\")\n    compare_notebooks(nb2, nb)\n\n\n@pytest.mark.parametrize(\"line\", [\" #'''\", \"a = 2  #'''\"])\ndef test_commented_triple_quote_1060(line):\n    rmd = f\"\"\"```{{python}}\n{line}\n```\n\n```{{python}}\n# Another cell\n```\n\"\"\"\n    nb = jupytext.reads(rmd, fmt=\"Rmd\")\n    assert nb.cells[0].source == line\n\n    rmd2 = jupytext.writes(nb, fmt=\"Rmd\")\n    compare(rmd2, rmd)\n    nb2 = jupytext.reads(rmd, fmt=\"Rmd\")\n    compare_notebooks(nb2, nb)\n\n\ndef test_bibliography_in_rmd(\n    rmd=\"\"\"Issue #1161\n\nThe bibliography section below should not\nbecome a code cell\n\n```{bibliography}\n```\n\n```{r}\n6\n```\n\"\"\",\n):\n    nb = jupytext.reads(rmd, fmt=\"Rmd\")\n    assert len(nb.cells) == 2, nb.cells\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"6\"\n    rmd2 = jupytext.writes(nb, fmt=\"Rmd\")\n    compare(rmd2, rmd)\n\n\ndef test_non_language_code_fence():\n    \"\"\"\n    This test reproduces the example from issue #1429\n    \"\"\"\n    rmd = \"\"\"# A title\n\n```{index} equations\n```\n\nSome text.\n\n```{python}\na = 10\n```\n\"\"\"\n    nb = jupytext.reads(rmd, fmt=\"Rmd\")\n    assert len(nb.cells) == 2, nb.cells\n    assert nb.cells[0].cell_type == \"markdown\"\n    assert nb.cells[1].cell_type == \"code\"\n    assert nb.cells[1].source == \"a = 10\"\n    rmd2 = jupytext.writes(nb, fmt=\"Rmd\")\n    compare(rmd2, rmd)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_rust.py",
    "content": "from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks\n\n\ndef test_read_magics(text=\"// :vars\\n\"):\n    nb = jupytext.reads(text, \"rs\")\n    compare_notebooks(nb, new_notebook(cells=[new_code_cell(\":vars\")]))\n    compare(jupytext.writes(nb, \"rs\"), text)\n\n\ndef test_read_simple_file(\n    text=\"\"\"println!(\"Hello world\");\neprintln!(\"Hello error\");\nformat!(\"Hello {}\", \"world\")\n\n// A Function\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {0} else {fib(x - 2) + fib(x - 1)}\n}\n\n// This is a\n// Markdown cell\n\n// This is a magic instruction\n// :vars\n\n// This is a rust identifier\n::std::mem::drop\n\"\"\",\n):\n    nb = jupytext.reads(text, \"rs\")\n    compare_notebooks(\n        nb,\n        new_notebook(\n            cells=[\n                new_code_cell(\n                    \"\"\"println!(\"Hello world\");\neprintln!(\"Hello error\");\nformat!(\"Hello {}\", \"world\")\"\"\"\n                ),\n                new_code_cell(\n                    \"\"\"// A Function\npub fn fib(x: i32) -> i32 {\n    if x <= 2 {0} else {fib(x - 2) + fib(x - 1)}\n}\"\"\"\n                ),\n                new_markdown_cell(\"This is a\\nMarkdown cell\"),\n                new_code_cell(\n                    \"\"\"// This is a magic instruction\n:vars\"\"\"\n                ),\n                new_code_cell(\n                    \"\"\"// This is a rust identifier\n::std::mem::drop\"\"\"\n                ),\n            ]\n        ),\n    )\n    compare(jupytext.writes(nb, \"rs\"), text)\n\n\ndef test_read_write_script_with_metadata_241(\n    no_jupytext_version_number,\n    rsnb=\"\"\"#!/usr/bin/env scriptisto\n// ---\n// jupyter:\n//   jupytext:\n//     text_representation:\n//       extension: .rs\n//       format_name: light\n//   kernelspec:\n//     display_name: Rust\n//     language: rust\n//     name: rust\n// ---\n\nlet mut a: i32 = 2;\na += 1;\n\"\"\",\n):\n    nb = jupytext.reads(rsnb, \"rs\")\n    assert \"executable\" in nb.metadata[\"jupytext\"]\n    rsnb2 = jupytext.writes(nb, \"rs\")\n\n    compare(rsnb, rsnb2)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_scheme.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_read_simple_file(\n    script=\"\"\";; ---\n;; title: Simple file\n;; ---\n\n;; Here we have some text\n;; And below we have some code\n\n(define a 35)\n\"\"\",\n):\n    for file_extension in (\"ss\", \"scm\"):\n        nb = jupytext.reads(script, file_extension)\n        assert len(nb.cells) == 3\n        assert nb.cells[0].cell_type == \"raw\"\n        assert nb.cells[0].source == \"---\\ntitle: Simple file\\n---\"\n        assert nb.cells[1].cell_type == \"markdown\"\n        assert nb.cells[1].source == \"Here we have some text\\nAnd below we have some code\"\n        assert nb.cells[2].cell_type == \"code\"\n        compare(nb.cells[2].source, \"(define a 35)\")\n\n        script2 = jupytext.writes(nb, file_extension)\n        compare(script2, script)\n"
  },
  {
    "path": "tests/functional/simple_notebooks/test_read_simple_sphinx.py",
    "content": "import jupytext\nfrom jupytext.compare import compare\n\n\ndef test_read_simple_file(\n    script='''# -*- coding: utf-8 -*-\n\"\"\"\nThis is a markdown cell\n\"\"\"\n\n1 + 2 + 3 + 4\n5\n6\n\n\"\"\n7\n\n#################################\n# Another markdown cell\n\ndef f(x):\n   \"\"\"Sample docstring\"\"\"\n   return 4\n''',\n):\n    nb = jupytext.reads(script, \"py:sphinx\")\n    assert nb.cells[0].cell_type == \"code\"\n    assert nb.cells[0].source == \"%matplotlib inline\"\n\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"This is a markdown cell\"\n\n    assert nb.cells[2].cell_type == \"code\"\n    compare(\n        nb.cells[2].source,\n        \"\"\"1 + 2 + 3 + 4\n5\n6\"\"\",\n    )\n\n    assert nb.cells[3].cell_type == \"code\"\n    assert nb.cells[3].source == \"7\"\n\n    assert nb.cells[4].cell_type == \"markdown\"\n    assert nb.cells[4].source == \"Another markdown cell\"\n\n    assert nb.cells[5].cell_type == \"code\"\n    assert (\n        nb.cells[5].source\n        == '''def f(x):\n   \"\"\"Sample docstring\"\"\"\n   return 4'''\n    )\n    assert len(nb.cells) == 6\n\n    script2 = jupytext.writes(nb, \"py:sphinx\")\n    compare(script2, script)\n\n\ndef test_read_more_complex_file(\n    script=\"\"\"'''This is a markdown cell'''\n\n1 + 2 + 3 + 4\n5\n6\n\n'''\nAnother markdown cell'''\n#################################\n# A third one\n\n'''\nAnother markdown cell'''\n1 + 2 + 3 + 4\n\n# ################################\n# A fifth one\n\n'''And a last one\n'''\n\"\"\",\n):\n    nb = jupytext.reads(script, \"py:sphinx\")\n\n    assert nb.cells[0].cell_type == \"code\"\n    assert nb.cells[0].source == \"%matplotlib inline\"\n\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"This is a markdown cell\"\n\n    assert nb.cells[2].cell_type == \"code\"\n    compare(\n        nb.cells[2].source,\n        \"\"\"1 + 2 + 3 + 4\n5\n6\"\"\",\n    )\n    assert nb.cells[3].cell_type == \"markdown\"\n    assert nb.cells[3].source == \"Another markdown cell\"\n\n    assert nb.cells[4].cell_type == \"markdown\"\n    assert nb.cells[4].source == \"A third one\"\n\n    assert nb.cells[5].cell_type == \"markdown\"\n    assert nb.cells[5].source == \"Another markdown cell\"\n\n    assert nb.cells[6].cell_type == \"code\"\n    assert nb.cells[6].source == \"1 + 2 + 3 + 4\"\n\n    assert nb.cells[7].cell_type == \"markdown\"\n    assert nb.cells[7].source == \"A fifth one\"\n\n    assert nb.cells[8].cell_type == \"markdown\"\n    assert nb.cells[8].source == \"And a last one\"\n\n    assert len(nb.cells) == 9\n\n\ndef test_read_empty_code_cell(\n    script='''\"\"\"\nMarkdown cell\n\"\"\"\n\n\n''',\n):\n    nb = jupytext.reads(script, \"py:sphinx\")\n\n    assert nb.cells[0].cell_type == \"code\"\n    assert nb.cells[0].source == \"%matplotlib inline\"\n\n    assert nb.cells[1].cell_type == \"markdown\"\n    assert nb.cells[1].source == \"Markdown cell\"\n\n    assert nb.cells[2].cell_type == \"code\"\n    assert nb.cells[2].source == \"\"\n\n    assert len(nb.cells) == 3\n\n    assert jupytext.writes(nb, \"py:sphinx\") == script\n"
  },
  {
    "path": "tests/integration/cli/test_cli_pipe.py",
    "content": "import pytest\n\nfrom jupytext.cli import jupytext\n\n\n@pytest.mark.requires_myst\n@pytest.mark.requires_black\ndef test_cli_black_myst(\n    tmp_path,\n    no_jupytext_version_number,\n    text=\"\"\"---\njupytext:\n  formats: md:myst\n  text_representation:\n    extension: .md\n    format_name: myst\n    format_version: 0.13\nkernelspec:\n  display_name: Python 3 (ipykernel)\n  language: python\n  name: python3\n---\n\n# Quantum yield efficiency of photosynthesis\n\n```{code-cell} python\n# I'm some code\nx = 1\n```\n\"\"\",\n):\n    tmp_md = tmp_path / \"notebook.md\"\n    tmp_md.write_text(text)\n\n    jupytext([\"--pipe\", \"black\", str(tmp_md)])\n\n    assert tmp_md.read_text() == text\n"
  },
  {
    "path": "tests/integration/cli/test_execute.py",
    "content": "import shutil\nfrom io import StringIO\nfrom unittest import mock\n\nimport pytest\n\nfrom jupytext import read, reads\nfrom jupytext.cli import jupytext\nfrom jupytext.version import __version__\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.requires_nbconvert\n@pytest.mark.skip_on_windows\ndef test_pipe_nbconvert_execute(tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n\n    with open(tmp_py, \"w\") as fp:\n        fp.write(\n            \"\"\"1 + 2\n\"\"\"\n        )\n\n    jupytext(\n        args=[\n            tmp_py,\n            \"--to\",\n            \"ipynb\",\n            \"--pipe-fmt\",\n            \"ipynb\",\n            \"--pipe\",\n            \"jupyter nbconvert --stdin --stdout --to notebook --execute\",\n        ]\n    )\n\n    nb = read(tmp_ipynb)\n    assert len(nb.cells) == 1\n    assert nb.cells[0].outputs[0][\"data\"] == {\"text/plain\": \"3\"}\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.requires_nbconvert\n@pytest.mark.skip_on_windows\ndef test_pipe_nbconvert_execute_sync(tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n\n    with open(tmp_py, \"w\") as fp:\n        fp.write(\n            \"\"\"1 + 2\n\"\"\"\n        )\n\n    jupytext(\n        args=[\n            tmp_py,\n            \"--set-formats\",\n            \"py,ipynb\",\n            \"--sync\",\n            \"--pipe-fmt\",\n            \"ipynb\",\n            \"--pipe\",\n            \"jupyter nbconvert --stdin --stdout --to notebook --execute\",\n        ]\n    )\n\n    nb = read(tmp_ipynb)\n    assert len(nb.cells) == 1\n    assert nb.cells[0].outputs[0][\"data\"] == {\"text/plain\": \"3\"}\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.requires_nbconvert\n@pytest.mark.skip_on_windows\ndef test_execute(tmpdir, caplog, capsys):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n\n    with open(tmp_py, \"w\") as fp:\n        fp.write(\n            \"\"\"1 + 2\n\"\"\"\n        )\n\n    jupytext(args=[tmp_py, \"--to\", \"ipynb\", \"--execute\"])\n\n    nb = read(tmp_ipynb)\n    assert len(nb.cells) == 1\n    assert nb.cells[0].outputs[0][\"data\"] == {\"text/plain\": \"3\"}\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.requires_nbconvert\ndef test_execute_readme_ok(tmpdir):\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n\n    with open(tmp_md, \"w\") as fp:\n        fp.write(\n            \"\"\"\nA readme with correct instructions\n\n```python\n1 + 2\n```\n\"\"\"\n        )\n\n    jupytext(args=[tmp_md, \"--execute\"])\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.requires_nbconvert\n@pytest.mark.skip_on_windows\ndef test_execute_readme_not_ok(tmpdir):\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n\n    with open(tmp_md, \"w\") as fp:\n        fp.write(\n            \"\"\"\nA readme with incorrect instructions (a is not defined)\n\n```python\na + 1\n```\n\"\"\"\n        )\n\n    import nbconvert\n\n    with pytest.raises(nbconvert.preprocessors.execute.CellExecutionError, match=\"is not defined\"):\n        jupytext(args=[tmp_md, \"--execute\"])\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.requires_nbconvert\n@pytest.mark.skip_on_windows\ndef test_execute_sync(tmpdir, caplog, capsys):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n\n    with open(tmp_py, \"w\") as fp:\n        fp.write(\n            \"\"\"1 + 2\n\"\"\"\n        )\n\n    jupytext(args=[tmp_py, \"--set-formats\", \"py,ipynb\", \"--sync\", \"--execute\"])\n\n    nb = read(tmp_ipynb)\n    assert len(nb.cells) == 1\n    assert nb.cells[0].outputs[0][\"data\"] == {\"text/plain\": \"3\"}\n\n\n@pytest.mark.requires_nbconvert\n@pytest.mark.requires_ir_kernel\n@pytest.mark.skip_on_windows\ndef test_execute_r(tmpdir, caplog, capsys):  # pragma: no cover\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n\n    with open(tmp_md, \"w\") as fp:\n        fp.write(\n            \"\"\"```r\n1 + 2 + 3\n```\n\"\"\"\n        )\n\n    jupytext(args=[tmp_md, \"--to\", \"ipynb\", \"--execute\"])\n\n    nb = read(tmp_ipynb)\n    assert len(nb.cells) == 1\n    assert nb.cells[0].outputs[0][\"data\"][\"text/markdown\"] == \"6\"\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.requires_nbconvert\n@pytest.mark.skip_on_windows\ndef test_execute_in_subfolder(tmpdir, caplog, capsys):\n    subfolder = tmpdir.mkdir(\"subfolder\")\n\n    tmp_csv = str(subfolder.join(\"inputs.csv\"))\n    tmp_py = str(subfolder.join(\"notebook.py\"))\n    tmp_ipynb = str(subfolder.join(\"notebook.ipynb\"))\n\n    with open(tmp_csv, \"w\") as fp:\n        fp.write(\"1\\n2\\n\")\n\n    with open(tmp_py, \"w\") as fp:\n        fp.write(\n            \"\"\"import ast\n\nwith open('inputs.csv') as fp:\n    text = fp.read()\n\nsum(ast.literal_eval(line) for line in text.splitlines())\n\"\"\"\n        )\n\n    jupytext(args=[tmp_py, \"--to\", \"ipynb\", \"--execute\"])\n\n    nb = read(tmp_ipynb)\n    assert len(nb.cells) == 3\n    assert nb.cells[2].outputs[0][\"data\"] == {\"text/plain\": \"3\"}\n\n    tmp2_py = str(tmpdir.mkdir(\"another_folder\").join(\"notebook.py\"))\n    tmp2_ipynb = str(tmpdir.join(\"another_folder\", \"notebook.ipynb\"))\n\n    shutil.copy(tmp_py, tmp2_py)\n\n    # Executing without run-path fails\n    import nbconvert\n\n    with pytest.raises(\n        nbconvert.preprocessors.execute.CellExecutionError,\n        match=\"No such file or directory: 'inputs.csv'\",\n    ):\n        jupytext(args=[tmp2_py, \"--to\", \"ipynb\", \"--execute\"])\n\n    # Raise if folder does not exists\n    with pytest.raises(ValueError, match=\"is not a valid path\"):\n        jupytext(args=[tmp2_py, \"--to\", \"ipynb\", \"--run-path\", \"wrong_path\"])\n\n    # Execute in full path\n    jupytext(args=[tmp2_py, \"--to\", \"ipynb\", \"--run-path\", str(subfolder)])\n    nb = read(tmp2_ipynb)\n    assert len(nb.cells) == 3\n    assert nb.cells[2].outputs[0][\"data\"] == {\"text/plain\": \"3\"}\n\n    # Execute in path relative to notebook dir\n    jupytext(args=[tmp2_py, \"--to\", \"ipynb\", \"--run-path\", \"../subfolder\"])\n    nb = read(tmp2_ipynb)\n    assert len(nb.cells) == 3\n    assert nb.cells[2].outputs[0][\"data\"] == {\"text/plain\": \"3\"}\n\n\n@pytest.fixture()\ndef sample_md_notebook():\n    \"\"\"This is a sample md notebook with an outdated version of Jupytext\n    and no kernel information, to test #908\"\"\"\n    return \"\"\"---\njupyter:\n  jupytext:\n    text_representation:\n      extension: .md\n      format_name: markdown\n      format_version: '1.1'\n      jupytext_version: 1.1.0\n---\n\n```python\n1 + 1\n```\n\"\"\"\n\n\n@pytest.mark.requires_user_kernel_python3\ndef test_execute_text_file_does_update_the_metadata(sample_md_notebook, tmp_path):\n    md_file = tmp_path / \"nb.md\"\n    md_file.write_text(sample_md_notebook)\n\n    jupytext([str(md_file), \"--execute\"])\n\n    new_md_text = md_file.read_text()\n    assert __version__ in new_md_text\n    assert \"kernelspec\" in new_md_text\n\n\n@pytest.mark.requires_user_kernel_python3\ndef test_cat_execute_does_not_update_the_metadata(sample_md_notebook, tmp_path):\n    md_file = tmp_path / \"nb.md\"\n    md_file.write_text(sample_md_notebook)\n\n    # read md notebook on stdin - this does the same as\n    # cat notebook.md | jupytext --execute\n    with open(md_file) as fp, mock.patch(\"sys.stdin\", fp):\n        jupytext([\"--execute\"])\n\n    new_md_text = md_file.read_text()\n    assert __version__ not in new_md_text\n    assert \"kernelspec\" not in new_md_text\n\n\n@pytest.mark.requires_user_kernel_python3\n@pytest.mark.skip_on_windows\n@pytest.mark.filterwarnings(\"ignore\")\ndef test_utf8_out_331(capsys, caplog):\n    py = \"from IPython.core.display import HTML; HTML(u'\\xd7')\"\n\n    with mock.patch(\"sys.stdin\", StringIO(py)):\n        jupytext([\"--to\", \"ipynb\", \"--execute\", \"-\"])\n\n    out, err = capsys.readouterr()\n\n    assert err == \"\"\n    nb = reads(out, \"ipynb\")\n    assert len(nb.cells) == 1\n    print(nb.cells[0].outputs)\n    assert nb.cells[0].outputs[0][\"data\"][\"text/html\"] == \"\\xd7\"\n"
  },
  {
    "path": "tests/integration/contents_manager/test_cm_config.py",
    "content": "import logging\nimport os\nimport sys\nimport unittest.mock as mock\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat import read\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\nfrom tornado.web import HTTPError\n\nimport jupytext\nfrom jupytext.compare import compare_cells, notebook_model\n\nSAMPLE_NOTEBOOK = new_notebook(cells=[new_markdown_cell(\"A Markdown cell\"), new_code_cell(\"# A code cell\\n1 + 1\")])\n\npytestmark = pytest.mark.asyncio\n\n\nasync def test_local_config_overrides_cm_config(tmpdir, cm):\n    cm.root_dir = str(tmpdir)\n    cm.formats = \"ipynb,py\"\n\n    nested = tmpdir.mkdir(\"nested\")\n    with open(str(nested.join(\"jupytext.yml\")), \"w\") as fp:\n        fp.write(\"formats: ''\\n\")\n\n    await ensure_async(cm.save(notebook_model(SAMPLE_NOTEBOOK), \"notebook.ipynb\"))\n    assert os.path.isfile(str(tmpdir.join(\"notebook.ipynb\")))\n    assert os.path.isfile(str(tmpdir.join(\"notebook.py\")))\n\n    await ensure_async(cm.save(notebook_model(SAMPLE_NOTEBOOK), \"nested/notebook.ipynb\"))\n    assert os.path.isfile(str(nested.join(\"notebook.ipynb\")))\n    assert not os.path.isfile(str(nested.join(\"notebook.py\")))\n\n\nasync def test_config_file_is_called_just_once(tmpdir, cm, n=2):\n    cm.root_dir = str(tmpdir)\n    tmpdir.join(\"jupytext.toml\").write(\"\")\n    nb_files = [str(tmpdir.join(f\"notebook{i}.ipynb\")) for i in range(n)]\n\n    for nb_file in nb_files:\n        jupytext.write(SAMPLE_NOTEBOOK, nb_file)\n\n    mock_config = mock.MagicMock(return_value=None)\n\n    with mock.patch(\"jupytext.sync_contentsmanager.load_jupytext_configuration_file\", mock_config):\n        with mock.patch(\n            \"jupytext.async_contentsmanager.load_jupytext_configuration_file\",\n            mock_config,\n        ):\n            for i in range(n):\n                await ensure_async(cm.get(f\"notebook{i}.ipynb\", content=False))\n\n    # Listing the contents should not call the config more than once\n    assert mock_config.call_count == 1\n\n\nasync def test_pairing_through_config_leaves_ipynb_unmodified(tmpdir, cm):\n    cm.root_dir = str(tmpdir)\n\n    cfg_file = tmpdir.join(\"jupytext.yml\")\n    nb_file = tmpdir.join(\"notebook.ipynb\")\n    py_file = tmpdir.join(\"notebook.py\")\n\n    cfg_file.write(\"formats: 'ipynb,py'\\n\")\n\n    await ensure_async(cm.save(notebook_model(SAMPLE_NOTEBOOK), \"notebook.ipynb\"))\n    assert nb_file.isfile()\n    assert py_file.isfile()\n\n    nb = read(nb_file, as_version=4)\n    assert \"jupytext\" not in nb.metadata\n\n\n@pytest.mark.parametrize(\n    \"cfg_file,cfg_text\",\n    [\n        # Should be false, not False\n        (\"jupytext.toml\", \"hide_notebook_metadata = False\"),\n        (\"jupytext.toml\", 'hide_notebook_metadata = \"False\"'),\n        (\"jupytext.toml\", \"not_a_jupytext_option = true\"),\n        (\"pyproject.toml\", \"[tool.jupytext]\\nnot_a_jupytext_option = true\"),\n        (\"jupytext.json\", '{\"notebook_metadata_filter\":\"-all\",}'),\n    ],\n)\n@pytest.mark.filterwarnings(\n    r\"ignore:Passing (unrecognized|unrecoginized) arguments \"\n    r\"to super\\(JupytextConfiguration\\).__init__\"\n)\nasync def test_incorrect_config_message(tmpdir, cfg_file, cfg_text, cm):\n    cm.root_dir = str(tmpdir)\n\n    tmpdir.join(cfg_file).write(cfg_text)\n    tmpdir.join(\"empty.ipynb\").write(\"{}\")\n\n    expected_message = f\"The Jupytext configuration file .*{cfg_file} is incorrect\"\n\n    with pytest.raises(HTTPError, match=expected_message):\n        await ensure_async(cm.get(\"empty.ipynb\", type=\"notebook\", content=False))\n\n    with pytest.raises(HTTPError, match=expected_message):\n        await ensure_async(cm.save(notebook_model(SAMPLE_NOTEBOOK), \"notebook.ipynb\"))\n\n\nasync def test_global_config_file(tmpdir, cm):\n    cm_dir = tmpdir.join(\"cm_dir\").mkdir()\n    cm.root_dir = str(cm_dir)\n\n    tmpdir.join(\"jupytext.toml\").write('formats = \"ipynb,Rmd\"')\n\n    def fake_global_config_directory():\n        return [str(tmpdir)]\n\n    with mock.patch(\n        \"jupytext.config.global_jupytext_configuration_directories\",\n        fake_global_config_directory,\n    ):\n        nb = new_notebook(cells=[new_code_cell(\"1+1\")])\n        model = notebook_model(nb)\n        await ensure_async(cm.save(model, \"notebook.ipynb\"))\n        assert {model[\"path\"] for model in (await ensure_async(cm.get(\"/\", content=True)))[\"content\"]} == {\n            \"notebook.ipynb\",\n            \"notebook.Rmd\",\n        }\n\n\n@pytest.mark.skipif(\n    sys.platform.startswith(\"win\"),\n    reason=\"AttributeError: 'LocalPath' object has no attribute 'mksymlinkto'\",\n)\nasync def test_paired_files_and_symbolic_links(tmpdir, cm):\n    \"\"\"We test that we don't get issues when pairing files into folders\n    that are symbolic links\"\"\"\n\n    actual = tmpdir.mkdir(\"actual_files\")\n    actual_notebooks = actual.mkdir(\"notebooks\")\n    actual_scripts = actual.mkdir(\"scripts\")\n\n    # Open the contents manager in another dir\n    jupyter_dir = tmpdir.mkdir(\"jupyter_dir\")\n    cm.root_dir = str(jupyter_dir)\n\n    # Create sym links to the notebook/script folders\n    jupyter_dir.join(\"link_to_notebooks\").mksymlinkto(actual_notebooks)\n    jupyter_dir.join(\"link_to_scripts\").mksymlinkto(actual_scripts)\n\n    # Pair the notebooks in the linked folders\n    jupyter_dir.join(\"jupytext.toml\").write('formats = \"link_to_notebooks///ipynb,link_to_scripts///py:percent\"')\n\n    # Save a notebook\n    await ensure_async(cm.save(notebook_model(SAMPLE_NOTEBOOK), \"link_to_notebooks/notebook.ipynb\"))\n\n    # This creates two files in the destinations folders\n    assert actual_notebooks.join(\"notebook.ipynb\").isfile()\n    assert actual_scripts.join(\"notebook.py\").isfile()\n\n    # Re-open the notebook (here, the text version)\n    await ensure_async(cm.get(\"link_to_scripts/notebook.py\"))\n\n    # Update the text version\n    jupyter_dir.join(\"link_to_scripts\").join(\"notebook.py\").write_text(\"# %%\\n3 + 3\\n\", encoding=\"utf-8\")\n\n    # Reload and make sure that we get the updated notebook\n    model = await ensure_async(cm.get(\"link_to_notebooks/notebook.ipynb\"))\n    nb = model[\"content\"]\n    compare_cells(nb.cells, [new_code_cell(\"3 + 3\")], compare_ids=False)\n\n\nasync def test_metadata_filter_from_config_has_precedence_over_notebook_metadata(tmpdir, cwd_tmpdir, cm, python_notebook):\n    python_notebook.metadata[\"jupytext\"] = {\"notebook_metadata_filter\": \"-all\"}\n    tmpdir.join(\"jupytext.toml\").write('notebook_metadata_filter = \"all\"')\n\n    cm.root_dir = str(tmpdir)\n\n    await ensure_async(cm.save(notebook_model(python_notebook), \"test.py\"))\n\n    py = tmpdir.join(\"test.py\").read()\n    assert \"notebook_metadata_filter: all\" in py\n\n\nasync def test_test_no_text_representation_metadata_in_ipynb_900(tmpdir, python_notebook, cm):\n    tmpdir.join(\"jupytext.toml\").write('formats = \"ipynb,py:percent\"\\n')\n\n    # create a test notebook and save it in Jupyter\n    nb = python_notebook\n    cm.root_dir = str(tmpdir)\n    await ensure_async(cm.save(dict(type=\"notebook\", content=nb), \"test.ipynb\"))\n\n    # Assert that \"text_representation\" is in the Jupytext metadata #900\n    assert \"text_representation\" in tmpdir.join(\"test.py\").read()\n    # But not in the ipynb notebook\n    assert \"text_representation\" not in tmpdir.join(\"test.ipynb\").read()\n\n    # modify the ipynb file in Jupyter\n    # Reload the notebook\n    nb = (await ensure_async(cm.get(\"test.ipynb\")))[\"content\"]\n    nb.cells.append(new_markdown_cell(\"A new cell\"))\n    await ensure_async(cm.save(dict(type=\"notebook\", content=nb), \"test.ipynb\"))\n\n    # The text representation metadata is in the py file\n    assert \"text_representation\" in tmpdir.join(\"test.py\").read()\n    # But not in the ipynb notebook\n    assert \"text_representation\" not in tmpdir.join(\"test.ipynb\").read()\n\n\nasync def test_cm_config_no_log(cwd_tmp_path, tmp_path, caplog, cm):\n    cm.root_dir = str(tmp_path)\n\n    config = 'cm_config_log_level=\"none\"'\n    (tmp_path / \"jupytext.toml\").write_text(config)\n    (tmp_path / \"nb1.py\").write_text(\"# %%\")\n    (tmp_path / \"subfolder\").mkdir()\n    (tmp_path / \"subfolder\" / \"jupytext.toml\").write_text(config)\n    (tmp_path / \"subfolder\" / \"nb2.py\").write_text(\"# %%\")\n\n    caplog.set_level(logging.DEBUG)\n\n    await ensure_async(cm.get(\"nb1.py\", type=\"notebook\", content=False))\n    await ensure_async(cm.get(\"nb1.py\", type=\"notebook\", content=True))\n    await ensure_async(cm.get(\"subfolder/nb2.py\", type=\"notebook\", content=False))\n    await ensure_async(cm.get(\"subfolder/nb2.py\", type=\"notebook\", content=True))\n\n    assert \"Jupytext configuration file\" not in caplog.text\n\n\nasync def test_cm_config_log_only_if_changed(cwd_tmp_path, tmp_path, caplog, cm):\n    cm.root_dir = str(tmp_path)\n\n    config = \"\"\n    (tmp_path / \"jupytext.toml\").write_text(config)\n    (tmp_path / \"nb1.py\").write_text(\"# %%\")\n    (tmp_path / \"subfolder\").mkdir()\n    (tmp_path / \"subfolder\" / \"jupytext.toml\").write_text(config)\n    (tmp_path / \"subfolder\" / \"nb2.py\").write_text(\"# %%\")\n\n    caplog.set_level(logging.INFO)\n\n    await ensure_async(cm.get(\"nb1.py\", type=\"notebook\", content=False))\n    assert \"Jupytext configuration file\" in caplog.text\n    caplog.clear()\n\n    # Same notebook, same config => no log\n    await ensure_async(cm.get(\"nb1.py\", type=\"notebook\", content=True))\n    assert \"Jupytext configuration file\" not in caplog.text\n\n    # Same notebook, config changed => log\n    (tmp_path / \"jupytext.toml\").write_text('formats=\"ipynb,py:percent\"')\n    await ensure_async(cm.get(\"nb1.py\", type=\"notebook\", content=True))\n    assert \"Jupytext configuration file\" in caplog.text\n    caplog.clear()\n\n    # Different folder, different config\n    await ensure_async(cm.get(\"subfolder/nb2.py\", type=\"notebook\", content=False))\n    assert \"Jupytext configuration file\" in caplog.text\n    caplog.clear()\n\n    # Same config as previously => no log\n    await ensure_async(cm.get(\"subfolder/nb2.py\", type=\"notebook\", content=False))\n    assert \"Jupytext configuration file\" not in caplog.text\n"
  },
  {
    "path": "tests/integration/contents_manager/test_contentsmanager.py",
    "content": "import inspect\nimport os\nimport re\nimport shutil\nimport time\n\nimport pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook\nfrom tornado.web import HTTPError\n\nimport jupytext\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.compare import compare, compare_notebooks, notebook_model\nfrom jupytext.formats import auto_ext_from_metadata, read_format_from_metadata\nfrom jupytext.header import header_to_metadata_and_cell\nfrom jupytext.jupytext import read, write, writes\nfrom jupytext.kernels import kernelspec_from_language\n\npytestmark = pytest.mark.asyncio\n\n\nasync def test_rename(tmpdir, cm):\n    org_file = str(tmpdir.join(\"notebook.ipynb\"))\n    new_file = str(tmpdir.join(\"new.ipynb\"))\n    jupytext.write(new_notebook(), org_file)\n\n    cm.root_dir = str(tmpdir)\n    await ensure_async(cm.rename_file(\"notebook.ipynb\", \"new.ipynb\"))\n\n    assert os.path.isfile(new_file)\n    assert not os.path.isfile(org_file)\n\n\nasync def test_rename_inconsistent_path(tmpdir, cm):\n    org_file = str(tmpdir.join(\"notebook_suffix.ipynb\"))\n    new_file = str(tmpdir.join(\"new.ipynb\"))\n    jupytext.write(new_notebook(metadata={\"jupytext\": {\"formats\": \"_suffix.ipynb\"}}), org_file)\n\n    cm.root_dir = str(tmpdir)\n    # Read notebook, and learn about its format\n    model = await ensure_async(cm.get(\"notebook_suffix.ipynb\"))\n    assert model[\"content\"][\"metadata\"][\"jupytext\"][\"formats\"] == \"_suffix.ipynb\"\n\n    # Since #1414 the notebook can be moved\n    await ensure_async(cm.rename_file(\"notebook_suffix.ipynb\", \"new.ipynb\"))\n\n    assert os.path.isfile(new_file)\n    assert not os.path.isfile(org_file)\n\n    # The new notebook is unchanged\n    new_model = await ensure_async(cm.get(\"new.ipynb\"))\n    compare_notebooks(new_model[\"content\"], model[\"content\"])\n\n\nasync def test_pair_unpair_notebook(tmpdir, cm):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_md = \"notebook.md\"\n\n    nb = new_notebook(\n        metadata={\n            \"kernelspec\": {\n                \"display_name\": \"Python3\",\n                \"language\": \"python\",\n                \"name\": \"python3\",\n            }\n        },\n        cells=[\n            new_code_cell(\n                \"1 + 1\",\n                outputs=[\n                    {\n                        \"data\": {\"text/plain\": [\"2\"]},\n                        \"execution_count\": 1,\n                        \"metadata\": {},\n                        \"output_type\": \"execute_result\",\n                    }\n                ],\n            )\n        ],\n    )\n\n    cm.root_dir = str(tmpdir)\n\n    # save notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n    assert not os.path.isfile(str(tmpdir.join(tmp_md)))\n\n    # pair notebook\n    nb[\"metadata\"][\"jupytext\"] = {\"formats\": \"ipynb,md\"}\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n    assert os.path.isfile(str(tmpdir.join(tmp_md)))\n\n    # reload and get outputs\n    nb2 = (await ensure_async(cm.get(tmp_md)))[\"content\"]\n    compare_notebooks(nb, nb2)\n\n    # unpair and save as md\n    del nb[\"metadata\"][\"jupytext\"]\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_md))\n    nb2 = (await ensure_async(cm.get(tmp_md)))[\"content\"]\n\n    # we get no outputs here\n    compare_notebooks(nb, nb2, compare_outputs=False)\n    assert len(nb2.cells[0][\"outputs\"]) == 0\n\n\nasync def test_load_save_rename(ipynb_py_R_jl_file, cm, tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_rmd = \"notebook.Rmd\"\n\n    cm.formats = \"ipynb,Rmd\"\n    cm.root_dir = str(tmpdir)\n    cm.delete_to_trash = False\n\n    # open ipynb, save Rmd, reopen\n    nb = jupytext.read(ipynb_py_R_jl_file)\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_rmd))\n    nb_rmd = await ensure_async(cm.get(tmp_rmd))\n    compare_notebooks(nb_rmd[\"content\"], nb, \"Rmd\")\n\n    # save ipynb\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # rename_file ipynb\n    await ensure_async(cm.rename_file(tmp_ipynb, \"new.ipynb\"))\n    assert not os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n    assert not os.path.isfile(str(tmpdir.join(tmp_rmd)))\n\n    assert os.path.isfile(str(tmpdir.join(\"new.ipynb\")))\n    assert os.path.isfile(str(tmpdir.join(\"new.Rmd\")))\n\n    # delete one file, test that we can still read and rename_file it\n    await ensure_async(cm.delete(\"new.Rmd\"))\n    assert not os.path.isfile(str(tmpdir.join(\"new.Rmd\")))\n    model = await ensure_async(cm.get(\"new.ipynb\", content=False))\n    assert \"last_modified\" in model\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"new.ipynb\"))\n    assert os.path.isfile(str(tmpdir.join(\"new.Rmd\")))\n\n    await ensure_async(cm.delete(\"new.Rmd\"))\n    await ensure_async(cm.rename_file(\"new.ipynb\", tmp_ipynb))\n\n    assert os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n    assert not os.path.isfile(str(tmpdir.join(tmp_rmd)))\n    assert not os.path.isfile(str(tmpdir.join(\"new.ipynb\")))\n    assert not os.path.isfile(str(tmpdir.join(\"new.Rmd\")))\n\n\nasync def test_save_load_paired_md_notebook(ipynb_py_R_jl_file, cm, tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_md = \"notebook.md\"\n\n    cm.root_dir = str(tmpdir)\n\n    # open ipynb, save with cm, reopen\n    nb = jupytext.read(ipynb_py_R_jl_file)\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,md\"}\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n    nb_md = await ensure_async(cm.get(tmp_md))\n\n    compare_notebooks(nb_md[\"content\"], nb, \"md\")\n    assert nb_md[\"content\"].metadata[\"jupytext\"][\"formats\"] == \"ipynb,md\"\n\n\nasync def test_pair_plain_script(percent_file, cm, tmpdir, caplog):\n    tmp_py = \"notebook.py\"\n    tmp_ipynb = \"notebook.ipynb\"\n\n    cm.root_dir = str(tmpdir)\n\n    # open py file, pair, save with cm\n    nb = jupytext.read(percent_file)\n    nb.metadata[\"jupytext\"][\"formats\"] = \"ipynb,py:hydrogen\"\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_py))\n\n    # assert \"'Include Metadata' is off\" in caplog.text\n\n    assert os.path.isfile(str(tmpdir.join(tmp_py)))\n    assert os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n\n    # Make sure we've not changed the script\n    with open(percent_file) as fp:\n        script = fp.read()\n\n    with open(str(tmpdir.join(tmp_py))) as fp:\n        script2 = fp.read()\n\n    compare(script2, script)\n\n    # reopen py file with the cm\n    nb2 = (await ensure_async(cm.get(tmp_py)))[\"content\"]\n    compare_notebooks(nb2, nb)\n    assert nb2.metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:hydrogen\"\n\n    # remove the pairing and save\n    del nb.metadata[\"jupytext\"][\"formats\"]\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_py))\n\n    # reopen py file with the cm\n    nb2 = (await ensure_async(cm.get(tmp_py)))[\"content\"]\n    compare_notebooks(nb2, nb)\n    assert \"formats\" not in nb2.metadata[\"jupytext\"]\n\n\nasync def test_load_save_rename_nbpy(ipynb_py_file, cm, tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_nbpy = \"notebook.nb.py\"\n\n    cm.formats = \"ipynb,.nb.py\"\n    cm.root_dir = str(tmpdir)\n\n    # open ipynb, save nb.py, reopen\n    nb = jupytext.read(ipynb_py_file)\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_nbpy))\n    nbpy = await ensure_async(cm.get(tmp_nbpy))\n    compare_notebooks(nbpy[\"content\"], nb)\n\n    # save ipynb\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # rename_file nbpy\n    await ensure_async(cm.rename_file(tmp_nbpy, \"new.nb.py\"))\n    assert not os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n    assert not os.path.isfile(str(tmpdir.join(tmp_nbpy)))\n\n    assert os.path.isfile(str(tmpdir.join(\"new.ipynb\")))\n    assert os.path.isfile(str(tmpdir.join(\"new.nb.py\")))\n\n    # rename_file to a non-matching pattern\n    with pytest.raises(HTTPError):\n        await ensure_async(cm.rename_file(tmp_nbpy, \"suffix_missing.py\"))\n\n\nasync def test_load_save_py_freeze_metadata(python_file, cm, tmpdir):\n    if \"light\" in python_file:\n        pytest.skip()\n\n    tmp_nbpy = \"notebook.py\"\n\n    cm.root_dir = str(tmpdir)\n\n    # read original file\n    with open(python_file) as fp:\n        text_py = fp.read()\n\n    # write to tmp_nbpy\n    with open(str(tmpdir.join(tmp_nbpy)), \"w\") as fp:\n        fp.write(text_py)\n\n    # open and save notebook\n    nb = (await ensure_async(cm.get(tmp_nbpy)))[\"content\"]\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_nbpy))\n\n    with open(str(tmpdir.join(tmp_nbpy))) as fp:\n        text_py2 = fp.read()\n\n    compare(text_py2, text_py)\n\n\nasync def test_load_text_notebook(tmpdir, cm):\n    cm.root_dir = str(tmpdir)\n\n    nbpy = \"text.py\"\n    with open(str(tmpdir.join(nbpy)), \"w\") as fp:\n        fp.write(\"# %%\\n1 + 1\\n\")\n\n    py_model = await ensure_async(cm.get(nbpy, content=False))\n    assert py_model[\"type\"] == \"notebook\"\n    assert py_model[\"content\"] is None\n\n    py_model = await ensure_async(cm.get(nbpy, content=True))\n    assert py_model[\"type\"] == \"notebook\"\n    assert \"cells\" in py_model[\"content\"]\n\n    # The model returned by the CM should match that of a classical ipynb notebook\n    nb_model = dict(type=\"notebook\", content=new_notebook(cells=[new_markdown_cell(\"A cell\")]))\n    await ensure_async(cm.save(nb_model, \"notebook.ipynb\"))\n    nb_model = await ensure_async(cm.get(\"notebook.ipynb\", content=True))\n    for key in [\"format\", \"mimetype\", \"type\"]:\n        assert nb_model[key] == py_model[key], key\n\n\nasync def test_load_save_rename_notebook_with_dot(ipynb_py_file, cm, tmpdir):\n    tmp_ipynb = \"1.notebook.ipynb\"\n    tmp_nbpy = \"1.notebook.py\"\n\n    cm.formats = \"ipynb,py\"\n    cm.root_dir = str(tmpdir)\n\n    # open ipynb, save nb.py, reopen\n    nb = jupytext.read(ipynb_py_file)\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_nbpy))\n    nbpy = await ensure_async(cm.get(tmp_nbpy))\n    compare_notebooks(nbpy[\"content\"], nb)\n\n    # save ipynb\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # rename_file py\n    await ensure_async(cm.rename_file(tmp_nbpy, \"2.new_notebook.py\"))\n    assert not os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n    assert not os.path.isfile(str(tmpdir.join(tmp_nbpy)))\n\n    assert os.path.isfile(str(tmpdir.join(\"2.new_notebook.ipynb\")))\n    assert os.path.isfile(str(tmpdir.join(\"2.new_notebook.py\")))\n\n\nasync def test_load_save_rename_nbpy_default_config(ipynb_py_file, cm, tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_nbpy = \"notebook.nb.py\"\n\n    cm.formats = \"ipynb,.nb.py\"\n    cm.root_dir = str(tmpdir)\n\n    # open ipynb, save nb.py, reopen\n    nb = jupytext.read(ipynb_py_file)\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_nbpy))\n    nbpy = await ensure_async(cm.get(tmp_nbpy))\n    compare_notebooks(nbpy[\"content\"], nb)\n\n    # open ipynb\n    nbipynb = await ensure_async(cm.get(tmp_ipynb))\n    compare_notebooks(nbipynb[\"content\"], nb)\n\n    # save ipynb\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # rename_file notebook.nb.py to new.nb.py\n    await ensure_async(cm.rename_file(tmp_nbpy, \"new.nb.py\"))\n    assert not os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n    assert not os.path.isfile(str(tmpdir.join(tmp_nbpy)))\n\n    assert os.path.isfile(str(tmpdir.join(\"new.ipynb\")))\n    assert os.path.isfile(str(tmpdir.join(\"new.nb.py\")))\n\n    # rename_file new.ipynb to notebook.ipynb\n    await ensure_async(cm.rename_file(\"new.ipynb\", tmp_ipynb))\n    assert os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n    assert os.path.isfile(str(tmpdir.join(tmp_nbpy)))\n\n    assert not os.path.isfile(str(tmpdir.join(\"new.ipynb\")))\n    assert not os.path.isfile(str(tmpdir.join(\"new.nb.py\")))\n\n\nasync def test_load_save_rename_non_ascii_path(ipynb_py_file, cm, tmpdir):\n    tmp_ipynb = \"notebôk.ipynb\"\n    tmp_nbpy = \"notebôk.nb.py\"\n\n    cm.formats = \"ipynb,.nb.py\"\n    tmpdir = \"\" + str(tmpdir)\n    cm.root_dir = tmpdir\n\n    # open ipynb, save nb.py, reopen\n    nb = jupytext.read(ipynb_py_file)\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_nbpy))\n    nbpy = await ensure_async(cm.get(tmp_nbpy))\n    compare_notebooks(nbpy[\"content\"], nb)\n\n    # open ipynb\n    nbipynb = await ensure_async(cm.get(tmp_ipynb))\n    compare_notebooks(nbipynb[\"content\"], nb)\n\n    # save ipynb\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # rename_file notebôk.nb.py to nêw.nb.py\n    await ensure_async(cm.rename_file(tmp_nbpy, \"nêw.nb.py\"))\n    assert not os.path.isfile(os.path.join(tmpdir, tmp_ipynb))\n    assert not os.path.isfile(os.path.join(tmpdir, tmp_nbpy))\n\n    assert os.path.isfile(os.path.join(tmpdir, \"nêw.ipynb\"))\n    assert os.path.isfile(os.path.join(tmpdir, \"nêw.nb.py\"))\n\n    # rename_file nêw.ipynb to notebôk.ipynb\n    await ensure_async(cm.rename_file(\"nêw.ipynb\", tmp_ipynb))\n    assert os.path.isfile(os.path.join(tmpdir, tmp_ipynb))\n    assert os.path.isfile(os.path.join(tmpdir, tmp_nbpy))\n\n    assert not os.path.isfile(os.path.join(tmpdir, \"nêw.ipynb\"))\n    assert not os.path.isfile(os.path.join(tmpdir, \"nêw.nb.py\"))\n\n\nasync def test_outdated_text_notebook(python_notebook, cm, tmpdir):\n    # 1. write py ipynb\n    cm.formats = \"py,ipynb\"\n    cm.outdated_text_notebook_margin = 0\n    cm.root_dir = str(tmpdir)\n\n    # open ipynb, save py, reopen\n    nb = python_notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.py\"))\n    model_py = await ensure_async(cm.get(\"notebook.py\", load_alternative_format=False))\n    model_ipynb = await ensure_async(cm.get(\"notebook.ipynb\", load_alternative_format=False))\n\n    # 2. check that time of ipynb <= py\n    assert model_ipynb[\"last_modified\"] <= model_py[\"last_modified\"]\n\n    # 3. wait some time\n    time.sleep(0.5)\n\n    # 4. modify ipynb\n    nb.cells.append(new_markdown_cell(\"New cell\"))\n    write(nb, str(tmpdir.join(\"notebook.ipynb\")))\n\n    # 5. test error\n    with pytest.raises(HTTPError):\n        await ensure_async(cm.get(\"notebook.py\"))\n\n    # 6. test OK with\n    cm.outdated_text_notebook_margin = 5.0\n    await ensure_async(cm.get(\"notebook.py\"))\n\n    # 7. test OK with\n    cm.outdated_text_notebook_margin = float(\"inf\")\n    await ensure_async(cm.get(\"notebook.py\"))\n\n\nasync def test_outdated_text_notebook_no_diff_ok(tmpdir, cm, python_notebook):\n    # 1. write py ipynb\n    cm.formats = \"py,ipynb\"\n    cm.outdated_text_notebook_margin = 0\n    cm.root_dir = str(tmpdir)\n\n    # open ipynb, save py, reopen\n    nb = python_notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.py\"))\n    model_py = await ensure_async(cm.get(\"notebook.py\", load_alternative_format=False))\n    model_ipynb = await ensure_async(cm.get(\"notebook.ipynb\", load_alternative_format=False))\n\n    # 2. check that time of ipynb <= py\n    assert model_ipynb[\"last_modified\"] <= model_py[\"last_modified\"]\n\n    # 3. wait some time\n    time.sleep(0.5)\n\n    # 4. touch ipynb\n    with open(tmpdir / \"notebook.ipynb\", \"a\"):\n        os.utime(tmpdir / \"notebook.ipynb\", None)\n\n    # 5. No error since both files correspond to the same notebook #799\n    await ensure_async(cm.get(\"notebook.py\"))\n\n\nasync def test_outdated_text_notebook_diff_is_shown(tmpdir, cm, python_notebook):\n    # 1. write py ipynb\n    cm.formats = \"py,ipynb\"\n    cm.outdated_text_notebook_margin = 0\n    cm.root_dir = str(tmpdir)\n\n    # open ipynb, save py, reopen\n    nb = python_notebook\n    nb.cells = [new_markdown_cell(\"Text version 1.0\")]\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.py\"))\n    model_py = await ensure_async(cm.get(\"notebook.py\", load_alternative_format=False))\n    model_ipynb = await ensure_async(cm.get(\"notebook.ipynb\", load_alternative_format=False))\n\n    # 2. check that time of ipynb <= py\n    assert model_ipynb[\"last_modified\"] <= model_py[\"last_modified\"]\n\n    # 3. wait some time\n    time.sleep(0.5)\n\n    # 4. modify ipynb\n    nb.cells = [new_markdown_cell(\"Text version 2.0\")]\n    jupytext.write(nb, str(tmpdir / \"notebook.ipynb\"))\n\n    # 5. The diff is shown in the error\n    with pytest.raises(HTTPError) as excinfo:\n        await ensure_async(cm.get(\"notebook.py\"))\n\n    diff = excinfo.value.log_message\n\n    diff = diff[diff.find(\"Differences\") : diff.rfind(\"Please\")]\n\n    compare(\n        # In the reference below, lines with a single space\n        # have been stripped by the pre-commit hook\n        diff.replace(\"\\n \\n\", \"\\n\\n\"),\n        \"\"\"Differences (jupytext --diff notebook.py notebook.ipynb) are:\n--- notebook.py\n+++ notebook.ipynb\n@@ -13,5 +13,5 @@\n # ---\n\n # %%%% [markdown]\n-# Text version 1.0\n+# Text version 2.0\n\n\"\"\",\n    )\n\n\nasync def test_reload_notebook_after_jupytext_cli(python_notebook, cm, tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_nbpy = str(tmpdir.join(\"notebook.py\"))\n\n    cm.outdated_text_notebook_margin = 0\n    cm.root_dir = str(tmpdir)\n\n    # write the paired notebook\n    nb = python_notebook\n    nb.metadata.setdefault(\"jupytext\", {})[\"formats\"] = \"py,ipynb\"\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.py\"))\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_nbpy)\n\n    # run jupytext CLI\n    jupytext_cli([tmp_nbpy, \"--to\", \"ipynb\", \"--update\"])\n\n    # test reload\n    nb1 = (await ensure_async(cm.get(\"notebook.py\")))[\"content\"]\n    nb2 = (await ensure_async(cm.get(\"notebook.ipynb\")))[\"content\"]\n\n    compare_notebooks(nb, nb1)\n    compare_notebooks(nb, nb2)\n\n\nasync def test_load_save_percent_format(percent_file, cm, tmpdir):\n    tmp_py = \"notebook.py\"\n    with open(percent_file) as stream:\n        text_py = stream.read()\n    with open(str(tmpdir.join(tmp_py)), \"w\") as stream:\n        stream.write(text_py)\n\n    cm.root_dir = str(tmpdir)\n\n    # open python, save\n    nb = (await ensure_async(cm.get(tmp_py)))[\"content\"]\n    del nb.metadata[\"jupytext\"][\"notebook_metadata_filter\"]\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_py))\n\n    # compare the new file with original one\n    with open(str(tmpdir.join(tmp_py))) as stream:\n        text_py2 = stream.read()\n\n    # do we find 'percent' in the header?\n    header = text_py2[: -len(text_py)]\n    assert any([\"percent\" in line for line in header.splitlines()])\n\n    # Remove the YAML header\n    text_py2 = text_py2[-len(text_py) :]\n\n    compare(text_py2, text_py)\n\n\nasync def test_save_to_percent_format(ipynb_julia_file, cm, tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_jl = \"notebook.jl\"\n\n    cm.root_dir = str(tmpdir)\n    cm.preferred_jupytext_formats_save = \"jl:percent\"\n\n    nb = jupytext.read(ipynb_julia_file)\n    nb[\"metadata\"][\"jupytext\"] = {\"formats\": \"ipynb,jl\"}\n\n    # save to ipynb and jl\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # read jl file\n    with open(str(tmpdir.join(tmp_jl))) as stream:\n        text_jl = stream.read()\n\n    # Parse the YAML header\n    metadata, _, _, _ = header_to_metadata_and_cell(text_jl.splitlines(), \"#\", \"\")\n    assert metadata[\"jupytext\"][\"formats\"] == \"ipynb,jl:percent\"\n\n\nasync def test_save_using_preferred_and_default_format_170(ipynb_py_file, cm, tmpdir):\n    nb = read(ipynb_py_file)\n\n    # Way 0: preferred_jupytext_formats_save, no prefix + formats\n    tmp_py = str(tmpdir.join(\"python/notebook.py\"))\n\n    cm.root_dir = str(tmpdir)\n    cm.preferred_jupytext_formats_save = \"py:percent\"\n    cm.formats = \"ipynb,python//py\"\n\n    # save to ipynb and py\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    # read py file\n    nb_py = read(tmp_py)\n    assert nb_py.metadata[\"jupytext\"][\"text_representation\"][\"format_name\"] == \"percent\"\n\n    # Way 1: preferred_jupytext_formats_save + formats\n    tmp_py = str(tmpdir.join(\"python/notebook.py\"))\n\n    cm.root_dir = str(tmpdir)\n    cm.preferred_jupytext_formats_save = \"python//py:percent\"\n    cm.formats = \"ipynb,python//py\"\n\n    # save to ipynb and py\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    # read py file\n    nb_py = read(tmp_py)\n    assert nb_py.metadata[\"jupytext\"][\"text_representation\"][\"format_name\"] == \"percent\"\n\n    # Way 2: formats\n    tmp_py = str(tmpdir.join(\"python/notebook.py\"))\n\n    cm.root_dir = str(tmpdir)\n    cm.formats = \"ipynb,python//py:percent\"\n\n    # save to ipynb and py\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    # read py file\n    nb_py = read(tmp_py)\n    assert nb_py.metadata[\"jupytext\"][\"text_representation\"][\"format_name\"] == \"percent\"\n\n\nasync def test_open_using_preferred_and_default_format_174(ipynb_py_file, cm, tmpdir):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"python/notebook.py\"))\n    tmp_py2 = str(tmpdir.join(\"other/notebook.py\"))\n    os.makedirs(str(tmpdir.join(\"other\")))\n    shutil.copyfile(ipynb_py_file, tmp_ipynb)\n\n    cm.root_dir = str(tmpdir)\n    cm.formats = \"ipynb,python//py:percent\"\n    cm.notebook_metadata_filter = \"all\"\n    cm.cell_metadata_filter = \"all\"\n\n    # load notebook\n    model = await ensure_async(cm.get(\"notebook.ipynb\"))\n\n    # save to ipynb and py\n    await ensure_async(cm.save(model=model, path=\"notebook.ipynb\"))\n\n    assert os.path.isfile(tmp_py)\n    os.remove(tmp_ipynb)\n\n    # read py file\n    model2 = await ensure_async(cm.get(\"python/notebook.py\"))\n    compare_notebooks(model2[\"content\"], model[\"content\"])\n\n    # move py file to the another folder\n    shutil.move(tmp_py, tmp_py2)\n    model2 = await ensure_async(cm.get(\"other/notebook.py\"))\n    compare_notebooks(model2[\"content\"], model[\"content\"])\n    await ensure_async(cm.save(model=model, path=\"other/notebook.py\"))\n    assert not os.path.isfile(tmp_ipynb)\n    assert not os.path.isfile(str(tmpdir.join(\"other/notebook.ipynb\")))\n\n\nasync def test_kernelspec_are_preserved(ipynb_py_file, cm, tmpdir):\n    if \"many hash\" in ipynb_py_file:\n        pytest.skip()\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n    shutil.copyfile(ipynb_py_file, tmp_ipynb)\n\n    cm.root_dir = str(tmpdir)\n    cm.formats = \"ipynb,py\"\n    cm.notebook_metadata_filter = \"-all\"\n\n    # load notebook\n    model = await ensure_async(cm.get(\"notebook.ipynb\"))\n    model[\"content\"].metadata[\"kernelspec\"] = {\n        \"display_name\": \"Kernel name\",\n        \"language\": \"python\",\n        \"name\": \"custom\",\n    }\n\n    # save to ipynb and py\n    await ensure_async(cm.save(model=model, path=\"notebook.ipynb\"))\n    assert os.path.isfile(tmp_py)\n\n    # read ipynb\n    model2 = await ensure_async(cm.get(\"notebook.ipynb\"))\n    compare_notebooks(model2[\"content\"], model[\"content\"])\n\n\nasync def test_save_to_light_percent_sphinx_format(ipynb_py_file, cm, tmpdir):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_lgt_py = \"notebook.lgt.py\"\n    tmp_pct_py = \"notebook.pct.py\"\n    tmp_spx_py = \"notebook.spx.py\"\n\n    cm.root_dir = str(tmpdir)\n\n    nb = jupytext.read(ipynb_py_file)\n    nb[\"metadata\"][\"jupytext\"] = {\"formats\": \"ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx\"}\n\n    # save to ipynb and three python flavors\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # read files\n    with open(str(tmpdir.join(tmp_pct_py))) as stream:\n        assert read_format_from_metadata(stream.read(), \".py\") == \"percent\"\n\n    with open(str(tmpdir.join(tmp_lgt_py))) as stream:\n        assert read_format_from_metadata(stream.read(), \".py\") == \"light\"\n\n    with open(str(tmpdir.join(tmp_spx_py))) as stream:\n        assert read_format_from_metadata(stream.read(), \".py\") == \"sphinx\"\n\n    model = await ensure_async(cm.get(path=tmp_pct_py))\n    compare_notebooks(model[\"content\"], nb)\n\n    model = await ensure_async(cm.get(path=tmp_lgt_py))\n    compare_notebooks(model[\"content\"], nb)\n\n    model = await ensure_async(cm.get(path=tmp_spx_py))\n    # (notebooks not equal as we insert %matplotlib inline in sphinx)\n\n    model = await ensure_async(cm.get(path=tmp_ipynb))\n    compare_notebooks(model[\"content\"], nb)\n\n\nasync def test_pair_notebook_with_dot(ipynb_py_file, cm, tmpdir):\n    # Reproduce issue #138\n    tmp_py = \"file.5.1.py\"\n    tmp_ipynb = \"file.5.1.ipynb\"\n\n    cm.root_dir = str(tmpdir)\n\n    nb = jupytext.read(ipynb_py_file)\n    nb[\"metadata\"][\"jupytext\"] = {\"formats\": \"ipynb,py:percent\"}\n\n    # save to ipynb and three python flavors\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    assert os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n\n    # read files\n    with open(str(tmpdir.join(tmp_py))) as stream:\n        assert read_format_from_metadata(stream.read(), \".py\") == \"percent\"\n\n    model = await ensure_async(cm.get(path=tmp_py))\n    assert model[\"name\"] == \"file.5.1.py\"\n    compare_notebooks(model[\"content\"], nb)\n\n    model = await ensure_async(cm.get(path=tmp_ipynb))\n    assert model[\"name\"] == \"file.5.1.ipynb\"\n    compare_notebooks(model[\"content\"], nb)\n\n\nasync def test_preferred_format_allows_to_read_others_format(python_notebook, cm, tmpdir):\n    # 1. write py ipynb\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_nbpy = \"notebook.py\"\n\n    cm.preferred_jupytext_formats_save = \"py:light\"\n    cm.root_dir = str(tmpdir)\n\n    # load notebook and save it using the cm\n    nb = python_notebook\n    nb[\"metadata\"][\"jupytext\"] = {\"formats\": \"ipynb,py\"}\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # Saving does not update the metadata, as 'save' makes a copy of the notebook\n    # assert nb['metadata']['jupytext']['formats'] == 'ipynb,py:light'\n\n    # Set preferred format for reading\n    cm.preferred_jupytext_formats_read = \"py:percent\"\n\n    # Read notebook\n    model = await ensure_async(cm.get(tmp_nbpy))\n\n    # Check that format is explicit\n    assert model[\"content\"][\"metadata\"][\"jupytext\"][\"formats\"] == \"ipynb,py:light\"\n\n    # Check contents\n    compare_notebooks(model[\"content\"], nb)\n\n    # Change save format and save\n    model[\"content\"][\"metadata\"][\"jupytext\"][\"formats\"] == \"ipynb,py\"\n    cm.preferred_jupytext_formats_save = \"py:percent\"\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # Read notebook\n    model = await ensure_async(cm.get(tmp_nbpy))\n    compare_notebooks(model[\"content\"], nb)\n\n    # Check that format is explicit\n    assert model[\"content\"][\"metadata\"][\"jupytext\"][\"formats\"] == \"ipynb,py:percent\"\n\n\nasync def test_preferred_formats_read_auto(tmpdir, cm):\n    tmp_py = \"notebook.py\"\n    with open(str(tmpdir.join(tmp_py)), \"w\") as script:\n        script.write(\n            \"\"\"# cell one\n1 + 1\n\"\"\"\n        )\n\n    # create contents manager with default load format as percent\n    cm.preferred_jupytext_formats_read = \"auto:percent\"\n    cm.root_dir = str(tmpdir)\n\n    # load notebook\n    model = await ensure_async(cm.get(tmp_py))\n\n    # check that script is opened as percent\n    assert \"percent\" == model[\"content\"][\"metadata\"][\"jupytext\"][\"text_representation\"][\"format_name\"]\n\n\nasync def test_save_in_auto_extension_global(ipynb_py_R_jl_file, cm, tmpdir):\n    # load notebook\n    nb = jupytext.read(ipynb_py_R_jl_file)\n\n    auto_ext = auto_ext_from_metadata(nb.metadata)\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_script = \"notebook\" + auto_ext\n\n    # create contents manager with default load format as percent\n    cm.formats = \"ipynb,auto\"\n    cm.preferred_jupytext_formats_save = \"auto:percent\"\n    cm.root_dir = str(tmpdir)\n\n    # save notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # check that text representation exists, and is in percent format\n    with open(str(tmpdir.join(tmp_script))) as stream:\n        assert read_format_from_metadata(stream.read(), auto_ext) == \"percent\"\n\n    # reload and compare with original notebook\n    model = await ensure_async(cm.get(path=tmp_script))\n\n    # saving should not create a format entry #95\n    assert \"formats\" not in model[\"content\"].metadata.get(\"jupytext\", {})\n\n    compare_notebooks(model[\"content\"], nb)\n\n\nasync def test_global_auto_pairing_works_with_empty_notebook(tmpdir, cm):\n    nb = new_notebook()\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n    tmp_auto = str(tmpdir.join(\"notebook.auto\"))\n\n    # create contents manager with default load format as percent\n    cm.formats = \"ipynb,auto\"\n    cm.preferred_jupytext_formats_save = \"auto:percent\"\n    cm.root_dir = str(tmpdir)\n\n    # save notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    # check that only the ipynb representation exists\n    assert os.path.isfile(tmp_ipynb)\n    assert not os.path.isfile(tmp_py)\n    assert not os.path.isfile(tmp_auto)\n    assert \"notebook.ipynb\" not in cm.paired_notebooks\n\n    model = await ensure_async(cm.get(path=\"notebook.ipynb\"))\n    compare_notebooks(model[\"content\"], nb)\n\n    # add language information to the notebook\n    nb.metadata[\"language_info\"] = {\n        \"codemirror_mode\": {\"name\": \"ipython\", \"version\": 3},\n        \"file_extension\": \".py\",\n        \"mimetype\": \"text/x-python\",\n        \"name\": \"python\",\n        \"nbconvert_exporter\": \"python\",\n        \"pygments_lexer\": \"ipython3\",\n        \"version\": \"3.7.3\",\n    }\n\n    # save again\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    # check that ipynb + py representations exists\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_py)\n    assert not os.path.isfile(tmp_auto)\n    assert len(cm.paired_notebooks[\"notebook.ipynb\"]) == 2\n\n    # add a cell in the py file\n    with open(tmp_py, \"a\") as fp:\n        fp.write(\"# %%\\n2+2\\n\")\n\n    nb2 = (await ensure_async(cm.get(path=\"notebook.ipynb\")))[\"content\"]\n    assert len(nb2.cells) == 1\n    assert nb2.cells[0].source == \"2+2\"\n\n\nasync def test_save_in_auto_extension_global_with_format(ipynb_py_R_jl_file, cm, tmpdir):\n    # load notebook\n    nb = jupytext.read(ipynb_py_R_jl_file)\n\n    auto_ext = auto_ext_from_metadata(nb.metadata)\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_script = \"notebook\" + auto_ext\n\n    # create contents manager with default load format as percent\n    cm.formats = \"ipynb,auto:percent\"\n    cm.root_dir = str(tmpdir)\n\n    # save notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # check that text representation exists, and is in percent format\n    with open(str(tmpdir.join(tmp_script))) as stream:\n        assert read_format_from_metadata(stream.read(), auto_ext) == \"percent\"\n\n    # reload and compare with original notebook\n    model = await ensure_async(cm.get(path=tmp_script))\n\n    # saving should not create a format entry #95\n    assert \"formats\" not in model[\"content\"].metadata.get(\"jupytext\", {})\n\n    compare_notebooks(model[\"content\"], nb)\n\n\nasync def test_save_in_auto_extension_local(ipynb_py_R_jl_file, cm, tmpdir):\n    # load notebook\n    nb = jupytext.read(ipynb_py_R_jl_file)\n    nb.metadata.setdefault(\"jupytext\", {})[\"formats\"] = \"ipynb,auto:percent\"\n\n    auto_ext = auto_ext_from_metadata(nb.metadata)\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_script = \"notebook\" + auto_ext\n\n    # create contents manager with default load format as percent\n    cm.root_dir = str(tmpdir)\n\n    # save notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # check that text representation exists, and is in percent format\n    with open(str(tmpdir.join(tmp_script))) as stream:\n        assert read_format_from_metadata(stream.read(), auto_ext) == \"percent\"\n\n    # reload and compare with original notebook\n    model = await ensure_async(cm.get(path=tmp_script))\n\n    compare_notebooks(model[\"content\"], nb)\n\n\nasync def test_save_in_pct_and_lgt_auto_extensions(ipynb_py_R_jl_file, cm, tmpdir):\n    # load notebook\n    nb = jupytext.read(ipynb_py_R_jl_file)\n\n    auto_ext = auto_ext_from_metadata(nb.metadata)\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_pct_script = \"notebook.pct\" + auto_ext\n    tmp_lgt_script = \"notebook.lgt\" + auto_ext\n\n    # create contents manager with default load format as percent\n    cm.formats = \"ipynb,.pct.auto,.lgt.auto\"\n    cm.preferred_jupytext_formats_save = \".pct.auto:percent,.lgt.auto:light\"\n    cm.root_dir = str(tmpdir)\n\n    # save notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # check that text representation exists in percent format\n    with open(str(tmpdir.join(tmp_pct_script))) as stream:\n        assert read_format_from_metadata(stream.read(), auto_ext) == \"percent\"\n\n    # check that text representation exists in light format\n    with open(str(tmpdir.join(tmp_lgt_script))) as stream:\n        assert read_format_from_metadata(stream.read(), auto_ext) == \"light\"\n\n\nasync def test_metadata_filter_is_effective(ipynb_py_R_jl_file, cm, tmpdir):\n    if re.match(r\".*(magic|305).*\", ipynb_py_R_jl_file):\n        pytest.skip()\n    nb = jupytext.read(ipynb_py_R_jl_file)\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_script = \"notebook.py\"\n\n    # create contents manager\n    cm.root_dir = str(tmpdir)\n\n    # save notebook to tmpdir\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # set config\n    cm.formats = \"ipynb,py\"\n    cm.notebook_metadata_filter = \"jupytext,-all\"\n    cm.cell_metadata_filter = \"-all\"\n\n    # load notebook\n    nb = (await ensure_async(cm.get(tmp_ipynb)))[\"content\"]\n\n    assert nb.metadata[\"jupytext\"][\"cell_metadata_filter\"] == \"-all\"\n    assert nb.metadata[\"jupytext\"][\"notebook_metadata_filter\"] == \"jupytext,-all\"\n\n    # save notebook again\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_ipynb))\n\n    # read text version\n    nb2 = jupytext.read(str(tmpdir.join(tmp_script)))\n\n    # test no metadata\n    assert set(nb2.metadata.keys()) <= {\"jupytext\", \"kernelspec\"}\n    for cell in nb2.cells:\n        assert not cell.metadata\n\n    # read paired notebook\n    nb3 = (await ensure_async(cm.get(tmp_script)))[\"content\"]\n\n    compare_notebooks(nb3, nb)\n\n\nasync def test_no_metadata_added_to_scripts_139(tmpdir, cm):\n    tmp_script = str(tmpdir.join(\"script.py\"))\n    text = \"\"\"import os\n\n\nprint('hello1')\n\n\n\nprint('hello2')\n\"\"\"\n\n    with open(tmp_script, \"w\") as fp:\n        fp.write(text)\n\n    # create contents manager\n    cm.root_dir = str(tmpdir)\n\n    # Andre's config #139\n    cm.freeze_metadata = True\n    cm.notebook_metadata_filter = \"-all\"\n    cm.cell_metadata_filter = \"-lines_to_next_cell\"\n\n    # load notebook\n    model = await ensure_async(cm.get(\"script.py\"))\n\n    # add cell metadata\n    for cell in model[\"content\"].cells:\n        cell.metadata.update(\n            {\n                \"ExecuteTime\": {\n                    \"start_time\": \"2019-02-06T11:53:21.208644Z\",\n                    \"end_time\": \"2019-02-06T11:53:21.213071Z\",\n                }\n            }\n        )\n\n    # save notebook\n    await ensure_async(cm.save(model=model, path=\"script.py\"))\n\n    with open(tmp_script) as fp:\n        compare(fp.read(), text)\n\n\n@pytest.mark.parametrize(\"ext\", [\".py\", \".ipynb\"])\nasync def test_local_format_can_deactivate_pairing(ipynb_py_file, cm, ext, tmpdir):\n    \"\"\"This is a test for #157: local format can be used to deactivate the global pairing\"\"\"\n    nb = jupytext.read(ipynb_py_file)\n    nb.metadata[\"jupytext_formats\"] = ext[1:]  # py or ipynb\n\n    # create contents manager with default pairing\n    cm.formats = \"ipynb,py\"\n    cm.root_dir = str(tmpdir)\n\n    # save notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook\" + ext))\n\n    # check that only the text representation exists\n    assert os.path.isfile(str(tmpdir.join(\"notebook.py\"))) == (ext == \".py\")\n    assert os.path.isfile(str(tmpdir.join(\"notebook.ipynb\"))) == (ext == \".ipynb\")\n    nb2 = (await ensure_async(cm.get(\"notebook\" + ext)))[\"content\"]\n    compare_notebooks(nb2, nb)\n\n    # resave, check again\n    await ensure_async(cm.save(model=notebook_model(nb2), path=\"notebook\" + ext))\n\n    assert os.path.isfile(str(tmpdir.join(\"notebook.py\"))) == (ext == \".py\")\n    assert os.path.isfile(str(tmpdir.join(\"notebook.ipynb\"))) == (ext == \".ipynb\")\n    nb3 = (await ensure_async(cm.get(\"notebook\" + ext)))[\"content\"]\n    compare_notebooks(nb3, nb)\n\n\nasync def test_global_pairing_allows_to_save_other_file_types(rmd_file, cm, tmpdir):\n    \"\"\"This is a another test for #157: local format can be used to deactivate the global pairing\"\"\"\n    nb = jupytext.read(rmd_file)\n\n    # create contents manager with default pairing\n    cm.formats = \"ipynb,py\"\n    cm.root_dir = str(tmpdir)\n\n    # save notebook\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.Rmd\"))\n\n    # check that only the original file is saved\n    assert os.path.isfile(str(tmpdir.join(\"notebook.Rmd\")))\n    assert not os.path.isfile(str(tmpdir.join(\"notebook.py\")))\n    assert not os.path.isfile(str(tmpdir.join(\"notebook.ipynb\")))\n\n    nb2 = (await ensure_async(cm.get(\"notebook.Rmd\")))[\"content\"]\n    compare_notebooks(nb2, nb)\n\n\n@pytest.mark.requires_user_kernel_python3\nasync def test_python_kernel_preserves_R_files(r_file, cm, tmpdir):\n    \"\"\"Opening a R file with a Jupyter server that has no R kernel should not modify the file\"\"\"\n    tmp_r_file = str(tmpdir.join(\"script.R\"))\n    with open(r_file) as fp:\n        script = fp.read()\n    with open(tmp_r_file, \"w\") as fp:\n        fp.write(script)\n\n    # create contents manager\n    cm.root_dir = str(tmpdir)\n\n    # open notebook, set Python kernel and save\n    model = await ensure_async(cm.get(\"script.R\"))\n    model[\"content\"].metadata[\"kernelspec\"] = kernelspec_from_language(\"python\")\n    await ensure_async(cm.save(model=model, path=\"script.R\"))\n\n    with open(tmp_r_file) as fp:\n        script2 = fp.read()\n\n    compare(script2, script)\n\n\nasync def test_pair_notebook_in_another_folder(tmpdir, cm):\n    cm.root_dir = str(tmpdir)\n\n    os.makedirs(str(tmpdir.join(\"notebooks\")))\n    tmp_ipynb = str(tmpdir.join(\"notebooks/notebook_name.ipynb\"))\n    tmp_py = str(tmpdir.join(\"scripts/notebook_name.py\"))\n\n    await ensure_async(\n        cm.save(\n            model=notebook_model(\n                new_notebook(metadata={\"jupytext\": {\"formats\": \"notebooks//ipynb,scripts//py\"}}),\n            ),\n            path=\"notebooks/notebook_name.ipynb\",\n        )\n    )\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_py)\n\n    await ensure_async(cm.get(\"notebooks/notebook_name.ipynb\"))\n    await ensure_async(cm.get(\"scripts/notebook_name.py\"))\n\n\nasync def test_pair_notebook_in_dotdot_folder(tmpdir, cm):\n    cm.root_dir = str(tmpdir)\n\n    os.makedirs(str(tmpdir.join(\"notebooks\")))\n    tmp_ipynb = str(tmpdir.join(\"notebooks/notebook_name.ipynb\"))\n    tmp_py = str(tmpdir.join(\"scripts/notebook_name.py\"))\n\n    await ensure_async(\n        cm.save(\n            model=notebook_model(new_notebook(metadata={\"jupytext\": {\"formats\": \"ipynb,../scripts//py\"}})),\n            path=\"notebooks/notebook_name.ipynb\",\n        )\n    )\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_py)\n\n    await ensure_async(cm.get(\"notebooks/notebook_name.ipynb\"))\n    await ensure_async(cm.get(\"scripts/notebook_name.py\"))\n\n\nasync def test_split_at_heading_option(tmpdir, cm):\n    text = \"\"\"Markdown text\n\n# Header one\n\n## Header two\n\"\"\"\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n    with open(tmp_md, \"w\") as fp:\n        fp.write(text)\n\n    cm.root_dir = str(tmpdir)\n    cm.split_at_heading = True\n\n    nb = (await ensure_async(cm.get(\"notebook.md\")))[\"content\"]\n\n    # Was rst to md conversion effective?\n    assert nb.cells[0].source == \"Markdown text\"\n    assert nb.cells[1].source == \"# Header one\"\n    assert nb.cells[2].source == \"## Header two\"\n\n    nb.metadata[\"jupytext\"][\"notebook_metadata_filter\"] = \"-all\"\n    text2 = writes(nb, \"md\")\n    compare(text2, text)\n\n\nasync def test_load_then_change_formats(tmpdir, cm):\n    tmp_ipynb = str(tmpdir.join(\"nb.ipynb\"))\n    tmp_py = str(tmpdir.join(\"nb.py\"))\n    nb = new_notebook(metadata={\"jupytext\": {\"formats\": \"ipynb,py:light\"}})\n    write(nb, tmp_ipynb)\n\n    cm.root_dir = str(tmpdir)\n\n    model = await ensure_async(cm.get(\"nb.ipynb\"))\n    assert model[\"content\"].metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:light\"\n\n    await ensure_async(cm.save(model, path=\"nb.ipynb\"))\n    assert os.path.isfile(tmp_py)\n    assert read(tmp_py).metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:light\"\n\n    time.sleep(0.5)\n    del model[\"content\"].metadata[\"jupytext\"][\"formats\"]\n    await ensure_async(cm.save(model, path=\"nb.ipynb\"))\n    # test that we have not kept the 'ipynb/py' pairing info, and that we can read the ipynb\n    await ensure_async(cm.get(\"nb.ipynb\"))\n    os.remove(tmp_py)\n\n    model[\"content\"].metadata.setdefault(\"jupytext\", {})[\"formats\"] = \"ipynb,py:percent\"\n    await ensure_async(cm.save(model, path=\"nb.ipynb\"))\n    assert os.path.isfile(tmp_py)\n    assert read(tmp_py).metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:percent\"\n    os.remove(tmp_py)\n\n    del model[\"content\"].metadata[\"jupytext\"][\"formats\"]\n    await ensure_async(cm.save(model, path=\"nb.ipynb\"))\n    assert not os.path.isfile(tmp_py)\n\n\nasync def test_set_then_change_formats(tmpdir, cm):\n    tmp_py = str(tmpdir.join(\"nb.py\"))\n    nb = new_notebook(metadata={\"jupytext\": {\"formats\": \"ipynb,py:light\"}})\n\n    cm.root_dir = str(tmpdir)\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.ipynb\"))\n    assert os.path.isfile(tmp_py)\n    assert read(tmp_py).metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:light\"\n    os.remove(tmp_py)\n\n    nb.metadata[\"jupytext\"][\"formats\"] = \"ipynb,py:percent\"\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.ipynb\"))\n    assert os.path.isfile(tmp_py)\n    assert read(tmp_py).metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:percent\"\n    os.remove(tmp_py)\n\n    del nb.metadata[\"jupytext\"][\"formats\"]\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.ipynb\"))\n    assert not os.path.isfile(tmp_py)\n\n\nasync def test_set_then_change_auto_formats(tmpdir, cm, python_notebook):\n    tmp_ipynb = str(tmpdir.join(\"nb.ipynb\"))\n    tmp_py = str(tmpdir.join(\"nb.py\"))\n    tmp_rmd = str(tmpdir.join(\"nb.Rmd\"))\n    nb = new_notebook(metadata=python_notebook.metadata)\n\n    cm.root_dir = str(tmpdir)\n\n    # Pair ipynb/py and save\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,auto:light\"}\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.ipynb\"))\n    assert \"nb.py\" in cm.paired_notebooks\n    assert \"nb.auto\" not in cm.paired_notebooks\n    assert os.path.isfile(tmp_py)\n    assert read(tmp_ipynb).metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:light\"\n\n    # Pair ipynb/Rmd and save\n    time.sleep(0.5)\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,Rmd\"}\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.ipynb\"))\n    assert \"nb.Rmd\" in cm.paired_notebooks\n    assert \"nb.py\" not in cm.paired_notebooks\n    assert \"nb.auto\" not in cm.paired_notebooks\n    assert os.path.isfile(tmp_rmd)\n    assert read(tmp_ipynb).metadata[\"jupytext\"][\"formats\"] == \"ipynb,Rmd\"\n    await ensure_async(cm.get(\"nb.ipynb\"))\n\n    # Unpair and save\n    time.sleep(0.5)\n    del nb.metadata[\"jupytext\"]\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.ipynb\"))\n    assert \"nb.Rmd\" not in cm.paired_notebooks\n    assert \"nb.py\" not in cm.paired_notebooks\n    assert \"nb.auto\" not in cm.paired_notebooks\n    await ensure_async(cm.get(\"nb.ipynb\"))\n\n\nasync def test_share_py_recreate_ipynb(tmpdir, cm, ipynb_py_R_jl_file):\n    tmp_ipynb = str(tmpdir.join(\"nb.ipynb\"))\n    tmp_py = str(tmpdir.join(\"nb.py\"))\n\n    cm.root_dir = str(tmpdir)\n\n    # set default py format\n    cm.preferred_jupytext_formats_save = \"py:percent\"\n\n    # every new file is paired\n    cm.formats = \"ipynb,py\"\n\n    # the text files don't need a YAML header\n    cm.notebook_metadata_filter = \"-all\"\n    cm.cell_metadata_filter = \"-all\"\n\n    nb = read(ipynb_py_R_jl_file)\n    model_ipynb = await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.ipynb\"))\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_py)\n\n    os.remove(tmp_ipynb)\n\n    # reopen and save nb.py\n    model = await ensure_async(cm.get(\"nb.py\"))\n    await ensure_async(cm.save(model=model, path=\"nb.py\"))\n\n    # ipynb is re-created\n    assert os.path.isfile(tmp_ipynb)\n\n    # save time of ipynb is that of py file\n    assert model_ipynb[\"last_modified\"] == model[\"last_modified\"]\n\n\nasync def test_vim_folding_markers(tmpdir, cm):\n    tmp_ipynb = str(tmpdir.join(\"nb.ipynb\"))\n    tmp_py = str(tmpdir.join(\"nb.py\"))\n\n    cm.root_dir = str(tmpdir)\n\n    # Default Vim folding markers\n    cm.cell_markers = \"{{{,}}}\"\n    cm.formats = \"ipynb,py:light\"\n\n    nb = new_notebook(\n        cells=[\n            new_code_cell(\n                \"\"\"# region\n'''Sample cell with region markers'''\n'''End of the cell'''\n# end region\"\"\"\n            ),\n            new_code_cell(\"a = 1\\n\\n\\nb = 1\"),\n        ]\n    )\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.ipynb\"))\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_py)\n\n    nb2 = (await ensure_async(cm.get(\"nb.ipynb\")))[\"content\"]\n    compare_notebooks(nb2, nb)\n\n    nb3 = read(tmp_py)\n    assert nb3.metadata[\"jupytext\"][\"cell_markers\"] == \"{{{,}}}\"\n\n    with open(tmp_py) as fp:\n        text = fp.read()\n\n    # Remove YAML header\n    text = re.sub(re.compile(r\"# ---.*# ---\\n\\n\", re.DOTALL), \"\", text)\n\n    compare(\n        text,\n        \"\"\"# region\n'''Sample cell with region markers'''\n'''End of the cell'''\n# end region\n\n# {{{\na = 1\n\n\nb = 1\n# }}}\n\"\"\",\n    )\n\n\nasync def test_vscode_pycharm_folding_markers(tmpdir, cm):\n    tmp_ipynb = str(tmpdir.join(\"nb.ipynb\"))\n    tmp_py = str(tmpdir.join(\"nb.py\"))\n\n    cm.root_dir = str(tmpdir)\n\n    # Default VScode/PyCharm folding markers\n    cm.cell_markers = \"region,endregion\"\n    cm.formats = \"ipynb,py:light\"\n\n    nb = new_notebook(\n        cells=[\n            new_code_cell(\n                \"\"\"# {{{\n'''Sample cell with region markers'''\n'''End of the cell'''\n# }}}\"\"\"\n            ),\n            new_code_cell(\"a = 1\\n\\n\\nb = 1\"),\n        ]\n    )\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.ipynb\"))\n\n    assert os.path.isfile(tmp_ipynb)\n    assert os.path.isfile(tmp_py)\n\n    nb2 = (await ensure_async(cm.get(\"nb.ipynb\")))[\"content\"]\n    compare_notebooks(nb2, nb)\n\n    nb3 = read(tmp_py)\n    assert nb3.metadata[\"jupytext\"][\"cell_markers\"] == \"region,endregion\"\n\n    with open(tmp_py) as fp:\n        text = fp.read()\n\n    # Remove YAML header\n    text = re.sub(re.compile(r\"# ---.*# ---\\n\\n\", re.DOTALL), \"\", text)\n\n    compare(\n        text,\n        \"\"\"# {{{\n'''Sample cell with region markers'''\n'''End of the cell'''\n# }}}\n\n# region\na = 1\n\n\nb = 1\n# endregion\n\"\"\",\n    )\n\n\nasync def test_open_file_with_cell_markers(tmpdir, cm):\n    tmp_py = str(tmpdir.join(\"nb.py\"))\n\n    cm.root_dir = str(tmpdir)\n\n    # Default VScode/PyCharm folding markers\n    cm.cell_markers = \"region,endregion\"\n\n    text = \"\"\"# +\n# this is a unique code cell\n1 + 1\n\n2 + 2\n\"\"\"\n\n    with open(tmp_py, \"w\") as fp:\n        fp.write(text)\n\n    nb = (await ensure_async(cm.get(\"nb.py\")))[\"content\"]\n    assert len(nb.cells) == 1\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.py\"))\n\n    with open(tmp_py) as fp:\n        text2 = fp.read()\n\n    expected = \"\"\"# region\n# this is a unique code cell\n1 + 1\n\n2 + 2\n# endregion\n\"\"\"\n\n    compare(text2, expected)\n\n\nasync def test_save_file_with_cell_markers(tmpdir, cm):\n    tmp_py = str(tmpdir.join(\"nb.py\"))\n\n    cm.root_dir = str(tmpdir)\n\n    # Default VScode/PyCharm folding markers\n    cm.cell_markers = \"region,endregion\"\n\n    text = \"\"\"# +\n# this is a unique code cell\n1 + 1\n\n2 + 2\n\"\"\"\n\n    with open(tmp_py, \"w\") as fp:\n        fp.write(text)\n\n    nb = (await ensure_async(cm.get(\"nb.py\")))[\"content\"]\n    assert len(nb.cells) == 1\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"nb.py\"))\n\n    with open(tmp_py) as fp:\n        text2 = fp.read()\n\n    compare(\n        text2,\n        \"\"\"# region\n# this is a unique code cell\n1 + 1\n\n2 + 2\n# endregion\n\"\"\",\n    )\n\n    nb2 = (await ensure_async(cm.get(\"nb.py\")))[\"content\"]\n    compare_notebooks(nb2, nb)\n    assert nb2.metadata[\"jupytext\"][\"cell_markers\"] == \"region,endregion\"\n\n\nasync def test_notebook_extensions(tmpdir, cm, cwd_tmpdir):\n    nb = new_notebook()\n    write(nb, \"script.py\")\n    write(nb, \"notebook.Rmd\")\n    write(nb, \"notebook.ipynb\")\n\n    cm.root_dir = str(tmpdir)\n    cm.notebook_extensions = \"ipynb,Rmd\"\n\n    model = await ensure_async(cm.get(\"notebook.ipynb\"))\n    assert model[\"type\"] == \"notebook\"\n\n    model = await ensure_async(cm.get(\"notebook.Rmd\"))\n    assert model[\"type\"] == \"notebook\"\n\n    model = await ensure_async(cm.get(\"script.py\"))\n    assert model[\"type\"] == \"file\"\n\n\nasync def test_notebook_extensions_in_config(tmpdir, cm, cwd_tmpdir):\n    nb = new_notebook()\n    write(nb, \"script.py\")\n    write(nb, \"notebook.Rmd\")\n    write(nb, \"notebook.ipynb\")\n    tmpdir.join(\"jupytext.toml\").write(\"\"\"notebook_extensions = [\"ipynb\", \"Rmd\"]\"\"\")\n\n    cm.root_dir = str(tmpdir)\n\n    model = await ensure_async(cm.get(\"notebook.ipynb\"))\n    assert model[\"type\"] == \"notebook\"\n\n    model = await ensure_async(cm.get(\"notebook.Rmd\"))\n    assert model[\"type\"] == \"notebook\"\n\n    model = await ensure_async(cm.get(\"script.py\"))\n    assert model[\"type\"] == \"file\"\n\n\nasync def test_invalid_config_in_cm(tmpdir, cm, cwd_tmpdir):\n    nb = new_notebook()\n    write(nb, \"notebook.ipynb\")\n    tmpdir.join(\"pyproject.toml\").write(\n        \"\"\"[tool.jupysql.SqlMagic]\nautopandas = False\ndisplaylimit = 1\"\"\"\n    )\n\n    cm.root_dir = str(tmpdir)\n\n    # list directory\n    await ensure_async(cm.get(\"\"))\n\n    model = await ensure_async(cm.get(\"notebook.ipynb\"))\n    assert model[\"type\"] == \"notebook\"\n\n\nasync def test_download_file_318(tmpdir, cm):\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n\n    nb = new_notebook()\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,py\"}\n    write(nb, tmp_ipynb)\n    write(nb, tmp_py)\n\n    cm.root_dir = str(tmpdir)\n    cm.notebook_extensions = \"ipynb\"\n\n    model = await ensure_async(cm.get(\"notebook.ipynb\", content=True, type=None, format=None))\n    assert model[\"type\"] == \"notebook\"\n\n\nasync def test_markdown_and_r_extensions(tmpdir, cm):\n    tmp_r = str(tmpdir.join(\"script.r\"))\n    tmp_markdown = str(tmpdir.join(\"notebook.markdown\"))\n\n    nb = new_notebook()\n    write(nb, tmp_r)\n    write(nb, tmp_markdown)\n\n    cm.root_dir = str(tmpdir)\n\n    model = await ensure_async(cm.get(\"script.r\"))\n    assert model[\"type\"] == \"notebook\"\n\n    model = await ensure_async(cm.get(\"notebook.markdown\"))\n    assert model[\"type\"] == \"notebook\"\n\n\nasync def test_server_extension_issubclass(cm):\n    class SubClassTextFileContentsManager(jupytext.TextFileContentsManager):\n        pass\n\n    assert not isinstance(SubClassTextFileContentsManager, jupytext.TextFileContentsManager)\n    assert issubclass(SubClassTextFileContentsManager, jupytext.TextFileContentsManager)\n\n\nasync def test_multiple_pairing(tmpdir, cm):\n    \"\"\"Test that multiple pairing works. Input cells are loaded from the most recent text representation among\n    the paired ones\"\"\"\n    tmp_ipynb = str(tmpdir.join(\"notebook.ipynb\"))\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n    tmp_py = str(tmpdir.join(\"notebook.py\"))\n\n    def nb(text):\n        return new_notebook(\n            cells=[new_markdown_cell(text)],\n            metadata={\"jupytext\": {\"formats\": \"ipynb,md,py\"}},\n        )\n\n    cm.root_dir = str(tmpdir)\n\n    await ensure_async(cm.save(model=notebook_model(nb(\"saved from cm\")), path=\"notebook.ipynb\"))\n    compare_notebooks(jupytext.read(tmp_ipynb), nb(\"saved from cm\"))\n    compare_notebooks(jupytext.read(tmp_md), nb(\"saved from cm\"))\n    compare_notebooks(jupytext.read(tmp_py), nb(\"saved from cm\"))\n\n    jupytext.write(nb(\"md edited\"), tmp_md)\n    model = await ensure_async(cm.get(\"notebook.ipynb\"))\n    compare_notebooks(model[\"content\"], nb(\"md edited\"))\n\n    await ensure_async(cm.save(model=model, path=\"notebook.ipynb\"))\n    compare_notebooks(jupytext.read(tmp_ipynb), nb(\"md edited\"))\n    compare_notebooks(jupytext.read(tmp_md), nb(\"md edited\"))\n    compare_notebooks(jupytext.read(tmp_py), nb(\"md edited\"))\n\n    jupytext.write(nb(\"py edited\"), tmp_py)\n\n    # Loading the md file give the content of that file\n    model = await ensure_async(cm.get(\"notebook.md\"))\n    compare_notebooks(model[\"content\"], nb(\"md edited\"))\n\n    # Loading the ipynb files gives the content of the most recent text file\n    model = await ensure_async(cm.get(\"notebook.ipynb\"))\n    compare_notebooks(model[\"content\"], nb(\"py edited\"))\n\n    await ensure_async(cm.save(model=model, path=\"notebook.ipynb\"))\n    compare_notebooks(jupytext.read(tmp_ipynb), nb(\"py edited\"))\n    compare_notebooks(jupytext.read(tmp_md), nb(\"py edited\"))\n    compare_notebooks(jupytext.read(tmp_py), nb(\"py edited\"))\n\n    model_ipynb = await ensure_async(cm.get(\"notebook.ipynb\", content=False, load_alternative_format=False))\n    model_md = await ensure_async(cm.get(\"notebook.md\", content=False, load_alternative_format=False))\n    model_py = await ensure_async(cm.get(\"notebook.py\", content=False, load_alternative_format=False))\n\n    # ipynb is the oldest one, then py, then md\n    # so that we read cell inputs from the py file\n    assert model_ipynb[\"last_modified\"] <= model_py[\"last_modified\"]\n    assert model_py[\"last_modified\"] <= model_md[\"last_modified\"]\n\n\nasync def test_filter_jupytext_version_information_416(python_notebook, cm, tmpdir, cwd_tmpdir):\n    cm.root_dir = str(tmpdir)\n    cm.notebook_metadata_filter = \"-jupytext.text_representation.jupytext_version\"\n\n    # load notebook\n    notebook = python_notebook\n    notebook.metadata[\"jupytext_formats\"] = \"ipynb,py\"\n    model = notebook_model(notebook)\n\n    # save to ipynb and py\n    await ensure_async(cm.save(model=model, path=\"notebook.ipynb\"))\n\n    assert os.path.isfile(\"notebook.py\")\n\n    # read py file\n    with open(\"notebook.py\") as fp:\n        text = fp.read()\n\n    assert \"---\" in text\n    assert \"jupytext:\" in text\n    assert \"kernelspec:\" in text\n    assert \"jupytext_version:\" not in text\n\n\n@pytest.mark.requires_myst\nasync def test_new_untitled(tmpdir, cm):\n    cm.root_dir = str(tmpdir)\n\n    # untitled is \"Untitled\" only when the locale is English #636\n    untitled, ext = (await ensure_async(cm.new_untitled(type=\"notebook\")))[\"path\"].split(\".\")\n    assert untitled\n    assert ext == \"ipynb\"\n\n    # Jupytext related files\n    assert (await ensure_async(cm.new_untitled(type=\"notebook\", ext=\".md\")))[\"path\"] == untitled + \"1.md\"\n    assert (await ensure_async(cm.new_untitled(type=\"notebook\", ext=\".py\")))[\"path\"] == untitled + \"2.py\"\n    assert (await ensure_async(cm.new_untitled(type=\"notebook\", ext=\".md:myst\")))[\"path\"] == untitled + \"3.md\"\n    assert (await ensure_async(cm.new_untitled(type=\"notebook\", ext=\".py:percent\")))[\"path\"] == untitled + \"4.py\"\n    assert (await ensure_async(cm.new_untitled(type=\"notebook\", ext=\".Rmd\")))[\"path\"] == untitled + \"5.Rmd\"\n\n    # Test native formats that should not be changed by Jupytext and model should\n    # not contain any Jupytext metadata neither file name should start with Uppercase\n    for ext in [\".py\", \".md\"]:\n        model = await ensure_async(cm.new_untitled(type=\"file\", ext=ext))\n        assert model[\"content\"] is None\n        assert model[\"path\"] == f\"untitled{ext}\"\n    assert (await ensure_async(cm.new_untitled(type=\"directory\")))[\"path\"] == \"Untitled Folder\"\n\n\nasync def test_nested_prefix(tmpdir, cm):\n    cm.root_dir = str(tmpdir)\n\n    # save to ipynb and py\n    nb = new_notebook(\n        cells=[new_code_cell(\"1+1\"), new_markdown_cell(\"Some text\")],\n        metadata={\"jupytext\": {\"formats\": \"ipynb,nested/prefix//.py\"}},\n    )\n    await ensure_async(cm.save(model=notebook_model(nb), path=\"notebook.ipynb\"))\n\n    assert tmpdir.join(\"nested\").join(\"prefix\").join(\"notebook.py\").isfile()\n\n\nasync def test_timestamp_is_correct_after_reload_978(tmp_path, cm, python_notebook):\n    \"\"\"Here we reproduce the conditions in Issue #978 and make sure no\n    warning is generated\"\"\"\n    nb = python_notebook\n    nb.metadata[\"jupytext\"] = {\"formats\": \"ipynb,py:percent\"}\n\n    cm.root_dir = str(tmp_path)\n\n    ipynb_py_R_jl_file = tmp_path / \"nb.ipynb\"\n    py_file = tmp_path / \"nb.py\"\n\n    # 1. Save the paired notebook\n    await ensure_async(cm.save(notebook_model(nb), path=\"nb.ipynb\"))\n    assert ipynb_py_R_jl_file.exists()\n    assert py_file.exists()\n\n    # and reload to get the original timestamp\n    org_model = await ensure_async(cm.get(\"nb.ipynb\"))\n\n    # 2. Edit the py file\n    time.sleep(0.5)\n    text = py_file.read_text()\n    text = (\n        text\n        + \"\"\"\n\n# %%\n# A new cell\n2 + 2\n\"\"\"\n    )\n\n    py_file.write_text(text)\n\n    # 3. Reload the paired notebook and make sure it has the modified content\n    model = await ensure_async(cm.get(\"nb.ipynb\"))\n    nb = model[\"content\"]\n    assert \"A new cell\" in nb.cells[-1].source\n    assert model[\"last_modified\"] > org_model[\"last_modified\"]\n\n\nasync def test_move_paired_notebook_to_subdir_1059(tmp_path, cm, python_notebook):\n    (tmp_path / \"jupytext.toml\").write_text('formats = \"notebooks///ipynb,scripts///py:percent\"\\n')\n    cm.root_dir = str(tmp_path)\n\n    # create paired notebook\n    (tmp_path / \"notebooks\").mkdir()\n    await ensure_async(cm.save(notebook_model(python_notebook), path=\"notebooks/my_notebook.ipynb\"))\n    assert (tmp_path / \"notebooks\" / \"my_notebook.ipynb\").exists()\n    assert (tmp_path / \"scripts\" / \"my_notebook.py\").exists()\n\n    # move notebook\n    (tmp_path / \"notebooks\" / \"subdir\").mkdir()\n    await ensure_async(cm.rename_file(\"notebooks/my_notebook.ipynb\", \"notebooks/subdir/my_notebook.ipynb\"))\n    assert (tmp_path / \"notebooks\" / \"subdir\" / \"my_notebook.ipynb\").exists()\n    assert (tmp_path / \"scripts\" / \"subdir\" / \"my_notebook.py\").exists()\n\n    assert not (tmp_path / \"notebooks\" / \"my_notebook.ipynb\").exists()\n    assert not (tmp_path / \"scripts\" / \"my_notebook.py\").exists()\n\n    # check notebook content\n    model = await ensure_async(cm.get(\"scripts/subdir/my_notebook.py\"))\n    nb = model[\"content\"]\n    compare_notebooks(nb, python_notebook, fmt=\"py:percent\")\n\n\ndef list_folder_contents(tmp_path):\n    return [\n        str(file_path.relative_to(tmp_path))\n        for file_path in (tmp_path).rglob(\"*\")\n        if file_path.is_file() and \".ipynb_checkpoints\" not in file_path.parts\n    ]\n\n\n@pytest.mark.parametrize(\"copy\", [False, True])\n@pytest.mark.parametrize(\"config_file\", [False, True])\nasync def test_move_paired_notebook_outside_of_notebook_dir_1414(tmp_path, cm, python_notebook, copy: bool, config_file: bool):\n    cm.root_dir = str(tmp_path)\n    nb = python_notebook\n    if config_file:\n        (tmp_path / \"jupytext.toml\").write_text('formats = \"notebooks///ipynb,scripts///py:percent\"\\n')\n    else:\n        nb.metadata[\"jupytext\"] = {\"formats\": [\"notebooks///ipynb\", \"scripts///py:percent\"]}\n\n    # create paired notebook\n    (tmp_path / \"notebooks\").mkdir()\n    await ensure_async(cm.save(notebook_model(python_notebook), path=\"notebooks/my_notebook.ipynb\"))\n    assert (tmp_path / \"notebooks\" / \"my_notebook.ipynb\").exists()\n    assert (tmp_path / \"scripts\" / \"my_notebook.py\").exists()\n    folder_contents = list_folder_contents(tmp_path)\n    assert len(folder_contents) == 2 + config_file, folder_contents\n\n    # move notebook still within the config reach, but outside the notebooks folder\n    if copy:\n        await ensure_async(cm.copy(\"notebooks/my_notebook.ipynb\", \"my_notebook.ipynb\"))\n    else:\n        await ensure_async(cm.rename_file(\"notebooks/my_notebook.ipynb\", \"my_notebook.ipynb\"))\n    assert (tmp_path / \"notebooks\" / \"my_notebook.ipynb\").exists() == copy\n    assert (tmp_path / \"scripts\" / \"my_notebook.py\").exists()\n    assert (tmp_path / \"my_notebook.ipynb\").exists()\n    folder_contents = list_folder_contents(tmp_path)\n    assert len(folder_contents) == 2 + copy + config_file, folder_contents\n\n    # Open and save the notebook - this should create no additional file\n    model = await ensure_async(cm.get(\"my_notebook.ipynb\"))\n    await ensure_async(cm.save(model=model, path=\"my_notebook.ipynb\"))\n    folder_contents = list_folder_contents(tmp_path)\n    assert len(folder_contents) == 2 + copy + config_file, folder_contents\n\n\nasync def test_move_paired_notebook_outside_of_pairing_config_1414(tmp_path, cm, python_notebook):\n    (tmp_path / \"within_config\").mkdir()\n    (tmp_path / \"within_config\" / \"jupytext.toml\").write_text('formats = \"notebooks///ipynb,scripts///py:percent\"\\n')\n    cm.root_dir = str(tmp_path)\n\n    # create paired notebook\n    (tmp_path / \"within_config\" / \"notebooks\").mkdir()\n    await ensure_async(\n        cm.save(\n            notebook_model(python_notebook),\n            path=\"within_config/notebooks/my_notebook.ipynb\",\n        )\n    )\n    assert (tmp_path / \"within_config\" / \"notebooks\" / \"my_notebook.ipynb\").exists()\n    assert (tmp_path / \"within_config\" / \"scripts\" / \"my_notebook.py\").exists()\n    folder_contents = list_folder_contents(tmp_path)\n    assert len(folder_contents) == 3, folder_contents\n\n    # move notebook still within the config reach, but outside the notebooks folder\n    (tmp_path / \"other\").mkdir()\n    await ensure_async(cm.rename_file(\"within_config/notebooks/my_notebook.ipynb\", \"other/my_notebook.ipynb\"))\n    assert not (tmp_path / \"within_config\" / \"notebooks\" / \"my_notebook.ipynb\").exists()\n    assert (tmp_path / \"other\" / \"my_notebook.ipynb\").exists()\n    assert (tmp_path / \"within_config\" / \"scripts\" / \"my_notebook.py\").exists()\n    folder_contents = list_folder_contents(tmp_path)\n    assert len(folder_contents) == 3, folder_contents\n\n    # Open and save the notebook - this should create no additional file\n    model = await ensure_async(cm.get(\"other/my_notebook.ipynb\"))\n    await ensure_async(cm.save(model=model, path=\"other/my_notebook.ipynb\"))\n    assert not (tmp_path / \"within_config\" / \"notebooks\" / \"my_notebook.ipynb\").exists()\n    assert (tmp_path / \"other\" / \"my_notebook.ipynb\").exists()\n    assert (tmp_path / \"within_config\" / \"scripts\" / \"my_notebook.py\").exists()\n    folder_contents = list_folder_contents(tmp_path)\n    assert len(folder_contents) == 3, folder_contents\n\n\nasync def test_hash_changes_if_paired_file_is_edited(tmp_path, cm, python_notebook):\n    # 1. write py ipynb\n\n    if \"require_hash\" not in inspect.signature(cm.get).parameters:\n        pytest.skip(reason=\"This JupytextContentsManager does not have a 'require_hash' parameter in cm.get\")\n\n    cm.formats = \"ipynb,py:percent\"\n    cm.root_dir = str(tmp_path)\n\n    # save ipynb\n    nb = python_notebook\n    nb_name = \"notebook.ipynb\"\n    await ensure_async(cm.save(model=notebook_model(nb), path=nb_name))\n    org_model = await ensure_async(cm.get(nb_name, require_hash=True))\n\n    py_file = tmp_path / \"notebook.py\"\n\n    text = py_file.read_text()\n    assert \"# %% [markdown]\" in text.splitlines(), text\n\n    # modify the timestamp of the paired file\n    time.sleep(0.5)\n    py_file.write_text(text)\n    model = await ensure_async(cm.get(nb_name, require_hash=True))\n    # not sure why the hash changes on Windows?\n    assert (model[\"hash\"] == org_model[\"hash\"]) or (os.name == \"nt\")\n\n    # modify the paired file\n    py_file.write_text(text + \"\\n# %%\\n1 + 1\\n\")\n\n    new_model = await ensure_async(cm.get(nb_name, require_hash=True))\n    assert new_model[\"hash\"] != org_model[\"hash\"]\n\n    # the hash is for the pair (inputs first)\n    model_from_py_file = await ensure_async(cm.get(\"notebook.py\", require_hash=True))\n    assert model_from_py_file[\"hash\"] == new_model[\"hash\"]\n\n\n@pytest.mark.requires_myst\nasync def test_metadata_stays_in_order_1368(\n    tmp_path,\n    cm,\n    md=\"\"\"---\njupytext:\n  formats: md:myst\n  notebook_metadata_filter: -jupytext.text_representation.jupytext_version\n  text_representation:\n    extension: .md\n    format_name: myst\n    format_version: 0.13\nkernelspec:\n  display_name: itables\n  language: python\n  name: itables\n---\n\nA markdown cell\n\"\"\",\n):\n    cm.root_dir = str(tmp_path)\n\n    (tmp_path / \"nb.md\").write_text(md)\n\n    model = await ensure_async(cm.get(path=\"nb.md\"))\n    assert list(model[\"content\"][\"metadata\"].keys()) == [\n        \"jupytext\",\n        \"kernelspec\",\n    ], \"order must be preserved\"\n\n    await ensure_async(cm.save(model=model, path=\"nb.md\"))\n    compare((tmp_path / \"nb.md\").read_text(), md)\n\n\n@pytest.mark.requires_myst\nasync def test_jupytext_orders_root_metadata(\n    tmp_path,\n    cm,\n    md=\"\"\"---\ntitle: Quick test\njupytext:\n  formats: md:myst\n  notebook_metadata_filter: -jupytext.text_representation.jupytext_version\n  root_level_metadata_filter: -title\n  text_representation:\n    extension: .md\n    format_name: myst\n    format_version: 0.13\nkernelspec:\n  display_name: itables\n  language: python\n  name: itables\n---\n\nA markdown cell\n\"\"\",\n):\n    cm.root_dir = str(tmp_path)\n\n    (tmp_path / \"nb.md\").write_text(md)\n\n    model = await ensure_async(cm.get(path=\"nb.md\"))\n    assert list(model[\"content\"][\"metadata\"].keys()) == [\n        \"jupytext\",\n        \"kernelspec\",\n    ], \"order must be preserved\"\n\n    # simulate jupyter changing the order of the metadata\n    model[\"content\"][\"metadata\"][\"jupytext\"] = model[\"content\"][\"metadata\"].pop(\"jupytext\")\n    assert list(model[\"content\"][\"metadata\"].keys()) == [\"kernelspec\", \"jupytext\"]\n\n    await ensure_async(cm.save(model=model, path=\"nb.md\"))\n    compare((tmp_path / \"nb.md\").read_text(), md)\n\n\n@pytest.mark.parametrize(\"with_config\", [False, True])\nasync def test_load_save_keeps_simple_python_file_unchanged(tmp_path, cm, with_config: bool):\n    \"\"\"Test that jupytext --sync on a simple Python file leaves it unchanged,\n    even if a Jupytext configuration has formats=ipynb,py:percent\n    \"\"\"\n    cm.root_dir = str(tmp_path)\n\n    if with_config:\n        config_file = tmp_path / \"jupytext.toml\"\n        config_file.write_text('formats = \"ipynb,py:percent\"')\n\n    # Create a simple Python file without jupytext metadata\n    py_file = tmp_path / \"simple.py\"\n    py_content = '''#!/usr/bin/env python3\n\"\"\"A simple Python script\"\"\"\n\ndef hello():\n    print(\"Hello, world!\")\n\nif __name__ == \"__main__\":\n    hello()\n'''\n    py_file.write_text(py_content)\n\n    # Record original content\n    original_content = py_file.read_text()\n\n    # Open and save the file using our contents manager\n    model = await ensure_async(cm.get(path=\"simple.py\"))\n    await ensure_async(cm.save(model=model, path=\"simple.py\"))\n\n    # Verify file is unchanged\n    final_content = py_file.read_text()\n    assert final_content == original_content, \"File content should be unchanged\"\n\n    # Verify no additional files were created\n    files_in_dir = list(tmp_path.iterdir())\n    if with_config:\n        assert len(files_in_dir) == 2, f\"Expected only 2 files, found: {[f.name for f in files_in_dir]}\"\n        assert set(files_in_dir) == {py_file, config_file}\n    else:\n        assert len(files_in_dir) == 1, f\"Expected only 1 file, found: {[f.name for f in files_in_dir]}\"\n        assert files_in_dir[0] == py_file\n\n\nasync def test_pairing_groups_in_contents_manager(tmp_path, cm, python_notebook):\n    cm.root_dir = str(tmp_path)\n\n    # With config file using list-based formats\n    (tmp_path / \"jupytext.toml\").write_text(\n        \"\"\"\n# Tutorial notebooks get paired to markdown docs\n[[formats]]\n\"notebooks/tutorials/\" = \"ipynb\"\n\"docs/\" = \"md\"\n\n# Main pairing: all other notebooks are paired with Python scripts\n[[formats]]\n\"\" = \"ipynb,py:percent\"\n\"\"\"\n    )\n    cm = jupytext.TextFileContentsManager()\n    cm.root_dir = str(tmp_path)\n\n    (tmp_path / \"notebooks\").mkdir()\n    await ensure_async(cm.save(model=notebook_model(python_notebook), path=\"notebooks/notebook.ipynb\"))\n    assert (tmp_path / \"notebooks\" / \"notebook.ipynb\").exists()\n    assert (tmp_path / \"notebooks\" / \"notebook.py\").exists()\n    assert not (tmp_path / \"docs\" / \"notebook.md\").exists()\n\n    # A notebook under 'tutorials' is paired to md in the docs folder\n    (tmp_path / \"notebooks\" / \"tutorials\").mkdir()\n    await ensure_async(cm.save(model=notebook_model(python_notebook), path=\"notebooks/tutorials/notebook.ipynb\"))\n    assert (tmp_path / \"notebooks\" / \"tutorials\" / \"notebook.ipynb\").exists()\n    assert not (tmp_path / \"notebooks\" / \"tutorials\" / \"notebook.py\").exists()\n    assert (tmp_path / \"docs\" / \"notebook.md\").exists()\n"
  },
  {
    "path": "tests/integration/contents_manager/test_load_multiple.py",
    "content": "import pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_notebook\nfrom tornado.web import HTTPError\n\nimport jupytext\n\n\n@pytest.mark.asyncio\nasync def test_combine_same_version_ok(tmpdir, cm):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_nbpy = \"notebook.py\"\n\n    with open(str(tmpdir.join(tmp_nbpy)), \"w\") as fp:\n        fp.write(\n            \"\"\"# ---\n# jupyter:\n#   jupytext_formats: ipynb,py\n#   jupytext_format_version: '1.2'\n# ---\n\n# New cell\n\"\"\"\n        )\n\n    nb = new_notebook(metadata={\"jupytext_formats\": \"ipynb,py\"})\n    jupytext.write(nb, str(tmpdir.join(tmp_ipynb)))\n\n    cm.formats = \"ipynb,py\"\n    cm.root_dir = str(tmpdir)\n\n    nb = await ensure_async(cm.get(tmp_ipynb))\n    cells = nb[\"content\"][\"cells\"]\n    assert len(cells) == 1\n    assert cells[0].cell_type == \"markdown\"\n    assert cells[0].source == \"New cell\"\n\n\n@pytest.mark.asyncio\nasync def test_combine_lower_version_raises(tmpdir, cm):\n    tmp_ipynb = \"notebook.ipynb\"\n    tmp_nbpy = \"notebook.py\"\n\n    with open(str(tmpdir.join(tmp_nbpy)), \"w\") as fp:\n        fp.write(\n            \"\"\"# ---\n# jupyter:\n#   jupytext_formats: ipynb,py\n#   jupytext_format_version: '0.0'\n# ---\n\n# New cell\n\"\"\"\n        )\n\n    nb = new_notebook(metadata={\"jupytext_formats\": \"ipynb,py\"})\n    jupytext.write(nb, str(tmpdir.join(tmp_ipynb)))\n\n    cm.formats = \"ipynb,py\"\n    cm.root_dir = str(tmpdir)\n\n    with pytest.raises(HTTPError):\n        await ensure_async(cm.get(tmp_ipynb))\n"
  },
  {
    "path": "tests/integration/jupytext_config/test_jupytext_config.py",
    "content": "from jupytext.cli import system\n\n\ndef test_jupytext_config_cli(tmp_path):\n    settings_file = tmp_path / \"default_setting_overrides.json\"\n    system(\"jupytext-config\", \"-h\")\n    system(\n        \"jupytext-config\",\n        \"--settings-file\",\n        str(settings_file),\n        \"set-default-viewer\",\n        \"python\",\n        \"markdown\",\n    )\n    assert \"python\" in (settings_file).read_text()\n    assert \"markdown\" in system(\"jupytext-config\", \"--settings-file\", settings_file, \"list-default-viewer\")\n    system(\n        \"jupytext-config\",\n        \"--settings-file\",\n        str(settings_file),\n        \"unset-default-viewer\",\n        \"markdown\",\n    )\n    list_viewers = system(\"jupytext-config\", \"--settings-file\", settings_file, \"list-default-viewer\")\n    assert \"python\" in list_viewers\n    assert \"markdown\" not in list_viewers\n"
  },
  {
    "path": "tests/unit/test_cell_id.py",
    "content": "from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_raw_cell\n\n\ndef test_cell_id_is_not_random():\n    assert new_code_cell().id == \"cell-1\"\n    assert new_code_cell().id == \"cell-2\"\n    assert new_markdown_cell().id == \"cell-3\"\n    assert new_raw_cell().id == \"cell-4\"\n"
  },
  {
    "path": "tests/unit/test_compare.py",
    "content": "import pytest\nfrom nbformat.v4.nbbase import (\n    new_code_cell,\n    new_markdown_cell,\n    new_notebook,\n    new_raw_cell,\n)\n\nfrom jupytext.compare import (\n    NotebookDifference,\n    compare,\n    compare_cells,\n    compare_notebooks,\n)\nfrom jupytext.compare import test_round_trip_conversion as round_trip_conversion\n\n\ndef notebook_metadata():\n    return {\n        \"kernelspec\": {\n            \"display_name\": \"Python 3\",\n            \"language\": \"python\",\n            \"name\": \"python3\",\n        },\n        \"language_info\": {\n            \"codemirror_mode\": {\"name\": \"ipython\", \"version\": 3},\n            \"file_extension\": \".py\",\n            \"mimetype\": \"text/x-python\",\n            \"name\": \"python\",\n            \"nbconvert_exporter\": \"python\",\n            \"pygments_lexer\": \"ipython3\",\n            \"version\": \"3.7.3\",\n        },\n        \"toc\": {\n            \"base_numbering\": 1,\n            \"nav_menu\": {},\n            \"number_sections\": True,\n            \"sideBar\": True,\n            \"skip_h1_title\": False,\n            \"title_cell\": \"Table of Contents\",\n            \"title_sidebar\": \"Contents\",\n            \"toc_cell\": False,\n            \"toc_position\": {},\n            \"toc_section_display\": True,\n            \"toc_window_display\": False,\n        },\n    }\n\n\n@pytest.fixture()\ndef notebook_expected():\n    return new_notebook(\n        metadata=notebook_metadata(),\n        cells=[\n            new_markdown_cell(\"First markdown cell\", id=\"markdown-cell-one\"),\n            new_code_cell(\"1 + 1\", id=\"code-cell-one\"),\n            new_markdown_cell(\"Second markdown cell\", id=\"markdown-cell-two\"),\n        ],\n    )\n\n\n@pytest.fixture()\ndef notebook_actual():\n    metadata = notebook_metadata()\n    metadata[\"language_info\"][\"version\"] = \"3.6.8\"\n    return new_notebook(\n        metadata=metadata,\n        cells=[\n            new_markdown_cell(\"First markdown cell\", id=\"markdown-cell-one\"),\n            new_code_cell(\"1 + 1\", id=\"code-cell-one\"),\n            new_markdown_cell(\"Modified markdown cell\", id=\"markdown-cell-two\"),\n        ],\n    )\n\n\ndef test_compare_on_notebooks(notebook_actual, notebook_expected):\n    with pytest.raises(AssertionError) as err:\n        compare(notebook_actual, notebook_expected)\n\n    assert (\n        str(err.value)\n        == \"\"\"\n--- expected\n+++ actual\n@@ -18,7 +18,7 @@\n    \"cell_type\": \"markdown\",\n    \"id\": \"markdown-cell-two\",\n    \"metadata\": {},\n-   \"source\": \"Second markdown cell\"\n+   \"source\": \"Modified markdown cell\"\n   }\n  ],\n  \"metadata\": {\n@@ -37,7 +37,7 @@\n    \"name\": \"python\",\n    \"nbconvert_exporter\": \"python\",\n    \"pygments_lexer\": \"ipython3\",\n-   \"version\": \"3.7.3\"\n+   \"version\": \"3.6.8\"\n   },\n   \"toc\": {\n    \"base_numbering\": 1,\"\"\"\n    )\n\n\ndef test_raise_on_different_metadata():\n    ref = new_notebook(\n        metadata={\n            \"kernelspec\": {\n                \"language\": \"python\",\n                \"name\": \"python\",\n                \"display_name\": \"Python\",\n            }\n        },\n        cells=[new_markdown_cell(\"Cell one\")],\n    )\n    test = new_notebook(\n        metadata={\"kernelspec\": {\"language\": \"R\", \"name\": \"R\", \"display_name\": \"R\"}},\n        cells=[new_markdown_cell(\"Cell one\")],\n    )\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(test, ref, \"md\")\n\n\n@pytest.mark.parametrize(\"raise_on_first_difference\", [True, False])\ndef test_raise_on_different_cell_type(raise_on_first_difference):\n    ref = new_notebook(cells=[new_markdown_cell(\"Cell one\"), new_code_cell(\"Cell two\")])\n    test = new_notebook(cells=[new_markdown_cell(\"Cell one\"), new_raw_cell(\"Cell two\")])\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(test, ref, \"md\", raise_on_first_difference=raise_on_first_difference)\n\n\n@pytest.mark.parametrize(\"raise_on_first_difference\", [True, False])\ndef test_raise_on_different_cell_content(raise_on_first_difference):\n    ref = new_notebook(cells=[new_markdown_cell(\"Cell one\"), new_code_cell(\"Cell two\")])\n    test = new_notebook(cells=[new_markdown_cell(\"Cell one\"), new_code_cell(\"Modified cell two\")])\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(test, ref, \"md\", raise_on_first_difference=raise_on_first_difference)\n\n\ndef test_raise_on_incomplete_markdown_cell():\n    ref = new_notebook(cells=[new_markdown_cell(\"Cell one\\n\\n\\nsecond line\")])\n    test = new_notebook(cells=[new_markdown_cell(\"Cell one\")])\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(test, ref, \"md\")\n\n\ndef test_does_raise_on_split_markdown_cell():\n    ref = new_notebook(cells=[new_markdown_cell(\"Cell one\\n\\n\\nsecond line\")])\n    test = new_notebook(cells=[new_markdown_cell(\"Cell one\"), new_markdown_cell(\"second line\")])\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(test, ref, \"md\")\n\n\ndef test_raise_on_different_cell_metadata():\n    ref = new_notebook(cells=[new_code_cell(\"1+1\")])\n    test = new_notebook(cells=[new_code_cell(\"1+1\", metadata={\"metakey\": \"value\"})])\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(test, ref, \"py:light\")\n\n\n@pytest.mark.parametrize(\"raise_on_first_difference\", [True, False])\ndef test_raise_on_different_cell_count(raise_on_first_difference):\n    ref = new_notebook(cells=[new_code_cell(\"1\")])\n    test = new_notebook(cells=[new_code_cell(\"1\"), new_code_cell(\"2\")])\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(test, ref, \"py:light\", raise_on_first_difference=raise_on_first_difference)\n\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(ref, test, \"py:light\", raise_on_first_difference=raise_on_first_difference)\n\n\ndef test_does_not_raise_on_blank_line_removed():\n    ref = new_notebook(cells=[new_code_cell(\"1+1\\n    \")])\n    test = new_notebook(cells=[new_code_cell(\"1+1\")])\n    compare_notebooks(test, ref, \"py:light\")\n\n\ndef test_strict_raise_on_blank_line_removed():\n    ref = new_notebook(cells=[new_code_cell(\"1+1\\n\")])\n    test = new_notebook(cells=[new_code_cell(\"1+1\")])\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(test, ref, \"py:light\", allow_expected_differences=False)\n\n\ndef test_dont_raise_on_different_outputs():\n    ref = new_notebook(cells=[new_code_cell(\"1+1\")])\n    test = new_notebook(\n        cells=[\n            new_code_cell(\n                \"1+1\",\n                outputs=[\n                    {\n                        \"data\": {\"text/plain\": [\"2\"]},\n                        \"execution_count\": 1,\n                        \"metadata\": {},\n                        \"output_type\": \"execute_result\",\n                    }\n                ],\n            )\n        ]\n    )\n    compare_notebooks(test, ref, \"md\")\n\n\n@pytest.mark.parametrize(\"raise_on_first_difference\", [True, False])\ndef test_raise_on_different_outputs(raise_on_first_difference):\n    ref = new_notebook(cells=[new_code_cell(\"1+1\")])\n    test = new_notebook(\n        cells=[\n            new_code_cell(\n                \"1+1\",\n                outputs=[\n                    {\n                        \"data\": {\"text/plain\": [\"2\"]},\n                        \"execution_count\": 1,\n                        \"metadata\": {},\n                        \"output_type\": \"execute_result\",\n                    }\n                ],\n            )\n        ]\n    )\n    with pytest.raises(NotebookDifference):\n        compare_notebooks(\n            test,\n            ref,\n            \"md\",\n            raise_on_first_difference=raise_on_first_difference,\n            compare_outputs=True,\n        )\n\n\ndef test_test_round_trip_conversion():\n    notebook = new_notebook(\n        cells=[\n            new_code_cell(\n                \"1+1\",\n                outputs=[\n                    {\n                        \"data\": {\"text/plain\": [\"2\"]},\n                        \"execution_count\": 1,\n                        \"metadata\": {},\n                        \"output_type\": \"execute_result\",\n                    }\n                ],\n            )\n        ],\n        metadata={\"main_language\": \"python\"},\n    )\n\n    round_trip_conversion(notebook, {\"extension\": \".py\"}, update=True)\n\n\ndef test_mutiple_cells_differ():\n    nb1 = new_notebook(cells=[new_code_cell(\"\"), new_code_cell(\"2\")])\n    nb2 = new_notebook(cells=[new_code_cell(\"1+1\"), new_code_cell(\"2\\n2\")])\n    with pytest.raises(NotebookDifference) as exception_info:\n        compare_notebooks(nb2, nb1, raise_on_first_difference=False)\n    assert \"Cells 1,2 differ\" in exception_info.value.args[0]\n\n\ndef test_cell_metadata_differ():\n    nb1 = new_notebook(\n        cells=[\n            new_code_cell(\"1\"),\n            new_code_cell(\"2\", metadata={\"additional\": \"metadata1\"}),\n        ]\n    )\n    nb2 = new_notebook(\n        cells=[\n            new_code_cell(\"1\"),\n            new_code_cell(\"2\", metadata={\"additional\": \"metadata2\"}),\n        ]\n    )\n    with pytest.raises(NotebookDifference) as exception_info:\n        compare_notebooks(nb2, nb1, raise_on_first_difference=False)\n    assert \"Cell metadata 'additional' differ\" in exception_info.value.args[0]\n\n\ndef test_notebook_metadata_differ():\n    nb1 = new_notebook(cells=[new_code_cell(\"1\"), new_code_cell(\"2\")])\n    nb2 = new_notebook(\n        cells=[new_code_cell(\"1\"), new_code_cell(\"2\")],\n        metadata={\n            \"kernelspec\": {\n                \"language\": \"python\",\n                \"name\": \"python\",\n                \"display_name\": \"Python\",\n            }\n        },\n    )\n    with pytest.raises(NotebookDifference) as exception_info:\n        compare_notebooks(nb2, nb1, raise_on_first_difference=False)\n    assert \"Notebook metadata differ\" in exception_info.value.args[0]\n\n\ndef test_cell_ids_differ():\n    with pytest.raises(NotebookDifference, match=\"'id-one' != 'id-two'\"):\n        compare_cells([new_code_cell(\"1\", id=\"id-one\")], [new_code_cell(\"1\", id=\"id-two\")])\n"
  },
  {
    "path": "tests/unit/test_escape_magics.py",
    "content": "import pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_code_cell, new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare, compare_notebooks, notebook_model\nfrom jupytext.magics import (\n    _PYTHON_MAGIC_ASSIGN,\n    comment_magic,\n    is_magic,\n    uncomment_magic,\n    unesc,\n)\n\n\ndef test_unesc():\n    assert unesc(\"# comment\", \"python\") == \"comment\"\n    assert unesc(\"#comment\", \"python\") == \"comment\"\n    assert unesc(\"comment\", \"python\") == \"comment\"\n\n\n@pytest.mark.parametrize(\n    \"line\",\n    [\n        \"%matplotlib inline\",\n        \"#%matplotlib inline\",\n        \"##%matplotlib inline\",\n        \"%%HTML\",\n        \"%autoreload\",\n        \"%store\",\n    ],\n)\ndef test_escape(line):\n    assert comment_magic([line]) == [\"# \" + line]\n    assert uncomment_magic(comment_magic([line])) == [line]\n\n\n@pytest.mark.parametrize(\"line\", [\"@pytest.fixture\"])\ndef test_escape_magic_only(line):\n    assert comment_magic([line]) == [line]\n\n\n@pytest.mark.parametrize(\"line\", [\"%matplotlib inline #noescape\"])\ndef test_force_noescape(line):\n    assert comment_magic([line]) == [line]\n\n\n@pytest.mark.parametrize(\"line\", [\"%matplotlib inline #noescape\"])\ndef test_force_noescape_with_gbl_esc_flag(line):\n    assert comment_magic([line], global_escape_flag=True) == [line]\n\n\n@pytest.mark.parametrize(\"line\", [\"%matplotlib inline #escape\"])\ndef test_force_escape_with_gbl_esc_flag(line):\n    assert comment_magic([line], global_escape_flag=False) == [\"# \" + line]\n\n\n@pytest.mark.parametrize(\n    \"fmt,commented\",\n    zip(\n        [\n            \"md\",\n            \"Rmd\",\n            \"py:light\",\n            \"py:percent\",\n            \"py:sphinx\",\n            \"R\",\n            \"ss:light\",\n            \"ss:percent\",\n        ],\n        [False, True, True, True, True, True, True, True],\n    ),\n)\ndef test_magics_commented_default(fmt, commented):\n    nb = new_notebook(cells=[new_code_cell(\"%pylab inline\")])\n\n    text = jupytext.writes(nb, fmt)\n    assert (\"%pylab inline\" in text.splitlines()) != commented\n    nb2 = jupytext.reads(text, fmt)\n\n    if \"sphinx\" in fmt:\n        nb2.cells = nb2.cells[1:]\n\n    compare_notebooks(nb2, nb)\n\n\n@pytest.mark.parametrize(\n    \"fmt\",\n    [\"md\", \"Rmd\", \"py:light\", \"py:percent\", \"py:sphinx\", \"R\", \"ss:light\", \"ss:percent\"],\n)\ndef test_magics_are_commented(fmt):\n    nb = new_notebook(\n        cells=[new_code_cell(\"%pylab inline\")],\n        metadata={\n            \"jupytext\": {\n                \"comment_magics\": True,\n                \"main_language\": (\"R\" if fmt == \"R\" else \"scheme\" if fmt.startswith(\"ss\") else \"python\"),\n            }\n        },\n    )\n\n    text = jupytext.writes(nb, fmt)\n    assert \"%pylab inline\" not in text.splitlines()\n    nb2 = jupytext.reads(text, fmt)\n\n    if \"sphinx\" in fmt:\n        nb2.cells = nb2.cells[1:]\n\n    compare_notebooks(nb2, nb)\n\n\n@pytest.mark.parametrize(\n    \"fmt\",\n    [\"md\", \"Rmd\", \"py:light\", \"py:percent\", \"py:sphinx\", \"R\", \"ss:light\", \"ss:percent\"],\n)\ndef test_magics_are_not_commented(fmt):\n    nb = new_notebook(\n        cells=[new_code_cell(\"%pylab inline\")],\n        metadata={\n            \"jupytext\": {\n                \"comment_magics\": False,\n                \"main_language\": (\"R\" if fmt == \"R\" else \"scheme\" if fmt.startswith(\"ss\") else \"python\"),\n            }\n        },\n    )\n\n    text = jupytext.writes(nb, fmt)\n    assert \"%pylab inline\" in text.splitlines()\n    nb2 = jupytext.reads(text, fmt)\n\n    if \"sphinx\" in fmt:\n        nb2.cells = nb2.cells[1:]\n\n    compare_notebooks(nb2, nb)\n\n\n@pytest.mark.asyncio\nasync def test_force_comment_using_contents_manager(tmpdir, cm):\n    tmp_py = \"notebook.py\"\n\n    cm.preferred_jupytext_formats_save = \"py:percent\"\n    cm.root_dir = str(tmpdir)\n\n    nb = new_notebook(cells=[new_code_cell(\"%pylab inline\")])\n\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_py))\n    with open(str(tmpdir.join(tmp_py))) as stream:\n        assert \"# %pylab inline\" in stream.read().splitlines()\n\n    cm.comment_magics = False\n    await ensure_async(cm.save(model=notebook_model(nb), path=tmp_py))\n    with open(str(tmpdir.join(tmp_py))) as stream:\n        assert \"%pylab inline\" in stream.read().splitlines()\n\n\n@pytest.mark.parametrize(\n    \"magic_cmd\",\n    [\n        \"ls\",\n        \"!ls\",\n        \"ls -al\",\n        \"!whoami\",\n        \"# ls\",\n        \"# mv a b\",\n        \"! mkdir tmp\",\n        \"!./script\",\n        \"! ./script\",\n        \"!./script args\",\n        \"!./script.sh args\",\n        \"! ./script.sh args\",\n        \"!~/script.sh args\",\n        \"! ~/script.sh args\",\n        \"!../script.sh $ENV $USER\",\n        \"! ../script.sh $ENV $USER\",\n        \"!$HOME/script.sh $ENV $USER\",\n        \"!/bin/sh $ENV $USER\",\n        \"! /bin/sh $ENV $USER\",\n        r\"! \\bin\\sh $ENV $USER\",\n        r\"!\\bin\\sh $ENV $USER\",\n        \"cat\",\n        \"cat \",\n        \"cat hello.txt\",\n        \"cat --option=value hello.txt\",\n        \"!{x}\",\n    ],\n)\ndef test_comment_bash_commands_in_python(magic_cmd):\n    assert comment_magic([magic_cmd]) == [\"# \" + magic_cmd]\n    assert uncomment_magic([\"# \" + magic_cmd]) == [magic_cmd]\n\n\n@pytest.mark.parametrize(\n    \"not_magic_cmd\",\n    [\"copy(a)\", \"copy.deepcopy\", \"cat = 3\", \"cat=5\", \"cat, other = 5,3\", \"cat(5)\"],\n)\ndef test_do_not_comment_python_cmds(not_magic_cmd):\n    assert comment_magic([not_magic_cmd]) == [not_magic_cmd]\n    assert uncomment_magic([not_magic_cmd]) == [not_magic_cmd]\n\n\n@pytest.mark.parametrize(\"magic_cmd\", [\"ls\", \"!ls\", \"ls -al\", \"!whoami\", \"# ls\", \"# mv a b\"])\ndef test_do_not_comment_bash_commands_in_R(magic_cmd):\n    assert comment_magic([magic_cmd], language=\"R\") == [magic_cmd]\n    assert uncomment_magic([magic_cmd], language=\"R\") == [magic_cmd]\n\n\ndef test_markdown_image_is_not_magic():\n    assert is_magic(\"# !cmd\", \"python\")\n    assert not is_magic(\"# ![Image name](image.png\", \"python\")\n\n\ndef test_question_is_not_magic():\n    assert is_magic(\"float?\", \"python\", explicitly_code=True)\n    assert is_magic(\"# float?\", \"python\", explicitly_code=True)\n    assert not is_magic(\"# question: float?\", \"python\", explicitly_code=True)\n\n\ndef test_multiline_python_magic(no_jupytext_version_number):\n    nb = new_notebook(\n        cells=[\n            new_code_cell(\n                \"\"\"%load_ext watermark\n%watermark -u -n -t -z \\\\\n    -p jupytext -v\n\ndef g(x):\n    return x+1\"\"\"\n            )\n        ]\n    )\n\n    text = jupytext.writes(nb, \"py:light\")\n    compare(\n        text,\n        \"\"\"# +\n# %load_ext watermark\n# %watermark -u -n -t -z \\\\\n#     -p jupytext -v\n\ndef g(x):\n    return x+1\n\"\"\",\n    )\n    compare_notebooks(jupytext.reads(text, \"py\"), nb)\n\n\ndef test_configure_magic(no_jupytext_version_number):\n    nb = new_notebook(\n        cells=[\n            new_code_cell(\n                \"\"\"%%configure -f \\\\\n{\"executorMemory\": \"3072M\", \"executorCores\": 4, \"numExecutors\":10}\"\"\"\n            )\n        ]\n    )\n\n    text = jupytext.writes(nb, \"py:light\")\n    compare(\n        text,\n        \"\"\"# %%configure -f \\\\\n# {\"executorMemory\": \"3072M\", \"executorCores\": 4, \"numExecutors\":10}\n\"\"\",\n    )\n    compare_notebooks(jupytext.reads(text, \"py\"), nb)\n\n\ndef test_indented_magic():\n    assert is_magic(\"    !rm file\", \"python\")\n    assert is_magic(\"    # !rm file\", \"python\")\n    assert is_magic(\"    %cd\", \"python\")\n    assert comment_magic([\"    !rm file\"]) == [\"    # !rm file\"]\n    assert uncomment_magic([\"    # !rm file\"]) == [\"    !rm file\"]\n    assert comment_magic([\"    %cd\"]) == [\"    # %cd\"]\n    assert uncomment_magic([\"    # %cd\"]) == [\"    %cd\"]\n\n\ndef test_magic_assign_781():\n    assert _PYTHON_MAGIC_ASSIGN.match(\"name = %magic\")\n    assert _PYTHON_MAGIC_ASSIGN.match(\"# name = %magic\")\n    assert not _PYTHON_MAGIC_ASSIGN.match(\"# not a name = %magic\")\n    assert not _PYTHON_MAGIC_ASSIGN.match(\"# 0name = %magic\")\n    assert is_magic(\"result = %sql SELECT * FROM quickdemo WHERE value > 25\", \"python\")\n\n\ndef test_magic_assign_816():\n    assert _PYTHON_MAGIC_ASSIGN.match(\"flake8_version = !flake8 --version\")\n    assert _PYTHON_MAGIC_ASSIGN.match(\"# flake8_version = !flake8 --version\")\n    assert _PYTHON_MAGIC_ASSIGN.match(\"name = %time 2+2\")\n    assert _PYTHON_MAGIC_ASSIGN.match(\"# name = %time 2+2\")\n"
  },
  {
    "path": "tests/unit/test_formats.py",
    "content": "import pytest\nfrom jupyter_server.utils import ensure_async\nfrom nbformat.v4.nbbase import new_notebook\n\nimport jupytext\nfrom jupytext.compare import compare\nfrom jupytext.formats import (\n    JupytextFormatError,\n    divine_format,\n    get_format_implementation,\n    guess_format,\n    long_form_multiple_formats,\n    read_format_from_metadata,\n    rearrange_jupytext_metadata,\n    short_form_multiple_formats,\n    update_jupytext_formats_metadata,\n    validate_one_format,\n)\n\n\ndef test_guess_format_light(python_file):\n    with open(python_file) as stream:\n        assert guess_format(stream.read(), ext=\".py\")[0] == \"light\"\n\n\ndef test_guess_format_percent(percent_file):\n    with open(percent_file) as stream:\n        assert guess_format(stream.read(), ext=\".py\")[0] == \"percent\"\n\n\ndef test_guess_format_simple_percent(\n    nb=\"\"\"# %%\nprint(\"hello world!\")\n\"\"\",\n):\n    assert guess_format(nb, ext=\".py\")[0] == \"percent\"\n\n\ndef test_guess_format_simple_percent_with_magic(\n    nb=\"\"\"# %%\n# %time\nprint(\"hello world!\")\n\"\"\",\n):\n    assert guess_format(nb, ext=\".py\")[0] == \"percent\"\n\n\ndef test_guess_format_simple_hydrogen_with_magic(\n    nb=\"\"\"# %%\n%time\nprint(\"hello world!\")\n\"\"\",\n):\n    assert guess_format(nb, ext=\".py\")[0] == \"hydrogen\"\n\n\ndef test_guess_format_sphinx(sphinx_file):\n    with open(sphinx_file) as stream:\n        assert guess_format(stream.read(), ext=\".py\")[0] == \"sphinx\"\n\n\ndef test_guess_format_hydrogen():\n    text = \"\"\"# %%\ncat hello.txt\n\"\"\"\n    assert guess_format(text, ext=\".py\")[0] == \"hydrogen\"\n\n\ndef test_divine_format():\n    assert divine_format('{\"cells\":[]}') == \"ipynb\"\n    assert (\n        divine_format(\n            \"\"\"def f(x):\n    x + 1\"\"\"\n        )\n        == \"py:light\"\n    )\n    assert (\n        divine_format(\n            \"\"\"# %%\ndef f(x):\n    x + 1\n\n# %%\ndef g(x):\n    x + 2\n\"\"\"\n        )\n        == \"py:percent\"\n    )\n    assert (\n        divine_format(\n            \"\"\"This is a markdown file\nwith one code block\n\n```\n1 + 1\n```\n\"\"\"\n        )\n        == \"md\"\n    )\n    assert (\n        divine_format(\n            \"\"\";; ---\n;; jupyter:\n;;   jupytext:\n;;     text_representation:\n;;       extension: .ss\n;;       format_name: percent\n;; ---\"\"\"\n        )\n        == \"ss:percent\"\n    )\n\n\ndef test_get_format_implementation():\n    assert get_format_implementation(\".py\").format_name == \"light\"\n    assert get_format_implementation(\".py\", \"percent\").format_name == \"percent\"\n    with pytest.raises(JupytextFormatError):\n        get_format_implementation(\".py\", \"wrong_format\")\n\n\ndef test_script_with_magics_not_percent(\n    script=\"\"\"# %%time\n1 + 2\"\"\",\n):\n    assert guess_format(script, \".py\")[0] == \"light\"\n\n\ndef test_script_with_spyder_cell_is_percent(\n    script=\"\"\"#%%\n1 + 2\"\"\",\n):\n    assert guess_format(script, \".py\")[0] == \"percent\"\n\n\ndef test_script_with_percent_cell_and_magic_is_hydrogen(\n    script=\"\"\"#%%\n%matplotlib inline\n\"\"\",\n):\n    assert guess_format(script, \".py\")[0] == \"hydrogen\"\n\n\ndef test_script_with_percent_cell_and_kernelspec(\n    script=\"\"\"# ---\n# jupyter:\n#   kernelspec:\n#     display_name: Python3\n#     language: python\n#     name: python3\n# ---\n\n# %%\na = 1\n\"\"\",\n):\n    assert guess_format(script, \".py\")[0] == \"percent\"\n\n\ndef test_script_with_spyder_cell_with_name_is_percent(\n    script=\"\"\"#%% cell name\n1 + 2\"\"\",\n):\n    assert guess_format(script, \".py\")[0] == \"percent\"\n\n\ndef test_read_format_from_metadata(\n    script=\"\"\"---\njupyter:\n  jupytext:\n    formats: ipynb,pct.py:percent,lgt.py:light,spx.py:sphinx,md,Rmd\n    text_representation:\n      extension: .pct.py\n      format_name: percent\n      format_version: '1.1'\n      jupytext_version: 0.8.0\n---\"\"\",\n):\n    assert read_format_from_metadata(script, \".Rmd\") is None\n\n\ndef test_update_jupytext_formats_metadata():\n    nb = new_notebook(metadata={\"jupytext\": {\"formats\": \"py\"}})\n    update_jupytext_formats_metadata(nb.metadata, \"py:light\")\n    assert nb.metadata[\"jupytext\"][\"formats\"] == \"py:light\"\n\n    nb = new_notebook(metadata={\"jupytext\": {\"formats\": \"ipynb,py\"}})\n    update_jupytext_formats_metadata(nb.metadata, \"py:light\")\n    assert nb.metadata[\"jupytext\"][\"formats\"] == \"ipynb,py:light\"\n\n\ndef test_decompress_formats():\n    assert long_form_multiple_formats(\"ipynb\") == [{\"extension\": \".ipynb\"}]\n    assert long_form_multiple_formats(\"ipynb,md\") == [\n        {\"extension\": \".ipynb\"},\n        {\"extension\": \".md\"},\n    ]\n    assert long_form_multiple_formats(\"ipynb,py:light\") == [\n        {\"extension\": \".ipynb\"},\n        {\"extension\": \".py\", \"format_name\": \"light\"},\n    ]\n    assert long_form_multiple_formats([\"ipynb\", \".py:light\"]) == [\n        {\"extension\": \".ipynb\"},\n        {\"extension\": \".py\", \"format_name\": \"light\"},\n    ]\n    assert long_form_multiple_formats(\".pct.py:percent\") == [{\"extension\": \".py\", \"suffix\": \".pct\", \"format_name\": \"percent\"}]\n\n\ndef test_compress_formats():\n    assert short_form_multiple_formats([{\"extension\": \".ipynb\"}]) == \"ipynb\"\n    assert short_form_multiple_formats(\"ipynb\") == \"ipynb\"\n    assert short_form_multiple_formats([{\"extension\": \".ipynb\"}, {\"extension\": \".md\"}]) == \"ipynb,md\"\n    assert (\n        short_form_multiple_formats([{\"extension\": \".ipynb\"}, {\"extension\": \".py\", \"format_name\": \"light\"}])\n        == \"ipynb,py:light\"\n    )\n    assert (\n        short_form_multiple_formats(\n            [\n                {\"extension\": \".ipynb\"},\n                {\"extension\": \".py\", \"format_name\": \"light\"},\n                {\"extension\": \".md\", \"comment_magics\": True},\n            ]\n        )\n        == \"ipynb,py:light,md\"\n    )\n    assert short_form_multiple_formats([{\"extension\": \".py\", \"suffix\": \".pct\", \"format_name\": \"percent\"}]) == \".pct.py:percent\"\n\n\ndef test_rearrange_jupytext_metadata():\n    metadata = {\"nbrmd_formats\": \"ipynb,py\"}\n    rearrange_jupytext_metadata(metadata)\n    compare(metadata, {\"jupytext\": {\"formats\": \"ipynb,py\"}})\n\n    metadata = {\"jupytext_formats\": \"ipynb,py\"}\n    rearrange_jupytext_metadata(metadata)\n    compare(metadata, {\"jupytext\": {\"formats\": \"ipynb,py\"}})\n\n    metadata = {\"executable\": \"#!/bin/bash\"}\n    rearrange_jupytext_metadata(metadata)\n    compare(metadata, {\"jupytext\": {\"executable\": \"#!/bin/bash\"}})\n\n\ndef test_rearrange_jupytext_metadata_metadata_filter():\n    metadata = {\n        \"jupytext\": {\n            \"metadata_filter\": {\n                \"notebook\": {\"additional\": [\"one\", \"two\"], \"excluded\": \"all\"},\n                \"cells\": {\"additional\": \"all\", \"excluded\": [\"three\", \"four\"]},\n            }\n        }\n    }\n    rearrange_jupytext_metadata(metadata)\n    compare(\n        metadata,\n        {\n            \"jupytext\": {\n                \"notebook_metadata_filter\": \"one,two,-all\",\n                \"cell_metadata_filter\": \"all,-three,-four\",\n            }\n        },\n    )\n\n\ndef test_rearrange_jupytext_metadata_add_dot_in_suffix():\n    metadata = {\n        \"jupytext\": {\n            \"text_representation\": {\"jupytext_version\": \"0.8.6\"},\n            \"formats\": \"ipynb,pct.py,lgt.py\",\n        }\n    }\n    rearrange_jupytext_metadata(metadata)\n    compare(\n        metadata,\n        {\n            \"jupytext\": {\n                \"text_representation\": {\"jupytext_version\": \"0.8.6\"},\n                \"formats\": \"ipynb,.pct.py,.lgt.py\",\n            }\n        },\n    )\n\n\ndef test_fix_139():\n    text = \"\"\"# ---\n# jupyter:\n#   jupytext:\n#     metadata_filter:\n#       cells:\n#         additional:\n#           - \"lines_to_next_cell\"\n#         excluded:\n#           - \"all\"\n# ---\n\n# + {\"lines_to_next_cell\": 2}\n1 + 1\n# -\n\n\n1 + 1\n\"\"\"\n\n    nb = jupytext.reads(text, \"py:light\")\n    text2 = jupytext.writes(nb, \"py:light\")\n    assert \"cell_metadata_filter: -all\" in text2\n    assert \"lines_to_next_cell\" not in text2\n\n\ndef test_validate_one_format():\n    with pytest.raises(JupytextFormatError):\n        validate_one_format(\"py:percent\")\n\n    with pytest.raises(JupytextFormatError):\n        validate_one_format({\"extension\": \"py\", \"format_name\": \"invalid\"})\n\n    with pytest.raises(JupytextFormatError):\n        validate_one_format({})\n\n    with pytest.raises(JupytextFormatError):\n        validate_one_format({\"extension\": \".py\", \"unknown_option\": True})\n\n    with pytest.raises(JupytextFormatError):\n        validate_one_format({\"extension\": \".py\", \"comment_magics\": \"TRUE\"})\n\n\ndef test_set_auto_ext():\n    with pytest.raises(ValueError):\n        long_form_multiple_formats(\"ipynb,auto:percent\", {})\n\n\n@pytest.mark.requires_pandoc\ndef test_pandoc_format_is_preserved():\n    formats_org = \"ipynb,md,.pandoc.md:pandoc,py:light\"\n    long = long_form_multiple_formats(formats_org)\n    formats_new = short_form_multiple_formats(long)\n\n    compare(formats_new, formats_org)\n\n\n@pytest.mark.requires_myst\ndef test_write_as_myst(tmpdir):\n    \"\"\"Inspired by https://github.com/mwouts/jupytext/issues/462\"\"\"\n    nb = new_notebook()\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n\n    jupytext.write(nb, tmp_md, fmt=\"myst\")\n\n    with open(tmp_md) as fp:\n        md = fp.read()\n\n    assert \"myst\" in md\n\n\ndef test_write_raises_when_fmt_does_not_exists(tmpdir):\n    \"\"\"Inspired by https://github.com/mwouts/jupytext/issues/462\"\"\"\n    nb = new_notebook()\n    tmp_md = str(tmpdir.join(\"notebook.md\"))\n\n    with pytest.raises(JupytextFormatError):\n        jupytext.write(nb, tmp_md, fmt=\"unknown_format\")\n\n\n@pytest.mark.asyncio\n@pytest.mark.parametrize(\n    \"config_file,config_contents\",\n    [\n        (\n            \"jupytext.toml\",\n            \"\"\"# Always pair ipynb notebooks to md files\nformats = \"ipynb,md\"\n\"\"\",\n        ),\n        (\n            \"jupytext.toml\",\n            \"\"\"# Always pair ipynb notebooks to py:percent files\nformats = \"ipynb,py:percent\"\n\"\"\",\n        ),\n        (\n            \"pyproject.toml\",\n            \"\"\"[tool.jupytext]\nformats = \"ipynb,py:percent\"\n\"\"\",\n        ),\n        (\n            \"jupytext.toml\",\n            \"\"\"# Pair notebooks in subfolders of 'notebooks' to scripts in subfolders of 'scripts'\nformats = \"notebooks///ipynb,scripts///py:percent\"\n\"\"\",\n        ),\n        (\n            \"jupytext.toml\",\n            \"\"\"[formats]\n\"notebooks/\" = \"ipynb\"\n\"scripts/\" = \"py:percent\"\n\"\"\",\n        ),\n    ],\n)\nasync def test_configuration_examples_from_documentation(config_file, config_contents, python_notebook, tmp_path, cm):\n    \"\"\"Here we make sure that the config examples from\n    https://jupytext.readthedocs.io/en/latest/config.html#configuring-paired-notebooks-globally\n    just work\n    \"\"\"\n    (tmp_path / config_file).write_text(config_contents)\n    cm.root_dir = str(tmp_path)\n\n    # Save the notebook\n    (tmp_path / \"notebooks\").mkdir()\n    await ensure_async(cm.save(dict(type=\"notebook\", content=python_notebook), \"notebooks/nb.ipynb\"))\n\n    # Make sure that ipynb and text version are created\n    assert (tmp_path / \"notebooks\" / \"nb.ipynb\").is_file()\n    assert (\n        (tmp_path / \"notebooks\" / \"nb.py\").is_file()\n        or (tmp_path / \"notebooks\" / \"nb.md\").is_file()\n        or (tmp_path / \"scripts\" / \"nb.py\").is_file()\n    )\n"
  },
  {
    "path": "tests/unit/test_header.py",
    "content": "from nbformat.v4.nbbase import new_markdown_cell, new_notebook, new_raw_cell\n\nimport jupytext\nfrom jupytext.compare import compare\nfrom jupytext.formats import get_format_implementation\nfrom jupytext.header import (\n    header_to_metadata_and_cell,\n    metadata_and_cell_to_header,\n    recursive_update,\n    uncomment_line,\n)\n\n\ndef test_uncomment():\n    assert uncomment_line(\"# line one\", \"#\") == \"line one\"\n    assert uncomment_line(\"#line two\", \"#\") == \"line two\"\n    assert uncomment_line(\"#line two\", \"\") == \"#line two\"\n\n\ndef test_header_to_metadata_and_cell_blank_line():\n    text = \"\"\"---\ntitle: Sample header\n---\n\nHeader is followed by a blank line\n\"\"\"\n    lines = text.splitlines()\n    metadata, _, cell, pos = header_to_metadata_and_cell(lines, \"\", \"\")\n\n    assert metadata == {}\n    assert cell.cell_type == \"raw\"\n    assert (\n        cell.source\n        == \"\"\"---\ntitle: Sample header\n---\"\"\"\n    )\n    assert cell.metadata == {}\n    assert lines[pos].startswith(\"Header is\")\n\n\ndef test_header_to_metadata_and_cell_no_blank_line():\n    text = \"\"\"---\ntitle: Sample header\n---\nHeader is not followed by a blank line\n\"\"\"\n    lines = text.splitlines()\n    metadata, _, cell, pos = header_to_metadata_and_cell(lines, \"\", \"\")\n\n    assert metadata == {}\n    assert cell.cell_type == \"raw\"\n    assert (\n        cell.source\n        == \"\"\"---\ntitle: Sample header\n---\"\"\"\n    )\n    assert cell.metadata == {\"lines_to_next_cell\": 0}\n    assert lines[pos].startswith(\"Header is\")\n\n\ndef test_header_to_metadata_and_cell_metadata():\n    text = \"\"\"---\ntitle: Sample header\njupyter:\n  mainlanguage: python\n---\n\"\"\"\n    lines = text.splitlines()\n    metadata, _, cell, pos = header_to_metadata_and_cell(lines, \"\", \"\")\n\n    assert metadata == {\"mainlanguage\": \"python\"}\n    assert cell.cell_type == \"raw\"\n    assert (\n        cell.source\n        == \"\"\"---\ntitle: Sample header\n---\"\"\"\n    )\n    assert cell.metadata == {\"lines_to_next_cell\": 0}\n    assert pos == len(lines)\n\n\ndef test_metadata_and_cell_to_header(no_jupytext_version_number):\n    metadata = {\"jupytext\": {\"mainlanguage\": \"python\"}}\n    nb = new_notebook(metadata=metadata, cells=[new_raw_cell(source=\"---\\ntitle: Sample header\\n---\")])\n    header, lines_to_next_cell = metadata_and_cell_to_header(\n        nb, metadata, get_format_implementation(\".md\"), {\"extension\": \".md\"}\n    )\n    assert (\n        \"\\n\".join(header)\n        == \"\"\"---\ntitle: Sample header\njupyter:\n  jupytext:\n    mainlanguage: python\n---\"\"\"\n    )\n    assert nb.cells == []\n    assert lines_to_next_cell is None\n\n\ndef test_metadata_and_cell_to_header2(no_jupytext_version_number):\n    nb = new_notebook(cells=[new_markdown_cell(source=\"Some markdown\\ntext\")])\n    header, lines_to_next_cell = metadata_and_cell_to_header(nb, {}, get_format_implementation(\".md\"), {\"extension\": \".md\"})\n    assert header == []\n    assert len(nb.cells) == 1\n    assert lines_to_next_cell is None\n\n\ndef test_notebook_from_plain_script_has_metadata_filter(\n    script=\"\"\"print('Hello world\")\n\"\"\",\n):\n    nb = jupytext.reads(script, \".py\")\n    assert nb.metadata.get(\"jupytext\", {}).get(\"notebook_metadata_filter\") == \"-all\"\n    assert nb.metadata.get(\"jupytext\", {}).get(\"cell_metadata_filter\") == \"-all\"\n    script2 = jupytext.writes(nb, \".py\")\n\n    compare(script2, script)\n\n\ndef test_multiline_metadata(\n    no_jupytext_version_number,\n    notebook=new_notebook(\n        metadata={\n            \"multiline\": \"\"\"A multiline string\n\nwith a blank line\"\"\",\n            \"jupytext\": {\n                \"notebook_metadata_filter\": \"all\",\n                \"text_representation\": {\"extension\": \".md\", \"format_name\": \"markdown\"},\n            },\n        }\n    ),\n    markdown=\"\"\"---\njupyter:\n  jupytext:\n    notebook_metadata_filter: all\n    text_representation:\n      extension: .md\n      format_name: markdown\n  multiline: 'A multiline string\n\n\n    with a blank line'\n---\n\"\"\",\n):\n    actual = jupytext.writes(notebook, \".md\")\n    compare(actual, markdown)\n    nb2 = jupytext.reads(markdown, \".md\")\n    compare(nb2, notebook)\n\n\ndef test_header_in_html_comment():\n    text = \"\"\"<!--\n\n---\njupyter:\n  title: Sample header\n---\n\n-->\n\"\"\"\n    lines = text.splitlines()\n    metadata, _, cell, _ = header_to_metadata_and_cell(lines, \"\", \"\")\n\n    assert metadata == {\"title\": \"Sample header\"}\n    assert cell is None\n\n\ndef test_header_to_html_comment(no_jupytext_version_number):\n    metadata = {\"jupytext\": {\"mainlanguage\": \"python\"}}\n    nb = new_notebook(metadata=metadata, cells=[])\n    header, lines_to_next_cell = metadata_and_cell_to_header(\n        nb,\n        metadata,\n        get_format_implementation(\".md\"),\n        {\"extension\": \".md\", \"hide_notebook_metadata\": True},\n    )\n    compare(\n        \"\\n\".join(header),\n        \"\"\"<!--\n\n---\njupyter:\n  jupytext:\n    mainlanguage: python\n---\n\n-->\"\"\",\n    )\n\n\ndef test_recusive_update():\n    assert recursive_update({0: {1: 2}}, {0: {1: 3}, 4: 5}) == {0: {1: 3}, 4: 5}\n    assert recursive_update({0: {1: 2}}, {0: {1: 3}, 4: 5}, overwrite=False) == {\n        0: {1: 2},\n        4: 5,\n    }\n    # the value of `None`` is a special case\n    assert recursive_update({0: 1}, {0: None}) == {}\n    assert recursive_update({0: 1}, {0: None}, overwrite=False) == {}\n"
  },
  {
    "path": "tests/unit/test_labconfig.py",
    "content": "import json\n\nimport pytest\n\nfrom jupytext_config.labconfig import LabConfig\n\n\n@pytest.fixture()\ndef sample_viewer_config():\n    return {\n        \"@jupyterlab/docmanager-extension:plugin\": {\n            \"defaultViewers\": {\n                \"markdown\": \"Jupytext Notebook\",\n                \"myst\": \"Jupytext Notebook\",\n                \"r-markdown\": \"Jupytext Notebook\",\n                \"quarto\": \"Jupytext Notebook\",\n                \"julia\": \"Jupytext Notebook\",\n                \"python\": \"Jupytext Notebook\",\n                \"r\": \"Jupytext Notebook\",\n            }\n        }\n    }\n\n\n@pytest.fixture()\ndef sample_empty_viewer_config():\n    return {\"@jupyterlab/docmanager-extension:plugin\": {\"defaultViewers\": {}}}\n\n\n@pytest.fixture()\ndef settings_file(tmp_path):\n    return tmp_path / \"default_setting_overrides.json\"\n\n\ndef test_read_config(settings_file, sample_viewer_config):\n    (settings_file).write_text(json.dumps(sample_viewer_config))\n    labconfig = LabConfig(settings_file=settings_file).read()\n    assert labconfig.config == sample_viewer_config\n\n\ndef test_set_unset_default_viewers(settings_file, sample_viewer_config, sample_empty_viewer_config):\n    labconfig = LabConfig(settings_file=settings_file)\n    labconfig.set_default_viewers()\n    assert labconfig.config == sample_viewer_config\n    labconfig.unset_default_viewers()\n    assert labconfig.config == sample_empty_viewer_config\n\n\ndef test_write_config(settings_file, sample_viewer_config):\n    labconfig = LabConfig(settings_file=settings_file)\n    labconfig.set_default_viewers()\n    labconfig.write()\n    assert json.loads(settings_file.read_text()) == sample_viewer_config\n"
  },
  {
    "path": "tests/unit/test_markdown_in_code_cells.py",
    "content": "\"\"\"Issue #712\"\"\"\n\nimport pytest\nfrom nbformat.v4.nbbase import new_code_cell, new_notebook\n\nfrom jupytext import reads, writes\nfrom jupytext.cell_to_text import three_backticks_or_more\nfrom jupytext.compare import compare, compare_notebooks\n\n\ndef test_three_backticks_or_more():\n    assert three_backticks_or_more([\"\"]) == \"```\"\n    assert three_backticks_or_more([\"``\"]) == \"```\"\n    assert three_backticks_or_more([\"```python\"]) == \"````\"\n    assert three_backticks_or_more([\"```\"]) == \"````\"\n    assert three_backticks_or_more([\"`````python\"]) == \"``````\"\n    assert three_backticks_or_more([\"`````\"]) == \"``````\"\n\n\ndef test_triple_backticks_in_code_cell(\n    no_jupytext_version_number,\n    nb=new_notebook(\n        metadata={\"main_language\": \"python\"},\n        cells=[\n            new_code_cell(\n                '''a = \"\"\"\n```\nfoo\n```\n\"\"\"'''\n            )\n        ],\n    ),\n    text='''---\njupyter:\n  jupytext:\n    main_language: python\n---\n\n````python\na = \"\"\"\n```\nfoo\n```\n\"\"\"\n````\n''',\n):\n    actual_text = writes(nb, fmt=\"md\")\n    compare(actual_text, text)\n\n    actual_nb = reads(text, fmt=\"md\")\n    compare_notebooks(actual_nb, nb)\n\n\n@pytest.mark.requires_myst\ndef test_triple_backticks_in_code_cell_myst(\n    no_jupytext_version_number,\n    nb=new_notebook(\n        metadata={\"jupytext\": {\"default_lexer\": \"ipython3\"}},\n        cells=[\n            new_code_cell(\n                '''a = \"\"\"\n```\nfoo\n```\n\"\"\"'''\n            )\n        ],\n    ),\n    text='''````{code-cell} ipython3\na = \"\"\"\n```\nfoo\n```\n\"\"\"\n````\n''',\n):\n    actual_text = writes(nb, fmt=\"md:myst\")\n    compare(actual_text, text)\n\n    actual_nb = reads(text, fmt=\"md:myst\")\n    compare_notebooks(actual_nb, nb)\n\n\ndef test_alternate_tree_four_five_backticks(\n    no_jupytext_version_number,\n    nb=new_notebook(\n        metadata={\"main_language\": \"python\"},\n        cells=[\n            new_code_cell('a = \"\"\"\\n```\\n\"\"\"'),\n            new_code_cell(\"b = 2\"),\n            new_code_cell('c = \"\"\"\\n````\\n\"\"\"'),\n        ],\n    ),\n    text='''---\njupyter:\n  jupytext:\n    main_language: python\n---\n\n````python\na = \"\"\"\n```\n\"\"\"\n````\n\n```python\nb = 2\n```\n\n`````python\nc = \"\"\"\n````\n\"\"\"\n`````\n''',\n):\n    actual_text = writes(nb, fmt=\"md\")\n    compare(actual_text, text)\n\n    actual_nb = reads(text, fmt=\"md\")\n    compare_notebooks(actual_nb, nb)\n"
  },
  {
    "path": "tests/unit/test_paired_paths.py",
    "content": "import os\nimport unittest.mock as mock\n\nimport pytest\n\nimport jupytext\nfrom jupytext.cli import jupytext as jupytext_cli\nfrom jupytext.compare import compare\nfrom jupytext.formats import (\n    long_form_multiple_formats,\n    long_form_one_format,\n    short_form_multiple_formats,\n)\nfrom jupytext.paired_paths import (\n    InconsistentPath,\n    base_path,\n    base_path_and_adjusted_fmt,\n    full_path,\n    paired_paths,\n)\n\n\ndef test_simple_pair():\n    formats = long_form_multiple_formats(\"ipynb,py\")\n    expected_paths = [\"notebook.ipynb\", \"notebook.py\"]\n    compare(\n        paired_paths(\"notebook.ipynb\", \"ipynb\", formats),\n        list(zip(expected_paths, formats)),\n    )\n    compare(paired_paths(\"notebook.py\", \"py\", formats), list(zip(expected_paths, formats)))\n\n\ndef test_base_path():\n    fmt = long_form_one_format(\"dir/prefix_/ipynb\")\n    assert base_path(\"dir/prefix_NAME.ipynb\", fmt) == \"NAME\"\n    with pytest.raises(InconsistentPath):\n        base_path(\"dir/incorrect_prefix_NAME.ipynb\", fmt)\n\n\ndef test_base_path_dotdot():\n    fmt = long_form_one_format(\"../scripts//py\")\n    assert base_path(\"scripts/test.py\", fmt=fmt) == \"scripts/test\"\n\n\ndef test_full_path_dotdot():\n    fmt = long_form_one_format(\"../scripts//py\")\n    assert full_path(\"scripts/test\", fmt=fmt) == \"scripts/test.py\"\n\n\ndef test_base_path_in_tree_from_root():\n    fmt = long_form_one_format(\"scripts///py\")\n    assert base_path(\"scripts/subfolder/test.py\", fmt=fmt) == \"//subfolder/test\"\n    assert base_path(\"/scripts/subfolder/test.py\", fmt=fmt) == \"///subfolder/test\"\n\n\ndef test_base_path_in_tree_from_non_root():\n    fmt = long_form_one_format(\"scripts///py\")\n    assert base_path(\"/parent_folder/scripts/subfolder/test.py\", fmt=fmt) == \"/parent_folder///subfolder/test\"\n\n\ndef test_base_path_in_tree_from_non_root_no_subfolder():\n    nb_file = \"/parent/notebooks/wrap_markdown.ipynb\"\n    formats = \"notebooks///ipynb,scripts///py:percent\"\n    fmt = \"notebooks///ipynb\"\n    assert base_path(nb_file, fmt) == \"/parent///wrap_markdown\"\n    paired_paths(nb_file, fmt, formats)\n\n\ndef test_full_path_in_tree_from_root():\n    fmt = long_form_one_format(\"notebooks///ipynb\")\n    assert full_path(\"//subfolder/test\", fmt=fmt) == \"notebooks/subfolder/test.ipynb\"\n    assert full_path(\"///subfolder/test\", fmt=fmt) == \"/notebooks/subfolder/test.ipynb\"\n\n\ndef test_full_path_in_tree_from_root_no_subfolder():\n    fmt = long_form_one_format(\"notebooks///ipynb\")\n    assert full_path(\"//test\", fmt=fmt) == \"notebooks/test.ipynb\"\n    assert full_path(\"///test\", fmt=fmt) == \"/notebooks/test.ipynb\"\n\n\ndef test_full_path_in_tree_from_non_root():\n    fmt = long_form_one_format(\"notebooks///ipynb\")\n    assert full_path(\"/parent_folder///subfolder/test\", fmt=fmt) == \"/parent_folder/notebooks/subfolder/test.ipynb\"\n\n\ndef test_paired_paths_windows():\n    nb_file = \"C:\\\\Users\\\\notebooks\\\\notebooks\\\\subfolder\\\\nb.ipynb\"\n    formats = \"notebooks///ipynb,scripts///py\"\n    with mock.patch(\"os.path.sep\", \"\\\\\"):\n        assert base_path(nb_file, \"notebooks///ipynb\") == \"C:\\\\Users\\\\notebooks\\\\//subfolder\\\\nb\"\n        paired_paths(nb_file, \"notebooks///ipynb\", formats)\n\n\ndef test_paired_paths_windows_no_subfolder():\n    nb_file = \"C:\\\\Users\\\\notebooks\\\\notebooks\\\\nb.ipynb\"\n    formats = \"notebooks///ipynb,scripts///py\"\n    with mock.patch(\"os.path.sep\", \"\\\\\"):\n        assert base_path(nb_file, \"notebooks///ipynb\") == \"C:\\\\Users\\\\notebooks\\\\//nb\"\n        paired_paths(nb_file, \"notebooks///ipynb\", formats)\n\n\ndef test_paired_paths_windows_relative():\n    \"\"\"Test Windows pairing with relative paths and backslash as path separator, issue #1028\"\"\"\n    nb_file = \"C:\\\\notebooks\\\\example.ipynb\"\n    formats = \"notebooks///ipynb,scripts///py:percent\"\n    with mock.patch(\"os.path.sep\", \"\\\\\"):\n        # Should not raise InconsistentPath\n        paths = paired_paths(nb_file, \"notebooks///ipynb\", formats)\n        # Verify the notebook path is in the paired paths\n        path_list = [p[0] for p in paths]\n        assert nb_file in path_list, f\"Expected {nb_file} to be in paired paths {path_list}\"\n        # Verify both paths use backslashes on Windows\n        assert paths[0][0] == \"C:\\\\notebooks\\\\example.ipynb\"\n        assert paths[1][0] == \"C:\\\\scripts\\\\example.py\"\n\n\n@pytest.mark.parametrize(\"os_path_sep\", [\"\\\\\", \"/\"])\ndef test_paired_path_dotdot_564(os_path_sep):\n    main_path = os_path_sep.join([\"examples\", \"tutorials\", \"colabs\", \"rigid_object_tutorial.ipynb\"])\n    formats = \"../nb_python//py:percent,../colabs//ipynb\"\n    with mock.patch(\"os.path.sep\", os_path_sep):\n        assert base_path(main_path, None, long_form_multiple_formats(formats)) == os_path_sep.join(\n            [\"examples\", \"tutorials\", \"colabs\", \"rigid_object_tutorial\"]\n        )\n        paired_paths(main_path, \"ipynb\", formats)\n\n\ndef test_path_in_tree_limited_to_config_dir(tmpdir):\n    root_nb_dir = tmpdir.mkdir(\"notebooks\")\n    nb_dir = root_nb_dir.mkdir(\"notebooks\")\n    src_dir = root_nb_dir.mkdir(\"scripts\")\n    other_dir = root_nb_dir.mkdir(\"other\")\n\n    formats = \"notebooks///ipynb,scripts///py\"\n    fmt = long_form_multiple_formats(formats)[0]\n\n    # Notebook in nested 'notebook' dir is paired\n    notebook_in_nb_dir = nb_dir.join(\"subfolder\").join(\"nb.ipynb\")\n\n    assert {path for (path, _) in paired_paths(str(notebook_in_nb_dir), fmt, formats)} == {\n        str(notebook_in_nb_dir),\n        str(src_dir.join(\"subfolder\").join(\"nb.py\")),\n    }\n\n    # Notebook in base 'notebook' dir is paired if no config file is found\n    notebook_in_other_dir = other_dir.mkdir(\"subfolder\").join(\"nb.ipynb\")\n    assert {path for (path, _) in paired_paths(str(notebook_in_other_dir), fmt, formats)} == {\n        str(notebook_in_other_dir),\n        str(tmpdir.join(\"scripts\").join(\"other\").join(\"subfolder\").join(\"nb.py\")),\n    }\n\n    # When a config file exists\n    root_nb_dir.join(\"jupytext.toml\").write(\"\\n\")\n\n    # Notebook in nested 'notebook' dir is still paired\n    assert {path for (path, _) in paired_paths(str(notebook_in_nb_dir), fmt, formats)} == {\n        str(notebook_in_nb_dir),\n        str(src_dir.join(\"subfolder\").join(\"nb.py\")),\n    }\n\n    # But the notebook in base 'notebook' dir is not paired any more\n    alert = (\n        \"Notebook directory '/other/subfolder' does not match prefix root 'notebooks'\"\n        if os.path.sep == \"/\"\n        # we escape twice the backslash because pytest.raises matches it as a regular expression\n        else \"Notebook directory '\\\\\\\\other\\\\\\\\subfolder' does not match prefix root 'notebooks'\"\n    )\n    with pytest.raises(InconsistentPath, match=alert):\n        paired_paths(str(notebook_in_other_dir), fmt, formats)\n\n\ndef test_many_and_suffix():\n    formats = long_form_multiple_formats(\"ipynb,.pct.py,_lgt.py\")\n    expected_paths = [\"notebook.ipynb\", \"notebook.pct.py\", \"notebook_lgt.py\"]\n    for fmt, path in zip(formats, expected_paths):\n        compare(paired_paths(path, fmt, formats), list(zip(expected_paths, formats)))\n\n    with pytest.raises(InconsistentPath):\n        paired_paths(\"wrong_suffix.py\", \"py\", formats)\n\n\ndef test_prefix_and_suffix():\n    short_formats = (\n        \"notebook_folder/notebook_prefix_/_notebook_suffix.ipynb,\"\n        \"script_folder//_in_percent_format.py:percent,\"\n        \"script_folder//_in_light_format.py\"\n    )\n\n    formats = long_form_multiple_formats(short_formats)\n    assert short_form_multiple_formats(formats) == short_formats\n\n    expected_paths = [\n        \"parent/notebook_folder/notebook_prefix_NOTEBOOK_NAME_notebook_suffix.ipynb\",\n        \"parent/script_folder/NOTEBOOK_NAME_in_percent_format.py\",\n        \"parent/script_folder/NOTEBOOK_NAME_in_light_format.py\",\n    ]\n    for fmt, path in zip(formats, expected_paths):\n        compare(paired_paths(path, fmt, formats), list(zip(expected_paths, formats)))\n\n    # without the parent folder\n    expected_paths = [path[7:] for path in expected_paths]\n    for fmt, path in zip(formats, expected_paths):\n        compare(paired_paths(path, fmt, formats), list(zip(expected_paths, formats)))\n\n    # Not the expected parent folder\n    with pytest.raises(InconsistentPath):\n        paired_paths(\n            \"script_folder_incorrect/NOTEBOOK_NAME_in_percent_format.py\",\n            formats[1],\n            formats,\n        )\n\n    # Not the expected suffix\n    with pytest.raises(InconsistentPath):\n        paired_paths(\"parent/script_folder/NOTEBOOK_NAME_in_LIGHT_format.py\", formats[2], formats)\n\n    # Not the expected extension\n    with pytest.raises(InconsistentPath):\n        paired_paths(\n            \"notebook_folder/notebook_prefix_NOTEBOOK_NAME_notebook_suffix.py\",\n            formats[0],\n            formats,\n        )\n\n\ndef test_prefix_on_root_174():\n    short_formats = \"ipynb,python//py:percent\"\n\n    formats = long_form_multiple_formats(short_formats)\n    assert short_form_multiple_formats(formats) == short_formats\n\n    expected_paths = [\"Untitled.ipynb\", \"python/Untitled.py\"]\n    for fmt, path in zip(formats, expected_paths):\n        compare(paired_paths(path, fmt, formats), list(zip(expected_paths, formats)))\n\n\ndef test_duplicated_paths():\n    formats = long_form_multiple_formats(\"ipynb,py:percent,py:light\")\n    with pytest.raises(InconsistentPath):\n        paired_paths(\"notebook.ipynb\", \"ipynb\", formats)\n\n\n@pytest.mark.asyncio\nasync def test_cm_paired_paths(cm):\n    cm.paired_notebooks = dict()\n\n    three = \"ipynb,py,md\"\n    cm.update_paired_notebooks(\"nb.ipynb\", three)\n    assert cm.paired_notebooks == {\"nb.\" + fmt: (fmt, three) for fmt in three.split(\",\")}\n\n    two = \"ipynb,Rmd\"\n    cm.update_paired_notebooks(\"nb.ipynb\", two)\n    assert cm.paired_notebooks == {\"nb.\" + fmt: (fmt, two) for fmt in two.split(\",\")}\n\n    one = \"ipynb\"\n    cm.update_paired_notebooks(\"nb.ipynb\", one)\n    assert cm.paired_notebooks == {}\n\n    zero = \"\"\n    cm.update_paired_notebooks(\"nb.ipynb\", zero)\n    assert cm.paired_notebooks == {}\n\n\ndef test_paired_path_with_prefix(\n    nb_file=\"scripts/test.py\",\n    fmt={\"extension\": \".py\", \"format_name\": \"percent\"},\n    formats=[\n        {\"extension\": \".ipynb\"},\n        {\"prefix\": \"scripts/\", \"format_name\": \"percent\", \"extension\": \".py\"},\n    ],\n):\n    assert paired_paths(nb_file, fmt, formats) == [\n        (\"test.ipynb\", {\"extension\": \".ipynb\"}),\n        (\n            \"scripts/test.py\",\n            {\"prefix\": \"scripts/\", \"format_name\": \"percent\", \"extension\": \".py\"},\n        ),\n    ]\n\n\ndef test_paired_notebook_ipynb_root_scripts_in_folder_806(tmpdir, cwd_tmpdir, python_notebook):\n    \"\"\"In this test we pair a notebook with a script in a subfolder, and then do some\n    natural operations like delete/recreate one of the paired files\"\"\"\n    # Save sample notebook\n    test_ipynb = tmpdir / \"test.ipynb\"\n    jupytext.write(python_notebook, str(test_ipynb))\n\n    # Pair the notebook to a script in a subfolder\n    jupytext_cli([\"--set-formats\", \"ipynb,scripts//py:percent\", \"test.ipynb\"])\n    assert (tmpdir / \"scripts\" / \"test.py\").exists()\n\n    # Delete and then recreate the ipynb notebook using --to notebook\n    test_ipynb.remove()\n    jupytext_cli(\n        [\n            \"--to\",\n            \"notebook\",\n            \"--output\",\n            \"test.ipynb\",\n            \"scripts/test.py\",\n        ]\n    )\n    assert test_ipynb.exists()\n\n    # Delete and then recreate the ipynb notebook using --sync\n    test_ipynb.remove()\n    jupytext_cli(\n        [\n            \"--sync\",\n            \"scripts/test.py\",\n        ]\n    )\n    assert test_ipynb.exists()\n\n\n@pytest.mark.parametrize(\n    \"path, input_fmt, adjusted_fmt\",\n    [\n        (\n            \"scripts/test.py\",\n            {\"extension\": \".py\", \"format_name\": \"percent\", \"prefix\": \"scripts//\"},\n            {\"extension\": \".py\", \"format_name\": \"percent\", \"prefix\": \"scripts//\"},\n        ),\n        (\n            \"test.py\",\n            {\"extension\": \".py\", \"format_name\": \"percent\", \"prefix\": \"scripts//\"},\n            {\n                \"extension\": \".py\",\n                \"format_name\": \"percent\",\n            },\n        ),\n        (\n            \"test.py\",\n            {\"extension\": \".py\", \"format_name\": \"percent\", \"prefix\": \"prefix_\"},\n            {\"extension\": \".py\", \"format_name\": \"percent\"},\n        ),\n    ],\n)\ndef test_paired_paths_and_adjusted_fmt(path, input_fmt, adjusted_fmt):\n    base_path, actual_adjusted_fmt = base_path_and_adjusted_fmt(path, input_fmt)\n    assert actual_adjusted_fmt == adjusted_fmt\n\n\n@pytest.mark.parametrize(\"os_sep\", [\"\\\\\", \"/\"])\ndef test_base_path_os_sep(os_sep):\n    fmt = \"notebooks/tutorials///ipynb\"\n    root = (\"\" if os_sep == \"/\" else \"C:\") + os_sep\n    path = root + os_sep.join([\"notebooks\", \"tutorials\", \"subfolder\", \"notebook.ipynb\"])\n    with mock.patch(\"os.path.sep\", os_sep):\n        assert base_path(path, fmt) == root + os_sep.join([\"//subfolder\", \"notebook\"])\n"
  },
  {
    "path": "tests/unit/test_pep8.py",
    "content": "from nbformat.v4.nbbase import new_code_cell, new_notebook\n\nfrom jupytext import read, reads, writes\nfrom jupytext.compare import compare\nfrom jupytext.pep8 import (\n    cell_ends_with_code,\n    cell_ends_with_function_or_class,\n    cell_has_code,\n    next_instruction_is_function_or_class,\n    pep8_lines_between_cells,\n)\n\n\ndef test_next_instruction_is_function_or_class():\n    text = \"\"\"@pytest.mark.parametrize('py_file',\n    [py_file for py_file in list_notebooks('../src/jupytext') + list_notebooks('.') if\n                                     py_file.endswith('.py')])\ndef test_no_metadata_when_py_is_pep8(py_file):\n    pass\n\"\"\"\n    assert next_instruction_is_function_or_class(text.splitlines())\n\n\ndef test_cell_ends_with_code():\n    assert not cell_ends_with_code([])\n\n\ndef test_cell_ends_with_function_or_class():\n    text = \"\"\"class A:\n    __init__():\n    '''A docstring\nwith two lines or more'''\n        self.a = 0\n\"\"\"\n    assert cell_ends_with_function_or_class(text.splitlines())\n\n    lines = [\"#\", \"#\"]\n    assert not cell_ends_with_function_or_class(lines)\n\n    text = \"\"\"# two blank line after this class\nclass A:\n    pass\n\n\n# so we do not need to insert two blank lines below this cell\n    \"\"\"\n    assert not cell_ends_with_function_or_class(text.splitlines())\n\n    text = \"\"\"# All lines\n# are commented\"\"\"\n    assert not cell_ends_with_function_or_class(text.splitlines())\n\n    text = \"\"\"# Two blank lines after function\ndef f(x):\n    return x\n\n\n# And a comment here\"\"\"\n    assert not cell_ends_with_function_or_class(text.splitlines())\n\n    assert not cell_ends_with_function_or_class([\"\", \"#\"])\n\n\ndef test_pep8_lines_between_cells():\n    prev_lines = \"\"\"a = a_long_instruction(\n    over_two_lines=True)\"\"\".splitlines()\n\n    next_lines = \"\"\"def f(x):\n    return x\"\"\".splitlines()\n\n    assert cell_ends_with_code(prev_lines)\n    assert next_instruction_is_function_or_class(next_lines)\n    assert pep8_lines_between_cells(prev_lines, next_lines, \".py\") == 2\n\n\ndef test_pep8_lines_between_cells_bis():\n    prev_lines = \"\"\"def f(x):\n    return x\"\"\".splitlines()\n\n    next_lines = \"\"\"# A markdown cell\n\n# An instruction\na = 5\n\"\"\".splitlines()\n\n    assert cell_ends_with_function_or_class(prev_lines)\n    assert cell_has_code(next_lines)\n    assert pep8_lines_between_cells(prev_lines, next_lines, \".py\") == 2\n\n    next_lines = \"\"\"# A markdown cell\n\n# Only markdown here\n# And here\n\"\"\".splitlines()\n\n    assert cell_ends_with_function_or_class(prev_lines)\n    assert not cell_has_code(next_lines)\n    assert pep8_lines_between_cells(prev_lines, next_lines, \".py\") == 1\n\n\ndef test_pep8_lines_between_cells_ter():\n    prev_lines = [\"from jupytext.cell_to_text import RMarkdownCellExporter\"]\n\n    next_lines = '''@pytest.mark.parametrize(\n    \"lines\",\n    [\n        \"# text\",\n        \"\"\"# # %%R\n# # comment\n# 1 + 1\n# 2 + 2\n\"\"\",\n    ],\n)\ndef test_paragraph_is_fully_commented(lines):\n    assert paragraph_is_fully_commented(\n        lines.splitlines(), comment=\"#\", main_language=\"python\"\n    )'''.splitlines()\n\n    assert cell_ends_with_code(prev_lines)\n    assert next_instruction_is_function_or_class(next_lines)\n    assert pep8_lines_between_cells(prev_lines, next_lines, \".py\") == 2\n\n\ndef test_pep8():\n    text = \"\"\"import os\n\npath = os.path\n\n\n# code cell #1, with a comment on f\ndef f(x):\n    return x + 1\n\n\n# markdown cell #1\n\n# code cell #2 - an instruction\na = 4\n\n\n# markdown cell #2\n\n# code cell #3 with a comment on g\ndef g(x):\n    return x + 1\n\n\n# markdown cell #3\n\n# the two lines are:\n# - right below the function/class\n# - below the last python paragraph (i.e. NOT ABOVE g)\n\n# code cell #4\nx = 4\n\"\"\"\n    nb = reads(text, \"py\")\n    for cell in nb.cells:\n        assert not cell.metadata\n\n    text2 = writes(nb, \"py\")\n    compare(text2, text)\n\n\ndef test_pep8_bis():\n    text = \"\"\"# This is a markdown cell\n\n# a code cell\ndef f(x):\n    return x + 1\n\n# And another markdown cell\n# Separated from f by just one line\n# As there is no code here\n\"\"\"\n    nb = reads(text, \"py\")\n    for cell in nb.cells:\n        assert not cell.metadata\n\n    text2 = writes(nb, \"py\")\n    compare(text2, text)\n\n\ndef test_no_metadata_when_py_is_pep8(py_file):\n    \"\"\"This test assumes that all Python files in the jupytext folder follow PEP8 rules\"\"\"\n    nb = read(py_file)\n\n    for i, cell in enumerate(nb.cells):\n        if \"title\" in cell.metadata:\n            cell.metadata.pop(\"title\")  # pragma: no cover\n        if i == 0 and not cell.source:\n            assert cell.metadata == {\"lines_to_next_cell\": 0}, py_file  # pragma: no cover\n        else:\n            assert not cell.metadata, (py_file, cell.source)\n\n\ndef test_notebook_ends_with_exactly_one_empty_line_682():\n    \"\"\"(Issue #682)\n    Steps to reproduce:\n\n        Have a notebook that ends in a python code cell (with no empty lines at the end of the cell).\n        run jupytext --to py:percent notebookWithCodeCell.ipynb.\n        See that the generated python code file has two empty lines at the end.\n\n    I would expect there to just be one new line.\"\"\"\n    nb = new_notebook(cells=[new_code_cell(\"1+1\")], metadata={\"jupytext\": {\"main_language\": \"python\"}})\n    py = writes(nb, \"py:percent\")\n    assert py.endswith(\"1+1\\n\")\n"
  },
  {
    "path": "tests/unit/test_stringparser.py",
    "content": "from jupytext.stringparser import StringParser\n\n\ndef test_long_string(\n    text=\"\"\"'''This is a multiline\ncomment with \"quotes\", 'single quotes'\n# and comments\nand line breaks\n\n\nand it ends here'''\n\n\n1 + 1\n\"\"\",\n):\n    quoted = []\n    sp = StringParser(\"python\")\n    for i, line in enumerate(text.splitlines()):\n        if sp.is_quoted():\n            quoted.append(i)\n        sp.read_line(line)\n\n    assert quoted == [1, 2, 3, 4, 5, 6]\n\n\ndef test_single_chars(\n    text=\"\"\"'This is a single line comment'''\n'and another one'\n# and comments\n\"and line breaks\"\n\n\n\"and it ends here'''\"\n\n\n1 + 1\n\"\"\",\n):\n    sp = StringParser(\"python\")\n    for line in text.splitlines():\n        assert not sp.is_quoted()\n        sp.read_line(line)\n\n\ndef test_long_string_with_four_quotes(\n    text=\"\"\"''''This is a multiline\ncomment that starts with four quotes\n'''\n\n1 + 1\n\"\"\",\n):\n    quoted = []\n    sp = StringParser(\"python\")\n    for i, line in enumerate(text.splitlines()):\n        if sp.is_quoted():\n            quoted.append(i)\n        sp.read_line(line)\n\n    assert quoted == [1, 2]\n\n\ndef test_long_string_ends_with_four_quotes(\n    text=\"\"\"'''This is a multiline\ncomment that ends with four quotes\n''''\n\n1 + 1\n\"\"\",\n):\n    quoted = []\n    sp = StringParser(\"python\")\n    for i, line in enumerate(text.splitlines()):\n        if sp.is_quoted():\n            quoted.append(i)\n        sp.read_line(line)\n\n    assert quoted == [1, 2]\n"
  },
  {
    "path": "tools/absolute_links_in_readme.py",
    "content": "import re\nfrom pathlib import Path\n\nfrom hatchling.metadata.plugin.interface import MetadataHookInterface\n\n\nclass AbsoluteLinksInReadme(MetadataHookInterface):\n    \"\"\"Hook that processes README.md to make relative links absolute.\"\"\"\n\n    def update(self, metadata):\n        \"\"\"Process README.md when metadata is being prepared.\"\"\"\n        readme_src_path = Path(\"README.md\")\n        readme_output_path = Path(\"build/README_with_absolute_links.md\")\n        base_url = \"https://github.com/mwouts/jupytext/blob/main/\"\n\n        # Ensure the dist directory exists\n        readme_output_path.parent.mkdir(exist_ok=True)\n\n        self.convert_links(readme_src_path, readme_output_path, base_url)\n        return metadata\n\n    def convert_links(self, src_path, output_path, base_url):\n        \"\"\"Convert relative links in README.md to absolute links.\"\"\"\n        print(f\"Processing {src_path} to generate {output_path} with absolute links\")\n        content = src_path.read_text(encoding=\"utf-8\")\n\n        # Find markdown links that don't start with http:// or https://\n        pattern = re.compile(r\"\\[([^\\]]+)\\]\\((?!http)([^)]+)\\)\")\n\n        def replace_link(match):\n            text, url = match.groups()\n            if not url.startswith((\"http://\", \"https://\", \"#\")):\n                url = base_url + url\n            return f\"[{text}]({url})\"\n\n        new_content = pattern.sub(replace_link, content)\n\n        # Write the processed content to the output file\n        output_path.parent.mkdir(exist_ok=True)\n        output_path.write_text(new_content, encoding=\"utf-8\")\n        print(f\"Generated {output_path} with absolute links\")\n"
  }
]